提交 | 用户 | 时间
|
820397
|
1 |
import request from '@/config/axios' |
H |
2 |
|
|
3 |
export interface ConfigVO { |
|
4 |
id: number | undefined |
|
5 |
category: string |
|
6 |
name: string |
|
7 |
key: string |
|
8 |
value: string |
|
9 |
type: number |
|
10 |
visible: boolean |
|
11 |
remark: string |
|
12 |
createTime: Date |
|
13 |
} |
|
14 |
|
|
15 |
// 查询参数列表 |
|
16 |
export const getConfigPage = (params: PageParam) => { |
|
17 |
return request.get({ url: '/infra/config/page', params }) |
|
18 |
} |
|
19 |
|
|
20 |
// 查询参数详情 |
|
21 |
export const getConfig = (id: number) => { |
|
22 |
return request.get({ url: '/infra/config/get?id=' + id }) |
|
23 |
} |
|
24 |
|
|
25 |
// 根据参数键名查询参数值 |
|
26 |
export const getConfigKey = (configKey: string) => { |
|
27 |
return request.get({ url: '/infra/config/get-value-by-key?key=' + configKey }) |
|
28 |
} |
|
29 |
|
|
30 |
// 新增参数 |
|
31 |
export const createConfig = (data: ConfigVO) => { |
|
32 |
return request.post({ url: '/infra/config/create', data }) |
|
33 |
} |
|
34 |
|
|
35 |
// 修改参数 |
|
36 |
export const updateConfig = (data: ConfigVO) => { |
|
37 |
return request.put({ url: '/infra/config/update', data }) |
|
38 |
} |
|
39 |
|
|
40 |
// 删除参数 |
|
41 |
export const deleteConfig = (id: number) => { |
|
42 |
return request.delete({ url: '/infra/config/delete?id=' + id }) |
|
43 |
} |
|
44 |
|
|
45 |
// 导出参数 |
|
46 |
export const exportConfig = (params) => { |
|
47 |
return request.download({ url: '/infra/config/export', params }) |
|
48 |
} |