@befly-addon/admin 1.1.30 → 1.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/apis/admin/cacheRefresh.ts +29 -21
  2. package/apis/admin/del.ts +10 -10
  3. package/apis/admin/detail.ts +7 -7
  4. package/apis/admin/ins.ts +11 -11
  5. package/apis/admin/list.ts +10 -10
  6. package/apis/admin/upd.ts +14 -14
  7. package/apis/api/all.ts +8 -8
  8. package/apis/api/list.ts +10 -10
  9. package/apis/auth/login.ts +43 -43
  10. package/apis/auth/sendSmsCode.ts +6 -6
  11. package/apis/dashboard/configStatus.ts +18 -18
  12. package/apis/dashboard/environmentInfo.ts +12 -12
  13. package/apis/dashboard/performanceMetrics.ts +5 -5
  14. package/apis/dashboard/permissionStats.ts +7 -7
  15. package/apis/dashboard/serviceStatus.ts +29 -29
  16. package/apis/dashboard/systemInfo.ts +5 -5
  17. package/apis/dashboard/systemOverview.ts +7 -7
  18. package/apis/dashboard/systemResources.ts +8 -8
  19. package/apis/dict/all.ts +16 -16
  20. package/apis/dict/del.ts +6 -6
  21. package/apis/dict/detail.ts +19 -19
  22. package/apis/dict/ins.ts +9 -9
  23. package/apis/dict/items.ts +8 -8
  24. package/apis/dict/list.ts +22 -22
  25. package/apis/dict/upd.ts +11 -11
  26. package/apis/dictType/all.ts +5 -5
  27. package/apis/dictType/del.ts +8 -8
  28. package/apis/dictType/detail.ts +6 -6
  29. package/apis/dictType/ins.ts +7 -7
  30. package/apis/dictType/list.ts +8 -10
  31. package/apis/dictType/upd.ts +8 -8
  32. package/apis/email/config.ts +4 -4
  33. package/apis/email/logList.ts +8 -8
  34. package/apis/email/send.ts +18 -18
  35. package/apis/email/verify.ts +5 -5
  36. package/apis/loginLog/list.ts +8 -8
  37. package/apis/menu/all.ts +16 -18
  38. package/apis/menu/list.ts +12 -12
  39. package/apis/operateLog/list.ts +8 -8
  40. package/apis/role/all.ts +7 -7
  41. package/apis/role/apiSave.ts +10 -13
  42. package/apis/role/apis.ts +7 -12
  43. package/apis/role/del.ts +14 -14
  44. package/apis/role/detail.ts +6 -6
  45. package/apis/role/ins.ts +10 -10
  46. package/apis/role/list.ts +11 -11
  47. package/apis/role/menuSave.ts +8 -11
  48. package/apis/role/menus.ts +7 -12
  49. package/apis/role/save.ts +12 -12
  50. package/apis/role/upd.ts +10 -10
  51. package/apis/sysConfig/all.ts +5 -5
  52. package/apis/sysConfig/del.ts +9 -9
  53. package/apis/sysConfig/get.ts +9 -9
  54. package/apis/sysConfig/ins.ts +11 -11
  55. package/apis/sysConfig/list.ts +9 -9
  56. package/apis/sysConfig/upd.ts +10 -10
  57. package/libs/emailHelper.ts +7 -7
  58. package/package.json +46 -34
  59. package/plugins/email.ts +9 -9
  60. package/tables/role.json +4 -2
  61. package/views/403_1/index.vue +19 -3
  62. package/views/config/dict/components/edit.vue +26 -28
  63. package/views/config/dict/index.vue +88 -52
  64. package/views/config/dictType/components/edit.vue +22 -23
  65. package/views/config/dictType/index.vue +82 -46
  66. package/views/config/index.vue +12 -0
  67. package/views/config/system/components/edit.vue +36 -36
  68. package/views/config/system/index.vue +79 -50
  69. package/views/index/components/addonList.vue +3 -3
  70. package/views/index/components/environmentInfo.vue +10 -10
  71. package/views/index/components/operationLogs.vue +10 -10
  72. package/views/index/components/performanceMetrics.vue +8 -8
  73. package/views/index/components/quickActions.vue +3 -3
  74. package/views/index/components/serviceStatus.vue +19 -19
  75. package/views/index/components/systemNotifications.vue +12 -12
  76. package/views/index/components/systemOverview.vue +7 -7
  77. package/views/index/components/systemResources.vue +11 -11
  78. package/views/index/components/userInfo.vue +20 -19
  79. package/views/index/index.vue +12 -5
  80. package/views/log/email/index.vue +58 -51
  81. package/views/log/index.vue +12 -0
  82. package/views/log/login/index.vue +45 -38
  83. package/views/log/operate/index.vue +55 -48
  84. package/views/login_1/index.vue +25 -18
  85. package/views/people/admin/components/edit.vue +25 -26
  86. package/views/people/admin/index.vue +76 -40
  87. package/views/people/index.vue +12 -0
  88. package/views/permission/api/index.vue +21 -15
  89. package/views/permission/index.vue +12 -0
  90. package/views/permission/menu/index.vue +31 -16
  91. package/views/permission/role/components/api.vue +21 -21
  92. package/views/permission/role/components/edit.vue +18 -18
  93. package/views/permission/role/components/menu.vue +14 -16
  94. package/views/permission/role/index.vue +84 -49
  95. package/views/403_1/meta.json +0 -4
  96. package/views/config/dict/meta.json +0 -4
  97. package/views/config/dictType/meta.json +0 -4
  98. package/views/config/meta.json +0 -4
  99. package/views/config/system/meta.json +0 -4
  100. package/views/index/meta.json +0 -4
  101. package/views/log/email/meta.json +0 -4
  102. package/views/log/login/meta.json +0 -4
  103. package/views/log/meta.json +0 -4
  104. package/views/log/operate/meta.json +0 -4
  105. package/views/login_1/meta.json +0 -4
  106. package/views/people/admin/meta.json +0 -4
  107. package/views/people/meta.json +0 -4
  108. package/views/permission/api/meta.json +0 -4
  109. package/views/permission/menu/meta.json +0 -4
  110. package/views/permission/meta.json +0 -4
  111. package/views/permission/role/meta.json +0 -4
