浏览代码

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

wangzhe 2 年之前
父节点
当前提交
23e9b700e8

+ 17 - 0
src/api/afforestation.js

@@ -15,3 +15,20 @@ export function getAfforestationArea(afforestationId) {
   })
 }
 
+// 获取植树造林任务列表
+export function listPublishTask(param) {
+  return request({
+    url: '/center-fire/VisuAfforestationController/listPublishTask',
+    method: 'post',
+    data: param
+  })
+}
+
+// 工作统计详情
+export function selectWorkCountById(id) {
+  return request({
+    url: '/center-fire/VisuAfforestationController/selectWorkCountById/'+id,
+    method: 'post',
+  })
+}
+

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

@@ -29,6 +29,7 @@ export const iconList = {
 
   //首页事件上报状态
   'sj-icon-map-xinshangbao': require('@/assets/icons/sj-icon-map/sj-icon-map-xinshangbao.png'),//新上报
+  'sj-icon-map-queren': require('@/assets/icons/sj-icon-map/sj-icon-map-queren.png'),//确认
   'sj-icon-map-cuiban': require('@/assets/icons/sj-icon-map/sj-icon-map-cuiban.png'),//催办
   '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'),//归档
@@ -46,4 +47,17 @@ export const iconList = {
   'sj-icon-map-centerdata-t-forest-firehydrant': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata-t-forest-firehydrant.png'),//消防栓
 
 
+  //动物保护图标
+  'forest_animal_hu': require('@/assets/images/dwbh/hu-1.png'),//虎,
+  'forest_animal_bao': require('@/assets/images/dwbh/bao-1.png'),//豹,
+  'forest_animal_she': require('@/assets/images/dwbh/she-1.png'),//蛇,
+  'forest_animal_ying': require('@/assets/images/dwbh/ying-1.png'),//鹰,
+  'forest_animal_tu': require('@/assets/images/dwbh/tuzi-1.png'),//兔子,
+  'forest_animal_huli': require('@/assets/images/dwbh/huli-1.png'),//狐狸,
+  'forest_animal_gouxiong': require('@/assets/images/dwbh/gouxiong-1.png'),//狗熊,
+  'forest_animal_yeji': require('@/assets/images/dwbh/yeji-1.png'),//野鸡,
+  'forest_animal_paozi': require('@/assets/images/dwbh/paozi-1.png'),//狍子,
+
+  //植树造林图标
+  'sj-icon-map-trees': require('@/assets/icons/sj-icon-map/trees/sj-icon-map-trees.png'),//狍子,
 }

+ 27 - 3
src/api/forest.js

@@ -242,10 +242,34 @@ export function dutysystemRemove(param) {
     params:param
   })
 }
-// 事件短信联系人
+
+// 通过部门id获取责任人
 export function userFeginlist(param) {
   return request({
-    url: '/center-fire/VisuForestCloudMapController/userFeginlist',
-    method: 'post'
+    url: '/system/user/selectUserWithPostByDeptId',
+    method: 'get',
+    params:param
+  })
+}
+
+// 获取消息个数
+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'
   })
 }

+ 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/icons/sj-icon-map/trees/sj-icon-map-trees.png


+ 22 - 0
src/assets/styles/base.scss

@@ -65,6 +65,7 @@ $eventStateColor-wb: #c2bc43;
 $eventStateColor-cf: #a23737;
 $eventStateColor-bj: #6ae08f;
 $eventStateColor-gd: #0369ef;
+$eventStateColor-qr: #20EF56;
 
 $eventStateColor-xsb: #11b57e;
 $eventStateColor-cb: #e63b4a;
@@ -2494,6 +2495,27 @@ div::-webkit-scrollbar {
         border-radius: .2rem;
       }
     }
