From 589716c05d4275c80d4fb4a6f987ea495fd6fd35 Mon Sep 17 00:00:00 2001 From: fangjiakai <450850793@qq.com> Date: Wed, 24 Jan 2024 14:03:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E7=81=AB=E5=AE=89=E5=85=A8=E6=8E=AA?= =?UTF-8?q?=E6=96=BD=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 4 + pages/application/dangerous_options/index.js | 9 + pages/application/dangerous_options/index.vue | 169 ++++-- pages/application/hotwork/home.vue | 15 +- .../hotwork/hotwork-list/index.vue | 8 +- .../hotwork-measures-confirm-detail.vue | 491 ++++++++++++++++++ .../hotwork-measures-detail.vue | 164 +++--- 7 files changed, 736 insertions(+), 124 deletions(-) create mode 100644 pages/application/dangerous_options/index.js create mode 100644 pages/application/hotwork/hotwork-measures-confirm/hotwork-measures-confirm-detail.vue diff --git a/pages.json b/pages.json index b6d5674..bd78b0d 100644 --- a/pages.json +++ b/pages.json @@ -379,6 +379,10 @@ "path": "pages/application/hotwork/hotwork-measures/hotwork-measures-detail", "style": {} }, + { + "path": "pages/application/hotwork/hotwork-measures-confirm/hotwork-measures-confirm-detail", + "style": {} + }, { "path": "pages/application/hotwork/hotwork-guardian/hotwork-guardian-detail", "style": {} diff --git a/pages/application/dangerous_options/index.js b/pages/application/dangerous_options/index.js new file mode 100644 index 0000000..7457227 --- /dev/null +++ b/pages/application/dangerous_options/index.js @@ -0,0 +1,9 @@ +var measures; +export const setMeasures = (e) => { + measures = e; +}; + +export const getMeasures = () => { + return measures +}; + diff --git a/pages/application/dangerous_options/index.vue b/pages/application/dangerous_options/index.vue index 5d0ec45..ef3e0fe 100644 --- a/pages/application/dangerous_options/index.vue +++ b/pages/application/dangerous_options/index.vue @@ -6,23 +6,53 @@ + + + + 主要安全措施 + + 操作 + + + + + + + {{measures}} + + + + + + + 不涉及 + + + + 涉    及 + + + + + + 上传图片 - {{ imgList.length }}/4 + {{ imgList.length }}/2 - + - + @@ -37,7 +67,8 @@ - + + @@ -54,6 +85,10 @@ \ No newline at end of file + diff --git a/pages/application/hotwork/home.vue b/pages/application/hotwork/home.vue index 085ad28..5a55171 100644 --- a/pages/application/hotwork/home.vue +++ b/pages/application/hotwork/home.vue @@ -34,13 +34,22 @@ - {{count.MEASURES_CONFIRM}} + {{count.MEASURES_SET}} - 安全措施 - 确认人意见 + 设置安全 + 措施确认人 + + + + {{count.MEASURES_CONFIRM}} + + + 安全措施确认 + + diff --git a/pages/application/hotwork/hotwork-list/index.vue b/pages/application/hotwork/hotwork-list/index.vue index 023a412..062d7cb 100644 --- a/pages/application/hotwork/hotwork-list/index.vue +++ b/pages/application/hotwork/hotwork-list/index.vue @@ -141,7 +141,7 @@ _this.list = []; _this.isEnd = false; _this.getData(); - _this.getSetps(); + _this.getSetps(); // _this.getDept(); loginSession(); }, @@ -167,7 +167,11 @@ uni.navigateTo({ url: '/pages/application/hotwork/hotwork-measures/hotwork-measures-detail?HOTWORK_ID='+e }); - }else if(this.flow === '监护人签字'){ + }else if(this.flow === '安全措施确认'){ + uni.navigateTo({ + url: '/pages/application/hotwork/hotwork-measures-confirm/hotwork-measures-confirm-detail?HOTWORK_ID='+e + }); + }else if(this.flow === '监护人签字'){ uni.navigateTo({ url: '/pages/application/hotwork/hotwork-guardian/hotwork-guardian-detail?HOTWORK_ID='+e }); diff --git a/pages/application/hotwork/hotwork-measures-confirm/hotwork-measures-confirm-detail.vue b/pages/application/hotwork/hotwork-measures-confirm/hotwork-measures-confirm-detail.vue new file mode 100644 index 0000000..63584ef --- /dev/null +++ b/pages/application/hotwork/hotwork-measures-confirm/hotwork-measures-confirm-detail.vue @@ -0,0 +1,491 @@ + + + + + diff --git a/pages/application/hotwork/hotwork-measures/hotwork-measures-detail.vue b/pages/application/hotwork/hotwork-measures/hotwork-measures-detail.vue index 8e38eba..765ae5d 100644 --- a/pages/application/hotwork/hotwork-measures/hotwork-measures-detail.vue +++ b/pages/application/hotwork/hotwork-measures/hotwork-measures-detail.vue @@ -162,7 +162,7 @@ }, onLoad(event){ this.pd.HOTWORK_ID = event.HOTWORK_ID; - this.getData(); + this.getData(); // 初始化现场作业负责人 this.getDept(); this.getMeasures(); @@ -210,54 +210,60 @@ uni.showLoading({ title: '请稍候' }) - if (_this.imgList.length <= 0) { - uni.showToast({ - icon: 'none', - title: '请签字', - duration: 1500 - }); - return; - } - for (let i = 0; i < this.measuresList.length; i++) { - const measures = this.measuresList[i] - if(!measures.USER_ID){ - uni.showToast({ - icon: 'none', - title: '第'+(i+1)+'项未设置确认人', - duration: 1500 - }); - return; - } - } + if (_this.imgList.length <= 0) { + uni.showToast({ + icon: 'none', + title: '请签字', + duration: 1500 + }); + return; + } + for (let i = 0; i < this.measuresList.length; i++) { + const measures = this.measuresList[i] + if(!measures.USER_ID){ + uni.showToast({ + icon: 'none', + title: '第'+(i+1)+'项未设置确认人', + duration: 1500 + }); + return; + } + } - const formData={} - var files = []; - var signtime = []; - this.uploadImgFaults(files,signtime) - formData.HOTWORK_ID = _this.pd.HOTWORK_ID - formData.SIGNTIME = signtime.join(",") - formData.USER_ID = loginUser.USER_ID - formData.PREPARERS = JSON.stringify(_this.measuresList) - uni.uploadFile({ - url: basePath+'app/hotwork/nextStep', - files: files, - formData:formData, - success: (res) => { - uni.showToast({ - icon:'none', - title: '保存成功', - duration: 2000 - }); - // _this.goback() - }, - fail: (err) => { - uni.hideLoading(); - uni.showModal({ - content: err.errMsg, - showCancel: false - }); - } - }) + const formData={} + var files = []; + var signtime = []; + const signers = this.measuresList.map(item => { + return { + BUS_HOTWORK_MEASURES_ID: item.BUS_HOTWORK_MEASURES_ID, + USER_ID: item.USER_ID + } + }) + this.uploadImgFaults(files,signtime) + formData.HOTWORK_ID = _this.pd.HOTWORK_ID + formData.SIGNTIME = signtime.join(",") + formData.USER_ID = loginUser.USER_ID + formData.PREPARERS = JSON.stringify(signers) + uni.uploadFile({ + url: basePath+'app/hotwork/nextStep', + files: files, + formData:formData, + success: (res) => { + uni.showToast({ + icon:'none', + title: '保存成功', + duration: 2000 + }); + _this.goback() + }, + fail: (err) => { + uni.hideLoading(); + uni.showModal({ + content: err.errMsg, + showCancel: false + }); + } + }) }, uploadImgFaults(files,signtime) { @@ -319,40 +325,40 @@ }); }, - showDeptTree(index) { - this.isUps=true - this.$refs['tkiTree'+index][0]._show(); - }, + showDeptTree(index) { + this.isUps=true + this.$refs['tkiTree'+index][0]._show(); + }, - deptTreeConfirm(e,i) { - this.isUps=false; - this.measuresList[i].DEPARTMENT_ID=e[0].id; - this.measuresList[i].DEPARTMENT_NAME=e[0].name; - this.measuresList[i].USER_ID = '' - this.measuresList[i].USER_NAME = '' - this.getUserList(e[0].id,i); - }, + deptTreeConfirm(e,i) { + this.isUps=false; + this.measuresList[i].DEPARTMENT_ID=e[0].id; + this.measuresList[i].DEPARTMENT_NAME=e[0].name; + this.measuresList[i].USER_ID = '' + this.measuresList[i].USER_NAME = '' + this.getUserList(e[0].id,i); + }, - deptTreeCancel(e) { - this.isUps=false; - }, + deptTreeCancel(e) { + this.isUps=false; + }, - pickerUser(e,i) { - this.measuresList[i].userIndex = e.detail.value; - this.measuresList[i].USER_ID=this.measuresList[i].userList[e.detail.value].USER_ID; - this.measuresList[i].USER_NAME=this.measuresList[i].userList[e.detail.value].NAME; - this.$forceUpdate();//强制刷新 - }, + pickerUser(e,i) { + this.measuresList[i].userIndex = e.detail.value; + this.measuresList[i].USER_ID=this.measuresList[i].userList[e.detail.value].USER_ID; + this.measuresList[i].USER_NAME=this.measuresList[i].userList[e.detail.value].NAME; + this.$forceUpdate();//强制刷新 + }, - isBlankList(i) { - if (this.measuresList[i].userList.length == 0) { - uni.showToast({ - icon: 'none', - title: '请先选择确认单位', - duration: 1500 - }) - } - }, + isBlankList(i) { + if (this.measuresList[i].userList.length == 0) { + uni.showToast({ + icon: 'none', + title: '请先选择确认单位', + duration: 1500 + }) + } + }, //获取人员列表 getUserList(dept,i){ @@ -395,9 +401,9 @@ }, //完成 subCanvas(e) { + e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm') this.imgList.splice(0,this.imgList.length); this.imgList.push(e); - this.pd.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm'); this.hideModal() }, ViewImage(e) {