在路由权限校验中获取设备列表
This commit is contained in:
@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user