diff --git a/databi/src/DatabiApp.test.jsx b/databi/src/DatabiApp.test.jsx index 1ab4409..b1e80e3 100644 --- a/databi/src/DatabiApp.test.jsx +++ b/databi/src/DatabiApp.test.jsx @@ -325,7 +325,7 @@ test("routes databi social page to Social BI and loads real overview rows", asyn // v2 Shell:主视图容器 + 侧栏五个视图 tab,默认选中“经营概览”。 expect(screen.getByLabelText("Social BI 数据中心")).toBeTruthy(); const viewTabs = screen.getByRole("tablist", { name: "数据视图" }); - ["经营概览", "地区洞察", "人员绩效", "留存质量", "数据明细"].forEach((name) => { + ["经营概览", "地区洞察", "运营中心", "留存质量", "数据明细"].forEach((name) => { expect(within(viewTabs).getByRole("tab", { name })).toBeTruthy(); }); expect(within(viewTabs).getByRole("tab", { name: "经营概览" })).toHaveAttribute("aria-selected", "true"); @@ -352,11 +352,11 @@ test("routes databi social page to Social BI and loads real overview rows", asyn expect(screen.getAllByText("中东大区").length).toBeGreaterThan(0); expect(screen.getAllByText("$50").length).toBeGreaterThan(0); - // 侧栏切换:人员绩效 —— 运营人员 Omar 上榜、达成率 90.0%、kpi_manage 时有配置目标入口。 + // 侧栏切换:运营中心 —— 运营人员 Omar 上榜、达成率 90.0%、kpi_manage 时有配置目标入口。 await act(async () => { - within(viewTabs).getByRole("tab", { name: "人员绩效" }).click(); + within(viewTabs).getByRole("tab", { name: "运营中心" }).click(); }); - expect(within(viewTabs).getByRole("tab", { name: "人员绩效" })).toHaveAttribute("aria-selected", "true"); + expect(within(viewTabs).getByRole("tab", { name: "运营中心" })).toHaveAttribute("aria-selected", "true"); expect(screen.getAllByText("Omar").length).toBeGreaterThan(0); expect(screen.getAllByText("90.0%").length).toBeGreaterThan(0); expect(screen.getByRole("button", { name: "配置目标" })).toBeTruthy(); diff --git a/databi/src/social/SocialBiApp.jsx b/databi/src/social/SocialBiApp.jsx index 94d8d89..88ee116 100644 --- a/databi/src/social/SocialBiApp.jsx +++ b/databi/src/social/SocialBiApp.jsx @@ -30,7 +30,7 @@ import "../styles/social-v2.css"; const VIEWS = [ { component: OverviewView, icon: InsightsOutlined, key: "overview", label: "经营概览" }, { component: RegionsView, icon: PublicOutlined, key: "regions", label: "地区洞察" }, - { component: TeamKpiView, icon: GroupsOutlined, key: "team", label: "人员绩效" }, + { component: TeamKpiView, icon: GroupsOutlined, key: "team", label: "运营中心" }, { component: RetentionView, icon: RepeatOutlined, key: "retention", label: "留存质量" }, { component: DataTableView, icon: TableChartOutlined, key: "table", label: "数据明细" } ]; diff --git a/databi/src/social/useSocialBiData.js b/databi/src/social/useSocialBiData.js index a4aaf40..b095083 100644 --- a/databi/src/social/useSocialBiData.js +++ b/databi/src/social/useSocialBiData.js @@ -90,7 +90,7 @@ export function useSocialBiData(filters) { }); } else { setKpi(null); - nextErrors.push(`KPI 数据加载失败: ${kpiResult.reason?.message || "未知错误"}`); + nextErrors.push(`充值目标数据加载失败: ${kpiResult.reason?.message || "未知错误"}`); } setErrors(nextErrors); setIsLoading(false); diff --git a/databi/src/social/views/TeamKpiView.jsx b/databi/src/social/views/TeamKpiView.jsx index a64fcce..5bfc525 100644 --- a/databi/src/social/views/TeamKpiView.jsx +++ b/databi/src/social/views/TeamKpiView.jsx @@ -1,4 +1,4 @@ -// TeamKpiView:人员绩效视图。kpi_view_all 用户看团队排行,普通运营看"我的 KPI"。 +// TeamKpiView:运营中心视图。kpi_view_all 用户看团队排行,普通运营看"我的充值"。 // 数据契约见 SocialBiApp.jsx 的 useSocialBi():金额为 USD 分、比例为 0-1 小数、缺失为 null(显示 "--")。 import { useMemo, useState } from "react"; @@ -161,7 +161,7 @@ export function TeamKpiView() { return isLoading ? : (
- 暂无 KPI 数据 + 暂无充值数据 先在用户管理为运营人员分配 App/区域数据范围
@@ -186,7 +186,7 @@ export function TeamKpiView() {
- {canViewAll ? "团队 KPI" : "我的 KPI"} + {canViewAll ? "团队充值" : "我的充值"} 本月充值目标进度 · {kpi.period_month} {!canViewAll ? 仅展示我负责的范围 : null}
@@ -239,7 +239,7 @@ export function TeamKpiView() {
- 绩效排行 + 充值排行 {kpi.period_month} · {formatCount(summary.operator_count)} 名运营 @@ -486,7 +486,7 @@ function PersonTable({ appCodes, remainingDays, rows }) { 当月充值 - 月目标 + 月目标 达成率 @@ -695,10 +695,10 @@ function KpiTargetDrawer({ appCodes, kpi, onClose, onSaved }) { return (
-