import request from '@/config/axios'
|
|
export type ItemVO = {
|
id: string | undefined
|
itemNo: string
|
itemName: string
|
itemCategory: string
|
timeGranularity: string
|
dataSource: string
|
remark: string
|
status: string
|
}
|
|
export type PageParam = {
|
itemNo: string
|
itemName: string
|
itemCategory: string
|
}
|
|
export interface PlanChartReqVO {
|
itemNos?: [],
|
start?: Date,
|
end?: Date,
|
}
|
|
// 查询列表
|
export const getItemPage = (params: PageParam) => {
|
return request.get({ url: '/data/plan-item/page', params })
|
}
|
|
// 查询详情
|
export const getItem = (id: string) => {
|
return request.get({ url: '/data/plan-item/get?id=' + id })
|
}
|
|
// 新增
|
export const createItem = (data: ItemVO) => {
|
return request.post({ url: '/data/plan-item/create', data })
|
}
|
|
// 修改
|
export const updateItem = (data: ItemVO) => {
|
return request.put({ url: '/data/plan-item/update', data })
|
}
|
|
// 删除
|
export const deleteItem = (id: number) => {
|
return request.delete({ url: '/data/plan-item/delete?id=' + id })
|
}
|
|
//获取下拉集合
|
export const getItemList = (params: PageParam) => {
|
return request.get({ url: '/data/plan-item/list', params})
|
}
|
|
// 查询Plan图表
|
export const getPlanChart = (data: PlanChartReqVO) => {
|
return request.post({ url: '/data/api/query-plans/chart', data })
|
}
|
|
// 导出Plan值
|
export const exportPlanValue = (data: PlanChartReqVO) => {
|
return request.post({ url: '/data/api/export-plan/history-value', data })
|
}
|