From 8a5ab2fcb6285a84098a9382cf6ec351dd6e54d1 Mon Sep 17 00:00:00 2001 From: wangqiujuan0808 <578331299@qq.com> Date: Mon, 4 Dec 2023 21:35:21 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 1 - src/views/bim/bimHome/components/3DChart.js | 21 +++++++++++-------- .../bim/bimHome/components/BuildInfo.vue | 2 +- .../bim/bimHome/components/DeviceEvent.vue | 2 +- .../bim/bimHome/components/DeviceInfo.vue | 2 +- .../bim/bimHome/components/DevicePie.vue | 6 +++--- .../bim/bimHome/components/EquipmentInfo.vue | 2 +- src/views/bim/bimHome/components/RealData.vue | 2 +- src/views/bim/bimHome/components/TopDiv.vue | 2 +- 9 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/main.js b/src/main.js index b08c52f..8641b4b 100644 --- a/src/main.js +++ b/src/main.js @@ -1,7 +1,6 @@ import { createApp } from 'vue' import Cookies from 'js-cookie' -import "echarts-gl"; import ElementPlus from 'element-plus' import locale from 'element-plus/lib/locale/lang/zh-cn' // 中文语言 diff --git a/src/views/bim/bimHome/components/3DChart.js b/src/views/bim/bimHome/components/3DChart.js index 9069254..5509cfe 100644 --- a/src/views/bim/bimHome/components/3DChart.js +++ b/src/views/bim/bimHome/components/3DChart.js @@ -112,23 +112,26 @@ const getPie3D = (pieData, internalDiameterRatio, rateName) => { fontSize: 14 } }, - // formatter: data => { - // return data.value ? `{title|${data.data.name}:}{rich|${data.value}}(次)\n{title|${rateName || '整改率'}:}{rich|${data.data.rate}%}` : '' - // } // 值为0的就不展示默认的示例 + formatter: data => { + return data.value ? `{title|${data.data.name}:} + {rich|${data.data.rate}%}` : '' + } // 值为0的就不展示默认的示例 }, tooltip: { show: true, formatter: params => { if (params.seriesName !== 'mouseoutSeries' && params.seriesName !== 'pie2d') { console.log(option.series[params.seriesIndex].pieData) - let bfb = ((option.series[params.seriesIndex].pieData.endRatio - option.series[params.seriesIndex].pieData.startRatio) * - 100).toFixed(2) - if (bfb === 'NaN') { - bfb = 0 - } + // let bfb = ((option.series[params.seriesIndex].pieData.endRatio - option.series[params.seriesIndex].pieData.startRatio) * + // 100).toFixed(2) + // if (bfb === 'NaN') { + // bfb = 0 + // } + + const rate = option.series[params.seriesIndex].pieData.rate; return `${params.seriesName}: ${option.series[params.seriesIndex].pieData.value}
` + `占比:` + - `${bfb}%` + `${rate}%` } } // hover示例 }, diff --git a/src/views/bim/bimHome/components/BuildInfo.vue b/src/views/bim/bimHome/components/BuildInfo.vue index 91b056a..1d6196f 100644 --- a/src/views/bim/bimHome/components/BuildInfo.vue +++ b/src/views/bim/bimHome/components/BuildInfo.vue @@ -43,7 +43,7 @@ const { buildInfo } = toRefs(data); right: 10px; // background: #0a1f2e; // border: 1px solid red; - width: 280px; + width: 320px; height: 340px; display: flex; flex-direction: column; diff --git a/src/views/bim/bimHome/components/DeviceEvent.vue b/src/views/bim/bimHome/components/DeviceEvent.vue index a2d12e3..971a841 100644 --- a/src/views/bim/bimHome/components/DeviceEvent.vue +++ b/src/views/bim/bimHome/components/DeviceEvent.vue @@ -69,7 +69,7 @@ const openDialog = () => { position: absolute; top: 410px; right: 10px; - width: 280px; + width: 360px; // height: 460px; display: flex; flex-direction: column; diff --git a/src/views/bim/bimHome/components/DeviceInfo.vue b/src/views/bim/bimHome/components/DeviceInfo.vue index e82ee84..02d5513 100644 --- a/src/views/bim/bimHome/components/DeviceInfo.vue +++ b/src/views/bim/bimHome/components/DeviceInfo.vue @@ -36,7 +36,7 @@ const { deviceInfo } = toRefs(data); position: absolute; top: 10px; right: 10px; - width: 280px; + width: 360px; height: 340px; display: flex; flex-direction: column; diff --git a/src/views/bim/bimHome/components/DevicePie.vue b/src/views/bim/bimHome/components/DevicePie.vue index 4d30de5..1d9a89d 100644 --- a/src/views/bim/bimHome/components/DevicePie.vue +++ b/src/views/bim/bimHome/components/DevicePie.vue @@ -34,7 +34,7 @@ const { optionsData } = toRefs(data); const optionData = optionsData.value.map((item) => { return { ...item, - rate: item.value / 181, + rate: (item.value / 100) *100, }; }); @@ -69,8 +69,8 @@ const openDialog = () => { position: absolute; top: 410px; right: 10px; - width: 280px; - height: 420px; + width: 360px; + height: 460px; display: flex; flex-direction: column; align-items: center; diff --git a/src/views/bim/bimHome/components/EquipmentInfo.vue b/src/views/bim/bimHome/components/EquipmentInfo.vue index 56cb809..11f6420 100644 --- a/src/views/bim/bimHome/components/EquipmentInfo.vue +++ b/src/views/bim/bimHome/components/EquipmentInfo.vue @@ -38,7 +38,7 @@ const { equipmentInfo } = toRefs(data); position: absolute; top: 10px; right: 10px; - width: 280px; + width: 320px; height: 340px; display: flex; flex-direction: column; diff --git a/src/views/bim/bimHome/components/RealData.vue b/src/views/bim/bimHome/components/RealData.vue index f60e598..cc9ad7e 100644 --- a/src/views/bim/bimHome/components/RealData.vue +++ b/src/views/bim/bimHome/components/RealData.vue @@ -63,7 +63,7 @@ const openDialog = () => { position: absolute; top: 410px; right: 10px; - width: 280px; + width: 320px; display: flex; flex-direction: column; align-items: center; diff --git a/src/views/bim/bimHome/components/TopDiv.vue b/src/views/bim/bimHome/components/TopDiv.vue index 6555ea3..22409db 100644 --- a/src/views/bim/bimHome/components/TopDiv.vue +++ b/src/views/bim/bimHome/components/TopDiv.vue @@ -12,7 +12,7 @@ const props = defineProps({