|
@@ -12,7 +12,7 @@ export default {
|
|
|
sidebarSelected: '', // sidebar选中的选项
|
|
|
userInfo: { username: 'admin' },
|
|
|
permissions: { "system:role:delete": true, "system:role:create": true, "system:role:query": true, "system:role:setOpts": true },
|
|
|
- currentProjectId: 'Pj4201050001',
|
|
|
+ projectId: 'Pj4201050001',
|
|
|
projects: [{ name: '新华创新大厦', id: 'Pj1101080002' }, { name: '亚心医院', id: 'Pj4201050001' }],
|
|
|
breadcrumb: [],
|
|
|
secret: "saga123456", //密码
|
|
@@ -33,14 +33,14 @@ export default {
|
|
|
userInfo: state => state.userInfo,
|
|
|
permissions: state => state.permissions,
|
|
|
projects: state => state.projects,
|
|
|
- currentProjectId: state => {
|
|
|
- if (!state.currentProjectId) {
|
|
|
+ projectId: state => {
|
|
|
+ if (!state.projectId) {
|
|
|
let pid = storage.get(KEY_PROJECT_SELECTED)
|
|
|
if (pid) {
|
|
|
- state.currentProjectId = pid
|
|
|
+ state.projectId = pid
|
|
|
}
|
|
|
}
|
|
|
- return state.currentProjectId
|
|
|
+ return state.projectId
|
|
|
},
|
|
|
breadcrumb: state => {
|
|
|
if (!state.breadcrumb) {
|
|
@@ -58,8 +58,8 @@ export default {
|
|
|
state.sidebarSelected = val
|
|
|
storage.set(KEY_MENU_SELECTED, val)
|
|
|
},
|
|
|
- setCurrentProjectId: (state, val) => {
|
|
|
- state.currentProjectId = val
|
|
|
+ setprojectId: (state, val) => {
|
|
|
+ state.projectId = val
|
|
|
storage.set(KEY_PROJECT_SELECTED, val)
|
|
|
}
|
|
|
},
|