diff --git a/src/api/inspect/inspectpatient/index.ts b/src/api/inspect/inspectpatient/index.ts index 8139df9..029c3b8 100644 --- a/src/api/inspect/inspectpatient/index.ts +++ b/src/api/inspect/inspectpatient/index.ts @@ -183,8 +183,6 @@ export const PatientApi = { }, //获取详情数据 getPatientDetails: async (params: any) => { - return await request.get({ - url: `/inspect/patient/getPatientDetails?stadate=${params.dates[0]}&enddate=${params.dates[1]}&addname=${params.districtname}` - }) + return await request.get({ url: `/inspect/patient/getPatientDetails`, params }) } } diff --git a/src/views/sta/index.vue b/src/views/sta/index.vue index ccb018f..6f170b9 100644 --- a/src/views/sta/index.vue +++ b/src/views/sta/index.vue @@ -66,7 +66,7 @@ @@ -85,8 +85,8 @@ :data="detailData" border style="width: 100%" - height="800" - :max-height="800" + height="600" + :max-height="600" > @@ -204,6 +204,7 @@ const changeDatePick = () => { radioType.value = null // getList() } +const userInfo = ref() /** * 获取统计数据 */ @@ -212,8 +213,8 @@ const getList = async () => { data1.value = [] // 获取用户信息和机构信息 - const userInfo = await getUserProfile() - const deptInfo = await InspectOrgApi.getInspectOrg(userInfo.deptId) + userInfo.value = await getUserProfile() + const deptInfo = await InspectOrgApi.getInspectOrg(userInfo.value.deptId) const params = { dates: [dayjs(time.value[0]).format('YYYY-MM-DD'), dayjs(time.value[1]).format('YYYY-MM-DD')], @@ -382,13 +383,23 @@ const printData = () => { */ const handleDetail = async (row) => { try { + if (row.districtname == null) { + row.districtname='未知' + } + // 查找父节点 + const parentNode = data1.value.find(item => + item.children && item.children.some(child => child.districtname === row.districtname) + ) + const params = { - dates: time.value, - districtname: row.districtname, + stadate: time.value[0], + enddate: time.value[1], + addname: row.districtname, + examhosname: parentNode ? parentNode.orgname : row.orgname, + orgid: userInfo.value.deptId } console.log(params) const res = await PatientApi.getPatientDetails(params) - console.log(res) detailData.value = res dialogVisible.value = true } catch (error) { diff --git a/src/views/summary/reprot-print/components/ReportPreview.vue b/src/views/summary/reprot-print/components/ReportPreview.vue index 389a8b8..5a14c38 100644 --- a/src/views/summary/reprot-print/components/ReportPreview.vue +++ b/src/views/summary/reprot-print/components/ReportPreview.vue @@ -130,7 +130,7 @@ const handleIframeLoad = async () => { avatarImg.src = 'data:image/jpeg;base64,' + reportData.headPicUrl } else{ - avatarImg.src = '/头像.png' + avatarImg.src = '/inspect/头像.png' } } // 更新主检医生签名