This commit is contained in:
Ray.Hao committed 2026-04-13 08:06:57 +08:00
commit d17c4abfbf
12 files changed
+465 -454

No files matched your search

+15 -15
View File
@@ -8,15 +8,15 @@ export default defineMock([
code: "00000", code: "00000",
data: [ data: [
{ {
value: 1, value: "1",
label: "有来技术", label: "有来技术",
children: [ children: [
{ {
value: 2, value: "2",
label: "研发部门", label: "研发部门",
}, },
{ {
value: 3, value: "3",
label: "测试部门", label: "测试部门",
}, },
], ],
@@ -33,16 +33,16 @@ export default defineMock([
code: "00000", code: "00000",
data: [ data: [
{ {
id: 1, id: "1",
parentId: 0, parentId: "0",
name: "有来技术", name: "有来技术",
code: "YOULAI", code: "YOULAI",
sort: 1, sort: 1,
status: 1, status: 1,
children: [ children: [
{ {
id: 2, id: "2",
parentId: 1, parentId: "1",
name: "研发部门", name: "研发部门",
code: "RD001", code: "RD001",
sort: 1, sort: 1,
@@ -52,8 +52,8 @@ export default defineMock([
updateTime: "2022-04-19 12:46", updateTime: "2022-04-19 12:46",
}, },
{ {
id: 3, id: "3",
parentId: 1, parentId: "1",
name: "测试部门", name: "测试部门",
code: "QA001", code: "QA001",
sort: 1, sort: 1,
@@ -127,26 +127,26 @@ export default defineMock([
// 部门映射表数据 // 部门映射表数据
const deptMap: Record<string, any> = { const deptMap: Record<string, any> = {
1: { 1: {
id: 1, id: "1",
name: "有来技术", name: "有来技术",
code: "YOULAI", code: "YOULAI",
parentId: 0, parentId: "0",
status: 1, status: 1,
sort: 1, sort: 1,
}, },
2: { 2: {
id: 2, id: "2",
name: "研发部门", name: "研发部门",
code: "RD001", code: "RD001",
parentId: 1, parentId: "1",
status: 1, status: 1,
sort: 1, sort: 1,
}, },
3: { 3: {
id: 3, id: "3",
name: "测试部门", name: "测试部门",
code: "QA001", code: "QA001",
parentId: 1, parentId: "1",
status: 1, status: 1,
sort: 1, sort: 1,
}, },
+8 -8
View File
@@ -9,7 +9,7 @@ export default defineMock([
data: { data: {
list: [ list: [
{ {
id: 1, id: "1",
name: "性别", name: "性别",
dictCode: "gender", dictCode: "gender",
status: 1, status: 1,
@@ -104,7 +104,7 @@ export default defineMock([
data: { data: {
list: [ list: [
{ {
id: 1, id: "1",
dictCode: "gender", dictCode: "gender",
label: "男", label: "男",
value: "1", value: "1",
@@ -113,7 +113,7 @@ export default defineMock([
tagType: "P", tagType: "P",
}, },
{ {
id: 2, id: "2",
dictCode: "gender", dictCode: "gender",
label: "女", label: "女",
value: "2", value: "2",
@@ -122,7 +122,7 @@ export default defineMock([
tagType: "D", tagType: "D",
}, },
{ {
id: 3, id: "3",
dictCode: "gender", dictCode: "gender",
label: "保密", label: "保密",
value: "0", value: "0",
@@ -276,7 +276,7 @@ export default defineMock([
// 字典映射表数据 // 字典映射表数据
const dictMap: Record<string, any> = { const dictMap: Record<string, any> = {
1: { 1: {
id: 1, id: "1",
name: "性别", name: "性别",
dictCode: "gender", dictCode: "gender",
status: 1, status: 1,
@@ -286,7 +286,7 @@ const dictMap: Record<string, any> = {
// 字典项映射表数据 // 字典项映射表数据
const dictItemMap: Record<string, any> = { const dictItemMap: Record<string, any> = {
1: { 1: {
id: 1, id: "1",
value: "1", value: "1",
label: "男", label: "男",
sort: 1, sort: 1,
@@ -294,7 +294,7 @@ const dictItemMap: Record<string, any> = {
tagType: "P", tagType: "P",
}, },
2: { 2: {
id: 2, id: "2",
value: "2", value: "2",
label: "女", label: "女",
sort: 2, sort: 2,
@@ -302,7 +302,7 @@ const dictItemMap: Record<string, any> = {
tagType: "D", tagType: "D",
}, },
3: { 3: {
id: 3, id: "3",
value: "0", value: "0",
label: "保密", label: "保密",
sort: 3, sort: 3,
+10 -10
View File
@@ -9,7 +9,7 @@ export default defineMock([
data: { data: {
list: [ list: [
{ {
id: 36192, id: "36192",
module: "菜单", module: "菜单",
content: "菜单列表", content: "菜单列表",
requestUri: "/api/v1/menus", requestUri: "/api/v1/menus",
@@ -24,7 +24,7 @@ export default defineMock([
operator: "系统管理员", operator: "系统管理员",
}, },
{ {
id: 36190, id: "36190",
module: "字典", module: "字典",
content: "字典分页列表", content: "字典分页列表",
requestUri: "/api/v1/dicts", requestUri: "/api/v1/dicts",
@@ -39,7 +39,7 @@ export default defineMock([
operator: "系统管理员", operator: "系统管理员",
}, },
{ {
id: 36193, id: "36193",
module: "部门", module: "部门",
content: "部门列表", content: "部门列表",
requestUri: "/api/v1/depts", requestUri: "/api/v1/depts",
@@ -54,7 +54,7 @@ export default defineMock([
operator: "系统管理员", operator: "系统管理员",
}, },
{ {
id: 36191, id: "36191",
module: "菜单", module: "菜单",
content: "菜单列表", content: "菜单列表",
requestUri: "/api/v1/menus", requestUri: "/api/v1/menus",
@@ -69,7 +69,7 @@ export default defineMock([
operator: "系统管理员", operator: "系统管理员",
}, },
{ {
id: 36189, id: "36189",
module: "角色", module: "角色",
content: "角色分页列表", content: "角色分页列表",
requestUri: "/api/v1/roles", requestUri: "/api/v1/roles",
@@ -84,7 +84,7 @@ export default defineMock([
operator: "系统管理员", operator: "系统管理员",
}, },
{ {
id: 36188, id: "36188",
module: "用户", module: "用户",
content: "用户分页列表", content: "用户分页列表",
requestUri: "/api/v1/users", requestUri: "/api/v1/users",
@@ -99,7 +99,7 @@ export default defineMock([
operator: "系统管理员", operator: "系统管理员",
}, },
{ {
id: 36187, id: "36187",
module: "登录", module: "登录",
content: "登录", content: "登录",
requestUri: "/api/v1/auth/login", requestUri: "/api/v1/auth/login",
@@ -114,7 +114,7 @@ export default defineMock([
operator: "系统管理员", operator: "系统管理员",
}, },
{ {
id: 36186, id: "36186",
module: "登录", module: "登录",
content: "登录", content: "登录",
requestUri: "/api/v1/auth/login", requestUri: "/api/v1/auth/login",
@@ -129,7 +129,7 @@ export default defineMock([
operator: "系统管理员", operator: "系统管理员",
}, },
{ {
id: 36185, id: "36185",
module: "登录", module: "登录",
content: "登录", content: "登录",
requestUri: "/api/v1/auth/login", requestUri: "/api/v1/auth/login",
@@ -144,7 +144,7 @@ export default defineMock([
operator: "系统管理员", operator: "系统管理员",
}, },
{ {
id: 36184, id: "36184",
module: "登录", module: "登录",
content: "登录", content: "登录",
requestUri: "/api/v1/auth/login", requestUri: "/api/v1/auth/login",
+262 -242
View File
File diff suppressed because it is too large. Load diff
+25 -25
View File
@@ -9,7 +9,7 @@ export default defineMock([
data: { data: {
list: [ list: [
{ {
id: 1, id: "1",
title: "v2.12.0 新增系统日志,访问趋势统计功能。", title: "v2.12.0 新增系统日志,访问趋势统计功能。",
publishStatus: 1, publishStatus: 1,
type: 1, type: 1,
@@ -22,7 +22,7 @@ export default defineMock([
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
{ {
id: 2, id: "2",
title: "v2.13.0 新增菜单搜索。", title: "v2.13.0 新增菜单搜索。",
publishStatus: 1, publishStatus: 1,
type: 1, type: 1,
@@ -35,7 +35,7 @@ export default defineMock([
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
{ {
id: 3, id: "3",
title: "\r\nv2.14.0 新增个人中心。", title: "\r\nv2.14.0 新增个人中心。",
publishStatus: 1, publishStatus: 1,
type: 1, type: 1,
@@ -48,7 +48,7 @@ export default defineMock([
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
{ {
id: 4, id: "4",
title: "v2.15.0 登录页面改造。", title: "v2.15.0 登录页面改造。",
publishStatus: 1, publishStatus: 1,
type: 1, type: 1,
@@ -61,7 +61,7 @@ export default defineMock([
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
{ {
id: 5, id: "5",
title: "v2.16.0 通知公告、字典翻译组件。", title: "v2.16.0 通知公告、字典翻译组件。",
publishStatus: 1, publishStatus: 1,
type: 1, type: 1,
@@ -74,7 +74,7 @@ export default defineMock([
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
{ {
id: 6, id: "6",
title: "系统将于本周六凌晨 2 点进行维护,预计维护时间为 2 小时。", title: "系统将于本周六凌晨 2 点进行维护,预计维护时间为 2 小时。",
publishStatus: 1, publishStatus: 1,
type: 2, type: 2,
@@ -87,7 +87,7 @@ export default defineMock([
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
{ {
id: 7, id: "7",
title: "最近发现一些钓鱼邮件,请大家提高警惕,不要点击陌生链接。", title: "最近发现一些钓鱼邮件,请大家提高警惕,不要点击陌生链接。",
publishStatus: 1, publishStatus: 1,
type: 3, type: 3,
@@ -100,7 +100,7 @@ export default defineMock([
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
{ {
id: 8, id: "8",
title: "国庆假期从 10 月 1 日至 10 月 7 日放假,共 7 天。", title: "国庆假期从 10 月 1 日至 10 月 7 日放假,共 7 天。",
publishStatus: 1, publishStatus: 1,
type: 4, type: 4,
@@ -113,7 +113,7 @@ export default defineMock([
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
{ {
id: 9, id: "9",
title: "公司将在 10 月 15 日举办新产品发布会,敬请期待。", title: "公司将在 10 月 15 日举办新产品发布会,敬请期待。",
publishStatus: 1, publishStatus: 1,
type: 5, type: 5,
@@ -126,7 +126,7 @@ export default defineMock([
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
{ {
id: 10, id: "10",
title: "v2.16.1 版本修复了 WebSocket 重复连接导致的后台线程阻塞问题,优化了通知公告。", title: "v2.16.1 版本修复了 WebSocket 重复连接导致的后台线程阻塞问题,优化了通知公告。",
publishStatus: 1, publishStatus: 1,
type: 1, type: 1,
@@ -218,7 +218,7 @@ export default defineMock([
data: { data: {
list: [ list: [
{ {
id: 10, id: "10",
title: "v2.16.1 版本修复了 WebSocket 重复连接导致的后台线程阻塞问题,优化了通知公告。", title: "v2.16.1 版本修复了 WebSocket 重复连接导致的后台线程阻塞问题,优化了通知公告。",
type: 1, type: 1,
level: "L", level: "L",
@@ -227,7 +227,7 @@ export default defineMock([
isRead: 0, isRead: 0,
}, },
{ {
id: 9, id: "9",
title: "公司将在 10 月 15 日举办新产品发布会,敬请期待。", title: "公司将在 10 月 15 日举办新产品发布会,敬请期待。",
type: 5, type: 5,
level: "L", level: "L",
@@ -236,7 +236,7 @@ export default defineMock([
isRead: 0, isRead: 0,
}, },
{ {
id: 8, id: "8",
title: "国庆假期从 10 月 1 日至 10 月 7 日放假,共 7 天。", title: "国庆假期从 10 月 1 日至 10 月 7 日放假,共 7 天。",
type: 4, type: 4,
level: "L", level: "L",
@@ -245,7 +245,7 @@ export default defineMock([
isRead: 0, isRead: 0,
}, },
{ {
id: 7, id: "7",
title: "最近发现一些钓鱼邮件,请大家提高警惕,不要点击陌生链接。", title: "最近发现一些钓鱼邮件,请大家提高警惕,不要点击陌生链接。",
type: 3, type: 3,
level: "L", level: "L",
@@ -254,7 +254,7 @@ export default defineMock([
isRead: 0, isRead: 0,
}, },
{ {
id: 6, id: "6",
title: "系统将于本周六凌晨 2 点进行维护,预计维护时间为 2 小时。", title: "系统将于本周六凌晨 2 点进行维护,预计维护时间为 2 小时。",
type: 2, type: 2,
level: "L", level: "L",
@@ -273,7 +273,7 @@ export default defineMock([
// 通知映射表数据 // 通知映射表数据
const noticeMap: Record<string, any> = { const noticeMap: Record<string, any> = {
1: { 1: {
id: 1, id: "1",
title: "v2.12.0 新增系统日志,访问趋势统计功能。", title: "v2.12.0 新增系统日志,访问趋势统计功能。",
publishStatus: 1, publishStatus: 1,
type: 1, type: 1,
@@ -287,7 +287,7 @@ const noticeMap: Record<string, any> = {
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
2: { 2: {
id: 2, id: "2",
title: "v2.13.0 新增菜单搜索。", title: "v2.13.0 新增菜单搜索。",
publishStatus: 1, publishStatus: 1,
type: 1, type: 1,
@@ -301,7 +301,7 @@ const noticeMap: Record<string, any> = {
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
3: { 3: {
id: 3, id: "3",
title: "\r\nv2.14.0 新增个人中心。", title: "\r\nv2.14.0 新增个人中心。",
publishStatus: 1, publishStatus: 1,
type: 1, type: 1,
@@ -315,7 +315,7 @@ const noticeMap: Record<string, any> = {
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
4: { 4: {
id: 4, id: "4",
title: "v2.15.0 登录页面改造。", title: "v2.15.0 登录页面改造。",
publishStatus: 1, publishStatus: 1,
type: 1, type: 1,
@@ -330,7 +330,7 @@ const noticeMap: Record<string, any> = {
}, },
5: { 5: {
id: 5, id: "5",
title: "v2.16.0 通知公告、字典翻译组件。", title: "v2.16.0 通知公告、字典翻译组件。",
publishStatus: 1, publishStatus: 1,
type: 1, type: 1,
@@ -344,7 +344,7 @@ const noticeMap: Record<string, any> = {
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
6: { 6: {
id: 6, id: "6",
title: "系统将于本周六凌晨 2 点进行维护,预计维护时间为 2 小时。", title: "系统将于本周六凌晨 2 点进行维护,预计维护时间为 2 小时。",
publishStatus: 1, publishStatus: 1,
type: 2, type: 2,
@@ -358,7 +358,7 @@ const noticeMap: Record<string, any> = {
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
7: { 7: {
id: 7, id: "7",
title: "最近发现一些钓鱼邮件,请大家提高警惕,不要点击陌生链接。", title: "最近发现一些钓鱼邮件,请大家提高警惕,不要点击陌生链接。",
publishStatus: 1, publishStatus: 1,
type: 3, type: 3,
@@ -372,7 +372,7 @@ const noticeMap: Record<string, any> = {
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
8: { 8: {
id: 8, id: "8",
title: "国庆假期从 10 月 1 日至 10 月 7 日放假,共 7 天。", title: "国庆假期从 10 月 1 日至 10 月 7 日放假,共 7 天。",
publishStatus: 1, publishStatus: 1,
type: 4, type: 4,
@@ -386,7 +386,7 @@ const noticeMap: Record<string, any> = {
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
9: { 9: {
id: 9, id: "9",
title: "公司将在 10 月 15 日举办新产品发布会,敬请期待。", title: "公司将在 10 月 15 日举办新产品发布会,敬请期待。",
publishStatus: 1, publishStatus: 1,
type: 5, type: 5,
@@ -400,7 +400,7 @@ const noticeMap: Record<string, any> = {
revokeTime: "2024-09-30 17:21", revokeTime: "2024-09-30 17:21",
}, },
10: { 10: {
id: 10, id: "10",
title: "v2.16.1 版本修复了 WebSocket 重复连接导致的后台线程阻塞问题,优化了通知公告。", title: "v2.16.1 版本修复了 WebSocket 重复连接导致的后台线程阻塞问题,优化了通知公告。",
publishStatus: 1, publishStatus: 1,
type: 1, type: 1,
+18 -18
View File
@@ -7,12 +7,12 @@ export default defineMock([
body: { body: {
code: "00000", code: "00000",
data: [ data: [
{ value: 2, label: "系统管理员" }, { value: "2", label: "系统管理员" },
{ value: 4, label: "部门主管" }, { value: "4", label: "部门主管" },
{ value: 5, label: "部门成员" }, { value: "5", label: "部门成员" },
{ value: 6, label: "普通员工" }, { value: "6", label: "普通员工" },
{ value: 7, label: "自定义权限用户" }, { value: "7", label: "自定义权限用户" },
{ value: 3, label: "访问游客" }, { value: "3", label: "访问游客" },
], ],
msg: "一切ok", msg: "一切ok",
}, },
@@ -26,7 +26,7 @@ export default defineMock([
data: { data: {
list: [ list: [
{ {
id: 2, id: "2",
name: "系统管理员", name: "系统管理员",
code: "ADMIN", code: "ADMIN",
status: 1, status: 1,
@@ -36,7 +36,7 @@ export default defineMock([
updateTime: null, updateTime: null,
}, },
{ {
id: 3, id: "3",
name: "访问游客", name: "访问游客",
code: "GUEST", code: "GUEST",
status: 1, status: 1,
@@ -46,7 +46,7 @@ export default defineMock([
updateTime: "2019-05-05 16:00:00", updateTime: "2019-05-05 16:00:00",
}, },
{ {
id: 4, id: "4",
name: "部门主管", name: "部门主管",
code: "DEPT_MANAGER", code: "DEPT_MANAGER",
status: 1, status: 1,
@@ -56,7 +56,7 @@ export default defineMock([
updateTime: null, updateTime: null,
}, },
{ {
id: 5, id: "5",
name: "部门成员", name: "部门成员",
code: "DEPT_MEMBER", code: "DEPT_MEMBER",
status: 1, status: 1,
@@ -66,7 +66,7 @@ export default defineMock([
updateTime: null, updateTime: null,
}, },
{ {
id: 6, id: "6",
name: "普通员工", name: "普通员工",
code: "EMPLOYEE", code: "EMPLOYEE",
status: 1, status: 1,
@@ -76,7 +76,7 @@ export default defineMock([
updateTime: null, updateTime: null,
}, },
{ {
id: 7, id: "7",
name: "自定义权限用户", name: "自定义权限用户",
code: "CUSTOM_USER", code: "CUSTOM_USER",
status: 1, status: 1,
@@ -187,7 +187,7 @@ export default defineMock([
// 角色映射表数据 // 角色映射表数据
const roleMap: Record<string, any> = { const roleMap: Record<string, any> = {
2: { 2: {
id: 2, id: "2",
name: "系统管理员", name: "系统管理员",
code: "ADMIN", code: "ADMIN",
status: 1, status: 1,
@@ -197,7 +197,7 @@ const roleMap: Record<string, any> = {
updateTime: null, updateTime: null,
}, },
3: { 3: {
id: 3, id: "3",
name: "访问游客", name: "访问游客",
code: "GUEST", code: "GUEST",
status: 1, status: 1,
@@ -207,7 +207,7 @@ const roleMap: Record<string, any> = {
updateTime: "2019-05-05 16:00:00", updateTime: "2019-05-05 16:00:00",
}, },
4: { 4: {
id: 4, id: "4",
name: "部门主管", name: "部门主管",
code: "DEPT_MANAGER", code: "DEPT_MANAGER",
status: 1, status: 1,
@@ -217,7 +217,7 @@ const roleMap: Record<string, any> = {
updateTime: null, updateTime: null,
}, },
5: { 5: {
id: 5, id: "5",
name: "部门成员", name: "部门成员",
code: "DEPT_MEMBER", code: "DEPT_MEMBER",
status: 1, status: 1,
@@ -227,7 +227,7 @@ const roleMap: Record<string, any> = {
updateTime: null, updateTime: null,
}, },
6: { 6: {
id: 6, id: "6",
name: "普通员工", name: "普通员工",
code: "EMPLOYEE", code: "EMPLOYEE",
status: 1, status: 1,
@@ -237,7 +237,7 @@ const roleMap: Record<string, any> = {
updateTime: null, updateTime: null,
}, },
7: { 7: {
id: 7, id: "7",
name: "自定义权限用户", name: "自定义权限用户",
code: "CUSTOM_USER", code: "CUSTOM_USER",
status: 1, status: 1,
+6 -6
View File
@@ -9,7 +9,7 @@ export default defineMock([
data: { data: {
list: [ list: [
{ {
id: 1, id: "1",
name: "基础版", name: "基础版",
code: "BASIC", code: "BASIC",
status: 1, status: 1,
@@ -19,7 +19,7 @@ export default defineMock([
updateTime: "2026-03-01 10:00:00", updateTime: "2026-03-01 10:00:00",
}, },
{ {
id: 2, id: "2",
name: "专业版", name: "专业版",
code: "PRO", code: "PRO",
status: 1, status: 1,
@@ -40,8 +40,8 @@ export default defineMock([
body: { body: {
code: "00000", code: "00000",
data: [ data: [
{ value: 1, label: "基础版" }, { value: "1", label: "基础版" },
{ value: 2, label: "专业版" }, { value: "2", label: "专业版" },
], ],
msg: "一切ok", msg: "一切ok",
}, },
@@ -54,7 +54,7 @@ export default defineMock([
const form = const form =
planId === 2 planId === 2
? { ? {
id: 2, id: "2",
name: "专业版", name: "专业版",
code: "PRO", code: "PRO",
status: 1, status: 1,
@@ -62,7 +62,7 @@ export default defineMock([
remark: "", remark: "",
} }
: { : {
id: 1, id: "1",
name: "基础版", name: "基础版",
code: "BASIC", code: "BASIC",
status: 1, status: 1,
+19 -19
View File
@@ -8,7 +8,7 @@ export default defineMock([
code: "00000", code: "00000",
data: [ data: [
{ {
id: 1, id: "1",
name: "默认租户", name: "默认租户",
code: "default", code: "default",
contactName: "管理员", contactName: "管理员",
@@ -16,14 +16,14 @@ export default defineMock([
contactEmail: "", contactEmail: "",
domain: "default", domain: "default",
logo: "", logo: "",
planId: 1, planId: "1",
status: 1, status: 1,
remark: "", remark: "",
expireTime: null, expireTime: null,
isDefault: true, isDefault: true,
}, },
{ {
id: 2, id: "2",
name: "演示租户", name: "演示租户",
code: "demo", code: "demo",
contactName: "演示用户", contactName: "演示用户",
@@ -31,7 +31,7 @@ export default defineMock([
contactEmail: "", contactEmail: "",
domain: "demo", domain: "demo",
logo: "", logo: "",
planId: 2, planId: "2",
status: 1, status: 1,
remark: "", remark: "",
expireTime: null, expireTime: null,
@@ -47,7 +47,7 @@ export default defineMock([
body: { body: {
code: "00000", code: "00000",
data: { data: {
id: 1, id: "1",
name: "默认租户", name: "默认租户",
code: "default", code: "default",
contactName: "管理员", contactName: "管理员",
@@ -55,7 +55,7 @@ export default defineMock([
contactEmail: "", contactEmail: "",
domain: "default", domain: "default",
logo: "", logo: "",
planId: 1, planId: "1",
status: 1, status: 1,
remark: "", remark: "",
expireTime: null, expireTime: null,
@@ -72,7 +72,7 @@ export default defineMock([
data: { data: {
list: [ list: [
{ {
id: 1, id: "1",
name: "默认租户", name: "默认租户",
code: "default", code: "default",
contactName: "管理员", contactName: "管理员",
@@ -80,7 +80,7 @@ export default defineMock([
contactEmail: "", contactEmail: "",
domain: "default", domain: "default",
logo: "", logo: "",
planId: 1, planId: "1",
status: 1, status: 1,
remark: "", remark: "",
expireTime: null, expireTime: null,
@@ -88,7 +88,7 @@ export default defineMock([
updateTime: "2026-03-01 10:00:00", updateTime: "2026-03-01 10:00:00",
}, },
{ {
id: 2, id: "2",
name: "演示租户", name: "演示租户",
code: "demo", code: "demo",
contactName: "演示用户", contactName: "演示用户",
@@ -96,7 +96,7 @@ export default defineMock([
contactEmail: "", contactEmail: "",
domain: "demo", domain: "demo",
logo: "", logo: "",
planId: 2, planId: "2",
status: 1, status: 1,
remark: "", remark: "",
expireTime: null, expireTime: null,
@@ -117,7 +117,7 @@ export default defineMock([
const form = const form =
tenantId === 2 tenantId === 2
? { ? {
id: 2, id: "2",
name: "演示租户", name: "演示租户",
code: "demo", code: "demo",
domain: "demo", domain: "demo",
@@ -125,13 +125,13 @@ export default defineMock([
contactPhone: "17621210366", contactPhone: "17621210366",
contactEmail: "", contactEmail: "",
logo: "", logo: "",
planId: 2, planId: "2",
status: 1, status: 1,
remark: "", remark: "",
expireTime: null, expireTime: null,
} }
: { : {
id: 1, id: "1",
name: "默认租户", name: "默认租户",
code: "default", code: "default",
domain: "default", domain: "default",
@@ -139,7 +139,7 @@ export default defineMock([
contactPhone: "17621210366", contactPhone: "17621210366",
contactEmail: "", contactEmail: "",
logo: "", logo: "",
planId: 1, planId: "1",
status: 1, status: 1,
remark: "", remark: "",
expireTime: null, expireTime: null,
@@ -158,7 +158,7 @@ export default defineMock([
body: { body: {
code: "00000", code: "00000",
data: { data: {
tenantId: 3, tenantId: "3",
tenantCode: "test", tenantCode: "test",
tenantName: "测试租户", tenantName: "测试租户",
adminUsername: "admin", adminUsername: "admin",
@@ -221,7 +221,7 @@ export default defineMock([
const allTenants = [ const allTenants = [
{ {
id: 1, id: "1",
name: "默认租户", name: "默认租户",
code: "default", code: "default",
contactName: "管理员", contactName: "管理员",
@@ -229,14 +229,14 @@ export default defineMock([
contactEmail: "", contactEmail: "",
domain: "default", domain: "default",
logo: "", logo: "",
planId: 1, planId: "1",
status: 1, status: 1,
remark: "", remark: "",
expireTime: null, expireTime: null,
isDefault: true, isDefault: true,
}, },
{ {
id: 2, id: "2",
name: "演示租户", name: "演示租户",
code: "demo", code: "demo",
contactName: "演示用户", contactName: "演示用户",
@@ -244,7 +244,7 @@ export default defineMock([
contactEmail: "", contactEmail: "",
domain: "demo", domain: "demo",
logo: "", logo: "",
planId: 2, planId: "2",
status: 1, status: 1,
remark: "", remark: "",
expireTime: null, expireTime: null,
+10 -10
View File
@@ -7,7 +7,7 @@ export default defineMock([
body: { body: {
code: "00000", code: "00000",
data: { data: {
userId: 2, userId: "2",
username: "admin", username: "admin",
nickname: "系统管理员", nickname: "系统管理员",
avatar: "https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif", avatar: "https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif",
@@ -72,7 +72,7 @@ export default defineMock([
data: { data: {
list: [ list: [
{ {
id: 2, id: "2",
username: "admin", username: "admin",
nickname: "系统管理员", nickname: "系统管理员",
mobile: "17621210366", mobile: "17621210366",
@@ -80,11 +80,11 @@ export default defineMock([
avatar: "https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif", avatar: "https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif",
email: "", email: "",
status: 1, status: 1,
deptId: 1, deptId: "1",
roleIds: [2], roleIds: [2],
}, },
{ {
id: 3, id: "3",
username: "test", username: "test",
nickname: "测试小用户", nickname: "测试小用户",
mobile: "17621210366", mobile: "17621210366",
@@ -92,7 +92,7 @@ export default defineMock([
avatar: "https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif", avatar: "https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif",
email: "youlaitech@163.com", email: "youlaitech@163.com",
status: 1, status: 1,
deptId: 3, deptId: "3",
roleIds: [3], roleIds: [3],
}, },
], ],
@@ -182,7 +182,7 @@ export default defineMock([
body: { body: {
code: "00000", code: "00000",
data: { data: {
id: 2, id: "2",
username: "admin", username: "admin",
nickname: "系统管理员", nickname: "系统管理员",
avatar: "https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif", avatar: "https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif",
@@ -224,7 +224,7 @@ export default defineMock([
// 用户映射表数据 // 用户映射表数据
const userMap: Record<string, any> = { const userMap: Record<string, any> = {
2: { 2: {
id: 2, id: "2",
username: "admin", username: "admin",
nickname: "系统管理员", nickname: "系统管理员",
mobile: "17621210366", mobile: "17621210366",
@@ -232,11 +232,11 @@ const userMap: Record<string, any> = {
avatar: "https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif", avatar: "https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif",
email: "", email: "",
status: 1, status: 1,
deptId: 1, deptId: "1",
roleIds: [2], roleIds: [2],
}, },
3: { 3: {
id: 3, id: "3",
username: "test", username: "test",
nickname: "测试小用户", nickname: "测试小用户",
mobile: "17621210366", mobile: "17621210366",
@@ -244,7 +244,7 @@ const userMap: Record<string, any> = {
avatar: "https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif", avatar: "https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif",
email: "youlaitech@163.com", email: "youlaitech@163.com",
status: 1, status: 1,
deptId: 3, deptId: "3",
roleIds: [3], roleIds: [3],
}, },
}; };
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "vue3-element-admin", "name": "vue3-element-admin",
"description": "Vue3 + Vite + TypeScript + Element-Plus 的后台管理模板,vue-element-admin 的 Vue3 版本", "description": "Vue3 + Vite + TypeScript + Element-Plus 的后台管理模板,vue-element-admin 的 Vue3 版本",
"version": "4.4.0", "version": "4.4.1",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
+2 -2
View File
@@ -515,7 +515,7 @@ const displayTransitionTotalPvCount = computed(() =>
// 访问趋势日期范围(单位:天) // 访问趋势日期范围(单位:天)
const visitTrendDateRange = ref(7); const visitTrendDateRange = ref(7);
// 访问趋势图表配置 // 访问趋势图表配置
const visitTrendChartOptions = ref(); const visitTrendChartOptions = ref({});
/** /**
* 获取访客统计数据 * 获取访客统计数据
@@ -558,7 +558,7 @@ const updateVisitTrendChartOptions = (data: VisitTrendDetail) => {
trigger: "axis", trigger: "axis",
}, },
legend: { legend: {
data: ["浏览量(PV)", "访客数(UV)"], data: ["浏览量(PV)", "访客量(UV)"],
bottom: 0, bottom: 0,
}, },
grid: { grid: {
+89 -98
View File
@@ -9,20 +9,20 @@ import { mockDevServerPlugin } from "vite-plugin-mock-dev-server";
import UnoCSS from "unocss/vite"; import UnoCSS from "unocss/vite";
import { resolve } from "path"; import { resolve } from "path";
import { name, version, engines, dependencies, devDependencies } from "./package.json"; import { name, version } from "./package.json";
// 平台的名称、版本、运行所需的 node 版本、依赖、构建时间的类型提示 // 平台名称、版本信息
const __APP_INFO__ = { const __APP_INFO__ = {
pkg: { name, version, engines, dependencies, devDependencies }, pkg: { name, version },
buildTimestamp: Date.now(), buildTimestamp: Date.now(),
}; };
const pathSrc = resolve(__dirname, "src"); // ESM 模式下使用 import.meta.dirname(Node 20.11+)
const pathSrc = resolve(import.meta.dirname, "src");
// Vite配置 https://cn.vitejs.dev/config // Vite配置 https://cn.vitejs.dev/config
export default defineConfig(({ mode }: ConfigEnv): UserConfig => { export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
const env = loadEnv(mode, process.cwd()); const env = loadEnv(mode, process.cwd());
const isProduction = mode === "production";
return { return {
resolve: { resolve: {
@@ -85,7 +85,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
//dts: "src/types/components.d.ts", //dts: "src/types/components.d.ts",
}), }),
] as PluginOption[], ] as PluginOption[],
// 预加载项目必需的组件 // 预加载项目必需的依赖
optimizeDeps: { optimizeDeps: {
include: [ include: [
"vue", "vue",
@@ -111,112 +111,103 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
"element-plus/es", "element-plus/es",
"element-plus/es/locale/lang/en", "element-plus/es/locale/lang/en",
"element-plus/es/locale/lang/zh-cn", "element-plus/es/locale/lang/zh-cn",
"element-plus/es/components/alert/style/index", // Element Plus 组件样式预构建(避免按需发现时触发页面重载)
"element-plus/es/components/avatar/style/index", ...[
"element-plus/es/components/backtop/style/index", "alert",
"element-plus/es/components/badge/style/index", "avatar",
"element-plus/es/components/base/style/index", "backtop",
"element-plus/es/components/breadcrumb-item/style/index", "badge",
"element-plus/es/components/breadcrumb/style/index", "base",
"element-plus/es/components/button/style/index", "breadcrumb",
"element-plus/es/components/card/style/index", "breadcrumb-item",
"element-plus/es/components/cascader/style/index", "button",
"element-plus/es/components/checkbox-group/style/index", "card",
"element-plus/es/components/checkbox/style/index", "cascader",
"element-plus/es/components/col/style/index", "checkbox",
"element-plus/es/components/color-picker/style/index", "checkbox-group",
"element-plus/es/components/config-provider/style/index", "checkbox-button",
"element-plus/es/components/date-picker/style/index", "col",
"element-plus/es/components/descriptions-item/style/index", "color-picker",
"element-plus/es/components/descriptions/style/index", "config-provider",
"element-plus/es/components/dialog/style/index", "date-picker",
"element-plus/es/components/divider/style/index", "descriptions",
"element-plus/es/components/drawer/style/index", "descriptions-item",
"element-plus/es/components/dropdown-item/style/index", "dialog",
"element-plus/es/components/dropdown-menu/style/index", "divider",
"element-plus/es/components/dropdown/style/index", "drawer",
"element-plus/es/components/empty/style/index", "dropdown",
"element-plus/es/components/form-item/style/index", "dropdown-item",
"element-plus/es/components/form/style/index", "dropdown-menu",
"element-plus/es/components/icon/style/index", "empty",
"element-plus/es/components/image-viewer/style/index", "form",
"element-plus/es/components/image/style/index", "form-item",
"element-plus/es/components/input-number/style/index", "icon",
"element-plus/es/components/input-tag/style/index", "image",
"element-plus/es/components/input/style/index", "image-viewer",
"element-plus/es/components/link/style/index", "input",
"element-plus/es/components/loading/style/index", "input-number",
"element-plus/es/components/menu-item/style/index", "input-tag",
"element-plus/es/components/menu/style/index", "link",
"element-plus/es/components/message-box/style/index", "loading",
"element-plus/es/components/message/style/index", "menu",
"element-plus/es/components/notification/style/index", "menu-item",
"element-plus/es/components/option/style/index", "message",
"element-plus/es/components/pagination/style/index", "message-box",
"element-plus/es/components/popover/style/index", "notification",
"element-plus/es/components/progress/style/index", "option",
"element-plus/es/components/radio-button/style/index", "pagination",
"element-plus/es/components/radio-group/style/index", "popover",
"element-plus/es/components/radio/style/index", "progress",
"element-plus/es/components/row/style/index", "radio",
"element-plus/es/components/scrollbar/style/index", "radio-button",
"element-plus/es/components/select/style/index", "radio-group",
"element-plus/es/components/skeleton-item/style/index", "row",
"element-plus/es/components/skeleton/style/index", "scrollbar",
"element-plus/es/components/step/style/index", "select",
"element-plus/es/components/steps/style/index", "skeleton",
"element-plus/es/components/sub-menu/style/index", "skeleton-item",
"element-plus/es/components/switch/style/index", "space",
"element-plus/es/components/tab-pane/style/index", "step",
"element-plus/es/components/table-column/style/index", "steps",
"element-plus/es/components/table/style/index", "sub-menu",
"element-plus/es/components/tabs/style/index", "switch",
"element-plus/es/components/tag/style/index", "tab-pane",
"element-plus/es/components/text/style/index", "table",
"element-plus/es/components/time-picker/style/index", "table-column",
"element-plus/es/components/time-select/style/index", "tabs",
"element-plus/es/components/timeline-item/style/index", "tag",
"element-plus/es/components/timeline/style/index", "text",
"element-plus/es/components/tooltip/style/index", "time-picker",
"element-plus/es/components/tree-select/style/index", "time-select",
"element-plus/es/components/tree/style/index", "timeline",
"element-plus/es/components/upload/style/index", "timeline-item",
"element-plus/es/components/watermark/style/index", "tooltip",
"element-plus/es/components/checkbox-button/style/index", "tree",
"element-plus/es/components/space/style/index", "tree-select",
"upload",
"watermark",
].map((c) => `element-plus/es/components/${c}/style/index`),
], ],
}, },
// 构建配置 // 构建配置(Vite 8 使用 Rolldown + Oxc)
build: { build: {
chunkSizeWarningLimit: 2000, // 消除打包大小超过500kb警告 chunkSizeWarningLimit: 1200, // chunk 大小警告阈值
reportCompressedSize: false, reportCompressedSize: false,
minify: isProduction ? "terser" : false, // Vite 8 推荐使用 terser 进行生产压缩 cssMinify: "lightningcss", // Vite 8 默认使用 Lightning CSS 压缩
terserOptions: isProduction // minify 默认使用 'oxc',压缩速度比 terser 快 30-90 倍
? { rolldownOptions: {
compress: {
drop_console: true, // 生产环境移除 console
drop_debugger: true, // 生产环境移除 debugger
},
}
: undefined,
rollupOptions: {
output: { output: {
// manualChunks: { // 用于从入口点创建的块的打包输出格式
// "vue-i18n": ["vue-i18n"],
// },
// 用于从入口点创建的块的打包输出格式[name]表示文件名,[hash]表示该文件内容hash值
entryFileNames: "js/[name].[hash].js", entryFileNames: "js/[name].[hash].js",
// 用于命名代码拆分时创建的共享块的输出命名 // 用于命名代码拆分时创建的共享块的输出命名
chunkFileNames: "js/[name].[hash].js", chunkFileNames: "js/[name].[hash].js",
// 用于输出静态资源的命名,[ext]表示文件扩展名 // 用于输出静态资源的命名
assetFileNames: (assetInfo: any) => { assetFileNames: (assetInfo: any) => {
// Vite 8 / Rolldown: 添加空值保护
if (!assetInfo.name) { if (!assetInfo.name) {
return "assets/[name].[hash][extname]"; return "assets/[name].[hash][extname]";
} }
const info = assetInfo.name.split("."); const info = assetInfo.name.split(".");
let extType = info[info.length - 1]; let extType = info[info.length - 1];
// console.log('文件信息', assetInfo.name)
if (/\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/i.test(assetInfo.name)) { if (/\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/i.test(assetInfo.name)) {
extType = "media"; extType = "media";
} else if (/\.(png|jpe?g|gif|svg)(\?.*)?$/.test(assetInfo.name)) { } else if (/\.(png|jpe?g|gif|svg)(\?.*)?$/.test(assetInfo.name)) {