派生自 wuyushui/SewerAndRainNetwork

zhangshuaibao
2021-04-14 b4946988c1cdcb33f0d3c27154f61aec512b5aca
图标信息
4个文件已修改
203 ■■■■■ 已修改文件
src/components/BaseNav/PublicBounced/common/PublicChart.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/common/echarts/EChartsDateWasteWater.vue 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/common/echarts/EChartsHourWasteWater.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/common/echarts/EChartsRealWasteWater.vue 102 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/common/PublicChart.vue
@@ -29,15 +29,15 @@
</template>
<script>
import ECharts from './Echarts'
import EChartsHour from './EChartsHour'
import EChartsDate from './EChartsDate'
import EChartsTable from './EChartsTable'
import ECharts from './echarts/Echarts'
import EChartsHour from './echarts/EChartsHour'
import EChartsDate from './echarts/EChartsDate'
import EChartsTable from './echarts/EChartsTable'
import EChartsRealWasteWater from './EChartsRealWasteWater'
import EChartsHourWasteWater from './EChartsHourWasteWater'
import EChartsDateWasteWater from './EChartsDateWasteWater'
import EChartsWasteWaterTable from './EChartsWasteWaterTable'
import EChartsRealWasteWater from './echarts/EChartsRealWasteWater'
import EChartsHourWasteWater from './echarts/EChartsHourWasteWater'
import EChartsDateWasteWater from './echarts/EChartsDateWasteWater'
import EChartsWasteWaterTable from './echarts/EChartsWasteWaterTable'
export default {
  name: 'PublicChart',
@@ -53,10 +53,11 @@
  },
  mounted () {
    this.$refs.Echatrs.CreateChart()
    this.$refs.Echatrs.effChartShow()
  },
  data () {
    return {
      currentTab: 'EChartsHour',
      currentTab: this.current(),
      active: '1'
    }
  },
@@ -65,6 +66,14 @@
      this.currentTab = taggleMenu
      this.active = num
      // debugger
    },
    current (currentTab) {
      if (this.$attrs.value === 'feishui') {
        currentTab = 'EChartsHourWasteWater'
      } else {
        currentTab = 'EChartsHour'
      }
      return currentTab
    }
  }
}
src/components/BaseNav/PublicBounced/common/echarts/EChartsDateWasteWater.vue
@@ -3,8 +3,9 @@
  <div id="Tab">
    <div class="animation">
      <div class="infomation">
        <span class="grid-content">COD :<i style="color: #e8ee0b">8.115</i>  标准 : 20</span>
        <span class="grid-content">氨氮 : <i style="color: #e8ee0b">0.31</i> 标准 : 5</span>
        <span class="grid-content">COD :<i style="color: #e8ee0b">8.115</i>  标准 : <i style="color: #fff">20</i></span>
        <span class="grid-content">氨氮 : <i style="color: #e8ee0b">0.31</i> 标准 : <i style="color: #fff">5</i></span>
        <span class="grid-content">pH : <i style="color: #e8ee0b">7.673</i> 标准 : <i style="color: #fff">9</i></span>
        <span class="grid-content">废水流量 : <i style="color: #e8ee0b">5191.693848</i></span>
      </div>
    </div>
