fix(work): return approval state cards directly from callbacks

This commit is contained in:
ex_tianzy
2026-11-18 10:00:55 +08:00
parent 7d2a15eaba
commit 61db139c72
11 changed files with 165 additions and 25 deletions
+1
View File
@@ -13,6 +13,7 @@ DELIVERY={None:'尚未接收结果','ready':'已接收结果,等待投递','se
def card_content(task_id,execution,delivery,files=None,connection_lost=False,remote_approvals=False):
execution=execution if execution in EXECUTION else 'unknown'
color='green' if execution=='completed' else 'red' if execution in {'failed','interrupted'} else 'orange' if execution in {'waiting_for_approval','unknown'} else 'blue'
if execution=='cancelled':color='grey'
label=EXECUTION[execution]
if connection_lost and execution not in {'completed','failed','cancelled','interrupted'}:
color='red';label='客户端失联,任务结果待核对'