Explorar o código

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

qinhouyu %!s(int64=2) %!d(string=hai) anos
pai
achega
1c9af80a9b

+ 3 - 3
src/api/monitor.js

@@ -63,10 +63,10 @@ export function getSensorListByDeptId(deptId) {
 //根据部门id查询部门及部门以下的数据,没有则默认查询所有
 export function getDlblistBydeptId(deptId) {
   let url = "";
-  if(deptId!=null){
-    url= '/center-firecontrol/VisuForestMonitorCenterController/getDlblistBydeptId?deptId=' + deptId;
+  if(deptId!=null&&deptId!=""){
+    url= '/center-emergency/VisuEmergencyMonitorCenterController/getDlblistBydeptId?deptId=' + deptId;
   }else{
-    url= '/center-firecontrol/VisuForestMonitorCenterController/getDlblistBydeptId';
+    url= '/center-emergency/VisuEmergencyMonitorCenterController/getDlblistBydeptId';
   }
   return request({
     url: url,

+ 8 - 8
src/components/TVWall.vue

@@ -390,12 +390,12 @@ export default {
       ]
       this.setPos()
       this.customizeTree(tvListJson);
-      if(array1.length == 1){
-        _this.realTimeVideoDialog(array1);
-      }else{
+      // if(array1.length == 1){
+      //   _this.realTimeVideoDialog(array1);
+      // }else{
         _this.ws.createCtrl(params);
         _this.playRealMonitorVideo(array)
-      }
+      // }
       setTimeout(() => {
         _this.rotation(longitude,latitude,array1)
       }, 5000)
@@ -526,12 +526,12 @@ export default {
       for (let i = 1; i < length; i++) {
         bfArray.push({"channelId": tvListJson[0].treeLabels[i].labelCode})
       }
-      if(bfArray.length == 1){
-        _this.realTimeVideoDialog([tvListJson[0].treeLabels[1].labelCode]);
-      }else{
+      // if(bfArray.length == 1){
+      //   _this.realTimeVideoDialog([tvListJson[0].treeLabels[1].labelCode]);
+      // }else{
         _this.ws.createCtrl(params);
         _this.playRealMonitorVideo(bfArray)
-      }
+      // }
     },
     setPos() {
       let target = document.getElementById(this.domId)

+ 5 - 4
src/components/TVWalls.vue

@@ -213,6 +213,7 @@ export default {
   methods: {
     cancelEventLocationShow() {
       // this.activeName = 'tv'
+      this.userData = []
       this.TVWallVisible = false
       this.destroy()
 
@@ -352,12 +353,12 @@ export default {
       ]
       this.setPos()
       this.customizeTree(tvListJson);
-      if(_this.stringList.length == 1){
-        _this.realTimeVideoDialog([_this.stringList[0]]);
-      }else{
+      // if(_this.stringList.length == 1){
+      //   _this.realTimeVideoDialog([_this.stringList[0]]);
+      // }else{
         _this.ws.createCtrl(params);
         _this.playRealMonitorVideo();
-      }
+      // }
       if (_this.data != undefined && _this.data != null) {
         setTimeout( _this.rotation(_this.data.longitude, _this.data.latitude, _this.stringList),5000)
       }

+ 62 - 58
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
@@ -489,8 +492,7 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>摄像头类型:' + res.data[i]
-                  .cameraFactory + '</h4>' +
+                '                  <h4>网络运营商:' + (res.data[i].operatorType == "1" ? "联通" : (res.data[i].operatorType == "2" ? "移动":"电信")) + '</h4>' +
                 '                </div>' +
                 '                </div>' +
                 '                </span>' +
@@ -529,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('登录中....')
@@ -553,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

@@ -62,6 +62,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是否是一个非空数组

+ 10 - 10
src/views/monitor.vue

@@ -406,9 +406,9 @@ export default {
         })
       } else if (that.localMark == 'chuan') {
         //that.getSensorListByDeptId()
-        that.getMonitorDeviceAndDataList()
+        that.getMonitorDeviceAndDataList(that.deptId)
       } else if (that.localMark == 'la') {
-        that.getDlblistBydeptId()
+        that.getDlblistBydeptId(that.deptId)
       }
     },
     sheClick() {
@@ -431,7 +431,7 @@ export default {
       this.placeholderMsg = "请输入云广播名称";
       this.deptId = Cookies.get("deptId");
       clearInterval(this.cgqTimer);
-      this.getDlblistBydeptId();
+      this.getDlblistBydeptId(null);
     },
     chuanClick() {
       this.onLa = false
@@ -440,14 +440,14 @@ export default {
       this.localMark = 'chuan'
       this.placeholderMsg = "请输入传感器名称"
       this.deptId = Cookies.get("deptId")
-      this.getMonitorDeviceAndDataList()
+      this.getMonitorDeviceAndDataList(null)
       this.$refs.supermap.clearG();
     },
     // 云广播
-    getDlblistBydeptId() {
+    getDlblistBydeptId(deptId) {
       let that = this;
       let markersList = [];
-      getDlblistBydeptId(that.deptId).then(function (res) {
+      getDlblistBydeptId(deptId).then(function (res) {
         that.loudspeakerNum = res.data.length
         that.visuForestCloudCameraBOListSearch = []
         if (res.data != null && res.data.length > 0) {
@@ -533,7 +533,7 @@ export default {
     getDlblistBydeptIds() {
       let that = this;
 
-      getDlblistBydeptId(that.deptId).then(function (res) {
+      getDlblistBydeptId(null).then(function (res) {
         that.loudspeakerNum = res.data.length
       })
         .catch(function (error) {
@@ -544,15 +544,15 @@ export default {
       let that = this
       setInterval(function () {
 
-        that.getMonitorDeviceAndDataList()
+        that.getMonitorDeviceAndDataList(null)
 
       }, 20 * 1000)
     },
     //传感器2
-    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