Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -247,6 +247,7 @@ module.exports = {
|
||||
goHandle: '去处理',
|
||||
disableInput: '禁止输入',
|
||||
fileUploadError: '文件上传错误',
|
||||
importMaxMsg: '导入文件最大{size}MB',
|
||||
// 标准字段
|
||||
standardField: {
|
||||
standardEnglishName: '标准英文名称',
|
||||
|
||||
@@ -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, // 提交的加载
|
||||
|
||||
Reference in New Issue
Block a user