From 24b31646435a49ad6d945374c1edb7e8aaf5e841 Mon Sep 17 00:00:00 2001 From: jiutianzhiyu Date: Mon, 29 Mar 2021 22:58:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=AE=A1=E7=90=86:=201.=20?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=B8=B2=E6=9F=93=202.=20=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=20=E5=85=AC=E5=8F=B8=E4=BF=A1=E6=81=AF=201.?= =?UTF-8?q?=20=E8=A1=A8=E5=8D=95=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/setting.js | 20 ++++++++++ src/store/getters.js | 4 +- src/views/setting/index.vue | 80 ++++++++++++++++++++++++++++++++----- 3 files changed, 92 insertions(+), 12 deletions(-) create mode 100644 src/api/setting.js 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 @@