|
@@ -535,27 +535,41 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
rowDel(row) {
|
|
|
- this.$confirm("确定将选择数据删除?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- return losbfeestemplateRemove(row.id);
|
|
|
+ if (row.status === 1) {
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- this.onLoad(this.page);
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!"
|
|
|
+ .then(() => {
|
|
|
+ return losbfeestemplateRemove(row.id);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.onLoad(this.page);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
});
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: '非禁用状态无法删除',
|
|
|
+ type: 'warning'
|
|
|
});
|
|
|
+ }
|
|
|
},
|
|
|
handleDelete() {
|
|
|
if (this.selectionList.length === 0) {
|
|
|
this.$message.warning("请选择至少一条数据");
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
+ for (const selection of this.selectionList) {
|
|
|
+ if (selection.status == 0) {
|
|
|
+ this.$message.warning("选中的数据中有启用数据,启用数据不可删除!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|