(name)
| 1310 | }, |
| 1311 | |
| 1312 | async activateScenario(name) { |
| 1313 | this.scenarioLoadingName = name; |
| 1314 | try { |
| 1315 | await this.fetchJson(`/api/scenarios/${encodeURIComponent(name)}/activate`, { |
| 1316 | method: 'POST', |
| 1317 | }); |
| 1318 | this.setNotice(`已切换到场景 "${name}"`); |
| 1319 | this.resourceFormReady = false; |
| 1320 | await this.refreshAll(); |
| 1321 | } catch (e) { |
| 1322 | this.setNotice('场景切换失败: ' + (e.message || e), 'error'); |
| 1323 | } finally { |
| 1324 | this.scenarioLoadingName = ''; |
| 1325 | } |
| 1326 | }, |
| 1327 | |
| 1328 | async setBaseline(name) { |
| 1329 | try { |
nothing calls this directly
no outgoing calls
no test coverage detected