From 1c065846f6731e7878bfbd170e075ae7755f0fbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E7=AB=A0=E6=B5=A9?= Date: Sat, 24 Oct 2026 14:33:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(qaops):=20=E6=8C=89=E4=BA=BA=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E5=90=8C=E6=AD=A5=E7=9B=B4=E6=8E=A5=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E5=8F=8A=E5=88=97=E5=AE=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 按人和按区域均直接显示部门名称与完整路径悬停,统一列宽;移除不再使用的折叠摘要、模式开关和样式。统计、兼属与分页不变。 验证:按人部门直显与统一列宽回归先红后绿,14项相关测试与类型检查通过。完整门禁、候选及上线验收待执行。 --- CHANGELOG.md | 6 ++++++ web/src/QAPeopleAnalysis.test.tsx | 14 +++++++++----- web/src/QAPeopleAnalysis.tsx | 18 ++---------------- web/src/qaDepartmentStatistics.css | 8 -------- 4 files changed, 17 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a18fdb..e5a6f52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -76,6 +76,12 @@ > `0.1.12`),由 `scripts/version.py` 从 git **算出来**;开发交付的独立说明写入本文件“开发快照”章节,并打 `snapshot/vX.Y.Z` 注释标签 ⇒ 每次开发交付均可追溯, > 但"发布版本"仍然只能由人定(CI 不会自动升版本、不会打 tag)。 +## 开发快照 snapshot/v0.1.51 - 2026-10-24 + +### Changed + +- 按人视图也直接展示所属部门名称,多部门逐行显示、完整路径悬停可看,去掉“个直属部门”折叠摘要;列宽与按区域统一。两个排行复用同一展示实现,移除不再使用的旧分支和样式;统计、兼属和50人分页不变。 + ## 开发快照 snapshot/v0.1.50 - 2026-10-24 ### Changed diff --git a/web/src/QAPeopleAnalysis.test.tsx b/web/src/QAPeopleAnalysis.test.tsx index 6bd8624..3ef9105 100644 --- a/web/src/QAPeopleAnalysis.test.tsx +++ b/web/src/QAPeopleAnalysis.test.tsx @@ -24,7 +24,7 @@ it('renders at most fifty ranked people with actual question counts and no depar expect(html).not.toContain('checkbox') expect(html).not.toContain('绑定选中部门') }) -it('shows region department names immediately with full-path titles while leaving all-person details unchanged', () => { +it('shows both regional and all-person department names inline with complete path titles', () => { const data = fixture() data.rows.find((d) => d.id === 'root')!.name = '研发/视觉' const html = renderToStaticMarkup() @@ -35,17 +35,21 @@ it('shows region department names immediately with full-path titles while leavin expect(html).not.toContain(') - expect(all).toContain('研发/视觉') + expect(all).toContain('>Fixture Child') }) -it('widens region names and departments without changing all-person column widths', () => { +it('uses the same widened personnel and department columns in both ranking views', () => { const data = fixture() const widths = (mode: 'regions' | 'people') => [ ...renderToStaticMarkup().matchAll(/ Number(m[1])) expect(widths('regions')).toEqual([6, 20, 9, 36, 9, 20]) - expect(widths('people')).toEqual([6, 19, 16, 29, 10, 20]) + expect(widths('people')).toEqual([6, 20, 9, 36, 9, 20]) }) it('region analysis lists the saved region members once and all-person analysis retains unassigned and zero-use people', () => { const data = fixture() diff --git a/web/src/QAPeopleAnalysis.tsx b/web/src/QAPeopleAnalysis.tsx index 8309bad..5898b05 100644 --- a/web/src/QAPeopleAnalysis.tsx +++ b/web/src/QAPeopleAnalysis.tsx @@ -8,16 +8,14 @@ export function PeopleRankingTable({ page, onPage, label, - inlineDepartments = false, }: { people: PersonRankingRow[] page: number onPage: (n: number) => void label: string - inlineDepartments?: boolean }) { const window = peoplePage(people, page) - const columnWidths = inlineDepartments ? [6, 20, 9, 36, 9, 20] : [6, 19, 16, 29, 10, 20] + const columnWidths = [6, 20, 9, 36, 9, 20] return (
{person.region_label} - {person.department_paths.length && inlineDepartments ? ( + {person.department_paths.length ? (
    {person.department_paths.map((d) => (
  • @@ -68,17 +66,6 @@ export function PeopleRankingTable({
  • ))}
- ) : person.department_paths.length ? ( -
- d.path).join(';')}> - {person.department_paths.length} 个直属部门 - -
    - {person.department_paths.map((d) => ( -
  • {d.path}
  • - ))} -
-
) : ( '未关联部门' )} @@ -160,7 +147,6 @@ export function PeopleAnalysisView({ data, mode }: { data: DepartmentStatisticsS page={page} onPage={setPage} label={mode === 'regions' ? '区域人员排行' : '全体人员排行'} - inlineDepartments={mode === 'regions'} />

沿用当前已同步通讯录及已保存区域配置;同一区域多部门人员去重,跨区域人员单列“跨区域待核对”,未配置者列“未归属”,不擅自裁决主归属或生成绩效结论。 diff --git a/web/src/qaDepartmentStatistics.css b/web/src/qaDepartmentStatistics.css index 2787de2..c503137 100644 --- a/web/src/qaDepartmentStatistics.css +++ b/web/src/qaDepartmentStatistics.css @@ -74,14 +74,6 @@ font-size: 11px; font-weight: 400; } -.qa-people-paths summary { - cursor: pointer; - color: #536c88; -} -.qa-people-paths ul { - padding-left: 16px; - margin: 6px 0 0; -} .qa-people-paths .qa-people-departments-inline { list-style: none; padding: 0;