diff --git a/frontend/src/api/system/lic.js b/frontend/src/api/system/lic.js
index fbf634dda2..e1d4460e17 100644
--- a/frontend/src/api/system/lic.js
+++ b/frontend/src/api/system/lic.js
@@ -3,6 +3,7 @@ import request from '@/utils/request'
export function validateLic() {
return request({
url: '/anonymous/license/validate',
- method: 'get'
+ method: 'get',
+ hideMsg: true
})
}
diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js
index a046374298..41844c03cb 100644
--- a/frontend/src/lang/zh.js
+++ b/frontend/src/lang/zh.js
@@ -275,7 +275,8 @@ export default {
select_module: '选择模块',
default_module: '默认模块'
},
- datasource: '数据连接'
+ datasource: '数据连接',
+ char_can_not_more_50: '名称不能超过50字符'
},
documentation: {
documentation: '文档',
diff --git a/frontend/src/views/chart/group/Group.vue b/frontend/src/views/chart/group/Group.vue
index 937b771a08..3a4c148e18 100644
--- a/frontend/src/views/chart/group/Group.vue
+++ b/frontend/src/views/chart/group/Group.vue
@@ -262,12 +262,14 @@ export default {
},
groupFormRules: {
name: [
- { required: true, message: this.$t('commons.input_content'), trigger: 'change' }
+ { required: true, message: this.$t('commons.input_content'), trigger: 'change' },
+ { max: 50, message: this.$t('commons.char_can_not_more_50'), trigger: 'change' }
]
},
tableFormRules: {
name: [
- { required: true, message: this.$t('commons.input_content'), trigger: 'change' }
+ { required: true, message: this.$t('commons.input_content'), trigger: 'change' },
+ { max: 50, message: this.$t('commons.char_can_not_more_50'), trigger: 'change' }
]
},
selectTableFlag: false,
@@ -366,11 +368,11 @@ export default {
this.groupTree(this.groupForm)
})
} else {
- this.$message({
- message: this.$t('commons.input_content'),
- type: 'error',
- showClose: true
- })
+ // this.$message({
+ // message: this.$t('commons.input_content'),
+ // type: 'error',
+ // showClose: true
+ // })
return false
}
})
@@ -392,11 +394,11 @@ export default {
this.$store.dispatch('chart/setTable', null)
})
} else {
- this.$message({
- message: this.$t('commons.input_content'),
- type: 'error',
- showClose: true
- })
+ // this.$message({
+ // message: this.$t('commons.input_content'),
+ // type: 'error',
+ // showClose: true
+ // })
return false
}
})
@@ -545,7 +547,7 @@ export default {
},
createChart() {
- if (!this.table.name) {
+ if (!this.table.name || this.table.name === '') {
this.$message({
message: this.$t('chart.name_can_not_empty'),
type: 'error',
@@ -553,6 +555,14 @@ export default {
})
return
}
+ if (this.table.name.length > 50) {
+ this.$message({
+ showClose: true,
+ message: this.$t('commons.char_can_not_more_50'),
+ type: 'error'
+ })
+ return
+ }
const view = {}
view.name = this.table.name
view.title = this.table.name
diff --git a/frontend/src/views/dataset/add/AddCustom.vue b/frontend/src/views/dataset/add/AddCustom.vue
index 6ba3524230..042056bad8 100644
--- a/frontend/src/views/dataset/add/AddCustom.vue
+++ b/frontend/src/views/dataset/add/AddCustom.vue
@@ -181,6 +181,22 @@ export default {
}
},
save() {
+ if (!this.name || this.name === '') {
+ this.$message({
+ showClose: true,
+ message: this.$t('dataset.pls_input_name'),
+ type: 'error'
+ })
+ return
+ }
+ if (this.name.length > 50) {
+ this.$message({
+ showClose: true,
+ message: this.$t('commons.char_can_not_more_50'),
+ type: 'error'
+ })
+ return
+ }
const table = {
id: this.param.tableId,
name: this.name,
diff --git a/frontend/src/views/dataset/add/AddExcel.vue b/frontend/src/views/dataset/add/AddExcel.vue
index 0a3cbb8f80..613e7a301e 100644
--- a/frontend/src/views/dataset/add/AddExcel.vue
+++ b/frontend/src/views/dataset/add/AddExcel.vue
@@ -158,6 +158,22 @@ export default {
save() {
// console.log(this.checkTableList);
// console.log(this.scene);
+ if (!this.name || this.name === '') {
+ this.$message({
+ showClose: true,
+ message: this.$t('dataset.pls_input_name'),
+ type: 'error'
+ })
+ return
+ }
+ if (this.name.length > 50) {
+ this.$message({
+ showClose: true,
+ message: this.$t('commons.char_can_not_more_50'),
+ type: 'error'
+ })
+ return
+ }
const table = {
id: this.param.tableId,
name: this.name,
diff --git a/frontend/src/views/dataset/add/AddSQL.vue b/frontend/src/views/dataset/add/AddSQL.vue
index 83e31e3ac9..e7b90264f9 100644
--- a/frontend/src/views/dataset/add/AddSQL.vue
+++ b/frontend/src/views/dataset/add/AddSQL.vue
@@ -245,6 +245,14 @@ export default {
})
return
}
+ if (this.name.length > 50) {
+ this.$message({
+ showClose: true,
+ message: this.$t('commons.char_can_not_more_50'),
+ type: 'error'
+ })
+ return
+ }
const table = {
id: this.param.tableId,
name: this.name,
diff --git a/frontend/src/views/dataset/group/Group.vue b/frontend/src/views/dataset/group/Group.vue
index 9b6abcf529..6247981f86 100644
--- a/frontend/src/views/dataset/group/Group.vue
+++ b/frontend/src/views/dataset/group/Group.vue
@@ -86,6 +86,9 @@
{{ $t('dataset.rename') }}
+
+
+
{{ $t('dataset.delete') }}
@@ -147,6 +150,12 @@
+
@@ -198,6 +207,9 @@
{{ $t('dataset.rename') }}
+
+
+
{{ $t('dataset.delete') }}
@@ -213,6 +225,10 @@
+
+
+
+