feat: 新增服务看板页面

实现 Dashboard 看板视图并将应用默认入口由调优改为看板,路由、侧边栏默认菜单与登录跳转同步调整;侧边栏增加导航失败高亮校正,布局与 ECharts 注册柱状图适配看板,补充两份回归脚本、设计走查记录与五张设计截图。
This commit is contained in:
caoxiaozhu
2026-07-11 14:49:37 +08:00
parent ddf47eb8fe
commit cc113db1aa
15 changed files with 1013 additions and 11 deletions

View File

@@ -0,0 +1,39 @@
import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
const root = resolve(fileURLToPath(new URL('..', import.meta.url)))
function read(relativePath) {
return readFileSync(resolve(root, relativePath), 'utf8')
}
function assert(condition, message) {
if (!condition) throw new Error(message)
}
const router = read('src/router/index.ts')
const login = read('src/views/login/LoginView.vue')
const sidebar = read('src/components/AppSidebar.vue')
assert(
router.includes("redirect: '/dashboard'"),
'The authenticated root and fallback routes should default to 服务看板',
)
assert(
router.includes("next('/dashboard')"),
'An authenticated user visiting the login page should enter 服务看板',
)
assert(
login.includes("router.push('/dashboard')"),
'A successful login should navigate to 服务看板',
)
assert(
sidebar.includes("route.path.split('/')[1] || 'dashboard'"),
'The sidebar fallback active item should be 服务看板',
)
console.log('default-dashboard regression checks passed')