| | |
| | | ></video> |
| | | </div> |
| | | </div> |
| | | <div v-show="vidList.length == 0"> |
| | | <img src="../../../public/img/video-poster.3a25068.png" alt /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | >更新时间:{{item.valueDataList[item.valueDataList.length-1].startTime}}</div> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="hasNostaList"> |
| | | <img |
| | | src="../../../public/img/nodata.png" |
| | | width="160%" |
| | | height="200%" |
| | | alt |
| | | /> |
| | | </div>--> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div>~ |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | getLandList () { |
| | | const farmId = this.currentDetails.id |
| | | getLandList(this.$store.state.user.user.dept_id, farmId).then((res) => { |
| | | console.log(res.data.data) |
| | | this.plotList = res.data.data |
| | | this.plotNameObj = this.plotList[0] |
| | | this.plotName = this.plotNameObj.id |
| | |
| | | //根据地块id查询监控和监测设备 |
| | | getStationAndVideoByLandId (id, type) { |
| | | getStationAndVideoByLandId(id, type).then((res) => { |
| | | console.log(res, 333333333333333333) |
| | | this.vidList = res.data.data.vidList |
| | | this.staList = res.data.data.staList |
| | | // this.playFlvVideo() |
| | | if (this.staList.length > 0) { |
| | | this.$nextTick(() => { |
| | | this.getStationDateByStcd(this.staList[0].stcd) |
| | |
| | | this.playFlvVideo() |
| | | }) |
| | | }) |
| | | |
| | | |
| | | }, |
| | | // 点击获取对应监测设备数据 |
| | |
| | | const endTime = `${year}-${month}-${strDate} 23:59:59` |
| | | getStationDateByStcd(stcd, startTime, endTime).then((res) => { |
| | | this.stationData = res.data.data |
| | | console.log(this.stationData, 99999999999999) |
| | | }) |
| | | }, |
| | | // flv视频播放 |
| | | playFlvVideo () { |
| | | |
| | | console.log(flvjs, flvjs.isSupported(), this.vidList, 5555) |
| | | if (flvjs.isSupported()) { |
| | | |
| | | var arr = this.vidList |
| | | console.log('66666666666666666', arr) |
| | | arr.forEach((item, index) => { |
| | | |
| | | var videoElement = document.getElementById(`videoElement${index}`) |
| | |
| | | enableStashBuffer: false, |
| | | fixAudioTimestampGap: false, |
| | | }) |
| | | console.log(flvPlayer, 44444444) |
| | | flvPlayer.attachMediaElement(videoElement) |
| | | flvPlayer.load() |
| | | flvPlayer.play() |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | & > div:last-child { |
| | | margin-bottom: 16px; |
| | | } |
| | | .hasNostaList { |
| | | margin: 0 auto; |
| | | } |
| | | } |
| | | } |
| | | } |