Commit b1394ba5 authored by ninglx's avatar ninglx

剩余场景视频配置读取&npm添加视频相关库

parent fd1c8e96
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
"vue-clipboard2": "^0.3.1", "vue-clipboard2": "^0.3.1",
"vue-router": "^3.4.6", "vue-router": "^3.4.6",
"vue-seamless-scroll": "^1.1.23", "vue-seamless-scroll": "^1.1.23",
"vuex": "^3.5.1" "vuex": "^3.5.1",
"flv.js": "^1.6.2",
"video.js": "^8.6.1"
} }
} }
<template> <template>
<div class="home-left"> <div class="home-left">
<msg-card title="可移动智慧基站"> <msg-card title="可移动智慧基站">
<div style="height: 100%; width: 100%; display: flex;flex-direction: column;"> <div
style="height: 100%; width: 100%; display: flex; flex-direction: column"
<local-camera :border="true" ref="videoItemL" class="videoItem" v-for="(item,key) of [1,2]" :key="key" :video-data="`kydjz_${item}`"/> >
<local-camera
:border="true"
ref="videoItemL"
class="videoItem"
v-for="(item, key) of videos"
:key="key"
:video-data="item"
/>
</div> </div>
</msg-card> </msg-card>
</div> </div>
...@@ -12,40 +20,41 @@ ...@@ -12,40 +20,41 @@
<script> <script>
import CameraVideo from "../../../components/Standard/cameraVideo.vue"; import CameraVideo from "../../../components/Standard/cameraVideo.vue";
import MsgCard from "../../../components/Standard/msg-card.vue"; import MsgCard from "../../../components/Standard/msg-card.vue";
import {getCameraListByType} from "../../../dao/api"; import { getCameraListByType } from "../../../dao/api";
import WMap from "../../../components/Standard/mapboxMap.vue"; import WMap from "../../../components/Standard/mapboxMap.vue";
import dict from "../../../config/holo/dictionary"; import dict from "../../../config/holo/dictionary";
import LocalCamera from "../../../components/Standard/localCamera.vue"; import LocalCamera from "../../../components/Standard/localCamera.vue";
let map let map;
export default { export default {
name: "homeLeft", name: "homeLeft",
components: {LocalCamera, WMap, MsgCard, CameraVideo}, components: { LocalCamera, WMap, MsgCard, CameraVideo },
computed: {}, computed: {
videos() {
return situation_mobileBaseStation.videos.slice(0, 2);
},
},
data() { data() {
return { return {
timer: null, timer: null,
angle: 0, angle: 0,
}; };
}, },
mounted() { mounted() {},
// this.init()
},
methods: { methods: {
startVideo(time) { startVideo(time) {
console.log(this.$refs.videoItemL) console.log(this.$refs.videoItemL);
for (let item of this.$refs.videoItemL) { for (let item of this.$refs.videoItemL) {
item.setTime(time) item.setTime(time);
} }
} },
}, },
beforeDestroy() { beforeDestroy() {},
},
}; };
</script> </script>
<style lang='less' scoped> <style lang="less" scoped>
.video-mobile { .video-mobile {
aspect-ratio: 4/3; aspect-ratio: 4/3;
} }
...@@ -194,7 +203,11 @@ export default { ...@@ -194,7 +203,11 @@ export default {
height: 50%; height: 50%;
width: 668px; width: 668px;
background-color: rgba(3, 11, 25, 0.45); background-color: rgba(3, 11, 25, 0.45);
background-image: linear-gradient(90deg, rgba(8, 20, 31, 0) 0%, rgba(6, 16, 26, 1) 100%); background-image: linear-gradient(
90deg,
rgba(8, 20, 31, 0) 0%,
rgba(6, 16, 26, 1) 100%
);
padding: 15px 25px; padding: 15px 25px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -218,8 +231,6 @@ export default { ...@@ -218,8 +231,6 @@ export default {
position: relative; position: relative;
flex-flow: row wrap; flex-flow: row wrap;
height: 100%; height: 100%;
} }
} }
...@@ -239,7 +250,7 @@ export default { ...@@ -239,7 +250,7 @@ export default {
justify-content: space-between; justify-content: space-between;
span { span {
width: 40% width: 40%;
} }
span:first-child { span:first-child {
...@@ -271,4 +282,4 @@ export default { ...@@ -271,4 +282,4 @@ export default {
.m-b-10 { .m-b-10 {
margin-bottom: 10px; margin-bottom: 10px;
} }
</style> </style>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="home-right"> <div class="home-right">
<msg-card title="可移动基站"> <msg-card title="可移动基站">
<div style="height: 100%; width: 100%; display: flex;flex-direction: column;"> <div style="height: 100%; width: 100%; display: flex;flex-direction: column;">
<local-camera ref="videoItemR" :border="true" class="videoItem" v-for="(item,index) of [3,4]" :key="index" :video-data="`kydjz_${item}`"/> <local-camera ref="videoItemR" :border="true" class="videoItem" v-for="(item,index) of videos" :key="index" :video-data="item"/>
</div> </div>
</msg-card> </msg-card>
</div> </div>
...@@ -20,7 +20,11 @@ let topViewer, bottomViewer; ...@@ -20,7 +20,11 @@ let topViewer, bottomViewer;
export default { export default {
name: "homeRight", name: "homeRight",
components: {LocalCamera, CrossControl, CameraVideo, MsgCard, CesiumMap}, components: {LocalCamera, CrossControl, CameraVideo, MsgCard, CesiumMap},
computed: {}, computed: {
videos() {
return situation_mobileBaseStation.videos.slice(2, 4);
},
},
data() { data() {
return {}; return {};
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="topI"> <div class="topI">
<msg-card title="路口现场监控"> <msg-card title="路口现场监控">
<div class="videos"> <div class="videos">
<local-camera ref="videoItem" class="videoItem" v-for="(item,index) of [3]" :key="index" :video-data="`xwkf_${item}`"/> <local-camera ref="videoItem" class="videoItem" v-for="(item,index) of videos" :key="index" :video-data="item"/>
<span class="top-left"></span> <span class="top-left"></span>
<span class="top-right"></span> <span class="top-right"></span>
<span class="bottom-left"></span> <span class="bottom-left"></span>
...@@ -39,7 +39,11 @@ import LocalCamera from "../../../components/Standard/localCamera.vue"; ...@@ -39,7 +39,11 @@ import LocalCamera from "../../../components/Standard/localCamera.vue";
export default { export default {
name: "homeLeft", name: "homeLeft",
components: {LocalCamera, MsgCard, CameraVideo}, components: {LocalCamera, MsgCard, CameraVideo},
computed: {}, computed: {
videos(){
return situation_phaseAirPlay.videos.slice(0, 1);
}
},
data() { data() {
return { return {
time: '09:10:00 - 09:12:30', time: '09:10:00 - 09:12:30',
...@@ -60,7 +64,6 @@ export default { ...@@ -60,7 +64,6 @@ export default {
for (let item of this.$refs.videoItem) { for (let item of this.$refs.videoItem) {
item.setTime(time) item.setTime(time)
} }
// this.$refs.videoItem.setTime(time)
}, },
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="topI"> <div class="topI">
<msg-card title="慢行交通现场监控"> <msg-card title="慢行交通现场监控">
<div class="videos"> <div class="videos">
<local-camera ref="videoItem" class="videoItem" v-for="(item,index) of [1]" :key="index" :video-data="`mxjt_${item}`"/> <local-camera ref="videoItem" class="videoItem" v-for="(item,index) of videos" :key="index" :video-data="item"/>
<span class="top-left"></span> <span class="top-left"></span>
<span class="top-right"></span> <span class="top-right"></span>
<span class="bottom-left"></span> <span class="bottom-left"></span>
...@@ -47,7 +47,11 @@ import LocalCamera from "../../../components/Standard/localCamera.vue"; ...@@ -47,7 +47,11 @@ import LocalCamera from "../../../components/Standard/localCamera.vue";
export default { export default {
name: "homeLeft", name: "homeLeft",
components: {LocalCamera, MsgCard, CameraVideo}, components: {LocalCamera, MsgCard, CameraVideo},
computed: {}, computed: {
videos(){
return situation_slowTraffic.videos.slice(0, 1);
}
},
data() { data() {
return { return {
cameras: [], cameras: [],
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
<local-camera <local-camera
ref="videoItem" ref="videoItem"
class="videoItem" class="videoItem"
v-for="(item, index) of [2]" v-for="(item, index) of videos"
:key="index" :key="index"
:video-data="`zzct_${item}`" :video-data="item"
/> />
<span class="top-left"></span> <span class="top-left"></span>
<span class="top-right"></span> <span class="top-right"></span>
...@@ -51,15 +51,18 @@ ...@@ -51,15 +51,18 @@
</template> </template>
<script> <script>
import CameraVideo from "../../../components/Standard/cameraVideo.vue";
import MsgCard from "../../../components/Standard/msg-card.vue"; import MsgCard from "../../../components/Standard/msg-card.vue";
import { getCameraListByType } from "../../../dao/api"; import { getCameraListByType } from "../../../dao/api";
import LocalCamera from "../../../components/Standard/localCamera.vue"; import LocalCamera from "../../../components/Standard/localCamera.vue";
export default { export default {
name: "homeLeft", name: "homeLeft",
components: { LocalCamera, MsgCard, CameraVideo }, components: { LocalCamera, MsgCard },
computed: {}, computed: {
videos(){
return situation_straightLeftConflict.videos.slice(0, 1);
}
},
data() { data() {
return { return {
cameras: [], cameras: [],
...@@ -68,7 +71,6 @@ export default { ...@@ -68,7 +71,6 @@ export default {
ifConflict: '', ifConflict: '',
duration: '', duration: '',
reason: "", reason: "",
direction: "",
}, },
}; };
}, },
...@@ -77,8 +79,6 @@ export default { ...@@ -77,8 +79,6 @@ export default {
this.content.ifConflict = situation_straightLeftConflict.ifConflict this.content.ifConflict = situation_straightLeftConflict.ifConflict
this.content.duration = situation_straightLeftConflict.duration this.content.duration = situation_straightLeftConflict.duration
this.content.reason = situation_straightLeftConflict.reason this.content.reason = situation_straightLeftConflict.reason
this.content.direction = situation_straightLeftConflict.direction
}, },
methods: { methods: {
startVideo(time) { startVideo(time) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment