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