派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-04-07 17a9663a92425787bf2c0f1e8f5360d4e8dbf3f9
src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue
@@ -6,19 +6,41 @@
            <el-tag>烟尘 : 6.93 标准 : 30</el-tag>
            <el-tag>废气流量 : 120343.18</el-tag>
        </div>
        <div style="width:750px;height:260px;" id="echarts" ref="main"></div>
      <div class="form-echrts">
        <div>
          <el-button size="mini" round @click="dialogVisible = true">明细表</el-button>
          <el-dialog  :visible.sync="dialogVisible"
                      :append-to-body="true"
                      :title="this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName"
                      width="68%"
                      center
                      v-dialogDrag
                      >
            <div class="el-dialog-div" style="height: 500px">
              <public-detailed-list v-bind="$attrs"></public-detailed-list>
            </div>
          </el-dialog>
        </div>
        <div style="width:750px;height:260px;" id="echarts" ref="main">
        </div>
      </div>
    </div>
</template>
<script>
import PublicDetailedList from '@components/BaseNav/PublicBounced/GasComponents/PublicDetailedList'
export default {
  name: 'ECharts',
  methods: {
    drawChart: function () {
      const myChart = this.$echarts.init(this.$refs.main)
      const option = {
  components: {
    PublicDetailedList
  },
  data () {
    return {
      watchData: [],
      dialogVisible: false,
      options: {
        title: {
          // text: '折线图堆叠'
        // text: '折线图堆叠'
        },
        color: ['#5470c6', '#91CC75', '#EE6666', '#FF0087'],
        tooltip: {
@@ -57,9 +79,9 @@
              color: '#00d0f9'
            }
          }]
          // pageTextStyle: {
          //   color: '#fff'
          // }
        // pageTextStyle: {
        //   color: '#fff'
        // }
        },
        grid: {
          left: '3%',
@@ -172,11 +194,19 @@
          }
        ]
      }
      myChart.setOption(option)
    }
  },
  methods: {
    drawChart: function () {
      const myChart = this.$echarts.init(this.$refs.main)
      // const option = {}
      myChart.setOption(this.options)
    }
  },
  mounted () {
    this.drawChart()
    const dataWatch = JSON.parse(JSON.stringify(this.$attrs))
    console.log(dataWatch)
  }
}
</script>
@@ -193,11 +223,23 @@
        background-color: rgba(0, 255, 246, 0.14);
        color: #00d0f9;
        border: none;
        padding: 0 15px;
    }
  #echarts{
    margin: 0;
    padding: 0;
    border: 1px solid #396d83;
    margin: 10px 10px 10px 10px;
    .form-echrts{
      width: 100%;
      height: 100%;
      border: 1px solid #396d83;
      //margin: 10px 10px 10px 10px;
      .el-dialog-div{
        //height: 50vh!important;
        overflow: auto;
        //overflow: hidden;
      }
      #echarts {
        margin: 0;
        padding: 0;
        //border: 1px solid #396d83;
        //margin: 10px 10px 10px 10px;
    }
  }
</style>