From 2a84c69ea09e297be00b79130a4d28e644189392 Mon Sep 17 00:00:00 2001 From: fangjiakai <450850793@qq.com> Date: Thu, 25 Jan 2024 15:59:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E7=81=AB=E6=B7=BB=E5=8A=A0=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E7=94=B5=E5=AD=90=E5=9B=B4=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/application/eight-assignments.vue | 194 ++---------------- .../hotwork-apply/hotwork-apply-detail.vue | 66 +++++- .../hotwork/hotwork-gas/gas-detail.vue | 10 +- .../hotwork/hotwork-list/index.vue | 7 +- pages/basics/home.vue | 151 +------------- 5 files changed, 83 insertions(+), 345 deletions(-) diff --git a/pages/application/eight-assignments.vue b/pages/application/eight-assignments.vue index 5d27056..a6a2b1b 100644 --- a/pages/application/eight-assignments.vue +++ b/pages/application/eight-assignments.vue @@ -15,7 +15,7 @@ - {{confinedspace_count}} + {{eight_work_count.CONFINEDSPACE_COUNT}} 受限空间 @@ -33,7 +33,7 @@ - {{blind_board_count}} + {{eight_work_count.BLIND_BOARD_COUNT}} 盲板抽堵作业 @@ -42,7 +42,7 @@ - {{break_ground_count}} + {{eight_work_count.BREAK_GROUND_COUNT}} 动土作业 @@ -51,7 +51,7 @@ - {{high_work_count}} + {{eight_work_count.HIGH_WORK_COUNT}} 高处作业 @@ -62,7 +62,7 @@ - {{hoisting_count}} + {{eight_work_count.HOISTING_COUNT}} 吊装作业 @@ -71,7 +71,7 @@ - {{electricity_count}} + {{eight_work_count.ELECTRICITY_COUNT}} 临时用电作业 @@ -80,7 +80,7 @@ - {{hotwork_count}} + {{eight_work_count.HOTWORK_COUNT}} 动火作业 @@ -89,7 +89,7 @@ - {{open_circuit_count}} + {{eight_work_count.OPEN_CIRCUIT_COUNT}} 断路作业 @@ -135,14 +135,7 @@ return { premission: {}, isRest :'', - confinedspace_count:0, - blind_board_count:0, - break_ground_count:0, - high_work_count:0, - hoisting_count:0, - electricity_count:0, - hotwork_count:0, - open_circuit_count:0, + eight_work_count: {}, }; }, mounted(){ @@ -150,15 +143,7 @@ }, onShow() { this.premission = Object.assign({}, premission) - console.info( this.premission) - this. confinedspace_count = 0 - this.blind_board_count = 0 - this.break_ground_count = 0 - this.high_work_count = 0 - this.hoisting_count = 0 - this.electricity_count = 0 - this.hotwork_count = 0 - this.open_circuit_count = 0 + this.eight_work_count = {} this.getRedPoint(); }, methods: { @@ -176,169 +161,18 @@ getRedPoint(){ uni.request({ - url: basePath +'/app/confinedspace/countCheck', + url: basePath + '/app/eightwork/checkWork', method: 'POST', dataType: 'json', header: { - 'Content-type':'application/x-www-form-urlencoded' + 'Content-type': 'application/x-www-form-urlencoded' }, data: { - tm:new Date().getTime(), - CORPINFO_ID:loginUser.CORPINFO_ID, - USER_ID:loginUser.USER_ID, + USER_ID: loginUser.USER_ID, }, success: (res) => { if ("success" == res.data.result) { - Object.values(res.data.count).forEach(item=>{ - this.confinedspace_count += (item || 0) - }) - } - } - }) - - uni.request({ - url: basePath +'/app/blindboard/countCheck', - method: 'POST', - dataType: 'json', - header: { - 'Content-type':'application/x-www-form-urlencoded' - }, - data: { - tm:new Date().getTime(), - CORPINFO_ID:loginUser.CORPINFO_ID, - USER_ID:loginUser.USER_ID, - }, - success: (res) => { - if ("success" == res.data.result) { - Object.values(res.data.count).forEach(item=>{ - this.blind_board_count += (item || 0) - }) - } - } - }) - - uni.request({ - url: basePath +'/app/breakground/countCheck', - method: 'POST', - dataType: 'json', - header: { - 'Content-type':'application/x-www-form-urlencoded' - }, - data: { - tm:new Date().getTime(), - CORPINFO_ID:loginUser.CORPINFO_ID, - USER_ID:loginUser.USER_ID, - }, - success: (res) => { - if ("success" == res.data.result) { - Object.values(res.data.count).forEach(item=>{ - this.break_ground_count += (item || 0) - }) - } - } - }) - - uni.request({ - url: basePath +'/app/highwork/countCheck', - method: 'POST', - dataType: 'json', - header: { - 'Content-type':'application/x-www-form-urlencoded' - }, - data: { - tm:new Date().getTime(), - CORPINFO_ID:loginUser.CORPINFO_ID, - USER_ID:loginUser.USER_ID, - }, - success: (res) => { - if ("success" == res.data.result) { - Object.values(res.data.count).forEach(item=>{ - this.high_work_count += (item || 0) - }) - } - } - }) - - uni.request({ - url: basePath +'/app/hoisting/countCheck', - method: 'POST', - dataType: 'json', - header: { - 'Content-type':'application/x-www-form-urlencoded' - }, - data: { - tm:new Date().getTime(), - CORPINFO_ID:loginUser.CORPINFO_ID, - USER_ID:loginUser.USER_ID, - }, - success: (res) => { - if ("success" == res.data.result) { - Object.values(res.data.count).forEach(item=>{ - this.hoisting_count += (item || 0) - }) - } - } - }) - - uni.request({ - url: basePath +'/app/electricity/countCheck', - method: 'POST', - dataType: 'json', - header: { - 'Content-type':'application/x-www-form-urlencoded' - }, - data: { - tm:new Date().getTime(), - CORPINFO_ID:loginUser.CORPINFO_ID, - USER_ID:loginUser.USER_ID, - }, - success: (res) => { - if ("success" == res.data.result) { - Object.values(res.data.count).forEach(item=>{ - this.electricity_count += (item || 0) - }) - } - } - }) - - uni.request({ - url: basePath +'/app/hotwork/countCheck', - method: 'POST', - dataType: 'json', - header: { - 'Content-type':'application/x-www-form-urlencoded' - }, - data: { - tm:new Date().getTime(), - CORPINFO_ID:loginUser.CORPINFO_ID, - USER_ID:loginUser.USER_ID, - }, - success: (res) => { - if ("success" == res.data.result) { - Object.values(res.data.count).forEach(item=>{ - this.hotwork_count += (item || 0) - }) - } - } - }) - - uni.request({ - url: basePath +'/app/cutroad/countCheck', - method: 'POST', - dataType: 'json', - header: { - 'Content-type':'application/x-www-form-urlencoded' - }, - data: { - tm:new Date().getTime(), - CORPINFO_ID:loginUser.CORPINFO_ID, - USER_ID:loginUser.USER_ID, - }, - success: (res) => { - if ("success" == res.data.result) { - Object.values(res.data.count).forEach(item=>{ - this.open_circuit_count += (item || 0) - }) + this.eight_work_count = res.data.count } } }) diff --git a/pages/application/hotwork/hotwork-apply/hotwork-apply-detail.vue b/pages/application/hotwork/hotwork-apply/hotwork-apply-detail.vue index 67af87a..3a1744c 100644 --- a/pages/application/hotwork/hotwork-apply/hotwork-apply-detail.vue +++ b/pages/application/hotwork/hotwork-apply/hotwork-apply-detail.vue @@ -447,6 +447,15 @@ + + + 作业区域 + + + {{pd.PLS_NAME?pd.PLS_NAME:'请选择'}} + + + @@ -706,19 +715,21 @@ confirmindex:-1, guardianUserList:[], guardianindex:-1, - leaderUserList:[], - leaderindex:-1, + leaderUserList:[], + leaderindex:-1, auditUserList:[], auditindex:-1, approveUserList:[], approveindex:-1, - monitorUserList:[], - monitorindex:-1, - acceptUserList:[], + monitorUserList:[], + monitorindex:-1, + acceptUserList:[], acceptindex:-1, pd:{},// 数据 - signs:{}, + signs:{}, measuresList:[], + plsList:[], + plxIndex:-1, rules:[ // {name:'CHECK_NO',message:'请输入编号'}, {name:'WORK_CONTENT',message:'请输入作业内容'}, @@ -746,6 +757,7 @@ {name:'GUARDIAN_USER_ID',message:'请选择监护人'}, {name:'CONFESS_USER_ID',message:'请选择安全交底人'}, {name:'ACCEPT_CONFESS_USER_ID',message:'请选择接受交底人'}, + {name:'PLS_ID',message:'请选择电子围栏'}, ], todayDate:'', otherAssignments:false, @@ -770,6 +782,7 @@ } // 初始化现场作业负责人 this.getDept(); + this.getPlsList(); loginSession(); }, @@ -1113,6 +1126,32 @@ } }) }, + + getPlsList(){ + var _this=this + uni.request({ + method: 'POST', + dataType: 'json', + header: { + 'Content-type':'application/x-www-form-urlencoded' + }, + url: basePath+'/app/eightwork/getPlsList', + data: { + CORPINFO_ID:loginUser.CORPINFO_ID, + }, + success: function(res){ + if("success" == res.data.result){ + _this.plsList=res.data.varList + } else { + uni.showToast({ + title: res.data.message, + duration: 2000 + }); + } + } + }) + }, + isBlankList(userType) { switch(userType) { case 'analyze': @@ -1374,10 +1413,10 @@ this.$forceUpdate();//强制刷新 }, PickerWorkuser(e) { - this.workuserindex = e.detail.value; - this.pd.WORK_USER_ID=this.workUserList[this.workuserindex].USER_ID; - this.pd.WORK_USER=this.workUserList[this.workuserindex].NAME; - this.$forceUpdate();//强制刷新 + this.workuserindex = e.detail.value; + this.pd.WORK_USER_ID=this.workUserList[this.workuserindex].USER_ID; + this.pd.WORK_USER=this.workUserList[this.workuserindex].NAME; + this.$forceUpdate();//强制刷新 }, /* @@ -1583,6 +1622,13 @@ this.$forceUpdate();//强制刷新 }, + pickerPls(e) { + this.plxIndex = e.detail.value; + this.pd.PLS_ID=this.plsList[this.plxIndex].uuid; + this.pd.PLS_NAME=this.plsList[this.plxIndex].regName; + this.$forceUpdate();//强制刷新 + }, + changeStartDate(e) { this.pd.WORK_START_DATE = e this.$forceUpdate();//强制刷新 diff --git a/pages/application/hotwork/hotwork-gas/gas-detail.vue b/pages/application/hotwork/hotwork-gas/gas-detail.vue index b810854..748f70f 100644 --- a/pages/application/hotwork/hotwork-gas/gas-detail.vue +++ b/pages/application/hotwork/hotwork-gas/gas-detail.vue @@ -52,7 +52,7 @@ - + @@ -103,6 +103,7 @@ signtime.push(item.SIGNER_TIME) }) }, + goSubmit(APPLY_STATUS){ var _this = this; let required = true @@ -153,7 +154,12 @@ duration: 2000 }); this.buttonloading = false - _this.goback() + if(APPLY_STATUS === 1){ + uni.navigateBack({delta: 1}); + }else{ + uni.navigateBack({delta: 2}); + } + // _this.goback() }, fail: (err) => { uni.hideLoading(); diff --git a/pages/application/hotwork/hotwork-list/index.vue b/pages/application/hotwork/hotwork-list/index.vue index a695a8f..0646f04 100644 --- a/pages/application/hotwork/hotwork-list/index.vue +++ b/pages/application/hotwork/hotwork-list/index.vue @@ -290,7 +290,7 @@ }, success: (res) => { if (res.data != null) { - _this.stepList = [{"STEP_NAME":"请选择","STEP_ID":""},...res.data.list]; + _this.stepList = [{"STEP_NAME":"请选择","STEP_ID":""},...res.data.list,{"STEP_NAME":"验收归档","STEP_ID":"99"}]; } } }) @@ -314,8 +314,9 @@ }, data: { CREATOR:_this.flow === '提交申请'?loginUser.USER_ID : '', - GASCHECK:_this.flow === '气体检测'?loginUser.USER_ID : '', - STEP_NAME: (_this.flow === '提交申请' || _this.flow === '气体检测')?'' : _this.flow, + GASCHECK:_this.flow === '气体检测'?loginUser.USER_ID : '', + STEP_NAME: (_this.flow === '提交申请' || _this.flow === '气体检测')?'' : _this.flow, + STEP_ID: _this.STEP_ID, KEYWORDS : _this.KEYWORDS, //关键字模糊查询 CORPINFO_ID:loginUser.CORPINFO_ID, USER_ID:loginUser.USER_ID, diff --git a/pages/basics/home.vue b/pages/basics/home.vue index 4863684..bedf46c 100644 --- a/pages/basics/home.vue +++ b/pages/basics/home.vue @@ -666,162 +666,13 @@ export default { }, getRedPoint() { uni.request({ - url: basePath + '/app/confinedspace/countCheck', + url: basePath + '/app/eightwork/checkWork', method: 'POST', dataType: 'json', header: { 'Content-type': 'application/x-www-form-urlencoded' }, data: { - tm: new Date().getTime(), - CORPINFO_ID: loginUser.CORPINFO_ID, - USER_ID: loginUser.USER_ID, - }, - success: (res) => { - if ("success" == res.data.result) { - Object.values(res.data.count).forEach(item => { - this.eight_work_count += (item || 0) - }) - } - } - }) - - uni.request({ - url: basePath + '/app/blindboard/countCheck', - method: 'POST', - dataType: 'json', - header: { - 'Content-type': 'application/x-www-form-urlencoded' - }, - data: { - tm: new Date().getTime(), - CORPINFO_ID: loginUser.CORPINFO_ID, - USER_ID: loginUser.USER_ID, - }, - success: (res) => { - if ("success" == res.data.result) { - Object.values(res.data.count).forEach(item => { - this.eight_work_count += (item || 0) - }) - } - } - }) - - uni.request({ - url: basePath + '/app/breakground/countCheck', - method: 'POST', - dataType: 'json', - header: { - 'Content-type': 'application/x-www-form-urlencoded' - }, - data: { - tm: new Date().getTime(), - CORPINFO_ID: loginUser.CORPINFO_ID, - USER_ID: loginUser.USER_ID, - }, - success: (res) => { - if ("success" == res.data.result) { - Object.values(res.data.count).forEach(item => { - this.eight_work_count += (item || 0) - }) - } - } - }) - - uni.request({ - url: basePath + '/app/highwork/countCheck', - method: 'POST', - dataType: 'json', - header: { - 'Content-type': 'application/x-www-form-urlencoded' - }, - data: { - tm: new Date().getTime(), - CORPINFO_ID: loginUser.CORPINFO_ID, - USER_ID: loginUser.USER_ID, - }, - success: (res) => { - if ("success" == res.data.result) { - Object.values(res.data.count).forEach(item => { - this.eight_work_count += (item || 0) - }) - } - } - }) - - uni.request({ - url: basePath + '/app/hoisting/countCheck', - method: 'POST', - dataType: 'json', - header: { - 'Content-type': 'application/x-www-form-urlencoded' - }, - data: { - tm: new Date().getTime(), - CORPINFO_ID: loginUser.CORPINFO_ID, - USER_ID: loginUser.USER_ID, - }, - success: (res) => { - if ("success" == res.data.result) { - Object.values(res.data.count).forEach(item => { - this.eight_work_count += (item || 0) - }) - } - } - }) - - uni.request({ - url: basePath + '/app/electricity/countCheck', - method: 'POST', - dataType: 'json', - header: { - 'Content-type': 'application/x-www-form-urlencoded' - }, - data: { - tm: new Date().getTime(), - CORPINFO_ID: loginUser.CORPINFO_ID, - USER_ID: loginUser.USER_ID, - }, - success: (res) => { - if ("success" == res.data.result) { - Object.values(res.data.count).forEach(item => { - this.eight_work_count += (item || 0) - }) - } - } - }) - - uni.request({ - url: basePath + '/app/hotwork/countCheck', - method: 'POST', - dataType: 'json', - header: { - 'Content-type': 'application/x-www-form-urlencoded' - }, - data: { - tm: new Date().getTime(), - CORPINFO_ID: loginUser.CORPINFO_ID, - USER_ID: loginUser.USER_ID, - }, - success: (res) => { - if ("success" == res.data.result) { - Object.values(res.data.count).forEach(item => { - this.eight_work_count += (item || 0) - }) - } - } - }) - - uni.request({ - url: basePath + '/app/cutroad/countCheck', - method: 'POST', - dataType: 'json', - header: { - 'Content-type': 'application/x-www-form-urlencoded' - }, - data: { - tm: new Date().getTime(), - CORPINFO_ID: loginUser.CORPINFO_ID, USER_ID: loginUser.USER_ID, }, success: (res) => {