浏览代码

[SCREEN] video

sgw 1 年之前
父节点
当前提交
c4ea1bc85d
共有 3 个文件被更改,包括 143 次插入11 次删除
  1. 124 0
      src/components/HkPlugin/videoPlugin.vue
  2. 8 0
      src/router/index.js
  3. 11 11
      src/views/taskScreen.vue

+ 124 - 0
src/components/HkPlugin/videoPlugin.vue

@@ -0,0 +1,124 @@
+<!--<template>-->
+<!--&lt;!&ndash;  <div class="fatherDiv">&ndash;&gt;-->
+<!--&lt;!&ndash;    <div ref="videoBox" id="divPlugin" class="plugin">nihao</div>&ndash;&gt;-->
+<!--&lt;!&ndash;&lt;!&ndash;    <el-button @click="remove">清除</el-button>&ndash;&gt;&ndash;&gt;-->
+<!--&lt;!&ndash;    <button @click="togglePlugin">显示/隐藏插件</button>&ndash;&gt;-->
+<!--&lt;!&ndash;  </div>&ndash;&gt;-->
+<!--  <div>-->
+<!--    <div  class="plugin"  id="divPlugin"></div>-->
+<!--    <div class="test">-->
+<!--      <div  class="plugin1"  id="divPlugin1"></div>-->
+<!--    </div>-->
+<!--  </div>-->
+
+<!--</template>-->
+
+<!--<script>-->
+<!--import $ from 'jquery'-->
+<!--export default {-->
+<!--  name: "videoPlugin",-->
+<!--  data() {-->
+<!--    return {-->
+<!--      top: null,-->
+<!--      left: null,-->
+<!--    };-->
+<!--  },-->
+<!--  methods: {-->
+<!--    initPlugin() {-->
+<!--      // 初始化插件参数及插入插件-->
+<!--      WebVideoCtrl.I_InitPlugin({-->
+<!--        bWndFull: true,     //是否支持单窗口双击全屏,默认支持 true:支持 false:不支持-->
+<!--        iWndowType: 2,-->
+<!--        cbInitPluginComplete: function () {-->
+<!--          WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin").then(() => {-->
+<!--            // 检查插件是否最新-->
+<!--            WebVideoCtrl.I_CheckPluginVersion().then((bFlag) => {-->
+<!--              if (bFlag) {-->
+<!--                alert("检测到新的插件版本,双击开发包目录里的HCWebSDKPlugin.exe升级!");-->
+<!--              }-->
+<!--            });-->
+
+<!--            // 初始化插件参数及插入插件-->
+<!--            WebVideoCtrl.I_InitPlugin({-->
+<!--              bWndFull: true,     //是否支持单窗口双击全屏,默认支持 true:支持 false:不支持-->
+<!--              iWndowType: 7,-->
+<!--              cbInitPluginComplete: function () {-->
+<!--                WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin1").then(() => {-->
+<!--                  // 检查插件是否最新-->
+<!--                  WebVideoCtrl.I_CheckPluginVersion().then((bFlag) => {-->
+<!--                    if (bFlag) {-->
+<!--                      alert("检测到新的插件版本,双击开发包目录里的HCWebSDKPlugin.exe升级!");-->
+<!--                    }-->
+<!--                  });-->
+<!--                }, () => {-->
+<!--                  alert("插件初始化失败,请确认是否已安装插件;如果未安装,请双击开发包目录里的HCWebSDKPlugin.exe安装!");-->
+<!--                });-->
+<!--              }-->
+<!--            });-->
+<!--          }, () => {-->
+<!--            alert("插件初始化失败,请确认是否已安装插件;如果未安装,请双击开发包目录里的HCWebSDKPlugin.exe安装!");-->
+<!--          });-->
+<!--        }-->
+<!--      });-->
+
+
+<!--    },-->
+
+<!--    updateWindowWidth() {-->
+<!--      console.log("🚀 ~ file:videoPlugin method:updateWindowWidth line:60 -&#45;&#45;&#45;&#45;", "resize");-->
+<!--      setTimeout(() => {-->
+<!--        this.$router.go(0);-->
+<!--      }, 2000);-->
+<!--    }-->
+<!--  },-->
+<!--  mounted() {-->
+<!--    this.initPlugin()-->
+<!--    // window.addEventListener('resize', this.updateWindowWidth);-->
+<!--  },-->
+<!--  beforeDestroy() {-->
+<!--    this.$router.go(0);-->
+<!--  }-->
+<!--};-->
+<!--</script>-->
+
+<!--<style scoped>-->
+<!--/*.fatherDiv {*/-->
+<!--/*  width:300px;*/-->
+<!--/*  height:200px;*/-->
+<!--/*  !*margin-left: 10%;*!*/-->
+<!--/*}*/-->
+<!--/*插件*/-->
+<!--.plugin-->
+<!--{-->
+<!--  /*width:100%;*/-->
+<!--  /*height:100%;*/-->
+<!--  /*display: none;*/-->
+<!--  width:500px;-->
+<!--  height:300px;-->
+<!--  /*position: fixed;*/-->
+<!--  /*top: 100px; !* 距离页面顶部的距离 *!*/-->
+<!--  /*right: 20px; !* 距离页面右侧的距离 *!*/-->
+<!--  margin-left: 500px;-->
+
+<!--}-->
+<!--.test {-->
+<!--  width: 200px;-->
+<!--  height: 100px;-->
+<!--  overflow: hidden;-->
+<!--  /*position: fixed;*/-->
+<!--}-->
+<!--.plugin1 {-->
+<!--  /*width:100%;*/-->
+<!--  /*height:100%;*/-->
+<!--  /*display: none;*/-->
+<!--  width:500px;-->
+<!--  height:300px;-->
+<!--  /*position: fixed;*/-->
+<!--  /*top: 100px; !* 距离页面顶部的距离 *!*/-->
+<!--  /*right: 20px; !* 距离页面右侧的距离 *!*/-->
+<!--  /*margin-left: 500px;*/-->
+<!--  right: 0;-->
+<!--  bottom: 0;-->
+<!--  position: absolute;-->
+<!--}-->
+<!--</style>-->

