diff --git a/src/components/analEvaluation.component.vue b/src/components/analEvaluation.component.vue index 8635bb0..0ff10d6 100644 --- a/src/components/analEvaluation.component.vue +++ b/src/components/analEvaluation.component.vue @@ -1153,7 +1153,7 @@ export default class AnalEvaluationComponent extends Vue { } } - + //整理数据 public collationAnalysisDataMethod() { this.analysisUpdateParams.measuresNum = this.analysisUpdateParams.measures.length; this.analysisUpdateParams.seriousResult = this.analysisUpdateParams.seriousResult.join(","); diff --git a/src/components/companyTree.component.vue b/src/components/companyTree.component.vue index 57a05e7..8b9626c 100644 --- a/src/components/companyTree.component.vue +++ b/src/components/companyTree.component.vue @@ -17,6 +17,13 @@ export default class CompanyTreeComponent extends Vue { } created() { + this.getCompanyTreeList() + } + beforeDestory() { + // + } + + public getCompanyTreeList(){ this.MaintenanceInfoService.getCompanyTree().then(res => { console.log('res', res); @@ -26,9 +33,6 @@ export default class CompanyTreeComponent extends Vue { }]; }) } - beforeDestory() { - // - } } \ No newline at end of file diff --git a/src/components/notice.component.vue b/src/components/notice.component.vue index 80df9ab..5bab49c 100644 --- a/src/components/notice.component.vue +++ b/src/components/notice.component.vue @@ -3,21 +3,31 @@
{{ noticeDataList.state.description }}
- +

*

{{ items.name }}
- + {{ basicForm[items.key] }} + + + {{ basicForm[items.key] === 1 ? + '是' : '否' }} + + - + + + + - + {{ data.name }} @@ -33,22 +43,27 @@

*

{{ item.name }} -
- - - - - - {{ data.name }} - - -
+ + {{ basicForm[item.key] }} + + + {{ basicForm[item.key] === 1 ? '是' : '否' }} + + + + + + + + + {{ data.name }} + +
@@ -65,15 +80,21 @@

*

{{ items.name }}
- + + {{ judgmentForm[items.key] }} + + + {{ judgmentForm[items.key] === 1 ? '是' : '否' }} + + - - + {{ data.name }} @@ -89,22 +110,26 @@

*

