派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-04-15 b2297d33284aac7570a8294ce51096e9f8814cfc
固废废水废气弹框问题修改
2 文件已重命名
14个文件已添加
3个文件已修改
1个文件已删除
6207 ■■■■■ 已修改文件
src/components/BaseNav/WasteGas/DayData.vue 771 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteGas/Detail.vue 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteGas/HourData.vue 623 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteGas/Index.vue 160 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteGas/PublicTabs.vue 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteGas/PublicVideo.vue 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteGas/RealTimeEcharts.vue 1116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteSolid/PublicTabs.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteSolid/SolidWaste.js 180 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteSolid/WasteSolidIndex.vue 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteWater/DayData.vue 712 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteWater/Detail.vue 311 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteWater/HourData.vue 699 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteWater/PublicTabs.vue 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteWater/PublicVideo.vue 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteWater/RealTimeEcharts.vue 942 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/logic/WasteSolid.js 补丁 | 查看 | 原始文档 | blame | 历史
src/components/table/components/WasteSolid.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/table/components/tabHandover.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/Constants.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/WasteGas/DayData.vue
New file
@@ -0,0 +1,771 @@
<!--  日数据  -->
<template>
  <div id="Tab">
    <div class="animation">
      <div class="infomation">
        <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>
      </div>
    </div>
    <div class="form-echrts">
      <div class="from-search">
        <div class="pickerMon">
          <div class="pickerData">
            <span> 开始时间:</span>
            <span class="pickerTable">
              <el-date-picker  type="datetime"   v-model="formInline.timeStart"></el-date-picker>
            </span>
          </div>
          <div class="pickerData">
            <span >结束时间:</span>
            <span class="pickerTable">
              <el-date-picker type="datetime"  v-model="formInline.timeEnd"></el-date-picker>
            </span>
          </div>
        </div>
<!--        <div>-->
<!--          采样点数:-->
<!--          <el-select v-model="formInline.region" placeholder="50">-->
<!--            <el-option label="0" value="0"></el-option>-->
<!--            <el-option label="25" value="25"></el-option>-->
<!--            <el-option label="50" value="50"></el-option>-->
<!--            <el-option label="75" value="75"></el-option>-->
<!--            <el-option label="100" value="100"></el-option>-->
<!--          </el-select>-->
<!--        </div>-->
        <div class="detailbtn hover-bottom"  @click="onSubmit">查询</div>
        <div class="detailbtn hover-bottom" @click="dialogVisible = true" >明细表</div>
      </div>
      <div style="width:5rem;height:1.5rem;" id="echarts" ref="main">
      </div>
    </div>
    <!-- 明细弹框 -->
    <el-dialog :visible.sync="dialogVisible"
               :append-to-body="true"
               :title="this.$attrs.value==='feiqi'?this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName:this.$attrs.getWasteWaterMonitoringDetails[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>
</template>
<script>
import PublicDetailedList from '@components/BaseNav/PublicBounced/common/echarts/PublicDetailedList'
import dayjs from 'dayjs'
export default {
  name: 'DayData',
  components: {
    PublicDetailedList
  },
  data () {
    return {
      watchData: [],
      dialogVisible: false,
      myChar: null,
      value: '',
      formInline: {
        region: '',
        timeStart: '',
        timeEnd: ''
      },
      info: this.series,
      JsonDayCharts: {
        id: 'mychartsDay',
        title: '加热炉烟气',
        legend: [
          {
            icon: 'image://../assets/imgs/legend/NOX.png',
            itemHeight: 5,
            itemWidth: 20,
            textStyle: {
              color: '#CCC'
            },
            name: '氮氧化物'
          },
          {
            icon: 'image://../assets/imgs/legend/SO2.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '二氧化硫',
            textStyle: {
              color: '#CCC'
            }
          },
          {
            icon: 'image://../assets/imgs/legend/YanChen.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '烟尘',
            textStyle: { color: '#ccc' }
          },
          {
            icon: 'image://../assets/imgs/legend/WenDu.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '温度',
            textStyle: { color: '#ccc' }
          },
          {
            icon: 'image://../assets/imgs/legend/VOCs.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '废气流量',
            textStyle: { color: '#ccc' }
          }
        ],
        xdata: ['1日', '2日', '3日', '4日', '5日', '6日', '7日', '8日', '9日', '10日', '11日', '12日', '13日', '14日', '15日', '16日', '17日', '18日', '19日', '20日', '21日', '22日', '23日', '24日', '25日', '26日', '27日', '28日', '29日', '30日', '31日'],
        ydatas: [
          { name: '氮氧化物', data: ['40.01', '44.38', '44.71', '40.43', '42.79', '46.00', '52.66', '48.75', '45.75', '49.24', '54.22', '52.25', '53.34', '65.72', '60.01', '54.20', '48.37', '45.56', '42.58', '40.96', '45.14', '49.31', '54.21', '57.89', '51.18', '60.21', '57.76', '60.33', '48.34', '45.66', '53.38'], zdcbcolor: 'red', zxcolor: '#00B0F0', bzz: 100 },
          { name: '二氧化硫', data: ['9.22', '8.07', '8.69', '9.16', '6.25', '5.78', '15.91', '3232992.75', '11.34', '13.63', '14.13', '11.47', '8.48', '9.46', '7.85', '5.91', '4.64', '4.77', '6.99', '5.82', '5.59', '5.30', '6.62', '9.00', '13.35', '2.68', '1.89', '0.70', '3.68', '6.25', '5.14'], zdcbcolor: 'red', zxcolor: '#fff21c', bzz: 50 },
          {
            name: '废气流量',
            data: ['2827518.25', '2763525.75', '2776435.50', '2742003.50', '2856001.75', '2890287.00', '2832898.25', '2803715.50', '2513925.75', '2753303.50', '2749836.00', '2786188.50', '2738838.00', '2733660.25', '2815521.25', '2830217.25', '2798918.00', '2803543.50', '2770175.25', '2823321.25', '2856329.25', '2801588.00', '2798103.50', '2766343.00', '2750489.50', '2697786.25', '2796775.50', '2808028.50', '2813561.75', '2757129.25', '2720755.50'],
            zdcbcolor: 'red',
            zxcolor: '#9ACD32',
            bzz: null
          },
          { name: '烟尘', data: ['3.88', '3.48', '3.85', '3.99', '3.99', '4.48', '3.96', '3.36', '2.79', '4.65', '4.70', '5.08', '4.55', '4.90', '4.43', '3.10', '2.64', '2.84', '2.63', '2.69', '2.56', '2.32', '2.51', '3.29', '3.40', '3.06', '2.94', '2.90', '2.80', '3.07', '4.55'], zdcbcolor: 'red', zxcolor: '#f48183', bzz: 30 }
        ],
        yname: ' 浓度(mg/m³)',
        // id:'mychartDay',
        datatype: 1
      }
    }
  },
  mounted () {
    this.formInline.timeEnd = dayjs().format('YYYY-MM-DD HH:mm:ss')
    this.formInline.timeStart = dayjs().subtract(1, 'month').format('YYYY-MM-DD HH:mm:ss')
    this.onSubmit()
    // this.CreateChart(this.JsonDayCharts.id, this.JsonDayCharts.title, this.JsonDayCharts.legend, this.JsonDayCharts.xdata, this.JsonDayCharts.ydatas, this.JsonDayCharts.yname, this.JsonDayCharts.id, this.JsonDayCharts.datatype)
  },
  updated () {
    this.onSubmit()
  },
  methods: {
    onSubmit () {
      console.log('submit!')
      this.CreateCharts(this.JsonDayCharts.id, this.JsonDayCharts.title, this.JsonDayCharts.legend, this.JsonDayCharts.xdata, this.JsonDayCharts.ydatas, this.JsonDayCharts.yname, this.JsonDayCharts.id, this.JsonDayCharts.datatype)
    },
    CreateCharts: function (id, title, legend, xdata, ydatas, yname, jcdID, datatype) {
      this.mychartDay = this.$echarts.init(this.$refs.main)
      this.mychartDay.clear()
      var dataUnit = ''
      if (datatype === 1) {
        dataUnit = '废气气量(m³/d)'
      } else {
        dataUnit = '废气气量(m³/h)'
      }
      var serLists = []
      for (var j = 0; j < ydatas.length; j++) {
        var len = ydatas[j].data.length
        for (var k = 0; k < len; k++) {
          var it = ydatas[j].data[k]
          var it2 = parseFloat(it).toFixed(2)
          ydatas[j].data[k] = it2
        }
      }
      for (var i = 0; i < ydatas.length; i++) {
        // var zdcbcolor = ydatas[i].zdcbcolor
        var bzz = ydatas[i].bzz
        var obj
        if (bzz == null) {
          obj = {
            name: ydatas[i].name,
            symbol: 'circle', // 折点形状
            symbolSize: 10, // 大小
            smooth: false, // 直线 ,true 为曲线
            yAxisIndex: 1,
            itemStyle: {
              normal: {
                color: function (c) { // 根据value 显示不同的折点颜色
                //   var biaozhuiz
                //   for (var i = 0; i < exhbzzList.length; i++) {
                //     if (exhbzzList[i].name == c.seriesName) {
                //       biaozhuiz = exhbzzList[i].bzhui
                //     }
                //   }
                //   if (c.value > 999999999999) {
                //     return zdcbcolor
                //   } else {
                //     return '#33c95f'
                //   }
                },
                lineStyle: { // 折线的颜色
                  color: ydatas[i].zxcolor,
                  width: 5
                },
                borderColor: ydatas[i].zxcolor, // 折点边框的颜色
                label: { // 显示值
                  show: false
                }
              }
            },
            type: 'line',
            data: ydatas[i].data
          }
        } else {
          obj = {
            name: ydatas[i].name,
            symbol: 'circle', // 折点形状
            symbolSize: 10, // 大小
            smooth: false, // 直线 ,true 为曲线
            itemStyle: {
              normal: {
                color: function (c) { // 根据value 显示不同的折点颜色
                //   var biaozhuiz
                //   for (var i = 0; i < exhbzzList.length; i++) {
                //     if (exhbzzList[i].name == c.seriesName) {
                //       biaozhuiz = exhbzzList[i].bzhui
                //     }
                //   }
                //   if (c.value > biaozhuiz) {
                //     return zdcbcolor
                //   } else if (c.value > biaozhuiz * 0.9) {
                //     return '#FFA500'
                //   } else {
                //     return '#33c95f'
                //   }
                },
                lineStyle: { // 折线的颜色
                  color: ydatas[i].zxcolor,
                  width: 5
                },
                borderColor: ydatas[i].zxcolor, // 折点边框的颜色
                label: { // 显示值
                  show: false
                }
              }
            },
            type: 'line',
            data: ydatas[i].data,
            markLine: { // 平均值 , 和 指标上限
              symbol: 'none',
              data: [
                /* {
                 type: 'average',
                 name: '日平均值',
                 label: {
                     normal: {
                         position: 'end',  //显示位置
                         formatter:  ydatas[i].name+'\n日平均值'+'{c}' //显示样式
                     }
                 },
                 lineStyle:{   // 颜色
                     color: 'yellow',
                     type:'solid'
                 }
             }, */ {
                  label: {
                    normal: {
                      position: 'end',
                      formatter: '' // ydatas[i].name+'标准值'//+'{c}'
                    }
                  },
                  name: '标准值',
                  yAxis: bzz,
                  lineStyle: {
                    color: ydatas[i].zxcolor,
                    type: 'dashed',
                    width: 2
                  }
                }
              ]
            }
          }
        }
        serLists.push(obj)
      }
      var option = {
        tooltip: { // 提示框
          trigger: 'axis',
          axisPointer: {
            type: 'cross',
            label: {
              color: '#1a4245'
            }
          },
          formatter: function (params) {
            var s = params[0].name + '<br/>'
            for (var i = 0; i < params.length; i++) {
              // const name = params[i].name
              // 图表title名称
              var seriesName = params[i].seriesName
              // 值
              var value = params[i].value
              // var valueFliter
              // if (value === 'NaN') {
              //   valueFliter = ''
              // } else {
              //   valueFliter = this.formatter(value)
              // }
              var maker = params[i].marker
              if (seriesName === '二氧化硫') {
                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:#F206FF;"></span>'
              } else {
                maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#4ec99c;"></span>'
              }
              s += maker + seriesName + ':' + value + '<br />'
            }
            return s
          }
        },
        toolbox: { // 打印等工具
          show: false,
          feature: {
            saveAsImage: {}
          }
        },
        grid: { // 网格
          top: '20%',
          left: '12%',
          bottom: '15%'
          // containLabel: true
        },
        legend: { // 图例
          data: legend
        },
        dataZoom: [{
          type: 'inside',
          start: 0,
          end: 100
        }, {
          start: 0,
          end: 100,
          show: false,
          handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
          handleSize: '80%',
          handleStyle: {
            color: '#fff',
            shadowBlur: 3,
            shadowColor: 'rgba(0, 0, 0, 0.6)',
            shadowOffsetX: 2,
            shadowOffsetY: 2
          }
        }],
        xAxis: { // x 轴设置
          type: 'category',
          boundaryGap: false,
          axisLabel: { // x轴全部显示
            rotate: 20,
            interval: 0,
            textStyle: {
              color: '#fff'
            }
          },
          splitLine: { // 网格垂直线为 虚线
            show: true,
            lineStyle: {
              type: 'dashed'
            }
          },
          axisTick: { // x 轴刻度显示
            show: false
          },
          axisLine: {
            lineStyle: {
              color: '#FFFFFF',
              width: 1// 这里是为了突出显示加上的
            }
          },
          data: xdata
        },
        yAxis: [{
          type: 'value',
          name: yname,
          // max: function (value) {
          //   var max_val_list = [] // 所有显示折线的标准值
          //   if (exhbzzList && exhbzzList.length > 0) {
          //     if (value.max != '-Infinity') { // 获取所有监测指标的max值 2020/12/31
          //       valMax = parseInt(value.max + 5)
          //     }
          //     $.each(exhbzzList, function (index, item) {
          //       if (item.bzhui != null) {
          //         max_val_list.push(item.bzhui)
          //       }
          //     })
          //   }
          //   max_val_list = max_val_list.sort(function (a, b) { return a - b }) // 排序
          //   var ma = value.max > max_val_list[max_val_list.length - 1] ? value.max + 5 : max_val_list[max_val_list.length - 1]
          //   return parseInt(ma)
          // },
          axisLabel: {
            formatter: '{value}',
            textStyle: {
              color: '#fff'
            }
          },
          axisPointer: {
            snap: true
          },
          splitLine: {
            show: false
          }, // y轴 网格线不显示,
          axisLine: {
            lineStyle: {
              color: '#FFFFFF',
              width: 1// 这里是为了突出显示加上的
            }
          }
        }, {
          type: 'value',
          name: dataUnit,
          max: function (value) {
            var ma = value.max > 120 ? value.max : 120
            return parseInt(ma)
          },
          axisLabel: {
            formatter: '{value}',
            textStyle: {
              color: '#fff'
            }
          },
          axisPointer: {
            snap: true
          },
          splitLine: {
            show: false
          }, // y轴 网格线不显示,
          axisLine: {
            lineStyle: {
              color: '#FFFFFF',
              width: 1// 这里是为了突出显示加上的
            }
          }
        }],
        series: serLists
      }
      this.mychartDay.setOption(option)
      // this.mychartDay.on('legendselectchanged', function (params) {
      //   var StdVal = null
      //   var op = { yAxis: {} }
      //   var max_val_list = [] // 所有显示折线的标准值
      //   if (exhbzzList && exhbzzList.length > 0) {
      //     max_val_list.push(valMax) // 将监测指标的max值也放入数组 2020/12/31
      //     $.each(exhbzzList, function (index, item) {
      //       params.selected[item.name] ? max_val_list.push(item.bzhui) : ''
      //       if (item.name == params.name) {
      //         item.name == 'VOCs' ? StdVal = 20 : StdVal = item.bzhui
      //       }
      //     })
      //   }
      //   max_val_list = max_val_list.sort(function (a, b) { return a - b }) // 排序
      //   op.yAxis.max = function (value) {
      //     var ma = value.max < StdVal ? StdVal : Math.ceil(value.max)
      //     max_val_list ? ma = max_val_list[max_val_list.length - 1] : ''// 选择最大值
      //     return ma
      //   }
      //   this.mychartDay.setOption(op)
      // })
      /**
   * 解决mychartDay.on('click',function(){...})事件重复触发的问题
   * Date: 20200720
   */
      this.mychartDay.off('click')
      /**
   *  图标点击事件
   *  20190426 add
   * */
      // this.mychartDay.on('click', function (params) {
      //   // 获取当前时间,小时
      //   var nowHours = new Date().Format('hh')
      //   // 点击折线图折点对应的时间
      //   // 需要传的时间为
      //   var _date = null
      //   if (params.name.indexOf('时') !== -1) {
      //     var hours = params.name.substring(0, params.name.indexOf('时'))
      //     if (parseInt(hours) < parseInt(nowHours)) {
      //       _date = new Date().Format('yyyy-MM-dd') + ' ' + hours + ':00:00'
      //     } else {
      //       var currentDate = new Date()
      //       // 24小时之前时间
      //       var stringDate = new Date(currentDate.getTime() - 24 * 60 * 60 * 1000).Format('yyyy-MM-dd')
      //       _date = stringDate + ' ' + hours + ':00:00'
      //     }
      //   } else if (params.name.indexOf('日') !== -1) {
      //     var day = params.name.substring(0, params.name.indexOf('日') - 1)
      //     _date = new Date().Format('yyyy-MM') + '-' + day.trim()
      //   }
      // todo 调接口 查凭证
      // if (params.color != 'red') {
      //   var poltMtrlId
      //   var monItemId = 28
      //   for (var i = 0; i < wrwIDS.length; i++) {
      //     if (params.seriesName == wrwIDS[i].name) {
      //       poltMtrlId = wrwIDS[i].id
      //     }
      //   }
      //   getCBMX(jcdID, poltMtrlId, monItemId, _date, function (res) {
      //     createDivByMouse(res, params.event)
      //   })
      // }
      // createDivByMouse("s",params.event);
      // })
    },
    drawChart: function () {
      window.onresize = function () {
        var h1 = document.documentElement.clientHeight// 获取屏幕的高度
        if (h1 > 700) {
          this.mychartDay.getDom().style.height = 3 + 'rem'
          this.mychartDay.getDom().style.width = 6 + 'rem'
        } else {
          this.mychartDay.getDom().style.height = 3 + 'rem'
          this.mychartDay.getDom().style.width = 6 + 'rem'
        }
        this.mychartDay.resize()
      }
    }
    // initOptions: function (dateDate, series) {
    //   var options = {
    //     title: {
    //       // text: '折线图堆叠'
    //     },
    //     color: ['#446cdc', '#c4c916', '#c1187e'],
    //     tooltip: {
    //       trigger: 'axis',
    //       axisPointer: {
    //         type: 'cross',
    //         label: {
    //           color: '#1a4245'
    //         }
    //       }
    //     },
    //     legend: {
    //       x: '200px',
    //       y: '30px',
    //       data: [{
    //         name: 'COD',
    //         textStyle: {
    //           color: '#00d0f9'
    //         }
    //       },
    //       {
    //         name: '氨氮',
    //         textStyle: {
    //           color: '#00d0f9'
    //         }
    //       },
    //       {
    //         name: '废水流量',
    //         textStyle: {
    //           color: '#00d0f9'
    //         }
    //       }]
    //     },
    //     grid: {
    //       left: '3%',
    //       right: '3%',
    //       bottom: '3%',
    //       containLabel: true
    //     },
    //     toolbox: {},
    //     // 图标缩放设置
    //     dataZoom: [{
    //       type: 'inside',
    //       start: 0,
    //       end: 100
    //     }, {
    //       start: 0,
    //       end: 100,
    //       show: false,
    //       handleSize: '80%',
    //       handleStyle: {
    //         color: '#fff',
    //         shadowBlur: 3,
    //         shadowColor: 'rgba(0, 0, 0, 0.6)',
    //         shadowOffsetX: 2,
    //         shadowOffsetY: 2
    //       }
    //     }],
    //     // x轴的设置
    //     xAxis: {
    //       type: 'category',
    //       boundaryGap: false,
    //       data: dateDate,
    //       axisLabel: { // x轴全部显示
    //         rotate: 20,
    //         interval: 0,
    //         textStyle: {
    //           color: '#fff',
    //           fontSize: 10
    //         }
    //       },
    //       splitLine: { // 网格垂直线为虚线
    //         show: true,
    //         lineStyle: {
    //           type: 'dashed'
    //         }
    //       },
    //       axisTick: { // x 轴刻度显示
    //         show: false
    //       },
    //       axisLine: {
    //         lineStyle: {
    //           color: '#FFFFFF',
    //           width: 1 // 这里是为了突出显示加上的
    //         }
    //       }
    //     },
    //     // Y 轴的设置
    //     yAxis: [{
    //       type: 'value',
    //       position: 'left', // 多 Y 轴使用
    //       name: '浓度(mg/m³)',
    //       axisLabel: {
    //         formatter: '{value}',
    //         textStyle: {
    //           color: '#fff' // 坐标的字体颜色
    //         }
    //       },
    //       axisPointer: {
    //         snap: true // 自动吸附最近的点
    //       },
    //       splitLine: {
    //         show: false // y轴 网格线不显示
    //       },
    //       axisLine: {
    //         lineStyle: {
    //           color: '#ffffff', // 坐标轴的颜色
    //           width: 1
    //         }
    //       }
    //     },
    //     {
    //       type: 'value',
    //       position: 'right', // 多 Y 轴使用
    //       name: '流量(m³/h³)',
    //       axisLabel: {
    //         formatter: '{value}',
    //         textStyle: {
    //           color: '#fff' // 坐标的字体颜色
    //         }
    //       },
    //       axisPointer: {
    //         snap: true // 自动吸附最近的点
    //       },
    //       splitLine: {
    //         show: false // y轴 网格线不显示
    //       },
    //       axisLine: {
    //         lineStyle: {
    //           color: '#ffffff', // 坐标轴的颜色
    //           width: 1
    //         }
    //       }
    //     }],
    //     series: series
    //   }
    //   return options
    // }
  }
}
</script>
<style scoped lang="less">
.animation {
  .infomation {
    padding: 0.02rem 0.04rem;
    .grid-content {
      font-size: 0.08rem;
      background-color: #2e4967;
      text-align: center;
      border-radius: 0.01rem;
      height: 0.15rem;
      line-height: 0.15rem;
      margin-right: 0.04rem;
      padding:0 0.04rem
    }
  }
}
    .form-echrts {
        width: 100%;
        border-top: 1px solid #396d83;
        //margin: 10px 10px 10px 10px;
        .from-search{
          display: flex;
          padding:0.02rem;
          >div{margin-left: 10px}
            .pickerMon{
              display: flex;
              >div:first-child {
                margin-right: 10px;
              }
                .pickerData{
                    flex: 1;
                    display: flex;
                      >span{line-height: 22px}
                    .pickerTable {
                      margin-left: 3px;
                    }
                }
            }
            /deep/.el-date-editor--datetime{
                width: 100%;
            }
            /deep/.el-input__inner{
                position: relative;
                width:1rem;
                background-color: #2e4967;
                color: #fff;
                font-size: 0.08rem;
                height: 0.15rem;
                padding: 0;
                border:none;
                text-align: center;
              z-index: 9999;
                //padding-left:20px ;
                //padding: 0!important;
            }
          /deep/.el-input__icon{
            display: block;
            width:1rem;
            height: 0.15rem;
            line-height: 0.15rem;
            cursor: pointer;
            font-size: 0;
          }
          input::-webkit-calendar-picker-indicator {
            opacity: 100;
          }
            .detailbtn{
                background-color:#2e4967;
                text-align: center;
                padding: 0 7px;
                height: 0.15rem;
                line-height: 0.15rem;
                border-radius: 4px;
                margin-right: 6px;
            }
        }
        .el-dialog-div {
            overflow: auto;
        }
        #echarts {
            margin: 0;
            padding: 0;
        }
    }
