mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-13 06:03:50 +08:00
v3.9.0【优化】typescript版本;【优化】App端消息;【优化】弹出层z-index;
This commit is contained in:
45
smart-admin-web-javascript/src/api/system/department-api.js
Normal file
45
smart-admin-web-javascript/src/api/system/department-api.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 部门
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:58:50
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
|
||||
export const departmentApi = {
|
||||
/**
|
||||
* 查询部门列表 @author 卓大
|
||||
*/
|
||||
queryAllDepartment: () => {
|
||||
return getRequest('/department/listAll');
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询部门树形列表 @author 卓大
|
||||
*/
|
||||
queryDepartmentTree: () => {
|
||||
return getRequest('/department/treeList');
|
||||
},
|
||||
|
||||
/**
|
||||
* 添加部门 @author 卓大
|
||||
*/
|
||||
addDepartment: (param) => {
|
||||
return postRequest('/department/add', param);
|
||||
},
|
||||
/**
|
||||
* 更新部门信息 @author 卓大
|
||||
*/
|
||||
updateDepartment: (param) => {
|
||||
return postRequest('/department/update', param);
|
||||
},
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
deleteDepartment: (departmentId) => {
|
||||
return getRequest(`/department/delete/${departmentId}`);
|
||||
},
|
||||
};
|
||||
101
smart-admin-web-javascript/src/api/system/employee-api.js
Normal file
101
smart-admin-web-javascript/src/api/system/employee-api.js
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* 员工
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:59:15
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
|
||||
import { getRequest, postEncryptRequest, postRequest } from '/@/lib/axios';
|
||||
|
||||
export const employeeApi = {
|
||||
/**
|
||||
* 查询所有员工 @author 卓大
|
||||
*/
|
||||
queryAll: () => {
|
||||
return getRequest('/employee/queryAll');
|
||||
},
|
||||
/**
|
||||
* 员工管理查询
|
||||
*/
|
||||
queryEmployee: (params) => {
|
||||
return postRequest('/employee/query', params);
|
||||
},
|
||||
/**
|
||||
* 添加员工
|
||||
*/
|
||||
addEmployee: (params) => {
|
||||
return postRequest('/employee/add', params);
|
||||
},
|
||||
/**
|
||||
* 更新员工信息
|
||||
*/
|
||||
updateEmployee: (params) => {
|
||||
return postRequest('/employee/update', params);
|
||||
},
|
||||
/**
|
||||
* 更新登录人信息
|
||||
*/
|
||||
updateByLogin: (params) => {
|
||||
return postRequest('/employee/update/login', params);
|
||||
},
|
||||
/**
|
||||
* 更新登录人头像
|
||||
*/
|
||||
updateAvatar: (params) => {
|
||||
return postRequest('/employee/update/avatar', params);
|
||||
},
|
||||
/**
|
||||
* 删除员工
|
||||
*/
|
||||
deleteEmployee: (employeeId) => {
|
||||
return getRequest(`/employee/delete/${employeeId}`);
|
||||
},
|
||||
/**
|
||||
* 批量删除员工
|
||||
*/
|
||||
batchDeleteEmployee: (employeeIdList) => {
|
||||
return postRequest('/employee/update/batch/delete', employeeIdList);
|
||||
},
|
||||
/**
|
||||
* 批量调整员工部门
|
||||
*/
|
||||
batchUpdateDepartmentEmployee: (updateParam) => {
|
||||
return postRequest('/employee/update/batch/department', updateParam);
|
||||
},
|
||||
/**
|
||||
* 重置员工密码
|
||||
*/
|
||||
resetPassword: (employeeId) => {
|
||||
return getRequest(`/employee/update/password/reset/${employeeId}`);
|
||||
},
|
||||
/**
|
||||
* 修改密码
|
||||
*/
|
||||
updateEmployeePassword: (param) => {
|
||||
return postEncryptRequest('/employee/update/password', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取密码复杂度
|
||||
*/
|
||||
getPasswordComplexityEnabled: () => {
|
||||
return getRequest('/employee/getPasswordComplexityEnabled');
|
||||
},
|
||||
|
||||
/**
|
||||
* 更新员工禁用状态
|
||||
*/
|
||||
updateDisabled: (employeeId) => {
|
||||
return getRequest(`/employee/update/disabled/${employeeId}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询员工-根据部门id
|
||||
*/
|
||||
queryEmployeeByDeptId: (departmentId) => {
|
||||
return getRequest(`/employee/query/dept/${departmentId}`);
|
||||
},
|
||||
};
|
||||
25
smart-admin-web-javascript/src/api/system/home-api.js
Normal file
25
smart-admin-web-javascript/src/api/system/home-api.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 首页api
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:59:39
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest } from '/@/lib/axios';
|
||||
|
||||
export const homeApi = {
|
||||
/**
|
||||
* @description: 首页-金额统计(业绩、收款、订单数等) @author 卓大
|
||||
*/
|
||||
homeAmountStatistics: () => {
|
||||
return getRequest('/home/amount/statistics');
|
||||
},
|
||||
/**
|
||||
* @description: 首页-待办信息 @author 卓大
|
||||
*/
|
||||
homeWaitHandle: () => {
|
||||
return getRequest('home/wait/handle');
|
||||
},
|
||||
};
|
||||
54
smart-admin-web-javascript/src/api/system/login-api.js
Normal file
54
smart-admin-web-javascript/src/api/system/login-api.js
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 登录
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 21:59:58
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
|
||||
export const loginApi = {
|
||||
/**
|
||||
* 登录 @author 卓大
|
||||
*/
|
||||
login: (param) => {
|
||||
return postRequest('/login', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 退出登录 @author 卓大
|
||||
*/
|
||||
logout: () => {
|
||||
return getRequest('/login/logout');
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取验证码 @author 卓大
|
||||
*/
|
||||
getCaptcha: () => {
|
||||
return getRequest('/login/getCaptcha');
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取登录信息 @author 卓大
|
||||
*/
|
||||
getLoginInfo: () => {
|
||||
return getRequest('/login/getLoginInfo');
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取邮箱登录验证码 @author 卓大
|
||||
*/
|
||||
sendLoginEmailCode: (loginName) => {
|
||||
return getRequest(`/login/sendEmailCode/${loginName}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取双因子登录标识 @author 卓大
|
||||
*/
|
||||
getTwoFactorLoginFlag: () => {
|
||||
return getRequest('/login/getTwoFactorLoginFlag');
|
||||
},
|
||||
};
|
||||
54
smart-admin-web-javascript/src/api/system/menu-api.js
Normal file
54
smart-admin-web-javascript/src/api/system/menu-api.js
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 菜单
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 22:00:32
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
|
||||
export const menuApi = {
|
||||
/**
|
||||
* 添加菜单
|
||||
*/
|
||||
addMenu: (param) => {
|
||||
return postRequest('/menu/add', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 更新菜单
|
||||
*/
|
||||
updateMenu: (param) => {
|
||||
return postRequest('/menu/update', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量删除菜单
|
||||
*/
|
||||
batchDeleteMenu: (menuIdList) => {
|
||||
return getRequest(`/menu/batchDelete?menuIdList=${menuIdList}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询所有菜单列表
|
||||
*/
|
||||
queryMenu: () => {
|
||||
return getRequest('/menu/query');
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询菜单树
|
||||
*/
|
||||
queryMenuTree: (onlyMenu) => {
|
||||
return getRequest(`/menu/tree?onlyMenu=${onlyMenu}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取所有请求路径
|
||||
*/
|
||||
getAuthUrl: () => {
|
||||
return getRequest('/menu/auth/url');
|
||||
},
|
||||
};
|
||||
55
smart-admin-web-javascript/src/api/system/position-api.js
Normal file
55
smart-admin-web-javascript/src/api/system/position-api.js
Normal file
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* 职务表 api 封装
|
||||
*
|
||||
* @Author: kaiyun
|
||||
* @Date: 2024-06-23 23:31:38
|
||||
* @Copyright <a href="https://1024lab.net">1024创新实验室</a>
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const positionApi = {
|
||||
|
||||
/**
|
||||
* 分页查询 @author kaiyun
|
||||
*/
|
||||
queryPage : (param) => {
|
||||
return postRequest('/position/queryPage', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 增加 @author kaiyun
|
||||
*/
|
||||
add: (param) => {
|
||||
return postRequest('/position/add', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改 @author kaiyun
|
||||
*/
|
||||
update: (param) => {
|
||||
return postRequest('/position/update', param);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 删除 @author kaiyun
|
||||
*/
|
||||
delete: (id) => {
|
||||
return getRequest(`/position/delete/${id}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量删除 @author kaiyun
|
||||
*/
|
||||
batchDelete: (idList) => {
|
||||
return postRequest('/position/batchDelete', idList);
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询列表 @author kaiyun
|
||||
*/
|
||||
queryList: () => {
|
||||
return getRequest('/position/queryList');
|
||||
},
|
||||
|
||||
};
|
||||
85
smart-admin-web-javascript/src/api/system/role-api.js
Normal file
85
smart-admin-web-javascript/src/api/system/role-api.js
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 角色
|
||||
*
|
||||
* @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);
|
||||
},
|
||||
};
|
||||
24
smart-admin-web-javascript/src/api/system/role-menu-api.js
Normal file
24
smart-admin-web-javascript/src/api/system/role-menu-api.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* 角色菜单
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-03 22:00:49
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/axios';
|
||||
export const roleMenuApi = {
|
||||
/**
|
||||
* @description: 获取角色关联菜单权限
|
||||
*/
|
||||
getRoleSelectedMenu: (roleId) => {
|
||||
return getRequest(`role/menu/getRoleSelectedMenu/${roleId}`);
|
||||
},
|
||||
/**
|
||||
* @description: 更新角色权限
|
||||
*/
|
||||
updateRoleMenu: (data) => {
|
||||
return postRequest('role/menu/updateRoleMenu', data);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user