style: 优化表格页面样式及表格纵向滚动条

This commit is contained in:
2024-05-12 19:27:27 +08:00
parent c1c5f7f632
commit 861f6203cc
14 changed files with 614 additions and 551 deletions

View File

@@ -6,7 +6,7 @@
<BasicSetting />
</a-tab-pane>
<a-tab-pane key="2" title="邮件配置(暂未开放)" disabled></a-tab-pane>
<a-tab-pane key="3" title="安全置">
<a-tab-pane key="3" title="安全置">
<SecuritySetting />
</a-tab-pane>
</a-tabs>

View File

@@ -1,73 +1,72 @@
<template>
<div class="gi_page">
<a-card title="部门管理" class="general-card">
<GiTable
ref="tableRef"
row-key="id"
:data="dataList"
:columns="columns"
:loading="loading"
:scroll="{ x: '100%', y: '100%', minWidth: 1000 }"
:pagination="false"
:disabled-tools="['size']"
:disabled-column-keys="['name']"
@refresh="search"
>
<template #expand-icon="{ expanded }">
<IconDown v-if="expanded" />
<IconRight v-else />
</template>
<template #custom-left>
<a-input v-model="queryForm.description" placeholder="请输入关键词" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-select
v-model="queryForm.status"
:options="DisEnableStatusList"
placeholder="请选择状态"
allow-clear
style="width: 150px"
@change="search"
/>
<a-button @click="reset">重置</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:dept:add']" type="primary" @click="onAdd()">
<template #icon><icon-plus /></template>
<span>新增</span>
<div class="table-page">
<GiTable
ref="tableRef"
row-key="id"
title="部门管理"
:data="dataList"
:columns="columns"
:loading="loading"
:scroll="{ x: '100%', y: '100%', minWidth: 1000 }"
:pagination="false"
:disabled-tools="['size']"
:disabled-column-keys="['name']"
@refresh="search"
>
<template #expand-icon="{ expanded }">
<IconDown v-if="expanded" />
<IconRight v-else />
</template>
<template #custom-left>
<a-input v-model="queryForm.description" placeholder="请输入关键词" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-select
v-model="queryForm.status"
:options="DisEnableStatusList"
placeholder="请选择状态"
allow-clear
style="width: 150px"
@change="search"
/>
<a-button @click="reset">重置</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:dept:add']" type="primary" @click="onAdd()">
<template #icon><icon-plus /></template>
<span>新增</span>
</a-button>
<a-tooltip content="导出">
<a-button v-permission="['system:dept:export']" class="gi_hover_btn-border" @click="onExport">
<template #icon>
<icon-download />
</template>
</a-button>
<a-tooltip content="导出">
<a-button v-permission="['system:dept:export']" class="gi_hover_btn-border" @click="onExport">
<template #icon>
<icon-download />
</template>
</a-button>
</a-tooltip>
</template>
<template #status="{ record }">
<GiCellStatus :status="record.status" />
</template>
<template #isSystem="{ record }">
<a-tag v-if="record.isSystem" color="red" size="small"></a-tag>
<a-tag v-else color="arcoblue" size="small"></a-tag>
</template>
<template #action="{ record }">
<a-space>
<a-link v-permission="['system:dept:update']" @click="onUpdate(record)">修改</a-link>
<a-link v-permission="['system:dept:add']" @click="onAdd(record.id)">新增</a-link>
<a-link
v-permission="['system:dept:delete']"
status="danger"
:title="record.isSystem ? '系统内置数据不能删除' : undefined"
:disabled="record.disabled"
@click="onDelete(record)"
>
删除
</a-link>
</a-space>
</template>
</GiTable>
</a-card>
</a-tooltip>
</template>
<template #status="{ record }">
<GiCellStatus :status="record.status" />
</template>
<template #isSystem="{ record }">
<a-tag v-if="record.isSystem" color="red" size="small"></a-tag>
<a-tag v-else color="arcoblue" size="small"></a-tag>
</template>
<template #action="{ record }">
<a-space>
<a-link v-permission="['system:dept:update']" @click="onUpdate(record)">修改</a-link>
<a-link v-permission="['system:dept:add']" @click="onAdd(record.id)">新增</a-link>
<a-link
v-permission="['system:dept:delete']"
status="danger"
:title="record.isSystem ? '系统内置数据不能删除' : undefined"
:disabled="record.disabled"
@click="onDelete(record)"
>
删除
</a-link>
</a-space>
</template>
</GiTable>
<DeptAddModal ref="DeptAddModalRef" @save-success="search" />
</div>

