派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-04-14 a69bdb807b6cfaa5caba610ead85c0c9360e6cfb
src/components/BaseNav/PublicBounced/common/echarts/EChartsRealWasteWater.vue
@@ -39,9 +39,8 @@
        </div>
        <div class="detailbtn"  @click="onSubmit">查询</div>
      </div>
      <div class="boxChart" style="height: 260px">
        <div style="width: 100%;height: 100%;" id="popChart" ref="main">
        </div>
      <div class="boxChart">
        <div style="width: 5rem;height: 1.5rem;" id="popChart" ref="main"></div>
      </div>
    </div>
  </div>
@@ -250,16 +249,18 @@
    }
  },
  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.JsonRealWasteWater.id, this.JsonRealWasteWater.title, this.JsonRealWasteWater.legend, this.JsonRealWasteWater.ydatas, this.JsonRealWasteWater.yname)
    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')
    // console.log(this.formInline.timeStart)
    console.log(this.JsonRealWasteWater.ydatas[0].data[0].value[0])
    this.DrawRealTimeDateChart(this.JsonRealWasteWater.id, this.JsonRealWasteWater.title, this.JsonRealWasteWater.legend, this.JsonRealWasteWater.ydatas, this.JsonRealWasteWater.yname)
  },
  methods: {
    onSubmit () {
      this.DrawRealTimeDateChart(this.JsonRealWasteWater.id, this.JsonRealWasteWater.title, this.JsonRealWasteWater.legend, this.JsonRealWasteWater.ydatas, this.JsonRealWasteWater.yname)
    },
    DrawRealTimeDateChart (id, title, legend, ydatas, yname) {
      this.RealTimeChart = this.$echarts.init(this.$refs.echarts)
      this.RealTimeChart = this.$echarts.init(this.$refs.main)
      var serLists = []
      for (var i = 0; i < ydatas.length; i++) {
        // var zdcbcolor = ydatas[i].zdcbcolor
@@ -367,8 +368,8 @@
            label: {
              color: '#1a4245'
            }
          },
          formatter: function (params) {
          }
          /* formatter: function (params) {
            var s = params[0].name + '<br />'
            for (var i = 0; i < params.length; i++) {
              // var name = params[i].name
@@ -402,7 +403,7 @@
              s += maker + seriesName + ':' + valueFliter + '<br />'
            }
            return s
          }
          } */
        },
        toolbox: { // 打印等工具
          show: false,
@@ -413,7 +414,8 @@
        grid: { // 网格
          top: '20%',
          left: '7%',
          bottom: '10%'
          bottom: '10%',
          right: '5%'
        },
        legend: {
          data: legend
@@ -490,7 +492,7 @@
          }
        }, {
          type: 'value',
          name: '流量(m³/h)',
          name: '流量(m³/d)',
          axisLabel: {
            formatter: '{value}',
            textStyle: {