NEZ-3316 fix:chart新增 misc 部分图表 预览错误

This commit is contained in:
zhangyu
2023-11-03 17:10:20 +08:00
parent 5456e8784d
commit 507cb5752d
6 changed files with 12 additions and 6 deletions

View File

@@ -59,7 +59,7 @@
} }
} }
.nz-icon-shuidi { .nz-icon-shuidi.nz-icon {
position: absolute; position: absolute;
font-size: 48px; font-size: 48px;
color: rgba(190, 233, 222, 0.45); color: rgba(190, 233, 222, 0.45);
@@ -117,7 +117,7 @@
color: #FADED7; color: #FADED7;
} }
.nz-icon-model { .nz-icon-model.nz-icon {
color: #23BF9A; color: #23BF9A;
position: absolute; position: absolute;
top: -4px; top: -4px;

View File

@@ -23,7 +23,7 @@
} }
} }
.nz-icon-shuidi { .nz-icon.nz-icon-shuidi {
position: absolute; position: absolute;
font-size: 48px; font-size: 48px;
color: rgba(190, 233, 222, 0.45); color: rgba(190, 233, 222, 0.45);

View File

@@ -106,7 +106,7 @@
v-if="previewShow" v-if="previewShow"
:visible.sync="previewShow" :visible.sync="previewShow"
:show-close="false" :show-close="false"
class="nz-dialog chart-fullscreen" class="nz-dialog chart-fullscreen no-transform-dialog"
destroy-on-close destroy-on-close
fullscreen fullscreen
:modal-append-to-body="false" :modal-append-to-body="false"

View File

@@ -23,7 +23,7 @@
<el-select <el-select
id="chart-box-type" id="chart-box-type"
v-model="chartConfig.type" v-model="chartConfig.type"
:disabled="!!(chartConfig.type==='group'&&chartConfig.id)" :disabled="!!(chartConfig.type==='group'&&chartConfig.id && isInitGroup)"
:placeholder="$t('el.select.placeholder')" :placeholder="$t('el.select.placeholder')"
popper-class="right-box-select-top prevent-clickoutside" popper-class="right-box-select-top prevent-clickoutside"
size="small" size="small"
@@ -404,11 +404,13 @@ export default {
querysArray: {}, querysArray: {},
currentProject: {}, currentProject: {},
params: {} params: {}
} },
isInitGroup: false
} }
}, },
methods: { methods: {
init () { init () {
this.isInitGroup = this.params.type === 'group'
this.chartConfig = JSON.parse(JSON.stringify(this.params)) this.chartConfig = JSON.parse(JSON.stringify(this.params))
this.reloadTopo() this.reloadTopo()
bus.$on('showMeta2dPreview', (params) => { bus.$on('showMeta2dPreview', (params) => {

View File

@@ -1323,6 +1323,7 @@ export default {
}, },
beforeDestroy () { beforeDestroy () {
// 移除键盘ESC事件 // 移除键盘ESC事件
this.$store.dispatch('clearPanel')
document.removeEventListener('keydown', this.escExit) document.removeEventListener('keydown', this.escExit)
bus.$off('refreshPanel') bus.$off('refreshPanel')
this.$store.dispatch('dispatchPanelLock', { flag: true }) this.$store.dispatch('dispatchPanelLock', { flag: true })

View File

@@ -62,6 +62,9 @@ export default {
}) })
} }
} }
},
beforeDestroy() {
this.$store.dispatch('clearPanel')
} }
} }
</script> </script>