diff --git a/src/apps/AppMonitoringObject/MonitorAddView.vue b/src/apps/AppMonitoringObject/MonitorAddView.vue index d3a0a4fe..be751679 100644 --- a/src/apps/AppMonitoringObject/MonitorAddView.vue +++ b/src/apps/AppMonitoringObject/MonitorAddView.vue @@ -50,8 +50,15 @@ export default { }, methods: { submit() { - if(!this.riskType) { - return this.$u.toast('请选择监测对象类型') + if(this.status == '0') { + if(!this.riskType) { + return this.$u.toast('请选择监测对象类型') + } + } + if(this.status == '1') { + if(!this.riskEliminationMethod) { + return this.$u.toast('请选择风险消除方式') + } } if(!this.opinion) { return this.$u.toast('请输入备注说明') @@ -63,27 +70,49 @@ export default { }) this.filesList = files.join(',') } - this.$http.post(`/app/apppreventionreturntopoverty/examine`, null,{ - params: { - pass: this.pass, - id: this.id, - riskType: this.riskType, - opinion: this.opinion, - files: this.filesList, - } - }).then(res => { - if (res.code === 0) { - this.$u.toast('操作成功') - setTimeout(() => { + + if(this.status == 0) { + this.$http.post(`/app/apppreventionreturntopoverty/examine`, null,{ + params: { + pass: this.pass, + id: this.id, + riskType: this.riskType, + opinion: this.opinion, + files: this.filesList, + } + }).then(res => { + if (res.code === 0) { + this.$u.toast('操作成功') uni.$emit('reload') - this.getInfo() - uni.navigateBack({ - delta: 2 - }) - },600) - - } - }) + setTimeout(() => { + uni.navigateBack({ + delta: 2 + }) + },600) + } + }) + } else { + this.$http.post(`/app/apppreventionreturntopoverty/relieve`, null,{ + params: { + pass: this.pass, + id: this.id, + riskEliminationMethod: this.riskEliminationMethod, + opinion: this.opinion, + files: this.filesList, + } + }).then(res => { + if (res.code === 0) { + this.$u.toast('操作成功') + uni.$emit('reload') + setTimeout(() => { + uni.navigateBack({ + delta: 2 + }) + },600) + } + }) + } + } }, } diff --git a/src/apps/AppMonitoringObject/MonitorRemoveView.vue b/src/apps/AppMonitoringObject/MonitorRemoveView.vue index 5488dc32..4f626e30 100644 --- a/src/apps/AppMonitoringObject/MonitorRemoveView.vue +++ b/src/apps/AppMonitoringObject/MonitorRemoveView.vue @@ -1,6 +1,6 @@