上传附件逻辑修改
This commit is contained in:
@@ -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)
|
||||
},
|
||||
//最后一行加
|
||||
|
||||
Reference in New Issue
Block a user