在路由权限校验中获取设备列表

This commit is contained in:
白菜
2025-07-23 21:35:40 +08:00
parent b68f2608f3
commit fe14089562
3 changed files with 8 additions and 8 deletions

View File

@ -23,10 +23,13 @@ const ems = {
},
actions: {
getZdList({commit,state}){
return getAllSites().then(response => {
commit('SET_ZD_LIST', response?.data || [])
console.log('store action getZdList 获取站点数据',state.zdList)
})
if(state.zdList.length === 0){
getAllSites().then(response => {
commit('SET_ZD_LIST', response?.data || [])
console.log('store action getZdList 获取站点数据',state.zdList)
})
}
}
}
}