补充项目列表重新分析确认交互

This commit is contained in:
wkc
2026-03-27 14:28:56 +08:00
parent 2c793eaed6
commit 9e0efe8010
2 changed files with 31 additions and 0 deletions

View File

@@ -250,6 +250,16 @@ export default {
if (this.reAnalyzeLoadingMap[projectKey]) {
return
}
try {
await this.$modal.confirm(
`确认对项目“${row.projectName}”重新分析吗?重新分析将重新计算项目标签。`
)
} catch (confirmError) {
if (confirmError === "cancel" || confirmError === "close") {
return
}
throw confirmError
}
this.$set(this.reAnalyzeLoadingMap, projectKey, true)
try {
await rebuildProjectTags({ projectId: row.projectId })

View File

@@ -12,6 +12,27 @@ assert(
"重新分析应调用真实重打标接口"
);
assert(
pageSource.includes("await this.$modal.confirm("),
"重新分析前应先弹出确认框"
);
assert(
pageSource.includes("确认对项目“${row.projectName}”重新分析吗?重新分析将重新计算项目标签。"),
"确认弹窗文案应覆盖项目名称和重新计算标签提醒"
);
assert(
pageSource.includes('confirmError === "cancel"') ||
pageSource.includes("confirmError === 'cancel'"),
"取消确认时应直接结束,不继续提交"
);
assert(
/await this\.\$modal\.confirm\([\s\S]*?this\.\$set\(this\.reAnalyzeLoadingMap,\s*projectKey,\s*true\)/.test(pageSource),
"只有确认后才允许进入按钮 loading"
);
assert(
pageSource.includes('this.$modal.msgSuccess("已开始重新分析")') ||
pageSource.includes("this.$modal.msgSuccess('已开始重新分析')"),