派生自 wuyushui/SewerAndRainNetwork

zhangshuaibao
2021-04-07 7cbc0d0270ac8abb9810f240cc73e46bec679261
src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue
@@ -29,6 +29,7 @@
<script>
import PublicDetailedList from '@components/BaseNav/PublicBounced/GasComponents/PublicDetailedList'
export default {
  name: 'ECharts',
  components: {
@@ -37,13 +38,9 @@
  data () {
    return {
      watchData: [],
      dialogVisible: false
    }
  },
  methods: {
    drawChart: function () {
      const myChart = this.$echarts.init(this.$refs.main)
      const option = {
      dialogVisible: false,
      dataDate: [],
      options: {
        title: {
          // text: '折线图堆叠'
        },
@@ -123,7 +120,7 @@
        xAxis: {
          type: 'category',
          boundaryGap: false,
          data: ['2021.01.01', '2021.01.02', '2021.01.03', '2021.01.04', '2021.01.05', '2021.01.06', '2021.01.07'],
          data: ['周一', '周二', '周三', '周四', '周五', '周六', '周六'],
          axisLabel: { // x轴全部显示
            rotate: 20,
            interval: 0,
@@ -199,13 +196,22 @@
          }
        ]
      }
      myChart.setOption(option)
    }
  },
  methods: {
    drawChart: function () {
      const myChart = this.$echarts.init(this.$refs.main)
      myChart.setOption(this.options)
    }
  },
  mounted () {
    this.drawChart()
    const dataWatch = JSON.parse(JSON.stringify(this.$attrs))
    const dataWatch = JSON.parse(JSON.stringify(this.$attrs.getWasteWaterMonitoring))
    console.log(dataWatch)
    for (var i = 0; i < dataWatch.length; i++) {
      this.dataDate.push(dataWatch[i].MonTimeStr.substring(10, 17))
    }
    console.log(this.dataDate)
  }
}
</script>
@@ -214,6 +220,7 @@
    .Infomation{
        margin-left: 10px;
    }
    .el-tag{
        height: 25px;
        line-height: 25px;
@@ -224,6 +231,7 @@
        border: none;
        padding: 0 15px;
    }
    .form-echrts{
      width: 100%;
      height: 100%;
@@ -234,6 +242,7 @@
        overflow: auto;
        //overflow: hidden;
      }
      #echarts {
        margin: 0;
        padding: 0;