修改统计查询
This commit is contained in:
parent
e57dfd31cd
commit
ccb74c1dec
@ -161,7 +161,7 @@ export const PatientApi = {
|
|||||||
},
|
},
|
||||||
//获取工作量统计
|
//获取工作量统计
|
||||||
getData : async (params: any) => {
|
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
|
//导出工作量统计excel
|
||||||
exportData : async (params: any) => {
|
exportData : async (params: any) => {
|
||||||
|
@ -20,6 +20,16 @@
|
|||||||
size="big"
|
size="big"
|
||||||
@change="changeDatePick"
|
@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">
|
<el-button type="primary" @click="getList" style="margin-left: 20px">
|
||||||
<Icon icon="ep:search" class="mr-5px" /> 查询
|
<Icon icon="ep:search" class="mr-5px" /> 查询
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -131,6 +141,7 @@ import { newHiprintPrintTemplate, preparePrintData } from './printHelper'
|
|||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import { getUserProfile } from '@/api/system/user/profile'
|
import { getUserProfile } from '@/api/system/user/profile'
|
||||||
import { InspectOrgApi } from '@/api/inspect/inspectorg'
|
import { InspectOrgApi } from '@/api/inspect/inspectorg'
|
||||||
|
import { hospitals } from '@/config/hospitals'
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
@ -172,6 +183,7 @@ const shortcuts = [
|
|||||||
]
|
]
|
||||||
const dialogVisible = ref(false) // 控制对话框显示
|
const dialogVisible = ref(false) // 控制对话框显示
|
||||||
const detailData = ref([]) // 详情数据
|
const detailData = ref([]) // 详情数据
|
||||||
|
const selectedHospital = ref<string>('') // 选中的医院
|
||||||
/**
|
/**
|
||||||
* 改变单选框
|
* 改变单选框
|
||||||
* @param e
|
* @param e
|
||||||
@ -197,8 +209,6 @@ const changeRadio = (e) => {
|
|||||||
time.value = [formatDate(start, 'YYYY-MM-DD'), formatDate(end, 'YYYY-MM-DD')]
|
time.value = [formatDate(start, 'YYYY-MM-DD'), formatDate(end, 'YYYY-MM-DD')]
|
||||||
// 清空现有数据
|
// 清空现有数据
|
||||||
data1.value = []
|
data1.value = []
|
||||||
// 重新获取数据
|
|
||||||
getList()
|
|
||||||
}
|
}
|
||||||
const changeDatePick = () => {
|
const changeDatePick = () => {
|
||||||
radioType.value = null
|
radioType.value = null
|
||||||
@ -209,16 +219,20 @@ const userInfo = ref()
|
|||||||
* 获取统计数据
|
* 获取统计数据
|
||||||
*/
|
*/
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
|
if (!selectedHospital.value) {
|
||||||
|
message.warning('请先选择机构')
|
||||||
|
return
|
||||||
|
}
|
||||||
// 清空现有数据
|
// 清空现有数据
|
||||||
data1.value = []
|
data1.value = []
|
||||||
|
|
||||||
// 获取用户信息和机构信息
|
// 获取用户信息和机构信息
|
||||||
userInfo.value = await getUserProfile()
|
// userInfo.value = await getUserProfile()
|
||||||
const deptInfo = await InspectOrgApi.getInspectOrg(userInfo.value.deptId)
|
// const deptInfo = await InspectOrgApi.getInspectOrg(userInfo.value.deptId)
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
dates: [dayjs(time.value[0]).format('YYYY-MM-DD'), dayjs(time.value[1]).format('YYYY-MM-DD')],
|
dates: [dayjs(time.value[0]).format('YYYY-MM-DD'), dayjs(time.value[1]).format('YYYY-MM-DD')],
|
||||||
examhosname: deptInfo.orgName
|
hospitalNo: selectedHospital.value
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let resp = await PatientApi.getData(params)
|
let resp = await PatientApi.getData(params)
|
||||||
@ -396,9 +410,9 @@ const handleDetail = async (row) => {
|
|||||||
enddate: time.value[1],
|
enddate: time.value[1],
|
||||||
addname: row.districtname,
|
addname: row.districtname,
|
||||||
examhosname: parentNode ? parentNode.orgname : row.orgname,
|
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)
|
const res = await PatientApi.getPatientDetails(params)
|
||||||
detailData.value = res
|
detailData.value = res
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
|
Loading…
Reference in New Issue
Block a user