View File

@@ -1,50 +1,49 @@
<template>
<div class="gi_page">
<a-card title="字典管理" class="general-card">
<GiTable
row-key="id"
:data="dataList"
:columns="columns"
:loading="loading"
:scroll="{ x: '100%', y: '100%', minWidth: 1000 }"
:pagination="pagination"
:disabled-tools="['size']"
:disabled-column-keys="['name']"
@refresh="search"
>
<template #custom-left>
<a-input v-model="queryForm.description" placeholder="请输入关键词" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-button @click="reset">重置</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:dict:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>
</a-button>
</template>
<template #isSystem="{ record }">
<a-tag v-if="record.isSystem" color="red"></a-tag>
<a-tag v-else color="arcoblue"></a-tag>
</template>
<template #action="{ record }">
<a-space>
<a-link @click="onViewDictItem(record)">管理</a-link>
<a-link v-permission="['system:dict:update']" @click="onUpdate(record)">修改</a-link>
<a-link
v-permission="['system:dict:delete']"
status="danger"
:title="record.isSystem ? '系统内置数据不能删除' : '删除'"
:disabled="record.disabled"
@click="onDelete(record)"
>
删除
</a-link>
</a-space>
</template>
</GiTable>
</a-card>
<div class="table-page">
<GiTable
row-key="id"
title="字典管理"
:data="dataList"
:columns="columns"
:loading="loading"
:scroll="{ x: '100%', y: '100%', minWidth: 1000 }"
:pagination="pagination"
:disabled-tools="['size']"
:disabled-column-keys="['name']"
@refresh="search"
>
<template #custom-left>
<a-input v-model="queryForm.description" placeholder="请输入关键词" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-button @click="reset">重置</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:dict:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>
</a-button>
</template>
<template #isSystem="{ record }">
<a-tag v-if="record.isSystem" color="red"></a-tag>
<a-tag v-else color="arcoblue"></a-tag>
</template>
<template #action="{ record }">
<a-space>
<a-link @click="onViewDictItem(record)">管理</a-link>
<a-link v-permission="['system:dict:update']" @click="onUpdate(record)">修改</a-link>
<a-link
v-permission="['system:dict:delete']"
status="danger"
:title="record.isSystem ? '系统内置数据不能删除' : '删除'"
:disabled="record.disabled"
@click="onDelete(record)"
>
删除
</a-link>
</a-space>
</template>
</GiTable>
<DictAddModal ref="DictAddModalRef" @save-success="search" />
<DictItemModal ref="DictItemModalRef" />

View File

@@ -55,6 +55,12 @@ const onClickItem = (item: FileTypeListItem) => {
margin: 0 16px;
padding-left: 0;
padding-right: 0;
.arco-card-header-title {
color: var(--color-text-1);
font-size: 18px;
font-weight: 500;
line-height: 1.5;
}
}
}
</style>

View File

