Przeglądaj źródła

delete childNode

肖阳 4 lat temu
rodzic
commit
ce4e2dc6a2
1 zmienionych plików z 7 dodań i 3 usunięć
  1. 7 3
      src/components/DrawFlow/src/DrawFlow.vue

+ 7 - 3
src/components/DrawFlow/src/DrawFlow.vue

@@ -14,7 +14,7 @@ import {
   ConditionNode,
   ConditionNode,
   CopyNode
   CopyNode
 } from "./components/NodeConfigFactory/NodeFactory";
 } from "./components/NodeConfigFactory/NodeFactory";
-import { deepClone } from "@/common/utils";
+// import { deepClone } from "@/common/utils";
 import FlowFactory from "./components/factory";
 import FlowFactory from "./components/factory";
 import { HashCode, transToTreeDat } from "./utils";
 import { HashCode, transToTreeDat } from "./utils";
 import FlowNode from "@/components/DrawFlow/src/components/DrawRow/FlowNode";
 import FlowNode from "@/components/DrawFlow/src/components/DrawRow/FlowNode";
@@ -89,14 +89,18 @@ export default {
     getResData() {
     getResData() {
       let list = JSON.parse(JSON.stringify(this.selfConfig));
       let list = JSON.parse(JSON.stringify(this.selfConfig));
       this.transformTree(list);
       this.transformTree(list);
-      console.log(list, "list");
+      list.forEach(i => {
+        if (i.isRow) {
+          delete i.childNode;
+        }
+      });
       return list;
       return list;
     },
     },
     /**
     /**
      * 初始化 数据私有化
      * 初始化 数据私有化
      */
      */
     init() {
     init() {
-      this.selfConfig = deepClone(this.FlowConfig);
+      this.selfConfig = JSON.parse(JSON.stringify(this.FlowConfig));
     },
     },
     /**
     /**
      *  @param data  源数组一维数组
      *  @param data  源数组一维数组