@@ -60,7 +61,7 @@
</template>
<script>
import PublicDetailedList from '@components/BaseNav/PublicBounced/GasComponents/PublicDetailedList'
import PublicDetailedList from '@components/BaseNav/PublicBounced/common/echarts/PublicDetailedList'
export default {
  name: 'EChartsDateWasteWater',
@@ -87,44 +88,58 @@
          {
            name: 'COD',
            icon: 'image://../assets/imgs/legend/SO2.png',
            textStyle: { color: '#ccc' },
            textStyle: { color: '#CCC' },
            itemWidth: 20,
            itemHeight: 5
          },
          {
            name: '氨氮',
            icon: 'image://../assets/imgs/legend/NOX.png',
            textStyle: { color: '#ccc' },
            textStyle: { color: '#CCC' },
            itemWidth: 20,
            itemHeight: 5
          },
          {
            name: 'pH',
            icon: 'image://../assets/imgs/legend/WenDu.png',
            textStyle: { color: '#CCC' },
            itemWidth: 20,
            itemHeight: 5
          },
          {
            name: '废水流量',
            icon: 'image://../assets/imgs/legend/VOCs.png',
            textStyle: { color: '#ccc' },
            textStyle: { color: '#CCC' },
            itemWidth: 20,
            itemHeight: 5
          }
        ],
        xdata: ['14日', '15日', '16日', '17日', '18日', '19日', '20日', '21日', '22日', '23日', '24日', '25日', '26日', '27日', '28日', '29日', '30日', '31日', '1 日', '2 日', '3 日', '4 日', '5 日', '6 日', '7 日', '8 日', '9 日', '10日', '11日', '12日'],
        xdata: ['15日', '16日', '17日', '18日', '19日', '20日', '21日', '22日', '23日', '24日', '25日', '26日', '27日', '28日', '29日', '30日', '31日', '1 日', '2 日', '3 日', '4 日', '5 日', '6 日', '7 日', '8 日', '9 日', '10日', '11日', '12日', '13日'],
        ydatas: [
          {
            name: 'COD',
            data: [11.626, 11.263, 13.186, 16.041, 20.021, 11.285, 19.546, 15.592, 16.603001, 23.582001, 23.325001, 21.077999, 20.959999, 18.955, 18.676001, 19.322001, 11.976, 11.92, 8.247, 6.38, 6.559, 10.25, 8.354, 7.562, 7.442, 7.543, 7.268, 6.255, 5.735, 8.115],
            data: [18.271, 18.806, 18.615, 20.938, 18.933001, 18.789, 17.612, 17.319, 18.403999, 17.724001, 17.450001, 17.299, 17.906, 17.761, 16.913, 17.087, 16.094, 13.851, 15.783, 15.785, 15.503, 17.163, 15.008, 12.056, 14.812, 15.243, 15.562, 13.034, 11.11, 10.746],
            zdcbcolor: 'red',
            zxcolor: '#fff21c',
            bzz: 80
          },
          {
            name: '氨氮',
            data: [0.224, 3.283, 1.715, 0.831, 4.168, 2.197, 0.451, 0.342, 0.601, 2.669, 1.503, 0.595, 0.649, 0.74, 0.631, 0.432, 0.488, 1.817, 0.579, 2.748, 0.527, 1.01, 0.441, 0.459, 0.582, 0.578, 0.575, 0.295, 0.297, 0.31],
            zdcbcolor: 'red',
            zxcolor: '#00B0F0',
            bzz: 25
          },
          {
            name: '氨氮',
            data: [0.1, 0.169, 0.125, 0.266, 0.126, 0.156, 0.174, 0.161, 0.224, 0.178, 0.166, 0.152, 0.146, 0.138, 0.125, 0.171, 0.145, 0.147, 0.123, 0.117, 0.109, 0.106, 0.159, 0.121, 0.133, 0.181, 0.208, 0.115, 0.108, 0.162],
            zdcbcolor: 'red',
            zxcolor: '#00B0F0',
            bzz: 5
          },
          {
            name: 'pH',
            data: [7.461, 7.486, 7.495, 7.498, 7.512, 7.526, 7.535, 7.555, 7.585, 7.585, 7.512, 7.365, 7.334, 7.349, 7.367, 7.397, 7.399, 7.384, 7.424, 7.466, 7.496, 7.527, 7.599, 7.612, 7.613, 7.614, 7.618, 7.644, 7.661, 7.673],
            zdcbcolor: 'red',
            zxcolor: '#F206FF',
            bzz: 9
          },
          {
            name: '废水流量',
            data: [5697.10791, 5623.143066, 5177.564941, 5162.195801, 4633.836914, 4198.133789, 4286.970215, 4162.566895, 2561.10791, 1808.824951, 2961.506104, 2758.715088, 3373.334961, 3282.522949, 3817.322998, 3382.928955, 4747.026855, 2645.947021, 3539.041992, 2540.4729, 4657.589844, 3618.812988, 5725.787109, 6082.206055, 6345.832031, 6470.28418, 5611.5, 5599.958984, 4924.814941, 5191.693848],
            data: [49.395836, 49.337986, 48.906597, 51.755833, 48.786461, 48.124866, 47.832222, 70.607361, 77.931816, 63.092083, 70.620911, 63.302162, 66.679314, 66.482918, 81.546745, 95.860214, 87.731102, 53.503544, 63.230419, 70.389374, 63.531391, 63.028618, 63.168613, 63.55653, 63.631458, 51.364937, 28.757296, 31.669098, 26.574379, 30.628475],
            zdcbcolor: 'red',
            zxcolor: '#9ACD32',
            bzz: null
src/components/BaseNav/PublicBounced/common/echarts/EChartsHourWasteWater.vue
@@ -3,8 +3,9 @@
    <div id="Tab">
        <div class="infomation">
          <div>
            <span class="grid-content">COD : <i style="color: #e8ee0b">6.039</i>  标准 : 10</span>
            <span class="grid-content">氨氮 : <i style="color: #e8ee0b">0.38</i> 标准 : 5</span>
            <span class="grid-content">COD : <i style="color: #e8ee0b">6.039</i>  标准 : <i style="color: #fff">12</i></span>
            <span class="grid-content">氨氮 : <i style="color: #e8ee0b">0.38</i> 标准 : <i style="color: #fff">5</i></span>
              <span class="grid-content">pH : <i style="color: #e8ee0b">7.674</i> 标准 : <i style="color: #fff">9</i></span>
            <span class="grid-content">废水流量 : <i style="color: #e8ee0b">254.643997</i></span>
          </div>
        </div>
@@ -84,7 +85,6 @@
      JsonHourWater: {
        id: 'mycharteff',
        title: '',
        datatype: 2,
        jcdID: '1020',
        legend: [
          {
@@ -106,6 +106,15 @@
            }
          },
          {
            icon: 'image://../assets/imgs/legend/WenDu.png',
            itemHeight: 5,
            itemWidth: 20,
            name: 'pH',
            testStyle: {
              color: '#ccc'
            }
          },
          {
            icon: 'image://../assets/imgs/legend/VOCs.png',
            itemHeight: 5,
            itemWidth: 20,
@@ -115,13 +124,15 @@
            }
          }
        ],
        xdata: ['17时', '18时', '19时', '20时', '21时', '22时', '23时', '0时', '1时', '2时', '3时', '4时', '5时', '6时', '7时', '8时', '9时', '10时', '11时', '12时', '13时', '14时', '15时', '16时'],
        xdata: ['10时', '11时', '12时', '13时', '14时', '15时', '16时', '17时', '18时', '19时', '20时', '21时', '22时', '23时', '0时', '1时', '2时', '3时', '4时', '5时', '6时', '7时', '8时', '9时'],
        ydatas: [
          { name: 'COD', data: [5.602, 5.617, 5.612, 5.647, 5.652, 5.673, 5.665, 5.702, 5.69, 5.722, 5.729, 5.755, 5.754, 5.784, 8.593, 12.826, 11.125, 8.582, 8.047, 7.325, 6.452, 5.175, 5.522, 6.039], zdcbcolor: 'red', zxcolor: '#fff21c', bzz: 80 },
          { name: '氨氮', data: [0.196, 0.184, 0.189, 0.193, 0.199, 0.201, 0.21, 0.211, 0.214, 0.213, 0.214, 0.214, 0.214, 0.214, 0.214, 0.214, 0.213, 0.195, 0.183, 0.183, 0.183, 0.204, 0.223, 0.38], zdcbcolor: 'red', zxcolor: '#00B0F0', bzz: 25 },
          { name: '废水流量', data: [226.766998, 223.709, 104.838997, 259.417999, 292.963989, 282.291992, 293.272003, 182.985992, 174.287003, 175.011993, 174.307007, 187.044998, 252.026001, 250.365005, 155.317993, 164.723007, 243.785995, 135.520996, 98.18, 185.481995, 226.473999, 215.171005, 250.393005, 254.643997], zdcbcolor: 'red', zxcolor: '#9ACD32', bzz: null }
          { name: 'COD', data: [11.197, 11.5, 11.33, 11.2, 11.54, 11.8, 11.195, 10.7, 10.645, 10.6, 10.875, 11.1, 10.715, 10.4, 10.95, 11.4, 11.193, 11, 11.267, 11.5, 10.725, 10, 10.8, 11.5], zdcbcolor: 'red', zxcolor: '#fff21c', bzz: 12 },
          { name: '氨氮', data: [0.186, 0.179, 0.165, 0.159, 0.149, 0.146, 0.141, 0.136, 0.128, 0.13, 0.133, 0.133, 0.134, 0.13, 0.122, 0.124, 0.128, 0.139, 0.16, 0.147, 0.123, 0.127, 0.134, 0.128], zdcbcolor: 'red', zxcolor: '#00B0F0', bzz: 5 },
          { name: '废水流量', data: [35.15667, 35.445004, 32.91, 31.478336, 33.038334, 33.46167, 33.348335, 33.515003, 33.735001, 31.503336, 31.411667, 32.880001, 33.100002, 31.870001, 30.841667, 31.873335, 32.658333, 32.178337, 30.656668, 30.65667, 32.241669, 32.521667, 31.225002, 30.476669], zdcbcolor: 'red', zxcolor: '#9ACD32', bzz: null },
          { name: 'pH', data: [7.666, 7.669, 7.67, 7.672, 7.677, 7.682, 7.685, 7.688, 7.689, 7.689, 7.688, 7.689, 7.69, 7.69, 7.69, 7.69, 7.691, 7.69, 7.685, 7.681, 7.681, 7.678, 7.674, 7.674], zdcbcolor: 'red', zxcolor: '#F206FF', bzz: 9 }
        ],
        yname: '浓度(mg/l)'
        yname: '浓度(mg/l)',
        datatype: 2
      }
    }
  },