@@ -1,84 +1,83 @@
<template>
<div class="gi_page">
<a-card title="菜单管理" class="general-card">
<GiTable
ref="tableRef"
row-key="id"
:data="dataList"
:columns="columns"
:loading="loading"
:scroll="{ x: '100%', y: '100%', minWidth: 1700, maxHeight: '81vh' }"
:pagination="false"
:disabled-column-keys="['title']"
@refresh="search"
>
<template #expand-icon="{ expanded }">
<IconDown v-if="expanded" />
<IconRight v-else />
</template>
<template #custom-left>
<a-input v-model="queryForm.title" placeholder="请输入菜单标题" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-select
v-model="queryForm.status"
:options="DisEnableStatusList"
placeholder="请选择状态"
allow-clear
style="width: 150px"
@change="search"
/>
<a-button @click="reset">重置</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:menu:add']" type="primary" @click="onAdd()">
<template #icon><icon-plus /></template>
<span>新增</span>
<div class="table-page">
<GiTable
ref="tableRef"
title="菜单管理"
row-key="id"
:data="dataList"
:columns="columns"
:loading="loading"
:scroll="{ x: '100%', y: '100%', minWidth: 1700 }"
:pagination="false"
:disabled-column-keys="['title']"
@refresh="search"
>
<template #expand-icon="{ expanded }">
<IconDown v-if="expanded" />
<IconRight v-else />
</template>
<template #custom-left>
<a-input v-model="queryForm.title" placeholder="请输入菜单标题" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-select
v-model="queryForm.status"
:options="DisEnableStatusList"
placeholder="请选择状态"
allow-clear
style="width: 150px"
@change="search"
/>
<a-button @click="reset">重置</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:menu:add']" type="primary" @click="onAdd()">
<template #icon><icon-plus /></template>
<span>新增</span>
</a-button>
<a-tooltip content="展开/折叠">
<a-button class="gi_hover_btn-border" @click="onExpanded">
<template #icon>
<icon-list v-if="!isExpanded" />
<icon-mind-mapping v-else />
</template>
</a-button>
<a-tooltip content="展开/折叠">
<a-button class="gi_hover_btn-border" @click="onExpanded">
<template #icon>
<icon-list v-if="!isExpanded" />
<icon-mind-mapping v-else />
</template>
</a-button>
</a-tooltip>
</template>
<template #title="{ record }">
<GiSvgIcon :name="record.icon" :size="15" />
<span style="margin-left: 5px; vertical-align: middle">{{ record.title }}</span>
</template>
<template #type="{ record }">
<a-tag v-if="record.type === 1" color="arcoblue">目录</a-tag>
<a-tag v-if="record.type === 2" color="green">菜单</a-tag>
<a-tag v-if="record.type === 3">按钮</a-tag>
</template>
<template #status="{ record }">
<GiCellStatus :status="record.status" />
</template>
<template #isExternal="{ record }">
<a-tag v-if="record.isExternal" color="arcoblue" size="small"></a-tag>
<a-tag v-else color="red" size="small"></a-tag>
</template>
<template #isHidden="{ record }">
<a-tag v-if="record.isHidden" color="arcoblue" size="small"></a-tag>
<a-tag v-else color="red" size="small"></a-tag>
</template>
<template #isCache="{ record }">
<a-tag v-if="record.isCache" color="arcoblue" size="small"></a-tag>
<a-tag v-else color="red" size="small"></a-tag>
</template>
<template #action="{ record }">
<a-space>
<a-link v-permission="['system:menu:update']" @click="onUpdate(record)">修改</a-link>
<a-link v-if="[1, 2].includes(record.type)" v-permission="['system:menu:add']" @click="onAdd(record.id)">
新增
</a-link>
<a-link v-permission="['system:menu:delete']" status="danger" @click="onDelete(record)">删除</a-link>
</a-space>
</template>
</GiTable>
</a-card>
</a-tooltip>
</template>
<template #title="{ record }">
<GiSvgIcon :name="record.icon" :size="15" />
<span style="margin-left: 5px; vertical-align: middle">{{ record.title }}</span>
</template>
<template #type="{ record }">
<a-tag v-if="record.type === 1" color="arcoblue">目录</a-tag>
<a-tag v-if="record.type === 2" color="green">菜单</a-tag>
<a-tag v-if="record.type === 3">按钮</a-tag>
</template>
<template #status="{ record }">
<GiCellStatus :status="record.status" />
</template>
<template #isExternal="{ record }">
<a-tag v-if="record.isExternal" color="arcoblue" size="small"></a-tag>
<a-tag v-else color="red" size="small"></a-tag>
</template>
<template #isHidden="{ record }">
<a-tag v-if="record.isHidden" color="arcoblue" size="small"></a-tag>
<a-tag v-else color="red" size="small"></a-tag>
</template>
<template #isCache="{ record }">
<a-tag v-if="record.isCache" color="arcoblue" size="small"></a-tag>
<a-tag v-else color="red" size="small"></a-tag>
</template>
<template #action="{ record }">
<a-space>
<a-link v-permission="['system:menu:update']" @click="onUpdate(record)">修改</a-link>
<a-link v-if="[1, 2].includes(record.type)" v-permission="['system:menu:add']" @click="onAdd(record.id)">
新增
</a-link>
<a-link v-permission="['system:menu:delete']" status="danger" @click="onDelete(record)">删除</a-link>
</a-space>
</template>
</GiTable>
<MenuAddModal ref="MenuAddModalRef" :menus="dataList" @save-success="search" />
</div>

