|
@@ -608,18 +608,25 @@ export default {
|
|
|
this.dialogVisible4 = true;
|
|
|
},
|
|
|
deleteF(id) {
|
|
|
- console.log(this.eJson);
|
|
|
if (JSON.stringify(this.eJson[id].child) != "{}") {
|
|
|
this.$message.error("请把所有子集删完才可以删除");
|
|
|
return;
|
|
|
}
|
|
|
- if (this.fid == id) {
|
|
|
- this.fid = "";
|
|
|
- }
|
|
|
- delete this.eJson[id];
|
|
|
- this.eJSONNum++;
|
|
|
- this.$forceUpdate();
|
|
|
- this.setMindData();
|
|
|
+ this.$confirm("是否删除该子级?", "提示", {
|
|
|
+ confirmButtonText: "删除",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ if (this.fid == id) {
|
|
|
+ this.fid = "";
|
|
|
+ }
|
|
|
+ delete this.eJson[id];
|
|
|
+ this.eJSONNum++;
|
|
|
+ this.$forceUpdate();
|
|
|
+ this.setMindData();
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
deleteS(id) {
|
|
|
if (JSON.stringify(this.eJson[this.fid].child[id].child) != "{}") {
|