zant-admin 1.0.1 → 2.0.0

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 (67) hide show
  1. package/LICENSE +21 -0
  2. package/README.en.md +414 -25
  3. package/README.md +426 -277
  4. package/bin/cli.js +99 -99
  5. package/bin/generator.js +502 -502
  6. package/bin/prompts.js +158 -158
  7. package/bin/utils.js +133 -133
  8. package/package.json +3 -3
  9. package/public/logo.png +0 -0
  10. package/src/App.vue +1 -1
  11. package/src/api/methods/sysAccount.js +0 -1
  12. package/src/api/methods/sysDictItem.js +3 -3
  13. package/src/api/methods/system.js +10 -11
  14. package/src/api/request.js +39 -39
  15. package/src/assets/css/style.css +0 -11
  16. package/src/assets/css/zcui.css +1002 -319
  17. package/src/assets/imgs/logo.png +0 -0
  18. package/src/assets/imgs/md/console.png +0 -0
  19. package/src/assets/imgs/md/login.png +0 -0
  20. package/src/assets/imgs/md/menu.png +0 -0
  21. package/src/assets/imgs/md/serviceMonitoring.png +0 -0
  22. package/src/assets/imgs/md/statistics.png +0 -0
  23. package/src/components/FormTable.vue +50 -37
  24. package/src/components/IconPicker.vue +351 -344
  25. package/src/components/MainPage.vue +220 -339
  26. package/src/components/edit/QuartzEdit.vue +1 -1
  27. package/src/components/edit/SysAccountEdit.vue +15 -8
  28. package/src/components/edit/SysDictEdit.vue +6 -4
  29. package/src/components/edit/SysDictItemEdit.vue +8 -6
  30. package/src/components/edit/SysRoleEdit.vue +5 -3
  31. package/src/components/edit/sysMenuEdit.vue +10 -25
  32. package/src/config/index.js +74 -74
  33. package/src/directives/permission.js +49 -45
  34. package/src/main.js +2 -3
  35. package/src/router/index.js +48 -30
  36. package/src/stores/config.js +7 -1
  37. package/src/stores/menu.js +32 -8
  38. package/src/stores/user.js +17 -17
  39. package/src/utils/regionUtils.js +20 -16
  40. package/src/utils/useFormCRUD.js +59 -60
  41. package/src/views/baiscstatis/center.vue +53 -42
  42. package/src/views/baiscstatis/iframePage.vue +9 -11
  43. package/src/views/console.vue +92 -42
  44. package/src/views/demo/button.vue +269 -0
  45. package/src/views/demo/importexport.vue +8 -12
  46. package/src/views/demo/region.vue +103 -21
  47. package/src/views/demo/statistics.vue +38 -19
  48. package/src/views/home.vue +2 -3
  49. package/src/views/login.vue +254 -149
  50. package/src/views/operations/log/logQuartz.vue +0 -1
  51. package/src/views/operations/quartz.vue +22 -24
  52. package/src/views/system/sysAccount.vue +16 -11
  53. package/src/views/system/sysDict.vue +9 -6
  54. package/src/views/system/sysMenu.vue +17 -15
  55. package/src/views/system/sysRole.vue +44 -21
  56. package/SCAFFOLD_README.md +0 -215
  57. package/src/assets/imgs/md/1.png +0 -0
  58. package/src/assets/imgs/md/10.png +0 -0
  59. package/src/assets/imgs/md/11.png +0 -0
  60. package/src/assets/imgs/md/2.png +0 -0
  61. package/src/assets/imgs/md/3.png +0 -0
  62. package/src/assets/imgs/md/4.png +0 -0
  63. package/src/assets/imgs/md/5.png +0 -0
  64. package/src/assets/imgs/md/6.png +0 -0
  65. package/src/assets/imgs/md/7.png +0 -0
  66. package/src/assets/imgs/md/8.png +0 -0
  67. package/src/assets/imgs/md/9.png +0 -0
@@ -37,10 +37,18 @@
37
37
  {{ userInfo.roleName || '普通用户' }}
38
38
  </a-descriptions-item>
39
39
  <a-descriptions-item label="最后登录时间" :span="2">
40
- {{ userInfo.lastLoginTime ? formatDate(userInfo.lastLoginTime) : '从未登录' }}
40
+ {{
41
+ userInfo.lastLoginTime
42
+ ? formatDate(userInfo.lastLoginTime)
43
+ : '从未登录'
44
+ }}
41
45
  </a-descriptions-item>
