监测对象

This commit is contained in:
liuye
2022-04-27 18:32:22 +08:00
parent 9861b4718e
commit bfde95f6ca

View File

@@ -697,12 +697,8 @@ export default {
if (this.changeStatus == 1 || this.changeStatus == 4) { //网格长直接纳入监测/解除风险 if (this.changeStatus == 1 || this.changeStatus == 4) { //网格长直接纳入监测/解除风险
this.applyInfo.pass = 1 this.applyInfo.pass = 1
} }
var url = '' var url = `/app/apppreventionreturntopoverty/examine` //0, 1纳入监测
if (this.changeStatus == 0 || this.changeStatus == 1) { //纳入监测 if (this.changeStatus == 3 || this.changeStatus == 4) { //3, 4解除风险
url = `/app/apppreventionreturntopoverty/examine`
}
if (this.changeStatus == 3 || this.changeStatus == 4) { //解除风险
url = `/app/apppreventionreturntopoverty/relieve` url = `/app/apppreventionreturntopoverty/relieve`
} }
@@ -742,12 +738,8 @@ export default {
this.examineFrom.files = ids.join(',') this.examineFrom.files = ids.join(',')
} }
this.examineFrom.id = this.detail.id this.examineFrom.id = this.detail.id
var url = '' var url = `/app/apppreventionreturntopoverty/examine` //2 纳入监测
if (this.changeStatus == 2) { //纳入监测 if (this.changeStatus == 5) { //5 解除风险
url = `/app/apppreventionreturntopoverty/examine`
}
if (this.changeStatus == 5) { //解除风险
url = `/app/apppreventionreturntopoverty/relieve` url = `/app/apppreventionreturntopoverty/relieve`
} }
this.instance.post(url, null, { params: this.examineFrom }).then(res => { this.instance.post(url, null, { params: this.examineFrom }).then(res => {
@@ -770,66 +762,15 @@ export default {
} }
this.isShowExamine = false this.isShowExamine = false
}, },
handleDelete(ids) { handleDelete(ids) {
this.$confirm("是否要删除监测对象") this.$confirm("是否要删除监测对象").then(() => {
.then(() => { this.instance.post("/app/apppreventionreturntopoverty/delete", null, {params: { ids: ids?.toString() },}).then((res) => {
this.instance if (res?.code == 0) {
.post("/app/apppreventionreturntopoverty/delete", null, { this.$message.success("删除成功!");
params: { ids: ids?.toString() }, this.back();
}) }
.then((res) => { });
if (res?.code == 0) { })
this.$message.success("删除成功!");
this.back();
}
});
})
.catch(() => 0);
},
handleAccept(pass) {
let msg =
pass == 0
? "是否驳回纳入监测对象申请?"
: `是否${isNaN(pass) ? "(申请)" : ""}纳入监测对象?`,
{ id } = this.detail;
this.$confirm(msg)
.then(() => {
this.instance
.post("/app/apppreventionreturntopoverty/examine", null, {
params: { pass, id },
})
.then((res) => {
if (res?.code == 0) {
this.$message.success("审批提交成功!");
this.back();
}
});
})
.catch(() => 0);
},
handleRelieve(pass) {
let { id } = this.detail,
msg =
pass == 0
? `是否继续监测对象`
: `是否${isNaN(pass) ? "(申请)" : ""}解除监测对象`;
this.$confirm(msg)
.then(() => {
this.instance
.post("/app/apppreventionreturntopoverty/relieve", null, {
params: { pass, id },
})
.then((res) => {
if (res?.code == 0) {
this.$message.success("审批提交成功!");
this.back();
}
});
})
.catch(() => 0);
}, },
}, },
created() { created() {