feat: chart select 添加显示的判断

This commit is contained in:
zhangyu
2021-07-08 11:08:40 +08:00
parent f848958281
commit f391235dd7

View File

@@ -46,7 +46,7 @@
{{chartInfo.i18n ? $t(chartInfo.i18n) : chartInfo.name}} {{chartInfo.i18n ? $t(chartInfo.i18n) : chartInfo.name}}
</template> </template>
<template #operations v-if="layout.indexOf(layoutConstant.HEADER) > -1"> <template #operations v-if="layout.indexOf(layoutConstant.HEADER) > -1">
<div class="header__operation header__operation--table"> <div class="header__operation header__operation--table" v-if="chart.type === 31">
<el-select <el-select
size="mini" size="mini"
v-model="orderPieTable" v-model="orderPieTable"
@@ -407,9 +407,11 @@ export default {
return this.$_.slice(tableData, (pageNum - 1) * pageSize, pageNum * pageSize) return this.$_.slice(tableData, (pageNum - 1) * pageSize, pageNum * pageSize)
}, },
orderPieTableChange () { orderPieTableChange () {
if (this.chart.type === 31) {
const chartParams = this.chartInfo.params ? JSON.parse(this.chartInfo.params) : null // 图表参数 const chartParams = this.chartInfo.params ? JSON.parse(this.chartInfo.params) : null // 图表参数
this.myChart.off('click') this.myChart.off('click')
this.chartWithPieTableInit(chartParams) this.chartWithPieTableInit(chartParams)
}
}, },
chartWithPieTableInit (chartParams) { chartWithPieTableInit (chartParams) {
const self = this const self = this