first commit

This commit is contained in:
2026-10-25 23:14:53 +08:00
commit 4e9f3dcb13
25 changed files with 932 additions and 0 deletions
+66
View File
@@ -0,0 +1,66 @@
export const USER_STATUS = {
ENABLED: 1,
DISABLED: 0,
} as const
export type UserStatus = (typeof USER_STATUS)[keyof typeof USER_STATUS]
export interface MockUser {
id: number
username: string
nickname: string
mobile: string
email: string
status: UserStatus
deptName: string
roleNames: string[]
createTime: string
}
export const users: MockUser[] = Array.from({ length: 36 }, (_, index) => {
const id = index + 1
return {
id,
username: `user${String(id).padStart(3, '0')}`,
nickname: `测试用户${id}`,
mobile: `13${String(100000000 + id).slice(0, 9)}`,
email: `user${id}@example.com`,
status: id % 5 === 0 ? USER_STATUS.DISABLED : USER_STATUS.ENABLED,
deptName: id % 3 === 0 ? '运营部' : '技术部',
roleNames: id % 4 === 0 ? ['管理员'] : ['普通用户'],
createTime: new Date(Date.now() - id * 86400000).toISOString(),
}
})
export const menuRoutes = [
{
path: '/system',
component: 'Layout',
redirect: '/system/user',
meta: { title: '系统管理', icon: 'Setting', hidden: false },
children: [
{
path: 'user',
component: 'system/user/index',
name: 'User',
meta: { title: '用户管理', icon: 'User', hidden: false },
},
],
},
]
export const dashboardSummary = {
userTotal: 1024,
orderTotal: 8672,
gmv: 1289340.55,
pendingApproval: 12,
trend: [
{ date: '10-01', value: 120 },
{ date: '10-02', value: 200 },
{ date: '10-03', value: 150 },
{ date: '10-04', value: 320 },
{ date: '10-05', value: 280 },
{ date: '10-06', value: 410 },
{ date: '10-07', value: 365 },
],
}