修改bug
This commit is contained in:
parent
1594d736d7
commit
87b52c0f76
@ -261,7 +261,9 @@
|
||||
return
|
||||
}
|
||||
// 文件名称不能包含特殊字符
|
||||
if (!this.$verify.specialChar(param.file.name)) {
|
||||
let filename = param.file.name
|
||||
let name = filename.substring(0, filename.lastIndexOf("."))
|
||||
if (this.$verify.specialCharNew(name)) {
|
||||
this.$message.error('文件名称包含非法字符,请重新上传!')
|
||||
return
|
||||
}
|
||||
|
||||
@ -109,13 +109,7 @@ export default {
|
||||
}
|
||||
})
|
||||
this.repaymentObj.name = this.fileList.length?this.fileList[0].objectName : '';
|
||||
if (!this.$verify.specialChar(this.repaymentObj.name)) {
|
||||
this.$message.error('文件名称包含非法字符,请重新上传!')
|
||||
return false
|
||||
}
|
||||
this.repaymentObj.url = this.fileList.length?this.fileList[0].fileName : '';
|
||||
|
||||
console.log(this.repaymentObj, '---this.repaymentObj', this.fileList)
|
||||
},
|
||||
handleClose() {
|
||||
this.$emit('update:eventDialog', null)
|
||||
|
||||
@ -35,7 +35,13 @@ function specialChar(value) {
|
||||
return /^[^~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]+$/
|
||||
.test(value)
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证特殊字符格式
|
||||
*/
|
||||
function specialCharNew(value) {
|
||||
return /[ \n\t&V:?"#*|&<>%'+]/
|
||||
.test(value)
|
||||
}
|
||||
/**
|
||||
* 替换特殊字符格式
|
||||
*/
|
||||
@ -222,5 +228,6 @@ export default {
|
||||
specialCharRep,
|
||||
postalCode,
|
||||
specialChar,
|
||||
specialCharNew,
|
||||
judgeCard
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user