From 4421bc05f6e411326b8ecd8cb9cb44aa7be750a0 Mon Sep 17 00:00:00 2001 From: li-shengren-123456 Date: Wed, 26 Mar 2025 15:08:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=83=A8=E5=88=86=E6=A3=80?= =?UTF-8?q?=E8=A7=86=E6=84=8F=E8=A7=81=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/theme.scss | 9 +- .../dialoguePanel/DialoguePanel.vue | 2 +- src/views/createapp/components/appConfig.vue | 443 +++++++++--------- src/views/createapp/components/workFlow.vue | 41 +- .../components/workFlowConfig/CustomNode.vue | 36 +- .../workFlowConfig/CustomSaENode.vue | 20 + .../workFlowConfig/workFlowDialog.vue | 1 - src/views/styles/createApp.scss | 56 ++- src/views/styles/workFlowArrange.scss | 37 +- 9 files changed, 399 insertions(+), 246 deletions(-) diff --git a/src/assets/styles/theme.scss b/src/assets/styles/theme.scss index df71b8c6..16898472 100644 --- a/src/assets/styles/theme.scss +++ b/src/assets/styles/theme.scss @@ -104,7 +104,7 @@ body[theme='light'] { --flow-nodeBox-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.1); // 工作流节点背景色 --flow-bg-color: #fdfeff; - --o-bash-box-shadow: 0 4px 16px 0 rgba(42, 47, 55, 0.1); + --o-bash-box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.1); // 工作流开始节点结束背景渐变色 --flow-startEnd-bg: linear-gradient( rgba(133, 148, 253, 0.3), @@ -168,11 +168,12 @@ body[theme='light'] { body { // 这里替换下拉框的选中颜色,无论亮暗都是一致 - .el-select-dropdown__item.is-hovering { - background-color: #7aa5ff !important; - } .el-select-dropdown__item.is-selected { background-color: #6395fd !important; font-weight: normal !important; } + // 悬浮优先级高于选中 + .el-select-dropdown__item:hover { + background-color: #7aa5ff !important; + } } diff --git a/src/components/dialoguePanel/DialoguePanel.vue b/src/components/dialoguePanel/DialoguePanel.vue index 5cdd4e6e..8b2cc4fe 100644 --- a/src/components/dialoguePanel/DialoguePanel.vue +++ b/src/components/dialoguePanel/DialoguePanel.vue @@ -1325,7 +1325,7 @@ const searchAppName = (appId) => { } } &:last-child { - border-bottom: 1px solid transparent; + border-bottom: 1px solid transparent !important; } } .el-collapse-item__content { diff --git a/src/views/createapp/components/appConfig.vue b/src/views/createapp/components/appConfig.vue index 0b9f5390..79c679aa 100644 --- a/src/views/createapp/components/appConfig.vue +++ b/src/views/createapp/components/appConfig.vue @@ -104,6 +104,20 @@ const modeOptions = reactive([ const handleChange = (val: number[]) => { activeNames.value = val; }; + +// 这里是将基本信息展开收起单独提出来,避免滚动条超出右方卡片上方 +const changeActiveName = () => { + const idx = activeNames.value.indexOf(1); + if (idx > -1) { + // 如果基本信息collapse存在【展开状态】则删除【收起】 + activeNames.value.splice(idx, 1); + activeName.value.splice(idx, 1); + } else { + // 否则添加【展开】 + activeNames.value.push(1); + activeName.value.push(1); + } +} const addLink = () => { createAppForm.value.links.push(''); }; @@ -279,237 +293,246 @@ defineExpose({ @@ -787,11 +818,11 @@ defineExpose({ diff --git a/src/views/createapp/components/workFlowConfig/CustomNode.vue b/src/views/createapp/components/workFlowConfig/CustomNode.vue index 644143c5..4441c732 100644 --- a/src/views/createapp/components/workFlowConfig/CustomNode.vue +++ b/src/views/createapp/components/workFlowConfig/CustomNode.vue @@ -25,7 +25,7 @@ const props = defineProps({ required: false, }, }); -const emits = defineEmits(['delNode', 'editYamlDrawer']); +const emits = defineEmits(['delNode', 'editYamlDrawer', 'updateConnectHandle']); const statusList = ref(['running', 'success', 'error']); @@ -35,6 +35,10 @@ const curStatus = ref(''); // 当前节点运行耗时 const costTime = ref(''); +// 当前handle是否连接中[分别是target和source] +const handleTargetConnecting = ref(false); +const handleSourceConnecting = ref(false); + // 定义传给mirror展示输入输出的存储量 const inputAndOutput = ref({ input_parameters: {}, @@ -64,6 +68,8 @@ watch( inputAndOutput.value.output_parameters = props.data?.parameters?.output_parameters || {}; } + handleTargetConnecting.value = false; + handleSourceConnecting.value = false; }, { deep: true, immediate: true }, ); @@ -77,11 +83,27 @@ const delNode = (id) => { const editYaml = (nodeName, nodeDesc, yamlCode) => { emits('editYamlDrawer', nodeName, nodeDesc, yamlCode, props.id); }; + +// 设置当前正在连接[这里是使连接过程中,handle节点高亮] +const setConnectStatus = (type) => { + if (type === 'source') { + handleSourceConnecting.value = true; + } else { + handleTargetConnecting.value = true; + } + // 更新当前节点handle连接状态 + emits('updateConnectHandle', props.id); +};