Commit 7fd97069 authored by qjeslks's avatar qjeslks
parents d1e5eb30 2e81d878
...@@ -57,30 +57,15 @@ ...@@ -57,30 +57,15 @@
<script setup> <script setup>
// ../OutputFile/VideoWebPlugin.zip // ../OutputFile/VideoWebPlugin.zip
import { ref, reactive, onMounted, onUnmounted, provide, computed, handleError } from 'vue' import { ref ,reactive, onMounted, onUnmounted, provide, computed, handleError } from 'vue'
import DataForm from '../../components/DataForm.vue';
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import http from '../../api/http' import http from '../../api/http'
import store from "../../store/index"; import store from "../../store/index";
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// import '/jquery-1.12.4.min.js'; import { onBeforeRouteLeave, onBeforeRouteUpdate } from 'vue-router'
// import '/jsencrypt.min.js';
// import '/web-control_1.2.5.min.js'
//import {$} from '@/assets/script/video/jquery-1.12.4.min.js'
import $ from 'jquery' import $ from 'jquery'
import { JSEncrypt } from 'jsencrypt' import { JSEncrypt } from 'jsencrypt'
import { WebControl } from '../../assets/script/video/web-control.esm.min.js' import { WebControl } from '../../assets/script/video/web-control.esm.min.js'
// import { WebControl } from 'web-control';
// import {WebControl} from 'web-control';
import {
Search,
ArrowLeft,
ArrowRight,
Warning
} from '@element-plus/icons-vue'
import CfgSupply from '../../components/CfgSupply.vue';
// import { ca } from 'element-plus/es/locale';
import { onActivated, onDeactivated } from 'vue' import { onActivated, onDeactivated } from 'vue'
onActivated(()=>{ onActivated(()=>{
showPlay(); showPlay();
...@@ -90,14 +75,19 @@ onDeactivated(() => { ...@@ -90,14 +75,19 @@ onDeactivated(() => {
}) })
const route = useRoute(); const route = useRoute();
console.log(route.query.id)
onBeforeRouteUpdate((to, from) => {
var r=useRoute();
if(r.query.id){
VideoInfo.value=r.query.id;
getVideoFromVideoList(r.query.id);
}
})
//声明公用变量 //声明公用变量
var initCount = 0; var initCount = 0;
var pubKey = ''; var pubKey = '';
var playWnd_width = window.innerWidth - 200; var playWnd_width = window.innerWidth - 200;
console.log(app)
var playWnd_height = window.innerHeight - 220; var playWnd_height = window.innerHeight - 220;
var oWebControl; var oWebControl;
var videoIp; var videoIp;
...@@ -609,6 +599,15 @@ function playVideotest(cameraIndexCode) { ...@@ -609,6 +599,15 @@ function playVideotest(cameraIndexCode) {
} }
// watch(()=>route.params.id, watchEvent, { immediate: true })
// //监听回调函数
// function watchEvent(id){
// if(!VideoInfo.playVideoList){
// return;
// }
// getVideoFromVideoList(id);
// }
defineExpose({ defineExpose({
hidePlay, hidePlay,
......
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