1234567891011121314151617181920212223242526272829303132333435363738 |
- import { creatRequest } from '../../utils/request.js';
- const requestList = {
- //计划列表
- planList:{
- method:'GET',
- url: 'plan/list'
- },
- //分配单位查核人员
- batchDistribute:{
- method:'POST',
- url: 'plan/batchDistribute'
- },
- //删除计划外查核
- delOutofPlan:{
- method:'POST',
- url: 'plan/delCheckTask'
- }
- };
- export const commServer = ({ key, data }) => {
- let obj = requestList[key];
-
- if(key=='delOutofPlan'){
- return creatRequest({
- method:'POST',
- url: `plan/delCheckTask?checkId=${data}`
- },{});
- }
- if(key=='planList'){
- return creatRequest({
- method:'GET',
- url: `plan/list?situationId=${data.situationId}&type=${data.type}`
- });
- }
-
- return creatRequest(obj, data);
- }
|