|
|
@ -27,9 +27,14 @@ const mutations = { |
|
|
|
SET_INTRODUCTION: (state, introduction) => { |
|
|
|
state.introduction = introduction |
|
|
|
}, |
|
|
|
// 设置权限(v-permissin)
|
|
|
|
// 设置权限(v-permission)
|
|
|
|
SET_ROLES: (state, roles) => { |
|
|
|
state.roles = roles |
|
|
|
let _roles = [ |
|
|
|
'IncomingData', |
|
|
|
'IncomingData.filter', |
|
|
|
'IncomingData.export', |
|
|
|
] |
|
|
|
state.roles = _roles |
|
|
|
}, |
|
|
|
SET_USERINFO: (state, data) => { |
|
|
|
state.userInfo = data |
|
|
@ -129,6 +134,7 @@ const actions = { |
|
|
|
getUsersByUserName(username).then(res=>{ |
|
|
|
if(res && JSON.stringify(res).length > 0){ |
|
|
|
localStorage.setItem('isLoginName',username) |
|
|
|
// commit('SET_ROLES', res)
|
|
|
|
commit('SET_USERINFO', res) |
|
|
|
resolve(res) |
|
|
|
}else{ |
|
|
|