|
@@ -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);
|
|
|
}
|