|
@@ -2,218 +2,258 @@
|
|
|
* @Author: Gui
|
|
|
* @Date: 2023-03-01 19:20:44
|
|
|
* @LastEditors: guicheng 1625811865@qq.com
|
|
|
- * @LastEditTime: 2024-04-12 17:40:28
|
|
|
+ * @LastEditTime: 2024-04-18 17:59:27
|
|
|
* @Description: kxs files
|
|
|
* @filePath:
|
|
|
*/
|
|
|
import { http } from "@/utils/http";
|
|
|
import { dataResult } from "./apiResult";
|
|
|
+import { getGroupUrl } from "@/utils/getUrl/getUrl.js";
|
|
|
+const UrlList = await getGroupUrl();
|
|
|
|
|
|
// <*------用户板块--------*>
|
|
|
/** 获取用户管理列表 */
|
|
|
-export const getUserList = (data?: object): dataResult => {
|
|
|
- return http.get(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/user/page",
|
|
|
- data
|
|
|
- );
|
|
|
+export const getUserList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.userpage.url,
|
|
|
+ method: UrlList.SkbSystem.userpage.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 修改用户密码 */
|
|
|
-export const changeUserPassword = (data?: object): dataResult => {
|
|
|
- return http.put(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/user/password",
|
|
|
- data
|
|
|
- );
|
|
|
+export const changeUserPassword = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.userpassword.url,
|
|
|
+ method: UrlList.SkbSystem.userpassword.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 锁定用户 */
|
|
|
-export const lockUserList = (data?: object): dataResult => {
|
|
|
- return http.put(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/user/lock",
|
|
|
- data
|
|
|
- );
|
|
|
+export const lockUserList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.userlock.url,
|
|
|
+ method: UrlList.SkbSystem.userlock.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 删除用户 */
|
|
|
-export const deleteUserList = (data?: object): dataResult => {
|
|
|
- return http.delete(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/user/removeById",
|
|
|
- data
|
|
|
- );
|
|
|
+export const deleteUserList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.userremoveById.url,
|
|
|
+ method: UrlList.SkbSystem.userremoveById.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 新增用户 */
|
|
|
-export const AddUserList = (data?: object): dataResult => {
|
|
|
- return http.post(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/user/add",
|
|
|
- data
|
|
|
- );
|
|
|
+export const AddUserList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.useradd.url,
|
|
|
+ method: UrlList.SkbSystem.useradd.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 编辑用户 */
|
|
|
-export const editUserList = (data?: object): dataResult => {
|
|
|
- return http.put(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/user/update",
|
|
|
- data
|
|
|
- );
|
|
|
+export const editUserList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.userupdate.url,
|
|
|
+ method: UrlList.SkbSystem.userupdate.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
// <*------角色板块--------*>
|
|
|
|
|
|
/** 获取全部角色管理列表 */
|
|
|
-export const getAllRoleList = (data?: object): dataResult => {
|
|
|
- return http.get(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/role/list",
|
|
|
- data
|
|
|
- );
|
|
|
+export const getAllRoleList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.rolelist.url,
|
|
|
+ method: UrlList.SkbSystem.rolelist.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 获取角色管理列表 */
|
|
|
-export const getRoleList = (data?: object): dataResult => {
|
|
|
- return http.get(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/role/page",
|
|
|
- data
|
|
|
- );
|
|
|
+export const getRoleList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.rolepage.url,
|
|
|
+ method: UrlList.SkbSystem.rolepage.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 获取当前角色权限列表 */
|
|
|
-export const getRoleRightList = (data?: object): dataResult => {
|
|
|
- return http.get(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/menu/getRoleTree",
|
|
|
- data
|
|
|
- );
|
|
|
+export const getRoleRightList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.menugetRoleTree.url,
|
|
|
+ method: UrlList.SkbSystem.menugetRoleTree.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 添加系统角色 */
|
|
|
-export const postRoleList = (data?: object): dataResult => {
|
|
|
- return http.post(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/role/add",
|
|
|
- data
|
|
|
- );
|
|
|
+export const postRoleList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.roleadd.url,
|
|
|
+ method: UrlList.SkbSystem.roleadd.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 编辑系统角色 */
|
|
|
-export const putRoleList = (data?: object): dataResult => {
|
|
|
- return http.put(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/role/update",
|
|
|
- data
|
|
|
- );
|
|
|
+export const putRoleList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.roleupdate.url,
|
|
|
+ method: UrlList.SkbSystem.roleupdate.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 删除系统角色 */
|
|
|
-export const deleteRoleList = (data?: object): dataResult => {
|
|
|
- return http.delete(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/role/removeById",
|
|
|
- data
|
|
|
- );
|
|
|
+export const deleteRoleList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.roleremoveById.url,
|
|
|
+ method: UrlList.SkbSystem.roleremoveById.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 获取所有角色权限列表 */
|
|
|
-export const getRoleTreeList = (data?: object): dataResult => {
|
|
|
- return http.get(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/menu/getRoleTree",
|
|
|
- data
|
|
|
- );
|
|
|
+export const getRoleTreeList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.menugetRoleTree.url,
|
|
|
+ method: UrlList.SkbSystem.menugetRoleTree.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
// <*------菜单板块--------*>
|
|
|
|
|
|
/** 获取菜单列表 */
|
|
|
-export const getMenuList = (data?: object): dataResult => {
|
|
|
- return http.get(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/menu/tree",
|
|
|
- data
|
|
|
- );
|
|
|
+export const getMenuList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.menutree.url,
|
|
|
+ method: UrlList.SkbSystem.menutree.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 获取菜单列表 */
|
|
|
-export const putRoleMenuList = (data?: object): dataResult => {
|
|
|
- return http.put(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/role/menu",
|
|
|
- data
|
|
|
- );
|
|
|
+export const putRoleMenuList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.rolemenu.url,
|
|
|
+ method: UrlList.SkbSystem.rolemenu.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 添加菜单 */
|
|
|
-export const postMenuList = (data?: object): dataResult => {
|
|
|
- return http.post(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/menu/add",
|
|
|
- data
|
|
|
- );
|
|
|
+export const postMenuList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.menuadd.url,
|
|
|
+ method: UrlList.SkbSystem.menuadd.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 编辑菜单 */
|
|
|
-export const putMenuList = (data?: object): dataResult => {
|
|
|
- return http.put(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/menu/update",
|
|
|
- data
|
|
|
- );
|
|
|
+export const putMenuList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.menuupdate.url,
|
|
|
+ method: UrlList.SkbSystem.menuupdate.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 删除菜单 */
|
|
|
-export const deleteMenuList = (data?: object): dataResult => {
|
|
|
- return http.delete(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/menu/removeById",
|
|
|
- data
|
|
|
- );
|
|
|
+export const deleteMenuList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.menuremoveById.url,
|
|
|
+ method: UrlList.SkbSystem.menuremoveById.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
// <*------部门板块--------*>
|
|
|
|
|
|
/** 获取全部部门列表 */
|
|
|
-export const getAllDeptList = (data?: object): dataResult => {
|
|
|
- return http.get(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/dept/list",
|
|
|
- data
|
|
|
- );
|
|
|
+export const getAllDeptList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.deptlist.url,
|
|
|
+ method: UrlList.SkbSystem.deptlist.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 获取部门列表 */
|
|
|
-export const getDeptList = (data?: object): dataResult => {
|
|
|
- return http.get(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/dept/tree",
|
|
|
- data
|
|
|
- );
|
|
|
+export const getDeptList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.depttree.url,
|
|
|
+ method: UrlList.SkbSystem.depttree.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 删除部门列表 */
|
|
|
-export const deleteDeptList = (data?: object): dataResult => {
|
|
|
- return http.delete(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/dept/removeById",
|
|
|
- data
|
|
|
- );
|
|
|
+export const deleteDeptList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.deptremoveById.url,
|
|
|
+ method: UrlList.SkbSystem.deptremoveById.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 编辑部门 */
|
|
|
-export const putDeptList = (data?: object): dataResult => {
|
|
|
- return http.put(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/dept/update",
|
|
|
- data
|
|
|
- );
|
|
|
+export const putDeptList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.deptupdate.url,
|
|
|
+ method: UrlList.SkbSystem.deptupdate.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 添加部门 */
|
|
|
-export const postDeptList = (data?: object): dataResult => {
|
|
|
- return http.post(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/dept/add",
|
|
|
- data
|
|
|
- );
|
|
|
+export const postDeptList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.deptadd.url,
|
|
|
+ method: UrlList.SkbSystem.deptadd.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
// <*------岗位板块--------*>
|
|
|
|
|
|
/** 获取全部列表 */
|
|
|
-export const getAllPostList = (data?: object): dataResult => {
|
|
|
- return http.get(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/post/list",
|
|
|
- data
|
|
|
- );
|
|
|
+export const getAllPostList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.postlist.url,
|
|
|
+ method: UrlList.SkbSystem.postlist.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 获取分页岗位列表 */
|
|
|
-export const getPostList = (data?: object): dataResult => {
|
|
|
- return http.get(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/post/page",
|
|
|
- data
|
|
|
- );
|
|
|
+export const getPostList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.postpage.url,
|
|
|
+ method: UrlList.SkbSystem.postpage.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 删除岗位列表 */
|
|
|
-export const deletePostList = (data?: object): dataResult => {
|
|
|
- return http.delete(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/post/removeById",
|
|
|
- data
|
|
|
- );
|
|
|
+export const deletePostList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.postremoveById.url,
|
|
|
+ method: UrlList.SkbSystem.postremoveById.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 编辑岗位 */
|
|
|
-export const putPostList = (data?: object): dataResult => {
|
|
|
- return http.put(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/post/update",
|
|
|
- data
|
|
|
- );
|
|
|
+export const putPostList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.postupdate.url,
|
|
|
+ method: UrlList.SkbSystem.postupdate.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
/** 添加岗位 */
|
|
|
-export const postPostList = (data?: object): dataResult => {
|
|
|
- return http.post(
|
|
|
- "http://test.apigateway.shuangkebang.com/v1/skb/sysServer/post/add",
|
|
|
- data
|
|
|
- );
|
|
|
+export const postPostList = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.postadd.url,
|
|
|
+ method: UrlList.SkbSystem.postadd.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
+};
|
|
|
+// <*------公共参数--------*>
|
|
|
+
|
|
|
+/** 修改公共参数 */
|
|
|
+export const paramUpdate = (params?: object): dataResult => {
|
|
|
+ return http.Request({
|
|
|
+ url: UrlList.SkbSystem.paramupdate.url,
|
|
|
+ method: UrlList.SkbSystem.paramupdate.method,
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|