server.js 795 B

1234567891011121314151617181920212223242526272829303132333435
  1. import { creatRequest } from '../../utils/request.js';
  2. const requestList = {
  3. // 一键查核
  4. oneKeyCheck: {
  5. method: 'POST',
  6. url: 'checkTask/saveBatchCheckTaskDetail'
  7. },
  8. // 列表一键不适用
  9. oneKeyNotApplicable: {
  10. method: 'POST',
  11. url: 'checkTask/notApplicable'
  12. },
  13. // 当situationType=2时,获取访查对象列表
  14. getInvestigationUsers: {
  15. method: 'GET',
  16. url: 'checkTask/getInvestigationUsers'
  17. },
  18. getPointConditions:{ //获取筛选条件
  19. method: 'GET',
  20. url: 'plan/getPointConditions'
  21. }
  22. };
  23. export const commServer = (key, data) => {
  24. let obj = requestList[key];
  25. if(key=='oneKeyNotApplicable'){
  26. return creatRequest({
  27. ...obj,
  28. url:`checkTask/notApplicable?checkDetailId=${data}`
  29. });
  30. }
  31. return creatRequest(obj, data);
  32. }