ocr修改

This commit is contained in:
caoyang
2022-03-23 22:54:26 +08:00
parent 99a1971b1d
commit 89dfabd61a
5 changed files with 40 additions and 14 deletions
+17 -3
View File
@@ -169,12 +169,15 @@
<span class="title-text-text">{{item.db_field_txt}}</span>
</div>
<a-form-model-item class="itemModel" :prop="item.db_field_name">
<a-button type="primary" class="button-text"
<a-button v-if="formInline[item.db_field_name] === 'null' || formInline[item.db_field_name] === '' ||
formInline[item.db_field_name] == null" type="primary" class="button-text"
@click="clickButtonToUpload(item.db_field_name)">
{{ (formInline[item.db_field_name] === 'null' || formInline[item.db_field_name] === '' ||
formInline[item.db_field_name] == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}}
</a-button>
<span v-if="!(formInline[item.db_field_name] === 'null' || formInline[item.db_field_name] === '' ||
formInline[item.db_field_name] == null)">{{fileName[item.db_field_name]}}</span>
</a-form-model-item>
</div>
</a-col>
@@ -263,7 +266,9 @@
ruleList: [],
validatorRules: {},
confirmLoading: false,
uploadName: ''
uploadName: '',
fileName:{},
}
},
mounted() {
@@ -271,7 +276,7 @@
},
methods: {
sumber() {
// console.log('vilidate',this.formInline)
console.log('vilidate',this.formInline)
this.$refs.ruleForm1.validate(valid => {
if (valid) {
let url = ''
@@ -302,21 +307,30 @@
uploadSuccess(data) {
// console.log(data)
let attIdList = []
let attNameList=[]
if(data && data.length>0){
data.map(item => {
attIdList.push(item.id || data.name)
attNameList.push(item.fileName)
})
/** 赋值给当前对应的表单文件 */
this.formInline[this.uploadName] = attIdList.join(',')
this.fileName[this.uploadName]=attNameList.join(',')
this.formInline = { ...this.formInline }
this.$refs.uploadFile.visible = false
// console.log('form',this.formInline)
}else{
this.formInline[this.uploadName]=''
this.fileName[this.uploadName]=''
this.formInline = { ...this.formInline }
// console.log('form',this.formInline)
}
},
//关闭上传弹框
closeUpload(){
// this.fileVisible = false
},
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }