|  | @@ -1475,3 +1475,146 @@ function getListData(queryParam = {}) {
 | 
	
		
			
				|  |  |                          },
 | 
	
		
			
				|  |  |                          axisLine: {
 | 
	
		
			
				|  |  |                              show: false // 去除轴线
 | 
	
		
			
				|  |  | +                        },
 | 
	
		
			
				|  |  | +                        splitLine: {
 | 
	
		
			
				|  |  | +                            lineStyle: {
 | 
	
		
			
				|  |  | +                                color: "#aaa", // 分割线颜色
 | 
	
		
			
				|  |  | +                                opacity: '0.2'
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    },
 | 
	
		
			
				|  |  | +                    series: [{
 | 
	
		
			
				|  |  | +                            symbol: "none",
 | 
	
		
			
				|  |  | +                            name: "喷淋末端",
 | 
	
		
			
				|  |  | +                            type: "line",
 | 
	
		
			
				|  |  | +                            smooth: true, // true 可以让我们的折线显示带有弧度
 | 
	
		
			
				|  |  | +                            areaStyle: {
 | 
	
		
			
				|  |  | +                                normal: {
 | 
	
		
			
				|  |  | +                                    color: new echarts.graphic.LinearGradient(
 | 
	
		
			
				|  |  | +                                        0,
 | 
	
		
			
				|  |  | +                                        0,
 | 
	
		
			
				|  |  | +                                        0,
 | 
	
		
			
				|  |  | +                                        1, [{
 | 
	
		
			
				|  |  | +                                                offset: 0,
 | 
	
		
			
				|  |  | +                                                color: "rgba(255,156,0, 0.4)"
 | 
	
		
			
				|  |  | +                                            },
 | 
	
		
			
				|  |  | +                                            {
 | 
	
		
			
				|  |  | +                                                offset: 0.8,
 | 
	
		
			
				|  |  | +                                                color: "rgba(255,156,0, 0.3)"
 | 
	
		
			
				|  |  | +                                            }
 | 
	
		
			
				|  |  | +                                        ],
 | 
	
		
			
				|  |  | +                                        false
 | 
	
		
			
				|  |  | +                                    ),
 | 
	
		
			
				|  |  | +                                    shadowColor: "rgba(0, 0, 0, 0.1)"
 | 
	
		
			
				|  |  | +                                }
 | 
	
		
			
				|  |  | +                            },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                            data: sortData[0].data[0]
 | 
	
		
			
				|  |  | +                        },
 | 
	
		
			
				|  |  | +                        {
 | 
	
		
			
				|  |  | +                            symbol: "none",
 | 
	
		
			
				|  |  | +                            name: "消防栓",
 | 
	
		
			
				|  |  | +                            type: "line",
 | 
	
		
			
				|  |  | +                            smooth: true,
 | 
	
		
			
				|  |  | +                            areaStyle: {
 | 
	
		
			
				|  |  | +                                normal: {
 | 
	
		
			
				|  |  | +                                    color: new echarts.graphic.LinearGradient(
 | 
	
		
			
				|  |  | +                                        0,
 | 
	
		
			
				|  |  | +                                        0,
 | 
	
		
			
				|  |  | +                                        0,
 | 
	
		
			
				|  |  | +                                        1, [{
 | 
	
		
			
				|  |  | +                                                offset: 0,
 | 
	
		
			
				|  |  | +                                                color: "rgba(0,150,255,0.5)"
 | 
	
		
			
				|  |  | +                                            },
 | 
	
		
			
				|  |  | +                                            {
 | 
	
		
			
				|  |  | +                                                offset: 0.8,
 | 
	
		
			
				|  |  | +                                                color: "rgba(0,150,255, 0.1)"
 | 
	
		
			
				|  |  | +                                            }
 | 
	
		
			
				|  |  | +                                        ],
 | 
	
		
			
				|  |  | +                                        false
 | 
	
		
			
				|  |  | +                                    ),
 | 
	
		
			
				|  |  | +                                    shadowColor: "rgba(0, 0, 0, 0.1)"
 | 
	
		
			
				|  |  | +                                }
 | 
	
		
			
				|  |  | +                            },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                            data: sortData[0].data[1]
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    ]
 | 
	
		
			
				|  |  | +                };
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                myChart.setOption(option);
 | 
	
		
			
				|  |  | +                var img1 = document.getElementById('deviceLinkChart1_img');
 | 
	
		
			
				|  |  | +                setTimeout(function() {
 | 
	
		
			
				|  |  | +                    img1.src = myChart.getDataURL();
 | 
	
		
			
				|  |  | +                }, 1000)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            })();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            // 跨设备数据关联2
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            // 喷淋末端、消火栓屋顶水箱液位关联
 | 
	
		
			
				|  |  | +            let spray_end2 = [];
 | 
	
		
			
				|  |  | +            let fire_hydrant2 = [];
 | 
	
		
			
				|  |  | +            let water_tank_level = []
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            let water_associated_data = device_association.water_associated_data;
 | 
	
		
			
				|  |  | +            water_associated_data.forEach(function(item, index) {
 | 
	
		
			
				|  |  | +                spray_end2.push(item.spray_end)
 | 
	
		
			
				|  |  | +                fire_hydrant2.push(item.fire_hydrant)
 | 
	
		
			
				|  |  | +                water_tank_level.push(item.water_tank_level)
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            (function() {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                var sortData = [{
 | 
	
		
			
				|  |  | +                    sortName: "喷淋末端、消火栓屋顶水箱液位关联",
 | 
	
		
			
				|  |  | +                    data: [
 | 
	
		
			
				|  |  | +                        spray_end2, fire_hydrant2
 | 
	
		
			
				|  |  | +                    ]
 | 
	
		
			
				|  |  | +                }];
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                var xData = function() {
 | 
	
		
			
				|  |  | +                    var data = [];
 | 
	
		
			
				|  |  | +                    for (var i = 1; i < water_associated_data.length + 1; i++) {
 | 
	
		
			
				|  |  | +                        data.push(i);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    return data;
 | 
	
		
			
				|  |  | +                }();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                // 1. 实例化对象
 | 
	
		
			
				|  |  | +                var myChart = echarts.init(document.querySelector("#deviceLinkChart2"));
 | 
	
		
			
				|  |  | +                // 2.指定配置
 | 
	
		
			
				|  |  | +                var option = {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                    color: ["#FF9C00", "#0096FF"], // 通过这个color修改两条线的颜色
 | 
	
		
			
				|  |  | +                    tooltip: {
 | 
	
		
			
				|  |  | +                        trigger: "axis",
 | 
	
		
			
				|  |  | +                        textStyle: {
 | 
	
		
			
				|  |  | +                            align: 'left' //图例左对齐
 | 
	
		
			
				|  |  | +                        },
 | 
	
		
			
				|  |  | +                        backgroundColor: '#12DFE0',
 | 
	
		
			
				|  |  | +                        formatter: function(params) {
 | 
	
		
			
				|  |  | +                            var res = params[0].seriesName + ':' + params[0].value + '<br />' + params[1].seriesName + ':' + params[1].value + '<br /> 水箱液位 :' + water_tank_level[params[0].dataIndex] + '<br />时间:' + chooseTime + '';
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                            return res;
 | 
	
		
			
				|  |  | +                        },
 | 
	
		
			
				|  |  | +                    },
 | 
	
		
			
				|  |  | +                    legend: {
 | 
	
		
			
				|  |  | +                        // 如果series 对象有name 值,则 legend可以不用写data
 | 
	
		
			
				|  |  | +                        itemGap: 20,
 | 
	
		
			
				|  |  | +                        itemHeight: 2,
 | 
	
		
			
				|  |  | +                        itemWidth: 15,
 | 
	
		
			
				|  |  | +                        icon: 'rect',
 | 
	
		
			
				|  |  | +                        textStyle: {
 | 
	
		
			
				|  |  | +                            color: "#aaa"
 | 
	
		
			
				|  |  | +                        },
 | 
	
		
			
				|  |  | +                        top: "bottom",
 | 
	
		
			
				|  |  | +                    },
 | 
	
		
			
				|  |  | +                    grid: {
 | 
	
		
			
				|  |  | +                        top: "0%",
 | 
	
		
			
				|  |  | +                        left: "1%",
 | 
	
		
			
				|  |  | +                        right: "1%",
 | 
	
		
			
				|  |  | +                        bottom: "15%",
 | 
	
		
			
				|  |  | +                        show: true, // 显示边框
 | 
	
		
			
				|  |  | +                        borderWidth: '0', //去除边框
 |