From e50e09bcaf9dfded839a300924bbece401bee15b Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 22 Jul 2026 13:56:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=B7=A5=E8=89=BA=E8=B7=AF=E7=BA=BF?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8F=AF=E8=A7=86=E5=8C=96=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8scFlowEditor(Vue=20Flow+dagre?= =?UTF-8?q?=E5=BC=82=E6=AD=A5=E5=88=86=E5=8C=85);=20=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=B7=A5=E8=89=BA=E6=8A=BD=E5=B1=89=E5=8E=8B=E7=BC=A9=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E7=95=99=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- package.json | 4 + src/api/model/mtm.js | 6 + src/components/scFlowEditor.vue | 749 +++++++++++++++++++++++++++++++ src/views/mtm/routepack_form.vue | 45 +- 4 files changed, 783 insertions(+), 21 deletions(-) create mode 100644 src/components/scFlowEditor.vue diff --git a/package.json b/package.json index dada463e..bbb6e66b 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,9 @@ "@element-plus/icons-vue": "^2.3.2", "@kjgl77/datav-vue3": "^1.7.1", "@tinymce/tinymce-vue": "5.0.0", + "@vue-flow/background": "^1.3.2", + "@vue-flow/controls": "^1.1.3", + "@vue-flow/core": "^1.48.2", "animate.css": "^4.1.1", "axios": "^1.18.1", "babylonjs": "^6.46.0", @@ -24,6 +27,7 @@ "crypto-browserify": "^3.12.0", "crypto-js": "^4.2.0", "d3": "^7.6.1", + "dagre": "^0.8.5", "dagre-d3": "^0.6.4", "dhtmlx-gantt": "^8.0.6", "echarts": "^5.5.1", diff --git a/src/api/model/mtm.js b/src/api/model/mtm.js index 9cabf4f2..376aa841 100644 --- a/src/api/model/mtm.js +++ b/src/api/model/mtm.js @@ -516,6 +516,12 @@ export default { return await http.get(`${config.API_URL}/mtm/routepack/${id}/final_materials/`); }, }, + validate: { + name: "校验工艺图", + req: async function (id) { + return await http.get(`${config.API_URL}/mtm/routepack/${id}/validate/`); + }, + }, update: { name: "更新", req: async function (id, data) { diff --git a/src/components/scFlowEditor.vue b/src/components/scFlowEditor.vue new file mode 100644 index 00000000..668467ef --- /dev/null +++ b/src/components/scFlowEditor.vue @@ -0,0 +1,749 @@ + + + + + + diff --git a/src/views/mtm/routepack_form.vue b/src/views/mtm/routepack_form.vue index ffce585a..8c9d9936 100644 --- a/src/views/mtm/routepack_form.vue +++ b/src/views/mtm/routepack_form.vue @@ -7,7 +7,7 @@ @closed="$emit('closed')" > - + - -
工艺路线流程图
- - + + - + - -
+ +
- + - + 上一步 @@ -194,11 +191,14 @@