import request from '@/utils/request'
//查询指定根门类下面的一级实体类型
export const getEntity = params => {
  return request({
    url: '/point-strategy/v/classTree/selectClassTreeById',
    method: 'post',
    params
  })
}
//查询门类
export const getClass = params => {
  return request({
    url: '/point-strategy/v/classTree/selectClassTree',
    method: 'post',
    params
  })
}
//根据实体id查询下级实体信息
export const getEntityChild = params => {
  return request({
    url: '/point-strategy/v/tentityType/selectChildTentityTypes',
    method: 'post',
    params
  })
}
//新增门类json字符串
export const addCate = data => {
  return request({
    url: '/point-strategy/v/classTree/saveClassTree',
    method: 'post',
    data
  })
}
//新增门类json字符串
export const getTree = () => {
  return request({
    url: '/point-strategy/v/classTree/getClassTree',
    method: 'post',

  })
}
//重命名,根据实体id查看t_table_description
export const getTableInfo = params => {
  return request({
    url: '/point-strategy/v/classTree/selectTtableDescription',
    method: 'post',
    params
  })
}
//删除门类
export const deleteById = params => {
  return request({
    url: '/point-strategy/v/classTree/deleteById',
    method: 'post',
    params
  })
}

//five
//新增年度范围
export const insertYearList = data => {
  return request({
    url: '/point-strategy/v/archiveNoFormat/insertYearList',
    method: 'post',
    data
  })
}
//档号设置全部查询
export const getNoList = data => {
  return request({
    url: '/point-strategy/v/archiveNoFormat/getNoList',
    method: 'post',
    data
  })
}
//根据门类id查询表字段
export const getTableFieldList = params => {
  return request({
    url: '/point-strategy/v/archiveNoFormat/getTableFieldList',
    method: 'post',
    params
  })
}
//保存档号设置
export const saveArchiveNoFormat = data => {
  return request({
    url: '/point-strategy/v/archiveNoFormat/saveArchiveNoFormat',
    method: 'post',
    data
  })
}
//删除年度范围
export const deleteYearScope = params => {
  return request({
    url: '/point-strategy/v/archiveNoFormat/deleteYearScope',
    method: 'post',
    params
  })
}
//删除档号设置
export const deleteArchiveNoFormat = params => {
  return request({
    url: '/point-strategy/v/archiveNoFormat/deleteArchiveNoFormat',
    method: 'post',
    params
  })
}
//修改档号设置
export const updateArchiveNoFormat = data => {
  return request({
    url: '/point-strategy/v/archiveNoFormat/updateArchiveNoFormat',
    method: 'post',
    data
  })
}
//更新年度范围
export const updateYearScope = params => {
  return request({
    url: '/point-strategy/v/archiveNoFormat/updateYearScope',
    method: 'post',
    params
  })
}

// 拖拽门类
export const dragClassTree = data => {
  return request({
    url: '/point-strategy/v/classTree/update',
    method: 'post',
    data
  })
}

// 门类设置-修改功能
export const classTreeUpdate = data => {
  return request({
    url: "/point-strategy/v/classTree/update",
    method: "post",
    data
  });
};

