From f89921cd27409d11e70e7327fe916252316a38fa Mon Sep 17 00:00:00 2001 From: songhuangfeng123 <shf18767906695@163.com> Date: 星期五, 08 四月 2022 17:53:26 +0800 Subject: [PATCH] fix --- src/views/safetyproduction/review.vue | 48 ++++++++++++------------ src/router/index.js | 46 +++++++++++----------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index eea1f0a..94c4f88 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -81,26 +81,26 @@ ], hidden: true }, - { - id: 2, - parentId: 0, - path: '/contingencyplan', - component: Layout, - // redirect: '/contingencyplan', - name: '应急预案', - meta: { title: '应急预案', icon: 'el-icon-dash' }, - children: [ - { - id: 1, - parentId: 0, - path: '/contingencyplan', - name: '应急预案', - component: () => import('@/views/contingencyplan/index'), - meta: { title: '应急预案', icon: '' } - } - ] - }, - { + // { + // id: 2, + // parentId: 0, + // path: '/contingencyplan', + // component: Layout, + // // redirect: '/contingencyplan', + // name: '应急预案', + // meta: { title: '应急预案', icon: 'el-icon-dash' }, + // children: [ + // { + // id: 1, + // parentId: 0, + // path: '/contingencyplan', + // name: '应急预案', + // component: () => import('@/views/contingencyplan/index'), + // meta: { title: '应急预案', icon: '' } + // } + // ] + // }, +/* { id: 2, parentId: 0, path: '/safetyproduction', @@ -168,8 +168,8 @@ hidden: true } ] - }, - { + },*/ + /* { id: 2, parentId: 0, path: '/majorHazardSourceMonitoring', @@ -202,7 +202,7 @@ meta: { title: '仪表实时数据', icon: '' } }, ] - }, + },*/ { id: 2, parentId: 0, diff --git a/src/views/safetyproduction/review.vue b/src/views/safetyproduction/review.vue index 4a471fb..ddf24d8 100644 --- a/src/views/safetyproduction/review.vue +++ b/src/views/safetyproduction/review.vue @@ -255,32 +255,32 @@ }, modItem() { if(this.list.safetyInspectionItemResult!=null){ - console.log(this.list) + let pointFlag = this.pointDel for(var i=0;i<this.list.selfDeductionList.length;i++){ - this.pointDel=this.pointDel-this.list.selfDeductionList[i].point + pointFlag=pointFlag-this.list.selfDeductionList[i].point } - - safetySelfInspectionModItemInfo(this.list).then((res) => { - if (res.data.code == 200) { - if(this.pointDel>=0){ - this.$notify({ - type: "success", - duration: 2000, - message: "提交成功", - title: "成功", - }); - this.$router.push({ - path: "/gojudging", - query:{ - id:this.id - } - }); - }else{ - alert(`扣分不得超过总分${this.point}`) + if(pointFlag>=0){ + safetySelfInspectionModItemInfo(this.list).then((res) => { + if (res.data.code == 200) { + this.$notify({ + type: "success", + duration: 2000, + message: "提交成功", + title: "成功", + }); + this.$router.push({ + path: "/gojudging", + query: { + id: this.id + } + }); + } + }) + }else{ + alert(`扣分不得超过总分${this.point}`) + } } - } - }); - }else{ + else{ this.$confirm('是否否决项未选择','提示', { confirmButtonText: '确认', cancelButtonText: '取消', @@ -304,7 +304,7 @@ addC(){ if(this.form.point<=this.point){ for(let i = 0;i<this.list.selfDeductionList.length;i++){ - if (this.form.id==this.list.selfDeductionList[i].id){ + if (this.form.safetyInspectionItemDeductionId==this.list.selfDeductionList[i].safetyInspectionItemDeductionId){ this.list.selfDeductionList[i].point = this.form.point this.list.selfDeductionList[i].remark = this.form.remark } -- Gitblit v1.9.2