{{ item.name }} -
- - - - - - {{ data.name }} - - -
+ + {{ judgmentForm[item.key] }} + + + {{ judgmentForm[item.key] === 1 ? '是' : '否' }} + + + + + + + {{ data.name }} + + @@ -116,11 +141,15 @@
{{ noticeDataList.promise.description }}
- + {{ updateParams.promise }} +
- +
+ 取消 + 保存 +
@@ -139,14 +168,68 @@ export default class NoticeComponent extends Vue { public basicForm = {} as any; public judgmentForm = {} as any; - - public promise = '今天我班组已根据岗位风险辨识管控相关内容以及安全风险评估表进行安全风险研判,各项安全风险防控措施已落实到位,我承诺本岗位处于安全运行状态,涉及罐区、仓库等重大危险源安全风险的到有效管控。' as any; - //传参 + @PropSync("data", { + required: true, + }) + public updateParams!: any; + @Watch("data", { immediate: true, deep: true }) + handleData() { + //处理数据 + this.basicForm = this.updateParams; + this.judgmentForm = this.updateParams.researchContent ? JSON.parse(this.updateParams.researchContent) : {}; + } + // 操作按钮 + @Prop({ + required: false, + default: () => { + return [] + } + }) + actions?: any; + // 按钮回调 + @Emit("actionCallback") + actionCallback(action: any) { + // + } + @Prop() + public isReadonly: boolean; + //定义规则 + public rules = { + riskNumber: [ + { required: true, message: '请输入活动名称', trigger: 'blur' }, + ], + measureFlag: [ + { required: true, message: '请选择活动区域', trigger: 'change' } + ], + basicwork: [ + { type: 'date', required: true, message: '请选择日期', trigger: 'change' } + ], + }; + created() { + // + } + //提交 + public onSubmit() { + (this.$refs.basicForm as any).validate((valid: any) => { + if (valid) { + this.updateParams = Object.assign(this.updateParams, this.basicForm); + this.updateParams.researchContent = JSON.stringify(this.judgmentForm) + this.actionCallback('save') + } else { + return false; + } + }); + } + + //取消 + public cancel() { + this.actionCallback('cancel') + } } @@ -158,7 +241,7 @@ export default class NoticeComponent extends Vue { } .el-form-item__content { - margin-left: 40px !important; + margin-left: 10px !important; } } @@ -180,12 +263,14 @@ export default class NoticeComponent extends Vue { display: flex; flex-direction: row; border-bottom: 1px solid #D1DBE5; + margin-bottom: 20px; } .promise-content { width: 90%; padding: 5px 10px; border-top: 1px solid #D1DBE5; + min-height: 90px; } .form { @@ -218,6 +303,7 @@ export default class NoticeComponent extends Vue { align-items: center; padding: 5px 10px; border-top: 1px solid #D1DBE5; + min-height: 55px; } .children-title { @@ -265,9 +351,20 @@ export default class NoticeComponent extends Vue { align-items: center; border-bottom: 1px solid #D1DBE5; padding: 5px 10px; + min-height: 55px; &:last-child { border-bottom: 0px solid #D1DBE5; } } + +.btnStyle { + width: 100%; + display: flex; + justify-content: center; +} + +.isreadonly { + padding-left: 40px; +} \ No newline at end of file diff --git a/src/mock/teamCommitmentLetter.ts b/src/mock/teamCommitmentLetter.ts index 7d1bc5c..1961191 100644 --- a/src/mock/teamCommitmentLetter.ts +++ b/src/mock/teamCommitmentLetter.ts @@ -4,16 +4,16 @@ export default { content: [ { name: "研判风险点 /处", - key: "department", + key: "riskNumber", type: "number", required: true, width: "100%", }, { name: "各风险点已落实管控措施", - key: "department", + key: "measureFlag", type: "radio", - required: true, + required: false, width: "100%", datas: [ { @@ -29,11 +29,11 @@ export default { { name: "作业基本情况", key: "basicwork", - width:"100%", + width: "100%", children: [ { name: "已落实特殊作业的风险辨识、作业许可及管控措施", - key: "department", + key: "workFlag", type: "radio", required: true, width: "100%", @@ -50,95 +50,95 @@ export default { }, { name: "特级动火作业 /处", - key: "department", + key: "specialHotWork", type: "number", required: true, width: "50%", - labelWidth:"120px" + labelWidth: "130px", }, { name: "一级动火作业 /处", - key: "department", + key: "oneHotWork", type: "number", required: true, width: "50%", - labelWidth:"120px" + labelWidth: "130px", }, { name: "二级动火作业 /处", - key: "department", + key: "twoHotWork", type: "number", required: true, width: "50%", - labelWidth:"120px" + labelWidth: "130px", }, { name: "受限空间作业 /处", - key: "department", + key: "confinedSpaceWork", type: "number", required: true, width: "50%", - labelWidth:"120px" + labelWidth: "130px", }, { name: "高处作业 /处", - key: "department", + key: "heightWork", type: "number", required: true, width: "50%", - labelWidth:"120px" + labelWidth: "130px", }, { name: "起重吊装作业 /处", - key: "department", + key: "liftingWork", type: "number", required: true, width: "50%", - labelWidth:"120px" + labelWidth: "130px", }, { name: "断路作业 /处", - key: "department", + key: "roadBreakWork", type: "number", required: true, width: "50%", - labelWidth:"120px" + labelWidth: "130px", }, { name: "临电作业 /处", - key: "department", + key: "electricalWork", type: "number", required: true, width: "50%", - labelWidth:"120px" + labelWidth: "130px", }, { name: "动土作业 /处", - key: "department", + key: "soilMoveWork", type: "number", required: true, width: "50%", - labelWidth:"120px" + labelWidth: "130px", }, { name: "盲板抽堵作业 /处", - key: "department", + key: "platePluggingWork", type: "number", required: true, width: "50%", - labelWidth:"120px" + labelWidth: "130px", }, { name: "变更作业 /处", - key: "department", + key: "changeWork", type: "number", required: true, width: "100%", - labelWidth:"120px" + labelWidth: "130px", }, { name: "是否已落实变更审批以及安全管理措施 /处", - key: "department", + key: "changeFlag", type: "radio", required: true, width: "100%", @@ -161,39 +161,39 @@ export default { children: [ { name: "生产装置 /套", - key: "department", + key: "equipmentNum", type: "number", required: true, width: "50%", - labelWidth:"120px" + labelWidth: "120px", }, { name: "运行 /套", - key: "department", + key: "equipmentRunNum", type: "number", required: true, width: "50%", - labelWidth:"120px" + labelWidth: "120px", }, { name: "停产 /套", - key: "department", + key: "equipmentStopNum", type: "number", required: true, width: "50%", - labelWidth:"120px" + labelWidth: "120px", }, { name: "检修 /套", - key: "department", + key: "equipmentOverhaulNum", type: "number", required: true, width: "50%", - labelWidth:"120px" + labelWidth: "120px", }, { name: "是否处于试生产阶段", - key: "department", + key: "trialFlag", type: "radio", required: false, width: "50%", @@ -210,7 +210,7 @@ export default { }, { name: "是否处于开停车阶段", - key: "department", + key: "parkFlag", type: "radio", required: false, width: "50%", @@ -227,7 +227,7 @@ export default { }, { name: "是否开展中(扩)试", - key: "department", + key: "startFlag", type: "radio", required: false, width: "100%", @@ -244,7 +244,7 @@ export default { }, { name: "罐区、仓库等重大危险源是否处于安全状态", - key: "department", + key: "safetyFlag", type: "radio", required: false, width: "100%", @@ -263,7 +263,7 @@ export default { }, { name: "是否存在重大隐患", - key: "department", + key: "dangerFlag", type: "radio", required: false, width: "100%", @@ -289,11 +289,11 @@ export default { children: [ { name: "1.生产装置的温度、压力、组分、液位、流量等主要工艺参数是否处于指标范围", - key: "department", + key: "safeProductionOne", type: "radio", required: false, width: "100%", - labelWidth:"600px", + labelWidth: "600px", datas: [ { name: "是", @@ -307,11 +307,11 @@ export default { }, { name: "2.压力容器、压力管道等特种设备是否处于安全运行状态", - key: "department", + key: "safeProductionTwo", type: "radio", required: false, width: "100%", - labelWidth:"600px", + labelWidth: "600px", datas: [ { name: "是", @@ -325,11 +325,11 @@ export default { }, { name: "3.各类设备设施的静动密封是否完好无泄漏", - key: "department", + key: "safeProductionThree", type: "radio", required: false, width: "100%", - labelWidth:"600px", + labelWidth: "600px", datas: [ { name: "是", @@ -343,11 +343,11 @@ export default { }, { name: "4.超限报警、紧急切断、联锁等各类安全设施配备是否完好投用,并可靠运行", - key: "department", + key: "safeProductionFour", type: "radio", required: false, width: "100%", - labelWidth:"600px", + labelWidth: "600px", datas: [ { name: "是", @@ -367,11 +367,11 @@ export default { children: [ { name: "5.储罐、管道、机泵、阀门及仪表系统是否完好无泄漏", - key: "department", + key: "safeProductionFive", type: "radio", required: false, width: "100%", - labelWidth:"600px", + labelWidth: "600px", datas: [ { name: "是", @@ -385,11 +385,11 @@ export default { }, { name: "6.储罐的液位、温度、压力是否超限运行", - key: "department", + key: "safeProductionSix", type: "radio", required: false, width: "100%", - labelWidth:"600px", + labelWidth: "600px", datas: [ { name: "是", @@ -403,11 +403,11 @@ export default { }, { name: "7.内浮顶储罐运行中浮盘是否可能落底", - key: "department", + key: "safeProductionSeven", type: "radio", required: false, width: "100%", - labelWidth:"600px", + labelWidth: "600px", datas: [ { name: "是", @@ -421,11 +421,11 @@ export default { }, { name: "8.油气储罐手动切水、切罐、装卸车时是否确保人员在岗", - key: "department", + key: "safeProductionEight", type: "radio", required: false, width: "100%", - labelWidth:"600px", + labelWidth: "600px", datas: [ { name: "是", @@ -439,11 +439,11 @@ export default { }, { name: "9.可燃及有毒气体报警和联锁是否处于可靠运行状态", - key: "department", + key: "safeProductionNine", type: "radio", required: false, width: "100%", - labelWidth:"600px", + labelWidth: "600px", datas: [ { name: "是", @@ -457,11 +457,11 @@ export default { }, { name: "10.仓库是否按照国家标准分区分类储存危险化学品,是否超量、超品种储存,相互禁配物质是否混放混存", - key: "department", + key: "safeProductionTen", type: "radio", required: false, width: "100%", - labelWidth:"600px", + labelWidth: "600px", datas: [ { name: "是", @@ -481,11 +481,11 @@ export default { children: [ { name: "11.装置开停车是否制定开停车方案,试生产是否制定试生产方案并经专家论证", - key: "department", + key: "safeProductionEleven", type: "radio", required: false, width: "100%", - labelWidth:"600px", + labelWidth: "600px", datas: [ { name: "是", @@ -499,11 +499,11 @@ export default { }, { name: "12.各项特殊作业、检维修作业、承包商作业是否健全和完善相关管理制度,作业过程是否进行安全风险辨识,严格程序确认和作业许可审批,加强现场监督,危险化学品罐区动火作业是否做到升级管理等", - key: "department", + key: "safeProductionTwelve", type: "radio", required: false, width: "100%", - labelWidth:"600px", + labelWidth: "600px", datas: [ { name: "是", @@ -517,11 +517,11 @@ export default { }, { name: "13.各项变更的审批程序是否符合规定", - key: "department", + key: "safeProductionThirteen", type: "radio", required: false, width: "100%", - labelWidth:"600px", + labelWidth: "600px", datas: [ { name: "是", @@ -537,8 +537,8 @@ export default { }, ], }, - promise:{ + promise: { description: "班组安全承诺", - key:'promise' - } + key: "promise", + }, }; diff --git a/src/service/hiddendangerResumption.service.ts b/src/service/hiddendangerResumption.service.ts index 5ac71c2..12c83f5 100644 --- a/src/service/hiddendangerResumption.service.ts +++ b/src/service/hiddendangerResumption.service.ts @@ -15,4 +15,11 @@ export default class HiddendangerResumptionService extends BaseService{ const url = this.prefix.prevention+'/worktask/cycle'; return this.get(url,params) } + + // 批量删除 + public deleteByIds(params:any,showLoading?):Promise>>{ + const url = this.prefix.prevention+'/execute'; + return this.deleteBatch(url,params,{},showLoading) + } + } \ No newline at end of file diff --git a/src/service/riskJudgment.service.ts b/src/service/riskJudgment.service.ts new file mode 100644 index 0000000..4931dfd --- /dev/null +++ b/src/service/riskJudgment.service.ts @@ -0,0 +1,64 @@ +import BaseService from "hbt-common/service/base.service" +import type { AxiosResponse } from 'axios' +import { ActionResult } from "hbt-common/models/actionResult"; +export default class RiskJudgmentService extends BaseService{ + constructor(){ + super() + } + // 查询列表 + public selectByPage(params: any):Promise>>{ + const url = this.prefix.prevention+'/safety/research/task/list'; + return this.get(url,params,true) + } + // 获取详细信息 + public selectByDetail(params: any):Promise>>{ + const url = this.prefix.prevention+'/safety/research/task'; + return this.get(url,params,true) + } + // 批量删除 + public deleteByIds(params,showLoading?):Promise>>{ + const url = this.prefix.prevention+'/safety/research/task'; + return this.deleteBatch(url,params,{},showLoading) + } + + // 新增或更新 + public addOrUpdate(params: any, add: boolean,showLoading?:boolean): Promise>>{ + if(add){ + const url = this.prefix.prevention+'/safety/research/task'; + return this.post(url,params,{},showLoading) + }else{ + const url = this.prefix.prevention+'/safety/research/task'; + return this.put(url,params,{},showLoading) + } + } + + //获取风险点信息 + public selectRiskGroup(params: any):Promise>>{ + const url = this.prefix.prevention+'/safety/research/task/riskdetail'; + return this.get(url,params,true) + } + + //获取下级研判信息 + public selectResearchDetail(params: any):Promise>>{ + const url = this.prefix.prevention+'/safety/research/task/researchdetail'; + return this.post(url,params,{}) + } + + //获取下级风险点信息 + public selectRiskList(params: any):Promise>>{ + const url = this.prefix.prevention+'/safety/research/risk/list'; + return this.get(url,params,true) + } + + //企业获取车间风险点信息 + public getWorkshopRiskList(params: any):Promise>>{ + const url = this.prefix.prevention+'/safety/risk/byworkshop'; + return this.get(url,params,true) + } + + + public getFileUrls(params):Promise>>{ + const url = this.prefix.file+'/getSysFiles'; + return this.get(url,params,false) + } +} \ No newline at end of file diff --git a/src/service/safetyNotice.service.ts b/src/service/safetyNotice.service.ts new file mode 100644 index 0000000..1b9bf0d --- /dev/null +++ b/src/service/safetyNotice.service.ts @@ -0,0 +1,39 @@ +import BaseService from "hbt-common/service/base.service" +import type { AxiosResponse } from 'axios' +import { ActionResult } from "hbt-common/models/actionResult"; +export default class SafetyNoticeService extends BaseService{ + constructor(){ + super() + } + // 查询列表 + public selectByPage(params: any):Promise>>{ + const url = this.prefix.prevention+'/safety/promise/task/list'; + return this.get(url,params,true) + } + // 获取详细信息 + public selectByDetail(params: any):Promise>>{ + const url = this.prefix.prevention+'/safety/promise/task'; + return this.get(url,params,true) + } + // 批量删除 + public deleteByIds(params,showLoading?):Promise>>{ + const url = this.prefix.prevention+'/safety/promise/task'; + return this.deleteBatch(url,params,{},showLoading) + } + + // 新增或更新 + public addOrUpdate(params: any, add: boolean,showLoading?:boolean): Promise>>{ + if(add){ + const url = this.prefix.prevention+'/safety/promise/task'; + return this.post(url,params,{},showLoading) + }else{ + const url = this.prefix.prevention+'/safety/promise/task'; + return this.put(url,params,{},showLoading) + } + } + + public getFileUrls(params):Promise>>{ + const url = this.prefix.file+'/getSysFiles'; + return this.get(url,params,false) + } +} \ No newline at end of file diff --git a/src/views/estimate/checkResumption.component.vue b/src/views/estimate/checkResumption.component.vue index c890229..b728c04 100644 --- a/src/views/estimate/checkResumption.component.vue +++ b/src/views/estimate/checkResumption.component.vue @@ -115,7 +115,7 @@ export default class checkResumption extends BaseRecordComponent { key: "cycle", type: "select", datas: this.cycleList, - hide: this.type === 2 + hide: this.type === 2, }, { name: "周期", @@ -124,9 +124,9 @@ export default class checkResumption extends BaseRecordComponent { subType: "week", format: "yyyy 第 WW 周", valueFormat: "yyyy-MM-dd", - hide: this.type === 1 + hide: this.type === 1, + pickerOptions: { "firstDayOfWeek": 1 } }, - ]; } @@ -204,12 +204,17 @@ export default class checkResumption extends BaseRecordComponent { }); this.tableColumn.push({ name: '排查任务数', key: "taskNumber", }); this.tableColumn.push({ name: '完成任务数', key: "completeNumber", }); - this.tableColumn.push({ name: '完成率', key: "completeRate", }); + this.tableColumn.push({ + name: '完成率 /%', key: "completeRate", render: (data) => { + return (data.completeRate * 100).toFixed(2) + '%' + } + }); } public callback(data, type) { if (type) { if (this.type === 1) { + this.params[type] = data; this.getTableData() } else { this.getReportTableData() diff --git a/src/views/estimate/estimate.component.html b/src/views/estimate/estimate.component.html index 2080a30..89068e8 100644 --- a/src/views/estimate/estimate.component.html +++ b/src/views/estimate/estimate.component.html @@ -18,7 +18,7 @@ :footerActions="footerActions" :actions="tableActions"> - +
{{scope.$index+1}}
@@ -41,14 +41,14 @@
-
+
{{scope.$index+1}}
-
{{riskSourceMap[scope.row.majorHazardValue]}}
+
{{scope.row.majorHazardLabel}}
@@ -103,58 +103,6 @@
-
- - -
{{scope.$index+1}}
-
- -
{{riskSourceMap[scope.row.majorHazardValue]}}
-
- - -
{{scope.row.totalCompleted}}
-
- -
{{scope.row.totalCompletionRate}}
-
-
- - -
{{scope.row.mainCompleted? scope.row.mainCompleted : '--'}}
-
- -
{{scope.row.mainCompletionRate ? scope.row.mainCompletionRate:'--'}} -
-
-
- - -
{{scope.row.technologyCompleted}}
-
- -
{{scope.row.technologyCompletionRate}}
-
-
- - -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompletionRate}}
-
-
- - -
{{scope.row.dangerDiscovery}}
-
- -
{{scope.row.dangerRemoval}}
-
-
-
-
\ No newline at end of file diff --git a/src/views/estimate/publicityResumption/publicityResumption.component.html b/src/views/estimate/publicityResumption/publicityResumption.component.html index b640f1b..0e44d01 100644 --- a/src/views/estimate/publicityResumption/publicityResumption.component.html +++ b/src/views/estimate/publicityResumption/publicityResumption.component.html @@ -5,8 +5,9 @@ :full-btn="false" @change="change" btn-position="end">
- +
{{scope.$index+1}}
@@ -18,7 +19,8 @@
{{scope.row.totalCompleted? scope.row.totalCompleted :'--'}}
-
{{scope.row.totalCompletionRate ? scope.row.totalCompletionRate :'--'}}
+
{{scope.row.totalCompletionRate ? scope.row.totalCompletionRate :'--'}} +
@@ -32,10 +34,12 @@ -
{{scope.row.technologyCompleted? scope.row.technologyCompleted :'--'}}
+
{{scope.row.technologyCompleted? scope.row.technologyCompleted :'--'}} +
-
{{scope.row.technologyCompletionRate? scope.row.technologyCompletionRate :'--'}}
+
{{scope.row.technologyCompletionRate? scope.row.technologyCompletionRate + :'--'}}
@@ -43,7 +47,8 @@
{{scope.row.operateCompleted? scope.row.operateCompleted :'--'}}
-
{{scope.row.operateCompletionRate? scope.row.operateCompletionRate :'--'}}
+
{{scope.row.operateCompletionRate? scope.row.operateCompletionRate + :'--'}}
diff --git a/src/views/estimate/publicityResumption/publicityResumption.component.vue b/src/views/estimate/publicityResumption/publicityResumption.component.vue index 2a6d2b4..a28f50e 100644 --- a/src/views/estimate/publicityResumption/publicityResumption.component.vue +++ b/src/views/estimate/publicityResumption/publicityResumption.component.vue @@ -139,16 +139,6 @@ export default class PublicityResumption extends BaseRecordComponent { // } - updated() { - - // this.$nextTick(() => { - - // this.$refs.publicReportTable.doLayout(); - - // }); - - } - public tabTableChange(type) { this.params.pageNum = 1; this.getTableData() @@ -305,7 +295,6 @@ export default class PublicityResumption extends BaseRecordComponent { } }); - return sums; } } diff --git a/src/views/responsibility/checkTasks/checkTasks.component.html b/src/views/responsibility/checkTasks/checkTasks.component.html index 5c90a6c..eff76d1 100644 --- a/src/views/responsibility/checkTasks/checkTasks.component.html +++ b/src/views/responsibility/checkTasks/checkTasks.component.html @@ -27,8 +27,6 @@ - -
{{item.name}}
diff --git a/src/views/responsibility/checkTasks/checkTasks.component.vue b/src/views/responsibility/checkTasks/checkTasks.component.vue index b94f51c..c04cae2 100644 --- a/src/views/responsibility/checkTasks/checkTasks.component.vue +++ b/src/views/responsibility/checkTasks/checkTasks.component.vue @@ -9,6 +9,8 @@ import checkTasksService from "@/service/checkTasks.service"; import FormOption from "hbt-common/models/formOptions"; import BtnOption from "hbt-common/models/btnOptions"; import ButtonListComponent from "hbt-common/components/common/buttonList.component.vue"; +import maintenanceInfoService from "@/service/maintenanceInfo.service"; + @Component({ template, @@ -21,6 +23,9 @@ import ButtonListComponent from "hbt-common/components/common/buttonList.compone export default class MajorHazard extends BaseRecordComponent { public tableService = new checkTasksService(); + public MaintenanceInfoService = new maintenanceInfoService() + + public params = { majorHazard: null, } as any; @@ -64,6 +69,10 @@ export default class MajorHazard extends BaseRecordComponent { public showProtable = false; + public companyList = [] as any; + + public companyListMap = {} as any; + public formActions = [{ name: "查询", value: "search", @@ -121,13 +130,13 @@ export default class MajorHazard extends BaseRecordComponent { public buildUpdateForm() { this.updateOptions = [{ name: "企业名称", - type: "text", - key: "companyName", + type: "select", + key: "companyId", format: "companyName", require: true, width: "100%", showError: false, - datas: [], + datas: this.companyList, }, { name: "重大危险源名称", @@ -246,8 +255,21 @@ export default class MajorHazard extends BaseRecordComponent { // //包保责任制 this.initSelectList() + //获取企业信息 + this.getCompanyList() } + public getCompanyList() { + this.MaintenanceInfoService.selectCompany({}).then((res: any) => { + res.data.forEach((item) => { + this.companyListMap[item.id] = item.name + let tmpData = {} as any; + tmpData.name = item.name; + tmpData.value = item.id; + this.companyList.push(tmpData) + }) + }) + } public changes(data, item) { // @@ -275,7 +297,8 @@ export default class MajorHazard extends BaseRecordComponent { } public buildTable() { - this.tableColumn.push({ name: '企业名称', key: "companyName", tipIcon: true }); + + this.tableColumn.push({ name: '企业名称', key: "companyName", }); this.tableColumn.push({ name: '重大危险源名称', key: "majorHazard", render: (data) => { let majorHazard = parseInt(data.majorHazard) @@ -461,7 +484,7 @@ export default class MajorHazard extends BaseRecordComponent { this.updateParams.resourceId = resourceId.join(","); this.updateParams.resourceName = resourceName.join(","); } - + this.updateParams.companyName = this.companyListMap[this.updateParams.companyId] this.updateParams.techUserName = this.$store.getters.user_map[this.updateParams.techUserId]; this.updateParams.operateUserName = this.$store.getters.user_map[this.updateParams.operateUserId]; this.updateParams.mainUserName = this.$store.getters.user_map[this.updateParams.mainUserId]; @@ -547,21 +570,21 @@ export default class MajorHazard extends BaseRecordComponent { } this.tableService.selectDutyDetailList({ taskId: row.id }).then((res: any) => { if (res.code === 200) { - this.mainDuty = res.data[1] + this.mainDuty = res.data[1] ? res.data[1] :[] this.mainDuty.forEach((item: any) => { item.type = 1; if (!isReadonly) { item.dutyContent = item.dutyContent.toString(); } }) - this.techDuty = res.data[2] + this.techDuty = res.data[2] ? res.data[2] :[] this.techDuty.forEach((item: any) => { item.type = 2; if (!isReadonly) { item.dutyContent = item.dutyContent.toString(); } }) - this.operateDuty = res.data[3] + this.operateDuty = res.data[3] ? res.data[3] :[] this.operateDuty.forEach((item: any) => { item.type = 3; if (!isReadonly) { diff --git a/src/views/responsibility/majorHazard/majorHazard.component.vue b/src/views/responsibility/majorHazard/majorHazard.component.vue index f37069f..d2665d5 100644 --- a/src/views/responsibility/majorHazard/majorHazard.component.vue +++ b/src/views/responsibility/majorHazard/majorHazard.component.vue @@ -165,6 +165,7 @@ export default class MajorHazard extends BaseRecordComponent { require: true, width: "calc(50% - 20px)", showError: false, + controls:false, }, { name: "主要负责人", @@ -275,7 +276,6 @@ export default class MajorHazard extends BaseRecordComponent { public getCompanyList() { this.MaintenanceInfoService.selectCompany({}).then((res: any) => { - console.log('res', res); res.data.forEach((item) => { this.companyListMap[item.id] = item.name let tmpData = {} as any; diff --git a/src/views/risk/measuresReport/measuresReport.component.vue b/src/views/risk/measuresReport/measuresReport.component.vue index 0c09c0b..c4d01ca 100644 --- a/src/views/risk/measuresReport/measuresReport.component.vue +++ b/src/views/risk/measuresReport/measuresReport.component.vue @@ -52,7 +52,7 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent< public filterStatusData: any; //来源类型 - public sourceType = ["","JHA","SCL","线下评估","巡检"] + public sourceType = ["", "JHA", "SCL", "线下评估", "巡检"] public subActions = [{ name: "取消", @@ -158,7 +158,7 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent< } }); this.tableColumn.push({ - name: '来源', key: "type", render:(data)=>{ + name: '来源', key: "type", render: (data) => { return this.sourceType[data.type] } }); @@ -170,6 +170,12 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent< }); this.tableColumn.push({ name: '管控对象', key: "analControlName", width: "200px" }); this.tableColumn.push({ name: '分析对象', key: "itemName", width: "100px" }); + this.tableColumn.push({ + name: '重大危险源', key: "majorHazard", width: "120px", render: (data) => { + data.majorHazard = parseInt(data.majorHazard) + return this.$store.getters.prevention_risk_source_map[data.majorHazard] + } + }); this.tableColumn.push({ name: '风险源', key: "itemRiskSource", width: "120px" }); this.tableColumn.push({ name: '事故后果', key: "itemSeriousResult", width: "100px", @@ -249,7 +255,7 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent< }) return taskItemName[data.taskItem] } - } + } }); this.tableColumn.push({ name: '隐患排查任务', key: "taskName", width: "250px" }); this.tableColumn.push({ name: '责任人', key: "taskChargeUserName", width: "100px" }); @@ -350,8 +356,8 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent< } //发布--终止 public doUpdate() { - console.log('selectData',this.selectData); - + console.log('selectData', this.selectData); + if (this.selectData && this.selectData.length > 0) { this.filterStatusData = this.selectData[0]['status'] const tmpSelectData = this.selectData.filter((item) => item.status !== this.filterStatusData) @@ -418,8 +424,8 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent< } public handleSelectionChange(data) { - console.log('data',data); - + console.log('data', data); + this.selectData = data; } diff --git a/src/views/riskAssessment/maintenanceInfo/maintenanceInfo.component.html b/src/views/riskAssessment/maintenanceInfo/maintenanceInfo.component.html index 432db88..0d937bc 100644 --- a/src/views/riskAssessment/maintenanceInfo/maintenanceInfo.component.html +++ b/src/views/riskAssessment/maintenanceInfo/maintenanceInfo.component.html @@ -1,6 +1,6 @@
- +
@@ -127,8 +127,7 @@ - + diff --git a/src/views/riskAssessment/maintenanceInfo/maintenanceInfo.component.vue b/src/views/riskAssessment/maintenanceInfo/maintenanceInfo.component.vue index 71fa6d8..924e4d8 100644 --- a/src/views/riskAssessment/maintenanceInfo/maintenanceInfo.component.vue +++ b/src/views/riskAssessment/maintenanceInfo/maintenanceInfo.component.vue @@ -275,11 +275,13 @@ export default class MaintenanceInfo extends BaseRecordComponent { this.buildUpdateForm() //获取风险点 this.getRiskGroupList() + + } + //获取企业 public getCompanyList() { this.tableService.selectCompany({}).then((res: any) => { - console.log('res', res); res.data.forEach((item) => { this.companyListMap[item.id] = item.name let tmpData = {} as any; @@ -292,8 +294,6 @@ export default class MaintenanceInfo extends BaseRecordComponent { //获取风险点 public getRiskGroupList() { this.tableService.selectRiskGroup({}).then((res: any) => { - console.log('res', res); - // let tmpBindRiskGroup = [] as any; res.data.forEach((item) => { if (item) { return item @@ -302,16 +302,11 @@ export default class MaintenanceInfo extends BaseRecordComponent { this.storageBindRiskGroup = JSON.parse(JSON.stringify(res.data.filter((item) => item))); this.bindRiskGroup = JSON.parse(JSON.stringify(res.data.filter((item) => item))); - console.log(' this.bindRiskGroup ', this.bindRiskGroup); - - // this.showBindRisk = true }) } // 树点击 public handleNodeClick(data) { - console.log('data', data); - this.params.companyId = ""; this.params.workshopName = ""; this.params.teamName = ""; @@ -360,8 +355,6 @@ export default class MaintenanceInfo extends BaseRecordComponent { public callback(data, type) { - console.log('data', data); - if (type) { this.params[type] = data; this.getTableData(); @@ -380,7 +373,9 @@ export default class MaintenanceInfo extends BaseRecordComponent { } else if (data.value === "selectAll") { this.selectAll() } else if (data.value === "delete") { - this.deleteData(this.selectData.map((item: any) => item.id)) + this.deleteData(this.selectData.map((item: any) => item.id)); + //更新企业树数据 + (this.$refs.companyTree as any).getCompanyTreeList() } else if (data.value === 'add') { // this.buildUpdateForm() this.isReadonly = false @@ -421,11 +416,11 @@ export default class MaintenanceInfo extends BaseRecordComponent { this.updateParams.companyName = this.companyListMap[this.updateParams.companyId] this.updateParams.teams.forEach((item, index) => { item.index = index + 1 - let tmpRisks = [] as any; - item.risks.forEach((items: any) => { - tmpRisks.push(items.riskName) + // let tmpRisks = [] as any; + item.risks.forEach((items: any,index,oldArr) => { + oldArr[index] = JSON.stringify({ riskName: items.riskName, riskLevel: items.riskLevel }) }) - item.risks = tmpRisks + // item.risks = tmpRisks }) this.buildUpdateForm(); @@ -478,8 +473,6 @@ export default class MaintenanceInfo extends BaseRecordComponent { } //班组信息 public subCallback(data) { - console.log('data', data); - if (data.value === "add") { this.subUpdateParams = { risks: [] @@ -494,7 +487,6 @@ export default class MaintenanceInfo extends BaseRecordComponent { // 批量删除班组信息 this.deleteSubData(this.subSelectData.map((itm: any) => itm.index - 1)) } else if (data.value === "bindRisk") { - console.log(this.updateParams); //初始化班组风险点数据 this.tmpUpdateParams = JSON.parse(JSON.stringify(this.updateParams)) if (this.updateParams.teams.length === 0) { @@ -523,13 +515,12 @@ export default class MaintenanceInfo extends BaseRecordComponent { this.updateParams.teams.forEach((item, index) => { riskNumber = item.riskNumber + riskNumber; //处理风险点数据 - let tmpRisks = [] as any; - item.risks.forEach((element) => { - let tmpRisksItem = {} as any; - tmpRisksItem.riskName = element - tmpRisks.push(tmpRisksItem) + // let tmpRisks = [] as any; + item.risks.forEach((element: any,index,oldArr) => { + oldArr[index] = JSON.parse(element) }); - item.risks = tmpRisks + return item + // item.risks = tmpRisks }) this.updateParams.riskNumber = riskNumber; //处理风险点数据 @@ -539,13 +530,14 @@ export default class MaintenanceInfo extends BaseRecordComponent { teams: [], } as any this.showUpdate = !!goOn; + //更新企业树数据 + (this.$refs.companyTree as any).getCompanyTreeList() this.getTableData(); }) } //班组 -- 风险信息 -- 添加 public triCallback(data) { - console.log('data', data); if (data.value === "cancel") { this.subShowUpdate = false; this.subIsReadonly = false; @@ -596,7 +588,6 @@ export default class MaintenanceInfo extends BaseRecordComponent { //保存风险 public doSaveRisks(goOn?) { - console.log(this.subUpdateParams); this.subUpdateParams.chargeUserName = this.$store.getters.user_map[this.subUpdateParams.chargeUserId]; this.subUpdateParams.riskNumber = this.subUpdateParams.risks.length if (this.subUpdateParams.index) { @@ -635,7 +626,7 @@ export default class MaintenanceInfo extends BaseRecordComponent { //匹配已选择数据 public filterSelectedData(item, selected) { const selectedRistList = this.selectedRistList; - if (selectedRistList.indexOf(item) !== -1) { + if (selectedRistList.filter((items: any) => items === JSON.stringify(item)).length > 0) { return true } else { return false @@ -644,7 +635,6 @@ export default class MaintenanceInfo extends BaseRecordComponent { //绑定风险点操作 public bindRiskCallback(data) { - console.log('datadata', data); if (data.value === "cancel") { //恢复原有数据 this.updateParams = this.tmpUpdateParams; @@ -656,8 +646,7 @@ export default class MaintenanceInfo extends BaseRecordComponent { }) this.tmpUpdateParams = JSON.parse(JSON.stringify(this.updateParams)); this.updateParams = this.tmpUpdateParams; - this.showBindRisk = false - console.log(this.updateParams); + this.showBindRisk = false; } } @@ -667,8 +656,7 @@ export default class MaintenanceInfo extends BaseRecordComponent { if (data) { let tmpBindRiskGroup = [] as any; this.storageBindRiskGroup.forEach((item) => { - console.log('item', item); - if (item.includes(data)) { + if (item.riskName.includes(data)) { tmpBindRiskGroup.push(item) } }) @@ -684,13 +672,10 @@ export default class MaintenanceInfo extends BaseRecordComponent { //风险点 if (el.target.classList.contains("riskNumber")) { this.tableService.selectByDetail({ id: data.id }).then((res: any) => { - console.log('res', res); this.proTableData = [] as any; res.data.teams.forEach((item: any) => { this.proTableData = this.proTableData.concat(item.risks) }) - // console.log('this.proTableData', this.proTableData); - this.proTableColumn.push({ name: '风险点', key: "riskName", }); this.showProtable = true }) @@ -698,13 +683,10 @@ export default class MaintenanceInfo extends BaseRecordComponent { //班组 if (el.target.classList.contains("teamNum")) { this.tableService.selectByDetail({ id: data.id }).then((res: any) => { - console.log('res', res); this.proTableData = [] as any; res.data.teams.forEach((item: any) => { this.proTableData = this.proTableData.concat(item) }) - // console.log('this.proTableData', this.proTableData); - this.proTableColumn.push({ name: '班组名称', key: "teamName", }); this.proTableColumn.push({ name: '班组负责人', key: "chargeUserName", }); diff --git a/src/views/riskAssessment/riskJudgment/riskJudgment.component.html b/src/views/riskAssessment/riskJudgment/riskJudgment.component.html index fb909fe..23d4453 100644 --- a/src/views/riskAssessment/riskJudgment/riskJudgment.component.html +++ b/src/views/riskAssessment/riskJudgment/riskJudgment.component.html @@ -1,11 +1,6 @@
-
-
@@ -16,7 +11,7 @@ + @pageSizeChange="callback($event,'pageSize')" :footerActions="[]" :actions="[]"> @@ -25,31 +20,23 @@ {{scope.$index+1}} - -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
+
@@ -62,34 +49,23 @@ {{scope.$index+1}} - -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
+ @@ -102,58 +78,49 @@ {{scope.$index+1}} - -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
- -
{{scope.row.operateCompleted}}
-
+ -
- + -
{{subTableTitle}}
- - + :isReadonly="isReadonly" @actionCallback="callback" @change="changes" + :actions="params.type !==1 ? []: updateActions" :full-btn="true" btnPosition="center" ref="basicForm"> +
{{subTableTitle[params.type]}}
+ +