|
@@ -1904,3 +1904,128 @@ function getListData(queryParam = {}) {
|
|
|
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('oldAnalysisChart1_img');
|
|
|
+ setTimeout(function() {
|
|
|
+ img1.src = myChart.getDataURL();
|
|
|
+ }, 1000)
|
|
|
+
|
|
|
+ })();
|
|
|
+
|
|
|
+ // 电老化分析2
|
|
|
+ (function() {
|
|
|
+
|
|
|
+ // 漏电告警数据
|
|
|
+ let a2 = [];
|
|
|
+ let b2 = [];
|
|
|
+ let data_time2 = [];
|
|
|
+
|
|
|
+ let leakage_alarm = electrical_aging.leakage_alarm;
|
|
|
+ leakage_alarm.forEach(function(item, index) {
|
|
|
+ a2.push(item.electric_current)
|
|
|
+ b2.push(item.voltage)
|
|
|
+ data_time2.push(item.data_time)
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ var sortData = [{
|
|
|
+ sortName: "漏电告警",
|
|
|
+ data: [a2, b2]
|
|
|
+ }];
|
|
|
+
|
|
|
+ var xData = function() {
|
|
|
+ var data = [];
|
|
|
+ for (var i = 1; i < leakage_alarm.length + 1; i++) {
|
|
|
+ data.push(i);
|
|
|
+ }
|
|
|
+ return data;
|
|
|
+ }();
|
|
|
+
|
|
|
+ // 1. 实例化对象
|
|
|
+ var myChart = echarts.init(document.querySelector("#oldAnalysisChart2"));
|
|
|
+ // 2.指定配置
|
|
|
+ var option = {
|
|
|
+
|
|
|
+ color: ["#FF9C00", "#0096FF"], // 通过这个color修改两条线的颜色
|
|
|
+ tooltip: {
|
|
|
+ trigger: "axis",
|
|
|
+ textStyle: {
|
|
|
+ align: 'left' //图例左对齐
|
|
|
+ },
|
|
|
+ backgroundColor: '#12DFE0',
|
|
|
+ // formatter: '{a0}: {c0}<br />{a1}: {c1}<br />时间:' + chooseTime + ''
|
|
|
+ formatter: function(params) {
|
|
|
+ var res = params[0].seriesName + ':' + params[0].value + '<br />' + params[1].seriesName + ':' + params[1].value + '<br />时间:' + data_time2[params[0].dataIndex];
|
|
|
+ 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', //去除边框
|
|
|
+ containLabel: true // 包含刻度文字在内
|
|
|
+ },
|
|
|
+
|
|
|
+ xAxis: {
|
|
|
+ type: "category",
|
|
|
+ boundaryGap: false,
|
|
|
+ data: xData,
|
|
|
+ axisTick: {
|
|
|
+ show: false // 去除刻度线
|
|
|
+ },
|
|
|
+ axisLabel: {
|
|
|
+ color: "#AADDFF" // 文本颜色
|
|
|
+ },
|
|
|
+ axisLine: {
|
|
|
+ show: false // 去除轴线
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ yAxis: {
|
|
|
+ type: "value",
|
|
|
+ axisTick: {
|
|
|
+ show: false // 去除刻度线
|
|
|
+ },
|
|
|
+ axisLabel: {
|
|
|
+ show: false // 去除文本
|
|
|
+ },
|
|
|
+ axisLine: {
|
|
|
+ show: false // 去除轴线
|
|
|
+ },
|
|
|
+ splitLine: {
|
|
|
+ lineStyle: {
|
|
|
+ color: "#aaa", // 分割线颜色
|
|
|
+ opacity: .2
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [{
|
|
|
+ symbol: "none",
|
|
|
+ name: "电流",
|