40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
import { request } from '@/api/_service'
|
|
|
|
const BASE = 'quality_control/xqc/inspection_plan/'
|
|
|
|
function apiParams (data = {}, method = 'quality_control_xqc_inspection_plan_list', platform = 'background') {
|
|
return { method, platform, ...data }
|
|
}
|
|
export function fetchInspectionPlansList (data = {}) {
|
|
return request({
|
|
url: BASE + 'list',
|
|
method: 'get',
|
|
params: apiParams(data, 'quality_control_xqc_inspection_plan_list', 'background')
|
|
})
|
|
}
|
|
|
|
export function createInspectionPlans (data = {}) {
|
|
return request({
|
|
url: BASE + 'create',
|
|
method: 'post',
|
|
data: apiParams(data, 'quality_control_xqc_inspection_plan_create', 'background')
|
|
})
|
|
}
|
|
|
|
export function editInspectionPlans (data = {}) {
|
|
return request({
|
|
url: BASE + 'edit',
|
|
method: 'post',
|
|
data: apiParams(data, 'quality_control_xqc_inspection_plan_edit', 'background')
|
|
})
|
|
}
|
|
|
|
export function deleteInspectionPlans (data = {}) {
|
|
return request({
|
|
url: BASE + 'delete',
|
|
method: 'post',
|
|
data: apiParams(data, 'quality_control_xqc_inspection_plan_delete', 'background')
|
|
})
|
|
}
|
|
|