[update 88390] 拆分详情-导入限制20MB
This commit is contained in:
@@ -247,6 +247,7 @@ module.exports = {
|
|||||||
goHandle: 'To Deal With',
|
goHandle: 'To Deal With',
|
||||||
disableInput: 'Inhibit Input',
|
disableInput: 'Inhibit Input',
|
||||||
fileUploadError: 'File Upload Error',
|
fileUploadError: 'File Upload Error',
|
||||||
|
importMaxMsg: 'The maximum size for importing files is {size}MB',
|
||||||
// 标准字段
|
// 标准字段
|
||||||
standardField: {
|
standardField: {
|
||||||
standardEnglishName: 'Regulation English Name',
|
standardEnglishName: 'Regulation English Name',
|
||||||
|
|||||||
@@ -247,6 +247,7 @@ module.exports = {
|
|||||||
goHandle: '去处理',
|
goHandle: '去处理',
|
||||||
disableInput: '禁止输入',
|
disableInput: '禁止输入',
|
||||||
fileUploadError: '文件上传错误',
|
fileUploadError: '文件上传错误',
|
||||||
|
importMaxMsg: '导入文件最大{size}MB',
|
||||||
// 标准字段
|
// 标准字段
|
||||||
standardField: {
|
standardField: {
|
||||||
standardEnglishName: '标准英文名称',
|
standardEnglishName: '标准英文名称',
|
||||||
|
|||||||
@@ -267,6 +267,12 @@ export const ConfigurableTableMixin = {
|
|||||||
},
|
},
|
||||||
/* 导入 */
|
/* 导入 */
|
||||||
handleImportExcel (info) {
|
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
|
// 限制导入大于500MB
|
||||||
if (info.file.size > 1024 * 1024 * 500) {
|
if (info.file.size > 1024 * 1024 * 500) {
|
||||||
this.$message.error('导入文件最大500MB!')
|
this.$message.error('导入文件最大500MB!')
|
||||||
|
|||||||
@@ -235,6 +235,8 @@ export default {
|
|||||||
mixins: [ConfigurableTableMixin],
|
mixins: [ConfigurableTableMixin],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
// 导入的最大大小
|
||||||
|
importMaxSize: 20,
|
||||||
StandardSource,
|
StandardSource,
|
||||||
data: [],
|
data: [],
|
||||||
loading: false, // 提交的加载
|
loading: false, // 提交的加载
|
||||||
|
|||||||
Reference in New Issue
Block a user