/*
 * @Author: zc
 * @description 辅助功能-事件分类
 */
import request from '@/utils/request';
/**
 * @description 获取事件分类树形全部
 * @param {object} params
 */
export const treeEventClassAll = (params?: object) => {
	return request({
		url: `/api/v1/Hotspot/event/tree`,
		method: 'get',
		params
	});
};
/**
 * @description 获取事件分类树形
 * @param {object} params
 */
export const treeEventClass = (params?: object) => {
	return request({
		url: `/api/v1/Hotspot/event/children`,
		method: 'get',
		params
	});
};
/**
 * @description 查询事件分类树形
 * @param {string} name
 */
export const treeEventClassSearch = (name: string) => {
	return request({
		url: `/api/v1/Hotspot/event/children-hasname?name=${name}`,
		method: 'get',
	});
};
/**
 * @description 新增事件分类树形
 * @param {object} data
 */
export const treeEventClassAdd = (data: object) => {
	return request({
		url: `/api/v1/Hotspot/event/add-event`,
		method: 'post',
		data,
	});
};
/**
 *
 * @description 获取事件分类详情
 * @param {object} params
 */
export const treeEventClassDetail = (params: object) => {
	return request({
		url: `/api/v1/Hotspot/event`,
		method: 'get',
		params,
	});
};
/**
 *
 * @description 修改事件分类树形
 * @param {object} data
 */
export const treeEventClassEdit = (data: object) => {
	return request({
		url: `/api/v1/Hotspot/event/modify-event`,
		method: 'put',
		data,
	});
};
/**
 * @description 删除事件分类树形
 * @param {string} data
 */
export const treeEventClassDelete = (data: object) => {
	return request({
		url: `/api/v1/Hotspot/event/del-event`,
		method: 'delete',
		data,
	});
};
