Browse Source

Merge branch 'develop' of http://39.106.31.193:9211/mengff/jihe-hs into develop

wangqin
qingzhengli 8 months ago
parent
commit
cd6277f69c
  1. 31
      ruoyi-ui/src/views/JiHeExpressway/components/Video/Video.vue
  2. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue
  3. 3
      ruoyi-ui/vue.config.js

31
ruoyi-ui/src/views/JiHeExpressway/components/Video/Video.vue

@ -10,6 +10,11 @@ import { HttpLivePlayer, openLiveVideo } from "./videoStream.js"
export default {
name: 'Video',
data() {
return {
player: null
}
},
props: {
camId: {
type: String,
@ -31,18 +36,30 @@ export default {
default: 0
}
},
watch: {
camId: {
handler(newV) {
this.playVideo();
},
immediate: true
}
},
async mounted() {
// setTimeout(() => {
// this.$nextTick(() => {
if (this.videoType == 'flv') {
// const player = await openLiveVideo(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum })
const player = new HttpLivePlayer(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum, rangeIndex: this.rangeIndex });
this.$once("hook:beforeDestroy", () => player?.destroy());
}
this.playVideo();
this.$once("hook:beforeDestroy", () => this.player?.destroy());
// })
// })
},
methods: {
playVideo() {
this.player?.destroy();
if (this.videoType == 'flv') {
// const player = await openLiveVideo(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum })
this.player = new HttpLivePlayer(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum, rangeIndex: this.rangeIndex });
}
}
}
}
</script>

4
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue

@ -15,9 +15,9 @@
</ElTabPane>
</ElTabs>
</div>
<template #footer>
<Button @click.native="deviceControlVisible = true"> 设备操作 </Button>
<Button v-if="data.deviceState == '1'" @click.native="deviceControlVisible = true"> 设备操作 </Button>
<Button v-else style="background-color: #bbb;"> 设备离线 </Button>
</template>
<DeviceControlDialog

3
ruoyi-ui/vue.config.js

@ -56,7 +56,8 @@ module.exports = {
// target: `http://10.168.68.42:8087`, //王思祥
// target: `http://10.168.65.194:8087`, //赵祥龙
// target: `http://10.168.65.156:8097`, //孟
target: `http://10.168.65.103:8097`,
target: `http://10.168.76.181:8087`, //王家宝
// target: `http://10.168.65.103:8097`,
changeOrigin: true,
pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "",

Loading…
Cancel
Save