feat(menu): 优化菜单路径唯一性校验并更新前端界面
- 在SysLoginController中添加optionMap数据返回 - 添加JSQLParser依赖支持MyBatis Plus功能 - 实现selectMenuByPathExcludeId方法用于排除当前菜单的路径唯一性校验 - 在SysMenuServiceImpl中添加日志记录并优化路径唯一性判断逻辑 - 在SysMenuMapper.xml中添加LIMIT 1限制并实现排除ID查询 - 在前端路由中注释患者管理相关路由配置 - 在用户store中添加optionMap配置项并优先从optionMap获取医院名称 - 重构检查项目设置页面的操作按钮样式为统一的圆形按钮设计 - 更新检查项目设置页面的导航栏样式和交互体验 - 优化门诊记录页面的搜索条件和表格展示功能 - 添加性别和状态筛选条件并改进数据加载逻辑
This commit is contained in:
@@ -8,11 +8,9 @@ export function listOutpatienRecords(query) {
|
||||
})
|
||||
}
|
||||
|
||||
export function listDoctorNames() {
|
||||
export function listDoctorNames() {
|
||||
return request({
|
||||
url: '/patient-manage/records/init',
|
||||
url: '/patient-manage/records/doctor-names',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<el-form-item label="查询内容" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="身份证号/病人ID/门诊号/姓名"
|
||||
placeholder="姓名/身份证号/病人ID/门诊号"
|
||||
clearable
|
||||
style="width: 210px"
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -15,7 +15,7 @@
|
||||
v-model="queryParams.phone"
|
||||
placeholder="请输入联系方式"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -27,14 +27,39 @@
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 240px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="genderEnum">
|
||||
<el-select
|
||||
v-model="queryParams.genderEnum"
|
||||
placeholder="请选择性别"
|
||||
clearable
|
||||
style="width: 100px"
|
||||
>
|
||||
<el-option label="男" :value="1" />
|
||||
<el-option label="女" :value="2" />
|
||||
<el-option label="未知" :value="3" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="subjectStatusEnum">
|
||||
<el-select
|
||||
v-model="queryParams.subjectStatusEnum"
|
||||
placeholder="请选择状态"
|
||||
clearable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option label="待就诊" :value="1" />
|
||||
<el-option label="就诊中" :value="2" />
|
||||
<el-option label="已完成" :value="3" />
|
||||
<el-option label="已取消" :value="4" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="医生" prop="doctorName">
|
||||
<el-select
|
||||
v-model="queryParams.doctorName"
|
||||
placeholder="请选择医生"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
style="width: 160px"
|
||||
>
|
||||
<el-option
|
||||
@@ -51,18 +76,34 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="outpatienRecordsList" border style="width: 100%">
|
||||
<el-table-column prop="name" label="患者" width="180" />
|
||||
<el-table-column prop="idCard" label="身份证" width="180" />
|
||||
<el-table-column prop="description" label="疾病" width="180" />
|
||||
<el-table-column prop="patientBusNo" label="病人ID" width="180" />
|
||||
<el-table-column prop="encounterBusNo" label="门诊号" width="180" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" width="80" />
|
||||
<el-table
|
||||
:data="outpatienRecordsList"
|
||||
border
|
||||
style="width: 100%"
|
||||
:default-sort="{ prop: 'encounterTime', order: 'descending' }"
|
||||
v-loading="loading"
|
||||
:header-cell-style="{ background: '#f5f7fa', fontWeight: 'bold' }"
|
||||
>
|
||||
<el-table-column prop="name" label="患者" min-width="100" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" width="80" align="center" />
|
||||
<el-table-column prop="idCard" label="身份证" min-width="160" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="phone" label="电话" width="120" />
|
||||
<el-table-column prop="encounterTime" label="就诊时间" width="180" />
|
||||
<el-table-column prop="subjectStatusEnum_enumText" label="状态" width="120" />
|
||||
<el-table-column prop="organizationName" label="接诊医院" width="180" />
|
||||
<el-table-column prop="doctorName" label="接诊医生" width="180" />
|
||||
<el-table-column prop="patientBusNo" label="病人ID" width="100" align="center" />
|
||||
<el-table-column prop="encounterBusNo" label="门诊号" width="120" align="center" />
|
||||
<el-table-column prop="encounterTime" label="就诊时间" width="160" sortable />
|
||||
<el-table-column prop="doctorName" label="接诊医生" width="120" />
|
||||
<el-table-column prop="organizationName" label="医疗机构" min-width="120" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="subjectStatusEnum_enumText" label="状态" width="100" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
:type="getStatusTagType(scope.row.subjectStatusEnum)"
|
||||
size="small"
|
||||
>
|
||||
{{ scope.row.subjectStatusEnum_enumText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 移除疾病描述列,因为当前数据中没有这个字段 -->
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
@@ -75,16 +116,19 @@
|
||||
</template>
|
||||
|
||||
<script setup name="outpatienRecords">
|
||||
import {computed, ref} from 'vue';
|
||||
import {computed, ref, reactive, toRefs, getCurrentInstance} from 'vue';
|
||||
import {listDoctorNames, listOutpatienRecords} from './component/api';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
const showSearch = ref(true);
|
||||
const total = ref(0);
|
||||
const dateRange = ref([]);
|
||||
const outpatienRecordsList = ref([]);
|
||||
const doctorList = ref([]);
|
||||
const loading = ref(false);
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
@@ -94,7 +138,8 @@ const data = reactive({
|
||||
doctorName: undefined,
|
||||
searchKey: undefined,
|
||||
phone: undefined,
|
||||
patientid: undefined,
|
||||
genderEnum: undefined,
|
||||
subjectStatusEnum: undefined,
|
||||
},
|
||||
});
|
||||
const { queryParams } = toRefs(data);
|
||||
@@ -108,23 +153,60 @@ const doctorOptions = computed(() => {
|
||||
|
||||
/** 查询门诊记录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// 如果路由中有患者ID参数,则自动填充到查询条件中
|
||||
if (route.query.patientId) {
|
||||
queryParams.value.searchKey = route.query.patientId;
|
||||
}
|
||||
if (route.query.patientName) {
|
||||
// 可以在页面标题或其他地方显示患者姓名
|
||||
console.log('当前查看患者:', route.query.patientName);
|
||||
}
|
||||
|
||||
listOutpatienRecords(queryParams.value).then((response) => {
|
||||
outpatienRecordsList.value = response.data.records;
|
||||
total.value = response.data.total;
|
||||
loading.value = false;
|
||||
}).catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
listDoctorNames().then((response) => {
|
||||
console.log(response);
|
||||
doctorList.value = response.data;
|
||||
console.log(doctorList.value, 'doctorList.value');
|
||||
});
|
||||
|
||||
// 只在医生列表为空时加载医生列表
|
||||
if (doctorList.value.length === 0) {
|
||||
listDoctorNames().then((response) => {
|
||||
doctorList.value = response.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** 根据状态获取标签类型 */
|
||||
function getStatusTagType(status) {
|
||||
// 假设状态值:1-待就诊,2-就诊中,3-已完成,4-已取消
|
||||
switch (status) {
|
||||
case 1:
|
||||
return 'warning'; // 待就诊 - 黄色
|
||||
case 2:
|
||||
return 'primary'; // 就诊中 - 蓝色
|
||||
case 3:
|
||||
return 'success'; // 已完成 - 绿色
|
||||
case 4:
|
||||
return 'info'; // 已取消 - 灰色
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.startTimeSTime =
|
||||
dateRange.value && dateRange.value.length == 2 ? dateRange.value[0] : '';
|
||||
queryParams.value.startTimeETime =
|
||||
dateRange.value && dateRange.value.length == 2 ? dateRange.value[1] : '';
|
||||
// 处理时间范围参数
|
||||
if (dateRange.value && dateRange.value.length === 2) {
|
||||
queryParams.value.startTimeSTime = dateRange.value[0];
|
||||
queryParams.value.startTimeETime = dateRange.value[1];
|
||||
} else {
|
||||
queryParams.value.startTimeSTime = '';
|
||||
queryParams.value.startTimeETime = '';
|
||||
}
|
||||
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user