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 list = []
var selList={} var selList={}
@ -362,6 +363,7 @@ export function realTimeLine(id, data,pageId) {
} }
}); });
localStorage.setItem('equipmentSelList', JSON.stringify(equipmentList))
}); });
window.addEventListener("resize", function () { window.addEventListener("resize", function () {
myChart.resize(); myChart.resize();

View File

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