This commit is contained in:
2026-02-16 13:41:41 +08:00
parent 41a3ab45b3
commit c7c1b416ee
17 changed files with 2821 additions and 375 deletions

View File

@ -147,6 +147,9 @@ export default {
if(val){
this.search.clusterId=''
this.getClusterList()
} else {
this.search.clusterId=''
this.clusterOptions=[]
}
},
//表格数据
@ -170,8 +173,15 @@ export default {
})
},
async getClusterList(){
const currentStackId = String(this.search.stackId || '')
if (!currentStackId) {
this.clusterOptions = []
this.search.clusterId = ''
return
}
this.clusterloading =true
await getClusterNameList({stackDeviceId: this.search.stackId, siteId: this.siteId}).then(response => {
if (String(this.search.stackId || '') !== currentStackId) return
const data = JSON.parse(JSON.stringify(response?.data || []))
this.clusterOptions = data
this.search.clusterId = data.length > 0 ? data[0].id : ''
@ -200,4 +210,3 @@ export default {
}
}
</script>