import request from '@/utils/request'
const api = 'etl-api';
// 数据源查看 分类列表接口
export const classList = (params) => {
  return request({
    url: '/tablecategory/list',
    method: 'get',
    params: params
  })
}
// 数据源查看 全部分类表格数据
export const sumClassList = (params) => {
  return request({
    url: '/tablecategory/listByCategoryId',
    method: 'get',
    params: params
  })
}

//数据源查看 新增分类
export const addClassList = (params) => {
  return request({
    url: '/tablecategory/submit',
    method: 'post',
    data: params
  })
}
//数据源查看 分类修改
export const editClassList = (params) => {
  return request({
    url:  '/tablecategory/update',
    method: 'post',
    data: params
  })
}

//数据源查看 分类删除
export const delClassList = (ids) => {
  return request({
    url: '/tablecategory/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

// 表绑定分类id (表格分类)
export const tableBindClass = (params) => {
  return request({
    url: '/tablecategory/bind',
    method: 'post',
    data: params
  })
}

// 根据CategoryId查询表列表
export const tableData = (params) => {
  return request({
    url: '/tablecategory/listByCategoryId',
    method: 'get',
    params: params
  })
}
export const updateTableComment = data => request.post('/tablecategory/update/category-component', data)

//修改表格分类数据 修改表格分类数据
