Bläddra i källkod

数字交通事件流程修改

wang_xy 2 år sedan
förälder
incheckning
649df0856b

+ 1 - 0
src/api/components/supermap.js

@@ -49,6 +49,7 @@ export const iconList = {
   'sj-icon-map-qianshou': require('@/assets/icons/sj-icon-map/sj-icon-map-qianshou.png'),//签收
   'sj-icon-map-guidang': require('@/assets/icons/sj-icon-map/sj-icon-map-guidang.png'),//归档
   'sj-icon-map-banjie': require('@/assets/icons/sj-icon-map/sj-icon-map-banjie.png'),//办结
+  'sj-icon-map-queren': require('@/assets/icons/sj-icon-map/sj-icon-map-queren.png'),//确认
 
   //交通资源图标
   'traffic-resources-warning_sign': require('@/assets/icons/sj-icon-map/traffic-resources-warning_sign.png'),//警示牌

+ 8 - 0
src/api/system/config.js

@@ -58,3 +58,11 @@ export function refreshCache() {
     method: 'delete'
   })
 }
+
+//获取配置信息
+export function selectConfigKey(configKey) {
+  return request({
+    url: '/system/config/selectConfigKey/' + configKey,
+    method: 'get'
+  })
+}

BIN
src/assets/icons/sj-icon-map/sj-icon-map-queren.png


+ 72 - 65
src/components/TVWall.vue

@@ -2,28 +2,30 @@
   <div>
     <el-dialog title="电视墙" :visible.sync="TVWallVisible" v-if="TVWallVisible" customClass="TVWallCustomWidth"
                @close="cancelEventLocationShow()">
-	  <div class="forthis" style="width: 22%; position: absolute;left: 0;z-index: 9999999999999;">
-	  	<!-- <div class="this-title">
-	  		<span>林场</span>
-	  		<span>45</span>
-	  	</div> -->
-	  	<div class="i-list-con" style="height: 64vh; overflow-y: scroll;">
-	  		<span v-for="(item,index) in cameraList" :key="index">
-	  			<div class="d-l-con" @click="playhk(item.channelCode)">
-	  				<div class="d-l-l-text">
-	  					<i class="i-small"></i>
-	  					<h4>{{ item.cameraName }}</h4>
-	  				</div>
-	  			</div>
-	  		</span>
-	  	</div>
-	  </div>
-      <div style="width:70%;height:400px;position:absolute;">
-        <!--视频窗口展示---大华-->
-        <div id="dom1" class="dom1"></div>
-        <!--视频窗口展示---海康-->
-        <div id="playWnd" class="playWnd" style="left: 0px; top: 0px;"></div>
-      </div>
+	  <!--<div class="forthis" style="width: 22%; position: absolute;left: 0;z-index: 9999999999999;">-->
+	  	<!--&lt;!&ndash; <div class="this-title">-->
+	  		<!--<span>林场</span>-->
+	  		<!--<span>45</span>-->
+	  	<!--</div> &ndash;&gt;-->
+	  	<!--<div class="i-list-con" style="height: 46vh; overflow-y: scroll;">-->
+	  		<!--<span v-for="(item,index) in cameraList" :key="index">-->
+	  			<!--<div class="d-l-con" @click="playhk(item.channelCode)">-->
+	  				<!--<div class="d-l-l-text">-->
+	  					<!--<i class="i-small"></i>-->
+	  					<!--<h4>{{ item.cameraName }}</h4>-->
+	  				<!--</div>-->
+	  			<!--</div>-->
+	  		<!--</span>-->
+	  	<!--</div>-->
+	  <!--</div>-->
+      <!--<div style="width:70%;height:400px;position:absolute;">-->
+        <!--&lt;!&ndash;视频窗口展示-&#45;&#45;大华&ndash;&gt;-->
+        <!--<div id="dom1" class="dom1"></div>-->
+        <!--&lt;!&ndash;视频窗口展示-&#45;&#45;海康&ndash;&gt;-->
+        <!--<div id="playWnd" class="playWnd" style="left: 0px; top: 0px;"></div>-->
+      <!--</div>-->
+
+      <div id="dom1" class="dom1"></div>
     </el-dialog>
   </div>
 
