fix:修复了复选框bug,排查任务表格不显示

style:调整的弹框的宽度,表格的高度
feature1.0
kongyeqing 2023-07-03 16:31:53 +08:00
parent b82206e6fd
commit 69670fe155
13 changed files with 159 additions and 80 deletions

View File

@ -14,7 +14,7 @@
<TableComponent :tableData="analysisUpdateParams.measures" :tableColumn="triTableColumn" <TableComponent :tableData="analysisUpdateParams.measures" :tableColumn="triTableColumn"
@actionCallback="measureCallback($event)" :actions="analyIsReadonly ? [] : triTableActions" @actionCallback="measureCallback($event)" :actions="analyIsReadonly ? [] : triTableActions"
actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;"> actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="analysisUpdateParams.measures" tooltip-effect="dark" height="500" <el-table ref="multipleTable" :data="analysisUpdateParams.measures" tooltip-effect="dark" max-height="500"
border row-key="checked" @selection-change="handleSelectionChange" style="width: 100%"> border row-key="checked" @selection-change="handleSelectionChange" style="width: 100%">
<el-table-column type="selection" fixed label="全选" width="40"> <el-table-column type="selection" fixed label="全选" width="40">
</el-table-column> </el-table-column>
@ -45,7 +45,7 @@
</FormComponent> </FormComponent>
<!-- 风险评估方法 --> <!-- 风险评估方法 -->
<el-dialog :close-on-click-modal="false" :show-close="false" :visible.sync="showRiskUpdate" width="800px" <el-dialog :close-on-click-modal="false" :show-close="false" :visible.sync="showRiskUpdate" width="952px"
:before-close="handleClose"> :before-close="handleClose">
<FormComponent :options="riskType === 'ls' ? riskLSUpdateOptions : riskLECUpdateOptions" labelWidth="110px" <FormComponent :options="riskType === 'ls' ? riskLSUpdateOptions : riskLECUpdateOptions" labelWidth="110px"
labelAlign="right" :data.sync="methodUpdateParams" @actionCallback="methodCallback" :actions="triActions" labelAlign="right" :data.sync="methodUpdateParams" @actionCallback="methodCallback" :actions="triActions"
@ -61,7 +61,7 @@
</el-dialog> </el-dialog>
<!-- 风险评估取值 --> <!-- 风险评估取值 -->
<div v-if="showRiskValueUpdate"> <div v-if="showRiskValueUpdate">
<el-dialog :close-on-click-modal="false" :title="riskTitle" :visible.sync="showRiskValueUpdate" width="750px" <el-dialog :close-on-click-modal="false" :title="riskTitle" :visible.sync="showRiskValueUpdate" width="952px"
:before-close="handleClose" :show-close="false"> :before-close="handleClose" :show-close="false">
<TableComponent :tableData="riskTableData" :tableColumn="riskTableColumn" @tabCallback="popCallback($event)" <TableComponent :tableData="riskTableData" :tableColumn="riskTableColumn" @tabCallback="popCallback($event)"
actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;" actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;"
@ -82,7 +82,7 @@
</el-dialog> </el-dialog>
</div> </div>
<el-dialog :close-on-click-modal="false" :title="'管控措施制定'" :visible.sync="subUpdate" width="750px" <el-dialog :close-on-click-modal="false" :title="'管控措施制定'" :visible.sync="subUpdate" width="952px"
:before-close="handleMeasureClose"> :before-close="handleMeasureClose">
<MeasureComponent @actionCallback="dataCallback" :data.sync="measuresData" :show.sync="subUpdate" <MeasureComponent @actionCallback="dataCallback" :data.sync="measuresData" :show.sync="subUpdate"
:tabledata.sync="analysisUpdateParams" :isReadonly="measureIsReadonly"> :tabledata.sync="analysisUpdateParams" :isReadonly="measureIsReadonly">
@ -273,6 +273,7 @@ export default class AnalEvaluationComponent extends Vue {
multiple: true, multiple: true,
width: "calc(50% - 20px)", width: "calc(50% - 20px)",
datas: this.$store.state.prevention_serious_result, datas: this.$store.state.prevention_serious_result,
filterable: true,
}, },
{ {
name: "危害分析", name: "危害分析",
@ -290,6 +291,7 @@ export default class AnalEvaluationComponent extends Vue {
multiple: true, multiple: true,
width: "calc(50% - 20px)", width: "calc(50% - 20px)",
datas: this.$store.state.prevention_security_identifier, datas: this.$store.state.prevention_security_identifier,
filterable: true,
}, },
{ {
name: "设置复评时间", name: "设置复评时间",
@ -360,6 +362,7 @@ export default class AnalEvaluationComponent extends Vue {
multiple: true, multiple: true,
width: "calc(50% - 20px)", width: "calc(50% - 20px)",
datas: this.$store.state.prevention_serious_result, datas: this.$store.state.prevention_serious_result,
filterable: true,
}, },
{ {
name: "危害分析", name: "危害分析",
@ -377,6 +380,7 @@ export default class AnalEvaluationComponent extends Vue {
multiple: true, multiple: true,
width: "calc(50% - 20px)", width: "calc(50% - 20px)",
datas: this.$store.state.prevention_security_identifier, datas: this.$store.state.prevention_security_identifier,
filterable: true,
}, },
{ {
name: "设置复评时间", name: "设置复评时间",
@ -598,7 +602,7 @@ export default class AnalEvaluationComponent extends Vue {
} }
public buildTable() { public buildTable() {
this.triTableColumn.push({ name: '序号', key: "index" }); this.triTableColumn.push({ name: '序号', key: "index",width:"80px" });
this.triTableColumn.push({ this.triTableColumn.push({
name: '管控方法', key: "controlWayName", render: (data) => { name: '管控方法', key: "controlWayName", render: (data) => {
if (data.controlWay) { if (data.controlWay) {
@ -838,6 +842,11 @@ export default class AnalEvaluationComponent extends Vue {
this.measuresData.firstTypeName = this.$store.getters.prevention_measures_sort_map[row.firstType] this.measuresData.firstTypeName = this.$store.getters.prevention_measures_sort_map[row.firstType]
const secondTypeItem = this.measuresSelectData[row.firstType] const secondTypeItem = this.measuresSelectData[row.firstType]
this.measuresData.secondTypeName = this.selectName(secondTypeItem, row.secondType) this.measuresData.secondTypeName = this.selectName(secondTypeItem, row.secondType)
this.measuresData = Object.assign({ tasks: [] }, row)
this.measuresData.tasks.forEach((item, index) => {
item.index = index + 1
return item
})
} else if (!isReadonly) { } else if (!isReadonly) {
this.measureIsReadonly = false this.measureIsReadonly = false
this.measuresData = Object.assign({ tasks: [] }, row) this.measuresData = Object.assign({ tasks: [] }, row)

View File

@ -8,7 +8,7 @@
<TableComponent :tableData="updataParams.tasks" :tableColumn="tableColumn" @actionCallback="taskAdd($event)" <TableComponent :tableData="updataParams.tasks" :tableColumn="tableColumn" @actionCallback="taskAdd($event)"
:actions="!isReadonly ? tableActions : []" actionPosition="flex-start" :showFooter="false" :actions="!isReadonly ? tableActions : []" actionPosition="flex-start" :showFooter="false"
style="margin-bottom: 20px;"> style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="updataParams.tasks" tooltip-effect="dark" height="500" border <el-table ref="multipleTable" :data="updataParams.tasks" tooltip-effect="dark" max-height="500px" border
row-key="checked" @selection-change="handleSelectionChange" style="width: 100%"> row-key="checked" @selection-change="handleSelectionChange" style="width: 100%">
<template v-for="item in tableColumn"> <template v-for="item in tableColumn">
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name" <el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name"
@ -31,7 +31,7 @@
</TableComponent> </TableComponent>
</FormComponent> </FormComponent>
<el-dialog :close-on-click-modal="false" :title="'新增'" :visible.sync="showSubUpdate" width="700px" <el-dialog :close-on-click-modal="false" :title="'新增'" :visible.sync="showSubUpdate" width="952px"
:before-close="handleCloseTask"> :before-close="handleCloseTask">
<FormComponent :options="taskUpdateOptions" :isReadonly="taskIsReadonly" labelWidth="110px" labelAlign="right" <FormComponent :options="taskUpdateOptions" :isReadonly="taskIsReadonly" labelWidth="110px" labelAlign="right"
:data.sync="taskUpdataParams" :actions="subActions" :full-btn="true" btnPosition="center" :data.sync="taskUpdataParams" :actions="subActions" :full-btn="true" btnPosition="center"
@ -323,7 +323,7 @@ export default class MeasureComponent extends Vue {
public buildTable() { public buildTable() {
// //
this.tableColumn.push({ name: '序号', key: "index" }); this.tableColumn.push({ name: '序号', key: "index" ,width:"80px"});
this.tableColumn.push({ name: "任务名称", key: "name" }) this.tableColumn.push({ name: "任务名称", key: "name" })
this.tableColumn.push({ name: "执行岗位", key: "executePostName" }) this.tableColumn.push({ name: "执行岗位", key: "executePostName" })
this.tableColumn.push({ name: "执行人", key: "chargeUserName" }) this.tableColumn.push({ name: "执行人", key: "chargeUserName" })
@ -385,6 +385,15 @@ export default class MeasureComponent extends Vue {
if (isReadonly) { if (isReadonly) {
this.taskIsReadonly = true this.taskIsReadonly = true
this.taskUpdataParams = JSON.parse(JSON.stringify(row)) this.taskUpdataParams = JSON.parse(JSON.stringify(row))
if (row.insuranceDutyFlag === 0) {
this.taskUpdataParams.taskType = 0
this.taskUpdataParams.insuranceDutyFlagName = '否'
this.taskUpdataParams.taskTypeName = '日常任务'
} else if (row.insuranceDutyFlag === 1) {
this.taskType = this.taskType.filter(item => item.id !== 0)
this.taskUpdataParams.insuranceDutyFlagName = "是"
this.taskItem = this.tasksSelectData[this.taskUpdataParams.taskType]
}
this.taskUpdataParams.taskTypeName = this.$store.getters.prevention_task_type_map[row.taskType] this.taskUpdataParams.taskTypeName = this.$store.getters.prevention_task_type_map[row.taskType]
this.taskUpdataParams.reviewCycleValueName = this.$store.getters.prevention_cycle_unit_map[row.reviewCycleUnit] this.taskUpdataParams.reviewCycleValueName = this.$store.getters.prevention_cycle_unit_map[row.reviewCycleUnit]
if (this.taskUpdataParams.taskType && this.taskUpdataParams.taskItem) { if (this.taskUpdataParams.taskType && this.taskUpdataParams.taskItem) {

View File

@ -10,7 +10,7 @@ export default class DutyService extends BaseService<any>{
return this.get(url,params,true) return this.get(url,params,true)
} }
public deleteByIds(params):Promise<AxiosResponse<ActionResult<any>>>{ public deleteByIds(params):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.system+'/user/list'; const url = this.prefix.prevention+'/risk/task';
return this.deleteBatch(url,params,{},true) return this.deleteBatch(url,params,{},true)
} }

View File

@ -77,14 +77,14 @@
</el-dialog> </el-dialog>
<el-dialog :close-on-click-modal="false" :title="proIsReadonly?'详情':updateProParams.index ?'编辑' :'新增'" <el-dialog :close-on-click-modal="false" :title="proIsReadonly?'详情':updateProParams.index ?'编辑' :'新增'"
:visible.sync="showProject" width="700px" :before-close="handleProClose"> :visible.sync="showProject" width="952px" :before-close="handleProClose">
<FormComponent :options="projectOptions" :isReadonly="proIsReadonly" labelWidth="110px" labelAlign="right" <FormComponent :options="projectOptions" :isReadonly="proIsReadonly" labelWidth="110px" labelAlign="right"
:data.sync="updateProParams" :actions="proIsReadonly ? [] :updateActions" @actionCallback="subCallback" :data.sync="updateProParams" :actions="proIsReadonly ? [] :updateActions" @actionCallback="subCallback"
:full-btn="true" btnPosition="center"> :full-btn="true" btnPosition="center">
</FormComponent> </FormComponent>
</el-dialog> </el-dialog>
<el-dialog :close-on-click-modal="false" title="检查项目" :visible.sync="showProtable" width="800" <el-dialog :close-on-click-modal="false" title="检查项目" :visible.sync="showProtable" width="952px"
:before-close="handleClosePro"> :before-close="handleClosePro">
<TableComponent :tableData="currentProTableData" :tableColumn="subTableColumn" :showFooter="false" <TableComponent :tableData="currentProTableData" :tableColumn="subTableColumn" :showFooter="false"
style="margin-bottom: 20px;"> style="margin-bottom: 20px;">

View File

@ -53,7 +53,7 @@
<TableComponent :tableData="currentStepTableData" :tableColumn="subTableColumn" <TableComponent :tableData="currentStepTableData" :tableColumn="subTableColumn"
@actionCallback="callback($event)" :actions="isReadonly? []:subTableActions" actionPosition="flex-start" @actionCallback="callback($event)" :actions="isReadonly? []:subTableActions" actionPosition="flex-start"
:showFooter="false" style="margin-bottom: 20px;"> :showFooter="false" style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="updateParams.items" tooltip-effect="dark" height="500" border <el-table ref="multipleTable" :data="updateParams.items" tooltip-effect="dark" max-height="500" border
row-key="checked" @selection-change="handleSubSelectionChange" style="width: 100%"> row-key="checked" @selection-change="handleSubSelectionChange" style="width: 100%">
<el-table-column type="selection" fixed label="全选" width="40"> <el-table-column type="selection" fixed label="全选" width="40">
</el-table-column> </el-table-column>
@ -88,7 +88,7 @@
<img style="width:90%" src="../../../../assets/images/5.png" alt=""> <img style="width:90%" src="../../../../assets/images/5.png" alt="">
</el-dialog> </el-dialog>
<!-- 评价 --> <!-- 评价 -->
<el-dialog :close-on-click-modal="false" :visible.sync="showSubUpdate" width="880px" <el-dialog :close-on-click-modal="false" :visible.sync="showSubUpdate" width="952px"
:before-close="handleAnalyClose"> :before-close="handleAnalyClose">
<AnalEvaluationComponent :isReadonly="analyIsReadonly" :data.sync="analysisUpdateParams" <AnalEvaluationComponent :isReadonly="analyIsReadonly" :data.sync="analysisUpdateParams"
:show.sync="showSubUpdate" @actionCallback="analyCallback" :tabledata.sync="updateParams" :show.sync="showSubUpdate" @actionCallback="analyCallback" :tabledata.sync="updateParams"
@ -96,7 +96,7 @@
</el-dialog> </el-dialog>
<!-- 检查项目 --> <!-- 检查项目 -->
<el-dialog :close-on-click-modal="false" title="检查项目" :show-close="false" :visible.sync="showProtable" <el-dialog :close-on-click-modal="false" title="检查项目" :show-close="false" :visible.sync="showProtable"
width="880px"> width="952px">
<FormComponent labelWidth="110px" labelAlign="right" :actions="proActions" @actionCallback="proCallback" <FormComponent labelWidth="110px" labelAlign="right" :actions="proActions" @actionCallback="proCallback"
:full-btn="true" btnPosition="center"> :full-btn="true" btnPosition="center">
<TableComponent :tableData="currentProTableData" :tableColumn="proTableColumn" :showFooter="false" <TableComponent :tableData="currentProTableData" :tableColumn="proTableColumn" :showFooter="false"

View File

@ -264,7 +264,23 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
type: "checkbox", type: "checkbox",
width: "calc(100% - 20px)", width: "calc(100% - 20px)",
require: true, require: true,
datas: this.$store.state.prevention_majorsign, datas: [{
name: "不涉及",
disable: false,
value: 0
}, {
name: "重大危险源",
disable: this.updateParams.majorSign.length > 0 && this.updateParams.majorSign.includes(0),
value: 1
}, {
name: "重大监管化工工艺",
disable: this.updateParams.majorSign.length > 0 && this.updateParams.majorSign.includes(0),
value: 2
}, {
name: "重点监管危化品",
disable: this.updateParams.majorSign.length > 0 && this.updateParams.majorSign.includes(0),
value: 3
}],
}, { }, {
name: "重大危险源", name: "重大危险源",
key: "majorHazard", key: "majorHazard",
@ -555,7 +571,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
// //
this.proTableColumn.push({ name: '序号', key: "index" }); this.proTableColumn.push({ name: '序号', key: "index" });
this.proTableColumn.push({ name: '检查项目', key: "itemName" }); this.proTableColumn.push({ name: '检查项目', key: "itemName" });
this.proTableColumn.push({ name: '检查标准', key: "itemStandard", showTip: true, width: "200px" }); this.proTableColumn.push({ name: '检查标准', key: "itemStandard", showTip: true, width: "250px" });
this.proTableColumn.push({ name: '风险源', key: "riskSource" }); this.proTableColumn.push({ name: '风险源', key: "riskSource" });
this.proTableColumn.push({ this.proTableColumn.push({
name: '可能发生事故', key: "seriousResult", width: "150px", render: (data) => { name: '可能发生事故', key: "seriousResult", width: "150px", render: (data) => {
@ -566,15 +582,14 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
}); });
this.proTableColumn.push({ this.proTableColumn.push({
name: '风险等级', key: "riskLevel", render: (data) => { name: '风险等级', key: "riskLevel", render: (data) => {
if (data.riskLevel) { return "<span class='color_" + data.riskLevel + "'>" + (data.riskLevel ? (this.$store.getters.prevention_risk_level_map[data.riskLevel]) : '') + "</span>"
return this.$store.getters.prevention_risk_level_map[data.riskLevel] },
}
}
}); });
this.proTableColumn.push({ this.proTableColumn.push({
name: '残余风险等级', key: "remainLevel", width: "150px", render: (data) => { name: '残余风险等级', key: "remainLevel", width: "150px", render: (data) => {
if (data.remainLevel) { if (data.remainLevel) {
return this.$store.getters.prevention_risk_level_map[data.remainLevel] return "<span class='color_" + data.remainLevel + "'>" + (data.remainLevel ? (this.$store.getters.prevention_risk_level_map[data.remainLevel]) : '') + "</span>"
} }
} }
}); });
@ -712,22 +727,20 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
return item return item
}) })
this.updateParams.itemNum = diviceData.items.length; this.updateParams.itemNum = diviceData.items.length;
this.buildUpdateForm()
} }
// //
if (item && item.key === 'majorSign') { if (item && item.key === 'majorSign') {
if (!data) { if (!data) {
data = [] data = []
} }
if (data.includes(0)) { if (data.length > 0 && data.includes(0)) {
if (data.length.length > 0) { data = []
data.splice(0, data.length) this.updateParams.majorSign = []
}
data.push(0) data.push(0)
this.updateParams.majorSign.push(0)
} }
this.buildUpdateForm()
} }
this.buildUpdateForm()
} }
// //
public loadJobData(unitId) { public loadJobData(unitId) {
@ -906,7 +919,6 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
typeName: this.$store.getters.prevention_device_type_map[row.deviceType] typeName: this.$store.getters.prevention_device_type_map[row.deviceType]
}, row) }, row)
this.analysisUpdateParams = { ...this.analysisUpdateParams, ...JSON.parse(JSON.stringify(row)) }; this.analysisUpdateParams = { ...this.analysisUpdateParams, ...JSON.parse(JSON.stringify(row)) };
console.log('this.analysisUpdateParams', this.analysisUpdateParams);
this.analysisUpdateParams.measures.forEach((item, index) => { this.analysisUpdateParams.measures.forEach((item, index) => {
item.index = index + 1 item.index = index + 1
return item return item

View File

@ -54,7 +54,7 @@
@actionCallback="callback($event)" :actions="isReadonly? []:subTableActions" actionPosition="flex-start" @actionCallback="callback($event)" :actions="isReadonly? []:subTableActions" actionPosition="flex-start"
:showFooter="false" style="margin-bottom: 20px;"> :showFooter="false" style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="updateParams.steps" tooltip-effect="dark" height="500" border <el-table ref="multipleTable" :data="updateParams.steps" tooltip-effect="dark" max-height="500" border
row-key="checked" @selection-change="handleSubSelectionChange" style="width: 100%"> row-key="checked" @selection-change="handleSubSelectionChange" style="width: 100%">
<el-table-column type="selection" fixed label="全选" width="40"> <el-table-column type="selection" fixed label="全选" width="40">
</el-table-column> </el-table-column>
@ -71,7 +71,7 @@
<el-table-column label="操作" fixed="right" width="150"> <el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="isReadonly || isModifyonly" type="text" <el-button v-if="isReadonly || isModifyonly" type="text"
@click="showSubModel(scope.row,isReadonly)">查看</el-button> @click="showSubModel(scope.row,true)">查看</el-button>
<el-button v-if="isModifyonly" type="text" @click="showSubModel(scope.row)">修改</el-button> <el-button v-if="isModifyonly" type="text" @click="showSubModel(scope.row)">修改</el-button>
<el-button v-if="!isReadonly && !isModifyonly" type="text" @click="showSubModel(scope.row)">评价</el-button> <el-button v-if="!isReadonly && !isModifyonly" type="text" @click="showSubModel(scope.row)">评价</el-button>
</template> </template>
@ -90,7 +90,7 @@
<img style="width:90%" src="../../../../assets/images/5.png" alt=""> <img style="width:90%" src="../../../../assets/images/5.png" alt="">
</el-dialog> </el-dialog>
<!-- 危害分析评价 --> <!-- 危害分析评价 -->
<el-dialog :close-on-click-modal="false" :visible.sync="showSubUpdate" width="880px" <el-dialog :close-on-click-modal="false" :visible.sync="showSubUpdate" width="952px"
:before-close="handleAnalyClose"> :before-close="handleAnalyClose">
<AnalEvaluationComponent :isReadonly="analyIsReadonly" :data.sync="analysisUpdateParams" <AnalEvaluationComponent :isReadonly="analyIsReadonly" :data.sync="analysisUpdateParams"
:show.sync="showSubUpdate" @actionCallback="analyCallback" :tabledata.sync="updateParams" :show.sync="showSubUpdate" @actionCallback="analyCallback" :tabledata.sync="updateParams"
@ -103,7 +103,7 @@
:full-btn="true" btnPosition="center"> :full-btn="true" btnPosition="center">
<TableComponent :tableData="currentProTableData" :tableColumn="proTableColumn" :showFooter="false" <TableComponent :tableData="currentProTableData" :tableColumn="proTableColumn" :showFooter="false"
style="margin-bottom: 20px;"> style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="currentProTableData.datas" tooltip-effect="dark" height="250" <el-table ref="multipleTable" :data="currentProTableData.datas" tooltip-effect="dark" max-height="500"
border style="width: 100%"> border style="width: 100%">
<template v-for="item in proTableColumn"> <template v-for="item in proTableColumn">
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key"> <el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key">

View File

@ -262,11 +262,27 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
type: "checkbox", type: "checkbox",
width: "calc(100% - 20px)", width: "calc(100% - 20px)",
require: true, require: true,
datas: this.$store.state.prevention_majorsign, datas: [{
name: "不涉及",
disable: false,
value: 0
}, {
name: "重大危险源",
disable: this.updateParams.majorSign.includes(0),
value: 1
}, {
name: "重大监管化工工艺",
disable: this.updateParams.majorSign.includes(0),
value: 2
}, {
name: "重点监管危化品",
disable: this.updateParams.majorSign.includes(0),
value: 3
}],
}, { }, {
name: "重大危险源", name: "重大危险源",
key: "majorHazard", key: "majorHazard",
hide: !this.updateParams.majorSign || this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(1) || this.updateParams.majorSign.includes(0), hide: !this.updateParams.majorSign || this.updateParams.majorSign.length === 0 || (!this.updateParams.majorSign.includes(1) || this.updateParams.majorSign.includes(0)),
type: "select", type: "select",
format: "majorHazardName", format: "majorHazardName",
width: "calc(50% - 20px)", width: "calc(50% - 20px)",
@ -490,9 +506,9 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
// //
this.subTableColumn.push({ name: '序号', key: "index" }); this.subTableColumn.push({ name: '序号', key: "index", width: "50px" });
this.subTableColumn.push({ this.subTableColumn.push({
name: '状态', key: "status", render: (data) => { name: '状态', key: "status", width: "80px", render: (data) => {
if (data.status && data.status !== 1) { if (data.status && data.status !== 1) {
let tmpstatus: any = data.status let tmpstatus: any = data.status
if (data.status === 2) { if (data.status === 2) {
@ -507,24 +523,24 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
this.subTableColumn.push({ name: '步骤名称', key: "name" }); this.subTableColumn.push({ name: '步骤名称', key: "name" });
this.subTableColumn.push({ name: '作业步骤描述', key: "description", showTip: true, width: "200px" }); this.subTableColumn.push({ name: '作业步骤描述', key: "description", showTip: true, width: "200px" });
this.subTableColumn.push({ name: '作业地点', key: "location" }); this.subTableColumn.push({ name: '风险源', key: "riskSource" }); this.subTableColumn.push({ name: '作业地点', key: "location" }); this.subTableColumn.push({ name: '风险源', key: "riskSource" });
this.subTableColumn.push({ name: '危害分析', key: "hazardAnalysis" }); this.subTableColumn.push({ name: '危害分析', key: "hazardAnalysis", width: "200px" });
this.subTableColumn.push({ this.subTableColumn.push({
name: '最严重后果', key: "seriousResult", width: "200px", render: (data) => { name: '最严重后果', key: "seriousResult", width: "100px", render: (data) => {
if (data.seriousResult) { if (data.seriousResult) {
return data.seriousResult.split(";").map(item => this.$store.getters.prevention_serious_result_map[item]).join(";") return data.seriousResult.split(";").map(item => this.$store.getters.prevention_serious_result_map[item]).join(";")
} }
} }
}); });
this.subTableColumn.push({ this.subTableColumn.push({
name: '风险等级', key: "riskLevel", render: (data) => { name: '风险等级', key: "riskLevel", width: "100px", render: (data) => {
if (data.riskLevel) { if (data.riskLevel) {
return this.$store.getters.prevention_risk_level_map[data.riskLevel] return this.$store.getters.prevention_risk_level_map[data.riskLevel]
} }
} }
}); });
this.subTableColumn.push({ name: '评估方法', key: "riskChoose", }); this.subTableColumn.push({ name: '评估方法', key: "riskChoose", width: "100px", });
this.subTableColumn.push({ this.subTableColumn.push({
name: '残余风险等级', key: "remainLevel", width: "200px", render: (data) => { name: '残余风险等级', key: "remainLevel", width: "130px", render: (data) => {
if (data.remainLevel) { if (data.remainLevel) {
return this.$store.getters.prevention_risk_level_map[data.remainLevel] return this.$store.getters.prevention_risk_level_map[data.remainLevel]
} }
@ -545,11 +561,11 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
}); });
// //
this.proTableColumn.push({ name: '序号', key: "index" }); this.proTableColumn.push({ name: '序号', key: "index", width: "80px" });
this.proTableColumn.push({ name: '步骤名称', key: "name" }); this.proTableColumn.push({ name: '步骤名称', key: "name" });
this.proTableColumn.push({ name: '作业步骤描述', key: "description", showTip: true, width: "200px" }); this.proTableColumn.push({ name: '作业步骤描述', key: "description", showTip: true, width: "200px" });
this.proTableColumn.push({ name: '作业地点', key: "location" }); this.proTableColumn.push({ name: '作业地点', key: "location" });
this.proTableColumn.push({ name: '风险源', key: "riskSource" }); this.proTableColumn.push({ name: '风险源', key: "riskSource", width: "100px", });
this.proTableColumn.push({ this.proTableColumn.push({
name: '可能发生事故', key: "seriousResult", width: "150px", render: (data) => { name: '可能发生事故', key: "seriousResult", width: "150px", render: (data) => {
if (data.seriousResult) { if (data.seriousResult) {
@ -565,7 +581,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
} }
}); });
this.proTableColumn.push({ this.proTableColumn.push({
name: '残余风险等级', key: "remainLevel", width: "150px", render: (data) => { name: '残余风险等级', key: "remainLevel", width: "120px", render: (data) => {
if (data.remainLevel) { if (data.remainLevel) {
return "<span class='color_" + data.remainLevel + "'>" + (data.remainLevel ? (this.$store.getters.prevention_risk_level_map[data.remainLevel]) : '') + "</span>" return "<span class='color_" + data.remainLevel + "'>" + (data.remainLevel ? (this.$store.getters.prevention_risk_level_map[data.remainLevel]) : '') + "</span>"
} }
@ -702,8 +718,6 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
this.updateParams.steps.forEach((item, i) => { this.updateParams.steps.forEach((item, i) => {
item.index = i + 1 item.index = i + 1
}) })
this.buildUpdateForm()
} }
// //
if (item && item.key === 'majorSign') { if (item && item.key === 'majorSign') {
@ -711,18 +725,18 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
data = [] data = []
} }
if (data.includes(0)) { if (data.includes(0)) {
if (data.length.length > 0) { data = []
data.splice(0, data.length) this.updateParams.majorSign = []
}
data.push(0) data.push(0)
this.updateParams.majorSign.push(0)
} }
this.buildUpdateForm()
} }
this.buildUpdateForm()
} }
// //
public loadJobData(id?) { public loadJobData(id?) {
this.tableService.selectWorkByUnit({ unitId: id }).then((res: any) => { this.tableService.selectWorkByUnit({ unitId: id, id: this.updateParams.id ? this.updateParams.id : null }).then((res: any) => {
this.jobList = res.data.map(item => { this.jobList = res.data.map(item => {
return { return {
name: item.name, name: item.name,

View File

@ -251,9 +251,9 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
if (data.status == 2) { if (data.status == 2) {
return "<span class='noDraw'>待排查</span>" return "<span class='noDraw'>待排查</span>"
} else if (data.status == 1) { } else if (data.status == 1) {
return "<span>已排查</span>" return "<span class='color_1'>已排查</span>"
} else if (data.status == 3) { } else if (data.status == 3) {
return "<span class='noDraw'>超期未排查</span>" return "<span class='color_3'>超期未排查</span>"
} }
}, },
filters: this.$store.state.prevention_task_status.map(item => { filters: this.$store.state.prevention_task_status.map(item => {

View File

@ -98,26 +98,25 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
type: "text", type: "text",
labelWidth: 'auto', labelWidth: 'auto',
require: true, require: true,
with: "100%" width: "calc(50% - 20px)"
}, { }, {
name: "隐患排查任务", name: "隐患排查任务",
key: "taskName", key: "taskName",
type: "text", type: "text",
require: true, require: true,
with: "calc(50% - 20px)" width: "calc(50% - 20px)"
}, { }, {
name: "排查结果", name: "排查结果",
key: "result", key: "result",
format: "resultName", format: "resultName",
type: "radio", type: "radio",
require: true, require: true,
with: "calc(50% - 20px)" width: "calc(50% - 20px)"
}, { }, {
name: "是否为隐患", name: "是否为隐患",
key: "dangerFlag", key: "dangerFlag",
format: "dangerFlagName", format: "dangerFlagName",
type: "radio", type: "radio",
labelWidth: 'auto',
require: true, require: true,
width: "calc(50% - 20px)", width: "calc(50% - 20px)",
}, { }, {
@ -150,6 +149,7 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
{ {
name: " 排查人", name: " 排查人",
key: "checkUserId", key: "checkUserId",
format: 'checkUserName',
type: "text", type: "text",
width: "calc(50% - 20px)", width: "calc(50% - 20px)",
require: true, require: true,
@ -167,7 +167,7 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
ref: "file", ref: "file",
format: "resourceIdName", format: "resourceIdName",
type: "upload", type: "upload",
width: "calc(50% - 20px)", width: "100%",
showError: false, showError: false,
onSucess: this.onSuccess2, onSucess: this.onSuccess2,
onMove: this.onRemove2, onMove: this.onRemove2,
@ -200,16 +200,22 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
public buildTable() { public buildTable() {
this.tableColumn.push({ name: '隐患排查任务', key: "taskName", with: "250px" }); this.tableColumn.push({ name: '隐患排查任务', key: "taskName", with: "250px" });
this.tableColumn.push({ this.tableColumn.push({
name: '排查结果', width: "110px", key: "result", render: (data) => { name: '排查结果', key: "result", render: (data) => {
if (data.status == 0) { if (data.status == 0) {
return "<span class='noDraw'>异常</span>" return "<span class='noDraw'>异常</span>"
} else if (data.status == 1) { } else if (data.status == 1) {
return "<span>正常</span>" return "<span class='color_1'>正常</span>"
} }
} }
}); });
this.tableColumn.push({ name: '问题描述', key: "description" }); this.tableColumn.push({ name: '问题描述', key: "description" });
this.tableColumn.push({ name: '排查人', key: "checkUserId" }); this.tableColumn.push({
name: '排查人', key: "checkUserId", render: (data) => {
if (data.checkUserId) {
return this.$store.getters.user_map[data.checkUserId]
}
}
});
this.tableColumn.push({ name: '排查时间', key: "checkTime" }); this.tableColumn.push({ name: '排查时间', key: "checkTime" });
this.tableColumn.push({ this.tableColumn.push({
name: '是否为隐患', key: "dangerFlag", render: (data) => { name: '是否为隐患', key: "dangerFlag", render: (data) => {
@ -343,10 +349,11 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
insuranceDutyFlagName: row.insuranceDutyFlag === 0 ? '否' : '是', insuranceDutyFlagName: row.insuranceDutyFlag === 0 ? '否' : '是',
resultName: row.result === 1 ? '正常' : '异常', resultName: row.result === 1 ? '正常' : '异常',
dangerFlagName: row.dangerFlag === 0 ? '否' : '是', dangerFlagName: row.dangerFlag === 0 ? '否' : '是',
taskTypeName: this.$store.getters.prevention_hazard_category_map[row.dangerType] taskTypeName: this.$store.getters.prevention_hazard_category_map[row.dangerType],
checkUserName: this.$store.getters.user_map[row.checkUserId]
}, row) }, row)
this.showUpdate = true this.showUpdate = true
this.updateParams.resourceId= null this.updateParams.resourceId = null
this.subUpdateForm() this.subUpdateForm()
} }
} }

View File

@ -46,7 +46,7 @@
<!-- 管控措施详情 --> <!-- 管控措施详情 -->
<el-dialog :close-on-click-modal="false" title="管控措施" :show-close="false" :visible.sync="showProtable" <el-dialog :close-on-click-modal="false" title="管控措施" :show-close="false" :visible.sync="showProtable"
width="940px"> width="952px">
<TableComponent :tableData="currentProTableData" :tableColumn="proTableColumn" :showFooter="false" <TableComponent :tableData="currentProTableData" :tableColumn="proTableColumn" :showFooter="false"
style="margin-bottom: 20px;"> style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="currentProTableData.datas" tooltip-effect="dark" height="250" border <el-table ref="multipleTable" :data="currentProTableData.datas" tooltip-effect="dark" height="250" border

View File

@ -133,7 +133,7 @@ export default class MeasuresManagerComponent extends BaseRecordComponent<any> {
// //
this.proTableColumn.push({ name: '序号', key: "index" }); this.proTableColumn.push({ name: '序号', key: "index",width:"80px" });
this.proTableColumn.push({ this.proTableColumn.push({
name: '措施类型一', key: "firstTypeName", render: (data) => { name: '措施类型一', key: "firstTypeName", render: (data) => {
if (data.firstType) { if (data.firstType) {
@ -151,7 +151,7 @@ export default class MeasuresManagerComponent extends BaseRecordComponent<any> {
} }
}); });
this.proTableColumn.push({ name: '措施类型三', key: "thirdType" }); this.proTableColumn.push({ name: '措施类型三', key: "thirdType" });
this.proTableColumn.push({ name: '管控措施', key: "description" }); this.proTableColumn.push({ name: '管控措施', key: "description" ,width:"300px"});
} }
public callback(data) { public callback(data) {

View File

@ -57,10 +57,10 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
}]; }];
public filters = [{ public filters = [{
text: "发布", text: "发布",
value: 0 value: 0
}, { }, {
text: "发布", text: "发布",
value: 1 value: 1
}] }]
@ -133,7 +133,7 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
if (data.status == 0) { if (data.status == 0) {
return "<span class='noDraw'>未发布</span>" return "<span class='noDraw'>未发布</span>"
} else if (data.status == 1) { } else if (data.status == 1) {
return "<span>已发布</span>" return "<span class='color_1' >已发布</span>"
} }
}, },
filters: this.filters.map(item => { filters: this.filters.map(item => {
@ -246,14 +246,36 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
}); });
// //
this.proTableColumn.push({ name: '序号', key: "index" }); this.proTableColumn.push({ name: '序号', key: "index", width: "80px" });
this.proTableColumn.push({ name: '排查时间', key: "taskChargeUserName" }); this.proTableColumn.push({ name: '排查时间', key: "checkTime", width: "150px" });
this.proTableColumn.push({ name: '排查人', key: "taskChargeUserName" }); this.proTableColumn.push({
this.proTableColumn.push({ name: '排查内容', key: "taskChargeUserName" }); name: '排查人', key: "checkUserId", render: (data) => {
this.proTableColumn.push({ name: '排查结果', key: "taskChargeUserName" }); if (data.checkUserId) {
this.proTableColumn.push({ name: '是否为隐患', key: "taskChargeUserName" }); return this.$store.getters.user_map[data.checkUserId]
this.proTableColumn.push({ name: '隐患描述', key: "taskChargeUserName" }); }
this.proTableColumn.push({ name: '隐患归属人', key: "taskChargeUserName" }); }
});
this.proTableColumn.push({ name: '排查内容', key: "taskName" });
this.proTableColumn.push({
name: '排查结果', key: "result", render: (data) => {
if (data.status == 0) {
return "<span class='noDraw'>异常</span>"
} else if (data.status == 1) {
return "<span>正常</span>"
}
}
});
this.proTableColumn.push({
name: '是否为隐患', key: "dangerFlag", render: (data) => {
if (data.status == 1) {
return "<span class='noDraw'>是</span>"
} else if (data.status == 0) {
return "<span>否</span>"
}
}
});
this.proTableColumn.push({ name: '隐患描述', key: "description" });
this.proTableColumn.push({ name: '隐患归属人', key: "ownerName" });
} }
// //
@ -389,14 +411,20 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
// //
public showSubModal(id) { public showSubModal(id) {
this.showProtable = true this.showProtable = true
this.currentProTableData.datas = [] as any;
this.tableService.selectById({ controlId: id }).then((res: any) => { this.tableService.selectById({ controlId: id }).then((res: any) => {
this.currentProTableData.datas = res.data.datas this.currentProTableData.datas = res.data.datas
this.currentProTableData.datas.forEach((item, index) => {
item.index = index + 1
return item
})
}) })
} }
//-- //--
public subCallback() { public subCallback() {
this.showProtable = false this.showProtable = false;
this.currentProTableData.datas = [] as any;
} }
} }