2019-02-25 15:58:05 +08:00
|
|
|
|
import { getAction,deleteAction,putAction,postAction} from '@/api/manage'
|
|
|
|
|
|
2019-04-14 16:20:04 +08:00
|
|
|
|
////根路径
|
|
|
|
|
// const doMian = "/jeecg-boot/";
|
|
|
|
|
////图片预览请求地址
|
|
|
|
|
// const imgView = "http://localhost:8080/jeecg-boot/sys/common/view/";
|
2019-02-25 15:58:05 +08:00
|
|
|
|
|
|
|
|
|
//角色管理
|
|
|
|
|
const addRole = (params)=>postAction("/sys/role/add",params);
|
|
|
|
|
const editRole = (params)=>putAction("/sys/role/edit",params);
|
2019-04-14 16:20:04 +08:00
|
|
|
|
// const getRoleList = (params)=>getAction("/sys/role/list",params);
|
|
|
|
|
// const deleteRole = (params)=>deleteAction("/sys/role/delete",params);
|
|
|
|
|
// const deleteRoleList = (params)=>deleteAction("/sys/role/deleteBatch",params);
|
2019-02-25 15:58:05 +08:00
|
|
|
|
const checkRoleCode = (params)=>getAction("/sys/role/checkRoleCode",params);
|
|
|
|
|
const queryall = (params)=>getAction("/sys/role/queryall",params);
|
|
|
|
|
|
|
|
|
|
//用户管理
|
|
|
|
|
const addUser = (params)=>postAction("/sys/user/add",params);
|
|
|
|
|
const editUser = (params)=>putAction("/sys/user/edit",params);
|
|
|
|
|
const queryUserRole = (params)=>getAction("/sys/user/queryUserRole",params);
|
|
|
|
|
const getUserList = (params)=>getAction("/sys/user/list",params);
|
2019-04-14 16:20:04 +08:00
|
|
|
|
// const deleteUser = (params)=>deleteAction("/sys/user/delete",params);
|
|
|
|
|
// const deleteUserList = (params)=>deleteAction("/sys/user/deleteBatch",params);
|
2019-02-25 15:58:05 +08:00
|
|
|
|
const frozenBatch = (params)=>putAction("/sys/user/frozenBatch",params);
|
|
|
|
|
//验证用户账号是否唯一
|
|
|
|
|
const checkUsername = (params)=>getAction("/sys/user/checkOnlyUser",params);
|
|
|
|
|
//改变密码
|
|
|
|
|
const changPassword = (params)=>putAction("/sys/user/changPassword",params);
|
|
|
|
|
|
|
|
|
|
//权限管理
|
|
|
|
|
const addPermission= (params)=>postAction("/sys/permission/add",params);
|
|
|
|
|
const editPermission= (params)=>putAction("/sys/permission/edit",params);
|
|
|
|
|
const getPermissionList = (params)=>getAction("/sys/permission/list",params);
|
2019-04-14 16:20:04 +08:00
|
|
|
|
// const deletePermission = (params)=>deleteAction("/sys/permission/delete",params);
|
|
|
|
|
// const deletePermissionList = (params)=>deleteAction("/sys/permission/deleteBatch",params);
|
2019-02-25 15:58:05 +08:00
|
|
|
|
const queryTreeList = (params)=>getAction("/sys/permission/queryTreeList",params);
|
2019-04-14 16:20:04 +08:00
|
|
|
|
const queryTreeListForRole = (params)=>getAction("/sys/role/queryTreeList",params);
|
2019-02-25 15:58:05 +08:00
|
|
|
|
const queryListAsync = (params)=>getAction("/sys/permission/queryListAsync",params);
|
|
|
|
|
const queryRolePermission = (params)=>getAction("/sys/permission/queryRolePermission",params);
|
|
|
|
|
const saveRolePermission = (params)=>postAction("/sys/permission/saveRolePermission",params);
|
2019-05-19 18:54:09 +08:00
|
|
|
|
//const queryPermissionsByUser = (params)=>getAction("/sys/permission/queryByUser",params);
|
|
|
|
|
const queryPermissionsByUser = (params)=>getAction("/sys/permission/getUserPermissionByToken",params);
|
2019-02-25 15:58:05 +08:00
|
|
|
|
const loadAllRoleIds = (params)=>getAction("/sys/permission/loadAllRoleIds",params);
|
2019-04-14 16:20:04 +08:00
|
|
|
|
const getPermissionRuleList = (params)=>getAction("/sys/permission/getPermRuleListByPermId",params);
|
|
|
|
|
const queryPermissionRule = (params)=>getAction("/sys/permission/queryPermissionRule",params);
|
2019-02-25 15:58:05 +08:00
|
|
|
|
|
|
|
|
|
// 部门管理
|
|
|
|
|
const queryDepartTreeList = (params)=>getAction("/sysdepart/sysDepart/queryTreeList",params);
|
|
|
|
|
const queryIdTree = (params)=>getAction("/sysdepart/sysDepart/queryIdTree",params);
|
|
|
|
|
const queryParentName = (params)=>getAction("/sysdepart/sysDepart/queryParentName",params);
|
|
|
|
|
const searchByKeywords = (params)=>getAction("/sysdepart/sysDepart/searchBy",params);
|
2019-04-14 16:20:04 +08:00
|
|
|
|
const deleteByDepartId = (params)=>deleteAction("/sysdepart/sysDepart/delete",params);
|
2019-02-25 15:58:05 +08:00
|
|
|
|
|
|
|
|
|
//日志管理
|
2019-04-14 16:20:04 +08:00
|
|
|
|
//const getLogList = (params)=>getAction("/sys/log/list",params);
|
2019-02-25 15:58:05 +08:00
|
|
|
|
const deleteLog = (params)=>deleteAction("/sys/log/delete",params);
|
|
|
|
|
const deleteLogList = (params)=>deleteAction("/sys/log/deleteBatch",params);
|
|
|
|
|
|
|
|
|
|
//数据字典
|
|
|
|
|
const addDict = (params)=>postAction("/sys/dict/add",params);
|
|
|
|
|
const editDict = (params)=>putAction("/sys/dict/edit",params);
|
2019-04-14 16:20:04 +08:00
|
|
|
|
//const getDictList = (params)=>getAction("/sys/dict/list",params);
|
2019-02-25 15:58:05 +08:00
|
|
|
|
const treeList = (params)=>getAction("/sys/dict/treeList",params);
|
2019-04-14 16:20:04 +08:00
|
|
|
|
// const delDict = (params)=>deleteAction("/sys/dict/delete",params);
|
|
|
|
|
//const getDictItemList = (params)=>getAction("/sys/dictItem/list",params);
|
2019-02-25 15:58:05 +08:00
|
|
|
|
const addDictItem = (params)=>postAction("/sys/dictItem/add",params);
|
|
|
|
|
const editDictItem = (params)=>putAction("/sys/dictItem/edit",params);
|
2019-04-14 16:20:04 +08:00
|
|
|
|
//const delDictItem = (params)=>deleteAction("/sys/dictItem/delete",params);
|
|
|
|
|
//const delDictItemList = (params)=>deleteAction("/sys/dictItem/deleteBatch",params);
|
2019-02-25 15:58:05 +08:00
|
|
|
|
|
|
|
|
|
//字典标签专用(通过code获取字典数组)
|
|
|
|
|
export const ajaxGetDictItems = (code, params)=>getAction(`/sys/dict/getDictItems/${code}`,params);
|
|
|
|
|
|
|
|
|
|
//系统通告
|
|
|
|
|
const doReleaseData = (params)=>getAction("/sys/annountCement/doReleaseData",params);
|
|
|
|
|
const doReovkeData = (params)=>getAction("/sys/annountCement/doReovkeData",params);
|
|
|
|
|
//获取系统访问量
|
|
|
|
|
const getLoginfo = (params)=>getAction("/sys/loginfo",params);
|
2019-04-14 16:20:04 +08:00
|
|
|
|
//数据日志访问
|
|
|
|
|
// const getDataLogList = (params)=>getAction("/sys/dataLog/list",params);
|
|
|
|
|
|
|
|
|
|
// 根据部门主键查询用户信息
|
|
|
|
|
const queryUserByDepId = (params)=>getAction("/sys/user/queryUserByDepId",params);
|
|
|
|
|
|
|
|
|
|
// 查询用户角色表里的所有信息
|
|
|
|
|
const queryUserRoleMap = (params)=>getAction("/sys/user/queryUserRoleMap",params);
|
|
|
|
|
// 重复校验
|
|
|
|
|
const duplicateCheck = (params)=>getAction("/sys/duplicate/check",params);
|
2019-02-25 15:58:05 +08:00
|
|
|
|
|
|
|
|
|
export {
|
2019-04-14 16:20:04 +08:00
|
|
|
|
// imgView,
|
|
|
|
|
// doMian,
|
2019-02-25 15:58:05 +08:00
|
|
|
|
addRole,
|
|
|
|
|
editRole,
|
|
|
|
|
checkRoleCode,
|
|
|
|
|
addUser,
|
|
|
|
|
editUser,
|
|
|
|
|
queryUserRole,
|
|
|
|
|
getUserList,
|
2019-04-14 16:20:04 +08:00
|
|
|
|
queryall,
|
2019-02-25 15:58:05 +08:00
|
|
|
|
frozenBatch,
|
|
|
|
|
checkUsername,
|
|
|
|
|
changPassword,
|
|
|
|
|
getPermissionList,
|
|
|
|
|
addPermission,
|
|
|
|
|
editPermission,
|
|
|
|
|
queryTreeList,
|
|
|
|
|
queryListAsync,
|
|
|
|
|
queryRolePermission,
|
|
|
|
|
saveRolePermission,
|
|
|
|
|
queryPermissionsByUser,
|
|
|
|
|
loadAllRoleIds,
|
2019-04-14 16:20:04 +08:00
|
|
|
|
getPermissionRuleList,
|
|
|
|
|
queryPermissionRule,
|
2019-02-25 15:58:05 +08:00
|
|
|
|
queryDepartTreeList,
|
|
|
|
|
queryIdTree,
|
|
|
|
|
queryParentName,
|
|
|
|
|
searchByKeywords,
|
2019-04-14 16:20:04 +08:00
|
|
|
|
deleteByDepartId,
|
2019-02-25 15:58:05 +08:00
|
|
|
|
deleteLog,
|
|
|
|
|
deleteLogList,
|
|
|
|
|
addDict,
|
|
|
|
|
editDict,
|
|
|
|
|
treeList,
|
|
|
|
|
addDictItem,
|
|
|
|
|
editDictItem,
|
|
|
|
|
doReleaseData,
|
|
|
|
|
doReovkeData,
|
2019-04-14 16:20:04 +08:00
|
|
|
|
getLoginfo,
|
|
|
|
|
queryUserByDepId,
|
|
|
|
|
queryUserRoleMap,
|
|
|
|
|
duplicateCheck,
|
2019-05-19 18:54:09 +08:00
|
|
|
|
queryTreeListForRole,
|
2019-02-25 15:58:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|