import type { GetDictChildListParams, GetDictListParams, SystemDict, SystemDictChild, SystemDictTree } from './types' import { defHttp } from '@/utils/http/axios' export function getDictList(params: GetDictListParams) { return defHttp.get>({ url: '/baymax-system/dict/parent-list', params, }) } export function detailDict(id: string) { return defHttp.get({ url: `/baymax-system/dict/detail?id=${id}`, }) } export function createDict(data: Partial) { return defHttp.post({ url: '/baymax-system/dict/submit', data, }) } export function updateDict(data: Partial) { return defHttp.post({ url: '/baymax-system/dict/submit', data, }) } export function deleteDict(ids: string[]) { return defHttp.post({ url: `/baymax-system/dict/remove?ids=${ids}`, }) } export function dictTree(code: string) { return defHttp.get({ url: `/baymax-system/dict/tree?code=${code}`, }) } export function getDictChildList(params: GetDictChildListParams) { return defHttp.get>({ url: '/baymax-system/dict/child-list', params, }) }