import request from '/@/utils/request';

export function fetchList(query?: Object) {
	return request({
		url: '/knowledge/aiReportConf/page',
		method: 'get',
		params: query,
	});
}

export function addObj(obj?: Object) {
	return request({
		url: '/knowledge/aiReportConf',
		method: 'post',
		data: obj,
	});
}

export function getObj(id?: string) {
	return request({
		url: '/knowledge/aiReportConf/' + id,
		method: 'get',
	});
}

export function delObjs(ids?: Object) {
	return request({
		url: '/knowledge/aiReportConf',
		method: 'delete',
		data: ids,
	});
}

export function putObj(obj?: Object) {
	return request({
		url: '/knowledge/aiReportConf',
		method: 'put',
		data: obj,
	});
}

export function parseDoc(obj?: Object) {
	return request({
		url: '/knowledge/aiReportConf/parse',
		method: 'post',
		data: obj,
	});
}

export function generateReport(obj?: Object) {
	return request({
		url: '/knowledge/aiReportConf/download',
		method: 'post',
		data: obj,
		responseType: 'blob',
	});
}
