import request from '@/utils/request'

// 获取字典列表数据
export function getDicLists(params) {
  return request({
    url: 'api/dictionary/getlistbypage',
    method: 'get',
    params
  })
}

// 获取字典数据
export function getDic(params) {
  return request({
    url: 'api/dictionary/getdetails',
    method: 'get',
    params
  })
}

// 添加字典数据
export function addDic(data) {
  return request({
    url: 'api/dictionary/add',
    method: 'post',
    data
  })
}

// 编辑字典数据
export function editDic(data) {
  return request({
    url: 'api/dictionary/update',
    method: 'post',
    data
  })
}

// 删除字典类别（左）数据
export function deleteDic(ids) {
  return request({
    url: 'api/dictionary/delete',
    method: 'post',
    data: {
      ids
    }
  })
}

// 删除字典项（右）数据
export function deleteDicR(ids) {
  return request({
    url: 'configurationapi/api/dictionary/deletedicvalue',
    method: 'post',
    data: {
      ids
    }
  })
}

