浏览代码

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

# Conflicts:
#	src/components/v-fastmenu.vue
#	src/views/eventdetailsdialog.vue
#	src/views/forest.vue
limeng 2 年之前
父节点
当前提交
49f1fededf

+ 2 - 2
.env.development

@@ -1,10 +1,10 @@
 # 页面标题
-VUE_APP_TITLE = 首佳态势感知平台
+VUE_APP_TITLE = 四平市态势感知平台
 
 # 开发环境配置
 ENV = 'development'
 
-# 首佳态势感知平台/开发环境
+# 四平市态势感知平台/开发环境
 VUE_APP_BASE_API = '/dev-api'
 
 # 路由懒加载

+ 2 - 2
.env.production

@@ -1,8 +1,8 @@
 # 页面标题
-VUE_APP_TITLE = 若依管理系统
+VUE_APP_TITLE = 四平市态势感知平台
 
 # 生产环境配置
 ENV = 'production'
 
-# 若依管理系统/生产环境
+# 四平市态势感知平台/生产环境
 VUE_APP_BASE_API = '/prod-api'

+ 2 - 2
.env.staging

@@ -1,10 +1,10 @@
 # 页面标题
-VUE_APP_TITLE = 若依管理系统
+VUE_APP_TITLE = 四平市态势感知平台
 
 NODE_ENV = production
 
 # 测试环境配置
 ENV = 'staging'
 
-# 若依管理系统/测试环境
+# 四平市态势感知平台/测试环境
 VUE_APP_BASE_API = '/stage-api'

+ 2 - 2
package.json

