|
@@ -25,18 +25,32 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- getList(w_deviceid) {
|
|
|
+ getList(w_deviceid, prodnum) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
+ let special = ["FW01"].includes(prodnum)
|
|
|
+ console.log("special", special)
|
|
|
this.$Http.basic({
|
|
|
- "id": 20230711165702,
|
|
|
+ "id": special ? 20230628084901 : 20230711165702,
|
|
|
"content": {
|
|
|
w_deviceid
|
|
|
}
|
|
|
}).then(res => {
|
|
|
console.log("设备实时数据查询", res)
|
|
|
if (this.cutoff(res.msg)) return resolve(0)
|
|
|
- this.list = res.data;
|
|
|
- resolve(res.data.length ? 49 : 0)
|
|
|
+ if (special) {
|
|
|
+ if (["FW01"].includes(prodnum)) {
|
|
|
+ const params = res.data.params,
|
|
|
+ list = [];
|
|
|
+ params.OpenDeg && list.push(params.OpenDeg)
|
|
|
+ params.Voltage && list.push(params.Voltage)
|
|
|
+ params.Longitude && list.push(params.Longitude)
|
|
|
+ params.Latitude && list.push(params.Latitude)
|
|
|
+ this.list = list;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.list = res.data;
|
|
|
+ }
|
|
|
+ resolve(this.list.length ? 49 : 0)
|
|
|
})
|
|
|
})
|
|
|
}
|