fix: 修复用户管理分页条消失错误,优化表格 slot 命名

This commit is contained in:
2024-10-13 15:50:02 +08:00
parent 50a6d17516
commit 6a77168645
17 changed files with 43 additions and 40 deletions

View File

@@ -7,12 +7,15 @@
</slot> </slot>
</a-space> </a-space>
</a-row> </a-row>
<a-row>
<slot name="top"></slot>
</a-row>
<a-row justify="space-between" align="center" class="gi-table__toolbar"> <a-row justify="space-between" align="center" class="gi-table__toolbar">
<a-space wrap class="gi-table__toolbar-left" :size="[8, 8]"> <a-space wrap class="gi-table__toolbar-left" :size="[8, 8]">
<slot name="custom-left"></slot> <slot name="toolbar-left"></slot>
</a-space> </a-space>
<a-space wrap class="gi-table__toolbar-right" :size="[8, 8]"> <a-space wrap class="gi-table__toolbar-right" :size="[8, 8]">
<slot name="custom-right"></slot> <slot name="toolbar-right"></slot>
<a-tooltip content="刷新"> <a-tooltip content="刷新">
<a-button v-if="showRefreshBtn" @click="refresh"> <a-button v-if="showRefreshBtn" @click="refresh">
<template #icon><icon-refresh /></template> <template #icon><icon-refresh /></template>

View File

@@ -2,9 +2,7 @@
<div class="table-page"> <div class="table-page">
<a-row justify="space-between" align="center" class="header"> <a-row justify="space-between" align="center" class="header">
<a-space wrap> <a-space wrap>
<slot name="custom-title"> <div class="title">系统日志</div>
<div class="title">系统日志</div>
</slot>
</a-space> </a-space>
</a-row> </a-row>
<a-tabs v-model:active-key="activeKey" type="card-gutter" size="large" @change="change"> <a-tabs v-model:active-key="activeKey" type="card-gutter" size="large" @change="change">

View File

@@ -10,7 +10,7 @@
@filter-change="filterChange" @filter-change="filterChange"
@refresh="search" @refresh="search"
> >
<template #custom-left> <template #toolbar-left>
<a-input v-model="queryForm.createUserString" placeholder="请输入登录用户" allow-clear @change="search"> <a-input v-model="queryForm.createUserString" placeholder="请输入登录用户" allow-clear @change="search">
<template #prefix><icon-search /></template> <template #prefix><icon-search /></template>
</a-input> </a-input>
@@ -23,7 +23,7 @@
<template #default>重置</template> <template #default>重置</template>
</a-button> </a-button>
</template> </template>
<template #custom-right> <template #toolbar-right>
<a-button v-permission="['monitor:log:export']" @click="onExport"> <a-button v-permission="['monitor:log:export']" @click="onExport">
<template #icon> <template #icon>
<icon-download /> <icon-download />

View File

@@ -11,7 +11,7 @@
@filter-change="filterChange" @filter-change="filterChange"
@refresh="search" @refresh="search"
> >
<template #custom-left> <template #toolbar-left>
<a-input v-model="queryForm.createUserString" placeholder="请输入操作人" allow-clear @change="search"> <a-input v-model="queryForm.createUserString" placeholder="请输入操作人" allow-clear @change="search">
<template #prefix><icon-search /></template> <template #prefix><icon-search /></template>
</a-input> </a-input>
@@ -24,7 +24,7 @@
<template #default>重置</template> <template #default>重置</template>
</a-button> </a-button>
</template> </template>
<template #custom-right> <template #toolbar-right>
<a-button v-permission="['monitor:log:export']" @click="onExport"> <a-button v-permission="['monitor:log:export']" @click="onExport">
<template #icon> <template #icon>
<icon-download /> <icon-download />

View File

@@ -11,7 +11,7 @@
:disabled-tools="['size']" :disabled-tools="['size']"
@refresh="search" @refresh="search"
> >
<template #custom-left> <template #toolbar-left>
<a-input v-model="queryForm.nickname" placeholder="请输入用户名/昵称" allow-clear @change="search"> <a-input v-model="queryForm.nickname" placeholder="请输入用户名/昵称" allow-clear @change="search">
<template #prefix><icon-search /></template> <template #prefix><icon-search /></template>
</a-input> </a-input>

