提交 | 用户 | 时间
|
b1d33f
|
1 |
import request from '@/config/axios' |
潘 |
2 |
|
|
3 |
export type ItemVO = { |
|
4 |
id: string | undefined |
|
5 |
itemNo: string |
|
6 |
itemName: string |
|
7 |
itemCategory: string |
|
8 |
timeGranularity: string |
|
9 |
dataSource: string |
|
10 |
remark: string |
|
11 |
status: string |
|
12 |
} |
|
13 |
|
|
14 |
export type PageParam = { |
|
15 |
itemNo: string |
|
16 |
itemName: string |
|
17 |
itemCategory: string |
|
18 |
} |
|
19 |
|
23beab
|
20 |
export interface PlanChartReqVO { |
潘 |
21 |
itemNos?: [], |
|
22 |
start?: Date, |
|
23 |
end?: Date, |
|
24 |
} |
|
25 |
|
b1d33f
|
26 |
// 查询列表 |
潘 |
27 |
export const getItemPage = (params: PageParam) => { |
|
28 |
return request.get({ url: '/data/plan-item/page', params }) |
|
29 |
} |
|
30 |
|
|
31 |
// 查询详情 |
|
32 |
export const getItem = (id: string) => { |
|
33 |
return request.get({ url: '/data/plan-item/get?id=' + id }) |
|
34 |
} |
|
35 |
|
|
36 |
// 新增 |
|
37 |
export const createItem = (data: ItemVO) => { |
|
38 |
return request.post({ url: '/data/plan-item/create', data }) |
|
39 |
} |
|
40 |
|
|
41 |
// 修改 |
|
42 |
export const updateItem = (data: ItemVO) => { |
|
43 |
return request.put({ url: '/data/plan-item/update', data }) |
|
44 |
} |
|
45 |
|
|
46 |
// 删除 |
|
47 |
export const deleteItem = (id: number) => { |
|
48 |
return request.delete({ url: '/data/plan-item/delete?id=' + id }) |
|
49 |
} |
|
50 |
|
|
51 |
//获取下拉集合 |
|
52 |
export const getItemList = (params: PageParam) => { |
61c379
|
53 |
return request.get({ url: '/data/plan-item/list', params}) |
b1d33f
|
54 |
} |
潘 |
55 |
|
23beab
|
56 |
// 查询Plan图表 |
潘 |
57 |
export const getPlanChart = (data: PlanChartReqVO) => { |
|
58 |
return request.post({ url: '/data/api/query-plans/chart', data }) |
|
59 |
} |
|
60 |
|
|
61 |
// 导出Plan值 |
|
62 |
export const exportPlanValue = (data: PlanChartReqVO) => { |
3f10e7
|
63 |
return request.downloadByPost({ url: '/data/api/export-plan/history-value', data }) |
b1d33f
|
64 |
} |