瀏覽代碼

vueflow转向测试。

jiaxiaoqiang 5 月之前
父節點
當前提交
85be87a62e

+ 2 - 2
.env.development

@@ -10,9 +10,9 @@ VITE_APP_BASE_API = '/dev-api'
 # 上传文件接口地址.
 VITE_APP_UPLOAD_URL = 'http://139.155.176.112:19000'
 # 测试开发接口地址
-#VITE_APP_API_URL = 'http://139.155.176.112:7100'
+VITE_APP_API_URL = 'http://139.155.176.112:7100'
 
-VITE_APP_API_URL = 'http://127.0.0.1:7104'
+#VITE_APP_API_URL = 'http://127.0.0.1:7104'
 
 
 # 是否启用 Mock 服务

+ 11 - 0
src/views/base/craftManagement/route/bindProcess.vue

@@ -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,

File diff suppressed because it is too large
+ 1636 - 0
src/views/base/craftManagement/route/initial-elements.js