refactor: 执行详情显示全局变量
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run

This commit is contained in:
CaptainB 2024-09-11 10:31:45 +08:00 committed by 刘瑞斌
parent 504e900edf
commit 3c461b6a30
2 changed files with 13 additions and 2 deletions

View File

@ -22,6 +22,13 @@ class BaseStartStepNode(IStarNode):
{'time': datetime.now().strftime('%Y-%m-%d %H:%M:%S'), 'start_time': time.time()})
def get_details(self, index: int, **kwargs):
global_fields = []
for field in self.node.properties.get('config')['globalFields']:
global_fields.append({
'label': field['label'],
'key': field['value'],
'value': self.workflow_manage[field['value']]
})
return {
'name': self.node.properties.get('stepName'),
"index": index,
@ -29,5 +36,6 @@ class BaseStartStepNode(IStarNode):
'run_time': self.context.get('run_time'),
'type': self.node.type,
'status': self.status,
'err_message': self.err_message
'err_message': self.err_message,
'global_fields': global_fields
}

View File

@ -39,7 +39,10 @@
<template v-if="item.type === WorkflowType.Start">
<div class="card-never border-r-4">
<h5 class="p-8-12">参数输入</h5>
<div class="p-8-12 border-t-dashed lighter">{{ item.question || '-' }}</div>
<div class="p-8-12 border-t-dashed lighter">
<div>用户问题: {{ item.question || '-' }}</div>
<div v-for="(f, i) in item.global_fields" :key="i">{{f.label}}: {{f.value}}</div>
</div>
</div>
</template>
<!-- 知识库检索 -->