diff --git a/src/components/analEvaluation.component.vue b/src/components/analEvaluation.component.vue index a977371..c6ee5b5 100644 --- a/src/components/analEvaluation.component.vue +++ b/src/components/analEvaluation.component.vue @@ -284,7 +284,7 @@ export default class AnalEvaluationComponent extends Vue { datas: this.$store.state.prevention_serious_result, filterable: true, showError: false, - clearable:true, + clearable: true, }, { name: "危害分析", @@ -305,7 +305,7 @@ export default class AnalEvaluationComponent extends Vue { datas: this.$store.state.prevention_security_identifier, filterable: true, showError: false, - clearable:true, + clearable: true, }, { name: "设置复评时间", @@ -389,7 +389,7 @@ export default class AnalEvaluationComponent extends Vue { datas: this.$store.state.prevention_serious_result, filterable: true, showError: false, - clearable:true, + clearable: true, }, { name: "危害分析", @@ -410,7 +410,7 @@ export default class AnalEvaluationComponent extends Vue { datas: this.$store.state.prevention_security_identifier, filterable: true, showError: false, - clearable:true, + clearable: true, }, { name: "设置复评时间", @@ -421,6 +421,11 @@ export default class AnalEvaluationComponent extends Vue { require: true, showError: false, format: "yyyy-MM-dd", + pickerOptions: { + disabledDate(time) { + return time.getTime() < moment(new Date()).add(1, 'month').subtract(1, 'day').toDate().getTime(); + } + } }, ]; } diff --git a/src/service/area.service.ts b/src/service/area.service.ts index f45beb8..e792765 100644 --- a/src/service/area.service.ts +++ b/src/service/area.service.ts @@ -42,8 +42,8 @@ export default class AreaService extends BaseService{ } } - public getAnalControls():Promise>>{ + public getAnalControls(params?):Promise>>{ const url = this.prefix.prevention+'/risk/identifyinventory/getAnalControls'; - return this.get(url,null,false) + return this.post(url,params,{},false) } } \ No newline at end of file diff --git a/src/views/blank.component.vue b/src/views/blank.component.vue index 012f1d2..d142bbf 100644 --- a/src/views/blank.component.vue +++ b/src/views/blank.component.vue @@ -37,7 +37,7 @@ export default class BlankComponent extends Vue { this.systemService.getDictData("prevention_measures_sort"), this.systemService.getDictData("prevention_task_type"), this.systemService.getDictData("prevention_evaluate_status"), - this.areaService.getAnalControls(), + // this.areaService.getAnalControls([]), this.systemService.getDictData("prevention_task_status"), this.systemService.getDictData("prevention_hazard_category"), this.systemService.getDictData("prevention_training_level"), @@ -203,24 +203,24 @@ export default class BlankComponent extends Vue { value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, } })) - this.$store.commit("setAnalCntrol", results[24].data) + // this.$store.commit("setAnalCntrol", results[24].data) - this.$store.commit("set_prevention_task_status", results[25].data.map(item => { + this.$store.commit("set_prevention_task_status", results[24].data.map(item => { return { name: item.dictLabel, value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, } })) - this.$store.commit("set_prevention_hazard_category", results[26].data.map(item => { + this.$store.commit("set_prevention_hazard_category", results[25].data.map(item => { return { name: item.dictLabel, value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, } })) - this.$store.commit("set_prevention_training_level", results[27].data.map(item => { + this.$store.commit("set_prevention_training_level", results[26].data.map(item => { return { name: item.dictLabel, value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, @@ -228,21 +228,21 @@ export default class BlankComponent extends Vue { })) - this.$store.commit("set_prevention_training_methods", results[28].data.map(item => { + this.$store.commit("set_prevention_training_methods", results[27].data.map(item => { return { name: item.dictLabel, value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, } })) - this.$store.commit("set_prevention_integral_eventtype", results[29].data.map(item => { + this.$store.commit("set_prevention_integral_eventtype", results[28].data.map(item => { return { name: item.dictLabel, value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, } })) - this.$store.commit("set_prevention_integral_type", results[30].data.map(item => { + this.$store.commit("set_prevention_integral_type", results[29].data.map(item => { return { name: item.dictLabel, value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, @@ -250,58 +250,58 @@ export default class BlankComponent extends Vue { })) - this.$store.commit("set_prevention_risk_source", results[31].data.map(item => { + this.$store.commit("set_prevention_risk_source", results[30].data.map(item => { return { name: item.dictLabel, value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, } })) - this.$store.commit("set_prevention_risk_craft", results[32].data.map(item => { + this.$store.commit("set_prevention_risk_craft", results[31].data.map(item => { return { name: item.dictLabel, value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, } })) - this.$store.commit("set_prevention_risk_chemical", results[33].data.map(item => { + this.$store.commit("set_prevention_risk_chemical", results[32].data.map(item => { return { name: item.dictLabel, value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, } })) - this.$store.commit("set_prevention_enterprise_nature", results[34].data.map(item => { + this.$store.commit("set_prevention_enterprise_nature", results[33].data.map(item => { return { name: item.dictLabel, value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, } })) - this.$store.commit("set_prevention_enterprise_size", results[35].data.map(item => { + this.$store.commit("set_prevention_enterprise_size", results[34].data.map(item => { return { name: item.dictLabel, value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, } })) - this.$store.commit("set_prevention_regulatory_category", results[36].data.map(item => { + this.$store.commit("set_prevention_regulatory_category", results[35].data.map(item => { return { name: item.dictLabel, value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, } })) - this.$store.commit("set_prevention_regulatory_subcategories", results[37].data.map(item => { + this.$store.commit("set_prevention_regulatory_subcategories", results[36].data.map(item => { return { name: item.dictLabel, value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, } })) - this.$store.commit("set_prevention_registration_status", results[38].data.map(item => { + this.$store.commit("set_prevention_registration_status", results[37].data.map(item => { return { name: item.dictLabel, value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, } })) - this.$store.commit("set_prevention_safety_label", results[39].data.map(item => { + this.$store.commit("set_prevention_safety_label", results[38].data.map(item => { return { name: item.dictLabel, value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue, diff --git a/src/views/hiddenDanger/clap.component.vue b/src/views/hiddenDanger/clap.component.vue index 9973e29..934a648 100644 --- a/src/views/hiddenDanger/clap.component.vue +++ b/src/views/hiddenDanger/clap.component.vue @@ -142,7 +142,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent }) } // 加载单元列表 - public loadUnitData(id?) { + public loadUnitData(id?, isVerify = false) { this.unitService.selectByPage({ pageSize: 1000, areaId: id }, false).then((res: any) => { this.unitList = res.data.datas.map(item => { if (item.name) { @@ -153,7 +153,13 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent } }); const option = this.updateOptions.find(item => item.key === "unitId") as any; - option.datas = this.unitList + option.datas = this.unitList; + if (isVerify) { + //单元是否删除 + if (this.updateParams.unitId) { + this.judgeDeleteUnitMethod(this.updateParams); + } + } }) } @@ -527,6 +533,9 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent } else if (data.value === "selectAll") { this.selectAll() } else if (data.value === "add") { + this.unitList = [] + const option = this.updateOptions.find(item => item.key === "unitId") as any; + option.datas = [] this.showUpdateModel() } else if (data.value === "delete") { this.deleteData(this.selectData.map((item: any) => item.id)) @@ -563,7 +572,8 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent number: null, photo: null, inspectTime: moment().format("YYYY-MM-DD HH:mm"), - dangerType: 4 + dangerType: 4, + unitId: null, } if (!row) { this.tableService.getNumber().then(res => { @@ -574,9 +584,6 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent }) } else { this.tableService.selectById(row.id).then((res: any) => { - console.log(JSON.parse(JSON.stringify(res))); - - // const unitName = this.updateParams = Object.assign({ classifyName: this.$store.getters.prevention_dangrous_type_map[res.data.classify], attributeClassifyName: this.$store.getters.prevention_safe_reason_map[row.attributeClassify], @@ -599,11 +606,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent //区域是否删除 let isDeleteArea = !res.data.areaId ? true : this.judgeDeleteAreaMethod(res.data); if (!isDeleteArea) { - this.loadUnitData(res.data.areaId); - //单元是否删除 - if (res.data.unitId) { - this.judgeDeleteUnitMethod(res.data); - } + this.loadUnitData(res.data.areaId, true); } } // 获取url diff --git a/src/views/hiddenDanger/common.component.html b/src/views/hiddenDanger/common.component.html index 717bd6b..3ee5fd8 100644 --- a/src/views/hiddenDanger/common.component.html +++ b/src/views/hiddenDanger/common.component.html @@ -18,8 +18,8 @@ - +
{{scope.$index+1}}
@@ -42,15 +42,19 @@ @click="showUpdateModel(scope.row,true)">查看 修改 - 删除 - 中断 - 恢复 - 作废 diff --git a/src/views/hiddenDanger/files.component.vue b/src/views/hiddenDanger/files.component.vue index 11120cb..88e336d 100644 --- a/src/views/hiddenDanger/files.component.vue +++ b/src/views/hiddenDanger/files.component.vue @@ -634,7 +634,7 @@ export default class HiddenDangerFilesComponent extends BaseRecordComponent this.tableColumn.push({ name: '隐患标题', width: "150", key: "title" }); this.tableColumn.push({ name: '隐患描述', width: "300", key: "description" }); this.tableColumn.push({ name: '隐患等级', render: (data) => this.levelMap[data.level] }); - this.tableColumn.push({ name: '隐患分类', render: (data) => this.$store.getters.prevention_dangrous_type_map[data.dangerType] }); + this.tableColumn.push({ name: '隐患分类', render: (data) => this.$store.getters.prevention_dangrous_type_map[data.classify] }); this.tableColumn.push({ name: '整改方式', render: (data) => this.reformModeMap[data.reformMode] }); this.tableColumn.push({ name: '隐患位置', width: "150", key: "locationName" }); this.tableColumn.push({ name: '治理责任人', width: "100", key: "executeUserName" }); diff --git a/src/views/hiddenDanger/manager.component.vue b/src/views/hiddenDanger/manager.component.vue index 38f372f..1f964f9 100644 --- a/src/views/hiddenDanger/manager.component.vue +++ b/src/views/hiddenDanger/manager.component.vue @@ -455,6 +455,17 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent data) { - this.$message.error("治理时限不能早于上报时间") + this.$message.error("治理时限不能早于发起时间") this.updateParams.executeDeadline = null; return } @@ -805,9 +816,9 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent data) { - this.$message.error("确认时间不能早于上报时间") + this.$message.error("确认时间不能早于发起时间") this.updateParams.realConfirmTime = null; return } @@ -938,10 +949,13 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent item.key === "processStartTime") as any; + option.hide = row.status === 0; // 获取url if (row.resourceId) { this.tableService.getFileUrls({ ids: row.resourceId.split(",") }).then((photos: any) => { diff --git a/src/views/hiddenDanger/rules/rulesManager.component.vue b/src/views/hiddenDanger/rules/rulesManager.component.vue index a8f0867..794255f 100644 --- a/src/views/hiddenDanger/rules/rulesManager.component.vue +++ b/src/views/hiddenDanger/rules/rulesManager.component.vue @@ -295,7 +295,7 @@ export default class RulesManagerComponent extends BaseRecordComponent { }) } // 加载单元列表 - public loadUnitData(ids?) { + public loadUnitData(ids?, isVerify = false) { if (!ids || ids.length === 0) { this.unitList = [] const option = this.updateOptions.find(item => item.key === "units") as any; @@ -312,7 +312,11 @@ export default class RulesManagerComponent extends BaseRecordComponent { } }); const option = this.updateOptions.find(item => item.key === "units") as any; - option.datas = this.unitList + option.datas = this.unitList; + if (isVerify) { + //单元是否删除 + this.judgeDeleteUnitMethod(); + } }) } @@ -506,9 +510,8 @@ export default class RulesManagerComponent extends BaseRecordComponent { //区域是否删除 let isDeleteArea = this.judgeDeleteAreaMethod(res); if (!isDeleteArea) { - this.loadUnitData(res.data.areas); - //单元是否删除 - this.judgeDeleteUnitMethod(res); + this.loadUnitData(res.data.areas, true); + } } this.updateParams.tableItems.forEach((item, i) => { @@ -552,14 +555,14 @@ export default class RulesManagerComponent extends BaseRecordComponent { * 判断单元是否删除 * @param res */ - public judgeDeleteUnitMethod(res: any) { + public judgeDeleteUnitMethod() { let deleteData = [] as any; this.updateParams.units.forEach((item, index) => { const find = this.unitList.find((data: any) => data.value === item); if (!find) { deleteData.push(item); } - }); + }); if (deleteData.length > 0) { this.updateParams.units = null; this.$confirm(`风险单元信息变更,请重新选择!`, "", { diff --git a/src/views/hiddenDanger/safe/plan.component.vue b/src/views/hiddenDanger/safe/plan.component.vue index d860e5b..dc0a5c1 100644 --- a/src/views/hiddenDanger/safe/plan.component.vue +++ b/src/views/hiddenDanger/safe/plan.component.vue @@ -109,7 +109,10 @@ export default class PlanComponent extends BaseRecordComponent { public areaMap = {} as any; public unitList = [] as any; public unitMap = {} as any; - + //检查对象 + public analControlList = [] as any; + //检查对象数据 + public analControlNameList = {} as any; public updateActions = [{ name: "取消", @@ -117,14 +120,14 @@ export default class PlanComponent extends BaseRecordComponent { }, { name: "保存并继续添加", - hide: false, value: "saveAndContinue", - type: "primary" + type: "primary", + hide: false, }, { name: "保存", value: "save", type: "primary" - },]; + },] as any; public selectData = []; @@ -263,7 +266,7 @@ export default class PlanComponent extends BaseRecordComponent { multiple: true, showError: false, clearable: true, - datas: this.$store.state.analControlList, + datas: this.analControlList, }, { name: "计划检查时间", key: "startTime", @@ -360,7 +363,7 @@ export default class PlanComponent extends BaseRecordComponent { }) } // 加载单元列表 - public loadUnitData(ids?) { + public loadUnitData(ids?, isVerify = false) { return new Promise((resove, reject) => { this.unitService.getListByIds({ areaIds: ids }, false).then((res: any) => { this.unitList = res.data.map(item => { @@ -371,12 +374,35 @@ export default class PlanComponent extends BaseRecordComponent { value: item.id } } - }); const option = this.updateOptions.find(item => item.key === "unitIds") as any; if (option) { option.datas = this.unitList; } + if (isVerify) { + //单元是否删除 + const isDeleteUnit = this.judgeDeleteUnitMethod(this.updateParams); + if (!isDeleteUnit) { + this.judgeAnalControl(this.updateParams) + } + } + resove() + }) + }) + } + //加载检查对象 + public loadAnalControlList(ids?) { + return new Promise((resove, reject) => { + this.areaService.getAnalControls(ids).then((res: any) => { + this.analControlList = res.data.map((item) => { + this.analControlNameList[item.value] = item.name + return item + }) + const option = this.updateOptions.find(item => item.key === "analControlIds") as any; + if (option) { + option.datas = this.analControlList; + } + resove() }) }) @@ -461,12 +487,20 @@ export default class PlanComponent extends BaseRecordComponent { this.buildUpdateForm(); } if (item && item.key === "areaIds") { - if (!data) { - this.unitList = [] + if (!data || !data.length) { + this.unitList = []; + const option = this.updateOptions.find(item => item.key === "unitIds") as any; + option.datas = [] + this.updateParams.unitIds = null; + this.updateParams.unitIds = null; return } this.loadUnitData(data) } + //检查单元 + if (item && item.key === 'unitIds') { + this.loadAnalControlList(data) + } if (item && item.key === "chargeUserId") { this.updateParams.chargeUserName = this.$store.getters.user_map[data] } @@ -582,9 +616,10 @@ export default class PlanComponent extends BaseRecordComponent { // 打开增改查弹窗 public async showUpdateModel(row?, isRead?) { - this.updateActions[1].hide = false; + this.updateActions[1].hide = row ? true : false; this.isReadonly = !!isRead; if (row) { + await this.loadAnalControlList(row.unitIds) if (isRead) { await this.loadUnitData(row.areaIds) this.updateParams = Object.assign({ @@ -594,14 +629,15 @@ export default class PlanComponent extends BaseRecordComponent { inspectTypeName: this.$store.getters.prevention_danger_check_type_map[row.inspectType], inspectCycleUnitName: this.$store.getters.prevention_cycle_unit_map[row.inspectCycleUnit], }, row); + this.updateParams.analControlNames = row.analControlIds.map(item => { + return this.analControlNameList[item] ? this.analControlNameList[item] : item + }).join(",") } else { this.updateParams = JSON.parse(JSON.stringify(row)); //区域是否删除 let isDeleteArea = this.judgeDeleteAreaMethod(this.updateParams); if (!isDeleteArea) { - this.loadUnitData(row.areaIds); - //单元是否删除 - this.judgeDeleteUnitMethod(this.updateParams); + this.loadUnitData(row.areaIds, true); } } if (row.planType === 1) { @@ -616,9 +652,9 @@ export default class PlanComponent extends BaseRecordComponent { this.showUpdate = true } /** - * 判断区域是否删除 - * @param res - */ + * 判断区域是否删除 + * @param res + */ public judgeDeleteAreaMethod(paramsData: any) { let deleteData = [] as any; paramsData.areaIds.forEach((item, index) => { @@ -630,7 +666,8 @@ export default class PlanComponent extends BaseRecordComponent { if (deleteData.length > 0) { this.updateParams.areaIds = null; this.updateParams.unitIds = null; - this.$confirm(`风险区域信息变更,请重新选择!`, "", { + this.updateParams.analControlIds = null; + this.$confirm(`检查区域信息变更,请重新选择!`, "", { type: 'warning', showCancelButton: false, closeOnClickModal: false, @@ -650,7 +687,6 @@ export default class PlanComponent extends BaseRecordComponent { * @param res */ public judgeDeleteUnitMethod(paramsData: any) { - let deleteData = [] as any; paramsData.unitIds.forEach((item, index) => { const find = this.unitList.find((data: any) => data.value === item); @@ -660,7 +696,33 @@ export default class PlanComponent extends BaseRecordComponent { }); if (deleteData.length > 0) { this.updateParams.unitIds = null; - this.$confirm(`风险单元信息变更,请重新选择!`, "", { + this.updateParams.analControlIds = null; + this.$confirm(`检查单元信息变更,请重新选择!`, "", { + type: 'warning', + showCancelButton: false, + closeOnClickModal: false, + }).then(() => { + // + }).catch(() => { + // + }) + } + return !!deleteData.length + } + /** + * 判断检查对象是否删除 + */ + public judgeAnalControl(paramsData: any) { + let deleteData = [] as any; + paramsData.analControlIds.forEach((item, index) => { + const find = this.analControlList.find((data: any) => data.value === item); + if (!find) { + deleteData.push(item); + } + }); + if (deleteData.length > 0) { + this.updateParams.analControlIds = null; + this.$confirm(`检查对象信息变更,请重新选择!`, "", { type: 'warning', showCancelButton: false, closeOnClickModal: false, @@ -688,15 +750,19 @@ export default class PlanComponent extends BaseRecordComponent { //单元是否删除 let isDeleteUnit = this.judgeDeleteUnitMethod(JSON.parse(JSON.stringify(row))); if (!isDeleteUnit) { - this.updateActions[1].hide = true; - this.currentPlan = row; - this.showSend = true; - this.tableTabs = []; + await this.loadAnalControlList(row.unitIds); + //检查对象是否删除 + let isDeleteAnal = this.judgeAnalControl(JSON.parse(JSON.stringify(row))); + if (!isDeleteAnal) { + this.updateActions[1].hide = true; + this.currentPlan = row; + this.showSend = true; + this.tableTabs = []; + } } } else { return } - } public openRecordModel(row) { diff --git a/src/views/integral/mall.component.vue b/src/views/integral/mall.component.vue index fb8d5e4..c581bca 100644 --- a/src/views/integral/mall.component.vue +++ b/src/views/integral/mall.component.vue @@ -330,7 +330,11 @@ export default class IntegralMall extends BaseRecordComponent { id: res.data.id }] this.updateParams.photo = this.photoList.length || null; - this.buildUpdateForm() + if (this.photoList.length) { + const option = this.updateOptions.find(item => item.key === "photo") as any; + option.showError = false + } + // this.buildUpdateForm() } } diff --git a/src/views/risk/duty/duty.component.vue b/src/views/risk/duty/duty.component.vue index 0fdc11e..cb59044 100644 --- a/src/views/risk/duty/duty.component.vue +++ b/src/views/risk/duty/duty.component.vue @@ -67,6 +67,11 @@ export default class DutyManagerComponent extends BaseRecordComponent { name: "隐患排查任务", key: "taskName", type: "text", + }, { + name: "重大危险源", + key: "majorHazard", + type: "select", + datas: this.$store.state.prevention_risk_source }]; public showUpdate = false; @@ -263,6 +268,12 @@ export default class DutyManagerComponent extends BaseRecordComponent { this.tableColumn.push({ name: '管控对象', key: "analControlName" }); this.tableColumn.push({ name: '分析对象', key: "itemName" }); this.tableColumn.push({ name: '管控措施', key: "measureDescription" }); + this.tableColumn.push({ + name: '重大危险源', key: 'majorHazard', render: (data) => { + data.majorHazard = parseInt(data.majorHazard) + return !data.majorHazard ? '--' : this.$store.getters.prevention_risk_source_map[data.majorHazard] + } + }) this.tableColumn.push({ name: '隐患排查任务', key: "taskName" }); this.tableColumn.push({ name: '排查时间', key: "endTime" }); this.tableColumn.push({ name: '责任人', key: "taskChargeUserName" }); @@ -329,7 +340,7 @@ export default class DutyManagerComponent extends BaseRecordComponent { public callback(data, type) { if (type) { - if (type === 'pageSize' || type === 'pageNum') { + if (type === 'pageSize' || type === 'pageNum') { this.params[type] = data; } this.getTableData(); @@ -421,6 +432,7 @@ export default class DutyManagerComponent extends BaseRecordComponent { pageNum: 1, pageSize: 20, } as any; + this.getTableData() } // 删除数据 diff --git a/src/views/risk/duty/dutyRecords.component.vue b/src/views/risk/duty/dutyRecords.component.vue index 174e74b..b48e172 100644 --- a/src/views/risk/duty/dutyRecords.component.vue +++ b/src/views/risk/duty/dutyRecords.component.vue @@ -74,6 +74,11 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent { + data.majorHazard = parseInt(data.majorHazard) + return !data.majorHazard ? '--' : this.$store.getters.prevention_risk_source_map[data.majorHazard] + } + }) this.tableColumn.push({ name: '排查结果', key: "result", render: (data) => { if (data.result == 2) { @@ -275,6 +286,7 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent diff --git a/src/views/risk/measuresReport/measuresReport.component.vue b/src/views/risk/measuresReport/measuresReport.component.vue index 6e3dc86..13424c6 100644 --- a/src/views/risk/measuresReport/measuresReport.component.vue +++ b/src/views/risk/measuresReport/measuresReport.component.vue @@ -108,7 +108,13 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent< name: "隐患排查任务", key: "taskName", type: "text", - }]; + },{ + name: "重大危险源", + key: "majorHazard", + type: "select", + datas:this.$store.state.prevention_risk_source + } +]; public showUpdate = false; public updateParams = {} as any; diff --git a/src/views/workprogress/trainRecords.component.vue b/src/views/workprogress/trainRecords.component.vue index d776a7a..6b403c7 100644 --- a/src/views/workprogress/trainRecords.component.vue +++ b/src/views/workprogress/trainRecords.component.vue @@ -176,7 +176,7 @@ export default class TrainRecords extends BaseRecordComponent { width: "calc(50% - 20px)", showError: false, rules: [ - { pattern: /^(([1-9]?\d(\.\d{1,1})?)|99|99.0)$/, message: '支持输入两位整数,保留一位小数', } + { pattern: /^[1-9]\d{0,2}(\.\d{1,1})?$/, message: '支持输入三位整数,保留一位小数', } ], }, {