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

export function uploadFile(params: any) {
	return request({
		url: '/hemo/backend/report/template/uploadFile',
		method: 'post',
		data: params,
	});
}


export function getBackendList(params: any) {
	return request({
		url: '/hemo/backend/report/template/list',
		method: 'post',
		params,
	});
}

export function saveList(params: any) {
	return request({
		url: '/hemo/backend/report/template/saveReport',
		method: 'post',
		params,
	});
}

export function getHistory(params: any) {
	return request({
		url: '/hemo/backend/report/template/listReportVersions',
		method: 'post',
		params,
	});
}

export function changeVersion(params: any) {
	return request({
		url: '/hemo/backend/report/template/version/activeVersion',
		method: 'post',
		params,
	});
}

export function delTemplate(id) {
	return request({
		url: `/hemo/backend/report/template/delete?id=${id}`,
		method: 'post',
	});
}

export function delTemplateVersion(id) {
	return request({
		url: `/hemo/backend/report/template/version/delete?id=${id}`,
		method: 'post',
	});
}

export function getTemplateTypes() {
	return request({
		url: `/hemo/backend/report/template/listTemplateTypes`,
		method: 'post',
	});
}
