diff --git a/src/views/app/style.scss b/src/views/app/style.scss index 878576ce4c2a1815ec2bff1846ac61929c1756a4..574b1af6edc4d3786610ef9d0e5bc6268f2cfe26 100644 --- a/src/views/app/style.scss +++ b/src/views/app/style.scss @@ -60,6 +60,7 @@ padding-top: 16px; max-width: 1336px; max-height: calc(100vh - 327px); + min-height: 324px; overflow-y: scroll; .appCenterCardBox { width: fit-content; @@ -157,10 +158,22 @@ } } .appCenterNoData { - width: 480px; - height: 240px; - background-image: var(--no-work-flow); - background-size: contain; + display: flex; + flex-direction: column; + gap: 8px; + align-items: center; + margin-top: 16px; + .noDataIcon { + width: 320px; + height: 130px; + background: var(--no-work-flow) center center no-repeat; + background-size: contain; + } + .desc { + height: 16px; + font-size: 12px; + color: var(--o-text-color-primary); + } } } ::-webkit-scrollbar { diff --git a/src/views/createapp/components/workFlow.vue b/src/views/createapp/components/workFlow.vue index e684e122c07cb258dfe63661611a100760fe7726..ae8ba3fafb7c96b2d63ee531654fa48cd33987b6 100644 --- a/src/views/createapp/components/workFlow.vue +++ b/src/views/createapp/components/workFlow.vue @@ -48,7 +48,7 @@ const workFlowList = ref([]); const props = defineProps(['flowList']); const flowObj = ref({}); const nodes = ref([]); -const debugResult = ref(''); +const debugStatus = ref(''); const debugTime = ref(''); const totalTime = ref(0); const hanleAsideVisible = () => { @@ -269,7 +269,18 @@ const searchApiList = () => { const handleDebugDialogOps = (visible) => { debugDialogVisible.value = visible; // 调试弹窗关闭时---结果清空 - debugResult.value = ''; + debugStatus.value = ''; + // 调试弹窗关闭时---节点状态清空 + getNodes.value.forEach(node => { + updateNode(node.id, {data: {...node.data, status:'default', costTime: ''} }); + }) + // 调试弹窗关闭时---需要将边状态清空 + getEdges.value.forEach(edge => { + console.log(edge, 'ecge') + // 更新节点的起源与终点 + updateEdgeData(edge.id, {targetStatus: 'default'}) + updateEdgeData(edge.id, {sourceStatus: 'default'}) + }) }; const edgesChange = edges => { @@ -425,6 +436,17 @@ $bus.on('getNodesStatue', lines => { try { lines?.forEach(item => { const newLines = yaml.load(item); + // 工作流开始时更新debugResult + if (newLines?.data?.event === 'flow.start'){ + totalTime.value = 0; + debugTime.value = ''; + debugStatus.value = newLines.data.flow?.stepStatus; + } + + // 这里判断是否有调试状态的值,无值不处理 + if (!debugStatus.value) { + return; + } // step.input和step.output对应的节点状态需要修改 if (newLines?.data?.event === 'step.input' || newLines?.data?.event === 'step.output') { // output-节点运行结束时,获取节点运行的耗时 @@ -435,12 +457,8 @@ $bus.on('getNodesStatue', lines => { } updateNodeFunc(newLines.data.flow.stepId, newLines.data.flow?.stepStatus, constTime); } else if (newLines?.data?.event === 'flow.stop') { - debugResult.value = newLines.data.flow?.stepStatus; + debugStatus.value = newLines.data.flow?.stepStatus; debugTime.value = `${totalTime.value.toFixed(3)}s` - } else if (newLines?.data?.event === 'flow.start'){ - totalTime.value = 0; - debugTime.value = ''; - debugResult.value = newLines.data.flow?.stepStatus; } else { // do nothing } @@ -726,10 +744,10 @@ defineExpose({
-
-
-
{{ StatusInfoTitle[debugResult] }}
- {{ debugTime }} +
+
+
{{ StatusInfoTitle[debugStatus] }}
+ {{ debugTime }}
@@ -761,7 +779,11 @@ defineExpose({ >