mirror of https://gitee.com/xiaonuobase/snowy
【优化】优化前端组件中,组织、用户、职位、角色、用户组等五个选择器在小屏幕下的表现
parent
92748d1737
commit
677d994ec5
|
@ -26,18 +26,22 @@
|
|||
@cancel="handleClose"
|
||||
>
|
||||
<a-row :gutter="10">
|
||||
<a-col :span="14">
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="14" :xl="14">
|
||||
<div class="table-operator xn-mb10">
|
||||
<a-form ref="searchFormRef" name="advanced_search" class="ant-advanced-search-form" :model="searchFormState">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<a-form-item name="searchKey">
|
||||
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入名称" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-button type="primary" class="xn-mr-10" @click="loadData()"> 查询 </a-button>
|
||||
<a-button @click="reset()"> 重置 </a-button>
|
||||
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<a-form-item>
|
||||
<a-space>
|
||||
<a-button type="primary" class="xn-mr-10" @click="loadData()"> 查询 </a-button>
|
||||
<a-button @click="reset()"> 重置 </a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
@ -58,7 +62,7 @@
|
|||
</a-table>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="10">
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="10" :xl="10">
|
||||
<div class="selector-table">
|
||||
<a-table
|
||||
ref="selectedTable"
|
||||
|
@ -68,6 +72,7 @@
|
|||
:expand-row-by-click="true"
|
||||
:loading="selectedTableListLoading"
|
||||
bordered
|
||||
|
||||
>
|
||||
<template #title>
|
||||
<span>已选择: {{ selectedData.length }}</span>
|
||||
|
@ -476,9 +481,6 @@
|
|||
max-height: 500px;
|
||||
overflow: auto;
|
||||
}
|
||||
.ant-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.selector-table {
|
||||
overflow: auto;
|
||||
max-height: 450px;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
@cancel="handleClose"
|
||||
>
|
||||
<a-row :gutter="10">
|
||||
<a-col :span="7">
|
||||
<a-col :xs="0" :sm="0" :md="0" :lg="7" :xl="7">
|
||||
<a-card size="small" :loading="cardLoading" class="selectorTreeDiv">
|
||||
<a-tree
|
||||
v-if="treeData"
|
||||
|
@ -40,18 +40,41 @@
|
|||
</a-tree>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :span="11">
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="11" :xl="11">
|
||||
<div class="table-operator xn-mb10">
|
||||
<a-form ref="searchFormRef" name="advanced_search" class="ant-advanced-search-form" :model="searchFormState">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-col :xs="24" :sm="8" :md="8" :lg="0" :xl="0">
|
||||
<a-form-item label="上级组织:" name="parentId">
|
||||
<a-tree-select
|
||||
v-model:value="searchFormState.parentId"
|
||||
class="xn-wd"
|
||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||
placeholder="请选择上级组织"
|
||||
allow-clear
|
||||
:tree-data="treeData"
|
||||
:field-names="{
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
value: 'id'
|
||||
}"
|
||||
selectable="false"
|
||||
tree-line
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="8" :md="8" :lg="0" :xl="0">
|
||||
<a-form-item name="searchKey">
|
||||
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入机构名" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-button type="primary" class="xn-mr-10" @click="loadData()"> 查询 </a-button>
|
||||
<a-button @click="reset()"> 重置 </a-button>
|
||||
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<a-form-item>
|
||||
<a-space>
|
||||
<a-button type="primary" class="xn-mr-10" @click="loadData()"> 查询 </a-button>
|
||||
<a-button @click="reset()"> 重置 </a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
@ -66,6 +89,7 @@
|
|||
:loading="pageLoading"
|
||||
bordered
|
||||
:pagination="false"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
>
|
||||
<template #title>
|
||||
<span>待选择列表 {{ tableRecordNum }} 条</span>
|
||||
|
@ -95,7 +119,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="6" :xl="6">
|
||||
<div class="selector-table">
|
||||
<a-table
|
||||
ref="selectedTable"
|
||||
|
@ -437,7 +461,7 @@
|
|||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
delete searchFormState.value.searchKey
|
||||
searchFormRef.value.resetFields()
|
||||
loadData()
|
||||
}
|
||||
const handleClose = () => {
|
||||
|
@ -576,9 +600,6 @@
|
|||
max-height: 500px;
|
||||
overflow: auto;
|
||||
}
|
||||
.ant-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.selector-table {
|
||||
overflow: auto;
|
||||
max-height: 450px;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
@cancel="handleClose"
|
||||
>
|
||||
<a-row :gutter="10">
|
||||
<a-col :span="7">
|
||||
<a-col :xs="0" :sm="0" :md="0" :lg="7" :xl="7">
|
||||
<a-card size="small" :loading="cardLoading" class="selectorTreeDiv">
|
||||
<a-tree
|
||||
v-if="treeData"
|
||||
|
@ -40,18 +40,41 @@
|
|||
</a-tree>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :span="11">
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="11" :xl="11">
|
||||
<div class="table-operator xn-mb10">
|
||||
<a-form ref="searchFormRef" name="advanced_search" class="ant-advanced-search-form" :model="searchFormState">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-col :xs="24" :sm="8" :md="8" :lg="0" :xl="0">
|
||||
<a-form-item label="组织:" name="orgId">
|
||||
<a-tree-select
|
||||
v-model:value="searchFormState.orgId"
|
||||
class="xn-wd"
|
||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||
placeholder="请选择组织"
|
||||
allow-clear
|
||||
:tree-data="treeData"
|
||||
:field-names="{
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
value: 'id'
|
||||
}"
|
||||
selectable="false"
|
||||
tree-line
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<a-form-item name="searchKey">
|
||||
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入职位名" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-button type="primary" class="xn-mr-10" @click="loadData()"> 查询 </a-button>
|
||||
<a-button @click="reset()"> 重置 </a-button>
|
||||
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<a-form-item>
|
||||
<a-space>
|
||||
<a-button type="primary" class="xn-mr-10" @click="loadData()"> 查询 </a-button>
|
||||
<a-button @click="reset()"> 重置 </a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
@ -66,6 +89,7 @@
|
|||
:loading="pageLoading"
|
||||
bordered
|
||||
:pagination="false"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
>
|
||||
<template #title>
|
||||
<span>待选择列表 {{ tableRecordNum }} 条</span>
|
||||
|
@ -95,7 +119,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="6" :xl="6">
|
||||
<div class="selector-table">
|
||||
<a-table
|
||||
ref="selectedTable"
|
||||
|
@ -433,7 +457,7 @@
|
|||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
delete searchFormState.value.searchKey
|
||||
searchFormRef.value.resetFields()
|
||||
loadData()
|
||||
}
|
||||
const handleClose = () => {
|
||||
|
@ -572,9 +596,6 @@
|
|||
max-height: 500px;
|
||||
overflow: auto;
|
||||
}
|
||||
.ant-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.selector-table {
|
||||
overflow: auto;
|
||||
max-height: 450px;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
@cancel="handleClose"
|
||||
>
|
||||
<a-row :gutter="10">
|
||||
<a-col :span="7">
|
||||
<a-col :xs="0" :sm="0" :md="0" :lg="7" :xl="7">
|
||||
<a-card size="small" :loading="cardLoading" class="selectorTreeDiv">
|
||||
<a-tree
|
||||
v-if="treeData"
|
||||
|
@ -40,18 +40,42 @@
|
|||
</a-tree>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :span="11">
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="11" :xl="11">
|
||||
<div class="table-operator xn-mb10">
|
||||
<a-form ref="searchFormRef" name="advanced_search" class="ant-advanced-search-form" :model="searchFormState">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item name="searchKey">
|
||||
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入职位名" />
|
||||
<a-col :xs="24" :sm="8" :md="8" :lg="0" :xl="0">
|
||||
<a-form-item label="组织:" name="categoryOrOrgId">
|
||||
<a-tree-select
|
||||
v-model:value="searchFormState.categoryOrOrgId"
|
||||
class="xn-wd"
|
||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||
placeholder="请选择组织"
|
||||
allow-clear
|
||||
:tree-data="treeData"
|
||||
:field-names="{
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
value: 'id'
|
||||
}"
|
||||
selectable="false"
|
||||
tree-line
|
||||
@change="onCategoryOrOrgIdSelect"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-button type="primary" class="xn-mr-10" @click="loadData()"> 查询 </a-button>
|
||||
<a-button @click="reset()"> 重置 </a-button>
|
||||
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<a-form-item name="searchKey">
|
||||
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入角色名" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<a-form-item>
|
||||
<a-space>
|
||||
<a-button type="primary" class="xn-mr-10" @click="loadData()"> 查询 </a-button>
|
||||
<a-button @click="reset()"> 重置 </a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
@ -66,6 +90,7 @@
|
|||
:loading="pageLoading"
|
||||
bordered
|
||||
:pagination="false"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
>
|
||||
<template #title>
|
||||
<span>待选择列表 {{ tableRecordNum }} 条</span>
|
||||
|
@ -95,7 +120,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="6" :xl="6">
|
||||
<div class="selector-table">
|
||||
<a-table
|
||||
ref="selectedTable"
|
||||
|
@ -216,7 +241,7 @@
|
|||
const slots = useSlots()
|
||||
// 替换treeNode 中 title,key,children
|
||||
const treeFieldNames = { children: 'children', title: 'name', key: 'id' }
|
||||
// 获取职位树数据
|
||||
// 获取机构树数据
|
||||
const treeData = ref()
|
||||
// 默认展开二级树的节点id
|
||||
const defaultExpandedKeys = ref([])
|
||||
|
@ -436,6 +461,18 @@
|
|||
}
|
||||
loadData()
|
||||
}
|
||||
// 下拉树点击的情况
|
||||
const onCategoryOrOrgIdSelect = (selectedId) => {
|
||||
searchFormState.value.current = 0
|
||||
if (selectedId === 'GLOBAL') {
|
||||
searchFormState.value.category = selectedId
|
||||
delete searchFormState.value.orgId
|
||||
} else {
|
||||
searchFormState.value.orgId = selectedId
|
||||
delete searchFormState.value.category
|
||||
}
|
||||
delete searchFormState.value.categoryOrOrgId
|
||||
}
|
||||
const dataArray = ref([])
|
||||
// 确定
|
||||
const handleOk = () => {
|
||||
|
@ -461,7 +498,7 @@
|
|||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
delete searchFormState.value.searchKey
|
||||
searchFormRef.value.resetFields()
|
||||
loadData()
|
||||
}
|
||||
const handleClose = () => {
|
||||
|
@ -600,9 +637,6 @@
|
|||
max-height: 500px;
|
||||
overflow: auto;
|
||||
}
|
||||
.ant-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.selector-table {
|
||||
overflow: auto;
|
||||
max-height: 450px;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
@cancel="handleClose"
|
||||
>
|
||||
<a-row :gutter="10">
|
||||
<a-col :span="7">
|
||||
<a-col :xs="0" :sm="0" :md="0" :lg="7" :xl="7">
|
||||
<a-card size="small" :loading="cardLoading" class="selectorTreeDiv">
|
||||
<a-tree
|
||||
v-if="treeData"
|
||||
|
@ -47,18 +47,41 @@
|
|||
</a-tree>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :span="11">
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="11" :xl="11">
|
||||
<div class="table-operator xn-mb10">
|
||||
<a-form ref="searchFormRef" name="advanced_search" class="ant-advanced-search-form" :model="searchFormState">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-col :xs="24" :sm="8" :md="8" :lg="0" :xl="0">
|
||||
<a-form-item label="组织:" name="orgId">
|
||||
<a-tree-select
|
||||
v-model:value="searchFormState.orgId"
|
||||
class="xn-wd"
|
||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||
placeholder="请选择组织"
|
||||
allow-clear
|
||||
:tree-data="treeData"
|
||||
:field-names="{
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
value: 'id'
|
||||
}"
|
||||
selectable="false"
|
||||
tree-line
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<a-form-item name="searchKey">
|
||||
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入用户名" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-button type="primary" class="xn-mr-10" @click="loadData()"> 查询 </a-button>
|
||||
<a-button @click="reset()"> 重置 </a-button>
|
||||
<a-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<a-form-item>
|
||||
<a-space>
|
||||
<a-button type="primary" class="xn-mr-10" @click="loadData()"> 查询 </a-button>
|
||||
<a-button @click="reset()"> 重置 </a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
@ -73,6 +96,7 @@
|
|||
:loading="pageLoading"
|
||||
bordered
|
||||
:pagination="false"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
>
|
||||
<template #title>
|
||||
<span>待选择列表 {{ tableRecordNum }} 条</span>
|
||||
|
@ -105,7 +129,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-col :xs="24" :sm="24" :md="24" :lg="6" :xl="6">
|
||||
<div class="user-table">
|
||||
<a-table
|
||||
ref="selectedTable"
|
||||
|
@ -441,7 +465,7 @@
|
|||
}
|
||||
// 重置
|
||||
const reset = () => {
|
||||
delete searchFormState.value.searchKey
|
||||
searchFormRef.value.resetFields()
|
||||
loadData()
|
||||
}
|
||||
const handleClose = () => {
|
||||
|
@ -580,9 +604,6 @@
|
|||
max-height: 500px;
|
||||
overflow: auto;
|
||||
}
|
||||
.ant-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.user-table {
|
||||
overflow: auto;
|
||||
max-height: 450px;
|
||||
|
|
|
@ -66,6 +66,9 @@ public class SysGroupServiceImpl extends ServiceImpl<SysGroupMapper, SysGroup> i
|
|||
@Override
|
||||
public Page<SysGroup> page(SysGroupPageParam sysGroupPageParam) {
|
||||
QueryWrapper<SysGroup> queryWrapper = new QueryWrapper<SysGroup>().checkSqlInjection();
|
||||
if(ObjectUtil.isNotEmpty(sysGroupPageParam.getSearchKey())) {
|
||||
queryWrapper.lambda().like(SysGroup::getName, sysGroupPageParam.getSearchKey());
|
||||
}
|
||||
if(ObjectUtil.isNotEmpty(sysGroupPageParam.getName())) {
|
||||
queryWrapper.lambda().like(SysGroup::getName, sysGroupPageParam.getName());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue