修改统计查询

This commit is contained in:
Flow 2025-06-24 17:25:52 +08:00
parent e57dfd31cd
commit ccb74c1dec
2 changed files with 23 additions and 9 deletions

View File

@ -161,7 +161,7 @@ export const PatientApi = {
},
//获取工作量统计
getData : async (params: any) => {
return await request.get({ url: `/inspect/patient/getworkload?dates=${params.dates[0]}&dates=${params.dates[1]}&examhosname=${params.examhosname}` })
return await request.get({ url: `/inspect/patient/getworkload?dates=${params.dates[0]}&dates=${params.dates[1]}&hospitalNo=${params.hospitalNo}` })
},
//导出工作量统计excel
exportData : async (params: any) => {

View File

@ -20,6 +20,16 @@
size="big"
@change="changeDatePick"
/>
<el-form-item label="当前机构" style="margin-left: 10px">
<el-select v-model="selectedHospital" placeholder="请选择当前机构" style="width: 200px" clearable>
<el-option
v-for="item in hospitals"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-button type="primary" @click="getList" style="margin-left: 20px">
<Icon icon="ep:search" class="mr-5px" /> 查询
</el-button>
@ -131,6 +141,7 @@ import { newHiprintPrintTemplate, preparePrintData } from './printHelper'
import download from '@/utils/download'
import { getUserProfile } from '@/api/system/user/profile'
import { InspectOrgApi } from '@/api/inspect/inspectorg'
import { hospitals } from '@/config/hospitals'
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
@ -172,6 +183,7 @@ const shortcuts = [
]
const dialogVisible = ref(false) //
const detailData = ref([]) //
const selectedHospital = ref<string>('') //
/**
* 改变单选框
* @param e
@ -197,8 +209,6 @@ const changeRadio = (e) => {
time.value = [formatDate(start, 'YYYY-MM-DD'), formatDate(end, 'YYYY-MM-DD')]
//
data1.value = []
//
getList()
}
const changeDatePick = () => {
radioType.value = null
@ -209,16 +219,20 @@ const userInfo = ref()
* 获取统计数据
*/
const getList = async () => {
if (!selectedHospital.value) {
message.warning('请先选择机构')
return
}
//
data1.value = []
//
userInfo.value = await getUserProfile()
const deptInfo = await InspectOrgApi.getInspectOrg(userInfo.value.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')],
examhosname: deptInfo.orgName
hospitalNo: selectedHospital.value
}
try {
let resp = await PatientApi.getData(params)
@ -396,9 +410,9 @@ const handleDetail = async (row) => {
enddate: time.value[1],
addname: row.districtname,
examhosname: parentNode ? parentNode.orgname : row.orgname,
orgid: userInfo.value.deptId
//orgid: userInfo.value.deptId
hospitalNo: selectedHospital.value
}
console.log(params)
const res = await PatientApi.getPatientDetails(params)
detailData.value = res
dialogVisible.value = true
@ -408,7 +422,7 @@ const handleDetail = async (row) => {
}
}
onMounted(() => {
changeRadio(3)
changeRadio(3)
// getList()
})
</script>