修改统计查询
This commit is contained in:
parent
e57dfd31cd
commit
ccb74c1dec
@ -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) => {
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user