</style>
src/components/BaseNav/WasteGas/Detail.vue
New file
@@ -0,0 +1,90 @@
<template>
  <el-table
      :data="tableData"
      style="width: 100%;height: 100%">
    <el-table-column
        prop="LabMonTime"
        label="检测时间">
    </el-table-column>
    <el-table-column
        label="氮氧化物">
      <el-table-column
          prop="NOMonTime"
          label="监测值">
      </el-table-column>
      <el-table-column
          prop="NOEndTime"
          label="标准值">
      </el-table-column>
    </el-table-column>
    <el-table-column
        label="二氧化硫">
      <el-table-column
          prop="SOMontime"
          label="监测值">
      </el-table-column>
      <el-table-column
          prop="SoEndTime"
          label="标准值">
      </el-table-column>
    </el-table-column>
    <el-table-column
        label="烟尘">
      <el-table-column
          prop="MonItemId"
          label="监测值">
      </el-table-column>
      <el-table-column
          prop="EndMonTime"
          label="标准值">
      </el-table-column>
    </el-table-column>
    <el-table-column
        label="非甲烷总烃">
      <el-table-column
          prop="MonItemId"
          label="监测值">
      </el-table-column>
      <el-table-column
          prop="MonItemId"
          label="标准值">
      </el-table-column>
    </el-table-column>
  </el-table>
</template>
<script>
export default {
  name: 'Detail',
  data () {
    return {
      tableData: [{
        LabMonTime: '2021-02-05 09:54',
        MonItemId: '---',
        EndMonTime: '30',
        NOMonTime: '44',
        NOEndTime: '100',
        SOMontime: '9',
        SoEndTime: '50'
      }, {
        LabMonTime: '2021-01-14 10:15',
        MonItemId: '---',
        EndMonTime: '30',
        NOMonTime: '70',
        NOEndTime: '100',
        SOMontime: '---',
        SoEndTime: '50'
      }]
    }
  },
  created () {
    // this.tableData = [...this.$attrs.ManualData]
    // console.log(this.tableData)
  }
}
</script>
<style scoped>
</style>
src/components/BaseNav/WasteGas/HourData.vue
New file
@@ -0,0 +1,623 @@
<!--  小时数据  -->
<template>
    <div id="Tab">
        <div class="infomation">
          <div>
            <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>
          </div>
        </div>
        <div class="form-echrts">
            <div class="from-search">
                <div class="pickerMon">
                    <div class="pickerData">
                        <span> 开始时间:</span>
                        <span class="pickerTable">
                          <el-date-picker  type="datetime"  v-model="formInline.timeStart" @click="pickerBtn"></el-date-picker>
                        </span>
                    </div>
                    <div class="pickerData">
                        <span >结束时间:</span>
                        <span class="pickerTable">
                            <el-date-picker  type="datetime" v-model="formInline.timeEnd" ></el-date-picker>
                        </span>
                    </div>
                </div>
                <div class="detailbtn"  @click="onSubmit">查询</div>
                <div class="detailbtn" @click="dialogVisible = true" >明细表</div>
             </div>
            <div style="width:5rem;height:1.5rem;" id="echarts" ref="main"></div>
        </div>
        <!-- 明细弹框 -->
        <el-dialog :visible.sync="dialogVisible"
                   :append-to-body="true"
                   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>
</template>
<script>
import PublicDetailedList from '@components/BaseNav/PublicBounced/common/echarts/PublicDetailedList'
import dayjs from 'dayjs'
export default {
  name: 'HourData',
  components: {
    PublicDetailedList
  },
  data () {
    return {
      watchData: [],
      dialogVisible: false,
      myChar: null,
      value: '',
      formInline: {
        timeStart: null,
        timeEnd: null
      },
      myChart: null,
      JsonCtarts: {
        id: 'mychart',
        title: '加热炉烟气',
        legend: [
          {
            icon: 'image://../assets/imgs/legend/NOX.png',
            itemHeight: 5,
            itemWidth: 20,
            textStyle: {
              color: '#CCC'
            },
            name: '氮氧化物'
          },
          {
            icon: 'image://../assets/imgs/legend/SO2.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '二氧化硫',
            textStyle: {
              color: '#CCC'
            }
          },
          {
            icon: 'image://../assets/imgs/legend/YanChen.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '烟尘',
            textStyle: { color: '#ccc' }
          },
          {
            icon: 'image://../assets/imgs/legend/WenDu.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '温度',
            textStyle: { color: '#ccc' }
          },
          {
            icon: 'image://../assets/imgs/legend/VOCs.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '废气流量',
            textStyle: { color: '#ccc' }
          }
        ],
        xdata: ['0时', '1时', '2时', '3时', '4时', '5时', '6时', '7时', '8时', '9时', '10时', '11时', '12时', '13时', '14时', '15时', '16时'],
        ydatas: [
          { name: '氮氧化物', data: ['34.44', '36.91', '37.65', '37.16', '38.03', '38.23', '37.21', '37.67', '37.97', '37.58', '36.61', '37.76', '37.27', '37.24', '35.86', '36.61', '37.21'], zdcbcolor: 'red', zxcolor: '#00B0F0', bzz: 50 },
          { name: '二氧化硫', data: ['4.98', '4.57', '4.19', '3.14', '3.80', '3.62', '3.33', '2.80', '3.13', '2.54', '3.08', '2.48', '1.97', '1.76', '0.82', '1.01', '1.5'], zdcbcolor: 'red', zxcolor: '#fff21c', bzz: 35 },
          { name: '废气流量', data: ['381907.22', '376474.19', '378572.31', '379369.44', '385225.72', '388657.56', '330667.31', '26560.98', '0.00', '0.00', '49567.43', '357837.31', '376972.66', '379693.50', '379982.22', '379693.50', '379982.22'], zdcbcolor: 'red', zxcolor: '#9ACD32', bzz: null },
          { name: '烟尘', data: ['4.02', '4.17', '4.31', '4.00', '4.45', '4.40', '4.40', '4.25', '4.26', '4.18', '4.58', '4.21', '3.96', '3.83', '3.78', '3.83', '3.78'], zdcbcolor: 'red', zxcolor: '#f48183', bzz: 10 },
          { name: '温度', data: ['46.55', '46.70', '46.47', '46.56', '46.57', '46.58', '46.56', '46.58', '46.69', '46.47', '46.58', '46.60', '46.54', '46.55', '46.60', '46.55', '46.60'], zdcbcolor: 'red', zxcolor: '#F206FF', bzz: null }
        ],
        yname: ' 浓度(mg/m³)',
        // id:'mychart',
        datatype: 2
      }
    }
  },
  created () {
  },
  mounted () {
    this.formInline.timeEnd = dayjs().format('YYYY-MM-DD HH:mm:ss')
    this.formInline.timeStart = dayjs().subtract(12, 'hour').format('YYYY-MM-DD HH:mm:ss')
    this.onSubmit()
  },
  methods: {
    pickerBtn () {
      this.formInline.timeEnd = ''
      this.formInline.timeStart = ''
      console.log(1)
    },
    onSubmit () {
      this.CreateChart()
    },
    CreateChart () {
      // var id = this.JsonCtarts.id
      // var title = this.JsonCtarts.title
      var legend = this.JsonCtarts.legend
      var xdata = this.JsonCtarts.xdata
      var ydatas = this.JsonCtarts.ydatas
      var yname = this.JsonCtarts.yname
      // var jcdId = this.JsonCtarts.jcdID
      var datatype = this.JsonCtarts.datatype
      this.myChart = this.$echarts.init(this.$refs.main)
      this.myChart.clear()
      var dataUnit = ''
      if (datatype === 1) {
        dataUnit = '废气气量(m³/d)'
      } else {
        dataUnit = '废气气量(m³/h)'
      }
      var serLists = []
      for (var j = 0; j < ydatas.length; j++) {
        var len = ydatas[j].data.length
        for (var k = 0; k < len; k++) {
          var it = ydatas[j].data[k]
          var it2 = parseFloat(it).toFixed(2)
          ydatas[j].data[k] = it2
        }
      }
      for (var i = 0; i < ydatas.length; i++) {
      //  var zdcbcolor = ydatas[i].zdcbcolor
        var bzz = ydatas[i].bzz
        var obj
        if (bzz == null) {
          obj = {
            name: ydatas[i].name,
            symbol: 'circle', // 折点形状
            symbolSize: 10, // 大小
            smooth: false, // 直线 ,true 为曲线
            yAxisIndex: 1,
            itemStyle: {
              normal: {
                color: function (c) { // 根据value 显示不同的折点颜色
                  /* var biaozhuiz
                  for (var i = 0; i < exhbzzList.length; i++) {
                    if (exhbzzList[i].name == c.seriesName) {
                      biaozhuiz = exhbzzList[i].bzhui
                    }
                  }
                  if (c.value > 999999999999) {
                    return zdcbcolor
                  } else {
                    return '#33c95f'
                  } */
                },
                lineStyle: { // 折线的颜色
                  color: ydatas[i].zxcolor,
                  width: 5
                },
                borderColor: ydatas[i].zxcolor, // 折点边框的颜色
                label: { // 显示值
                  show: false
                }
              }
            },
            type: 'line',
            data: ydatas[i].data
          }
        } else {
          obj = {
            name: ydatas[i].name,
            symbol: 'circle', // 折点形状
            symbolSize: 10, // 大小
            smooth: false, // 直线 ,true 为曲线
            itemStyle: {
              normal: {
                color: function (c) { // 根据value 显示不同的折点颜色
                /*  var biaozhuiz
                  for (var i = 0; i < exhbzzList.length; i++) {
                    if (exhbzzList[i].name == c.seriesName) {
                      biaozhuiz = exhbzzList[i].bzhui
                    }
                  }
                  if (c.value > biaozhuiz) {
                    return zdcbcolor
                  } else if (c.value > biaozhuiz * 0.9) {
                    return '#FFA500'
                  } else {
                    return '#33c95f'
                  }
                  */
                },
                lineStyle: { // 折线的颜色
                  color: ydatas[i].zxcolor,
                  width: 5
                },
                borderColor: ydatas[i].zxcolor, // 折点边框的颜色
                label: { // 显示值
                  show: false
                }
              }
            },
            type: 'line',
            data: ydatas[i].data,
            markLine: { // 平均值 , 和 指标上限
              symbol: 'none',
              data: [
                /* {
                     type: 'average',
                     name: '日平均值',
                     label: {
                         normal: {
                             position: 'end',  //显示位置
                             formatter:  ydatas[i].name+'\n日平均值'+'{c}' //显示样式
                         }
                     },
                     lineStyle:{   // 颜色
                         color: 'yellow',
                         type:'solid'
                     }
                 }, */ {
                  label: {
                    normal: {
                      position: 'end',
                      formatter: '' // ydatas[i].name+'标准值'//+'{c}'
                    }
                  },
                  name: '标准值',
                  yAxis: bzz,
                  lineStyle: {
                    color: ydatas[i].zxcolor,
                    type: 'dashed',
                    width: 2
                  }
                }
              ]
            }
          }
        }
        serLists.push(obj)
      }
      var option = {
        tooltip: { // 提示框
          trigger: 'axis',
          axisPointer: {
            type: 'cross',
            label: {
              color: '#1a4245'
            }
          },
          formatter: function (params) {
            var s = params[0].name + '<br/>'
            for (var i = 0; i < params.length; i++) {
              // const name = params[i].name
              // 图表title名称
              var seriesName = params[i].seriesName
              // 值
              var value = params[i].value
              // var valueFliter
              // if (value === 'NaN') {
              //   valueFliter = ''
              // } else {
              //   valueFliter = this.formatter(value)
              // }
              var maker = params[i].marker
              if (seriesName === '二氧化硫') {
                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:#F206FF;"></span>'
              } else {
                maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#4ec99c;"></span>'
              }
              s += maker + seriesName + ':' + value + '<br />'
            }
            return s
          }
        },
        toolbox: { // 打印等工具
          show: false,
          feature: {
            saveAsImage: {}
          }
        },
        grid: { // 网格
          top: '20%',
          left: '6%',
          bottom: '15%'
          // containLabel: true
        },
        legend: { // 图例
          data: legend
        },
        dataZoom: [{
          type: 'inside',
          start: 0,
          end: 100
        }, {
          start: 0,
          end: 100,
          show: false,
          handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
          handleSize: '80%',
          handleStyle: {
            color: '#fff',
            shadowBlur: 3,
            shadowColor: 'rgba(0, 0, 0, 0.6)',
            shadowOffsetX: 2,
            shadowOffsetY: 2
          }
        }],
        xAxis: { // x 轴设置
          type: 'category',
          boundaryGap: false,
          axisLabel: { // x轴全部显示
            rotate: 20,
            interval: 0,
            textStyle: {
              color: '#fff'
            }
          },
          splitLine: { // 网格垂直线为 虚线
            show: true,
            lineStyle: {
              type: 'dashed'
            }
          },
          axisTick: { // x 轴刻度显示
            show: false
          },
          axisLine: {
            lineStyle: {
              color: '#FFFFFF',
              width: 1// 这里是为了突出显示加上的
            }
          },
          data: xdata
        },
        yAxis: [{
          type: 'value',
          name: yname,
          /* max: function (value) {
            var max_val_list = [] // 所有显示折线的标准值
            // if(exhbzzList && exhbzzList.length>0){
            //   if (value.max != "-Infinity") {  // 获取所有监测指标的max值 2020/12/31
            //     valMax = parseInt(value.max + 5);
            //   }
            //   $.each(exhbzzList, function (index, item) {
            //     if (item.bzhui != null) {
            //       max_val_list.push(item.bzhui);
            //     }
            //   });
            // }
            max_val_list = max_val_list.sort(function (a, b) { return a - b }) // 排序
            var ma = value.max > max_val_list[max_val_list.length - 1] ? value.max + 5 : max_val_list[max_val_list.length - 1]
            return parseInt(ma)
          }, */
          axisLabel: {
            formatter: '{value}',
            textStyle: {
              color: '#fff'
            }
          },
          axisPointer: {
            snap: true
          },
          splitLine: {
            show: false
          }, // y轴 网格线不显示,
          axisLine: {
            lineStyle: {
              color: '#FFFFFF',
              width: 1// 这里是为了突出显示加上的
            }
          }
        }, {
          type: 'value',
          name: dataUnit,
          max: function (value) {
            var ma = value.max > 120 ? value.max : 120
            return parseInt(ma)
          },
          axisLabel: {
            formatter: '{value}',
            textStyle: {
              color: '#fff'
            }
          },
          axisPointer: {
            snap: true
          },
          splitLine: {
            show: false
          }, // y轴 网格线不显示,
          axisLine: {
            lineStyle: {
              color: '#FFFFFF',
              width: 1// 这里是为了突出显示加上的
            }
          }
        }],
        series: serLists
      }
      // console.log(option)
      this.myChart.setOption(option)
      /*
      this.myChart.on('legendselectchanged', function (params) {
        var StdVal = null
        var op = { yAxis: {} }
        const max_val_list = [] // 所有显示折线的标准值
        if (exhbzzList && exhbzzList.length > 0) {
          max_val_list.push(valMax) // 将监测指标的max值也放入数组 2020/12/31
          $.each(exhbzzList, function (index, item) {
            params.selected[item.name] ? max_val_list.push(item.bzhui) : ''
            if (item.name == params.name) {
              item.name == 'VOCs' ? StdVal = 20 : StdVal = item.bzhui
            }
          })
        }
        max_val_list = max_val_list.sort(function (a, b) { return a - b }) // 排序
        op.yAxis.max = function (value) {
          var ma = value.max < StdVal ? StdVal : Math.ceil(value.max)
          max_val_list ? ma = max_val_list[max_val_list.length - 1] : ''// 选择最大值
          return ma
        }
        this.myChart.setOption(op)
      })
        */
      /**
       * 解决myChart.on('click',function(){...})事件重复触发的问题
       * Date: 20200720
       */
      this.myChart.off('click')
      /**
       *  图标点击事件
       *  20190426 add
       * */
      /* this.myChart.on('click', function (params) {
        // 获取当前时间,小时
        var nowHours = new Date().Format('hh')
        // 点击折线图折点对应的时间
        // 需要传的时间为
        const dates = null
        if (params.name.indexOf('时') !== -1) {
          var hours = params.name.substring(0, params.name.indexOf('时'))
          if (parseInt(hours) < parseInt(nowHours)) {
            dates = new Date().Format('yyyy-MM-dd') + ' ' + hours + ':00:00'
          } else {
            var currentDate = new Date()
            // 24小时之前时间
            var stringDate = new Date(currentDate.getTime() - 24 * 60 * 60 * 1000).Format('yyyy-MM-dd')
            dates = stringDate + ' ' + hours + ':00:00'
          }
        } else if (params.name.indexOf('日') !== -1) {
          var day = params.name.substring(0, params.name.indexOf('日') - 1)
          dates = new Date().Format('yyyy-MM') + '-' + day.trim()
        }
        // todo 调接口 查凭证
         if (params.color != 'red') {
          var poltMtrlId
          var monItemId = 28
          for (var i = 0; i < wrwIDS.length; i++) {
            if (params.seriesName == wrwIDS[i].name) {
              poltMtrlId = wrwIDS[i].id
            }
          }
          getCBMX(jcdID, poltMtrlId, monItemId, _date, function (res) {
            createDivByMouse(res, params.event)
          })
        }
        // createDivByMouse("s",params.event);
      }) */
    }
    // 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()
    //   }
    // }
  }
}
</script>
<style scoped lang="less">
    .animation {
        .infomation {
            padding: 0.02rem 0.04rem;
            .grid-content {
                font-size: 0.08rem;
                background-color: #2e4967;
                text-align: center;
                border-radius: 0.01rem;
                height: 0.15rem;
                line-height: 0.15rem;
                margin-right: 0.04rem;
                padding:0 0.04rem
            }
        }
    }
    .form-echrts {
        width: 100%;
        border-top: 1px solid #396d83;
        //margin: 10px 10px 10px 10px;
        .from-search{
            display: flex;
            padding:0.02rem;
            >div{margin-left: 10px}
            .pickerMon{
                display: flex;
                >div:first-child {
                    margin-right: 10px;
                }
                .pickerData{
                    flex: 1;
                    display: flex;
                    >span{line-height: 22px}
                    .pickerTable {
                        margin-left: 3px;
                    }
                }
            }
            /deep/.el-date-editor--datetime{
                width: 100%;
            }
            /deep/.el-input__inner{
                position: relative;
                width:1rem;
                background-color: #2e4967;
                color: #fff;
                font-size: 0.08rem;
                height: 0.15rem;
                padding: 0;
                border:none;
              z-index: 9999;
                text-align: center;
                //padding-left:20px ;
                //padding: 0!important;
            }
            /deep/.el-input__icon{
                display: block;
                width:1rem;
                height: 0.15rem;
                line-height: 0.15rem;
                cursor: pointer;
                font-size: 0;
            }
            input::-webkit-calendar-picker-indicator {
                opacity: 100;
            }
            .detailbtn{
                background-color:#2e4967;
                text-align: center;
                padding: 0 7px;
                height: 0.15rem;
                line-height: 0.15rem;
                border-radius: 4px;
                margin-right: 6px;
            }
        }
        .el-dialog-div {
            overflow: auto;
        }
        #echarts {
            margin: 0;
            padding: 0;
        }
    }
