This commit is contained in:
siyouyou
2024-06-11 10:54:56 +08:00
parent 2a900fd51d
commit 141c6f5728
3 changed files with 24 additions and 6 deletions

View File

@@ -46,6 +46,7 @@
:heigthIsFull="false"
:camera-code="cameraCodeVideo"
:video-url="cameraCodeUrl"
:video-id="this.id"
/>
</el-main>
</el-container>
@@ -77,6 +78,13 @@ export default {
return "";
},
},
id: {
// 摄像机code
type: String,
default() {
return "";
},
},
items: {
type: String,
default() {

View File

@@ -37,6 +37,7 @@
<script>
import flvjs from "flv.js";
import { records, lineDate } from "@/api/video";
import { msgAlarmDetail } from "@/api/alarmList";
// videoPlayer
// 单个视频播放插件
@@ -94,6 +95,13 @@ export default {
type: Boolean,
default: true,
},
videoId: {
// 摄像机code
type: String,
default() {
return "";
},
},
},
data() {
return {
@@ -212,12 +220,14 @@ console.log(123,)
if (this.$route.name === "/alarmDetail") {
var set = setInterval(() => {
if (this.$store.state.lineDateProPost) {
records(
this.$store.state.lineDateProPost.cameraCode,
this.flay
// if (this.$store.state.lineDateProPost) {
if (this.videoId) {
msgAlarmDetail(
// this.$store.state.lineDateProPost.cameraCode,
// this.flay
this.videoId
).then((res) => {
this.videoInit(res.data);
this.videoInit(res.data.alarmUrl);
});
clearInterval(set);
}

View File

@@ -41,7 +41,7 @@
</div>
</div>
<el-main style="padding: 0px; margin-top: 20px">
<palyAndPlayback :items="items" :videoType="videoType" :cameraCode="cameraCode"
<palyAndPlayback :items="items" :videoType="videoType" :cameraCode="cameraCode" :id="this.id"
:alarmTime="cameraInfo.alarmTime" @tabChange="palyAndPlaybackTabChange"></palyAndPlayback>
</el-main>
</el-container>