import request from '@/utils/request'
// 获取分类树
export function getTreeList() {
  return request({
    url: 'api/KnowledgeClass/getTreedetails ',
    method: 'get'
  })
}
// 添加左侧分类
export function addType(data) {
  return request({
    url: 'api/KnowledgeClass/add',
    method: 'post',
    data
  })
}
// 修改左侧分类
export function editType(data) {
  return request({
    url: 'api/KnowledgeClass/update',
    method: 'post',
    data
  })
}
// 删除左侧分类
export function deleteType(id) {
  return request({
    url: 'api/KnowledgeClass/delete',
    method: 'post',
    data: {
      id
    }
  })
}
// 获取左侧分类详情
export function getTypeDetail(id) {
  return request({
    url: 'api/KnowledgeClass/getdetails',
    method: 'get',
    params: {
      id
    }
  })
}
// 获取分类指标列表
export function getScoreList(params) {
  return request({
    url: 'api/Knowledge/getlist',
    method: 'get',
    params
  })
}

// 添加右侧分类
export function addScore(data) {
  return request({
    url: 'api/Knowledge/add',
    method: 'post',
    data
  })
}
// 修改右侧分类
export function editScore(data) {
  return request({
    url: 'api/Knowledge/update',
    method: 'post',
    data
  })
}
// 删除右侧分类
export function deleteScore(ids) {
  return request({
    url: 'api/Knowledge/delete',
    method: 'post',
    data: {
      ids
    }
  })
}
// 获取右侧分类详情 
export function getScoreDetail(id) {
  return request({
    url: 'api/Knowledge/getdetails',
    method: 'get',
    params: {
      id
    }
  })
}

