import request from "../../common/request"
import { BUSINESS_PATH as prefix } from "@/api/AppPath";

export default {
	list: function (param) {
		return request({
			url: prefix +'/holiday/findList',
			method: 'get',
			params: param
		})
	},

	saveForm: function (inputForm) {
		return request({
			url: prefix + `/holiday/saveForm`,
			method: 'post',
			data: inputForm
		})
	},

	queryById: function (id) {
		return request({
			url: prefix +'/holiday/findById',
			method: 'get',
			params: {id: id}
		})
	},

	updateStatusById: function(data) {
		return request({
			url: prefix + "/holiday/updateStatusById",
			method: "post",
			data: data,
		})
	},
	delete: function (ids) {
		return request({
			url: prefix+"/holiday/delete",
			method: 'delete',
			params: {id: ids}
		})
	},


	adminEditForm: function(param){
		return request({
			url: prefix + "/holiday/adminEditForm",
			method: "post",
			data: param,
		})
	},

	checkType: function (inputForm) {
		return request({
			url: prefix + `/holiday/checkType`,
			method: 'post',
			data: inputForm
		})
	},

	exportFile: function(params) {
		return request({
			url: prefix + "/holiday/export",
			method: "get",
			params: params,
			responseType: "blob",
		});
	}

}
