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 @@ + + + + + 返回员工分析 + + + + + + + + + + + {{ detailError }} + 重试 + + + + + + + + + {{ detail?.name || userId }} + 在职 + 离职 + {{ userId }} + + + + + + {{ a.channel === 'whatsapp' ? 'WA' : '微信' }} + + + {{ a.account_id }} + + + {{ a.nick_name || a.user_name }} + + + 无账号 + + + + + + {{ Math.round(detail.score.total_score ?? 0) }} + {{ detail.score.grade }} + 试 + 本期试算分 + + + -- + 样本不足·不参与考核 + + + + + + + 创建辅导记录 + + + 返回员工分析 + + + + + + + + + 五维得分 + 0-100 · 行动执行/合规风险待数据(批次E) + + + {{ d.name }} + 权重 {{ d.weight }}% + + + + + + {{ dimScoreText(d) }} + + + + + + + + + + + + + {{ sectionState.overview.error }} + + 重试 + + + + + + + {{ t.label }} + {{ t.value }} + + + + + + {{ row.name }} + {{ row.code }} + + + + {{ fmtCmp(row.current, row.unit) }} + + + {{ fmtCmp(row.prev, row.unit) }} + + + {{ fmtCmp(row.baseline, row.unit) }} + + + {{ fmtCmp(row.median, row.unit) }} + + 该窗口无对比数据 + + + + + + + + + + + {{ sectionState.service.error }} + + 重试 + + + + + + + {{ t.label }} + {{ t.value }} + + + + + 查看超时明细 + + + + + + + + + + + + + + {{ sectionState.customer.error }} + + 重试 + + + + + + {{ t.label }} + {{ t.value }} + + + + + 降温客户名单 + + + 沉睡客户名单 + + + + + + + + + + + {{ sectionState.workload.error }} + + 重试 + + + + + + {{ t.label }} + {{ t.value }} + + + + + + + + + + + + {{ sectionState.calls.error }} + + 重试 + + + + + + {{ t.label }} + {{ t.value }} + + + + + 通话明细 + + + + + + + + + + + 异常 + 按严重度排序 · 点行查看明细 + + + + + + + + 维度权重:{{ weightsLine }} + + + + {{ row.name }} + {{ row.code }} + + + + {{ fmtCmp(row.value, row.unit) }} + + + {{ fmtCmp(row.prev, row.unit) }} + + + {{ fmtCmp(row.baseline, row.unit) }} + + + {{ fmtCmp(row.median, row.unit) }} + + + + + 正常 + + 低置信 + + 不足 + + + + + + {{ row.score == null ? '--' : Math.round(row.score) }} + + + + + + + 上期 prev · PeriodMetrics 原始字典 + {{ prevJson }} + 个人基线 baseline · PeriodMetrics 原始字典 + {{ baseJson }} + + + + + + + + + + + + + +
{{ prevJson }}
{{ baseJson }}