refactor(F006): 用户列表隐藏用户ID搜索条件与列(用不到)
This commit is contained in:
parent
0519de9428
commit
092d1991c7
@ -3,7 +3,7 @@
|
|||||||
* F006 用户管理 (前台用户列表) - 2026-08-18 v2 简化版
|
* F006 用户管理 (前台用户列表) - 2026-08-18 v2 简化版
|
||||||
*
|
*
|
||||||
* 用户反馈: 列表内容简化 - 单行显示、无头像、字段保持原样 (仅 UI 美化)
|
* 用户反馈: 列表内容简化 - 单行显示、无头像、字段保持原样 (仅 UI 美化)
|
||||||
* 字段: 用户ID / 用户昵称 / 手机号 / 是否企业认证 / 关联企业 / 平台账户余额 / 禁用标识 / 注册时间 / 操作
|
* 字段: 用户昵称 / 手机号 / 是否企业认证 / 关联企业 / 平台账户余额 / 禁用标识 / 注册时间 / 操作 (用户ID 已按需求隐藏)
|
||||||
* 后端端点: GET /user/user/page / GET /user/user/export / POST /user/user/update / POST /user/user/delete
|
* 后端端点: GET /user/user/page / GET /user/user/export / POST /user/user/update / POST /user/user/delete
|
||||||
* 保留功能: tab 全部/正常/已禁用(stats 与 tab 解耦) / 搜索 / 导出 / 新建编辑(UserFormDialog) / 批量操作
|
* 保留功能: tab 全部/正常/已禁用(stats 与 tab 解耦) / 搜索 / 导出 / 新建编辑(UserFormDialog) / 批量操作
|
||||||
*/
|
*/
|
||||||
@ -49,7 +49,6 @@ const exporting = ref(false)
|
|||||||
const query = reactive({
|
const query = reactive({
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
userId: '',
|
|
||||||
nickName: '',
|
nickName: '',
|
||||||
mobile: '',
|
mobile: '',
|
||||||
enterpriseName: '',
|
enterpriseName: '',
|
||||||
@ -69,8 +68,7 @@ const CERT_META: Record<number, { label: string; color: string; bg: string }> =
|
|||||||
|
|
||||||
const columns: any[] = [
|
const columns: any[] = [
|
||||||
{ type: 'selection', width: 48, fixed: 'left', align: 'center' },
|
{ type: 'selection', width: 48, fixed: 'left', align: 'center' },
|
||||||
{ prop: 'id', label: '用户ID', width: 110, slot: 'id', align: 'center' },
|
{ prop: 'nickName', label: '用户昵称', minWidth: 200, slot: 'nickName' },
|
||||||
{ prop: 'nickName', label: '用户昵称', minWidth: 140, slot: 'nickName' },
|
|
||||||
{ prop: 'mobile', label: '手机号', width: 140, slot: 'mobile' },
|
{ prop: 'mobile', label: '手机号', width: 140, slot: 'mobile' },
|
||||||
{ prop: 'isEnterprise', label: '是否企业认证', width: 120, slot: 'cert', align: 'center' },
|
{ prop: 'isEnterprise', label: '是否企业认证', width: 120, slot: 'cert', align: 'center' },
|
||||||
{ prop: 'enterpriseName', label: '关联企业', minWidth: 180, slot: 'enterpriseName' },
|
{ prop: 'enterpriseName', label: '关联企业', minWidth: 180, slot: 'enterpriseName' },
|
||||||
@ -97,7 +95,6 @@ function fmtDate(ts: number | null | undefined) {
|
|||||||
*/
|
*/
|
||||||
function buildSearchParams() {
|
function buildSearchParams() {
|
||||||
const params: any = {}
|
const params: any = {}
|
||||||
if (query.userId) params.id = query.userId
|
|
||||||
if (query.nickName) params.nickName = query.nickName
|
if (query.nickName) params.nickName = query.nickName
|
||||||
if (query.mobile) params.mobile = query.mobile
|
if (query.mobile) params.mobile = query.mobile
|
||||||
if (query.enterpriseName) params.enterpriseName = query.enterpriseName
|
if (query.enterpriseName) params.enterpriseName = query.enterpriseName
|
||||||
@ -179,7 +176,7 @@ function onPageChange(p: number) { query.page = p; load() }
|
|||||||
function onLimitChange(l: number) { query.limit = l; query.page = 1; load() }
|
function onLimitChange(l: number) { query.limit = l; query.page = 1; load() }
|
||||||
function onSearch() { query.page = 1; load() }
|
function onSearch() { query.page = 1; load() }
|
||||||
function onReset() {
|
function onReset() {
|
||||||
query.userId = ''; query.nickName = ''; query.mobile = ''
|
query.nickName = ''; query.mobile = ''
|
||||||
query.enterpriseName = ''; query.isEnterprise = ''; query.enabled = ''
|
query.enterpriseName = ''; query.isEnterprise = ''; query.enabled = ''
|
||||||
activeTab.value = 'all'
|
activeTab.value = 'all'
|
||||||
query.page = 1
|
query.page = 1
|
||||||
@ -299,7 +296,6 @@ onMounted(load)
|
|||||||
<SearchBar
|
<SearchBar
|
||||||
v-model:filters="query"
|
v-model:filters="query"
|
||||||
:fields="[
|
:fields="[
|
||||||
{ key: 'userId', label: '用户ID', type: 'text', placeholder: '用户ID' },
|
|
||||||
{ key: 'nickName', label: '用户昵称', type: 'text', placeholder: '用户昵称' },
|
{ key: 'nickName', label: '用户昵称', type: 'text', placeholder: '用户昵称' },
|
||||||
{ key: 'mobile', label: '手机号', type: 'text', placeholder: '手机号' },
|
{ key: 'mobile', label: '手机号', type: 'text', placeholder: '手机号' },
|
||||||
{ key: 'isEnterprise', label: '是否企业认证', type: 'select', placeholder: '所有状态', width: '160px',
|
{ key: 'isEnterprise', label: '是否企业认证', type: 'select', placeholder: '所有状态', width: '160px',
|
||||||
@ -340,11 +336,6 @@ onMounted(load)
|
|||||||
@limit-change="onLimitChange"
|
@limit-change="onLimitChange"
|
||||||
@selection-change="onSelectionChange"
|
@selection-change="onSelectionChange"
|
||||||
>
|
>
|
||||||
<!-- 用户ID: 等宽小字 -->
|
|
||||||
<template #id="{ row }">
|
|
||||||
<span class="id-cell">{{ row.id }}</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 用户昵称: 单行 -->
|
<!-- 用户昵称: 单行 -->
|
||||||
<template #nickName="{ row }">
|
<template #nickName="{ row }">
|
||||||
<span class="nick-cell">{{ row.nickName }}</span>
|
<span class="nick-cell">{{ row.nickName }}</span>
|
||||||
@ -419,10 +410,6 @@ onMounted(load)
|
|||||||
.batch-actions { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
|
.batch-actions { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
|
||||||
|
|
||||||
/* ===== 单元格 (单行) ===== */
|
/* ===== 单元格 (单行) ===== */
|
||||||
.id-cell {
|
|
||||||
font-family: 'SF Mono', Menlo, Consolas, monospace;
|
|
||||||
font-size: 12px; color: var(--ink-3);
|
|
||||||
}
|
|
||||||
.nick-cell { font-size: 14px; font-weight: 600; color: var(--ink); }
|
.nick-cell { font-size: 14px; font-weight: 600; color: var(--ink); }
|
||||||
.text-ellipsis {
|
.text-ellipsis {
|
||||||
display: inline-block; max-width: 100%;
|
display: inline-block; max-width: 100%;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user