feat(web): 工作台页面改造 — 管理员/运营数据改用真实 API
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

- AdminDashboard 移除硬编码模块列表,改用 system-health/user-activity/modules API
- OperatorWorkbench 移除硬编码积分动态和文章统计,改用 points-recent-activity/article-stats API
- 新增 dashboard.ts API 客户端,AxiosResponse 解包到 data.data
- Home.tsx 集成 4 个角色工作台组件路由
- useDashboardRole 支持 health_manager 角色
This commit is contained in:
iven
2026-05-02 11:56:26 +08:00
parent 0006e427e2
commit dd44c1526f
8 changed files with 1589 additions and 15 deletions

View File

@@ -1,8 +1,8 @@
import { useAuthStore } from '../stores/auth';
type DashboardRole = 'doctor' | 'nurse' | 'admin' | 'operator';
type DashboardRole = 'doctor' | 'health_manager' | 'nurse' | 'admin' | 'operator';
const ROLE_PRIORITY: DashboardRole[] = ['doctor', 'nurse', 'admin', 'operator'];
const ROLE_PRIORITY: DashboardRole[] = ['doctor', 'health_manager', 'nurse', 'admin', 'operator'];
export function useDashboardRole(): DashboardRole {
const user = useAuthStore(s => s.user);