Commit ddda95e1 by changjin

修改项目切换

parent 0c6cd3c5
......@@ -96,7 +96,7 @@ export default {
this.$axios.get('/baseInfo/initPersonalMenu?projectId=' + projectId).then((res) =>{
if(res.data.code === '0') {
this.data = res.data.data
window.sessionStorage.setItem('projectId',res.data.data.projectId)
window.sessionStorage.setItem('projectId',projectId)
}
})
} else {
......@@ -111,8 +111,8 @@ export default {
// 选择项目
choose (item) {
this.data.projectName = item.projectName
this.getData(item.id)
window.sessionStorage.setItem('projectId',item.id)
this.getData(item.id)
window.location.reload()
},
// 退出登录
......
......@@ -67,6 +67,7 @@ export default {
}),
created () {
this.projectId = window.sessionStorage.getItem('projectId')
console.log(this.projectId)
this.height = (document.documentElement.clientHeight - 200 ) + 'px'
this.getData()
this.getPermissionsBtn()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment