Merge pull request #645 from dataease/pr@dev@feat_field_edit

feat: 字段编辑
This commit is contained in:
XiaJunjie2020 2021-08-17 14:10:16 +08:00 committed by GitHub
commit abd1294ec2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 3 deletions

View File

@ -1013,7 +1013,8 @@ export default {
merge: 'Merge',
no_merge: 'Dont Merge',
merge_msg: 'If the fields in the data table are consistent, merge them into one data set?',
merge_title: 'Merge data'
merge_title: 'Merge data',
field_name_less_50: 'Field name can not more 50 chars.'
},
datasource: {
datasource: 'Data Source',

View File

@ -1013,7 +1013,8 @@ export default {
merge: '合併',
no_merge: '不合併',
merge_msg: '數據表中存在自斷一直的情況,是否合併到一個數據集中?',
merge_title: '合併數據'
merge_title: '合併數據',
field_name_less_50: '字段名不能超過50個字符'
},
datasource: {
datasource: '數據源',

View File

@ -1013,7 +1013,8 @@ export default {
merge: '合并',
no_merge: '不合并',
merge_msg: '数据表中存在字段一致的情况,是否合并到一个数据集中?',
merge_title: '合并数据'
merge_title: '合并数据',
field_name_less_50: '字段名不能超过50个字符'
},
datasource: {
datasource: '数据源',

View File

@ -312,6 +312,10 @@ export default {
},
saveCalcField() {
if (this.fieldForm.name && this.fieldForm.name.length > 50) {
this.$message.error(this.$t('dataset.field_name_less_50'))
return
}
if (!this.fieldForm.id) {
this.fieldForm.type = this.fieldForm.deType
this.fieldForm.deExtractType = this.fieldForm.deType

View File

@ -327,6 +327,10 @@ export default {
// // this.closeEdit()
// this.initField()
// })
if (item.name && item.name.length > 50) {
this.$message.error(this.$t('dataset.field_name_less_50'))
return
}
post('/dataset/field/save', item).then(response => {
this.initField()