feat(workbench): 接入签署投递与产物管理
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { computed, nextTick, ref, watch } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
import { isSigningMockEnabled } from '@/api/workbench/signing'
|
||||
import type { SigningTaskRecord, SigningTemplate } from '@/api/workbench/types'
|
||||
import { useSigningTaskForm } from '@/composables/useSigningTaskForm'
|
||||
import { useAppStore } from '@/stores/app'
|
||||
@@ -41,6 +42,7 @@ const {
|
||||
selectedTemplateId,
|
||||
selectedVisit,
|
||||
selectedVisitId,
|
||||
smsDestination,
|
||||
submit: submitForm,
|
||||
submitting,
|
||||
visits,
|
||||
@@ -58,7 +60,9 @@ async function submitTask(keepOpen: boolean) {
|
||||
}
|
||||
|
||||
emit('created', task)
|
||||
ElMessage.success(`已创建 1 个签署任务${task.method === 'sms' ? ',已生成短信投递意图' : ''}`)
|
||||
const smsMessage =
|
||||
task.method === 'sms' ? (isSigningMockEnabled ? ',已生成短信投递意图' : ',短信已发送') : ''
|
||||
ElMessage.success(`已创建 1 个签署任务${smsMessage}`)
|
||||
|
||||
if (keepOpen) {
|
||||
resetForNextTask()
|
||||
@@ -285,7 +289,25 @@ watch(
|
||||
<strong>短信将发送至</strong>
|
||||
<span>{{ patient ? maskPhone(patient.phone) : '定位患者后显示' }}</span>
|
||||
</div>
|
||||
<p>使用患者权威记录中的手机号,具体投递结果以服务端返回为准。</p>
|
||||
<template v-if="isSigningMockEnabled">
|
||||
<p>使用患者权威记录中的手机号,具体投递结果以服务端返回为准。</p>
|
||||
</template>
|
||||
<template v-else>
|
||||
<label class="sms-destination-field">
|
||||
<span>真实投递手机号</span>
|
||||
<input
|
||||
v-model="smsDestination"
|
||||
inputmode="tel"
|
||||
autocomplete="tel"
|
||||
placeholder="请输入完整手机号或 E.164 地址"
|
||||
@input="errors.sms = ''"
|
||||
/>
|
||||
</label>
|
||||
<p>
|
||||
患者接口仅返回脱敏手机号,真实联调时由当前操作人员确认投递地址;服务端不会回显完整号码。
|
||||
</p>
|
||||
<p v-if="errors.sms" class="field-error">{{ errors.sms }}</p>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -826,6 +848,42 @@ watch(
|
||||
font-size: 11.5px;
|
||||
}
|
||||
|
||||
.sms-destination-field {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
padding-left: 28px;
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.sms-destination-field span {
|
||||
flex-shrink: 0;
|
||||
color: var(--brand-d);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sms-destination-field input {
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
padding: 6px 9px;
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
font-size: 12px;
|
||||
background: #fff;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.sms-destination-field input:focus {
|
||||
outline: none;
|
||||
border-color: var(--brand);
|
||||
}
|
||||
|
||||
.sms-confirm .field-error {
|
||||
padding-left: 28px;
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
@@ -894,5 +952,14 @@ watch(
|
||||
.dialog-footer > span:first-child {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.sms-destination-field {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sms-destination-field input {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user