江河水功能区删除bug修改
This commit is contained in:
@@ -102,6 +102,11 @@
|
||||
updateWaterFunctionAreaBill,
|
||||
verifyWaterFunctionAreaBill
|
||||
} from "@/api/ecology/water-function-area";
|
||||
import {
|
||||
removeRiverStationBill,
|
||||
removeBatchRiverStationBill,
|
||||
verifyRiverStationBill
|
||||
} from "@/api/ecology/river-station";
|
||||
import moment from "moment";
|
||||
export default {
|
||||
name: 'DrinkingCollectWaterBill',
|
||||
@@ -244,27 +249,52 @@
|
||||
},
|
||||
verify(record,checked) {
|
||||
const hide = this.$message.loading('请求中..', 0);
|
||||
verifyWaterFunctionAreaBill({
|
||||
nationalLevelWaterFunctionAreaBillId: record.nationalLevelWaterFunctionAreaBillId,
|
||||
checked
|
||||
}).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
record.checked = checked
|
||||
Modal.success({
|
||||
title: "提示",
|
||||
content: checked?"审核成功":"撤回成功"
|
||||
});
|
||||
} else {
|
||||
Modal.error({
|
||||
title: "提示",
|
||||
content: res.data.msg
|
||||
});
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.$message.error(e.message);
|
||||
}).finally(() => {
|
||||
hide();
|
||||
})
|
||||
if(record.regionLevel == "1"){
|
||||
verifyWaterFunctionAreaBill({
|
||||
nationalLevelWaterFunctionAreaBillId: record.nationalLevelWaterFunctionAreaBillId,
|
||||
checked
|
||||
}).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
record.checked = checked
|
||||
Modal.success({
|
||||
title: "提示",
|
||||
content: checked?"审核成功":"撤回成功"
|
||||
});
|
||||
} else {
|
||||
Modal.error({
|
||||
title: "提示",
|
||||
content: res.data.msg
|
||||
});
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.$message.error(e.message);
|
||||
}).finally(() => {
|
||||
hide();
|
||||
})
|
||||
}else{
|
||||
verifyRiverStationBill({
|
||||
nationalLevelWaterFunctionAreaBillId: record.nationalLevelWaterFunctionAreaBillId,
|
||||
checked
|
||||
}).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
record.checked = checked
|
||||
Modal.success({
|
||||
title: "提示",
|
||||
content: checked?"审核成功":"撤回成功"
|
||||
});
|
||||
} else {
|
||||
Modal.error({
|
||||
title: "提示",
|
||||
content: res.data.msg
|
||||
});
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.$message.error(e.message);
|
||||
}).finally(() => {
|
||||
hide();
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
save(record) {
|
||||
|
||||
@@ -304,6 +334,7 @@
|
||||
/* 删除单个 */
|
||||
remove(row) {
|
||||
const hide = this.$message.loading('请求中..', 0);
|
||||
if(row.regionLevel == "1"){ //国家级
|
||||
removeWaterFunctionAreaBill(row.nationalLevelWaterFunctionAreaBillId).then(res => {
|
||||
if (res.data.code === 0) {
|
||||
this.$message.success(res.data.msg);
|
||||
@@ -314,11 +345,8 @@
|
||||
}).catch(e => {
|
||||
this.$message.error(e.msg);
|
||||
}).finally(() => hide());
|
||||
},
|
||||
removeBatch() {
|
||||
const ids = this.selectionList.map(item => item.nationalLevelWaterFunctionAreaBillId);
|
||||
const hide = this.$message.loading('请求中..', 0);
|
||||
removeBatchWaterFunctionAreaBill(ids).then(res => {
|
||||
}else{
|
||||
removeRiverStationBill(row.nationalLevelWaterFunctionAreaBillId).then(res => {
|
||||
if (res.data.code === 0) {
|
||||
this.$message.success(res.data.msg);
|
||||
this.reload();
|
||||
@@ -326,9 +354,42 @@
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
}).catch(e => {
|
||||
|
||||
this.$message.error(e.msg);
|
||||
}).finally(() => hide());
|
||||
}
|
||||
},
|
||||
removeBatch() {
|
||||
const hide = this.$message.loading('请求中..', 0);
|
||||
const functionIds = [];
|
||||
const waterIds = [];
|
||||
this.selectionList.map(item => {
|
||||
if (item.regionLevel == "1"){
|
||||
functionIds.push(item.nationalLevelWaterFunctionAreaBillId);
|
||||
}else{
|
||||
waterIds.push(item.nationalLevelWaterFunctionAreaBillId);
|
||||
}
|
||||
});
|
||||
removeBatchWaterFunctionAreaBill(functionIds).then(res => {
|
||||
if (res.data.code === 0) {
|
||||
this.$message.success(res.data.msg);
|
||||
this.reload();
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
}).catch(e => {
|
||||
this.$message.error(e.msg);
|
||||
}).finally(() => hide());
|
||||
removeBatchRiverStationBill(waterIds).then(res => {
|
||||
if (res.data.code === 0) {
|
||||
this.$message.success(res.data.msg);
|
||||
this.reload();
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
}).catch(e => {
|
||||
this.$message.error(e.msg);
|
||||
}).finally(() => hide());
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user