+    //确认
+    .event-state-qr {
+      display: flex;
+      align-items: center;
+
+      i {
+        color: $eventStateColor-qr;
+        font-size: 1rem;
+        margin-left: -.5rem;
+      }
+
+      .event-list-state-qr {
+        width: fit-content;
+        background-color: $eventStateColor-qr;
+        color: $white;
+		    padding:0.25rem 0.4rem;
+        margin-left: -.5rem;
+        margin-bottom: .2rem;
+        border-radius: .2rem;
+      }
+    }
 
     .bgt-info-name {
       color: $inBlue;

+ 1 - 1
src/components/TVWall.vue

@@ -333,7 +333,6 @@ export default {
     preview() {
       getTVWallList().then(newres => {
         getDahuaVideoServer().then(newResponse => {
-          debugger
           this.ws.detectConnectQt().then(res => {
             if (res) { // 连接客户端成功
               this.alertLogin()
@@ -369,6 +368,7 @@ export default {
     },
 
     create(tvListJson) { // 调用创建控件接口
+      debugger
       let _this = this
       const params = [
         {

+ 203 - 44
src/components/eventLocation.vue

@@ -77,6 +77,12 @@
                             归档
                           </div>
                         </div>
+                        <div v-if="item.eventStatusValue=='forest_event_status_7'" class="event-state-qr">
+                          <i class="el-icon-caret-left"></i>
+                          <div class="event-list-state-qr">
+                            确认
+                          </div>
+                        </div>
                         <div class="bgt-info-name">{{ item.reportor }} {{ item.eventName }}</div>
                         <div class="bgt-info-place">
                           <ul>
@@ -315,7 +321,7 @@ export default {
         isAggregation: false
       }]
       let that = this
-      getNearEvent(that.longitude, that.latitude).then(res => {
+      getNearEvent(that.longitude, that.latitude,'').then(res => {
         that.markersList = []
         that.eventList = res.data
         if (that.eventList != null && that.eventList.length > 0) {
@@ -351,6 +357,9 @@ export default {
             } else if (that.eventList[i].eventStatusValue == 'forest_event_status_6') {
               markersMap.click = 'showEventDialog'
               markersMap.icon = 'sj-icon-map-guidang'
+            } else if (that.eventList[i].eventStatusValue == 'forest_event_status_7') {
+              markersMap.click = 'showEventDialog'
+              markersMap.icon = 'sj-icon-map-queren'
             }
             markersMap.parameter = that.eventList[i].eventCode
             markersMap.lng = that.eventList[i].longitude
@@ -393,7 +402,7 @@ export default {
             that.$refs.eventLocationSupermap.clearM(false)
             that.$refs.eventLocationSupermap.clearM(true)
             that.$refs.eventLocationSupermap.setMarkers(that.markersList)
-              that.$refs.eventLocationSupermap.setMarkers(marker)
+            that.$refs.eventLocationSupermap.setMarkers(marker)
           }, 1000)
         } else {
           setTimeout(() => {
@@ -436,10 +445,17 @@ export default {
                 icon: 'camera',
                 bindPopupHtml: '',
                 click: 'preview',
-                parameter: res.data[i].cameraCode,
                 keepBindPopup: false,
                 isAggregation: false
               }
+              if (res.data[i].cameraCode != null) {
+                markersMap.parameter = {
+                  code: res.data[i].cameraCode,
+                  type: res.data[i].cameraFactory
+                }
+              } else {
+                markersMap.parameter = []
+              }
               if (res.data.length > 50) {
                 markersMap.isAggregation = true
               }
@@ -489,7 +505,7 @@ export default {
               that.$refs.eventLocationSupermap.setMarkersRadius(that.cameraMarkersList)
               that.$refs.eventLocationSupermap.setMarkers(marker)
             }, 1000)
-          }else{
+          } else {
             setTimeout(() => {
               that.$refs.eventLocationSupermap.clearM(true)
               that.$refs.eventLocationSupermap.clearM(false)
@@ -520,50 +536,58 @@ export default {
     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
-      // 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)
-        that.$nextTick(() => {
-          console.log(that.oWebControl)
+    preview(cameraParam) {
+      if (cameraParam.type == '大华') {
+        getDahuaVideoServer().then(newResponse => {
+          console.log(newResponse)
+          this.ws.detectConnectQt().then(res => {
+            if (res) { // 连接客户端成功
+              this.alertLogin()
+              this.ws.login({
+                loginIp: newResponse.loginIp,
+                loginPort: newResponse.loginPort,
+                userName: newResponse.userName,
+                userPwd: newResponse.userPwd,
+                token: '',
+                https: 0
+              })
+              this.ws.on('loginState', (res) => {
+                this.isLogin = res
+                console.log('---res-----', res)
+                if (res) {
+                  this.alertLoginSuccess()
+                  this.activePanel = 'key2'
+                  this.realTimeVideoDialog(cameraParam.code)
+                } else {
+                  this.alertLoginFailed()
+                }
+              })
+            } else { // 连接客户端失败
+              this.alertReinstall()
+            }
+          })
+        })
+      } else if (cameraParam.type == '海康') {
+        let that = this
+        that.cameraVisible = true
+        getHaiKangVideoServer({ cameraCode: cameraParam.code }).then(newResponse => {
+          that.cameraTitle = '摄像头-' + newResponse.data.cameraName
+          that.initPlugin(newResponse.data.appkey, newResponse.data.loginIp, newResponse.data.secret, newResponse.data.loginPort)
           setTimeout(function() {
-            console.log(that.oWebControl)
             that.playhk(newResponse.data.channelCode)
           }, 5000)
         })
-      })
+      }
 
     },
     realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
@@ -571,10 +595,144 @@ export default {
         this.$Message.info('正在登陆客户端,请稍等......')
         return false
       }
-      this.ws.openVideo(cameraParams)
+      const params = [cameraParams]
+      this.ws.openVideo(params)
     },
     /** ----------------------------------摄像头预览结束------------------------------------- */
 
+
+    /** ----------------------------------海康摄像头预览开始------------------------------------- */
+    // 创建播放实例
+    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)  // 创建播放实例成功后初始化
+            })
+          }, function() { // 启动插件服务失败
+          })
+        },
+        cbConnectError: function() { // 创建WebControl实例失败
+          that.oWebControl = null
+          $('#playWnd').html('插件未启动,正在尝试启动,请稍候...<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
+          WebControl.JS_WakeUp('VideoWebPlugin://') // 程序未启动时执行error函数,采用wakeup来启动程序
+          initCount++
+          if (initCount < 3) {
+            setTimeout(function() {
+              that.initPlugin(newappkey, newloginIp, newsecret, newloginPort)
+            }, 3000)
+          } else {
+            $('#playWnd').html('插件启动失败,请检查插件是否安装!<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
+          }
+        },
+        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以上布局下可指定播放窗口)
+
+      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                                     //可指定播放窗口
+        })
+      })
+    },
+    //初始化
+    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: 'getRSAPubKey',
+        argument: JSON.stringify({
+          keyLength: 1024
+        })
+      }).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)
+    },
+    /** ----------------------------------海康摄像头预览结束------------------------------------- */
+
     /** ----------------------------------事件弹窗开始------------------------------------- */
     editableLayers(processedState) {
       if (processedState == 'notProcessedSupermap') {
@@ -767,6 +925,7 @@ export default {
     /** ----------------------------------海康摄像头预览结束------------------------------------- */
   }
 }
+
 // 推送消息
 function cbIntegrationCallBack(oData) {
   console.log(JSON.stringify(oData.responseMsg))

+ 49 - 16
src/components/supermap.vue

@@ -98,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'
 
@@ -120,6 +121,7 @@ export default {
       connectLayer: [],
       connectLayerTwo: [],
       graphicsLayer: [],
+      graphicsLayerTwo: [],
       latLngLayers: [],
       latLngGroup: [],
       isEditableLayers: false, //绘图控件
@@ -129,7 +131,8 @@ export default {
       heatMapLayer: [], //火灾蔓延图层Layer
       isheatPlotting: false,//火灾蔓延
       heat_lat: 0, //火灾蔓延经纬度
-      heat_lng: 0 //火灾蔓延经纬度
+      heat_lng: 0, //火灾蔓延经纬度
+      host:''
     }
   },
   watch: {
@@ -199,6 +202,7 @@ export default {
     }
   },
   mounted() {
+    this.getspuerMapHost()
     this.initMap()
     //添加画图的提示信息
     window.L.drawLocal.draw.toolbar = {
@@ -673,6 +677,12 @@ export default {
       }
       this.graphicsLayer = []
     },
+    clearGTwo: async function() { //清理地图图形
+      if (this.graphicsLayerTwo != undefined && this.graphicsLayerTwo != false) {
+        this.graphicsLayerTwo.clearLayers()
+      }
+      this.graphicsLayerTwo = []
+    },
     clearP: async function() { //清理点击事件落点
       if (this.latLngGroup != undefined && this.latLngGroup != false) {
         this.latLngGroup.clearLayers()
@@ -702,6 +712,7 @@ export default {
           return
         }
         getSuperMap(this.codes).then(resp => {
+
           let mapList = resp.data
           if (mapList != null && mapList.length > 0) {
             let url = mapList[0].url
@@ -1219,6 +1230,23 @@ export default {
         _that.graphicsLayer.addLayer(polygon)
       }
     },
+    setGraphicsListTwo: function(graphicsList, color) { //地图图形(林业植树造林双图层用)
+      const _that = this
+      let points = []
+      for (let i = 0; i < graphicsList.length; i++) {
+        points.push([graphicsList[i].lat, graphicsList[i].lng]) //创建点
+      }
+      let polygon = window.L.polygon(points, {
+        color: color
+      })
+      polygon.addTo(this.map)
+      if (this.graphicsLayerTwo != undefined && this.graphicsLayerTwo != false) {
+        _that.graphicsLayerTwo.addLayer(polygon)
+      } else {
+        _that.graphicsLayerTwo = window.L.featureGroup().addTo(this.map)
+        _that.graphicsLayerTwo.addLayer(polygon)
+      }
+    },
     dropLocation: function(lat, lng) { //落点定位
       this.map.flyTo([lat, lng], 13, { duration: 2 })
     },
@@ -1261,24 +1289,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)
     }
     /** ----------------------------------动态绘制结束------------------------------------- */

+ 7 - 8
src/components/v-fastmenu.vue

@@ -39,6 +39,8 @@
 <script>
 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() {
@@ -70,20 +72,17 @@ import { getUserProfile } from "@/api/system/user";
     },
 		methods: {
       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/newpage"
-        let toUrl = "http://10.6.52.1:15001/newpage"
-        window.location.href = toUrl
+        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);
         });
       },
       resetPwd(){

+ 42 - 29
src/components/vBottomMenu.vue

@@ -156,38 +156,19 @@
 			</el-popover>
 			<el-popover placement="top" trigger="click">
 				<div class="btm-r-pop-info">
-					<div class="btm-r-pop-info-box" v-for="(item,index) in 0">
-						<div class="btm-r-pop-info-tit">
-							<h3>火险任务</h3>
-						</div>
+					<div class="btm-r-pop-info-box" v-for="(item,index) in messageList">
 						<div class="btm-r-pop-info-con">
 							<div class="btm-r-pop-info-list">
-								<div class="btm-r-pop-info-list-name">标题</div>
-								<div class="btm-r-pop-info-list-text">四平阿斯利康大姐夫啊路上的风景可丽金啊水电分离家</div>
-							</div>
-							<div class="btm-r-pop-info-list">
-								<div class="btm-r-pop-info-list-name">发起人</div>
-								<div class="btm-r-pop-info-list-text">张三</div>
-							</div>
-							<div class="btm-r-pop-info-list">
-								<div class="btm-r-pop-info-list-name">发起时间</div>
-								<div class="btm-r-pop-info-list-text">2022-09-05 12:12:15</div>
-							</div>
-							<div class="btm-r-pop-info-list">
-								<div class="btm-r-pop-info-list-name">关联事件</div>
-								<div class="btm-r-pop-info-list-text">啊萨杜拉副科级啊萨杜拉副科级</div>
+								<div class="btm-r-pop-info-list-name">{{item.title}}</div>
+								<div class="btm-r-pop-info-list-text">{{item.content}}</div>
 							</div>
 						</div>
 						<div class="btm-r-pop-info-btm">
-							<el-link type="success">查看详情</el-link>
-							<div class="btm-r-pop-info-btm-btn">
-								<el-button type="danger">拒绝</el-button>
-								<el-button type="primary">领取</el-button>
-							</div>
+							<el-link type="success" @click="selectMessageById(item.id)">标记已读</el-link>
 						</div>
 					</div>
 				</div>
-				<el-badge :value="0" slot="reference">
+				<el-badge :value="messageCount" slot="reference">
 					<el-button size="small" icon="el-icon-chat-line-round">消息</el-button>
 				</el-badge>
 			</el-popover>
@@ -197,9 +178,9 @@
 				<div class="pulse"></div>
 				<div class="pulse-big"></div>
 			</div>
-			<el-badge type="primary">
-				<el-button size="small" icon="el-icon-bell" @click="updateAlertFalse">警报</el-button>
-			</el-badge>
+			<!--<el-badge type="primary">-->
+				<!--<el-button size="small" icon="el-icon-bell" @click="updateAlertFalse">警报</el-button>-->
+			<!--</el-badge>-->
 			<el-badge type="warning">
 				<el-button size="small" icon="el-icon-refresh-right" @click="refresh">刷新</el-button>
 			</el-badge>
@@ -371,7 +352,10 @@
 		getEventDetail,
 		selectTaskDtpts,
 		receiveTask,
-		refusedTask
+		refusedTask,
+    selectMessageCount,
+    selectMessageList,
+    selectMessageById
 	} from '@/api/forest'
 	import {
 		selectFarmByDeptId
@@ -381,6 +365,7 @@
 	} from '@/api/system/dept'
 	import supermapTaskDialog from '@/components/supermap' //超图
 	import TcPlayer from '@/components/TcPlayer' //视频预览
+  import Cookies from 'js-cookie';
 
 	export default {
 		components: {
@@ -512,15 +497,43 @@
 				btmCurrent: '',
 
 				eventWarn: false, //webSocket事件问题警报标记
+
+        messageCount: 0, //消息数量
+        messageList: 0, //消息列表
 			}
 		},
 		created() {
 			/** 查询部门树结构 */
 			deptTreeselect().then(response => {
 				this.deptOptionsLiandong = response.data
-			})
+			});
+
+      /** 获取消息个数 */
+      this.selectMessageCount();
+      /** 获取消息列表 */
+      this.selectMessageList();
 		},
 		methods: {
+      selectMessageById(id) {
+        selectMessageById(id).then(response => {
+          /** 获取消息个数 */
+          this.selectMessageCount();
+          /** 获取消息列表 */
+          this.selectMessageList();
+        });
+			},
+      /** 获取消息个数 */
+      selectMessageCount(){
+        selectMessageCount(Cookies.get("userId")).then(response => {
+          this.messageCount = response.data
+        });
+      },
+      /** 获取消息列表 */
+      selectMessageList(){
+        selectMessageList(Cookies.get("userId")).then(response => {
+          this.messageList = response.data
+        });
+      },
 			filterbanNode(value, data) {
 				//树搜索
 				if (!value) return true

+ 44 - 4
src/views/afforestation.vue

@@ -44,8 +44,33 @@
       <supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'disasterMap'" class="indexSupermapClass"
                 :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"></supermap>
       <!--底部 -->
-      <vBottomMenu ref="bottomMenu"></vBottomMenu>
 
+      <!-- 右侧 -->
+      <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="overflow-y" style="height: 72vh">
+                <div class="d-l-con"
+                     v-for="(item,index) in forestationTaskList"
+                     v-on:click="selectWorkCountById(item.points)">
+                  <div class="d-l-l-text">
+                    <i class="i-small"></i>
+                    <h4>{{ item.name }}</h4>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </dv-border-box-13>
+        </div>
+      </div>
+
+      <vBottomMenu ref="bottomMenu"></vBottomMenu>
     </div>
     <eventLocation ref="eventLocation"></eventLocation>
     <TVWall ref="TVWall"></TVWall>
@@ -54,7 +79,7 @@
 
 <script>
 import {
-  getAfforestation, getAfforestationArea
+  getAfforestation, getAfforestationArea,listPublishTask,selectWorkCountById
 } from '@/api/afforestation'
 /** ----------------------------------摄像头预览开始------------------------------------- */
 import {
@@ -87,7 +112,8 @@ export default {
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
   },
   mounted() {
-    this.getInit()
+    this.getInit();
+    this.listPublishTask();
   },
   data() {
     return {
@@ -102,8 +128,12 @@ export default {
       indentleft: '',
       indentright: '',
       indentText: '收起左右栏',
-      indentdisabled: false
+      indentdisabled: false,
 
+
+      //植树造林任务集合
+      forestationTaskList:[],
+      forestationDone: {}
     }
   },
 
@@ -185,6 +215,16 @@ export default {
         }, 1000)
       })
     },
+    listPublishTask() {
+      listPublishTask({}).then(res => {
+        this.forestationTaskList = res.data
+      })
+    },
+    selectWorkCountById(points){
+      const graphicsList = JSON.parse( points );
+      this.$refs.supermap.clearGTwo();
+      this.$refs.supermap.setGraphicsListTwo(graphicsList, 'blue');
+    },
     getAfforestationArea(afforestationId) {
       this.listCurrentIndex1 = afforestationId
       let that = this

+ 4 - 3
src/views/animal.vue

@@ -280,8 +280,9 @@ export default {
             let src= "";
             for (let j = 0; j < that.animalDwfbType.length; j++) {
               if(res.data[i].type == that.animalDwfbType[j].name){
-                // markersMap.icon = that.animalDwfb[j].type;
-                src = that.animalDwfbType[j].src;
+                markersMap.icon = that.animalDwfbType[j].type;
+                // src = that.animalDwfbType[j].src;
+                // markersMap.icon = that.animalDwfbType[j].src;
                 break;
               }
             }
@@ -307,7 +308,7 @@ export default {
               '<span>' +
               '                  <div class="d-l-con">' +
               '                  <div class="d-l-l-text">' +
-              '<img src="' + src + '" style="width: 150px;height: 100px"/>' +
+              '<img src="' + res.data[i].attachId + '" style="width: 150px;height: 100px"/>' +
               '                </div>' +
               '                </div>' +
               '                </span>'

+ 1 - 0
src/views/bigdata/bigdata.vue

@@ -372,6 +372,7 @@ export default {
 
       getEventInfoList(){
         getEventInfoList().then(res => {
+          debugger
           for(let i in res.data){
             const data = [];
             data.push(res.data[i].areaTotal);

+ 191 - 71
src/views/eventdetailsdialog.vue

@@ -170,6 +170,27 @@
                                 <div style="text-align:left">
                                   <el-button size="small"
                                              icon="el-icon-s-flag"
+                                             @click="updateCentereventTEventcatalogueStatus('qr',true)">
+                                    确认
+                                  </el-button>
+                                  <el-button size="small"
+                                             icon="el-icon-question"
+                                             @click="updateCentereventTEventcatalogueStatus('wb',false)">
+                                    误报
+                                  </el-button>
+                                  <el-button size="small"
+                                             icon="el-icon-warning"
+                                             @click="updateCentereventTEventcatalogueStatus('cf',false)">
+                                    重复
+                                  </el-button>
+                                </div>
+                                <el-button size="small" icon="el-icon-chat-dot-square" @click="sendEventLog()">发送
+                                </el-button>
+                              </div>
+                              <div class="z-info-btm-input-btn" v-else-if="eventStatusValue=='forest_event_status_7'">
+                                <div style="text-align:left">
+                                  <el-button size="small"
+                                             icon="el-icon-s-flag"
                                              @click="updateCentereventTEventcatalogueStatus('qs',false)">
                                     签收
                                   </el-button>
@@ -322,15 +343,18 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="联系人" v-if="eventStatusButton=='qs'">
-          <el-select multiple collapse-tags v-model='sendUserFegin' placeholder='请选择联系人!' clearable>
-            <el-option
-              v-for="item in userFeginList"
-              :label="item.nickName"
-              :value="item.phonenumber"
-            />
-          </el-select>
-        </el-form-item>
+        <!--<el-form-item label="联系人" v-if="eventStatusButton=='qs'">-->
+          <!--<el-select multiple collapse-tags v-model='sendUserFegin' placeholder='请选择联系人!' clearable filterable>-->
+            <!--<el-option-->
+              <!--v-for="item in userFeginList"-->
+              <!--:label="item.nickName"-->
+              <!--:value="item.phonenumber"-->
+            <!--/>-->
+          <!--</el-select>-->
+        <!--</el-form-item>-->
+        <el-button size="mini" type="primary" v-if="eventStatusButton=='qr'"
+                   @click="updateCentereventTEventcatalogueStatus('qr',false)">确认
+        </el-button>
         <el-button size="mini" type="primary" v-if="eventStatusButton=='qs'"
                    @click="updateCentereventTEventcatalogueStatus('qs',true)">签收
         </el-button>
@@ -385,9 +409,16 @@
               v-if="depteventId!=null&&depteventId!=''"
               @click="addLine">添加
             </el-button>
+            <el-button
+              size="mini"
+              type="danger"
+              v-if="depteventId!=null&&depteventId!=''"
+              @click="finUserByDept">选择
+            </el-button>
             <el-table
               :data="dutysystemTableData"
-              style="width: 100%">
+              style="width: 100%"
+              :rules="rules">
               <el-table-column prop="id" label="主键" v-if="false">
                 <template slot-scope="scope" hidden>
                   <el-input v-model="scope.row.id" readonly placeholder="主键"></el-input>
@@ -395,7 +426,7 @@
               </el-table-column>
               <el-table-column prop="name" label="姓名">
                 <template slot-scope="scope">
-                  <el-input v-model="scope.row.name" placeholder="姓名"></el-input>
+                  <el-input v-model="scope.row.name" placeholder="姓名" οninput="value=value.replace(/^[\u4e00-\u9fa5]{2,4}$/,'')"></el-input>
                 </template>
               </el-table-column>
               <el-table-column prop="post" label="岗位">
@@ -405,7 +436,7 @@
               </el-table-column>
               <el-table-column prop="telphone" label="手机号码">
                 <template slot-scope="scope">
-                  <el-input v-model="scope.row.telphone" placeholder="手机号码"></el-input>
+                  <el-input v-model="scope.row.telphone" placeholder="手机号码" οninput="value=value.replace(/^((13[0-9])|(14[5-9])|(15([0-3]|[5-9]))|(16[6-7])|(17[1-8])|(18[0-9])|(19[1|3])|(19[5|6])|(19[8|9]))\d{8}$/,'')"></el-input>
                 </template>
               </el-table-column>
               <el-table-column prop="bookbuytime" label="操作">
@@ -416,18 +447,18 @@
                     icon="el-icon-delete"
                     @click="handleDelete(scope.$index, scope.row)">删除
                   </el-button>
-                  <el-button
-                    size="mini"
-                    type="danger"
-                    icon="el-icon-save"
-                    @click="handleSave(scope.$index, scope.row)">保存
-                  </el-button>
+                  <!--<el-button-->
+                    <!--size="mini"-->
+                    <!--type="danger"-->
+                    <!--icon="el-icon-save"-->
+                    <!--@click="handleSave(scope.$index, scope.row)">保存-->
+                  <!--</el-button>-->
                 </template>
               </el-table-column>
             </el-table>
           </div>
         </div>
-        <el-button size="mini" type="primary" class="fr_button" @click="closeResponsibilityDialog">确定
+        <el-button size="mini" type="primary" class="fr_button" @click="addResponsibilityDialog">确定
         </el-button>
         <div style="clear: both;"></div>
       </el-form>
@@ -943,6 +974,9 @@
         <div id="playWnd" class="playWnd" style="left: 0px; top: 0px;"></div>
       </div>
     </el-dialog>
+    <el-dialog title="人员选择" :visible.sync="showFindUserByDept" width="40%">
+      <findUserByDept v-if="showFindUserByDept" ref="findUserByDept" :deptId="iconCurrentIndex" @addSelection="addSelection"></findUserByDept>
+    </el-dialog>
   </div>
 </template>
 
@@ -954,6 +988,7 @@ import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部
 import eventLogUpload from '@/views/eventLogUpload.vue' //日志上传文件
 import areaSupermap from '@/components/supermap'//区域标记地图
 import TcPlayer from '@/components/TcPlayer' //视频预览
+import findUserByDept from '@/views/findUserByDept' //责任人选择弹框
 import {
   getEventDetail,
   sendEventLog,
@@ -981,6 +1016,10 @@ import {
   hasConferences,
   createConferences, getUserInfo
 } from "@/api/meeting"
+import {
+  getDahuaVideoServer
+} from '@/api/dahua/dahua'
+import DHWs from '@/dahua/lib/DHWs'
 export default {
   dicts: ['task_source'],
   watch: {
@@ -994,12 +1033,15 @@ export default {
     supermapDialog,
     eventLogUpload,
     areaSupermap,
-    TcPlayer
+    TcPlayer,
+    findUserByDept
   },
   data() {
     return {
+      showFindUserByDept: false,//责任人选择框
       //海康
       cameraTitle: '',
+      cameraCode:'',
       cameraVisible: false,
       initCount: 0,
       pubKey: '',
@@ -1135,6 +1177,7 @@ export default {
       dataStatus: null,//事件流程按钮
       deptId: null,//事件流程部门
       eventCode: null,
+      eventName: null,
       longitude: null,
       latitude: null,
       eventLog: null,
@@ -1199,13 +1242,19 @@ export default {
       ],
       resourcesListCheck: [],
       //文本域
-      feedback: ''
+      feedback: '',
 
     }
   },
   props: {
     calendarDay: null//首页日历选择
   },
+  created() {
+    /** ----------------------------------摄像头预览开始------------------------------------- */
+    const DHWsInstance = DHWs.getInstance()
+    this.ws = DHWsInstance
+    /** ----------------------------------摄像头预览结束------------------------------------- */
+  },
   methods: {
     /************************************责任制-开始****************************************/
     addLine: function() {//添加负责人行数
@@ -1220,6 +1269,20 @@ export default {
       //添加新的行数
       this.dutysystemTableData.push(newValue)
     },
+    finUserByDept: function(){ //根据部门选择责任人
+      this.showFindUserByDept=true;
+    },
+    addSelection: function(userList){
+      for (let i in this.dutysystemTableData) {
+        for (let j in userList) {
+          if(this.dutysystemTableData[i].name == userList[j].name && this.dutysystemTableData[i].telphone == userList[j].telphone){
+            userList.splice(j, 1);
+          }
+        }
+      }
+      this.dutysystemTableData = this.dutysystemTableData.concat(userList);
+      this.showFindUserByDept=false;
+    },
     handleDelete: function(index, row) {//删除负责人行数
       if (row.id != null && row.id != '') {
         let param = { ids: row.id }
@@ -1258,8 +1321,8 @@ export default {
           }]
         }
       })
-
     },
+
     showResponsibility() {//弹出责任制弹窗
       let param = { eventCode: this.eventCode }
       centereventtdepteventList(param).then(res => {
@@ -1274,6 +1337,31 @@ export default {
       this.iconCurrentIndex = ''
       this.showResponsibilityDialog = false
     },
+    addResponsibilityDialog() {//责任制保存
+      let reg_user = /^[\u4e00-\u9fa5]{2,4}$/;    //2-4个中文字符正则
+      let reg_tel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;    //11位手机号码正则
+      for(let i in this.dutysystemTableData){
+        if(!reg_user.test(this.dutysystemTableData[i].name)){
+          this.$message.error(`请输入正确姓名!`)
+          return;
+        }
+        if(!reg_tel.test(this.dutysystemTableData[i].telphone)){
+          this.$message.error(`请输入正确手机号码!`)
+          return;
+        }
+
+        if(this.dutysystemTableData[i].id==null || this.dutysystemTableData[i].id==''){
+          this.dutysystemTableData[i].dept = this.dutysystemDeptName;
+          this.dutysystemTableData[i].depteventId = this.depteventId;
+        }
+      }
+      const param = {centereventTDutySystemList:this.dutysystemTableData,eventCode:this.eventCode,eventName:this.eventName}
+      dutysystemAdd(param).then(res => {
+        this.$message.success(`保存成功!`)
+        this.dutysystemSelect(this.iconCurrentIndex, this.dutysystemDeptName, this.depteventId);
+        this.closeResponsibilityDialog();
+      })
+    },
     /************************************责任制-结束****************************************/
     showheatPlotting() {
       // if (!this.$refs.supermapDialog.isheatPlotting) {
@@ -1356,7 +1444,9 @@ export default {
                 markersMap.icon = 'camera'
                 if (res.data[i].cameraCode != null) {
                   markersMap.click = 'preview'
-                  markersMap.parameter = res.data[i].cameraCode
+                  // markersMap.parameter = res.data[i].cameraCode
+                  markersMap.parameter = {code:res.data.data[i].cameraCode,
+                    type:res.data.data[i].cameraFactory}
                 }
               }
               markersMap.lng = res.data[i].longitude
@@ -1578,12 +1668,6 @@ export default {
               that.guanLianYuAnList = res.data
             }
           })
-          await userFeginlist().then(res => {
-            //联系人列表
-            if (res.code == 200) {
-              that.userFeginList = res.data
-            }
-          })
           await selectByeventCode(that.eventCode).then(res => {
             //签收部门
             if (res.code == 200) {
@@ -1592,6 +1676,8 @@ export default {
             }
           })
           that.showEventConfirm = true
+        } else if (eventStatus == 'qr') {//确认
+          that.eventConfirmTitle = '事件确认'
         } else if (eventStatus == 'wb') {//误报
           that.eventConfirmTitle = '事件误报'
           await selectByeventCode(that.eventCode).then(res => {
@@ -1679,6 +1765,30 @@ export default {
           })
 
         } else if (eventStatus == 'gd') {
+          let double = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;    //数字和两位小数
+          let number = /^[+]{0,1}(\d+)$/g;    //正整数
+
+          if(!double.test(that.table2.areaTotal)){
+            that.$message.error(`面积只能填写到小数后两位!`)
+            return
+          }
+          if(!number.test(that.table2.peopleTotal)){
+            that.$message.error(`人员请填写正整数!`)
+            return
+          }
+          if(that.table2.forestComposition == '' || that.table2.forestComposition==null){
+            that.$message.error(`林木组成不能为空!`)
+            return
+          }
+          if(that.table2.forestToken == '' || that.table2.forestToken==null){
+            that.$message.error(`林令不能为空!`)
+            return
+          }
+            if(that.table2.porosities == '' || that.table2.porosities==null){
+            that.$message.error(`疏密度不能为空!`)
+            return
+          }
+
           //事件处理流程--归档
           let param = {
             deptId: that.deptId,
@@ -1697,6 +1807,7 @@ export default {
               that.cancelEventConfirm_send()
               that.showEventConfirm_gd = false
               that.$emit('getEventList', that.calendarDay,10,1)
+              that.$emit('getSupermap', that.calendarDay)
             }
           })
         } else {
@@ -1728,8 +1839,10 @@ export default {
             eventType: that.sendEventType,
             id: that.eventId,
             czlx: '',
+            cameraCode: that.cameraCode,
             fireRadius: that.sendHuoZaiBanJing,
-            reserve: that.sendGuanLianYuAn
+            reserve: that.sendGuanLianYuAn,
+            fileList:eventStatus == 'qs'?this.eventLogList[this.eventLogList.length-1].fileVOs:[]
           }
           updateCentereventTEventcatalogueStatus(param).then(res => {
             if (res.code == 200) {
@@ -1738,6 +1851,7 @@ export default {
               that.cancelEventConfirm_send()
               that.showEventConfirm = false
               that.$emit('getEventList', that.calendarDay,10,1)
+              that.$emit('getSupermap', that.calendarDay)
             }
           })
         }
@@ -1784,6 +1898,7 @@ export default {
         that.eventId = res.data.catalogue.id
         that.longitude = res.data.catalogue.longitude
         that.latitude = res.data.catalogue.latitude
+        that.eventName = res.data.catalogue.eventName
         let markersMap = {
           lng: 124.59,
           lat: 43.02,
@@ -1806,6 +1921,8 @@ export default {
           markersMap.icon = 'sj-icon-map-banjie'
         } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_6') {
           markersMap.icon = 'sj-icon-map-guidang'
+        } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_7') {
+          markersMap.icon = 'sj-icon-map-queren'
         }
         markersMap.lng = res.data.catalogue.longitude
         markersMap.lat = res.data.catalogue.latitude
@@ -1819,13 +1936,14 @@ export default {
           that.$refs.supermapDialog.dropLocation10(res.data.catalogue.latitude, res.data.catalogue.longitude)
         }, 2000)
         if (res.data.centermonitorTCamera != null) {
+          that.cameraCode = res.data.centermonitorTCamera.cameraCode;
           let markersMap = {
             lng: 124.59,
             lat: 43.02,
             icon: 'camera',
             bindPopupHtml: '',
             click: 'preview',
-            parameter: res.data.centermonitorTCamera.cameraCode,
+            parameter: {code:res.data.centermonitorTCamera.cameraCode,type:res.data.centermonitorTCamera.cameraFactory},
             keepBindPopup: false,
             isAggregation: false,
             radius: 0
@@ -1864,6 +1982,7 @@ export default {
         that.eventId = res.data.catalogue.id
         that.latitude = res.data.catalogue.latitude
         that.longitude = res.data.catalogue.longitude
+        that.eventName = res.data.catalogue.eventName
         let markersMap = {
           lng: 124.59,
           lat: 43.02,
@@ -1886,6 +2005,8 @@ export default {
           markersMap.icon = 'sj-icon-map-banjie'
         } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_6') {
           markersMap.icon = 'sj-icon-map-guidang'
+        } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_7') {
+          markersMap.icon = 'sj-icon-map-queren'
         }
         markersMap.lng = res.data.catalogue.longitude
         markersMap.lat = res.data.catalogue.latitude
@@ -1908,7 +2029,7 @@ export default {
             icon: 'camera',
             bindPopupHtml: '',
             click: 'preview',
-            parameter: res.data.centermonitorTCamera.cameraCode,
+            parameter: {code:res.data.centermonitorTCamera.cameraCode,type:res.data.centermonitorTCamera.cameraFactory},
             keepBindPopup: false,
             isAggregation: false,
             radius: 0
@@ -2012,49 +2133,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)
-        that.$nextTick(()=>{
-          console.log(that.oWebControl)
+    preview(cameraParam) {
+      if(cameraParam.type=='大华'){
+        getDahuaVideoServer().then(newResponse => {
+          console.log(newResponse)
+          this.ws.detectConnectQt().then(res => {
+            if (res) { // 连接客户端成功
+              this.alertLogin()
+              this.ws.login({
+                loginIp: newResponse.loginIp,
+                loginPort: newResponse.loginPort,
+                userName: newResponse.userName,
+                userPwd: newResponse.userPwd,
+                token: '',
+                https: 0
+              })
+              this.ws.on('loginState', (res) => {
+                this.isLogin = res
+                console.log('---res-----', res)
+                if (res) {
+                  this.alertLoginSuccess()
+                  this.activePanel = 'key2'
+                  this.realTimeVideoDialog(cameraParam.code)
+                } else {
+                  this.alertLoginFailed()
+                }
+              })
+            } else { // 连接客户端失败
+              this.alertReinstall()
+            }
+          })
+        })
+      }else if(cameraParam.type=='海康'){
+        let that = this
+        that.cameraVisible = true
+        getHaiKangVideoServer({cameraCode:cameraParam.code}).then(newResponse => {
+          that.cameraTitle = '摄像头-'+newResponse.data.cameraName
+          that.initPlugin(newResponse.data.appkey,newResponse.data.loginIp,newResponse.data.secret,newResponse.data.loginPort)
           setTimeout(function() {
-            console.log(that.oWebControl)
             that.playhk(newResponse.data.channelCode)
           }, 5000)
         })
-      })
+      }
 
     },
     realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口

+ 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>

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


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


+ 53 - 47
src/views/monitor.vue

@@ -149,7 +149,7 @@ import {
 import {
   getHaiKangVideoServer
 } from '@/api/haikang/haikang'
-// import DHWs from '@/dahua/lib/DHWs'
+import DHWs from '@/dahua/lib/DHWs'
 
 /** ----------------------------------摄像头预览结束------------------------------------- */
   // import echarts from 'echarts'
@@ -165,8 +165,8 @@ export default {
   },
   created() {
     /** ----------------------------------摄像头预览开始------------------------------------- */
-    // const DHWsInstance = DHWs.getInstance()
-    // this.ws = DHWsInstance
+    const DHWsInstance = DHWs.getInstance()
+    this.ws = DHWsInstance
     /** ----------------------------------摄像头预览结束------------------------------------- */
 
     /** ----------------------------------底部按钮公用组件开始------------------------------------- */
@@ -215,7 +215,8 @@ export default {
       indentleft: '',
       indentright: '',
       indentText: '收起左右栏',
-      indentdisabled: false
+      indentdisabled: false,
+      domId: 'dom1',
     }
   },
   methods: {
@@ -455,7 +456,8 @@ export default {
               isAggregation: false
             }
             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 = []
             }
@@ -535,7 +537,6 @@ export default {
       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 = {
@@ -549,7 +550,8 @@ export default {
               isAggregation: false
             }
             if (res.data[i].channelCode != null) {
-              markersMap.parameter = res.data[i].cameraCode
+              markersMap.parameter = {code:res.data.data[i].cameraCode,
+                type:res.data.data[i].cameraFactory}
             } else {
               markersMap.parameter = []
             }
@@ -655,45 +657,48 @@ export default {
       }
     },
     /** 预览按钮操作 */
-    preview(cameraCode) {
-      let that = this
-      // getDahuaVideoServer().then(newResponse => {
-      //   console.log(newResponse)
-      //   this.ws.detectConnectQt().then(res => {
-      //     if (res) { // 连接客户端成功
-      //       this.alertLogin()
-      //       this.ws.login({
-      //         loginIp: newResponse.loginIp,
-      //         loginPort: newResponse.loginPort,
-      //         userName: newResponse.userName,
-      //         userPwd: newResponse.userPwd,
-      //         token: '',
-      //         https: 1
-      //       })
-      //       this.ws.on('loginState', (res) => {
-      //         this.isLogin = res
-      //         console.log('---res-----', res)
-      //         if (res) {
-      //           this.alertLoginSuccess()
-      //           this.activePanel = 'key2'
-      //           this.realTimeVideoDialog(channelCode)
-      //         } else {
-      //           this.alertLoginFailed()
-      //         }
-      //       })
-      //     } else { // 连接客户端失败
-      //       this.alertReinstall()
-      //     }
-      //   })
-      // })
-      that.cameraVisible = true
-      getHaiKangVideoServer({cameraCode:cameraCode}).then(newResponse => {
-        that.cameraTitle = '摄像头-'+newResponse.data.cameraName
-        that.initPlugin(newResponse.data.appkey,newResponse.data.loginIp,newResponse.data.secret,newResponse.data.loginPort)
-        setTimeout(function() {
-          that.playhk(newResponse.data.channelCode)
-        }, 5000)
-      })
+    preview(cameraParam) {
+      if(cameraParam.type=='大华'){
+        getDahuaVideoServer().then(newResponse => {
+          console.log(newResponse)
+          this.ws.detectConnectQt().then(res => {
+            if (res) { // 连接客户端成功
+              this.alertLogin()
+              this.ws.login({
+                loginIp: newResponse.loginIp,
+                loginPort: newResponse.loginPort,
+                userName: newResponse.userName,
+                userPwd: newResponse.userPwd,
+                token: '',
+                https: 0
+              })
+              this.ws.on('loginState', (res) => {
+                this.isLogin = res
+                console.log('---res-----', res)
+                if (res) {
+                  this.alertLoginSuccess()
+                  this.activePanel = 'key2'
+                  this.realTimeVideoDialog(cameraParam.code)
+                } else {
+                  this.alertLoginFailed()
+                }
+              })
+            } else { // 连接客户端失败
+              this.alertReinstall()
+            }
+          })
+        })
+      }else if(cameraParam.type=='海康'){
+        let that = this
+        that.cameraVisible = true
+        getHaiKangVideoServer({cameraCode:cameraParam.code}).then(newResponse => {
+          that.cameraTitle = '摄像头-'+newResponse.data.cameraName
+          that.initPlugin(newResponse.data.appkey,newResponse.data.loginIp,newResponse.data.secret,newResponse.data.loginPort)
+          setTimeout(function() {
+            that.playhk(newResponse.data.channelCode)
+          }, 5000)
+        })
+      }
 
     },
     realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
@@ -701,7 +706,8 @@ export default {
         this.$Message.info('正在登陆客户端,请稍等......')
         return false
       }
-      this.ws.openVideo(cameraParams)
+      const params = [cameraParams];
+      this.ws.openVideo(params)
     },
     /** ----------------------------------摄像头预览结束------------------------------------- */
 

+ 1 - 1
src/views/trees.vue

@@ -168,7 +168,7 @@ export default {
             let markersMap = {
               lng: 124.59,
               lat: 43.02,
-              icon: 'marker',
+              icon: 'sj-icon-map-trees',
               bindPopupHtml: '',
               click: 'showTreesDetails',
               parameter: {id:res.data[i].id},

+ 1 - 1
vue.config.js

@@ -53,7 +53,7 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         // target: `http://127.0.0.1:3031`,
-        target: `http://117.78.49.164:3031`,
+        target: `http://192.168.2.118:3031`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''