api.js 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. import { getAction,deleteAction,putAction,postAction} from '@/api/manage'
  2. ////根路径
  3. // const doMian = "/jeecg-boot/";
  4. ////图片预览请求地址
  5. // const imgView = "http://localhost:8080/jeecg-boot/sys/common/view/";
  6. //角色管理
  7. const addRole = (params)=>postAction("/sys/role/add",params);
  8. const editRole = (params)=>putAction("/sys/role/edit",params);
  9. // const getRoleList = (params)=>getAction("/sys/role/list",params);
  10. // const deleteRole = (params)=>deleteAction("/sys/role/delete",params);
  11. // const deleteRoleList = (params)=>deleteAction("/sys/role/deleteBatch",params);
  12. const checkRoleCode = (params)=>getAction("/sys/role/checkRoleCode",params);
  13. const queryall = (params)=>getAction("/sys/role/queryall",params);
  14. //用户管理
  15. const addUser = (params)=>postAction("/sys/user/add",params);
  16. const editUser = (params)=>putAction("/sys/user/edit",params);
  17. const queryUserRole = (params)=>getAction("/sys/user/queryUserRole",params);
  18. const getUserList = (params)=>getAction("/sys/user/list",params);
  19. // const deleteUser = (params)=>deleteAction("/sys/user/delete",params);
  20. // const deleteUserList = (params)=>deleteAction("/sys/user/deleteBatch",params);
  21. const frozenBatch = (params)=>putAction("/sys/user/frozenBatch",params);
  22. //验证用户是否存在
  23. const checkOnlyUser = (params)=>getAction("/sys/user/checkOnlyUser",params);
  24. //改变密码
  25. const changePassword = (params)=>putAction("/sys/user/changePassword",params);
  26. //权限管理
  27. const addPermission= (params)=>postAction("/sys/permission/add",params);
  28. const editPermission= (params)=>putAction("/sys/permission/edit",params);
  29. const getPermissionList = (params)=>getAction("/sys/permission/list",params);
  30. /*update_begin author:wuxianquan date:20190908 for:添加查询一级菜单和子菜单查询api */
  31. const getSystemMenuList = (params)=>getAction("/sys/permission/getSystemMenuList",params);
  32. const getSystemSubmenu = (params)=>getAction("/sys/permission/getSystemSubmenu",params);
  33. const getSystemSubmenuBatch = (params) => getAction('/sys/permission/getSystemSubmenuBatch', params)
  34. /*update_end author:wuxianquan date:20190908 for:添加查询一级菜单和子菜单查询api */
  35. // const deletePermission = (params)=>deleteAction("/sys/permission/delete",params);
  36. // const deletePermissionList = (params)=>deleteAction("/sys/permission/deleteBatch",params);
  37. const queryTreeList = (params)=>getAction("/sys/permission/queryTreeList",params);
  38. const queryTreeListForRole = (params)=>getAction("/sys/role/queryTreeList",params);
  39. const queryListAsync = (params)=>getAction("/sys/permission/queryListAsync",params);
  40. const queryRolePermission = (params)=>getAction("/sys/permission/queryRolePermission",params);
  41. const saveRolePermission = (params)=>postAction("/sys/permission/saveRolePermission",params);
  42. //const queryPermissionsByUser = (params)=>getAction("/sys/permission/queryByUser",params);
  43. const queryPermissionsByUser = (params)=>getAction("/sys/permission/getUserPermissionByToken",params);
  44. const loadAllRoleIds = (params)=>getAction("/sys/permission/loadAllRoleIds",params);
  45. const getPermissionRuleList = (params)=>getAction("/sys/permission/getPermRuleListByPermId",params);
  46. const queryPermissionRule = (params)=>getAction("/sys/permission/queryPermissionRule",params);
  47. // 部门管理
  48. const queryDepartTreeList = (params)=>getAction("/sys/sysDepart/queryTreeList",params);
  49. const tableList = (params)=>getAction("/actBusiness/getTableInfoList",params);
  50. const queryIdTree = (params)=>getAction("/sys/sysDepart/queryIdTree",params);
  51. const queryParentName = (params)=>getAction("/sys/sysDepart/queryParentName",params);
  52. const searchByKeywords = (params)=>getAction("/sys/sysDepart/searchBy",params);
  53. const deleteByDepartId = (params)=>deleteAction("/sys/sysDepart/delete",params);
  54. //二级部门管理
  55. const queryDepartPermission = (params)=>getAction("/sys/permission/queryDepartPermission",params);
  56. const saveDepartPermission = (params)=>postAction("/sys/permission/saveDepartPermission",params);
  57. const queryTreeListForDeptRole = (params)=>getAction("/sys/sysDepartPermission/queryTreeListForDeptRole",params);
  58. const queryDeptRolePermission = (params)=>getAction("/sys/sysDepartPermission/queryDeptRolePermission",params);
  59. const saveDeptRolePermission = (params)=>postAction("/sys/sysDepartPermission/saveDeptRolePermission",params);
  60. const queryMyDepartTreeList = (params)=>getAction("/sys/sysDepart/queryMyDeptTreeList",params);
  61. //日志管理
  62. //const getLogList = (params)=>getAction("/sys/log/list",params);
  63. const deleteLog = (params)=>deleteAction("/sys/log/delete",params);
  64. const deleteLogList = (params)=>deleteAction("/sys/log/deleteBatch",params);
  65. //数据字典
  66. const addDict = (params)=>postAction("/sys/dict/add",params);
  67. const editDict = (params)=>putAction("/sys/dict/edit",params);
  68. //const getDictList = (params)=>getAction("/sys/dict/list",params);
  69. const treeList = (params)=>getAction("/sys/dict/treeList",params);
  70. // const delDict = (params)=>deleteAction("/sys/dict/delete",params);
  71. //const getDictItemList = (params)=>getAction("/sys/dictItem/list",params);
  72. const addDictItem = (params)=>postAction("/sys/dictItem/add",params);
  73. const editDictItem = (params)=>putAction("/sys/dictItem/edit",params);
  74. //const delDictItem = (params)=>deleteAction("/sys/dictItem/delete",params);
  75. //const delDictItemList = (params)=>deleteAction("/sys/dictItem/deleteBatch",params);
  76. //字典标签专用(通过code获取字典数组)
  77. export const ajaxGetDictItems = (code, params)=>getAction(`/sys/dict/getDictItems/${code}`,params);
  78. //系统通告
  79. const doReleaseData = (params)=>getAction("/sys/annountCement/doReleaseData",params);
  80. const doReovkeData = (params)=>getAction("/sys/annountCement/doReovkeData",params);
  81. //获取系统访问量
  82. const getLoginfo = (params)=>getAction("/sys/loginfo",params);
  83. const getVisitInfo = (params)=>getAction("/sys/visitInfo",params);
  84. //数据日志访问
  85. // const getDataLogList = (params)=>getAction("/sys/dataLog/list",params);
  86. // 根据部门主键查询用户信息
  87. const queryUserByDepId = (params)=>getAction("/sys/user/queryUserByDepId",params);
  88. // 查询用户角色表里的所有信息
  89. const queryUserRoleMap = (params)=>getAction("/sys/user/queryUserRoleMap",params);
  90. // 重复校验
  91. const duplicateCheck = (params)=>getAction("/sys/duplicate/check",params);
  92. // 加载分类字典
  93. const loadCategoryData = (params)=>getAction("/sys/category/loadAllData",params);
  94. const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', params)
  95. ////表单编辑器数据
  96. //根据查询条件查询表数据
  97. const queryList=(params)=>getAction("/tbTableInfo/queryList",params)
  98. //修改
  99. const updateTbTableInfo=(params)=>putAction("/tbTableInfo/updateTbTableInfo",params)
  100. export {
  101. // imgView,
  102. // doMian,
  103. addRole,
  104. editRole,
  105. checkRoleCode,
  106. addUser,
  107. editUser,
  108. queryUserRole,
  109. getUserList,
  110. queryall,
  111. frozenBatch,
  112. checkOnlyUser,
  113. changePassword,
  114. getPermissionList,
  115. addPermission,
  116. editPermission,
  117. queryTreeList,
  118. queryListAsync,
  119. queryRolePermission,
  120. saveRolePermission,
  121. queryPermissionsByUser,
  122. loadAllRoleIds,
  123. getPermissionRuleList,
  124. queryPermissionRule,
  125. queryDepartTreeList,
  126. queryIdTree,
  127. queryParentName,
  128. searchByKeywords,
  129. deleteByDepartId,
  130. deleteLog,
  131. deleteLogList,
  132. addDict,
  133. editDict,
  134. treeList,
  135. addDictItem,
  136. editDictItem,
  137. doReleaseData,
  138. doReovkeData,
  139. getLoginfo,
  140. getVisitInfo,
  141. queryUserByDepId,
  142. queryUserRoleMap,
  143. duplicateCheck,
  144. queryTreeListForRole,
  145. getSystemMenuList,
  146. getSystemSubmenu,
  147. getSystemSubmenuBatch,
  148. loadCategoryData,
  149. checkRuleByCode,
  150. queryDepartPermission,
  151. saveDepartPermission,
  152. queryTreeListForDeptRole,
  153. queryDeptRolePermission,
  154. saveDeptRolePermission,
  155. queryMyDepartTreeList,
  156. tableList,
  157. queryList,
  158. updateTbTableInfo
  159. }