智慧农业大数据平台
shuishen
2022-08-05 569d022a9da5c024afcf7a25a4dabfeb3429e59a
Merge branch 'master' of http://192.168.0.105:10010/r/zhny-dsjdp
1 files modified
1 files added
25 ■■■■■ changed files
public/img/nodata.png patch | view | raw | blame | history
src/views/equipment/index.vue 25 ●●●●● patch | view | raw | blame | history
public/img/nodata.png
src/views/equipment/index.vue
@@ -51,6 +51,9 @@
                                ></video>
                            </div>
                        </div>
                        <div v-show="vidList.length == 0">
                            <img src="../../../public/img/video-poster.3a25068.png" alt />
                        </div>
                    </div>
                </div>
@@ -168,9 +171,17 @@
                                    >更新时间:{{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>
@@ -361,7 +372,6 @@
        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
@@ -371,10 +381,8 @@
        //根据地块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)
@@ -386,7 +394,6 @@
                    this.playFlvVideo()
                })
            })
        },
        // 点击获取对应监测设备数据
@@ -410,17 +417,14 @@
            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}`)
@@ -435,7 +439,6 @@
                        enableStashBuffer: false,
                        fixAudioTimestampGap: false,
                    })
                    console.log(flvPlayer, 44444444)
                    flvPlayer.attachMediaElement(videoElement)
                    flvPlayer.load()
                    flvPlayer.play()
@@ -444,6 +447,7 @@
            }
        }
    }
}
</script>
@@ -692,6 +696,9 @@
                        & > div:last-child {
                            margin-bottom: 16px;
                        }
                        .hasNostaList {
                            margin: 0 auto;
                        }
                    }
                }
            }