|
@@ -15,49 +15,49 @@
|
|
|
<td class="ivu-table-cell fixed-td">空气(干球)温度</td>
|
|
|
<td class="ivu-table-cell test" >{{roomInfo.infos.Tdb || '--'}}</td>
|
|
|
<td class="ivu-table-cell" >{{TdbData || '--'}} ℃</td>
|
|
|
- <td class="ivu-table-cell" ><button class="look-btn" @click="getBoundData(roomInfo.infos.Tdb)">查看</button></td>
|
|
|
+ <td class="ivu-table-cell" ><button v-if="roomInfo.infos.Tdb" class="look-btn" @click="getBoundData(roomInfo.infos.Tdb)">查看</button></td>
|
|
|
</tr>
|
|
|
<tr class="ivu-table-row" >
|
|
|
<td class="ivu-table-cell fixed-td" >空气相对湿度</td>
|
|
|
<td class="ivu-table-cell test" >{{roomInfo.infos.RH || '--'}}</td>
|
|
|
<td class="ivu-table-cell" >{{ RHData || '--'}} %RH</td>
|
|
|
- <td class="ivu-table-cell" ><button class="look-btn" @click="getBoundData(roomInfo.infos.RH)">查看</button></td>
|
|
|
+ <td class="ivu-table-cell" ><button v-if="roomInfo.infos.RH" class="look-btn" @click="getBoundData(roomInfo.infos.RH)">查看</button></td>
|
|
|
</tr>
|
|
|
<tr class="ivu-table-row">
|
|
|
<td class="ivu-table-cell fixed-td" >空气密度</td>
|
|
|
<td class="ivu-table-cell test" >{{roomInfo.infos.Rou || '--'}}</td>
|
|
|
<td class="ivu-table-cell" >{{ RouData || '--'}} kg/m³</td>
|
|
|
- <td class="ivu-table-cell" ><button class="look-btn" @click="getBoundData(roomInfo.infos.Rou)">查看</button></td>
|
|
|
+ <td class="ivu-table-cell" ><button v-if="roomInfo.infos.Rou" class="look-btn" @click="getBoundData(roomInfo.infos.Rou)">查看</button></td>
|
|
|
</tr>
|
|
|
<tr class="ivu-table-row" >
|
|
|
<td class="ivu-table-cell fixed-td" >空气湿球温度</td>
|
|
|
<td class="ivu-table-cell test" >{{roomInfo.infos.Twb || '--'}}</td>
|
|
|
<td class="ivu-table-cell" >{{TwbData || '--'}} ℃</td>
|
|
|
- <td class="ivu-table-cell" ><button class="look-btn" @click="getBoundData(roomInfo.infos.Twb)">查看</button></td>
|
|
|
+ <td class="ivu-table-cell" ><button v-if="roomInfo.infos.Twb" class="look-btn" @click="getBoundData(roomInfo.infos.Twb)">查看</button></td>
|
|
|
</tr>
|
|
|
<tr class="ivu-table-row" >
|
|
|
<td class="ivu-table-cell fixed-td" >空气CO2浓度</td>
|
|
|
<td class="ivu-table-cell test" >{{roomInfo.infos.CO2 || '--'}}</td>
|
|
|
<td class="ivu-table-cell" >{{COData || '--'}} ppm</td>
|
|
|
- <td class="ivu-table-cell" ><button class="look-btn" @click="getBoundData(roomInfo.infos.CO2)">查看</button></td>
|
|
|
+ <td class="ivu-table-cell" ><button v-if="roomInfo.infos.CO2" class="look-btn" @click="getBoundData(roomInfo.infos.CO2)">查看</button></td>
|
|
|
</tr>
|
|
|
<tr class="ivu-table-row" >
|
|
|
<td class="ivu-table-cell fixed-td" >空气PM2.5浓度</td>
|
|
|
<td class="ivu-table-cell test">{{roomInfo.infos['PM2.5'] || '--'}}</td>
|
|
|
<td class="ivu-table-cell" >{{PM25Data || '--'}}</td>
|
|
|
- <td class="ivu-table-cell" ><button class="look-btn" @click="getBoundData(roomInfo.infos['PM2.5'])">查看</button></td>
|
|
|
+ <td class="ivu-table-cell" ><button v-if="roomInfo.infos['PM2.5']" class="look-btn" @click="getBoundData(roomInfo.infos['PM2.5'])">查看</button></td>
|
|
|
</tr>
|
|
|
<tr class="ivu-table-row">
|
|
|
<td class="ivu-table-cell fixed-td" >空气PM10浓度</td>
|
|
|
<td class="ivu-table-cell test">{{roomInfo.infos.PM10 || '--'}}</td>
|
|
|
<td class="ivu-table-cell" >{{PM10Data || '--'}} mg/m³</td>
|
|
|
- <td class="ivu-table-cell" ><button class="look-btn" @click="getBoundData(roomInfo.infos.PM10)">查看</button></td>
|
|
|
+ <td class="ivu-table-cell" ><button v-if="roomInfo.infos.PM10" class="look-btn" @click="getBoundData(roomInfo.infos.PM10)">查看</button></td>
|
|
|
</tr>
|
|
|
<tr class="ivu-table-row">
|
|
|
<td class="ivu-table-cell fixed-td" >空气甲烷浓度</td>
|
|
|
<td class="ivu-table-cell test">{{roomInfo.infos.CH4 || '--'}}</td>
|
|
|
<td class="ivu-table-cell" >{{ CHData || '--'}} ppm</td>
|
|
|
- <td class="ivu-table-cell" ><button class="look-btn" @click="getBoundData(roomInfo.infos.CH4)">查看</button></td>
|
|
|
+ <td class="ivu-table-cell" ><button v-if="roomInfo.infos.CH4" class="look-btn" @click="getBoundData(roomInfo.infos.CH4)">查看</button></td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
@@ -72,7 +72,7 @@
|
|
|
|
|
|
<script>
|
|
|
import axios from 'axios'
|
|
|
-import {formatTime} from '../../tools/formatTime.js'
|
|
|
+import {formatTime, amendTime, date} from '../../tools/formatTime.js'
|
|
|
// import {currentTime} from '../../tools/currentDate.js'
|
|
|
import alarmCharts from '../main/AlarmCharts'
|
|
|
export default {
|
|
@@ -223,19 +223,24 @@ export default {
|
|
|
getBoundData (code) {
|
|
|
document.querySelector(".mask-bg").style.display = 'block'
|
|
|
document.querySelector(".mask-layout").style.display = 'block'
|
|
|
+ let period = "5min"
|
|
|
+ let receivetime = {
|
|
|
+ $gte: date(amendTime(Date.parse(new Date()) - 24 * 60 * 60 * 60 * 30)),
|
|
|
+ $lt: date(amendTime(Date.parse(new Date())))
|
|
|
+ }
|
|
|
let params = {
|
|
|
criteria: {
|
|
|
- // id: this.roomInfo.id,
|
|
|
- id: "Sp1101080001001004013",
|
|
|
- // code:code,
|
|
|
- code: "CO2", // 信息点编码
|
|
|
- // period: period,
|
|
|
- period: "5min",
|
|
|
- // receivetime:receivetime,
|
|
|
- receivetime: {
|
|
|
- $gte: "20190110000000",
|
|
|
- $lt: "20190111000000"
|
|
|
- }
|
|
|
+ id: this.roomInfo.id,
|
|
|
+ // id: "Sp1101080001001004013",
|
|
|
+ code: code, // 信息点编码
|
|
|
+ // code: "CO2"
|
|
|
+ period: period,
|
|
|
+ // period: "5min",
|
|
|
+ receivetime: receivetime
|
|
|
+ // receivetime: {
|
|
|
+ // $gte: "20190110000000",
|
|
|
+ // $lt: "20190111000000"
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
axios.post(`/data-platform-3/data-platform-3/hisdata/query_period_data?projectId=${this.$store.state.projId}&secret=`, params).then(res => {
|