提交 84f68f1e authored 作者: junjie's avatar junjie

feat(frontend):前端优化

上级 92c0a476
...@@ -516,9 +516,9 @@ export default { ...@@ -516,9 +516,9 @@ export default {
}, },
sceneClick(data, node) { sceneClick(data, node) {
this.$store.dispatch('chart/setViewId', null) // this.$store.dispatch('chart/setViewId', null)
this.$store.dispatch('chart/setViewId', data.id) // this.$store.dispatch('chart/setViewId', data.id)
this.$emit('switchComponent', { name: 'ChartEdit' }) this.$emit('switchComponent', { name: 'ChartEdit', param: { 'id': data.id }})
}, },
selectTable() { selectTable() {
......
<template> <template>
<el-row style="height: 100%;overflow-y: hidden;width: 100%;"> <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-row style="height: 40px;background-color: white" class="padding-lr">
<el-popover <el-popover
placement="right-start" placement="right-start"
...@@ -266,6 +266,12 @@ import QuotaFilterEditor from '../components/filter/QuotaFilterEditor' ...@@ -266,6 +266,12 @@ import QuotaFilterEditor from '../components/filter/QuotaFilterEditor'
export default { export default {
name: 'ChartEdit', name: 'ChartEdit',
components: { DatasetChartDetail, QuotaFilterEditor, BackgroundColorSelector, FilterItem, XAxisSelector, YAxisSelector, TooltipSelector, LabelSelector, LegendSelector, TitleSelector, SizeSelector, ColorSelector, ChartComponent, QuotaItem, DimensionItem, draggable }, components: { DatasetChartDetail, QuotaFilterEditor, BackgroundColorSelector, FilterItem, XAxisSelector, YAxisSelector, TooltipSelector, LabelSelector, LegendSelector, TitleSelector, SizeSelector, ColorSelector, ChartComponent, QuotaItem, DimensionItem, draggable },
props: {
param: {
type: Object,
required: true
}
},
data() { data() {
return { return {
table: {}, table: {},
...@@ -311,21 +317,25 @@ export default { ...@@ -311,21 +317,25 @@ export default {
} }
}, },
computed: { computed: {
vId() { // vId() {
// console.log(this.$store.state.chart.viewId); // // console.log(this.$store.state.chart.viewId);
this.getData(this.$store.state.chart.viewId) // this.getData(this.$store.state.chart.viewId)
return this.$store.state.chart.viewId // return this.$store.state.chart.viewId
} // }
}, },
watch: { watch: {
'param': function() {
console.log(this.param)
this.getData(this.param.id)
}
}, },
created() { created() {
// this.get(this.$store.state.chart.viewId); // this.get(this.$store.state.chart.viewId);
}, },
mounted() { mounted() {
// this.get(this.$store.state.chart.viewId); // this.get(this.$store.state.chart.viewId);
this.getData(this.$store.state.chart.viewId) this.getData(this.param.id)
// this.myEcharts(); // this.myEcharts();
}, },
activated() { activated() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论