1 #101

Merged
xiaomeng merged 1 commits from pc-master into portal 2024-01-24 07:23:29 +00:00
2 changed files with 7 additions and 3 deletions

View File

@ -172,7 +172,8 @@ export function realTimeLine(id, data,pageId) {
),
]
var equipmentList=store.state.equipmentSelList
// var equipmentList=store.state.equipmentSelList
var equipmentList=JSON.parse(localStorage.getItem('equipmentSelList'))
var list = []
var selList={}
@ -362,6 +363,7 @@ export function realTimeLine(id, data,pageId) {
}
});
localStorage.setItem('equipmentSelList', JSON.stringify(equipmentList))
});
window.addEventListener("resize", function () {
myChart.resize();

View File

@ -197,8 +197,9 @@ export default {
index: index + 1,
};
});
if(selTrue){
this.$store.state.equipmentSelList=res.data.data
if(!localStorage.getItem('equipmentSelList')){
localStorage.setItem('equipmentSelList', JSON.stringify(res.data.data))
// this.$store.state.equipmentSelList=res.data.data
}
this.leftList[1].list = []
this.leftList[2].list = []
@ -266,6 +267,7 @@ export default {
});
localStorage.removeItem('token')
localStorage.removeItem('userInfo')
localStorage.removeItem('equipmentSelList')
this.$router.push({ name: 'login' })
} else {
this.$message.error("请求出错");