import request from '@/utils/request'
// 获取分类列表
export function getqualityList(params) {
  return request({
    url: 'api/IndexCategory/getlist',
    method: 'get',
    params
  })
}

// 添加左侧分类
export function addType(data) {
  return request({
    url: 'api/IndexCategory/add',
    method: 'post',
    data
  })
}
// 修改左侧分类
export function editType(data) {
  return request({
    url: 'api/IndexCategory/update',
    method: 'post',
    data
  })
}
// 删除左侧分类
export function deleteType(id) {
  return request({
    url: 'api/IndexCategory/delete',
    method: 'post',
    data: {
      id
    }
  })
}
// 获取左侧分类
export function getTypeDetails(id) {
  return request({
    url: 'api/IndexCategory/getdetails',
    method: 'get',
    params: {
      id
    }
  })
}
// 获取指标列表
export function getScoreList(params) {
  return request({
    url: 'api/IndexBase/getlist',
    method: 'get',
    params
  })
}

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