| | |
| | | return { |
| | | warnlist: [], |
| | | warnidlist: [], |
| | | warnidslist: [], |
| | | labelWidth: 100, |
| | | pointlock: false, //踩点获取数据开关 |
| | | pointcontent: '', |
| | |
| | | console.log(this.fenceposition); |
| | | |
| | | this.getLocation(); |
| | | this.warnidslist = [] |
| | | this.warnidlist = [] |
| | | this.warnlist = [] |
| | | this.findtagidall(); |
| | |
| | | initMap() { |
| | | // if (this.vuex_is_login) { |
| | | MarsHome().then((rep) => { |
| | | |
| | | // uni.getLocation({ |
| | | // type: 'wgs84', |
| | | // success: function(res) { |
| | | // console.log('当前位置的经度:' + res.longitude); |
| | | // console.log('当前位置的纬度:' + res.latitude); |
| | | if (this.lonlat != '') { |
| | | rep.data[0].mapposition = this.lonlat |
| | | } |
| | | // } |
| | | // }); |
| | | this.marsset = rep.data[0] |
| | | }) |
| | | // } |
| | |
| | | // res.data[i].online==1 |
| | | if (res.data[i].online == "1") { |
| | | console.log(this.zystate); |
| | | console.log(this.warnlist ); |
| | | if (this.zystate == 'START') { |
| | | // if (res.data.filter(item => item.warnstatus == '1').length > 0) { |
| | | // if (this.warnidlist.indexOf(res.data[i].warnstatus=='1') < 0) { |
| | |
| | | // 1) |
| | | // } |
| | | // } |
| | | console.log(this.warnidlist.indexOf(res.data[i].tagid)); |
| | | if (this.warnidlist.indexOf(res.data[i].tagid) < 0) { |
| | | if (res.data[i].warnstatus == '1') { |
| | | this.warnlist.push(res.data[i].tagid + |
| | |
| | | }); |
| | | // 将符合条件的数据的 tagid 添加到 this.warnidlist 中 |
| | | filteredData.forEach(item => { |
| | | if (this.warnidslist.indexOf(item.tagid) < 0) { |
| | | if (this.warnidlist.indexOf(item.tagid) < 0) { |
| | | this.warnlist.push(item.tagid + "设备非高精"); |
| | | this.warnidslist.push(item.tagid) |
| | | this.warnidlist.push(item.tagid) |
| | | } |
| | | }); |
| | | } else { |
| | | this.warnlist = []; |
| | | this.warnidslist = [] |
| | | this.warnidlist = [] |
| | | } |
| | | } else { |
| | | |