feat(文书管理): 增加版本工作流与版本历史

- 模板状态按后端原始状态展示与筛选,待审核与已驳回分开展示
- 仅已发布模板可发起签署,新增提交审核/审核通过/驳回等动作
- 新增版本历史弹窗,复用统一的模板时间格式化方法
- 演示数据补齐已签署任务的签名图,并提供获取签名 dataURL 的接口
- 修复编辑器插入占位符时未定位光标导致内容落到文首的问题
This commit is contained in:
yelan
2026-09-17 16:44:54 +08:00
parent 81922d774f
commit 97c5182ba4
13 changed files with 982 additions and 64 deletions
+9 -2
View File
@@ -44,7 +44,14 @@ const mockRecords: DocumentRecord[] = [
},
]
function formatDateTime(value: string | null | undefined) {
/**
* 后端时间戳 → 页面展示用的 `YYYY-MM-DD HH:mm`。
*
* 导出给版本历史弹窗复用:版本列表与模板列表是同一批时间字段,
* 各写一份格式化早晚会分叉出两种显示口径。解析不出来时原样返回去壳的字符串,
* 不返回 Invalid Date。
*/
export function formatTemplateDateTime(value: string | null | undefined) {
if (!value) {
return ''
}
@@ -94,7 +101,7 @@ function mapDocument(dto: TemplateResponseDto): DocumentRecord {
status: normalizeDocumentStatus(dto.status),
backendStatus: dto.status ?? undefined,
updatedBy: dto.updatedBy ?? dto.createdBy ?? '—',
updatedAt: formatDateTime(dto.updatedAt ?? dto.createdAt),
updatedAt: formatTemplateDateTime(dto.updatedAt ?? dto.createdAt),
versionId,
departmentId: dto.departmentId,
departmentName: dto.departmentId ? undefined : '全院通用',