|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
|
- <div class="monit">
|
|
|
- <div class="monit-left">
|
|
|
- <div class="btn" @click="show=true">视频列表</div>
|
|
|
- <div class="btn btn-fixed" @click="showVideo = true">配置</div>
|
|
|
-<!-- <div class="monit-title" @click="isShow = !isShow">-->
|
|
|
+<!-- <div class="monit" @click="show = false">-->
|
|
|
+<!-- <div class="monit-left">-->
|
|
|
+<!-- <div class="btn" v-show="!show" @click.stop="show=true">视频列表</div>-->
|
|
|
+<!-- <div class="btn btn-fixed" @click.stop="showVideo = true">配置</div>-->
|
|
|
+<!-- <div class="monit-title" @click.stop="isShow = !isShow">-->
|
|
|
<!-- <span style="font-size: 16px">选择监控:</span>-->
|
|
|
<!--  -->
|
|
|
<!-- <el-cascader-->
|
|
@@ -14,94 +14,168 @@
|
|
|
<!-- :props="{value: 'id', label: 'cameraName', children: 'cameraList', expandTrigger: 'hover', disabled: 'runStatus'}"-->
|
|
|
<!-- :show-all-levels="false"></el-cascader>-->
|
|
|
<!-- </div>-->
|
|
|
- <iframe v-if="isVideo" :src="'static/jinm/index.html?'+'1'+','+ cameraOne +','+ cameraTwo + ',' +'100%' + ',' + '0'" :style="{width: $store.state.screenVideo ? '100%': '80%', height: '100%', margin: '0 auto'}" frameborder="0" allowfullscreen="true"></iframe>
|
|
|
- </div>
|
|
|
- <div class="monit-right" v-if="$store.state.screenVideo">
|
|
|
- <swiper style="height: 100%; margin-top: auto; margin-bottom: auto;" ref="mySwiper" class="swiper" :options="swiperOption">
|
|
|
- <swiper-slide v-for="(item, i) in videoList" :key="i">
|
|
|
- <div class="case">
|
|
|
- <template v-if="num === 0 && (i === 0 || i === 1 || i === 2)">
|
|
|
- <iframe :src="'static/jinm/index.html?'+'1'+','+ item.wsUrl +','+ item.rtspUrl + ',' +'100%' + ',' + '0'" style="width: 100%; height: 100%;" frameborder="0" allowfullscreen="true"></iframe>
|
|
|
- </template>
|
|
|
- <template v-else-if="num === 3 && (i ===3 || i === 4 || i === 5)">
|
|
|
- <iframe :src="'static/jinm/index.html?'+'1'+','+ item.wsUrl +','+ item.rtspUrl + ',' +'100%' + ',' + '0'" style="width: 100%; height: 100%;" frameborder="0" allowfullscreen="true"></iframe>
|
|
|
- </template>
|
|
|
+<!-- <iframe v-if="isVideo" :src="'static/jinm/index.html?'+'1'+','+ cameraOne +','+ cameraTwo + ',' +'100%' + ',' + '0'" :style="{width: $store.state.screenVideo ? '100%': '80%', height: '100%', margin: '0 auto'}" frameborder="0" allowfullscreen="true"></iframe>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div class="monit-right" v-if="$store.state.screenVideo">-->
|
|
|
+<!-- <swiper style="height: 100%; margin-top: auto; margin-bottom: auto;" ref="mySwiper" class="swiper" :options="swiperOption">-->
|
|
|
+<!-- <swiper-slide v-for="(item, i) in videoList" :key="i">-->
|
|
|
+<!-- <div class="case">-->
|
|
|
+<!-- <!– v-if="num === 0 && (i === 0 || i === 1 || i === 2)" –>-->
|
|
|
+<!-- <template>-->
|
|
|
+<!-- <iframe :src="'static/jinm/index.html?'+'1'+','+ item.wsUrl +','+ item.rtspUrl + ',' +'100%' + ',' + '0'" style="width: 100%; height: 100%;" frameborder="0" allowfullscreen="true"></iframe>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!--<!– <template v-else-if="num === 3 && (i ===3 || i === 4 || i === 5)">–>-->
|
|
|
+<!--<!– <iframe :src="'static/jinm/index.html?'+'1'+','+ item.wsUrl +','+ item.rtspUrl + ',' +'100%' + ',' + '0'" style="width: 100%; height: 100%;" frameborder="0" allowfullscreen="true"></iframe>–>-->
|
|
|
+<!--<!– </template>–>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </swiper-slide>-->
|
|
|
+<!-- </swiper>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div class="monit_left" v-show="show">-->
|
|
|
+<!-- <div class="monit_content">-->
|
|
|
+<!-- <div class="boxTile" :class="[videoActive === i ? 'active' : '']" v-for="(item, i) in options" :key="i" @click.stop="setVideo(item, i)">-->
|
|
|
+<!-- {{item.cameraName}}-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div class="monit-scroll monit_content" style="overflow: auto;">-->
|
|
|
+<!-- <div class="boxTile" :class="[active === i ? 'active' : '']" v-for="(item, i) in videoItem" :key="i" @click.stop="getVideoItems(item, i)">-->
|
|
|
+<!-- {{item.cameraName}}-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div class="cancel" @click.stop="show=false">关闭监控列表</div>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div class="monit-dialog" v-show="showVideo" @click="showVideo = false">-->
|
|
|
+<!-- <div class="monit-content1">-->
|
|
|
+<!-- <div class="monit_box">-->
|
|
|
+<!-- <h3>视 频 配 置</h3>-->
|
|
|
+<!-- <div class="monit_flex">-->
|
|
|
+<!-- <div class="monit_bise">-->
|
|
|
+<!-- 展 示 轮 巡-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div class="monit_bise" @click.stop>-->
|
|
|
+<!-- <el-switch-->
|
|
|
+<!-- active-color="#13ce66"-->
|
|
|
+<!-- inactive-color="#ff4949"-->
|
|
|
+<!-- v-model="$store.state.screenVideo"-->
|
|
|
+<!-- @change="changeMode"></el-switch>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
+ <div class="monit">
|
|
|
+ <div class="monit_left">
|
|
|
+ <div class="monit_route">
|
|
|
+ <div
|
|
|
+ :class="['route_box', i === route_index ? 'route_active' : '']"
|
|
|
+ v-for="(item, i) in bigMonitList"
|
|
|
+ :key="item.id"
|
|
|
+ @click="updateRoute(i, item)">{{item.cameraName}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="video_back">
|
|
|
+ <div class="video_left_bottom"></div>
|
|
|
+ <div class="video_right_bottom"></div>
|
|
|
+ <div class="video_left_top">
|
|
|
+ <div class="video_shi" @click="setView">
|
|
|
+ <div class="video_icon"></div>
|
|
|
+ <div style="color: #fff;">视图</div>
|
|
|
</div>
|
|
|
- </swiper-slide>
|
|
|
- </swiper>
|
|
|
- </div>
|
|
|
- <div class="monit_left" v-show="show">
|
|
|
- <div style="flex: 1; background-color: #fff">
|
|
|
- <div class="boxTile" :class="[videoActive === i ? 'active' : '']" v-for="(item, i) in options" :key="i" @click="setVideo(item, i)">
|
|
|
- {{item.cameraName}}
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="monit-scroll" style="flex: 1; overflow: auto; background-color: #fff">
|
|
|
- <div class="boxTile" :class="[active === i ? 'active' : '']" v-for="(item, i) in videoItem" :key="i" @click="getVideoItems(item, i)">
|
|
|
- {{item.cameraName}}
|
|
|
+ <div class="video_right_top">
|
|
|
+ <div class="video_full" @click="onFull">
|
|
|
+ <div class="video_full_icon"></div>
|
|
|
+ <div style="color: #fff;">全屏</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="video_iframe">
|
|
|
+ <iframe v-if="num === 1 && isVideo" name="myIframe" :src="'static/jinm/index.html?'+'1'+','+ selectList[0].wsUrl +','+ selectList[0].rtspUrl + ',' +'100%' + ',' + '0'" style="width: 100%; height: 100%; margin: 0 auto;" frameborder="0" allowfullscreen="true"></iframe>
|
|
|
+ <template v-if="num === 4">
|
|
|
+ <iframe
|
|
|
+ v-for="(item, i) in selectList"
|
|
|
+ :key="i"
|
|
|
+ :src="'static/jinm/index.html?'+'1'+','+ item.wsUrl +','+ item.rtspUrl + ',' +'100%' + ',' + '0'"
|
|
|
+ frameborder="0"
|
|
|
+ allowfullscreen="true"
|
|
|
+ class="iframe_list"
|
|
|
+ ></iframe>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ <!-- 视图 -->
|
|
|
+ <div v-show="show" class="view_num" @click="cut">
|
|
|
+ {{num !== 1 ? '一分屏 ' : '四分屏'}}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="cancel" @click="show=false">关闭监控列表</div>
|
|
|
</div>
|
|
|
- <div class="monit-dialog" v-show="showVideo" @click="showVideo = false">
|
|
|
- <div class="monit-content1">
|
|
|
- <div class="monit_box">
|
|
|
- <h3>视 频 配 置</h3>
|
|
|
- <div class="monit_flex">
|
|
|
- <div class="monit_bise">
|
|
|
- 展 示 轮 巡
|
|
|
+ <div class="monit_right">
|
|
|
+ <div class="monit_dis">
|
|
|
+ <div :class="['dis_content', dis === 1 ? 'dis_active' : '']" @click="cutMonit(1)">位置划分</div>
|
|
|
+ <div :class="['dis_content', dis === 2 ? 'dis_active' : '']" @click="cutMonit(2)">功能划分</div>
|
|
|
+ </div>
|
|
|
+ <div class="monit_scroll">
|
|
|
+ <template v-if="dis === 1 ">
|
|
|
+ <template v-for="(item, i) in options">
|
|
|
+ <div :key="i">
|
|
|
+ <div class="monit_index" @click="clickParent(i)">
|
|
|
+ <i class="el-icon-caret-right" v-show="!item.isShow"></i>
|
|
|
+ <i class="el-icon-caret-bottom" v-show="item.isShow"></i>
|
|
|
+ <span class="padding_left_text">{{item.cameraName}}</span>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-show="item.isShow"
|
|
|
+ :class="['monit_item', n.isShow ? 'monit_item_active': '']"
|
|
|
+ v-for="(n) in item.cameraList"
|
|
|
+ :key="n.id"
|
|
|
+ @click="clickChild(n.id)">
|
|
|
+ <span>{{n.cameraName}}</span>
|
|
|
+ <div v-show="n.isShow" class="position_text">查看中</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="monit_bise" @click.stop>
|
|
|
- <el-switch
|
|
|
- active-color="#13ce66"
|
|
|
- inactive-color="#ff4949"
|
|
|
- v-model="$store.state.screenVideo"
|
|
|
- @change="changeMode"></el-switch>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="dis === 2">
|
|
|
+ <template v-for="(item, i) in monitList">
|
|
|
+ <div :key="i">
|
|
|
+ <div class="monit_index" @click="clickParent(i)">
|
|
|
+ <i class="el-icon-caret-right" v-show="!item.isShow"></i>
|
|
|
+ <i class="el-icon-caret-bottom" v-show="item.isShow"></i>
|
|
|
+ <span class="padding_left_text">{{item.cameraName}}</span>
|
|
|
+ </div>
|
|
|
+ <!-- v-show="item.isShow" -->
|
|
|
+ <div
|
|
|
+ v-show="item.isShow"
|
|
|
+ :class="['monit_item', n.isShow ? 'monit_item_active': '']"
|
|
|
+ v-for="(n) in item.cameraList"
|
|
|
+ :key="n.id"
|
|
|
+ @click="clickChild(n.id)">
|
|
|
+ <span>{{n.cameraName}}</span>
|
|
|
+ <div v-show="n.isShow" class="position_text">查看中</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { swiper, swiperSlide } from 'vue-awesome-swiper'
|
|
|
-import 'swiper/css/swiper.css'
|
|
|
-import {getVideoAll, getVideo, saveVideo, lastVideo, romVideo, findOne, findUpdate} from "@/utils/api";
|
|
|
-import axios from "axios";
|
|
|
+// import { swiper, swiperSlide } from 'vue-awesome-swiper'
|
|
|
+// import 'swiper/css/swiper.css'
|
|
|
+import {getVideoAll, getVideo, saveVideo, lastVideo, romVideo, findOne, findUpdate, getVideoLsitAndCamera} from "@/utils/api";
|
|
|
+// import axios from "axios";
|
|
|
import { mapActions } from "vuex";
|
|
|
-const c_swiper = document.getElementsByClassName("swiper")
|
|
|
+// const c_swiper = document.getElementsByClassName("swiper")
|
|
|
|
|
|
export default {
|
|
|
name: "Monit",
|
|
|
components: {
|
|
|
- swiper,
|
|
|
- swiperSlide,
|
|
|
+ // swiper,
|
|
|
+ // swiperSlide,
|
|
|
},
|
|
|
data() {
|
|
|
// let self = this;
|
|
|
return {
|
|
|
- swiperOption: {
|
|
|
- direction: 'vertical',
|
|
|
- slidesPerView: 3,
|
|
|
- slidesPerColumn: 1,
|
|
|
- slidesPerGroup: 3,
|
|
|
- // spaceBetween: 30,
|
|
|
- autoplay: {
|
|
|
- delay: 10000,
|
|
|
- disableOnInteraction: false
|
|
|
- },
|
|
|
- on: {
|
|
|
- slideChange() {
|
|
|
- // console.log(c_swiper[0].swiper)
|
|
|
- // this.num = c_swiper[0].swiper.activeIndex
|
|
|
- self.returnNum(c_swiper[0].swiper.activeIndex)
|
|
|
- // console.log(this.num);
|
|
|
- // return this.num
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
videoId: '',
|
|
|
isShow: false,
|
|
|
isVideo: false,
|
|
@@ -110,13 +184,24 @@ export default {
|
|
|
cameraTwo: '',
|
|
|
videoList: [],
|
|
|
timer: null,
|
|
|
- num: 0,
|
|
|
+ num: 1,
|
|
|
index: true,
|
|
|
videoActive: 0,
|
|
|
videoItem: [],
|
|
|
active: '',
|
|
|
show: false,
|
|
|
showVideo: false,
|
|
|
+ // 功能划分,位置划分
|
|
|
+ dis: 1,
|
|
|
+ selectList: [],
|
|
|
+ selectIds: [],
|
|
|
+ // 功能区大列表
|
|
|
+ bigMonitList: [],
|
|
|
+ // 功能区列表
|
|
|
+ monitList: [],
|
|
|
+ route_index: '',
|
|
|
+ // 选中monitid
|
|
|
+ monitId: '',
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -143,27 +228,40 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['setScreenVideoAsync']),
|
|
|
- init() {
|
|
|
+ async init () {
|
|
|
var that = this;
|
|
|
- axios.all([
|
|
|
- getVideoAll({}),
|
|
|
- lastVideo({})
|
|
|
- ]).then(axios.spread(function(res1, res2) {
|
|
|
- if(res1.code === 10000) {
|
|
|
- res1.data.forEach(item => {
|
|
|
- item.cameraList.forEach(items => {
|
|
|
- items.runStatus = !items.runStatus
|
|
|
- })
|
|
|
+ let res1 = await getVideoAll({});
|
|
|
+ if(res1.code === 10000){
|
|
|
+ res1.data.forEach(item => {
|
|
|
+ item.isShow = false;
|
|
|
+ item.cameraList.forEach(items => {
|
|
|
+ items.runStatus = !items.runStatus;
|
|
|
+ items.isShow = false;
|
|
|
})
|
|
|
- that.options = res1.data;
|
|
|
- that.videoItem = that.options[0].cameraList;
|
|
|
- }
|
|
|
- if(res2.code === 10000) {
|
|
|
- that.isVideo = true;
|
|
|
- that.cameraOne = res2.data.wsUrl;
|
|
|
- that.cameraTwo = res2.data.rtspUrl;
|
|
|
- }
|
|
|
- }))
|
|
|
+ })
|
|
|
+ that.options = res1.data;
|
|
|
+ that.videoItem = that.options[0].cameraList;
|
|
|
+ }
|
|
|
+
|
|
|
+ let res2 = await lastVideo({});
|
|
|
+ if(res2.code === 10000) {
|
|
|
+ that.selectList = [res2.data]
|
|
|
+ that.isVideo = true;
|
|
|
+ this.options.forEach(items => {
|
|
|
+ items.cameraList.forEach(item => {
|
|
|
+ if(item.id == this.selectList[0].id) {
|
|
|
+ item.isShow = true;
|
|
|
+ } else {
|
|
|
+ item.isShow = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ let res3 = await getVideoLsitAndCamera({});
|
|
|
+ if(res3.code === 10000) {
|
|
|
+ this.bigMonitList = res3.data;
|
|
|
+ }
|
|
|
},
|
|
|
handleChange(value) {
|
|
|
let val = value[value.length - 1];
|
|
@@ -192,19 +290,14 @@ export default {
|
|
|
setVideo(item, i) {
|
|
|
this.videoItem = item.cameraList;
|
|
|
this.videoActive = i;
|
|
|
+ this.active = '';
|
|
|
},
|
|
|
- getVideoItems(item, i) {
|
|
|
- this.active = i;
|
|
|
+ getVideoItems(item) {
|
|
|
let params= {
|
|
|
- cameraIds: [item.id],
|
|
|
+ cameraIds: item,
|
|
|
}
|
|
|
getVideo(params).then(res =>{
|
|
|
- this.isVideo = true;
|
|
|
- this.cameraOne = res.data[0].wsUrl;
|
|
|
- this.cameraTwo = res.data[0].rtspUrl;
|
|
|
- saveVideo({cameraId: item.id}).then(res => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
+ this.selectList = res.data;
|
|
|
})
|
|
|
},
|
|
|
initConfig() {
|
|
@@ -227,22 +320,175 @@ export default {
|
|
|
console.log(res)
|
|
|
})
|
|
|
this.setScreenVideoAsync(val)
|
|
|
+ },
|
|
|
+ cutMonit(num) {
|
|
|
+ if(this.dis !== num) {
|
|
|
+ this.selectIds = [];
|
|
|
+ this.dis = num;
|
|
|
+ this.route_index = '';
|
|
|
+ }
|
|
|
+ this.options.forEach(items => {
|
|
|
+ items.isShow = false;
|
|
|
+ items.cameraList.forEach(item => {
|
|
|
+ item.isShow = false;
|
|
|
+ })
|
|
|
+ })
|
|
|
+ if(num === 2) {
|
|
|
+ if(this.bigMonitList.length > 0) {
|
|
|
+ this.monitList = this.bigMonitList[0].functionList;
|
|
|
+ this.route_index = 0;
|
|
|
+ }
|
|
|
+ this.monitList.forEach(items => {
|
|
|
+ items.isShow = false;
|
|
|
+ items.cameraList.forEach(item => {
|
|
|
+ item.isShow = false;
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 新加
|
|
|
+ clickParent(i) {
|
|
|
+ if(this.dis === 1) {
|
|
|
+ this.options.forEach((item, index) => {
|
|
|
+ if(i == index) {
|
|
|
+ item.isShow = !item.isShow
|
|
|
+ } else {
|
|
|
+ item.isShow = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if(this.dis === 2) {
|
|
|
+ this.monitList.forEach((item, index) => {
|
|
|
+ if(i == index) {
|
|
|
+ item.isShow = !item.isShow;
|
|
|
+ } else {
|
|
|
+ item.isShow = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+ // this.options[i].isShow = !this.options[i].isShow;
|
|
|
+ },
|
|
|
+ clickChild(id){
|
|
|
+ // 单向
|
|
|
+ if(this.num === 1) {
|
|
|
+ this.getVideoItems([id]);
|
|
|
+ if(this.dis === 1) {
|
|
|
+ this.options.forEach(items => {
|
|
|
+ items.cameraList.forEach(item => {
|
|
|
+ if(item.id == id) {
|
|
|
+ item.isShow = true;
|
|
|
+ } else {
|
|
|
+ item.isShow = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.monitList.forEach(items => {
|
|
|
+ items.cameraList.forEach(item => {
|
|
|
+ if(item.id == id) {
|
|
|
+ item.isShow = true;
|
|
|
+ } else {
|
|
|
+ item.isShow = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 4路
|
|
|
+ let delId = '';
|
|
|
+ if(this.selectIds.indexOf(id) > -1) {
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ if(this.selectIds.length > 3) {
|
|
|
+ delId = this.selectIds[0];
|
|
|
+ this.selectIds.shift();
|
|
|
+ this.selectIds.push(id);
|
|
|
+ } else {
|
|
|
+ this.selectIds.push(id);
|
|
|
+ }
|
|
|
+ this.getVideoItems(this.selectIds);
|
|
|
+ if(this.dis === 1) {
|
|
|
+ this.options.forEach(items => {
|
|
|
+ items.cameraList.forEach(item => {
|
|
|
+ if(item.id == delId) {
|
|
|
+ item.isShow = false;
|
|
|
+ }
|
|
|
+ if(item.id == id) {
|
|
|
+ item.isShow = true;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.monitList.forEach(items => {
|
|
|
+ items.cameraList.forEach(item => {
|
|
|
+ if(item.id == delId) {
|
|
|
+ item.isShow = false;
|
|
|
+ }
|
|
|
+ if(item.id == id) {
|
|
|
+ item.isShow = true;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.monitId = id;
|
|
|
+ // this.options[i].cameraList[k].isShow = !this.options[i].cameraList[k].isShow;
|
|
|
+ },
|
|
|
+ // 点击视图
|
|
|
+ setView() {
|
|
|
+ this.show = !this.show;
|
|
|
+ },
|
|
|
+ // 全屏
|
|
|
+ onFull() {
|
|
|
+ let video = window.frames['myIframe'].document.getElementById('video');
|
|
|
+ if (video.requestFullscreen) { //w3c
|
|
|
+ video.requestFullscreen();
|
|
|
+ } else if (video.mozRequestFullScreen) { //moz Firefox
|
|
|
+ video.mozRequestFullScreen();
|
|
|
+ } else if (video.msRequestFullscreen) { //IE
|
|
|
+ video.msRequestFullscreen();
|
|
|
+ } else if (video.oRequestFullscreen) { //Opera
|
|
|
+ video.oRequestFullscreen();
|
|
|
+ } else if (video.webkitRequestFullscreen) { //webkit内核 Chrome Safari
|
|
|
+ video.webkitRequestFullScreen();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ cut() {
|
|
|
+ if(this.num === 1) {
|
|
|
+ this.num = 4;
|
|
|
+ this.selectIds = [];
|
|
|
+ this.selectIds.push(this.selectList[0].id);
|
|
|
+ } else {
|
|
|
+ this.num = 1;
|
|
|
+ }
|
|
|
+ this.show = false;
|
|
|
+ },
|
|
|
+ updateRoute(i, item) {
|
|
|
+ this.route_index = i;
|
|
|
+ this.dis = 2;
|
|
|
+ let arr = [];
|
|
|
+ item.functionList.forEach(items => {
|
|
|
+ items.isShow = false;
|
|
|
+ items.cameraList.forEach(items => {
|
|
|
+ items.runStatus = !items.runStatus;
|
|
|
+ items.isShow = false;
|
|
|
+ })
|
|
|
+ })
|
|
|
+ arr = item.functionList;
|
|
|
+ this.monitList = arr;
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.init()
|
|
|
this.initCrmea();
|
|
|
this.initConfig();
|
|
|
- var that = this;
|
|
|
- if(this.$store.state.screenVideo) {
|
|
|
- this.timer = setInterval(() => {
|
|
|
- that.initCrmea();
|
|
|
- }, 60000)
|
|
|
- }
|
|
|
+
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
- clearInterval(this.timer);
|
|
|
- this.timer = null;
|
|
|
+ saveVideo({cameraId: this.monitId}).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -252,179 +498,148 @@ export default {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
box-sizing: border-box;
|
|
|
- padding: 20px 0 0 0;
|
|
|
+ padding: 10px 0 0 0;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
position: relative;
|
|
|
}
|
|
|
- .monit-left {
|
|
|
- flex: 1;
|
|
|
+ .monit_left {
|
|
|
+ width: 1450px;
|
|
|
height: 100%;
|
|
|
- background: url("../../assets/BioSafety/kuang.png") no-repeat;
|
|
|
- background-size: 100% 100%;
|
|
|
- position: relative;
|
|
|
- box-sizing: border-box;
|
|
|
- padding: 40px 30px 30px 30px;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- }
|
|
|
- .monit-right {
|
|
|
- width: 450px;
|
|
|
- margin-left: 20px;
|
|
|
}
|
|
|
- .case {
|
|
|
+ .video_back {
|
|
|
width: 100%;
|
|
|
- height: 100%;
|
|
|
- background: url("../../assets/BioSafety/kuang.png") no-repeat;
|
|
|
+ height: calc(100% - 70px);
|
|
|
+ background: url("../../assets/video.png") no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
- box-sizing: border-box;
|
|
|
- padding: 20px;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
- .monit-title {
|
|
|
- width: 300px;
|
|
|
- height: 40px;
|
|
|
+ .video_shi {
|
|
|
+ width: 35px;
|
|
|
+ height: 60px;
|
|
|
position: absolute;
|
|
|
- top: 0;
|
|
|
- left: 50%;
|
|
|
- line-height: 40px;
|
|
|
- transform: translate(-50% , 0);
|
|
|
- background-color: #031032;
|
|
|
- text-align: center;
|
|
|
- color: white;
|
|
|
- font-size: 18px;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
+ top: 20px;
|
|
|
+ left: 30px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .video_full {
|
|
|
+ width: 35px;
|
|
|
+ height: 60px;
|
|
|
+ position: absolute;
|
|
|
+ top: 25px;
|
|
|
+ right: 25px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
- .icon {
|
|
|
- width: 18px;
|
|
|
- height: 18px;
|
|
|
- display: inline-block;
|
|
|
- background: url("../../assets/Zoology/u5069.svg") no-repeat;
|
|
|
+ .video_icon {
|
|
|
+ width: 35px;
|
|
|
+ height: 35px;
|
|
|
+ background: url("../../assets/shitu.png") no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
- margin-top: 10px;
|
|
|
}
|
|
|
- .monit-content {
|
|
|
- /*width: 1180px;*/
|
|
|
- /*height: 300px;*/
|
|
|
- position: absolute;
|
|
|
- top: 45px;
|
|
|
- left: 50%;
|
|
|
- transform: translate(-50% , 0);
|
|
|
- border: 5px solid #00FFFF;
|
|
|
- border-radius: 10px;
|
|
|
- background-color: #323232;
|
|
|
- display: flex;
|
|
|
- box-sizing: border-box;
|
|
|
- padding: 60px 20px;
|
|
|
+ .video_full_icon {
|
|
|
+ width: 35px;
|
|
|
+ height: 35px;
|
|
|
+ background: url("../../assets/full.png") no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
}
|
|
|
- .content-flex {
|
|
|
- flex: 1;
|
|
|
+ .monit_right {
|
|
|
+ width: 340px;
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ background: rgba(42,130,228,0.1200);
|
|
|
+ box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.5000);
|
|
|
+ border: 1px solid #19ADBA;
|
|
|
+ padding: 10px 10px;
|
|
|
}
|
|
|
- .monit_left {
|
|
|
- width: 400px;
|
|
|
- height: 640px;
|
|
|
- position: fixed;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- background-color: rgba(0,0,0, .5);
|
|
|
+ .monit_dis {
|
|
|
+ width: 100%;
|
|
|
+ height: 40px;
|
|
|
box-sizing: border-box;
|
|
|
- padding: 20px;
|
|
|
+ border: 1px solid #ddd;
|
|
|
display: flex;
|
|
|
}
|
|
|
- .boxTile {
|
|
|
- width: 120px;
|
|
|
- height: 30px;
|
|
|
- line-height: 30px;
|
|
|
- border: 1px solid #ddd;
|
|
|
- text-align: center;
|
|
|
- margin: 10px auto;
|
|
|
+ .dis_content {
|
|
|
+ width: 50%;
|
|
|
+ height: 38px;
|
|
|
+ line-height: 38px;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #fff;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
- .active {
|
|
|
- background-color: #009cff;
|
|
|
+ .dis_active {
|
|
|
+ background: #19ADBA;
|
|
|
}
|
|
|
- .btn {
|
|
|
- width: 60px;
|
|
|
- height: 30px;
|
|
|
- line-height: 30px;
|
|
|
- background-color: #009cff;
|
|
|
- text-align: center;
|
|
|
- color: white;
|
|
|
- position: absolute;
|
|
|
- top: -15px;
|
|
|
- cursor: pointer;
|
|
|
+ .monit_scroll {
|
|
|
+ width: 100%;
|
|
|
+ height: calc(100% - 50px);
|
|
|
+ overflow: auto;
|
|
|
+ /*display: flex;*/
|
|
|
}
|
|
|
- .btn-fixed {
|
|
|
- top: -15px;
|
|
|
- right: 25px;
|
|
|
+ .monit_scroll::-webkit-scrollbar {
|
|
|
+ display: none;
|
|
|
}
|
|
|
- .cancel {
|
|
|
- width: 80px;
|
|
|
- height: 30px;
|
|
|
- line-height: 30px;
|
|
|
- background-color: #009cff;
|
|
|
- text-align: center;
|
|
|
- color: white;
|
|
|
- position: absolute;
|
|
|
- right: -100px;
|
|
|
+
|
|
|
+ .monit_index {
|
|
|
+ margin: 10px auto;
|
|
|
+ box-sizing: border-box;
|
|
|
+ width: 334px;
|
|
|
+ height: 40px;
|
|
|
+ background: url("../../assets/on.png") no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ line-height: 40px;
|
|
|
+ text-align: left;
|
|
|
+ cursor: pointer;
|
|
|
+ font-weight: 400;
|
|
|
+ padding-left: 40px;
|
|
|
+ color: #FFFFFF;
|
|
|
+ text-shadow: 0px 2px 4px rgba(0,0,0,0.5000);
|
|
|
+ position: relative;
|
|
|
+ user-select: none;
|
|
|
+ }
|
|
|
+ .monit_item {
|
|
|
+ margin: 10px auto;
|
|
|
+ box-sizing: border-box;
|
|
|
+ width: 334px;
|
|
|
+ height: 40px;
|
|
|
+ background: url("../../assets/on1.png") no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ line-height: 40px;
|
|
|
+ text-align: left;
|
|
|
cursor: pointer;
|
|
|
+ font-weight: 400;
|
|
|
+ padding-left: 60px;
|
|
|
+ color: #FFFFFF;
|
|
|
+ text-shadow: 0px 2px 4px rgba(0,0,0,0.5000);
|
|
|
+ user-select: none;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
- .monit-scroll {
|
|
|
- overflow: auto;
|
|
|
+
|
|
|
+ .monit_item_active {
|
|
|
+ background: url("../../assets/non.png") no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
}
|
|
|
- .monit-scroll::-webkit-scrollbar {
|
|
|
- /*滚动条整体样式*/
|
|
|
- width : 5px; /*高宽分别对应横竖滚动条的尺寸*/
|
|
|
- height: 1px;
|
|
|
- }
|
|
|
- .monit-scroll::-webkit-scrollbar-thumb {
|
|
|
- /*滚动条里面小方块*/
|
|
|
- border-radius : 8px;
|
|
|
- background-color: #535353;
|
|
|
- background-image: -webkit-linear-gradient(
|
|
|
- 45deg,
|
|
|
- rgba(255, 255, 255, 0.2) 25%,
|
|
|
- transparent 25%,
|
|
|
- transparent 50%,
|
|
|
- rgba(255, 255, 255, 0.2) 50%,
|
|
|
- rgba(255, 255, 255, 0.2) 75%,
|
|
|
- transparent 75%,
|
|
|
- transparent
|
|
|
- );
|
|
|
- }
|
|
|
- .monit-scroll::-webkit-scrollbar-track {
|
|
|
- /*滚动条里面轨道*/
|
|
|
- box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2);
|
|
|
- /*background : #ededed;*/
|
|
|
- border-radius: 10px;
|
|
|
- }
|
|
|
- .monit-dialog {
|
|
|
- width: 100vw;
|
|
|
- height: 100vh;
|
|
|
- position: fixed;
|
|
|
+ .padding_left_text {
|
|
|
+ padding-left: 10px;
|
|
|
+ }
|
|
|
+ .position_text {
|
|
|
+ height: 40px;
|
|
|
+ line-height: 40px;
|
|
|
+ position: absolute;
|
|
|
top: 0;
|
|
|
- left: 0;
|
|
|
- background-color: rgba(0,0,0, .9);
|
|
|
- z-index: 999;
|
|
|
+ right: 30px;
|
|
|
+ color: #23FF00;
|
|
|
+
|
|
|
}
|
|
|
- .monit-content1 {
|
|
|
- width: 50%;
|
|
|
+ .position_text:before{
|
|
|
position: absolute;
|
|
|
+ content: '';
|
|
|
+ width: 6px;
|
|
|
+ height: 6px;
|
|
|
top: 50%;
|
|
|
- left: 50%;
|
|
|
- transform: translate(-50%, -50%);
|
|
|
- /*background-color: #fff;*/
|
|
|
- }
|
|
|
- .monit_box {
|
|
|
- height: 400px;
|
|
|
- background-color: #007aff;
|
|
|
- border-radius: 15px;
|
|
|
- text-align: center;
|
|
|
- box-sizing: border-box;
|
|
|
- padding: 20px;
|
|
|
- color: #fff;
|
|
|
+ left: -15px;
|
|
|
+ border-radius: 50%;
|
|
|
+ background-color: #23FF00;
|
|
|
+ transform: translate(0, -50%);
|
|
|
}
|
|
|
.monit_flex {
|
|
|
display: flex;
|
|
@@ -435,4 +650,133 @@ export default {
|
|
|
width: 50%;
|
|
|
height: 50px;
|
|
|
}
|
|
|
+ .video_iframe {
|
|
|
+ width: 90%;
|
|
|
+ height: 90%;
|
|
|
+ position: absolute;
|
|
|
+ top: 70px;
|
|
|
+ left: 75px;
|
|
|
+ display: flex;
|
|
|
+ flex-flow: row wrap;
|
|
|
+ justify-content: center;
|
|
|
+ align-content: flex-start
|
|
|
+ /*z-index: -9;*/
|
|
|
+ }
|
|
|
+ .video_left_bottom {
|
|
|
+ width: 111px;
|
|
|
+ height: 111px;
|
|
|
+ background: url("../../assets/111.png") no-repeat;
|
|
|
+ background-size: cover;
|
|
|
+ position: absolute;
|
|
|
+ left: 22px;
|
|
|
+ bottom: 22px;
|
|
|
+ z-index: 99;
|
|
|
+ }
|
|
|
+ .video_right_bottom {
|
|
|
+ width: 111px;
|
|
|
+ height: 111px;
|
|
|
+ background: url("../../assets/222.png") no-repeat;
|
|
|
+ background-size: cover;
|
|
|
+ position: absolute;
|
|
|
+ right: 15px;
|
|
|
+ bottom: 12px;
|
|
|
+ z-index: 99;
|
|
|
+ }
|
|
|
+ .video_left_top{
|
|
|
+ width: 111px;
|
|
|
+ height: 111px;
|
|
|
+ background: url("../../assets/333.png") no-repeat;
|
|
|
+ background-size: cover;
|
|
|
+ position: absolute;
|
|
|
+ z-index: 99;
|
|
|
+ top: 19px;
|
|
|
+ left: 26px;
|
|
|
+ }
|
|
|
+ .video_right_top {
|
|
|
+ width: 111px;
|
|
|
+ height: 111px;
|
|
|
+ background: url("../../assets/444.png") no-repeat;
|
|
|
+ background-size: cover;
|
|
|
+ position: absolute;
|
|
|
+ z-index: 99;
|
|
|
+ top: 34px;
|
|
|
+ right: 17px;
|
|
|
+ }
|
|
|
+ .view_num {
|
|
|
+ width: 111px;
|
|
|
+ height: 111px;
|
|
|
+ background: url("../../assets/222.png") no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ position: absolute;
|
|
|
+ top: 46px;
|
|
|
+ left: 55px;
|
|
|
+ line-height: 111px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding-left: 20px;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 16px;
|
|
|
+ cursor: pointer;
|
|
|
+ z-index: 99;
|
|
|
+ }
|
|
|
+ .view_box {
|
|
|
+ width: 36px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .box_icon {
|
|
|
+ width: 36px;
|
|
|
+ height: 36px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+ .box_icon_one {
|
|
|
+ background: url("../../assets/oneActive.png") no-repeat;
|
|
|
+ background-size: cover;
|
|
|
+ }
|
|
|
+ .box_icon_one_no {
|
|
|
+ background: url("../../assets/oneActiveNo.png") no-repeat;
|
|
|
+ background-size: cover;
|
|
|
+ }
|
|
|
+ .box_icon_four {
|
|
|
+ background: url("../../assets/fourActive.png") no-repeat;
|
|
|
+ background-size: cover;
|
|
|
+ }
|
|
|
+ .box_icon_four_no {
|
|
|
+ background: url("../../assets/fourActiveNo.png") no-repeat;
|
|
|
+ background-size: cover;
|
|
|
+ }
|
|
|
+ .iframe_list {
|
|
|
+ width: 635px;
|
|
|
+ height: 351px;
|
|
|
+ /*margin: 0 auto;*/
|
|
|
+ border: 1px solid #007aff;
|
|
|
+ }
|
|
|
+ /*.iframe_list:nth-child(n) {*/
|
|
|
+ /* margin-left: 10px;*/
|
|
|
+ /*}*/
|
|
|
+ /*.iframe_list:nth-child(2n) {*/
|
|
|
+ /* margin-right: 8px;*/
|
|
|
+ /*}*/
|
|
|
+ .monit_route {
|
|
|
+ width: 100%;
|
|
|
+ height: 60px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ .route_box {
|
|
|
+ width: 150px;
|
|
|
+ height: 52px;
|
|
|
+ /*border: 1px solid #Ddd;*/
|
|
|
+ border-radius: 5px;
|
|
|
+ line-height: 52px;
|
|
|
+ color: #fff;
|
|
|
+ cursor: pointer;
|
|
|
+ background: url("../../assets/noActive.png") no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ .route_active {
|
|
|
+ background: url("../../assets/xuan.png") no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
</style>
|