派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-04-25 6e4022b4c7eb1fad134e0563a1e1da14cbf80724
src/components/BaseNav/WasteWater/HourData.vue
@@ -1,33 +1,31 @@
<template>
  <div id="Tab">
  <div class="echarts-box">
    <div class="tab-scroll">
      <PublicDataStandard :dataStandard="dataStandard"></PublicDataStandard>
      <span class="time-select">{{ timeStart }}时——{{ timeEnd }}时</span>
      <span class="time-select">{{ formData.startTime }}—{{ formData.endTime }}</span>
    </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 class="detailbtn">查询</div>
        <div class="detailbtn">明细表</div>
      </div>
      <div class="boxChart">
        <div style="width: 5rem;height:1.5rem;" id="echarts" ref="echartsHour"></div>
      </div>
    <div class="echarts-form">
      <span class="demonstration">开始时间:</span>
      <el-date-picker
          v-model="formData.startTime"
          value-format="yyyy-MM-dd HH"
          type="datetime">
      </el-date-picker>
      <span class="demonstration">结束时间:</span>
      <el-date-picker
          v-model="formData.endTime"
          value-format="yyyy-MM-dd HH"
          type="datetime">
      </el-date-picker>
      <span class="demonstration">采样点数:</span>
      <el-select v-model="region" placeholder="请选择" style="width: 80px">
        <el-option v-for="(item,index) in regionList" :key="index" :label="item" :value="item"></el-option>
      </el-select>
      <el-button @click="querySearch()">查询</el-button>
      <el-button>明细表</el-button>
    </div>
    <div class="echarts-chart">
      <div style="width:5rem;height:1.5rem;" ref="echartsHour"></div>
    </div>
  </div>
</template>
@@ -38,7 +36,7 @@
import mapApi from '@/api/mapApi'
export default {
  name: 'ECharts',
  name: 'HourData',
  components: {
    PublicDataStandard
  },
@@ -86,12 +84,12 @@
            val: null
          }
        }],
      formInline: {
        timeStart: dayjs().subtract(24, 'hours').format('YYYY-MM-DD HH'),
        timeEnd: dayjs().format('YYYY-MM-DD HH')
      formData: {
        startTime: dayjs().subtract(16, 'hour').format('YYYY-MM-DD HH'),
        endTime: dayjs().format('YYYY-MM-DD HH')
      },
      timeEnd: dayjs().format('YYYY-MM-DD HH'),
      timeStart: dayjs().subtract(24, 'hours').format('YYYY-MM-DD HH'),
      region: '25',
      regionList: [25, 50, 75, 100],
      chart: null,
      jcdID: 1,
      dataType: 2,
@@ -104,15 +102,15 @@
    this.draw24Chart()
  },
  methods: {
    querySearch () {
    },
    async draw24Chart () {
      // 用于接口数据请求的参数 开始/结束时间 || 可选择查询的开始/结束时间
      this.formInline.timeEnd = dayjs().format('YYYY-MM-DD HH')
      this.formInline.timeStart = dayjs().subtract(24, 'hours').format('YYYY-MM-DD HH')
      const data = {
        onLineMonEmissPointId: 23,
        monItemId: 28,
        beginTime: this.formInline.timeStart,
        endTime: this.formInline.timeEnd,
        beginTime: this.formData.startTime,
        endTime: this.formData.endTime,
        dataType: this.dataType
      }
      const result = (await mapApi.getQueryOnlineMonData(data)).Result.DataInfo
@@ -359,7 +357,7 @@
                  color: ydatas[i].zxcolor,
                  width: 5
                },
                borderColor: 'black', // 折点边框的颜色
                borderColor: ydatas[i].zxcolor, // 折点边框的颜色
                label: { // 显示值
                  show: false
                }
@@ -593,139 +591,5 @@
</script>
<style scoped lang="less">
.tab-scroll {
  display: flex;
  align-items: center;
  justify-content: space-between;
  .time-select {
    //margin: 0 10px;
    cursor: pointer;
    padding: 5px;
    border: 1px solid #2b87c8;
    border-radius: 4px;
    text-align: center;
    color: #fff;
    font-size: 11px;
    width: 280px;
  }
}
.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: 15px 0;
    > div {
      margin-left: 30px
    }
    .pickerMon {
      display: flex;
      > div:first-child {
        margin-right: 10px;
      }
      .pickerData {
        flex: 1;
        display: flex;
        > span {
          line-height: 22px;
          margin-right: 15px;
        }
        .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;
      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;
      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>