@@ -24,7 +24,7 @@
24
24
  </template>
25
25
 
26
26
  <script setup>
27
- import { $Http } from '@/plugins/http';
27
+ import { $Http } from "@/plugins/http";
28
28
 
29
29
  // 组件内部数据
30
30
  const addonList = $ref([]);
@@ -32,10 +32,10 @@ const addonList = $ref([]);
32
32
  // 获取数据
33
33
  const fetchData = async () => {
34
34
  try {
35
- const { data } = await $Http('/addon/admin/dashboard/addonList');
35
+ const { data } = await $Http("/addon/admin/dashboard/addonList");
36
36
  addonList.splice(0, addonList.length, ...data);
37
37
  } catch (error) {
38
- console.error('获取插件列表失败:', error);
38
+ // 静默失败:不阻断页面展示
39
39
  }
40
40
  };
41
41
 
@@ -36,26 +36,26 @@
36
36
  </template>
37
37
 
38
38
  <script setup>
39
- import ILucideServer from '~icons/lucide/server';
40
- import { $Http } from '@/plugins/http';
39
+ import ILucideServer from "~icons/lucide/server";
40
+ import { $Http } from "@/plugins/http";
41
41
 
42
42
  // 组件内部数据
43
43
  const environmentInfo = $ref({
44
- os: '',
45
- server: '',
46
- nodeVersion: '',
47
- database: '',
48
- cache: '',
49
- timezone: ''
44
+ os: "",
45
+ server: "",
46
+ nodeVersion: "",
47
+ database: "",
48
+ cache: "",
49
+ timezone: ""
50
50
  });
51
51
 
52
52
  // 获取数据
53
53
  const fetchData = async () => {
54
54
  try {
55
- const { data } = await $Http('/addon/admin/dashboard/environmentInfo');
55
+ const { data } = await $Http("/addon/admin/dashboard/environmentInfo");
56
56
  Object.assign(environmentInfo, data);
57
57
  } catch (error) {
58
- console.error('获取运行环境信息失败:', error);
58
+ // 静默失败:不阻断页面展示
59
59
  }
60
60
  };
