Kaynağa Gözat

Merge remote-tracking branch 'origin/visu_environment_01_siping_2.5d' into visu_environment_01_siping_2.5d

王通 1 yıl önce
ebeveyn
işleme
79e78ed4e6

+ 61 - 56
src/components/eventLocation.vue

@@ -118,6 +118,7 @@
         </div>
       </div>
     </el-dialog>
+    <TVWall ref="TVWall"></TVWall>
     <!--事件弹层-->
     <div class="event-info">
       <eventdetailsdialog ref="eventdetailsdialog" :calendarDay="this.getCurrentDataStr"></eventdetailsdialog>
@@ -141,23 +142,22 @@ import {
 import {
   getHaiKangVideoServer
 } from '@/api/haikang/haikang'
-import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
 import eventLocationSupermap from '@/components/supermap' //超图
 import eventdetailsdialog from '@/views/eventdetailsdialog.vue' //事件详情弹窗
+
 /** ----------------------------------摄像头预览开始------------------------------------- */
 import {
-  getDahuaVideoServer
+  getDahuaVideoServer, getTVWallList
 } from '@/api/dahua/dahua'
 import DHWs from '@/dahua/lib/DHWs'
-
+import TVWall from "@/components/TVWall.vue";
 /** ----------------------------------摄像头预览结束------------------------------------- */
 export default {
   dicts: ['event_source'],
   components: {
     eventLocationSupermap,
     eventdetailsdialog,
-    vBottomMenu
-
+    TVWall
   },
   data() {
     return {
@@ -448,19 +448,22 @@ export default {
               let markersMap = {
                 lng: 124.59,
                 lat: 43.02,
-                icon: 'camera',
-                bindPopupHtml: '',
-                click: 'preview',
+                icon: "camera",
+                bindPopupHtml: "",
+                click: "preview",
+                parameter: "",
+                name: i,
                 keepBindPopup: false,
-                isAggregation: false
-              }
-              if (res.data[i].cameraCode != null) {
+                isAggregation: false,
+              };
+              if (res.data[i].channelCode != null) {
                 markersMap.parameter = {
                   code: res.data[i].cameraCode,
-                  type: res.data[i].cameraFactory
-                }
+                  name: res.data[i].cameraName,
+                  type: res.data[i].cameraFactory,
+                };
               } else {
-                markersMap.parameter = []
+                markersMap.parameter = [];
               }
               if (res.data.length > 50) {
                 markersMap.isAggregation = true
@@ -528,6 +531,49 @@ export default {
     showEventLocation() {
       this.eventLocationVisible = true
     },
+    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,
+        },
+      ]);
+    },
     /** ----------------------------------摄像头预览开始------------------------------------- */
     alertLogin: function() {
       this.$modal.msg('登录中....')
@@ -552,48 +598,7 @@ 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);
     },
     realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
       if (!this.isLogin) {

+ 4 - 0
src/store/modules/user.js

@@ -61,6 +61,10 @@ const user = {
     GetInfo({ commit, state }) {
       return new Promise((resolve, reject) => {
         getInfo().then(res => {
+          let bo = res.release;
+          if (!bo.flag) {
+            location.href = bo.url;
+          }
           const user = res.user
           const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : user.avatar;
           if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组

+ 4 - 1
src/views/eventdetailsdialog.vue

@@ -231,7 +231,7 @@
                                            style="text-align:left" @click="updateCentereventTEventcatalogueStatus('sh',false)">
                                   审核
                                 </el-button>
-                                <el-button size="small" v-else icon="el-icon-loading" style="text-align:left">
+                                <el-button size="small" v-else-if="isExamine =='0'" icon="el-icon-loading" style="text-align:left">
                                   请等待复核,复核通过后方可归档。
                                 </el-button>
                                 <el-button size="small" icon="el-icon-chat-dot-square" @click="sendEventLog()">发送
@@ -1941,6 +1941,7 @@ export default {
       isExamine: "0", //事件审核 1通过  0不通过
       eventId: null, //事件ID
       eventType: null, //事件类型-大类
+      eventTypeXl: null, //事件类型-小类
       dataStatus: null, //事件流程按钮
       deptId: null, //事件流程部门
       eventCode: null,
@@ -3006,6 +3007,7 @@ export default {
         that.eventName = res.data.catalogue.eventName
         that.eventTypeXl = res.data.catalogue.eventTypeXl
         that.version = res.data.catalogue.version
+        that.isExamine = res.data.catalogue.isExamine
         let markersMap = {
           lng: 124.59,
           lat: 43.02,
@@ -3108,6 +3110,7 @@ export default {
         that.eventName = res.data.catalogue.eventName
         that.eventTypeXl = res.data.catalogue.eventTypeXl
         that.version = res.data.catalogue.version
+        that.isExamine = res.data.catalogue.isExamine
         let markersMap = {
           lng: 124.59,
           lat: 43.02,

+ 4 - 1
src/views/firespread.vue

@@ -231,7 +231,7 @@
                                            style="text-align:left" @click="updateCentereventTEventcatalogueStatus('sh',false)">
                                   审核
                                 </el-button>
-                                <el-button size="small" v-else icon="el-icon-loading" style="text-align:left">
+                                <el-button size="small" v-else-if="isExamine =='0'" icon="el-icon-loading" style="text-align:left">
                                   请等待复核,复核通过后方可归档。
                                 </el-button>
                                 <el-button size="small" icon="el-icon-chat-dot-square" @click="sendEventLog()">发送
@@ -1941,6 +1941,7 @@ export default {
       isExamine: "0", //事件审核 1通过  0不通过
       eventId: null, //事件ID
       eventType: null, //事件类型-大类
+      eventTypeXl: null, //事件类型-小类
       dataStatus: null, //事件流程按钮
       deptId: null, //事件流程部门
       eventCode: null,
@@ -3006,6 +3007,7 @@ export default {
         that.eventName = res.data.catalogue.eventName
         that.eventTypeXl = res.data.catalogue.eventTypeXl
         that.version = res.data.catalogue.version
+        that.isExamine = res.data.catalogue.isExamine
         let markersMap = {
           lng: 124.59,
           lat: 43.02,
@@ -3108,6 +3110,7 @@ export default {
         that.eventName = res.data.catalogue.eventName
         that.eventTypeXl = res.data.catalogue.eventTypeXl
         that.version = res.data.catalogue.version
+        that.isExamine = res.data.catalogue.isExamine
         let markersMap = {
           lng: 124.59,
           lat: 43.02,

+ 101 - 106
src/views/monitor.vue

@@ -269,8 +269,8 @@ export default {
       this.getTreeselect();
       this.deptId = Cookies.get("deptId");
       // this.getSensorListByDeptIds()
-      this.getMonitorDeviceAndDataLists();
-      // this.getDlblistBydeptIds();
+      this.getMonitorDeviceAndDataLists(null);
+      // this.getDlblistBydeptIds(null);
       // this.chuanSet();
       this.selectDeviceType(-1);
     }, 2000)
@@ -391,10 +391,10 @@ export default {
 
       }
     },
-    getMonitorDeviceAndDataList() {
+    getMonitorDeviceAndDataList(deptId) {
       let list = [];
       let markersList = [];
-      getMonitorDeviceAndDataList(this.deptId).then((res) => {
+      getMonitorDeviceAndDataList(deptId).then((res) => {
         this.visuForestCloudCameraBOListSearch = [];
         list = res.data;
         //this.sensorNum = list.length
@@ -878,7 +878,6 @@ export default {
       // this.findCameraByDept(data.id)
       if (that.localMark == "she") {
         that.selectCameraByDeptId(data.id);
-        debugger;
         getCamerasByDeptId(data.id).then((res) => {
           that.$refs.TVWalls.showTVWall(res.data, {
             longitude: data.deptLongitude,
@@ -887,7 +886,7 @@ export default {
         });
       } else if (that.localMark == "chuan") {
         //that.getSensorListByDeptId()
-        that.getMonitorDeviceAndDataList();
+        that.getMonitorDeviceAndDataList(data.id);
       } else if (that.localMark == "la") {
         // that.getDlblistBydeptId();
       }
@@ -909,7 +908,7 @@ export default {
       this.placeholderMsg = "请输入云广播名称";
       clearInterval(this.cgqTimer);
       this.deptId = Cookies.get("deptId");
-      this.getDlblistBydeptId();
+      this.getDlblistBydeptId(this.deptId);
     },
     chuanClick() {
       this.onLa = false;
@@ -919,115 +918,111 @@ export default {
       this.placeholderMsg = "请输入传感器名称";
       this.deptId = Cookies.get("deptId");
       let that = this;
-      this.getMonitorDeviceAndDataList();
+      this.getMonitorDeviceAndDataList(null);
       clearInterval(this.cgqTimer);
-      this.cgqTimer = setInterval(() => {
-        that.getMonitorDeviceAndDataList();
-      }, 20 * 1000);
-      this.getMonitorDeviceAndDataList();
     },
     //传感器2
-    getMonitorDeviceAndDataLists() {
+    getMonitorDeviceAndDataLists(deptId) {
       let that = this;
-      getMonitorDeviceAndDataList(this.deptId).then((res) => {
+      getMonitorDeviceAndDataList(deptId).then((res) => {
         that.sensorNum = res.data.length;
       });
     },
     // 云广播
-    // getDlblistBydeptId() {
-    //   let that = this;
-    //   let markersList = [];
-    //   getDlblistBydeptId(that.deptId)
-    //     .then(function (res) {
-    //       that.loudspeakerNum = res.data.length;
-    //       that.visuForestCloudCameraBOListSearch = [];
-    //       if (res.data != null && res.data.length > 0) {
-    //         for (let j = 0; j < res.data.length; j++) {
-    //           let dat = {
-    //             cameraName: res.data[j].name,
-    //             longitude: res.data[j].longitude,
-    //             latitude: res.data[j].latitude,
-    //           };
-    //           that.visuForestCloudCameraBOListSearch.push(dat);
-    //         }
-    //         for (let i = 0; i < res.data.length; i++) {
-    //           let markersMap = {
-    //             lng: 124.59,
-    //             lat: 43.02,
-    //             icon: "marker",
-    //             bindPopupHtml:
-    //               '<div class="map-tip">' +
-    //               "<span>" +
-    //               '                  <div class="d-l-con">' +
-    //               '                  <div class="d-l-l-text">' +
-    //               "                  <h4>名称:" +
-    //               (res.data[i].name ? res.data[i].name : "") +
-    //               "</h4>" +
-    //               "                </div>" +
-    //               "                </div>" +
-    //               "                </span>" +
-    //               "<span>" +
-    //               '                  <div class="d-l-con">' +
-    //               '                  <div class="d-l-l-text">' +
-    //               "                  <h4>位置:" +
-    //               (res.data[i].position ? res.data[i].position : "") +
-    //               "</h4>" +
-    //               "                </div>" +
-    //               "                </div>" +
-    //               "                </span>" +
-    //               "<span>" +
-    //               '                  <div class="d-l-con">' +
-    //               '                  <div class="d-l-l-text">' +
-    //               "                  <h4>备注:" +
-    //               (res.data[i].remark ? res.data[i].remark : "") +
-    //               "</h4>" +
-    //               "                </div>" +
-    //               "                </div>" +
-    //               "                </span>" +
-    //               "<span>" +
-    //               '                  <div class="d-l-con">' +
-    //               '                  <div class="d-l-l-text">' +
-    //               "                  <h4>经纬度:" +
-    //               res.data[i].longitude +
-    //               "," +
-    //               res.data[i].latitude +
-    //               "</h4>" +
-    //               "                </div>" +
-    //               "                </div>" +
-    //               "                </span>" +
-    //               "</div>",
-    //             click: "jump",
-    //             parameter: "",
-    //             name: "",
-    //             keepBindPopup: false,
-    //             isAggregation: false,
-    //           };
-    //           markersMap.icon = "big-horn";
-    //
-    //           markersMap.lng = res.data[i].longitude;
-    //           markersMap.lat = res.data[i].latitude;
-    //           markersList.push(markersMap);
-    //         }
-    //         setTimeout(() => {
-    //           that.$refs.supermap.clearM();
-    //           that.$refs.supermap.clearMRadius();
-    //           that.$refs.supermap.setMarkers(markersList);
-    //         }, 2000);
-    //       } else {
-    //         setTimeout(() => {
-    //           that.$refs.supermap.clearM();
-    //           that.$refs.supermap.clearMRadius();
-    //         }, 2000);
-    //       }
-    //     })
-    //     .catch(function (error) {
-    //       console.error(error);
-    //     });
-    // },
-    getDlblistBydeptIds() {
+    getDlblistBydeptId(deptId) {
+      let that = this;
+      let markersList = [];
+      getDlblistBydeptId(deptId)
+        .then(function (res) {
+          that.loudspeakerNum = res.data.length;
+          that.visuForestCloudCameraBOListSearch = [];
+          if (res.data != null && res.data.length > 0) {
+            for (let j = 0; j < res.data.length; j++) {
+              let dat = {
+                cameraName: res.data[j].name,
+                longitude: res.data[j].longitude,
+                latitude: res.data[j].latitude,
+              };
+              that.visuForestCloudCameraBOListSearch.push(dat);
+            }
+            for (let i = 0; i < res.data.length; i++) {
+              let markersMap = {
+                lng: 124.59,
+                lat: 43.02,
+                icon: "marker",
+                bindPopupHtml:
+                  '<div class="map-tip">' +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>名称:" +
+                  (res.data[i].name ? res.data[i].name : "") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>位置:" +
+                  (res.data[i].position ? res.data[i].position : "") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>备注:" +
+                  (res.data[i].remark ? res.data[i].remark : "") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>经纬度:" +
+                  res.data[i].longitude +
+                  "," +
+                  res.data[i].latitude +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "</div>",
+                click: "jump",
+                parameter: "",
+                name: "",
+                keepBindPopup: false,
+                isAggregation: false,
+              };
+              markersMap.icon = "big-horn";
+
+              markersMap.lng = res.data[i].longitude;
+              markersMap.lat = res.data[i].latitude;
+              markersList.push(markersMap);
+            }
+            setTimeout(() => {
+              that.$refs.supermap.clearM();
+              that.$refs.supermap.clearMRadius();
+              that.$refs.supermap.setMarkers(markersList);
+            }, 2000);
+          } else {
+            setTimeout(() => {
+              that.$refs.supermap.clearM();
+              that.$refs.supermap.clearMRadius();
+            }, 2000);
+          }
+        })
+        .catch(function (error) {
+          console.error(error);
+        });
+    },
+    getDlblistBydeptIds(deptId) {
       let that = this;
 
-      getDlblistBydeptId(that.deptId)
+      getDlblistBydeptId(deptId)
         .then(function (res) {
           that.loudspeakerNum = res.data.length;
         })