diff --git a/pages/web/js/main.js b/pages/web/js/main.js index ba0f3d1..eed0ec6 100644 --- a/pages/web/js/main.js +++ b/pages/web/js/main.js @@ -1323,21 +1323,24 @@ function initResourceRate() { dataNum: 50, dataNumColor: 'rgba(251,221,45,0.8)', dashboardBgc: 'rgba(254,249,209,0.2)', - dashboardColor: 'rgba(251,221,45,0.8)' + dashboardColor: 'rgba(251,221,45,0.8)', + isRate:true }, { dataTitle: '设备使用率', dataNum: 25, dataNumColor: 'rgba(1,194,255,0.8)', dashboardBgc: 'rgba(45,153,139,0.2)', - dashboardColor: 'rgba(1,194,255,0.8)' + dashboardColor: 'rgba(1,194,255,0.8)', + isRate:true }, { dataTitle: '能源使用率', dataNum: 15, dataNumColor: 'rgba(1,255,193,0.8)', dashboardBgc: 'rgba(45,153,139,0.2)', - dashboardColor: 'rgba(1,255,193,0.8)' + dashboardColor: 'rgba(1,255,193,0.8)', + isRate:false }, ] loader.get(url, null, function (res) { @@ -1416,8 +1419,11 @@ function getResourceChartOption(config) { offsetCenter: [0, '-25%'], valueAnimation: true, formatter: function (value) { - // return '{value|' + value + '}{unit|%}'; - return '{value|' + value + '}'; + if(config.isRate){ + return '{value|' + value + '}{unit|%}'; + }else{ + return '{value|' + value + '}'; + } }, rich: { value: {