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
}