ranger.js 1.32 KB
Newer Older
1
import { getReq, postReq, putReq } from '@/utils/requestUtil';
水落(YangLei)'s avatar
水落(YangLei) committed
2 3 4 5 6 7 8 9

export function getXunJianDownloadUrlApi(idList) {
    return getReq('/ranger/inspection/api/v1/jobs/export', { jobIdList: idList.join(',') });
}

export function addXunJianTaskApi(data) {
    return postReq('/ranger/inspection/api/v1/jobs/temporary', data);
}
10 11 12 13 14 15 16 17 18 19 20 21

export function getRegionInfoApi(id) {
    return getReq(`/ranger/inspection/api/v1/region/${id}`);
}

export function addRegionApi(data) {
    return postReq('/ranger/inspection/api/v1/region', data);
}

export function editRegionApi(data) {
    return putReq(`ranger/inspection/api/v1/region`, data);
}
陈浩玮's avatar
地点  
陈浩玮 committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

export function getPlaceInfoApi(id) {
    return getReq(`/ranger/inspection/api/v1/place/${id}`);
}

export function addPlaceApi(data) {
    return postReq('/ranger/inspection/api/v1/place', data);
}

export function editPlaceApi(data) {
    return putReq('/ranger/inspection/api/v1/place', data);
}

export function getExemptionsListApi(data) {
    return getReq(`/ranger/inspection/api/v1/exemptions/valid`, data);
}
陈浩玮's avatar
陈浩玮 committed
38

水落(YangLei)'s avatar
水落(YangLei) committed
39 40 41 42 43 44 45 46 47 48 49
export function addUnitApi(data) {
    return postReq('/ranger/inspection/api/v1/units', data);
}

export function editUnitApi(data) {
    return putReq('/ranger/inspection/api/v1/units', data);
}

export function getUnitInfoApi(id) {
    return getReq(`/ranger/inspection/api/v1/units/${id}`);
}