From ea5511557e5a6ec99755e5008ae94636e2ccd834 Mon Sep 17 00:00:00 2001 From: WenShiJun Date: Mon, 19 Feb 2024 12:05:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=AE=89=E5=85=A8=E7=8E=AF?= =?UTF-8?q?=E4=BF=9D=E6=A3=80=E6=9F=A5=E6=A8=A1=E5=9D=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom/list-item-check-hidden-form.vue | 9 ++- .../custom/list-item-check-list.vue | 59 +++++++++---------- pages/basics/home.vue | 16 ++++- 3 files changed, 47 insertions(+), 37 deletions(-) diff --git a/pages/application/hidden-danger-check-standard/custom/list-item-check-hidden-form.vue b/pages/application/hidden-danger-check-standard/custom/list-item-check-hidden-form.vue index 3cd7857..cf902c2 100644 --- a/pages/application/hidden-danger-check-standard/custom/list-item-check-hidden-form.vue +++ b/pages/application/hidden-danger-check-standard/custom/list-item-check-hidden-form.vue @@ -55,13 +55,13 @@ - + 隐患描述 @@ -286,7 +286,7 @@ this.pd.CHECK_CONTENT = JSON.parse(decodeURIComponent(event.CHECK_CONTENT)); this.pd.CHECK_STANDARD = JSON.parse(decodeURIComponent(event.CHECK_STANDARD)); this.pd.REFERENCE_BASIS = JSON.parse(decodeURIComponent(event.REFERENCE_BASIS)); - this.pd.HIDDENDESCR = JSON.parse(decodeURIComponent(event.CHECK_RESULT)); + this.pd.HIDDENDESCR = JSON.parse(decodeURIComponent(event.CHECK_UNQUALIFIED)); this.baoBaoType = JSON.parse(decodeURIComponent(event.baoBaoType))+''; console.log(this.baoBaoType) this.index = event.index; @@ -866,7 +866,6 @@ prePage.$vm.initflag = true; // A 页面 init方法 为true prePage.$vm.list[_this.index].ISNORMAL = 1; prePage.$vm.list[_this.index].HIDDEN_ID = _this.pd.HIDDEN_ID; - prePage.$vm.list[_this.index].CHECK_RESULT = _this.pd.HIDDENDESCR; prePage.$vm.list[_this.index].CHECK_UNQUALIFIED = _this.pd.HIDDENDESCR; } uni.navigateBack({}); @@ -1060,7 +1059,7 @@ }, confirm(info){ this.pd.HIDDENPART = info.HIDDEN_PART - // this.pd.HIDDENDESCR = info.INSPECTION_BASIS + this.pd.HIDDENDESCR = info.INSPECTION_BASIS this.pd.HIDDENLEVEL = 'hiddenLevel0001' this.pd.HIDDENLEVELNAME = '一般隐患' if (info.HIDDEN_TYPE_ONE_NAME){this.pd.HIDDENTYPENAME = info.HIDDEN_TYPE_ONE_NAME} diff --git a/pages/application/hidden-danger-check-standard/custom/list-item-check-list.vue b/pages/application/hidden-danger-check-standard/custom/list-item-check-list.vue index a8850d7..71ba647 100644 --- a/pages/application/hidden-danger-check-standard/custom/list-item-check-list.vue +++ b/pages/application/hidden-danger-check-standard/custom/list-item-check-list.vue @@ -15,10 +15,13 @@ - 合格 + 合格.{{ item.OPERATION_TYPE === 1 ? item.CHECK_QUALIFIED : '' }} + + + - 不合格 + 不合格.{{ item.OPERATION_TYPE === 1 ? item.CHECK_UNQUALIFIED : '' }} + + + @@ -48,9 +54,6 @@ - - - @@ -106,7 +109,7 @@ title: '请稍候' }) uni.request({ - url: basePath + '/app/hiddenDangerCheckStandardCustom/goCheck', // /app/listmanager/goCheck + url: basePath + '/app/hiddenDangerCheckStandardCustom/goCheck', method: 'POST', dataType: 'json', header: { @@ -131,11 +134,6 @@ _this.list[i].HIDDEN_ID = res.data.records[j].HIDDEN_ID; _this.list[i].CHECKRECORD_ID = res.data.records[j].CHECKRECORD_ID; _this.list[i].RECORDITEM_ID = res.data.records[j].RECORDITEM_ID; - if (res.data.records[j].ISNORMAL === 0) { - _this.list[i].CHECK_QUALIFIED = res.data.records[j].CHECK_RESULT; - } else if (res.data.records[j].ISNORMAL === 1) { - _this.list[i].CHECK_UNQUALIFIED = res.data.records[j].CHECK_RESULT; - } // _this.list[i].is_checked = 1; } } @@ -160,12 +158,14 @@ //去保存 save: function (){ - var _this = this; + for(var i=0;i<_this.list.length;i++){ if(this.list[i].ISNORMAL && this.list[i].OPERATION_TYPE === 2) { var CHECK_RESULT = '' - if (this.list[i].ISNORMAL === 0 || this.list[i].ISNORMAL === 1) { - CHECK_RESULT = _this.list[i].CHECK_RESULT + if (this.list[i].ISNORMAL === 0) { + CHECK_RESULT = _this.list[i].CHECK_QUALIFIED + } else if (this.list[i].ISNORMAL === 1) { + CHECK_RESULT = _this.list[i].CHECK_UNQUALIFIED } else if (this.list[i].ISNORMAL === 2) { CHECK_RESULT = "不涉及" } @@ -179,6 +179,15 @@ } } } + if (!_this.other[0].USER_ID) { + uni.showToast({ + icon: 'none', + title: '请添加检查人', + duration: 1500 + }); + return; + } + var _this = this; uni.showLoading({ title: '请稍候' }) @@ -190,8 +199,10 @@ item.CUSTOM_ITEM_ID = _this.list[i].CUSTOM_ITEM_ID item.ISNORMAL = _this.list[i].ISNORMAL - if (_this.list[i].ISNORMAL === 0 || _this.list[i].ISNORMAL === 1) { - item.CHECK_RESULT = _this.list[i].CHECK_RESULT + if (_this.list[i].ISNORMAL === 0) { + item.CHECK_RESULT = _this.list[i].CHECK_QUALIFIED + } else if (_this.list[i].ISNORMAL === 1) { + item.CHECK_RESULT = _this.list[i].CHECK_UNQUALIFIED } else { item.CHECK_RESULT = '' } @@ -326,13 +337,6 @@ _this.list[e.index].HIDDEN_ID=''; _this.$forceUpdate();//强制刷新 } - if (STATUS === 0) { - _this.$set(_this.list[e.index], 'CHECK_RESULT', _this.list[e.index].CHECK_QUALIFIED) - } else if (STATUS === 1) { - _this.$set(_this.list[e.index], 'CHECK_RESULT', _this.list[e.index].CHECK_UNQUALIFIED) - } else { - _this.$set(_this.list[e.index], 'CHECK_RESULT', '不涉及') - } }, //跳转事件 goToAdd(e) { @@ -361,7 +365,7 @@ +'&CHECK_ITEM_NAME='+ encodeURIComponent(JSON.stringify(e.CHECK_ITEM_NAME)) +'&CHECK_STANDARD='+ encodeURIComponent(JSON.stringify(e.CHECK_STANDARD)) +'&REFERENCE_BASIS='+ encodeURIComponent(JSON.stringify(e.REFERENCE_BASIS)) - +'&CHECK_RESULT='+ encodeURIComponent(JSON.stringify(e.CHECK_RESULT)) + +'&CHECK_UNQUALIFIED='+ encodeURIComponent(JSON.stringify(e.CHECK_UNQUALIFIED)) +'&index='+e.index +'&baoBaoType='+this.baoBaoType }); @@ -387,9 +391,4 @@ transform: scale(0.9); } -.bgh{ - background: #f8f6f6; - color: #d9d7d7; -} - diff --git a/pages/basics/home.vue b/pages/basics/home.vue index 0cc7fc4..c3389cf 100644 --- a/pages/basics/home.vue +++ b/pages/basics/home.vue @@ -140,15 +140,26 @@ - + + {{ safetyEnvironmentalInspection }} 安全环保检查 - {{ safetyEnvironmentalInspection }} + + + + + + + + + + + @@ -581,6 +592,7 @@ export default { mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件) data() { return { + keyProjectManagement: '', safetyEnvironmentalInspection:0,//安全环保总数 permissionID:'', premission: {},