diff --git a/src/views/accident/event/components/addOrEdit.vue b/src/views/accident/event/components/addOrEdit.vue index d60d935..c971ec2 100644 --- a/src/views/accident/event/components/addOrEdit.vue +++ b/src/views/accident/event/components/addOrEdit.vue @@ -431,11 +431,12 @@ export default { } this.infoForm.incidentDate = formatDate(this.infoForm.incidentDate, 'YYYY-MM-DD HH:mm:ss') this.infoForm.reportDate = formatDate(this.infoForm.reportDate, 'YYYY-MM-DD HH:mm:ss') - const address = this.infoForm.fileAddressList + const address = this.infoForm.fileAddressList[0] + console.log(address) const params = { ...this.infoForm, photos: this.infoForm.fileList[0].remotePathName, - attachmentAddress: address == null || address.length === 0 ? address[0].remotePathName : '', + attachmentAddress: address == null ? '' : address.remotePathName, type: 1 } delete params.fileList diff --git a/src/views/accident/records/components/addOrEdit.vue b/src/views/accident/records/components/addOrEdit.vue index 86ea49e..9ebe882 100644 --- a/src/views/accident/records/components/addOrEdit.vue +++ b/src/views/accident/records/components/addOrEdit.vue @@ -431,11 +431,11 @@ export default { } this.infoForm.incidentDate = formatDate(this.infoForm.incidentDate, 'YYYY-MM-DD HH:mm:ss') this.infoForm.reportDate = formatDate(this.infoForm.reportDate, 'YYYY-MM-DD HH:mm:ss') - const address = this.infoForm.fileAddressList + const address = this.infoForm.fileAddressList[0] const params = { ...this.infoForm, photos: this.infoForm.fileList[0].remotePathName, - attachmentAddress: address == null || address.length === 0 ? address[0].remotePathName : '', + attachmentAddress: address == null ? '' : address.remotePathName, type: 2 } delete params.fileList