diff --git a/yunkes/src/components/management/AnomalyList.vue b/yunkes/src/components/management/AnomalyList.vue index 57b62b0..8ba0531 100644 --- a/yunkes/src/components/management/AnomalyList.vue +++ b/yunkes/src/components/management/AnomalyList.vue @@ -50,10 +50,17 @@ import { formatMsDuration, formatRatio } from '@/utils/format' import type { AnomalyCard } from '@/api/management' -defineProps<{ - anomalies: AnomalyCard[] - loading?: boolean -}>() +// showEmployee(默认 true):D3 驾驶舱异常榜将在标题下加员工行(employee_name +// 链接→员工详情);员工详情页复用本组件时传 false 免自链接——prop 先行落位 +// (批次D2),员工行的渲染随 D3 接上。 +withDefaults( + defineProps<{ + anomalies: AnomalyCard[] + loading?: boolean + showEmployee?: boolean + }>(), + { showEmployee: true }, +) const emit = defineEmits<{ (e: 'drill', card: AnomalyCard): void diff --git a/yunkes/src/layouts/MainLayout.vue b/yunkes/src/layouts/MainLayout.vue index 6f1c496..eae44db 100644 --- a/yunkes/src/layouts/MainLayout.vue +++ b/yunkes/src/layouts/MainLayout.vue @@ -11,9 +11,11 @@ const channelStore = useChannelStore() // `el-menu` with `router` mode; we drive `default-active` from the current path // so the active item highlights on load and on browser back/forward. +// 带参路由(路径与菜单 index 不等)按 route.name 映射父菜单路径。 const activeMenu = computed(() => { if (route.name === 'chat') return '/customers' if (route.name === 'group-chat') return '/groups' + if (route.name === 'management-employees-detail') return '/management/employees' return route.path }) diff --git a/yunkes/src/router/index.ts b/yunkes/src/router/index.ts index 27888d6..53da5a2 100644 --- a/yunkes/src/router/index.ts +++ b/yunkes/src/router/index.ts @@ -107,6 +107,16 @@ const routes: RouteRecordRaw[] = [ component: () => import('@/views/management/EmployeeAnalyticsView.vue'), meta: { title: '员工分析' }, }, + { + // 员工详情(批次D2):总览页姓名下钻;query 真源 channel/start/end/section + // (section=当前页签,刷新回到该页签)。静态路由 /management/employees + // 先注册,带参路由在后——vue-router 按注册序精确匹配,静态优先命中。 + path: '/management/employees/:userId', + name: 'management-employees-detail', + component: () => import('@/views/management/EmployeeAnalyticsDetailView.vue'), + props: true, + meta: { title: '员工分析详情' }, + }, { path: '/chat/:channel/:ownerId/:talkerId?', name: 'chat', diff --git a/yunkes/src/views/management/EmployeeAnalyticsDetailView.vue b/yunkes/src/views/management/EmployeeAnalyticsDetailView.vue new file mode 100644 index 0000000..dd1585a --- /dev/null +++ b/yunkes/src/views/management/EmployeeAnalyticsDetailView.vue @@ -0,0 +1,1070 @@ + + + + +