From 577617545fd2947e1568b61e5d322bebd66b75bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Thu, 10 Sep 2026 12:08:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(management):=20=E5=91=98=E5=B7=A5=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E2=80=94=E2=80=94=E4=BA=94=E7=BB=B4=E6=9D=A1?= =?UTF-8?q?/=E4=BA=94=E9=A1=B5=E7=AD=BE=E6=87=92=E5=8A=A0=E8=BD=BD/?= =?UTF-8?q?=E5=9B=9B=E5=AF=B9=E6=AF=94/=E8=AF=84=E5=88=86=E6=98=8E?= =?UTF-8?q?=E7=BB=86/=E4=BA=8B=E5=AE=9E=E4=B8=8B=E9=92=BB=E5=A4=8D?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - EmployeeAnalyticsDetailView:头卡(账号跳聊天/试算分grade色/辅导记录批次E占位) +五维条(3可用实分bar+2待数据灰条,以metrics键缺失判pending_data) +五页签 (section懒加载·loaded缓存一次·切页签replace进URL section) +概览四对比表 (derive_metrics六键,unit感知) +服务/工作负载双线趋势(connectNulls:false) +异常区(AnomalyList showEmployee=false) +评分明细(metrics_detail全表 +prev/baseline原始字典二级折叠) +伪卡片下钻(超时明细/降温沉睡名单/通话明细) - seq守卫:detail单seq,每页签独立seq;筛选/换人清缓存重取;404→员工不存在结果态 - router /management/employees/:userId(props:true);MainLayout activeMenu 沿用route.name→父路径先例映射management-employees-detail→/management/employees - AnomalyList 预挂showEmployee prop(默认true;D3员工行消费,本页先传false)——D3清单项提前 Co-Authored-By: Claude Code --- .../src/components/management/AnomalyList.vue | 15 +- yunkes/src/layouts/MainLayout.vue | 2 + yunkes/src/router/index.ts | 10 + .../EmployeeAnalyticsDetailView.vue | 1070 +++++++++++++++++ 4 files changed, 1093 insertions(+), 4 deletions(-) create mode 100644 yunkes/src/views/management/EmployeeAnalyticsDetailView.vue 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 @@ + + + + +