派生自 wuyushui/SewerAndRainNetwork

chenyabin
2021-04-15 93850b9aee34d3a66c2770a1eb0435ce104e772f
src/components/BaseNav/PublicBounced/common/echarts/Echarts.vue
@@ -5,7 +5,7 @@
        <span class="grid-content">氮氧化物 :<i  style="color: #e8ee0b">29.93</i>  标准 : 100</span>
        <span class="grid-content">二氧化硫 : <i  style="color: #e8ee0b">17.34</i> 标准 : 50</span>
        <span class="grid-content">烟尘 : <i  style="color: #e8ee0b">6.93</i> 标准 : 30</span>
        <span class="grid-content">废气流量 : <i  style="color: #e8ee0b">120343.18</i></span>
        <span class="grid-content">废气流量 : <i  style="color: #e8ee0b">5.23</i></span>
      </div>
    </div>
    <div class="form-echrts">
@@ -36,9 +36,7 @@
        </div>
        <div class="detailbtn"  @click="onSubmit">查询</div>
      </div>
      <div style="width:5rem;height:1.5rem;" >
        <div  style="width:100%;height:100%;" ref="echarts">  </div>
      </div>
        <div  style="width:5rem;height:1.5rem;" ref="echarts"> </div>
      </div>
    </div>
</template>
@@ -561,15 +559,17 @@
      step: ''
    }
  },
  updated () {
    this.DrawEXHRealTimeDateChart()
  },
  mounted () {
    this.formInline.timeEnd = dayjs().format('YYYY-MM-DD HH:mm:ss')
    this.formInline.timeStart = dayjs().subtract(1, 'minute').format('YYYY-MM-DD HH:mm:ss')
    this.DrawEXHRealTimeDateChart(this.JsonTimeCtarts.id, this.JsonTimeCtarts.title, this.JsonTimeCtarts.legend, this.JsonTimeCtarts.ydatas, this.JsonTimeCtarts.yname)
    // this.IntervalEXHRealTimeDate(this.JSONTimeData.id, this.JSONTimeData.unionTagCodeList, this.JSONTimeData.BBZMAPPING)
  },
  methods: {
    onSubmit () {
      this.DrawEXHRealTimeDateChart(this.JsonTimeCtarts.id, this.JsonTimeCtarts.title, this.JsonTimeCtarts.legend, this.JsonTimeCtarts.ydatas, this.JsonTimeCtarts.yname)
      this.DrawEXHRealTimeDateChart()
    },
    /**
     * RTDB 格式转换
@@ -591,7 +591,12 @@
    //   return dataArray
    // },
    // 1.坐标轴实现,画实时数据
    DrawEXHRealTimeDateChart (id, title, legend, ydatas, yname) {
    DrawEXHRealTimeDateChart () {
      // var id = this.JsonTimeCtarts.id
      // var title = this.JsonTimeCtarts.title
      var legend = this.JsonTimeCtarts.legend
      var ydatas = this.JsonTimeCtarts.ydatas
      var yname = this.JsonTimeCtarts.yname
      this.RealTimeChart = this.$echarts.init(this.$refs.echarts)
      // this.myChart.clear()
      var serLists = []
@@ -806,7 +811,7 @@
          }
        }, { // 流量轴
          type: 'value',
          name: '流量(m3/h)',
          name: '废气流量(m3/h)',
          axisLabel: {
            formatter: '{value}',
            textStyle: {
@@ -1062,6 +1067,7 @@
      padding: 0;
      border-color:#00fff6;
      text-align: center;
      z-index: 9999;
      //padding-left:20px ;
      //padding: 0!important;
    }