// 样表事项管理api
import request from "@/utils/request";

/**
 *  基础事项
 */

// 获取基础事项列表
export const getMatterList = (data) => {
  return request({
    url: `/sampleform/sheet/matter/list`,
    method: "post",
    data,
  });
};

//   加入样表事项
export const createMatter = (params) => {
  return request({
    url: `/sampleform/matter/createMatter`,
    method: "get",
    params,
  });
};

// 获取基础事项差集列表
export const getMatterSubList = (data) => {
  return request({
    url: `/sampleform/sheet/matter/sublist`,
    method: "post",
    data,
  });
};

//   查询样表系统事项列表
export const getWriteMatterList = (data) => {
  return request({
    url: `/sampleform/matter/list`,
    method: "post",
    data,
  });
};

//   保存新增样表事项
export const addMatter = (data) => {
  return request({
    url: `/sampleform/matter/save`,
    method: "post",
    data,
  });
};

//   删除样表事项
export const delMatter = (params) => {
  return request({
    url: `/sampleform/matter/delete`,
    method: "get",
    params,
  });
};

//   推荐事项
export const recommendMatter = (params) => {
  return request({
    url: `/sampleform/matter/recommend`,
    method: "get",
    params,
  });
};

// 添加事项文件夹（分类）
export const addMatterFolder = (data) => {
  return request({
    url: `/sampleform/matter/category/save`,
    method: "post",
    data,
  });
};

// 获取事项文件夹（分类）列表
export const getMatterFolderList = (data) => {
  return request({
    url: `/sampleform/matter/category/list`,
    method: "post",
    data,
  });
};

// 删除事项文件夹（分类）
export const delMatterFolder = (params) => {
  return request({
    url: `/sampleform/matter/category/delete`,
    method: "get",
    params,
  });
};
