/*
 * @Author: zc
 * @description 预案库 - 类型管理
 */
import request from '@/utils/request';
/**
 * @description 预案管理类型树形
 * @param {object} params 如果传入参数 IsEnable 表示查询已启用
 */
export const planTreeList = (params?: object) => {
	return request({
		url: '/api/v1/Plan/type/treelist',
		method: 'get',
		params,
	});
};
/**
 * @description 新增预案库类型
 * @param {object} data
 */
export const addPlanType = (data: object) => {
	return request({
		url: '/api/v1/Plan/type/add',
		method: 'post',
		data,
	});
};
/**
 * @description 编辑预案库类型
 * @param {object} data
 */
export const updatePlanType = (data: object) => {
	return request({
		url: '/api/v1/Plan/type/update',
		method: 'put',
		data,
	});
};
/**
 * @description 查询预案库类型详情
 * @param {object} Id
 */
export const planTypeDetail = (Id: string) => {
	return request({
		url: `/api/v1/Plan/type/info/${Id}`,
		method: 'get',
	});
};
/**
 * @description 删除预案库类型
 * @param {object} Id
 */
export const delPlanType = (Id: string) => {
	return request({
		url: `/api/v1/Plan/type/remove/${Id}`,
		method: 'delete',
	});
};
/**
 * @description 预案库分类列表
 * @param {object} params
 */
export const planSourceList = (params?: object) => {
	return request({
		url: '/api/v1/Plan/list/treelist',
		method: 'get',
		params,
	});
};