121 lines
2.8 KiB
TypeScript
121 lines
2.8 KiB
TypeScript
import createAxios from '/@/utils/axios'
|
|
|
|
export const queryWindTurbinesPages = () => {
|
|
return createAxios({
|
|
url: '/api/page/turbines/queryWindTurbinesPages',
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
export const historyReq = (data: {
|
|
devices: {
|
|
deviceId: string
|
|
attributes: string
|
|
}
|
|
startTime: string
|
|
endTime: string
|
|
}) => {
|
|
return createAxios({
|
|
url: '/api/data/history',
|
|
method: 'post',
|
|
data: data,
|
|
})
|
|
}
|
|
|
|
export const runAirBlowerReq = (
|
|
data: {
|
|
deviceId: string
|
|
serviceName: string
|
|
opValue: 1 | 0
|
|
}[]
|
|
) => {
|
|
return createAxios({
|
|
url: '/api/page/turbines/windTurbinesControl',
|
|
method: 'post',
|
|
data: data,
|
|
})
|
|
}
|
|
|
|
export const getReportTemplateListReq = (data: { category: '单机报表' | '多机报表'; pageNum: number; pageSize: number }) => {
|
|
return createAxios<
|
|
never,
|
|
Promise<{
|
|
code: number
|
|
msg: string
|
|
data: {
|
|
total: number
|
|
rows: { id: string; category: '单机报表' | '多机报表'; template: string }[]
|
|
code: number
|
|
msg: string
|
|
}
|
|
success: boolean
|
|
}>
|
|
>({
|
|
url: '/api/page/report/template/getList',
|
|
method: 'post',
|
|
data,
|
|
})
|
|
}
|
|
|
|
export const addReportTemplateListReq = (data: { category: '单机报表' | '多机报表'; template: string }) => {
|
|
return createAxios<
|
|
never,
|
|
Promise<{
|
|
code: number
|
|
msg: string
|
|
data: {
|
|
id: string
|
|
category: '单机报表' | '多机报表'
|
|
template: string
|
|
}[]
|
|
success: boolean
|
|
}>
|
|
>({
|
|
url: '/api/page/report/template/add',
|
|
method: 'post',
|
|
data,
|
|
})
|
|
}
|
|
|
|
export const delReportTemplateListReq = (data: { id: string }) => {
|
|
return createAxios<
|
|
never,
|
|
Promise<{
|
|
code: number
|
|
msg: string
|
|
success: boolean
|
|
}>
|
|
>({
|
|
url: '/api/page/report/template/del',
|
|
method: 'post',
|
|
data,
|
|
})
|
|
}
|
|
|
|
export function powerCurveExport(params: object = {}) {
|
|
return createAxios({
|
|
url: '/api/page/statistical/powerCurveExport',
|
|
method: 'POST',
|
|
data: params,
|
|
responseType: 'blob',
|
|
})
|
|
}
|
|
|
|
export function trendContrastExport(params: object = {}) {
|
|
return createAxios({
|
|
url: '/api/page/statistical/trendContrastExport',
|
|
method: 'POST',
|
|
data: params,
|
|
responseType: 'blob',
|
|
})
|
|
}
|
|
|
|
export function trendAnalyseExport(params: object = {}) {
|
|
return createAxios({
|
|
url: '/api/page/statistical/trendAnalyseExport',
|
|
method: 'POST',
|
|
data: params,
|
|
responseType: 'blob',
|
|
})
|
|
}
|