/*
 * @Author: zc
 * @description 自定义工单
 */
import request from '@/utils/request';
import qs from 'qs';
/**
 * @description 新增司法工单
 * @param data
 * @return {*}
 */
export const addJudicial = (data: object) => {
	return request({
		url: '/api/v1/JudicialManagementOrders',
		method: 'post',
		data,
	});
};
/**
 * @description 修改司法工单
 * @param data
 * @return {*}
 */
export const editJudicial = (data: object) => {
	return request({
		url: '/api/v1/JudicialManagementOrders',
		method: 'put',
		data,
	});
};
/**
 * @description 查询司法工单详情
 * @param id
 * @return {*}
 */
export const getJudicial = (id: string) => {
	return request({
		url: `/api/v1/JudicialManagementOrders/${id}`,
		method: 'get',
	});
};
/**
 * @description 启用禁用司法工单
 * @param id
 * @return {*}
 */
export const enableJudicial = (id: object) => {
	return request({
		url: `/api/v1/JudicialManagementOrders?id=${id}`,
		method: 'get',
	});
};
/**
 * @description 删除司法工单
 * @param id
 * @return {*}
 */
export const deleteJudicial = (id: string) => {
	return request({
		url: `/api/v1/JudicialManagementOrders/${id}`,
		method: 'delete',
	});
};
/**
 * @description 获取司法受理工单列表
 * @param params
 * @return {*}
 */
export const judicialList = (params: object) => {
	return request({
		url: '/api/v1/JudicialManagementOrders/getownorderlist',
		method: 'get',
		params
	});
};
/**
 * @description 获取司法受理工单列表导出
 * @param data
 * @return {*}
 */
export const judicialListExport = (data: object) => {
	return request({
		url: '/api/v1/JudicialManagementOrders/getownorderlist_export',
		method: 'post',
		data,
		responseType: 'blob',
	}, {
		reduce_data_format: false
	});
};