View File

@@ -1,56 +1,53 @@
<template>
<div>
<div class="gi_page">
<a-card title="通知公告" class="general-card">
<GiTable
row-key="id"
:data="dataList"
:columns="columns"
:loading="loading"
:scroll="{ x: '100%', y: '100%', minWidth: 1000 }"
:pagination="pagination"
:disabled-tools="['size']"
:disabled-column-keys="['title']"
@refresh="search"
>
<template #custom-left>
<a-input v-model="queryForm.title" placeholder="请输入公告标题" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-select
v-model="queryForm.type"
:options="notice_type"
placeholder="请选择类型"
allow-clear
style="width: 150px"
@change="search"
/>
<a-button @click="reset">重置</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:notice:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>
</a-button>
</template>
<template #title="{ record }">
<a-link @click="onDetail(record)">{{ record.title }}</a-link>
</template>
<template #type="{ record }">
<GiCellTag :value="record.type" :dict="notice_type" />
</template>
<template #status="{ record }">
<GiCellTag :value="record.status" :dict="notice_status_enum" />
</template>
<template #action="{ record }">
<a-space>
<a-link v-permission="['system:notice:update']" @click="onUpdate(record)">修改</a-link>
<a-link v-permission="['system:notice:delete']" status="danger" @click="onDelete(record)"> 删除 </a-link>
</a-space>
</template>
</GiTable>
</a-card>
</div>
<div class="table-page">
<GiTable
row-key="id"
title="通知公告"
:data="dataList"
:columns="columns"
:loading="loading"
:scroll="{ x: '100%', y: '100%', minWidth: 1000 }"
:pagination="pagination"
:disabled-tools="['size']"
:disabled-column-keys="['title']"
@refresh="search"
>
<template #custom-left>
<a-input v-model="queryForm.title" placeholder="请输入公告标题" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-select
v-model="queryForm.type"
:options="notice_type"
placeholder="请选择类型"
allow-clear
style="width: 150px"
@change="search"
/>
<a-button @click="reset">重置</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:notice:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>
</a-button>
</template>
<template #title="{ record }">
<a-link @click="onDetail(record)">{{ record.title }}</a-link>
</template>
<template #type="{ record }">
<GiCellTag :value="record.type" :dict="notice_type" />
</template>
<template #status="{ record }">
<GiCellTag :value="record.status" :dict="notice_status_enum" />
</template>
<template #action="{ record }">
<a-space>
<a-link v-permission="['system:notice:update']" @click="onUpdate(record)">修改</a-link>
<a-link v-permission="['system:notice:delete']" status="danger" @click="onDelete(record)"> 删除 </a-link>
</a-space>
</template>
</GiTable>
<NoticeAddModal ref="NoticeAddModalRef" @save-success="search" />
<NoticeDetailModal ref="NoticeDetailModalRef" />

View File

