| | |
| | | </ul> |
| | | </div> |
| | | <div class="nape-boxs"> |
| | | <!-- 气象监测 --> |
| | | <div v-for="(item, index) in stationData.weatherList" :key="index"> |
| | | <div class="top"> |
| | | <div class="l"> |
| | |
| | | >{{tmpTDiff(item.valueDataList[item.valueDataList.length-1].startTime)}}天前更新</div> |
| | | </div> |
| | | </div> |
| | | <!-- 土壤监测 --> |
| | | <div v-for="(item, index) in stationData.soliList" :key="index"> |
| | | <div class="top"> |
| | | <div class="l"> |
| | |
| | | <span class="old-btn" @click="historyData(item)">历史数据</span> |
| | | </div> |
| | | |
| | | <div class="r">{{tmpTDiff(item.valueDataList[item.valueDataList.length-1].startTime)}}天前更新</div> |
| | | <div |
| | | class="r" |
| | | >{{tmpTDiff(item.valueDataList[item.valueDataList.length-1].startTime)}}天前更新</div> |
| | | </div> |
| | | </div> |
| | | <!-- 空气监测 --> |
| | | <div v-for="(item, index) in stationData.airList" :key="index"> |
| | | <div class="top"> |
| | | <div class="l"> |
| | |
| | | <span class="old-btn" @click="historyData(item)">历史数据</span> |
| | | </div> |
| | | |
| | | <div class="r">{{tmpTDiff(item.valueDataList[item.valueDataList.length-1].startTime)}}天前更新</div> |
| | | <div |
| | | class="r" |
| | | >{{tmpTDiff(item.valueDataList[item.valueDataList.length-1].startTime)}}天前更新</div> |
| | | </div> |
| | | </div> |
| | | <!-- 水质监测 --> |
| | | <div v-for="(item, index) in stationData.waterList" :key="index"> |
| | | <div class="top"> |
| | | <div class="l"> |
| | |
| | | <script> |
| | | |
| | | import { |
| | | getLandList, |
| | | getStationAndVideoByLandId, |
| | | getStationDateByStcd |
| | | getLandList |
| | | } from '@/api/land/land' |
| | | import { |
| | | getStationAndVideoByLandId, |
| | | getStationDateByStcd |
| | | } from '@/api/equipment/equipment' |
| | | import { nextTick } from 'vue' |
| | | import flvjs from 'flv.js' |
| | | import dateUtils from '@/utils/dateUtils' // 1.先引入 |
| | |
| | | }, |
| | | |
| | | historyData (item) { |
| | | var valueDataList = item.valueDataList |
| | | var values = [] |
| | | var names = [] |
| | | const valueDataList = item.valueDataList |
| | | const values = [] |
| | | const names = [] |
| | | valueDataList.forEach(item => { |
| | | values.push(item.value) |
| | | names.push(item.startTime.substring(5,10) + ' ' + item.startTime.substring(11) + ':00') |
| | | names.push(item.startTime.substring(5, 10) + ' ' + item.startTime.substring(11) + ':00') |
| | | }) |
| | | this.initLine('EchartsBox', '单位' + item.unit, names, values) |
| | | |
| | |
| | | |
| | | this.stationData = res.data.data |
| | | if (this.stationData.soilList.length == 0 && this.stationData.weatherList.length == 0 && |
| | | this.stationData.airList.length == 0 && this.stationData.waterList.length == 0) { |
| | | this.stationData.airList.length == 0 && this.stationData.waterList.length == 0) { |
| | | this.isNostaList = false |
| | | } else { |
| | | this.isNostaList = true |