@@ -32,7 +34,7 @@
 <script>
 /** ----------------------------------摄像头预览开始------------------------------------- */
 import { getDahuaVideoServer, getTVWallList } from '@/api/dahua/dahua'
-import { cameraTVHaiKangList } from '@/api/haikang/haikang'
+import { tvCameraList } from '@/api/haikang/haikang'
 import DHWs from '@/dahua/lib/DHWs'
 
 /** ----------------------------------摄像头预览结束------------------------------------- */
@@ -249,8 +251,8 @@ export default {
         }],
       crtPosX: 0,
       crtPosY: 0,
-      crtWidth: 740,
-      crtHeight: 400,
+      crtWidth: 1150,
+      crtHeight: 700,
       domId: 'dom1',
       mixedVideoDisplayMode: 2,
       isShowTipe: true,
@@ -262,12 +264,14 @@ export default {
     }
   },
   created() {
+    const DHWsInstance = DHWs.getInstance()
+    this.ws = DHWsInstance
   },
   methods: {
     cancelEventLocationShow() {
       // this.activeName = 'tv'
       this.TVWallVisible = false
-      // this.destroy()
+      this.destroy()
 
       if (this.oWebControl != null) {
         this.oWebControl.JS_HideWnd()   // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
@@ -278,40 +282,38 @@ export default {
       }
     },
     showTVWall() {
-      let that=this;
+      // let that=this;
       /** ----------------------------------大华摄像头预览开始------------------------------------- */
-      // const DHWsInstance = DHWs.getInstance()
-      // this.ws = DHWsInstance
-      // 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.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()
       /** ----------------------------------大华摄像头预览结束------------------------------------- */
       /** ----------------------------------海康摄像头预览开始------------------------------------- */
-      cameraTVHaiKangList().then(response => {
-        this.cameraList=response.data
-      })
-      that.initPlugin()
-      setTimeout(function() {
-        that.playhk();
-      }, 5000)
-      /** ----------------------------------海康摄像头预览结束------------------------------------- */
+      // tvCameraList().then(response => {
+      //   this.cameraList=response.data
+      // })
+      // that.initPlugin()
+      // setTimeout(function() {
+      //   that.playhk();
+      // }, 5000)
+      // /** ----------------------------------海康摄像头预览结束------------------------------------- */
       this.TVWallVisible = true
     },
     /** ----------------------------------大华摄像头预览开始------------------------------------- */
@@ -339,8 +341,12 @@ export default {
                 loginPort: newResponse.loginPort,
                 userName: newResponse.userName,
                 userPwd: newResponse.userPwd,
+                // loginIp: '192.168.100.100',
+                // loginPort: 8314,
+                // userName: 'system',
+                // userPwd: 'Admin@123',
                 token: '',
-                https: 1
+                https: 0
               })
               this.ws.on('loginState', (res) => {
                 this.isLogin = res
@@ -362,6 +368,7 @@ export default {
     },
 
     create(tvListJson) { // 调用创建控件接口
+      debugger
       let _this = this
       const params = [
         {
@@ -372,7 +379,7 @@ export default {
             'splitNum': 1,
             'channelList': [
               {
-                'channelId': '8ORBqXFlA1D77U45SM1ROC'
+                'channelId': ''
               }
             ]
           },
@@ -457,7 +464,7 @@ export default {
         },
         cbConnectError: function() { // 创建WebControl实例失败
           that.oWebControl = null
-          $('#playWnd').html('插件未启动,正在尝试启动,请稍候...')
+          $('#playWnd').html('插件未启动,正在尝试启动,请稍候...<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
           WebControl.JS_WakeUp('VideoWebPlugin://') // 程序未启动时执行error函数,采用wakeup来启动程序
           initCount++
           if (initCount < 3) {
@@ -465,7 +472,7 @@ export default {
               that.initPlugin()
             }, 3000)
           } else {
-            $('#playWnd').html('插件启动失败,请检查插件是否安装!')
+            $('#playWnd').html('插件启动失败,请检查插件是否安装!<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
           }
         },
         cbConnectClose: function(bNormalClose) {
@@ -481,11 +488,11 @@ export default {
       let that=this
       this.getPubKey(function() {
         ////////////////////////////////// 请自行修改以下变量值	////////////////////////////////////
-        var appkey = '22654202'                           //综合安防管理平台提供的appkey,必填
-        var secret = that.setEncrypt('d7HlmRIaiXp3MQBmsuUg')   //综合安防管理平台提供的secret,必填
-        var ip = '218.27.1.154'                           //综合安防管理平台IP地址,必填
+        var appkey = '24699060'                           //综合安防管理平台提供的appkey,必填
+        var secret = that.setEncrypt('tt1pMbsrlwGZUWucdAPw')   //综合安防管理平台提供的secret,必填
+        var ip = '36.49.108.22'                           //综合安防管理平台IP地址,必填
         var playMode = 0                                  //初始播放模式:0-预览,1-回放
-        var port = 54321                                    //综合安防管理平台端口,若启用HTTPS协议,默认443
+        var port = 1443                                    //综合安防管理平台端口,若启用HTTPS协议,默认443
         var snapDir = 'D:\\SnapDir'                       //抓图存储路径
         var videoDir = 'D:\\VideoDir'                     //紧急录像或录像剪辑存储路径
         var layout = '3x3'                                //playMode指定模式的布局

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 807 - 931
src/components/eventLocation.vue


+ 113 - 69
src/components/supermap.vue

@@ -19,7 +19,7 @@
     </div>
 
     <div id="toolbar-heat" v-if="isheatPlotting" class="panel panel-primary"
-         style="position:absolute;z-index: 9999; padding: 1rem; bottom:3rem;right: 1rem; border-radius: 4px; width: fit-content;height:635px;overflow-y:scroll;background:#040b1f">
+         style="position:absolute;z-index: 9999; padding: 1rem; bottom:3rem;right: 1rem; border-radius: 4px; width: fit-content;height:fit-content;overflow-y:scroll;background:#040b1f">
       <div class="panel-body content">
         <div class="panel">
           <div class="input-group">
@@ -39,13 +39,46 @@
         <div class="panel">
           <div class="input-group">
             <span class="input-group-addon">风速</span>
-            <input type="text" class="form-control" id="heatNums1" value="20"/>
+            <input type="text" class="form-control" id="heatNums1" value="6"/>
           </div>
         </div>
-        <div class="panel">
-          <el-button type="success" @click="createHeatPoints">标绘</el-button>
-          <el-button type="success" @click="clearHeatPoints">取消标绘</el-button>
-        </div>
+		<div class="panel">
+		  <div class="input-group">
+		    <span class="input-group-addon">温度</span>
+		    <input type="text" class="form-control" id="heatNums2" value="10℃"/>
+		  </div>
+		</div>
+		<div class="panel">
+		  <div class="input-group">
+		    <span class="input-group-addon">湿度</span>
+		    <input type="text" class="form-control" id="heatNums3" value="6%RH"/>
+		  </div>
+		</div>
+		<div class="panel">
+		  <div class="input-group">
+		    <span class="input-group-addon">持续时间</span>
+		    <input type="text" class="form-control" id="heatNums4" value="60分钟"/>
+		  </div>
+		</div>
+		<div class="panel">
+		<div class="input-group">
+		  <span class="input-group-addon">植被类型</span>
+		  <select class="form-control" style="width:auto" id="heatNums5">
+		    <option value="1">针叶林</option>
+		    <option value="31">落叶林</option>
+		  </select>
+		</div>
+		</div>
+		<div class="panel">
+		  <div class="input-group">
+		    <span class="input-group-addon">大气压</span>
+		    <input type="text" class="form-control" id="heatNums6" value="101.325kPa"/>
+		  </div>
+		</div>
+		<div class="panel">
+        <el-button type="success" @click="createHeatPoints">分析</el-button>
+        <el-button type="success" @click="clearHeatPoints">重置</el-button>
+		</div>
       </div>
     </div>
   </div>
@@ -65,6 +98,7 @@ import {
   getSuperMap,
   iconList
 } from '@/api/components/supermap.js'
+import { selectConfigKey } from "@/api/system/config";
 // import {setToken} from '../plugins/auth'
 import modal from '@/plugins/modal'
 
@@ -96,7 +130,8 @@ export default {
       heatMapLayer: [], //火灾蔓延图层Layer
       isheatPlotting: false,//火灾蔓延
       heat_lat: 0, //火灾蔓延经纬度
-      heat_lng: 0 //火灾蔓延经纬度
+      heat_lng: 0, //火灾蔓延经纬度
+      host:''
     }
   },
   watch: {
@@ -166,6 +201,7 @@ export default {
     }
   },
   mounted() {
+    this.getspuerMapHost()
     this.initMap()
     //添加画图的提示信息
     window.L.drawLocal.draw.toolbar = {
@@ -563,16 +599,16 @@ export default {
     },
     /** ----------------------------------火势蔓延  结束------------------------------------- */
     /** ----------------------------------热力图  结束------------------------------------- */
-    loadHeatMap: async function() {
+    loadHeatMap: async function(points) {
       var heatNumbers = 150, heatRadius = 30
       var num = parseInt(heatNumbers)
       num = (num > 0) ? num : 0
       var radius = parseInt(heatRadius)
       radius = (radius > 0) ? radius : 0
-      var heatPoints = []
-      for (var i = 0; i < num; i++) {
-        heatPoints[i] = [Math.random() * 0.28 + 42, Math.random() * 0.5 + 125, Math.random() * 80]
-      }
+      var heatPoints = points
+      // for (var i = 0; i < num; i++) {
+      //   heatPoints[i] = [Math.random() * 0.28 + 42, Math.random() * 0.5 + 125, Math.random() * 80]
+      // }
       var resultLayer = window.L.heatLayer(heatPoints, {
         radius: radius,
         minOpacity: 0.5
@@ -584,19 +620,19 @@ export default {
         if (this.isAggregationMyGroup != undefined && this.isAggregationMyGroup != false) {
           this.isAggregationMyGroup.clearLayers()
         }
-        this.map.removeLayer(this.isAggregationLayers)
-        this.isAggregationLayers = []
-        this.radiusLayers = []
-        this.isAggregationLayers = window.L.markerClusterGroup({
-          //设置为true时显示聚类所占据的范围
-          showCoverageOnHover: true,
-          //设置为true时会向低一级聚类缩放
-          zoomToBoundsOnClick: true,
-          //增加点位时增加聚合动画(否则会出问题)
-          animateAddingMarkers: true,
-          //最大缩放级别点击聚合图标展开图标
-          spiderfyOnMaxZoom: true
-        })
+          this.map.removeLayer(this.isAggregationLayers)
+          this.isAggregationLayers = []
+          this.radiusLayers = []
+          this.isAggregationLayers = window.L.markerClusterGroup({
+            //设置为true时显示聚类所占据的范围
+            showCoverageOnHover: true,
+            //设置为true时会向低一级聚类缩放
+            zoomToBoundsOnClick: true,
+            //增加点位时增加聚合动画(否则会出问题)
+            animateAddingMarkers: true,
+            //最大缩放级别点击聚合图标展开图标
+            spiderfyOnMaxZoom: true
+          })
       } else {
         if (this.myGroup != undefined && this.myGroup != false) {
           this.myGroup.clearLayers()
@@ -669,6 +705,7 @@ export default {
           return
         }
         getSuperMap(this.codes).then(resp => {
+
           let mapList = resp.data
           if (mapList != null && mapList.length > 0) {
             let url = mapList[0].url
@@ -1033,7 +1070,7 @@ export default {
         })
         let markerClick = window.L.marker([markersList[i].lat, markersList[i].lng], {
           icon: icon
-        })
+        }).addTo(this.map)
         if (markersList[i].bindPopupHtml != null && markersList[i].bindPopupHtml !== '') {
           let html = markersList[i].bindPopupHtml
           if (keepBindPopup) {
@@ -1187,13 +1224,13 @@ export default {
       }
     },
     dropLocation: function(lat, lng) { //落点定位
-
-      this.map.flyTo([lat, lng], 14, { duration: 2 })
-
-      // this.controlLevel(12)
-      // setTimeout(() => {
-      //   this.map.panTo([lat, lng])
-      // }, 1000)
+      this.map.flyTo([lat, lng], 13, { duration: 2 })
+    },
+    dropLocation10: function(lat, lng) { //落点定位
+      this.map.flyTo([lat, lng], 10, { duration: 2 })
+    },
+    dropLocation5: function(lat, lng) { //落点定位
+      this.map.flyTo([lat, lng], 5, { duration: 2 })
     },
     controlLevel: function(level) { //控制地图缩放级别
       this.map.setZoom(level)
@@ -1228,24 +1265,29 @@ export default {
     PlottingDrawCancel: function() {
       this.plottingdrawControl.handler.disable()
     },
+    getspuerMapHost(){
+      selectConfigKey('superMap.iserver.plot').then(res => {
+        this.host = res.data;
+      })
+    },
     dynamicPlotting: function() {
       setTimeout(() => {
-        var host = 'https://iserver.supermap.io'
-        var serverUrl = host + '/iserver/services/plot-jingyong/rest/plot/'
+          var host = this.host
+          var serverUrl = host + '/iserver/services/plot-jingyong/rest/plot/'
 
-        var me = this
-        this.plottingLayer = window.L.supermap.plotting.plottingLayer('plot',
-          serverUrl)
-        this.plottingLayer.spatialAnalystUrl =
-          host + '/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst'
-        this.plottingLayer.addTo(this.map)
-        this.plottingdrawControl = window.L.supermap.plotting.drawControl(this
-          .plottingLayer)
-        this.plottingdrawControl.addTo(this.map)
-        var editControl = window.L.supermap.plotting.editControl()
-        editControl.addTo(this.map)
-        window.L.supermap.plotting.initPlotPanel('plotPanel', serverUrl, this
-          .plottingdrawControl)
+          var me = this
+          this.plottingLayer = window.L.supermap.plotting.plottingLayer('plot',
+            serverUrl)
+          this.plottingLayer.spatialAnalystUrl =
+            host + '/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst'
+          this.plottingLayer.addTo(this.map)
+          this.plottingdrawControl = window.L.supermap.plotting.drawControl(this
+            .plottingLayer)
+          this.plottingdrawControl.addTo(this.map)
+          var editControl = window.L.supermap.plotting.editControl()
+          editControl.addTo(this.map)
+          window.L.supermap.plotting.initPlotPanel('plotPanel', serverUrl, this
+            .plottingdrawControl)
       }, 2000)
     }
     /** ----------------------------------动态绘制结束------------------------------------- */
@@ -1256,28 +1298,30 @@ export default {
 <style lang="scss" scoped>
 @import '@/assets/styles/base.scss';
 .panel{
-  margin-bottom: .5rem;
-  button{
-    margin-top: .5rem;
-  }
-  .input-group{
-    display: flex;
-    flex-direction: row;
-    align-items: center;
-    .input-group-addon{
-      color: $inBlue;
+	margin-bottom: .5rem;
+	button{
+		margin-top: .5rem;
+	}
+	.input-group{
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		.input-group-addon{
+			color: $inBlue;
+			width: 3rem;
+			text-align: right;
 
-    }
-    .form-control{
-      padding: 0 .3rem;
-      margin-left: .5rem;
-      height: 1.5rem;
-      line-height: 1.5rem;
-      background-color: #112543;
-      color: $inBlue;
-      border: 1px $searchBorder;
-    }
-  }
+		}
+		.form-control{
+			padding: 0 .3rem;
+			margin-left: .5rem;
+			height: 1.5rem;
+			line-height: 1.5rem;
+			background-color: #112543;
+			color: $inBlue;
+			border: 1px $searchBorder;
+		}
+	}
 }
 
 .button-group {

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1231 - 1264
src/components/vBottomMenu.vue


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1493 - 308
src/views/eventdetailsdialog.vue


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1187 - 511
src/views/forest.vue


+ 158 - 83
src/views/monitor.vue

@@ -26,6 +26,20 @@
                     <h5>{{ item.deviceName }}</h5>
                   </div>
                 </div>
+                <div class="icon-con w-33 m-btm-no">
+                  <div class="icon icon-dot"></div>
+                  <div class="icon-text">
+                    <h6>0</h6>
+                    <h5>传感器</h5>
+                  </div>
+                </div>
+                <div class="icon-con w-33 m-btm-no">
+                  <div class="icon icon-dot"></div>
+                  <div class="icon-text">
+                    <h6>0</h6>
+                    <h5>大喇叭</h5>
+                  </div>
+                </div>
               </div>
               <div class="overflow-y" style="height: 33vh;">
                 <el-collapse accordion>
@@ -59,7 +73,7 @@
       <!-- 右侧 -->
       <div class="rightbar" :class="indentright" ref="right">
         <div class="forthis">
-          <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;"><!--height: 750px;-->
+          <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
             <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
             <div class="this-title">
               <span>列表</span>
@@ -85,7 +99,7 @@
               <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
             </div>
             <div class="i-list-con h-25">
-              <div class="d-l-con" v-for="(item,index) in keyAreaList" @click="">
+              <div class="d-l-con" v-for="(item,index) in keyAreaList" :class="{on:listCurrentIndex3 == index}" @click="getRegionalFlag(item.id)">
                 <div class="d-l-l-text">
                   <i class="i-small"></i>
                   <h4>{{ item.areaName }}</h4>
@@ -96,10 +110,10 @@
         </div>
       </div>
       <vBottomMenu ref="bottomMenu"></vBottomMenu>
-      <el-tooltip :content="indentText" placement="top" :disabled="indentdisabled">
-        <div class="mascot" ref="mascot" :class="indentStyle" @click="indent"><img
-          src="@/assets/images/mascot.png"/></div>
-      </el-tooltip>
+<!--      <el-tooltip :content="indentText" placement="top" :disabled="indentdisabled">-->
+<!--        <div class="mascot" ref="mascot" :class="indentStyle" @click="indent"><img-->
+<!--          src="@/assets/images/mascot.png"/></div>-->
+<!--      </el-tooltip>-->
 
     </div>
     <eventLocation ref="eventLocation"></eventLocation>
@@ -118,7 +132,8 @@
 import {
   selectDeviceType,
   selectCameraByDeptId,
-  selectKeyAreaList
+  selectKeyAreaList,
+  getRegionalFlag
 } from '@/api/monitor'
 
 import supermap from '@/components/supermap' //超图
@@ -134,7 +149,7 @@ import {
 import {
   getHaiKangVideoServer
 } from '@/api/haikang/haikang'
-// import DHWs from '@/dahua/lib/DHWs'
+import DHWs from '@/dahua/lib/DHWs'
 
 /** ----------------------------------摄像头预览结束------------------------------------- */
   // import echarts from 'echarts'
@@ -150,8 +165,8 @@ export default {
   },
   created() {
     /** ----------------------------------摄像头预览开始------------------------------------- */
-    // const DHWsInstance = DHWs.getInstance()
-    // this.ws = DHWsInstance
+    const DHWsInstance = DHWs.getInstance()
+    this.ws = DHWsInstance
     /** ----------------------------------摄像头预览结束------------------------------------- */
 
     /** ----------------------------------底部按钮公用组件开始------------------------------------- */
@@ -161,7 +176,7 @@ export default {
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
   },
   mounted() {
-    this.selectDeviceType()
+    this.selectDeviceType(-1)
     this.selectKeyAreaList()
   },
   data() {
@@ -169,6 +184,8 @@ export default {
       iconCurrentIndex1: '-1',
       listCurrentIndex1: '-1',
       listCurrentIndex2: '-1',
+      listCurrentIndex3: '-1',
+      graphicsList:[],//重点区域
       /** ----------------------------------摄像头预览开始------------------------------------- */
       //大华
       activePanel: 'key1',
@@ -198,10 +215,43 @@ export default {
       indentleft: '',
       indentright: '',
       indentText: '收起左右栏',
-      indentdisabled: false
+      indentdisabled: false,
+      domId: 'dom1',
     }
   },
   methods: {
+    selectKeyAreaList() {
+      this.keyAreaList=[]
+      //获取重点区域列表
+      let that = this
+      selectKeyAreaList().then(res => {
+        that.keyAreaList = res.data
+      })
+    },
+    getRegionalFlag(id){
+      //获取重点区域
+      this.listCurrentIndex3=id
+      let that = this
+      getRegionalFlag(id).then(res => {
+        that.graphicsList=[]
+        //地图标记
+        if (res.data != null && res.data.length > 0) {
+          for (let i = 0; i < res.data.length; i++) {
+            let latlng = {
+              lat: res.data[i].lat,
+              lng: res.data[i].lng
+            }
+            that.graphicsList.push(latlng)
+          }
+          setTimeout(() => {
+            that.$refs.supermap.clearG()
+            that.$refs.supermap.setGraphicsList(this.graphicsList, 'red')
+          }, 1000)
+        } else {
+          that.$refs.supermap.clearG()
+        }
+      })
+    },
     /** ----------------------------------底部按钮公用组件开始------------------------------------- */
     showDialog(click) {
       if (click == 'eventLocation') {
@@ -296,7 +346,8 @@ export default {
         }],
         xAxis: {
           show: false,
-          type: 'value'
+          type: 'value',
+          left:10
         },
         yAxis: {
           type: 'category', // 不设置类目轴,抽离的dataset数据展示不出来
@@ -369,19 +420,12 @@ export default {
         }]
       })
     },
-    selectKeyAreaList() {
-      //获取重点区域
-      let that = this;
-      selectKeyAreaList().then(res => {
-        that.keyAreaList = res
-      })
-    },
     selectDeviceType(index) {
       this.iconCurrentIndex1 = index
       //获取左侧动态感知设备
       let that = this
       selectDeviceType().then(res => {
-
+        that.cameraMarkersList=[]
         that.visuForestCloudMapDeviceBOList = res.data.visuForestCloudMapDeviceBOList
 
         that.region = res.data.visuForestCloudTodaySjfbBOList
@@ -411,17 +455,16 @@ export default {
               keepBindPopup: false,
               isAggregation: false
             }
-            if (res.data.visuForestCloudCameraBOList.length > 50) {
-              markersMap.isAggregation = true
-            }
             if (res.data.visuForestCloudCameraBOList[i].channelCode != null) {
-              markersMap.parameter = res.data.visuForestCloudCameraBOList[i].cameraCode
+              markersMap.parameter = {code:res.data.visuForestCloudCameraBOList[i].cameraCode,
+                type:res.data.visuForestCloudCameraBOList[i].cameraFactory}
             } else {
               markersMap.parameter = []
             }
 
             markersMap.lng = res.data.visuForestCloudCameraBOList[i].longitude
             markersMap.lat = res.data.visuForestCloudCameraBOList[i].latitude
+            markersMap.radius = res.data.visuForestCloudCameraBOList[i].cameraRadius
             markersMap.bindPopupHtml = '<div class="map-tip">' +
               '<span>' +
               '                  <div class="d-l-con">' +
@@ -439,6 +482,22 @@ export default {
               '                </div>' +
               '                </div>' +
               '                </span>' +
+              '<span>' +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              '                  <h4>摄像头类型:' + res.data.visuForestCloudCameraBOList[i]
+                .cameraFactory + '</h4>' +
+              '                </div>' +
+              '                </div>' +
+              '                </span>' +
+              '<span>' +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              '                  <h4>摄像头半径:' + res.data.visuForestCloudCameraBOList[i]
+                .cameraRadius + '米</h4>' +
+              '                </div>' +
+              '                </div>' +
+              '                </span>' +
               '</div>'
             this.cameraMarkersList.push(markersMap)
             //   cameraAccount: "1"
@@ -461,7 +520,7 @@ export default {
           setTimeout(() => {
             that.$refs.supermap.clearM(true)
             that.$refs.supermap.clearM(false)
-            that.$refs.supermap.setMarkers(this.cameraMarkersList)
+            that.$refs.supermap.setMarkersRadius(this.cameraMarkersList)
           }, 1000)
         }
       })
@@ -474,12 +533,10 @@ export default {
       this.listCurrentIndex1 = depId
       let that = this
       that.cameraMarkersList = []
-
       that.visuForestCloudCameraBOList = []
       selectCameraByDeptId(depId).then(res => {
         //根据设备类型查看列表
         that.visuForestCloudCameraBOList = res.data
-
         if (res.data != null && res.data.length > 0) {
           for (let i = 0; i < res.data.length; i++) {
             let markersMap = {
@@ -492,17 +549,16 @@ export default {
               keepBindPopup: false,
               isAggregation: false
             }
-            if (res.data.length > 50) {
-              markersMap.isAggregation = true
-            }
             if (res.data[i].channelCode != null) {
-              markersMap.parameter = res.data[i].cameraCode
+              markersMap.parameter = {code:res.data.data[i].cameraCode,
+                type:res.data.data[i].cameraFactory}
             } else {
               markersMap.parameter = []
             }
 
             markersMap.lng = res.data[i].longitude
             markersMap.lat = res.data[i].latitude
+            markersMap.radius = res.data[i].cameraRadius
             markersMap.bindPopupHtml = '<div class="map-tip">' +
               '<span>' +
               '                  <div class="d-l-con">' +
@@ -519,6 +575,22 @@ export default {
               '                </div>' +
               '                </div>' +
               '                </span>' +
+              '<span>' +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              '                  <h4>摄像头类型:' + res.data[i]
+                .cameraFactory + '</h4>' +
+              '                </div>' +
+              '                </div>' +
+              '                </span>' +
+              '<span>' +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              '                  <h4>摄像头半径:' + res.data[i]
+                .cameraRadius + '米</h4>' +
+              '                </div>' +
+              '                </div>' +
+              '                </span>' +
               '</div>'
             this.cameraMarkersList.push(markersMap)
             //   cameraAccount: "1"
@@ -541,7 +613,7 @@ export default {
           setTimeout(() => {
             that.$refs.supermap.clearM(true)
             that.$refs.supermap.clearM(false)
-            that.$refs.supermap.setMarkers(this.cameraMarkersList)
+            that.$refs.supermap.setMarkersRadius(this.cameraMarkersList)
           }, 1000)
         }
       })
@@ -585,45 +657,48 @@ export default {
       }
     },
     /** 预览按钮操作 */
-    preview(cameraCode) {
-      let that = this
-      // 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(channelCode)
-      //         } else {
-      //           this.alertLoginFailed()
-      //         }
-      //       })
-      //     } else { // 连接客户端失败
-      //       this.alertReinstall()
-      //     }
-      //   })
-      // })
-      that.cameraVisible = true
-      getHaiKangVideoServer({cameraCode:cameraCode}).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)
-      })
+    preview(cameraParam) {
+      if(cameraParam.type=='大华'){
+        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=='海康'){
+        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)
+        })
+      }
 
     },
     realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
@@ -631,7 +706,8 @@ export default {
         this.$Message.info('正在登陆客户端,请稍等......')
         return false
       }
-      this.ws.openVideo(cameraParams)
+      const params = [cameraParams];
+      this.ws.openVideo(params)
     },
     /** ----------------------------------摄像头预览结束------------------------------------- */
 
@@ -661,7 +737,7 @@ export default {
         },
         cbConnectError: function() { // 创建WebControl实例失败
           that.oWebControl = null
-          $('#playWnd').html('插件未启动,正在尝试启动,请稍候...')
+          $('#playWnd').html('插件未启动,正在尝试启动,请稍候...<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
           WebControl.JS_WakeUp('VideoWebPlugin://') // 程序未启动时执行error函数,采用wakeup来启动程序
           initCount++
           if (initCount < 3) {
@@ -669,7 +745,7 @@ export default {
               that.initPlugin(newappkey,newloginIp,newsecret,newloginPort)
             }, 3000)
           } else {
-            $('#playWnd').html('插件启动失败,请检查插件是否安装!')
+            $('#playWnd').html('插件启动失败,请检查插件是否安装!<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
           }
         },
         cbConnectClose: function(bNormalClose) {
@@ -778,14 +854,13 @@ function cbIntegrationCallBack(oData) {
 </script>
 
 
-
 <style rel="stylesheet/scss" lang="scss" scoped>
-  @import '@/assets/styles/base.scss';
+@import '@/assets/styles/base.scss';
 
-  .playWnd {
-    margin: 4px 0 0 8px;
-    width: 1020px; /*播放容器的宽和高设定*/
-    height: 600px;
-    border: 1px solid red;
-  }
+.playWnd {
+  margin: 4px 0 0 8px;
+  width: 1020px; /*播放容器的宽和高设定*/
+  height: 600px;
+  border: 1px solid red;
+}
 </style>