字段
This commit is contained in:
@@ -54,45 +54,18 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
var url = ''
|
||||
var params = {
|
||||
pass: this.pass,
|
||||
opinion: this.opinion,
|
||||
files: this.filesList,
|
||||
id: this.id,
|
||||
}
|
||||
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)
|
||||
}
|
||||
})
|
||||
url = '/app/apppreventionreturntopoverty/relieve'
|
||||
} 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)
|
||||
}
|
||||
})
|
||||
url = `/app/apppreventionreturntopoverty/examine`
|
||||
}
|
||||
} else {
|
||||
if(this.status == '0') {
|
||||
@@ -114,47 +87,27 @@ export default {
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
})
|
||||
url = `/app/apppreventionreturntopoverty/examine`
|
||||
} else {
|
||||
url = `/app/apppreventionreturntopoverty/relieve` // 驳回
|
||||
}
|
||||
}
|
||||
|
||||
let fromData = new FormData()
|
||||
for (let key in params) {
|
||||
fromData.append(key, params[key])
|
||||
}
|
||||
this.$http.post(url , formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$u.toast('提交成功')
|
||||
uni.$emit('reload')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
})
|
||||
},600)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user