|
@@ -72,6 +72,9 @@
|
|
|
<div class="video">
|
|
|
<div class="video-content" @click="toVideo">
|
|
|
<div class="chart-tab-title">视频监控</div>
|
|
|
+ <div class="camera">
|
|
|
+ <iframe ref="iframe" :src="'static/index.html?'+'1'+'&'+ cameraOne +'&'+ cameraTwo + '&' +'100%' + '&' + '0'" style="width: 100%; height: 90%;" frameborder="0"></iframe>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="swiper"><swiperMulti @onOpen="onOpen" @openItem="openItem"></swiperMulti></div>
|
|
@@ -125,7 +128,7 @@ import ELine2 from "./charts/Eline2";
|
|
|
import chartLine from "./charts/chartLine";
|
|
|
import img from "@/assets/u62.png";
|
|
|
import utils from "../../utils/utils.js";
|
|
|
-let timer, timer1;
|
|
|
+let timer, timer1, timer2
|
|
|
export default {
|
|
|
name: "Home",
|
|
|
data() {
|
|
@@ -152,15 +155,16 @@ export default {
|
|
|
callList: [],
|
|
|
// 保育
|
|
|
listData: [],
|
|
|
- cameraOne: '',
|
|
|
- cameraTwo: '',
|
|
|
+ cameraOne: 'ws://183.246.182.241:10080/camera_relay?tcpaddr=admin%3Atx123456%40192.168.1.25',
|
|
|
+ cameraTwo: 'rtsp://admin:tx123456@192.168.1.25',
|
|
|
screenWidth: '',
|
|
|
// 水量
|
|
|
echartsList: [],
|
|
|
isQk: false,
|
|
|
lists: {},
|
|
|
// 控制日志
|
|
|
- logList: []
|
|
|
+ logList: [],
|
|
|
+ setIval: 1
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
@@ -277,18 +281,39 @@ export default {
|
|
|
}
|
|
|
this.isQk = true;
|
|
|
},
|
|
|
+ // 跳转到监控页面
|
|
|
toVideo() {
|
|
|
this.$router.push('/monitor')
|
|
|
+ console.log('------------------------------');
|
|
|
+ },
|
|
|
+ // 首页监控轮播
|
|
|
+ setInitCremar() {
|
|
|
+ timer2 = setInterval(() => {
|
|
|
+ if(this.setIval === 1) {
|
|
|
+ this.cameraOne = "ws://183.246.182.241:10080/camera_relay?tcpaddr=admin%3Atx123456%40192.168.1.25";
|
|
|
+ this.cameraTwo = "rtsp://admin:tx123456@192.168.1.25";
|
|
|
+ } else if (this.setIval === 2) {
|
|
|
+ this.cameraOne = "ws://183.246.182.241:10080/camera_relay?tcpaddr=admin%3Atx123456%40192.168.1.31";
|
|
|
+ this.cameraTwo = "rtsp://admin:tx123456@192.168.1.31";
|
|
|
+ } else if (this.setIval === 3) {
|
|
|
+ this.setIval = 0;
|
|
|
+ this.cameraOne = "ws://183.246.182.241:10080/camera_relay?tcpaddr=admin%3Atx123456%40192.168.1.50";
|
|
|
+ this.cameraTwo = "rtsp://admin:tx123456@192.168.1.50";
|
|
|
+ }
|
|
|
+ this.setIval++;
|
|
|
+ }, 10000)
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.init();
|
|
|
this.setInit();
|
|
|
this.initList();
|
|
|
+ this.setInitCremar()
|
|
|
},
|
|
|
beforeRouteLeave(to, from, next) {
|
|
|
clearInterval(timer1);
|
|
|
clearInterval(timer);
|
|
|
+ clearInterval(timer2)
|
|
|
next();
|
|
|
}
|
|
|
};
|
|
@@ -550,6 +575,11 @@ export default {
|
|
|
// display: flex;
|
|
|
// flex-direction: column;
|
|
|
overflow: hidden;
|
|
|
+ > .camera {
|
|
|
+ padding: 35px 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
> .swiper {
|