From 8ca527e9b00852d913f626d1b2f7c892504f6d29 Mon Sep 17 00:00:00 2001 From: shanao Date: Wed, 23 Oct 2024 17:25:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=8B=E6=95=85=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E7=AE=A1=E7=90=86=E9=99=84=E4=BB=B6=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/accident/event/components/addOrEdit.vue | 5 +++-- src/views/accident/records/components/addOrEdit.vue | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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