61
61
 
@@ -23,7 +23,7 @@
23
23
  <span class="col-ip">{{ log.ip }}</span>
24
24
  <span class="col-status">
25
25
  <t-tag :type="log.status === 'success' ? 'success' : 'danger'" size="small">
26
- {{ log.status === 'success' ? '成功' : '失败' }}
26
+ {{ log.status === "success" ? "成功" : "失败" }}
27
27
  </t-tag>
28
28
  </span>
29
29
  </div>
@@ -36,19 +36,19 @@
36
36
  <script setup>
37
37
  // 组件内部数据
38
38
  const operationLogs = $ref([
39
- { id: 1, userName: '管理员', action: '创建角色', module: '权限管理', ip: '192.168.1.100', status: 'success', createdAt: Date.now() - 120000 },
40
- { id: 2, userName: '张三', action: '修改菜单', module: '系统设置', ip: '192.168.1.101', status: 'success', createdAt: Date.now() - 900000 },
41
- { id: 3, userName: '李四', action: '删除接口', module: '接口管理', ip: '192.168.1.102', status: 'failed', createdAt: Date.now() - 3600000 },
42
- { id: 4, userName: '管理员', action: '同步数据库', module: '数据库', ip: '192.168.1.100', status: 'success', createdAt: Date.now() - 7200000 },
43
- { id: 5, userName: '王五', action: '登录系统', module: '系统', ip: '192.168.1.103', status: 'success', createdAt: Date.now() - 10800000 }
39
+ { id: 1, userName: "管理员", action: "创建角色", module: "权限管理", ip: "192.168.1.100", status: "success", createdAt: Date.now() - 120000 },
40
+ { id: 2, userName: "张三", action: "修改菜单", module: "系统设置", ip: "192.168.1.101", status: "success", createdAt: Date.now() - 900000 },
41
+ { id: 3, userName: "李四", action: "删除接口", module: "接口管理", ip: "192.168.1.102", status: "failed", createdAt: Date.now() - 3600000 },
42
+ { id: 4, userName: "管理员", action: "同步数据库", module: "数据库", ip: "192.168.1.100", status: "success", createdAt: Date.now() - 7200000 },
43
+ { id: 5, userName: "王五", action: "登录系统", module: "系统", ip: "192.168.1.103", status: "success", createdAt: Date.now() - 10800000 }
44
44
  ]);
45
45
 
46
46
  const formatTime = (timestamp) => {
47
47
  const date = new Date(timestamp);
48
- const month = String(date.getMonth() + 1).padStart(2, '0');
49
- const day = String(date.getDate()).padStart(2, '0');
50
- const hours = String(date.getHours()).padStart(2, '0');
51
- const minutes = String(date.getMinutes()).padStart(2, '0');
48
+ const month = String(date.getMonth() + 1).padStart(2, "0");
49
+ const day = String(date.getDate()).padStart(2, "0");
50
+ const hours = String(date.getHours()).padStart(2, "0");
51
+ const minutes = String(date.getMinutes()).padStart(2, "0");
52
52
  return `${month}-${day} ${hours}:${minutes}`;
53
53
  };
54
54
  </script>
@@ -53,12 +53,12 @@
53
53
  </template>
54
54
 
55
55
  <script setup>
56
- import ILucideActivity from '~icons/lucide/activity';
57
- import ILucideClock from '~icons/lucide/clock';
58
- import ILucideTrendingUp from '~icons/lucide/trending-up';
59
- import ILucideAlertCircle from '~icons/lucide/alert-circle';
60
- import ILucideAlertTriangle from '~icons/lucide/alert-triangle';
61
- import { $Http } from '@/plugins/http';
56
+ import ILucideActivity from "~icons/lucide/activity";
57
+ import ILucideClock from "~icons/lucide/clock";
58
+ import ILucideTrendingUp from "~icons/lucide/trending-up";
59
+ import ILucideAlertCircle from "~icons/lucide/alert-circle";
60
+ import ILucideAlertTriangle from "~icons/lucide/alert-triangle";
61
+ import { $Http } from "@/plugins/http";
62
62
 
