浏览代码

Merge branch 'master' into dev

lyq 1 年之前
父节点
当前提交
3c31d8d888

+ 18 - 0
event-ui/src/api/event/eventhandling/eventhandling.js

@@ -19,3 +19,21 @@ export function updateCentereventTEventcatalogueStatus(param) {
     data: param
   })
 }
+
+//审核
+export function eventExamine(param) {
+  return request({
+    url: '/center-event/eventcatalogue/eventExamine',
+    method: 'post',
+    data: param
+  })
+}
+
+// 查询事件详情
+export function getEventDetail(param) {
+  return request({
+    url: '/center-event/eventview/getEventDetail',
+    method: 'post',
+    data: param
+  })
+}

+ 108 - 3
event-ui/src/views/event/eventhandling/index.vue

@@ -18,6 +18,7 @@
       <el-table-column type="selection" align="center" width="50"/>
       <!--<el-table-column label="事件编号" align="center" prop="eventCode" width="150"/>-->
       <el-table-column label="事件名称" align="center" prop="eventName"/>
+      <el-table-column label="事件状态" align="center" prop="eventStatus"/>
       <el-table-column label="事件图片" align="center" prop="picturePathList">
         <template slot-scope="scope">
           <el-image
@@ -34,21 +35,38 @@
           <el-button size="small"
                      type="text"
                      icon="el-icon-s-flag"
+                     v-if = "scope.row.eventStatusValue == 'forest_event_status_1'"
                      @click="updateCentereventTEventcatalogueStatus('qr',scope.row)">
             确认
           </el-button>
           <el-button size="small"
                      type="text"
                      icon="el-icon-question"
+                     v-if = "scope.row.eventStatusValue == 'forest_event_status_1'"
                      @click="updateCentereventTEventcatalogueStatus('wb',scope.row)">
             误报
           </el-button>
           <el-button size="small"
                      type="text"
                      icon="el-icon-warning"
+                     v-if = "scope.row.eventStatusValue == 'forest_event_status_1'"
                      @click="updateCentereventTEventcatalogueStatus('cf',scope.row)">
             重复
           </el-button>
+          <el-button size="small"
+                     type="text"
+                     icon="el-icon-warning"
+                     v-if = "scope.row.eventStatusValue == 'forest_event_status_5' && scope.row.isExamine == '0'"
+                     @click="auditing(scope.row)">
+            审核
+          </el-button>
+          <el-button size="small"
+                     type="text"
+                     icon="el-icon-warning"
+                     v-if = "scope.row.eventStatusValue == 'forest_event_status_5' && scope.row.isExamine == '1'"
+                     @click="updateCentereventTEventcatalogueStatus('gd',scope.row)">
+            归档
+          </el-button>
           <el-button size="mini" type="text" icon="el-icon-document" @click="handleEventLog(scope.row)">事件日志
           </el-button>
         </template>
@@ -93,6 +111,31 @@
         </el-timeline>
       </div>
     </el-dialog>
+
+    <!--    审核-->
+    <el-dialog :title="title" :visible.sync="open" width="900px" class="form-style">
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="审核意见" prop="eventDescription">
+              <el-input v-model="form.eventDescription" placeholder="请输入审核意见" maxlength="20"/>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="附件" prop="attach">
+              <ImageUpload v-model="form.attach" ref="ImageUpload" :limit="100" :fileType="['png', 'jpg', 'jpeg']"
+                           :value="form.attach" @input="getUrl"></ImageUpload>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm(1)">通 过</el-button>
+        <el-button @click="submitForm(0)">不通过</el-button>
+      </div>
+    </el-dialog>
+
     <!-- 图片,视频预览 -->
     <el-dialog title="视频预览" :visible.sync="showTcPlayer" width="40%" customClass="customWidthMp4">
       <TcPlayer ref="TcPlayer" :playVideo="playVideo" :widthHeigt="[100,100]"></TcPlayer>
@@ -102,13 +145,14 @@
 <script>
 import {
   listAll,
-  updateCentereventTEventcatalogueStatus
+  eventExamine,
+  updateCentereventTEventcatalogueStatus,
+  getEventDetail
 } from "@/api/event/eventhandling/eventhandling";
 import {
   listcentereventtfirelog,
 } from "@/api/event/eventcatalogue/eventcatalogue";
 import Cookies from 'js-cookie';
