From a733f008203dbe7cb9763c8100078987cc675c9a Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Wed, 27 Apr 2022 15:28:44 +0800 Subject: [PATCH] 29356 --- .../AppMonitoringObject/MonitorAddView.vue | 138 ++++++++++-------- .../AppMonitoringObject/MonitorRemoveView.vue | 2 +- 2 files changed, 78 insertions(+), 62 deletions(-) diff --git a/src/apps/AppMonitoringObject/MonitorAddView.vue b/src/apps/AppMonitoringObject/MonitorAddView.vue index 1fc3fa01..26b6bf4e 100644 --- a/src/apps/AppMonitoringObject/MonitorAddView.vue +++ b/src/apps/AppMonitoringObject/MonitorAddView.vue @@ -48,76 +48,92 @@ export default { this.pass = o.pass, this.id = o.id this.status = o.status - console.log(o); }, onShow() { document.title = this.status == 0? '申请纳入监测': '申请解除风险' }, methods: { submit() { - 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('请输入备注说明') - // } - if(this.file.length > 0) { - var files = [] - this.file.map(item => { - files.push(item.id) + if(this.pass != '') { + this.$http.post(`/app/apppreventionreturntopoverty/relieve`,null,{ + params: { + pass: this.pass, + opinion: this.opinion, + files: this.filesList, + id: this.id, + } + }).then(res => { + if (res.code == 0) { + this.$u.toast('提交成功') + uni.$emit('reload') + setTimeout(() =>{ + uni.navigateBack({ + delta: 2 + }) + },600) + } }) - this.filesList = files.join(',') - } + } else { + if(this.status == '0') { + if(!this.riskType) { + return this.$u.toast('请选择监测对象类型') + } + } + if(this.status == '1') { + if(!this.riskEliminationMethod) { + return this.$u.toast('请选择风险消除方式') + } + } + if(this.file.length > 0) { + var files = [] + this.file.map(item => { + files.push(item.id) + }) + this.filesList = files.join(',') + } - 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') - 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) - } - }) + 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') + 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 8b9f35f5..a3ae9add 100644 --- a/src/apps/AppMonitoringObject/MonitorRemoveView.vue +++ b/src/apps/AppMonitoringObject/MonitorRemoveView.vue @@ -1,6 +1,6 @@