diff --git a/src/views/flow/config.js b/src/views/flow/config.js index 9ae6e6c..eef8b4d 100644 --- a/src/views/flow/config.js +++ b/src/views/flow/config.js @@ -12,6 +12,10 @@ import startSvg from './icon/start.svg' import endSvg from './icon/end.svg' import microphoneSvg from './icon/microphone.svg' import sleepSvg from './icon/sleep.svg' +import planSvg from './icon/plan.svg' +import awakenSvg from './icon/awaken.svg' +import dialogueSvg from './icon/dialogue.svg' +import audioSvg from './icon/audio.svg' import { v4 as randomUUID } from 'uuid' @@ -106,7 +110,7 @@ export const collapseList = [ { name: "deviceId", type: "input", input: "", componentType: 'select', selectOptions: deviceOptions(), disabled: true } ], outputType: 'img', - outputParams: [{ name: 'imageUrl', type: 'array', desc: '图片地址数组', disabled: true}] + outputParams: [{ name: 'imageUrl', type: 'array', desc: '图片地址数组', children: [], disabled: true }] }, { icon: cameraSvg, @@ -145,7 +149,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', children: [], desc: '视频播放地址数组'}] } ], }, @@ -242,7 +246,7 @@ export const collapseList = [ outputType: 'json' }, { - icon: microphoneSvg, + icon: audioSvg, name: "播放音频", type: "serviceNode", desc: "用于播放音频的节点", @@ -269,7 +273,7 @@ export const collapseList = [ { name: "vehType", type: "input", input: "su7", disabled: true }, ], outputType: 'json', - outputParams: [{ name: 'coordinates', type: 'Object', desc: '坐标对象'}] + outputParams: [{ name: 'coordinates', type: 'Object', children: [], desc: '坐标对象'}] }, ], }, @@ -277,17 +281,60 @@ export const collapseList = [ collapseTitle: "语音交互", nodeList: [ { - icon: microphoneSvg, + icon: planSvg, + name: "方案处理", + type: "serviceNode", + desc: "语音交互-方案处理", + action: 'VI_SCHEME', + nodeParams: [{ name: 'schemeId', type: "input", input: "", disabled: true }], + outputType: 'json', + outputParams: [ + { name: 'wakeCorpus', type: 'object', desc: '唤醒语料', children: [], disabled: true}, + { name: 'testCorpus', type: 'array', desc: '测试语料数组', children: [], disabled: true} + ] + }, + { + icon: awakenSvg, name: "唤醒语料", type: "serviceNode", desc: "唤醒语料处理", - action: 'VI_WAKE_CORPUS', - nodeParams: [ - { name: "", type: "input", input: ""} - ], + action: 'VI_CORPUS_WAKE', outputType: 'json', - outputParams: [{ name: 'coordinates', type: 'Object', desc: '坐标对象'}] + nodeParams: [{ name: 'wakeCorpus', type: "input", input: "", disabled: true }], + outputParams: [{ name: 'audioPath', type: 'string', desc: '语音路径', disabled: true}] }, + { + icon: dialogueSvg, + name: "单次对话语料", + type: "serviceNode", + desc: "测试语料-单次对话语料处理", + action: 'VI_CORPUS_WAKE', + outputType: 'json', + nodeParams: [{ name: 'testCorpus', type: "input", input: "", disabled: true }], + outputParams: [{ name: 'audioPath', type: 'string', desc: '语音路径', disabled: true}] + }, + { + icon: dialogueSvg, + name: "连续对话语料", + type: "serviceNode", + desc: "测试语料-连续对话语料处理", + action: 'VI_CORPUS_CONTINUOUS', + outputType: 'json', + nodeParams: [{ name: 'testCorpus', type: "input", input: "", disabled: true }], + outputParams: [{ name: 'audioPath', type: 'string', desc: '语音路径', disabled: true}] + }, + { + icon: audioSvg, + name: "播放语料", + type: "serviceNode", + desc: "用于播放语料的节点", + action: 'VI_PLAY_CORPUS', + outputType: 'json', + nodeParams: [ + { name: 'audioPath', type: "input", input: "", disabled: true }, + { name: 'deviceId', type: "input", input: "", disabled: true }, + ], + } ], }, ] diff --git a/src/views/flow/icon/audio.svg b/src/views/flow/icon/audio.svg new file mode 100644 index 0000000..e71eb39 --- /dev/null +++ b/src/views/flow/icon/audio.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/flow/icon/awaken.svg b/src/views/flow/icon/awaken.svg new file mode 100644 index 0000000..26b7a98 --- /dev/null +++ b/src/views/flow/icon/awaken.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/flow/icon/dialogue.svg b/src/views/flow/icon/dialogue.svg new file mode 100644 index 0000000..e3481ff --- /dev/null +++ b/src/views/flow/icon/dialogue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/flow/icon/plan.svg b/src/views/flow/icon/plan.svg new file mode 100644 index 0000000..d166240 --- /dev/null +++ b/src/views/flow/icon/plan.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/flow/nodes/common/FormItemRecursive.vue b/src/views/flow/nodes/common/FormItemRecursive.vue index a070dc0..08db478 100644 --- a/src/views/flow/nodes/common/FormItemRecursive.vue +++ b/src/views/flow/nodes/common/FormItemRecursive.vue @@ -11,7 +11,7 @@ :rules="[{ required: true, message: '请输入', trigger: 'blur' }]" > @@ -47,7 +47,7 @@ :rules="[{ required: true, message: '请输入', trigger: 'blur' }]" > - + [] diff --git a/src/views/flow/nodes/common/serviceNode.vue b/src/views/flow/nodes/common/serviceNode.vue index 4ec2784..84ad000 100644 --- a/src/views/flow/nodes/common/serviceNode.vue +++ b/src/views/flow/nodes/common/serviceNode.vue @@ -131,18 +131,8 @@ :rules="outputRules" ref="outputFormRef" > - { } else { formData.nodeParams[index].input = ""; const option = getInput(props.model.id); - console.log('option', option) if (option) { quoteOptions.value = option; } @@ -203,6 +192,7 @@ const cascaderRefs = ref([]) const outputRules = reactive({}); const cascaderChange = (value, index) => { const selectedOptions = cascaderRefs.value[index].getCheckedNodes(true); + formData.nodeParams[index].quote = value formData.nodeParams[index].quoteType = selectedOptions[0].data.type } @@ -220,10 +210,12 @@ const outputFormRef = ref() const setNodeProperties = async () => { try { const result = await dynamicForm.value.validate(); - console.log(123456) - const test = await outputFormRef.value.validate() - console.log('test', test) - if (result) { + let flag = true + if (outputFormRef.value) { + flag = await outputFormRef.value.validate() + } + + if (result && flag) { const data = toRaw(formData); console.log('data', data) const properties = lf.getProperties(props.model.id); @@ -492,15 +484,15 @@ defineExpose({ align-items: end; .el-input { - --el-input-width: 120px; + --el-input-width: 148px; } .el-select { - --el-select-width: 120px; + --el-select-width: 148px; } .el-cascader { - --el-form-inline-content-width: 120px; + --el-form-inline-content-width: 148px; } } } diff --git a/src/views/flow/nodes/common/startNode.vue b/src/views/flow/nodes/common/startNode.vue index 44b181e..3ef8ee4 100644 --- a/src/views/flow/nodes/common/startNode.vue +++ b/src/views/flow/nodes/common/startNode.vue @@ -1,367 +1,369 @@ - - - - - - - + + + + + + + diff --git a/vite.config.js b/vite.config.js index 5256ed3..9bddf63 100644 --- a/vite.config.js +++ b/vite.config.js @@ -36,7 +36,7 @@ export default defineConfig(({mode, command}) => { //赵 http://10.148.108.58:13080 // dev http://10.148.20.34:13080 // target: command === 'build' ? VITE_API_URL : 'http://10.148.20.34:13080', - target: command === 'build' ? VITE_API_URL : 'http://127.0.0.1:13080', + target: command === 'build' ? VITE_API_URL : 'http://192.168.0.10:13080', changeOrigin: true, rewrite: (p) => p.replace(/^\/dev-api/, '') }