|
|
@@ -16,7 +16,7 @@ import {
|
|
|
} from "./components/NodeConfigFactory/NodeFactory";
|
|
|
import { deepClone } from "@/common/utils";
|
|
|
import FlowFactory from "./components/factory";
|
|
|
-import { HashCode, transToTreeDat, getPidArr } from "./utils";
|
|
|
+import { HashCode, transToTreeDat } from "./utils";
|
|
|
import FlowNode from "@/components/DrawFlow/src/components/DrawRow/FlowNode";
|
|
|
export default {
|
|
|
name: "FactoryDrawFlow",
|
|
|
@@ -46,7 +46,9 @@ export default {
|
|
|
},
|
|
|
isColList: ["3", "5"],
|
|
|
selfConfig: null,
|
|
|
- currentNode: null
|
|
|
+ currentNode: null,
|
|
|
+ //缓存数据
|
|
|
+ cacheData: null
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -76,7 +78,8 @@ export default {
|
|
|
*/
|
|
|
getResData() {
|
|
|
let list = JSON.parse(JSON.stringify(this.selfConfig));
|
|
|
- getPidArr(list);
|
|
|
+ this.transformTree(list);
|
|
|
+ console.log(list, "list");
|
|
|
return list;
|
|
|
},
|
|
|
/**
|
|
|
@@ -174,6 +177,7 @@ export default {
|
|
|
repickConfig.groupId = node.groupId;
|
|
|
repickConfig.id = node.id;
|
|
|
let selfConfig = JSON.parse(JSON.stringify(this.selfConfig));
|
|
|
+ console.log("selfConfigselfConfigselfConfig", selfConfig);
|
|
|
this.selfConfig = this.deleteNode(selfConfig, node);
|
|
|
this.repickDeleteArr(repickConfig);
|
|
|
} else {
|
|
|
@@ -272,8 +276,9 @@ export default {
|
|
|
},
|
|
|
render(h) {
|
|
|
// this.init();
|
|
|
- let FlowConfig = this.selfConfig;
|
|
|
+ let FlowConfig = JSON.parse(JSON.stringify(this.selfConfig));
|
|
|
FlowConfig = this.transformTree(FlowConfig);
|
|
|
+ this.cacheData = FlowConfig;
|
|
|
const root = JSON.parse(JSON.stringify(this.selfConfig[0]));
|
|
|
return (
|
|
|
<div class="design-engine">
|