Quellcode durchsuchen

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

王通 vor 2 Jahren
Ursprung
Commit
4aba90fff0

+ 2 - 2
src/assets/styles/base.scss

@@ -86,8 +86,8 @@ $date-state3: #d6333b;
 }
 //电视墙视频摄像头预览弹层样式
 .TVWallCustomWidth {
-  width: 1150px !important;
-  height: 700px !important;
+  width: 1200px !important;
+  height: 750px !important;
 }
 
 //公共

+ 5 - 5
src/components/vBottomMenu.vue

@@ -423,11 +423,11 @@
 						icon: 'iconfont sj-icon-sjdw',
 						click: 'eventLocation'
 					},
-					{
-						name: '图层切换',
-						icon: 'iconfont sj-icon-tcqh',
-						click: 'layerSwitching'
-					},
+					// {
+					// 	name: '图层切换',
+					// 	icon: 'iconfont sj-icon-tcqh',
+					// 	click: 'layerSwitching'
+					// },
 					{
 						name: '测量工具',
 						icon: 'iconfont sj-icon-clgj',

+ 1 - 1
src/utils/request.js

@@ -20,7 +20,7 @@ const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分
   baseURL: process.env.VUE_APP_BASE_API,
   // 超时
-  timeout: 10000
+  timeout: 20000
 })
 
 // request拦截器

+ 30 - 26
src/views/eventdetailsdialog.vue

@@ -240,10 +240,15 @@
                               <div class="z-info-btm-input-btn"
                                    v-else-if="eventStatusValue=='forest_event_status_5'&&statusFlag=='1'">
                                 <el-button size="small"
-                                           icon="el-icon-success" style="text-align:left"
+                                           icon="el-icon-success" style="text-align:left" v-if="eventType == 1"
                                            @click="updateCentereventTEventcatalogueStatus('gd',false)">
                                   填报
                                 </el-button>
+                                <el-button size="small"
+                                           icon="el-icon-success" style="text-align:left" v-if="eventType != 1"
+                                           @click="updateCentereventTEventcatalogueStatus('gd',true)">
+                                  归档
+                                </el-button>
                                 <el-button size="small" icon="el-icon-chat-dot-square" @click="sendEventLog()">发送
                                 </el-button>
                               </div>
@@ -1777,30 +1782,33 @@ 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(that.eventType==1){
+            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(!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
+              that.$message.error(`疏密度不能为空!`)
+              return
+            }
           }
 