View File

@@ -12,7 +12,7 @@
:disabled-column-keys="['name']" :disabled-column-keys="['name']"
@refresh="search" @refresh="search"
> >
<template #custom-left> <template #toolbar-left>
<a-select <a-select
v-model="queryForm.groupName" v-model="queryForm.groupName"
placeholder="请选择任务组" placeholder="请选择任务组"
@@ -27,7 +27,7 @@
<template #default>重置</template> <template #default>重置</template>
</a-button> </a-button>
</template> </template>
<template #custom-right> <template #toolbar-right>
<a-button v-permission="['schedule:job:add']" type="primary" @click="onAdd"> <a-button v-permission="['schedule:job:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template> <template #icon><icon-plus /></template>
<span>新增</span> <span>新增</span>

View File

@@ -11,7 +11,7 @@
:disabled-tools="['size']" :disabled-tools="['size']"
@refresh="search" @refresh="search"
> >
<template #custom-left> <template #toolbar-left>
<a-select <a-select
v-model="queryForm.groupName" v-model="queryForm.groupName"
placeholder="请选择任务组" placeholder="请选择任务组"

View File

@@ -16,7 +16,7 @@
@select="select" @select="select"
@refresh="search" @refresh="search"
> >
<template #custom-left> <template #toolbar-left>
<a-input v-model="queryForm.title" placeholder="请输入标题" allow-clear @change="search"> <a-input v-model="queryForm.title" placeholder="请输入标题" allow-clear @change="search">
<template #prefix><icon-search /></template> <template #prefix><icon-search /></template>
</a-input> </a-input>
@@ -35,7 +35,7 @@
<template #default>重置</template> <template #default>重置</template>
</a-button> </a-button>
</template> </template>
<template #custom-right> <template #toolbar-right>
<a-button type="primary" status="danger" :disabled="!selectedKeys.length" @click="onDelete"> <a-button type="primary" status="danger" :disabled="!selectedKeys.length" @click="onDelete">
<template #icon><icon-delete /></template> <template #icon><icon-delete /></template>
<span>删除</span> <span>删除</span>

View File

@@ -17,7 +17,7 @@
<IconDown v-if="expanded" /> <IconDown v-if="expanded" />
<IconRight v-else /> <IconRight v-else />
</template> </template>
<template #custom-left> <template #toolbar-left>
<a-input v-model="name" placeholder="请输入名称" allow-clear @change="search"> <a-input v-model="name" placeholder="请输入名称" allow-clear @change="search">
<template #prefix><icon-search /></template> <template #prefix><icon-search /></template>
</a-input> </a-input>
@@ -26,7 +26,7 @@
<template #default>重置</template> <template #default>重置</template>
</a-button> </a-button>
</template> </template>
<template #custom-right> <template #toolbar-right>
<a-button v-permission="['system:dept:add']" type="primary" @click="onAdd()"> <a-button v-permission="['system:dept:add']" type="primary" @click="onAdd()">
<template #icon><icon-plus /></template> <template #icon><icon-plus /></template>
<span>新增</span> <span>新增</span>

View File

@@ -2,9 +2,7 @@
<div class="table-page"> <div class="table-page">
<a-row justify="space-between" align="center" class="header page_header"> <a-row justify="space-between" align="center" class="header page_header">
<a-space wrap> <a-space wrap>
<slot name="custom-title"> <div class="title">字典管理</div>
<div class="title">字典管理</div>
</slot>
</a-space> </a-space>
</a-row> </a-row>
<a-row align="stretch" :gutter="14" class="h-full page_content"> <a-row align="stretch" :gutter="14" class="h-full page_content">
@@ -23,7 +21,7 @@
:disabled-column-keys="['label']" :disabled-column-keys="['label']"
@refresh="search" @refresh="search"
> >
<template #custom-left> <template #toolbar-left>
<a-input v-model="queryForm.description" placeholder="请输入标签/描述" allow-clear @change="search"> <a-input v-model="queryForm.description" placeholder="请输入标签/描述" allow-clear @change="search">
<template #prefix><icon-search /></template> <template #prefix><icon-search /></template>
</a-input> </a-input>
@@ -32,7 +30,7 @@
<template #default>重置</template> <template #default>重置</template>
</a-button> </a-button>
</template> </template>
<template #custom-right> <template #toolbar-right>
<a-button v-permission="['system:dict:item:add']" type="primary" @click="onAdd"> <a-button v-permission="['system:dict:item:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template> <template #icon><icon-plus /></template>
<span>新增</span> <span>新增</span>

