zxl
2025-03-25 58f1c5870a8a02b3b858eb7e6714397c731c510f
src/views/home/data-video/index.vue
@@ -27,8 +27,7 @@
<script>
import * as echarts from 'echarts';
import {video} from "../../../api/platform/home";
var chartDom = document.getElementById('main');
var myChart = echarts.init(chartDom);
var myChart =null;
var option;
let observer = null;
export default {
@@ -122,7 +121,7 @@
                      </div>`;
            }).join('');
            tooltipHtml = `${tooltipHtml}${pointsHtml}`;
            tooltipHtml += `<div style="font-weight: bold; margin-top: 10px;padding:0 12px;">录像正常参考值: ${baseLine.toLocaleString()}</div>`;
            tooltipHtml += `<div style="font-weight: bold; margin-top: 10px;padding:0 12px;">录像完整参考值: ${baseLine.toLocaleString()}</div>`;
            return tooltipHtml;
          }
@@ -135,7 +134,7 @@
          containLabel: true
        },
        legend: {
          data: ['点位在线', '录像完整', '录像缺失']
          data: ['点位在线', '录像完整', '录像缺失','无录像']
        },
        xAxis: [
          {
@@ -222,6 +221,15 @@
            })
          },
          {
            name: '无录像',
            type: 'bar',
            yAxisIndex: 0,
            data:  data.list.map(item => {
              return item['errNum'];
            })
          },
          {
            name: '点位在线',
            type: 'line',
            yAxisIndex: 1,
@@ -260,6 +268,7 @@
    const month = (date.getMonth() + 1) >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1);
    this.date = year + '-' + month;
    this.params.date = this.date;
    myChart = echarts.init(this.$refs.chartContent);
    this.getChart();
    this.observe();
  },