forked from github/dataease
Merge pull request #6034 from dataease/pr@dev@fix_stack_dim_date_format
fix: 分组堆叠柱状图日期堆叠项支持年季度和年周#5290
This commit is contained in:
commit
e8e0d5a752
@ -134,7 +134,15 @@
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="beforeDateStyle('y')">{{ $t('chart.y') }}</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="showDateExt"
|
||||
:command="beforeDateStyle('y_Q')"
|
||||
>{{ $t('chart.y_Q') }}</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeDateStyle('y_M')">{{ $t('chart.y_M') }}</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="showDateExt"
|
||||
:command="beforeDateStyle('y_W')"
|
||||
>{{ $t('chart.y_W') }}</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeDateStyle('y_M_d')">{{ $t('chart.y_M_d') }}</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeDateStyle('H_m_s')">{{ $t('chart.H_m_s') }}</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeDateStyle('y_M_d_H_m')">{{ $t('chart.y_M_d_H_m') }}</el-dropdown-item>
|
||||
@ -223,6 +231,10 @@ export default {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
chart: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
index: {
|
||||
type: Number,
|
||||
required: true
|
||||
@ -245,6 +257,14 @@ export default {
|
||||
tagType: 'success'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
showDateExt() {
|
||||
return this.chart.datasourceType === 'mysql' ||
|
||||
this.chart.datasourceType === 'ds_doris' ||
|
||||
this.chart.datasourceType === 'StarRocks' ||
|
||||
this.chart.datasetMode === 1
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dimensionData: function() {
|
||||
this.getItemTagType()
|
||||
|
@ -298,7 +298,7 @@ export default {
|
||||
},
|
||||
getDateExtStatus() {
|
||||
if (this.chart) {
|
||||
this.showDateExt = this.showDateExt = this.chart.datasourceType === 'mysql' ||
|
||||
this.showDateExt = this.chart.datasourceType === 'mysql' ||
|
||||
this.chart.datasourceType === 'ds_doris' ||
|
||||
this.chart.datasourceType === 'StarRocks' ||
|
||||
this.chart.datasetMode === 1
|
||||
|
@ -863,6 +863,7 @@
|
||||
:param="param"
|
||||
:index="index"
|
||||
:item="item"
|
||||
:chart="chart"
|
||||
:dimension-data="dimension"
|
||||
:quota-data="quota"
|
||||
@onItemChange="stackItemChange"
|
||||
|
Loading…
Reference in New Issue
Block a user