achao 2 years ago
parent
commit
cdd3326a83
1 changed files with 15 additions and 1 deletions
  1. 15 1
      src/views/houseSelfCollect/newWeighingManagement.vue

+ 15 - 1
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -24,6 +24,9 @@
 
         <div class="bottom">
           <div class="bg-left titleup"><span class="word_css">实时监控</span></div>
+          <!-- <div>
+            <canvas id="video" class="canvas"></canvas>
+          </div> -->
           <div v-if="!monitorUrl1" class="video1">
             <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
             <div>监控视频未连接</div>
@@ -301,7 +304,6 @@
     getsettleaccout,
     newSubmit
   } from '@/model/houseSelfCollect/index'
-
   import {
     addstorageputList
   } from '@/model/warehouse/index'
@@ -532,6 +534,8 @@
       }
     },
     mounted() {
+      
+      // this.getVideos()
       this.isShowBalance = true
       var _saomaData = JSON.parse(localStorage.getItem('saoma_data')) //判断是否扫码进来的
       // }
@@ -616,6 +620,12 @@
 
     },
     methods: {
+      getVideos(){debugger
+          let canvas = document.getElementById('video')
+          let url = 'ws://127.0.0.1:8082'
+          var player = new JSMpeg.Player(url, {canvas: canvas})
+          console.log(player)
+    },
       refreshClick(type) {
         let that = this
         if (type == 1) {
@@ -2438,4 +2448,8 @@
     border-right: 4px solid #2aff7c;
     // border-bottom: 1px solid #2aff7c ;
   }
+  .canvas{
+    width: 300px;
+    height:300px
+  }
 </style>