| | |
| | | <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"> |
| | | <el-col :span="14"> |
| | | <div class="pickerMon"> |
| | | <div class="pickerMon"> |
| | | <div class="pickerData"> |
| | | <span> 开始时间:</span> |
| | | <span class="pickerTable"><el-date-picker |
| | | type="datetime" |
| | | v-model="value1"> |
| | | </el-date-picker></span> |
| | | <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"> |
| | | <span >结束时间:</span> |
| | | <span class="pickerTable"> |
| | | <el-date-picker |
| | | type="datetime" |
| | | v-model="value2" |
| | | type="datetime" |
| | | v-model="value2" |
| | | > |
| | | </el-date-picker> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | 采样点数: |
| | | <input list="source" id="ipt" class="echatsInput"> |
| | | <datalist id="source"> |
| | | <option value="0" /> |
| | | <option value="25" /> |
| | | <option value="50" /> |
| | | <option value="75" /> |
| | | <option value="100" /> |
| | | </datalist> |
| | | </el-col> |
| | | <el-col class="detailbtn" :span="2" @click="onSubmit">查询</el-col> |
| | | <el-col :span="3"> |
| | | <div class="detailbtn" @click="dialogVisible = true" >明细表</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> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div style="width:100%;height:300px;" id="echarts" ref="main"> |
| | | </div> |
| | | <div> |
| | | 采样点数: |
| | | <input list="source" id="ipt" class="echatsInput"> |
| | | <datalist id="source"> |
| | | <option value="0" /> |
| | | <option value="25" /> |
| | | <option value="50" /> |
| | | <option value="75" /> |
| | | <option value="100" /> |
| | | </datalist> |
| | | </div> |
| | | <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> |
| | | <!-- 明细弹框 --> |
| | | <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"> |
| | | <public-detailed-list v-bind="$attrs"></public-detailed-list> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | 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)).reverse() |
| | | 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: 2rem; |
| | | border-top: 1px solid #396d83; |
| | | //margin: 10px 10px 10px 10px; |
| | | .from-search{ |
| | | margin-top: 6px; |
| | | 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: 6px; |
| | | width: 40px; |
| | | |
| | | /deep/.el-input__prefix{ |
| | | } |
| | | /deep/.el-input__icon { |
| | | width: 0.9rem; |
| | | font-size: 0; |
| | | font-size: 0; |
| | | width: 100%; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | /deep/.el-input__inner{ |
| | | position: relative; |
| | | width: 0.9rem!important; |
| | | height: 0.125rem!important; |
| | | background-color: #2e4967; |
| | | color: #ffffff; |
| | | font-size: 8px; |
| | | font-size: 12px; |
| | | height: 24px; |
| | | padding: 0; |
| | | //padding-left:20px ; |
| | | //padding: 0!important; |
| | |
| | | background-color: #2e4967; |
| | | border: none; |
| | | border-radius: 6px; |
| | | width: 40px; |
| | | width: 80px; |
| | | height: 22px; |
| | | } |
| | | .detailbtn{ |
| | | background-color:#2e4967; |
| | |
| | | padding: 0 7px; |
| | | line-height: 20px; |
| | | border-radius: 4px; |
| | | margin-right: 6px; |
| | | } |
| | | } |
| | | .el-dialog-div { |