import request from "@/utils/request";

// 列表查询
export function getLineDataList(data) {
  return request({
    url: "/system/dict/type/list",
    method: "post",
    data,
  });
}

// 新增
export function getAddDepart(data) {
  return request({
    url: "/system/dict/type",
    method: "post",
    data,
  });
}
// 修改
export function getUpdateDepart(data) {
  return request({
    url: "/system/dict/type/update",
    method: "post",
    data,
  });
}
// 删除
export function getDeleteDepart(dictIds) {
  return request({
    url: `/system/dict/type/remove/${dictIds}`,
    method: "get",
  });
}
// 数据类型导出
export function getExportDepart(data) {
  return request({
    url: "/system/dict/type/export",
    method: "post",
    data,
    responseType: "blob",
  });
}

// 数据字典导出
export function getExportDataDepart(data) {
  return request({
    url: "/system/dict/type/export",
    method: "post",
    data,
    responseType: "blob",
  });
}

// 查询字典类型详细
export function getType(data) {
  return request({
    url: "/system/dict/data/list",
    method: "post",
    data,
  });
}
// 新增数据
export function getAddData(data) {
  return request({
    url: "/system/dict/data",
    method: "post",
    data,
  });
}

// 修改数据
export function getUpdateData(data) {
  return request({
    url: "/system/dict/data/edit",
    method: "post",
    data,
  });
}

// 删除数据
export function getDeleteData(dictCodes) {
  return request({
    url: `/system/dict/data/remove/${dictCodes}`,
    method: "get",
  });
}

// 导出
export function getExportOutData(data) {
  return request({
    url: "/system/dict/data/export",
    method: "post",
    data,
    responseType: "blob",
  });
}

// 详情数据字典名称下拉查询
export function getNameSelectData(data) {
  return request({
    url: "/system/dict/type/optionselect",
    method: "get",
    params: data,
  });
}
