Commit ddda95e1 by changjin

修改项目切换

parent 0c6cd3c5
...@@ -96,7 +96,7 @@ export default { ...@@ -96,7 +96,7 @@ export default {
this.$axios.get('/baseInfo/initPersonalMenu?projectId=' + projectId).then((res) =>{ this.$axios.get('/baseInfo/initPersonalMenu?projectId=' + projectId).then((res) =>{
if(res.data.code === '0') { if(res.data.code === '0') {
this.data = res.data.data this.data = res.data.data
window.sessionStorage.setItem('projectId',res.data.data.projectId) window.sessionStorage.setItem('projectId',projectId)
} }
}) })
} else { } else {
...@@ -111,8 +111,8 @@ export default { ...@@ -111,8 +111,8 @@ export default {
// 选择项目 // 选择项目
choose (item) { choose (item) {
this.data.projectName = item.projectName this.data.projectName = item.projectName
this.getData(item.id)
window.sessionStorage.setItem('projectId',item.id) window.sessionStorage.setItem('projectId',item.id)
this.getData(item.id)
window.location.reload() window.location.reload()
}, },
// 退出登录 // 退出登录
......
...@@ -67,6 +67,7 @@ export default { ...@@ -67,6 +67,7 @@ export default {
}), }),
created () { created () {
this.projectId = window.sessionStorage.getItem('projectId') this.projectId = window.sessionStorage.getItem('projectId')
console.log(this.projectId)
this.height = (document.documentElement.clientHeight - 200 ) + 'px' this.height = (document.documentElement.clientHeight - 200 ) + 'px'
this.getData() this.getData()
this.getPermissionsBtn() 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