qinhouyu 1 rok temu
rodzic
commit
7aa02732a7

+ 8 - 0
src/api/forest.js

@@ -363,3 +363,11 @@ export function sendMessage(param) {
   })
 }
 
+// 事件审核
+export function eventExamine(param) {
+  return request({
+    url: '/center-event/eventcatalogue/eventExamine',
+    method: 'post',
+    data: param
+  })
+}

+ 4 - 5
src/components/ImageUpload/index.vue

@@ -53,12 +53,12 @@ export default {
     // 图片数量限制
     limit: {
       type: Number,
-      default: 5,
+      default: 1,
     },
     // 大小限制(MB)
     fileSize: {
        type: Number,
-      default: 5,
+      default: 10,
     },
     // 文件类型, 例如['png', 'jpg', 'jpeg']
     fileType: {
@@ -131,14 +131,13 @@ export default {
     },
     // 上传成功回调
     handleUploadSuccess(res) {
-      this.uploadList.push({ name: res.data.url, url: res.data.url });
+      this.uploadList.push({ name: res.data.url, url: res.data.webUrl });
       if (this.uploadList.length === this.number) {
         this.fileList = this.fileList.concat(this.uploadList);
         this.uploadList = [];
         this.number = 0;
-        console.log("213",this.fileList)
           // this.ImageUpload.setUrl(res.data.url)
-        this.$emit("input", this.listToString(this.fileList));
+        this.$emit("input", this.fileList);
         this.$modal.closeLoading();
       }
     },

+ 7 - 3
src/main.js

@@ -24,12 +24,14 @@ import DictData from '@/components/DictData'
 
 import './assets/icons' // icon
 import './permission' // permission control
-
+// 图片上传组件
+import ImageUpload from "@/components/ImageUpload"
 //DataV动效组件
 import dataV from '@jiaminghi/data-view'
 
-
-//公共过滤器 
+// 图片上传组件
+import ImageUpload from "@/components/ImageUpload"
+//公共过滤器
 import './filters'
 // //WebSocket封装方法
 // import * as socketApi from '@/api/socket'
@@ -45,6 +47,8 @@ Vue.use(VueCookies)
 Vue.use(directive)
 Vue.use(plugins)
 Vue.use(dataV)
+Vue.component('ImageUpload', ImageUpload)
+
 Vue.prototype.$echarts = echarts //挂载echarts
 DictData.install()
 

+ 128 - 4
src/views/eventdetailsdialog.vue

@@ -255,15 +255,22 @@
                               <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" v-if="eventTypeXl == 101"
+                                           icon="el-icon-success" style="text-align:left" v-if="eventTypeXl == 101&&statusFlag=='1'"
                                            @click="updateCentereventTEventcatalogueStatus('gd',false)">
                                   填报
                                 </el-button>
                                 <el-button size="small"
-                                           icon="el-icon-success" style="text-align:left" v-if="eventTypeXl != 101"
+                                           icon="el-icon-success" style="text-align:left" v-if="eventTypeXl != 101&&statusFlag=='1'"
                                            @click="updateCentereventTEventcatalogueStatus('gd',true)">
                                   归档
                                 </el-button>
+                                <el-button size="small" v-else-if="statusFlag=='2'" icon="el-icon-success"
+                                           style="text-align:left" @click="updateCentereventTEventcatalogueStatus('sh',false)">
+                                  审核
+                                </el-button>
+                                <el-button size="small" v-else icon="el-icon-loading" style="text-align:left">
+                                  请等待复核,复核通过后方可归档。
+                                </el-button>
                                 <el-button size="small" icon="el-icon-chat-dot-square" @click="sendEventLog()">发送
                                 </el-button>
                               </div>
@@ -295,7 +302,9 @@
         <el-form-item label="火灾半径" v-if="eventStatusButton=='qs'&&eventTypeXl==null">
           <el-input type="number" v-model="sendHuoZaiBanJing" placeholder="请输入火灾半径"/>
         </el-form-item>
-        <el-form-item :label="deptNameitem">
+        <el-form-item
+          v-if="eventStatusButton=='wb'||eventStatusButton=='qs'||eventStatusButton=='cf'||eventStatusButton=='ld'"
+          :label="deptNameitem">
           <!--          <treeselect v-model="deptId" :options="deptOptions" multiple :show-count="true"-->
           <!--                      placeholder="请选择签收部门"/>-->
           <el-select v-model="sendDeptName" clearable placeholder="请选择部门" class="m-r-1rem" @change="setValue"
@@ -366,6 +375,23 @@
             />
           </el-select>
         </el-form-item>
+        <el-form-item label="审核意见" v-if="eventStatusButton=='sh'">
+          <el-input type="textarea" v-model="eventDescription" :autosize="{ minRows: 7, maxRows: 7}"
+                    placeholder="请输入审核意见">
+          </el-input>
+        </el-form-item>
+        <el-form-item label="附件" prop="schedulePictures" v-if="eventStatusButton=='sh'">
+          <ImageUpload ref="ImageUpload" :limit="10" :fileType="['jpg', 'png','jpeg']" :value="uploadAttachList"
+                       @input="getUrl"></ImageUpload>
+          <!--<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-form-item label="联系人" v-if="eventStatusButton=='qs'">-->
           <!--<el-select multiple collapse-tags v-model='sendUserFegin' placeholder='请选择联系人!' clearable filterable>-->
             <!--<el-option-->
@@ -390,6 +416,12 @@
         <el-button size="mini" type="primary" v-if="eventStatusButton=='ld'"
                    @click="updateCentereventTEventcatalogueStatus('ld',true)">发起联动
         </el-button>
+        <el-button size="mini" type="primary" v-if="eventStatusButton=='sh'"
+                   @click="updateCentereventTEventcatalogueStatus('shtg',true)">通过
+        </el-button>
+        <el-button size="mini" type="primary" v-if="eventStatusButton=='sh'"
+                   @click="updateCentereventTEventcatalogueStatus('shbtg',true)">不通过
+        </el-button>
       </el-form>
     </el-dialog>
     <el-dialog title="调整预案" :visible.sync="showGuanLianYuAnConfirm" v-if="showGuanLianYuAnConfirm" width="50%"
@@ -1113,6 +1145,7 @@ import {
   dutysystemRemove,
   sendMessage,
   userFeginlist,
+  eventExamine,
   eventHandling,
   initByCameras
 } from '@/api/forest'
@@ -1191,6 +1224,9 @@ export default {
       deptOptionsLiandong: [],//联动部门
       eventStatusButton: null,//流程按钮标识
       eventConfirmTitle: null,//弹窗标题  ---签收 误报  重复
+      eventDescription: null, //审核意见
+      uploadAttachList: [], //审核上传图片回显集合
+      attachExamine: [], //审核图片集合
       defaultProps: {
         children: 'children',
         label: 'label'
@@ -1289,6 +1325,7 @@ export default {
       showEventConfirm_gd: false,//事件火险报告弹窗
       address: null,//事件上报地址
       eventStatusValue: null,//事件状态
+      isExamine: "0", //事件审核 1通过  0不通过
       eventId: null,//事件ID
       eventType: null,//事件类型-大类
       eventTypeXl: null,//事件类型-小类
@@ -1377,6 +1414,16 @@ export default {
     /** ----------------------------------摄像头预览结束------------------------------------- */
   },
   methods: {
+    getUrl(urlList) {
+      this.uploadAttachList = urlList
+      this.attachExamine = []
+      urlList.forEach(item => {
+        var attachPath = {
+          attachPath: item.name
+        }
+        this.attachExamine.push(attachPath)
+      });
+    },
     // 获取消防左侧菜单列表
     fireControlViewList() {
       this.resourcesList = [];
@@ -2022,6 +2069,9 @@ console.log(this.dutysystemTableData)
             that.deptOptionsLiandong = response.data
           })
           that.showEventConfirm = true
+        } else if (eventStatus == 'sh') { //审核
+          that.eventConfirmTitle = '事件审核'
+          that.showEventConfirm = true
         } else if (eventStatus == 'gd') {//归档填报
           that.showEventConfirm_gd = true
         }
@@ -2140,7 +2190,81 @@ console.log(this.dutysystemTableData)
               this.showEventDialog(that.eventCode)
             }
           })
-        } else if(eventStatus == 'cz'){
+        }
+        else if (eventStatus == 'shtg') {
+          that.eventStatusButton = 'sh'
+          if (that.eventDescription == '' || that.eventDescription == null) {
+            that.$message.error(`请填写审核意见!`)
+            return
+          }
+          if (that.attachExamine.length == 0 || that.attachExamine == null) {
+            that.$message.error(`请上传审核图片!`)
+            return
+          }
+          //事件处理流程--审核通过
+          let param = {
+            id: that.eventId, //事件id
+            eventCode: that.eventCode, //事件编号
+            eventName: that.eventName, //事件名称
+            isExamine: 1, //通过传1,不通过传0
+            version: that.version,
+            eventDescription: that.eventDescription, //审核意见
+            attach: that.attachExamine
+          }
+          eventExamine(param).then(res => {
+            if (res.code == 200) {
+              that.$message.success(`处理成功!`)
+              that.refreshEvent(that.eventCode)
+              that.cancelEventConfirm_send()
+              that.showEventConfirm = false
+            } else if (res.code == 304) {
+              console.log(that.eventCode)
+              this.$message.warning(res.msg)
+              this.showEventDialog(that.eventCode)
+              //获取事件详情
+            }
+            that.attachExamine = []
+            that.uploadAttachList = []
+            that.eventDescription = ""
+          })
+        } else if (eventStatus == 'shbtg') {
+          that.eventStatusButton = 'sh'
+          if (that.eventDescription == '' || that.eventDescription == null) {
+            that.$message.error(`请填写审核意见!`)
+            return
+          }
+          if (that.attachExamine.length == 0 || that.attachExamine == null) {
+            that.$message.error(`请上传审核图片!`)
+            return
+          }
+          //事件处理流程--审核不通过
+          let param = {
+            id: that.eventId, //事件id
+            eventCode: that.eventCode, //事件编号
+            eventName: that.eventName, //事件名称
+            isExamine: 0, //通过传1,不通过传0
+            version: that.version,
+            eventDescription: that.eventDescription, //审核意见
+            attach: that.attachExamine
+          }
+          eventExamine(param).then(res => {
+            if (res.code == 200) {
+              that.$message.success(`处理成功!`)
+              that.refreshEvent(that.eventCode)
+              that.cancelEventConfirm_send()
+              that.showEventConfirm = false
+            } else if (res.code == 304) {
+              console.log(that.eventCode)
+              this.$message.warning(res.msg)
+              this.showEventDialog(that.eventCode)
+              //获取事件详情
+            }
+            that.attachExamine = []
+            that.uploadAttachList = []
+            that.eventDescription = ""
+          })
+        }
+        else if(eventStatus == 'cz'){
           eventHandling(that.eventId,that.eventCode).then(res => {
             if (res.code == 200) {
               that.$message.success(`处理成功!`)

+ 133 - 4
src/views/firespread.vue

@@ -225,15 +225,22 @@
                               <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" v-if="eventTypeXl == 101"
+                                           icon="el-icon-success" style="text-align:left" v-if="eventTypeXl == 101&&statusFlag=='1'"
                                            @click="updateCentereventTEventcatalogueStatus('gd',false)">
                                   填报
                                 </el-button>
                                 <el-button size="small"
-                                           icon="el-icon-success" style="text-align:left" v-if="eventTypeXl != 101"
+                                           icon="el-icon-success" style="text-align:left" v-if="eventTypeXl != 101&&statusFlag=='1'"
                                            @click="updateCentereventTEventcatalogueStatus('gd',true)">
                                   归档
                                 </el-button>
+                                <el-button size="small" v-else-if="statusFlag=='2'" icon="el-icon-success"
+                                           style="text-align:left" @click="updateCentereventTEventcatalogueStatus('sh',false)">
+                                  审核
+                                </el-button>
+                                <el-button size="small" v-else icon="el-icon-loading" style="text-align:left">
+                                  请等待复核,复核通过后方可归档。
+                                </el-button>
                                 <el-button size="small" icon="el-icon-chat-dot-square" @click="sendEventLog()">发送
                                 </el-button>
                               </div>
@@ -960,7 +967,9 @@
         <el-form-item label="火灾半径" v-if="eventStatusButton=='qs'&&eventTypeXl==null">
           <el-input type="number" v-model="sendHuoZaiBanJing" placeholder="请输入火灾半径"/>
         </el-form-item>
-        <el-form-item :label="deptNameitem">
+        <el-form-item
+          v-if="eventStatusButton=='wb'||eventStatusButton=='qs'||eventStatusButton=='cf'||eventStatusButton=='ld'"
+          :label="deptNameitem">
           <!--          <treeselect v-model="deptId" :options="deptOptions" multiple :show-count="true"-->
           <!--                      placeholder="请选择签收部门"/>-->
           <el-select v-model="sendDeptName" clearable placeholder="请选择部门" class="m-r-1rem" @change="setValue"
@@ -1031,6 +1040,15 @@
             />
           </el-select>
         </el-form-item>
+        <el-form-item label="审核意见" v-if="eventStatusButton=='sh'">
+          <el-input type="textarea" v-model="eventDescription" :autosize="{ minRows: 7, maxRows: 7}"
+                    placeholder="请输入审核意见">
+          </el-input>
+        </el-form-item>
+        <el-form-item label="附件" prop="schedulePictures" v-if="eventStatusButton=='sh'">
+          <ImageUpload ref="ImageUpload" :limit="10" :fileType="['jpg', 'png','jpeg']" :value="uploadAttachList"
+                       @input="getUrl"></ImageUpload>
+        </el-form-item>
         <!--<el-form-item label="联系人" v-if="eventStatusButton=='qs'">-->
         <!--<el-select multiple collapse-tags v-model='sendUserFegin' placeholder='请选择联系人!' clearable filterable>-->
         <!--<el-option-->
@@ -1055,6 +1073,12 @@
         <el-button size="mini" type="primary" v-if="eventStatusButton=='ld'"
                    @click="updateCentereventTEventcatalogueStatus('ld',true)">发起联动
         </el-button>
+        <el-button size="mini" type="primary" v-if="eventStatusButton=='sh'"
+                   @click="updateCentereventTEventcatalogueStatus('shtg',true)">通过
+        </el-button>
+        <el-button size="mini" type="primary" v-if="eventStatusButton=='sh'"
+                   @click="updateCentereventTEventcatalogueStatus('shbtg',true)">不通过
+        </el-button>
       </el-form>
     </el-dialog>
     <el-dialog title="调整预案" :visible.sync="showGuanLianYuAnConfirm" v-if="showGuanLianYuAnConfirm" width="50%"
@@ -1766,6 +1790,7 @@ import {
   dutysystemRemove,
   getNewDataByDate,
   userFeginlist,
+  eventExamine,
   fireControlViewList,
   fireControlViewPoint, eventHandling
 } from '@/api/forest'
@@ -1890,6 +1915,9 @@ export default {
       deptOptionsLiandong: [],//联动部门
       eventStatusButton: null,//流程按钮标识
       eventConfirmTitle: null,//弹窗标题  ---签收 误报  重复
+      eventDescription: null, //审核意见
+      uploadAttachList: [], //审核上传图片回显集合
+      attachExamine: [], //审核图片集合
       defaultProps: {
         children: 'children',
         label: 'label'
@@ -1988,6 +2016,7 @@ export default {
       showEventConfirm_gd: false,//事件火险报告弹窗
       address: null,//事件上报地址
       eventStatusValue: null,//事件状态
+      isExamine: "0", //事件审核 1通过  0不通过
       eventId: null,//事件ID
       eventType: null,//事件类型-大类
       dataStatus: null,//事件流程按钮
@@ -2078,6 +2107,16 @@ export default {
     this.fireControlViewList();
   },
   methods: {
+    getUrl(urlList) {
+      this.uploadAttachList = urlList
+      this.attachExamine = []
+      urlList.forEach(item => {
+        var attachPath = {
+          attachPath: item.name
+        }
+        this.attachExamine.push(attachPath)
+      });
+    },
     /************************************责任制-开始****************************************/
     addLine: function() {//添加负责人行数
       var newValue = {
@@ -2679,6 +2718,9 @@ export default {
             that.deptOptionsLiandong = response.data
           })
           that.showEventConfirm = true
+        }  else if (eventStatus == 'sh') { //审核
+          that.eventConfirmTitle = '事件审核'
+          that.showEventConfirm = true
         } else if (eventStatus == 'gd') {//归档填报
           that.showEventConfirm_gd = true
         }
@@ -2796,7 +2838,94 @@ export default {
               this.showEventDialog(that.eventCode)
             }
           })
-        } else {
+        else if (eventStatus == 'shtg') {
+            that.eventStatusButton = 'sh'
+            if (that.eventDescription == '' || that.eventDescription == null) {
+              that.$message.error(`请填写审核意见!`)
+              return
+            }
+            if (that.attachExamine.length == 0 || that.attachExamine == null) {
+              that.$message.error(`请上传审核图片!`)
+              return
+            }
+            //事件处理流程--审核通过
+            let param = {
+              id: that.eventId, //事件id
+              eventCode: that.eventCode, //事件编号
+              eventName: that.eventName, //事件名称
+              isExamine: 1, //通过传1,不通过传0
+              version: that.version,
+              eventDescription: that.eventDescription, //审核意见
+              attach: that.attachExamine
+            }
+            eventExamine(param).then(res => {
+              if (res.code == 200) {
+                that.$message.success(`处理成功!`)
+                that.refreshEvent(that.eventCode)
+                that.cancelEventConfirm_send()
+                that.showEventConfirm = false
+              } else if (res.code == 304) {
+                console.log(that.eventCode)
+                this.$message.warning(res.msg)
+                this.showEventDialog(that.eventCode)
+                //获取事件详情
+              }
+              that.attachExamine = []
+              that.uploadAttachList = []
+              that.eventDescription = ""
+            })
+          } else if (eventStatus == 'shbtg') {
+            that.eventStatusButton = 'sh'
+            if (that.eventDescription == '' || that.eventDescription == null) {
+              that.$message.error(`请填写审核意见!`)
+              return
+            }
+            if (that.attachExamine.length == 0 || that.attachExamine == null) {
+              that.$message.error(`请上传审核图片!`)
+              return
+            }
+            //事件处理流程--审核不通过
+            let param = {
+              id: that.eventId, //事件id
+              eventCode: that.eventCode, //事件编号
+              eventName: that.eventName, //事件名称
+              isExamine: 0, //通过传1,不通过传0
+              version: that.version,
+              eventDescription: that.eventDescription, //审核意见
+              attach: that.attachExamine
+            }
+            eventExamine(param).then(res => {
+              if (res.code == 200) {
+                that.$message.success(`处理成功!`)
+                that.refreshEvent(that.eventCode)
+                that.cancelEventConfirm_send()
+                that.showEventConfirm = false
+              } else if (res.code == 304) {
+                console.log(that.eventCode)
+                this.$message.warning(res.msg)
+                this.showEventDialog(that.eventCode)
+                //获取事件详情
+              }
+              that.attachExamine = []
+              that.uploadAttachList = []
+              that.eventDescription = ""
+            })
+          } 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 (res.code == 304) {
+                console.log(that.eventCode)
+                this.$message.warning(res.msg)
+                this.showEventDialog(that.eventCode)
+                //获取事件详情
+              }
+            })
+          }
+         else {
           if (eventStatus == 'qs') {
             if (that.sendDeptId == '' || that.sendDeptId == null || that.sendDeptName == '' || that.sendDeptName == null) {
               that.$message.error(`请选择部门!`)