import request from '@/utils/request'

// 获取字典
export function getDic(data) {
  return request({
    url: 'ecloud-data-basic/web/basic/queryDicZtree',
    method: 'post',
    data
  })
}

// 保存字典
export function saveDic(data) {
  return request({
    url: 'ecloud-data-basic/web/basic/saveDic',
    method: 'post',
    data
  })
}

//  停用字典(连同所有下级)
export function delDic(data) {
  return request({
    url: 'ecloud-data-basic/web/basic/delDic',
    method: 'post',
    data
  })
}

// 启用字典(本级)
export function setEnabled(data) {
  return request({
    url: 'ecloud-data-basic/web/basic/setEnabled',
    method: 'post',
    data
  })
}

//  启用字典(连同所有下级)
export function setEnabledWithChild(data) {
  return request({
    url: 'ecloud-data-basic/web/basic/setEnabledWithChild',
    method: 'post',
    data
  })
}

// 业务调用数据字典接口-获取本级数据
export function getQueryOnlyDic(data) {
  return request({
    url: 'ecloud-data-basic/web/basic/queryDic',
    method: 'post',
    data
  })
}

// 业务调用数据字典接口-获取所有下级数据
export function getQueryDic(data) {
  return request({
    url: 'ecloud-data-basic/web/basic/queryDicListByCode',
    method: 'post',
    data
  })
}
// 业务调用数据字典接口-获取所有下级数据
export function queryChildrenCode(data) {
  return request({
    url: 'ecloud-data-basic/web/basic/queryChildrenCode',
    method: 'post',
    data
  })
}
// 业务调用数据字典接口-获取所有下级数据2
export function queryChildrenList(data) {
  return request({
    url: 'ecloud-data-basic/web/basic/queryChildrenList',
    method: 'post',
    data
  })
}





