feat(organization): 添加科室管理查询过滤功能
- 修复api.js中params参数拼写错误 - 添加科室名称、类型、分类的查询表单 - 实现搜索和重置功能 - 集成分页组件并修正页码参数映射 - 在后端服务中添加查询条件过滤逻辑 - 支持按科室名称、类型、分类进行条件查询 - 实现动态排序功能并修复分页查询逻辑
This commit is contained in:
@@ -4,7 +4,7 @@ export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,42 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 查询表单 -->
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" class="query-form">
|
||||
<el-form-item label="科室名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入科室名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室类型" prop="typeEnum">
|
||||
<el-select v-model="queryParams.typeEnum" placeholder="请选择科室类型" clearable style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in orgTypeOption"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室分类" prop="classEnum">
|
||||
<el-select v-model="queryParams.classEnum" placeholder="请选择科室分类" clearable style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in classEnumOption"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item class="search-buttons">
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"> 新增 </el-button>
|
||||
@@ -67,13 +104,17 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
|
||||
<!-- 分页 -->
|
||||
<div class="pagination-container">
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getPageList"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="600px" @close="cancel" append-to-body>
|
||||
@@ -191,8 +232,15 @@ import {
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const organization = ref([]);
|
||||
const queryParams = ref({});
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
name: undefined,
|
||||
typeEnum: undefined,
|
||||
classEnum: undefined
|
||||
});
|
||||
const open = ref(false);
|
||||
const form = ref({
|
||||
id: undefined,
|
||||
@@ -305,6 +353,21 @@ function getDictLabel(value) {
|
||||
return dict ? dict.label : '';
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getPageList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
queryParams.value.name = undefined;
|
||||
queryParams.value.typeEnum = undefined;
|
||||
queryParams.value.classEnum = undefined;
|
||||
queryParams.value.pageNo = 1;
|
||||
getPageList();
|
||||
}
|
||||
|
||||
function getPageList() {
|
||||
loading.value = true;
|
||||
getList(queryParams.value).then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user