feat(workbench): 接入工作台首页概览聚合接口

This commit is contained in:
yelan
2026-09-02 13:17:40 +08:00
parent e0e98ec74f
commit e52f203123
13 changed files with 398 additions and 358 deletions
@@ -11,11 +11,22 @@ const emit = defineEmits<{
}>()
function getStatusLabel(item: HomeTodoItem) {
if (item.status === 'overdue') {
return '已超时'
switch (item.status) {
case 'created':
return '待发送'
case 'pending':
return item.method === 'pad' ? '待签署·手写板' : '待签署·短信'
case 'generating':
return '文书生成中'
case 'overdue':
return '已超时'
case 'signed':
return '已签署'
case 'voided':
return '已作废'
case 'failed':
return '处理失败'
}
return item.method === 'pad' ? '待签署·手写板' : '待签署·短信'
}
function getStatusClass(item: HomeTodoItem) {
@@ -23,11 +34,38 @@ function getStatusClass(item: HomeTodoItem) {
return 'todo-status--overdue'
}
return item.method === 'pad' ? 'todo-status--pad' : 'todo-status--sms'
if (item.status === 'pending') {
return item.method === 'pad' ? 'todo-status--pad' : 'todo-status--sms'
}
if (item.status === 'signed') {
return 'todo-status--success'
}
if (item.status === 'failed') {
return 'todo-status--danger'
}
return 'todo-status--muted'
}
function getHint(item: HomeTodoItem) {
return item.status === 'overdue' ? '⚠ 已超时,需重新发起' : '⏳ 等待患者签署'
switch (item.status) {
case 'created':
return '⏳ 等待发送'
case 'pending':
return '⏳ 等待患者签署'
case 'generating':
return '⌛ 正在生成签署文书'
case 'overdue':
return '⚠ 已超时,需重新发起'
case 'signed':
return '✓ 已完成签署'
case 'voided':
return '— 任务已作废'
case 'failed':
return '⚠ 任务处理失败'
}
}
</script>
@@ -170,11 +208,22 @@ function getHint(item: HomeTodoItem) {
background: #f3ecfb;
}
.todo-status--overdue {
.todo-status--overdue,
.todo-status--danger {
color: var(--err);
background: var(--err-l);
}
.todo-status--success {
color: var(--ok);
background: var(--ok-l);
}
.todo-status--muted {
color: var(--mut);
background: #eef3f5;
}
.todo-row--detail {
margin-top: 5px;
color: var(--mut);