mirror of
https://github.com/dataease/dataease.git
synced 2026-05-23 22:08:34 +08:00
feat(视图):暂时隐藏快速计算;增加新的计算汇总方式,适应指标卡、指针仪表盘等汇总统计类图表,仅支持一个指标字段
This commit is contained in:
@@ -679,13 +679,13 @@ export default {
|
||||
dashboard: 'Dashboard',
|
||||
dimension_color: 'Dimension Color',
|
||||
quota_color: 'Quota Color',
|
||||
dimension_font_size: 'Dimension FontSize',
|
||||
quota_font_size: 'Quota FontSize',
|
||||
space_split: 'Dimension/Quota Space',
|
||||
dimension_font_size: 'Name FontSize',
|
||||
quota_font_size: 'Value FontSize',
|
||||
space_split: 'Name/Value Space',
|
||||
only_one_quota: 'Only support 1 quota',
|
||||
only_one_result: 'Only show first result',
|
||||
dimension_show: 'Dimension Show',
|
||||
quota_show: 'Quota Show',
|
||||
dimension_show: 'Name Show',
|
||||
quota_show: 'Value Show',
|
||||
title_limit: 'Title cannot be greater than 50 characters',
|
||||
filter_condition: 'Filter Condition',
|
||||
filter_field_can_null: 'Filter field must choose',
|
||||
|
||||
@@ -679,13 +679,13 @@ export default {
|
||||
dashboard: '儀表板',
|
||||
dimension_color: '維度顏色',
|
||||
quota_color: '指標顏色',
|
||||
dimension_font_size: '維度字體大小',
|
||||
quota_font_size: '指標字體大小',
|
||||
space_split: '維度/指標間隔',
|
||||
dimension_font_size: '名稱字體大小',
|
||||
quota_font_size: '值字體大小',
|
||||
space_split: '名稱/值間隔',
|
||||
only_one_quota: '僅支持1個指標',
|
||||
only_one_result: '僅顯示第1個計算結果',
|
||||
dimension_show: '維度顯示',
|
||||
quota_show: '指標顯示',
|
||||
dimension_show: '名稱顯示',
|
||||
quota_show: '值顯示',
|
||||
title_limit: '標題不能大於50個字符',
|
||||
filter_condition: '過濾條件',
|
||||
filter_field_can_null: '過濾字段必填',
|
||||
|
||||
@@ -679,13 +679,13 @@ export default {
|
||||
dashboard: '仪表板',
|
||||
dimension_color: '维度颜色',
|
||||
quota_color: '指标颜色',
|
||||
dimension_font_size: '维度字体大小',
|
||||
quota_font_size: '指标字体大小',
|
||||
space_split: '维度/指标间隔',
|
||||
dimension_font_size: '名称字体大小',
|
||||
quota_font_size: '值字体大小',
|
||||
space_split: '名称/值间隔',
|
||||
only_one_quota: '仅支持1个指标',
|
||||
only_one_result: '仅显示第1个计算结果',
|
||||
dimension_show: '维度显示',
|
||||
quota_show: '指标显示',
|
||||
dimension_show: '名称显示',
|
||||
quota_show: '值显示',
|
||||
title_limit: '标题不能大于50个字符',
|
||||
filter_condition: '过滤条件',
|
||||
filter_field_can_null: '过滤字段必填',
|
||||
|
||||
@@ -44,7 +44,8 @@ export function baseGaugeOption(chart_option, chart) {
|
||||
}
|
||||
// data只取第一个
|
||||
const y = {
|
||||
name: chart.data.x[0],
|
||||
// name: chart.data.x[0],
|
||||
name: chart.data.series[0].name,
|
||||
value: chart.data.series[0].data[0]
|
||||
}
|
||||
chart_option.series[0].data.push(y)
|
||||
|
||||
@@ -29,21 +29,22 @@
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="item.id !== 'count'">
|
||||
<el-dropdown placement="right-start" size="mini" style="width: 100%" @command="quickCalc">
|
||||
<span class="el-dropdown-link inner-dropdown-menu">
|
||||
<span>
|
||||
<i class="el-icon-s-grid" />
|
||||
<span>{{ $t('chart.quick_calc') }}</span>
|
||||
<span class="summary-span">(无)</span>
|
||||
</span>
|
||||
<i class="el-icon-arrow-right el-icon--right" />
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="beforeQuickCalc('none')">无</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-dropdown-item>
|
||||
<!-- 快速计算先隐藏-->
|
||||
<!-- <el-dropdown-item v-if="item.id !== 'count'">-->
|
||||
<!-- <el-dropdown placement="right-start" size="mini" style="width: 100%" @command="quickCalc">-->
|
||||
<!-- <span class="el-dropdown-link inner-dropdown-menu">-->
|
||||
<!-- <span>-->
|
||||
<!-- <i class="el-icon-s-grid" />-->
|
||||
<!-- <span>{{ $t('chart.quick_calc') }}</span>-->
|
||||
<!-- <span class="summary-span">(无)</span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <i class="el-icon-arrow-right el-icon--right" />-->
|
||||
<!-- </span>-->
|
||||
<!-- <el-dropdown-menu slot="dropdown">-->
|
||||
<!-- <el-dropdown-item :command="beforeQuickCalc('none')">无</el-dropdown-item>-->
|
||||
<!-- </el-dropdown-menu>-->
|
||||
<!-- </el-dropdown>-->
|
||||
<!-- </el-dropdown-item>-->
|
||||
<el-dropdown-item divided>
|
||||
<el-dropdown placement="right-start" size="mini" style="width: 100%" @command="sort">
|
||||
<span class="el-dropdown-link inner-dropdown-menu">
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
:style="content_class"
|
||||
>
|
||||
<p v-if="dimensionShow" :style="label_class">
|
||||
{{ chart.data.x[0] }}
|
||||
<!-- {{ chart.data.x[0] }}-->
|
||||
{{ chart.data.series[0].name }}
|
||||
</p>
|
||||
<span v-if="quotaShow" :style="label_space">
|
||||
<p v-for="item in chart.data.series" :key="item.name" :style="label_content_class">
|
||||
|
||||
@@ -178,15 +178,15 @@
|
||||
</el-row>
|
||||
<el-row style="color: #909399;">
|
||||
<span>
|
||||
<span v-show="chart.type && (chart.type.includes('pie') || chart.type.includes('funnel'))">
|
||||
<span v-show="chart.type && (chart.type.includes('pie') || chart.type.includes('funnel') || chart.type.includes('text') || chart.type.includes('gauge'))">
|
||||
Tips: {{ $t('chart.only_one_quota') }}
|
||||
</span>
|
||||
<span v-show="chart.type && (chart.type.includes('text'))">
|
||||
Tips: {{ $t('chart.only_one_result') }}
|
||||
</span>
|
||||
<span v-show="chart.type && chart.type.includes('gauge')">
|
||||
Tips: {{ $t('chart.only_one_quota') }},{{ $t('chart.only_one_result') }}
|
||||
</span>
|
||||
<!-- <span v-show="chart.type && (chart.type.includes('text'))">-->
|
||||
<!-- Tips: {{ $t('chart.only_one_result') }}-->
|
||||
<!-- </span>-->
|
||||
<!-- <span v-show="chart.type && chart.type.includes('gauge')">-->
|
||||
<!-- Tips: {{ $t('chart.only_one_quota') }},{{ $t('chart.only_one_result') }}-->
|
||||
<!-- </span>-->
|
||||
</span>
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -226,8 +226,8 @@
|
||||
|
||||
<el-col style="height: 100%;min-width: 500px;border-top: 1px solid #E6E6E6;">
|
||||
<el-row style="width: 100%;height: 100%;" class="padding-lr">
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-row style="display:flex;height: 32px;">
|
||||
<el-row style="margin-top: 10px;height: 74px;">
|
||||
<el-row v-if="chart.type !=='text' && chart.type !== 'gauge'" style="display:flex;height: 32px;">
|
||||
<span style="line-height: 32px;width: 80px;text-align: right;">{{ $t('chart.dimension') }}</span>
|
||||
<draggable
|
||||
v-model="view.xaxis"
|
||||
@@ -524,11 +524,14 @@ export default {
|
||||
ele.filter = []
|
||||
}
|
||||
})
|
||||
if (view.type.startsWith('pie') || view.type.startsWith('funnel')) {
|
||||
if (view.type.startsWith('pie') || view.type.startsWith('funnel') || view.type.startsWith('text') || view.type.startsWith('gauge')) {
|
||||
if (view.yaxis.length > 1) {
|
||||
view.yaxis.splice(1, view.yaxis.length)
|
||||
}
|
||||
}
|
||||
if (view.type.startsWith('text') || view.type.startsWith('gauge')) {
|
||||
view.xaxis = []
|
||||
}
|
||||
if (view.type === 'line' && trigger === 'chart') {
|
||||
view.customAttr.size.lineArea = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user