mirror of
https://github.com/1024-lab/smart-admin.git
synced 2026-06-11 08:16:13 +00:00
v3.0.0 重磅更新
This commit is contained in:
@@ -7,47 +7,37 @@
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
import { getRequest, postRequest } from '/src/lib/axios';
|
||||
|
||||
export const departmentApi = {
|
||||
/**
|
||||
* @description: 查询部门列表 @author 卓大
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
* 查询部门列表 @author 卓大
|
||||
*/
|
||||
queryAllDepartment: () => {
|
||||
return getRequest('/department/listAll');
|
||||
},
|
||||
|
||||
/**
|
||||
* @description: 查询部门树形列表 @author 卓大
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
* 查询部门树形列表 @author 卓大
|
||||
*/
|
||||
queryDepartmentTree: () => {
|
||||
queryDepartmentTree: () => {
|
||||
return getRequest('/department/treeList');
|
||||
},
|
||||
|
||||
/**
|
||||
* @description: 添加部门 @author 卓大
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
* 添加部门 @author 卓大
|
||||
*/
|
||||
addDepartment: (param) => {
|
||||
return postRequest('/department/add', param);
|
||||
},
|
||||
/**
|
||||
* @description: 更新部门信息 @author 卓大
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
* 更新部门信息 @author 卓大
|
||||
*/
|
||||
updateDepartment: (param) => {
|
||||
return postRequest('/department/update', param);
|
||||
},
|
||||
/**
|
||||
* @description: 获取校区列表 @author 卓大
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
* 删除
|
||||
*/
|
||||
deleteDepartment: (departmentId) => {
|
||||
return getRequest(`/department/delete/${departmentId}`);
|
||||
@@ -8,90 +8,73 @@
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
import { getRequest, postRequest } from '/src/lib/axios';
|
||||
|
||||
export const employeeApi = {
|
||||
/**
|
||||
* @description: 查询所有员工 @author 卓大
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
* 查询所有员工 @author 卓大
|
||||
*/
|
||||
queryAll: () => {
|
||||
return getRequest('/employee/queryAll');
|
||||
},
|
||||
/**
|
||||
* @description: 员工管理查询
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
* 员工管理查询
|
||||
*/
|
||||
queryEmployee: (params) => {
|
||||
return postRequest('/employee/query', params);
|
||||
},
|
||||
/**
|
||||
* @description: 添加员工
|
||||
* @param {EmployeeAddDto} params
|
||||
* @return {*}
|
||||
* 添加员工
|
||||
*/
|
||||
addEmployee: (params) => {
|
||||
return postRequest('/employee/add', params);
|
||||
},
|
||||
/**
|
||||
* @description: 更新员工信息
|
||||
* @param {EmployeeUpdateDto} params
|
||||
* @return {*}
|
||||
* 更新员工信息
|
||||
*/
|
||||
updateEmployee: (params) => {
|
||||
return postRequest('/employee/update', params);
|
||||
},
|
||||
/**
|
||||
* @description: 删除员工
|
||||
* @param {number} employeeId
|
||||
* @return {*}
|
||||
* 删除员工
|
||||
*/
|
||||
deleteEmployee: (employeeId) => {
|
||||
return getRequest(`/employee/delete/${employeeId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 批量删除员工
|
||||
* @param {number} employeeIdList
|
||||
* @return {*}
|
||||
* 批量删除员工
|
||||
*/
|
||||
batchDeleteEmployee: (employeeIdList) => {
|
||||
return postRequest('/employee/update/batch/delete', employeeIdList);
|
||||
},
|
||||
/**
|
||||
* @description: 批量调整员工部门
|
||||
* @return {*}
|
||||
* 批量调整员工部门
|
||||
*/
|
||||
batchUpdateDepartmentEmployee: (updateParam) => {
|
||||
return postRequest('/employee/update/batch/department', updateParam);
|
||||
},
|
||||
/**
|
||||
* @description: 重置员工密码
|
||||
* @param {number} employeeId
|
||||
* @return {*}
|
||||
* 重置员工密码
|
||||
*/
|
||||
resetPassword: (employeeId) => {
|
||||
return getRequest(`/employee/update/password/reset/${employeeId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 修改面面
|
||||
* @param {number} employeeId
|
||||
* @return {*}
|
||||
* 修改面面
|
||||
*/
|
||||
updateEmployeePassword: (param) => {
|
||||
return postRequest('/employee/update/password',param);
|
||||
return postRequest('/employee/update/password', param);
|
||||
},
|
||||
/**
|
||||
* @description: 更新员工禁用状态
|
||||
* @param {number} employeeId
|
||||
* @return {*}
|
||||
* 更新员工禁用状态
|
||||
*/
|
||||
updateDisabled: (employeeId) => {
|
||||
return getRequest(`/employee/update/disabled/${employeeId}`);
|
||||
},
|
||||
|
||||
// 查询员工-根据部门id
|
||||
/**
|
||||
* 查询员工-根据部门id
|
||||
*/
|
||||
queryEmployeeByDeptId: (departmentId) => {
|
||||
return getRequest(`/employee/query/dept/${departmentId}`);
|
||||
},
|
||||
@@ -7,21 +7,17 @@
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest } from '/@/lib/axios';
|
||||
import { getRequest } from '/src/lib/axios';
|
||||
|
||||
export const homeApi = {
|
||||
/**
|
||||
* @description: 首页-金额统计(业绩、收款、订单数等) @author 卓大
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
homeAmountStatistics: () => {
|
||||
return getRequest('/home/amount/statistics');
|
||||
},
|
||||
/**
|
||||
* @description: 首页-待办信息 @author 卓大
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
homeWaitHandle: () => {
|
||||
return getRequest('home/wait/handle');
|
||||
@@ -7,12 +7,11 @@
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
import { getRequest, postRequest } from '/src/lib/axios';
|
||||
|
||||
export const loginApi = {
|
||||
/**
|
||||
* 登录 @author 卓大
|
||||
* @param param
|
||||
*/
|
||||
login: (param) => {
|
||||
return postRequest('/login', param);
|
||||
@@ -20,7 +19,6 @@ export const loginApi = {
|
||||
|
||||
/**
|
||||
* 退出登录 @author 卓大
|
||||
* @param param
|
||||
*/
|
||||
logout: () => {
|
||||
return getRequest('/login/logout');
|
||||
@@ -28,7 +26,6 @@ export const loginApi = {
|
||||
|
||||
/**
|
||||
* 获取验证码 @author 卓大
|
||||
* @param param
|
||||
*/
|
||||
getCaptcha: () => {
|
||||
return getRequest('/login/getCaptcha');
|
||||
@@ -36,16 +33,8 @@ export const loginApi = {
|
||||
|
||||
/**
|
||||
* 获取登录信息 @author 卓大
|
||||
* @param param
|
||||
*/
|
||||
getLoginInfo: () => {
|
||||
return getRequest('/login/getLoginInfo');
|
||||
},
|
||||
|
||||
/**
|
||||
* 刷新用户信息(包含用户基础信息、权限信息等等) @author 卓大
|
||||
*/
|
||||
refresh: () => {
|
||||
return getRequest('/login/refresh');
|
||||
},
|
||||
};
|
||||
@@ -7,7 +7,7 @@
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
import { getRequest, postRequest } from '/src/lib/axios';
|
||||
|
||||
export const menuApi = {
|
||||
/**
|
||||
@@ -7,102 +7,77 @@
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
import { getRequest, postRequest } from '/src/lib/axios';
|
||||
|
||||
export const roleApi = {
|
||||
/**
|
||||
* @description: 获取所有角色
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
queryAll: () => {
|
||||
return getRequest('/role/getAll');
|
||||
},
|
||||
/**
|
||||
* @description:添加角色
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
addRole: (data) => {
|
||||
return postRequest('/role/add', data);
|
||||
},
|
||||
/**
|
||||
* @description:更新角色
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
updateRole: (data) => {
|
||||
return postRequest('/role/update', data);
|
||||
},
|
||||
/**
|
||||
* @description: 删除角色
|
||||
* @param {number} roleId
|
||||
* @return {*}
|
||||
*/
|
||||
deleteRole: (roleId) => {
|
||||
return getRequest(`/role/delete/${roleId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 批量设置某角色数据范围
|
||||
* @param {DataScopeBatchSetRoleDto} data
|
||||
* @return {*}
|
||||
*/
|
||||
updateDataScope: (data) => {
|
||||
return postRequest('/role/dataScope/updateRoleDataScopeList', data);
|
||||
},
|
||||
/**
|
||||
* @description: 获取当前系统所配置的所有数据范围
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
getDataScopeList: () => {
|
||||
return getRequest('/dataScope/list');
|
||||
},
|
||||
/**
|
||||
* @description: 获取某角色所设置的数据范围
|
||||
* @param {number} roleId
|
||||
* @return {*}
|
||||
*/
|
||||
getDataScopeByRoleId: (roleId) => {
|
||||
return getRequest(`/role/dataScope/getRoleDataScopeList/${roleId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 获取角色成员-员工列表
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
queryRoleEmployee: (params) => {
|
||||
return postRequest('/role/employee/queryEmployee', params);
|
||||
},
|
||||
/**
|
||||
* @description: 从角色成员列表中移除员工
|
||||
* @param {number} employeeId
|
||||
* @param {number} roleId
|
||||
* @return {*}
|
||||
*/
|
||||
deleteEmployeeRole: (employeeId, roleId) => {
|
||||
return getRequest('/role/employee/removeEmployee?employeeId=' + employeeId + '&roleId=' + roleId);
|
||||
},
|
||||
/**
|
||||
* @description: 从角色成员列表中批量移除员工
|
||||
* @param {RoleEmployeeBatchDto} data
|
||||
* @return {*}
|
||||
*/
|
||||
batchRemoveRoleEmployee: (data) => {
|
||||
return postRequest('/role/employee/batchRemoveRoleEmployee', data);
|
||||
},
|
||||
/**
|
||||
* @description: 根据角色id获取角色员工列表(无分页)
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
getRoleAllEmployee: (roleId) => {
|
||||
return getRequest(`/role/employee/getAllEmployeeByRoleId/${roleId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 角色成员列表中批量添加员工
|
||||
* @param data
|
||||
* @return {*}
|
||||
*/
|
||||
batchAddRoleEmployee: (data) => {
|
||||
return postRequest('/role/employee/batchAddRoleEmployee', data);
|
||||
@@ -7,20 +7,16 @@
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
import { getRequest, postRequest } from '/src/lib/axios';
|
||||
export const roleMenuApi = {
|
||||
/**
|
||||
* @description: 获取角色关联菜单权限
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
getRoleSelectedMenu: (roleId) => {
|
||||
return getRequest(`role/menu/getRoleSelectedMenu/${roleId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 更新角色权限
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
updateRoleMenu: (data) => {
|
||||
return postRequest('role/menu/updateRoleMenu', data);
|
||||
Reference in New Issue
Block a user