feat(签署方式): 扩展为手写板/短信/Pad/公众号四种并集中口径

This commit is contained in:
yelan
2026-09-25 12:09:58 +08:00
parent bd89a4d31a
commit 8ec55e48c9
26 changed files with 1864 additions and 688 deletions
@@ -1,4 +1,6 @@
<script setup lang="ts">
import { readPendingTag } from '@/utils/signing-method'
import type { HomeTodoItem } from '../types'
defineProps<{
@@ -15,7 +17,7 @@ function getStatusLabel(item: HomeTodoItem) {
case 'created':
return '待发送'
case 'pending':
return item.method === 'pad' ? '待签署·手写板' : '待签署·短信'
return readPendingTag(item.method).text
case 'generating':
return '文书生成中'
case 'overdue':
@@ -35,7 +37,8 @@ function getStatusClass(item: HomeTodoItem) {
}
if (item.status === 'pending') {
return item.method === 'pad' ? 'todo-status--pad' : 'todo-status--sms'
// 与签署工作台同口径:待签署徽标按具体方式分色
return `todo-status--${readPendingTag(item.method).className.replace('tg-', '')}`
}
if (item.status === 'signed') {
@@ -203,6 +206,11 @@ function getHint(item: HomeTodoItem) {
background: var(--brand-l);
}
.todo-status--ipad {
color: #2b6cb0;
background: #e8f1fb;
}
.todo-status--sms {
color: #7a4dbb;
background: #f3ecfb;
@@ -1,3 +1,5 @@
import type { SigningMethod } from '@/api/workbench/types'
export type HomeMetricTone = 'brand' | 'success' | 'warning' | 'danger'
export type HomeMetricKey = 'todaySigned' | 'pending' | 'overdue' | 'templates'
@@ -21,7 +23,8 @@ export interface HomeTrendPoint {
export type HomeTodoStatus =
'created' | 'pending' | 'generating' | 'overdue' | 'signed' | 'voided' | 'failed'
export type HomeSigningMethod = 'pad' | 'sms'
/** 与签署任务同一套方式口径,否则新通道的任务映射到首页待办会被 TS 挡下 */
export type HomeSigningMethod = SigningMethod
export interface HomeTodoItem {
id: string