ocr上传修改
This commit is contained in:
@@ -180,7 +180,7 @@
|
||||
:before-upload="beforeUpload"
|
||||
@change="handleChange"
|
||||
>
|
||||
<a-button>
|
||||
<a-button @click="clickButtonToUpload(item.db_field_name)">
|
||||
<a-icon type="upload"/>
|
||||
{{$t('UploadFile')}}
|
||||
</a-button>
|
||||
@@ -328,11 +328,13 @@
|
||||
this.fileList.push(res)
|
||||
}
|
||||
})
|
||||
this.formInline[this.uploadName] = ''
|
||||
// console.log('remove',this.fileList)
|
||||
// this.$emit('uploadSuccess', this.fileList)
|
||||
this.$message.destroy()
|
||||
this.$message.success(`${info.file.name} 删除成功。`);
|
||||
} else if (status === 'done') {
|
||||
|
||||
this.fileList = []
|
||||
this.myfileList = info.fileList;
|
||||
// console.log('file3333',info.fileList)
|
||||
@@ -366,10 +368,19 @@
|
||||
|
||||
if(this.myfileList.length > 0){
|
||||
// this.$emit('uploadSuccess', this.fileList)
|
||||
// console.log('fileList111',this.fileList)
|
||||
this.formInline.attId=this.myfileList[0].response.result.id
|
||||
// console.log('fileList111',this.myfileList)
|
||||
let attIdList = []
|
||||
this.fileList.map(item => {
|
||||
attIdList.push(item.id)
|
||||
})
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.formInline[this.uploadName] = attIdList.join(',')
|
||||
|
||||
|
||||
// this.formInline.attId=this.myfileList[0].response.result.id
|
||||
this.$message.destroy()
|
||||
this.$message.success(`${info.file.name} 文件上传成功。`);
|
||||
this.$refs.ruleForm1.clearValidate()
|
||||
}
|
||||
} else if (status === 'uploading') {
|
||||
this.myfileList = info.fileList;
|
||||
@@ -421,7 +432,7 @@
|
||||
})
|
||||
},
|
||||
clickButtonToUpload(current) {
|
||||
this.$refs.uploadFile.visible = true
|
||||
// this.$refs.uploadFile.visible = true
|
||||
this.uploadName = current
|
||||
},
|
||||
/** 上传文件的回调 */
|
||||
@@ -509,7 +520,8 @@
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.db_field_txt + '不能为空',
|
||||
trigger: 'change'
|
||||
type:'string',
|
||||
trigger: 'blur'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user