Skip to content

Commit ccb43a0

Browse files
fix: An error is displayed in the loop node of the execution details.
1 parent 6a9b591 commit ccb43a0

File tree

4 files changed

+37
-16
lines changed

4 files changed

+37
-16
lines changed

ui/src/components/ai-chat/component/knowledge-source-component/ExecutionDetailCard.vue

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,10 @@
3737
</div>
3838
<el-collapse-transition>
3939
<div class="mt-12" v-if="data['show']">
40-
<template v-if="data.status === 200">
40+
<template v-if="data.status === 200 || data.type == WorkflowType.LoopNode">
4141
<!-- 开始 -->
4242
<template
43-
v-if="
44-
data.type === WorkflowType.Start ||
45-
data.type === WorkflowType.Application ||
46-
data.type === WorkflowType.LoopStartNode
47-
"
43+
v-if="data.type === WorkflowType.Start || data.type === WorkflowType.Application"
4844
>
4945
<div class="card-never border-r-6">
5046
<h5 class="p-8-12">
@@ -827,14 +823,41 @@
827823
</template>
828824
</el-radio-group>
829825
<template
830-
v-for="(cLoop, cIndex) in Object.values(data.loop_node_data[currentLoopNode])"
826+
v-for="(cLoop, cIndex) in Object.values(
827+
data.loop_node_data?.[currentLoopNode] || [],
828+
)"
831829
:key="cIndex"
832830
>
833831
<ExecutionDetailCard :data="cLoop"></ExecutionDetailCard>
834832
</template>
835833
</template>
836834
</div>
837835
</div>
836+
<!-- 循环开始 节点-->
837+
<template v-if="data.type === WorkflowType.LoopStartNode">
838+
<div class="card-never border-r-6">
839+
<h5 class="p-8-12">
840+
{{ $t('common.param.inputParam') }}
841+
</h5>
842+
843+
<div class="p-8-12 border-t-dashed lighter">
844+
<div class="mb-8">
845+
<span class="color-secondary">
846+
{{ $t('views.applicationWorkflow.nodes.loopStartNode.loopItem') }}:</span
847+
>
848+
849+
{{ data.current_item }}
850+
</div>
851+
<div class="mb-8">
852+
<span class="color-secondary">
853+
{{ $t('views.applicationWorkflow.nodes.loopStartNode.loopIndex') }}:</span
854+
>
855+
856+
{{ data.current_index }}
857+
</div>
858+
</div>
859+
</div>
860+
</template>
838861
<slot></slot>
839862
</template>
840863
<template v-else>

ui/src/styles/app.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ h5 {
317317
}
318318

319319
.border-r-6 {
320-
border-radius: var();
320+
border-radius: var(--app-border-radius-small);
321321
}
322322
.border-r-8 {
323323
border-radius: var(--app-border-radius-base);

ui/src/views/application-workflow/component/DropdownMenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div v-show="show" class="workflow-dropdown-menu border border-r-6 white-bg">
2+
<div v-show="show" class="workflow-dropdown-menu border border-r-6 white-bg" :style="{ width: activeName === 'base' ? '400px':'640px' }">
33
<el-tabs v-model="activeName" class="workflow-dropdown-tabs" @tab-change="handleClick">
44
<div
55
v-show="activeName === 'base'"
@@ -39,7 +39,7 @@
3939
<component
4040
:is="iconComponent(`${item.type}-icon`)"
4141
class="mr-8"
42-
:size="32"
42+
:size="20"
4343
/>
4444
<div class="lighter">{{ item.label }}</div>
4545
</div>

ui/src/views/application-workflow/component/NodeContent.vue

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,15 @@
2222
@click.stop="emit('clickNodes', item)"
2323
@mousedown.stop="emit('onmousedown', item)"
2424
>
25-
<!-- <LogoIcon v-if="item.resource_type === 'application'" height="32px" />-->
2625
<el-avatar
2726
v-if="isAppIcon(item?.icon)"
2827
shape="square"
29-
:size="32"
28+
:size="20"
3029
style="background: none"
3130
>
3231
<img :src="resetUrl(item?.icon, resetUrl('./favicon.ico'))" alt="" />
3332
</el-avatar>
34-
<el-avatar v-else class="avatar-green" shape="square" :size="32">
33+
<el-avatar v-else class="avatar-green" shape="square" :size="20">
3534
<img src="@/assets/workflow/icon_tool.svg" style="width: 58%" alt="" />
3635
</el-avatar>
3736
<span class="ml-8 ellipsis" :title="item.name">{{ item.name }}</span>
@@ -41,16 +40,15 @@
4140
<template #default>
4241
<div class="flex-between">
4342
<div class="flex align-center">
44-
<!-- <LogoIcon v-if="item.resource_type === 'application'" height="32px"/>-->
4543
<el-avatar
4644
v-if="isAppIcon(item?.icon)"
4745
shape="square"
48-
:size="32"
46+
:size="20"
4947
style="background: none"
5048
>
5149
<img :src="resetUrl(item?.icon, resetUrl('./favicon.ico'))" alt="" />
5250
</el-avatar>
53-
<el-avatar v-else class="avatar-green" shape="square" :size="32">
51+
<el-avatar v-else class="avatar-green" shape="square" :size="20">
5452
<img src="@/assets/workflow/icon_tool.svg" style="width: 58%" alt="" />
5553
</el-avatar>
5654
<span class="font-medium ml-8 break-all" :title="item.name">{{ item.name }}</span>

0 commit comments

Comments
 (0)