浏览代码

电视墙

王通 2 年之前
父节点
当前提交
cc8a2179b4
共有 4 个文件被更改,包括 238 次插入149 次删除
  1. 63 63
      src/components/TVWall.vue
  2. 86 41
      src/views/eventdetailsdialog.vue
  3. 87 43
      src/views/firespread.vue
  4. 2 2
      vue.config.js

+ 63 - 63
src/components/TVWall.vue

@@ -2,27 +2,27 @@
   <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;">-->
-	  	<!--&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 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>-->
+      <!--&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>
@@ -47,54 +47,54 @@ export default {
     return {
       tvListJson: [
         {
-        'switchTab': '1',
-        'treeLabels': [
-          {
-            'labelCode': '123456',
-            'labelName': '视频场景',
-            'parentLabelCode': null
-          },
-          {
-            'labelCode': '5a81d1bd499b4940a21fc63ca51f4dfa',
-            'labelName': '标签2',
-            'parentLabelCode': 123456
-          },
-          {
-            'labelCode': 'd941adbbd3e64dac92cc448dec5293cd',
-            'labelName': '标签1',
-            'parentLabelCode': 123456
-          }
-        ],
-        'labelChannels': [{
-          'channelDates': [{
-            'channelCode': '6044981090191552',
-            'channelName': '复兴大桥中段-交通事故',
-            'channelSn': null,
-            'cameraType': 0,
-            'online': 1
-          },
+          'switchTab': '1',
+          'treeLabels': [
             {
-              'channelCode': 'ZgVzqsjwA1DTF561VGHK5E',
-              'channelName': '北京7青羊东二路77号2通道1',
-              'channelSn': null,
-              'cameraType': 1,
-              'online': 1
+              'labelCode': '123456',
+              'labelName': '视频场景',
+              'parentLabelCode': null
+            },
+            {
+              'labelCode': '5a81d1bd499b4940a21fc63ca51f4dfa',
+              'labelName': '标签2',
+              'parentLabelCode': 123456
+            },
+            {
+              'labelCode': 'd941adbbd3e64dac92cc448dec5293cd',
+              'labelName': '标签1',
+              'parentLabelCode': 123456
             }
           ],
-          'labelCode': 'd941adbbd3e64dac92cc448dec5293cd'
-        },
-          {
+          'labelChannels': [{
             'channelDates': [{
-              'channelCode': 'ZgVzqsjwA1DTF561VGHKK7',
-              'channelName': '北京7青羊东二路77号2通道2',
+              'channelCode': '6044981090191552',
+              'channelName': '复兴大桥中段-交通事故',
               'channelSn': null,
-              'cameraType': 2,
-              'online': 0
-            }],
-            'labelCode': '5a81d1bd499b4940a21fc63ca51f4dfa'
-          }
-        ]
-      },
+              'cameraType': 0,
+              'online': 1
+            },
+              {
+                'channelCode': 'ZgVzqsjwA1DTF561VGHK5E',
+                'channelName': '北京7青羊东二路77号2通道1',
+                'channelSn': null,
+                'cameraType': 1,
+                'online': 1
+              }
+            ],
+            'labelCode': 'd941adbbd3e64dac92cc448dec5293cd'
+          },
+            {
+              'channelDates': [{
+                'channelCode': 'ZgVzqsjwA1DTF561VGHKK7',
+                'channelName': '北京7青羊东二路77号2通道2',
+                'channelSn': null,
+                'cameraType': 2,
+                'online': 0
+              }],
+              'labelCode': '5a81d1bd499b4940a21fc63ca51f4dfa'
+            }
+          ]
+        },
         {
           'switchTab': '2',
           'labelChannels': [{

+ 86 - 41
src/views/eventdetailsdialog.vue

@@ -1654,6 +1654,7 @@ export default {
         }
       }
     },
+
     listResourceByWz(type) {
       if (this.resourcesListCheck.indexOf(type) > -1) {
         this.resourcesListCheck.splice(this.resourcesListCheck.indexOf(type), 1)
@@ -2241,7 +2242,7 @@ export default {
             icon: 'camera',
             bindPopupHtml: '',
             click: 'preview',
-            parameter: {code:res.data.centermonitorTCamera.cameraCode,type:res.data.centermonitorTCamera.cameraFactory},
+            parameter: {code:res.data.centermonitorTCamera.cameraCode,type:res.data.centermonitorTCamera.cameraFactory,name:res.data.centermonitorTCamera.cameraName},
             keepBindPopup: false,
             isAggregation: true,
             radius: 0
@@ -2334,7 +2335,7 @@ export default {
             icon: 'camera',
             bindPopupHtml: '',
             click: 'preview',
-            parameter: {code:res.data.centermonitorTCamera.cameraCode,type:res.data.centermonitorTCamera.cameraFactory},
+            parameter: {code:res.data.centermonitorTCamera.cameraCode,type:res.data.centermonitorTCamera.cameraFactory,name:res.data.centermonitorTCamera.cameraName},
             keepBindPopup: false,
             isAggregation: true,
             radius: 0
@@ -2442,47 +2443,91 @@ export default {
     /** 预览按钮操作 */
     preview(cameraParam) {
       if(cameraParam.type=='1'){
-        getDahuaVideoServer().then(newResponse => {
-          console.log(newResponse)
-          this.ws.detectConnectQt().then(res => {
-            if (res) { // 连接客户端成功
-              this.alertLogin()
-              this.ws.login({
-                loginIp: newResponse.loginIp,
-                loginPort: newResponse.loginPort,
-                userName: newResponse.userName,
-                userPwd: newResponse.userPwd,
-                token: '',
-                https: 1
-              })
-              this.ws.on('loginState', (res) => {
-                this.isLogin = res
-                console.log('---res-----', res)
-                if (res) {
-                  this.alertLoginSuccess()
-                  this.activePanel = 'key2'
-                  this.realTimeVideoDialog(cameraParam.code)
-                } else {
-                  this.alertLoginFailed()
-                }
-              })
-            } else { // 连接客户端失败
-              this.alertReinstall()
-            }
-          })
-        })
-      }else if(cameraParam.type=='0'){
-        let that = this
-        that.cameraVisible = true
-        getHaiKangVideoServer({cameraCode:cameraParam.code}).then(newResponse => {
-          that.cameraTitle = '摄像头-'+newResponse.data.cameraName
-          that.initPlugin(newResponse.data.appkey,newResponse.data.loginIp,newResponse.data.secret,newResponse.data.loginPort)
-          setTimeout(function() {
-            that.playhk(newResponse.data.channelCode)
-          }, 5000)
-        })
+               this.showTVWall(cameraParam.code,cameraParam.name)
       }
+      //   getDahuaVideoServer().then(newResponse => {
+      //     console.log(newResponse)
+      //     this.ws.detectConnectQt().then(res => {
+      //       if (res) { // 连接客户端成功
+      //         this.alertLogin()
+      //         this.ws.login({
+      //           loginIp: newResponse.loginIp,
+      //           loginPort: newResponse.loginPort,
+      //           userName: newResponse.userName,
+      //           userPwd: newResponse.userPwd,
+      //           token: '',
+      //           https: 1
+      //         })
+      //         this.ws.on('loginState', (res) => {
+      //           this.isLogin = res
+      //           console.log('---res-----', res)
+      //           if (res) {
+      //             this.alertLoginSuccess()
+      //             this.activePanel = 'key2'
+      //             //this.realTimeVideoDialog(cameraParam.code)
+      //             console.log(cameraParam)
+      //             this.showTVWall(cameraParam.code,cameraParam.cameraName)
+      //           } else {
+      //             this.alertLoginFailed()
+      //           }
+      //         })
+      //       } else { // 连接客户端失败
+      //         this.alertReinstall()
+      //       }
+      //     })
+      //   })
+      // }else if(cameraParam.type=='0'){
+      //   let that = this
+      //   that.cameraVisible = true
+      //   getHaiKangVideoServer({cameraCode:cameraParam.code}).then(newResponse => {
+      //     that.cameraTitle = '摄像头-'+newResponse.data.cameraName
+      //     that.initPlugin(newResponse.data.appkey,newResponse.data.loginIp,newResponse.data.secret,newResponse.data.loginPort)
+      //     setTimeout(function() {
+      //       //that.playhk(newResponse.data.channelCode)
+      //       this.showTVWall(newResponse.data.channelCode,newResponse.data.cameraName)
+      //     }, 5000)
+      //   })
+      // }
+
+    },
 
+    showTVWall(channelCode, channelName) {
+      let tvListJson = [{
+        "switchTab": "2",
+        "treeLabels": [{
+          "id": null,
+          "labelCode": "999",
+          "labelName": "电视墙",
+          "cameraType": null,
+          "parentLabelCode": ""
+        },
+          {
+            "id": "spcamera00010",
+            "labelCode": channelCode,
+            "labelName": channelName,
+            "cameraType": "1",
+            "parentLabelCode": "999"
+          }
+        ],
+        "labelChannels": [{
+          "labelCode": channelCode,
+          "channelDates": [{
+            "channelCode": channelCode,
+            "channelName": channelName,
+            "channelSn": null,
+            "cameraType": "1",
+            "online": "1",
+            "cameraCode": "1"
+          }]
+        }]
+      }]
+      this.$refs.TVWall.showTVWall(tvListJson, [{
+        "channelId": channelCode
+      }]);
+      this.$refs.bottomMenu.showMeasure = false;
+      this.$refs.bottomMenu.showChild = false;
+      this.$refs.bottomMenu.showBanChild = false;
+      this.$refs.bottomMenu.showChangChild = false;
     },
     realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
       if (!this.isLogin) {

+ 87 - 43
src/views/firespread.vue

@@ -963,6 +963,7 @@
     <el-dialog title="人员选择" :visible.sync="showFindUserByDept" width="40%">
       <findUserByDept v-if="showFindUserByDept" ref="findUserByDept" :deptId="iconCurrentIndex" @addSelection="addSelection"></findUserByDept>
     </el-dialog>
+    <TVWall ref="TVWall"></TVWall>
   </div>
 </template>
 
@@ -973,6 +974,7 @@ import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部
 import eventLogUpload from '@/views/eventLogUpload.vue' //日志上传文件
 import areaSupermap from '@/components/supermap'//区域标记地图
 import TcPlayer from '@/components/TcPlayer' //视频预览
+import TVWall from '@/components/TVWall.vue' //电视墙弹窗
 import leftRightSwiperScroll from '@/components/leftRightSwiperScroll.vue';//事件中心底部资源内容溢出组件
 import {getIconBg} from '@/api/components/sookaMapIcon';//资源底色控制文件
 import {joinConferences} from "@/api/meeting";
@@ -1023,7 +1025,8 @@ export default {
     supermapDialog1,
     eventLogUpload,
     areaSupermap,
-    TcPlayer
+    TcPlayer,
+    TVWall
   },
   data() {
     return {
@@ -1827,7 +1830,7 @@ export default {
                   markersMap.click = 'preview'
                   // markersMap.parameter = res.data[i].cameraCode
                   markersMap.parameter = {code:res.data.data[i].cameraCode,
-                    type:res.data.data[i].cameraFactory}
+                    type:res.data.data[i].cameraFactory,name:res.data.data[i].name}
                 }
               }
               markersMap.lng = res.data[i].longitude
@@ -2422,7 +2425,7 @@ export default {
             icon: 'camera',
             bindPopupHtml: '',
             click: 'preview',
-            parameter: {code:res.data.centermonitorTCamera.cameraCode,type:res.data.centermonitorTCamera.cameraFactory},
+            parameter: {code:res.data.centermonitorTCamera.cameraCode,type:res.data.centermonitorTCamera.cameraFactory,name:res.data.centermonitorTCamera.cameraName},
             keepBindPopup: false,
             isAggregation: false,
             radius: 0
@@ -2527,49 +2530,90 @@ export default {
           })
       }
     },
+    showTVWall(channelCode, channelName) {
+      let tvListJson = [{
+        "switchTab": "2",
+        "treeLabels": [{
+          "id": null,
+          "labelCode": "999",
+          "labelName": "电视墙",
+          "cameraType": null,
+          "parentLabelCode": ""
+        },
+          {
+            "id": "spcamera00010",
+            "labelCode": channelCode,
+            "labelName": channelName,
+            "cameraType": "1",
+            "parentLabelCode": "999"
+          }
+        ],
+        "labelChannels": [{
+          "labelCode": channelCode,
+          "channelDates": [{
+            "channelCode": channelCode,
+            "channelName": channelName,
+            "channelSn": null,
+            "cameraType": "1",
+            "online": "1",
+            "cameraCode": "1"
+          }]
+        }]
+      }]
+      this.$refs.TVWall.showTVWall(tvListJson, [{
+        "channelId": channelCode
+      }]);
+      this.$refs.bottomMenu.showMeasure = false;
+      this.$refs.bottomMenu.showChild = false;
+      this.$refs.bottomMenu.showBanChild = false;
+      this.$refs.bottomMenu.showChangChild = false;
+    },
     /** 预览按钮操作 */
     preview(cameraParam) {
-      if(cameraParam.type=='1'){
-        getDahuaVideoServer().then(newResponse => {
-          console.log(newResponse)
-          this.ws.detectConnectQt().then(res => {
-            if (res) { // 连接客户端成功
-              this.alertLogin()
-              this.ws.login({
-                loginIp: newResponse.loginIp,
-                loginPort: newResponse.loginPort,
-                userName: newResponse.userName,
-                userPwd: newResponse.userPwd,
-                token: '',
-                https: 0
-              })
-              this.ws.on('loginState', (res) => {
-                this.isLogin = res
-                console.log('---res-----', res)
-                if (res) {
-                  this.alertLoginSuccess()
-                  this.activePanel = 'key2'
-                  this.realTimeVideoDialog(cameraParam.code)
-                } else {
-                  this.alertLoginFailed()
-                }
-              })
-            } else { // 连接客户端失败
-              this.alertReinstall()
-            }
-          })
-        })
-      }else if(cameraParam.type=='0'){
-        let that = this
-        that.cameraVisible = true
-        getHaiKangVideoServer({cameraCode:cameraParam.code}).then(newResponse => {
-          that.cameraTitle = '摄像头-'+newResponse.data.cameraName
-          that.initPlugin(newResponse.data.appkey,newResponse.data.loginIp,newResponse.data.secret,newResponse.data.loginPort)
-          setTimeout(function() {
-            that.playhk(newResponse.data.channelCode)
-          }, 5000)
-        })
+      if(cameraParam.type=='1') {
+        console.log(cameraParam)
+this.showTVWall(cameraParam.code,cameraParam.name)
       }
+      //   getDahuaVideoServer().then(newResponse => {
+      //     console.log(newResponse)
+      //     this.ws.detectConnectQt().then(res => {
+      //       if (res) { // 连接客户端成功
+      //         this.alertLogin()
+      //         this.ws.login({
+      //           loginIp: newResponse.loginIp,
+      //           loginPort: newResponse.loginPort,
+      //           userName: newResponse.userName,
+      //           userPwd: newResponse.userPwd,
+      //           token: '',
+      //           https: 0
+      //         })
+      //         this.ws.on('loginState', (res) => {
+      //           this.isLogin = res
+      //           console.log('---res-----', res)
+      //           if (res) {
+      //             this.alertLoginSuccess()
+      //             this.activePanel = 'key2'
+      //             this.realTimeVideoDialog(cameraParam.code)
+      //           } else {
+      //             this.alertLoginFailed()
+      //           }
+      //         })
+      //       } else { // 连接客户端失败
+      //         this.alertReinstall()
+      //       }
+      //     })
+      //   })
+      // }else if(cameraParam.type=='0'){
+      //   let that = this
+      //   that.cameraVisible = true
+      //   getHaiKangVideoServer({cameraCode:cameraParam.code}).then(newResponse => {
+      //     that.cameraTitle = '摄像头-'+newResponse.data.cameraName
+      //     that.initPlugin(newResponse.data.appkey,newResponse.data.loginIp,newResponse.data.secret,newResponse.data.loginPort)
+      //     setTimeout(function() {
+      //       that.playhk(newResponse.data.channelCode)
+      //     }, 5000)
+      //   })
+      // }
 
     },
     realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口

+ 2 - 2
vue.config.js

@@ -51,8 +51,8 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-         // target: `http://121.36.228.66:3031`,
-         target: `https://29613561xe.eicp.vip`,
+          target: `http://121.36.228.66:3031`,
+        // target: `https://29613561xe.eicp.vip`,
         // target: `http://127.0.0.1:3031`,
         changeOrigin: true,
         pathRewrite: {