| | |
| | | avatar: storage.get(constant.avatar), |
| | | roles: storage.get(constant.roles), |
| | | permissions: storage.get(constant.permissions), |
| | | deptId: storage.get(constant.deptId) |
| | | deptId: storage.get(constant.deptId), |
| | | branchCompanyId: storage.get(constant.branchCompanyId), |
| | | branchCompanyName: storage.get(constant.branchCompanyName) |
| | | }, |
| | | |
| | | mutations: { |
| | |
| | | SET_DEPT_ID: (state, deptId) => { |
| | | state.deptId = deptId |
| | | storage.set(constant.deptId, deptId) |
| | | }, |
| | | SET_BRANCH_COMPANY_ID: (state, branchCompanyId) => { |
| | | state.branchCompanyId = branchCompanyId |
| | | storage.set(constant.branchCompanyId, branchCompanyId) |
| | | }, |
| | | SET_BRANCH_COMPANY_NAME: (state, branchCompanyName) => { |
| | | state.branchCompanyName = branchCompanyName |
| | | storage.set(constant.branchCompanyName, branchCompanyName) |
| | | } |
| | | }, |
| | | |
| | |
| | | commit('SET_NAME', username) |
| | | commit('SET_AVATAR', avatar) |
| | | commit('SET_DEPT_ID', deptId) |
| | | commit('SET_BRANCH_COMPANY_ID', res.branchCompanyId) |
| | | commit('SET_BRANCH_COMPANY_NAME', res.branchCompanyName) |
| | | resolve(res) |
| | | }).catch(error => { |
| | | reject(error) |