From 3ecceabf27da70714dbdfb84c0772af30a25a3e7 Mon Sep 17 00:00:00 2001 From: lxd <1004405501@qq.com> Date: Wed, 28 Aug 2024 14:22:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E9=80=89=E9=A1=B9=20=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=AE=8C=E6=9C=BA=E6=9E=84=E5=90=8E=20=E5=87=BA=E6=9D=A5?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E9=80=89=E6=8B=A9=E6=9C=BA=E6=9E=84=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=20=20=E7=94=A8=E6=88=B7=E7=9A=84=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=20=E8=B6=85=E5=A3=B0=E5=92=8C=E5=BD=B1=E5=83=8F?= =?UTF-8?q?=E5=88=86=E5=BC=80=E6=9D=83=E9=99=90=20=20=20=20=E8=B6=85?= =?UTF-8?q?=E5=A3=B0=E5=92=8C=E5=BD=B1=E5=83=8F=E4=BF=9D=E5=AD=98=E6=97=B6?= =?UTF-8?q?=E5=80=99=E4=BF=AE=E6=94=B9=E8=AF=8A=E6=96=AD=E5=8C=BB=E7=94=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/user/index.ts | 7 ++ src/api/system/user/profile.ts | 3 + src/api/tblist/patientexamlist/index.ts | 1 + src/views/dicomForm/dicomViewForm.vue | 12 ++- src/views/system/user/UserForm.vue | 105 +++++++++++++++------ src/views/system/user/index.vue | 9 +- src/views/ultrasoniccom/ultrasonicForm.vue | 3 +- 7 files changed, 102 insertions(+), 38 deletions(-) diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index bd022305..64339c49 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -17,6 +17,9 @@ export interface UserVO { createTime: Date orgId:string isexamine:string + isimageexamine:string + doctorID:string + doctorname:string } // 查询用户管理列表 @@ -81,3 +84,7 @@ export const updateUserStatus = (id: number, status: number) => { export const getSimpleUserList = (): Promise => { return request.get({ url: '/system/user/simple-list' }) } + +export const getDoctorList= (orgid:string) => { + return request.get({ url: '/doctor/getdoctorlist?orgId='+orgid }) +} diff --git a/src/api/system/user/profile.ts b/src/api/system/user/profile.ts index b1eff295..488fbe28 100644 --- a/src/api/system/user/profile.ts +++ b/src/api/system/user/profile.ts @@ -31,6 +31,9 @@ export interface ProfileVO { createTime: Date isexamine:string orgId:string + isimageexamine:string + doctorID:string + doctorname:string } export interface UserProfileUpdateReqVO { diff --git a/src/api/tblist/patientexamlist/index.ts b/src/api/tblist/patientexamlist/index.ts index 2108d497..dd785a83 100644 --- a/src/api/tblist/patientexamlist/index.ts +++ b/src/api/tblist/patientexamlist/index.ts @@ -22,6 +22,7 @@ export interface PatientexamlistVO { diagResults: string // 诊断结论 diagDate: Date // 下诊断结论的时间:年月日时分秒 diagDoctor: string // 诊断医生 + diagDoctorId:string reviewDoctor: string // 审核医生 reviewDate: Date // 审核日期:年月日时分秒 thumbnailImgUrl: string // 缩略图oss url, httP:oss url diff --git a/src/views/dicomForm/dicomViewForm.vue b/src/views/dicomForm/dicomViewForm.vue index 46028d30..07ce7053 100644 --- a/src/views/dicomForm/dicomViewForm.vue +++ b/src/views/dicomForm/dicomViewForm.vue @@ -239,7 +239,7 @@ 保存审核 @@ -342,7 +342,8 @@ const save = async () => { examineFormVO.value.diagResults = zdjl.value examineFormVO.value.notes = notes.value examineFormVO.value.diagFlag = radio1.value - examineFormVO.value.diagDoctor = Profilevo.value.username + examineFormVO.value.diagDoctor = Profilevo.value.doctorname + examineFormVO.value.diagDoctorId = Profilevo.value.doctorID // examineFormVO.value.reviewDoctor = Profilevo.value.username examineFormVO.value.reportstatus = '已分析' // examineFormVO.value.diagDate=localDateTime @@ -565,6 +566,7 @@ const iframeData = async () => { } else { // 如果status不是success,可以根据需要处理错误情况 console.error('Request did not succeed:', response.data) + } // dataLoaded.value = true // 请求完成后,无论成功与否,都设置dataLoaded为true } catch (error) { @@ -604,8 +606,8 @@ const PrintForm = () => { //获取当前登录人信息 const getlogininfo = async () => { Profilevo.value = await getUserProfile() - console.log('审核是否可见' + Profilevo.value.isexamine) - if (Profilevo.value.isexamine === '1') { + console.log('审核是否可见' + Profilevo.value.isimageexamine) + if (Profilevo.value.isimageexamine === '1') { examinedisabled.value = true } } diff --git a/src/views/system/user/UserForm.vue b/src/views/system/user/UserForm.vue index 207b953f..92e417a3 100644 --- a/src/views/system/user/UserForm.vue +++ b/src/views/system/user/UserForm.vue @@ -14,7 +14,17 @@ - + + + + + + @@ -33,8 +43,8 @@ - - + + @@ -69,7 +79,7 @@ - + + + + + + - - - - - + + + + + - - - - - - + + + + + + - + @@ -137,6 +158,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示 const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 +const doctorList = ref([]) //医生列表数据 const formData = ref({ nickname: '', deptId: '', @@ -150,8 +172,11 @@ const formData = ref({ remark: '', status: CommonStatusEnum.ENABLE, roleIds: [], - orgId:'', - isexamine:'' + orgId: '', + isexamine: '', + isimageexamine: '', + doctorID: '', + doctorname: '' }) const formRules = reactive({ username: [{ required: true, message: '用户名称不能为空', trigger: 'blur' }], @@ -182,8 +207,8 @@ const open = async (type: string, id?: number) => { dialogVisible.value = true dialogTitle.value = t('action.' + type) formType.value = type - // 获取机构字典数据 - fororglistData.value = await OrgApi.getOrglist() + // 获取机构字典数据 + fororglistData.value = await OrgApi.getOrglist() resetForm() // 修改时,设置数据 if (id) { @@ -201,6 +226,26 @@ const open = async (type: string, id?: number) => { } defineExpose({ open }) // 提供 open 方法,用于打开弹窗 +// 监听机构选择变化的方法 +function handleOrgChange(newVal) { + // 清空当前的选项数据 + doctorList.value = [] + // 根据新的机构ID加载相关选项 + if (newVal) { + loadRelatedOptions(newVal) + } +} +// 计算属性,根据formData.doctorID获取医生名称 +const selectedDoctorName = computed(() => { + const selectedDoctor = doctorList.value.find(doctor => doctor.doctorID === formData.value.doctorID); + return selectedDoctor ? selectedDoctor.doctorName : ''; +}); + +// 根据机构ID加载相关选项的方法 +async function loadRelatedOptions(orgId) { + // 加载医生 + doctorList.value = await UserApi.getDoctorList(orgId) +} /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 const submitForm = async () => { @@ -208,6 +253,7 @@ const submitForm = async () => { if (!formRef) return const valid = await formRef.value.validate() if (!valid) return + formData.value.doctorname=selectedDoctorName.value // 提交请求 formLoading.value = true try { @@ -242,8 +288,13 @@ const resetForm = () => { remark: '', status: CommonStatusEnum.ENABLE, roleIds: [], - orgId:'' + orgId: '', + doctorID: '', + isexamine: '', + isimageexamine: '', + doctorname: '' } + doctorList.value = [] formRef.value?.resetFields() } diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 4f04dff5..d1a6ab45 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -5,11 +5,11 @@ - + @@ -110,10 +110,9 @@ :show-overflow-tooltip="true" /> diff --git a/src/views/ultrasoniccom/ultrasonicForm.vue b/src/views/ultrasoniccom/ultrasonicForm.vue index 807cb249..f1280f18 100644 --- a/src/views/ultrasoniccom/ultrasonicForm.vue +++ b/src/views/ultrasoniccom/ultrasonicForm.vue @@ -541,7 +541,8 @@ const save = async () => { examineFormVO.value.diagResults = zdjl.value examineFormVO.value.notes = notes.value examineFormVO.value.diagFlag = radio1.value - examineFormVO.value.diagDoctor = Profilevo.value.username + examineFormVO.value.diagDoctor = Profilevo.value.doctorname + examineFormVO.value.diagDoctorId = Profilevo.value.doctorID // examineFormVO.value.reviewDoctor = Profilevo.value.username examineFormVO.value.reportstatus = '已分析' // examineFormVO.value.diagDate=localDateTime