longyvfengyun
2023-12-25 d8d792a6842832e8f6af6604274c438b25053afe
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
import axios from "axios";
export default {
    /**
     * 查询A059的机房列表
     * @param data
     * @returns {AxiosPromise}
     */
    getA059StationList (data) {
        return axios({
            method: "POST",
            url: 'BattInfAction!serchAllStationName_8059',
            data: "json=" + JSON.stringify(data)
        });
    }
    /**
     * Fgcd_filedownloadAction_action_serchByCondition
     * 实时查询设备文件下载情况  传参
     * json:{"dev_id":"805900001"}
     * 0 不下载
     * 1 正在下载
     * 2 下载完成
     * -1 下载失败
     */
    ,getDownloadInfo (id) {
        return axios({
            method: "POST",
            url: 'Fgcd_filedownloadAction_action_serchByCondition',
            data: "json=" + JSON.stringify({dev_id: id})
        });
    }
 
    /**
     * Fgcd_filedownloadAction_action_sendCmdToA059_readFile
     * A059一体机命令操作读取设备文件的cmd和ack校验 file_index页码数
     * 传参json:{"dev_id":"805900001","op_cmd":"161","file_index":"1"}
     */
    ,getFileList (data) {
        return axios({
            method: "POST",
            url: 'Fgcd_filedownloadAction_action_sendCmdToA059_readFile',
            data: "json=" + JSON.stringify(data)
        });
    }
    /**
     * Fgcd_filedownloadAction_action_sendCmdToA059_downLoadFile
     * A059一体机命令操作导入设备文件的cmd和ack校验 BattGroupId 电池组id,file_index文件对应的索引号
     * 传参json:{"dev_id":"805900001","op_cmd":"163","BattGroupId":"1000048" ,"download_flag1":"1","download_flag2":"1","download_flag3":"1", "download_flag4":"1" ,"download_flag5":"1","download_flag6":"1","download_flag7":"1","download_flag8":"1"}
     */
    ,importData (data) {
        return axios({
            method: "POST",
            url: 'Fgcd_filedownloadAction_action_sendCmdToA059_downLoadFile',
            data: "json=" + JSON.stringify(data)
        });
    }
 
    /**
     * Fbotestdata_infAction!serchByCondition
     * 下拉读取导入数据记录,test_type分充电:2 ,放电:3 ,活化:4
     * 传参 json:{"BattGroupId":"1000007"}
     */
    ,getTestList (data) {
        return axios({
            method: "POST",
            url: 'Fbotestdata_infAction!serchByCondition',
            data: "json=" + JSON.stringify(data)
        });
    }
 
    /**
     * FbotestdataAction!serchByCondition
     * 查询具体某一次放电的详细数据
     * 传参 json:{"test_record_count":"1","BattGroupId":"1000007"}
     */
    ,getTestData (data) {
        return axios({
            method: "POST",
            url: 'FbotestdataAction!serchByCondition',
            data: "json=" + JSON.stringify(data)
        });
    }
 
    /**
     * Fbotestdata_infAction!del
     * 一体机界面查看到导入错误数据,删除
     * json:{"BattGroupId":"1000048","test_record_count":"1"}
     */
    ,delTestData (data) {
        return axios({
            method: "POST",
            url: 'Fbotestdata_infAction!del',
            data: "json=" + JSON.stringify(data)
        });
    }
 
    /**
     * Fgcd_filedownloadAction_action_sendCmdToA059_stopFile
     * A059一体机命令操作停止下载文件
     * json:{"dev_id":"805900001"}
     */
    ,stopImport (data) {
        return axios({
            method: "POST",
            url: 'Fgcd_filedownloadAction_action_sendCmdToA059_stopFile',
            data: "json=" + JSON.stringify(data)
        });
    },
 
    /**
     * 读取图片
     * @param devId 设备id
     * @returns {AxiosPromise}
     */
    searchPicture(devId) {
        return axios({
            method: "POST",
            url: 'Fgcd_filedownloadAction_action_readA059Pictrue',
            data: "json="+devId
        });
    },
 
    /**
     * 开始显示图片
     * @param devId 设备id
     * @returns {AxiosPromise}
     */
    startShowPicture(devId) {
        return axios({
            method: "POST",
            url: 'Fbs9100_setparamAction_action_StartOrStopShowPic',
            data: "json="+JSON.stringify({
                op_cmd: 188,
                dev_id: devId,
            })
        });
    },
 
    /**
     * 停止显示图片
     * @param devId 设备id
     * @returns {AxiosPromise}
     */
    stopShowPicture(devId) {
        return axios({
            method: "POST",
            url: 'Fbs9100_setparamAction_action_StartOrStopShowPic',
            data: "json="+JSON.stringify({
                op_cmd: 190,
                dev_id: devId,
            })
        });
    }
}