src/components/BaseNav/PublicBounced/common/echarts/EChartsRealWasteWater.vue
@@ -3,9 +3,9 @@
  <div id="Tab">
    <div class="animation">
      <div class="infomation">
        <span class="grid-content">COD : <i style="color: #e8ee0b">11.24385</i> 标准 : 50</span>
        <span class="grid-content">氮氧 :<i style="color: #e8ee0b">0.1889014</i>  标准 : 30</span>
        <span class="grid-content">总磷 : <i style="color: #e8ee0b">0.03812287</i> 标准 : 5</span>
        <span class="grid-content">COD : <i style="color: #e8ee0b">11.24385</i> 标准 : <i style="color: #fff">50</i>></span>
        <span class="grid-content">氮氧 :<i style="color: #e8ee0b">0.1889014</i>  标准 : <i style="color: #fff">30</i></span>
        <span class="grid-content">总磷 : <i style="color: #e8ee0b">0.03812287</i> 标准 : <i style="color: #fff">5</i></span>
        <span class="grid-content">废水流量 : <i style="color: #e8ee0b">32.16287</i></span>
      </div>
    </div>
@@ -250,14 +250,16 @@
    }
  },
  mounted () {
    this.DrawRealTimeDateChart(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')
    // this.DrawEXHRealTimeDateChart(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.main)
      this.RealTimeChart = this.$echarts.init(this.$refs.echarts)
      var serLists = []
      for (var i = 0; i < ydatas.length; i++) {
        // var zdcbcolor = ydatas[i].zdcbcolor
@@ -272,20 +274,20 @@
            itemStyle: {
              normal: {
                color: function (c) { // 根据value 显示不同的折点颜色
                  /* var biaozhuiz
                  for (var i = 0; i < bzzList.length; i++) {
                    if (bzzList[i].name == c.seriesName) {
                      biaozhuiz = bzzList[i].bzhui
                    }
                  }
                  if (c.value[1] > biaozhuiz) {
                    return zdcbcolor
                  } else if (c.value[1] > biaozhuiz * 0.9) {
                    return '#FFA500'
                  }
                  {
                    return '#33c95f'
                  } */
                  // var biaozhuiz
                  // for (var i = 0; i < bzzList.length; i++) {
                  //   if (bzzList[i].name == c.seriesName) {
                  //     biaozhuiz = bzzList[i].bzhui
                  //   }
                  // }
                  // if (c.value[1] > biaozhuiz) {
                  //   return zdcbcolor
                  // } else if (c.value[1] > biaozhuiz * 0.9) {
                  //   return '#FFA500'
                  // }
                  // {
                  //   return '#33c95f'
                  // }
                },
                lineStyle: { // 折线的颜色
                  color: ydatas[i].zxcolor,
@@ -348,7 +350,7 @@
          }
        }
        if (ydatas[i].name === '废水流量' || ydatas[i].name === '废水') {
        if (ydatas[i].name === '废气流量' || ydatas[i].name === '废气') {
          obj.yAxisIndex = 1
        }
        serLists.push(obj)
@@ -374,19 +376,29 @@
              var seriesName = params[i].seriesName
              // 值
              var value = params[i].value[1]
              var valueFliter = this.formatter(value)
              var valueFliter = formatter(value)
              var maker = params[i].marker
              if (seriesName === 'COD') {
                maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#fff21c;"></span>'
              } else if (seriesName === '氨氮') {
                maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#00B0F0;"></span>'
              } else if (seriesName === '总磷') {
                maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#f48183;"></span>'
              } else if (seriesName === '总氮') {
                maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#d9f2f4;"></span>'
              } else {
                maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#9ACD32;"></span>'
              var colo = ''
              switch (seriesName) {
                case 'COD':
                  colo = '#fff21c'
                  break
                case '氨氮':
                  colo = '#00B0F0'
                  break
                case '总磷':
                  colo = '#f48183'
                  break
                case '总氮':
                  colo = '#e0ffff'
                  break
                default:
                  colo = '#9ACD32'
                  break
              }
              maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + colo + ';"></span>'
              s += maker + seriesName + ':' + valueFliter + '<br />'
            }
            return s
@@ -399,7 +411,9 @@
          }
        },
        grid: { // 网格
          top: '20%'
          top: '20%',
          left: '7%',
          bottom: '10%'
        },
        legend: {
          data: legend
@@ -425,9 +439,6 @@
        xAxis: { // x 轴设置
          type: 'time',
          boundaryGap: false,
          nameTextStyle: {
            fontSize: 15
          },
          axisLabel: { // x轴全部显示
            // rotate: 30,
            margin: 6,
@@ -457,8 +468,7 @@
          type: 'value',
          name: yname,
          max: function (value) {
            var ma = value.max > 100 ? value.max : 100
            return parseInt(ma)
            return parseInt(value.max + 30)
          },
          axisLabel: {
            formatter: '{value}',
@@ -493,6 +503,9 @@
          splitLine: {
            show: false
          }, // y轴 网格线不显示,
          // inverse: true,
          // nameLocation: 'start',
          // max:500,
          axisLine: {
            lineStyle: {
              color: '#FFFFFF',
@@ -578,20 +591,7 @@
          }
        }
        RealTimeChart.setOption(op)
      })
    },
    drawChart: function () {
      window.onresize = function () {
        var h1 = document.documentElement.clientHeight// 获取屏幕的高度
        if (h1 > 700) {
          this.myChart.getDom().style.height = 3 + 'rem'
          this.myChart.getDom().style.width = 6 + 'rem'
        } else {
          this.myChart.getDom().style.height = 3 + 'rem'
          this.myChart.getDom().style.width = 6 + 'rem'
        }
        this.myChart.resize()
      } */
      }) */
    }
  }
}