</style>
src/components/BaseNav/WasteGas/Index.vue
New file
@@ -0,0 +1,160 @@
<template>
  <div class="win">
    <div class="border_corner border_corner_left_top"></div>
    <div class="border_corner border_corner_right_top"></div>
    <div class="border_corner border_corner_left_bottom"></div>
    <div class="border_corner border_corner_right_bottom"></div>
    <ul class="tab" v-show="this.$attrs.value !== 'feiqi'">
      <li :class="active==0?'hover':''" @click='tabTaggle("EChartsRealWasteWater",0)'>实时数据</li>
      <li :class="active==1?'hover':''" @click='tabTaggle("EChartsHourWasteWater",1)'>小时数据</li>
      <li :class="active==2?'hover':''" @click='tabTaggle("EChartsDateWasteWater",2)'>日数据</li>
      <li :class="active==3?'hover':''" @click='tabTaggle("EChartsWasteWaterTable",3)'>人工数据</li>
    </ul>
    <div class="legend" >
      <span >正常</span>
      <i style=" background: #4ec99c;"></i>
      <span >预警</span>
      <i style=" background: red;"></i>
      <span >超标</span>
      <i style=" background: orange;"></i>
    </div>
    <component :is="currentTab" v-bind="$attrs" ref="Echats"></component>
  </div>
</template>
<script>
import ECharts from './echarts/Echarts'
import EChartsHour from './echarts/EChartsHour'
import EChartsDate from './echarts/EChartsDate'
import EChartsTable from './echarts/EChartsTable'
import EChartsRealWasteWater from './echarts/EChartsRealWasteWater'
import EChartsHourWasteWater from './echarts/EChartsHourWasteWater'
import EChartsDateWasteWater from './echarts/EChartsDateWasteWater'
import EChartsWasteWaterTable from './echarts/EChartsWasteWaterTable'
export default {
  name: 'WasteGasIndex',
  components: {
    EChartsHour,
    EChartsDate,
    ECharts,
    EChartsTable,
    EChartsRealWasteWater,
    EChartsHourWasteWater,
    EChartsDateWasteWater,
    EChartsWasteWaterTable
  },
  data () {
    return {
      currentTab: this.current(),
      active: '0'
    }
  },
  // updated () {
  //   this.$refs.Echats.DrawEXHRealTimeDateChart()
  // },
  methods: {
    tabTaggle (taggleMenu, num) {
      this.currentTab = taggleMenu
      this.active = num
    },
    current (currentTab) {
      if (this.$attrs.value === 'feishui') {
        currentTab = 'EChartsRealWasteWater'
      } else {
        currentTab = 'ECharts'
      }
      return currentTab
    }
  }
}
</script>
<style scoped lang="less">
.win {
  position: relative;
  background:@background-color;
  border: 0.8px solid #396d83;
}
.border_corner {
  z-index: 999;
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(0, 0, 0, 0);
  border: 1.5px solid #47d5ea;
}
.border_corner_left_top {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}
.border_corner_right_top {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
}
.border_corner_left_bottom {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
}
.border_corner_right_bottom {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}
.tab {
  display: flex;
  border-bottom: 1px solid #396d83;
  padding:0.02rem 0.04rem;
}
.tab li {
  background-color: #243a55;
  line-height:0.15rem;
  height: 0.15rem;
  text-align: center;
  border-radius: 5px;
  margin-right: 0.04rem;
  padding:0 0.04rem;
}
.tab li.hover,
.tab li:hover {
  background-color: #0e639e;
  color: #fff;
  cursor: pointer;
}
.legend{
  position: absolute;
  top:0.05rem;
  right: 0;
  display: flex;
  justify-items: center;
}
.legend i {
  display: block;
  width: 0.2rem;
  height: 0.09rem;
  margin:0 0.1rem 0 0.05rem;
  border-radius: 0.02rem;
}
.legend span{
  line-height: 0.09rem;
  height: 0.09rem;
  font-size: 0.06rem;
}
</style>
src/components/BaseNav/WasteGas/PublicTabs.vue
New file
@@ -0,0 +1,127 @@
<template>
  <div class="win">
    <div class="border_corner border_corner_left_top"></div>
    <div class="border_corner border_corner_right_top"></div>
    <div class="border_corner border_corner_left_bottom"></div>
    <div class="border_corner border_corner_right_bottom"></div>
    <div class="main">
      <div class="main-matter">
        <div>
          <ul>
            <!--            <li>场所名称:{{ setSolidWaste.StoragePlaceName }}</li>-->
            <!--            <li>贮存能力:{{ setSolidWaste.StorageQty }}(吨)</li>-->
            <!--            <li>剩余贮存能力:{{ setSolidWaste.SurplusFloorArea }}(吨)</li>-->
            <!--            <li>占地面积(㎡):{{ setSolidWaste.DesignFloorArea }}(㎡)</li>-->
            <!--            <li>最近贮存日期:{{ setSolidWaste.StorageDate }}</li>-->
            <!--            <li class="lastli"></li>-->
            <li v-for="(item,index) in tabList" :key="index"></li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'GasTable',
  props: ['setSolidWaste', 'value', 'setWasteGasdata', 'setWasteWaterdata'],
  data () {
    return {
      tabList: []
    }
  },
  methods: {
    // async getTabsData () {
    //   // 基本信息 和 详细信息 展示数据所需参数
    //   const dataValue = {
    //     StoragePlaceId: e.layer.options.totransferData.StoragePlaceId
    //   }
    //   // 基本信息 tabs
    //   const resultBasic = await mapApi.getSolidWasteBaseInfo(dataValue)
    // }
  }
}
</script>
<style scoped lang="less">
.win {
  position: relative;
  margin-bottom: 0.04rem;
  background-color: @background-color;
}
.main {
  .main-matter {
    font-size: 0.06rem;
    font-weight: normal;
    padding: 0.04rem 0;
    border: 1px solid #396d83;
    ul {
      //width: 100%;
      //height: 100%;
      display: flex;
      align-items: center;
      justify-content: space-around;
      flex-wrap: wrap;
      margin-bottom: -0.04rem;
      li {
        margin-bottom: 0.04rem;
        text-align: center;
        min-width: 31%;
        background-color: #243a55;
        color: #00d0f9;
        border-radius: 0.02rem;
        font-size: 0.08rem;
        line-height: 0.09rem;
        padding: 0.03rem .5%;
      }
      .lastli {
        visibility: hidden
      }
    }
  }
}
.border_corner {
  z-index: 999;
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(0, 0, 0, 0);
  border: 1px solid #47d5ea;
}
.border_corner_left_top {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}
.border_corner_right_top {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
}
.border_corner_left_bottom {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
}
.border_corner_right_bottom {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}
</style>
src/components/BaseNav/WasteGas/PublicVideo.vue
New file
@@ -0,0 +1,80 @@
<template>
  <div class="win">
    <!-- 四个角的边框效果 -->
    <div class="border_corner border_corner_left_top"></div>
    <div class="border_corner border_corner_right_top"></div>
    <div class="border_corner border_corner_left_bottom"></div>
    <div class="border_corner border_corner_right_bottom"></div>
    <div class="main">
      <!--      <div class="main-video">-->
      <video controls>
        <source src="movie.mp4" type="video/mp4">
        <source src="movie.ogg" type="video/ogg">
      </video>
      <!--      </div>-->
    </div>
  </div>
</template>
<script>
export default {
  name: 'GasVideo'
}
</script>
<style scoped lang="less">
.win {
  position: relative;
  background-color: rgba(33, 41, 69, 0.9);
  //height: 2rem;
}
.main {
  border: 1px solid #396d83;
  width: 2.5rem;
  height: 2.5rem;
  video {
    width: 100%;
    height: 100%;
    outline: none;
  }
}
.border_corner {
  z-index: 999;
  position: absolute;
  width: 14px;
  height: 14px;
  background: rgba(0, 0, 0, 0);
  border: 1px solid #47d5ea;
}
.border_corner_left_top {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}
.border_corner_right_top {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
}
.border_corner_left_bottom {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
}
.border_corner_right_bottom {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}
</style>
src/components/BaseNav/WasteGas/RealTimeEcharts.vue
New file
@@ -0,0 +1,1116 @@
<template>
  <div id="Tab">
    <div class="animation">
      <div class="infomation">
        <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">5.23</i></span>
      </div>
    </div>
    <div class="form-echrts">
      <div class="from-search">
        <div class="pickerMon">
          <div class="pickerData">
            <span> 开始时间:</span>
            <span class="pickerTable">
              <el-date-picker  type="datetime"  v-model="formInline.timeStart"></el-date-picker>
            </span>
          </div>
          <div class="pickerData">
            <span >结束时间:</span>
            <span class="pickerTable">
              <el-date-picker type="datetime"  v-model="formInline.timeEnd"></el-date-picker>
            </span>
          </div>
        </div>
        <div>
          采样点数:
          <el-select v-model="formInline.region" placeholder="50">
            <el-option label="0" value="0"></el-option>
            <el-option label="25" value="25"></el-option>
            <el-option label="50" value="50"></el-option>
            <el-option label="75" value="75"></el-option>
            <el-option label="100" value="100"></el-option>
          </el-select>
        </div>
        <div class="detailbtn"  @click="onSubmit">查询</div>
      </div>
        <div  style="width:5rem;height:1.5rem;" ref="echarts"> </div>
      </div>
    </div>
