- 优化测量点对话框路径解析格式化 - 添加稳态校验重启API端点验证功能 - 更新创建参数类型定义支持可选lineId和lineIds数组 - 修复任务表格组件模板缩进格式问题 - 扩展任务表格列配置验证数组格式 - 添加任务表格仅对失败行显示重启操作功能 - 集成共享台账树组件发送选中叶节点监测点功能 - 添加多监测点创建参数构建支持 - 实现指标选择为空时全指标校验功能 - 添加预期项目数量计算功能 - 优化创建对话框指标选择标签防止输入框重置 - 添加任务表格树形选择滚动下拉菜单样式 - 实现页面创建流程调用创建API并轮询任务状态 - 添加创建结果面板加载状态和进度显示 - 实现页面重启流程确认调用重启API功能 - 优化汇总表格异常字段持久化支持 - 添加汇总表格监测点名称显示功能 - 优化详情面板按需加载项目详情 - 更新接口类型支持分页字段定义 - 优化ICD路径检查对话框标准映射参数传递 - 添加ICD记录导出SQL和JSON功能 - 扩展ICD路径API端点和类型定义 - 添加ICD路径参考选项和映射详情功能 - 重构ICD表格列显示移除激活和创建时间列 - 添加ICD映射详情对话框三个标签页功能 - 优化ICD映射详情JSON树形视图显示 - 更新ICD类型选项覆盖手动和上游标准状态
87 lines
3.9 KiB
JavaScript
87 lines
3.9 KiB
JavaScript
import fs from 'node:fs'
|
|
import path from 'node:path'
|
|
import process from 'node:process'
|
|
|
|
const rootDir = process.cwd()
|
|
const pageDir = path.resolve(rootDir, 'frontend/src/views/tools/mmsMapping')
|
|
const resultPanelPath = path.join(pageDir, 'components/MappingResultPanel.vue')
|
|
const checkDialogPath = path.join(pageDir, 'components/IcdPathCheckDialog.vue')
|
|
const flowPath = path.join(pageDir, 'utils/useMmsMappingFlow.ts')
|
|
|
|
const resultPanelSource = fs.readFileSync(resultPanelPath, 'utf8')
|
|
const checkDialogSource = fs.readFileSync(checkDialogPath, 'utf8')
|
|
const flowSource = fs.readFileSync(flowPath, 'utf8')
|
|
|
|
const checks = [
|
|
[
|
|
'ICD consistency issue dialog reviews the current issue list without clearing it on confirm',
|
|
() =>
|
|
!/reviewingIcdConsistencyProblemList/.test(resultPanelSource) &&
|
|
/v-for="\([^"]+in\s+icdConsistencyProblemList"/.test(resultPanelSource)
|
|
],
|
|
[
|
|
'ICD consistency issue confirm emits an acknowledgement only',
|
|
() =>
|
|
/confirmIcdConsistencyProblems/.test(resultPanelSource) &&
|
|
/emit\('confirm-icd-consistency-problems'\)/.test(resultPanelSource) &&
|
|
!/emit\('confirm-icd-consistency-problems',/.test(resultPanelSource)
|
|
],
|
|
[
|
|
'ICD consistency issue dialog has explicit confirm action',
|
|
() => /confirmIcdConsistencyProblems/.test(resultPanelSource) && /event: 'confirm-icd-consistency-problems'/.test(resultPanelSource)
|
|
],
|
|
[
|
|
'ICD consistency indicator shows remaining issue count on the warning icon',
|
|
() => /el-badge[\s\S]*icdConsistencyProblemCount/.test(resultPanelSource)
|
|
],
|
|
[
|
|
'ICD consistency issue dialog supports removing a single reviewed issue',
|
|
() =>
|
|
/@click="emit\('remove-icd-consistency-problem',\s*index\)"/.test(resultPanelSource) &&
|
|
/event:\s*'remove-icd-consistency-problem',\s*index:\s*number/.test(resultPanelSource) &&
|
|
/handleRemoveIcdConsistencyProblem/.test(flowSource)
|
|
],
|
|
[
|
|
'ICD consistency issue removal is wired from dialog host to flow state',
|
|
() =>
|
|
/@remove-icd-consistency-problem="handleRemoveIcdConsistencyProblemEvent"/.test(checkDialogSource) &&
|
|
/handleRemoveIcdConsistencyProblemEvent/.test(checkDialogSource) &&
|
|
/handleRemoveIcdConsistencyProblem/.test(flowSource)
|
|
],
|
|
[
|
|
'ICD consistency check opens the issue dialog when failed',
|
|
() =>
|
|
/shouldOpenIcdConsistencyProblems/.test(resultPanelSource) &&
|
|
/shouldOpenIcdConsistencyProblems\.value \+= 1/.test(flowSource)
|
|
],
|
|
[
|
|
'save is gated until failed ICD consistency issues are confirmed',
|
|
() => /hasConfirmedIcdConsistencyProblems/.test(flowSource) && /!hasConfirmedIcdConsistencyProblems\.value/.test(flowSource)
|
|
],
|
|
[
|
|
'reviewed ICD consistency result follows the remaining reviewed issue list',
|
|
() =>
|
|
/reviewedIcdConsistencyResult/.test(flowSource) &&
|
|
/if\s*\(!lastIcdConsistencyCheckResult\.value\)\s*return\s+1/.test(flowSource) &&
|
|
/return\s+reviewedIcdConsistencyProblemList\.value\.length\s*\?\s*0\s*:\s*1/.test(flowSource)
|
|
],
|
|
[
|
|
'save payload preserves the remaining reviewed issue list after manual removal',
|
|
() =>
|
|
/buildReviewedIcdCheckMsg/.test(flowSource) &&
|
|
/const\s+reviewedIssues\s*=\s*reviewedIcdConsistencyProblemList\.value/.test(flowSource) &&
|
|
/details:\s*reviewedIssues/.test(flowSource) &&
|
|
/issuesJson:\s*reviewedIssues\.length/.test(flowSource)
|
|
]
|
|
]
|
|
|
|
const failedChecks = checks.filter(([, check]) => !check()).map(([name]) => name)
|
|
|
|
if (failedChecks.length) {
|
|
console.error('ICD consistency issue review contract failed:')
|
|
failedChecks.forEach(name => console.error(`- ${name}`))
|
|
process.exit(1)
|
|
}
|
|
|
|
console.log('ICD consistency issue review contract passed.')
|