YouChain_WMS_Web/nc_wms_web/src/api/system/role-api.ts

86 lines
2.2 KiB
TypeScript
Raw Normal View History

2025-03-14 17:13:19 +08:00
/*
*
*
* @Author: 1024-
* @Date: 2022-09-03 22:00:41
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024 https://1024lab.net Since 2012
*/
import { getRequest, postRequest } from '/@/lib/axios';
export const roleApi = {
/**
* @description:
*/
queryAll: () => {
return getRequest('/role/getAll');
},
/**
* @description:
*/
addRole: (data) => {
return postRequest('/role/add', data);
},
/**
* @description:
*/
updateRole: (data) => {
return postRequest('/role/update', data);
},
/**
* @description:
*/
deleteRole: (roleId) => {
return getRequest(`/role/delete/${roleId}`);
},
/**
* @description:
*/
updateDataScope: (data) => {
return postRequest('/role/dataScope/updateRoleDataScopeList', data);
},
/**
* @description:
*/
getDataScopeList: () => {
return getRequest('/dataScope/list');
},
/**
* @description:
*/
getDataScopeByRoleId: (roleId) => {
return getRequest(`/role/dataScope/getRoleDataScopeList/${roleId}`);
},
/**
* @description: -
*/
queryRoleEmployee: (params) => {
return postRequest('/role/employee/queryEmployee', params);
},
/**
* @description:
*/
deleteEmployeeRole: (employeeId, roleId) => {
return getRequest('/role/employee/removeEmployee?employeeId=' + employeeId + '&roleId=' + roleId);
},
/**
* @description:
*/
batchRemoveRoleEmployee: (data) => {
return postRequest('/role/employee/batchRemoveRoleEmployee', data);
},
/**
* @description: id()
*/
getRoleAllEmployee: (roleId) => {
return getRequest(`/role/employee/getAllEmployeeByRoleId/${roleId}`);
},
/**
* @description:
*/
batchAddRoleEmployee: (data) => {
return postRequest('/role/employee/batchAddRoleEmployee', data);
},
};