|
@@ -11,211 +11,14 @@
|
|
|
|
|
|
|
|
<div class="center">
|
|
<div class="center">
|
|
|
<div class="monitor">
|
|
<div class="monitor">
|
|
|
- <el-carousel
|
|
|
|
|
- ref="carouselRef"
|
|
|
|
|
- indicator-position="outside"
|
|
|
|
|
- style="height: calc(100% - 42px)"
|
|
|
|
|
- :autoplay="false"
|
|
|
|
|
- trigger="click"
|
|
|
|
|
- @change="carouselChange"
|
|
|
|
|
- >
|
|
|
|
|
- <el-carousel-item
|
|
|
|
|
- v-for="(page, pageIndex) in pageNum"
|
|
|
|
|
- :key="pageIndex"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="page">
|
|
|
|
|
- <div
|
|
|
|
|
- :style="itemStyle"
|
|
|
|
|
- v-for="(video, videoIndex) in itemNum(pageIndex)"
|
|
|
|
|
- :key="videoIndex"
|
|
|
|
|
- >
|
|
|
|
|
- <div
|
|
|
|
|
- v-if="pageIndex == carouselIndex"
|
|
|
|
|
- style="width: 100%; height: 100%"
|
|
|
|
|
- @click="
|
|
|
|
|
- deviceCode =
|
|
|
|
|
- videoList[pageIndex * layout * layout + videoIndex][
|
|
|
|
|
- 'cameraCode'
|
|
|
|
|
- ]
|
|
|
|
|
- "
|
|
|
|
|
- :class="{
|
|
|
|
|
- active:
|
|
|
|
|
- deviceCode ==
|
|
|
|
|
- videoList[pageIndex * layout * layout + videoIndex][
|
|
|
|
|
- 'cameraCode'
|
|
|
|
|
- ]
|
|
|
|
|
- }"
|
|
|
|
|
- class="box-border videoItem"
|
|
|
|
|
- >
|
|
|
|
|
- <myVideo
|
|
|
|
|
- :video-url="
|
|
|
|
|
- videoList[pageIndex * layout * layout + videoIndex]['url']
|
|
|
|
|
- "
|
|
|
|
|
- :index="pageIndex * layout * layout + videoIndex"
|
|
|
|
|
- />
|
|
|
|
|
- <div class="mask1">
|
|
|
|
|
- <img
|
|
|
|
|
- @click.stop="
|
|
|
|
|
- handleScreenshot(
|
|
|
|
|
- pageIndex * layout * layout + videoIndex,
|
|
|
|
|
- $event
|
|
|
|
|
- )
|
|
|
|
|
- "
|
|
|
|
|
- :src="
|
|
|
|
|
- require('@/assets/svgs/centerctl/videoSur/camera.svg')
|
|
|
|
|
- "
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div
|
|
|
|
|
- class="mask2"
|
|
|
|
|
- v-if="
|
|
|
|
|
- stopList.includes(
|
|
|
|
|
- pageIndex * layout * layout + videoIndex
|
|
|
|
|
- )
|
|
|
|
|
- "
|
|
|
|
|
- >
|
|
|
|
|
- <img
|
|
|
|
|
- class="play"
|
|
|
|
|
- @click.stop="
|
|
|
|
|
- play(pageIndex * layout * layout + videoIndex)
|
|
|
|
|
- "
|
|
|
|
|
- :src="
|
|
|
|
|
- require('@/assets/svgs/centerctl/videoSur/play.svg')
|
|
|
|
|
- "
|
|
|
|
|
- alt=""
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-carousel-item>
|
|
|
|
|
- </el-carousel>
|
|
|
|
|
-
|
|
|
|
|
- <div class="center-handle">
|
|
|
|
|
- <div
|
|
|
|
|
- class="layout-type"
|
|
|
|
|
- id="layout"
|
|
|
|
|
- @click="getFocus"
|
|
|
|
|
- @blur="blur"
|
|
|
|
|
- tabindex="0"
|
|
|
|
|
- >
|
|
|
|
|
- <div style="width: 100%; height: 100%" @click="toggle" tabindex="0">
|
|
|
|
|
- <div class="layout">
|
|
|
|
|
- <div
|
|
|
|
|
- v-for="(item, index) in layout * layout"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- :style="{
|
|
|
|
|
- width: `calc((100% - 1px * (${layout} - 1)) / ${layout})`,
|
|
|
|
|
- height: `calc((100% - 1px * (${layout} - 1)) / ${layout})`,
|
|
|
|
|
- backgroundColor: '#404446'
|
|
|
|
|
- }"
|
|
|
|
|
- ></div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <i class="el-icon-caret-bottom"></i>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="group" v-show="isShow">
|
|
|
|
|
- <div
|
|
|
|
|
- class="layout"
|
|
|
|
|
- v-show="index + 1 != layout"
|
|
|
|
|
- v-for="(item, index) in maxLayout"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- >
|
|
|
|
|
- <div
|
|
|
|
|
- @click="choose(index)"
|
|
|
|
|
- v-for="n in (index + 1) * (index + 1)"
|
|
|
|
|
- :key="n"
|
|
|
|
|
- :style="{
|
|
|
|
|
- width: `calc((100% - 1px * (${index + 1} - 1)) / ${
|
|
|
|
|
- index + 1
|
|
|
|
|
- })`,
|
|
|
|
|
- height: `calc((100% - 1px * (${index + 1} - 1)) / ${
|
|
|
|
|
- index + 1
|
|
|
|
|
- })`,
|
|
|
|
|
- backgroundColor: '#404446'
|
|
|
|
|
- }"
|
|
|
|
|
- ></div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="play">
|
|
|
|
|
- <el-tooltip
|
|
|
|
|
- class="item"
|
|
|
|
|
- effect="dark"
|
|
|
|
|
- content="第一个"
|
|
|
|
|
- placement="top"
|
|
|
|
|
- >
|
|
|
|
|
- <img
|
|
|
|
|
- @click="home"
|
|
|
|
|
- :src="require('@/assets/svgs/centerctl/videoSur/last.svg')"
|
|
|
|
|
- alt=""
|
|
|
|
|
- />
|
|
|
|
|
- </el-tooltip>
|
|
|
|
|
- <el-tooltip
|
|
|
|
|
- class="item"
|
|
|
|
|
- effect="dark"
|
|
|
|
|
- content="上一个"
|
|
|
|
|
- placement="top"
|
|
|
|
|
- >
|
|
|
|
|
- <img
|
|
|
|
|
- @click="last"
|
|
|
|
|
- :src="
|
|
|
|
|
- require('@/assets/svgs/centerctl/videoSur/fast-backward.svg')
|
|
|
|
|
- "
|
|
|
|
|
- alt=""
|
|
|
|
|
- />
|
|
|
|
|
- </el-tooltip>
|
|
|
|
|
- <el-tooltip
|
|
|
|
|
- class="item"
|
|
|
|
|
- effect="dark"
|
|
|
|
|
- content="播放/暂停"
|
|
|
|
|
- placement="top"
|
|
|
|
|
- >
|
|
|
|
|
- <img
|
|
|
|
|
- @click="playStop"
|
|
|
|
|
- :src="require('@/assets/svgs/centerctl/videoSur/play-stop.svg')"
|
|
|
|
|
- alt=""
|
|
|
|
|
- />
|
|
|
|
|
- </el-tooltip>
|
|
|
|
|
- <el-tooltip
|
|
|
|
|
- class="item"
|
|
|
|
|
- effect="dark"
|
|
|
|
|
- content="下一个"
|
|
|
|
|
- placement="top"
|
|
|
|
|
- >
|
|
|
|
|
- <img
|
|
|
|
|
- @click="next"
|
|
|
|
|
- :src="
|
|
|
|
|
- require('@/assets/svgs/centerctl/videoSur/fast-forward.svg')
|
|
|
|
|
- "
|
|
|
|
|
- alt=""
|
|
|
|
|
- />
|
|
|
|
|
- </el-tooltip>
|
|
|
|
|
- <el-tooltip
|
|
|
|
|
- class="item"
|
|
|
|
|
- effect="dark"
|
|
|
|
|
- content="最后一个"
|
|
|
|
|
- placement="top"
|
|
|
|
|
- >
|
|
|
|
|
- <img
|
|
|
|
|
- @click="end"
|
|
|
|
|
- :src="require('@/assets/svgs/centerctl/videoSur/next.svg')"
|
|
|
|
|
- alt=""
|
|
|
|
|
- />
|
|
|
|
|
- </el-tooltip>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <myVideo
|
|
|
|
|
+ :width="960"
|
|
|
|
|
+ :height="540"
|
|
|
|
|
+ show-reload-btn
|
|
|
|
|
+ @setLoading="setLoading"
|
|
|
|
|
+ ref="myVideoRef"
|
|
|
|
|
+ />
|
|
|
|
|
|
|
|
- <div class="video-handle">
|
|
|
|
|
- <img
|
|
|
|
|
- :src="require('@/assets/svgs/centerctl/videoSur/volume-x.svg')"
|
|
|
|
|
- alt=""
|
|
|
|
|
- />
|
|
|
|
|
- <img
|
|
|
|
|
- :src="require('@/assets/svgs/centerctl/videoSur/big.svg')"
|
|
|
|
|
- alt=""
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="height: 100%; padding: 0">
|
|
<div style="height: 100%; padding: 0">
|
|
@@ -336,7 +139,7 @@
|
|
|
import myVideo from '../components/video.vue';
|
|
import myVideo from '../components/video.vue';
|
|
|
import * as realTime from '@/api/isp/ispRealtime/monitor/index';
|
|
import * as realTime from '@/api/isp/ispRealtime/monitor/index';
|
|
|
import * as deviceApi from '@/api/isp/deviceManage/robot';
|
|
import * as deviceApi from '@/api/isp/deviceManage/robot';
|
|
|
-
|
|
|
|
|
|
|
+ // import FLVPlayer from "./FLVPlayer.vue";
|
|
|
export default {
|
|
export default {
|
|
|
name: 'MonitorPage',
|
|
name: 'MonitorPage',
|
|
|
components: {
|
|
components: {
|
|
@@ -348,6 +151,7 @@
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
layout: 1,
|
|
layout: 1,
|
|
|
|
|
+ loading: false,
|
|
|
videoList: [],
|
|
videoList: [],
|
|
|
carouselIndex: 0,
|
|
carouselIndex: 0,
|
|
|
isShow: false,
|
|
isShow: false,
|
|
@@ -402,6 +206,9 @@
|
|
|
},
|
|
},
|
|
|
mounted() {},
|
|
mounted() {},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ setLoading(loading) {
|
|
|
|
|
+ this.loading = loading;
|
|
|
|
|
+ },
|
|
|
itemNum(pageIndex) {
|
|
itemNum(pageIndex) {
|
|
|
if (this.pageNum != 1 && pageIndex == this.pageNum - 1) {
|
|
if (this.pageNum != 1 && pageIndex == this.pageNum - 1) {
|
|
|
return this.count - this.layout * this.layout * (this.pageNum - 1);
|
|
return this.count - this.layout * this.layout * (this.pageNum - 1);
|
|
@@ -541,25 +348,28 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
playStop() {
|
|
playStop() {
|
|
|
- let index = Math.floor(
|
|
|
|
|
- this.videoList.findIndex(
|
|
|
|
|
- (item) => item.cameraCode == this.deviceCode
|
|
|
|
|
- ) /
|
|
|
|
|
- (this.layout * this.layout)
|
|
|
|
|
- );
|
|
|
|
|
- let videoElement = document.getElementById('video' + index);
|
|
|
|
|
- if (videoElement && videoElement.paused) {
|
|
|
|
|
- videoElement.play();
|
|
|
|
|
- this.stopList = this.stopList.filter((item) => item != index);
|
|
|
|
|
- } else {
|
|
|
|
|
- if (videoElement) videoElement.pause();
|
|
|
|
|
- this.stopList.push(index);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.$refs.myVideoRef.playStop();
|
|
|
|
|
+ // let index = Math.floor(
|
|
|
|
|
+ // this.videoList.findIndex(
|
|
|
|
|
+ // (item) => item.cameraCode == this.deviceCode
|
|
|
|
|
+ // ) /
|
|
|
|
|
+ // (this.layout * this.layout)
|
|
|
|
|
+ // );
|
|
|
|
|
+ // let videoElement = document.getElementById('video' + index);
|
|
|
|
|
+ // if (videoElement && videoElement.paused) {
|
|
|
|
|
+ // videoElement.play();
|
|
|
|
|
+ // this.stopList = this.stopList.filter((item) => item != index);
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // if (videoElement) videoElement.pause();
|
|
|
|
|
+ // this.stopList.push(index);
|
|
|
|
|
+ // }
|
|
|
},
|
|
},
|
|
|
play(index) {
|
|
play(index) {
|
|
|
- let videoElement = document.getElementById('video' + index);
|
|
|
|
|
- if (videoElement) videoElement.play();
|
|
|
|
|
- this.stopList = this.stopList.filter((item) => item != index);
|
|
|
|
|
|
|
+ this.$refs.myVideoRef.play();
|
|
|
|
|
+
|
|
|
|
|
+ // let videoElement = document.getElementById('video' + index);
|
|
|
|
|
+ // if (videoElement) videoElement.play();
|
|
|
|
|
+ // this.stopList = this.stopList.filter((item) => item != index);
|
|
|
},
|
|
},
|
|
|
async getCameraList(list) {
|
|
async getCameraList(list) {
|
|
|
this.monitorData = list;
|
|
this.monitorData = list;
|
|
@@ -567,7 +377,7 @@
|
|
|
this.codeList.push(item.deviceCode);
|
|
this.codeList.push(item.deviceCode);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- this.getClickId(list[0]);
|
|
|
|
|
|
|
+ // this.getClickId(list[0]);
|
|
|
},
|
|
},
|
|
|
async getClickId(device) {
|
|
async getClickId(device) {
|
|
|
this.camera = device;
|
|
this.camera = device;
|
|
@@ -590,7 +400,9 @@
|
|
|
async getCameraUrl() {
|
|
async getCameraUrl() {
|
|
|
await realTime.delStreamProxy(this.deviceCode);
|
|
await realTime.delStreamProxy(this.deviceCode);
|
|
|
const res = await realTime.getCameraUrl([this.deviceCode]);
|
|
const res = await realTime.getCameraUrl([this.deviceCode]);
|
|
|
- this.videoList = res;
|
|
|
|
|
|
|
+ this.$refs.myVideoRef.startPlay(res[0].url);
|
|
|
|
|
+ // this.videoList = res;
|
|
|
|
|
+ console.log(this.videoList);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
@@ -737,49 +549,7 @@
|
|
|
height: calc(100% - 27px);
|
|
height: calc(100% - 27px);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .page {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-content: space-between;
|
|
|
|
|
- flex-wrap: wrap;
|
|
|
|
|
- gap: 5px;
|
|
|
|
|
- height: 100%;
|
|
|
|
|
- .videoItem {
|
|
|
|
|
- border: 4px solid transparent;
|
|
|
|
|
- position: relative;
|
|
|
|
|
- .mask1 {
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- top: 0;
|
|
|
|
|
- left: 0;
|
|
|
|
|
- width: 50px;
|
|
|
|
|
- height: 20px;
|
|
|
|
|
- z-index: 111;
|
|
|
|
|
- }
|
|
|
|
|
- .mask2 {
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- top: 50%;
|
|
|
|
|
- left: 50%;
|
|
|
|
|
- transform: translate(-50%, -50%);
|
|
|
|
|
- width: 50px;
|
|
|
|
|
- height: 50px;
|
|
|
|
|
- z-index: 111;
|
|
|
|
|
- background-color: #000000d3;
|
|
|
|
|
- border-radius: 50%;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- .play {
|
|
|
|
|
- width: 70%;
|
|
|
|
|
- transform: translateX(3px);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .active {
|
|
|
|
|
- border: 4px solid #2c8ae0;
|
|
|
|
|
- }
|
|
|
|
|
- img {
|
|
|
|
|
- vertical-align: middle;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
.deviceInfo,
|
|
.deviceInfo,
|
|
|
.deviceInfo * {
|
|
.deviceInfo * {
|
|
@@ -937,6 +707,8 @@
|
|
|
|
|
|
|
|
.play {
|
|
.play {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ width: 100%;
|
|
|
align-items: flex-start;
|
|
align-items: flex-start;
|
|
|
gap: 24px;
|
|
gap: 24px;
|
|
|
}
|
|
}
|