feat(workbench): 扩展签署任务管理功能
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
|
||||
import type { SigningTaskRecord } from '@/api/workbench/types'
|
||||
|
||||
const props = defineProps<{
|
||||
task: SigningTaskRecord
|
||||
}>()
|
||||
|
||||
const events = computed(() => {
|
||||
const result = [
|
||||
{
|
||||
time: props.task.updatedAt,
|
||||
text: `张文静发起签署任务(${props.task.method === 'pad' ? '手写板' : '线上短信'})`,
|
||||
},
|
||||
]
|
||||
|
||||
if (props.task.status === 'signing') {
|
||||
result.push({ time: props.task.updatedAt, text: '已打开签名采集,等待患者完成签名' })
|
||||
}
|
||||
|
||||
if (props.task.signedAt) {
|
||||
result.push({
|
||||
time: props.task.signedAt,
|
||||
text: `患者 ${props.task.patientName} 完成签名,系统自动合成并双留存`,
|
||||
})
|
||||
}
|
||||
|
||||
if (props.task.status === 'void') {
|
||||
result.push({
|
||||
time: props.task.updatedAt,
|
||||
text: `任务已作废${props.task.voidReason ? `,原因:${props.task.voidReason}` : ''},全程可审计`,
|
||||
})
|
||||
}
|
||||
|
||||
return result
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="audit-card">
|
||||
<strong>操作留痕</strong>
|
||||
<ol class="audit-list">
|
||||
<li v-for="event in events" :key="`${event.time}-${event.text}`">
|
||||
<time>{{ event.time }}</time>
|
||||
<span>{{ event.text }}</span>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.audit-card {
|
||||
padding: 12px 16px;
|
||||
margin-top: 14px;
|
||||
background: var(--card);
|
||||
border-radius: var(--r);
|
||||
box-shadow: var(--sh);
|
||||
}
|
||||
|
||||
.audit-card > strong {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.audit-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
padding: 0;
|
||||
margin: 6px 0 0;
|
||||
color: var(--mut);
|
||||
font-size: 12px;
|
||||
line-height: 1.65;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.audit-list li {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.audit-list time {
|
||||
flex-shrink: 0;
|
||||
color: var(--mut);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user