View File

@@ -16,7 +16,7 @@
<IconDown v-if="expanded" /> <IconDown v-if="expanded" />
<IconRight v-else /> <IconRight v-else />
</template> </template>
<template #custom-left> <template #toolbar-left>
<a-input v-model="title" placeholder="请输入菜单标题" allow-clear @change="search"> <a-input v-model="title" placeholder="请输入菜单标题" allow-clear @change="search">
<template #prefix><icon-search /></template> <template #prefix><icon-search /></template>
</a-input> </a-input>
@@ -25,7 +25,7 @@
<template #default>重置</template> <template #default>重置</template>
</a-button> </a-button>
</template> </template>
<template #custom-right> <template #toolbar-right>
<a-button v-permission="['system:menu:add']" type="primary" @click="onAdd()"> <a-button v-permission="['system:menu:add']" type="primary" @click="onAdd()">
<template #icon><icon-plus /></template> <template #icon><icon-plus /></template>
<span>新增</span> <span>新增</span>

View File

@@ -12,7 +12,7 @@
:disabled-column-keys="['title']" :disabled-column-keys="['title']"
@refresh="search" @refresh="search"
> >
<template #custom-left> <template #toolbar-left>
<a-input v-model="queryForm.title" placeholder="请输入标题" allow-clear @change="search"> <a-input v-model="queryForm.title" placeholder="请输入标题" allow-clear @change="search">
<template #prefix><icon-search /></template> <template #prefix><icon-search /></template>
</a-input> </a-input>
@@ -29,7 +29,7 @@
<template #default>重置</template> <template #default>重置</template>
</a-button> </a-button>
</template> </template>
<template #custom-right> <template #toolbar-right>
<a-button v-permission="['system:notice:add']" type="primary" @click="onAdd"> <a-button v-permission="['system:notice:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template> <template #icon><icon-plus /></template>
<span>新增</span> <span>新增</span>

View File

@@ -12,7 +12,7 @@
:disabled-column-keys="['name']" :disabled-column-keys="['name']"
@refresh="search" @refresh="search"
> >
<template #custom-left> <template #toolbar-left>
<a-input v-model="queryForm.description" placeholder="请输入名称/编码/描述" allow-clear @change="search"> <a-input v-model="queryForm.description" placeholder="请输入名称/编码/描述" allow-clear @change="search">
<template #prefix><icon-search /></template> <template #prefix><icon-search /></template>
</a-input> </a-input>
@@ -21,7 +21,7 @@
<template #default>重置</template> <template #default>重置</template>
</a-button> </a-button>
</template> </template>
<template #custom-right> <template #toolbar-right>
<a-button v-permission="['system:role:add']" type="primary" @click="onAdd"> <a-button v-permission="['system:role:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template> <template #icon><icon-plus /></template>
<span>新增</span> <span>新增</span>

View File

@@ -12,7 +12,7 @@
:disabled-column-keys="['name']" :disabled-column-keys="['name']"
@refresh="search" @refresh="search"
> >
<template #custom-left> <template #toolbar-left>
<a-input v-model="queryForm.description" placeholder="请输入名称/编码/描述" allow-clear @change="search"> <a-input v-model="queryForm.description" placeholder="请输入名称/编码/描述" allow-clear @change="search">
<template #prefix><icon-search /></template> <template #prefix><icon-search /></template>
</a-input> </a-input>
@@ -29,7 +29,7 @@
<template #default>重置</template> <template #default>重置</template>
</a-button> </a-button>
</template> </template>
<template #custom-right> <template #toolbar-right>
<a-button v-permission="['system:storage:add']" type="primary" @click="onAdd"> <a-button v-permission="['system:storage:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template> <template #icon><icon-plus /></template>
<span>新增</span> <span>新增</span>

View File

