guoshipeng
2023-08-04 464f6b39668b153af0fec399dc6aab76c46bbf8d
src/views/charts/index.vue
@@ -145,6 +145,10 @@
          value: '小时报',
        },
        {
          label: '五分钟报',
          value: '五分钟报',
        },
        {
          label: '日报',
          value: '日报',
        },
@@ -183,6 +187,9 @@
      } else if (nv === '小时报') {
        this.dataType = 'HourPicker1'
        this.unit = 'hour'
      } else if (nv === '五分钟报') {
        this.dataType = 'HourPicker1'
        this.unit = 'FiveMinute'
      } else {
        this.dataType = 'CustomPicker'
        this.unit = 'hour'
@@ -194,8 +201,7 @@
        one === 'a34002' ||
        one === 'a21004' ||
        one === 'a21026' ||
        one === 'a05024' ||
        one === 'a21001'
        one === 'a05024'
      ) {
        this.selectyz = '(单位:ug/m³)'
      } else if (
@@ -223,7 +229,13 @@
        this.selectyz = '(单位:pcs/0.1L)'
      } else if (one === 'a00e13') {
        this.selectyz = '(单位:db)'
      } else if (one === 'a21028') {
      } else if (
        one === 'a21028' ||
        one === 'a25002' ||
        one === 'a21001' ||
        one === 'a25005' ||
        one === 'a25003'
      ) {
        this.selectyz = '(单位:ppm)'
      }
    },
@@ -247,6 +259,7 @@
  methods: {
    // 查询数据
    selectData() {
      console.log(this.newData)
      var newLineChartData = {
        series: [],
        xAxis: [],
@@ -274,6 +287,7 @@
                if (lockLength < data[i].deviceData.length) {
                  newLineChartData.series.push({
                    data: [],
                    // large: true,
                    name: '',
                    type: 'line',
                    label: {
@@ -286,6 +300,7 @@
                newLineChartData.series.push({
                  data: [],
                  name: '',
                  // large: true,
                  type: 'line',
                })
              }
@@ -294,9 +309,6 @@
              newLineChartData.series[j].data.push(
                data[i].deviceData[j].sensorValue
              )
            }
            newLineChartData.xAxis.push(data[i].time)
          }
@@ -344,6 +356,7 @@
    },
    // 通过设备号获得因子数据
    getSensor() {
      this.newSensor = []
      // stringMacs.su
      // var newMac = this.newMac[this.newMac.length - 1][this.newMac[this.newMac.length - 1].length - 1]
      // this.newMac1 = this.newMac[this.newMac.length - 1][this.newMac[this.newMac.length - 1].length - 1]