From af0580bf4e902a3f523521b18ce526da00a15644 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Sat, 25 Mar 2023 18:29:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=99=84=E4=BB=B6=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/upgradedonline.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue index 619069595..3846b599e 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue @@ -117,26 +117,32 @@ import ImportFile from '@/components/ImportFileData/index' dataSource: [ { xtlb:'动力系统', + tpt:'', key:'1' }, { xtlb:'传动系统', + tpt:'', key:'2' }, { xtlb:'转向系统', + tpt:'', key:'3' }, { xtlb:'制动系统', + tpt:'', key:'4' }, { xtlb:'车身系统', + tpt:'', key:'5' }, { xtlb:'车载能源系统', + tpt:'', key:'6' }, ], @@ -367,21 +373,25 @@ import ImportFile from '@/components/ImportFileData/index' this.$emit('upgradedonlinedown') }, uploadSuccess(data) { - console.log(data) let attIdList = [] if (data && data.length > 0) { data.map(item => { attIdList.push(item.id || data.name) }) } + this.dataSource.forEach((item) => { + if(item.key == this.type){ + item.tpt = attIdList.join(',') + } + }) + this.$forceUpdate() // /** 赋值给当前对应的表单文件 */ // this.fileList.uploadName = attIdList.join(',') // this.fileList.certifyingmaterials = this.$t('viewFile') }, clickButtonToUpload(current,index) { - console.log(current) this.type = index - console.log(this.type) + console.log(current) this.$refs.uploadFile.perentHandleFunc() this.$refs.uploadFile.visible = true this.uploadName = current @@ -397,7 +407,7 @@ import ImportFile from '@/components/ImportFileData/index' addlineAtMid(record){ let randomNum=Math.floor(Math.random()*99999999999+1) let obj = {xtlb:record.xtlb,key:randomNum} - + this.dataSource.splice(this.dataSource.indexOf(record)+1,0,obj) }, //最后一行加