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
| import axios from "axios";
| import const_5100 from "@/assets/js/const/const_5100";
|
| /**
| * 读取放电参数
| * @param devId 设备ID
| * @return {AxiosPromise}
| */
| export const getParams = (devId) => {
| return axios({
| method: "GET",
| url: "Fbs9100_setparamAction/searchPW",
| params: {
| devId
| },
| })
| }
|
| /**
| * 设置放电参数
| * @param data 参数信息
| * @return {AxiosPromise}
| */
| export const setParams = (data) => {
| return axios({
| method: "POST",
| url: "Fbs9100_setparamAction/updatePW",
| data
| })
| }
|
| /**
| *
| * @param devId 设备id
| * @param type 测试类型 1-放电 2-充电
| * @return {AxiosPromise}
| */
| export const start = (devId, type) => {
| let cmd =const_5100.cmd;
| return axios({
| method: "POST",
| url: "Fbs9100_setparamAction/updatePWStartTest",
| params: {
| devId,
| opCmd: cmd.start,
| testCmd: type === 1?cmd.discharge:cmd.charge
| },
| })
| }
|
| /**
| * 停止测试
| * @param devId 设备id
| * @return {AxiosPromise}
| */
| export const stop = (devId) => {
| return axios({
| method: "POST",
| url: "Fbs9100_setparamAction/updatePWStopTest",
| params: {
| devId
| }
| })
| }
|
|