feat(management): 员工详情页——五维条/五页签懒加载/四对比/评分明细/事实下钻复用
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
})
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user