server.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. getFunctionSituationConfig: {
  49. method: 'GET',
  50. url: 'situation/getFunctionSituationConfig',
  51. },
  52. // 获取情境类型列表
  53. getSituationTypes: {
  54. method: 'GET',
  55. url: 'common/getSituationTypes',
  56. },
  57. //获取分页模板数据
  58. getTemplates:{
  59. method: 'GET',
  60. url: 'situation/getPageTemplateList',
  61. },
  62. //获取自查督查条件
  63. getTypeLists:{
  64. method: 'GET',
  65. url: 'inspector/filter',
  66. },
  67. //获取创建个案情境时的条件
  68. getTypeListsInGeanCreate:{
  69. method: 'GET',
  70. url: 'common/newConditions',
  71. },
  72. //获取自查督查可选查核人
  73. getCheckPersonLists:{
  74. method: 'POST',
  75. url: 'inspector/filterEmployees',
  76. },
  77. //获取职能科室
  78. getZhinengDepartments:{
  79. method: 'GET',
  80. url: 'inspector/functionEmployees',
  81. },
  82. //获职能科室负责计划设置中的可选地图列表
  83. getPlanSetMap:{
  84. method: 'POST',
  85. url: 'inspector/getCheckDepartments',
  86. },
  87. //添加督查自查情境
  88. addDuchazichaSituation:{
  89. method: 'POST',
  90. url: 'inspector/add',
  91. },
  92. //保存自查督查情境计划
  93. saveZichaduchaPlan:{
  94. method: 'POST',
  95. url: 'inspector/savePlan',
  96. },
  97. // 去完善编辑统一保存接口(所有情境类型)
  98. updateSituationData: {
  99. method: 'POST',
  100. url: 'situation/updateSituationData',
  101. successMessage: '编辑成功!'
  102. },
  103. //获取字典数据
  104. getDictionary:{
  105. method:'GET',
  106. url:'dictionary',
  107. }
  108. };
  109. export const commServer = (key, data) => {
  110. let obj = requestList[key];
  111. return creatRequest(obj, data);
  112. }