</template>
<script>
// import mapApi from '@/api/mapApi'
import 'dayjs/locale/es'
import dayjs from 'dayjs'
export default {
  name: 'RealTimeECharts',
  data () {
    return {
      days: dayjs(new Date()).format('YYYYMMDDHHmmss'),
      watchData: [],
      dialogVisible: false,
      myChar: null,
      value: '',
      formInline: {
        region: '',
        timeStart: '',
        timeEnd: ''
      },
      RealTimeChart: null,
      JsonTimeCtarts: {
        id: 'mychart_ss ',
        title: '烟尘',
        legend: [
          {
            name: '氮氧化物',
            icon: 'image://../assets/imgs/legend/NOX.png',
            textStyle: { color: '#ccc' },
            itemWidth: 20,
            itemHeight: 5
          },
          {
            icon: 'image://../assets/imgs/legend/SO2.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '二氧化硫',
            textStyle: {
              color: '#CCC'
            }
          },
          {
            icon: 'image://../assets/imgs/legend/YanChen.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '烟尘',
            textStyle: { color: '#ccc' }
          },
          {
            icon: 'image://../assets/imgs/legend/VOCs.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '废气流量',
            textStyle: { color: '#ccc' }
          }
        ],
        ydatas: [
          {
            name: '氮氧化物',
            data: [{
              name: '氮氧化物',
              value: ['2021/04/13 09:18:19', 39.51431]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:18:34', 38.76508]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:18:49', 37.57471]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:19:04', 36.3796]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:19:19', 36.10718]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:19:34', 35.81126]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:19:49', 35.9184]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:20:04', 36.08839]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:20:19', 36.3718]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:20:34', 36.8966]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:20:49', 37.3998]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:21:04', 37.11937]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:21:19', 36.12424]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:21:34', 34.99567]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:21:49', 34.48063]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:22:04', 34.62222]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:22:19', 34.84583]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:22:34', 35.80923]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:22:49', 35.93465]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:23:04', 35.78891]
            },
            {
              name: '氮氧化物',
              value: ['2021/04/13 09:23:19', 35.54268]
            }],
            zdcbcolor: 'red',
            zxcolor: '#00B0F0',
            bzz: 50
          },
          {
            name: '二氧化硫',
            data: [{
              name: '二氧化硫',
              value: ['2021/04/13 09:18:19', 5.112573]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:18:34', 4.578955]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:18:49', 4.869465]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:19:04', 5.270735]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:19:19', 5.355475]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:19:34', 5.242907]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:19:49', 5.230558]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:20:04', 5.262951]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:20:19', 5.268744]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:20:34', 5.159671]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:20:49', 4.955352]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:21:04', 5.110546]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:21:19', 5.235723]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:21:34', 5.443502]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:21:49', 5.708939]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:22:04', 5.882327]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:22:19', 6.017494]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:22:34', 5.410021]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:22:49', 5.379694]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:23:04', 5.551433]
            },
            {
              name: '二氧化硫',
              value: ['2021/04/13 09:23:19', 5.819743]
            }],
            zdcbcolor: 'red',
            zxcolor: '#fff21c',
            bzz: 50
          },
          {
            name: '废气流量',
            data: [{
              name: '废气流量',
              value: ['2021/04/13 09:18:19', 5.012617]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:18:34', 4.992213]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:18:49', 5.026886]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:19:04', 5.052861]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:19:19', 5.038826]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:19:34', 5.062339]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:19:49', 5.071915]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:20:04', 5.053693]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:20:19', 5.03562]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:20:34', 5.043983]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:20:49', 5.059231]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:21:04', 5.042176]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:21:19', 5.028253]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:21:34', 5.024891]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:21:49', 5.01542]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:22:04', 5.025787]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:22:19', 5.038269]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:22:34', 5.01441]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:22:49', 5.010105]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:23:04', 5.012341]
            },
            {
              name: '废气流量',
              value: ['2021/04/13 09:23:19', 4.996146]
            }],
            zdcbcolor: 'red',
            zxcolor: '#9ACD32',
            bzz: null
          },
          {
            name: '烟尘',
            data: [{
              name: '烟尘',
              value: [['2021/04/13 09:18:19', 0.8297127]]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:18:34', 0.8347292]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:18:49', 0.9218481]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:19:04', 0.913429]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:19:19', 0.9026684]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:19:34', 0.8060119]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:19:49', 0.781314]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:20:04', 0.8958074]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:20:19', 0.9093901]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:20:34', 0.8743498]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:20:49', 0.9024854]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:21:04', 0.9456897]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:21:19', 0.9747347]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:21:34', 0.9200308]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:21:49', 0.8987293]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:22:04', 0.8613345]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:22:19', 0.8747463]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:22:34', 0.8883187]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:22:49', 0.881333]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:23:04', 0.9142911]
            },
            {
              name: '烟尘',
              value: ['2021/04/13 09:23:19', 0.9569058]
            }],
            zdcbcolor: 'red',
            zxcolor: '#f48183',
            bzz: 10
          }],
        yname: ' 浓度(mg/m³)'
      },
      JSONTimeData: {
        id: 21,
        unionTagCodeList: ['TJIP45.rl3AT25035', 'TJIP45.rl3AT25033', 'TJIP45.rl3FT35032', 'TJIP45.rl3AT25034']
        // BBZMAPPING: {
        //   氮氧化物: 50,
        //   二氧化硫: 50,
        //   废气流量: null,
        //   烟尘: 10
        // }
      },
      res: [{ UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 36.02153, ReadTime: '2021/04/14 03:59:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 35.7473, ReadTime: '2021/04/14 03:59:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 35.56014, ReadTime: '2021/04/14 04:00:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 35.59335, ReadTime: '2021/04/14 04:00:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 34.49617, ReadTime: '2021/04/14 04:00:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 34.33835, ReadTime: '2021/04/14 04:00:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 34.93116, ReadTime: '2021/04/14 04:01:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 35.831, ReadTime: '2021/04/14 04:01:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 36.67476, ReadTime: '2021/04/14 04:01:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 38.04687, ReadTime: '2021/04/14 04:01:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 37.78848, ReadTime: '2021/04/14 04:02:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 38.03456, ReadTime: '2021/04/14 04:02:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 37.81089, ReadTime: '2021/04/14 04:02:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 39.28693, ReadTime: '2021/04/14 04:02:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 39.79956, ReadTime: '2021/04/14 04:03:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 40.11547, ReadTime: '2021/04/14 04:03:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 40.72007, ReadTime: '2021/04/14 04:03:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 43.11903, ReadTime: '2021/04/14 04:03:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 44.28426, ReadTime: '2021/04/14 04:04:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 45.07601, ReadTime: '2021/04/14 04:04:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 43.81406, ReadTime: '2021/04/14 04:04:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.312585, ReadTime: '2021/04/14 03:59:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.507234, ReadTime: '2021/04/14 03:59:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.383248, ReadTime: '2021/04/14 04:00:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.385284, ReadTime: '2021/04/14 04:00:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.719143, ReadTime: '2021/04/14 04:00:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.730373, ReadTime: '2021/04/14 04:00:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.602137, ReadTime: '2021/04/14 04:01:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.459584, ReadTime: '2021/04/14 04:01:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.313675, ReadTime: '2021/04/14 04:01:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.305554, ReadTime: '2021/04/14 04:01:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.911544, ReadTime: '2021/04/14 04:02:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.744454, ReadTime: '2021/04/14 04:02:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.267665, ReadTime: '2021/04/14 04:02:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.606314, ReadTime: '2021/04/14 04:02:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.599967, ReadTime: '2021/04/14 04:03:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.939136, ReadTime: '2021/04/14 04:03:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.03244, ReadTime: '2021/04/14 04:03:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.183742, ReadTime: '2021/04/14 04:03:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.323384, ReadTime: '2021/04/14 04:04:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.403428, ReadTime: '2021/04/14 04:04:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.347282, ReadTime: '2021/04/14 04:04:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.018858, ReadTime: '2021/04/14 03:59:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.020605, ReadTime: '2021/04/14 03:59:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.047671, ReadTime: '2021/04/14 04:00:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.020306, ReadTime: '2021/04/14 04:00:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.054744, ReadTime: '2021/04/14 04:00:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.027292, ReadTime: '2021/04/14 04:00:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.026794, ReadTime: '2021/04/14 04:01:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.03381, ReadTime: '2021/04/14 04:01:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.041131, ReadTime: '2021/04/14 04:01:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.02754, ReadTime: '2021/04/14 04:01:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 4.998859, ReadTime: '2021/04/14 04:02:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.014368, ReadTime: '2021/04/14 04:02:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.019042, ReadTime: '2021/04/14 04:02:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.046045, ReadTime: '2021/04/14 04:02:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.024141, ReadTime: '2021/04/14 04:03:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.016951, ReadTime: '2021/04/14 04:03:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.01229, ReadTime: '2021/04/14 04:03:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.00666, ReadTime: '2021/04/14 04:03:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.005168, ReadTime: '2021/04/14 04:04:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 4.99309, ReadTime: '2021/04/14 04:04:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 4.983859, ReadTime: '2021/04/14 04:04:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.128864, ReadTime: '2021/04/14 03:59:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.096089, ReadTime: '2021/04/14 03:59:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.13711, ReadTime: '2021/04/14 04:00:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.191255, ReadTime: '2021/04/14 04:00:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.159299, ReadTime: '2021/04/14 04:00:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.089755, ReadTime: '2021/04/14 04:00:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.098142, ReadTime: '2021/04/14 04:01:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.084317, ReadTime: '2021/04/14 04:01:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.040828, ReadTime: '2021/04/14 04:01:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.066903, ReadTime: '2021/04/14 04:01:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.12027, ReadTime: '2021/04/14 04:02:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.075927, ReadTime: '2021/04/14 04:02:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.062984, ReadTime: '2021/04/14 04:02:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.190477, ReadTime: '2021/04/14 04:02:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.192902, ReadTime: '2021/04/14 04:03:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.061741, ReadTime: '2021/04/14 04:03:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 0.991724, ReadTime: '2021/04/14 04:03:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.006655, ReadTime: '2021/04/14 04:03:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.044971, ReadTime: '2021/04/14 04:04:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.077099, ReadTime: '2021/04/14 04:04:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.131417, ReadTime: '2021/04/14 04:04:30', ErrorMessage: null }],
      startTime: '',
      endTime: '',
      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.IntervalEXHRealTimeDate(this.JSONTimeData.id, this.JSONTimeData.unionTagCodeList, this.JSONTimeData.BBZMAPPING)
  },
  methods: {
    onSubmit () {
      this.DrawEXHRealTimeDateChart()
    },
    /**
     * RTDB 格式转换
     * @param res
     * @returns {[]}
     */
    // getRtdbFormat (res) {
    //   var data = res.collection.items
    //   var dataArray = []
    //   for (var i = 0; i < data.length; i++) {
    //     var dataFormat = {
    //       UnionTagCode: data[i].data[0].value,
    //       TagValue: parseFloat(data[i].data[1].value),
    //       ReadTime: data[i].data[3].value,
    //       ErrorMessage: data[i].data[5].value
    //     }
    //     dataArray.push(dataFormat)
    //   }
    //   return dataArray
    // },
    // 1.坐标轴实现,画实时数据
    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 = []
      for (var i = 0; i < ydatas.length; i++) {
        // var zdcbcolor = ydatas[i].zdcbcolor
        var bz = ydatas[i].bzz
        var obj
        if (bz) {
          obj = {
            name: ydatas[i].name,
            // symbol:'circle', // 折点形状
            // symbolSize: 10,   //大小
            smooth: true, // 直线 ,true 为曲线
            itemStyle: {
              normal: {
                color: function (c) { // 根据value 显示不同的折点颜色
                  // var biaozhuiz
                  // for (var i = 0; i < exhbzzList.length; i++) {
                  //   if (exhbzzList[i].name == c.seriesName) {
                  //     biaozhuiz = exhbzzList[i].bzhui
                  //   }
                  // }
                  // if (c.value[1] > biaozhuiz) {
                  //   return zdcbcolor
                  // } else if (c.value[1] > biaozhuiz * 0.9) {
                  //   return '#FFA500'
                  // } else {
                  //   return '#33c95f'
                  // }
                },
                lineStyle: { // 折线的颜色
                  color: ydatas[i].zxcolor,
                  width: 2
                },
                // borderColor:'black',  //折点边框的颜色
                label: { // 显示值
                  show: false
                }
              }
            },
            type: 'line',
            data: ydatas[i].data,
            markLine: { // 平均值 , 和 指标上限
              symbol: 'none',
              data: [{
                label: {
                  normal: {
                    position: 'end',
                    formatter: ''// ydatas[i].name+'标准值' //+'{c}'
                  }
                },
                name: '标准值',
                yAxis: bz,
                lineStyle: {
                  color: ydatas[i].zxcolor,
                  type: 'dashed',
                  width: 2
                }
              }]
            }
          }
        } else {
          obj = {
            name: ydatas[i].name,
            // symbol:'circle', // 折点形状
            // symbolSize: 10,   //大小
            smooth: true, // 直线 ,true 为曲线
            itemStyle: {
              normal: {
                color: function (c) { // 根据value 显示不同的折点颜色
                  return '#33c95f'
                },
                lineStyle: { // 折线的颜色
                  color: ydatas[i].zxcolor,
                  width: 2
                },
                // borderColor:'black',  //折点边框的颜色
                label: { // 显示值
                  show: false
                }
              }
            },
            type: 'line',
            data: ydatas[i].data
          }
        }
        if (ydatas[i].name === '废气流量' || ydatas[i].name === '废气') {
          obj.yAxisIndex = 1
        }
        serLists.push(obj)
      }
      var option = {
        /*  title: {
          text: title,
      }, */
        tooltip: { // 提示框
          trigger: 'axis',
          axisPointer: {
            type: 'cross',
            label: {
              color: '#1a4245'
            }
          },
          formatter: function (params) {
            var s = params[0].name + '<br />'
            for (var i = 0; i < params.length; i++) {
              // var name = params[i].name
              // 图表title名称
              var seriesName = params[i].seriesName
              // 值
              var value = params[i].value[1]
              // var valueFliter = this.formatter(value)
              var maker = params[i].marker
              if (seriesName === '二氧化硫') {
                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:#F206FF;"></span>'
              } else {
                maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#4ec99c;"></span>'
              }
              s += maker + seriesName + ':' + value + '<br />'
            }
            return s
          }
        },
        toolbox: { // 打印等工具
          show: false,
          feature: {
            saveAsImage: {}
          }
        },
        grid: { // 网格
          top: '20%'
        },
        legend: {
          data: legend
        },
        dataZoom: [{
          type: 'inside',
          start: 0,
          end: 100
        }, {
          start: 0,
          end: 100,
          show: false,
          handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
          handleSize: '80%',
          handleStyle: {
            color: '#fff',
            shadowBlur: 3,
            shadowColor: 'rgba(0, 0, 0, 0.6)',
            shadowOffsetX: 2,
            shadowOffsetY: 2
          }
        }],
        xAxis: { // x 轴设置
          type: 'time',
          boundaryGap: false,
          axisLabel: { // x轴全部显示
            // rotate: 20,
            margin: 6,
            interval: 0,
            textStyle: {
              color: '#fff'
            }
          },
          splitLine: { // 网格垂直线为 虚线
            show: true,
            lineStyle: {
              type: 'dashed'
            }
          },
          axisTick: { // x 轴刻度显示
            show: false
          },
          axisLine: {
            lineStyle: {
              color: '#FFFFFF',
              width: 1// 这里是为了突出显示加上的
            }
          }
          // data: xdata
        },
        yAxis: [{
          type: 'value',
          name: yname,
          max: function (value) {
            var ma = value.max > 100 ? value.max : 100
            return parseInt(ma)
          },
          axisLabel: {
            formatter: '{value}',
            textStyle: {
              color: '#fff'
            }
          },
          axisPointer: {
            snap: true
          },
          splitLine: {
            show: false
          }, // y轴 网格线不显示,
          axisLine: {
            lineStyle: {
              color: '#FFFFFF',
              width: 1// 这里是为了突出显示加上的
            }
          }
        }, { // 流量轴
          type: 'value',
          name: '废气流量(m3/h)',
          axisLabel: {
            formatter: '{value}',
            textStyle: {
              color: '#fff'
            }
          },
          axisPointer: {
            snap: true
          },
          splitLine: {
            show: false
          }, // y轴 网格线不显示,
          axisLine: {
            lineStyle: {
              color: '#FFFFFF',
              width: 1// 这里是为了突出显示加上的
            }
          }
        }],
        series: serLists
      }
      console.log(option)
      this.RealTimeChart.setOption(option)
      // this.RealTimeChart.on('legendselectchanged', function (params) {
      //   var StdVal = null
      //   var op = { yAxis: {} }
      //   var max_val_list = [] // 所有显示折线的标准值
      //   if (exhbzzList && exhbzzList.length > 0) {
      //     $.each(exhbzzList, function (index, item) {
      //       params.selected[item.name] ? max_val_list.push(item.bzhui) : ''
      //       if (item.name === params.name) {
      //         item.name === 'VOCs' ? StdVal = 20 : StdVal = item.bzhui
      //       }
      //     })
      //   }
      //   max_val_list = max_val_list.sort(function (a, b) { return a - b }) // 排序
      //   op.yAxis.max = function (value) {
      //     var ma = value.max < StdVal ? StdVal : Math.ceil(value.max)
      //     max_val_list ? ma = max_val_list[max_val_list.length - 1] : ''// 选择最大值
      //     return ma
      //   }
      //   RealTimeChart.setOption(op)
      // })
      // RealTimeChart.on('click', function (params) {
      //   var nowDate = new Date().Format()
      // })
    },
    getRtdb15s (unionTagCodeList, startTime, endTime, step, res) {
      if (this.res.length > 0) {
        // 处理数据开始
        var d = res
        var nameList = [] // 存放图例
        var data // 数据类型// var data={name:'',value:[now1.getFullYear(), now1.getMonth() + 1, now1.getDate().join('/'),value]}
        var datalist // 存放data的数组
        // var bzh = []
        for (var i = 0; i < d.length; i++) {
          if (d[i].ErrorMessage != null) {
            continue
          }
          // var name = CFG.DATA_REALTIME_TAGCODETABLE[d[i].UnionTagCode].TagName
          if (nameList.length === 0) {
            nameList.push(name)
            var newdate = new Date(this.res.ReadTime)
            data = {
              name: name,
              value: [newdate, this.res.TagValue]
            }
            datalist = {
              name: name,
              data: [data]
            }
            this.EXHRealTimeDataList.push(datalist)
          } else if (nameList.indexOf(name) < 0) {
            nameList.push(name)
            // var newdate = new Date(d[i].ReadTime)
            data = {
              name: name,
              value: [newdate, d[i].TagValue]
            }
            datalist = {
              name: name,
              data: [data]
            }
            this.EXHRealTimeDataList.push(datalist)
          } else if (i === d.length - 1) {
            if (nameList.indexOf(name) < 0) {
              nameList.push(name)
              // var newdate = new Date(d[i].ReadTime)
              data = {
                name: name,
                value: [newdate, d[i].TagValue]
              }
              datalist = {
                name: name,
                data: [data]
              }
              // EXHRealTimeDataList.push(datalist)
            } else {
              // var newdate = new Date(d[i].ReadTime)
              data = {
                name: name,
                value: [newdate, d[i].TagValue]
              }
              for (var k = 0; k < this.EXHRealTimeDataList.length; k++) {
                if (this.EXHRealTimeDataList[k].name === name) {
                  this.EXHRealTimeDataList[k].data.push(data)
                }
              }
            }
          } else {
            const newdate = new Date(d[i].ReadTime)
            data = {
              name: name,
              value: [newdate, d[i].TagValue]
            }
            for (let k = 0; k < this.EXHRealTimeDataList.length; k++) {
              if (this.EXHRealTimeDataList[k].name === name) {
                this.EXHRealTimeDataList[k].data.push(data)
              }
            }
          }
        }
        // var divid = 'mychart_ss'
        // var title = name
        var lengList = []
        var objTemp
        for (var l = 0; l < nameList.length; l++) {
          var obj
          var iconurl
          if (nameList[l] === '二氧化硫') {
            iconurl = 'image://../assets/imgs/legend/SO2.png'
          } else if (nameList[l] === '氮氧化物') {
            iconurl = 'image://../assets/imgs/legend/NOX.png'
          } else if (nameList[l] === '烟尘') {
            iconurl = 'image://../assets/imgs/legend/YanChen.png'
          } else if (nameList[l] === '非甲烷总烃') {
            iconurl = 'image://../assets/imgs/legend/grn.png'
          } else if (nameList[l] === '温度') {
            iconurl = 'image://../assets/imgs/legend/WenDu.png'
          } else {
            iconurl = 'image://../assets/imgs/legend/VOCs.png'
          }
          if (nameList[l] === '废气' || nameList[l] === '废气流量') { // 将废气流量排到数组最后
            objTemp = {
              name: nameList[l],
              icon: iconurl,
              textStyle: {
                color: '#ccc'
              },
              itemWidth: 20,
              itemHeight: 5
            }
          } else {
            obj = {
              name: nameList[l],
              icon: iconurl,
              textStyle: {
                color: '#ccc'
              },
              itemWidth: 20,
              itemHeight: 5
            }
            lengList.push(obj)
          }
        }
        lengList.push(objTemp)
        this.DrawEXHRealTimeDateChart(this.JsonTimeCtarts.id, this.JsonTimeCtarts.title, this.JsonTimeCtarts.legend, this.JsonTimeCtarts.ydatas, this.JsonTimeCtarts.yname)
      }
    },
    // 钩子调用实时
    IntervalEXHRealTimeDate (id, unionTagCodeList, BBZMAPPING) {
      // 定时器函数
      this.interValHander = setInterval(function () {
        // $('.RealTime').empty()
        this.startTime = dayjs().subtract(5, 'minute').format('YYYY-MM-DD HH:mm:ss')
        this.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
        this.step = '15'
        // this.getRtdb15s(this.unionTagCodeList, this.startTime, this.endTime, this.step, this.res)
        // PreQueryTime=endTime;
        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.BBZMAPPING)
      }, 15000)
    }
  }
}
</script>
<style scoped lang="less">
.grid-content {
  font-size: 8px;
  background-color: #2e4967;
  text-align: center;
  border-radius: 2px;
  margin-right: 10px;
  padding:0 10px
  >i{
    color: #ffffff;
  }
}
.animation {
  //width: 600px;
  //height: 0.06rem;
  .infomation {
    padding: 5px 10px;
  }
}
.form-echrts {
  width: 100%;
  border-top: 1px solid #396d83;
  //margin: 10px 10px 10px 10px;
  .from-search{
    display: flex;
    padding:5px;
    >div{margin-left: 10px}
    .pickerMon{
      display: flex;
      >div:first-child {
        margin-right: 10px;
      }
      .pickerData{
        flex: 1;
        display: flex;
        >span{line-height: 22px}
        .pickerTable {
          margin-left: 3px;
        }
      }
    }
    /deep/.el-date-editor--datetime{
      width: 100%;
    }
    /deep/.el-input__inner{
      position: relative;
      width:140px;
      background-color: #2e4967;
      color: #fff;
      font-size: 12px;
      height: 24px;
      padding: 0;
      border-color:#00fff6;
      text-align: center;
      z-index: 9999;
      //padding-left:20px ;
      //padding: 0!important;
    }
    /deep/.el-input__icon{
      display: block;
      width: 140px;
      height: 22px;
      line-height: 22px;
      cursor: pointer;
      font-size: 0;
    }
    .echatsInput{
      color: #00ffff;
      background-color: #2e4967;
      border: none;
      border-radius: 6px;
      width: 80px;
      height: 22px;
    }
    input::-webkit-calendar-picker-indicator {
      opacity: 100;
    }
    .detailbtn{
      background-color:#2e4967;
      text-align: center;
      padding: 0 7px;
      line-height: 20px;
      border-radius: 4px;
      margin-right: 6px;
    }
  }
  .el-dialog-div {
    //height: 50vh!important;
    overflow: auto;
    //overflow: hidden;
  }
  #echarts {
    margin: 0;
    padding: 0;
    //height: 3rem;
    //border: 1px solid #396d83;
    //margin: 10px 10px 10px 10px;
  }
}
</style>
src/components/BaseNav/WasteSolid/PublicTabs.vue
@@ -1,41 +1,20 @@
<template>
  <!-- 框 -->
  <div class="win">
    <!-- 四个角的边框效果 -->
    <div class="border_corner border_corner_left_top"></div>
    <div class="border_corner border_corner_right_top"></div>
    <div class="border_corner border_corner_left_bottom"></div>
    <div class="border_corner border_corner_right_bottom"></div>
    <div class="main">
      <div class="main-matter">
        <div v-if="value === 'feiqi'">
        <div>
          <ul>
            <li>监测点名称:{{ setWasteGasdata.Name }}</li>
            <li>生产单位:{{ setWasteGasdata.porltName }}</li>
            <li>排放类型名称:{{ setWasteGasdata.MonTypeName }}</li>
            <li>排放去向:{{ setWasteGasdata.EmissDirecti }}</li>
            <li>控制级别名称:{{ setWasteGasdata.ContrLevelShowName }}</li>
            <li>内/外排口:{{ setWasteGasdata.OrOutPortName }}</li>
          </ul>
        </div>
        <div v-if="value === 'gufei'">
          <ul>
            <li>场所名称:{{ setSolidWaste.StoragePlaceName }}</li>
            <li>贮存能力:{{ setSolidWaste.StorageQty }}(吨)</li>
            <li>剩余贮存能力:{{ setSolidWaste.SurplusFloorArea }}(吨)</li>
            <li>占地面积(㎡):{{ setSolidWaste.DesignFloorArea }}(㎡)</li>
            <li>最近贮存日期:{{ setSolidWaste.StorageDate }}</li>
            <li class="lastli"></li>
          </ul>
        </div>
        <div v-else-if="value === 'feishui'">
          <ul>
            <li>监测点名称:{{ setWasteWaterdata.Name }}</li>
            <li>生产单位:{{ setWasteWaterdata.porltName }}</li>
            <li>排放类型名称:{{ setWasteWaterdata.MonTypeName }}</li>
            <li>排放去向:{{ setWasteWaterdata.EmissDirecti }}</li>
            <li>控制级别名称:{{ setWasteWaterdata.ContrLevelShowName }}</li>
            <li>内/外排口:{{ setWasteWaterdata.OrOutPortName }}</li>
            <!--            <li>场所名称:{{ setSolidWaste.StoragePlaceName }}</li>-->
            <!--            <li>贮存能力:{{ setSolidWaste.StorageQty }}(吨)</li>-->
            <!--            <li>剩余贮存能力:{{ setSolidWaste.SurplusFloorArea }}(吨)</li>-->
            <!--            <li>占地面积(㎡):{{ setSolidWaste.DesignFloorArea }}(㎡)</li>-->
            <!--            <li>最近贮存日期:{{ setSolidWaste.StorageDate }}</li>-->
            <!--            <li class="lastli"></li>-->
            <li v-for="(item,index) in tabList" :key="index"></li>
          </ul>
        </div>
      </div>
