server.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. import { creatRequest } from '../../utils/request.js';
  2. const requestList = {
  3. // 获取条件树
  4. conditions: {
  5. method: 'GET',
  6. url: 'common/conditions',
  7. // successMessage: '',
  8. // needLoading: false // 还有这两个参数,但不是必传的,默认loading
  9. },
  10. // 查核组列表
  11. checkGroupList: {
  12. method: 'POST',
  13. url: 'situation/getCheckGroupByCondition ',
  14. },
  15. // 查核地图列表
  16. checkDeptList: {
  17. method: 'POST',
  18. url: 'situation/checkDeptList',
  19. },
  20. // 地图新增单位树
  21. deptList: {
  22. method: 'GET',
  23. url: 'common/deptList',
  24. },
  25. // 地图新增选择返回新增单位
  26. addDeptList: {
  27. method: 'POST',
  28. url: 'situation/addDeptList',
  29. },
  30. // 情境新增保存
  31. savePOST: {
  32. method: 'POST',
  33. url: 'situation',
  34. successMessage: '保存成功!'
  35. },
  36. // 情境新增保存
  37. savePUT: {
  38. method: 'PUT',
  39. url: 'situation',
  40. successMessage: '编辑成功!'
  41. },
  42. // 情境配置的明细(出参同创建入参)
  43. detialConfig: {
  44. method: 'GET',
  45. url: 'situation/config',
  46. },
  47. // 获取情境类型列表
  48. getSituationTypes: {
  49. method: 'GET',
  50. url: 'common/getSituationTypes',
  51. },
  52. //获取分页模板数据
  53. getTemplates:{
  54. method: 'GET',
  55. url: 'situation/getPageTemplateList',
  56. },
  57. //获取自查督查条件
  58. getTypeLists:{
  59. method: 'GET',
  60. url: 'inspector/filter',
  61. },
  62. //获取创建个案情境时的条件
  63. getTypeListsInGeanCreate:{
  64. method: 'GET',
  65. url: 'common/newConditions',
  66. },
  67. //获取自查督查可选查核人
  68. getCheckPersonLists:{
  69. method: 'POST',
  70. url: 'inspector/filterEmployees',
  71. },
  72. //获取职能科室
  73. getZhinengDepartments:{
  74. method: 'GET',
  75. url: 'inspector/functionEmployees',
  76. },
  77. //获职能科室负责计划设置中的可选地图列表
  78. getPlanSetMap:{
  79. method: 'POST',
  80. url: 'inspector/getCheckDepartments',
  81. },
  82. //添加督查自查情境
  83. addDuchazichaSituation:{
  84. method: 'POST',
  85. url: 'inspector/add',
  86. },
  87. //保存自查督查情境计划
  88. saveZichaduchaPlan:{
  89. method: 'POST',
  90. url: 'inspector/savePlan',
  91. },
  92. //获取字典数据
  93. getDictionary:{
  94. method:'GET',
  95. url:'dictionary',
  96. }
  97. };
  98. export const commServer = (key, data) => {
  99. let obj = requestList[key];
  100. return creatRequest(obj, data);
  101. }