fix(auth): 完善权限控制与强制改密流程
This commit is contained in:
@@ -27,6 +27,12 @@ defineProps<{
|
||||
artifactsError: boolean
|
||||
padSessionStatus: string | null
|
||||
padSessionLoading: boolean
|
||||
canDeliveryWrite: boolean
|
||||
canReopen: boolean
|
||||
canVoid: boolean
|
||||
canViewAudit: boolean
|
||||
canViewArtifacts: boolean
|
||||
canDownloadArtifact: boolean
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -70,7 +76,7 @@ defineExpose({ getDocumentElement })
|
||||
转为短信发送
|
||||
</button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-else-if="canDeliveryWrite">
|
||||
<button
|
||||
type="button"
|
||||
class="action-button"
|
||||
@@ -105,6 +111,7 @@ defineExpose({ getDocumentElement })
|
||||
转手写板签署
|
||||
</button>
|
||||
<button
|
||||
v-if="canDeliveryWrite"
|
||||
type="button"
|
||||
class="action-button action-button--ghost"
|
||||
@click="emit('action', 'resend-sms')"
|
||||
@@ -113,13 +120,13 @@ defineExpose({ getDocumentElement })
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<template v-else-if="task.status === 'expired'">
|
||||
<template v-else-if="task.status === 'expired' && canReopen">
|
||||
<button type="button" class="action-button" @click="emit('action', 'reopen')">
|
||||
↻ 重新发起
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<template v-else-if="task.status === 'signed'">
|
||||
<template v-else-if="task.status === 'signed' && canDownloadArtifact">
|
||||
<button
|
||||
type="button"
|
||||
class="action-button action-button--ghost"
|
||||
@@ -145,10 +152,11 @@ defineExpose({ getDocumentElement })
|
||||
|
||||
<button
|
||||
v-if="
|
||||
task.status === 'pending' ||
|
||||
task.status === 'expired' ||
|
||||
task.status === 'signing' ||
|
||||
task.status === 'failed'
|
||||
canVoid &&
|
||||
(task.status === 'pending' ||
|
||||
task.status === 'expired' ||
|
||||
task.status === 'signing' ||
|
||||
task.status === 'failed')
|
||||
"
|
||||
type="button"
|
||||
class="action-button action-button--danger"
|
||||
@@ -169,11 +177,18 @@ defineExpose({ getDocumentElement })
|
||||
@field-change="(answers, progress) => emit('fieldChange', answers, progress)"
|
||||
/>
|
||||
<SigningDocumentPreview v-else :task="task" />
|
||||
<TaskAuditTimeline :events="auditEvents" :loading="auditLoading" :error="auditError" />
|
||||
<TaskAuditTimeline
|
||||
v-if="canViewAudit"
|
||||
:events="auditEvents"
|
||||
:loading="auditLoading"
|
||||
:error="auditError"
|
||||
/>
|
||||
<SigningArtifactList
|
||||
v-if="canViewArtifacts"
|
||||
:artifacts="artifacts"
|
||||
:loading="artifactsLoading"
|
||||
:error="artifactsError"
|
||||
:can-download="canDownloadArtifact"
|
||||
@download="emit('downloadArtifact', $event)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user