fix: 反引号+data架构同步+因果链推荐

This commit is contained in:
Hermes CI Fix
2026-07-14 17:34:53 +08:00
parent 9afcea8f8d
commit 46fa811d52
+3 -3
View File
@@ -988,7 +988,7 @@ async function showCausalityRecommendations() {
async function applyCausality(rec: any) { async function applyCausality(rec: any) {
try { try {
await api.post(\\`/maps/\\${currentMap.value?.id}/connections\\`, { from: rec.source_kpi_code, to: rec.target_kpi_code }) await api.post(`/maps/${currentMap.value?.id}/connections`, { from: rec.source_kpi_code, to: rec.target_kpi_code })
ElMessage.success('连线已添加') ElMessage.success('连线已添加')
showCausalityDialog.value = false showCausalityDialog.value = false
loadMap() loadMap()
@@ -999,11 +999,11 @@ async function applyAllCausality() {
let added = 0 let added = 0
for (const rec of causalityRecommendations.value) { for (const rec of causalityRecommendations.value) {
try { try {
await api.post(\\`/maps/\\${currentMap.value?.id}/connections\\`, { from: rec.source_kpi_code, to: rec.target_kpi_code }) await api.post(`/maps/${currentMap.value?.id}/connections`, { from: rec.source_kpi_code, to: rec.target_kpi_code })
added++ added++
} catch {} } catch {}
} }
ElMessage.success(\\`已添加 \\${added}/\\${causalityRecommendations.value.length} 条因果链\\`) ElMessage.success(`已添加 ${added}/${causalityRecommendations.value.length} 条因果链`)
showCausalityDialog.value = false showCausalityDialog.value = false
loadMap() loadMap()
} }