@@ -1,58 +1,57 @@
<template>
<div class="gi_page">
<a-card title="角色管理" class="general-card">
<GiTable
row-key="id"
:data="dataList"
:columns="columns"
:loading="loading"
:scroll="{ x: '100%', y: '100%', minWidth: 1000 }"
:pagination="pagination"
:disabled-tools="['size']"
:disabled-column-keys="['name']"
@refresh="search"
>
<template #custom-left>
<a-input v-model="queryForm.description" placeholder="请输入关键词" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-button @click="reset">重置</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:role:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>
</a-button>
</template>
<template #name="{ record }">
<a-link @click="onDetail(record)">{{ record.name }}</a-link>
</template>
<template #dataScope="{ record }">
<GiCellTag :value="record.dataScope" :dict="data_scope_enum" />
</template>
<template #isSystem="{ record }">
<a-tag v-if="record.isSystem" color="red" size="small"></a-tag>
<a-tag v-else color="arcoblue" size="small"></a-tag>
</template>
<template #action="{ record }">
<a-space>
<a-link v-permission="['system:role:update']" @click="onUpdate(record)">修改</a-link>
<a-link
v-permission="['system:role:delete']"
status="danger"
:title="record.isSystem ? '系统内置数据不能删除' : undefined"
:disabled="record.disabled"
@click="onDelete(record)"
>
删除
</a-link>
</a-space>
</template>
</GiTable>
<div class="table-page">
<GiTable
row-key="id"
title="角色管理"
:data="dataList"
:columns="columns"
:loading="loading"
:scroll="{ x: '100%', y: '100%', minWidth: 1000 }"
:pagination="pagination"
:disabled-tools="['size']"
:disabled-column-keys="['name']"
@refresh="search"
>
<template #custom-left>
<a-input v-model="queryForm.description" placeholder="请输入关键词" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-button @click="reset">重置</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:role:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>
</a-button>
</template>
<template #name="{ record }">
<a-link @click="onDetail(record)">{{ record.name }}</a-link>
</template>
<template #dataScope="{ record }">
<GiCellTag :value="record.dataScope" :dict="data_scope_enum" />
</template>
<template #isSystem="{ record }">
<a-tag v-if="record.isSystem" color="red" size="small"></a-tag>
<a-tag v-else color="arcoblue" size="small"></a-tag>
</template>
<template #action="{ record }">
<a-space>
<a-link v-permission="['system:role:update']" @click="onUpdate(record)">修改</a-link>
<a-link
v-permission="['system:role:delete']"
status="danger"
:title="record.isSystem ? '系统内置数据不能删除' : undefined"
:disabled="record.disabled"
@click="onDelete(record)"
>
删除
</a-link>
</a-space>
</template>
</GiTable>
<RoleAddModal ref="RoleAddModalRef" @save-success="search" />
<RoleDetailDrawer ref="RoleDetailDrawerRef" />
</a-card>
<RoleAddModal ref="RoleAddModalRef" @save-success="search" />
<RoleDetailDrawer ref="RoleDetailDrawerRef" />
</div>
</template>

View File

