Quellcode durchsuchen

重复,误报逻辑修改

王通 vor 2 Jahren
Ursprung
Commit
f3daa4730e
3 geänderte Dateien mit 228 neuen und 10 gelöschten Zeilen
  1. 1 1
      src/router/index.js
  2. 6 6
      src/views/eventdetailsdialog.vue
  3. 221 3
      src/views/firespread.vue

+ 1 - 1
src/router/index.js

@@ -98,7 +98,7 @@ export const constantRoutes = [
     name: 'leader',
     component: () => import('@/views/leader'),
     meta: {
-      title: '环保人员'
+      title: '田长制'
     }
   },
   {

+ 6 - 6
src/views/eventdetailsdialog.vue

@@ -177,12 +177,12 @@
                                   </el-button>
                                   <el-button size="small"
                                              icon="el-icon-question"
-                                             @click="updateCentereventTEventcatalogueStatus('wb',false)">
+                                             @click="updateCentereventTEventcatalogueStatus('wb',true)">
                                     误报
                                   </el-button>
                                   <el-button size="small"
                                              icon="el-icon-warning"
-                                             @click="updateCentereventTEventcatalogueStatus('cf',false)">
+                                             @click="updateCentereventTEventcatalogueStatus('cf',true)">
                                     重复
                                   </el-button>
                                 </div>
@@ -2053,10 +2053,10 @@ export default {
           })
         } else {
           if (eventStatus == 'qs' || eventStatus == 'wb' || eventStatus == 'cf') {
-            if (that.sendDeptId == '' || that.sendDeptId == null || that.sendDeptName == '' || that.sendDeptName == null) {
-              that.$message.error(`请选择部门!`)
-              return
-            }
+            // if (that.sendDeptId == '' || that.sendDeptId == null || that.sendDeptName == '' || that.sendDeptName == null) {
+            //   that.$message.error(`请选择部门!`)
+            //   return
+            // }
             if (eventStatus == 'qs') {
               if (that.sendEventType == '' || that.sendEventType == null) {
                 that.$message.error(`请选择事件类型!`)

+ 221 - 3
src/views/firespread.vue

@@ -167,12 +167,12 @@
                                   </el-button>
                                   <el-button size="small"
                                              icon="el-icon-question"
-                                             @click="updateCentereventTEventcatalogueStatus('wb',false)">
+                                             @click="updateCentereventTEventcatalogueStatus('wb',true)">
                                     误报
                                   </el-button>
                                   <el-button size="small"
                                              icon="el-icon-warning"
-                                             @click="updateCentereventTEventcatalogueStatus('cf',false)">
+                                             @click="updateCentereventTEventcatalogueStatus('cf',true)">
                                     重复
                                   </el-button>
                                 </div>
@@ -985,7 +985,7 @@ import {
   getNewDataByDate,
   userFeginlist,
   fireControlViewList,
-  fireControlViewPoint
+  fireControlViewPoint, eventHandling
 } from '@/api/forest'
 import {
   treeselectAll as deptTreeselect
@@ -2446,6 +2446,224 @@ export default {
         }
       })
     },
+      async updateCentereventTEventcatalogueStatus(eventStatus, isSend) {
+      this.eventStatusButton = eventStatus
+      let that=this
+      if (!isSend) {//事件弹窗
+        if (eventStatus == 'qs') {//签收
+          that.eventConfirmTitle = '事件签收'
+          let param = { parentId: that.eventType }
+          if(that.eventTypeXl != null){
+            that.sendEventType = that.eventTypeXl;
+          }else{
+            await listSJfl(param).then(res => {
+              //事件类型
+              if (res.code == 200) {
+                that.eventTypeList = res.data
+              }
+            })
+          }
+          await listYuAn().then(res => {
+            //关联预案
+            if (res.code == 200) {
+              that.guanLianYuAnList = res.data
+            }
+          })
+          await selectByeventCode(that.eventCode).then(res => {
+            //签收部门
+            if (res.code == 200) {
+              that.deptOptions = res.data
+              that.deptNameitem = '签收部门'
+            }
+          })
+          that.showEventConfirm = true
+        } else if (eventStatus == 'qr') {//确认
+          that.eventConfirmTitle = '事件确认'
+        } else if (eventStatus == 'wb') {//误报
+          that.eventConfirmTitle = '事件误报'
+          await selectByeventCode(that.eventCode).then(res => {
+            //签收部门
+            if (res.code == 200) {
+              that.deptOptions = res.data
+              that.deptNameitem = '签收部门'
+            }
+          })
+          that.showEventConfirm = true
+        } else if (eventStatus == 'cf') {//重复
+          that.eventConfirmTitle = '事件重复'
+          await selectByeventCode(that.eventCode).then(res => {
+            //签收部门
+            if (res.code == 200) {
+              that.deptOptions = res.data
+              that.deptNameitem = '签收部门'
+            }
+          })
+          that.showEventConfirm = true
+        } else if (eventStatus == 'ld') {//联动
+          await selectByeventCode(that.eventCode).then(res => {
+            //签收部门
+            if (res.code == 200) {
+              that.deptOptions = res.data
+              that.deptNameitem = '发起部门'
+            }
+          })
+          that.eventConfirmTitle = '事件联动'
+          /** 查询部门树结构 */
+          await deptTreeselect().then(response => {
+            that.deptOptionsLiandong = response.data
+          })
+          that.showEventConfirm = true
+        } else if (eventStatus == 'gd') {//归档填报
+          that.showEventConfirm_gd = true
+        }
+      } else {//事件提交后台
+        if (eventStatus == 'ld') {
+          //事件处理流程--联动
+          let array = that.$refs.LiandongDept.getCheckedNodes()
+          if (array != null && array.length > 0) {
+            for (let i = 0; i < array.length; i++) {
+              that.sendLianDongDept.push({ 'taskDeptId': array[i].id, 'taskDeptName': array[i].label })
+            }
+          }
+          if (that.sendTaskSource == '' || that.sendTaskSource == null) {
+            that.$message.error(`请选择任务来源!`)
+            return
+          }
+          if (that.sendTaskContent == '' || that.sendTaskContent == null) {
+            that.$message.error(`请输入任务内容!`)
+            return
+          }
+          if (that.sendTaskTitle == '' || that.sendTaskTitle == null) {
+            that.$message.error(`请输入任务标题!`)
+            return
+          }
+          if (that.sendLianDongDept == '' || that.sendLianDongDept == null) {
+            that.$message.error(`请选择任务联动部门!`)
+            return
+          }
+          if (that.sendDeptId == '' || that.sendDeptId == null || that.sendDeptName == '' || that.sendDeptName == null) {
+            that.$message.error(`请选择任务发起部门!`)
+            return
+          }
+          let param = {
+            sendDeptId: that.sendDeptId,
+            sendDept: that.sendDeptName,
+            eventCode: that.eventCode,
+            longitude: that.longitude,
+            latitude: that.latitude,
+            taskTitle: that.sendTaskTitle,
+            taskSource: that.sendTaskSource,
+            taskContent: that.sendTaskContent,
+            taskDept: that.sendLianDongDept
+          }
+          sendTask(param).then(res => {
+            if (res.code == 200) {
+              that.$message.success(`联动发起成功!`)
+              that.refreshEventDialog(that.eventCode)
+              that.cancelEventConfirm_send()
+              that.showEventConfirm = false
+            }
+          })
+
+        } else if (eventStatus == 'gd') {
+          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(that.table2.porosities == '' || that.table2.porosities==null){
+              that.$message.error(`疏密度不能为空!`)
+              return
+            }
+          }
+
+          //事件处理流程--归档
+          let param = {
+            deptId: that.deptId,
+            eventCode: that.eventCode,
+            eventStatus: eventStatus,
+            id: that.eventId,
+            czlx: '',
+            forestFireLoss: { eventId: that.eventCode, table1: that.table1 },
+            fireInformation: { eventId: that.eventCode, table2: that.table2 },
+            array: that.regionalFlagObj.array
+          }
+          updateCentereventTEventcatalogueStatus(param).then(res => {
+            if (res.code == 200) {
+              that.$message.success(`处理成功!`)
+              that.refreshEvent(that.eventCode)
+              that.cancelEventConfirm_send()
+              that.showEventConfirm_gd = false
+              that.$emit('getEventList', that.calendarDay,10,1)
+              that.$emit('getSupermap', that.calendarDay)
+            }
+          })
+        } else if(eventStatus == 'cz'){
+          eventHandling(that.eventId,that.eventCode).then(res => {
+            if (res.code == 200) {
+              that.$message.success(`处理成功!`)
+              that.refreshEvent(that.eventCode)
+              that.cancelEventConfirm_send()
+              that.showEventConfirm = false
+            }
+          })
+        } else {
+          if (eventStatus == 'qs' || eventStatus == 'wb' || eventStatus == 'cf') {
+            // if (that.sendDeptId == '' || that.sendDeptId == null || that.sendDeptName == '' || that.sendDeptName == null) {
+            //   that.$message.error(`请选择部门!`)
+            //   return
+            // }
+            if (eventStatus == 'qs') {
+              if (that.sendEventType == '' || that.sendEventType == null) {
+                that.$message.error(`请选择事件类型!`)
+                return
+              }
+            }
+          } else {
+            that.sendDeptId = that.deptId
+          }
+          //事件处理流程
+          let param = {
+            phones:that.sendUserFegin,
+            eventCode: that.eventCode,
+            deptId: that.sendDeptId,
+            deptName: that.sendDeptName,
+            eventStatus: eventStatus,
+            eventType: that.sendEventType,
+            id: that.eventId,
+            czlx: '',
+            cameraCode: that.cameraCode,
+            fireRadius: that.sendHuoZaiBanJing,
+            reserve: that.sendGuanLianYuAn
+          }
+          updateCentereventTEventcatalogueStatus(param).then(res => {
+            if (res.code == 200) {
+              that.$message.success(`处理成功!`)
+              that.refreshEvent(that.eventCode)
+              that.cancelEventConfirm_send()
+              that.showEventConfirm = false
+              that.$emit('getEventList', that.calendarDay,10,1)
+              that.$emit('getSupermap', that.calendarDay)
+            }
+          })
+        }
+      }
+    },
     //RSA加密
     setEncrypt(value) {
       var encrypt = new JSEncrypt()