whyczyk
2021-04-13 fd17c9831f77ea94ae577c90b20f0cee0fb90825
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
import axios from "./axios";
 
/**
 * 查询所有的阀值
 * 无参
 */
export const realTimeMonitoring = () => {
    return axios({
        method: "post",
        url: "Batt_param_lowAction_searchAll",
        data: null
    })
}
 
 
/**
 * 查询均衡供电模块信息
 * json={"dev_id": ""}
 */
export const realTimePower = (params) => {
    return axios({
        method: "post",
        url: "JhStateAction_action_serchByCondition",
        data: "json=" + JSON.stringify(params)
    })
}
 
 
/**
 * 根据设备id查询设备当前的开关状态
 * json={"dev_id":910000022}
 */
export const realTimePowerOff = (params) => {
    return axios({
        method: "post",
        url: "Fbs9100_stateAction_action_serchContactorState",
        data: "json=" + JSON.stringify(params)
    })
}
 
/**
 * 根据电池组id查询电池组实时组端信息
 * 参数:rtstate.battGroupId=1005074
 */
export const realTimeGroup = (params) => {
    return axios({
        method: "post",
        url: "Batt_rtstateAction_serchByCondition",
        data: "rtstate.battGroupId=" + params
    })
}
 
 
/**
 * 根据电池组id查询该电池组中所有电池信息  (图表数据)
 * json={"BattGroupId":1005074}
 */
export const realTimeSearch = (params) => {
    return axios({
        method: "post",
        url: "Batt_rtdataAction_serchByCondition",
        data: "json=" + JSON.stringify(params)
    })
}
 
 
/**
 * 查询电池告警参数
 * 参数:json={"dev_id":910000022}
 */
export const realTimeAlarm = (params) => {
    return axios({
        method: "post",
        url: "Dev_paramAction!serchParamById",
        data: "json=" + JSON.stringify(params)
    })
}
 
/**
 * 获取当前选中的单体是否已经被添加
 * 参数:json={"BattGroupId":1005151,"MonNum":"1"}
 */
export const realTimeNot = (params) => {
    return axios({
        method: "post",
        url: "Batt_attentionAction!judgeInOrNot",
        data: "json=" + JSON.stringify(params)
    })
}
 
/**
 * 添加关注单体
 * json={"BattGroupId":"1005151","MonNum":"1"}
 */
export const realTimeAdd = (params) => {
    return axios({
        method: "post",
        url: "Batt_attentionAction!add",
        data: "json=" + JSON.stringify(params)
    })
}
 
 
/**
 * 查询自己管理的电池组中充放电状态
 * 无参
 */
export const realTimeState = () => {
    return axios({
        method: "post",
        url: "Batt_rtstateAction!serchDisOrChargrNew",
        data: null
    })
}
 
/**
 * 查询用户的图表颜色参数
 * 无参
 */
export const realTimeColor = () => {
    return axios({
        method: "post",
        url: "Chart_ColorAction!serchByCondition",
        data: null
    })
}
 
/**
 * 修改用户的图表颜色参数
 * 参数:json={"min_color":"#FF0000","max_color":"#00FF00","normal_color":"#33ACFF",
 * "change_color":"#FFFF00","warn_color":"#FF00FF"}
 */
export const realTimeColorParams = (params) => {
    return axios({
        method: "post",
        url: "Chart_ColorAction!update",
        data: "json=" + JSON.stringify(params)
    })
}
 
/**
 * 查询所有61850设备的告警状态
 * 无参
 */
export const realTimeAlarmStatus = () => {
    return axios({
        method: "post",
        url: "Fbs9100_stateAction_action_serchBy61850Alarms",
        data: null
    })
}
 
 
/**
 * 查询电池单体的内阻曲线数据   (弹出框)
 * 参数:json={"BattGroupId":1005151,"MonNum":11}
 */
export const realTimeCurve = (params) => {
    return axios({
        method: "post",
        url: "BattresdataAction!serchByMonHistory",
        data: "json=" + JSON.stringify(params)
    })
}
/**
 * 获取剩余天数,工作模式,组端电压,峰值电压
 * @param params
 * @returns {AxiosPromise}
 */
export const realTimeStateList = (battGroupId) => {
    // 构造查询条件
    let searchParams = {
        battGroupId: battGroupId,
    };
    // 查询后台
    return axios({
        method: "post",
        url: "Fbs9100s_fod_stateAction_action_serchByCondition",
        data: "json=" + JSON.stringify(searchParams)
    });
}
/**
 * 获取设备的逆变信息
 * @param dev_id    设备id
 * @returns {AxiosPromise} 返回结果
 */
export const inversionInfo = (dev_id) => {
    // 构造查询条件
    let params = {
        dev_id: dev_id,
    };
    // 查询后台
    return axios({
        method: "post",
        url: "Fbs9100s_nibian_stateAction_action_serchByCondition",
        data: "json=" + JSON.stringify(params)
    });
}
 
/**
 * 查询历史实时数据
 * @param params    查询参数
 * @returns {AxiosPromise}
 */
export const searchHistoryRealtimeData = (params) => {
    // 查询后台
    return axios({
        method: "post",
        url: "Batt_realdataAction!serchByCondition",
        data: "json=" + JSON.stringify(params)
    });
}
 
/**
 * 查询历史实时数据
 * @param json:{"dev_id":618500002}
 * @returns {AxiosPromise}
 */
export const JhStateActionSerchByCondition = (params) => {
    // 查询后台
    return axios({
        method: "post",
        url: "JhStateAction_action_serchByCondition",
        data: "json=" + JSON.stringify(params)
    });
}