@@ -1,67 +1,66 @@
<template>
<div class="gi_page">
<a-card title="存储管理" class="general-card">
<GiTable
row-key="id"
:data="dataList"
:columns="columns"
:loading="loading"
:scroll="{ x: '100%', y: '100%', minWidth: 1300 }"
:pagination="pagination"
:disabled-tools="['size']"
:disabled-column-keys="['name']"
@refresh="search"
>
<template #custom-left>
<a-input v-model="queryForm.description" placeholder="请输入关键词" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-select
v-model="queryForm.status"
:options="DisEnableStatusList"
placeholder="请选择状态"
allow-clear
style="width: 150px"
@change="search"
/>
<a-button @click="reset">重置</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:storage:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>
</a-button>
</template>
<template #name="{ record }">
<a-space fill>
<span>{{ record.name }}</span>
<a-tag v-if="record.isDefault" color="arcoblue" size="small" class="gi_round">
<template #default>默认</template>
</a-tag>
</a-space>
</template>
<template #type="{ record }">
<GiCellTag :value="record.type" :dict="storage_type_enum" />
</template>
<template #status="{ record }">
<GiCellStatus :status="record.status" />
</template>
<template #action="{ record }">
<a-space>
<a-link v-permission="['system:storage:update']" @click="onUpdate(record)">修改</a-link>
<a-link
v-permission="['system:storage:delete']"
status="danger"
:title="record.isDefault ? '默认存储不能删除' : undefined"
:disabled="record.disabled"
@click="onDelete(record)"
>
删除
</a-link>
</a-space>
</template>
</GiTable>
</a-card>
<div class="table-page">
<GiTable
row-key="id"
title="存储管理"
:data="dataList"
:columns="columns"
:loading="loading"
:scroll="{ x: '100%', y: '100%', minWidth: 1300 }"
:pagination="pagination"
:disabled-tools="['size']"
:disabled-column-keys="['name']"
@refresh="search"
>
<template #custom-left>
<a-input v-model="queryForm.description" placeholder="请输入关键词" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-select
v-model="queryForm.status"
:options="DisEnableStatusList"
placeholder="请选择状态"
allow-clear
style="width: 150px"
@change="search"
/>
<a-button @click="reset">重置</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:storage:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>
</a-button>
</template>
<template #name="{ record }">
<a-space fill>
<span>{{ record.name }}</span>
<a-tag v-if="record.isDefault" color="arcoblue" size="small" class="gi_round">
<template #default>默认</template>
</a-tag>
</a-space>
</template>
<template #type="{ record }">
<GiCellTag :value="record.type" :dict="storage_type_enum" />
</template>
<template #status="{ record }">
<GiCellStatus :status="record.status" />
</template>
<template #action="{ record }">
<a-space>
<a-link v-permission="['system:storage:update']" @click="onUpdate(record)">修改</a-link>
<a-link
v-permission="['system:storage:delete']"
status="danger"
:title="record.isDefault ? '默认存储不能删除' : undefined"
:disabled="record.disabled"
@click="onDelete(record)"
>
删除
</a-link>
</a-space>
</template>
</GiTable>
<StorageAddModal ref="StorageAddModalRef" @save-success="search" />
</div>

View File