@@ -46,7 +25,22 @@
<script>
export default {
  name: 'GasTable',
  props: ['setSolidWaste', 'value', 'setWasteGasdata', 'setWasteWaterdata']
  props: ['setSolidWaste', 'value', 'setWasteGasdata', 'setWasteWaterdata'],
  data () {
    return {
      tabList: []
    }
  },
  methods: {
    // async getTabsData () {
    //   // 基本信息 和 详细信息 展示数据所需参数
    //   const dataValue = {
    //     StoragePlaceId: e.layer.options.totransferData.StoragePlaceId
    //   }
    //   // 基本信息 tabs
    //   const resultBasic = await mapApi.getSolidWasteBaseInfo(dataValue)
    // }
  }
}
</script>
@@ -56,19 +50,16 @@
  position: relative;
  margin-bottom: 0.04rem;
  background-color: @background-color;
  //width: 6rem;
  //height: 0.5rem;
}
.main {
  //width: 100%;
  //height: 100%;
  .main-matter {
    font-size: 0.06rem;
    font-weight: normal;
    padding: 0.04rem 0;
    border: 1px solid #396d83;
    ul {
      //width: 100%;
      //height: 100%;
@@ -77,6 +68,7 @@
      justify-content: space-around;
      flex-wrap: wrap;
      margin-bottom: -0.04rem;
      li {
        margin-bottom: 0.04rem;
        text-align: center;
@@ -88,6 +80,7 @@
        line-height: 0.09rem;
        padding: 0.03rem .5%;
      }
      .lastli {
        visibility: hidden
      }
src/components/BaseNav/WasteSolid/SolidWaste.js
File was deleted
src/components/BaseNav/WasteSolid/WasteSolidIndex.vue
New file
@@ -0,0 +1,120 @@
<template>
  <div class="public-bounced map-background" v-drag v-show="flag">
    <div class="public-bounced-title panel-title" ref="publicBounced">
      <span>{{ displayContentTitle }}</span>
      <i class="el-icon-circle-close" @click="closePopup"></i>
    </div>
    <div class="public-bounced-content">
      <div class="public-bounced-content-left">
        <public-tabs :setSolidWaste="displayContentTab"></public-tabs>
        <div class="public-bounced-content-left-bottom">
          <public-table :displayContentTable="displayContentTable"></public-table>
        </div>
      </div>
      <div class="public-bounced-content-right">
        <public-video></public-video>
      </div>
    </div>
  </div>
</template>
<script>
import '@/utils/dragBoxes'
import PublicTabs from '@components/BaseNav/WasteSolid/PublicTabs'
import PublicTable from '@components/BaseNav/WasteSolid/PublicTable'
import PublicVideo from '@components/BaseNav/WasteSolid/PublicVideo'
export default {
  name: 'WasteSolidIndex',
  components: {
    PublicTabs,
    PublicTable,
    PublicVideo
  },
  data () {
    return {
      displayContentTitle: '',
      displayContentTab: '',
      displayContentTable: '',
      flag: false
    }
  },
  methods: {
    closePopup () {
      this.flag = false
    },
    // async reauestData () {
    //   const dataValue = {
    //     StoragePlaceId: 0
    //   }
    //   // console.log(e.layer.options.totransferData.Name)
    //   // 弹框标题
    //   const title = e.layer.options.totransferData.Name
    //   // 基本信息 tabs
    //   const resultBasic = await mapApi.getSolidWasteBaseInfo(dataValue)
    //   // 详细信息展示 table
    //   const resultDetailed = await mapApi.getSolidWasteDetail(dataValue)
    // },
    // 固废相关信息设置
    setData (title, dataBasic, dataDetailed, value) {
      this.flag = true
      this.value = value
      this.displayContentTitle = title
      this.displayContentTab = dataBasic[0]
      this.displayContentTable = dataDetailed[0]
    }
  }
}
</script>
<style lang="less" scoped>
.public-bounced {
  z-index: 2000;
  position: absolute;
  top: 35%;
  left: 20%;
  .public-bounced-title {
    cursor: move;
    height: 0.1rem;
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    span {
      color: #f4f7ff;
      margin: 0 15px;
      font-size: 14px;
    }
    i {
      color: #C0C4CC;
      margin: 0 15px;
      font-size: 22px;
      cursor: pointer;
    }
    i:hover {
      color: #00fff6;
    }
  }
  .public-bounced-content {
    padding: 0.1rem;
    display: flex;
    //align-items: center;
    //justify-content: space-around;
    .public-bounced-content-left {
      //width: 4.8rem;
    }
    .public-bounced-content-right {
      //width: 3rem;
      margin-left: 0.1rem;
    }
  }
}
</style>
src/components/BaseNav/WasteWater/DayData.vue
New file
@@ -0,0 +1,712 @@
<!--  日数据  -->
<template>
  <div id="Tab">
    <div class="animation">
      <div class="infomation">
        <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>
    <div class="form-echrts">
      <div class="from-search">
        <div class="pickerMon">
          <div class="pickerData">
            <span> 开始时间:</span>
            <span class="pickerTable">
             <el-date-picker  type="datetime"   v-model="formInline.timeStart">
             </el-date-picker>
            </span>
          </div>
          <div class="pickerData">
            <span >结束时间:</span>
            <span class="pickerTable">
              <el-date-picker type="datetime" v-model="formInline.timeEnd">
              </el-date-picker>
            </span>
          </div>
        </div>
<!--        <div>-->
<!--          采样点数:-->
<!--          <el-select v-model="formInline.region">-->
<!--            <el-option label="0" value="0"></el-option>-->
<!--            <el-option label="25" value="25"></el-option>-->
<!--            <el-option label="50" value="50"></el-option>-->
<!--            <el-option label="75" value="75"></el-option>-->
<!--            <el-option label="100" value="100"></el-option>-->
<!--          </el-select>-->
<!--        </div>-->
        <div class="detailbtn"  @click="onSubmit">查询</div>
        <div class="detailbtn" @click="dialogVisible = true" >明细表</div>
      </div>
      <div class="boxChart">
        <div style="width:5rem;height:1.5rem" id="popChart" ref="main">
        </div>
      </div>
    </div>
    <!-- 明细弹框 -->
    <el-dialog :visible.sync="dialogVisible"
               :append-to-body="true"
               :title="this.$attrs.value==='feiqi'?this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName:this.$attrs.getWasteWaterMonitoringDetails[0].OnLineMonEmissPointName"
               width="68%"
               center
               v-dialogDrag
    >
      <div class="el-dialog-div" style="height: 260px">
        <public-detailed-list v-bind="$attrs"></public-detailed-list>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import PublicDetailedList from '@components/BaseNav/PublicBounced/common/echarts/PublicDetailedList'
export default {
  name: 'DayData',
  components: {
    PublicDetailedList
  },
  data () {
    return {
      watchData: [],
      dialogVisible: false,
      myChar: null,
      value: '',
      formInline: {
        user: '',
        region: '',
        timeStart: '2021-03-15 00:00:00',
        timeEnd: '2021-04-13 00:00:00'
      },
      JsonDateWater: {
        datatype: 1,
        id: 'mychart1eff',
        jcdID: '1020',
        legend: [
          {
            name: 'COD',
            icon: 'image://../assets/imgs/legend/SO2.png',
            textStyle: { color: '#CCC' },
            itemWidth: 20,
            itemHeight: 5
          },
          {
            name: '氨氮',
            icon: 'image://../assets/imgs/legend/NOX.png',
            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' },
            itemWidth: 20,
            itemHeight: 5
          }
        ],
        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: [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: 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: [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
          }
        ],
        yname: '浓度(mg/l)'
      }
    }
  },
  mounted () {
    this.onSubmit()
  },
  methods: {
    onSubmit () {
      this.effChartShow(this.JsonDateWater.id, this.JsonDateWater.title, this.JsonDateWater.legend, this.JsonDateWater.xdata, this.JsonDateWater.ydatas, this.JsonDateWater.yname, this.JsonDateWater.id, this.JsonDateWater.datatype)
    },
    effChartShow: function (id, title, legend, xdata, ydatas, yname, jcdID, datatype) {
      this.myChart = this.$echarts.init(this.$refs.main)
      this.myChart.clear()
      var dataUnit = ''
      if (datatype === 1) {
        dataUnit = '流量(m³/d)'
      } else {
        dataUnit = '流量(m³/h)'
      }
      var serLists = []
      for (var i = 0; i < ydatas.length; i++) {
        // var zdcbcolor = ydatas[i].zdcbcolor
        var bz = ydatas[i].bzz
        var obj
        if (bz) {
          obj = {
            name: ydatas[i].name,
            symbol: 'circle', // 折点形状
            symbolSize: 10, // 大小
            smooth: false, // 直线 ,true 为曲线
            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 > biaozhuiz) {
                    return zdcbcolor
                  } else if (c.value > biaozhuiz * 0.9) {
                    return '#FFA500'
                  } else {
                    return '#33c95f'
                  } */
                },
                lineStyle: { // 折线的颜色
                  color: ydatas[i].zxcolor,
                  width: 4
                },
                borderColor: 'black', // 折点边框的颜色
                label: { // 显示值
                  show: false
                }
              }
            },
            type: 'line',
            data: ydatas[i].data,
            markLine: { // 平均值 , 和 指标上限
              symbol: 'none',
              data: [{
                label: {
                  normal: {
                    position: 'end',
                    formatter: ''// ydatas[i].name+'标准值' //+'{c}'
                  }
                },
                name: '标准值',
                yAxis: bz,
                lineStyle: {
                  color: ydatas[i].zxcolor,
                  type: 'dashed',
                  width: 2
                }
              }
              ]
            }
          }
        } else {
          obj = {
            name: ydatas[i].name,
            symbol: 'circle', // 折点形状
            symbolSize: 10, // 大小
            smooth: false, // 直线 ,true 为曲线
            yAxisIndex: 1,
            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 > 9999999) {
                    return zdcbcolor
                  } else {
                    return '#33c95f'
                  } */
                },
                lineStyle: { // 折线的颜色
                  color: ydatas[i].zxcolor,
                  width: 4
                },
                borderColor: 'black', // 折点边框的颜色
                label: { // 显示值
                  show: false
                }
              }
            },
            type: 'line',
            data: ydatas[i].data
          }
        }
        serLists.push(obj)
      }
      var option =
          {
            /*  title: {
              text: title,
          }, */
            tooltip: { // 提示框
              trigger: 'axis',
              axisPointer: {
                type: 'cross',
                label: {
                  color: '#1a4245'
                }
              },
              formatter: function (params) {
                var s = params[0].name + '<br />'
                for (var i = 0; i < params.length; i++) {
                  // var name = params[i].name
                  // 图表title名称
                  var seriesName = params[i].seriesName
                  // 值
                  var value = params[i].value
                  var valueFliter
                  if (value === 'NaN') {
                    valueFliter = ''
                  } else {
                    // 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>'
                  }
                  s += maker + seriesName + ':' + valueFliter + '<br />'
                }
                return s
              }
            },
            toolbox: { // 打印等工具
              show: false,
              feature: {
                saveAsImage: {}
              }
            },
            grid: { // 网格
              top: '20%',
              left: '7%',
              bottom: '11%',
              right: '5%'
            },
            legend: {
              data: legend
            },
            dataZoom: [{
              type: 'inside',
              start: 0,
              end: 100
            }, {
              start: 0,
              end: 100,
              show: false,
              handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
              handleSize: '80%',
              handleStyle: {
                color: '#fff',
                shadowBlur: 3,
                shadowColor: 'rgba(0, 0, 0, 0.6)',
                shadowOffsetX: 2,
                shadowOffsetY: 2
              }
            }],
            xAxis: { // x 轴设置
              type: 'category',
              boundaryGap: false,
              nameTextStyle: {
                fontSize: 10
              },
              axisLabel: { // x轴全部显示
                rotate: 20,
                interval: 0,
                textStyle: {
                  color: '#fff',
                  fontSize: 10
                }
              },
              splitLine: { // 网格垂直线为 虚线
                show: true,
                lineStyle: {
                  type: 'dashed'
                }
              },
              axisTick: { // x 轴刻度显示
                show: false
              },
              axisLine: {
                lineStyle: {
                  color: '#FFFFFF',
                  width: 1// 这里是为了突出显示加上的
                }
              },
              data: xdata
            },
            yAxis: [{
              type: 'value',
              name: yname,
              /* max: function (value) {
                var max_val_list = [] // 所有显示折线的标准值
                if (bzzList && bzzList.length > 0) {
                  $.each(bzzList, function (index, item) {
                    max_val_list.push(item.bzhui)
                  })
                }
                max_val_list = max_val_list.sort(function (a, b) {
                  return a - b
                }) // 排序
                var ma = value.max > max_val_list[max_val_list.length - 1] ? value.max + 5 : max_val_list[max_val_list.length - 1]
                return parseInt(ma)
              }, */
              axisLabel: {
                formatter: '{value}',
                textStyle: {
                  color: '#fff'
                }
              },
              axisPointer: {
                snap: true
              },
              splitLine: {
                show: false
              }, // y轴 网格线不显示,
              axisLine: {
                lineStyle: {
                  color: '#FFFFFF',
                  width: 1// 这里是为了突出显示加上的
                }
              }
            }, {
              type: 'value',
              name: dataUnit,
              axisLabel: {
                formatter: '{value}',
                textStyle: {
                  color: '#fff'
                }
              },
              axisPointer: {
                snap: true
              },
              splitLine: {
                show: false
              }, // y轴 网格线不显示,
              // inverse: true,
              // nameLocation: 'start',
              // max:500,
              axisLine: {
                lineStyle: {
                  color: '#FFFFFF',
                  width: 1// 这里是为了突出显示加上的
                }
              }
            }],
            series: serLists
          }
      this.myChart.setOption(option)
      /* myChart.on('legendselectchanged', function (params) {
        // console.log(params);
        var StdVal = null
        var op = { yAxis: {} }
        if (params.selected.COD) {
          if (bzzList && bzzList.length > 0) {
            for (let i = 0; i < bzzList.length; i++) {
              if (bzzList[i].name == 'COD') {
                StdVal = bzzList[i].bzhui
              }
            }
          }
          op.yAxis.max = function (value) {
            var ma
            if (value.max < StdVal) {
              ma = StdVal
            } else {
              ma = Math.ceil(value.max)
            }
            return ma
          }
        } else if (params.selected['总氮']) {
          if (bzzList && bzzList.length > 0) {
            for (let i = 0; i < bzzList.length; i++) {
              if (bzzList[i].name == '总氮') {
                StdVal = bzzList[i].bzhui
              }
            }
          }
          op.yAxis.max = function (value) {
            var ma
            if (value.max < StdVal) {
              ma = StdVal
            } else {
              ma = Math.ceil(value.max)
            }
            return ma
          }
        } else if (params.selected['氨氮']) {
          if (bzzList && bzzList.length > 0) {
            for (let i = 0; i < bzzList.length; i++) {
              if (bzzList[i].name == '氨氮') {
                StdVal = bzzList[i].bzhui
              }
            }
          }
          op.yAxis.max = function (value) {
            var ma
            if (value.max < StdVal) {
              ma = StdVal
            } else {
              ma = Math.ceil(value.max)
            }
            return ma
          }
        } else if (params.selected['总磷']) {
          if (bzzList && bzzList.length > 0) {
            for (let i = 0; i < bzzList.length; i++) {
              if (bzzList[i].name == '总磷') {
                StdVal = bzzList[i].bzhui
              }
            }
          }
          op.yAxis.max = function (value) {
            var ma
            if (value.max < StdVal) {
              ma = StdVal
            } else {
              ma = Math.ceil(value.max)
            }
            return ma
          }
        }
        myChart.setOption(op)
      }) */
      /**
   * 解决myChart.on('click',function(){...})事件重复触发的问题
   * Date: 20200720
   */
      this.myChart.off('click')
      /**
   *  图标点击事件
   *  20190426 add
   * */
      /* myChart.on('click', function (params) {
        // console.log('[监测点id=%s]',jcdID)
        // 获取当前时间,小时
        var nowHours = new Date().Format('hh')
        // console.log('[当前小时是:%s]',nowHours);
        // 点击折线图折点对应的时间
        // 需要传的时间为
        var _date = null
        if (params.name.indexOf('时') != -1) {
          var hours = params.name.substring(0, params.name.indexOf('时'))
          // console.log('[坐标轴对应的时间为%s]',hours);
          if (parseInt(hours) < parseInt(nowHours)) {
            _date = new Date().Format('yyyy-MM-dd') + ' ' + hours + ':00:00'
          } else {
            var currentDate = new Date()
            // 24小时之前时间
            var stringDate = new Date(currentDate.getTime() - 24 * 60 * 60 * 1000).Format('yyyy-MM-dd')
            _date = stringDate + ' ' + hours + ':00:00'
          }
          // console.log('[需要传递的时间为:%s]',_date);
        } else if (params.name.indexOf('日') != -1) {
          var day = params.name.substring(0, params.name.indexOf('日') - 1)
          _date = new Date().Format('yyyy-MM') + '-' + day.trim()
        }
        // todo 调接口 查凭证
        if (params.color != 'red') {
          var poltMtrlId
          var monItemId = 28
          for (var i = 0; i < wrwIDS.length; i++) {
            if (params.seriesName == wrwIDS[i].name) {
              poltMtrlId = wrwIDS[i].id
            }
          }
          getCBMX(jcdID, poltMtrlId, monItemId, _date, function (res) {
            createDivByMouse(res, params.event)
          })
        }
        // createDivByMouse("s",params.event);
      }) */
    },
    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()
      }
    }
  }
}
</script>
<style scoped lang="less">
//.animation{
//  padding: 0 1rem;
//  overflow: hidden;
//  //width: 1rem;
//  .infomation{
//    display: flex;
//    //margin: 0 1rem;
//    overflow: hidden;
//    animation: move 1s linear 0s infinite;
//    @keyframes move {
//      0% {
//      }
//      100% {
//        transform: translateX(-10%);
//      }
//    }
//    /* 鼠标经过marquee 就停止动画 */
//    &:hover {
//      //z-index: 9999999;
//      animation-play-state: paused;
//    }
//  }
//}
.grid-content{
  font-size: 8px;
  background-color: #2e4967;
  text-align: center;
  border-radius: 2px;
  margin-right: 10px;
  padding:0 10px
}
.infomation {
  padding: 5px 10px;
}
.form-echrts {
  width: 100%;
  border-top: 1px solid #396d83;
  //margin: 10px 10px 10px 10px;
  .from-search{
    display: flex;
    padding:5px;
    >div{margin-left: 10px}
    .pickerMon{
      display: flex;
      >div:first-child {
        margin-right: 10px;
      }
      .pickerData{
        flex: 1;
        display: flex;
        >span{line-height: 22px}
        .pickerTable {
          margin-left: 3px;
        }
      }
    }
    /deep/.el-date-editor--datetime{
      width: 100%;
    }
    /deep/.el-input__inner{
      position: relative;
      width:140px;
      background-color: #2e4967;
      color: #ffffff;
      font-size: 12px;
      height: 24px;
      padding: 0;
      border-color:#00fff6;
      text-align: center;
      //padding-left:20px ;
      //padding: 0!important;
    }
    /deep/.el-input__icon{
      display: block;
      width: 140px;
      height: 22px;
      line-height: 22px;
      cursor: pointer;
      font-size: 0;
    }
    .echatsInput{
      color: #00ffff;
      background-color: #2e4967;
      border: none;
      border-radius: 6px;
      width: 80px;
      height: 22px;
      text-align: center;
    }
    input::-webkit-calendar-picker-indicator {
      opacity: 100;
    }
    .detailbtn{
      background-color:#2e4967;
      text-align: center;
      padding: 0 7px;
      line-height: 24px;
      border-radius: 4px;
      margin-right: 6px;
    }
    .detailbtn:hover{
      box-shadow: 0 0 0.03rem #fff700 !important;
      color:#fff700 !important;
      cursor: pointer;
    }
  }
  .el-dialog-div {
    //height: 50vh!important;
    overflow: auto;
    //overflow: hidden;
  }
  #popChart {
    margin: 0;
    padding: 0;
  }
}
</style>
src/components/BaseNav/WasteWater/Detail.vue
New file
@@ -0,0 +1,311 @@
<template>
<!--  <el-table :data="tableData" style="width:730px" height="200px">-->
<!--    <el-table-column v-for="(item, index) in tableLabel" :key="index" :prop="item.prop"-->
<!--                     :label="item.label">-->
<!--       <el-table-column v-for="(item1, index1) in item.label" :key="index1" :prop="item1.prop" :label="item1.label">-->
<!--      </el-table-column>-->
<!--    </el-table-column>-->
<!--  </el-table>-->
  <div style="width: 5.9rem">
  <el-table
      :data="tableData"
      max-height="255px"
      style="width: 100%;height: 100%">
    <el-table-column
        prop="date"
        width="130"
        label="检测时间">
    </el-table-column>
    <el-table-column
        label="BOD5">
      <el-table-column
          prop="codWatch"
          label="监测值">
      </el-table-column>
      <el-table-column
          prop="codTime"
          label="标准值">
      </el-table-column>
    </el-table-column>
    <el-table-column
        label="COD">
      <el-table-column
          prop="phWatch"
          label="监测值">
      </el-table-column>
      <el-table-column
          prop="codTime"
          label="标准值">
      </el-table-column>
    </el-table-column>
    <el-table-column
        label="PH">
      <el-table-column
          prop="bod5Watch"
          label="监测值">
      </el-table-column>
      <el-table-column
          prop="bod5Time"
          label="标准值">
      </el-table-column>
    </el-table-column>
    <el-table-column
        label="氨氮">
      <el-table-column
          prop="adWatch"
          label="监测值">
      </el-table-column>
      <el-table-column
          prop="adTime"
          label="标准值">
      </el-table-column>
    </el-table-column>
    <el-table-column
            label="挥发酚">
      <el-table-column
              prop="adWatch"
              label="监测值">
      </el-table-column>
      <el-table-column
              prop="adTime"
              label="标准值">
      </el-table-column>
    </el-table-column>
    <el-table-column
            label="氟离子">
      <el-table-column
              prop="adWatch"
              label="监测值">
      </el-table-column>
      <el-table-column
              prop="adTime"
              label="标准值">
      </el-table-column>
    </el-table-column>
    <el-table-column
            label="硫化物">
      <el-table-column
              prop="adWatch"
              label="监测值">
      </el-table-column>
      <el-table-column
              prop="adTime"
              label="标准值">
      </el-table-column>
    </el-table-column>
    <el-table-column
            label="石油类">
      <el-table-column
              prop="adWatch"
              label="监测值">
      </el-table-column>
      <el-table-column
              prop="adTime"
              label="标准值">
      </el-table-column>
    </el-table-column>
    <el-table-column
            label="悬浮物">
      <el-table-column
              prop="adWatch"
              label="监测值">
      </el-table-column>
      <el-table-column
              prop="adTime"
              label="标准值">
      </el-table-column>
    </el-table-column>
  </el-table>
  </div>
