From 06282107e09ca419de63da3a28f8672170225dc5 Mon Sep 17 00:00:00 2001 From: zhaomeijing Date: Thu, 12 May 2022 11:16:22 +0800 Subject: [PATCH] =?UTF-8?q?[add]=20=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/CollectionType/index.vue | 43 +++++++++++++------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/jero-web/src/components/CollectionType/index.vue b/jero-web/src/components/CollectionType/index.vue index d4547b1e1..483e5cd56 100644 --- a/jero-web/src/components/CollectionType/index.vue +++ b/jero-web/src/components/CollectionType/index.vue @@ -46,8 +46,8 @@
- {{ (formInline.fileTemplateConnectId === 'null' || formInline.fileTemplateConnectId === '' || - formInline.fileTemplateConnectId == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} + {{ (item.controlValue === 'null' || item.controlValue === '' || + item.controlValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}}
@@ -104,8 +104,8 @@
- {{ (formInline.fileTemplateConnectId === 'null' || formInline.fileTemplateConnectId === '' || - formInline.fileTemplateConnectId == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} + {{ (item.controlValue === 'null' || item.controlValue === '' || + item.controlValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}}
@@ -125,8 +125,8 @@
- {{ (formInline.fileTemplateConnectId === 'null' || formInline.fileTemplateConnectId === '' || - formInline.fileTemplateConnectId == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} + {{ (item.controlValue === 'null' || item.controlValue === '' || + item.controlValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}}
@@ -146,8 +146,8 @@
- {{ (formInline.fileTemplateConnectId === 'null' || formInline.fileTemplateConnectId === '' || - formInline.fileTemplateConnectId == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} + {{ (item.controlValue === 'null' || item.controlValue === '' || + item.controlValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}}
@@ -173,8 +173,8 @@
- {{ (formInline.fileTemplateConnectId === 'null' || formInline.fileTemplateConnectId === '' || - formInline.fileTemplateConnectId == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} + {{ (item.controlValue === 'null' || item.controlValue === '' || + item.controlValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}}
@@ -209,8 +209,27 @@ export default { mounted() { }, methods: { - uploadSuccess() { - console.log('pppp') + uploadSuccess(data) { + let attIdList = [] + if(data && data.length>0){ + data.map(item => { + attIdList.push(item.id || data.name) + }) + this.detailDate.list.forEach((item, index) => { + if(item.type === 'file') { + item.controlValue = attIdList.join(',') + } + }) + /** 赋值给当前对应的表单文件 */ + // this.formInline[this.uploadName] = attIdList.join(',') + // this.formInline = { ...this.formInline } + // console.log('form',this.formInline) + }else{ + // this.formInline[this.uploadName]='' + // this.formInline = { ...this.formInline } + // console.log('form',this.formInline) + + } }, clickButtonToUpload() { this.$refs.uploadFile.visible = true