42
46
  <a-descriptions-item label="注册时间" :span="2">
43
- {{ userInfo.createTime ? formatDate(userInfo.createTime) : '未知' }}
47
+ {{
48
+ userInfo.createTime
49
+ ? formatDate(userInfo.createTime)
50
+ : '未知'
51
+ }}
44
52
  </a-descriptions-item>
45
53
  </a-descriptions>
46
54
  </div>
@@ -58,17 +66,32 @@
58
66
  ref="formRef"
59
67
  >
60
68
  <a-form-item label="原密码" name="oldPassword">
61
- <a-input-password v-model:value="passwordForm.oldPassword" placeholder="请输入原密码" />
69
+ <a-input-password
70
+ v-model:value="passwordForm.oldPassword"
71
+ placeholder="请输入原密码"
72
+ />
62
73
  </a-form-item>
63
74
  <a-form-item label="新密码" name="newPassword">
64
- <a-input-password v-model:value="passwordForm.newPassword" placeholder="请输入新密码" />
75
+ <a-input-password
76
+ v-model:value="passwordForm.newPassword"
77
+ placeholder="请输入新密码"
78
+ />
65
79
  </a-form-item>
66
80
  <a-form-item label="确认密码" name="confirmPassword">
67
- <a-input-password v-model:value="passwordForm.confirmPassword" placeholder="请再次输入新密码" />
81
+ <a-input-password
82
+ v-model:value="passwordForm.confirmPassword"
83
+ placeholder="请再次输入新密码"
84
+ />
68
85
  </a-form-item>
69
86
  <a-form-item :wrapper-col="{ offset: 8, span: 12 }">
70
- <a-button type="primary" @click="changePassword">修改密码</a-button>
71
- <a-button style="margin-left: 10px" @click="resetPasswordForm">重置</a-button>
87
+ <a-button type="primary" @click="changePassword"
88
+ >修改密码</a-button
89
+ >
90
+ <a-button
91
+ style="margin-left: 10px"
92
+ @click="resetPasswordForm"
93
+ >重置</a-button
94
+ >
72
95
  </a-form-item>
73
96
  </a-form>
74
97
  </div>
@@ -121,10 +144,7 @@
121
144
  width="600px"
122
145
  :footer="null"
123
146
  >
124
- <a-list
125
- item-layout="horizontal"
126
- :data-source="sessions"
127
- >
147
+ <a-list item-layout="horizontal" :data-source="sessions">
128
148
  <template #renderItem="{ item }">
129
149
  <a-list-item>
130
150
  <a-list-item-meta
@@ -132,7 +152,9 @@
132
152
  :description="`最后活动: ${formatDate(item.lastActivity)}`"
133
153
  />
134
154
  <template #actions>
135
- <a-button type="link" danger @click="logoutSession(item.id)">强制下线</a-button>
155
+ <a-button type="link" danger @click="logoutSession(item.id)"
156
+ >强制下线</a-button
157
+ >
136
158
  </template>
137
159
  </a-list-item>
138
160
  </template>
@@ -163,20 +185,20 @@ const userInfo = reactive({
163
185
  roleName: '',
164
186
  avatar: '',
165
187
  lastLoginTime: null,
166
- createTime: null
188
+ createTime: null,
167
189
  })
168
190
 
169
191
  // 密码表单
170
192
  const passwordForm = reactive({
171
193
  oldPassword: '',
172
194
  newPassword: '',
173
- confirmPassword: ''
195
+ confirmPassword: '',
174
196
  })
175
197
 
176
198
  // 安全设置
177
199
  const securitySettings = reactive({
178
200
  loginAlert: false,
179
- twoFactorAuth: false
201
+ twoFactorAuth: false,
180
202
  })
181
203
 
182
204
  // 会话列表
@@ -184,9 +206,7 @@ const sessions = ref([])
184
206
 
185
207
  // 密码验证规则
186
208
  const passwordRules = {
187
- oldPassword: [
188
- { required: true, message: '请输入原密码', trigger: 'blur' }
189
- ],
209
+ oldPassword: [{ required: true, message: '请输入原密码', trigger: 'blur' }],
190
210
  newPassword: [
191
211
  { required: true, message: '请输入新密码', trigger: 'blur' },
192
212
  // { min: 6, message: '密码长度不能少于6位', trigger: 'blur' }
@@ -200,9 +220,9 @@ const passwordRules = {
200
220
  }
201
221
  return Promise.resolve()
202
222
  },
203
- trigger: 'blur'
204
- }
205
- ]
223
+ trigger: 'blur',
224
+ },
225
+ ],
206
226
  }
