[update 88390] 拆分详情-导入限制20MB

This commit is contained in:
danshihao
2024-08-12 10:16:36 +08:00
parent a989173fc4
commit c68c48b34d
4 changed files with 10 additions and 0 deletions
+1
View File
@@ -247,6 +247,7 @@ module.exports = {
goHandle: 'To Deal With',
disableInput: 'Inhibit Input',
fileUploadError: 'File Upload Error',
importMaxMsg: 'The maximum size for importing files is {size}MB',
// 标准字段
standardField: {
standardEnglishName: 'Regulation English Name',
+1
View File
@@ -247,6 +247,7 @@ module.exports = {
goHandle: '去处理',
disableInput: '禁止输入',
fileUploadError: '文件上传错误',
importMaxMsg: '导入文件最大{size}MB',
// 标准字段
standardField: {
standardEnglishName: '标准英文名称',
+6
View File
@@ -267,6 +267,12 @@ export const ConfigurableTableMixin = {
},
/* 导入 */
handleImportExcel (info) {
// 限制导入大于 importMaxSize, 各个模块可以单独设置大小
if (this.importMaxSize && info.file.size > 1024 * 1024 * this.importMaxSize) {
this.$message.error(this.$t('importMaxMsg', { size: this.importMaxSize }))
info.fileList.pop()
return
}
// 限制导入大于500MB
if (info.file.size > 1024 * 1024 * 500) {
this.$message.error('导入文件最大500MB')
@@ -235,6 +235,8 @@ export default {
mixins: [ConfigurableTableMixin],
data () {
return {
// 导入的最大大小
importMaxSize: 20,
StandardSource,
data: [],
loading: false, // 提交的加载