|
|
@@ -1,91 +1,84 @@
|
|
|
<template>
|
|
|
<div class='toolBar'>
|
|
|
<el-row style='display: flex;width: 100%;align-items: center;justify-content: flex-start'>
|
|
|
-<!-- <span style="margin-left: 10px;">分屏:</span>-->
|
|
|
- <el-row v-show="!isPolling" :gutter="10" type="flex" align="middle" >
|
|
|
+ <!-- <span style="margin-left: 10px;">分屏:</span>-->
|
|
|
+ <el-row v-show="!isPolling" :gutter="10" type="flex" align="middle">
|
|
|
<el-col :span="1.5">
|
|
|
- <v-icon name="ri-checkbox-blank-fill" scale="2" :fill="active===1 ? '#3f9dfd' : '#ffffff'" @click.native="one"></v-icon>
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- type="primary"-->
|
|
|
-<!-- plain-->
|
|
|
-<!-- size="mini"-->
|
|
|
-<!-- :disabled="isPolling"-->
|
|
|
-<!-- @click="one"-->
|
|
|
-<!-- >-->
|
|
|
-<!-- </el-button>-->
|
|
|
+ <v-icon name="ri-checkbox-blank-fill" scale="2" :fill="active===1 ? '#3f9dfd' : '#ffffff'"
|
|
|
+ @click.native="one"></v-icon>
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- type="primary"-->
|
|
|
+ <!-- plain-->
|
|
|
+ <!-- size="mini"-->
|
|
|
+ <!-- :disabled="isPolling"-->
|
|
|
+ <!-- @click="one"-->
|
|
|
+ <!-- >-->
|
|
|
+ <!-- </el-button>-->
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <v-icon name="ri-function-fill" scale="2" :fill="active===4 ? '#3f9dfd' : '#ffffff'" @click.native="two"></v-icon>
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- type="primary"-->
|
|
|
-<!-- plain-->
|
|
|
-<!-- size="mini"-->
|
|
|
-<!-- :disabled="isPolling"-->
|
|
|
-<!-- @click="two"-->
|
|
|
-<!-- >四分屏-->
|
|
|
-<!-- </el-button>-->
|
|
|
+ <v-icon name="ri-function-fill" scale="2" :fill="active===4 ? '#3f9dfd' : '#ffffff'"
|
|
|
+ @click.native="two"></v-icon>
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- type="primary"-->
|
|
|
+ <!-- plain-->
|
|
|
+ <!-- size="mini"-->
|
|
|
+ <!-- :disabled="isPolling"-->
|
|
|
+ <!-- @click="two"-->
|
|
|
+ <!-- >四分屏-->
|
|
|
+ <!-- </el-button>-->
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <v-icon name="ri-grid-fill" scale="2" :fill="active===9 ? '#3f9dfd' : '#ffffff'" @click.native="three"></v-icon>
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- type="primary"-->
|
|
|
-<!-- plain-->
|
|
|
-<!-- size="mini"-->
|
|
|
-<!-- :disabled="isPolling"-->
|
|
|
-<!-- @click="three"-->
|
|
|
-<!-- >九分屏-->
|
|
|
-<!-- </el-button>-->
|
|
|
+ <v-icon name="ri-grid-fill" scale="2" :fill="active===9 ? '#3f9dfd' : '#ffffff'"
|
|
|
+ @click.native="three"></v-icon>
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- type="primary"-->
|
|
|
+ <!-- plain-->
|
|
|
+ <!-- size="mini"-->
|
|
|
+ <!-- :disabled="isPolling"-->
|
|
|
+ <!-- @click="three"-->
|
|
|
+ <!-- >九分屏-->
|
|
|
+ <!-- </el-button>-->
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <v-icon name="md-dashboardcustomize" scale="2" :fill="active===16 ? '#3f9dfd' : '#ffffff'" @click.native="four"></v-icon>
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- type="primary"-->
|
|
|
-<!-- plain-->
|
|
|
-<!-- size="mini"-->
|
|
|
-<!-- :disabled="isPolling"-->
|
|
|
-<!-- @click="four"-->
|
|
|
-<!-- >十六分屏-->
|
|
|
-<!-- </el-button>-->
|
|
|
+ <v-icon name="md-dashboardcustomize" scale="2" :fill="active===16 ? '#3f9dfd' : '#ffffff'"
|
|
|
+ @click.native="four"></v-icon>
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- type="primary"-->
|
|
|
+ <!-- plain-->
|
|
|
+ <!-- size="mini"-->
|
|
|
+ <!-- :disabled="isPolling"-->
|
|
|
+ <!-- @click="four"-->
|
|
|
+ <!-- >十六分屏-->
|
|
|
+ <!-- </el-button>-->
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-row>
|
|
|
<el-row style="display: flex;align-items:center; margin-right: 10px">
|
|
|
- <el-col :span="5">
|
|
|
+ <el-col :span="12">
|
|
|
<v-icon
|
|
|
- v-if="!isPolling" title="开始轮询" @click.native="openPolling = true"
|
|
|
- name="bi-bootstrap-reboot" scale="2" fill="#ffffff"
|
|
|
- ></v-icon>
|
|
|
- <v-icon
|
|
|
- v-if="isPolling" title="停止轮询" @click.native="endPolling"
|
|
|
- name="md-cached-outlined" animation="spin" speed="slow" scale="2" fill="#3f9dfd"
|
|
|
- ></v-icon>
|
|
|
- <!-- <el-button
|
|
|
- v-if="!isPolling"
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- size="mini"
|
|
|
- @click="openPolling = true"
|
|
|
- >开始轮询
|
|
|
- </el-button> -->
|
|
|
- <!-- <el-button
|
|
|
- v-if="isPolling"
|
|
|
- type="warning"
|
|
|
- icon="el-icon-loading"
|
|
|
- plain
|
|
|
- size="mini"
|
|
|
- @click="endPolling"
|
|
|
- >停止轮询
|
|
|
- </el-button> -->
|
|
|
+ v-if="!isPolling" title="开始轮询" @click.native="openPolling = true"
|
|
|
+ name="bi-bootstrap-reboot" scale="2" fill="#ffffff"
|
|
|
+ ></v-icon>
|
|
|
+ <v-icon
|
|
|
+ v-if="isPolling" title="停止轮询" @click.native="endPolling"
|
|
|
+ name="md-cached-outlined" animation="spin" speed="slow" scale="2" fill="#3f9dfd"
|
|
|
+ ></v-icon>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" style="margin-left: 20px">
|
|
|
+ <v-icon
|
|
|
+ title="清空预览" @click.native="handleCloseAll"
|
|
|
+ name="md-cleaningservices-outlined" scale="2" fill="#ffffff"
|
|
|
+ ></v-icon>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-dialog title="轮询参数" :visible.sync="openPolling" width="450px" append-to-body class="dialog-class">
|
|
|
<el-row style="display: flex;align-items: center;margin-bottom: 15px">
|
|
|
画面数量:
|
|
|
<el-radio-group v-model="count" style="width: 70%" size="small">
|
|
|
- <el-radio-button label="one" >1</el-radio-button>
|
|
|
- <el-radio-button label="two" >4</el-radio-button>
|
|
|
- <el-radio-button label="three" >9</el-radio-button>
|
|
|
- <el-radio-button label="four" >16</el-radio-button>
|
|
|
+ <el-radio-button label="one">1</el-radio-button>
|
|
|
+ <el-radio-button label="two">4</el-radio-button>
|
|
|
+ <el-radio-button label="three">9</el-radio-button>
|
|
|
+ <el-radio-button label="four">16</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
</el-row>
|
|
|
<el-row style="display: flex;align-items: center;margin-bottom: 15px">
|
|
|
@@ -112,9 +105,19 @@
|
|
|
|
|
|
<script>
|
|
|
import {mapGetters} from 'vuex'
|
|
|
-import { addIcons } from "oh-vue-icons";
|
|
|
-import { RiNumber1,RiCheckboxBlankFill,RiFunctionFill,RiGridFill,MdDashboardcustomize,BiBootstrapReboot,MdCachedOutlined} from "oh-vue-icons/icons";
|
|
|
-addIcons(RiNumber1,RiCheckboxBlankFill,RiFunctionFill,RiGridFill,MdDashboardcustomize,BiBootstrapReboot,MdCachedOutlined);
|
|
|
+import {addIcons} from "oh-vue-icons";
|
|
|
+import {
|
|
|
+ RiNumber1,
|
|
|
+ RiCheckboxBlankFill,
|
|
|
+ RiFunctionFill,
|
|
|
+ RiGridFill,
|
|
|
+ MdDashboardcustomize,
|
|
|
+ BiBootstrapReboot,
|
|
|
+ MdCachedOutlined,
|
|
|
+ MdCleaningservicesOutlined
|
|
|
+} from "oh-vue-icons/icons";
|
|
|
+
|
|
|
+addIcons(RiNumber1, RiCheckboxBlankFill, RiFunctionFill, RiGridFill, MdDashboardcustomize, BiBootstrapReboot, MdCachedOutlined,MdCleaningservicesOutlined);
|
|
|
|
|
|
export default {
|
|
|
name: 'toolBar',
|
|
|
@@ -129,7 +132,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['boxList', 'active','boxListIndex'])
|
|
|
+ ...mapGetters(['boxList', 'active', 'boxListIndex'])
|
|
|
},
|
|
|
watch: {
|
|
|
// count(newData, oldData) {
|
|
|
@@ -167,7 +170,7 @@ export default {
|
|
|
break
|
|
|
}
|
|
|
this.openPolling = false;
|
|
|
- this.count='one'
|
|
|
+ this.count = 'one'
|
|
|
this.$emit('startPolling', this.duration, this.interval)
|
|
|
},
|
|
|
endPolling() {
|
|
|
@@ -177,13 +180,16 @@ export default {
|
|
|
changePollingStatus() {
|
|
|
this.isPolling = false;
|
|
|
},
|
|
|
-
|
|
|
+ // 点击按钮时,通过自定义事件通知父组件
|
|
|
+ handleCloseAll() {
|
|
|
+ this.$emit('closeAllVideos'); // 触发自定义事件
|
|
|
+ },
|
|
|
async one() {
|
|
|
this.$store.commit('updateBoxListIndex', 0)
|
|
|
- if(!this.boxList.some(item=>item.recording===true)){
|
|
|
+ if (!this.boxList.some(item => item.recording === true)) {
|
|
|
this.$store.commit('updateActive', 1)
|
|
|
// this.$store.commit('updateBoxList', this.boxList.filter((item, index) => index < 1))
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.$message.warning('正在录像中,请先结束录像!')
|
|
|
}
|
|
|
|
|
|
@@ -191,31 +197,31 @@ export default {
|
|
|
},
|
|
|
two() {
|
|
|
this.$store.commit('updateBoxListIndex', 0)
|
|
|
- if(!this.boxList.some(item=>item.recording===true)){
|
|
|
- // // 处理右侧视频容器 少则新增,多则筛选
|
|
|
- // let boxList = []
|
|
|
- // switch (this.boxList.length) {
|
|
|
- // case 1:
|
|
|
- // boxList = this.boxList.filter((item, index) => index < 1)
|
|
|
- // boxList.push({boxId: 2}, {boxId: 3}, {boxId: 4})
|
|
|
- // break
|
|
|
- // case 9:
|
|
|
- // boxList = this.boxList.filter((item, index) => index < 4)
|
|
|
- // break
|
|
|
- // case 16:
|
|
|
- // boxList = this.boxList.filter((item, index) => index < 4)
|
|
|
- // break
|
|
|
+ if (!this.boxList.some(item => item.recording === true)) {
|
|
|
+ // // 处理右侧视频容器 少则新增,多则筛选
|
|
|
+ // let boxList = []
|
|
|
+ // switch (this.boxList.length) {
|
|
|
+ // case 1:
|
|
|
+ // boxList = this.boxList.filter((item, index) => index < 1)
|
|
|
+ // boxList.push({boxId: 2}, {boxId: 3}, {boxId: 4})
|
|
|
+ // break
|
|
|
+ // case 9:
|
|
|
+ // boxList = this.boxList.filter((item, index) => index < 4)
|
|
|
+ // break
|
|
|
+ // case 16:
|
|
|
+ // boxList = this.boxList.filter((item, index) => index < 4)
|
|
|
+ // break
|
|
|
// }
|
|
|
this.$store.commit('updateActive', 4)
|
|
|
// this.$store.commit('updateBoxList', boxList)
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.$message.warning('正在录像中,请先结束录像!')
|
|
|
}
|
|
|
|
|
|
},
|
|
|
three() {
|
|
|
this.$store.commit('updateBoxListIndex', 0)
|
|
|
- if(!this.boxList.some(item=>item.recording===true)){
|
|
|
+ if (!this.boxList.some(item => item.recording === true)) {
|
|
|
// 处理右侧视频容器 少则新增,多则筛选
|
|
|
// let boxList = []
|
|
|
// switch (this.boxList.length) {
|
|
|
@@ -233,13 +239,13 @@ export default {
|
|
|
// }
|
|
|
this.$store.commit('updateActive', 9)
|
|
|
// this.$store.commit('updateBoxList', boxList)
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.$message.warning('正在录像中,请先结束录像!')
|
|
|
}
|
|
|
},
|
|
|
four() {
|
|
|
this.$store.commit('updateBoxListIndex', 0)
|
|
|
- if(!this.boxList.some(item=>item.recording===true)){
|
|
|
+ if (!this.boxList.some(item => item.recording === true)) {
|
|
|
// 处理右侧视频容器 少则新增,多则筛选
|
|
|
// let boxList = []
|
|
|
// switch (this.boxList.length) {
|
|
|
@@ -258,7 +264,7 @@ export default {
|
|
|
// }
|
|
|
this.$store.commit('updateActive', 16)
|
|
|
// this.$store.commit('updateBoxList', boxList)
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.$message.warning('正在录像中,请先结束录像!')
|
|
|
}
|
|
|
}
|
|
|
@@ -276,7 +282,7 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-.toolBar{
|
|
|
+.toolBar {
|
|
|
margin: 10px 0 0 5px;
|
|
|
width: 99.6%;
|
|
|
z-index: 1;
|