|
@@ -91,7 +91,7 @@
|
|
|
|
|
|
<Panel class="process-panel" position="top-right">
|
|
|
<div class="layout-panel">
|
|
|
- <button title="蛇形排列" @click="layoutGraph('TB')">
|
|
|
+ <button title="蛇形排列" @click="convertToSnakeLayout">
|
|
|
<PannelIcon name="liucheng" />
|
|
|
</button>
|
|
|
<button title="撤回" @click="goBack">
|
|
@@ -278,6 +278,7 @@ import { ElMessage } from "element-plus";
|
|
|
import { useScreenshot } from "./screenshot.ts";
|
|
|
import { useLayout } from "@/hooks/useLayout";
|
|
|
import { initialEdges, initialNodes } from "./initial-elements";
|
|
|
+import { useSnakeLayoutHook } from "@/hooks/vueflowHooks";
|
|
|
defineOptions({
|
|
|
name: "bindProcess/:id/:prodtCode",
|
|
|
});
|
|
@@ -607,6 +608,10 @@ async function layoutGraph(direction) {
|
|
|
fitView();
|
|
|
});
|
|
|
}
|
|
|
+// 转换为蛇形布局
|
|
|
+const convertToSnakeLayout = () => {
|
|
|
+ nodes.value = useSnakeLayoutHook(nodes.value);
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|