优化
This commit is contained in:
@@ -43,12 +43,14 @@ const queryFields = computed<QueryField[]>(() => [
|
||||
{
|
||||
key: 'keyword',
|
||||
type: 'input',
|
||||
label: '用户关键词',
|
||||
placeholder: '姓名、手机号、邮箱或员工编号',
|
||||
props: { maxlength: 128, 'aria-label': '用户关键词' },
|
||||
},
|
||||
{
|
||||
key: 'status',
|
||||
type: 'select',
|
||||
label: '状态',
|
||||
placeholder: '全部状态',
|
||||
props: { 'aria-label': '用户状态' },
|
||||
options: [
|
||||
@@ -116,8 +118,8 @@ const formRules = computed<FormRules>(() => ({
|
||||
|
||||
const userColumns: DataTableColumn[] = [
|
||||
{ key: 'actions', label: '操作', width: 170, fixed: 'left', slotName: 'actions' },
|
||||
{ prop: 'username', label: '用户名', minWidth: 145 },
|
||||
{ prop: 'displayName', label: '姓名', minWidth: 130 },
|
||||
{ key: 'username', prop: 'username', label: '用户名', minWidth: 145 },
|
||||
{ key: 'displayName', prop: 'displayName', label: '姓名', minWidth: 130 },
|
||||
{ key: 'roles', label: '角色', minWidth: 180, slotName: 'roles' },
|
||||
{ key: 'status', label: '状态', width: 100, slotName: 'status' },
|
||||
{ key: 'lastLoginAt', label: '最后登录', minWidth: 170, slotName: 'lastLoginAt' },
|
||||
@@ -306,6 +308,7 @@ onMounted(loadInitialData)
|
||||
class="surface-panel"
|
||||
ariaLabel="用户筛选"
|
||||
:fields="queryFields"
|
||||
preference-key="internal-users-query"
|
||||
@search="applyFilters"
|
||||
/>
|
||||
|
||||
@@ -318,7 +321,7 @@ onMounted(loadInitialData)
|
||||
<el-button v-if="canCreate" type="primary" @click="openCreate"><Plus :size="16" />新增用户</el-button>
|
||||
</header>
|
||||
|
||||
<DataTable v-model:page="page" v-model:page-size="pageSize" :data="users" :columns="userColumns"
|
||||
<DataTable v-model:page="page" v-model:page-size="pageSize" :data="users" :columns="userColumns" preference-key="internal-users-table"
|
||||
:loading="loading" :total="total" aria-label="内部用户列表" row-key="membershipId" empty-text="没有符合筛选条件的内部用户">
|
||||
<template #actions="{ row }">
|
||||
<div class="table-actions">
|
||||
|
||||
Reference in New Issue
Block a user