From 564c5dfe34115f8bf2f6e0560bb73ae65a06b0b5 Mon Sep 17 00:00:00 2001 From: Euni4U <958079825@qq.com> Date: Wed, 11 Dec 2024 11:22:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=8A=E4=BC=A0=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E7=AD=BE=E5=90=8D=E5=9B=BE=E7=89=87=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/doctor/Form.vue | 50 ++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/src/views/system/doctor/Form.vue b/src/views/system/doctor/Form.vue index 642f14bc..869a764e 100644 --- a/src/views/system/doctor/Form.vue +++ b/src/views/system/doctor/Form.vue @@ -30,11 +30,11 @@ + v-for="item in fordepartementData" + :key="item.id" + :label="item.departmentName" + :value="item.departmentName" + /> @@ -45,9 +45,9 @@ @@ -75,17 +75,23 @@ - - + + @@ -120,7 +126,7 @@ const formData = ref({ departmentName: undefined, doctorTel: undefined, remark: undefined, - eSignatureUrl: undefined, + esignatureUrl: undefined, doctorLevel: undefined, orgId: undefined, departmentCode: undefined @@ -141,11 +147,13 @@ const open = async (type: string, id?: number) => { dialogVisible.value = true dialogTitle.value = t('action.' + type) formType.value = type + resetForm() // 获取机构字典数据 - fororglistData.value=await OrgApi.getOrglist() - //科室字典 - fordepartementData.value = await DepartmentApi.getDepartmentList() + formData.value.esignatureUrl = formData.value.esignatureUrl + fororglistData.value = await OrgApi.getOrglist() + //科室字典 + fordepartementData.value = await DepartmentApi.getDepartmentList() // 修改时,设置数据 if (id) { formLoading.value = true @@ -202,7 +210,7 @@ const resetForm = () => { departmentName: undefined, doctorTel: undefined, remark: undefined, - eSignatureUrl: undefined, + esignatureUrl: undefined, doctorLevel: undefined, orgId: undefined, departmentCode: undefined @@ -232,8 +240,8 @@ const handleChange = (file, fileList) => { reader.readAsDataURL(file.raw) reader.onload = (event) => { imageBase64.value = event.target.result - // 在这里可以获取到文件的Base64编码 - //console.log(base64Data) + // 将base64数据同时赋值给formData.eSignatureUrl以实现即时预览 + formData.value.esignatureUrl = event.target.result } imagefilename.value = file.name }