207
227
 
208
228
  // 生命周期
@@ -224,7 +244,7 @@ const loadUserInfo = async () => {
224
244
  roleName: currentUser.roleId === 1 ? '管理员' : '普通用户',
225
245
  avatar: currentUser.profilePicture || '',
226
246
  lastLoginTime: currentUser.lastLoginTime || null,
227
- createTime: currentUser.createTime || null
247
+ createTime: currentUser.createTime || null,
228
248
  })
229
249
  }
230
250
 
@@ -239,8 +259,6 @@ const loadUserInfo = async () => {
239
259
  }
240
260
  }
241
261
 
242
-
243
-
244
262
  // 修改密码
245
263
  const changePassword = async () => {
246
264
  try {
@@ -256,13 +274,11 @@ const changePassword = async () => {
256
274
  const res = await sysAccount.updatePwd({
257
275
  id: userStore.userInfo.id,
258
276
  oldPwd: passwordForm.oldPassword,
259
- newPwd: passwordForm.newPassword
277
+ newPwd: passwordForm.newPassword,
260
278
  })
261
279
 
262
- message.success('密码修改成功')
263
- resetPasswordForm()
264
-
265
-
280
+ message.success('密码修改成功')
281
+ resetPasswordForm()
266
282
  } catch (error) {
267
283
  console.error('修改密码失败:', error)
268
284
  // message.error('修改密码失败')
@@ -274,7 +290,7 @@ const resetPasswordForm = () => {
274
290
  Object.assign(passwordForm, {
275
291
  oldPassword: '',
276
292
  newPassword: '',
277
- confirmPassword: ''
293
+ confirmPassword: '',
278
294
  })
279
295
  }
280
296
 
@@ -309,14 +325,14 @@ const loadSessions = async () => {
309
325
  id: 1,
310
326
  device: 'Windows Chrome',
311
327
  lastActivity: new Date(),
312
- location: '中国 北京'
328
+ location: '中国 北京',
313
329
  },
314
330
  {
315
331
  id: 2,
316
332
  device: 'Mac Safari',
317
333
  lastActivity: new Date(Date.now() - 2 * 60 * 60 * 1000), // 2小时前
318
- location: '中国 上海'
319
- }
334
+ location: '中国 上海',
335
+ },
320
336
  ]
321
337
  } catch (error) {
322
338
  console.error('加载会话列表失败:', error)
@@ -324,7 +340,7 @@ const loadSessions = async () => {
324
340
  }
325
341
 
326
342
  // 强制下线会话
327
- const logoutSession = async (sessionId) => {
343
+ const logoutSession = async sessionId => {
328
344
  try {
329
345
  // 这里添加强制下线会话的API调用
330
346
  // await forceLogoutSession(sessionId)
@@ -337,7 +353,7 @@ const logoutSession = async (sessionId) => {
337
353
  }
338
354
 
339
355
  // 格式化日期
340
- const formatDate = (date) => {
356
+ const formatDate = date => {
341
357
  if (!date) return '未知'
342
358
  const d = new Date(date)
343
359
  return d.toLocaleString('zh-CN', {
@@ -345,15 +361,13 @@ const formatDate = (date) => {
345
361
  month: '2-digit',
346
362
  day: '2-digit',
347
363
  hour: '2-digit',
348
- minute: '2-digit'
364
+ minute: '2-digit',
349
365
  })
350
366
  }
351
367
  </script>
352
368
 
353
369
  <style scoped>
354
- .user-center {
355
- padding: 10px;
356
- }
370
+
357
371
 
358
372
  .user-center-card {
359
373
  border-radius: 8px;
@@ -380,7 +394,6 @@ const formatDate = (date) => {
380
394
  background-color: #1677ff !important;
381
395
  font-size: 38px !important;
382
396
  font-weight: 600 !important;
383
-
384
397
  }
385
398
  .user-basic-info h3 {
386
399
  margin: 0 0 8px 0;
@@ -394,8 +407,6 @@ const formatDate = (date) => {
394
407
  font-size: 14px;
395
408
  }
396
409
 
397
-
398
-
399
410
  .user-stats {
400
411
  margin-top: 24px;
401
412
  padding: 16px;
@@ -3,29 +3,27 @@
3
3
  ref="iframeRef"
4
4
  :src="iframeUrl"
5
5
  frameborder="0"
6
- style="width: 100%; height: 100%;"
6
+ style="width: 100%; height: 100%"
7
7
  ></iframe>
8
-
9
-
10
8
  </template>
11
9
 
12
10
  <script setup>
13
- import { ref, onMounted, watch } from "vue"
14
- import { useRoute } from "vue-router"
11
+ import { ref, onMounted, watch } from 'vue'
12
+ import { useRoute } from 'vue-router'
15
13
 
16
14
  const route = useRoute()
17
- const iframeUrl = ref("")
15
+ const iframeUrl = ref('')
18
16
 
19
17
  onMounted(() => {
20
- console.log("iframeUrl", route.query.url)
21
- iframeUrl.value = decodeURIComponent(route.query.url || "")
18
+ console.log('iframeUrl', route.query.url)
19
+ iframeUrl.value = decodeURIComponent(route.query.url || '')
22
20
  })
23
21
 
24
22
  // 监听路由变化,点击不同内链菜单时更新 iframe
25
23
  watch(
26
24
  () => route.query.url,
27
- (newUrl) => {
28
- iframeUrl.value = decodeURIComponent(newUrl || "")
29
- }
25
+ newUrl => {
26
+ iframeUrl.value = decodeURIComponent(newUrl || '')
27
+ },
30
28
  )
31
29
  </script>
@@ -56,11 +56,18 @@
56
56
  <h3>系统信息</h3>
57
57
  </div>
58
58
  <div class="info-grid">
59
- <div class="info-item" v-for="(info, index) in systemInfo" :key="index">
59
+ <div
60
+ class="info-item"
61
+ v-for="(info, index) in systemInfo"
62
+ :key="index"
63
+ >
60
64
  <div class="info-label">{{ info.label }}</div>
61
65
  <div class="info-value">{{ info.value }}</div>
62
66
  <div class="info-progress" v-if="info.progress">
63
- <div class="progress-bar" :style="{ width: info.progress + '%' }"></div>
67
+ <div
68
+ class="progress-bar"
69
+ :style="{ width: info.progress + '%' }"
70
+ ></div>
64
71
  </div>
65
72
  </div>
66
73
  </div>
@@ -75,7 +82,11 @@
75
82
  <h3>前端项目引用</h3>
76
83
  </div>
77
84
  <div class="dependencies-list">
78
- <div class="dependency-item" v-for="(dep, index) in dependencies" :key="index">
85
+ <div
86
+ class="dependency-item"
87
+ v-for="(dep, index) in dependencies"
88
+ :key="index"
89
+ >
79
90
  <div class="dep-name">{{ dep.name }}</div>
80
91
  <div class="dep-version">{{ dep.version }}</div>
81
92
  </div>
@@ -89,8 +100,15 @@
89
100
  <a-badge :count="notifications.length" />
90
101
  </div>
91
102
  <div class="notifications-list">
92
- <div class="notification-item" v-for="(item, index) in notifications" :key="index">
93
- <div class="notification-icon" :style="{ backgroundColor: item.color }">
103
+ <div
104
+ class="notification-item"
105
+ v-for="(item, index) in notifications"
106
+ :key="index"
107
+ >
108
+ <div
109
+ class="notification-icon"
110
+ :style="{ backgroundColor: item.color }"
111
+ >
94
112
  {{ item.icon }}
95
113
  </div>
96
114
  <div class="notification-content">
@@ -107,7 +125,11 @@
107
125
  <h3>最近活动</h3>
108
126
  </div>
109
127
  <div class="activities-list">
110
- <div class="activity-item" v-for="(activity, index) in recentActivities" :key="index">
128
+ <div
129
+ class="activity-item"
130
+ v-for="(activity, index) in recentActivities"
131
+ :key="index"
132
+ >
111
133
  <ClockCircleOutlined class="activity-icon" />
112
134
  <div class="activity-content">{{ activity.content }}</div>
113
135
  </div>
@@ -128,7 +150,7 @@ import {
128
150
  MessageOutlined,
129
151
  ClockCircleOutlined,
130
152
  ArrowUpOutlined,
131
- ArrowDownOutlined
153
+ ArrowDownOutlined,
132
154
  } from '@ant-design/icons-vue'
133
155
 
134
156
  // 创建图表容器引用
@@ -148,7 +170,7 @@ const stats = reactive({
148
170
  userCount: 1256,
149
171
  orderCount: 89,
150
172
  revenue: '12,580',
151
- messageCount: 5
173
+ messageCount: 5,
152
174
  })
153
175
 
154
176
  // 统计卡片数据
@@ -160,7 +182,7 @@ const statsData = computed(() => [
160
182
  gradient: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
161
183
  trend: 'up',
162
184
  trendIcon: ArrowUpOutlined,
163
- change: '12.5%'
185
+ change: '12.5%',
164
186
  },
165
187
  {
166
188
  label: '今日订单',
@@ -169,7 +191,7 @@ const statsData = computed(() => [
169
191
  gradient: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)',
170
192
  trend: 'up',
171
193
  trendIcon: ArrowUpOutlined,
172
- change: '8.2%'
194
+ change: '8.2%',
173
195
  },
174
196
  {
175
197
  label: '今日收入',
@@ -178,7 +200,7 @@ const statsData = computed(() => [
178
200
  gradient: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',
179
201
  trend: 'down',
180
202
  trendIcon: ArrowDownOutlined,
181
- change: '3.1%'
203
+ change: '3.1%',
182
204
  },
183
205
  {
184
206
  label: '未读消息',
@@ -187,8 +209,8 @@ const statsData = computed(() => [
187
209
  gradient: 'linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)',
188
210
  trend: 'up',
189
211
  trendIcon: ArrowUpOutlined,
190
- change: '2条'
191
- }
212
+ change: '2条',
213
+ },
192
214
  ])
193
215
 
194
216
  // 系统信息
@@ -197,7 +219,7 @@ const systemInfo = ref([
197
219
  { label: '运行时间', value: '15天2小时' },
198
220
  { label: '内存使用率', value: '65%', progress: 65 },
199
221
  { label: 'CPU使用率', value: '23%', progress: 23 },
200
- { label: '磁盘空间', value: '85GB/120GB', progress: 70 }
222
+ { label: '磁盘空间', value: '85GB/120GB', progress: 70 },
201
223
  ])
202
224
 
203
225
  // 前端项目引用
@@ -211,7 +233,7 @@ const dependencies = ref([
211
233
  { name: 'Day.js', version: 'v1.11.13' },
212
234
  { name: 'Alova', version: 'v3.2.6' },
213
235
  { name: 'File-saver', version: 'v2.0.5' },
214
- { name: 'Vite', version: 'v7.0.6' }
236
+ { name: 'Vite', version: 'v7.0.6' },
215
237
  ])
216
238
 
217
239
  // 通知列表
@@ -220,20 +242,20 @@ const notifications = ref([
220
242
  title: '系统维护通知',
221
243
  description: '系统将于今晚23:00进行维护,预计耗时2小时',
222
244
  color: '#1890ff',
223
- icon: '维'
245
+ icon: '维',
224
246
  },
225
247
  {
226
248
  title: '新版本发布',
227
249
  description: 'v1.2.0版本已发布,新增多项功能',
228
250
  color: '#52c41a',
229
- icon: '新'
251
+ icon: '新',
230
252
  },
231
253
  {
232
254
  title: '安全提醒',
233
255
  description: '请及时修改默认密码,确保账户安全',
234
256
  color: '#faad14',
235
- icon: '安'
236
- }
257
+ icon: '安',
258
+ },
237
259
  ])
238
260
 
239
261
  // 最近活动
@@ -241,7 +263,7 @@ const recentActivities = ref([
241
263
  { id: 1, content: '用户张三登录系统' },
242
264
  { id: 2, content: '订单#20231215001创建成功' },
243
265
  { id: 3, content: '报表数据已更新' },
244
- { id: 4, content: '系统备份完成' }
266
+ { id: 4, content: '系统备份完成' },
245
267
  ])
246
268
 
247
269
  // 更新时间函数
@@ -252,7 +274,7 @@ const updateDateTime = () => {
252
274
  currentTime.value = now.toLocaleTimeString('zh-CN', {
253
275
  hour: '2-digit',
254
276
  minute: '2-digit',
255
- second: '2-digit'
277
+ second: '2-digit',
256
278
  })
257
279
 
258
280
  // 更新日期
@@ -260,7 +282,7 @@ const updateDateTime = () => {
260
282
  year: 'numeric',
261
283
  month: 'long',
262
284
  day: 'numeric',
263
- weekday: 'long'
285
+ weekday: 'long',
264
286
  })
265
287
  }
266
288
 
@@ -275,55 +297,80 @@ const initChart = () => {
275
297
  case 'week':
276
298
  return {
277
299
  xAxis: {
278
- data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
300
+ data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
279
301
  },
280
302
  series: [
281
303
  {
282
304
  name: '访问量',
283
- data: [320, 450, 380, 420, 580, 620, 590]
305
+ data: [320, 450, 380, 420, 580, 620, 590],
284
306
  },
285
307
  {
286
308
  name: '独立访客',
287
- data: [220, 320, 280, 350, 480, 520, 490]
288
- }
289
- ]
309
+ data: [220, 320, 280, 350, 480, 520, 490],
310
+ },
311
+ ],
290
312
  }
291
313
  case 'month':
292
314
  return {
293
315
  xAxis: {
294
- data: Array.from({length: 30}, (_, i) => `${i + 1}日`)
316
+ data: Array.from({ length: 30 }, (_, i) => `${i + 1}日`),
295
317
  },
296
318
  series: [
297
319
  {
298
320
  name: '访问量',
299
- data: Array.from({length: 30}, () => Math.floor(Math.random() * 1000) + 500)
321
+ data: Array.from(
322
+ { length: 30 },
323
+ () => Math.floor(Math.random() * 1000) + 500,
324
+ ),
300
325
  },
301
326
  {
302
327
  name: '独立访客',
303
- data: Array.from({length: 30}, () => Math.floor(Math.random() * 800) + 300)
304
- }
305
- ]
328
+ data: Array.from(
329
+ { length: 30 },
330
+ () => Math.floor(Math.random() * 800) + 300,
331
+ ),
332
+ },
333
+ ],
306
334
  }
307
335
  case 'year':
308
336
  return {
309
337
  xAxis: {
310
- data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
338
+ data: [
339
+ '1月',
340
+ '2月',
341
+ '3月',
342
+ '4月',
343
+ '5月',
344
+ '6月',
345
+ '7月',
346
+ '8月',
347
+ '9月',
348
+ '10月',
349
+ '11月',
350
+ '12月',
351
+ ],
311
352
  },
312
353
  series: [
313
354
  {
314
355
  name: '访问量',
315
- data: [820, 932, 901, 934, 1290, 1330, 1320, 1540, 1200, 1100, 1380, 1420]
356
+ data: [
357
+ 820, 932, 901, 934, 1290, 1330, 1320, 1540, 1200, 1100, 1380,
358
+ 1420,
359
+ ],
316
360
  },
317
361
  {
318
362
  name: '独立访客',
319
- data: [620, 732, 701, 734, 1090, 1130, 1120, 1340, 1000, 900, 1180, 1220]
320
- }
321
- ]
363
+ data: [
364
+ 620, 732, 701, 734, 1090, 1130, 1120, 1340, 1000, 900, 1180,
365
+ 1220,
366
+ ],
367
+ },
368
+ ],
322
369
  }
323
370
  default:
324
371
  return {
325
372
  xAxis: { data: [] },
326
- series: []
373
+ series: [],
327
374
  }
328
375
  }
329
376
  }
@@ -333,7 +380,7 @@ const initChart = () => {
333
380
  baseEcharts.updateLineChart({
334
381
  chartInstance: visitChart,
335
382
  data: chartData,
336
- shouldShowSlider: chartData.xAxis.data.length > 12
383
+ shouldShowSlider: chartData.xAxis.data.length > 12,
337
384
  })
338
385
  }
339
386
 
@@ -377,10 +424,11 @@ onMounted(() => {
377
424
 
378
425
  <style scoped>
379
426
  .console-page {
380
-
381
427
  background: #f5f7fa;
382
428
  min-height: 100vh;
383
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
429
+ font-family:
430
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
431
+ Arial, sans-serif;
384
432
  }
385
433
 
386
434
  /* 页面标题区域 */
@@ -442,7 +490,9 @@ onMounted(() => {
442
490
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
443
491
  display: flex;
444
492
  align-items: center;
445
- transition: transform 0.3s ease, box-shadow 0.3s ease;
493
+ transition:
494
+ transform 0.3s ease,
495
+ box-shadow 0.3s ease;
446
496
  }
447
497
 
448
498
  .stat-card:hover {