/*
 * @Author: zc
 * @description 工单发布-待办
 */
import request from '@/utils/request';
/**
 * @description 工单发布列表基础信息
 * @param {any} params
 */
export const publishBaseInfo = (params?: object) => {
	return request({
		url: `/api/v1/Order/publish/base-data`,
		method: 'get',
		params,
	});
};
/**
 * @description 工单发布列表--待办
 * @param {any} params
 */
export const publishList = (params: object) => {
	return request({
		url: `/api/v1/Order/publish`,
		method: 'get',
		params,
	});
};
export const publishListFixed = (params: object) => {
	return request({
		url: `/api/v1/Order/publish/items`,
		method: 'get',
		params,
	});
};
/**
 * @description 工单发布列表--待办导出
 * @param {any} data
 */
export const publishListExport = (data: any) => {
	return request(
		{
			url: `/api/v1/Order/publishorder/export`,
			method: 'post',
			responseType: 'blob',
			data,
		},
		{
			reduce_data_format: false,
		}
	);
};
export const publishListFixedCount = (params: object) => {
	return request({
		url: `/api/v1/Order/publish/count`,
		method: 'get',
		params,
	});
};
/**
 * @description 工单发布
 * @param data
 */
export const publishOrder = (data: object) => {
	return request({
		url: `/api/v1/Order/publish`,
		method: 'post',
		data,
	});
};
/**
 * @description 批量发布
 * @param data
 */
export const batchPublishOrder = (data: object) => {
	return request({
		url: `/api/v1/Order/batch-publish`,
		method: 'post',
		data,
	});
};
