| | |
| | | for (let i = 0; i < items.length; i++) { |
| | | this.title = items[i].formatTime; |
| | | items[i].deviceCount = deviceCounts[i]; |
| | | if (!(items[i].monitorPointId)) { |
| | | /* if (!(items[i].monitorPointId)) { |
| | | items[i].monitorPointName = items[i].areaName; |
| | | } |
| | | const legendName = items[i].formatTime + label + |
| | | (items[i].mac ? '设备:' + items[i].deviceName : (items[i].monitorPointId ? '监测点:' + items[i].monitorPointName : items[i].areaName)); |
| | | } */ |
| | | const showName = this.items[i].showName = |
| | | items[i].mac ? ('设备:' + items[i].deviceName) : |
| | | ((items[i].monitorPointId ? '监测点:' + items[i].monitorPointName : items[i].areaName) + (items[i].professionName ? items[i].professionName : '')); |
| | | const legendName = items[i].formatTime + label + showName; |
| | | items[i].legendName = option.legend.data[i] = legendName; |
| | | if (res.data.datas[i][sensorKey]) { |
| | | option.series.push({ |
| | | name: legendName, |
| | | data: res.data.datas[i][sensorKey], |
| | |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | const myChart = echarts.init(document.getElementById('mydiv' + index)); |
| | | myChart.setOption(option, true); |
| | | window.onresize = myChart.resize; |
| | | if (option.series.length < 1) { |
| | | $('#mydiv' + index).remove(); |
| | | } |
| | | } |
| | | this.sensorArr.forEach(i => { |
| | | if (i >= sensors.length) { |
| | |
| | | } |
| | | }); |
| | | this.spinning = false; |
| | | if (!this.title) { |
| | | this.title = items[0].formatTime; |
| | | } |
| | | const title: any[] = this.title.replace(' ', '-').split('-'); |
| | | this.title = ''; |
| | | for (let i = 0; i < title.length; i++) { |
| | |
| | | if (sensor.key === split[0]) { |
| | | this.resultArr.push({ |
| | | sensorName: sensor.name, |
| | | monitorPointName: this.items[split[1]].mac ? this.items[split[1]].deviceName : this.items[split[1]].monitorPointName, |
| | | monitorPointName: this.items[split[1]].showName, |
| | | result: res.data.sortList[i][key] + '%', |
| | | effect: sensor.effect, |
| | | measures: sensor.measures |