diff --git a/src/components/cards/WorkflowTaskCard.vue b/src/components/cards/WorkflowTaskCard.vue index 534208ef..876bf32d 100644 --- a/src/components/cards/WorkflowTaskCard.vue +++ b/src/components/cards/WorkflowTaskCard.vue @@ -33,6 +33,11 @@ function handleEdit(item: Workflow) { editDialog.value = true } +// 计算已完成的动作数 +function resolveDoneActions(item: Workflow) { + return item.current_action?.split(',').length || 0 +} + // 编辑完成 function editDone() { editDialog.value = false @@ -117,8 +122,8 @@ const resolveStatusVariant = (status: string | undefined) => { if (status === 'S') return { color: 'success', text: '成功' } else if (status === 'R') return { color: 'primary', text: '运行中' } else if (status === 'F') return { color: 'error', text: '失败' } - else if (status === 'P') return { color: 'warning', text: '暂停' } - else return { color: 'secondary', text: '等待' } + else if (status === 'P') return { color: 'secondary', text: '暂停' } + else return { color: 'info', text: '等待' } } // 计算当前动作占比 @@ -129,39 +134,35 @@ const resolveProgress = (item: Workflow) => {