import http from '@/api'
import {type Dict} from '@/api/system/dictionary/interface'
import type {ResultData} from "@/api/interface";

//获取字典数据
export const getDictDataListByTypeId = (params: Dict.ReqDictDataParams) => {
    return http.post(`/dictData/listByTypeId`, params)
}

//添加字典数据
export const addDictData = (params: Dict.ResDictData) => {
    return http.post(`/dictData/add`, params)
}

//编辑字典数据
export const updateDictData = (params: Dict.ResDictData) => {
    return http.post(`/dictData/update`, params)
}

//删除字典数据
export const deleteDictData = (params: string[]) => {
    return http.post(`/dictData/delete`, params)
}

export const getDicDataById = (params: string) => {
    return http.post('/dictData/getDicDataById', params)
}

//导出字典数据
export const exportDictData = (params: Dict.ReqDictDataParams) => {
    return http.download(`/dictData/export`, params)
}


