diff --git a/src/api/setting.js b/src/api/setting.js new file mode 100644 index 0000000..83631ac --- /dev/null +++ b/src/api/setting.js @@ -0,0 +1,20 @@ +import request from '@/utils/request' + +/** + * 获取公司信息 + * **/ +export function getCompanyInfo(companyId) { + return request({ + url: `/company/${companyId}` + }) +} + +/** + * 获取角色列表 + * ***/ +export function getRoleList(params) { + return request({ + url: '/sys/role', + params + }) +} diff --git a/src/store/getters.js b/src/store/getters.js index 68aac70..f775b60 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -12,7 +12,7 @@ const getters = { device: state => state.app.device, token: state => state.user.token, name: state => state.user.userInfo.username, - staffPhoto: state => state.userInfo.staffPhoto - + staffPhoto: state => state.user.userInfo.staffPhoto, + companyId: state => state.user.userInfo.companyId } export default getters diff --git a/src/views/setting/index.vue b/src/views/setting/index.vue index 8f2ed4d..c2d7b37 100644 --- a/src/views/setting/index.vue +++ b/src/views/setting/index.vue @@ -14,10 +14,10 @@ >新增角色 - - - - + + + + 分配权限 编辑 @@ -27,7 +27,7 @@ - + @@ -39,16 +39,16 @@ /> - + - + - + - + @@ -60,8 +60,68 @@