@@ -1,7 +1,7 @@
 {
   "name": "ruoyi",
   "version": "3.4.0",
-  "description": "若依管理系统",
+  "description": "四平市态势感知平台",
   "author": "若依",
   "license": "MIT",
   "scripts": {
@@ -50,7 +50,7 @@
     "html2canvas": "^1.4.1",
     "js-beautify": "1.13.0",
     "js-cookie": "3.0.1",
-    "jsencrypt": "3.2.1",
+    "jsencrypt": "^3.2.1",
     "lib-flexible": "^0.3.2",
     "nprogress": "0.2.0",
     "quill": "1.3.7",

+ 113 - 28
public/index.html

@@ -1,14 +1,14 @@
 <!DOCTYPE html>
 <html>
-  <head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="renderer" content="webkit">
-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
-    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <title><%= webpackConfig.name %></title>
-    <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
-	  <style>
+<head>
+  <meta charset="utf-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+  <meta name="renderer" content="webkit">
+  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+  <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+  <title><%= webpackConfig.name %></title>
+  <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
+  <style>
     html,
     body,
     #app {
@@ -193,27 +193,112 @@
       color: #FFF;
       opacity: 0.5;
     }
+    .loading {
+      width: 40px;
+      height: 40px;
+      margin: 0 auto;
+      position: relative;
+      top: 40%;
+      position: relative;
+      -webkit-animation: load 1.5s linear infinite;
+    }
+
+    .loading div {
+      width: 100%;
+      height: 100%;
+      position: absolute;
+    }
+
+    .loading span {
+      display: inline-block;
+      width: 20px;
+      height: 20px;
+      border-radius: 50%;
+      background: #99CC66;
+      position: absolute;
+      left: 50%;
+      margin-top: -10px;
+      margin-left: -10px;
+      -webkit-animation: changeBgColor 3s ease infinite;
+    }
+
+    @-webkit-keyframes load {
+      0% {
+        -webkit-transform: rotate(0deg);
+      }
+      33.3% {
+        -webkit-transform: rotate(120deg);
+      }
+      66.6% {
+        -webkit-transform: rotate(240deg);
+      }
+      100% {
+        -webkit-transform: rotate(360deg);
+      }
+    }
+
+    @-webkit-keyframes changeBgColor {
+      0%, 100% {
+        background: #2db2cc;
+      }
+      33.3% {
+        background: #FFFF66;
+      }
+      66.6% {
+        background: #FF6666;
+      }
+    }
+
+    .loading div:nth-child(2) {
+      -webkit-transform: rotate(120deg);
+    }
+
+    .loading div:nth-child(3) {
+      -webkit-transform: rotate(240deg);
+    }
+
+    .loading div:nth-child(2) span {
+      -webkit-animation-delay: 1s;
+    }
+
+    .loading div:nth-child(3) span {
+      -webkit-animation-delay: 2s;
+    }
+
   </style>
-  </head>
-  <body>
+</head>
+<body>
+<!--三个必要的js文件引入-->
+<!--<script src="./hk/jquery-1.12.4.min.js"></script>-->
+<script src="hk/jsencrypt.min.js"></script>            <!-- 用于RSA加密 -->
+<script src="hk/jsWebControl-1.0.0.min.js"></script>   <!-- 用于前端与插件交互 -->
+<!--<script src="h5player/h5player.min.js"></script>-->
+
+
+
 <!--  <link rel="stylesheet" href="./supermap/libs/plotting/leaflet/10.2.1/iclient-plot-leaflet.css">-->
-<script type="text/javascript" include="leaflet,leaflet.sidebyside,iclient-leaflet,iclient-plot-leaflet,leaflet.draw,leaflet.markercluster,leaflet.heat" src="./supermap/dist/leaflet/include-leaflet.js"></script>
+<script type="text/javascript"
+        include="leaflet,leaflet.sidebyside,iclient-leaflet,iclient-plot-leaflet,leaflet.draw,leaflet.markercluster,leaflet.heat"
+        src="./supermap/dist/leaflet/include-leaflet.js"></script>
+<script type="text/javascript" include="bootstrap,plottingPanel,fileupLoad,widgets.alert"
+        src="./supermap/examples/js/include-web.js"></script>
 <!--  <script type="text/javascript" include="iclient-classic" src="./supermap/dist/classic/include-classic.js"></script>-->
 <!--  <script type="text/javascript" src="./supermap/libs/plotting/leaflet/10.2.1/iclient-plot-leaflet-es6.min.js"></script>-->
-  <script type="text/javascript" include="PlotPanel,StylePanel,SMLInfosPanel,iPortalStylePanel" src="./supermap/examples/js/plottingPanel/PlottingPanel.Include.js"></script>
-
-<!--三个必要的js文件引入-->
-<script src="./hk/jquery-1.12.4.min.js"></script>
-<script src="./hk/jsencrypt.min.js"></script>            <!-- 用于RSA加密 -->
-<script src="./hk/jsWebControl-1.0.0.min.js"></script>   <!-- 用于前端与插件交互 -->
-
-    <div id="app">
-	    <div id="loader-wrapper">
-		    <div id="loader"></div>
-		    <div class="loader-section section-left"></div>
-		    <div class="loader-section section-right"></div>
-		    <div class="load_title">正在加载系统资源,请耐心等待</div>
-        </div>
-	</div>
-  </body>
+<script type="text/javascript" include="PlotPanel,StylePanel,SMLInfosPanel,iPortalStylePanel"
+        src="./supermap/examples/js/plottingPanel/PlottingPanel.Include.js"></script>
+<div id="app">
+  <div class="loading">
+    <div><span></span></div>
+    <div><span></span></div>
+    <div><span></span></div>
+  </div>
+  <div style="top: 48%; position: absolute; left: 50%; transform: translateX(-50%);">正在努力加载中,请稍候...</div>
+  <!--<div id="loader-wrapper">-->
+  <!--<div id="loader"></div>-->
+  <!--<div class="loader-section section-left"></div>-->
+  <!--<div class="loader-section section-right"></div>-->
+  <!--<div class="load_title">正在加载系统资源,请耐心等待</div>-->
+  <!--</div>-->
+</div>
+</body>
 </html>

+ 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/encrypt.js

@@ -0,0 +1,8 @@
+import { JSEncrypt } from 'jsencrypt'
+
+export function encryptedData(publicKey,password){
+  const encryptor = new JSEncrypt()
+  encryptor.setPublicKey(publicKey)
+  return encryptor.encrypt(password+'')
+}
+

+ 5 - 2
src/api/event.js

@@ -62,10 +62,13 @@ export function getImgUrl(data) {
 }
 
 //获取附近事件
-export function getNearEvent(longitude,latitude) {
+export function getNearEvent(longitude, latitude, day, loading, eventTypeIdDl, eventTypeId) {
   return request({
-    url: '/center-traffic/traffic/getNearEvent?longitude='+latitude+"&latitude="+latitude,
+    url: '/center-traffic/traffic/getNearEvent?longitude=' + longitude + "&latitude=" + latitude + "&day=" + day + "&eventTypeIdDl=" + eventTypeIdDl + "&eventTypeId=" + eventTypeId,
     method: 'get',
+    headers: {
+      loading: loading
+    },
   })
 }
 //获取附近摄像头

+ 65 - 5
src/api/forest.js

@@ -1,5 +1,20 @@
 import request from '@/utils/request'
 
+// 获取绑定的事件类型
+export function getMenuEventType() {
+  return request({
+    url: '/center-traffic/traffic/getMenuEventType',
+    method: 'get',
+  })
+}
+// 获取事件详情
+export function getEventPush(param) {
+  return request({
+    url: '/center-traffic/traffic/getEventPush',
+    method: 'post',
+    data: param
+  })
+}
 // 左侧获取部门信息
 export function getBaseInfo() {
   return request({
@@ -15,6 +30,14 @@ export function getTodayEvents(param) {
     data: param
   })
 }
+//右侧获取曝光台
+export function getExposureStage(param) {
+  return request({
+    url: '/center-traffic/traffic/getExposureStage',
+    method: 'post',
+    data: param
+  })
+}
 // 左侧获取事件部门数量
 export function getDeptEventCount(param) {
   return request({
@@ -32,11 +55,14 @@ export function getWeather(param) {
   })
 }
 // 右侧获取事件列表
-export function getEventList(param) {
+export function getEventList(param,loading) {
   return request({
     url: '/center-traffic/traffic/getEventList',
     method: 'post',
-    data: param
+    data: param,
+    headers: {
+      loading: loading
+    },
   })
 }
 // 获取事件详情
@@ -57,11 +83,14 @@ export function getEventByCalendar(param) {
 }
 
 // 获取事件分类
-export function getEventByEventType(param) {
+export function getEventByEventType(param,loading) {
   return request({
     url: '/center-traffic/traffic/getEventByEventType',
     method: 'post',
-    data: param
+    data: param,
+    headers: {
+      loading: loading
+    },
   })
 }
 
@@ -135,10 +164,41 @@ export function listYuAn() {
   })
 }
 
-// 事件短信联系人
+// 事件短信联系人(没用)
 export function userFeginlist() {
   return request({
     url: '/center-fire/VisuForestCloudMapController/userFeginlist',
     method: 'post'
   })
 }
+
+// 获取消息个数
+export function selectMessageCount(userId) {
+  return request({
+    url: '/center-message/centerMessageFeign/selectMessageCount/'+userId,
+    method: 'get'
+  })
+}
+// 获取消息列表
+export function selectMessageList(userId) {
+  return request({
+    url: '/center-message/centerMessageFeign/selectMessageList/'+userId,
+    method: 'get'
+  })
+}
+// 获取消息详情
+export function selectMessageById(messageId) {
+  return request({
+    url: '/center-message/centerMessageFeign/selectMessageById/'+messageId,
+    method: 'get'
+  })
+}
+
+// 事件处置
+export function eventHandling(id,eventCode) {
+  return request({
+    url: '/center-traffic/traffic/eventHandling',
+    method: 'post',
+    data: {id:id,eventCode:eventCode,dataStatus:"1"}
+  })
+}

+ 20 - 9
src/api/leader.js

@@ -3,29 +3,40 @@ import request from '@/utils/request'
 // 获取左侧
 export function getRy() {
   return request({
-    url: '/center-agriculture/fire/getRy',
+    url: '/center-traffic/traffic/getRy',
     method: 'post',
   })
 }
 
 // 获取左侧人员列表
-export function getForestLeader(linJob,linType) {
+export function getTrafficLeader(linJob,linType) {
   return request({
-    url: '/center-agriculture/VisuForestLeaderController/getForestLeader?linJob='+linJob+"&linType="+linType,
+    url: '/center-traffic/traffic/getTrafficLeader?linJob='+linJob+"&linType="+linType,
     method: 'get',
   })
 }
-// 点击左侧人员列表获取轨迹
-export function getLeaderTrack(trackById) {
+
+// 巡林任务
+export function getPlanList(userId) {
   return request({
-    url: '/center-agriculture/VisuForestLeaderController/getLeaderTrack?trackById='+trackById,
+    url: '/center-data/task/getPlanList',
+    method: 'post',
+    data: {userId:userId,type:'3'}
+  })
+}
+
+// 巡林记录
+export function getRecordList(taskId) {
+  return request({
+    url: '/center-data/record/list?taskId='+taskId,
     method: 'get',
   })
 }
-// 巡林计划
-export function getPlanList(trackById) {
+
+// 巡林轨迹
+export function getPointList(recordId) {
   return request({
-    url: '/center-agriculture/VisuForestLeaderController/getPlanList',
+    url: '/center-data/track/getTrack/'+recordId.toString(),
     method: 'get',
   })
 }

+ 19 - 1
src/api/login.js

@@ -1,5 +1,15 @@
 import request from '@/utils/request'
 
+// 获取密码加密传输公钥
+export function getSecretKey() {
+  return request({
+    url: '/auth/getSecretKey',
+    headers: {
+      isToken: false
+    },
+    method: 'post'
+  })
+}
 // 登录方法
 export function login(username, password, code, uuid) {
   return request({
@@ -58,4 +68,12 @@ export function getCodeImg() {
     method: 'get',
     timeout: 20000
   })
-}
+}
+
+//获取登录页基本信息
+export function fontConfig() {
+  return request({
+    url: '/system/fontConfig/getSysFontConfig/Traffic',
+    method: 'get',
+  })
+}

+ 25 - 0
src/api/meeting.js

@@ -0,0 +1,25 @@
+import request from '@/utils/request'
+
+// 查询该事件是否有会议
+export function hasConferences(eventId) {
+  return request({
+    url: '/center-event/hwMeeting/hasConferences?eventId=' + eventId,
+    method: 'post'
+  })
+}
+
+// 根据事件ID和标题创建会议
+export function createConferences(eventId, subject) {
+  return request({
+    url: '/center-event/hwMeeting/createConferences?eventId='+eventId+'&subject='+subject,
+    method: 'post'
+  })
+}
+
+// 获取登录人信息
+export function getUserInfo() {
+  return request({
+    url: '/center-event/hwMeeting/getUserInfo',
+    method: 'get'
+  })
+}

+ 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'
+  })
+}

二进制
src/assets/icons/sj-icon-map/sj-icon-map-queren.png


二进制
src/assets/images/bell.gif


二进制
src/assets/jingbao.mp3


+ 71 - 64
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,6 +341,10 @@ 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
               })
@@ -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指定模式的布局

文件差异内容过多而无法显示
+ 957 - 932
src/components/eventLocation.vue


+ 69 - 0
src/components/star.vue

@@ -0,0 +1,69 @@
+<template>
+  <div class="stars">
+    <div class="star" v-for="(item, index) in starsCount" :key="index" ref="star"></div>
+  </div>
+</template>
+ 
+<script>
+ 
+export default {
+  name: 'StarBackground',
+  props: {},
+  data() {
+    return {
+      starsCount: 1500,
+      distance: 1000
+    }
+  },
+  mounted() {
+    this.initStars()
+  },
+  methods: {
+    initStars() {
+      let starArr = this.$refs.star
+      starArr.forEach(item => {
+        let speed = 0.2 + (Math.random() * 1)
+        let thisDistance = this.distance + (Math.random() * 300)
+        item.style.transformOrigin = `0 0 ${thisDistance}px`
+        item.style.transform = `translate3d(0, 0, -${thisDistance}px) rotateY(${(Math.random() * 360)}deg) rotateX(${(Math.random() * -50)}deg) scale(${speed}, ${speed})`
+      })
+    }
+  }
+}
+</script>
+ 
+<style scoped lang="scss">
+@keyframes rotate {
+  0% {
+    transform: perspective(600px) rotateZ(20deg) rotateX(-40deg) rotateY(0);
+  }
+  100% {
+    transform: perspective(600px) rotateZ(20deg) rotateX(-40deg) rotateY(-360deg);
+  }
+}
+ 
+.stars {
+  transform: perspective(500px);
+  transform-style: preserve-3d;
+  position: absolute;
+  perspective-origin: 50% 100%;
+  left: 50%;
+  animation: rotate 90s infinite linear;
+  bottom: -200px;
+}
+ 
+.star {
+  width: 3px;
+  height: 2px;
+  background: #39ffe8;
+  position: absolute;
+  top: 0;
+  left: 0;
+  backface-visibility: hidden;
+  border-radius: 2px;
+  box-shadow: 0 0 5px rgba($color: #00f6ff, $alpha: 1);
+  // box-shadow: 0 0 5px rgba(81, 203, 238, 1);
+  // -webkit-box-shadow: 0 0 5px rgba(81, 203, 238, 1);
+  // -moz-box-shadow: 0 0 5px rgba(81, 203, 238, 1);
+}
+</style>

+ 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 })
     },
     dropLocation: function(lat, lng,leve) { //落点定位
       this.map.flyTo([lat, lng], leve, {
@@ -1233,24 +1270,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)
     }
     /** ----------------------------------动态绘制结束------------------------------------- */
@@ -1261,28 +1303,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 {

+ 24 - 14
src/components/v-fastmenu.vue

@@ -22,7 +22,7 @@
 						<el-button type="primary" size="small" @click="resetPwd">修改密码</el-button>
 						<el-button type="warning" size="small" @click="logout">退出登录</el-button>
 					</div>
-					<a href="http://117.78.49.164:15001/index58" style="border-top: 1px solid #334780;"><i class="el-icon-s-home"></i>返回首页</a>
+          <el-link type="primary" @click="backToMainPage" style="border-top: 1px solid #334780;" icon="el-icon-s-home">返回首页</el-link>
 <!--					<a href="#"><i class="el-icon-monitor"></i>管理系统</a>-->
 				</div>
 				<div slot="reference" style="text-align: center; width:4rem;height:3rem;">
@@ -37,10 +37,10 @@
 </template>
 
 <script>
-import { selectConfigKey } from "@/api/system/config";
-import Cookies from 'js-cookie';
 import resetPwd from "../views/system/user/profile/resetPwd";
 import { getUserProfile } from "@/api/system/user";
+import { selectConfigKey } from "@/api/system/config";
+import Cookies from 'js-cookie';
 	export default {
     components: {resetPwd },
 		data() {
@@ -50,20 +50,39 @@ import { getUserProfile } from "@/api/system/user";
         isResetPwd: false,
         nickName:null,
         deptNames:null,
-        phonenumber:null
+        phonenumber:null,
+				// fastMenu: [{
+				// 		name: '返回首页',
+				// 		path: '/',
+				// 		icon: 'el-icon-s-home',
+				// 		// msValue: 1
+				// 	},
+				// 	{
+				// 		name: '管理端',
+				// 		path: '/',
+				// 		icon: 'sj-icon-rwzx',
+				// 		// msValue: 2
+				// 	},
+				// ],
+
 			}
 		},
     created() {
       this.getUser()
     },
 		methods: {
+      backToMainPage(){
+        selectConfigKey('backToMainPage').then(res => {
+          window.location.href = res.data;
+        })
+      },
       getUser(){
         getUserProfile().then(response => {
           this.nickName=response.data.nickName
           this.deptNames=response.data.deptNames
           this.phonenumber=response.data.phonenumber
+          this.userId=response.data.userId
           Cookies.set('userId',response.data.userId);
-          Cookies.set('nickName',response.data.nickName);
         });
       },
       resetPwd(){
@@ -74,15 +93,6 @@ import { getUserProfile } from "@/api/system/user";
           this.isResetPwd=true
         });
       },
-			backToMainPage() {
-				let href = window.location.href
-				let protacal = href.substr(0, href.indexOf("://") + 3)
-				let mo = href.lastIndexOf(":") > 6 ? href.lastIndexOf(":") : href.lastIndexOf("/")
-				let ip = href.substr(href.indexOf("://") + 3, mo);
-				let url = href.substr(0, mo)
-				let toUrl = url + ":15001/index58"
-				window.location.href = toUrl
-			},
       async logout() {
         this.$confirm('确定注销并退出系统吗?', '提示', {
           confirmButtonText: '确定',

+ 16 - 2
src/components/v-header.vue

@@ -5,7 +5,7 @@
 		<!--中间LOGO -->
 		<a class="title" href="/integrated/index" >
 			<!-- <img src="@/assets/images/integrated/bigdata-header-nav-left2.png" /> -->
-			<h3><img class="logo" src="@/assets/images/integrated/logo-small.png" />通榆县乡村振兴监管平台 {{titlename}}
+			<h3><img class="logo" src="@/assets/images/integrated/logo-small.png" />{{systemTitle.title}} {{titlename}}
 			</h3>
 			<!-- <img src="@/assets/images/integrated/bigdata-header-nav-right2.png" /> -->
 		</a>
@@ -28,6 +28,11 @@
 	import {constantRoutes} from '@/router/index'//navbar导航引用了router路由的数组
 	import Clock from '@/components/clock.vue' // 时钟+天气
 	import VfastMenu from '@/components/v-fastmenu.vue' // 头部右侧菜单
+  import {
+    fontConfig
+  } from '@/api/login'
+
+
 	export default{
 		components:{
 			VfastMenu,
@@ -35,14 +40,23 @@
 
 		},
 		created(){
+      this.fontConfig()
 			this.navbar
 		},
 		data(){
 			return{
-
+        systemTitle:{
+          title:'',  //标题
+          subTitle:''  ,//副标题 数字交通
+        },
 			}
 		},
 		methods:{
+      fontConfig(){
+        fontConfig().then(res => {
+          this.systemTitle.title = res.data.fontTitle;
+        })
+      },
 		},
 		computed:{
 			titlename(){

文件差异内容过多而无法显示
+ 1180 - 1115
src/components/vBottomMenu.vue


+ 1 - 1
src/layout/components/Sidebar/Logo.vue

@@ -35,7 +35,7 @@ export default {
   },
   data() {
     return {
-      title: '若依管理系统',
+      title: '四平市态势感知平台',
       logo: logoImg
     }
   }

+ 23 - 23
src/router/index.js

@@ -31,22 +31,22 @@ import Layout from '@/layout'
 // 公共路由(可视化首页头部链接)
 export const constantRoutes = [{
 		path: '/',
-		redirect: 'traffic',
+		redirect: 'forest',
 	},
 	{
-		//林业中心
-		path: '/traffic',
-		name: 'traffic',
-		component: () => import('@/views/traffic'),
+		//交通云图
+		path: '/forest',
+		name: 'forest',
+		component: () => import('@/views/forest'),
 		meta: {
 			title: '交通云图'
 		}
 	},
 	{
-		//数据中心
-		path: '/',
-		name: 'datacenter',
-		component: () => import('@/views/datacenter'),
+		//交通人员
+		path: '/leader',
+		name: 'leader',
+		component: () => import('@/views/leader'),
 		meta: {
 			title: '交通人员'
 		}
@@ -75,26 +75,26 @@ export const constantRoutes = [{
 // 公共路由
 export const constantRoutesNew = [{
 		path: '/',
-		redirect: 'traffic',
+		redirect: 'forest',
 	},
 	{
 		//林业中心
-		path: '/traffic',
-		name: 'traffic',
-		component: () => import('@/views/traffic'),
+		path: '/forest',
+		name: 'forest',
+		component: () => import('@/views/forest'),
 		meta: {
 			title: '交通云图'
 		}
 	},
-	{
-		//数据中心
-		path: '/',
-		name: 'datacenter',
-		component: () => import('@/views/datacenter'),
-		meta: {
-			title: '交通人员'
-		}
-	},
+  {
+    //交通人员
+    path: '/leader',
+    name: 'leader',
+    component: () => import('@/views/leader'),
+    meta: {
+      title: '交通人员'
+    }
+  },
 	{
 		//交通资源
 		path: '/resources',
@@ -138,7 +138,7 @@ export const constantRoutesNew = [{
 		redirect: 'index',
 		children: [{
 			path: 'forest',
-			component: () => import('@/views/traffic'),
+			component: () => import('@/views/forest'),
 			name: 'forest',
 			meta: {
 				title: '首页',

+ 1 - 0
src/store/getters.js

@@ -7,6 +7,7 @@ const getters = {
   token: state => state.user.token,
   avatar: state => state.user.avatar,
   name: state => state.user.name,
+  userId: state => state.user.id,
   introduction: state => state.user.introduction,
   roles: state => state.user.roles,
   permissions: state => state.user.permissions,

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

@@ -5,6 +5,7 @@ const user = {
   state: {
     token: getToken(),
     name: '',
+    userId: '',
     avatar: '',
     roles: [],
     permissions: []
@@ -28,6 +29,9 @@ const user = {
     },
     SET_PERMISSIONS: (state, permissions) => {
       state.permissions = permissions
+    },
+    SET_USERID: (state, userId) => {
+      state.userId = userId
     }
   },
 
@@ -65,6 +69,7 @@ const user = {
             commit('SET_ROLES', ['ROLE_DEFAULT'])
           }
           commit('SET_NAME', user.userName)
+          commit('SET_USERID', user.id)
           commit('SET_AVATAR', avatar)
           resolve(res)
         }).catch(error => {

+ 3 - 1
src/utils/request.js

@@ -25,7 +25,9 @@ const service = axios.create({
 
 // request拦截器
 service.interceptors.request.use(config => {
-  downloadLoadingInstance = Loading.service({ text: "请稍候...", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
+  if(config.headers.loading == undefined){
+    downloadLoadingInstance = Loading.service({ text: "请稍候...", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
+  }
   // 是否需要设置 token
   const isToken = (config.headers || {}).isToken === false
   // 是否需要防止数据重复提交

+ 3 - 3
src/views/animal.vue

@@ -70,7 +70,7 @@
                 <img src="@/assets/images/visual/img-sample.png" class="event-list-img animal-img">
                 <div class="event-list-text">
                   <h3>{{ item.eventTitle }}</h3>
-                  <h4><span>摄像头</span><span>新上报</span><span>{{ item.reportTime }}</span>
+                  <h4><span>摄像头</span><span>新上报</span><span>{{ item.createTime }}</span>
                   </h4>
                 </div>
               </div>
@@ -295,7 +295,7 @@ export default {
               '<span>' +
               '                  <div class="d-l-con">' +
               '                  <div class="d-l-l-text">' +
-              '                  <h4>事件时间:' + res.data.visuForestVgdEventBOList[i].reportTime +
+              '                  <h4>事件时间:' + res.data.visuForestVgdEventBOList[i].createTime +
               '</h4>' +
               '                </div>' +
               '                </div>' +
@@ -365,7 +365,7 @@ export default {
               '<span>' +
               '                  <div class="d-l-con">' +
               '                  <div class="d-l-l-text">' +
-              '                  <h4>事件时间:' + res.data.visuForestVgdEventBOList[i].reportTime +
+              '                  <h4>事件时间:' + res.data.visuForestVgdEventBOList[i].createTime +
               '</h4>' +
               '                </div>' +
               '                </div>' +

+ 64 - 62
src/views/bigdata/bigdata.vue

@@ -5,7 +5,7 @@
 		<div class="header">
 			<!-- title -->
 			<router-link class="header-left"  to="/integrated/index"  exact><img class="logo" src="@/assets/images/integrated/logo-small.png" />
-				<h3 class="title">通榆县乡村振兴监管平台</h3></router-link>
+				<h3 class="title">{{systemTitle.title}}-{{systemTitle.subTitle}}-统计分析</h3></router-link>
 			<div class="bignav">
 				<img src="@/assets/images/integrated/bigdata-header-nav-left.png" />
 				<router-link v-for="(navbar,index) in navbar " :key="index" :to="navbar.path" class="bignav-list" exact>
@@ -52,9 +52,9 @@
           <div class="twins">
             <div class="count">
               <div class="count-z m-l-15">事件总数<span>{{total}}</span></div>
-              <div class="count-z m-l-15">上报<span> {{escalation}}</span></div>
               <div class="count-z m-l-15">签收<span> {{signIn}}</span></div>
               <div class="count-z m-l-15">办结<span> {{conclude}}</span></div>
+              <div class="count-z m-l-15">归档<span> {{file}}</span></div>
             </div>
             <chartEvent ref="chartEvent"></chartEvent>
           </div>
@@ -122,6 +122,9 @@
   import bigdataSupermap from '@/components/supermap' //超图
 
   import {initPieChartData,eventcatalogueBigData,deptBigData} from '@/api/bigdata/bigdata';
+  import {
+    fontConfig
+  } from '@/api/login'
 
 	export default {
 		components: {
@@ -139,29 +142,33 @@
       bigdataSupermap,
 		},
     created() {
+      this.fontConfig()
       this.eventcatalogueBigData();
-      this.initPieChartData();
     },
     mounted() {
       setTimeout(() => {
         this.$refs.bigdataSupermap.loadHeatMap()//事件分布
-      }, 5000)
+      }, 1000)
     },
 		data() {
 			return {
+        systemTitle:{
+          title:'',  //标题
+          subTitle:''  ,//副标题 数字交通
+        },
 				visited: '',
 				navbar: [
 				  {
 						name: '交通云图',
-						path: '/traffic',
+						path: '/forest',
 					},
 					{
 						name: '交通人员',
-						path: '/',
+						path: '/leader',
 					},
 					{
 						name: '交通资源',
-						path: '/',
+						path: '/resources',
 					},
 					{
 						name: '统计分析',
@@ -169,7 +176,7 @@
 					},
 				],
         total: 0, //事件总数
-        escalation:0,// 事件-上报
+        file:0,// 事件-归档
         signIn:0,// 事件-签收
         conclude:0,// 事件-办结
 
@@ -178,69 +185,64 @@
 			}
 		},
     methods: {
+      fontConfig(){
+        fontConfig().then(res => {
+          this.systemTitle.title = res.data.fontTitle;
+          this.systemTitle.subTitle = res.data.subTitle;
+        })
+      },
       /**饼图 统计*/
       initPieChartData() {
-        let param_dlls = {type:"80"};
-        let param_gcc = {type:"82"};
-        let param_dc = {type:"83"};
-        let param_cs = {type:"84"};
-        let param_pm = {type:"85"};
-        let param_yx = {type:"86"};
-        let param_jtsg = {type:"87"};
-        let param_lz = {type:"88"};
-        let param_sg = {type:"89"};
-        /**道路晾晒预警事件占比**/
-        initPieChartData(param_dlls).then(res => {
-          this.$refs.chartPit_dlls.myEcharts(res.data);
-        }),
-        /**工程车预警事件占比**/
-        initPieChartData(param_gcc).then(res => {
-          this.$refs.chartPit_gcc.myEcharts(res.data);
-        }),
-        /**倒车预警事件占比**/
-        initPieChartData(param_dc).then(res => {
-          this.$refs.chartPit_dc.myEcharts(res.data);
-        }),
-        /**超速预警事件占比**/
-        initPieChartData(param_cs).then(res => {
-          this.$refs.chartPit_cs.myEcharts(res.data);
-        }),
-        /**抛瞄预警事件占比**/
-        initPieChartData(param_pm).then(res => {
-          this.$refs.chartPit_pm.myEcharts(res.data);
-        }),
-        /**压线预警事件占比**/
-        initPieChartData(param_yx).then(res => {
-          this.$refs.chartPit_yx.myEcharts(res.data);
-        }),
-        /**交通事故预警事件占比**/
-        initPieChartData(param_jtsg).then(res => {
-          this.$refs.chartPit_jtsg.myEcharts(res.data);
-        }),
-        /**路障预警事件占比**/
-        initPieChartData(param_lz).then(res => {
-          this.$refs.chartPit_lz.myEcharts(res.data);
-        }),
-        /**施工预警事件占比**/
-        initPieChartData(param_sg).then(res => {
-          this.$refs.chartPit_sg.myEcharts(res.data);
+        initPieChartData({}).then(res => {
+          for (let i in res.data) {
+            const seriesData = [];
+            seriesData.push({value: this.total, name: '事件总量'});
+            if (res.data[i].id == '80') {
+              seriesData.push(res.data[i]);
+              this.$refs.chartPit_dlls.myEcharts(seriesData);
+            }else if (res.data[i].id == '82') {
+              seriesData.push(res.data[i]);
+              this.$refs.chartPit_gcc.myEcharts(seriesData);
+            }else if (res.data[i].id == '83') {
+              seriesData.push(res.data[i]);
+              this.$refs.chartPit_dc.myEcharts(seriesData);
+            }else if (res.data[i].id == '84') {
+              seriesData.push(res.data[i]);
+              this.$refs.chartPit_cs.myEcharts(seriesData);
+            }else if (res.data[i].id == '85') {
+              seriesData.push(res.data[i]);
+              this.$refs.chartPit_pm.myEcharts(seriesData);
+            }else if (res.data[i].id == '86') {
+              seriesData.push(res.data[i]);
+              this.$refs.chartPit_yx.myEcharts(seriesData);
+            }else if (res.data[i].id == '87') {
+              seriesData.push(res.data[i]);
+              this.$refs.chartPit_jtsg.myEcharts(seriesData);
+            }else if (res.data[i].id == '88') {
+              seriesData.push(res.data[i]);
+              this.$refs.chartPit_lz.myEcharts(seriesData);
+            }else if (res.data[i].id == '89') {
+              seriesData.push(res.data[i]);
+              this.$refs.chartPit_sg.myEcharts(seriesData);
+            }
+          }
         })
       },
       /**事件类型、分布统计*/
       eventcatalogueBigData() {
         eventcatalogueBigData().then(res => {
-          console.log(res.data);
-          for (let index in res.data) {
-            this.total+=parseInt(res.data[index].value);
-            if(res.data[index].dictValue == 'forest_event_status_1'){
-              this.escalation=res.data[index].value;
-            }else if(res.data[index].dictValue == 'forest_event_status_2'){
-              this.signIn=res.data[index].value;
-            }else if(res.data[index].dictValue == 'forest_event_status_5'){
-              this.conclude=res.data[index].value;
+          this.total = res.data.total;
+          for (let index in res.data.list) {
+            if(res.data.list[index].dictValue == 'forest_event_status_2'){
+              this.signIn=res.data.list[index].value;
+            }else if(res.data.list[index].dictValue == 'forest_event_status_5'){
+              this.conclude=res.data.list[index].value;
+            }else if(res.data.list[index].dictValue == 'forest_event_status_6'){
+              this.file=res.data.list[index].value;
             }
           }
-          this.$refs.chartEvent.myEcharts(res.data);
+          this.$refs.chartEvent.myEcharts(res.data.list);
+          this.initPieChartData();
         })
         deptBigData().then(res => {
           this.$refs.chartEvent.myEcharts2(res.data);

+ 10 - 10
src/views/event.vue

@@ -495,7 +495,7 @@
 				deptName: '',
 				eventStatus: '',
 				cameraId: '',
-				reportTime: '',
+				createTime: '',
 				reportAddress: '',
 				eventCode: null,
 				eventSource: '',
@@ -704,12 +704,12 @@
 					let data = res.data
 					that.id = data.id;
 					that.cameraId = data.reportById
-					that.reportTime = data.reportTime
+					that.createTime = data.createTime
 					that.reportAddress = data.reportAddress
 					that.eventCode = data.eventCode
 					that.eventSource = data.eventSource
 					that.information[0].content = data.eventTitle
-					that.information[1].content = data.reportTime
+					that.information[1].content = data.createTime
 					that.information[2].content = that.selectDictLabel(that.dict.type.event_source, data
 						.eventSource)
 					that.information[3].content = data.longitude
@@ -1002,12 +1002,12 @@
 					let that = this
 					this.eventSource = data.eventSource
 					this.id = data.id;
-					this.reportTime = data.reportTime
+					this.createTime = data.createTime
 					this.cameraId = data.reportById
 					this.reportAddress = data.reportAddress
 					this.eventCode = data.eventCode
 					this.information[0].content = data.eventTitle
-					this.information[1].content = data.reportTime
+					this.information[1].content = data.createTime
 					this.information[2].content = that.selectDictLabel(that.dict.type.event_source, data
 						.eventSource)
 					this.information[3].content = data.longitude
@@ -1123,7 +1123,7 @@
 								'<span>' +
 								'                  <div class="d-l-con">' +
 								'                  <div class="d-l-l-text">' +
-								'                  <h4>事件时间:' + res.data.eventListAll[i].reportTime + '</h4>' +
+								'                  <h4>事件时间:' + res.data.eventListAll[i].createTime + '</h4>' +
 								'                </div>' +
 								'                </div>' +
 								'                </span>' +
@@ -1200,7 +1200,7 @@
 								'<span>' +
 								'                  <div class="d-l-con">' +
 								'                  <div class="d-l-l-text">' +
-								'                  <h4>事件时间:' + res.data.eventList[i].reportTime + '</h4>' +
+								'                  <h4>事件时间:' + res.data.eventList[i].createTime + '</h4>' +
 								'                </div>' +
 								'                </div>' +
 								'                </span>' +
@@ -1277,7 +1277,7 @@
 								'<span>' +
 								'                  <div class="d-l-con">' +
 								'                  <div class="d-l-l-text">' +
-								'                  <h4>事件时间:' + res.data.eventList[i].reportTime + '</h4>' +
+								'                  <h4>事件时间:' + res.data.eventList[i].createTime + '</h4>' +
 								'                </div>' +
 								'                </div>' +
 								'                </span>' +
@@ -1344,7 +1344,7 @@
 								'<span>' +
 								'                  <div class="d-l-con">' +
 								'                  <div class="d-l-l-text">' +
-								'                  <h4>事件时间:' + res.data.eventList[i].reportTime + '</h4>' +
+								'                  <h4>事件时间:' + res.data.eventList[i].createTime + '</h4>' +
 								'                </div>' +
 								'                </div>' +
 								'                </span>' +
@@ -1411,7 +1411,7 @@
 								'<span>' +
 								'                  <div class="d-l-con">' +
 								'                  <div class="d-l-l-text">' +
-								'                  <h4>事件时间:' + res.data.eventList[i].reportTime + '</h4>' +
+								'                  <h4>事件时间:' + res.data.eventList[i].createTime + '</h4>' +
 								'                </div>' +
 								'                </div>' +
 								'                </span>' +

文件差异内容过多而无法显示
+ 1530 - 332
src/views/eventdetailsdialog.vue


+ 113 - 0
src/views/findUserByDept.vue

@@ -0,0 +1,113 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="姓名" prop="nickName">
+        <el-input
+          v-model="queryParams.nickName"
+          placeholder="姓名"
+        />
+      </el-form-item>
+      <el-form-item label="手机号" prop="phonenumber">
+        <el-input
+          v-model="queryParams.phonenumber"
+          placeholder="手机号"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="getList">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="addSelection">确认</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-table v-loading="loading" :data="userList"  @selection-change="handleSelectionChange">
+      <el-table-column align="center" type="selection" width="60"></el-table-column>
+      <el-table-column label="姓名" align="center" prop="nickName"></el-table-column>
+      <el-table-column label="岗位" align="center" prop="postName" width="150"></el-table-column>
+      <el-table-column label="手机号" align="center" prop="phonenumber"></el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+  import {userFeginlist} from "@/api/forest";
+
+  export default {
+    name: "findUserByDept",
+    data() {
+      return {
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: false,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 可视化前端配置表表格数据
+        userList: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 查询参数
+        queryParams: {
+          deptId: null,
+          nickName:null,
+          phonenumber:null
+        },
+        // 表单参数
+        form: {},
+        resUser:[],
+      };
+    },
+    props: {
+      deptId: {
+        type: String,
+        required: true
+      },
+    },
+    created() {
+      this.queryParams.deptId = this.deptId;
+      this.getList();
+    },
+    methods: {
+      /** 查询可视化前端配置表列表 */
+      getList() {
+        this.loading = true;
+        userFeginlist(this.queryParams).then(response => {
+          this.userList = response.data;
+          this.loading = false;
+        });
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.queryParams.nickName=null;
+        this.queryParams.phonenumber=null;
+        this.getList();
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.resUser = [];
+        for (let i in selection){
+          const res = {};
+          res.id = '';
+          res.dept = '';
+          res.depteventId = '';
+          res.name = selection[i].nickName;
+          res.post = selection[i].postName;
+          res.telphone = selection[i].phonenumber;
+          this.resUser.push(res);
+        }
+      },
+      //数据提交到父页
+      addSelection(){
+        this.$emit("addSelection",this.resUser);
+      }
+    }
+  };
+</script>

文件差异内容过多而无法显示
+ 2596 - 0
src/views/firespread.vue


文件差异内容过多而无法显示
+ 937 - 273
src/views/forest.vue


+ 165 - 0
src/views/from/dvCapsuleChart.vue

@@ -0,0 +1,165 @@
+<template>
+  <div class="dv-capsule-chart">
+    <template v-if="mergedConfig">
+      <div class="label-column">
+        <div v-for="item in mergedConfig.data" :key="item.name" style="cursor: pointer" @click="getEventList(item)">
+          {{ item.name }}
+        </div>
+        <div>&nbsp;</div>
+      </div>
+      <div class="capsule-container">
+        <div class="capsule-item" v-for="(capsule, index) in capsuleLength" :key="index" style="cursor: pointer" @click="getEventList(mergedConfig.data[index])">
+          <div
+            class="capsule-item-column"
+            :style="`width: ${capsule * 100}%; background-color: ${mergedConfig.colors[index % mergedConfig.colors.length]};`"
+          >
+            <div
+              v-if="mergedConfig.showValue"
+              class="capsule-item-value"
+            >{{ capsuleValue[index] }}
+            </div>
+          </div>
+        </div>
+
+        <div class="unit-label">
+          <div
+            v-for="(label, index) in labelData"
+            :key="label + index"
+          >{{ label }}
+          </div>
+        </div>
+      </div>
+
+      <div class="unit-text" v-if="mergedConfig.unit">{{ mergedConfig.unit }}</div>
+    </template>
+  </div>
+</template>
+
+<script>
+import {deepMerge} from '@jiaminghi/charts/lib/util/index'
+
+import {deepClone} from '@jiaminghi/c-render/lib/plugin/util'
+
+export default {
+  name: 'DvCapsuleChart',
+  props: {
+    config: {
+      type: Object,
+      default: () => ({})
+    }
+  },
+  data() {
+    return {
+      defaultConfig: {
+        /**
+         * @description Capsule chart data
+         * @type {Array<Object>}
+         * @default data = []
+         * @example data = [{ name: 'foo1', value: 100 }, { name: 'foo2', value: 100 }]
+         */
+        data: [],
+        /**
+         * @description Colors (hex|rgb|rgba|color keywords)
+         * @type {Array<String>}
+         * @default color = ['#37a2da', '#32c5e9', '#67e0e3', '#9fe6b8', '#ffdb5c', '#ff9f7f', '#fb7293']
+         * @example color = ['#000', 'rgb(0, 0, 0)', 'rgba(0, 0, 0, 1)', 'red']
+         */
+        colors: [
+          '#37a2da',
+          '#32c5e9',
+          '#67e0e3',
+          '#9fe6b8',
+          '#ffdb5c',
+          '#ff9f7f',
+          '#fb7293'
+        ],
+        /**
+         * @description Chart unit
+         * @type {String}
+         * @default unit = ''
+         */
+        unit: '',
+        /**
+         * @description Show item value
+         * @type {Boolean}
+         * @default showValue = false
+         */
+        showValue: false
+      },
+
+      mergedConfig: null,
+
+      capsuleLength: [],
+      capsuleValue: [],
+      labelData: [],
+      labelDataLength: []
+    }
+  },
+  watch: {
+    config() {
+      const {calcData} = this
+      calcData()
+    }
+  },
+  methods: {
+    getEventList(val) {
+      debugger
+      let args = {eventTypeIdDl: [], eventTypeId: []}
+      if (val.id != '0') {
+        args.eventTypeIdDl.push(-1)
+        args.eventTypeId.push(val.id)
+      } else {
+        args.eventTypeIdDl.push(val.parentId)
+        args.eventTypeId.push(-1)
+      }
+      this.$emit('setEventTypeId', args)
+
+    },
+    calcData() {
+      const {mergeConfig, calcCapsuleLengthAndLabelData} = this
+
+      mergeConfig()
+
+      calcCapsuleLengthAndLabelData()
+    },
+    mergeConfig() {
+      let {config, defaultConfig} = this
+
+      this.mergedConfig = deepMerge(
+        deepClone(defaultConfig, true),
+        config || {}
+      )
+    },
+    calcCapsuleLengthAndLabelData() {
+      const {data} = this.mergedConfig
+
+      if (!data.length) return
+
+      const capsuleValue = data.map(({value}) => value)
+
+      const maxValue = Math.max(...capsuleValue)
+
+      this.capsuleValue = capsuleValue
+
+      this.capsuleLength = capsuleValue.map(v => (maxValue ? v / maxValue : 0))
+
+      const oneFifth = maxValue / 5
+
+      const labelData = Array.from(
+        new Set(new Array(6).fill(0).map((v, i) => Math.ceil(i * oneFifth)))
+      )
+
+      this.labelData = labelData
+
+      this.labelDataLength = Array.from(labelData).map(v =>
+        maxValue ? v / maxValue : 0
+      )
+    }
+  },
+  mounted() {
+    const {calcData} = this
+
+    calcData()
+  }
+}
+</script>

+ 466 - 357
src/views/leader.vue

@@ -1,390 +1,499 @@
 <template>
-  <div class="visual-con">
-    <!--头部-->
-    <vheader></vheader>
-    <!--主体-->
-    <div class="visual-body">
-      <!-- 左侧 -->
-      <div class="leftbar" :class="indentleft" ref="left">
-        <div class="forthis">
-          <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>
-              <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
-            </div>
-            <div class="i-list-con h-25">
-              <div id="personnel-chart" style="width: 100%;height:12vh;"></div>
-              <div class="d-l-con-icon">
-                <div class="icon-con w-50" :class="{on:iconCurrentIndex1==item.jobValue}"
-                     v-for="(item,index) in visuForestCloudRYBO"
-                     @click="getForestLeader(item.jobValue,item.jobType)">
-                  <div class="icon icon-mid el-icon-user"></div>
-                  <div class="icon-text">
-                    <h5>{{ item.job }}</h5>
-                    <h6>{{ item.number }}</h6>
-                  </div>
-                </div>
-                <!-- <div class="icon-con w-50  m-btm-no" :class="{on:listCurrentIndex1==item.jobType}" v-for="(item,index) in visuForestCloudRYBO" v-if="index%2!=0" @click="getForestLeader(item.jobValue,item.jobType)">
+	<div class="visual-con">
+		<!--头部-->
+		<vheader></vheader>
+		<!--主体-->
+		<div class="visual-body">
+			<!-- 左侧 -->
+			<div class="leftbar" :class="indentleft" ref="left">
+				<div class="forthis">
+					<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>
+							<dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
+						</div>
+						<div class="i-list-con h-25">
+							<div id="personnel-chart" style="width: 100%;height:12vh;"></div>
+							<div class="d-l-con-icon">
+								<div class="icon-con w-50" :class="{on:iconCurrentIndex1==item.jobValue}"
+									v-for="(item,index) in visuForestCloudRYBO"
+									@click="getTrafficLeader(item.jobValue,item.jobType)">
+									<div class="icon icon-mid el-icon-user"></div>
+									<div class="icon-text">
+										<h5>{{ item.job }}</h5>
+										<h6>{{ item.number }}</h6>
+									</div>
+								</div>
+								<!-- <div class="icon-con w-50  m-btm-no" :class="{on:listCurrentIndex1==item.jobType}" v-for="(item,index) in visuForestCloudRYBO" v-if="index%2!=0" @click="getTrafficLeader(item.jobValue,item.jobType)">
                 <div class="icon icon-mid el-icon-user"></div>
                 <div class="icon-text">
                   <h5>{{item.job}}</h5>
                   <h6>{{item.number}}</h6>
                 </div>
               </div> -->
-              </div>
-            </div>
-          </dv-border-box-13>
-        </div>
-        <!--        avatar: ""-->
-        <!--        deptName: "锦程社区第一网格"-->
-        <!--        nickName: "李猛"-->
-        <!--        userId: 102-->
-        <!--        userName: "limeng"-->
-        <div class="forthis">
-          <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="i-list-con h-27">
-              <div class="d-l-con-icon">
-                <div class="icon-con" :class="{on:listCurrentIndex1==item.userId}"
-                     v-for="(item,index) in peopleList" @click="getLeaderTrack(item.userId)">
-                  <div class="icon icon-mid el-icon-user"></div>
-                  <div class="icon-text personnel-name">
-                    <h6>{{ item.nickName }}</h6>
-                    <h5>{{ item.deptName }}</h5>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </dv-border-box-13>
-        </div>
-      </div>
-      <!-- 地图 -->
-      <supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'forestMap'" class="indexSupermapClass"
-                :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"></supermap>
-      <!-- 右侧 -->
-      <div class="rightbar" :class="indentright" ref="right">
-        <div class="forthis">
-          <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>
-              <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
-            </div>
-            <div class="i-list-con h-73">
-
-              <div class="h-19 overflow-y">
-                <div class="d-l-con" :class="{on:listCurrentIndex2==item.planName}"
+							</div>
+						</div>
+					</dv-border-box-13>
+				</div>
+				<!--        avatar: ""-->
+				<!--        deptName: "锦程社区第一网格"-->
+				<!--        nickName: "李猛"-->
+				<!--        userId: 102-->
+				<!--        userName: "limeng"-->
+				<div class="forthis">
+					<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="i-list-con h-27">
+							<div class="d-l-con-icon">
+								<div class="icon-con" :class="{on:listCurrentIndex1==item.userId}"
+									v-for="(item,index) in peopleList" @click="getPlanList(item.userId)">
+									<div class="icon icon-mid el-icon-user"></div>
+									<div class="icon-text personnel-name">
+										<h6>{{ item.nickName }}</h6>
+										<h5>{{ item.deptName }}</h5>
+									</div>
+								</div>
+							</div>
+						</div>
+					</dv-border-box-13>
+				</div>
+			</div>
+			<!-- 地图 -->
+			<supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'forestMap'" class="indexSupermapClass"
+				:mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"></supermap>
+			<!-- 右侧 -->
+			<div class="rightbar" :class="indentright" ref="right">
+				<div class="forthis">
+					<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>
+							<dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
+						</div>
+						<div class="i-list-con h-73">
+							<div class="h-73 overflow-y">
+                <el-collapse accordion>
+                  <el-collapse-item v-for="(item,index) in xunLinListOne">
+                    <template slot="title">
+                      <div class="d-l-con sj-collapse"
+                           @click="getRecordList(item.id, item.patrolTrajectory)">
+                        <div class="d-l-l-text">
+                          <el-tooltip class="item" effect="dark" placement="left"
+                                      style="width:10rem ;" :disabled="(item.taskName.length <= 20)">
+                            <div slot="content">
+                              <h4 class="collapse-title" style="width: 200px;">
+                                {{ item.taskName}}</h4>
+                            </div>
+                            <h4 class="collapse-title" style="width: 100px;">
+                              {{ item.taskName | ellipsis20}}</h4>
+                          </el-tooltip>
+                        </div>
+                        <div class="d-l-l-count">({{ item.recordCount }}/{{ item.planCount }})
+                        </div>
+                      </div>
+                    </template>
+                    <div class="d-l-con this-child sj-collapse" @click="getPointList(child.id)"
+                         v-for="(child,index) in recordList">
+                      <div class="d-l-l-text">
+                        <h4>{{child.beginTime}} - {{child.endTime}}</h4>
+                      </div>
+                      <!--<div class="d-l-l-count">{{index}}</div>-->
+                    </div>
+                    <div class="d-l-con this-child sj-collapse"
+                         v-if="showNothing && (recordList == null || recordList == '' || recordList == [])">
+                      <div class="d-l-l-text">
+                        <h4 class="text-gray">暂无信息</h4>
+                      </div>
+                    </div>
+                  </el-collapse-item>
+                </el-collapse>
+								<!--<div class="d-l-con" :class="{on:listCurrentIndex2==item.planName}"
                      v-for="(item,index) in xunLinListOne"
                      @click="setConnectList(item.planLine,item.planName)">
                   <div class="d-l-l-text">
                     <i class="i-small"></i>
                     <h4>{{ item.planName }}</h4>
                   </div>
-                </div>
-              </div>
-            </div>
-          </dv-border-box-13>
-        </div>
+                </div>-->
+							</div>
+						</div>
+					</dv-border-box-13>
+				</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>
-    </div>
-    <eventLocation ref="eventLocation"></eventLocation>
-    <TVWall ref="TVWall"></TVWall>
-  </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>-->
+		</div>
+		<eventLocation ref="eventLocation"></eventLocation>
+		<TVWall ref="TVWall"></TVWall>
+	</div>
 </template>
 
 <script>
-import {
-  getForestLeader,
-  getLeaderTrack,
-  getPlanList,
-  getRy
-} from '@/api/leader'
+	import {
+		getTrafficLeader,
+		getPlanList,
+		getRecordList,
+		getPointList,
+		getRy
+	} from '@/api/leader'
 
-import supermap from '@/components/supermap' //超图
-import vheader from '@/components/v-header.vue' //一体化共用头部
-import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
-import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
-import TVWall from '@/components/TVWall.vue' //电视墙弹窗
+	import supermap from '@/components/supermap' //超图
+	import vheader from '@/components/v-header.vue' //一体化共用头部
+	import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
+	import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
+	import TVWall from '@/components/TVWall.vue' //电视墙弹窗
 
-let echarts = require('echarts')
-export default {
-  components: {
-    supermap,
-    vheader,
-    vBottomMenu,
-    eventLocation,
-    TVWall
-  },
-  data() {
-    return {
-      iconCurrentIndex1: '1',
-      listCurrentIndex1: '',
-      listCurrentIndex2: '',
-      //左右缩进
-      indentStyle: '',
-      indentleft: '',
-      indentright: '',
-      indentText: '收起左右栏',
-      indentdisabled: false,
-      visuForestCloudRYBO: [], //人员类型列表
-      peopleList: [], //人员列表
-      connectList: [], //画线
-      xunLinListOne: [], //巡林计划
-      zrs: 0, //总人数
-      zxrs: 0 //在线人数
-    }
-  },
-  created() {
-    this.getInit()
-    /** ----------------------------------底部按钮公用组件开始------------------------------------- */
-    window.showDialog = this.showDialog
-    window.choseLayerSwitching = this.choseLayerSwitching
-    window.choseLayerSwitchingList = this.choseLayerSwitchingList
-    /** ----------------------------------底部按钮公用组件结束------------------------------------- */
-  },
-  methods: {
-    /** ----------------------------------底部按钮公用组件开始------------------------------------- */
-    showDialog(click) {
-      if (click == 'eventLocation') {
-        this.$refs.eventLocation.showEventLocation()
-        this.$refs.supermap.isEditableLayers = false
-        this.$refs.bottomMenu.showChild = false
-        this.$refs.bottomMenu.showBanChild = false
-        this.$refs.bottomMenu.showChangChild = false
-      } else if (click == 'editableLayers') {
-        this.$refs.bottomMenu.showChild = false
-        this.$refs.bottomMenu.showBanChild = false
-        this.$refs.bottomMenu.showChangChild = false
-        if (!this.$refs.supermap.isEditableLayers) {
-          this.$refs.supermap.isEditableLayers = true
-        } else {
-          this.$refs.supermap.isEditableLayers = false
-        }
-      } else if (click == 'layerSwitching') {
-        this.$refs.supermap.isEditableLayers = false
-        this.$refs.bottomMenu.showBanChild = false
-        this.$refs.bottomMenu.showChangChild = false
-        if (!this.$refs.bottomMenu.showChild) {
-          this.$refs.bottomMenu.showChild = true
-        } else {
-          this.$refs.bottomMenu.showChild = false
-        }
-      } else if (click == 'TVWall') {
-        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 == 'forestban') {
-        this.$refs.supermap.isEditableLayers = false
-        this.$refs.bottomMenu.showChild = false
-        this.$refs.bottomMenu.showChangChild = false
-        if (!this.$refs.bottomMenu.showBanChild) {
-          this.$refs.bottomMenu.showBanChild = true
-        } else {
-          this.$refs.bottomMenu.showBanChild = false
+	let echarts = require('echarts')
+	export default {
+		components: {
+			supermap,
+			vheader,
+			vBottomMenu,
+			eventLocation,
+			TVWall
+		},
+		data() {
+			return {
+				iconCurrentIndex1: '1',
+				listCurrentIndex1: '',
+				listCurrentIndex2: '',
+				//左右缩进
+				indentStyle: '',
+				indentleft: '',
+				indentright: '',
+				indentText: '收起左右栏',
+				indentdisabled: false,
+				visuForestCloudRYBO: [], //人员类型列表
+        personId: null, //人员
+        peopleList: [], //人员列表
+        connectList: [], //画线
+        patrolTrajectory: null, //任务画线
+				xunLinListOne: [], //巡查任务
+				recordList: [], //巡查记录
+				showNothing: false, //暂无信息
+				zrs: 0, //总人数
+				zxrs: 0 //在线人数
+			}
+		},
+		created() {
+			this.getInit()
+			/** ----------------------------------底部按钮公用组件开始------------------------------------- */
+			window.showDialog = this.showDialog
+			window.choseLayerSwitching = this.choseLayerSwitching
+			window.choseLayerSwitchingList = this.choseLayerSwitchingList
+      window.choseLayerSwitchingList_Data = this.choseLayerSwitchingList_Data
+			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
+		},
+    mounted(){
+      this.bottomMenuList() //获取底部公共组件消息和任务
+    },
+		methods: {
+			/** ----------------------------------底部按钮公用组件开始------------------------------------- */
+      bottomMenuList() {
+        this.$refs.bottomMenu.selectMessageList()//获取消息列表
+      },
+			showDialog(click) {
+				if (click == 'eventLocation') {
+					this.$refs.eventLocation.showEventLocation()
+					this.$refs.supermap.isEditableLayers = false
+					this.$refs.bottomMenu.showChild = false
+					this.$refs.bottomMenu.showBanChild = false
+					this.$refs.bottomMenu.showChangChild = false
+				} else if (click == 'editableLayers') {
+					this.$refs.bottomMenu.showChild = false
+					this.$refs.bottomMenu.showBanChild = false
+					this.$refs.bottomMenu.showChangChild = false
+					if (!this.$refs.supermap.isEditableLayers) {
+						this.$refs.supermap.isEditableLayers = true
+					} else {
+						this.$refs.supermap.isEditableLayers = false
+					}
+				} else if (click == 'layerSwitching') {
+					this.$refs.supermap.isEditableLayers = false
+					this.$refs.bottomMenu.showBanChild = false
+					this.$refs.bottomMenu.showChangChild = false
+					if (!this.$refs.bottomMenu.showChild) {
+						this.$refs.bottomMenu.showChild = true
+					} else {
+						this.$refs.bottomMenu.showChild = false
+					}
+				} else if (click == 'TVWall') {
+					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 == 'forestban') {
+					this.$refs.supermap.isEditableLayers = false
+					this.$refs.bottomMenu.showChild = false
+					this.$refs.bottomMenu.showChangChild = false
+					if (!this.$refs.bottomMenu.showBanChild) {
+						this.$refs.bottomMenu.showBanChild = true
+					} else {
+						this.$refs.bottomMenu.showBanChild = false
+					}
+				} else if (click == 'forestchang') {
+					this.$refs.supermap.isEditableLayers = false
+					this.$refs.bottomMenu.showBanChild = false
+					this.$refs.bottomMenu.showChild = false
+					if (!this.$refs.bottomMenu.showChangChild) {
+						this.$refs.bottomMenu.showChangChild = true
+					} else {
+						this.$refs.bottomMenu.showChangChild = false
+					}
+				}
+
+			},
+			//选择图层
+			choseLayerSwitching(url, isClear) {
+				this.$refs.supermap.layerSwitching(url, isClear)
+			},
+			//选择图层(传递数组)
+			choseLayerSwitchingList(urlList) {
+				this.$refs.supermap.layerSwitchingList(urlList)
+			},
+      //选择图层(传递数组)  带数据
+      choseLayerSwitchingList_Data(urlList) {
+        this.$refs.supermap.layerSwitchingList_Data(urlList)
+      },
+			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
+
+			//初始化
+			getInit() {
+				let that = this
+				this.iconCurrentIndex1 = '1'
+				this.listCurrentIndex1 = ''
+				this.listCurrentIndex2 = ''
+				//获取左侧菜单列表
+				getRy().then(res => {
+					that.visuForestCloudRYBO = res.data.visuForestCloudRYBO
+					that.zrs = res.data.visuForestCloudRyZxBO.zrs
+					that.zxrs = res.data.visuForestCloudRyZxBO.zxrs
+					this.personnelChart()
+				})
+			},
+			//获取左侧人员列表
+			getTrafficLeader(linJob, linType) {
+				this.listCurrentIndex1 = ''
+				this.listCurrentIndex2 = ''
+				this.iconCurrentIndex1 = linJob
+				this.peopleList = []
+				getTrafficLeader(linJob, linType).then(res => {
+					this.peopleList = res.data
+				})
+        this.connectList = []
+        this.personId = null;
+        this.xunLinListOne = [];
+        this.patrolTrajectory = null;
+        this.$refs.supermap.clearC()
+			},
+			//点击左侧人员列表获取 巡查轨迹
+			getPlanList(personId) {
+        if(this.personId == personId){//当前人员已经被点击一次 不再重复加载
+          return;
         }
-      } else if (click == 'forestchang') {
-        this.$refs.supermap.isEditableLayers = false
-        this.$refs.bottomMenu.showBanChild = false
-        this.$refs.bottomMenu.showChild = false
-        if (!this.$refs.bottomMenu.showChangChild) {
-          this.$refs.bottomMenu.showChangChild = true
-        } else {
-          this.$refs.bottomMenu.showChangChild = false
+        this.personId = personId;
+				this.showNothing = false;
+				this.recordList = [];
+				getPlanList(personId).then(res => {
+					this.xunLinListOne = res.data;
+				})
+        this.patrolTrajectory = null;
+				this.$refs.supermap.clearC()
+			},
+			//点击右侧巡查轨迹获取 巡查记录
+			getRecordList(id, patrolTrajectory) {
+				this.showNothing = false;
+				this.recordList = [];
+				getRecordList(id).then(res => {
+					this.recordList = res.data;
+				})
+        this.$refs.supermap.clearC();
+        this.setTaskPointList(patrolTrajectory);
+			},
+			//点击右侧巡查记录获取 巡查轨迹
+			getPointList(id) {
+				getPointList(id).then(res => {
+					// console.log("落点",res.data);
+					this.setPointList(res);
+				})
+			},
+      //点击巡查人员 巡查任务落点
+      setTaskPointList(patrolTrajectory) {
+        console.log("巡查任务落点", typeof JSON.parse(patrolTrajectory));
+        if(this.patrolTrajectory == patrolTrajectory){
+          this.patrolTrajectory = null;
+        }else {
+          this.patrolTrajectory = patrolTrajectory;
+          this.drawTaskPoint(this.patrolTrajectory);
         }
-      }
+      },
+      // 巡查任务落点
+      drawTaskPoint(patrolTrajectory) {
+        setTimeout(() => {
+          this.$refs.supermap.clearC();
+          this.$refs.supermap.setConnectList(JSON.parse(patrolTrajectory), '#04f');
+        }, 1000)
+      },
+			//点击巡查轨迹时段 巡查轨迹落点
+			setPointList(res) {
+				let that = this;
+				this.connectList = [];
+				console.log("落点", res.data)
+				if (res.data != null && res.data.length > 0) {
+					for (let i = 0; i < res.data.length; i++) {
+						let latlng = {
+							lat: res.data[i].latitude,
+							lng: res.data[i].longitude
+						}
+						this.connectList.push(latlng)
+					}
+					setTimeout(() => {
+						// that.$refs.supermap.clearC()
+						that.$refs.supermap.setConnectList(this.connectList, '#f40')
+					}, 1000)
+				} else {
+					that.$refs.supermap.clearC()
+				}
+			},
+			setConnectList(points, planName) {
+				this.listCurrentIndex2 = planName
+				this.connectList = []
+				if (points != null && points != '') {
+					this.connectList = JSON.parse(points)
+					this.$refs.supermap.setConnectTwoList(this.connectList, 'red')
+				}
+			},
 
-    },
-    //选择图层
-    choseLayerSwitching(url, isClear) {
-      this.$refs.supermap.layerSwitching(url, isClear)
-    },
-    //选择图层(传递数组)
-    choseLayerSwitchingList(urlList) {
-      this.$refs.supermap.layerSwitchingList(urlList)
-    },
-    /** ----------------------------------底部按钮公用组件结束------------------------------------- */
+			//吉祥物收起左右框
+			indent() {
+				let list = document.getElementsByClassName('el-tooltip__popper')
+				list[list.length - 1].style.display = 'none'
+				if (this.indentStyle == '') {
+					this.indentStyle = 'indent-style'
+					this.indentleft = 'indent-left'
+					this.indentright = 'indent-right'
+					this.indentText = '展开左右栏'
+				} else if (this.indentText == '展开左右栏') {
+					this.indentStyle = ''
+					this.indentleft = ''
+					this.indentright = ''
+					this.indentText = '收起左右栏'
+				}
+			},
+			//人员chart
+			personnelChart() {
+				// 基于准备好的dom,初始化echarts实例
+				let myChart = echarts.init(document.getElementById('personnel-chart'))
+				// 绘制图表
+				const handred = this.zrs
+				let point = this.zxrs
+				myChart.setOption({
+					title: [{
+						text: '总人数:' + handred + '人' + '\n' + '\n' + '在线人数:' + point + '人',
+						x: '48%',
+						y: '25%',
+						textStyle: {
+							fontWeight: 'normal',
+							color: '#02d6fc',
+							fontSize: '14'
+						}
+					}],
+					series: [{
+						name: 'circle',
+						type: 'pie',
+						center: ['22%', '50%'],
+						radius: ['60%', '70%'],
+						clockWise: true,
+						label: {
+							normal: {
+								position: 'center'
 
-    //初始化
-    getInit() {
-      let that = this
-      this.iconCurrentIndex1 = '1'
-      this.listCurrentIndex1 = ''
-      this.listCurrentIndex2 = ''
-      //获取左侧菜单列表
-      getRy().then(res => {
-        that.visuForestCloudRYBO = res.data.visuForestCloudRYBO
-        that.zrs = res.data.visuForestCloudRyZxBO.zrs
-        that.zxrs = res.data.visuForestCloudRyZxBO.zxrs
-        this.personnelChart()
-      })
-      //获取巡林计划
-      getPlanList().then(res => {
-        this.xunLinListOne = res.data
-      })
-    },
-    //获取左侧人员列表
-    getForestLeader(linJob, linType) {
-      this.listCurrentIndex1 = ''
-      this.listCurrentIndex2 = ''
-      this.iconCurrentIndex1 = linJob
-      this.peopleList = []
-      getForestLeader(linJob, linType).then(res => {
-        this.peopleList = res.data
-      })
-      this.connectList = []
-      this.$refs.supermap.clearC()
-    },
-    //点击左侧人员列表获取轨迹
-    getLeaderTrack(userId) {
-      this.listCurrentIndex1 = userId
-      let that = this
-      this.connectList = []
-      getLeaderTrack(userId).then(res => {
-        if (res.data != null && res.data.length > 0) {
-          for (let i = 0; i < res.data.length; i++) {
-            let latlng = {
-              lat: res.data[i].latitude,
-              lng: res.data[i].longitude
-            }
-            this.connectList.push(latlng)
-          }
-          setTimeout(() => {
-            that.$refs.supermap.clearC()
-            that.$refs.supermap.setConnectList(this.connectList, 'red')
-          }, 1000)
-        } else {
-          that.$refs.supermap.clearC()
-        }
-      })
-    },
+							}
+						},
+						itemStyle: {
+							normal: {
+								label: {
+									show: false
+								},
+								labelLine: {
+									show: false
+								}
+							}
+						},
+						data: [{
+							value: point,
+							name: '当前在线',
+							label: {
+								show: true, //单独显示该数据项
+								formatter: '{c}人',
+								labelLayout: {
+									top: '50%'
+								},
+								textStyle: {
+									color: '#02d6fc',
+									fontSize: 14
+								}
+							},
+							itemStyle: {
+								normal: {
+									color: { // 完成的圆环的颜色
+										colorStops: [{
+											offset: 0,
+											color: '#02d6fc' // 0% 处的颜色
+										}, {
+											offset: 1,
+											color: '#367bec' // 100% 处的颜色
+										}]
+									},
+									label: {
+										show: false
+									},
+									labelLine: {
+										show: false
+									}
+								}
+							}
+						}, {
+							value: handred - point,
+							itemStyle: {
+								color: '#666'
+							}
+						}]
+					}]
+				})
+			}
 
-    setConnectList(points, planName) {
-      this.listCurrentIndex2 = planName
-      this.connectList = []
-      if (points != null && points != '') {
-        this.connectList = JSON.parse(points)
-        this.$refs.supermap.setConnectTwoList(this.connectList, 'red')
-      }
-    },
 
-    //吉祥物收起左右框
-    indent() {
-      let list = document.getElementsByClassName('el-tooltip__popper')
-      list[list.length - 1].style.display = 'none'
-      if (this.indentStyle == '') {
-        this.indentStyle = 'indent-style'
-        this.indentleft = 'indent-left'
-        this.indentright = 'indent-right'
-        this.indentText = '展开左右栏'
-      } else if (this.indentText == '展开左右栏') {
-        this.indentStyle = ''
-        this.indentleft = ''
-        this.indentright = ''
-        this.indentText = '收起左右栏'
-      }
-    },
-    //人员chart
-    personnelChart() {
-      // 基于准备好的dom,初始化echarts实例
-      let myChart = echarts.init(document.getElementById('personnel-chart'))
-      // 绘制图表
-      const handred = this.zrs
-      let point = this.zxrs
-      myChart.setOption({
-        title: [{
-          text: '总人数:' + handred + '人' + '\n' + '\n' + '在线人数:' + point + '人',
-          x: '48%',
-          y: '25%',
-          textStyle: {
-            fontWeight: 'normal',
-            color: '#02d6fc',
-            fontSize: '14'
-          }
-        }],
-        series: [{
-          name: 'circle',
-          type: 'pie',
-          center: ['22%', '50%'],
-          radius: ['60%', '70%'],
-          clockWise: true,
-          label: {
-            normal: {
-              position: 'center'
+		},
+		//过滤器
+
+		filters: {
 
-            }
-          },
-          itemStyle: {
-            normal: {
-              label: {
-                show: false
-              },
-              labelLine: {
-                show: false
-              }
-            }
-          },
-          data: [{
-            value: point,
-            name: '当前在线',
-            label: {
-              show: true, //单独显示该数据项
-              formatter: '{c}人',
-              labelLayout: {
-                top: '50%'
-              },
-              textStyle: {
-                color: '#02d6fc',
-                fontSize: 14
-              }
-            },
-            itemStyle: {
-              normal: {
-                color: { // 完成的圆环的颜色
-                  colorStops: [{
-                    offset: 0,
-                    color: '#02d6fc' // 0% 处的颜色
-                  }, {
-                    offset: 1,
-                    color: '#367bec' // 100% 处的颜色
-                  }]
-                },
-                label: {
-                  show: false
-                },
-                labelLine: {
-                  show: false
-                }
-              }
-            }
-          }, {
-            value: handred - point,
-            itemStyle: {
-              color: '#666'
-            }
-          }]
-        }]
-      })
-    }
-  }
+			//标题截取前20
+			ellipsis20(value) {
+				if (!value) return '';
+				if (value.length > 20) {
+					return value.slice(0, 20) + '...'
+				}
+				return value
+			}
+		},
 
-}
+	}
 </script>
 
 <style rel="stylesheet/scss" lang="scss" scoped>
-@import '@/assets/styles/base.scss';
+	@import '@/assets/styles/base.scss';
 
-.h-27 {
-  height: 27rem;
-}
+	.h-27 {
+		height: 27rem;
+	}
 </style>

+ 240 - 200
src/views/monitor.vue

@@ -26,27 +26,67 @@
                     <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>
-                  <el-collapse-item v-for="(item,index) in region" :key="index">
-                    <!-- deptId -->
-                    <template slot="title">
-                      <div class="d-l-con sj-collapse" :class="{on:listCurrentIndex1==item.deptId}"
-                           v-on:click="selectCameraByDeptId(item.deptId)">
-                        <div class="d-l-l-text">
-                          <h4 class="collapse-title">{{ item.deptName }}</h4>
-                        </div>
-                        <div class="d-l-l-count">{{ item.deptCount }}</div>
-                      </div>
-                    </template>
-                  </el-collapse-item>
-                </el-collapse>
-              </div>
-
-              <!-- 横向柱状 echart -->
-              <div class="overflow-y" style="height: 33vh;">
-                <div id="camera-chart" style="width: 100%;height:33vh;"></div>
+<!--              <div class="overflow-y" style="height: 33vh;">-->
+<!--                <el-collapse accordion>-->
+<!--                  <el-collapse-item v-for="(item,index) in region" :key="index">-->
+<!--                    &lt;!&ndash; deptId &ndash;&gt;-->
+<!--                    <template slot="title">-->
+<!--                      <div class="d-l-con sj-collapse" :class="{on:listCurrentIndex1==item.deptId}"-->
+<!--                           v-on:click="selectCameraByDeptId(item.deptId)">-->
+<!--                        <div class="d-l-l-text">-->
+<!--                          <h4 class="collapse-title">{{ item.deptName }}</h4>-->
+<!--                        </div>-->
+<!--                        <div class="d-l-l-count">{{ item.deptCount }}</div>-->
+<!--                      </div>-->
+<!--                    </template>-->
+<!--                  </el-collapse-item>-->
+<!--                </el-collapse>-->
+<!--              </div>-->
+
+<!--              &lt;!&ndash; 横向柱状 echart &ndash;&gt;-->
+<!--              <div class="overflow-y" style="height: 33vh;">-->
+<!--                <div id="camera-chart" style="width: 100%;height:33vh;"></div>-->
+<!--              </div>-->
+              <div  class="overflow-y" style="height: 70vh;">
+                <div class="i-list-con h-65">
+                  <div class="head-container">
+                    <el-input
+                      v-model="deptName"
+                      placeholder="请输入部门名称"
+                      clearable
+                      size="small"
+                      prefix-icon="el-icon-search"
+                      style="margin-bottom: 20px"
+                    />
+                  </div>
+                  <div class="head-container tree-scrollbar" style="height: 700px;overflow-y:auto;">
+                    <el-tree
+                      :data="deptOptions"
+                      :props="defaultProps"
+                      :expand-on-click-node="false"
+                      :filter-node-method="filterNode"
+                      ref="tree"
+                      node-key="id"
+                      :default-expanded-keys="[100]"
+                      @node-click="handleNodeClick"
+                    />
+                  </div>
+                </div>
               </div>
             </div>
           </dv-border-box-13>
@@ -59,7 +99,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 +125,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 +136,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,9 +158,10 @@
 import {
   selectDeviceType,
   selectCameraByDeptId,
-  selectKeyAreaList
+  selectKeyAreaList,
+  getRegionalFlag
 } from '@/api/monitor'
-
+import { treeselect } from '@/api/system/dept'
 import supermap from '@/components/supermap' //超图
 import vheader from '@/components/v-header.vue' //一体化共用头部
 import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
@@ -134,7 +175,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 +191,8 @@ export default {
   },
   created() {
     /** ----------------------------------摄像头预览开始------------------------------------- */
-    // const DHWsInstance = DHWs.getInstance()
-    // this.ws = DHWsInstance
+    const DHWsInstance = DHWs.getInstance()
+    this.ws = DHWsInstance
     /** ----------------------------------摄像头预览结束------------------------------------- */
 
     /** ----------------------------------底部按钮公用组件开始------------------------------------- */
@@ -161,14 +202,25 @@ export default {
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
   },
   mounted() {
-    this.selectDeviceType()
+    this.selectDeviceType(-1)
     this.selectKeyAreaList()
+    this.getTreeselect()
   },
   data() {
     return {
+      // 部门名称
+      deptName: undefined,
+// 部门树选项
+      deptOptions: undefined,
+      defaultProps: {
+        children: 'children',
+        label: 'label'
+      },
       iconCurrentIndex1: '-1',
       listCurrentIndex1: '-1',
       listCurrentIndex2: '-1',
+      listCurrentIndex3: '-1',
+      graphicsList:[],//重点区域
       /** ----------------------------------摄像头预览开始------------------------------------- */
       //大华
       activePanel: 'key1',
@@ -198,10 +250,67 @@ export default {
       indentleft: '',
       indentright: '',
       indentText: '收起左右栏',
-      indentdisabled: false
+      indentdisabled: false,
+      domId: 'dom1',
+    }
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val)
     }
   },
   methods: {
+    /** 部门树*/
+// 查询部门下拉树结构
+    getTreeselect() {
+      treeselect().then(response => {
+        console.log(response.data)
+        this.deptOptions = response.data
+      })
+    },
+// 筛选节点
+    filterNode(value, data) {
+      if (!value) return true
+      return data.label.indexOf(value) !== -1
+    },
+// 节点单击事件
+    handleNodeClick(data) {
+      // this.findCameraByDept(data.id)
+      this.selectCameraByDeptId(data.id);
+    },
+    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') {
@@ -264,115 +373,12 @@ export default {
       this.$refs.supermap.layerSwitchingList(urlList)
     },
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
-    cameraChat() {
-      // 基于准备好的dom,初始化echarts实例
-      let myChart = echarts.init(document.getElementById('camera-chart'))
-      // 绘制图表
-      const dfColor = ['#92E1FF', '#0097FB', '#30ECA6', '#FFC227', '#FF4848']
-      myChart.setOption({
-        dataset: {
-          source: this.sourceData
-        },
-        tooltip: {
-          trigger: 'item'
-
-        },
-        grid: {
-          top: '5%',
-          left: '2%',
-          // right: "4%",
-          bottom: '-15%',
-          width: '75%',
-          containLabel: true
-        },
-        xAxis: {
-          show: false,
-          type: 'value'
-        },
-        yAxis: {
-          type: 'category', // 不设置类目轴,抽离的dataset数据展示不出来
-          inverse: true,
-          axisLabel: {
-            show: true,
-            textStyle: {
-              color: '#5deaff',
-              fontSize: '12'
-            }
-          },
-          splitLine: {
-            show: false
-          },
-          axisTick: {
-            show: false
-          },
-          axisLine: {
-            show: false
-          }
-        },
-
-        series: [{
-
-          type: 'bar',
-          animationCurve: 'easeOutBack',
-          barWidth: 5,
-          label: {
-            show: true,
-            position: 'right',
-            offset: [0, 0],
-            color: '#88dfd5',
-            // fontSize: "12",
-            style: {
-              fill: '#fff'
-            }
-          },
-          backgroundBar: {
-            show: true,
-            style: {
-              fill: 'rgba(97,152,255,0.20)'
-            }
-          },
-          barStyle: {
-            stroke: 'rgba(41,244,236,1)'
-          },
-          gradient: {
-            color: ['rgba(41,244,236,1)', 'rgba(41,244,236,0)']
-          },
-          itemStyle: {
-            label: {
-              show: true
-            },
-            labelLine: {
-              show: false
-            },
-            color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
-              offset: 0,
-              color: 'rgba(41,244,236,0)'
-            },
-              {
-                offset: 1,
-                color: 'rgba(41,244,236,.5)'
-              }
-            ]),
-            borderColor: '#a2f9f7',
-            shadowBlur: 16,
-            shadowColor: '#a2f9f7'
-          }
-        }]
-      })
-    },
-    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
@@ -388,7 +394,7 @@ export default {
         }
 
         that.visuForestCloudCameraBOList = res.data.visuForestCloudCameraBOList
-        this.cameraChat()
+        // this.cameraChat()
         if (res.data.visuForestCloudCameraBOList != null && res.data.visuForestCloudCameraBOList
           .length > 0) {
           for (let i = 0; i < res.data.visuForestCloudCameraBOList.length; i++) {
@@ -402,17 +408,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">' +
@@ -430,6 +435,21 @@ export default {
               '                </div>' +
               '                </div>' +
               '                </span>' +
+              '<span>' +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              '                  <h4>摄像头类型:' + (res.data.visuForestCloudCameraBOList[i].cameraFactory=="1"?"大华":"海康") + '</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"
@@ -452,7 +472,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)
         }
       })
@@ -465,12 +485,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 = {
@@ -483,17 +501,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[i].cameraCode,
+                type:res.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">' +
@@ -510,6 +527,21 @@ export default {
               '                </div>' +
               '                </div>' +
               '                </span>' +
+              '<span>' +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              '                  <h4>摄像头类型:' + (res.data[i].cameraFactory=="1"?"大华":"海康") + '</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"
@@ -532,7 +564,12 @@ 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)
+        }else{
+          setTimeout(() => {
+            that.$refs.supermap.clearM(true)
+            that.$refs.supermap.clearM(false)
           }, 1000)
         }
       })
@@ -576,45 +613,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=='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)
+        })
+      }
 
     },
     realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
@@ -622,7 +662,8 @@ export default {
         this.$Message.info('正在登陆客户端,请稍等......')
         return false
       }
-      this.ws.openVideo(cameraParams)
+      const params = [cameraParams];
+      this.ws.openVideo(params)
     },
     /** ----------------------------------摄像头预览结束------------------------------------- */
 
@@ -652,7 +693,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) {
@@ -660,7 +701,7 @@ export default {
               that.initPlugin(newappkey,newloginIp,newsecret,newloginPort)
             }, 3000)
           } else {
-            $('#playWnd').html('插件启动失败,请检查插件是否安装!')
+            $('#playWnd').html('插件启动失败,请检查插件是否安装!<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
           }
         },
         cbConnectClose: function(bNormalClose) {
@@ -769,14 +810,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>

+ 406 - 401
src/views/resources.vue

@@ -49,443 +49,448 @@
 </template>
 
 <script>
-import {
-  getResourcesCount,
-  selectResources,
-  selectResourcesByLabel
-} from '@/api/resources'
-import supermap from '@/components/supermap' //超图
-import vheader from '@/components/v-header.vue' //一体化共用头部
-import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
-import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
-import TVWall from '@/components/TVWall.vue' //电视墙弹窗
-import resourcesdialog from '@/views/resourcesdialog.vue' //事件详情弹窗
-/** ----------------------------------摄像头预览开始------------------------------------- */
-import {
-  getHaiKangVideoServer
-} from '@/api/haikang/haikang'
-/** ----------------------------------摄像头预览结束------------------------------------- */
-export default {
-  components: {
-    resourcesdialog,
-    supermap,
-    vheader,
-    vBottomMenu,
-    eventLocation,
-    TVWall
-  },
-  created() {
-    /** ----------------------------------底部按钮公用组件开始------------------------------------- */
-    window.showDialog = this.showDialog
-    window.choseLayerSwitching = this.choseLayerSwitching
-    window.choseLayerSwitchingList = this.choseLayerSwitchingList
-    /** ----------------------------------底部按钮公用组件结束------------------------------------- */
-  },
-  mounted() {
-    this.getResourcesCount();
-    this.selectResources();
-  },
-  data() {
-    return {
-      /** ----------------------------------摄像头预览开始------------------------------------- */
-      //海康
-      cameraTitle: '',
-      cameraVisible: false,
-      initCount: 0,
-      pubKey: '',
-      oWebControl: null,
-      /** ----------------------------------摄像头预览结束------------------------------------- */
-      /** ----------------------------------资源展示用字段------------------------------------- */
-      labelList: ['warning_sign','bridge','culvert'], //资源类型数组,用于资源判断 和资源初始化传参
-      markersList: [], //点位列表
-      resourcesCountList: [],
-      resourcesList: []
-    }
-  },
-  methods: {
-    //查询各类资源的数量
-    getResourcesCount(){
-      getResourcesCount().then(res => {
-        this.resourcesCountList = res.data;
-      })
+  import {
+    getResourcesCount,
+    selectResources,
+    selectResourcesByLabel
+  } from '@/api/resources'
+  import supermap from '@/components/supermap' //超图
+  import vheader from '@/components/v-header.vue' //一体化共用头部
+  import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
+  import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
+  import TVWall from '@/components/TVWall.vue' //电视墙弹窗
+  import resourcesdialog from '@/views/resourcesdialog.vue' //事件详情弹窗
+  /** ----------------------------------摄像头预览开始------------------------------------- */
+  import {
+    getHaiKangVideoServer
+  } from '@/api/haikang/haikang'
+  /** ----------------------------------摄像头预览结束------------------------------------- */
+  export default {
+    components: {
+      resourcesdialog,
+      supermap,
+      vheader,
+      vBottomMenu,
+      eventLocation,
+      TVWall
     },
-    //初始化所有资源并落点
-    selectResources(){
-      selectResources(this.labelList).then(res => {
-        this.resourcesList = res.data;
-        this.initMarkers(this.resourcesList);
-      })
+    created() {
+      /** ----------------------------------底部按钮公用组件开始------------------------------------- */
+      window.showDialog = this.showDialog
+      window.choseLayerSwitching = this.choseLayerSwitching
+      window.choseLayerSwitchingList = this.choseLayerSwitchingList
+      /** ----------------------------------底部按钮公用组件结束------------------------------------- */
     },
-    //点击左侧某资源,将该资源进行落点
-    selectResourcesByLabel(label){
-      console.log(label)
-      let that = this;
-      //每次点击,先将原有点位清空后重新落点
-      this.markersList = [];
-      this.resourcesList = [];
-      that.$refs.supermap.clearM(false);
-      that.$refs.supermap.clearM(true);
-      selectResourcesByLabel(label).then(res => {
-        this.resourcesList = res.data;
-        this.initMarkers(this.resourcesList);
-      })
+    mounted() {
+      this.getResourcesCount();
+      this.selectResources();
+      this.bottomMenuList() //获取底部公共组件消息和任务
     },
-    showResourcesDialog(param) {
-      //资源信息弹出
-      this.$refs.resourcesdialog.showResourcesDialog(param);
+    data() {
+      return {
+        /** ----------------------------------摄像头预览开始------------------------------------- */
+        //海康
+        cameraTitle: '',
+        cameraVisible: false,
+        initCount: 0,
+        pubKey: '',
+        oWebControl: null,
+        /** ----------------------------------摄像头预览结束------------------------------------- */
+        /** ----------------------------------资源展示用字段------------------------------------- */
+        labelList: ['warning_sign','bridge','culvert'], //资源类型数组,用于资源判断 和资源初始化传参
+        markersList: [], //点位列表
+        resourcesCountList: [],
+        resourcesList: []
+      }
     },
-    initMarkers(list){
-      if (list != null && list.length > 0) {
-        for (let i = 0; i < list.length; i++) {
-          let markersMap = {
-            lng: 124.59,
-            lat: 43.02,
-            icon: 'marker',
-            bindPopupHtml: '',
-            click: '',
-            parameter: '',
-            keepBindPopup: false,
-            isAggregation: false
-          }
-          if (list.length > 200) {
-            markersMap.isAggregation = true;
-          }
-          //根据标签确定资源的图标
-          markersMap.icon = 'traffic-resources-' + this.resourcesList[i].label;
-          markersMap.parameter = this.resourcesList[i].id + "," + this.resourcesList[i].label;
-          markersMap.click = 'showResourcesDialog';
-          markersMap.lng = list[i].longitude;
-          markersMap.lat = list[i].latitude;
-          //POP的通用部分
-          markersMap.bindPopupHtml = '<div class="map-tip">' +
-            '<span>' +
-            ' <div class="d-l-con">' +
-            '   <div class="d-l-l-text">' +
-            '     <h4>名称:' + list[i].name + '</h4>' +
-            '   </div>' +
-            ' </div>' +
-            '</span>';
-          if(list[i].label == this.labelList[0]){//警示牌的POP
-            markersMap.bindPopupHtml += ''+
-              '<span>' +
-              ' <div class="d-l-con">' +
-              '   <div class="d-l-l-text">' +
-              '     <h4>设置日期:' + list[i].setTime + '</h4>' +
-              '   </div>' +
-              ' </div>' +
-              '</span>' +
+    methods: {
+      //查询各类资源的数量
+      getResourcesCount(){
+        getResourcesCount().then(res => {
+          this.resourcesCountList = res.data;
+        })
+      },
+      //初始化所有资源并落点
+      selectResources(){
+        selectResources(this.labelList).then(res => {
+          this.resourcesList = res.data;
+          this.initMarkers(this.resourcesList);
+        })
+      },
+      //点击左侧某资源,将该资源进行落点
+      selectResourcesByLabel(label){
+        console.log(label)
+        let that = this;
+        //每次点击,先将原有点位清空后重新落点
+        this.markersList = [];
+        this.resourcesList = [];
+        that.$refs.supermap.clearM(false);
+        that.$refs.supermap.clearM(true);
+        selectResourcesByLabel(label).then(res => {
+          this.resourcesList = res.data;
+          this.initMarkers(this.resourcesList);
+        })
+      },
+      showResourcesDialog(param) {
+        //资源信息弹出
+        this.$refs.resourcesdialog.showResourcesDialog(param);
+      },
+      initMarkers(list){
+        if (list != null && list.length > 0) {
+          for (let i = 0; i < list.length; i++) {
+            let markersMap = {
+              lng: 124.59,
+              lat: 43.02,
+              icon: 'marker',
+              bindPopupHtml: '',
+              click: '',
+              parameter: '',
+              keepBindPopup: false,
+              isAggregation: false
+            }
+            if (list.length > 200) {
+              markersMap.isAggregation = true;
+            }
+            //根据标签确定资源的图标
+            markersMap.icon = 'traffic-resources-' + this.resourcesList[i].label;
+            markersMap.parameter = this.resourcesList[i].id + "," + this.resourcesList[i].label;
+            markersMap.click = 'showResourcesDialog';
+            markersMap.lng = list[i].longitude;
+            markersMap.lat = list[i].latitude;
+            //POP的通用部分
+            markersMap.bindPopupHtml = '<div class="map-tip">' +
               '<span>' +
               ' <div class="d-l-con">' +
               '   <div class="d-l-l-text">' +
-              '     <h4>用途:' + list[i].effect + '</h4>' +
+              '     <h4>名称:' + list[i].name + '</h4>' +
               '   </div>' +
               ' </div>' +
               '</span>';
+            if(list[i].label == this.labelList[0]){//警示牌的POP
+              markersMap.bindPopupHtml += ''+
+                '<span>' +
+                ' <div class="d-l-con">' +
+                '   <div class="d-l-l-text">' +
+                '     <h4>设置日期:' + list[i].setTime + '</h4>' +
+                '   </div>' +
+                ' </div>' +
+                '</span>' +
+                '<span>' +
+                ' <div class="d-l-con">' +
+                '   <div class="d-l-l-text">' +
+                '     <h4>用途:' + list[i].effect + '</h4>' +
+                '   </div>' +
+                ' </div>' +
+                '</span>';
+            }
+            if(list[i].label == this.labelList[1] || list[i].label == this.labelList[2]){//桥梁涵洞的POP
+              markersMap.bindPopupHtml += ''+
+                '<span>' +
+                ' <div class="d-l-con">' +
+                '   <div class="d-l-l-text">' +
+                '     <h4>竣工日期:' + list[i].completionDate + '</h4>' +
+                '   </div>' +
+                ' </div>' +
+                '</span>' +
+                '<span>' +
+                '<span>' +
+                ' <div class="d-l-con">' +
+                '   <div class="d-l-l-text">' +
+                '     <h4>管理单位:' + list[i].managementUnit + '</h4>' +
+                '   </div>' +
+                ' </div>' +
+                '</span>' +
+                '<span>' +
+                ' <div class="d-l-con">' +
+                '   <div class="d-l-l-text">' +
+                '     <h4>联系电话:' + list[i].manaTel + '</h4>' +
+                '   </div>' +
+                ' </div>' +
+                '</span>' +
+                '<span>' +
+                ' <div class="d-l-con">' +
+                '   <div class="d-l-l-text">' +
+                '     <h4>养护单位:' + list[i].maintenanceUnit + '</h4>' +
+                '   </div>' +
+                ' </div>' +
+                '</span>' +
+                '<span>' +
+                ' <div class="d-l-con">' +
+                '   <div class="d-l-l-text">' +
+                '     <h4>联系电话:' + list[i].mainTel + '</h4>' +
+                '   </div>' +
+                ' </div>' +
+                '</span>';
+            }
+            if(list[i].remark !="" && list[i].remark !=null){//POP的备注部分
+              markersMap.bindPopupHtml += ''+
+                '<span>' +
+                ' <div class="d-l-con">' +
+                '   <div class="d-l-l-text">' +
+                '     <h4>备注:' + list[i].remark + '</h4>' +
+                '   </div>' +
+                ' </div>' +
+                '</span>' ;
+            }
+            markersMap.bindPopupHtml += '</div>'
+            this.markersList.push(markersMap)
           }
-          if(list[i].label == this.labelList[1] || list[i].label == this.labelList[2]){//桥梁涵洞的POP
-            markersMap.bindPopupHtml += ''+
-              '<span>' +
-              ' <div class="d-l-con">' +
-              '   <div class="d-l-l-text">' +
-              '     <h4>竣工日期:' + list[i].completionDate + '</h4>' +
-              '   </div>' +
-              ' </div>' +
-              '</span>' +
-              '<span>' +
-              '<span>' +
-              ' <div class="d-l-con">' +
-              '   <div class="d-l-l-text">' +
-              '     <h4>管理单位:' + list[i].managementUnit + '</h4>' +
-              '   </div>' +
-              ' </div>' +
-              '</span>' +
-              '<span>' +
-              ' <div class="d-l-con">' +
-              '   <div class="d-l-l-text">' +
-              '     <h4>联系电话:' + list[i].manaTel + '</h4>' +
-              '   </div>' +
-              ' </div>' +
-              '</span>' +
-              '<span>' +
-              ' <div class="d-l-con">' +
-              '   <div class="d-l-l-text">' +
-              '     <h4>养护单位:' + list[i].maintenanceUnit + '</h4>' +
-              '   </div>' +
-              ' </div>' +
-              '</span>' +
-              '<span>' +
-              ' <div class="d-l-con">' +
-              '   <div class="d-l-l-text">' +
-              '     <h4>联系电话:' + list[i].mainTel + '</h4>' +
-              '   </div>' +
-              ' </div>' +
-              '</span>';
+          setTimeout(() => {
+            this.$refs.supermap.setMarkers(this.markersList)
+          }, 2000)
+        }
+      },
+      /** ----------------------------------底部按钮公用组件开始------------------------------------- */
+      bottomMenuList() {
+        this.$refs.bottomMenu.selectTaskList()//获取任务列表
+        this.$refs.bottomMenu.selectMessageList()//获取消息列表
+      },
+      showDialog(click) {
+        if (click == 'eventLocation') {
+          this.$refs.eventLocation.showEventLocation()
+          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showChild = false
+          this.$refs.bottomMenu.showBanChild = false
+          this.$refs.bottomMenu.showChangChild = false
+        } else if (click == 'editableLayers') {
+          this.$refs.bottomMenu.showChild = false
+          this.$refs.bottomMenu.showBanChild = false
+          this.$refs.bottomMenu.showChangChild = false
+          if (!this.$refs.supermap.isEditableLayers) {
+            this.$refs.supermap.isEditableLayers = true
+          } else {
+            this.$refs.supermap.isEditableLayers = false
           }
-          if(list[i].remark !="" && list[i].remark !=null){//POP的备注部分
-            markersMap.bindPopupHtml += ''+
-              '<span>' +
-              ' <div class="d-l-con">' +
-              '   <div class="d-l-l-text">' +
-              '     <h4>备注:' + list[i].remark + '</h4>' +
-              '   </div>' +
-              ' </div>' +
-              '</span>' ;
+        } else if (click == 'layerSwitching') {
+          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showBanChild = false
+          this.$refs.bottomMenu.showChangChild = false
+          if (!this.$refs.bottomMenu.showChild) {
+            this.$refs.bottomMenu.showChild = true
+          } else {
+            this.$refs.bottomMenu.showChild = false
           }
-          markersMap.bindPopupHtml += '</div>'
-          this.markersList.push(markersMap)
-        }
-        setTimeout(() => {
-          this.$refs.supermap.setMarkers(this.markersList)
-        }, 2000)
-      }
-    },
-    /** ----------------------------------底部按钮公用组件开始------------------------------------- */
-    showDialog(click) {
-      if (click == 'eventLocation') {
-        this.$refs.eventLocation.showEventLocation()
-        this.$refs.supermap.isEditableLayers = false
-        this.$refs.bottomMenu.showChild = false
-        this.$refs.bottomMenu.showBanChild = false
-        this.$refs.bottomMenu.showChangChild = false
-      } else if (click == 'editableLayers') {
-        this.$refs.bottomMenu.showChild = false
-        this.$refs.bottomMenu.showBanChild = false
-        this.$refs.bottomMenu.showChangChild = false
-        if (!this.$refs.supermap.isEditableLayers) {
-          this.$refs.supermap.isEditableLayers = true
-        } else {
+        } else if (click == 'TVWall') {
+          this.$refs.TVWall.showTVWall()
           this.$refs.supermap.isEditableLayers = false
-        }
-      } else if (click == 'layerSwitching') {
-        this.$refs.supermap.isEditableLayers = false
-        this.$refs.bottomMenu.showBanChild = false
-        this.$refs.bottomMenu.showChangChild = false
-        if (!this.$refs.bottomMenu.showChild) {
-          this.$refs.bottomMenu.showChild = true
-        } else {
           this.$refs.bottomMenu.showChild = false
-        }
-      } else if (click == 'TVWall') {
-        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 == 'forestban') {
-        this.$refs.supermap.isEditableLayers = false
-        this.$refs.bottomMenu.showChild = false
-        this.$refs.bottomMenu.showChangChild = false
-        if (!this.$refs.bottomMenu.showBanChild) {
-          this.$refs.bottomMenu.showBanChild = true
-        } else {
           this.$refs.bottomMenu.showBanChild = false
-        }
-      } else if (click == 'forestchang') {
-        this.$refs.supermap.isEditableLayers = false
-        this.$refs.bottomMenu.showBanChild = false
-        this.$refs.bottomMenu.showChild = false
-        if (!this.$refs.bottomMenu.showChangChild) {
-          this.$refs.bottomMenu.showChangChild = true
-        } else {
           this.$refs.bottomMenu.showChangChild = false
+        } else if (click == 'forestban') {
+          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showChild = false
+          this.$refs.bottomMenu.showChangChild = false
+          if (!this.$refs.bottomMenu.showBanChild) {
+            this.$refs.bottomMenu.showBanChild = true
+          } else {
+            this.$refs.bottomMenu.showBanChild = false
+          }
+        } else if (click == 'forestchang') {
+          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showBanChild = false
+          this.$refs.bottomMenu.showChild = false
+          if (!this.$refs.bottomMenu.showChangChild) {
+            this.$refs.bottomMenu.showChangChild = true
+          } else {
+            this.$refs.bottomMenu.showChangChild = false
+          }
         }
-      }
 
-    },
-    //选择图层
-    choseLayerSwitching(url, isClear) {
-      this.$refs.supermap.layerSwitching(url, isClear)
-    },
-    //选择图层(传递数组)
-    choseLayerSwitchingList(urlList) {
-      this.$refs.supermap.layerSwitchingList(urlList)
-    },
-    /** ----------------------------------底部按钮公用组件结束------------------------------------- */
-    /** ----------------------------------摄像头预览开始------------------------------------- */
-    alertLogin: function() {
-      this.$modal.msg('登录中....')
-    },
-    alertLoginSuccess: function() {
-      this.$modal.msgSuccess('登录成功!')
-    },
-    alertLoginFailed: function() {
-      this.$modal.msgError('登陆失败!')
-    },
-    alertReinstall: function() {
-      this.$modal.msgWarning('请重新安装客户端')
-    },
-    cancelEventLocationShow() {
-      if (this.oWebControl != null) {
-        this.oWebControl.JS_HideWnd()   // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
-        this.oWebControl.JS_Disconnect().then(function() {  // 断开与插件服务连接成功
-          },
-          function() {  // 断开与插件服务连接失败
-          })
-      }
-    },
-    /** 预览按钮操作 */
-    preview(cameraCode) {
-      let that = this
-      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)
-      })
-
-    },
-    realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
-      if (!this.isLogin) {
-        this.$Message.info('正在登陆客户端,请稍等......')
-        return false
-      }
-      this.ws.openVideo(cameraParams)
-    },
-    /** ----------------------------------摄像头预览结束------------------------------------- */
-    /** ----------------------------------海康摄像头预览开始------------------------------------- */
-    // 创建播放实例
-    initPlugin(newappkey,newloginIp,newsecret,newloginPort) {
-      let that=this
-      that.oWebControl = new WebControl({
-        szPluginContainer: 'playWnd',                       // 指定容器id
-        iServicePortStart: 15900,                           // 指定起止端口号,建议使用该值
-        iServicePortEnd: 15909,
-        szClassId: '23BF3B0A-2C56-4D97-9C03-0CB103AA8F11',   // 用于IE10使用ActiveX的clsid
-        cbConnectSuccess: function() {                     // 创建WebControl实例成功
-          that.oWebControl.JS_StartService('window', {         // WebControl实例创建成功后需要启动服务
-            dllPath: './VideoPluginConnect.dll'         // 值"./VideoPluginConnect.dll"写死
-          }).then(function() {                           // 启动插件服务成功
-            that.oWebControl.JS_SetWindowControlCallback({   // 设置消息回调
-              cbIntegrationCallBack: cbIntegrationCallBack
+      },
+      //选择图层
+      choseLayerSwitching(url, isClear) {
+        this.$refs.supermap.layerSwitching(url, isClear)
+      },
+      //选择图层(传递数组)
+      choseLayerSwitchingList(urlList) {
+        this.$refs.supermap.layerSwitchingList(urlList)
+      },
+      /** ----------------------------------底部按钮公用组件结束------------------------------------- */
+      /** ----------------------------------摄像头预览开始------------------------------------- */
+      alertLogin: function() {
+        this.$modal.msg('登录中....')
+      },
+      alertLoginSuccess: function() {
+        this.$modal.msgSuccess('登录成功!')
+      },
+      alertLoginFailed: function() {
+        this.$modal.msgError('登陆失败!')
+      },
+      alertReinstall: function() {
+        this.$modal.msgWarning('请重新安装客户端')
+      },
+      cancelEventLocationShow() {
+        if (this.oWebControl != null) {
+          this.oWebControl.JS_HideWnd()   // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
+          this.oWebControl.JS_Disconnect().then(function() {  // 断开与插件服务连接成功
+            },
+            function() {  // 断开与插件服务连接失败
             })
+        }
+      },
+      /** 预览按钮操作 */
+      preview(cameraCode) {
+        let that = this
+        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)
+        })
+
+      },
+      realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
+        if (!this.isLogin) {
+          this.$Message.info('正在登陆客户端,请稍等......')
+          return false
+        }
+        this.ws.openVideo(cameraParams)
+      },
+      /** ----------------------------------摄像头预览结束------------------------------------- */
+      /** ----------------------------------海康摄像头预览开始------------------------------------- */
+      // 创建播放实例
+      initPlugin(newappkey,newloginIp,newsecret,newloginPort) {
+        let that=this
+        that.oWebControl = new WebControl({
+          szPluginContainer: 'playWnd',                       // 指定容器id
+          iServicePortStart: 15900,                           // 指定起止端口号,建议使用该值
+          iServicePortEnd: 15909,
+          szClassId: '23BF3B0A-2C56-4D97-9C03-0CB103AA8F11',   // 用于IE10使用ActiveX的clsid
+          cbConnectSuccess: function() {                     // 创建WebControl实例成功
+            that.oWebControl.JS_StartService('window', {         // WebControl实例创建成功后需要启动服务
+              dllPath: './VideoPluginConnect.dll'         // 值"./VideoPluginConnect.dll"写死
+            }).then(function() {                           // 启动插件服务成功
+              that.oWebControl.JS_SetWindowControlCallback({   // 设置消息回调
+                cbIntegrationCallBack: cbIntegrationCallBack
+              })
 
-            that.oWebControl.JS_CreateWnd('playWnd', 1020, 600).then(function() { //JS_CreateWnd创建视频播放窗口,宽高可设定
-              that.init(newappkey,newloginIp,newsecret,newloginPort)  // 创建播放实例成功后初始化
+              that.oWebControl.JS_CreateWnd('playWnd', 1020, 600).then(function() { //JS_CreateWnd创建视频播放窗口,宽高可设定
+                that.init(newappkey,newloginIp,newsecret,newloginPort)  // 创建播放实例成功后初始化
+              })
+            }, function() { // 启动插件服务失败
             })
-          }, function() { // 启动插件服务失败
-          })
-        },
-        cbConnectError: function() { // 创建WebControl实例失败
-          that.oWebControl = null
-          $('#playWnd').html('插件未启动,正在尝试启动,请稍候...')
-          WebControl.JS_WakeUp('VideoWebPlugin://') // 程序未启动时执行error函数,采用wakeup来启动程序
-          initCount++
-          if (initCount < 3) {
-            setTimeout(function() {
-              that.initPlugin(newappkey,newloginIp,newsecret,newloginPort)
-            }, 3000)
-          } else {
-            $('#playWnd').html('插件启动失败,请检查插件是否安装!')
+          },
+          cbConnectError: function() { // 创建WebControl实例失败
+            that.oWebControl = null
+            $('#playWnd').html('插件未启动,正在尝试启动,请稍候...')
+            WebControl.JS_WakeUp('VideoWebPlugin://') // 程序未启动时执行error函数,采用wakeup来启动程序
+            initCount++
+            if (initCount < 3) {
+              setTimeout(function() {
+                that.initPlugin(newappkey,newloginIp,newsecret,newloginPort)
+              }, 3000)
+            } else {
+              $('#playWnd').html('插件启动失败,请检查插件是否安装!')
+            }
+          },
+          cbConnectClose: function(bNormalClose) {
+            // 异常断开:bNormalClose = false
+            // JS_Disconnect正常断开:bNormalClose = true
+            console.log('cbConnectClose')
+            that.oWebControl = null
           }
-        },
-        cbConnectClose: function(bNormalClose) {
-          // 异常断开:bNormalClose = false
-          // JS_Disconnect正常断开:bNormalClose = true
-          console.log('cbConnectClose')
-          that.oWebControl = null
-        }
-      })
-    },
-    //播放海康摄像头
-    playhk(channelCode) {
-      var cameraIndexCode = channelCode     //获取输入的监控点编号值,必填
-      var streamMode = 0                                     //主子码流标识:0-主码流,1-子码流
-      var transMode = 1                                      //传输协议:0-UDP,1-TCP
-      var gpuMode = 0                                        //是否启用GPU硬解,0-不启用,1-启用
-      var wndId = -1                                         //播放窗口序号(在2x2以上布局下可指定播放窗口)
+        })
+      },
+      //播放海康摄像头
+      playhk(channelCode) {
+        var cameraIndexCode = channelCode     //获取输入的监控点编号值,必填
+        var streamMode = 0                                     //主子码流标识:0-主码流,1-子码流
+        var transMode = 1                                      //传输协议:0-UDP,1-TCP
+        var gpuMode = 0                                        //是否启用GPU硬解,0-不启用,1-启用
+        var wndId = -1                                         //播放窗口序号(在2x2以上布局下可指定播放窗口)
 
-      cameraIndexCode = cameraIndexCode.replace(/(^\s*)/g, '')
-      cameraIndexCode = cameraIndexCode.replace(/(\s*$)/g, '')
+        cameraIndexCode = cameraIndexCode.replace(/(^\s*)/g, '')
+        cameraIndexCode = cameraIndexCode.replace(/(\s*$)/g, '')
 
-      this.oWebControl.JS_RequestInterface({
-        funcName: 'startPreview',
-        argument: JSON.stringify({
-          cameraIndexCode: cameraIndexCode,                //监控点编号
-          streamMode: streamMode,                         //主子码流标识
-          transMode: transMode,                           //传输协议
-          gpuMode: gpuMode,                               //是否开启GPU硬解
-          wndId: wndId                                     //可指定播放窗口
+        this.oWebControl.JS_RequestInterface({
+          funcName: 'startPreview',
+          argument: JSON.stringify({
+            cameraIndexCode: cameraIndexCode,                //监控点编号
+            streamMode: streamMode,                         //主子码流标识
+            transMode: transMode,                           //传输协议
+            gpuMode: gpuMode,                               //是否开启GPU硬解
+            wndId: wndId                                     //可指定播放窗口
+          })
         })
-      })
-    },
-    //初始化
-    init(newappkey,newloginIp,newsecret,newloginPort) {
-      let that = this
-      that.getPubKey(function() {
-        ////////////////////////////////// 请自行修改以下变量值	////////////////////////////////////
-        var appkey = newappkey                           //综合安防管理平台提供的appkey,必填
-        var secret = that.setEncrypt(newsecret)   //综合安防管理平台提供的secret,必填
-        var ip = newloginIp                           //综合安防管理平台IP地址,必填
-        var playMode = 0                                  //初始播放模式:0-预览,1-回放
-        var port = Number(newloginPort)                                    //综合安防管理平台端口,若启用HTTPS协议,默认443
-        var snapDir = 'D:\\SnapDir'                       //抓图存储路径
-        var videoDir = 'D:\\VideoDir'                     //紧急录像或录像剪辑存储路径
-        var layout = '1x1'                                //playMode指定模式的布局
-        var enableHTTPS = 1                               //是否启用HTTPS协议与综合安防管理平台交互,这里总是填1
-        var encryptedFields = 'secret'					   //加密字段,默认加密领域为secret
-        var showToolbar = 1                               //是否显示工具栏,0-不显示,非0-显示
-        var showSmart = 1                                 //是否显示智能信息(如配置移动侦测后画面上的线框),0-不显示,非0-显示
-        var buttonIDs = '0,16,256,257,258,259,260,512,513,514,515,516,517,768,769'  //自定义工具条按钮
-        ////////////////////////////////// 请自行修改以上变量值	////////////////////////////////////
+      },
+      //初始化
+      init(newappkey,newloginIp,newsecret,newloginPort) {
+        let that = this
+        that.getPubKey(function() {
+          ////////////////////////////////// 请自行修改以下变量值	////////////////////////////////////
+          var appkey = newappkey                           //综合安防管理平台提供的appkey,必填
+          var secret = that.setEncrypt(newsecret)   //综合安防管理平台提供的secret,必填
+          var ip = newloginIp                           //综合安防管理平台IP地址,必填
+          var playMode = 0                                  //初始播放模式:0-预览,1-回放
+          var port = Number(newloginPort)                                    //综合安防管理平台端口,若启用HTTPS协议,默认443
+          var snapDir = 'D:\\SnapDir'                       //抓图存储路径
+          var videoDir = 'D:\\VideoDir'                     //紧急录像或录像剪辑存储路径
+          var layout = '1x1'                                //playMode指定模式的布局
+          var enableHTTPS = 1                               //是否启用HTTPS协议与综合安防管理平台交互,这里总是填1
+          var encryptedFields = 'secret'					   //加密字段,默认加密领域为secret
+          var showToolbar = 1                               //是否显示工具栏,0-不显示,非0-显示
+          var showSmart = 1                                 //是否显示智能信息(如配置移动侦测后画面上的线框),0-不显示,非0-显示
+          var buttonIDs = '0,16,256,257,258,259,260,512,513,514,515,516,517,768,769'  //自定义工具条按钮
+          ////////////////////////////////// 请自行修改以上变量值	////////////////////////////////////
 
+          that.oWebControl.JS_RequestInterface({
+            funcName: 'init',
+            argument: JSON.stringify({
+              appkey: appkey,                            //API网关提供的appkey
+              secret: secret,                            //API网关提供的secret
+              ip: ip,                                    //API网关IP地址
+              playMode: playMode,                        //播放模式(决定显示预览还是回放界面)
+              port: port,                                //端口
+              snapDir: snapDir,                          //抓图存储路径
+              videoDir: videoDir,                        //紧急录像或录像剪辑存储路径
+              layout: layout,                            //布局
+              enableHTTPS: enableHTTPS,                  //是否启用HTTPS协议
+              encryptedFields: encryptedFields,          //加密字段
+              showToolbar: showToolbar,                  //是否显示工具栏
+              showSmart: showSmart,                      //是否显示智能信息
+              buttonIDs: buttonIDs                       //自定义工具条按钮
+            })
+          }).then(function(oData) {
+            that.oWebControl.JS_Resize(1020, 600)  // 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
+          })
+        })
+      },
+      //获取公钥
+      getPubKey(callback) {
+        let that = this
         that.oWebControl.JS_RequestInterface({
-          funcName: 'init',
+          funcName: 'getRSAPubKey',
           argument: JSON.stringify({
-            appkey: appkey,                            //API网关提供的appkey
-            secret: secret,                            //API网关提供的secret
-            ip: ip,                                    //API网关IP地址
-            playMode: playMode,                        //播放模式(决定显示预览还是回放界面)
-            port: port,                                //端口
-            snapDir: snapDir,                          //抓图存储路径
-            videoDir: videoDir,                        //紧急录像或录像剪辑存储路径
-            layout: layout,                            //布局
-            enableHTTPS: enableHTTPS,                  //是否启用HTTPS协议
-            encryptedFields: encryptedFields,          //加密字段
-            showToolbar: showToolbar,                  //是否显示工具栏
-            showSmart: showSmart,                      //是否显示智能信息
-            buttonIDs: buttonIDs                       //自定义工具条按钮
+            keyLength: 1024
           })
         }).then(function(oData) {
-          that.oWebControl.JS_Resize(1020, 600)  // 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
-        })
-      })
-    },
-    //获取公钥
-    getPubKey(callback) {
-      let that = this
-      that.oWebControl.JS_RequestInterface({
-        funcName: 'getRSAPubKey',
-        argument: JSON.stringify({
-          keyLength: 1024
+          console.log(oData)
+          if (oData.responseMsg.data) {
+            that.pubKey = oData.responseMsg.data
+            callback()
+          }
         })
-      }).then(function(oData) {
-        console.log(oData)
-        if (oData.responseMsg.data) {
-          that.pubKey = oData.responseMsg.data
-          callback()
-        }
-      })
-    },
+      },
 //RSA加密
-    setEncrypt(value) {
-      var encrypt = new JSEncrypt()
-      encrypt.setPublicKey(this.pubKey)
-      return encrypt.encrypt(value)
-    },
-    /** ----------------------------------海康摄像头预览结束------------------------------------- */
+      setEncrypt(value) {
+        var encrypt = new JSEncrypt()
+        encrypt.setPublicKey(this.pubKey)
+        return encrypt.encrypt(value)
+      },
+      /** ----------------------------------海康摄像头预览结束------------------------------------- */
 
+    }
   }
-}
 </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>

+ 58 - 23
src/views/system/login.vue

@@ -1,30 +1,34 @@
 <template>
-  <div class="login">
+  <div class="login" :style="{backgroundImage: 'url('+backgroudImg+')'}">
+    <StarBackground />
     <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
-      <h3 class="title">数字四平态势感知监管平台</h3>
+      <h3 class="sub-title" v-if="systemTitle.subTitle">{{systemTitle.subTitle}}</h3>
+      <h3 class="title">{{systemTitle.title}}</h3>
+
       <div class="login-container">
         <h4>请登录</h4>
         <el-form-item prop="username">
-          <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号" class="m-b-15">
-            <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon"/>
+          <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号"
+                    class="m-b-15">
+            <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
           </el-input>
         </el-form-item>
         <el-form-item prop="password">
           <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
                     @keyup.enter.native="handleLogin" class="m-b-15">
-            <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon"/>
+            <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
           </el-input>
         </el-form-item>
         <el-form-item prop="code" v-if="captchaOnOff">
           <el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%"
                     @keyup.enter.native="handleLogin">
-            <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon"/>
+            <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
           </el-input>
           <div class="login-code">
-            <img :src="codeUrl" @click="getCode" class="login-code-img"/>
+            <img :src="codeUrl" @click="getCode" class="login-code-img" />
           </div>
         </el-form-item>
-        <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
+        <!--				<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>-->
         <el-form-item style="width:100%;">
           <el-button :loading="loading" size="medium" type="primary" style="width:100%;"
                      @click.native.prevent="handleLogin">
@@ -41,9 +45,13 @@
 </template>
 
 <script>
+  import StarBackground from '@/components/star'
   import {
-    getCodeImg
+    getCodeImg,fontConfig,getSecretKey
   } from '@/api/login'
+  import {
+    encryptedData
+  } from '@/api/encrypt'
   import Cookies from 'js-cookie'
   import {
     encrypt,
@@ -51,13 +59,24 @@
   } from '@/utils/jsencrypt'
 
   export default {
+    beforeCreate: function() {
+      document.getElementsByTagName('body')[0].style.overflow = 'hidden'
+    },
     name: 'Login',
+    components:{
+      StarBackground
+    },
     data() {
       return {
+        backgroudImg:'', //背景图片
+        systemTitle:{
+          title:'',  //标题
+          subTitle:''  ,//副标题 数字交通
+        },
         codeUrl: '',
         loginForm: {
-          username: 'admin',
-          password: 'admin123',
+          username: '',
+          password: '',
           rememberMe: false,
           code: '',
           uuid: ''
@@ -98,8 +117,16 @@
     created() {
       this.getCode()
       this.getCookie()
+      this.fontConfig()
     },
     methods: {
+      fontConfig(){
+        fontConfig().then(res => {
+          this.systemTitle.title = res.data.fontTitle;
+          this.systemTitle.subTitle = res.data.subTitle;
+          this.backgroudImg = res.data.picUrl;
+        })
+      },
       getCode() {
         getCodeImg().then(res => {
           this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff
@@ -140,18 +167,21 @@
               Cookies.remove('password')
               Cookies.remove('rememberMe')
             }
-            this.$store.dispatch('Login', this.loginForm).then(() => {
-              console.log('!@!@!@', this.redirect)
-              this.$router.push({
-                //path: this.redirect || '/'
-                path: '/'
+            //登录前先获取密码加密传输的公钥,对密码进行加密
+            getSecretKey().then(res => {
+              const encryptedPassword = encryptedData(res.data,this.loginForm.password);
+              this.loginForm.password = encryptedPassword;
+              this.$store.dispatch('Login', this.loginForm).then(() => {
+                this.$router.push({
+                  //path: this.redirect || '/'
+                  path: '/'
+                })
               }).catch(() => {
+                this.loading = false
+                if (this.captchaOnOff) {
+                  this.getCode()
+                }
               })
-            }).catch(() => {
-              this.loading = false
-              if (this.captchaOnOff) {
-                this.getCode()
-              }
             })
           }
         })
@@ -175,7 +205,13 @@
   .m-b-15 {
     margin-bottom: 15px;
   }
-
+  .sub-title{
+    margin: 0px auto 10px auto;
+    text-align: center;
+    color: #fff;
+    font-family: $fontFk;
+    font-size: 55px;
+  }
   .title {
     margin: 0px auto 30px auto;
     text-align: center;
@@ -187,7 +223,6 @@
 
   .login-form {
     border-radius: 6px;
-    margin-left: 25%;
     display: flex;
     flex-direction: column;
     align-items: center;

+ 3 - 7
src/views/traffic.vue

@@ -305,7 +305,7 @@
                     <div class="bgt-info-name">{{ item.reportor }} {{ item.eventName }}</div>
                     <div class="bgt-info-place">
                       <ul>
-                        <li>{{ item.reportTime }}</li>
+                        <li>{{ item.createTime }}</li>
                       </ul>
                     </div>
                   </div>
@@ -430,7 +430,6 @@ export default {
     /** ----------------------------------weosocket开始------------------------------------- */
     // this.initWebSocket()
     /** ----------------------------------weosocket结束------------------------------------- */
-    // this.selectTaskList()//获取任务
   },
   data() {
     return {
@@ -571,7 +570,7 @@ export default {
             '<span>' +
             '                  <div class="d-l-con">' +
             '                  <div class="d-l-l-text">' +
-            '                  <h4>事件时间:' + this.eventList[i].reportTime + '</h4>' +
+            '                  <h4>事件时间:' + this.eventList[i].createTime + '</h4>' +
             '                </div>' +
             '                </div>' +
             '                </span>'
@@ -795,9 +794,6 @@ export default {
         }]
       })
     },
-    selectTaskList() {
-      this.$refs.bottomMenu.selectTaskList()
-    },
     getBaseInfo() {
       /**左侧获取部门基本情况**/
       getBaseInfo().then(res => {
@@ -924,7 +920,7 @@ export default {
               '<span>' +
               '                  <div class="d-l-con">' +
               '                  <div class="d-l-l-text">' +
-              '                  <h4>事件时间:' + this.eventList[i].reportTime + '</h4>' +
+              '                  <h4>事件时间:' + this.eventList[i].createTime + '</h4>' +
               '                </div>' +
               '                </div>' +
               '                </span>'

+ 5 - 5
vue.config.js

@@ -8,7 +8,7 @@ function resolve(dir) {
 const CompressionPlugin = require('compression-webpack-plugin')
 
 // const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题
-const name = '通榆县乡村振兴监管平台' // 网页标题
+const name = '四平市态势感知平台' // 网页标题
 
 const port = process.env.port || process.env.npm_config_port || 80 // 端口
 
@@ -35,10 +35,10 @@ module.exports = {
     host: '0.0.0.0',
     port: port,
     open: true,
-    https:{
-      cert : fs.readFileSync(ssl_path.join(__dirname,'src/ssl/supermap.pem')),
-      key : fs.readFileSync(ssl_path.join(__dirname,'src/ssl/supermap.key'))
-    },
+    // https:{
+    //   cert : fs.readFileSync(ssl_path.join(__dirname,'src/ssl/supermap.pem')),
+    //   key : fs.readFileSync(ssl_path.join(__dirname,'src/ssl/supermap.key'))
+    // },
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {