Files
knowledge-governance/web/src/qaDepartmentStatistics.fixture.ts
T
姚章浩 99d6109bef
build / build (push) Successful in 1m12s
feat(qaops): 区域统计展示直属人员与多部门兼属
按稳定身份展示零使用人员、个人次数与最近提问时间,直接部门去重计算兼属数量;保留原分支统计、配置和源问答。

验证:396项前端测试及类型检查通过;隔离PG全mirror/org竞态回归通过,个人/别名/同名/零使用/未关联与原部门汇总回归通过。
正式同镜像及上线验证尚未执行。
2026-10-21 17:17:08 +08:00

80 lines
2.0 KiB
TypeScript

export const departmentStatisticsFixture = {
state: 'ready',
cache_key: 'a'.repeat(64),
cache_hit: true,
retry_after: 0,
snapshot: {
period: 'all',
month: '',
start: '2026-04-01T00:00:00+08:00',
end: '2026-10-19T12:00:00+08:00',
generated_at: '2026-10-19T12:00:01+08:00',
expires_at: '2026-10-19T12:01:01+08:00',
total_people: 3,
total_visits: 6,
unmapped_visits: 1,
organization: {
state: 'ready',
directory_id: 'fixture-directory',
directory_source: 'weekly_report_snapshot',
synced_at: '2026-10-18T00:00:00+08:00',
revision_id: 'fixture-revision',
basis: 'current_directory',
region_names: ['Education'],
},
regions: [{ id: 'edu', name: 'Education' }],
people: [
{
key: 'person-' + '1'.repeat(64),
name: 'Fixture Alpha',
department_ids: ['root', 'child'],
visits: 2,
last_asked_at: '2026-10-17T06:00:00+08:00',
},
{
key: 'person-' + '2'.repeat(64),
name: 'Fixture Beta',
department_ids: ['root'],
visits: 3,
last_asked_at: '2026-10-18T06:00:00+08:00',
},
{ key: 'person-' + '3'.repeat(64), name: '', department_ids: ['child'], visits: 0, last_asked_at: null },
],
rows: [
{
id: 'root',
parent_id: '',
name: 'Fixture Root',
region: '',
visitors: 2,
total_people: 3,
ratio: (100 * 2) / 3,
visits: 5,
last_asked_at: '2026-10-18T06:00:00+08:00',
},
{
id: 'child',
parent_id: 'root',
name: 'Fixture Child',
region: 'edu',
visitors: 1,
total_people: 2,
ratio: 50,
visits: 2,
last_asked_at: '2026-10-17T06:00:00+08:00',
},
{
id: 'empty',
parent_id: 'root',
name: 'Empty',
region: '',
visitors: 0,
total_people: 0,
ratio: null,
visits: 0,
last_asked_at: null,
},
],
},
}