-import {checkLat, checkLon} from "@/api/rules/rules";
 import TcPlayer from '@/components/TcPlayer'; // 视频预览
 export default {
   name: "Eventcatalogue",
@@ -145,6 +189,7 @@ export default {
       detailSee: true,
       // 表单参数
       form: {},
+      form1:{},
       fileNames: [],
       openLogSee: false,
       reverse: false,
@@ -156,10 +201,18 @@ export default {
         pageNum: 1,
         pageSize: 10,
         eventName: undefined,
+        eventStatusValue: null,
         day: this.getNowTime(),
       },
       // 表单校验
-      rules: {},
+      rules: {
+        eventDescription: [
+          {required: true, message: "审核意见不能为空", trigger: "blur"}
+        ],
+        attach: [
+          {required: true, message: "审核意见不能为空", trigger: "blur"}
+        ],
+      },
     };
   },
   created() {
@@ -168,6 +221,9 @@ export default {
     this.getList();
   },
   methods: {
+    getUrl(url) {
+      this.form.img = url;
+    },
     clickFile(fileUrl, fileName, fileType) {
       if (fileType == 'image') {
         return
@@ -216,6 +272,35 @@ export default {
         this.loading = false;
       });
     },
+    //审核
+    submitForm(isExamine) {
+      console.log(this.form)
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (undefined != this.form.img) {
+            this.form.attach =[]
+            var array = this.form.img.split(",");
+            for (var i = 0; i < array.length; i++) {
+              const index = array[i].indexOf('group1')
+              if (index !== -1) {
+                const val = array[i].substring(index)
+                this.form.attach.push({attachPath: val});
+              }
+            }
+          }
+          this.form.isExamine = isExamine
+          this.form.eventCode = this.form1.eventCode
+          this.form.eventName = this.form1.eventName
+          this.form.id = this.form1.id
+          this.form.version = this.form1.version
+          eventExamine(this.form).then(response =>{
+            this.$modal.msgSuccess("审核成功");
+            this.open = false;
+            this.getList();
+          });
+        }
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -295,6 +380,26 @@ export default {
         }
       })
     },
+    /** 审核按钮操作 */
+    auditing(row) {
+      this.open = true;
+      this.title = "事件审核";
+      this.form = {};
+      this.form1 = {};
+      this.form1.eventCode = row.eventCode
+      getEventDetail(this.form1).then(response => {
+        this.form1 = response.data.catalogue;
+      });
+    },
+    //归档
+    documentation(row) {
+      this.open = true;
+      this.title = "事件审核";
+      this.form1.eventCode = row.eventCode
+      getEventDetail(this.form1).then(response => {
+        this.form1 = response.data.catalogue;
+      });
+    },
   }
 };
 </script>

+ 2 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/bo/VisuForestCloudMapEventListBO.java

@@ -44,4 +44,6 @@ public class VisuForestCloudMapEventListBO {
     private String address;
 
     private String cameraCode;
+
+    private String isExamine;
 }

+ 3 - 2
src/main/resources/mapper/centereventteventcatalogue/CenterEventViewMapper.xml

@@ -411,9 +411,10 @@
     </select>
 
     <select id="listAll" parameterType="VisuForestCloudMapVO" resultType="VisuForestCloudMapEventListBO">
-        select id eventId, event_code eventCode, event_name eventName, version, address, create_by cameraCode
+        select id eventId, event_code eventCode, event_name eventName,event_status_value eventStatusValue,event_status eventStatus,is_examine isExamine, version, address, create_by cameraCode
         from centerevent_t_eventcatalogue
-        where event_status_value = 'forest_event_status_1' and report_source = 'reporting_source_1'
+        where event_status_value in ('forest_event_status_1','forest_event_status_5')
+         and report_source = 'reporting_source_1' and event_type_xl !='101'
         <if test="eventName != null and eventName != ''">
             and event_name like concat('%', #{eventName},'%')
         </if>