This commit is contained in:
shijingjing
2022-04-27 15:28:44 +08:00
parent b0b7e4b9f2
commit a733f00820
2 changed files with 78 additions and 62 deletions

View File

@@ -48,76 +48,92 @@ export default {
this.pass = o.pass, this.pass = o.pass,
this.id = o.id this.id = o.id
this.status = o.status this.status = o.status
console.log(o);
}, },
onShow() { onShow() {
document.title = this.status == 0? '申请纳入监测': '申请解除风险' document.title = this.status == 0? '申请纳入监测': '申请解除风险'
}, },
methods: { methods: {
submit() { submit() {
if(this.status == '0') { if(this.pass != '') {
if(!this.riskType) { this.$http.post(`/app/apppreventionreturntopoverty/relieve`,null,{
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)
})
this.filesList = files.join(',')
}
if(this.status == 0) { // 纳入监测
this.$http.post(`/app/apppreventionreturntopoverty/examine`, null,{
params: { params: {
pass: this.pass, pass: this.pass,
id: this.id,
riskType: this.riskType,
opinion: this.opinion, opinion: this.opinion,
files: this.filesList, files: this.filesList,
id: this.id,
} }
}).then(res => { }).then(res => {
if (res.code === 0) { if (res.code == 0) {
this.$u.toast('提交成功') this.$u.toast('提交成功')
uni.$emit('reload') uni.$emit('reload')
setTimeout(() => { setTimeout(() =>{
uni.navigateBack({ uni.navigateBack({
delta: 2 delta: 2
}) })
},600) },600)
} }
}) })
} else { // 驳回 } else {
this.$http.post(`/app/apppreventionreturntopoverty/relieve`, null,{ if(this.status == '0') {
params: { if(!this.riskType) {
pass: this.pass, return this.$u.toast('请选择监测对象类型')
id: this.id,
riskEliminationMethod: this.riskEliminationMethod,
opinion: this.opinion,
files: this.filesList,
} }
}).then(res => { }
if (res.code === 0) { if(this.status == '1') {
this.$u.toast('提交成功') if(!this.riskEliminationMethod) {
uni.$emit('reload') return this.$u.toast('请选择风险消除方式')
setTimeout(() => {
uni.navigateBack({
delta: 2
})
},600)
} }
}) }
} 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)
}
})
}
}
} }
}, },
} }

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="MonitorRemoveView"> <div class="MonitorRemoveView">
<div class="user-info" v-if="info"> <div class="user-info" v-if="info.length">
<div class="title">审核信息</div> <div class="title">审核信息</div>
<div class="info"> <div class="info">
<div class="item"> <div class="item">