jinx hai 5 meses
pai
achega
6eb92f3982
Modificáronse 1 ficheiros con 19 adicións e 8 borrados
  1. 19 8
      packages/qjkankan-editor/src/components/dragTree/index.vue

+ 19 - 8
packages/qjkankan-editor/src/components/dragTree/index.vue

@@ -192,7 +192,6 @@ export default {
                 }
               }
             }
-
           });
         }
       },
@@ -277,7 +276,6 @@ export default {
       console.log("节点展开", data);
       // 当节点展开时,将其id添加到数组中
       this.expandedNodes.push(data.id);
- 
 
       this.nodesMap = {};
       for (let key in this.$refs.sceneTree.store.nodesMap) {
@@ -496,6 +494,8 @@ export default {
         this.inputData.name = this.$i18n.t("navigation.default_group_two");
       } else if (this.inputData.name == "一级分组") {
         this.inputData.name = this.$i18n.t("navigation.group_one");
+      } else if (this.inputData.name == "二级分组") {
+        this.inputData.name = this.$i18n.t("navigation.group_two");
       } else {
         // this.inputData .name = data.name;
       }
@@ -517,7 +517,19 @@ export default {
         this.reNameId = null;
         return;
       }
-      data.name = this.inputData.name;
+      let name = "";
+      if (this.inputData.name == this.$i18n.t("navigation.default_group_two")) {
+        name = "默认二级分组";
+      } else if (this.inputData.name == this.$i18n.t("navigation.group_one")) {
+        this.inputData.name = this.$i18n.t("navigation.group_one");
+        name = "一级分组";
+      } else if (this.inputData.name == this.$i18n.t("navigation.group_two")) {
+        this.inputData.name = this.$i18n.t("navigation.group_two");
+        name = "二级分组";
+      } else {
+        name = this.inputData.name;
+      }
+      data.name = name;
       this.reNameId = null;
       // this.isRenaming = false;
       // if (!this.inputData.name.trim()) {
@@ -548,7 +560,6 @@ export default {
         return;
       }
 
-
       if (this.info.navigationTrees.length == 1 && node.level == 1) {
         this.$alert({
           content: this.$i18n.t("navigation.keep_one_group"),
@@ -644,7 +655,7 @@ export default {
       let group = {
         id: "add_" + roundId,
         sid: "sid_" + getRandomSid(), //用于修改导航之后的标识
-        name: data ? this.$i18n.t("navigation.group_two") : this.$i18n.t("navigation.group_one"),
+        name: data ? "二级分组" : "一级分组",
         type: "group",
         level: data ? 1 : 0,
         children: [],
@@ -692,7 +703,7 @@ export default {
                 id: "add_" + (this.getRoundId() + 1),
                 sid: "sid_" + getRandomSid(), //用于修改导航之后的标识
                 sort: 0,
-                name: this.$i18n.t("navigation.default_group_two"),
+                name: "默认二级分组",
                 type: "group",
                 children: panoList,
               };
@@ -708,7 +719,7 @@ export default {
                 id: "add_" + (this.getRoundId() + 1),
                 sid: "sid_" + getRandomSid(), //用于修改导航之后的标识
                 sort: 0,
-                name: this.$i18n.t("navigation.default_group_two"),
+                name: "默认二级分组",
                 type: "group",
                 children: [],
               };
@@ -738,7 +749,7 @@ export default {
                 id: "add_" + (this.getRoundId() + 1),
                 sid: "sid_" + getRandomSid(), //用于修改导航之后的标识
                 sort: 0,
-                name: this.$i18n.t("navigation.default_group_two"),
+                name: "默认二级分组",
                 type: "group",
                 children: panoList,
               };