xunjian.js 1.22 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);
}
水落(YangLei)'s avatar
水落(YangLei) committed
22 23 24 25 26 27 28 29 30 31 32 33

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}`);
}
水落(YangLei)'s avatar
水落(YangLei) committed
34 35 36 37 38 39 40 41 42 43 44 45

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

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

export function updateExemptionApi(data) {
    return putReq(`/ranger/inspection/api/v1/exemptions`, data);
}