Jelajahi Sumber

可视化云图首页功能更改

wang_xy 2 tahun lalu
induk
melakukan
5bacb7e3cf
1 mengubah file dengan 65 tambahan dan 64 penghapusan
  1. 65 64
      src/components/TVWall.vue

+ 65 - 64
src/components/TVWall.vue

@@ -2,30 +2,30 @@
   <div>
     <el-dialog title="电视墙" :visible.sync="TVWallVisible" v-if="TVWallVisible" customClass="TVWallCustomWidth"
                @close="cancelEventLocationShow()">
-	  <div class="forthis" style="width: 22%; position: absolute;left: 0;z-index: 9999999999999;">
-	  	<!-- <div class="this-title">
-	  		<span>林场</span>
-	  		<span>45</span>
-	  	</div> -->
-	  	<div class="i-list-con" style="height: 46vh; overflow-y: scroll;">
-	  		<span v-for="(item,index) in cameraList" :key="index">
-	  			<div class="d-l-con" @click="playhk(item.channelCode)">
-	  				<div class="d-l-l-text">
-	  					<i class="i-small"></i>
-	  					<h4>{{ item.cameraName }}</h4>
-	  				</div>
-	  			</div>
-	  		</span>
-	  	</div>
-	  </div>
-      <div style="width:70%;height:400px;position:absolute;">
-        <!--视频窗口展示---大华-->
-        <div id="dom1" class="dom1"></div>
-        <!--视频窗口展示---海康-->
-        <div id="playWnd" class="playWnd" style="left: 0px; top: 0px;"></div>
-      </div>
-
-      <!--<div id="dom1" class="dom1"></div>-->
+	  <!--<div class="forthis" style="width: 22%; position: absolute;left: 0;z-index: 9999999999999;">-->
+	  	<!--&lt;!&ndash; <div class="this-title">-->
+	  		<!--<span>林场</span>-->
+	  		<!--<span>45</span>-->
+	  	<!--</div> &ndash;&gt;-->
+	  	<!--<div class="i-list-con" style="height: 46vh; overflow-y: scroll;">-->
+	  		<!--<span v-for="(item,index) in cameraList" :key="index">-->
+	  			<!--<div class="d-l-con" @click="playhk(item.channelCode)">-->
+	  				<!--<div class="d-l-l-text">-->
+	  					<!--<i class="i-small"></i>-->
+	  					<!--<h4>{{ item.cameraName }}</h4>-->
+	  				<!--</div>-->
+	  			<!--</div>-->
+	  		<!--</span>-->
+	  	<!--</div>-->
+	  <!--</div>-->
+      <!--<div style="width:70%;height:400px;position:absolute;">-->
+        <!--&lt;!&ndash;视频窗口展示-&#45;&#45;大华&ndash;&gt;-->
+        <!--<div id="dom1" class="dom1"></div>-->
+        <!--&lt;!&ndash;视频窗口展示-&#45;&#45;海康&ndash;&gt;-->
+        <!--<div id="playWnd" class="playWnd" style="left: 0px; top: 0px;"></div>-->
+      <!--</div>-->
+
+      <div id="dom1" class="dom1"></div>
     </el-dialog>
   </div>
 
@@ -251,8 +251,8 @@ export default {
         }],
       crtPosX: 0,
       crtPosY: 0,
-      crtWidth: 740,
-      crtHeight: 400,
+      crtWidth: 1150,
+      crtHeight: 700,
       domId: 'dom1',
       mixedVideoDisplayMode: 2,
       isShowTipe: true,
@@ -271,7 +271,7 @@ export default {
     cancelEventLocationShow() {
       // this.activeName = 'tv'
       this.TVWallVisible = false
-      // this.destroy()
+      this.destroy()
 
       if (this.oWebControl != null) {
         this.oWebControl.JS_HideWnd()   // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
@@ -282,37 +282,37 @@ export default {
       }
     },
     showTVWall() {
-      let that=this;
+      // let that=this;
       /** ----------------------------------大华摄像头预览开始------------------------------------- */
-      // this.ws.addEventListener('connectStateChange', data => {
-      //   if (data) {
-      //     console.log('连接成功')
-      //   } else {
-      //     console.log('连接失败,下载客户端')
-      //     this.alertReinstall()
-      //     this.isShowTipe && this.$modal.confirm({
-      //       title: '下载客户端',
-      //       content: '检测到您未安装部分插件,将影响部分功能使用,请下载后使用?',
-      //       onOk: () => {
-      //         //这里写下载方法
-      //         this.isShowTipe = false
-      //       },
-      //       onCancel: () => {
-      //         this.isShowTipe = false
-      //       }
-      //     });
-      //   }
-      // })
-      // this.preview()
+      this.ws.addEventListener('connectStateChange', data => {
+        if (data) {
+          console.log('连接成功')
+        } else {
+          console.log('连接失败,下载客户端')
+          this.alertReinstall()
+          this.isShowTipe && this.$modal.confirm({
+            title: '下载客户端',
+            content: '检测到您未安装部分插件,将影响部分功能使用,请下载后使用?',
+            onOk: () => {
+              //这里写下载方法
+              this.isShowTipe = false
+            },
+            onCancel: () => {
+              this.isShowTipe = false
+            }
+          });
+        }
+      })
+      this.preview()
       /** ----------------------------------大华摄像头预览结束------------------------------------- */
       /** ----------------------------------海康摄像头预览开始------------------------------------- */
-      tvCameraList().then(response => {
-        this.cameraList=response.data
-      })
-      that.initPlugin()
-      setTimeout(function() {
-        that.playhk();
-      }, 5000)
+      // tvCameraList().then(response => {
+      //   this.cameraList=response.data
+      // })
+      // that.initPlugin()
+      // setTimeout(function() {
+      //   that.playhk();
+      // }, 5000)
       // /** ----------------------------------海康摄像头预览结束------------------------------------- */
       this.TVWallVisible = true
     },
@@ -333,18 +333,19 @@ export default {
     preview() {
       getTVWallList().then(newres => {
         getDahuaVideoServer().then(newResponse => {
+          debugger
           this.ws.detectConnectQt().then(res => {
             if (res) { // 连接客户端成功
               this.alertLogin()
               this.ws.login({
-                // loginIp: newResponse.loginIp,
-                // loginPort: newResponse.loginPort,
-                // userName: newResponse.userName,
-                // userPwd: newResponse.userPwd,
-                loginIp: '192.168.100.100',
-                loginPort: 8314,
-                userName: 'system',
-                userPwd: 'Admin@123',
+                loginIp: newResponse.loginIp,
+                loginPort: newResponse.loginPort,
+                userName: newResponse.userName,
+                userPwd: newResponse.userPwd,
+                // loginIp: '192.168.100.100',
+                // loginPort: 8314,
+                // userName: 'system',
+                // userPwd: 'Admin@123',
                 token: '',
                 https: 0
               })
@@ -378,7 +379,7 @@ export default {
             'splitNum': 1,
             'channelList': [
               {
-                'channelId': '1000013$1$0$0'
+                'channelId': ''
               }
             ]
           },