+
           //事件处理流程--归档
           let param = {
             deptId: that.deptId,
@@ -1838,10 +1846,6 @@ export default {
               return
             }
             if (eventStatus == 'qs') {
-              if (that.sendHuoZaiBanJing == '' || that.sendHuoZaiBanJing == 0) {
-                that.$message.error(`请输入火灾半径!`)
-                return
-              }
               if (that.sendEventType == '' || that.sendEventType == null) {
                 that.$message.error(`请选择事件类型!`)
                 return
@@ -2206,7 +2210,7 @@ export default {
         this.$Message.info('正在登陆客户端,请稍等......')
         return false
       }
-      this.ws.openVideo(cameraParams)
+      this.ws.openVideo([cameraParams])
     },
     /** ----------------------------------摄像头预览结束------------------------------------- */
 

+ 3 - 7
src/views/firespread.vue

@@ -1021,7 +1021,7 @@
         sendDeptId: null,//签收部门/发起部门
         sendDeptName: null,//签收部门/发起部门
         sendEventType: null,//事件类型
-        sendHuoZaiBanJing: null,//火灾报告
+        sendHuoZaiBanJing: 0,//火灾报告
         sendGuanLianYuAn: null,//关联预案
         sendUserFegin: [],//联系人
         sendTaskSource: null,//任务来源
@@ -1458,7 +1458,7 @@
         this.sendDeptName = null
         this.sendUserFegin = []
         this.sendEventType = null
-        this.sendHuoZaiBanJing = null
+        this.sendHuoZaiBanJing = 0
         this.sendGuanLianYuAn = null
         this.longitude = null
         this.latitude = null
@@ -1481,7 +1481,7 @@
         this.sendDeptName = null
         this.sendUserFegin = []
         this.sendEventType = null
-        this.sendHuoZaiBanJing = null
+        this.sendHuoZaiBanJing = 0
         this.sendGuanLianYuAn = null
         this.sendTaskTitle = null
         this.sendTaskSource = null
@@ -1767,10 +1767,6 @@
                 return
               }
               if (eventStatus == 'qs') {
-                if (that.sendHuoZaiBanJing == '' || that.sendHuoZaiBanJing == null) {
-                  that.$message.error(`请输入火灾半径!`)
-                  return
-                }
                 if (that.sendEventType == '' || that.sendEventType == null) {
                   that.$message.error(`请选择事件类型!`)
                   return

+ 15 - 25
src/views/forest.vue

@@ -187,6 +187,7 @@ import TVWall from '@/components/TVWall.vue' //电视墙弹窗
 import eventdetailsdialog from '@/views/eventdetailsdialog.vue' //事件详情弹窗
 import firespread from '@/views/firespread.vue' //事件详情弹窗
 
+import {selectConfigKey} from "@/api/system/config";
 let echarts = require('echarts')
 export default {
   components: {
@@ -216,12 +217,7 @@ export default {
     /** ----------------------------------weosocket开始------------------------------------- */
     // this.initWebSocket()
     /** ----------------------------------weosocket结束------------------------------------- */
-    setInterval(() => {
-      if (this.calendarDay == this.getCurrentDataStr()) {
-        // this.getEventList(this.getCurrentDataStr(),this.bigEventTypeId,this.smallEventTypeId,this.pageSize,this.pageNum,this.eventSearch,true);//day, bigEventTypeId,smallEventTypeId, pageSize, pageNum, eventSearch, loading
-        this.getEventByEventType(this.getCurrentDataStr(), true);
-      }
-    }, 3000)
+
     this.bottomMenuList() //获取底部公共组件消息和任务
   },
   data() {
@@ -720,14 +716,14 @@ export default {
     },
     /** ----------------------------------weosocket开始------------------------------------- */
     initWebSocket(userId, eventTypeDl, eventType) {        //初始化weosocket
-      const wsuri = 'ws://127.0.0.1:10003/eventPush/' + userId + '/' + eventTypeDl + '/' + eventType
-      this.websock = new WebSocket(wsuri)
-      console.log('建立websocket连接')
-      this.websock.onopen = this.websocketonopen
-      this.websock.onmessage = this.websocketonmessage
-      this.websock.onerror = this.websocketonerror
-      this.websock.onclose = this.websocketclose
-      this.websock.onclose = this.websocketclose
+      selectConfigKey('KSH_SOCKET').then(res => {
+        const wsuri = res.data + userId + '/' + eventTypeDl + '/' + eventType
+        this.websock = new WebSocket(wsuri)
+        console.log('建立websocket连接')
+        this.websock.onopen = this.websocketonopen
+        this.websock.onmessage = this.websocketonmessage
+        this.websock.onerror = this.websocketonerror
+      })
     },
     websocketonopen() { //连接建立之后执行send方法发送数据
       console.log('websocket连接成功')
@@ -740,19 +736,15 @@ export default {
     websocketonmessage(e) { //数据接收
       console.log('接收数据', e.data)
       // let data = "{\"fromId\":\"forest\",\"fromUserId\":\""+Cookies.get('username')+"\",\"toUserId\":\""+Cookies.get('username')+"\"}";
-      let data = "{\"fromId\":\"forest\",\"fromUserId\":\"admin\",\"toUserId\":\"admin\"}";
+      let data = "{\"fromId\":\"village\"}";
       if (this.calendarDay == this.getCurrentDataStr() && data != e.data) {
         // 处理收到的消息
         this.handleWebSoceketEvent(e.data)
 
-        // this.getEventListNew();
-        // this.getTodayEvents(this.getCurrentDataStr());
-        // this.getDeptEventCount(this.getCurrentDataStr());
-        // this.getEventByEventType(this.getCurrentDataStr());
-        // this.getEventByReportorOrder(this.getCurrentDataStr());
+        this.getEventByEventType(this.getCurrentDataStr(), true);
 
-        // this.$refs.bottomMenu.updateAlert();
-        // this.$refs.up.play();
+        this.$refs.bottomMenu.updateAlert();
+        this.$refs.up.play();
         // thes.$refs.up.pause();//停止播放音乐
       }
     },
@@ -792,9 +784,7 @@ export default {
      * @param {string} ping 心跳名称 默认字符串ping
      */
     sendPing(time = 5000, ping = {
-      'fromId': 'forest',
-      'fromUserId': Cookies.get('username'),
-      'toUserId': Cookies.get('username')
+      'fromId': 'village'
     }) {
       clearInterval(this.setIntervalWesocketPush)
       this.websock.send(JSON.stringify(ping))