diff --git a/src/views/home/components/MunicipalChart/Top1.vue b/src/views/home/components/MunicipalChart/Top1.vue index 99f25daa..5c489713 100644 --- a/src/views/home/components/MunicipalChart/Top1.vue +++ b/src/views/home/components/MunicipalChart/Top1.vue @@ -26,15 +26,15 @@
装备年限
5年以内 - {{lineData.fiveYearRatio || 0}}% + {{ lineData.fiveYearRatio > 0 ? ((lineData.fiveYearRatio / lineData.deviceQuantity) * 100).toFixed(1) : 0 }}%
5年-10年 - {{lineData.fiveToTenYearRatio || 0}}% + {{ lineData.fiveToTenYearRatio > 0 ? ((lineData.fiveToTenYearRatio / lineData.deviceQuantity) * 100).toFixed(1) : 0 }}%
10年以上 - {{lineData.aboveTenYearRatio||0}}% + {{ lineData.aboveTenYearRatio > 0 ? ((lineData.aboveTenYearRatio / lineData.deviceQuantity) * 100).toFixed(1) : 0 }}%
@@ -62,15 +62,15 @@
装备年限
5年以内 - {{bdData.fiveYearRatio||0}}% + {{ bdData.fiveYearRatio > 0 ? ((bdData.fiveYearRatio / bdData.deviceQuantity) * 100).toFixed(1) : 0 }}%
5年-10年 - {{bdData.fiveToTenYearRatio||0}}% + {{ bdData.fiveToTenYearRatio > 0 ? ((bdData.fiveToTenYearRatio / bdData.deviceQuantity) * 100).toFixed(1) : 0 }}%
10年以上 - {{bdData.aboveTenYearRatio||0}}% + {{ bdData.aboveTenYearRatio > 0 ? ((bdData.aboveTenYearRatio / bdData.deviceQuantity) * 100).toFixed(1) : 0 }}%
@@ -98,15 +98,15 @@
装备年限
5年以内 - {{dlData.fiveYearRatio||0}}% + {{ dlData.fiveYearRatio > 0 ? ((dlData.fiveYearRatio / dlData.deviceQuantity) * 100).toFixed(1) : 0 }}%
5年-10年 - {{dlData.fiveToTenYearRatio||0}}% + {{ dlData.fiveToTenYearRatio > 0 ? ((dlData.fiveToTenYearRatio / dlData.deviceQuantity) * 100).toFixed(1) : 0 }}%
10年以上 - {{dlData.aboveTenYearRatio||0}}% + {{ dlData.aboveTenYearRatio > 0 ? ((dlData.aboveTenYearRatio / dlData.deviceQuantity) * 100).toFixed(1) : 0 }}%
diff --git a/src/views/home/components/provincial/Top1.vue b/src/views/home/components/provincial/Top1.vue index 6ac2347d..7bb63827 100644 --- a/src/views/home/components/provincial/Top1.vue +++ b/src/views/home/components/provincial/Top1.vue @@ -41,15 +41,21 @@
装备年限
5年以内 - {{ state1.five }}% + {{ state1.five > 0 ? ((state1.five / state1.num) * 100).toFixed(1) : 0 }}%
5年-10年 - {{ state1.fiveOrTen }}% + {{ state1.fiveOrTen > 0 ? ((state1.fiveOrTen / state1.num) * 100).toFixed(1) : 0 }}%
10年以上 - {{ state1.ten }}% + {{ state1.ten > 0 ? ((state1.ten / state1.num) * 100).toFixed(1) : 0 }}%
@@ -64,15 +70,21 @@
装备年限
5年以内 - {{ state2.five }}% + {{ state2.five > 0 ? ((state2.five / state2.num) * 100).toFixed(1) : 0 }}%
5年-10年 - {{ state2.fiveOrTen }}% + {{ state2.fiveOrTen > 0 ? ((state2.fiveOrTen / state2.num) * 100).toFixed(1) : 0 }}%
10年以上 - {{ state2.ten }}% + {{ state2.ten > 0 ? ((state2.ten / state2.num) * 100).toFixed(1) : 0 }}%
@@ -87,15 +99,21 @@
装备年限
5年以内 - {{ state3.five }}% + {{ state3.five > 0 ? ((state3.five / state3.num) * 100).toFixed(1) : 0 }}%
5年-10年 - {{ state3.fiveOrTen }}% + {{ state3.fiveOrTen > 0 ? ((state3.fiveOrTen / state3.num) * 100).toFixed(1) : 0 }}%
10年以上 - {{ state3.ten }}% + {{ state3.ten > 0 ? ((state3.ten / state3.num) * 100).toFixed(1) : 0 }}%