提交 da481797 authored 作者: wangjiahao's avatar wangjiahao

Merge remote-tracking branch 'origin/v1.8' into v1.8

...@@ -112,7 +112,13 @@ export function getLabel(chart) { ...@@ -112,7 +112,13 @@ export function getLabel(chart) {
if (l.show) { if (l.show) {
if (chart.type === 'pie') { if (chart.type === 'pie') {
label = { label = {
type: l.position type: l.position,
autoRotate: false
}
} else if (chart.type.includes('line')) {
label = {
position: l.position,
offsetY: -8
} }
} else { } else {
label = { label = {
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
<i slot="reference" class="el-icon-warning icon-class" style="margin-left: 4px;cursor: pointer;" /> <i slot="reference" class="el-icon-warning icon-class" style="margin-left: 4px;cursor: pointer;" />
</el-popover> </el-popover>
<span style="float: right;line-height: 40px;"> <span style="float: right;line-height: 40px;">
<el-button size="mini" @click="close">
{{ $t('chart.close') }}
</el-button>
<el-button size="mini" :disabled="!hasEdit" @click="reset"> <el-button size="mini" :disabled="!hasEdit" @click="reset">
{{ $t('chart.recover') }} {{ $t('chart.recover') }}
</el-button> </el-button>
...@@ -1246,7 +1249,8 @@ export default { ...@@ -1246,7 +1249,8 @@ export default {
this.table = response.data this.table = response.data
this.initTableField(id) this.initTableField(id)
}).catch(err => { }).catch(err => {
this.resetView() this.table = null
this.resetDatasetField()
this.httpRequest.status = err.response.data.success this.httpRequest.status = err.response.data.success
this.httpRequest.msg = err.response.data.message this.httpRequest.msg = err.response.data.message
return true return true
...@@ -1525,6 +1529,14 @@ export default { ...@@ -1525,6 +1529,14 @@ export default {
this.$success(this.$t('commons.save_success')) this.$success(this.$t('commons.save_success'))
}) })
}, },
close() {
this.closeChangeChart()
// 从仪表板入口关闭
if (this.$route.path.indexOf('panel') > -1) {
this.$store.commit('recordSnapshot')
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
}
},
getData(id) { getData(id) {
this.hasEdit = false this.hasEdit = false
if (id) { if (id) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论