+ 8 - 0
src/router/index.js

@@ -40,6 +40,14 @@ const routes = [
 		},
 		component: () => import("../views/monitorScreen.vue")
 	},
+	// {
+	// 	path: "/hk",
+	// 	name: "videoPlugin",
+	// 	meta: {
+	// 		title: '海康'
+	// 	},
+	// 	component: () => import("../components/HkPlugin/videoPlugin.vue")
+	// },
 	{
 		path: '/:pathMatch(.*)',
 		meta: {

+ 11 - 11
src/views/taskScreen.vue

@@ -1,5 +1,5 @@
 <template>
-  <v-scale-screen width="2200" height="1080" ref="screen" style="position = relative">
+  <v-scale-screen width="2200" height="1080">
     <div  class="task_screen_cotainer">
       <div class="task_header">「{{ currentTaskName }}」当前态势</div>
       <div class="tag" @click="jumpToHistory">
@@ -204,8 +204,8 @@
                   <hkv1  v-if="HK1show" :companyVideoData="VideoData" />
                 <!-- <div class="video_body1"><HKVideo :companyVideoData="mainVideoData" :videoType="1"></HKVideo></div> -->
                 <!-- <video  id="videoPlayerTask" class="video-js" muted></video> -->
-          
-          
+
+
             <!-- <hkv1 ref="hk1" v-if="HKshow"  style="position = absolute;"/> -->
                 <!-- <div><HKVideo :companyVideoData="mainVideoData"></HKVideo></div> -->
 
@@ -259,7 +259,7 @@
                       <div class="video_title">{{ videoPlayerName[4] }}</div>
                       <video id="videoPlayer_fourth" class="video-js" muted></video>
                     </div>
-                  </div> -->      
+                  </div> -->
                     <hkv v-if="HKshow" :companyVideoData="VideoData" ref="hkv" @init="HK1Init"/>
                   <div class="center_no_data" v-if="false">
                     <el-image
@@ -405,7 +405,7 @@ export default {
       //     this.HKshow = false;
 
       this.$router.push("/situationScreen")
-      
+
 
     },
     // 表格样式修改
@@ -499,7 +499,7 @@ export default {
       } else {
         this.$message.error(errorMessage);
       }
-    
+
     },
     // 切换任务
     async changeTask() {
@@ -828,7 +828,7 @@ export default {
         this.videoPlayerName[index++] = res.data.data[item].name;
       }
               setTimeout(() => {
-     
+
     for(let index = 0; index < this.dataSrc.length;index++)
     {
       this.VideoData.push(this.resolveUrl(this.dataSrc[index]))
@@ -837,7 +837,7 @@ export default {
 
      setTimeout(() => {
       this.HKshow = true;
-      
+
     }, 800);
     },
     resolveUrl(url){
@@ -870,7 +870,7 @@ export default {
   mounted() {
 
 
-     
+
     // 获取全部单位
     this.getAllUnits();
     // 获取全部系统
@@ -881,7 +881,7 @@ export default {
     // this.initUrl('步坦协同课目');
     //   }, 1000);
     //   setTimeout(() => {
-     
+
     //  console.log('this.dataSrc :>> ', this.dataSrc);
     // for(let index = 0; index < this.dataSrc.length;index++)
     // {
@@ -893,7 +893,7 @@ export default {
     // }, 1000);
 
     //  setTimeout(() => {
-     
+
     //   this.HKshow = true;
 
     // }, 800);