| | |
| | | import request from '@/config/axios' |
| | | |
| | | import {config} from "@/config/axios/config"; |
| | | const { plat_url } = config |
| | | |
| | | export type DictTypeVO = { |
| | | id: number | undefined |
| | | name: string |
| | |
| | | |
| | | // 查询字典(精简)列表 |
| | | export const getSimpleDictTypeList = () => { |
| | | return request.get({ url: '/system/dict-type/list-all-simple' }) |
| | | return request.get({ url: plat_url + '/system/dict-type/list-all-simple' }) |
| | | } |
| | | |
| | | // 查询字典列表 |
| | | export const getDictTypePage = (params: PageParam) => { |
| | | return request.get({ url: '/system/dict-type/page', params }) |
| | | return request.get({ url: plat_url + '/system/dict-type/page', params }) |
| | | } |
| | | |
| | | // 查询字典详情 |
| | | export const getDictType = (id: number) => { |
| | | return request.get({ url: '/system/dict-type/get?id=' + id }) |
| | | return request.get({ url: plat_url + '/system/dict-type/get?id=' + id }) |
| | | } |
| | | |
| | | // 新增字典 |
| | | export const createDictType = (data: DictTypeVO) => { |
| | | return request.post({ url: '/system/dict-type/create', data }) |
| | | return request.post({ url: plat_url + '/system/dict-type/create', data }) |
| | | } |
| | | |
| | | // 修改字典 |
| | | export const updateDictType = (data: DictTypeVO) => { |
| | | return request.put({ url: '/system/dict-type/update', data }) |
| | | return request.put({ url: plat_url + '/system/dict-type/update', data }) |
| | | } |
| | | |
| | | // 删除字典 |
| | | export const deleteDictType = (id: number) => { |
| | | return request.delete({ url: '/system/dict-type/delete?id=' + id }) |
| | | return request.delete({ url: plat_url + '/system/dict-type/delete?id=' + id }) |
| | | } |
| | | // 导出字典类型 |
| | | export const exportDictType = (params) => { |
| | | return request.download({ url: '/system/dict-type/export', params }) |
| | | return request.download({ url: plat_url + '/system/dict-type/export', params }) |
| | | } |