diff --git a/src/api/tblist/ecganalysisparas/index.ts b/src/api/tblist/ecganalysisparas/index.ts index 51c5c428..bb779f02 100644 --- a/src/api/tblist/ecganalysisparas/index.ts +++ b/src/api/tblist/ecganalysisparas/index.ts @@ -103,5 +103,8 @@ export const EcganalysisparasApi = { }, getDoctorBydoctorID: async (doctorID: any) => { return await request.get({ url: `/doctor/getBydoctorID?doctorID=` + doctorID }) + }, + getOrg: async (orgID: any) => { + return await request.get({ url: `/org/org/getone?orgID=` + orgID }) } } diff --git a/src/views/ECG/ECGForm.vue b/src/views/ECG/ECGForm.vue index 4e4f7e2d..5c05f363 100644 --- a/src/views/ECG/ECGForm.vue +++ b/src/views/ECG/ECGForm.vue @@ -1012,6 +1012,12 @@ function touchCopy() { /** 申请后更新上级机构字段*/ const getuporghiorgid = async (id: number, orgId: string) => { try { + let orgInfo: any = null + if (Profilevo.value.orgId) orgInfo = await EcganalysisparasApi.getOrg(Profilevo.value.orgId) + if (!orgInfo || !orgInfo.highLevelOrgID) { + message.alertWarning('请先设置当前用户的上级机构') + return + } if (applyFormVO.value.highLevelOrgId) { message.alertWarning('已提交申请') return