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