limeng 2 лет назад
Родитель
Сommit
1cafdc885b

+ 9 - 4
src/components/supermap.vue

@@ -1333,9 +1333,15 @@
       /** -------------------------------图层地址(数组)  带数据图层---开始------------------------------- */
 			layerSwitchingList_Data: function(banCheckList) { //图层切换数组  urlList 图层地址(数组)  带数据图层
 				let that = this
-        that.initInfoView()
-        if (that.lbtThemeLayer != null) {
-          that.map.removeLayer(that.lbtThemeLayer);
+        that.initInfoView();
+        //清除图层,遍历图层多次清除
+        if(that.lbtThemeLayer != null){
+          that.map.eachLayer(function(layer){
+            if(layer.name == "lbtThemeLayer"){
+              that.map.removeLayer(that.lbtThemeLayer);
+            }
+            console.log(layer.name);
+          });
         }
         // 定义 Unique 单值专题图层
         that.lbtThemeLayer = window.L.supermap.uniqueThemeLayer("lbtThemeLayer", {
@@ -1413,7 +1419,6 @@
 				}
 			},
        lbtHighLightLayer :function(e){
-        console.log(e);
         if (e.target && e.target.refDataID) {
           var fea = this.lbtThemeLayer.getFeatureById(e.target.refDataID);
           if (fea) {

+ 5 - 0
src/components/vBottomMenu.vue

@@ -448,6 +448,11 @@ export default {
           name: '电视墙',
           icon: 'el-icon-s-grid',
           click: 'TVWall'
+        },
+        {
+          name: '无人机',
+          icon: 'iconfont sj-icon-landing',
+          click: 'wrj'
         }
       ],
       deptOptionsLiandong: [],

+ 290 - 0
src/components/wrj.vue

@@ -0,0 +1,290 @@
+<template>
+  <div>
+    <el-dialog title="无人机" customClass="TVWallCustomWidth" @close="cancelEventLocationShow()">
+      <div id="dom1" class="dom1"></div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+/** ----------------------------------摄像头预览开始------------------------------------- */
+import DHWs from '@/dahua/lib/DHWs'
+
+/** ----------------------------------摄像头预览结束------------------------------------- */
+export default {
+  dicts: ['event_source'],
+  components: {},
+  data() {
+    return {
+      TVWallVisible:false,
+      isShowTipe: true,
+    }
+  },
+  created() {
+    const DHWsInstance = DHWs.getInstance();
+    this.ws = DHWsInstance;
+  },
+  methods: {
+    cancelEventLocationShow() {
+      // this.activeName = 'tv'
+      this.TVWallVisible = false
+      this.destroy()
+
+      if (this.oWebControl != null) {
+        this.oWebControl.JS_HideWnd()   // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
+        this.oWebControl.JS_Disconnect().then(function() {  // 断开与插件服务连接成功
+          },
+          function() {  // 断开与插件服务连接失败
+          })
+      }
+    },
+    destroy() { // 调用销毁控件接口
+      if (!this.isLogin) {
+        this.$modal.msgWarning('正在登陆客户端,请稍等......')
+        return false
+      }
+      const ctrls = this.ws.ctrls.map(i => {
+        if (i.ctrlCode === this.ctrl) {
+          return i.ctrlCode
+        }
+      })
+      this.ws.destroyCtrl(ctrls)
+    },
+    showWrj() {
+      this.ws.addEventListener('connectStateChange', data => {
+        if (data) {
+          console.log('连接成功')
+        } else {
+          console.log('连接失败,下载客户端')
+          this.alertReinstall()
+          this.isShowTipe && this.$modal.confirm({
+            title: '下载客户端',
+            content: '检测到您未安装部分插件,将影响部分功能使用,请下载后使用?',
+            onOk: () => {
+              //这里写下载方法
+              this.isShowTipe = false
+            },
+            onCancel: () => {
+              this.isShowTipe = false
+            }
+          });
+        }
+      })
+      this.preview()
+      this.TVWallVisible = true
+    },
+    /** ----------------------------------大华摄像头预览开始------------------------------------- */
+    alertLogin: function() {
+      this.$modal.msg('登录中....')
+    },
+    alertLoginSuccess: function() {
+      this.$modal.msgSuccess('登录成功!')
+    },
+    alertLoginFailed: function() {
+      this.$modal.msgError('登陆失败!')
+    },
+    alertReinstall: function() {
+      this.$modal.msgWarning('请重新安装客户端')
+    },
+    /** 预览按钮操作 */
+    preview() {
+      //这里写 无人机预览方法
+      let channelCode = []
+      channelCode.push("22060100001320100001")
+      this.ws.detectConnectQt().then(res => {
+        if (res) { // 连接客户端成功
+          this.alertLogin()
+          this.ws.login({
+            loginIp: '211.141.61.228',
+            loginPort: 7902,
+            userName: 'system',
+            userPwd: 'Admin123',
+            token: '',
+            https: 1
+          })
+          this.ws.on('loginState', (res) => {
+            this.isLogin = res
+            console.log('---res-----', res)
+            if (res) {
+              this.alertLoginSuccess()
+              this.activePanel = 'key2'
+              this.realTimeVideoDialog(channelCode);
+            } else {
+              this.alertLoginFailed()
+            }
+          })
+        } else { // 连接客户端失败
+          this.alertReinstall()
+        }
+      })
+      /** 摄像头预览方法结束 **/
+    },
+    realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
+      if (!this.isLogin) {
+        this.$Message.info('正在登陆客户端,请稍等......')
+        return false
+      }
+      this.ws.openVideo(cameraParams)
+    },
+    /** ----------------------------------大华摄像头预览结束------------------------------------- */
+  }
+}
+</script>
+
+<style rel="stylesheet/scss" lang="scss" scoped>
+@import '@/assets/styles/base.scss';
+
+.event-info-con {
+  width: 100%;
+  display: flex;
+
+  .e-left {
+    width: 32%;
+  }
+
+  .e-center {
+    width: 30%;
+    margin-left: 1%;
+
+    .img-company {
+      width: 100%;
+      height: 18.3vh;
+
+      img {
+      }
+    }
+  }
+
+  .e-right {
+    margin-left: 1%;
+    width: 45%;
+  }
+
+  .e-location-left {
+    width: 28%;
+    margin-top: 1rem;
+  }
+
+  .e-location-right {
+    width: 71%;
+    margin-top: 1.3rem;
+    margin-left: 1rem;
+  }
+}
+
+.el-dialog:not(.is-fullscreen) {
+  margin-top: 5.5vh !important;
+}
+
+.bottom-menu-normal {
+  max-width: 90%;
+  padding: 0 3rem;
+  position: absolute;
+  left: 50%;
+  transform: translateX(-50%);
+  bottom: 0;
+  z-index: 100000;
+  border-radius: 5px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background: url(../assets/images/integrated/btm-menu.png) center no-repeat;
+  background-size: cover;
+  overflow: hidden;
+
+  .btm-m-con {
+    position: relative;
+    color: $inBlue;
+    font-size: .5rem;
+    padding: 1rem 1.5rem;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    -webkit-transform: translateY(0);
+    transform: translateY(0);
+    transition: all 0.2s ease-in-out;
+    cursor: pointer;
+    white-space: nowrap;
+
+    i {
+      font-size: 1rem;
+      color: $inBlue;
+      text-shadow: 0 0 10px rgba($color: $inBlue, $alpha: .6);
+      margin-right: 0.2rem;
+    }
+  }
+
+  .btm-m-con:hover {
+    text-shadow: 0 0 20px rgba($color: $inBlueHover, $alpha: 1.0);
+    filter: brightness(2.3);
+    -webkit-transform: translateX(0.2rem);
+    transform: translateX(0.2rem);
+    transition: all 0.2s ease-in-out;
+
+    i {
+      color: $inBlueHover;
+      text-shadow: 0 0 20px rgba($color: $inBlueHover, $alpha: 1.0);
+    }
+  }
+
+  .m-l-none {
+    .el-input__inner {
+      margin-left: 0 !important;
+    }
+  }
+
+}
+
+/*海康*/
+html, body {
+  padding: 0;
+  margin: 0;
+}
+
+.playWnd {
+  margin: -13px 0 0 255px;
+  width: 850px; /*播放容器的宽和高设定*/
+  height: 615px;
+  border: 1px solid red;
+}
+
+.operate {
+  margin-top: 24px;
+}
+
+.operate::after {
+  content: '';
+  display: block;
+  clear: both;
+}
+
+.module {
+  float: left;
+  width: 340px;
+  /*min-height: 320px;*/
+  margin-left: 16px;
+  padding: 16px 8px;
+  box-sizing: border-box;
+  border: 1px solid #e5e5e5;
+}
+
+.module .item {
+  margin-bottom: 4px;
+}
+
+.module input[type="text"] {
+  box-sizing: border-box;
+  display: inline-block;
+  vertical-align: middle;
+  margin-left: 0;
+  width: 150px;
+  min-height: 20px;
+}
+
+.module .btn {
+  min-width: 80px;
+  min-height: 24px;
+  margin-top: 100px;
+  margin-left: 80px;
+}
+</style>

+ 1 - 1
src/views/eventdetailsdialog.vue

@@ -192,7 +192,7 @@
                                   <el-button size="small"
                                              icon="el-icon-s-flag"
                                              @click="updateCentereventTEventcatalogueStatus('qs',false)">
-                                    签收
+                                    派发
                                   </el-button>
                                   <!--<el-button size="small"-->
                                              <!--icon="el-icon-question"-->

+ 15 - 6
src/views/forest.vue

@@ -428,6 +428,7 @@
                 @getSupermap="getSupermap"></firespread>
     <eventLocation ref="eventLocation"></eventLocation>
     <TVWall ref="TVWall"></TVWall>
+    <wrj ref="wrj"></wrj>
   </div>
 </template>
 
@@ -457,14 +458,13 @@
   import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
   import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
   import TVWall from '@/components/TVWall.vue' //电视墙弹窗
+  import wrj from '@/components/wrj.vue' //无人机
   import eventdetailsdialog from '@/views/eventdetailsdialog.vue' //事件详情弹窗
   import firespread from '@/views/firespread.vue' //事件详情弹窗
 
   /** ----------------------------------摄像头预览开始------------------------------------- */
-  import {
-    getDahuaVideoServer
-  } from '@/api/dahua/dahua'
-  // import DHWs from '@/dahua/lib/DHWs'
+  import { getDahuaVideoServer } from '@/api/dahua/dahua'
+  import DHWs from '@/dahua/lib/DHWs'
   import Firespread from "./firespread";
 
   /** ----------------------------------摄像头预览结束------------------------------------- */
@@ -480,6 +480,7 @@
       vBottomMenu,
       eventLocation,
       TVWall,
+      wrj,
       dateChoose,
       eventdetailsdialog,
       firespread
@@ -491,6 +492,8 @@
       window.choseLayerSwitchingList = this.choseLayerSwitchingList
       window.choseLayerSwitchingList_Data = this.choseLayerSwitchingList_Data
       /** ----------------------------------底部按钮公用组件结束------------------------------------- */
+      const DHWsInstance = DHWs.getInstance();
+      this.ws = DHWsInstance;
     },
     mounted() {
       this.getBaseInfo()
@@ -515,7 +518,7 @@
           this.getExposureStage(this.getCurrentDataStr(), true);
           this.getSupermap(this.getCurrentDataStr(), true);
         }
-      }, 10000)
+      }, 4000)
       this.bottomMenuList() //获取底部公共组件消息和任务
     },
     data() {
@@ -1215,7 +1218,13 @@
             this.$refs.bottomMenu.showChild = false
           }
         } else if (click == 'TVWall') {
-          this.$refs.TVWall.showTVWall()
+          this.$refs.TVWall.showTVWall();
+          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showChild = false
+          this.$refs.bottomMenu.showBanChild = false
+          this.$refs.bottomMenu.showChangChild = false
+        } else if (click == 'wrj') {
+          this.$refs.wrj.showWrj();
           this.$refs.supermap.isEditableLayers = false
           this.$refs.bottomMenu.showChild = false
           this.$refs.bottomMenu.showBanChild = false