feat(signing): 接入工作台任务操作与审计
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { SigningTaskRecord } from '@/api/workbench/types'
|
||||
import type { SigningTaskEvent, SigningTaskRecord } from '@/api/workbench/types'
|
||||
|
||||
import SigningDocumentPreview from './SigningDocumentPreview.vue'
|
||||
import TaskAuditTimeline from './TaskAuditTimeline.vue'
|
||||
@@ -8,6 +8,10 @@ import type { SigningTaskAction } from '../types'
|
||||
defineProps<{
|
||||
task: SigningTaskRecord | null
|
||||
loading: boolean
|
||||
auditEvents: SigningTaskEvent[]
|
||||
auditLoading: boolean
|
||||
auditError: boolean
|
||||
allowLocalSigning: boolean
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -27,23 +31,33 @@ const emit = defineEmits<{
|
||||
<span class="task-action-meta">任务 {{ task.id }} · {{ task.patientName }}</span>
|
||||
|
||||
<template v-if="task.status === 'pending' && task.method === 'pad'">
|
||||
<button type="button" class="action-button" @click="emit('action', 'pad-sign')">
|
||||
✍ 手写板签署
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="action-button action-button--ghost"
|
||||
@click="emit('action', 'switch-method')"
|
||||
>
|
||||
转为短信发送
|
||||
</button>
|
||||
<template v-if="allowLocalSigning">
|
||||
<button type="button" class="action-button" @click="emit('action', 'pad-sign')">
|
||||
✍ 手写板签署
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="action-button action-button--ghost"
|
||||
@click="emit('action', 'switch-method')"
|
||||
>
|
||||
转为短信发送
|
||||
</button>
|
||||
</template>
|
||||
<span v-else class="action-hint">手写板设备签署接口待接入</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="task.status === 'pending' && task.method === 'sms'">
|
||||
<button type="button" class="action-button" @click="emit('action', 'online-sign')">
|
||||
<button
|
||||
v-if="allowLocalSigning"
|
||||
type="button"
|
||||
class="action-button"
|
||||
@click="emit('action', 'online-sign')"
|
||||
>
|
||||
📱 查看线上签署
|
||||
</button>
|
||||
<span v-else class="action-hint">线上签署页面接口待接入</span>
|
||||
<button
|
||||
v-if="allowLocalSigning"
|
||||
type="button"
|
||||
class="action-button action-button--ghost"
|
||||
@click="emit('action', 'switch-method')"
|
||||
@@ -59,7 +73,7 @@ const emit = defineEmits<{
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<template v-else-if="task.status === 'expired'">
|
||||
<template v-else-if="task.status === 'expired' || task.status === 'failed'">
|
||||
<button type="button" class="action-button" @click="emit('action', 'reopen')">
|
||||
↻ 重新发起
|
||||
</button>
|
||||
@@ -90,7 +104,12 @@ const emit = defineEmits<{
|
||||
</template>
|
||||
|
||||
<button
|
||||
v-if="task.status === 'pending' || task.status === 'expired' || task.status === 'signing'"
|
||||
v-if="
|
||||
task.status === 'pending' ||
|
||||
task.status === 'expired' ||
|
||||
task.status === 'signing' ||
|
||||
task.status === 'failed'
|
||||
"
|
||||
type="button"
|
||||
class="action-button action-button--danger"
|
||||
@click="emit('action', 'void')"
|
||||
@@ -100,7 +119,7 @@ const emit = defineEmits<{
|
||||
</div>
|
||||
|
||||
<SigningDocumentPreview :task="task" />
|
||||
<TaskAuditTimeline :task="task" />
|
||||
<TaskAuditTimeline :events="auditEvents" :loading="auditLoading" :error="auditError" />
|
||||
</template>
|
||||
|
||||
<div v-else class="detail-empty">
|
||||
@@ -131,6 +150,15 @@ const emit = defineEmits<{
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.action-hint {
|
||||
padding: 8px 12px;
|
||||
color: var(--mut);
|
||||
font-size: 12px;
|
||||
background: #f7fafb;
|
||||
border: 1px dashed var(--line);
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.action-button {
|
||||
flex-shrink: 0;
|
||||
padding: 8px 16px;
|
||||
|
||||
Reference in New Issue
Block a user