fix: 健康管理系统,统计页面功能开发。

This commit is contained in:
tianyongbao
2024-12-19 16:08:27 +08:00
parent 42711ddc49
commit e13adf29be
9 changed files with 301 additions and 207 deletions

View File

@@ -4,10 +4,15 @@
<div class="title">查询条件</div>
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="人员姓名" prop="personId">
<el-select v-model="queryParams.personId" placeholder="请选择人员姓名" clearable>
<el-select v-model="queryParams.personId" placeholder="请选择人员姓名" clearable @change="handleQueryPersonChange">
<el-option v-for="person in personList" :key="person.id" :label="person.name" :value="person.id" />
</el-select>
</el-form-item>
<el-form-item label="健康档案" prop="healthRecordId">
<el-select v-model="queryParams.healthRecordId" placeholder="请选择健康档案" clearable>
<el-option v-for="health in healthRecordList" :key="health.id" :label="health.name" :value="health.id" />
</el-select>
</el-form-item>
<el-form-item label="用药类型" prop="type">
<el-select v-model="queryParams.type" placeholder="请选择用药类型" @change="handleTypeChange" clearable>
<el-option v-for="dict in mar_type" :key="dict.value" :label="dict.label" :value="dict.value" />
@@ -256,6 +261,13 @@ const handlePersonChange = (personId) => {
}
})
}
const handleQueryPersonChange = (personId) => {
queryHealthRecordParams.personId = personId
queryParams.value.healthRecordId = null
listHealthRecord(queryHealthRecordParams).then((response) => {
healthRecordList.value = response.rows
})
}
const handleTypeChange = (type) => {
queryMedicineParams.value.treatmentType = type
@@ -276,6 +288,11 @@ const handleMedicineChange = (medicineId) => {
function getPersonList() {
listPerson(queryPersonParams.value).then((response) => {
personList.value = response.rows
if (response.rows.length > 0) {
listHealthRecord(queryHealthRecordParams).then((res) => {
healthRecordList.value = res.rows
})
}
})
}