</template>
<script>
export default {
  name: 'Detail',
  data () {
    return {
      tableData: [{
        date: '2016-05-03 12:00:00',
        codWatch: '7.23',
        codTime: '-',
        phWatch: '0.43',
        phTime: '9.21',
        bod5Watch: '7.12',
        bod5Time: '-',
        adWatch: '0.23',
        adTime: '-'
      },
      {
        date: '2016-05-03 12:00:15',
        codWatch: '-',
        codTime: '5.32',
        phWatch: '-',
        phTime: '0.23',
        bod5Watch: '1',
        bod5Time: '9.88',
        adWatch: '1.76',
        adTime: '-'
      },
      {
        date: '2016-05-03 12:00:30',
        codWatch: '-',
        codTime: '0.92',
        phWatch: '-',
        phTime: '8.71',
        bod5Watch: '0.72',
        bod5Time: '-',
        adWatch: '6.23',
        adTime: '0.86'
      },
      {
        date: '2016-05-03 12:01:15',
        codWatch: '10.22',
        codTime: '-',
        phWatch: '-',
        phTime: '0.92',
        bod5Watch: '0.82',
        bod5Time: '-',
        adWatch: '23.82',
        adTime: '-'
      },
      {
        date: '2016-05-03 12:01:30',
        codWatch: '0.31',
        codTime: '-',
        phWatch: '-',
        phTime: '6.12',
        bod5Watch: '0.31',
        bod5Time: '-',
        adWatch: '0.21',
        adTime: '-'
      },
      {
        date: '2016-05-03 12:02:15',
        codWatch: '9.22',
        codTime: '-',
        phWatch: '-',
        phTime: '-',
        bod5Watch: '-',
        bod5Time: '0.72',
        adWatch: '-',
        adTime: '17.23'
      },
      {
        date: '2016-05-03 12:02:30',
        codWatch: '-',
        codTime: '-',
        phWatch: '0.83',
        phTime: '-',
        bod5Watch: '23.22',
        bod5Time: '-',
        adWatch: '-',
        adTime: '-'
      },
      {
        date: '2016-05-03 12:03:15',
        codWatch: '8.74',
        codTime: '-',
        phWatch: '-',
        phTime: '13.22',
        bod5Watch: '-',
        bod5Time: '0.23',
        adWatch: '-',
        adTime: '-'
      },
      {
        date: '2016-05-03 12:03:30',
        codWatch: '0.82',
        codTime: '-',
        phWatch: '-',
        phTime: '-',
        bod5Watch: '-',
        bod5Time: '32.42',
        adWatch: '-',
        adTime: '0.88'
      },
      {
        date: '2016-05-03 12:04:15',
        codWatch: '-',
        codTime: '-',
        phWatch: '0.71',
        phTime: '-',
        bod5Watch: '-',
        bod5Time: '15.83',
        adWatch: '-',
        adTime: '24.82'
      },
      {
        date: '2016-05-03 12:04:30',
        codWatch: '-',
        codTime: '19.65',
        phWatch: '29.22',
        phTime: '-',
        bod5Watch: '0.98',
        bod5Time: '-',
        adWatch: '-',
        adTime: '-'
      },
      {
        date: '2016-05-03 12:05:15',
        codWatch: '19.32',
        codTime: '-',
        phWatch: '-',
        phTime: '-',
        bod5Watch: '-',
        bod5Time: '12.21',
        adWatch: '-',
        adTime: '-'
      },
      {
        date: '2016-05-03 12:05:30',
        codWatch: '10.53',
        codTime: '-',
        phWatch: '-',
        phTime: '-',
        bod5Watch: '-',
        bod5Time: '23.71',
        adWatch: '-',
        adTime: '10.55'
      },
      {
        date: '2016-05-03 12:06:15',
        codWatch: '31.63',
        codTime: '-',
        phWatch: '-',
        phTime: '-',
        bod5Watch: '-',
        bod5Time: '0.56',
        adWatch: '-',
        adTime: '-'
      },
      {
        date: '2016-05-03 12:06:30',
        codWatch: '19.53',
        codTime: '-',
        phWatch: '-',
        phTime: '-',
        bod5Watch: '-',
        bod5Time: '0.28',
        adWatch: '-',
        adTime: '0.75'
      }]
    }
  },
  created () {
    // this.$nextTick(() => {
    //   this.$attrs.ManualData.forEach(item => {
    //     this.tableData = [...item]
    //   })
    //   this.tableData.LabMonTime = 100
    //   console.log(this.tableData)
    // })
  }
}
</script>
<style scoped>
.el-table--border::after, .el-table--group::after, .el-table::before{
  background: none;
}
</style>
src/components/BaseNav/WasteWater/HourData.vue
New file
@@ -0,0 +1,699 @@
<!--  小时数据  -->
<template>
    <div id="Tab">
        <div class="infomation">
          <div>
            <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>
        <div class="form-echrts">
            <div class="from-search">
                <div class="pickerMon">
                    <div class="pickerData">
                        <span> 开始时间:</span>
                        <span class="pickerTable">
                          <el-date-picker type="datetime" v-model="formInline.timeStart">
                      </el-date-picker>
                      </span>
                    </div>
                    <div class="pickerData">
                        <span >结束时间:</span>
                        <span class="pickerTable">
                        <el-date-picker type="datetime" v-model="formInline.timeEnd">
                      </el-date-picker>
                      </span>
                    </div>
                </div>
<!--                <div>-->
<!--                    采样点数:-->
<!--                    <el-select v-model="formInline.region">-->
<!--                        <el-option label="0" value="0"></el-option>-->
<!--                        <el-option label="25" value="25"></el-option>-->
<!--                        <el-option label="50" value="50"></el-option>-->
<!--                        <el-option label="75" value="75"></el-option>-->
<!--                        <el-option label="100" value="100"></el-option>-->
<!--                    </el-select>-->
<!--                </div>-->
                <div class="detailbtn"  @click="onSubmit">查询</div>
                <div class="detailbtn" @click="dialogVisible = true" >明细表</div>
             </div>
            <div class="boxChart">
                <div style="width: 5rem;height:1.5rem;" id="echarts" ref="main"></div>
            </div>
        </div>
        <!-- 明细弹框 -->
        <el-dialog :visible.sync="dialogVisible"
                   :append-to-body="true"
                   :title="this.$attrs.value==='feiqi'?this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName:this.$attrs.getWasteWaterMonitoringDetails[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>
</template>
<script>
import PublicDetailedList from '@components/BaseNav/PublicBounced/common/echarts/PublicDetailedList'
// import dayjs from 'dayjs'
export default {
  name: 'ECharts',
  components: {
    PublicDetailedList
  },
  data () {
    return {
      watchData: [],
      dialogVisible: false,
      myChar: null,
      value: '',
      formInline: {
        region: '',
        timeStart: '2021-04-12 10:00:00',
        timeEnd: '2021-04-13 09:00:00'
      },
      myChart: null,
      JsonHourWater: {
        id: 'mycharteff',
        title: '',
        jcdID: '1020',
        legend: [
          {
            icon: 'image://../assets/imgs/legend/SO2.png',
            itemHeight: 5,
            itemWidth: 20,
            name: 'COD',
            testStyle: {
              color: '#ccc'
            }
          },
          {
            icon: 'image://../assets/imgs/legend/NOX.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '氨氮',
            testStyle: {
              color: '#ccc'
            }
          },
          {
            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,
            name: '废水流量',
            testStyle: {
              color: '#ccc'
            }
          }
        ],
        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: [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)',
        datatype: 2
      }
    }
  },
  mounted () {
    this.onSubmit()
    // this.formInline.timeEnd = dayjs().format('YYYY-MM-DD HH:mm:ss')
    // this.formInline.timeStart = dayjs().subtract(12, 'hour').format('YYYY-MM-DD HH:mm:ss')
    // this.onSubmit()
  },
  updated () {
    this.onSubmit()
  },
  methods: {
    onSubmit () {
      this.effChartShow()
    },
    effChartShow: function () {
      // var id = this.JsonHourWater.id
      // var title = this.JsonHourWater.title
      var legend = this.JsonHourWater.legend
      var xdata = this.JsonHourWater.xdata
      var ydatas = this.JsonHourWater.ydatas
      var yname = this.JsonHourWater.yname
      // var jcdId = this.JsonHourWater.jcdID
      var datatype = this.JsonHourWater.datatype
      this.myChart = this.$echarts.init(this.$refs.main)
      this.myChart.clear()
      var dataUnit = ''
      if (datatype === 1) {
        dataUnit = '流量(m³/d)'
      } else {
        dataUnit = '流量(m³/h)'
      }
      var serLists = []
      for (var j = 0; j < ydatas.length; j++) {
        var len = ydatas[j].data.length
        for (var k = 0; k < len; k++) {
          var it = ydatas[j].data[k]
          var it2 = parseFloat(it).toFixed(2)
          ydatas[j].data[k] = it2
        }
      }
      for (var i = 0; i < ydatas.length; i++) {
        // var zdcbcolor = ydatas[i].zdcbcolor
        var bz = ydatas[i].bzz
        var obj
        if (bz) {
          obj = {
            name: ydatas[i].name,
            symbol: 'circle', // 折点形状
            symbolSize: 10, // 大小
            smooth: false, // 直线 ,true 为曲线
            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 > biaozhuiz) {
                    return zdcbcolor
                  } else if (c.value > biaozhuiz * 0.9) {
                    return '#FFA500'
                  } else {
                    return '#33c95f'
                  } */
                },
                lineStyle: { // 折线的颜色
                  color: ydatas[i].zxcolor,
                  width: 5
                },
                borderColor: 'black', // 折点边框的颜色
                label: { // 显示值
                  show: false
                }
              }
            },
            type: 'line',
            data: ydatas[i].data,
            markLine: { // 平均值  和 指标上限
              symbol: 'none',
              data: [{
                label: {
                  normal: {
                    position: 'end',
                    formatter: '' // ydatas[i].name+'标准值' //+'{c}'
                  }
                },
                name: '标准值',
                yAxis: bz,
                lineStyle: {
                  color: ydatas[i].zxcolor,
                  type: 'dashed',
                  width: 2
                }
              }
              ]
            }
          }
        } else {
          obj = {
            name: ydatas[i].name,
            symbol: 'circle', // 折点形状
            symbolSize: 10, // 大小
            smooth: false, // 直线 ,true 为曲线
            yAxisIndex: 1,
            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 > 9999999) {
                    return zdcbcolor
                  } else {
                    return '#33c95f'
                  } */
                },
                lineStyle: { // 折线的颜色
                  color: ydatas[i].zxcolor,
                  width: 4
                },
                borderColor: 'black', // 折点边框的颜色
                label: { // 显示值
                  show: false
                }
              }
            },
            type: 'line',
            data: ydatas[i].data
          }
        }
        serLists.push(obj)
      }
      var option =
    {
      /*  title: {
        text: title,
    }, */
      tooltip: { // 提示框
        trigger: 'axis',
        axisPointer: {
          type: 'cross',
          label: {
            color: '#1a4245'
          }
        },
        formatter: function (params) {
          var s = params[0].name + '<br />'
          for (var i = 0; i < params.length; i++) {
            // var name = params[i].name
            // 图表title名称
            var seriesName = params[i].seriesName
            // 值
            var value = params[i].value
            var valueFliter
            if (value === 'NaN') {
              valueFliter = ''
            } else {
              // 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>'
            }
            s += maker + seriesName + ':' + valueFliter + '<br />'
          }
          return s
        }
      },
      toolbox: { // 打印等工具
        show: false,
        feature: {
          saveAsImage: {}
        }
      },
      grid: { // 网格
        top: '20%',
        left: '7%',
        bottom: '10%',
        right: '5%'
      },
      legend: {
        data: legend,
        textStyle: {
          color: '#fff'
        }
      },
      dataZoom: [{
        type: 'inside',
        start: 0,
        end: 100
      }, {
        start: 0,
        end: 100,
        show: false,
        handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
        handleSize: '80%',
        handleStyle: {
          color: '#fff',
          shadowBlur: 3,
          shadowColor: 'rgba(0, 0, 0, 0.6)',
          shadowOffsetX: 2,
          shadowOffsetY: 2
        }
      }],
      xAxis: { // x 轴设置
        type: 'category',
        boundaryGap: false,
        axisLabel: { // x轴全部显示
          rotate: 20,
          interval: 0,
          textStyle: {
            color: '#fff',
            fontSize: 10
          }
        },
        splitLine: { // 网格垂直线为 虚线
          show: true,
          lineStyle: {
            type: 'dashed'
          }
        },
        axisTick: { // x 轴刻度显示
          show: false
        },
        axisLine: {
          lineStyle: {
            color: '#FFFFFF',
            width: 1// 这里是为了突出显示加上的
          }
        },
        data: xdata
      },
      yAxis: [{
        type: 'value',
        name: yname,
        /* max: function (value) {
          var max_val_list = [] // 所有显示折线的标准值
          if (bzzList && bzzList.length > 0) {
            $.each(bzzList, function (index, item) {
              max_val_list.push(item.bzhui)
            })
          }
          max_val_list = max_val_list.sort(function (a, b) {
            return a - b
          }) // 排序
          var ma = value.max > max_val_list[max_val_list.length - 1] ? value.max + 5 : max_val_list[max_val_list.length - 1]
          return parseInt(ma)
        }, */
        axisLabel: {
          formatter: '{value}',
          textStyle: {
            color: '#fff'
          }
        },
        axisPointer: {
          snap: true
        },
        splitLine: {
          show: false
        }, // y轴 网格线不显示,
        axisLine: {
          lineStyle: {
            color: '#FFFFFF',
            width: 1// 这里是为了突出显示加上的
          }
        }
      }, {
        type: 'value',
        name: dataUnit,
        axisLabel: {
          formatter: '{value}',
          textStyle: {
            color: '#fff'
          }
        },
        axisPointer: {
          snap: true
        },
        splitLine: {
          show: false
        }, // y轴 网格线不显示,
        // inverse: true,
        // nameLocation: 'start',
        // max:500,
        axisLine: {
          lineStyle: {
            color: '#FFFFFF',
            width: 1// 这里是为了突出显示加上的
          }
        }
      }],
      series: serLists
    }
      this.myChart.setOption(option)
      /*
      myChart.on('legendselectchanged', function (params) {
        // console.log(params);
        var StdVal = null
        var op = { yAxis: {} }
        if (params.selected.COD) {
          if (bzzList && bzzList.length > 0) {
            for (let i = 0; i < bzzList.length; i++) {
              if (bzzList[i].name == 'COD') {
                StdVal = bzzList[i].bzhui
              }
            }
          }
          op.yAxis.max = function (value) {
            var ma
            if (value.max < StdVal) {
              ma = StdVal
            } else {
              ma = Math.ceil(value.max)
            }
            return ma
          }
        } else if (params.selected['总氮']) {
          if (bzzList && bzzList.length > 0) {
            for (let i = 0; i < bzzList.length; i++) {
              if (bzzList[i].name == '总氮') {
                StdVal = bzzList[i].bzhui
              }
            }
          }
          op.yAxis.max = function (value) {
            var ma
            if (value.max < StdVal) {
              ma = StdVal
            } else {
              ma = Math.ceil(value.max)
            }
            return ma
          }
        } else if (params.selected['氨氮']) {
          if (bzzList && bzzList.length > 0) {
            for (let i = 0; i < bzzList.length; i++) {
              if (bzzList[i].name == '氨氮') {
                StdVal = bzzList[i].bzhui
              }
            }
          }
          op.yAxis.max = function (value) {
            var ma
            if (value.max < StdVal) {
              ma = StdVal
            } else {
              ma = Math.ceil(value.max)
            }
            return ma
          }
        } else if (params.selected['总磷']) {
          if (bzzList && bzzList.length > 0) {
            for (let i = 0; i < bzzList.length; i++) {
              if (bzzList[i].name == '总磷') {
                StdVal = bzzList[i].bzhui
              }
            }
          }
          op.yAxis.max = function (value) {
            var ma
            if (value.max < StdVal) {
              ma = StdVal
            } else {
              ma = Math.ceil(value.max)
            }
            return ma
          }
        }
        myChart.setOption(op)
      })
      */
      /**
   * 解决myChart.on('click',function(){...})事件重复触发的问题
   * Date: 20200720
   */
      this.myChart.off('click')
      /**
   *  图标点击事件
   *  20190426 add
   * */
      /* myChart.on('click', function (params) {
        // console.log('[监测点id=%s]',jcdID)
        // 获取当前时间,小时
        var nowHours = new Date().Format('hh')
        // console.log('[当前小时是:%s]',nowHours);
        // 点击折线图折点对应的时间
        // 需要传的时间为
        var _date = null
        if (params.name.indexOf('时') != -1) {
          var hours = params.name.substring(0, params.name.indexOf('时'))
          // console.log('[坐标轴对应的时间为%s]',hours);
          if (parseInt(hours) < parseInt(nowHours)) {
            _date = new Date().Format('yyyy-MM-dd') + ' ' + hours + ':00:00'
          } else {
            var currentDate = new Date()
            // 24小时之前时间
            var stringDate = new Date(currentDate.getTime() - 24 * 60 * 60 * 1000).Format('yyyy-MM-dd')
            _date = stringDate + ' ' + hours + ':00:00'
          }
          // console.log('[需要传递的时间为:%s]',_date);
        } else if (params.name.indexOf('日') != -1) {
          var day = params.name.substring(0, params.name.indexOf('日') - 1)
          _date = new Date().Format('yyyy-MM') + '-' + day.trim()
        }
        // todo 调接口 查凭证
        if (params.color != 'red') {
          var poltMtrlId
          var monItemId = 28
          for (var i = 0; i < wrwIDS.length; i++) {
            if (params.seriesName == wrwIDS[i].name) {
              poltMtrlId = wrwIDS[i].id
            }
          }
          getCBMX(jcdID, poltMtrlId, monItemId, _date, function (res) {
            createDivByMouse(res, params.event)
          })
        }
        // createDivByMouse("s",params.event);
      }) */
    }
    // 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()
    //   }
    // }
  }
}
</script>
<style scoped lang="less">
.grid-content{
    font-size: 8px;
    background-color: #2e4967;
    text-align: center;
    border-radius: 2px;
    margin-right: 10px;
    padding:0 10px
  //>i{
  //    color: #f00;
  //  }
}
.infomation {
  padding: 5px 10px;
}
.form-echrts {
    width: 100%;
    border-top: 1px solid #396d83;
    //margin: 10px 10px 10px 10px;
    .from-search{
        display: flex;
        padding:5px;
        >div{margin-left: 10px}
        .pickerMon{
            display: flex;
            >div:first-child {
                margin-right: 10px;
            }
            .pickerData{
                flex: 1;
                display: flex;
                >span{line-height: 22px}
                .pickerTable {
                    margin-left: 3px;
                }
            }
        }
        /deep/.el-date-editor--datetime{
            width: 100%;
        }
        /deep/.el-input__inner{
            position: relative;
            width:140px;
            background-color: #2e4967;
            color: #ffffff;
            font-size: 12px;
            height: 24px;
            padding: 0;
            border-color:#00fff6;
            text-align: center;
            //padding-left:20px ;
            //padding: 0!important;
        }
        /deep/.el-input__icon{
            display: block;
            width: 140px;
            height: 22px;
            line-height: 22px;
            cursor: pointer;
            font-size: 0;
        }
        .echatsInput{
            color: #00ffff;
            background-color: #2e4967;
            border: none;
            border-radius: 6px;
            width: 80px;
            height: 22px;
            text-align: center;
        }
        input::-webkit-calendar-picker-indicator {
            opacity: 100;
        }
        .detailbtn{
            background-color:#2e4967;
            text-align: center;
            padding: 0 7px;
            line-height: 24px;
            border-radius: 4px;
            margin-right: 6px;
        }
        .detailbtn:hover{
            box-shadow: 0 0 0.03rem #fff700 !important;
            color:#fff700 !important;
            cursor: pointer;
        }
    }
    .el-dialog-div {
        overflow: auto;
    }
    #echarts {
        margin: 0;
        padding: 0;
    }
}
</style>
src/components/BaseNav/WasteWater/PublicTabs.vue
New file
@@ -0,0 +1,127 @@
<template>
  <div class="win">
    <div class="border_corner border_corner_left_top"></div>
    <div class="border_corner border_corner_right_top"></div>
    <div class="border_corner border_corner_left_bottom"></div>
    <div class="border_corner border_corner_right_bottom"></div>
    <div class="main">
      <div class="main-matter">
        <div>
          <ul>
            <!--            <li>场所名称:{{ setSolidWaste.StoragePlaceName }}</li>-->
            <!--            <li>贮存能力:{{ setSolidWaste.StorageQty }}(吨)</li>-->
            <!--            <li>剩余贮存能力:{{ setSolidWaste.SurplusFloorArea }}(吨)</li>-->
            <!--            <li>占地面积(㎡):{{ setSolidWaste.DesignFloorArea }}(㎡)</li>-->
            <!--            <li>最近贮存日期:{{ setSolidWaste.StorageDate }}</li>-->
            <!--            <li class="lastli"></li>-->
            <li v-for="(item,index) in tabList" :key="index"></li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'GasTable',
  props: ['setSolidWaste', 'value', 'setWasteGasdata', 'setWasteWaterdata'],
  data () {
    return {
      tabList: []
    }
  },
  methods: {
    // async getTabsData () {
    //   // 基本信息 和 详细信息 展示数据所需参数
    //   const dataValue = {
    //     StoragePlaceId: e.layer.options.totransferData.StoragePlaceId
    //   }
    //   // 基本信息 tabs
    //   const resultBasic = await mapApi.getSolidWasteBaseInfo(dataValue)
    // }
  }
}
</script>
<style scoped lang="less">
.win {
  position: relative;
  margin-bottom: 0.04rem;
  background-color: @background-color;
}
.main {
  .main-matter {
    font-size: 0.06rem;
    font-weight: normal;
    padding: 0.04rem 0;
    border: 1px solid #396d83;
    ul {
      //width: 100%;
      //height: 100%;
      display: flex;
      align-items: center;
      justify-content: space-around;
      flex-wrap: wrap;
      margin-bottom: -0.04rem;
      li {
        margin-bottom: 0.04rem;
        text-align: center;
        min-width: 31%;
        background-color: #243a55;
        color: #00d0f9;
        border-radius: 0.02rem;
        font-size: 0.08rem;
        line-height: 0.09rem;
        padding: 0.03rem .5%;
      }
      .lastli {
        visibility: hidden
      }
    }
  }
}
.border_corner {
  z-index: 999;
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(0, 0, 0, 0);
  border: 1px solid #47d5ea;
}
.border_corner_left_top {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}
.border_corner_right_top {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
}
.border_corner_left_bottom {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
}
.border_corner_right_bottom {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}
</style>
src/components/BaseNav/WasteWater/PublicVideo.vue
New file
@@ -0,0 +1,80 @@
<template>
  <div class="win">
    <!-- 四个角的边框效果 -->
    <div class="border_corner border_corner_left_top"></div>
    <div class="border_corner border_corner_right_top"></div>
    <div class="border_corner border_corner_left_bottom"></div>
    <div class="border_corner border_corner_right_bottom"></div>
    <div class="main">
      <!--      <div class="main-video">-->
      <video controls>
        <source src="movie.mp4" type="video/mp4">
        <source src="movie.ogg" type="video/ogg">
      </video>
      <!--      </div>-->
    </div>
  </div>
