feat(signing): 接入患者与任务真实接口

This commit is contained in:
yelan
2026-08-31 16:08:17 +08:00
parent 1bc075d5d6
commit 40b0a5d040
5 changed files with 805 additions and 91 deletions
@@ -32,7 +32,6 @@ const {
method,
patient,
patientId,
patientPhoneRevealed,
resetForNextTask,
resetForm,
selectMethod,
@@ -42,10 +41,8 @@ const {
selectedTemplateId,
selectedVisit,
selectedVisitId,
smsPhone,
submit: submitForm,
submitting,
togglePhone,
visits,
} = useSigningTaskForm({
campus: computed(() => appStore.selectedCampus),
@@ -61,7 +58,7 @@ async function submitTask(keepOpen: boolean) {
}
emit('created', task)
ElMessage.success(`已创建 1 个签署任务${task.method === 'sms' ? ',短信已发送' : ''}`)
ElMessage.success(`已创建 1 个签署任务${task.method === 'sms' ? ',已生成短信投递意图' : ''}`)
if (keepOpen) {
resetForNextTask()
@@ -141,10 +138,7 @@ watch(
<span class="patient-field"><small>身份证号</small>{{ patient.idCard }}</span>
<span class="patient-field">
<small>手机号</small>
{{ patientPhoneRevealed ? patient.phone : maskPhone(patient.phone) }}
<button type="button" class="inline-button" @click="togglePhone">
{{ patientPhoneRevealed ? '隐藏明文' : '显示明文' }}
</button>
{{ maskPhone(patient.phone) }}
</span>
<span class="patient-field"><small>患者 ID</small>{{ patient.id }}</span>
<span v-if="selectedVisit?.isCurrent" class="in-hospital">在院</span>
@@ -289,15 +283,9 @@ watch(
<div class="sms-row">
<span class="sms-icon">📱</span>
<strong>短信将发送至</strong>
<input
v-model="smsPhone"
placeholder="请确认手机号"
aria-label="短信接收手机号"
@input="errors.phone = ''"
/>
<span>{{ patient ? maskPhone(patient.phone) : '定位患者后显示' }}</span>
</div>
<p>可修改为患者其他号码,修改将记录留痕</p>
<p v-if="errors.phone" class="field-error">{{ errors.phone }}</p>
<p>使用患者权威记录中的手机号,具体投递结果以服务端返回为准。</p>
</div>
</div>
</section>
@@ -537,15 +525,6 @@ watch(
font-size: 11px;
}
.inline-button {
padding: 2px 5px;
color: var(--brand);
font-size: 11px;
background: transparent;
border: 1px solid var(--brand);
border-radius: 4px;
}
.in-hospital {
padding: 1px 7px;
color: #fff;
@@ -840,10 +819,6 @@ watch(
font-size: 16px;
}
.sms-row input {
width: 170px;
}
.sms-confirm p {
padding-left: 28px;
margin: 6px 0 0;