From 4f4af08bbed6017b98c1bcc262f8e5251b223ca8 Mon Sep 17 00:00:00 2001 From: zhanghao <774378400@qq.com> Date: Fri, 19 Sep 2025 14:16:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 2 +- src/utils/flow.js | 14 +- src/views/flow/config.js | 23 +- .../flow/nodes/common/FormItemRecursive.vue | 422 ++++---- src/views/flow/nodes/common/serviceNode.vue | 932 ++++++++++-------- src/views/flow/nodes/function/loop.vue | 26 +- src/views/system/dict/index.vue | 743 ++++++++------ src/views/test/detect/index.vue | 26 + src/views/vi/testProject/index.vue | 22 +- src/views/vi/testProject/plan/index.vue | 33 +- 10 files changed, 1254 insertions(+), 989 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 178490d..dbabe71 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -201,7 +201,7 @@ export const dynamicRoutes = [ { path: "index/:id", component: () => import("@/views/vi/testProject/plan/index"), - name: "Data", + name: "Plan", meta: { title: "方案管理", activeMenu: "/vi/testProject" }, }, ], diff --git a/src/utils/flow.js b/src/utils/flow.js index e00c5c1..1df5bab 100644 --- a/src/utils/flow.js +++ b/src/utils/flow.js @@ -22,9 +22,10 @@ export const getInput = (nodeId, isStrict = true) => { const obj = { value: item.id, label: item.properties.name, + type: 'input', children: [] } - const optionData = transformTree(item.properties.inputParams, obj.children) + const optionData = transformTree(item.properties.inputParams, obj.children, 'input') obj.children.push(optionData) arr.push(obj) } @@ -32,9 +33,10 @@ export const getInput = (nodeId, isStrict = true) => { const obj = { value: item.id, label: item.properties.name + '(输入)', + type: 'input', children: [] } - const optionData = transformTree(item.properties.nodeParams, obj.children) + const optionData = transformTree(item.properties.nodeParams, obj.children, 'input') obj.children.push(optionData) arr.push(obj) } @@ -43,9 +45,10 @@ export const getInput = (nodeId, isStrict = true) => { const obj = { value: item.id, label: item.properties.name + '(输出)', + type: 'output', children: [] } - const optionData = transformTree(item.properties.outputParams, obj.children) + const optionData = transformTree(item.properties.outputParams, obj.children, 'output') obj.children.push(optionData) arr.push(obj) } @@ -55,11 +58,12 @@ export const getInput = (nodeId, isStrict = true) => { return flag } -const transformTree = (arr, parent = []) => { +const transformTree = (arr, parent = [], type) => { arr.forEach(item => { const currentNode = { value: item.name, label: item.name, + type, children: [] }; parent.push(currentNode); @@ -67,7 +71,7 @@ const transformTree = (arr, parent = []) => { if (item.children?.length > 0) { transformTree(item.children, currentNode.children); } else { - delete currentNode.children + delete currentNode.children } }); return parent; diff --git a/src/views/flow/config.js b/src/views/flow/config.js index 3026dad..9ae6e6c 100644 --- a/src/views/flow/config.js +++ b/src/views/flow/config.js @@ -106,7 +106,7 @@ export const collapseList = [ { name: "deviceId", type: "input", input: "", componentType: 'select', selectOptions: deviceOptions(), disabled: true } ], outputType: 'img', - outputParams: [{ name: 'imageUrl', type: 'Array', desc: '图片地址数组'}] + outputParams: [{ name: 'imageUrl', type: 'array', desc: '图片地址数组', disabled: true}] }, { icon: cameraSvg, @@ -145,7 +145,7 @@ export const collapseList = [ { name: "deviceId", type: "input", input: "", componentType: 'select', selectOptions: deviceOptions(), disabled: true } ], outputType: 'video', - outputParams: [{ name: 'videoUrl', type: 'Array', desc: '视频播放地址数组'}] + outputParams: [{ name: 'videoUrl', type: 'array', desc: '视频播放地址数组'}] } ], }, @@ -254,7 +254,7 @@ export const collapseList = [ }, ], }, - { + { collapseTitle: "大模型", nodeList: [ { @@ -273,4 +273,21 @@ export const collapseList = [ }, ], }, + { + collapseTitle: "语音交互", + nodeList: [ + { + icon: microphoneSvg, + name: "唤醒语料", + type: "serviceNode", + desc: "唤醒语料处理", + action: 'VI_WAKE_CORPUS', + nodeParams: [ + { name: "", type: "input", input: ""} + ], + outputType: 'json', + outputParams: [{ name: 'coordinates', type: 'Object', desc: '坐标对象'}] + }, + ], + }, ] diff --git a/src/views/flow/nodes/common/FormItemRecursive.vue b/src/views/flow/nodes/common/FormItemRecursive.vue index 2cbf851..a070dc0 100644 --- a/src/views/flow/nodes/common/FormItemRecursive.vue +++ b/src/views/flow/nodes/common/FormItemRecursive.vue @@ -1,212 +1,212 @@ - - - - - - \ No newline at end of file diff --git a/src/views/flow/nodes/common/serviceNode.vue b/src/views/flow/nodes/common/serviceNode.vue index 0f20d95..4ec2784 100644 --- a/src/views/flow/nodes/common/serviceNode.vue +++ b/src/views/flow/nodes/common/serviceNode.vue @@ -1,425 +1,507 @@ - - - - - + + + + + diff --git a/src/views/flow/nodes/function/loop.vue b/src/views/flow/nodes/function/loop.vue index d47a126..9510cf5 100644 --- a/src/views/flow/nodes/function/loop.vue +++ b/src/views/flow/nodes/function/loop.vue @@ -5,14 +5,14 @@
- + - - + + @@ -22,6 +22,18 @@ + + + + + + + + + + + +
@@ -49,7 +61,8 @@ const props = defineProps({ const flowStore = useFlowStore() const formData = reactive({ nodeParams: [ - { name: "loopNum", type: "input", input: null, quote: "" } + { name: "loopNum", type: "input", input: null, quote: "" }, + { name: "loopType", type: "input", input: 'NORMAL', quote: "" }, ] }) @@ -152,6 +165,7 @@ onMounted(() => { .group__container { width: 100%; height: 100%; + min-height: 420px; background: #fff; padding: 12px; cursor: default; @@ -167,7 +181,7 @@ onMounted(() => { } :deep(.loop__container) { - height: 80px; + height: auto; .el-input { width: 92px; @@ -187,7 +201,7 @@ onMounted(() => { } .child__container { - min-height: 80px; + min-height: 100px; flex: 1; background-color: #f6f8fa; border-radius: 8px; diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 8f87966..983764f 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -1,323 +1,420 @@ - - - + + + diff --git a/src/views/test/detect/index.vue b/src/views/test/detect/index.vue index f0722b9..05f9f67 100644 --- a/src/views/test/detect/index.vue +++ b/src/views/test/detect/index.vue @@ -32,6 +32,13 @@ /> + + + + + + + @@ -225,6 +232,11 @@ > + + + + + -
+
- + 配置 + 执行 + + + + + + { router.push('/vi/plan/index/' + row.projectId) } +const handleExecute = (row) => { + console.log('暂未开发') +} + onMounted(() => { getList(); }); diff --git a/src/views/vi/testProject/plan/index.vue b/src/views/vi/testProject/plan/index.vue index 7e9a2a3..618f6c4 100644 --- a/src/views/vi/testProject/plan/index.vue +++ b/src/views/vi/testProject/plan/index.vue @@ -8,14 +8,6 @@ v-show="showSearch" label-width="100px" > - - - + + + 搜索 - - - + + + - + +