Przeglądaj źródła

Merge remote-tracking branch 'origin/visu_firecontrol' into visu_firecontrol

王通 2 lat temu
rodzic
commit
ed739d426e

+ 3 - 3
src/assets/styles/base.scss

@@ -562,12 +562,12 @@ div::-webkit-scrollbar {
 //视频摄像头预览弹层样式
 .videoCustomWidth {
   width: 1070px !important;
-  height: 700px !important;
+  height: 750px !important;
 }
 //电视墙视频摄像头预览弹层样式
 .TVWallCustomWidth {
-  width: 1150px !important;
-  height: 700px !important;
+  width: 1200px !important;
+  height: 800px !important;
 }
 
 .dia-event-info {

+ 12 - 8
src/components/TVWall.vue

@@ -417,7 +417,12 @@ export default {
       rotation(lng,lat,list).then(res => {
       })
     },
-    showTVWall() {
+    showTVWall(tvListJson,bfArray) {
+      if(tvListJson){
+        this.preview(tvListJson,bfArray);
+        this.TVWallVisible = true;
+        return;
+      }
       // let that=this;
       /** ----------------------------------大华摄像头预览开始------------------------------------- */
       this.ws.addEventListener('connectStateChange', data => {
@@ -466,7 +471,7 @@ export default {
       this.$modal.msgWarning('请重新安装客户端')
     },
     /** 预览按钮操作 */
-    preview() {
+    preview(tvListJson,bfArray) {
       getTVWallList().then(newres => {
         getDahuaVideoServer().then(newResponse => {
           this.ws.detectConnectQt().then(res => {
@@ -490,7 +495,7 @@ export default {
                 if (res) {
                   this.alertLoginSuccess()
                   this.activePanel = 'key2'
-                  this.create(newres.data)
+                  this.create(tvListJson?tvListJson:newres.data,bfArray)
                 } else {
                   this.alertLoginFailed()
                 }
@@ -503,8 +508,8 @@ export default {
       })
     },
 
-    create(tvListJson) { // 调用创建控件接口
-      debugger
+    create(tvListJson,bfArray) { // 调用创建控件接口
+      // debugger
       let _this = this
       const params = [
         {
@@ -525,9 +530,8 @@ export default {
       ]
       this.setPos()
       this.customizeTree(tvListJson);
-      setTimeout(function () {
-        _this.ws.createCtrl(params);
-      }, 3000);
+      _this.ws.createCtrl(params);
+      _this.playRealMonitorVideo(bfArray);
     },
     setPos() {
       let target = document.getElementById(this.domId)

+ 2 - 1
src/components/TVWalls.vue

@@ -287,7 +287,8 @@ export default {
       this.data = val
       this.autoList = []
       this.stringList = []
-      for (let i = 1; i < data[0].treeLabels.length; i++) {
+      let length = data[0].treeLabels.length >= 4 ? 5 : data[0].treeLabels.length
+      for (let i = 1; i < length; i++) {
         this.autoList.push({"channelId": data[0].treeLabels[i].labelCode})
         this.stringList.push(data[0].treeLabels[i].labelCode)
       }

+ 4 - 1
src/views/eventdetailsdialog.vue

@@ -1510,9 +1510,12 @@ export default {
       })
     },
     updateYjYuAn() {
-      if(this.eventStatusValue=='forest_event_status_1'){
+      if(this.eventStatusValue=='forest_event_status_1'||this.eventStatusValue=='forest_event_status_7') {
         this.$message.error(`未签收事件无法修改预案信息,请先签收!`)
         return
+      }else if(this.eventStatusValue=='forest_event_status_3'){
+          this.$message.error(`误报事件无法修改预案信息!`)
+          return
       }else{
         let param = { eventCode: this.eventCode, reserve: this.sendGuanLianYuAn }
         updateYjYuAn(param).then(res => {

+ 34 - 43
src/views/forest.vue

@@ -451,6 +451,7 @@ import eventdetailsdialog from '@/views/eventdetailsdialog.vue' //事件详情
 import firespread from '@/views/firespread.vue' //事件详情弹窗
 import Firespread from "./firespread";
 import chart from "./from/dvCapsuleChart.vue";
+import {selectConfigKey} from "@/api/system/config";
 
 let echarts = require('echarts')
 export default {
@@ -490,17 +491,6 @@ export default {
     /** ----------------------------------weosocket开始------------------------------------- */
     // this.initWebSocket()
     /** ----------------------------------weosocket结束------------------------------------- */
-    setInterval(() => {
-      if (this.calendarDay == this.getCurrentDataStr()) {
-        this.getTodayEvents(this.getCurrentDataStr(), true);
-        this.getDeptEventCount(this.getCurrentDataStr(), true);
-        // this.getEventList(this.getCurrentDataStr(), this.pageSize, this.pageNum, '', true);
-        this.getEventByEventType(this.getCurrentDataStr(), true);
-        this.getEventByReportorOrder(this.getCurrentDataStr(), true);
-        this.getExposureStage(this.getCurrentDataStr(), true);
-        // this.getSupermap(this.getCurrentDataStr(), true);
-      }
-    }, 30000)
     this.bottomMenuList() //获取底部公共组件消息和任务
   },
   data() {
@@ -971,15 +961,15 @@ export default {
               '                </div>' +
               '                </div>' +
               '                </span>';
-            if (res.data[i].pictureType == 'image' && res.data[i].picturePath != null && res.data[i].picturePath != '') {
-              markersMap.bindPopupHtml += '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '<img src="' + res.data[i].picturePath + '" style="width: 150px;height: 100px"/>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span>'
-            }
+            // if (res.data[i].pictureType == 'image' && res.data[i].picturePath != null && res.data[i].picturePath != '') {
+            //   markersMap.bindPopupHtml += '<span>' +
+            //     '                  <div class="d-l-con">' +
+            //     '                  <div class="d-l-l-text">' +
+            //     '<img src="' + res.data[i].picturePath + '" style="width: 150px;height: 100px"/>' +
+            //     '                </div>' +
+            //     '                </div>' +
+            //     '                </span>'
+            // }
             markersMap.bindPopupHtml += '</div>'
             that.markersList.push(markersMap)
           }
@@ -1134,15 +1124,15 @@ export default {
         '                </div>' +
         '                </div>' +
         '                </span>';
-      if (event.pictureType == 'image' && event.picturePath != null && event.picturePath != '') {
-        markersMap.bindPopupHtml += '<span>' +
-          '                  <div class="d-l-con">' +
-          '                  <div class="d-l-l-text">' +
-          '<img src="' + event.picturePath + '" style="width: 150px;height: 100px"/>' +
-          '                </div>' +
-          '                </div>' +
-          '                </span>'
-      }
+      // if (event.pictureType == 'image' && event.picturePath != null && event.picturePath != '') {
+      //   markersMap.bindPopupHtml += '<span>' +
+      //     '                  <div class="d-l-con">' +
+      //     '                  <div class="d-l-l-text">' +
+      //     '<img src="' + event.picturePath + '" style="width: 150px;height: 100px"/>' +
+      //     '                </div>' +
+      //     '                </div>' +
+      //     '                </span>'
+      // }
       markersMap.bindPopupHtml += '</div>'
       that.markersList.push(markersMap)
       setTimeout(() => {
@@ -1162,12 +1152,14 @@ export default {
     },
     /** ----------------------------------weosocket开始------------------------------------- */
     initWebSocket(userId, eventTypeDl, eventType) {        //初始化weosocket
-      const wsuri = 'ws://127.0.0.1:10003/eventPush/' + userId + '/' + eventTypeDl + '/' + eventType
-      this.websock = new WebSocket(wsuri)
-      console.log('建立websocket连接')
-      this.websock.onopen = this.websocketonopen
-      this.websock.onmessage = this.websocketonmessage
-      this.websock.onerror = this.websocketonerror
+      selectConfigKey('KSH_SOCKET').then(res => {
+        const wsuri = res.data + userId + '/' + eventTypeDl + '/' + eventType
+        this.websock = new WebSocket(wsuri)
+        console.log('建立websocket连接')
+        this.websock.onopen = this.websocketonopen
+        this.websock.onmessage = this.websocketonmessage
+        this.websock.onerror = this.websocketonerror
+      })
     },
     websocketonopen() { //连接建立之后执行send方法发送数据
       console.log('websocket连接成功')
@@ -1185,14 +1177,13 @@ export default {
         // 处理收到的消息
         this.handleWebSoceketEvent(e.data)
 
-        // this.getEventListNew();
-        // this.getTodayEvents(this.getCurrentDataStr());
-        // this.getDeptEventCount(this.getCurrentDataStr());
-        // this.getEventByEventType(this.getCurrentDataStr());
-        // this.getEventByReportorOrder(this.getCurrentDataStr());
-
-        // this.$refs.bottomMenu.updateAlert();
-        // this.$refs.up.play();
+        this.getTodayEvents(this.getCurrentDataStr(), true);
+        this.getDeptEventCount(this.getCurrentDataStr(), true);
+        this.getEventByEventType(this.getCurrentDataStr(), true);
+        this.getEventByReportorOrder(this.getCurrentDataStr(), true);
+        this.getExposureStage(this.getCurrentDataStr(), true);
+        this.$refs.bottomMenu.updateAlert();
+        this.$refs.up.play();
         // thes.$refs.up.pause();//停止播放音乐
       }
     },

+ 44 - 2
src/views/monitor.vue

@@ -217,6 +217,7 @@ export default {
     this.selectKeyAreaList()
     this.bottomMenuList() //获取底部公共组件消息和任务
     this.getTreeselect()
+    // this.showTVWall();
   },
   data() {
     return {
@@ -284,6 +285,42 @@ export default {
     }
   },
   methods: {
+    /* 电视墙替换开始 */
+    showTVWall(channelCode, channelName) {
+      let tvListJson = [
+        {
+          'switchTab': '1',
+          'treeLabels': [
+            {
+              'labelCode': '123456',
+              'labelName': '视频场景',
+              'parentLabelCode': null
+            },
+            {
+              'labelCode': 'd941adbbd3e64dac92cc448dec5293cd',
+              'labelName': channelName,
+              'parentLabelCode': 123456
+            }
+          ],
+          'labelChannels': [{
+            'channelDates': [{
+              'channelCode': channelCode,
+              'channelName': channelName,
+              'channelSn': null,
+              'cameraType': 1,
+              'online': 1
+            }],
+            'labelCode': 'd941adbbd3e64dac92cc448dec5293cd'
+          }]
+        }
+      ]
+      this.$refs.TVWall.showTVWall(tvListJson,[{"channelId":channelCode}]);
+      this.$refs.supermap.isEditableLayers = false;
+      this.$refs.bottomMenu.showChild = false;
+      this.$refs.bottomMenu.showBanChild = false;
+      this.$refs.bottomMenu.showChangChild = false;
+    },
+    /* 电视墙替换结束 */
     /** 部门树*/
 // 查询部门下拉树结构
     getTreeselect() {
@@ -441,7 +478,7 @@ export default {
               isAggregation: false
             }
             if (res.data.visuForestCloudCameraBOList[i].channelCode != null) {
-              markersMap.parameter = {code:res.data.visuForestCloudCameraBOList[i].cameraCode,
+              markersMap.parameter = {code:res.data.visuForestCloudCameraBOList[i].cameraCode, name:res.data.visuForestCloudCameraBOList[i].cameraName,
                 type:res.data.visuForestCloudCameraBOList[i].cameraFactory}
             } else {
               markersMap.parameter = []
@@ -535,7 +572,7 @@ export default {
               isAggregation: false
             }
             if (res.data[i].channelCode != null) {
-              markersMap.parameter = {code:res.data[i].cameraCode,
+              markersMap.parameter = {code:res.data[i].cameraCode, name:res.data[i].cameraName,
                 type:res.data[i].cameraFactory}
             } else {
               markersMap.parameter = []
@@ -629,6 +666,11 @@ export default {
     },
     /** 预览按钮操作 */
     preview(cameraParam) {
+      this.showTVWall(cameraParam.code, cameraParam.name);
+    },
+
+    /** 预览按钮操作 */
+    preview_废弃(cameraParam) {
       if(cameraParam.type=='1'){
         getDahuaVideoServer().then(newResponse => {
           console.log(newResponse)

+ 2 - 1
vue.config.js

@@ -53,7 +53,8 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         // target: `http://117.78.49.164:3031`,
-        target: `http://121.36.228.66:3031`,
+        target: `http://127.0.0.1:3031`,
+        // target: `http://121.36.228.66:3031`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''