feat(system-user): 合并用户信息列并拆分审核状态列表
- 删除用户列表中的头像、手机号和真实姓名列,新增用户信息列,显示头像、姓名和手机号 - 更新用户信息列布局和样式,姓名加粗,手机号显示灰色小字 - 前后端支持按审核状态拆分用户列表与待审列表 - 后端UserParam新增auditPending字段,实现“待审核/被驳回”状态查询 - UserMapper.xml调整查询条件逻辑,支持auditStatus和auditPending条件 - 用户列表固定auditStatus为1,待审列表使用auditPending=true过滤数据 - 待审列表审核按钮显示条件扩展至状态0和2(被驳回) - 清理用户列表的未使用auditStatus相关代码与绑定 - 前后端均通过类型检查和功能验证,保证改动正确落地
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
:columns="columns"
|
||||
:datasource="datasource"
|
||||
v-model:selection="selection"
|
||||
:scroll="{ x: 1300 }"
|
||||
:scroll="{ x: 1800 }"
|
||||
:where="defaultWhere"
|
||||
:customRow="customRow"
|
||||
cache-key="proSystemUserTable"
|
||||
@@ -114,16 +114,21 @@
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'avatar'">
|
||||
<a-avatar
|
||||
:size="30"
|
||||
:src="`${record.avatar}`"
|
||||
style="margin-right: 4px"
|
||||
>
|
||||
<template #icon>
|
||||
<UserOutlined />
|
||||
</template>
|
||||
</a-avatar>
|
||||
<template v-if="column.key === 'userInfo'">
|
||||
<div class="user-box">
|
||||
<a-avatar
|
||||
:size="36"
|
||||
:src="`${record.avatar}`"
|
||||
>
|
||||
<template #icon>
|
||||
<UserOutlined />
|
||||
</template>
|
||||
</a-avatar>
|
||||
<div class="user-info">
|
||||
<span class="user-name">{{ record.realName || '-' }}</span>
|
||||
<span class="user-mobile">{{ hasRole('superAdmin') ? record.phone : record.mobile }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="column.key === 'nickname'">
|
||||
<span>{{ record.nickname }}</span>
|
||||
@@ -131,10 +136,6 @@
|
||||
<template v-if="column.key === 'storeName'">
|
||||
<span :title="record.storeName">{{ record.storeName || '-' }}</span>
|
||||
</template>
|
||||
<template v-if="column.key === 'mobile'">
|
||||
<span v-if="hasRole('superAdmin')">{{ record.phone }}</span>
|
||||
<span v-else>{{ record.mobile }}</span>
|
||||
</template>
|
||||
<template v-if="column.key === 'roles'">
|
||||
<a-tag v-for="item in record.roles" :key="item.roleId" color="blue">
|
||||
{{ item.roleName }}
|
||||
@@ -325,14 +326,12 @@
|
||||
const searchWhere = reactive({
|
||||
roleId: undefined,
|
||||
platform: undefined,
|
||||
isAdmin: undefined,
|
||||
auditStatus: undefined
|
||||
isAdmin: undefined
|
||||
});
|
||||
const resetSearch = () => {
|
||||
searchWhere.roleId = undefined;
|
||||
searchWhere.platform = undefined;
|
||||
searchWhere.isAdmin = undefined;
|
||||
searchWhere.auditStatus = undefined;
|
||||
reload();
|
||||
};
|
||||
const userStore = useUserStore();
|
||||
@@ -393,57 +392,39 @@
|
||||
title: 'ID',
|
||||
dataIndex: 'userId',
|
||||
width: 90,
|
||||
fixed: 'left',
|
||||
showSorterTooltip: false
|
||||
},
|
||||
{
|
||||
title: '头像',
|
||||
key: 'avatar',
|
||||
dataIndex: 'avatar',
|
||||
align: 'center',
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '手机号码',
|
||||
dataIndex: 'mobile',
|
||||
align: 'center',
|
||||
key: 'mobile',
|
||||
showSorterTooltip: false
|
||||
},
|
||||
{
|
||||
title: '真实姓名',
|
||||
dataIndex: 'realName',
|
||||
align: 'center',
|
||||
showSorterTooltip: false
|
||||
title: '用户信息',
|
||||
key: 'userInfo',
|
||||
fixed: 'left',
|
||||
width: 220
|
||||
},
|
||||
{
|
||||
title: '昵称',
|
||||
key: 'nickname',
|
||||
align: 'center',
|
||||
dataIndex: 'nickname'
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
dataIndex: 'sex',
|
||||
align: 'center',
|
||||
showSorterTooltip: false,
|
||||
customRender: ({ text }) => ['', '男', '女'][text]
|
||||
},
|
||||
{
|
||||
title: '邮箱',
|
||||
dataIndex: 'email',
|
||||
align: 'center',
|
||||
hideInTable: true,
|
||||
showSorterTooltip: false
|
||||
},
|
||||
{
|
||||
title: '可用余额',
|
||||
dataIndex: 'balance',
|
||||
align: 'center'
|
||||
sorter: true
|
||||
},
|
||||
{
|
||||
title: '可用积分',
|
||||
dataIndex: 'points',
|
||||
align: 'center',
|
||||
sorter: true
|
||||
},
|
||||
{
|
||||
@@ -451,21 +432,18 @@
|
||||
dataIndex: 'expendMoney',
|
||||
key: 'expendMoney',
|
||||
sorter: true,
|
||||
align: 'center',
|
||||
hideInTable: true,
|
||||
width: 120,
|
||||
showSorterTooltip: false
|
||||
},
|
||||
{
|
||||
title: '注册来源',
|
||||
key: 'platform',
|
||||
align: 'center',
|
||||
dataIndex: 'platform',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '证件号码',
|
||||
dataIndex: 'idCard',
|
||||
align: 'center',
|
||||
hideInTable: true
|
||||
},
|
||||
{
|
||||
@@ -474,26 +452,23 @@
|
||||
key: 'birthday',
|
||||
hideInTable: true
|
||||
},
|
||||
// {
|
||||
// title: '省份',
|
||||
// dataIndex: 'province',
|
||||
// key: 'province',
|
||||
// hideInTable: true
|
||||
// },
|
||||
// {
|
||||
// title: '城市',
|
||||
// dataIndex: 'city',
|
||||
// key: 'city',
|
||||
// hideInTable: true,
|
||||
// showSorterTooltip: false
|
||||
// },
|
||||
// {
|
||||
// title: '地区',
|
||||
// dataIndex: 'region',
|
||||
// key: 'region',
|
||||
// hideInTable: true,
|
||||
// showSorterTooltip: false
|
||||
// },
|
||||
{
|
||||
title: '省份',
|
||||
dataIndex: 'province',
|
||||
key: 'province',
|
||||
},
|
||||
{
|
||||
title: '城市',
|
||||
dataIndex: 'city',
|
||||
key: 'city',
|
||||
showSorterTooltip: false
|
||||
},
|
||||
{
|
||||
title: '地区',
|
||||
dataIndex: 'region',
|
||||
key: 'region',
|
||||
showSorterTooltip: false
|
||||
},
|
||||
{
|
||||
title: '邮箱认证',
|
||||
dataIndex: 'emailVerified',
|
||||
@@ -561,7 +536,7 @@
|
||||
roleId: searchWhere.roleId,
|
||||
platform: searchWhere.platform,
|
||||
isAdmin: searchWhere.isAdmin || undefined,
|
||||
auditStatus: searchWhere.auditStatus || undefined
|
||||
auditStatus: 1
|
||||
};
|
||||
return pageUsers({ page, limit, ...params, ...orders });
|
||||
};
|
||||
@@ -841,11 +816,23 @@
|
||||
.user-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
|
||||
.user-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: start;
|
||||
align-items: flex-start;
|
||||
line-height: 1.5;
|
||||
|
||||
.user-name {
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.user-mobile {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user