import request from '@/utils/request'

const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API
// 查询检查指导项目类别列表
export function listCategory(data) {
	return request({
		url: baseUrl + '/business/inspectionInstruction/listCategory',
		method: 'post',
		data: data,
	})
}

// 获取检查指导项目类别
export function getCategoryInfo(id,type) {
	return request({
		url: baseUrl + '/business/inspectionInstruction/getCategoryInfo/' + id+'/'+type,
		method: 'get',
	})
}

// 新增检查指导项目类别
export function saveCategory(data) {
	return request({
		url: baseUrl + '/business/inspectionInstruction/saveCategory',
		method: 'post',
		data: data,
	})
}

// 删除检查指导项目类别
export function delCategory(id) {
	return request({
		url: baseUrl + '/business/inspectionInstruction/removeCategory/' + id,
		method: 'delete',
	})
}

/*************************** 检查指导项目 ***************************/
// 查询检查指导项目列表
export function list(data) {
	return request({
		url: baseUrl + '/business/inspectionInstruction/list',
		method: 'get',
		params: data,
	})
}

// 获取检查指导项目信息
export function getInfo(id) {
	return request({
		url: baseUrl + '/business/inspectionInstruction/getInfo/' + id,
		method: 'get',
	})
}

// 新增检查指导项目
export function save(data) {
	return request({
		url: baseUrl + '/business/inspectionInstruction/save',
		method: 'post',
		data: data,
	})
}

// 删除检查指导项目
export function del(id) {
	return request({
		url: baseUrl + '/business/inspectionInstruction/remove/' + id,
		method: 'delete',
	})
}
