From fcbd4cb9881820cb3fee642a98905b44629ece46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Wed, 6 Sep 2023 17:07:31 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=8E=A5=E5=8F=A3=E7=9C=8B=E6=9D=BF?= =?UTF-8?q?=E3=80=91=E6=9D=83=E9=99=90=E9=85=8D=E7=BD=AE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PC/InterFace.Dash/src/api/wms-auth.js | 112 +++++- .../views/menuList/AbpIdentityMarkRoles.vue | 351 +++++------------- 2 files changed, 194 insertions(+), 269 deletions(-) diff --git a/PC/InterFace.Dash/src/api/wms-auth.js b/PC/InterFace.Dash/src/api/wms-auth.js index 19e25f1..0fb286b 100644 --- a/PC/InterFace.Dash/src/api/wms-auth.js +++ b/PC/InterFace.Dash/src/api/wms-auth.js @@ -1,13 +1,6 @@ import request from '@/utils/request' let authApi = localStorage.getItem('authApi') + '/api' - -export function login(data) { - return request({ - url: authApi + '/account/login', - method: 'post', - data - }) -} +let loginApi = localStorage.getItem('loginApi') export function logout() { return request({ @@ -18,10 +11,19 @@ export function logout() { // faster-new +// 登录 +export function login(data) { + return request({ + url: loginApi + '/CustAccount/login', + method: 'post', + data + }) +} + // 获取token export function token(data) { return request({ - url: localStorage.getItem('authApi') + '/connect/token', + url: authApi + '/connect/token', method: 'post', headers: { 'Content-Type': 'application/x-www-form-urlencoded' @@ -30,10 +32,10 @@ export function token(data) { }) } -// 获取用户信息(单点登录) +// 通过token获取用户信息(单点登录) export function getUsersByToken(token) { return request({ - url: localStorage.getItem('oidcLogin_url') + '/connect/userinfo', + url: loginApi + '/connect/userinfo', method: 'get', Token:token }) @@ -78,7 +80,7 @@ export async function getApiDefinition() { }) } -// *************权限页面维护************* +// *************权限Roles页面维护************* //获取列表 export function getPageListRoles(data) { return request({ @@ -106,6 +108,23 @@ export function postCreateRoles(data) { }) } +//编辑角色 +export function postUpdateRoles(data, id) { + return request({ + url: authApi+'/identity/roles/' + id, + method: 'put', + data + }) +} + +//删除角色 +export function postDeleteRoles(id) { + return request({ + url: authApi + '/identity/roles/' + id, + method: 'delete', + }) +} + //保存权限模板 export function savePermissionsRoles(URL, data) { return request({ @@ -114,3 +133,72 @@ export function savePermissionsRoles(URL, data) { data }) } + +// 更新权限 +export function updatePermissionsGranted(pname,pkey) { + return request({ + url: authApi + `/permissions/get-isGranted?name=demox&providerName=${pname}&providerKey=${pkey}`, + method: 'post', + }) +} + +// *************用户Users页面维护************* + +//获取全部用户信息 +export function getPageListUsers(data) { + return request({ + url: authApi + '/identity/users', + method: 'get', + params: data + }) +} + +//新建用户 +export function postCreateUser(data) { + return request({ + url: authApi + '/identity/users', + method: 'post', + data + }) +} + +//编辑用户 +export function postUpdateUser(data, id) { + return request({ + url: authApi + '/identity/users/' + id, + method: 'put', + data + }) +} + +//删除用户 +export function postDeleteUser(id) { + return request({ + url: authApi + '/identity/users/' + id, + method: 'delete', + }) +} + +// 获取当前用户的角色 +export function usersroles() { + return request({ + url: authApi + '/identity/users/assignable-roles', + method: 'get' + }) +} + +//获取当前角色 +export function getusersID(data) { + return request({ + url: authApi + '/identity/users/' + data + '/roles', + method: 'get' + }) +} + +//重置密码 +export function resetPassword(id) { + return request({ + url: authApi + '/identity/users/reset-password/' + id, + method: 'post' + }) +} \ No newline at end of file diff --git a/PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkRoles.vue b/PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkRoles.vue index a5b074f..9518f06 100644 --- a/PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkRoles.vue +++ b/PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkRoles.vue @@ -45,16 +45,9 @@ prop="name" label="角色名" sortable="custom" - width="180" - align="left" + :align="'left'" /> - - + - - +
【{{name}}角色】模块权限 保存 - + v-permission="['AbpIdentity.Roles.ManagePermissions']" + v-if="name != 'admin'" + >保存
@@ -149,16 +144,6 @@ - - - -