</template>
<script>
export default {
  name: 'GasVideo'
}
</script>
<style scoped lang="less">
.win {
  position: relative;
  background-color: rgba(33, 41, 69, 0.9);
  //height: 2rem;
}
.main {
  border: 1px solid #396d83;
  width: 2.5rem;
  height: 2.5rem;
  video {
    width: 100%;
    height: 100%;
    outline: none;
  }
}
.border_corner {
  z-index: 999;
  position: absolute;
  width: 14px;
  height: 14px;
  background: rgba(0, 0, 0, 0);
  border: 1px solid #47d5ea;
}
.border_corner_left_top {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}
.border_corner_right_top {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
}
.border_corner_left_bottom {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
}
.border_corner_right_bottom {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}
</style>
src/components/BaseNav/WasteWater/RealTimeEcharts.vue
New file
@@ -0,0 +1,942 @@
<!--  废水实时数据  -->
<template>
  <div id="Tab">
    <div class="animation">
      <div class="infomation">
        <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>
    <div class="form-echrts">
      <div class="from-search">
        <div class="pickerMon">
          <div class="pickerData">
            <span> 开始时间:</span>
            <span class="pickerTable">
              <el-date-picker type="datetime" v-model="formInline.timeStart">
              </el-date-picker>
            </span>
          </div>
          <div class="pickerData">
            <span >结束时间:</span>
            <span class="pickerTable">
              <el-date-picker type="datetime" v-model="formInline.timeEnd">
              </el-date-picker>
            </span>
          </div>
        </div>
        <div>
          采样点数:
          <el-select v-model="formInline.region" placeholder="50">
            <el-option label="0" value="0"></el-option>
            <el-option label="25" value="25"></el-option>
            <el-option label="50" value="50"></el-option>
            <el-option label="75" value="75"></el-option>
            <el-option label="100" value="100"></el-option>
          </el-select>
        </div>
        <div class="detailbtn"  @click="onSubmit">查询</div>
      </div>
      <div class="boxChart">
        <div style="width: 5rem;height: 1.5rem;" id="popChart" ref="main"></div>
      </div>
    </div>
  </div>