@@ -1,103 +1,108 @@
<template>
<div class="gi_page">
<a-card title="用户管理" class="general-card">
<a-row :gutter="16">
<a-col :xs="0" :md="4" :lg="4" :xl="4" :xxl="4">
<a-input v-model="deptName" placeholder="请输入部门名称" allow-clear style="margin-bottom: 10px">
<template #prefix><icon-search /></template>
</a-input>
<a-tree
ref="treeRef"
:data="deptList"
:selected-keys="selectedKeys"
default-expand-all
show-line
block-node
@select="handleSelectDept"
>
</a-tree>
</a-col>
<a-col :xs="24" :md="20" :lg="20" :xl="20" :xxl="20">
<GiTable
row-key="id"
:data="dataList"
:columns="columns"
:loading="loading"
:scroll="{ x: '100%', y: '100%', minWidth: 1500 }"
:pagination="pagination"
:disabled-tools="['size']"
:disabled-column-keys="['username']"
@refresh="search"
>
<template #custom-left>
<a-input v-model="queryForm.description" placeholder="请输入关键词" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-select
v-model="queryForm.status"
:options="DisEnableStatusList"
placeholder="请选择状态"
allow-clear
style="width: 150px"
@change="search"
/>
<a-button @click="reset">重置</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:user:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>
<div class="table-page">
<a-row justify="space-between" align="center" class="header">
<a-space wrap>
<slot name="custom-title">
<div class="title">用户管理</div>
</slot>
</a-space>
</a-row>
<a-row :gutter="16">
<a-col :xs="0" :md="4" :lg="4" :xl="4" :xxl="4">
<a-input v-model="deptName" placeholder="请输入部门名称" allow-clear style="margin-bottom: 10px">
<template #prefix><icon-search /></template>
</a-input>
<a-tree
ref="treeRef"
:data="deptList"
:selected-keys="selectedKeys"
default-expand-all
show-line
block-node
@select="handleSelectDept"
>
</a-tree>
</a-col>
<a-col :xs="24" :md="20" :lg="20" :xl="20" :xxl="20">
<GiTable
row-key="id"
:data="dataList"
:columns="columns"
:loading="loading"
:scroll="{ x: '100%', y: '100%', minWidth: 1500 }"
:pagination="pagination"
:disabled-tools="['size']"
:disabled-column-keys="['username']"
@refresh="search"
>
<template #custom-left>
<a-input v-model="queryForm.description" placeholder="请输入关键词" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-select
v-model="queryForm.status"
:options="DisEnableStatusList"
placeholder="请选择状态"
allow-clear
style="width: 150px"
@change="search"
/>
<a-button @click="reset">重置</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:user:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>
</a-button>
<a-tooltip content="导出">
<a-button v-permission="['system:user:export']" class="gi_hover_btn-border" @click="onExport">
<template #icon>
<icon-download />
</template>
</a-button>
<a-tooltip content="导出">
<a-button v-permission="['system:user:export']" class="gi_hover_btn-border" @click="onExport">
<template #icon>
<icon-download />
</template>
</a-button>
</a-tooltip>
</template>
<template #username="{ record }">
<GiCellAvatar
:avatar="getAvatar(record.avatar, record.gender)"
:name="record.username"
is-link
@click="onDetail(record)"
/>
</template>
<template #gender="{ record }">
<GiCellGender :gender="record.gender" />
</template>
<template #status="{ record }">
<GiCellStatus :status="record.status" />
</template>
<template #isSystem="{ record }">
<a-tag v-if="record.isSystem" color="red" size="small"></a-tag>
<a-tag v-else color="arcoblue" size="small"></a-tag>
</template>
<template #action="{ record }">
<a-space>
<a-link v-permission="['system:user:update']" @click="onUpdate(record)">修改</a-link>
<a-link
v-permission="['system:user:delete']"
status="danger"
:title="record.isSystem ? '系统内置数据不能删除' : '删除'"
:disabled="record.disabled"
@click="onDelete(record)"
>
删除
</a-link>
<a-dropdown>
<a-link v-if="has.hasPermOr(['system:user:resetPwd'])" type="text">更多</a-link>
<template #content>
<a-doption v-permission="['system:user:resetPwd']" @click="onResetPwd(record)">重置密码</a-doption>
</template>
</a-dropdown>
</a-space>
</template>
</GiTable>
</a-col>
</a-row>
</a-card>
</a-tooltip>
</template>
<template #username="{ record }">
<GiCellAvatar
:avatar="getAvatar(record.avatar, record.gender)"
:name="record.username"
is-link
@click="onDetail(record)"
/>
</template>
<template #gender="{ record }">
<GiCellGender :gender="record.gender" />
</template>
<template #status="{ record }">
<GiCellStatus :status="record.status" />
</template>
<template #isSystem="{ record }">
<a-tag v-if="record.isSystem" color="red" size="small"></a-tag>
<a-tag v-else color="arcoblue" size="small"></a-tag>
</template>
<template #action="{ record }">
<a-space>
<a-link v-permission="['system:user:update']" @click="onUpdate(record)">修改</a-link>
<a-link
v-permission="['system:user:delete']"
status="danger"
:title="record.isSystem ? '系统内置数据不能删除' : '删除'"
:disabled="record.disabled"
@click="onDelete(record)"
>
删除
</a-link>
<a-dropdown>
<a-link v-if="has.hasPermOr(['system:user:resetPwd'])" type="text">更多</a-link>
<template #content>
<a-doption v-permission="['system:user:resetPwd']" @click="onResetPwd(record)">重置密码</a-doption>
</template>
</a-dropdown>
</a-space>
</template>
</GiTable>
</a-col>
</a-row>
<UserAddModal ref="UserAddModalRef" @save-success="search" />
<UserDetailDrawer ref="UserDetailDrawerRef" />