提交 | 用户 | 时间
|
fd2207
|
1 |
import request from '@/utils/request' |
懒 |
2 |
|
|
3 |
// 查询字典数据列表 |
|
4 |
export function listData(query) { |
|
5 |
return request({ |
|
6 |
url: '/system/dict/data/list', |
|
7 |
method: 'get', |
|
8 |
params: query |
|
9 |
}) |
|
10 |
} |
|
11 |
|
|
12 |
// 查询字典数据详细 |
|
13 |
export function getData(dictCode) { |
|
14 |
return request({ |
|
15 |
url: '/system/dict/data/' + dictCode, |
|
16 |
method: 'get' |
|
17 |
}) |
|
18 |
} |
|
19 |
|
|
20 |
// 根据字典类型查询字典数据信息 |
|
21 |
export function getDicts(dictType) { |
|
22 |
return request({ |
|
23 |
url: '/system/dict/data/type/' + dictType, |
|
24 |
method: 'get' |
|
25 |
}) |
|
26 |
} |
|
27 |
|
|
28 |
// 新增字典数据 |
|
29 |
export function addData(data) { |
|
30 |
return request({ |
|
31 |
url: '/system/dict/data', |
|
32 |
method: 'post', |
|
33 |
data: data |
|
34 |
}) |
|
35 |
} |
|
36 |
|
|
37 |
// 修改字典数据 |
|
38 |
export function updateData(data) { |
|
39 |
return request({ |
|
40 |
url: '/system/dict/data', |
|
41 |
method: 'put', |
|
42 |
data: data |
|
43 |
}) |
|
44 |
} |
|
45 |
|
|
46 |
// 删除字典数据 |
|
47 |
export function delData(dictCode) { |
|
48 |
return request({ |
|
49 |
url: '/system/dict/data/' + dictCode, |
|
50 |
method: 'delete' |
|
51 |
}) |
|
52 |
} |