63
63
  // 组件内部数据
64
64
  const performanceMetrics = $ref({
@@ -72,10 +72,10 @@ const performanceMetrics = $ref({
72
72
  // 获取数据
73
73
  const fetchData = async () => {
74
74
  try {
75
- const { data } = await $Http('/addon/admin/dashboard/performanceMetrics');
75
+ const { data } = await $Http("/addon/admin/dashboard/performanceMetrics");
76
76
  Object.assign(performanceMetrics, data);
77
77
  } catch (error) {
78
- console.error('获取性能指标失败:', error);
78
+ // 静默失败:不阻断页面展示
79
79
  }
80
80
  };
81
81
 
@@ -12,11 +12,11 @@
12
12
  </template>
13
13
 
14
14
  <script setup>
15
- import { Button as TButton } from 'tdesign-vue-next';
16
- import ILucideRotateCw from '~icons/lucide/rotate-cw';
15
+ import { Button as TButton } from "tdesign-vue-next";
16
+ import ILucideRotateCw from "~icons/lucide/rotate-cw";
17
17
 
18
18
  const handleClearCache = () => {
19
- console.log('刷新缓存');
19
+ // TODO: 接入刷新缓存接口
20
20
  };
21
21
  </script>
22
22
 
@@ -35,16 +35,16 @@
35
35
  </template>
36
36
 
37
37
  <script setup>
38
- import ILucideCheckCircle from '~icons/lucide/check-circle';
39
- import ILucideDatabase from '~icons/lucide/database';
40
- import ILucideZap from '~icons/lucide/zap';
41
- import ILucideHardDrive from '~icons/lucide/hard-drive';
42
- import ILucideMail from '~icons/lucide/mail';
43
- import ILucideCloud from '~icons/lucide/cloud';
44
- import ILucideCircle from '~icons/lucide/circle';
45
- import ILucideXCircle from '~icons/lucide/x-circle';
46
- import ILucideAlertCircle from '~icons/lucide/alert-circle';
47
- import { $Http } from '@/plugins/http';
38
+ import ILucideCheckCircle from "~icons/lucide/check-circle";
39
+ import ILucideDatabase from "~icons/lucide/database";
40
+ import ILucideZap from "~icons/lucide/zap";
41
+ import ILucideHardDrive from "~icons/lucide/hard-drive";
42
+ import ILucideMail from "~icons/lucide/mail";
43
+ import ILucideCloud from "~icons/lucide/cloud";
44
+ import ILucideCircle from "~icons/lucide/circle";
45
+ import ILucideXCircle from "~icons/lucide/x-circle";
46
+ import ILucideAlertCircle from "~icons/lucide/alert-circle";
47
+ import { $Http } from "@/plugins/http";
48
48
 
49
49
  // 组件内部数据
50
50
  const services = $ref([]);
@@ -52,10 +52,10 @@ const services = $ref([]);
52
52
  // 获取数据
53
53
  const fetchData = async () => {
54
54
  try {
55
- const { data } = await $Http('/addon/admin/dashboard/serviceStatus');
55
+ const { data } = await $Http("/addon/admin/dashboard/serviceStatus");
56
56
  services.splice(0, services.length, ...data.services);
57
57
  } catch (error) {
58
- console.error('获取服务状态失败:', error);
58
+ // 静默失败:不阻断页面展示
59
59
  }
60
60
  };
61
61
 
@@ -64,18 +64,18 @@ fetchData();
64
64
  // 工具函数
65
65
  const getStatusColor = (status) => {
66
66
  const colors = {
67
- running: 'success',
68
- stopped: 'error',
69
- unconfigured: 'warning'
67
+ running: "success",
68
+ stopped: "error",
69
+ unconfigured: "warning"
70
70
  };
71
- return colors[status] || 'default';
71
+ return colors[status] || "default";
72
72
  };
73
73
 
74
74
  const getStatusText = (status) => {
75
75
  const texts = {
76
- running: '正常',
77
- stopped: '停止',
78
- unconfigured: '未配置'
76
+ running: "正常",
77
+ stopped: "停止",
78
+ unconfigured: "未配置"
79
79
  };
80
80
  return texts[status] || status;
81
81
  };
@@ -26,19 +26,19 @@
26
26
  </template>
27
27
 
28
28
  <script setup>
29
- import { Tag as TTag } from 'tdesign-vue-next';
30
- import ILucideBell from '~icons/lucide/bell';
31
- import ILucideInfo from '~icons/lucide/info';
32
- import ILucideCheckCircle from '~icons/lucide/check-circle';
33
- import ILucideAlertTriangle from '~icons/lucide/alert-triangle';
34
- import ILucideXCircle from '~icons/lucide/x-circle';
29
+ import { Tag as TTag } from "tdesign-vue-next";
30
+ import ILucideBell from "~icons/lucide/bell";
31
+ import ILucideInfo from "~icons/lucide/info";
32
+ import ILucideCheckCircle from "~icons/lucide/check-circle";
33
+ import ILucideAlertTriangle from "~icons/lucide/alert-triangle";
34
+ import ILucideXCircle from "~icons/lucide/x-circle";
35
35
 
36
36
  // 组件内部数据
37
37
  const notifications = $ref([
38
- { id: 1, type: 'warning', title: '系统更新提醒 - v1.1.0 版本已发布', isRead: false, createdAt: Date.now() - 3600000 },
39
- { id: 2, type: 'info', title: '数据备份完成 - 今日凌晨自动备份成功', isRead: true, createdAt: Date.now() - 21600000 },
40
- { id: 3, type: 'error', title: 'SSL证书即将过期 - 请及时更新证书', isRead: false, createdAt: Date.now() - 86400000 },
41
- { id: 4, type: 'success', title: '性能优化完成 - 响应速度提升30%', isRead: true, createdAt: Date.now() - 172800000 }
38
+ { id: 1, type: "warning", title: "系统更新提醒 - v1.1.0 版本已发布", isRead: false, createdAt: Date.now() - 3600000 },
39
+ { id: 2, type: "info", title: "数据备份完成 - 今日凌晨自动备份成功", isRead: true, createdAt: Date.now() - 21600000 },
40
+ { id: 3, type: "error", title: "SSL证书即将过期 - 请及时更新证书", isRead: false, createdAt: Date.now() - 86400000 },
41
+ { id: 4, type: "success", title: "性能优化完成 - 响应速度提升30%", isRead: true, createdAt: Date.now() - 172800000 }
42
42
  ]);
43
43
 
44
44
  const formatTime = (timestamp) => {
@@ -51,8 +51,8 @@ const formatTime = (timestamp) => {
51
51
  } else if (diff < 86400000) {
52
52
  return `${Math.floor(diff / 3600000)}小时前`;
53
53
  } else {
54
- const month = String(date.getMonth() + 1).padStart(2, '0');
55
- const day = String(date.getDate()).padStart(2, '0');
54
+ const month = String(date.getMonth() + 1).padStart(2, "0");
55
+ const day = String(date.getDate()).padStart(2, "0");
56
56
  return `${month}-${day}`;
57
57
  }
58
58
  };
@@ -35,11 +35,11 @@
35
35
  </template>
36
36
 
37
37
  <script setup>
38
- import ILucideInfo from '~icons/lucide/info';
39
- import ILucideMenu from '~icons/lucide/menu';
40
- import ILucideWebhook from '~icons/lucide/webhook';
41
- import ILucideUsers from '~icons/lucide/users';
42
- import { $Http } from '@/plugins/http';
38
+ import ILucideInfo from "~icons/lucide/info";
39
+ import ILucideMenu from "~icons/lucide/menu";
40
+ import ILucideWebhook from "~icons/lucide/webhook";
41
+ import ILucideUsers from "~icons/lucide/users";
42
+ import { $Http } from "@/plugins/http";
43
43
 
44
44
  // 组件内部数据
45
45
  const permissionStats = $ref({
@@ -51,10 +51,10 @@ const permissionStats = $ref({
51
51
  // 获取数据
52
52
  const fetchData = async () => {
53
53
  try {
54
- const { data } = await $Http('/addon/admin/dashboard/systemOverview');
54
+ const { data } = await $Http("/addon/admin/dashboard/systemOverview");
55
55
  Object.assign(permissionStats, data);
56
56
  } catch (error) {
57
- console.error('获取系统概览失败:', error);
57
+ // 静默失败:不阻断页面展示
58
58
  }
59
59
  };
60
60
 
@@ -39,12 +39,12 @@
39
39
  </template>
40
40
 
41
41
  <script setup>
42
- import { Progress as TProgress } from 'tdesign-vue-next';
43
- import ILucideActivity from '~icons/lucide/activity';
44
- import ILucideCpu from '~icons/lucide/cpu';
45
- import ILucideHardDrive from '~icons/lucide/hard-drive';
46
- import ILucideDisc from '~icons/lucide/disc';
47
- import { $Http } from '@/plugins/http';
42
+ import { Progress as TProgress } from "tdesign-vue-next";
43
+ import ILucideActivity from "~icons/lucide/activity";
44
+ import ILucideCpu from "~icons/lucide/cpu";
45
+ import ILucideHardDrive from "~icons/lucide/hard-drive";
46
+ import ILucideDisc from "~icons/lucide/disc";
47
+ import { $Http } from "@/plugins/http";
48
48
 
49
49
  // 组件内部数据
50
50
  const systemResources = $ref({
@@ -56,10 +56,10 @@ const systemResources = $ref({
56
56
  // 获取数据
57
57
  const fetchData = async () => {
58
58
  try {
59
- const { data } = await $Http('/addon/admin/dashboard/systemResources');
59
+ const { data } = await $Http("/addon/admin/dashboard/systemResources");
60
60
  Object.assign(systemResources, data);
61
61
  } catch (error) {
62
- console.error('获取系统资源失败:', error);
62
+ // 静默失败:不阻断页面展示
63
63
  }
64
64
  };
65
65
 
@@ -67,9 +67,9 @@ fetchData();
67
67
 
68
68
  // 工具函数
69
69
  const getProgressColor = (percentage) => {
70
- if (percentage < 50) return 'success';
71
- if (percentage < 80) return 'warning';
72
- return 'danger';
70
+ if (percentage < 50) return "success";
71
+ if (percentage < 80) return "warning";
72
+ return "danger";
73
73
  };
74
74
  </script>
75
75
 
@@ -5,14 +5,16 @@
5
5
  <ILucideUser />
6
6
  </div>
7
7
  <div class="user-basic">
8
- <div class="user-name">{{ $Data.userInfo.nickname || $Data.userInfo.name || $Data.userInfo.username || '未设置' }}</div>
9
- <div class="user-role">{{ $Data.userInfo.role?.name || '普通用户' }}</div>
8
+ <div class="user-name">
9
+ {{ $Data.userInfo.nickname || $Data.userInfo.name || $Data.userInfo.username || "未设置" }}
10
+ </div>
11
+ <div class="user-role">{{ $Data.userInfo.role?.name || "普通用户" }}</div>
10
12
  </div>
11
13
  </div>
12
14
  <div class="user-details">
13
15
  <div class="detail-item">
14
16
  <ILucideMail />
15
- <span>{{ $Data.userInfo.email || '未设置' }}</span>
17
+ <span>{{ $Data.userInfo.email || "未设置" }}</span>
16
18
  </div>
17
19
  <div v-if="$Data.userInfo.phone" class="detail-item">
18
20
  <ILucidePhone />
@@ -37,13 +39,13 @@
37
39
  </template>
38
40
 
39
41
  <script setup>
40
- import { Button as TButton, MessagePlugin } from 'tdesign-vue-next';
41
- import ILucideUser from '~icons/lucide/user';
42
- import ILucideMail from '~icons/lucide/mail';
43
- import ILucidePhone from '~icons/lucide/phone';
44
- import ILucideClock from '~icons/lucide/clock';
45
- import ILucideRotateCw from '~icons/lucide/rotate-cw';
46
- import { $Http } from '@/plugins/http';
42
+ import { Button as TButton, MessagePlugin } from "tdesign-vue-next";
43
+ import ILucideUser from "~icons/lucide/user";
44
+ import ILucideMail from "~icons/lucide/mail";
45
+ import ILucidePhone from "~icons/lucide/phone";
46
+ import ILucideClock from "~icons/lucide/clock";
47
+ import ILucideRotateCw from "~icons/lucide/rotate-cw";
48
+ import { $Http } from "@/plugins/http";
47
49
 
48
50
  // 响应式数据
49
51
  const $Data = $ref({
@@ -56,10 +58,10 @@ const $Method = {
56
58
  // 获取数据
57
59
  async fetchData() {
58
60
  try {
59
- const { data } = await $Http('/addon/admin/admin/detail');
61
+ const { data } = await $Http("/addon/admin/admin/detail");
60
62
  Object.assign($Data.userInfo, data);
61
63
  } catch (error) {
62
- console.error('获取用户信息失败:', error);
64
+ MessagePlugin.error("获取用户信息失败");
63
65
  }
64
66
  },
65
67
 
@@ -67,7 +69,7 @@ const $Method = {
67
69
  async handleRefreshCache() {
68
70
  try {
69
71
  $Data.refreshing = true;
70
- const result = await $Http('/addon/admin/admin/cacheRefresh');
72
+ const result = await $Http("/addon/admin/admin/cacheRefresh");
71
73
 
72
74
  if (result.code === 0) {
73
75
  const { apis, menus, roles } = result.data;
@@ -83,13 +85,12 @@ const $Method = {
83
85
  messages.push(`角色缓存: ${roles.count} 个`);
84
86
  }
85
87
 
86
- MessagePlugin.success(`缓存刷新成功!${messages.join('')}`);
88
+ MessagePlugin.success(`缓存刷新成功!${messages.join("")}`);
87
89
  } else {
88
- MessagePlugin.warning(result.msg || '部分缓存刷新失败');
90
+ MessagePlugin.warning(result.msg || "部分缓存刷新失败");
89
91
  }
90
92
  } catch (error) {
91
- console.error('刷新缓存失败:', error);
92
- MessagePlugin.error('刷新缓存失败,请稍后重试');
93
+ MessagePlugin.error("刷新缓存失败,请稍后重试");
93
94
  } finally {
94
95
  $Data.refreshing = false;
95
96
  }
@@ -97,14 +98,14 @@ const $Method = {
97
98
 
98
99
  // 格式化时间
99
100
  formatTime(timestamp) {
100
- if (!timestamp) return '';
101
+ if (!timestamp) return "";
101
102
  const date = new Date(Number(timestamp));
102
103
  const now = new Date();
103
104
  const diff = now - date;
104
105
 
105
106
  // 小于1分钟
106
107
  if (diff < 60000) {
107
- return '刚刚';
108
+ return "刚刚";
108
109
  }
109
110
  // 小于1小时
110
111
  if (diff < 3600000) {
@@ -20,11 +20,18 @@
20
20
  </template>
21
21
 
22
22
  <script setup>
23
- import SystemOverview from './components/systemOverview.vue';
24
- import ServiceStatus from './components/serviceStatus.vue';
25
- import SystemResources from './components/systemResources.vue';
26
- import PerformanceMetrics from './components/performanceMetrics.vue';
27
- import EnvironmentInfo from './components/environmentInfo.vue';
23
+ import SystemOverview from "./components/systemOverview.vue";
24
+ import ServiceStatus from "./components/serviceStatus.vue";
25
+ import SystemResources from "./components/systemResources.vue";
26
+ import PerformanceMetrics from "./components/performanceMetrics.vue";
27
+ import EnvironmentInfo from "./components/environmentInfo.vue";
28
+
29
+ definePage({
30
+ meta: {
31
+ title: "首页",
32
+ order: 0
33
+ }
34
+ });
28
35
  </script>
29
36
 
30
37
  <style scoped lang="scss">