批量删除未选择删除的项目更改提示

master
e 3 years ago
parent 7b8e481911
commit eb26e5293c
  1. 77
      src/views/Home.vue

@ -179,40 +179,49 @@ export default {
lcIdList.push(this.multipleSelection[i].lcId) lcIdList.push(this.multipleSelection[i].lcId)
nameList.push(this.multipleSelection[i].name) nameList.push(this.multipleSelection[i].name)
} }
this.$confirm(`此操作将永久删除【${nameList}】判分点, 是否继续?`, "提示", { if (nameList.length > 0){
confirmButtonText: "确定", this.$confirm(`此操作将永久删除【${nameList}】判分点, 是否继续?`, "提示", {
cancelButtonText: "取消", confirmButtonText: "确定",
type: "warning", cancelButtonText: "取消",
center: true type: "warning",
}).then(() => { center: true
if (this.systemId == 11) { }).then(() => {
// if (this.systemId == 11) {
this.$post(`${this.api.deleteJudgmentPoint}?ids=${lcIdList}`).then(res => { //
if (res.status === 200) { this.$post(`${this.api.deleteJudgmentPoint}?ids=${lcIdList}`).then(res => {
this.$message.success("删除成功"); if (res.status === 200) {
this.initData(); this.$message.success("删除成功");
} else { this.initData();
this.$message.error(res.message); } else {
} this.$message.error(res.message);
}).catch(err => { }
console.log(err); }).catch(err => {
}); console.log(err);
} else { });
// } else {
this.$post(`${this.api.bcDeleteJudgmentPoint}?ids=${bcIdList}`).then(res => { //
if (res.status === 200) { this.$post(`${this.api.bcDeleteJudgmentPoint}?ids=${bcIdList}`).then(res => {
this.$message.success("删除成功"); if (res.status === 200) {
this.initData(); this.$message.success("删除成功");
} else { this.initData();
this.$message.error(res.message); } else {
} this.$message.error(res.message);
}).catch(err => { }
console.log(err); }).catch(err => {
}); console.log(err);
} });
}).catch(() => { }
this.$message.info("已取消删除"); }).catch(() => {
}); this.$message.info("已取消删除");
});
}else{
this.$alert('请选择需要删除的判分点', '提示', {
confirmButtonText: '好的',
callback: action => {
}
});
}
}, },
getProgrammingClassData(params) { // getProgrammingClassData(params) { //
this.$post(this.api.getBcJudgmentPoint, params).then(res => { this.$post(this.api.getBcJudgmentPoint, params).then(res => {

Loading…
Cancel
Save