This commit is contained in:
shijingjing
2022-04-26 16:04:01 +08:00
parent 2a1597e06d
commit bb0a0ea588
2 changed files with 53 additions and 24 deletions

View File

@@ -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)
}
})
}
}
},
}