feat: 扩展风险规则体系、审批动态路由与预算中心列表化改造

- 新增 25+ 条风险规则(预算/报销/申请/通用类),完善风险规则模拟与反馈发布机制
- 引入费用审批动态路由、平台风险分级、预审与风险阶段管理
- 预算中心列表化改造,优化票据夹仪表盘与数字员工工作看板
- 新增 Hermes 风险线索收集器、Agent 链路追踪中心
- 扩展数字员工能力库(18 个领域 Skill)与交通费用自动预估
- 完善报销申请快速预览、权限控制与前端测试覆盖
This commit is contained in:
caoxiaozhu
2026-06-01 17:07:14 +08:00
parent 7989f3a159
commit 92444e7eae
285 changed files with 25075 additions and 2986 deletions

View File

@@ -15,6 +15,14 @@ const digitalEmployeeList = readFileSync(
fileURLToPath(new URL('../src/components/audit/DigitalEmployeeListPanel.vue', import.meta.url)),
'utf8'
)
const digitalEmployeesView = readFileSync(
fileURLToPath(new URL('../src/views/DigitalEmployeesView.vue', import.meta.url)),
'utf8'
)
const digitalEmployeesViewModel = readFileSync(
fileURLToPath(new URL('../src/views/scripts/digitalEmployeesViewModel.js', import.meta.url)),
'utf8'
)
const digitalEmployeeStyles = readFileSync(
fileURLToPath(new URL('../src/assets/styles/views/digital-employees-view.css', import.meta.url)),
'utf8'
@@ -34,3 +42,36 @@ test('digital employee skill name keeps text avatar prefix', () => {
assert.match(digitalEmployeeStyles, /\.digital-skill-avatar \{[\s\S]*?width: 38px;[\s\S]*?border-radius: 11px;/)
assert.match(digitalEmployeeStyles, /\.digital-skill-avatar\.blue \{[\s\S]*?linear-gradient\(135deg, #3b82f6, #2563eb\);/)
})
test('digital employee skill list uses real pagination', () => {
assert.match(digitalEmployeeList, /:show-pagination="!loading && !errorMessage && visibleEmployees\.length > 0"/)
assert.match(digitalEmployeeList, /:show-page-size="true"/)
assert.match(digitalEmployeeList, /:page-size-options="pageSizeOptions"/)
assert.match(digitalEmployeeList, /@page-size-change="changePageSize"/)
assert.match(digitalEmployeeList, /v-for="employee in pagedEmployees"/)
assert.match(digitalEmployeeList, /const pageSize = ref\(10\)/)
assert.match(digitalEmployeeList, /label: '10 条\/页', value: 10/)
assert.match(digitalEmployeeList, /label: '20 条\/页', value: 20/)
assert.match(digitalEmployeeList, /label: '50 条\/页', value: 50/)
assert.match(digitalEmployeeList, /每页 \$\{pageSize\.value\} 条/)
assert.match(digitalEmployeeList, /function changePageSize\(size\) \{[\s\S]*?currentPage\.value = 1/)
})
test('digital employee skill type filter is wired through list and model', () => {
assert.match(digitalEmployeeList, /id="skillCategory"/)
assert.match(digitalEmployeeList, /:label="selectedSkillCategoryLabel"/)
assert.match(digitalEmployeeList, /:options="skillCategoryOptions"/)
assert.match(digitalEmployeeList, /:selected-value="selectedSkillCategory"/)
assert.match(digitalEmployeeList, /selectFilter\('skillCategory', \$event\)/)
assert.match(digitalEmployeeList, /props\.selectedSkillCategory/)
assert.match(digitalEmployeesView, /:selected-skill-category="selectedSkillCategory"/)
assert.match(digitalEmployeesView, /:skill-category-options="skillCategoryOptions"/)
assert.match(digitalEmployeesView, /selectedSkillCategory: selectedSkillCategory\.value/)
assert.match(digitalEmployeesView, /if \(type === 'skillCategory'\)[\s\S]*?selectedSkillCategory\.value = value/)
assert.match(digitalEmployeesView, /selectedSkillCategory\.value = ''/)
assert.match(digitalEmployeesViewModel, /selectedSkillCategory = normalizeText\(filters\.selectedSkillCategory\)/)
assert.match(digitalEmployeesViewModel, /hasSkillCategory/)
assert.match(digitalEmployeesViewModel, /normalizeText\(item\.skillCategory\) !== selectedSkillCategory/)
})