企业管理 - 行业资质图片上传bug修复
parent
db1782a249
commit
2183c0f914
|
@ -86,7 +86,15 @@ export default {
|
||||||
NAME: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
NAME: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||||
VALIDITYTIME: [{ required: true, message: '证书有效期不能为空', trigger: 'blur' }],
|
VALIDITYTIME: [{ required: true, message: '证书有效期不能为空', trigger: 'blur' }],
|
||||||
NUMBER: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
|
NUMBER: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
|
||||||
FILE: [{ required: true, message: '图片不能为空', trigger: 'blur' }]
|
FILE: [
|
||||||
|
{ validator: (rule, value, callback) => {
|
||||||
|
if (this.certificate_files.length > 0) {
|
||||||
|
callback()
|
||||||
|
} else {
|
||||||
|
callback(new Error('图片不能为空'))
|
||||||
|
}
|
||||||
|
}, trigger: 'blur' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -191,6 +199,8 @@ export default {
|
||||||
if (!isImage) {
|
if (!isImage) {
|
||||||
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
|
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
|
||||||
fileList.pop()
|
fileList.pop()
|
||||||
|
} else {
|
||||||
|
this.beforeFileUpload(file)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handlePictureCardPreview(file) {
|
handlePictureCardPreview(file) {
|
||||||
|
|
Loading…
Reference in New Issue