安全:隔离报表选项扫码与首页数据

This commit is contained in:
焦龙言
2026-09-23 12:37:30 +08:00
parent 5a76fe7521
commit c97f6ed3bd
8 changed files with 429 additions and 62 deletions
@@ -1272,6 +1272,14 @@ test('六个只读报表页面逐页满足 API、权限、筛选、列和异步
}
})
test('首页指标全部来自受批次作用域保护的业务与报表 API', async () => {
const source = await readFile(path.join(frontendRoot, 'src/views/dashboard/index.vue'), 'utf8')
for (const api of ['listInbound', 'listReturn', 'listShipment', 'listPalletInventory', 'listShipmentReport']) {
assert.match(source, new RegExp(`\\b${api}\\b`))
}
assert.doesNotMatch(source, /axios\.|fetch\(/)
})
test('扫码组件声明交互契约并保持触控尺寸', async () => {
const source = await readFile(path.join(frontendRoot, 'src/components/PalletScanInput/index.vue'), 'utf8')