From 7f7102ccb388560d18c241ee6927510c36be58e8 Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期四, 21 九月 2023 09:58:20 +0800 Subject: [PATCH] 更改数据判断条件,修复统计图表及统计分析页面echarts图标数据显示问题 --- src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue index eec09ae..c025553 100644 --- a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue +++ b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue @@ -359,7 +359,11 @@ textStyle:{ color:'#000', }, - formatter:"鏃堕暱锛歿c}H" + // formatter:"鏃堕暱锛歿c}H", + formatter:params=>{ + const value=String(params.value) + return value.length==2&&value[0]==='0'?`鏃堕暱锛�${value.slice(1)}H`:`鏃堕暱锛�${value}H` + } }, itemStyle: { normal: { @@ -456,7 +460,11 @@ textStyle:{ color:'#000', }, - formatter:"鏃堕暱锛歿c}H" + // formatter:"鏃堕暱锛歿c}H", + formatter:params=>{ + const value=String(params.value) + return value.length==2&&value[0]==='0'?`鏃堕暱锛�${value.slice(1)}H`:`鏃堕暱锛�${value}H` + } }, itemStyle: { normal: { @@ -549,7 +557,11 @@ textStyle:{ color:'#000', }, - formatter:"鏃堕暱锛歿c}H" + // formatter:"鏃堕暱锛歿c}H", + formatter:params=>{ + const value=String(params.value) + return value.length==2&&value[0]==='0'?`鏃堕暱锛�${value.slice(1)}H`:`鏃堕暱锛�${value}H` + } }, itemStyle: { normal: { -- Gitblit v1.9.3