import { get, uget, post, deletes, put } from '@/http/index'

// 查询字典类型列表
export const listType = async (data) => {
  return await get('/system/dict/type/list', data)
}

// 查询字典类型详细
export const getType = async (data) => {
  return await uget('/system/dict/type/', data)
}

// 删除字典类型
export const delType = async (data) => {
  return await deletes('/system/dict/type/', data)
}

// 新增字典类型
export const addType = async (data) => {
  return await post('/system/dict/type', data)
}

// 修改字典类型
export const updateType = async (data) => {
  return await put('/system/dict/type', data)
}

// 导出字典类型
export const exportType = async (data) => {
  return await get('/system/dict/type/export', data)
}

// 刷新字典缓存
export const refreshCache = async () => {
  return await deletes('/system/dict/type/refreshCache')
}

// 查询所有字典类型列表
export const optionselect = async () => {
  return await get('/system/dict/type/optionselect')
}