</template>
<script>
import 'dayjs/locale/es'
import dayjs from 'dayjs'
export default {
  name: 'RealTimeEcharts',
  data () {
    return {
      value1: '',
      value2: '',
      watchData: [],
      dialogVisible: false,
      myChar: null,
      RealTimeChart: null,
      value: '',
      days: dayjs(new Date()).format('YYYYMMDDHHmmss'),
      formInline: {
        region: '',
        timeStart: '2021-04-13 12:47:18',
        timeEnd: '2021-04-13 12:52:18'
      },
      JsonRealWasteWater: {
        id: 'mycharteff_second ',
        title: 'COD',
        legend: [
          {
            icon: 'image://../assets/imgs/legend/NOX.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '氨氮',
            textStyle: { color: '#ccc' }
          },
          {
            icon: 'image://../assets/imgs/legend/YanChen.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '总磷',
            textStyle: { color: '#ccc' }
          },
          {
            icon: 'image://../assets/imgs/legend/SO2.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '总氮',
            textStyle: { color: '#ccc' }
          },
          {
            icon: 'image://../assets/imgs/legend/NOX.png',
            itemHeight: 5,
            itemWidth: 20,
            name: 'COD',
            textStyle: { color: '#ccc' }
          },
          {
            icon: 'image://../assets/imgs/legend/VOCs.png',
            itemHeight: 5,
            itemWidth: 20,
            name: '废水流量',
            textStyle: { color: '#ccc' }
          }
        ],
        ydatas: [
          {
            name: '氮氧',
            data: [{ name: '氮氧', value: ['2021/04/13 12:47:18', 0.1900156] },
              { name: '氮氧', value: ['2021/04/13 12:47:33', 0.1902795] },
              { name: '氮氧', value: ['2021/04/13 12:47:48', 0.1892689] },
              { name: '氮氧', value: ['2021/04/13 12:48:03', 0.1882582] },
              { name: '氮氧', value: ['2021/04/13 12:48:18', 0.1882284] },
              { name: '氮氧', value: ['2021/04/13 12:48:33', 0.1886617] },
              { name: '氮氧', value: ['2021/04/13 12:48:48', 0.1873395] },
              { name: '氮氧', value: ['2021/04/13 12:49:03', 0.1866319] },
              { name: '氮氧', value: ['2021/04/13 12:49:18', 0.1895212] },
              { name: '氮氧', value: ['2021/04/13 12:49:33', 0.1898232] },
              { name: '氮氧', value: ['2021/04/13 12:49:48', 0.1880916] },
              { name: '氮氧', value: ['2021/04/13 12:50:03', 0.1883546] },
              { name: '氮氧', value: ['2021/04/13 12:50:18', 0.1907846] },
              { name: '氮氧', value: ['2021/04/13 12:50:33', 0.1887416] },
              { name: '氮氧', value: ['2021/04/13 12:50:48', 0.1873472] },
              { name: '氮氧', value: ['2021/04/13 12:51:03', 0.1886214] },
              { name: '氮氧', value: ['2021/04/13 12:51:18', 0.1891896] },
              { name: '氮氧', value: ['2021/04/13 12:51:33', 0.1891176] },
              { name: '氮氧', value: ['2021/04/13 12:51:48', 0.1890455] },
              { name: '氮氧', value: ['2021/04/13 12:52:03', 0.1889734] },
              { name: '氮氧', value: ['2021/04/13 12:52:18', 0.1889014] }],
            zdcbcolor: 'red',
            zxcolor: '#00B0F0',
            bzz: 3
          },
          {
            name: '总磷',
            data: [{ name: '总磷', value: ['2021/04/13 12:47:18', 0.03813388] },
              { name: '总磷', value: ['2021/04/13 12:47:33', 0.03813333] },
              { name: '总磷', value: ['2021/04/13 12:47:48', 0.03813278] },
              { name: '总磷', value: ['2021/04/13 12:48:03', 0.03813223] },
              { name: '总磷', value: ['2021/04/13 12:48:18', 0.03813168] },
              { name: '总磷', value: ['2021/04/13 12:48:33', 0.03813113] },
              { name: '总磷', value: ['2021/04/13 12:48:48', 0.03813057] },
              { name: '总磷', value: ['2021/04/13 12:49:03', 0.03813003] },
              { name: '总磷', value: ['2021/04/13 12:49:18', 0.03812947] },
              { name: '总磷', value: ['2021/04/13 12:49:33', 0.03812892] },
              { name: '总磷', value: ['2021/04/13 12:49:48', 0.03812837] },
              { name: '总磷', value: ['2021/04/13 12:50:03', 0.03812782] },
              { name: '总磷', value: ['2021/04/13 12:50:18', 0.03812727] },
              { name: '总磷', value: ['2021/04/13 12:50:33', 0.03812672] },
              { name: '总磷', value: ['2021/04/13 12:50:48', 0.03812617] },
              { name: '总磷', value: ['2021/04/13 12:51:03', 0.03812562] },
              { name: '总磷', value: ['2021/04/13 12:51:18', 0.03812507] },
              { name: '总磷', value: ['2021/04/13 12:51:33', 0.03812452] },
              { name: '总磷', value: ['2021/04/13 12:51:48', 0.03812397] },
              { name: '总磷', value: ['2021/04/13 12:52:03', 0.03812342] },
              { name: '总磷', value: ['2021/04/13 12:52:18', 0.03812287] }],
            zdcbcolor: 'red',
            zxcolor: '#f48183',
            bzz: 0.3
          },
          {
            name: '总氮',
            data: [{ name: '总氮', value: ['2021/04/13 12:47:18', 2.779342] },
              { name: '总氮', value: ['2021/04/13 12:47:33', 2.779337] },
              { name: '总氮', value: ['2021/04/13 12:47:48', 2.779331] },
              { name: '总氮', value: ['2021/04/13 12:48:03', 2.779823] },
              { name: '总氮', value: ['2021/04/13 12:48:18', 2.779321] },
              { name: '总氮', value: ['2021/04/13 12:48:33', 2.779344] },
              { name: '总氮', value: ['2021/04/13 12:48:48', 2.779452] },
              { name: '总氮', value: ['2021/04/13 12:49:03', 2.779224] },
              { name: '总氮', value: ['2021/04/13 12:49:18', 2.779133] },
              { name: '总氮', value: ['2021/04/13 12:49:33', 2.779445] },
              { name: '总氮', value: ['2021/04/13 12:49:48', 2.779743] },
              { name: '总氮', value: ['2021/04/13 12:50:03', 2.779332] },
              { name: '总氮', value: ['2021/04/13 12:50:18', 2.779562] },
              { name: '总氮', value: ['2021/04/13 12:50:33', 2.779560] },
              { name: '总氮', value: ['2021/04/13 12:50:48', 2.779534] },
              { name: '总氮', value: ['2021/04/13 12:51:03', 2.779412] },
              { name: '总氮', value: ['2021/04/13 12:51:18', 2.779673] },
              { name: '总氮', value: ['2021/04/13 12:51:33', 2.779452] },
              { name: '总氮', value: ['2021/04/13 12:51:48', 2.779397] },
              { name: '总氮', value: ['2021/04/13 12:52:03', 2.779342] },
              { name: '总氮', value: ['2021/04/13 12:52:18', 2.779287] }],
            zdcbcolor: 'red',
            zxcolor: '#e0ffff',
            bzz: 15
          },
          {
            name: '废水流量',
            data: [{ name: '废水流量', value: ['2021/04/13 12:47:18', 31.63029] },
              { name: '废水流量', value: ['2021/04/13 12:47:33', 31.9791] },
              { name: '废水流量', value: ['2021/04/13 12:47:48', 31.92095] },
              { name: '废水流量', value: ['2021/04/13 12:48:03', 32.05784] },
              { name: '废水流量', value: ['2021/04/13 12:48:18', 32.01669] },
              { name: '废水流量', value: ['2021/04/13 12:48:33', 32.39344] },
              { name: '废水流量', value: ['2021/04/13 12:48:48', 32.66452] },
              { name: '废水流量', value: ['2021/04/13 12:49:03', 32.45224] },
              { name: '废水流量', value: ['2021/04/13 12:49:18', 32.42133] },
              { name: '废水流量', value: ['2021/04/13 12:49:33', 32.88445] },
              { name: '废水流量', value: ['2021/04/13 12:49:48', 32.36743] },
              { name: '废水流量', value: ['2021/04/13 12:50:03', 32.83332] },
              { name: '废水流量', value: ['2021/04/13 12:50:18', 32.15562] },
              { name: '废水流量', value: ['2021/04/13 12:50:33', 32.61560] },
              { name: '废水流量', value: ['2021/04/13 12:50:48', 32.89534] },
              { name: '废水流量', value: ['2021/04/13 12:51:03', 32.72412] },
              { name: '废水流量', value: ['2021/04/13 12:51:18', 32.48673] },
              { name: '废水流量', value: ['2021/04/13 12:51:33', 32.03452] },
              { name: '废水流量', value: ['2021/04/13 12:51:48', 32.93397] },
              { name: '废水流量', value: ['2021/04/13 12:52:03', 32.84342] },
              { name: '废水流量', value: ['2021/04/13 12:52:18', 32.16287] }],
            zdcbcolor: 'red',
            zxcolor: '#9ACD32',
            bzz: null
          },
          {
            name: 'COD',
            data: [{ name: 'COD', value: ['2021/04/13 12:47:18', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:47:33', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:47:48', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:48:03', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:48:18', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:48:33', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:48:48', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:49:03', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:49:18', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:49:33', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:49:48', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:50:03', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:50:18', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:50:33', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:50:48', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:51:03', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:51:18', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:51:33', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:51:48', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:52:03', 11.24385] },
              { name: 'COD', value: ['2021/04/13 12:52:18', 11.24385] }],
            zdcbcolor: 'red',
            zxcolor: '#fff21c',
            bzz: 35
          }
        ],
        yname: ' 浓度(mg/l)'
      },
      JSONTimeData: {
        id: 21,
        unionTagCodeList: ['TJIP45.rl3AT25035', 'TJIP45.rl3AT25033', 'TJIP45.rl3FT35032', 'TJIP45.rl3AT25034']
      },
      res: [{ UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 36.02153, ReadTime: '2021/04/14 03:59:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 35.7473, ReadTime: '2021/04/14 03:59:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 35.56014, ReadTime: '2021/04/14 04:00:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 35.59335, ReadTime: '2021/04/14 04:00:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 34.49617, ReadTime: '2021/04/14 04:00:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 34.33835, ReadTime: '2021/04/14 04:00:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 34.93116, ReadTime: '2021/04/14 04:01:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 35.831, ReadTime: '2021/04/14 04:01:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 36.67476, ReadTime: '2021/04/14 04:01:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 38.04687, ReadTime: '2021/04/14 04:01:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 37.78848, ReadTime: '2021/04/14 04:02:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 38.03456, ReadTime: '2021/04/14 04:02:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 37.81089, ReadTime: '2021/04/14 04:02:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 39.28693, ReadTime: '2021/04/14 04:02:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 39.79956, ReadTime: '2021/04/14 04:03:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 40.11547, ReadTime: '2021/04/14 04:03:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 40.72007, ReadTime: '2021/04/14 04:03:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 43.11903, ReadTime: '2021/04/14 04:03:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 44.28426, ReadTime: '2021/04/14 04:04:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 45.07601, ReadTime: '2021/04/14 04:04:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 43.81406, ReadTime: '2021/04/14 04:04:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.312585, ReadTime: '2021/04/14 03:59:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.507234, ReadTime: '2021/04/14 03:59:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.383248, ReadTime: '2021/04/14 04:00:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.385284, ReadTime: '2021/04/14 04:00:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.719143, ReadTime: '2021/04/14 04:00:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.730373, ReadTime: '2021/04/14 04:00:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.602137, ReadTime: '2021/04/14 04:01:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.459584, ReadTime: '2021/04/14 04:01:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.313675, ReadTime: '2021/04/14 04:01:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.305554, ReadTime: '2021/04/14 04:01:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.911544, ReadTime: '2021/04/14 04:02:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.744454, ReadTime: '2021/04/14 04:02:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.267665, ReadTime: '2021/04/14 04:02:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.606314, ReadTime: '2021/04/14 04:02:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.599967, ReadTime: '2021/04/14 04:03:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.939136, ReadTime: '2021/04/14 04:03:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.03244, ReadTime: '2021/04/14 04:03:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.183742, ReadTime: '2021/04/14 04:03:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.323384, ReadTime: '2021/04/14 04:04:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.403428, ReadTime: '2021/04/14 04:04:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.347282, ReadTime: '2021/04/14 04:04:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.018858, ReadTime: '2021/04/14 03:59:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.020605, ReadTime: '2021/04/14 03:59:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.047671, ReadTime: '2021/04/14 04:00:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.020306, ReadTime: '2021/04/14 04:00:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.054744, ReadTime: '2021/04/14 04:00:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.027292, ReadTime: '2021/04/14 04:00:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.026794, ReadTime: '2021/04/14 04:01:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.03381, ReadTime: '2021/04/14 04:01:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.041131, ReadTime: '2021/04/14 04:01:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.02754, ReadTime: '2021/04/14 04:01:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 4.998859, ReadTime: '2021/04/14 04:02:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.014368, ReadTime: '2021/04/14 04:02:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.019042, ReadTime: '2021/04/14 04:02:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.046045, ReadTime: '2021/04/14 04:02:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.024141, ReadTime: '2021/04/14 04:03:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.016951, ReadTime: '2021/04/14 04:03:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.01229, ReadTime: '2021/04/14 04:03:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.00666, ReadTime: '2021/04/14 04:03:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.005168, ReadTime: '2021/04/14 04:04:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 4.99309, ReadTime: '2021/04/14 04:04:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 4.983859, ReadTime: '2021/04/14 04:04:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.128864, ReadTime: '2021/04/14 03:59:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.096089, ReadTime: '2021/04/14 03:59:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.13711, ReadTime: '2021/04/14 04:00:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.191255, ReadTime: '2021/04/14 04:00:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.159299, ReadTime: '2021/04/14 04:00:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.089755, ReadTime: '2021/04/14 04:00:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.098142, ReadTime: '2021/04/14 04:01:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.084317, ReadTime: '2021/04/14 04:01:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.040828, ReadTime: '2021/04/14 04:01:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.066903, ReadTime: '2021/04/14 04:01:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.12027, ReadTime: '2021/04/14 04:02:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.075927, ReadTime: '2021/04/14 04:02:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.062984, ReadTime: '2021/04/14 04:02:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.190477, ReadTime: '2021/04/14 04:02:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.192902, ReadTime: '2021/04/14 04:03:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.061741, ReadTime: '2021/04/14 04:03:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 0.991724, ReadTime: '2021/04/14 04:03:30', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.006655, ReadTime: '2021/04/14 04:03:45', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.044971, ReadTime: '2021/04/14 04:04:00', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.077099, ReadTime: '2021/04/14 04:04:15', ErrorMessage: null },
        { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.131417, ReadTime: '2021/04/14 04:04:30', ErrorMessage: null }],
      startTime: '',
      endTime: '',
      step: ''
    }
  },
  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')
    // console.log(this.formInline.timeStart)
    // console.log(this.JsonRealWasteWater.ydatas[0].data[0].value[0])
  },
  updated () {
    this.DrawRealTimeDateChart()
  },
  methods: {
    onSubmit () {
      this.DrawRealTimeDateChart()
    },
    // 画废水折线图--实时数据
    DrawRealTimeDateChart () {
      var legend = this.JsonRealWasteWater.legend
      var ydatas = this.JsonRealWasteWater.ydatas
      var yname = this.JsonRealWasteWater.yname
      this.RealTimeChart = this.$echarts.init(this.$refs.main)
      var serLists = []
      for (var i = 0; i < ydatas.length; i++) {
        // var zdcbcolor = ydatas[i].zdcbcolor
        var bz = ydatas[i].bzz
        var obj
        if (bz) {
          obj = {
            name: ydatas[i].name,
            // symbol:'circle', // 折点形状
            // symbolSize: 3,   //大小
            smooth: true, // 直线 ,true 为曲线
            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'
                  // }
                },
                lineStyle: { // 折线的颜色
                  color: ydatas[i].zxcolor,
                  width: 2
                },
                // borderColor:'black',  //折点边框的颜色
                label: { // 显示值
                  show: false
                }
              }
            },
            type: 'line',
            data: ydatas[i].data,
            markLine: { // 平均值 , 和 指标上限
              symbol: 'none',
              data: [{
                label: {
                  normal: {
                    position: 'end',
                    formatter: ''// ydatas[i].name+'标准值' //+'{c}'
                  }
                },
                name: '标准值',
                yAxis: bz,
                lineStyle: {
                  color: ydatas[i].zxcolor,
                  type: 'dashed',
                  width: 2
                }
              }
              ]
            }
          }
        } else {
          obj = {
            name: ydatas[i].name,
            // symbol:'circle', // 折点形状
            // symbolSize: 3,   //大小
            smooth: true, // 直线 ,true 为曲线
            yAxisIndex: 1,
            itemStyle: {
              normal: {
                color: function (c) { // 根据value 显示不同的折点颜色
                  return '#33c95f'
                },
                lineStyle: { // 折线的颜色
                  color: ydatas[i].zxcolor,
                  width: 2
                },
                // borderColor:'black',  //折点边框的颜色
                label: { // 显示值
                  show: false
                }
              }
            },
            type: 'line',
            data: ydatas[i].data
          }
        }
        if (ydatas[i].name === '废气流量' || ydatas[i].name === '废气') {
          obj.yAxisIndex = 1
        }
        serLists.push(obj)
      }
      var option = {
        /*  title: {
          text: title,
      }, */
        tooltip: { // 提示框
          trigger: 'axis',
          axisPointer: {
            type: 'cross',
            label: {
              color: '#1a4245'
            }
          },
          formatter: function (params) {
            var s = params[0].name + '<br />'
            for (var i = 0; i < params.length; i++) {
              // var name = params[i].name
              // 图表title名称
              var seriesName = params[i].seriesName
              // 值
              var value = params[i].value[1]
              // var valueFliter = this.formatter(value)
              var maker = params[i].marker
              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 + ':' + value + '<br />'
            }
            return s
          }
        },
        toolbox: { // 打印等工具
          show: false,
          feature: {
            saveAsImage: {}
          }
        },
        grid: { // 网格
          top: '20%',
          left: '7%',
          bottom: '15%',
          right: '5%'
        },
        legend: {
          data: legend
        },
        dataZoom: [{
          type: 'inside',
          start: 0,
          end: 100
        }, {
          start: 0,
          end: 100,
          show: false,
          handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
          handleSize: '80%',
          handleStyle: {
            color: '#fff',
            shadowBlur: 3,
            shadowColor: 'rgba(0, 0, 0, 0.6)',
            shadowOffsetX: 2,
            shadowOffsetY: 2
          }
        }],
        xAxis: { // x 轴设置
          type: 'time',
          boundaryGap: false,
          axisLabel: { // x轴全部显示
            // rotate: 30,
            margin: 6,
            interval: 0,
            textStyle: {
              color: '#fff'
            }
          },
          splitLine: { // 网格垂直线为 虚线
            show: true,
            lineStyle: {
              type: 'dashed'
            }
          },
          axisTick: { // x 轴刻度显示
            show: false
          },
          axisLine: {
            lineStyle: {
              color: '#FFFFFF',
              width: 1// 这里是为了突出显示加上的
            }
          }
          // data: xdata
        },
        yAxis: [{
          type: 'value',
          name: yname,
          max: function (value) {
            return parseInt(value.max + 30)
          },
          axisLabel: {
            formatter: '{value}',
            textStyle: {
              color: '#fff'
            }
          },
          axisPointer: {
            snap: true
          },
          splitLine: {
            show: false
          }, // y轴 网格线不显示,
          axisLine: {
            lineStyle: {
              color: '#FFFFFF',
              width: 1// 这里是为了突出显示加上的
            }
          }
        }, {
          type: 'value',
          name: '流量(m³/d)',
          axisLabel: {
            formatter: '{value}',
            textStyle: {
              color: '#fff'
            }
          },
          axisPointer: {
            snap: true
          },
          splitLine: {
            show: false
          }, // y轴 网格线不显示,
          // inverse: true,
          // nameLocation: 'start',
          // max:500,
          axisLine: {
            lineStyle: {
              color: '#FFFFFF',
              width: 1// 这里是为了突出显示加上的
            }
          }
        }],
        series: serLists
      }
      this.RealTimeChart.setOption(option)
      /* RealTimeChart.on('legendselectchanged', function (params) {
        // console.log(params);
        var StdVal = null
        var op = { yAxis: {} }
        if (params.selected.COD) {
          if (bzzList && bzzList.length > 0) {
            for (let i = 0; i < bzzList.length; i++) {
              if (bzzList[i].name == 'COD') {
                StdVal = bzzList[i].bzhui
              }
            }
          }
          op.yAxis.max = function (value) {
            var ma
            if (value.max < StdVal) {
              ma = StdVal
            } else {
              ma = Math.ceil(value.max)
            }
            return ma
          }
        } else if (params.selected['总氮']) {
          if (bzzList && bzzList.length > 0) {
            for (let i = 0; i < bzzList.length; i++) {
              if (bzzList[i].name == '总氮') {
                StdVal = bzzList[i].bzhui
              }
            }
          }
          op.yAxis.max = function (value) {
            var ma
            if (value.max < StdVal) {
              ma = StdVal
            } else {
              ma = Math.ceil(value.max)
            }
            return ma
          }
        } else if (params.selected['氨氮']) {
          if (bzzList && bzzList.length > 0) {
            for (let i = 0; i < bzzList.length; i++) {
              if (bzzList[i].name == '氨氮') {
                StdVal = bzzList[i].bzhui
              }
            }
          }
          op.yAxis.max = function (value) {
            var ma
            if (value.max < StdVal) {
              ma = StdVal
            } else {
              ma = Math.ceil(value.max)
            }
            return ma
          }
        } else if (params.selected['总磷']) {
          if (bzzList && bzzList.length > 0) {
            for (let i = 0; i < bzzList.length; i++) {
              if (bzzList[i].name == '总磷') {
                StdVal = bzzList[i].bzhui
              }
            }
          }
          op.yAxis.max = function (value) {
            var ma
            if (value.max < StdVal) {
              ma = StdVal
            } else {
              ma = Math.ceil(value.max)
            }
            return ma
          }
        }
        RealTimeChart.setOption(op)
      }) */
    },
    getRtdb15s (unionTagCodeList, startTime, endTime, step, res) {
      if (res.length > 0) {
        // 处理数据开始
        var d = res
        var nameList = [] // 存放图例
        var data // 数据类型// var data={name:'',value:[now1.getFullYear(), now1.getMonth() + 1, now1.getDate().join('/'),value]}
        var datalist // 存放data的数组
        // var bzh = []
        for (var i = 0; i < d.length; i++) {
          if (d[i].ErrorMessage != null) {
            continue
          }
          // var name = CFG.DATA_REALTIME_TAGCODETABLE[d[i].UnionTagCode].TagName
          if (nameList.length === 0) {
            nameList.push(name)
            var newdate = new Date(d[i].ReadTime)
            data = {
              name: name,
              value: [newdate, d[i].TagValue]
            }
            datalist = {
              name: name,
              data: [data]
            }
            this.RealTimeDataList.push(datalist)
          } else if (nameList.indexOf(name) < 0) {
            nameList.push(name)
            // bzh.push(d[i].StdValue);
            // var newdate = new Date(d[i].ReadTime)
            data = {
              name: name,
              value: [newdate, d[i].TagValue]
            }
            datalist = {
              name: name,
              data: [data]
            }
            this.RealTimeDataList.push(datalist)
          } else if (i === d.length - 1) {
            if (nameList.indexOf(name) < 0) {
              nameList.push(name)
              // bzh.push(d[i].StdValue);
              // var newdate = new Date(d[i].ReadTime)
              data = {
                name: name,
                value: [newdate, d[i].TagValue]
              }
              datalist = {
                name: name,
                data: [data]
              }
              // RealTimeDataList.push(datalist)
            } else {
              // var newdate = new Date(d[i].ReadTime)
              data = {
                name: name,
                value: [newdate, d[i].TagValue]
              }
              for (var k = 0; k < this.RealTimeDataList.length; k++) {
                if (this.RealTimeDataList[k].name === name) {
                  this.RealTimeDataList[k].data.push(data)
                }
              }
            }
          } else {
            const newdate = new Date(d[i].ReadTime)
            data = {
              name: name,
              value: [newdate, d[i].TagValue]
            }
            for (let k = 0; k < this.RealTimeDataList.length; k++) {
              if (this.RealTimeDataList[k].name === name) {
                this.RealTimeDataList[k].data.push(data)
              }
            }
          }
        }
        // var divid = 'mycharteff_second'
        // var title = name
        var lengList = []
        var objTemp
        for (var l = 0; l < nameList.length; l++) {
          var obj
          var iconurl
          if (nameList[l] === 'COD') {
            iconurl = 'image://../assets/imgs/legend/SO2.png'
          } else if (nameList[l] === '氨氮') {
            iconurl = 'image://../assets/imgs/legend/NOX.png'
          } else if (nameList[l] === '总磷') {
            iconurl = 'image://../assets/imgs/legend/YanChen.png'
          } else if (nameList[l] === '总氮') {
            iconurl = 'image://../assets/imgs/legend/zongdan.png'
          } else {
            iconurl = 'image://../assets/imgs/legend/VOCs.png'
          }
          if (nameList[l] === '废水' || nameList[l] === '废水流量') { // 将废水流量排到数组最后
            objTemp = {
              name: nameList[l],
              icon: iconurl,
              textStyle: {
                color: '#ccc'
              },
              itemWidth: 20,
              itemHeight: 5
            }
          } else {
            obj = {
              name: nameList[l],
              icon: iconurl,
              textStyle: {
                color: '#ccc'
              },
              itemWidth: 20,
              itemHeight: 5
            }
            lengList.push(obj)
          }
        }
        lengList.push(objTemp)
        this.DrawRealTimeDateChart(this.JsonRealWasteWater.id, this.JsonRealWasteWater.title, this.JsonRealWasteWater.legend, this.JsonRealWasteWater.ydatas, this.JsonRealWasteWater.yname)
      }
    },
    // 实时数据调用钩子函数
    IntervalRealTimeDate (id, unionTagCodeList, BBZMAPPING) {
      // 定时器函数
      this.interValHander = setInterval(function () {
        // $('.RealTime').empty()
        this.startTime = dayjs().subtract(5, 'minute').format('YYYY-MM-DD HH:mm:ss')
        this.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
        this.step = '15'
        // this.getRtdb15s(this.unionTagCodeList, this.startTime, this.endTime, this.step, this.res)
        // PreQueryTime=endTime;
        this.DrawRealTimeDateChart(this.JsonRealWasteWater.id, this.JsonRealWasteWater.title, this.JsonRealWasteWater.legend, this.JsonRealWasteWater.ydatas, this.JsonRealWasteWater.yname)
        this.IntervalRealTimeDate(this.JSONTimeData.id, this.JSONTimeData.unionTagCodeList, this.BBZMAPPING)
      }, 15000)
    }
  }
}
</script>
<style scoped lang="less">
.grid-content{
  font-size: 8px;
  background-color: #2e4967;
  text-align: center;
  border-radius: 2px;
  margin-right: 10px;
  padding:0 10px
}
.infomation {
  padding: 5px 10px;
}
.form-echrts {
  width: 100%;
  border-top: 1px solid #396d83;
  //margin: 10px 10px 10px 10px;
  .from-search{
    display: flex;
    padding:5px;
    >div{margin-left: 10px}
    .pickerMon{
      display: flex;
      >div:first-child {
        margin-right: 10px;
      }
      .pickerData{
        flex: 1;
        display: flex;
        >span{line-height: 22px}
        .pickerTable {
          margin-left: 3px;
        }
      }
    }
    /deep/.el-date-editor--datetime{
      width: 100%;
    }
    /deep/.el-input__inner{
      position: relative;
      width:140px;
      background-color: #2e4967;
      color: #ffffff;
      font-size: 12px;
      height: 24px;
      padding: 0;
      border-color:#00fff6;
      text-align: center;
      //padding-left:20px ;
      //padding: 0!important;
    }
    /deep/.el-input__icon{
      display: block;
      width: 140px;
      height: 22px;
      line-height: 22px;
      cursor: pointer;
      font-size: 0;
    }
    .echatsInput{
      color: #00ffff;
      background-color: #2e4967;
      border: none;
      border-radius: 6px;
      width: 80px;
      height: 22px;
      text-align: center;
    }
    input::-webkit-calendar-picker-indicator {
      opacity: 100;
    }
    .detailbtn{
      background-color:#2e4967;
      text-align: center;
      padding: 0 7px;
      line-height: 24px;
      border-radius: 4px;
      margin-right: 6px;
    }
    .detailbtn:hover{
      box-shadow: 0 0 0.03rem #fff700 !important;
      color:#fff700 !important;
      cursor: pointer;
    }
  }
  .el-dialog-div {
    //height: 50vh!important;
    overflow: auto;
    //overflow: hidden;
  }
  #echarts {
    margin: 0;
    padding: 0;
  }
}
</style>
src/components/LayerController/logic/WasteSolid.js
src/components/table/components/WasteSolid.vue
File was renamed from src/components/table/components/SolidWaste.vue
@@ -95,7 +95,7 @@
import MissingAlarm from '@components/table/components/componented/MissingAlarm'
export default {
  name: 'SolidWaste',
  name: 'WasteSolid',
  components: {
    MissingAlarm,
    Refinery,
src/components/table/components/tabHandover.vue
@@ -1,6 +1,6 @@
<template>
  <div>
    <el-tabs  v-model="activeName" @tab-click="handleClick">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <!-- <el-tab-pane label="废水" name="first">
        <waste-water></waste-water>
      </el-tab-pane>
@@ -24,7 +24,7 @@
<script>
import WasteWater from '@components/table/components/WasteWater'
// import WasteGas from '@components/table/components/WasteGas'
import SolidWaste from '@components/table/components/SolidWaste'
import SolidWaste from '@components/table/components/WasteSolid'
import AirQuality from '@components/table/components/AirQuality'
import { TopicList } from '../../../conf/Topic'
src/conf/Constants.js
@@ -9,7 +9,7 @@
export const logicMapper = {
  wasteGasPfk: 'WasteGas.js',
  wasteWaterPfk: 'WasteWater.js',
  wasteSolidCcd: 'SolidWaste.js',
  wasteSolidCcd: 'WasteSolid.js',
  sewersAreaGs: 'Company.js',
  pipesegment: 'PipeLineAnimal.js'
}