Commit 6ba2997c authored by ninglx's avatar ninglx

按需求改动超限 & 处理bug

parent 2dc3308f
This diff is collapsed.
...@@ -61,7 +61,8 @@ export default { ...@@ -61,7 +61,8 @@ export default {
starttime: this.replaceTimeGap(this.timeModel.startTime), starttime: this.replaceTimeGap(this.timeModel.startTime),
endtime: this.replaceTimeGap(this.timeModel.endTime), endtime: this.replaceTimeGap(this.timeModel.endTime),
}); });
console.log("video response", response); console.log("video response 请求完成", response);
this.$emit('loadEnd')
this.videoUrl = response.content; this.videoUrl = response.content;
setTimeout(() => { setTimeout(() => {
this.$refs.loopVideoPlayer.load(); this.$refs.loopVideoPlayer.load();
......
This diff is collapsed.
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<div class="vehicleDetailInner"> <div class="vehicleDetailInner">
<div class="head"> <div class="head">
<span class="titleBefore"></span><span>{{ model.picLicense || "暂无车牌号信息" }}</span> <span class="titleBefore"></span><span>{{ model.picLicense || "暂无车牌号信息" }}</span>
<div @click="emitPopupClose" class="el-icon-close"></div>
</div> </div>
<div class="content"> <div class="content">
<div class="detailItem"> <div class="detailItem">
...@@ -71,6 +72,9 @@ export default { ...@@ -71,6 +72,9 @@ export default {
// console.log("model", this.model); // console.log("model", this.model);
}, },
methods: { methods: {
emitPopupClose(){
this.$EventBus.$emit("emitPopupClose",{id:this.model.id,overRun: !this.notExceed});
},
convertDict(type, value) { convertDict(type, value) {
for (let item of store.state.dicts[type]) { for (let item of store.state.dicts[type]) {
if (item.code == value) { if (item.code == value) {
...@@ -146,6 +150,15 @@ export default { ...@@ -146,6 +150,15 @@ export default {
color: white; color: white;
display: flex; display: flex;
align-items: center; align-items: center;
position: relative;
div{
position: absolute;
cursor: pointer;
right: 3px;
top: 18px;
font-weight: bold;
font-size: 20px;
}
span { span {
display: inline-block; display: inline-block;
......
<template> <template>
<div id="holo_historyCameraContainer" class="eventCameraContainer" v-show="true"> <div id="holo_historyCameraContainer" class="eventCameraContainer" v-show="true">
<div id="historyCameraContainer" class="historyCameraContainer"> <div id="historyCameraContainer" class="historyCameraContainer">
<div class="cameraVideoShow" :key="index" v-for="(item, index) of channels" v-show="true" <div class="cameraVideoShow" :key="index" v-for="(item, index) of urls" v-show="true"
:id="`videoVisibles${item}`"> :id="`videoVisibles${item}`">
<loop-video class="holo_his" ref="hisVideo" :autoplay="true" :timeModel="timeDuration" :channel="item"></loop-video> <!-- <loop-video @loadEnd="loadEnd" class="holo_his" ref="hisVideo" :autoplay="true" :timeModel="timeDuration" :channel="item"></loop-video>-->
</div> <video :src="item" style="object-fit: fill;width: 100%;height: 100%;" @canplay="videoCanPlay" autoplay
</div> muted
loop
class="videoControl" ref="loopVideoPlayer">
<!-- <source :src="item" type="video/mp4" />-->
<!-- 您的浏览器不支持 video 属性。-->
</video>
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
import LoopVideo from "../../../components/Standard/loopVideo.vue"; import LoopVideo from "../../../components/Standard/loopVideo.vue";
export default { export default {
name: "historyVideos", name: "historyVideos",
components: { components: {
LoopVideo, LoopVideo,
}, },
props: { props: {
channels: { // channels: {
type: Array, // type: Array,
default() { // default() {
return ['2', '9'] // return ['2', '9']
} // }
}, // },
timeDuration: { urls: {
type: Object, type: Array,
default() { default() {
return { return []
startTime: '', }
endTime: ''
}
}
},
},
data() {
return {
}
}, },
computed: {}, // timeDuration: {
methods: { // type: Object,
// playHisVideos() { // default() {
// if (this.$refs.hisVideo) { // return {
// for (let container of this.$refs.hisVideo) { // startTime: '',
// container?.startPlay(); // endTime: ''
// } // }
// } // }
// } // },
},
mounted() {
console.log('urls', this.urls)
},
data() {
return {
ready: false
}
},
computed: {},
methods: {
// playHisVideos() {
// if (this.$refs.hisVideo) {
// for (let container of this.$refs.hisVideo) {
// container?.startPlay();
// }
// }
// }
videoCanPlay() {
if (!this.ready) {
this.ready = true
this.$emit('isReady')
}
}, },
},
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.eventCameraContainer { .eventCameraContainer {
position: absolute; position: absolute;
width: 600px; width: 600px;
height: 200px; height: 200px;
max-width: 600px; max-width: 600px;
bottom: 40px; bottom: 40px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
display: flex; display: flex;
margin: 0 auto; margin: 0 auto;
border: 1px solid rgba(83, 146, 189, 1); border: 1px solid rgba(83, 146, 189, 1);
background: rgba(10, 26, 41, 0.9); background: rgba(10, 26, 41, 0.9);
border-radius: 6px; border-radius: 6px;
.holo_his{
border: 1px solid rgba(255,255,255,0.3);
}
.historyCameraContainer { .holo_his {
display: flex; border: 1px solid rgba(255, 255, 255, 0.3);
flex-direction: row;
align-items: center;
width: 100%;
height: 100%;
.cameraVideoShow { }
width: 50%;
height: 100%;
padding: 4px;
}
.lessWidthVideo { .historyCameraContainer {
width: calc(100% - 6px); display: flex;
} flex-direction: row;
align-items: center;
width: 100%;
height: 100%;
.cameraVideoShow {
width: 50%;
height: 100%;
padding: 4px;
}
.normalWidthVideo { .lessWidthVideo {
width: 100%; width: calc(100% - 6px);
}
} }
.noVideo { .normalWidthVideo {
pointer-events: none; width: 100%;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
font-size: 32px;
color: #04396f;
} }
}
.noVideo {
pointer-events: none;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
font-size: 32px;
color: #04396f;
}
} }
</style> </style>
\ No newline at end of file
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