From 45afd104b66b2b3ae522fccd59dba880920b0e35 Mon Sep 17 00:00:00 2001 From: yujk <990961482@qq.com> Date: Mon, 2 Aug 2021 09:18:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E6=9D=83=E8=B0=83=E6=9F=A5=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/authenticRight/index.vue | 44 +++++++++++++++++++----------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/src/views/authenticRight/index.vue b/src/views/authenticRight/index.vue index d99a7291..caac625d 100644 --- a/src/views/authenticRight/index.vue +++ b/src/views/authenticRight/index.vue @@ -35,9 +35,9 @@ - + @@ -498,6 +498,8 @@ updateSampling } from "../../api/authenticRight"; import {getDeptList} from "../../api/biddingHall"; + import {Dialog} from "vant"; + import {Toast} from "vant"; export default { name: "authenticRightApply", @@ -639,7 +641,6 @@ export default { this.value11=0 this.value2=0 this.value22=0 - this.getList() } }) }else if(val==2){ @@ -655,7 +656,6 @@ export default { }) this.value2=0 this.value22=0 - this.getList() } }) }else if(val==3){ @@ -670,7 +670,6 @@ export default { this.option22.push({ "text":item.cooperativeName,"value": item.cooperativeName}) }) this.value22=0 - this.getList() } }) @@ -787,10 +786,26 @@ export default { } }) }, - removeRow(id){ - /*delSampling(id).then(res => { - this.getList(); - })*/ + removeRow(id,index){ + let _this = this + Dialog.confirm({ + title: '删除', + message: '删除后数据无法恢复,确认要删除么?' + }).then(() => { + delSampling(id).then(res => { + this.$toast({ + icon: 'success', // 找到自己需要的图标 + message: '删除成功', + duration:"1000", + onClose:function(){ + _this.getList(); + } + }) + }) + }).catch(() => { + // on cancel + }); + }, onFinish({ selectedOptions }) { this.show1 = false; @@ -855,7 +870,9 @@ export default { }) }else if(val==3){ this.reset(); + this.showXCDC=true getInvestigate(data.id).then(res => { + console.log(data) if(res.data){ this.xcdcform = res.data this.xcdcform["countName"] = data.countName @@ -864,7 +881,6 @@ export default { this.xcdcform["cooperativeName"] = data.cooperativeName this.xcdcform["farmerName"] = data.farmerName }else{ - this.xcdcform = res.data this.xcdcform["countName"] = data.countName this.xcdcform["townName"] = data.townName this.xcdcform["villageName"] = data.villageName @@ -873,13 +889,13 @@ export default { this.xcdcform["samplingId"] = data.id this.xcdcform["fileName"] = data.townName+data.villageName } - - this.showXCDC=true }) }else if(val==2){ console.log(data) this.reset(); + console.log(this.dhdcform) + this.showDHDC=true getInvestigate(data.id).then(res => { if(res.data){ this.dhdcform = res.data @@ -889,7 +905,6 @@ export default { this.dhdcform["cooperativeName"] = data.cooperativeName this.dhdcform["farmerName"] = data.farmerName }else{ - this.dhdcform = res.data this.dhdcform["countName"] = data.countName this.dhdcform["townName"] = data.townName this.dhdcform["villageName"] = data.villageName @@ -897,10 +912,7 @@ export default { this.dhdcform["farmerName"] = data.farmerName this.dhdcform["samplingId"] = data.id this.dhdcform["fileName"] = data.townName+data.villageName - } - console.log(this.dhdcform) - this.showDHDC=true }) } },