feat: 增强风险规则生成引擎与预算中心页面
后端拆分风险规则生成为解释器、语义分析、本体对齐等子模块, 优化模板执行和流程图生成,完善员工种子数据和导入逻辑,增强 报销单权限策略和草稿持久化,前端新增预算中心视图和趋势图 组件,重构审计页面和风险规则测试对话框交互,完善文档中心 和报销创建页面细节,补充单元测试覆盖。
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
resolveDocumentNewKey,
|
||||
writeDocumentScope
|
||||
} from '../src/utils/documentCenterNewState.js'
|
||||
import { buildDocumentInboxRows } from '../src/composables/useDocumentCenterInbox.js'
|
||||
|
||||
function createMemoryStorage(initial = {}) {
|
||||
const store = new Map(Object.entries(initial))
|
||||
@@ -46,6 +47,16 @@ test('document center new state counts unseen documents and persists viewed rows
|
||||
assert.deepEqual([...readViewedDocumentKeys(storage)], ['archive:claim-1'])
|
||||
})
|
||||
|
||||
test('document center sidebar inbox shares source scoped document keys', () => {
|
||||
const rows = buildDocumentInboxRows({
|
||||
ownedClaims: [{ id: 'claim-1', claim_no: 'EXP-1' }],
|
||||
approvalClaims: [{ id: 'claim-1', claim_no: 'EXP-1' }],
|
||||
archivedClaims: [{ id: 'claim-2', claim_no: 'EXP-2' }]
|
||||
})
|
||||
|
||||
assert.deepEqual(rows.map((row) => resolveDocumentNewKey(row)), ['approval:claim-1', 'archive:claim-2'])
|
||||
})
|
||||
|
||||
test('document center scope state restores only allowed tabs', () => {
|
||||
const storage = createMemoryStorage()
|
||||
const scopes = ['全部', '申请单', '报销单', '审核单', '归档']
|
||||
|
||||
Reference in New Issue
Block a user