zengyicheng 2 anni fa
parent
commit
c8ff08ea8d
1 ha cambiato i file con 15 aggiunte e 8 eliminazioni
  1. 15 8
      src/components/pages/evaluation.vue

+ 15 - 8
src/components/pages/evaluation.vue

@@ -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) != "{}") {