/*
 * @Author: zc
 * @description 话务管理 - 小休申请
 */
import request from '@/utils/request';
/**
 * @description 小休申请
 * @param {object} data
 * @return {*}
 */
export const restApply = (data: object) => {
	return request({
		url: '/api/v1/TelRest/addtelrest',
		method: 'post',
		data,
	});
}
/**
 * @description 小休审批
 * @param {object} data
 * @return {*}
 */
export const restApplyProcess = (data: object) => {
	return request({
		url: '/api/v1/TelRest/telrest_apply_audit',
		method: 'post',
		data,
	});
}
/**
 * @description 小休申请列表
 * @param {object} params  
 * @return {*}
 */
export const restApplyPaged = (params?: object) => {
	return request({
		url: '/api/v1/TelRest/get_restapply_list',
		method: 'get',
		params,
	});
};
/**
 * @description 小休申请列表导出
 * @param {object} data
 * @return {*}
 */
export const restApplyExport = (data: object) => {
	return request({
		url: '/api/v1/TelRest/get_restapply_list_export',
		method: 'post',
			data,
			responseType: 'blob',
		},
		{
			reduce_data_format: false,
		})
}
/**
 * @description 小休申请基础信息
 * @param {object} params  
 * @return {*}
 */
export const restBaseData = (params?: object) => {
	return request({
		url: '/api/v1/TelRest/base-data',
		method: 'get',
		params: params,
	});
};
/**
 * @description 查询小休是否需要审批
 * @param {object} params
 * @return {*}
 */
export const restApplyConfig = (params?: object) => {
	return request({
		url: '/api/v1/TelRest/ischeckaudit',
		method: 'get',
		params: params,
	});
}