Skip to content

Commit

Permalink
fix: 修复用户管理分页条消失错误,优化表格 slot 命名
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Oct 13, 2024
1 parent 50a6d17 commit 6a77168
Show file tree
Hide file tree
Showing 17 changed files with 43 additions and 40 deletions.
7 changes: 5 additions & 2 deletions src/components/GiTable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
</slot>
</a-space>
</a-row>
<a-row>
<slot name="top"></slot>
</a-row>
<a-row justify="space-between" align="center" class="gi-table__toolbar">
<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 wrap class="gi-table__toolbar-right" :size="[8, 8]">
<slot name="custom-right"></slot>
<slot name="toolbar-right"></slot>
<a-tooltip content="刷新">
<a-button v-if="showRefreshBtn" @click="refresh">
<template #icon><icon-refresh /></template>
Expand Down
4 changes: 1 addition & 3 deletions src/views/monitor/log/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
<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>
<div class="title">系统日志</div>
</a-space>
</a-row>
<a-tabs v-model:active-key="activeKey" type="card-gutter" size="large" @change="change">
Expand Down
4 changes: 2 additions & 2 deletions src/views/monitor/log/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@filter-change="filterChange"
@refresh="search"
>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="queryForm.createUserString" placeholder="请输入登录用户" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
Expand All @@ -23,7 +23,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['monitor:log:export']" @click="onExport">
<template #icon>
<icon-download />
Expand Down
4 changes: 2 additions & 2 deletions src/views/monitor/log/operation/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@filter-change="filterChange"
@refresh="search"
>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="queryForm.createUserString" placeholder="请输入操作人" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
Expand All @@ -24,7 +24,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['monitor:log:export']" @click="onExport">
<template #icon>
<icon-download />
Expand Down
2 changes: 1 addition & 1 deletion src/views/monitor/online/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:disabled-tools="['size']"
@refresh="search"
>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="queryForm.nickname" placeholder="请输入用户名/昵称" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
Expand Down
4 changes: 2 additions & 2 deletions src/views/schedule/job/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:disabled-column-keys="['name']"
@refresh="search"
>
<template #custom-left>
<template #toolbar-left>
<a-select
v-model="queryForm.groupName"
placeholder="请选择任务组"
Expand All @@ -27,7 +27,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['schedule:job:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>
Expand Down
2 changes: 1 addition & 1 deletion src/views/schedule/log/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:disabled-tools="['size']"
@refresh="search"
>
<template #custom-left>
<template #toolbar-left>
<a-select
v-model="queryForm.groupName"
placeholder="请选择任务组"
Expand Down
4 changes: 2 additions & 2 deletions src/views/setting/message/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@select="select"
@refresh="search"
>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="queryForm.title" placeholder="请输入标题" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
Expand All @@ -35,7 +35,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button type="primary" status="danger" :disabled="!selectedKeys.length" @click="onDelete">
<template #icon><icon-delete /></template>
<span>删除</span>
Expand Down
4 changes: 2 additions & 2 deletions src/views/system/dept/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<IconDown v-if="expanded" />
<IconRight v-else />
</template>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="name" placeholder="请输入名称" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
Expand All @@ -26,7 +26,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['system:dept:add']" type="primary" @click="onAdd()">
<template #icon><icon-plus /></template>
<span>新增</span>
Expand Down
8 changes: 3 additions & 5 deletions src/views/system/dict/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
<div class="table-page">
<a-row justify="space-between" align="center" class="header page_header">
<a-space wrap>
<slot name="custom-title">
<div class="title">字典管理</div>
</slot>
<div class="title">字典管理</div>
</a-space>
</a-row>
<a-row align="stretch" :gutter="14" class="h-full page_content">
Expand All @@ -23,7 +21,7 @@
:disabled-column-keys="['label']"
@refresh="search"
>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="queryForm.description" placeholder="请输入标签/描述" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
Expand All @@ -32,7 +30,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['system:dict:item:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>
Expand Down
4 changes: 2 additions & 2 deletions src/views/system/menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<IconDown v-if="expanded" />
<IconRight v-else />
</template>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="title" placeholder="请输入菜单标题" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
Expand All @@ -25,7 +25,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['system:menu:add']" type="primary" @click="onAdd()">
<template #icon><icon-plus /></template>
<span>新增</span>
Expand Down
4 changes: 2 additions & 2 deletions src/views/system/notice/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:disabled-column-keys="['title']"
@refresh="search"
>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="queryForm.title" placeholder="请输入标题" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
Expand All @@ -29,7 +29,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['system:notice:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>
Expand Down
4 changes: 2 additions & 2 deletions src/views/system/role/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:disabled-column-keys="['name']"
@refresh="search"
>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="queryForm.description" placeholder="请输入名称/编码/描述" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
Expand All @@ -21,7 +21,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['system:role:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>
Expand Down
4 changes: 2 additions & 2 deletions src/views/system/storage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:disabled-column-keys="['name']"
@refresh="search"
>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="queryForm.description" placeholder="请输入名称/编码/描述" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
Expand All @@ -29,7 +29,7 @@
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['system:storage:add']" type="primary" @click="onAdd">
<template #icon><icon-plus /></template>
<span>新增</span>
Expand Down
20 changes: 12 additions & 8 deletions src/views/system/user/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@
<div class="table-page">
<a-row justify="space-between" align="center" class="header page_header">
<a-space wrap>
<slot name="custom-title">
<div class="title">用户管理</div>
</slot>
<div class="title">用户管理</div>
</a-space>
</a-row>
<a-row align="stretch" :gutter="14" class="h-full page_content">
<a-col :xs="0" :sm="0" :md="6" :lg="5" :xl="5" :xxl="4" class="h-full ov-hidden">
<DeptTree placeholder="请输入名称" @node-click="handleSelectDept" />
</a-col>
<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
row-key="id"
:data="dataList"
Expand All @@ -24,7 +21,10 @@
:disabled-column-keys="['username']"
@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">
<template #icon>
<icon-plus />
Expand All @@ -38,7 +38,7 @@
<span>导入</span>
</a-button>
</template>
<template #custom-right>
<template #toolbar-right>
<a-button v-permission="['system:user:export']" @click="onExport">
<template #icon>
<icon-download />
Expand Down Expand Up @@ -76,7 +76,11 @@
删除
</a-link>
<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>
<a-doption v-permission="['system:user:resetPwd']" @click="onResetPwd(record)">重置密码</a-doption>
</template>
Expand Down Expand Up @@ -201,7 +205,7 @@ const columns: TableInstanceColumns[] = [
{
title: '操作',
slotName: 'action',
width: 200,
width: 150,
align: 'center',
fixed: !isMobile() ? 'right' : undefined,
show: has.hasPermOr(['system:user:update', 'system:user:delete', 'system:user:resetPwd'])
Expand Down
2 changes: 1 addition & 1 deletion src/views/tool/generator/GenConfigDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
:disabled-column-keys="['tableName']"
@change="handleChangeSort"
>
<template #custom-left>
<template #toolbar-left>
<a-popconfirm
content="是否确定同步最新数据表结构?同步后只要不点击确定保存,则不影响原有配置数据。"
type="warning"
Expand Down
2 changes: 1 addition & 1 deletion src/views/tool/generator/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:disabled-column-keys="['tableName']"
@refresh="search"
>
<template #custom-left>
<template #toolbar-left>
<a-input v-model="queryForm.tableName" placeholder="请输入表名称" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
Expand Down

0 comments on commit 6a77168

Please sign in to comment.