@@ -2,9 +2,7 @@
<div class="table-page"> <div class="table-page">
<a-row justify="space-between" align="center" class="header page_header"> <a-row justify="space-between" align="center" class="header page_header">
<a-space wrap> <a-space wrap>
<slot name="custom-title"> <div class="title">用户管理</div>
<div class="title">用户管理</div>
</slot>
</a-space> </a-space>
</a-row> </a-row>
<a-row align="stretch" :gutter="14" class="h-full page_content"> <a-row align="stretch" :gutter="14" class="h-full page_content">
@@ -12,7 +10,6 @@
<DeptTree placeholder="请输入名称" @node-click="handleSelectDept" /> <DeptTree placeholder="请输入名称" @node-click="handleSelectDept" />
</a-col> </a-col>
<a-col :xs="24" :sm="24" :md="18" :lg="19" :xl="19" :xxl="20" class="h-full ov-hidden"> <a-col :xs="24" :sm="24" :md="18" :lg="19" :xl="19" :xxl="20" class="h-full ov-hidden">
<GiForm v-model="queryForm" :options="options" :columns="queryFormColumns" @search="search" @reset="reset"></GiForm>
<GiTable <GiTable
row-key="id" row-key="id"
:data="dataList" :data="dataList"
@@ -24,7 +21,10 @@
:disabled-column-keys="['username']" :disabled-column-keys="['username']"
@refresh="search" @refresh="search"
> >
<template #custom-left> <template #top>
<GiForm v-model="queryForm" :options="options" :columns="queryFormColumns" @search="search" @reset="reset"></GiForm>
</template>
<template #toolbar-left>
<a-button v-permission="['system:user:add']" type="primary" @click="onAdd"> <a-button v-permission="['system:user:add']" type="primary" @click="onAdd">
<template #icon> <template #icon>
<icon-plus /> <icon-plus />
@@ -38,7 +38,7 @@
<span>导入</span> <span>导入</span>
</a-button> </a-button>
</template> </template>
<template #custom-right> <template #toolbar-right>
<a-button v-permission="['system:user:export']" @click="onExport"> <a-button v-permission="['system:user:export']" @click="onExport">
<template #icon> <template #icon>
<icon-download /> <icon-download />
@@ -76,7 +76,11 @@
删除 删除
</a-link> </a-link>
<a-dropdown> <a-dropdown>
<a-link v-if="has.hasPermOr(['system:user:resetPwd'])" type="text">更多</a-link> <a-button v-if="has.hasPermOr(['system:user:resetPwd'])" type="text" size="mini">
<template #icon>
<icon-more :size="16" />
</template>
</a-button>
<template #content> <template #content>
<a-doption v-permission="['system:user:resetPwd']" @click="onResetPwd(record)">重置密码</a-doption> <a-doption v-permission="['system:user:resetPwd']" @click="onResetPwd(record)">重置密码</a-doption>
</template> </template>
@@ -201,7 +205,7 @@ const columns: TableInstanceColumns[] = [
{ {
title: '操作', title: '操作',
slotName: 'action', slotName: 'action',
width: 200, width: 150,
align: 'center', align: 'center',
fixed: !isMobile() ? 'right' : undefined, fixed: !isMobile() ? 'right' : undefined,
show: has.hasPermOr(['system:user:update', 'system:user:delete', 'system:user:resetPwd']) show: has.hasPermOr(['system:user:update', 'system:user:delete', 'system:user:resetPwd'])

View File

@@ -47,7 +47,7 @@
:disabled-column-keys="['tableName']" :disabled-column-keys="['tableName']"
@change="handleChangeSort" @change="handleChangeSort"
> >
<template #custom-left> <template #toolbar-left>
<a-popconfirm <a-popconfirm
content="是否确定同步最新数据表结构?同步后只要不点击确定保存,则不影响原有配置数据。" content="是否确定同步最新数据表结构?同步后只要不点击确定保存,则不影响原有配置数据。"
type="warning" type="warning"

View File

@@ -12,7 +12,7 @@
:disabled-column-keys="['tableName']" :disabled-column-keys="['tableName']"
@refresh="search" @refresh="search"
> >
<template #custom-left> <template #toolbar-left>
<a-input v-model="queryForm.tableName" placeholder="请输入表名称" allow-clear @change="search"> <a-input v-model="queryForm.tableName" placeholder="请输入表名称" allow-clear @change="search">
<template #prefix><icon-search /></template> <template #prefix><icon-search /></template>
</a-input> </a-input>