提交 6e60a265 authored 作者: junjie's avatar junjie

feat(frontend):数据集名称长度限制提示修改;视图名称和标题统一,保存按钮优化

上级 a6e9dd34
...@@ -838,7 +838,8 @@ export default { ...@@ -838,7 +838,8 @@ export default {
excel_add: 'Add', excel_add: 'Add',
dataset_group: 'Dataset Group', dataset_group: 'Dataset Group',
m1: 'Move ', m1: 'Move ',
m2: ' To' m2: ' To',
char_can_not_more_50: 'Dataset name can not more 50'
}, },
datasource: { datasource: {
datasource: 'Data Source', datasource: 'Data Source',
......
...@@ -838,7 +838,8 @@ export default { ...@@ -838,7 +838,8 @@ export default {
excel_add: '追加', excel_add: '追加',
dataset_group: '數據集分組', dataset_group: '數據集分組',
m1: '將 ', m1: '將 ',
m2: ' 移動到' m2: ' 移動到',
char_can_not_more_50: '數據集名稱不能超過50個字符'
}, },
datasource: { datasource: {
datasource: '數據源', datasource: '數據源',
......
...@@ -838,7 +838,8 @@ export default { ...@@ -838,7 +838,8 @@ export default {
excel_add: '追加', excel_add: '追加',
dataset_group: '数据集分组', dataset_group: '数据集分组',
m1: '将 ', m1: '将 ',
m2: ' 移动到' m2: ' 移动到',
char_can_not_more_50: '数据集名称不能超过50个字符'
}, },
datasource: { datasource: {
datasource: '数据源', datasource: '数据源',
......
...@@ -115,6 +115,11 @@ export default { ...@@ -115,6 +115,11 @@ export default {
this.fontSize = arr this.fontSize = arr
}, },
changeTitleStyle() { changeTitleStyle() {
if (this.titleForm.title.length < 1) {
this.$error(this.$t('chart.title_cannot_empty'))
this.titleForm.title = this.chart.title
return
}
if (!this.titleForm.show) { if (!this.titleForm.show) {
this.isSetting = false this.isSetting = false
} }
......
...@@ -168,9 +168,9 @@ ...@@ -168,9 +168,9 @@
/> />
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item icon="el-icon-edit-outline" :command="beforeClickMore('renameChart',data,node)"> <!-- <el-dropdown-item icon="el-icon-edit-outline" :command="beforeClickMore('renameChart',data,node)">-->
{{ $t('chart.rename') }} <!-- {{ $t('chart.rename') }}-->
</el-dropdown-item> <!-- </el-dropdown-item>-->
<el-dropdown-item icon="el-icon-delete" :command="beforeClickMore('deleteChart',data,node)"> <el-dropdown-item icon="el-icon-delete" :command="beforeClickMore('deleteChart',data,node)">
{{ $t('chart.delete') }} {{ $t('chart.delete') }}
</el-dropdown-item> </el-dropdown-item>
...@@ -536,6 +536,7 @@ export default { ...@@ -536,6 +536,7 @@ export default {
this.chartData.forEach(function(ele) { this.chartData.forEach(function(ele) {
if (ele.id === that.$store.state.chart.chartSceneData.id) { if (ele.id === that.$store.state.chart.chartSceneData.id) {
ele.type = that.$store.state.chart.chartSceneData.type ele.type = that.$store.state.chart.chartSceneData.type
ele.name = that.$store.state.chart.chartSceneData.name
} }
}) })
} }
......
...@@ -486,9 +486,9 @@ export default { ...@@ -486,9 +486,9 @@ export default {
const view = JSON.parse(JSON.stringify(this.view)) const view = JSON.parse(JSON.stringify(this.view))
view.id = this.view.id view.id = this.view.id
view.sceneId = this.view.sceneId view.sceneId = this.view.sceneId
view.name = this.view.name ? this.view.name : this.table.name view.name = this.view.title ? this.view.title : this.table.name
if (view.title.length > 50) { if (view.title.length > 50) {
this.$warning(this.$t('chart.title_limit')) this.$error(this.$t('chart.title_limit'))
return return
} }
view.tableId = this.view.tableId view.tableId = this.view.tableId
...@@ -623,7 +623,7 @@ export default { ...@@ -623,7 +623,7 @@ export default {
} }
// 从仪表板入口关闭 // 从仪表板入口关闭
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' }) bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
this.$emit('switchComponent', { name: '' }) // this.$emit('switchComponent', { name: '' })
}, },
getData(id) { getData(id) {
if (id) { if (id) {
......
...@@ -192,7 +192,7 @@ export default { ...@@ -192,7 +192,7 @@ export default {
if (this.name.length > 50) { if (this.name.length > 50) {
this.$message({ this.$message({
showClose: true, showClose: true,
message: this.$t('commons.char_can_not_more_50'), message: this.$t('dataset.char_can_not_more_50'),
type: 'error' type: 'error'
}) })
return return
......
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
if (this.name.length > 50) { if (this.name.length > 50) {
this.$message({ this.$message({
showClose: true, showClose: true,
message: this.$t('commons.char_can_not_more_50'), message: this.$t('dataset.char_can_not_more_50'),
type: 'error' type: 'error'
}) })
return return
......
...@@ -248,7 +248,7 @@ export default { ...@@ -248,7 +248,7 @@ export default {
if (this.name.length > 50) { if (this.name.length > 50) {
this.$message({ this.$message({
showClose: true, showClose: true,
message: this.$t('commons.char_can_not_more_50'), message: this.$t('dataset.char_can_not_more_50'),
type: 'error' type: 'error'
}) })
return return
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论