feat(视图):创建视图名称覆盖bug

This commit is contained in:
junjie 2021-05-28 18:41:07 +08:00
parent 10c6ca4b98
commit 30fc9c5e73

View File

@ -73,8 +73,8 @@
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</span> </span>
<span style="margin-left: 12px;" @click.stop > <span style="margin-left: 12px;" @click.stop>
<el-dropdown trigger="click" size="small" @command="clickMore"> <el-dropdown trigger="click" size="small" @command="clickMore">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
<el-button <el-button
icon="el-icon-more" icon="el-icon-more"
@ -156,8 +156,8 @@
<span style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">{{ data.name }}</span> <span style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">{{ data.name }}</span>
</span> </span>
<span v-if="hasDataPermission('manage',data.privileges)"> <span v-if="hasDataPermission('manage',data.privileges)">
<span style="margin-left: 12px;" @click.stop > <span style="margin-left: 12px;" @click.stop>
<el-dropdown trigger="click" size="small" @command="clickMore"> <el-dropdown trigger="click" size="small" @command="clickMore">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
<el-button <el-button
icon="el-icon-more" icon="el-icon-more"
@ -204,7 +204,7 @@
<el-row style="width: 400px;"> <el-row style="width: 400px;">
<el-form ref="form" :model="table" label-width="80px" size="mini" class="form-item"> <el-form ref="form" :model="table" label-width="80px" size="mini" class="form-item">
<el-form-item :label="$t('chart.view_name')"> <el-form-item :label="$t('chart.view_name')">
<el-input v-model="table.name" size="mini" /> <el-input v-model="chartName" size="mini" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
@ -274,7 +274,8 @@ export default {
}, },
selectTableFlag: false, selectTableFlag: false,
table: {}, table: {},
tables: [] tables: [],
chartName: ''
} }
}, },
computed: { computed: {
@ -547,7 +548,7 @@ export default {
}, },
createChart() { createChart() {
if (!this.table.name || this.table.name === '') { if (!this.chartName || this.chartName === '') {
this.$message({ this.$message({
message: this.$t('chart.name_can_not_empty'), message: this.$t('chart.name_can_not_empty'),
type: 'error', type: 'error',
@ -555,7 +556,7 @@ export default {
}) })
return return
} }
if (this.table.name.length > 50) { if (this.chartName.length > 50) {
this.$message({ this.$message({
showClose: true, showClose: true,
message: this.$t('commons.char_can_not_more_50'), message: this.$t('commons.char_can_not_more_50'),
@ -564,8 +565,8 @@ export default {
return return
} }
const view = {} const view = {}
view.name = this.table.name view.name = this.chartName
view.title = this.table.name view.title = this.chartName
view.sceneId = this.currGroup.id view.sceneId = this.currGroup.id
view.tableId = this.table.id view.tableId = this.table.id
view.type = 'bar' view.type = 'bar'