refactor(projects): refactor page: user-management [重构用户管理页面]

This commit is contained in:
Soybean
2022-09-29 00:24:59 +08:00
parent 88e535f63c
commit 468b4bb0e1
26 changed files with 340 additions and 351 deletions

View File

@ -3,21 +3,20 @@ import type { MockMethod } from 'vite-plugin-mock';
const apis: MockMethod[] = [
{
url: '/mock/getUserManagementList',
url: '/mock/getAllUserList',
method: 'post',
response: (): Service.MockServiceResult<ApiUserManagement.UserTable[]> => {
response: (): Service.MockServiceResult<ApiUserManagement.User[]> => {
const data = mock({
'list|1000': [
{
id: '@id',
name: '@cname',
'age|20-36': 36,
userName: '@cname',
'age|18-56': 56,
'gender|1': ['0', '1', null],
phone:
/^[1](([3][0-9])|([4][01456789])|([5][012356789])|([6][2567])|([7][0-8])|([8][0-9])|([9][012356789]))[0-9]{8}$/,
email: '@email("qq.com")',
'role|1': ['super', 'admin', 'user'],
'disabled|1': true
'email|1': ['@email("qq.com")', null],
'userStatus|1': ['1', '2', '3', '4', null]
}
]
});