|
@@ -236,6 +236,7 @@ import { formOption } from "./bindConfig";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
import { useScreenshot } from "./screenshot.ts";
|
|
|
import { useLayout } from "@/hooks/useLayout";
|
|
|
+import { initialEdges, initialNodes } from "./initial-elements";
|
|
|
defineOptions({
|
|
|
name: "bindProcess/:id/:prodtCode",
|
|
|
});
|
|
@@ -548,6 +549,16 @@ watch(
|
|
|
}
|
|
|
);
|
|
|
|
|
|
+const nodes = ref(initialNodes);
|
|
|
+const edges = ref(initialEdges);
|
|
|
+// async function layoutGraph(direction) {
|
|
|
+// nodes.value = layout(nodes.value, edges.value, direction);
|
|
|
+//
|
|
|
+// nextTick(() => {
|
|
|
+// fitView();
|
|
|
+// });
|
|
|
+// }
|
|
|
+
|
|
|
async function layoutGraph(direction) {
|
|
|
flowData.value.nodes.value = layout(
|
|
|
flowData.value.nodes,
|