| | |
| | | <template> |
| | | <div id="Tab"> |
| | | <div class="infomation"> |
| | | <!-- <el-tag>氮氧化物 : 29.93 标准 : 100</el-tag>--> |
| | | <!-- <el-tag>二氧化硫 : 17.34 标准 : 50</el-tag>--> |
| | | <!-- <el-tag>烟尘 : 6.93 标准 : 30</el-tag>--> |
| | | <!-- <el-tag>废气流量 : 120343.18</el-tag>--> |
| | | <el-row> |
| | | <el-col :span="6"><div class="grid-content bg-purple">氮氧化物 : 29.93 标准 : 100</div></el-col> |
| | | <el-col :span="6"><div class="grid-content bg-purple">二氧化硫 : 17.34 标准 : 50</div></el-col> |
| | | <el-col :span="6"><div class="grid-content bg-purple">烟尘 : 6.93 标准 : 30</div></el-col> |
| | | <el-col :span="6"><div class="grid-content bg-purple">废气流量 : 120343.18</div></el-col> |
| | | <!-- <el-col :span="6"><div class="grid-content bg-purple"></div></el-col>--> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"><div class="grid-content bg-purple">氮氧化物:29.93标准:100</div></el-col> |
| | | <el-col :span="6"><div class="grid-content bg-purple">二氧化硫:17.34标准:50</div></el-col> |
| | | <el-col :span="6"><div class="grid-content bg-purple">烟尘:6.93 标准:30</div></el-col> |
| | | <el-col :span="6"><div class="grid-content bg-purple">废气流量:120343.18</div></el-col> |
| | | <!-- <el-col :span="6"><div class="grid-content bg-purple"></div></el-col>--> |
| | | </el-row> |
| | | </div> |
| | | <div class="form-echrts"> |
| | | <!-- :title="this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName" --> |
| | | <div class="from-search"> |
| | | <!-- <el-form :inline="true" :model="formInline" class="demo-form-inline">--> |
| | | <!-- <el-form-item label="审批人">--> |
| | | <!-- <el-input v-model="formInline.user" placeholder="审批人"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <div class="block">--> |
| | | <!-- <el-date-picker--> |
| | | <!-- size="'mini"--> |
| | | <!-- class="date"--> |
| | | <!-- v-model="value"--> |
| | | <!-- type="datetimerange"--> |
| | | <!-- range-separator="至"--> |
| | | <!-- start-placeholder="开始日期"--> |
| | | <!-- end-placeholder="结束日期">--> |
| | | <!-- </el-date-picker>--> |
| | | <!-- </div>--> |
| | | <!-- <el-form-item label="采样点数" class="text-size">--> |
| | | <!-- <el-select v-model="formInline.region" placeholder="0">--> |
| | | <!-- <el-option label="0" value="shanghai"></el-option>--> |
| | | <!-- <el-option label="25" value="beijing"></el-option>--> |
| | | <!-- <el-option label="50" value="beijing"></el-option>--> |
| | | <!-- <el-option label="75" value="beijing"></el-option>--> |
| | | <!-- <el-option label="100" value="beijing"></el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item>--> |
| | | <!-- <el-button type="primary" @click="onSubmit">查询</el-button>--> |
| | | <!-- </el-form-item>--> |
| | | |
| | | <!-- </el-form>--> |
| | | <!-- <input list="students">--> |
| | | <!-- <datalist id="students">--> |
| | | <!-- <option value="Lily">--> |
| | | <!-- <option value="Lucy">--> |
| | | <!-- <option value="Jim">--> |
| | | <!-- <option value="Lily">--> |
| | | <!-- </datalist>--> |
| | | <el-row type="flex" :gutter="20"> |
| | | <el-row type="flex"> |
| | | <el-col :span="14"> |
| | | <!-- <el-row>--> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-row type="flex" justify="space-between">--> |
| | | <!-- <el-col class="pickerData">--> |
| | | <!-- 开始时间:--> |
| | | <!-- <el-date-picker--> |
| | | <!-- type="date">--> |
| | | <!-- </el-date-picker>--> |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col :span="12" type="flex">--> |
| | | <!-- <el-row type="flex" justify="center">--> |
| | | <!-- <el-col>--> |
| | | <!-- 结束时间:--> |
| | | <!-- <el-date-picker--> |
| | | <!-- type="date"--> |
| | | <!-- >--> |
| | | <!-- </el-date-picker>--> |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | <div class="pickerMon"> |
| | | <div class="pickerData"> |
| | | <span> 开始时间:</span> |
| | | <span class="pickerTable"><el-date-picker |
| | | type="datetime" |
| | | v-model="value1"> |
| | | </el-date-picker></span> |
| | | </div> |
| | | <div class="pickerData"> |
| | | <span >结束时间:</span> |
| | | <span class="pickerTable"> |
| | | <el-date-picker |
| | | type="datetime" |
| | | v-model="value2" |
| | | > |
| | | </el-date-picker> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | 采样点数: |
| | |
| | | <option value="75" /> |
| | | <option value="100" /> |
| | | </datalist> |
| | | <!-- <div data-tap-disabled="true">--> |
| | | <!-- 采样点数:--> |
| | | <!-- <select id="source">--> |
| | | <!-- <option value="1">0</option>--> |
| | | <!-- <option value="2">25</option>--> |
| | | <!-- <option value="3">50</option>--> |
| | | <!-- <option value="4">75</option>--> |
| | | <!-- <option value="5">100</option>--> |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | </el-col> |
| | | <el-col class="detailbtn" :span="2" @click="onSubmit">查询</el-col> |
| | | <el-col :span="3"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div style="width:100%;height:200px;" id="echarts" ref="main"> |
| | | <div style="width:5rem;height:2rem;" id="echarts" ref="main"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | }, |
| | | data () { |
| | | return { |
| | | value1: '', |
| | | value2: '', |
| | | watchData: [], |
| | | dialogVisible: false, |
| | | myChar: null, |
| | |
| | | this.myChart.resize() |
| | | } |
| | | }, |
| | | initOptions: function (dataDate, dataValue1, dataValue2, dataValue3) { |
| | | initOptions: function (dataDate, series) { |
| | | var options = { |
| | | title: { |
| | | // text: '折线图堆叠' |
| | | }, |
| | | color: ['#5470c6', '#91CC75', '#EE6666', '#FF0087'], |
| | | color: ['#002fb3', '#8ce55e', '#ff0087'], |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '6%', |
| | | right: '3%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | |
| | | } |
| | | } |
| | | }], |
| | | series: [ |
| | | { |
| | | name: 'COD', |
| | | type: 'line', |
| | | stack: '总量', |
| | | data: dataValue1, |
| | | yAxisIndex: 0 |
| | | }, |
| | | { |
| | | name: '氨氮', |
| | | type: 'line', |
| | | stack: '总量', |
| | | data: dataValue2, |
| | | yAxisIndex: 0 |
| | | }, |
| | | { |
| | | name: '废水流量', |
| | | type: 'line', |
| | | stack: '总量', |
| | | data: dataValue3, |
| | | yAxisIndex: 1 |
| | | } |
| | | ] |
| | | series: series |
| | | } |
| | | return options |
| | | } |
| | |
| | | mounted () { |
| | | this.$nextTick(() => { |
| | | this.drawChart() |
| | | const dataWatch = JSON.parse(JSON.stringify(this.$attrs.getQueryOnlineMonData)) |
| | | const dataWatch = JSON.parse(JSON.stringify(this.$attrs.getQueryOnlineMonHourData)).reverse() |
| | | console.log(dataWatch) |
| | | var dataValue1 = [] |
| | | var dataValue2 = [] |
| | | var dataValue3 = [] |
| | | var dataDate = [] |
| | | for (var i = 0; i < 24; i++) { |
| | | dataDate.push(dataWatch[i].MonTimeStr.substring(9)) |
| | | } |
| | | var dateDate = [] |
| | | // {COD:[3,4,5]} |
| | | var data = {} |
| | | for (var n = 0; n < dataWatch.length; n++) { |
| | | if (dataWatch[n].PoltmtrlName === 'COD') { |
| | | dataValue1.push(dataWatch[n].MonQty) |
| | | } else if (dataWatch[n].PoltmtrlName === '氨氮') { |
| | | dataValue2.push(dataWatch[n].MonQty) |
| | | } else if (dataWatch[n].PoltmtrlName === '废水流量') { |
| | | dataValue3.push(dataWatch[n].MonQty) |
| | | var d = dataWatch[n].MonTimeStr.substring(9) |
| | | if (dateDate.indexOf(d) < 0) { |
| | | dateDate.push(d) |
| | | } |
| | | if (data[dataWatch[n].PoltmtrlName]) { |
| | | data[dataWatch[n].PoltmtrlName].push(dataWatch[n].MonQty) |
| | | } else { |
| | | data[dataWatch[n].PoltmtrlName] = [dataWatch[n].MonQty] |
| | | } |
| | | } |
| | | const opitons = this.initOptions(dataDate, dataValue1, dataValue2, dataValue3) |
| | | var series = [] |
| | | for (var k in data) { |
| | | series.push({ |
| | | name: k, |
| | | type: 'line', |
| | | yAxisIndex: k === '废水流量' ? 1 : 0, |
| | | data: data[k] |
| | | }) |
| | | } |
| | | console.log(series) |
| | | const opitons = this.initOptions(dateDate, series) |
| | | this.myChart = this.$echarts.init(this.$refs.main) |
| | | this.myChart.setOption(opitons) |
| | | }) |
| | |
| | | } |
| | | .Infomation { |
| | | margin-left: 10px; |
| | | height: 0.2rem; |
| | | } |
| | | |
| | | .el-tag { |
| | |
| | | |
| | | .form-echrts { |
| | | width: 100%; |
| | | height: 1rem; |
| | | border-top: 1px solid #396d83; |
| | | //margin: 10px 10px 10px 10px; |
| | | .from-search{ |
| | | //display: flex; |
| | | //justify-content: space-between; |
| | | .pickerData{ |
| | | margin-top: 6px; |
| | | .pickerMon{ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .pickerData{ |
| | | flex: 1; |
| | | display: flex; |
| | | .pickerTable{ |
| | | margin-left: 6px; |
| | | width: 40px; |
| | | |
| | | /deep/.el-input__icon { |
| | | width: 0.9rem; |
| | | font-size: 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /deep/.el-date-editor--datetime{ |
| | | width: 100%; |
| | | } |
| | | /deep/.el-input__inner{ |
| | | width: 40px!important; |
| | | height: 16px!important; |
| | | position: relative; |
| | | width: 0.9rem!important; |
| | | height: 0.125rem!important; |
| | | background-color: #2e4967; |
| | | color: #ffffff; |
| | | font-size: 8px; |
| | | padding: 0; |
| | | //padding-left:20px ; |
| | | //padding: 0!important; |
| | | } |
| | | .echatsInput{ |
| | | color: #00ffff; |
| | |
| | | //overflow: hidden; |
| | | } |
| | | |
| | | .from-search { |
| | | background-color: red; |
| | | .date{ |
| | | width: 200px; |
| | | height: 30px; |
| | | padding: 0; |
| | | border: none; |
| | | .el-icon-time{ |
| | | line-height: 30px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | #echarts { |
| | | margin: 0; |
| | | padding: 0; |
| | | //height: 3rem; |
| | | //border: 1px solid #396d83; |
| | | //margin: 10px 10px 10px 10px; |
| | | } |
| | | } |
| | | #echarts { |
| | | margin: 0; |
| | | padding: 0; |
| | | //height: 3rem; |
| | | //border: 1px solid #396d83; |
| | | //margin: 10px 10px 10px 10px; |
| | | } |
| | | } |
| | | </style> |