fix: 拖拽问题回退

This commit is contained in:
wangjiahao 2021-06-21 17:17:39 +08:00
parent 55f4e2244a
commit a80e5d9e72
2 changed files with 11 additions and 9 deletions

View File

@ -2,10 +2,10 @@
<div v-loading="requestStatus==='waiting'" class="rect-shape">
<div v-if="requestStatus==='error'" class="chart-error-class">
<div style="font-size: 12px; color: #9ea6b2;height: 100%;display: flex;align-items: center;justify-content: center;">
{{ message.response.data.message }},{{ $t('chart.chart_show_error') }}
<br>
{{ $t('chart.chart_error_tips') }}
</div>
<span v-if="message.response.data.message">{{ message.response.data.message }}<span>,{{ $t('chart.chart_show_error') }}
<br>
{{ $t('chart.chart_error_tips') }}
</span></span></div>
</div>
<chart-component v-if="requestStatus==='success'&&chart.type && !chart.type.includes('table') && !chart.type.includes('text')" :ref="element.propValue.id" class="chart-class" :chart="chart" />
<table-normal v-if="requestStatus==='success'&&chart.type && chart.type.includes('table')" :ref="element.propValue.id" :chart="chart" class="table-class" />

View File

@ -27,7 +27,7 @@
</el-collapse-item>
<el-collapse-item :title="$t('panel.table')" name="table">
<el-row style="background-color: #f7f8fa; margin: 5px">
<color-selector v-if="tableChart" :source-type="'panelTable'" class="attr-selector" :chart="tableChart" @onColorChange="onTableColorChange" />
<color-selector v-if="tableChartShow" index="10002" :source-type="'panelTable'" class="attr-selector" :chart="tableChart" @onColorChange="onTableColorChange" />
</el-row>
</el-collapse-item>
</el-collapse>
@ -58,9 +58,10 @@ export default {
return {
panelInfo: this.$store.state.panel.panelInfo,
activeNames: ['panel'],
chart: null,
chart: {},
tableChart: null,
collapseShow: true
collapseShow: true,
tableChartShow: true
}
},
computed: mapState([
@ -75,10 +76,9 @@ export default {
this.collapseShow = false
this.$nextTick(() => (this.collapseShow = true))
})
this.init()
},
created() {
debugger
this.init()
},
methods: {
@ -100,6 +100,8 @@ export default {
// table color view
this.tableChart = deepCopy(this.chart)
this.tableChart.customAttr.color = this.tableChart.customAttr.tableColor
this.tableChartShow = false
this.$nextTick(() => (this.tableChartShow = true))
},
handleChange(val) {
// console.log(val)