This commit is contained in:
shijingjing
2022-04-27 17:38:43 +08:00
parent c5b3bdb8a4
commit 4a06402b35
3 changed files with 72 additions and 42 deletions

View File

@@ -1,8 +1,8 @@
<template>
<div class="MonitorAddView">
<div class="containter">
<div class="type" v-if="status == 0 || 3">
<div><span style="color: #FF4466">*</span>{{ status == 0? '监测对象类型' : status == 3? '风险因素':'' }}</div>
<div class="type" v-if="status == 3 || status == 4 || status == 0">
<div><span style="color: #FF4466">*</span>风险因素</div>
<div>
<AiSelect dict="fpRiskType" v-model="riskType" />
</div>
@@ -50,29 +50,50 @@ export default {
this.status = o.status
},
onShow() {
document.title = this.status == 0 && this.pass ==''? '申请纳入监测': this.status == 1 && this.pass ==''? '申请解除风险' : '解除风险'
document.title = (this.status == 3 || this.status == 4 ) && this.pass ==''? '申请纳入监测': this.status == 1 && this.pass ==''? '申请解除风险' : this.status == 1 && this.pass ==1? '解除风险': (this.status == 4 || this.status==3) && this.pass == 1? '纳入监测':''
},
methods: {
submit() {
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)
}
})
if(this.pass == 1) {
if(this.status == 1) { // 解除
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)
}
})
} else if (this.status == 4 || this.status == 3 || this.status == 0) { // 纳入监测
this.$http.post(`/app/apppreventionreturntopoverty/examine`,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)
}
})
}
} else {
if(this.status == '0') {
if(!this.riskType) {