| | |
| | | <el-dialog |
| | | v-dialogDrag |
| | | :close-on-click-modal="false" |
| | | :destroy-on-close="true" |
| | | :visible.sync="visible" |
| | | :width="width" |
| | | append-to-body |
| | |
| | | // 获取文件扩展名 |
| | | const fileExtension = file.name.split(".").pop().toLowerCase(); // 转换为小写以避免大小写不匹配的问题 |
| | | |
| | | if(this.paramVOS.fileType){ |
| | | if (!this.paramVOS.fileType.includes(fileExtension)) { |
| | | if(this.paramVOS.filetype){ |
| | | if (!this.paramVOS.filetype.includes(fileExtension)) { |
| | | // 上传格式不符合要求,提示错误信息并取消上传 |
| | | this.$message.error(`只允许上传${this.paramVOS.fileType.toString()}格式的文件`); |
| | | this.$message.error(`只允许上传${this.paramVOS.filetype.toString()}格式的文件`); |
| | | return Promise.reject(false); |
| | | } |
| | | } |