派生自 wuyushui/SewerAndRainNetwork

zhangshuaibao
2021-04-14 0ad898ff9d0f6718db2b3137665c81c46c50312d
src/components/BaseNav/PublicBounced/common/echarts/EChartsHour.vue
File was renamed from src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue
@@ -15,19 +15,14 @@
                    <div class="pickerData">
                        <span> 开始时间:</span>
                        <span class="pickerTable">
                          <el-date-picker  type="datetime"   v-model="formInline.timeStart">
                      </el-date-picker>
                      </span>
                          <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>
                            <el-date-picker  type="datetime" v-model="formInline.timeEnd" ></el-date-picker>
                        </span>
                    </div>
                </div>
<!--                <div>-->
@@ -43,8 +38,7 @@
                <div class="detailbtn"  @click="onSubmit">查询</div>
                <div class="detailbtn" @click="dialogVisible = true" >明细表</div>
             </div>
            <div style="width:5rem;height:2rem;" id="echarts" ref="main">
            </div>
            <div style="width:5rem;height:1.5rem;" id="echarts" ref="main"></div>
        </div>
        <!-- 明细弹框 -->
        <el-dialog :visible.sync="dialogVisible"
@@ -62,8 +56,8 @@
</template>
<script>
import PublicDetailedList from '@components/BaseNav/PublicBounced/GasComponents/PublicDetailedList'
import PublicDetailedList from '@components/BaseNav/PublicBounced/common/echarts/PublicDetailedList'
import dayjs from 'dayjs'
export default {
  name: 'ECharts',
  components: {
@@ -129,11 +123,11 @@
        ],
        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', 'NaN', 'NaN'], 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', 'NaN', 'NaN'], 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', 'NaN', 'NaN'], 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', 'NaN', 'NaN'], 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', 'NaN', 'NaN'], zdcbcolor: 'red', zxcolor: '#F206FF', bzz: null }
          { 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',
@@ -147,9 +141,14 @@
    // }
  },
  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()
    // this.CreateChart(this.JsonCtarts.id, this.JsonCtarts.title, this.JsonCtarts.legend, this.JsonCtarts.xdata, this.JsonCtarts.ydatas, this.JsonCtarts.yname, this.JsonCtarts.id, this.JsonCtarts.datatype)
  },
  updated () {
    this.onSubmit()
  },
  methods: {
    onSubmit () {
      this.CreateChart()