Ver código fonte

事件详情中点击平面地图摄像头当前弹出插件为单开摄像头接口,换成电视墙接口,

JX.LI 2 anos atrás
pai
commit
84cea8e058
2 arquivos alterados com 66 adições e 64 exclusões
  1. 33 32
      src/views/eventdetailsdialog.vue
  2. 33 32
      src/views/firespread.vue

+ 33 - 32
src/views/eventdetailsdialog.vue

@@ -1764,7 +1764,7 @@ export default {
                 if (res.data[i].cameraCode != null) {
                   markersMap.click = 'preview'
                   // markersMap.parameter = res.data[i].cameraCode
-                  markersMap.parameter = {code:res.data[i].cameraCode,
+                  markersMap.parameter = {code:res.data[i].cameraCode,name:res.data[i].name,
                     type:res.data[i].cameraFactory?res.data[i].cameraFactory:1}
                 }
               }
@@ -2282,7 +2282,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,name:res.data.centermonitorTCamera.cameraName,type:res.data.centermonitorTCamera.cameraFactory},
             keepBindPopup: false,
             isAggregation: true,
             radius: 0
@@ -2373,7 +2373,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,name:res.data.centermonitorTCamera.cameraName,type:res.data.centermonitorTCamera.cameraFactory},
             keepBindPopup: false,
             isAggregation: true,
             radius: 0
@@ -2481,35 +2481,36 @@ 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()
-            }
-          })
-        })
+        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)
+        //         } else {
+        //           this.alertLoginFailed()
+        //         }
+        //       })
+        //     } else { // 连接客户端失败
+        //       this.alertReinstall()
+        //     }
+        //   })
+        // })
       }else if(cameraParam.type=='0'){
         let that = this
         that.cameraVisible = true

+ 33 - 32
src/views/firespread.vue

@@ -1607,7 +1607,7 @@ export default {
                 if (res.data[i].cameraCode != null) {
                   markersMap.click = 'preview'
                   // markersMap.parameter = res.data[i].cameraCode
-                  markersMap.parameter = {code:res.data.data[i].cameraCode,
+                  markersMap.parameter = {code:res.data.data[i].cameraCode,name:res.data[i].name,
                     type:res.data.data[i].cameraFactory}
                 }
               }
@@ -2105,7 +2105,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,name:res.data.centermonitorTCamera.cameraName,type:res.data.centermonitorTCamera.cameraFactory},
             keepBindPopup: false,
             isAggregation: false,
             radius: 0
@@ -2203,7 +2203,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,name:res.data.centermonitorTCamera.cameraName,type:res.data.centermonitorTCamera.cameraFactory},
             keepBindPopup: false,
             isAggregation: false,
             radius: 0
@@ -2311,35 +2311,36 @@ 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: 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()
-            }
-          })
-        })
+        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