提交 | 用户 | 时间
|
314507
|
1 |
import request from '@/config/axios' |
8e4ab7
|
2 |
import {config} from "@/config/axios/config"; |
H |
3 |
const { plat_url } = config |
314507
|
4 |
|
H |
5 |
export type DictDataVO = { |
|
6 |
id: number | undefined |
|
7 |
sort: number | undefined |
|
8 |
label: string |
|
9 |
value: string |
|
10 |
dictType: string |
|
11 |
status: number |
|
12 |
colorType: string |
|
13 |
cssClass: string |
|
14 |
remark: string |
|
15 |
createTime: Date |
|
16 |
} |
|
17 |
|
|
18 |
// 查询字典数据(精简)列表 |
|
19 |
export const getSimpleDictDataList = () => { |
8e4ab7
|
20 |
return request.get({ url: plat_url + '/system/dict-data/simple-list' }) |
314507
|
21 |
} |
H |
22 |
|
|
23 |
// 查询字典数据列表 |
|
24 |
export const getDictDataPage = (params: PageParam) => { |
8e4ab7
|
25 |
return request.get({ url: plat_url + '/system/dict-data/page', params }) |
314507
|
26 |
} |
H |
27 |
|
|
28 |
// 查询字典数据详情 |
|
29 |
export const getDictData = (id: number) => { |
8e4ab7
|
30 |
return request.get({ url: plat_url + '/system/dict-data/get?id=' + id }) |
314507
|
31 |
} |
H |
32 |
|
|
33 |
// 新增字典数据 |
|
34 |
export const createDictData = (data: DictDataVO) => { |
8e4ab7
|
35 |
return request.post({ url: plat_url + '/system/dict-data/create', data }) |
314507
|
36 |
} |
H |
37 |
|
|
38 |
// 修改字典数据 |
|
39 |
export const updateDictData = (data: DictDataVO) => { |
8e4ab7
|
40 |
return request.put({ url: plat_url + '/system/dict-data/update', data }) |
314507
|
41 |
} |
H |
42 |
|
|
43 |
// 删除字典数据 |
|
44 |
export const deleteDictData = (id: number) => { |
8e4ab7
|
45 |
return request.delete({ url: plat_url + '/system/dict-data/delete?id=' + id }) |
314507
|
46 |
} |
H |
47 |
|
|
48 |
// 导出字典类型数据 |
|
49 |
export const exportDictData = (params) => { |
|
50 |
return request.download({ url: '/system/dict-data/export', params }) |
|
51 |
} |