You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
114 lines
2.8 KiB
114 lines
2.8 KiB
'use strict';
|
|
|
|
import { basicAction } from '@peace/utils'
|
|
import { ApiTable } from '$utils'
|
|
|
|
export function axyData (data = {}) {
|
|
return dispatch => basicAction({
|
|
type: 'post',
|
|
dispatch: dispatch,
|
|
actionType: 'POST_AXY_DATA',
|
|
url: `${ApiTable.axyData}`,
|
|
data: data,
|
|
msg: { success: '' }
|
|
});
|
|
}
|
|
|
|
export function pumpInformation (query = {}) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
actionType: 'GET_PUMP_INFORMATION',
|
|
url: `${ApiTable.pumpInformation}`,
|
|
query,
|
|
msg: { error: '获取泵站基本信息失败' }
|
|
});
|
|
}
|
|
|
|
|
|
export function getWaterLevelAll (query = {}) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
actionType: 'GET_WATER_LEVEL_ALL',
|
|
url: 'water/level/all',
|
|
query: query,
|
|
msg: { error: '获取所有泵站七天内最新集水池液位失败' },
|
|
reducer: { name: 'waterLevelAll' }
|
|
});
|
|
}
|
|
|
|
export function getWaterLevelSix (query = {}) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
actionType: 'GET_WATER_LEVEL_SIX',
|
|
url: 'water/level/six',
|
|
query: query,
|
|
msg: { error: '获取泵站6h最新集水池液位失败' },
|
|
reducer: { name: 'waterLevelSix' }
|
|
});
|
|
}
|
|
|
|
export function getWaterPumpStateAll (query = {}) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
actionType: 'GET_WATER_PUMP_STATE_ALL',
|
|
url: 'water/pump/state/all',
|
|
query: query,
|
|
msg: { error: '获取水泵状态失败' },
|
|
reducer: { name: 'waterPumpStateAll' }
|
|
});
|
|
}
|
|
|
|
|
|
export function getCapacity (query = {}) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
actionType: 'GET_CAPACITY',
|
|
url: 'capacity',
|
|
query: query,
|
|
msg: { error: '获取能耗监测数据失败' },
|
|
reducer: { name: 'capacity' }
|
|
});
|
|
}
|
|
|
|
export function getCurrentSix (query = {}) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
actionType: 'GET_CURENT_SIX',
|
|
url: 'currentSix',
|
|
query: query,
|
|
msg: { error: '获取水泵数据失败' },
|
|
reducer: { name: 'currentSix' }
|
|
});
|
|
}
|
|
|
|
export function getCabinet (query = {}) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
actionType: 'GET_CABINET',
|
|
url: 'cabinet',
|
|
query: query,
|
|
msg: { error: '获取进线柜数据失败' },
|
|
reducer: { name: 'cabinet' }
|
|
});
|
|
}
|
|
|
|
export function getThreePhase (query = {}) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
actionType: 'GET_THREEPHASE',
|
|
url: 'threePhase',
|
|
query: query,
|
|
msg: { error: '获取三相电流数据失败' },
|
|
reducer: { name: 'threePhase' }
|
|
});
|
|
}
|
|
|
|
|
|
|