feat(frontend):前端优化

This commit is contained in:
junjie 2021-04-23 12:12:37 +08:00
parent 92c0a47668
commit 84f68f1e4a
2 changed files with 20 additions and 10 deletions

View File

@ -516,9 +516,9 @@ export default {
},
sceneClick(data, node) {
this.$store.dispatch('chart/setViewId', null)
this.$store.dispatch('chart/setViewId', data.id)
this.$emit('switchComponent', { name: 'ChartEdit' })
// this.$store.dispatch('chart/setViewId', null)
// this.$store.dispatch('chart/setViewId', data.id)
this.$emit('switchComponent', { name: 'ChartEdit', param: { 'id': data.id }})
},
selectTable() {

View File

@ -1,6 +1,6 @@
<template>
<el-row style="height: 100%;overflow-y: hidden;width: 100%;">
<span v-show="false">{{ vId }}</span>
<!-- <span v-show="false">{{ vId }}</span>-->
<el-row style="height: 40px;background-color: white" class="padding-lr">
<el-popover
placement="right-start"
@ -266,6 +266,12 @@ import QuotaFilterEditor from '../components/filter/QuotaFilterEditor'
export default {
name: 'ChartEdit',
components: { DatasetChartDetail, QuotaFilterEditor, BackgroundColorSelector, FilterItem, XAxisSelector, YAxisSelector, TooltipSelector, LabelSelector, LegendSelector, TitleSelector, SizeSelector, ColorSelector, ChartComponent, QuotaItem, DimensionItem, draggable },
props: {
param: {
type: Object,
required: true
}
},
data() {
return {
table: {},
@ -311,21 +317,25 @@ export default {
}
},
computed: {
vId() {
// console.log(this.$store.state.chart.viewId);
this.getData(this.$store.state.chart.viewId)
return this.$store.state.chart.viewId
}
// vId() {
// // console.log(this.$store.state.chart.viewId);
// this.getData(this.$store.state.chart.viewId)
// return this.$store.state.chart.viewId
// }
},
watch: {
'param': function() {
console.log(this.param)
this.getData(this.param.id)
}
},
created() {
// this.get(this.$store.state.chart.viewId);
},
mounted() {
// this.get(this.$store.state.chart.viewId);
this.getData(this.$store.state.chart.viewId)
this.getData(this.param.id)
// this.myEcharts();
},
activated() {