fix: 上传风险规则后同步更新站点快照,解决状态仍显示未发布的问题

1. 后端 RiskRuleServiceImpl:将 updateSnapshotsByType 从异步事件改为同步调用 snapshotService.updateSnapshot
2. 前端 RiskRules.vue:上传按钮成功后调用 fetchSnapshotStatus 刷新状态标签
This commit is contained in:
mediabot-pt
2026-07-07 17:54:37 +08:00
parent 5777a02823
commit 40eea42710
2 changed files with 10 additions and 6 deletions

View File

@@ -497,6 +497,7 @@ const uploadRules = async () => {
try {
await api.raw.post('/risk-rules/'+editType.value+'/upload', { rules: parsed.value })
ElMessage.success('已上传')
fetchSnapshotStatus()
} catch { ElMessage.error('上传失败') }
finally { uploading.value = false }
}