Compare commits
4 Commits
d526d97f4e
...
82a1792bda
Author | SHA1 | Date |
---|---|---|
shanao | 82a1792bda | |
shanao | 4fb73fab50 | |
shanao | ce9d974e99 | |
shanao | 5b483cbdf6 |
|
@ -0,0 +1,217 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="infoForm"
|
||||
label-width="180px"
|
||||
style="width: 900px"
|
||||
>
|
||||
<el-form-item :label-width="formLabelWidth" label="事故案号" prop="incidentNumber">
|
||||
<el-input v-model="infoForm.incidentNumber" :disabled="isDisabled" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="事故名称" prop="incidentName">
|
||||
<el-input v-model="infoForm.incidentName" :disabled="isDisabled" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="事故类型" prop="incidentType">
|
||||
<el-select v-model="infoForm.incidentType" :disabled="isDisabled" placeholder="请选择">
|
||||
<el-option v-for="item in incidentTypes" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="事故级别" prop="incidentLevel">
|
||||
<el-select v-model="infoForm.incidentLevel" :disabled="isDisabled" placeholder="请选择">
|
||||
<el-option v-for="item in incidentLevels" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="事故发生地点" prop="location">
|
||||
<el-input v-model="infoForm.location" :disabled="isDisabled" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="事故发生时间" prop="incidentDate">
|
||||
<el-date-picker
|
||||
:disabled="isDisabled"
|
||||
v-model="infoForm.incidentDate"
|
||||
type="date"
|
||||
placeholder="选择事故发生时间"
|
||||
style="width: 100%;"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="直接经济损失" prop="directLoss">
|
||||
<el-input v-model="infoForm.directLoss" :disabled="isDisabled" type="number" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="受伤人数" prop="injured">
|
||||
<el-input v-model="infoForm.injured" :disabled="isDisabled" type="number" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="死亡人数" prop="fatalities">
|
||||
<el-input v-model="infoForm.fatalities" :disabled="isDisabled" type="number" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="重伤人数" prop="seriouslyInjured">
|
||||
<el-input v-model="infoForm.seriouslyInjured" :disabled="isDisabled" type="number" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="事故起因" prop="cause">
|
||||
<el-input v-model="infoForm.cause" :disabled="isDisabled" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="事故概述" prop="summary">
|
||||
<el-input v-model="infoForm.summary" :disabled="isDisabled" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="事故照片" prop="photos">
|
||||
<el-image
|
||||
:src="image(infoForm.photos, true)"
|
||||
:preview-src-list="image(infoForm.photos,false)"
|
||||
style="width: 100px; height: 100px"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="原因分析及责任认定" prop="analysis">
|
||||
<el-input v-model="infoForm.analysis" :disabled="isDisabled" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="考核建议" prop="suggestions">
|
||||
<el-input v-model="infoForm.suggestions" :disabled="isDisabled" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="整改措施" prop="measures">
|
||||
<el-input v-model="infoForm.measures" :disabled="isDisabled" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="填表人" prop="creator">
|
||||
<el-input v-model="infoForm.creator" :disabled="isDisabled" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label-width="formLabelWidth" label="报出日期" prop="reportDate">
|
||||
<el-date-picker
|
||||
v-model="infoForm.reportDate"
|
||||
:disabled="isDisabled"
|
||||
type="date"
|
||||
placeholder="请选择报出日期"
|
||||
style="width: 100%;"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-dialog :visible.sync="dialogImgVisible">
|
||||
<img :src="config.fileUrl+infoForm.photos" width="100%" alt="">
|
||||
</el-dialog>
|
||||
|
||||
<div class="ui-height"/>
|
||||
<div class="ui-foot">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-arrow-left"
|
||||
plain
|
||||
@click="goBack">返回
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { requestFN } from '../../../../utils/request'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
config: config,
|
||||
infoForm: {
|
||||
id: '', // 主键ID
|
||||
incidentNumber: '', // 事故案号
|
||||
incidentName: '', // 事故名称
|
||||
incidentType: null, // 事故类型
|
||||
companyName: '', // 所属公司
|
||||
incidentLevel: '', // 事故级别
|
||||
incidentNature: '', // 事故性质
|
||||
location: '', // 事故发生地点
|
||||
incidentDate: null, // 事故发生时间
|
||||
directLoss: '', // 直接经济损失(万元)
|
||||
injured: null, // 受伤人数
|
||||
fatalities: null, // 死亡人数
|
||||
seriouslyInjured: null, // 重伤人数
|
||||
cause: '', // 事故起因
|
||||
summary: '', // 事故概述
|
||||
photos: '', // 事故照片
|
||||
analysis: '', // 原因分析及责任认定
|
||||
suggestions: '', // 考核建议
|
||||
measures: '', // 整改措施
|
||||
creator: '', // 填表人
|
||||
reportDate: null // 报出日期
|
||||
},
|
||||
formLabelWidth: '140px',
|
||||
/** 事故类型 */
|
||||
incidentTypes: [],
|
||||
/** 事故等级 */
|
||||
incidentLevels: [],
|
||||
/** 预览弹窗 */
|
||||
dialogImgVisible: false,
|
||||
isDisabled: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
requestFN('/accident/info/' + this.$parent.id, {}).then((data) => {
|
||||
this.infoForm = data.info
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 返回到列表页面
|
||||
*/
|
||||
goBack() {
|
||||
this.handleResetInitForm()
|
||||
this.$parent.id = ''
|
||||
this.$parent.activeName = 'List'
|
||||
},
|
||||
|
||||
/**
|
||||
* 表单清空处理
|
||||
*/
|
||||
handleResetInitForm() {
|
||||
this.infoForm = {
|
||||
id: '', // 主键ID
|
||||
incidentNumber: '', // 事故案号
|
||||
incidentName: '', // 事故名称
|
||||
incidentType: null, // 事故类型
|
||||
companyName: '', // 所属公司
|
||||
incidentLevel: '', // 事故级别
|
||||
incidentNature: '', // 事故性质
|
||||
location: '', // 事故发生地点
|
||||
incidentDate: null, // 事故发生时间
|
||||
directLoss: '', // 直接经济损失(万元)
|
||||
injured: null, // 受伤人数
|
||||
fatalities: null, // 死亡人数
|
||||
seriouslyInjured: null, // 重伤人数
|
||||
cause: '', // 事故起因
|
||||
summary: '', // 事故概述
|
||||
photos: [], // 事故照片
|
||||
analysis: '', // 原因分析及责任认定
|
||||
suggestions: '', // 考核建议
|
||||
measures: '', // 整改措施
|
||||
creator: '', // 填表人
|
||||
reportDate: null // 报出日期
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取字典
|
||||
*/
|
||||
getDict() {
|
||||
const url = '/dictionaries/listSelectTree'
|
||||
requestFN(url,
|
||||
{
|
||||
DICTIONARIES_ID: '8d4140a900184b60836ad1a6490fd510'
|
||||
}
|
||||
).then((data) => {
|
||||
this.incidentTypes = JSON.parse(data.zTreeNodes)
|
||||
})
|
||||
requestFN(url,
|
||||
{
|
||||
DICTIONARIES_ID: 'b61a1edc59c0430c8741c5f51aa26c3c'
|
||||
}
|
||||
).then((data) => {
|
||||
this.incidentLevels = JSON.parse(data.zTreeNodes)
|
||||
})
|
||||
},
|
||||
image(url, flag) {
|
||||
return flag ? config.fileUrl + url : [config.fileUrl + url]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,229 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form ref="searchForm" :model="searchForm" label-width="100px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="事故名称" prop="incidentName">
|
||||
<el-input v-model="searchForm.incidentName" placeholder="请输入事故名称" class="filter-item"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="发生时间" prop="incidentDates">
|
||||
<el-date-picker
|
||||
v-model="searchForm.incidentDates"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd"
|
||||
style="width: 100%"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="发生地点" prop="location">
|
||||
<el-input v-model="searchForm.location" placeholder="请输入发生地点" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="事故类型" prop="incidentType">
|
||||
<el-select v-model="searchForm.incidentType" placeholder="请选择">
|
||||
<el-option v-for="item in incidentTypes" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="事故等级" prop="incidentLevel">
|
||||
<el-select v-model="searchForm.incidentLevel" placeholder="请选择">
|
||||
<el-option v-for="item in incidentLevels" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-button v-waves type="primary" icon="el-icon-search" @click="searchList">查询</el-button>
|
||||
<el-button v-waves icon="el-icon-refresh" @click="handleReset">重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-arrow-left"
|
||||
plain
|
||||
@click="goBack">返回
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 搜索查询 end -->
|
||||
</el-form>
|
||||
|
||||
<!-- table 表格 start -->
|
||||
<div style="margin-top: 16px;">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
border
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column align="center" label="事故名称" prop="incidentName"/>
|
||||
<el-table-column align="center" label="所属公司" prop="companyName"/>
|
||||
<el-table-column align="center" label="发生时间" prop="incidentDate">
|
||||
<template v-slot="{row}">
|
||||
{{ formatDate(row.incidentDate,'YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="发生地点" prop="location"/>
|
||||
<el-table-column align="center" label="操作" width="100">
|
||||
<template v-slot="{row}">
|
||||
<el-button icon="el-icon-view" size="mini" @click="goView(row.id)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- table 表格 end -->
|
||||
|
||||
<div class="pagination-group">
|
||||
<pagination :total="listQuery.total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="searchList" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import waves from '@/directive/waves'
|
||||
import formatDate from '../../../../utils/dateformat'
|
||||
import { requestFN } from '../../../../utils/request'
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
directives: { waves },
|
||||
|
||||
data() {
|
||||
return {
|
||||
// 搜索查询条件
|
||||
searchForm: {
|
||||
/** 事故名称 */
|
||||
incidentName: '',
|
||||
/** 发生时间 */
|
||||
incidentDates: [],
|
||||
/** 开始时间 */
|
||||
startTime: null,
|
||||
/** 结束时间 */
|
||||
endTime: null,
|
||||
/** 发生地点 */
|
||||
location: '',
|
||||
/** 事故类型 */
|
||||
incidentType: '',
|
||||
/** 事故等级 */
|
||||
incidentLevel: ''
|
||||
},
|
||||
/** 列表加载态 */
|
||||
listLoading: false,
|
||||
/** 源列表数据项 */
|
||||
varList: [],
|
||||
/** 事故类型 */
|
||||
incidentTypes: [],
|
||||
/** 事故等级 */
|
||||
incidentLevels: [],
|
||||
// 列表分页参数
|
||||
listQuery: {
|
||||
/** 当前页数 */
|
||||
page: 1,
|
||||
/** 分页数 */
|
||||
limit: 20,
|
||||
/** 总页数 */
|
||||
total: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getDict()
|
||||
this.searchList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 查询搜索
|
||||
*/
|
||||
searchList() {
|
||||
this.listLoading = true
|
||||
const dates = this.searchForm.incidentDates
|
||||
if (dates != null && dates.length === 2) {
|
||||
this.searchForm.startTime = dates[0]
|
||||
this.searchForm.endTime = dates[1]
|
||||
}
|
||||
const url = '/accident/page?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page
|
||||
requestFN(url, { ...this.searchForm, corpInfoId: this.$parent.corpInfoId }).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.listQuery.total = data.page.totalResult
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 重置搜索条件
|
||||
*/
|
||||
handleReset() {
|
||||
this.searchForm = this.$options.data().searchForm
|
||||
this.searchList()
|
||||
},
|
||||
|
||||
/**
|
||||
* 跳转查看详情页面
|
||||
*/
|
||||
goView(id) {
|
||||
this.$parent.id = id
|
||||
this.$parent.activeName = 'AddOrEdit'
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询字典
|
||||
*/
|
||||
getDict() {
|
||||
const url = '/dictionaries/listSelectTree'
|
||||
requestFN(url,
|
||||
{
|
||||
DICTIONARIES_ID: '8d4140a900184b60836ad1a6490fd510'
|
||||
}
|
||||
).then((data) => {
|
||||
this.incidentTypes = JSON.parse(data.zTreeNodes)
|
||||
})
|
||||
requestFN(url,
|
||||
{
|
||||
DICTIONARIES_ID: 'b61a1edc59c0430c8741c5f51aa26c3c'
|
||||
}
|
||||
).then((data) => {
|
||||
this.incidentLevels = JSON.parse(data.zTreeNodes)
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 表单清空处理
|
||||
*/
|
||||
handleResetInitForm() {
|
||||
this.searchForm = this.$options.data().searchForm
|
||||
},
|
||||
|
||||
/**
|
||||
* 返回到列表页面
|
||||
*/
|
||||
goBack() {
|
||||
this.handleResetInitForm()
|
||||
this.$parent.activeName = 'ListCount'
|
||||
this.$parent.corpInfoId = ''
|
||||
},
|
||||
|
||||
formatDate(date, format) {
|
||||
return formatDate(date, format)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.pagination-group {
|
||||
margin-top: 14px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,152 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form ref="searchForm" label-width="100px">
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="企业名称" prop="corpInfoId">
|
||||
<el-select v-model="corpInfoId" filterable placeholder="请选择">
|
||||
<el-option v-for="item in corpinfos" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-button v-waves type="primary" icon="el-icon-search" @click="searchList">查询</el-button>
|
||||
<el-button v-waves icon="el-icon-refresh" @click="handleReset">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 搜索查询 end -->
|
||||
</el-form>
|
||||
|
||||
<!-- table 表格 start -->
|
||||
<div style="margin-top: 16px;">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
border
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column align="center" label="公司名称" prop="companyName" width="100"/>
|
||||
<el-table-column align="center" label="放炮" prop="fire"/>
|
||||
<el-table-column align="center" label="容器爆炸" prop="containerBlast"/>
|
||||
<el-table-column align="center" label="道路交通" prop="roadTraffic"/>
|
||||
<el-table-column align="center" label="火药爆炸" prop="chemicalBlast"/>
|
||||
<el-table-column align="center" label="火灾" prop="fireDamage"/>
|
||||
<el-table-column align="center" label="机械伤害" prop="mechanicalDamage"/>
|
||||
<el-table-column align="center" label="锅炉爆炸" prop="boilerBlast"/>
|
||||
<el-table-column align="center" label="淹溺" prop="drowning"/>
|
||||
<el-table-column align="center" label="灼烫" prop="scorching"/>
|
||||
<el-table-column align="center" label="高处坠落" prop="highFall"/>
|
||||
<el-table-column align="center" label="中毒和窒息" prop="poisoningAndSuffocation"/>
|
||||
<el-table-column align="center" label="车辆伤害" prop="vehicleDamage"/>
|
||||
<el-table-column align="center" label="坍塌" prop="collapse"/>
|
||||
<el-table-column align="center" label="冒顶片帮" prop="overhang"/>
|
||||
<el-table-column align="center" label="透水" prop="waterOverflow"/>
|
||||
<el-table-column align="center" label="瓦斯爆炸" prop="gasBlast"/>
|
||||
<el-table-column align="center" label="其它爆炸" prop="otherBlast"/>
|
||||
<el-table-column align="center" label="触电" prop="electricShock"/>
|
||||
<el-table-column align="center" label="物体打击" prop="objectImpact"/>
|
||||
<el-table-column align="center" label="其它伤害" prop="otherDamage"/>
|
||||
<el-table-column align="center" label="起重伤害" prop="seriousInjury"/>
|
||||
<el-table-column align="center" label="操作" width="100">
|
||||
<template v-slot="{row}">
|
||||
<el-button icon="el-icon-view" size="mini" @click="goView(row.corpinfoId)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- table 表格 end -->
|
||||
<div class="pagination-group">
|
||||
<pagination :total="listQuery.total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="searchList" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import waves from '@/directive/waves'
|
||||
import { requestFN } from '../../../../utils/request'
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
directives: { waves },
|
||||
|
||||
data() {
|
||||
return {
|
||||
/** 企业id */
|
||||
corpInfoId: '',
|
||||
/** 列表加载态 */
|
||||
listLoading: false,
|
||||
/** 源列表数据项 */
|
||||
varList: [],
|
||||
/** 银行列表 */
|
||||
corpinfos: [],
|
||||
// 列表分页参数
|
||||
listQuery: {
|
||||
/** 当前页数 */
|
||||
page: 1,
|
||||
/** 分页数 */
|
||||
limit: 20,
|
||||
/** 总页数 */
|
||||
total: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getDict()
|
||||
this.searchList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 查询搜索
|
||||
*/
|
||||
searchList() {
|
||||
this.listLoading = true
|
||||
const url = '/accident/page/count?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page
|
||||
requestFN(url, { corpInfoId: this.corpInfoId }).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.listQuery.total = data.page.totalResult
|
||||
}).catch(() => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 重置搜索条件
|
||||
*/
|
||||
handleReset() {
|
||||
this.corpInfoId = this.$options.data().corpInfoId
|
||||
this.searchList()
|
||||
},
|
||||
|
||||
/**
|
||||
* 跳转查看企业异常列表页面
|
||||
*/
|
||||
goView(id) {
|
||||
this.$parent.corpInfoId = id
|
||||
this.$parent.activeName = 'List'
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询企业信息
|
||||
*/
|
||||
getDict() {
|
||||
const url = '/accident/corpinfo'
|
||||
requestFN(url, {}
|
||||
).then((data) => {
|
||||
this.corpinfos = data.corpinfo
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.pagination-group {
|
||||
margin-top: 14px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,40 @@
|
|||
<template>
|
||||
<div>
|
||||
<ListCount v-if="activeName === 'ListCount'" ref="ListCount" />
|
||||
<List v-if="activeName === 'List'" ref="List" />
|
||||
<Add v-if="activeName === 'AddOrEdit'" ref="AddOrEdit" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ListCount from './components/listCount.vue'
|
||||
import List from './components/list.vue'
|
||||
import Add from './components/addOrEdit.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ListCount: ListCount,
|
||||
Add: Add,
|
||||
List: List
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'ListCount',
|
||||
id: '',
|
||||
corpInfoId: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
activeName(val) {
|
||||
if (val === 'List') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.List.searchList()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
Loading…
Reference in New Issue