import { http } from '@/utils/http/axios';

/** ======================字典===================== */
/**
 * @description: 添加字典
 */
export function addDictData(params) {
  return http.request({
    url: '/dict/addDictData',
    method: 'post',
    params,
  });
}

/**
 * @description: 编辑字典
 */
export function editDictData(params) {
  return http.request({
    url: '/dict/updateDictData',
    method: 'post',
    params,
  });
}

/**
 * @description: 删除字典
 */
export function delDictData(params) {
  return http.request({
    url: '/dict/delDictData',
    method: 'post',
    params,
  });
}

/**
 * @description: 查询数据类型下数据字典列表(不分页)
 */
export function dictList(params) {
  return http.request({
    url: '/dict/dictList',
    method: 'get',
    params,
  });
}

/**
 * @description: 获取字典类型对应列表
 */
export function dictInfo(params) {
  return http.request({
    url: '/dict/listDictData',
    method: 'get',
    params,
  });
}

/**
 * @description: 查询数据字典类型(不分页)
 */
export function dictTypeInfo(params) {
  return http.request({
    url: '/dict/listDictType',
    method: 'get',
    params,
  });
}

/** ======================字典类型===================== */

/**
 * @description: 添加字典类型
 */
export function addDictType(params) {
  return http.request({
    url: '/dict/addDictType',
    method: 'post',
    params,
  });
}

/**
 * @description: 编辑字典类型
 */
export function editDictType(params) {
  return http.request({
    url: '/dict/updateDictType',
    method: 'post',
    params,
  });
}

/**
 * @description: 删除字典类型
 */
export function delDictType(params) {
  return http.request({
    url: '/dict/delDictType',
    method: 'post',
    params,
  });
}

/**
 * @description: 字典类型列表
 */
export function dictTypeList(params) {
  return http.request({
    url: '/dict/typePagelist',
    method: 'get',
    params,
  });
}
