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

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

Loading…
Cancel
Save