派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-04-23 4b2a5a88cbca4c21c18a7b59dae825051cf75c1f
src/components/BaseNav/WasteWater/WasteWaterRealChart.vue
File was renamed from src/components/BaseNav/WasteWater/RealData.vue
@@ -39,7 +39,7 @@
import PublicDataStandard from '../PublicDataStandard'
export default {
  name: 'ECharts',
  name: 'WasteWaterRealChart',
  components: {
    PublicDataStandard
  },
@@ -114,6 +114,7 @@
    querySearch () {
      this.initEchartsData()
    },
    // 初始化数据请求
    async initEchartsData () {
      const data = {
        $tagCodeList: 'TJIP45.y2h508CEMS01NOX,CTJIP45.y2h508CEMS01SO2,CTJIP45.y2h508CEMS01F,CTJIP45.y2h508CEMS01PM',
@@ -121,16 +122,23 @@
        $endTime: this.formData.endTime,
        $step: 15
      }
      // console.log(data)
      const result = (await mapApi.getDataItems(data)).data
      // 数据按类别分组
      this.pointsSet(result)
      // 图标存储处理
      this.legendSet()
      // ydata数据
      this.yDataSet()
      // 根据已有数据绘制图表
      this.drawRealTimeDateChart()
    },
    // 接口数据按照 数据内分类别设置
    pointsSet (d) {
      let data = []
      let datalist = []
      this.nameList = []
      this.RealTimeDataList = []
      for (let i = 0; i < d.length; i++) {
        // this.RealTimeDataList = []
        // 判断是否继续执行
@@ -220,7 +228,7 @@
          }
        }
      }
      console.log(this.RealTimeDataList)
      // console.log(this.RealTimeDataList)
    },
    // legend类别图表展示设置数组
    legendSet () {
@@ -617,8 +625,7 @@
        }],
        series: serLists
      }
      this.myChart.setOption(options, true)
      console.log(options)
      this.myChart.setOption(options)
      window.onresize = this.myChart.resize
    }
  }