Преглед на файлове

UI-应急中心 附件处理优化

彭宇 преди 4 дни
родител
ревизия
df54faabf3
променени са 1 файла, в които са добавени 7 реда и са изтрити 6 реда
  1. 7 6
      src/views/SentryEmergencyCenter.vue

+ 7 - 6
src/views/SentryEmergencyCenter.vue

@@ -590,11 +590,6 @@
 					}
 				}
 				this.fileList = this.emergencyEventDetails.attachPath || []
-				if(this.fileList.length>0){
-					this.fileList.forEach((e,idx) => {
-						this.fileList[idx] = e.split("/").slice(3).join("/")
-					})
-				}
 
 				this.videoList = []
 				this.videoUploadList = []
@@ -684,7 +679,13 @@
 								}
 							})
 						} else {
-							let params = this.reportParams
+              let params = this.reportParams
+              params.attachList=[]
+              if(this.fileList.length>0){
+              	this.fileList.forEach((e,idx) => {
+                  params.attachList.push({'attachPath':e.url.split("/").slice(3).join("/")})
+              	})
+              }
 							params.eventId = this.eventId
 							// 修改上报事件信息
 							updateEventContingencyDetail(params).then(res => {