From 6dacc2ba09148d126f3c578eaa2841e9eba5acca Mon Sep 17 00:00:00 2001 From: jiangAB Date: Fri, 12 Dec 2025 11:13:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=BB=93=E6=9E=84=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/map/components/CompanyShorePower.vue | 88 ++++ public/map/components/PortOverview.vue | 140 +++++++ public/map/components/ShipShorePower.vue | 189 +++++++++ public/map/components/ShorePowerUsage.vue | 130 ++++++ .../{_index.vue => bk/components_index.vue} | 0 .../bk/map_index.vue} | 0 .../components/{index.vue => cesiumMap.vue} | 0 .../map/components/{ => charts}/BarChart.vue | 0 .../map/components/charts/BarChartMinute.vue | 182 +++++++++ .../map/components/{ => charts}/LineChart.vue | 17 +- .../map/components/{ => charts}/PieChart.vue | 0 public/map/components/index.html | 240 ----------- public/map/index.vue | 385 +++--------------- 13 files changed, 799 insertions(+), 572 deletions(-) create mode 100644 public/map/components/CompanyShorePower.vue create mode 100644 public/map/components/PortOverview.vue create mode 100644 public/map/components/ShipShorePower.vue create mode 100644 public/map/components/ShorePowerUsage.vue rename public/map/components/{_index.vue => bk/components_index.vue} (100%) rename public/map/{_index.vue => components/bk/map_index.vue} (100%) rename public/map/components/{index.vue => cesiumMap.vue} (100%) rename public/map/components/{ => charts}/BarChart.vue (100%) create mode 100644 public/map/components/charts/BarChartMinute.vue rename public/map/components/{ => charts}/LineChart.vue (93%) rename public/map/components/{ => charts}/PieChart.vue (100%) delete mode 100644 public/map/components/index.html diff --git a/public/map/components/CompanyShorePower.vue b/public/map/components/CompanyShorePower.vue new file mode 100644 index 0000000..ee82048 --- /dev/null +++ b/public/map/components/CompanyShorePower.vue @@ -0,0 +1,88 @@ + + + + + \ No newline at end of file diff --git a/public/map/components/PortOverview.vue b/public/map/components/PortOverview.vue new file mode 100644 index 0000000..6740ac2 --- /dev/null +++ b/public/map/components/PortOverview.vue @@ -0,0 +1,140 @@ + + + + + \ No newline at end of file diff --git a/public/map/components/ShipShorePower.vue b/public/map/components/ShipShorePower.vue new file mode 100644 index 0000000..4e3f936 --- /dev/null +++ b/public/map/components/ShipShorePower.vue @@ -0,0 +1,189 @@ + + + + + \ No newline at end of file diff --git a/public/map/components/ShorePowerUsage.vue b/public/map/components/ShorePowerUsage.vue new file mode 100644 index 0000000..d745c4d --- /dev/null +++ b/public/map/components/ShorePowerUsage.vue @@ -0,0 +1,130 @@ + + + + + \ No newline at end of file diff --git a/public/map/components/_index.vue b/public/map/components/bk/components_index.vue similarity index 100% rename from public/map/components/_index.vue rename to public/map/components/bk/components_index.vue diff --git a/public/map/_index.vue b/public/map/components/bk/map_index.vue similarity index 100% rename from public/map/_index.vue rename to public/map/components/bk/map_index.vue diff --git a/public/map/components/index.vue b/public/map/components/cesiumMap.vue similarity index 100% rename from public/map/components/index.vue rename to public/map/components/cesiumMap.vue diff --git a/public/map/components/BarChart.vue b/public/map/components/charts/BarChart.vue similarity index 100% rename from public/map/components/BarChart.vue rename to public/map/components/charts/BarChart.vue diff --git a/public/map/components/charts/BarChartMinute.vue b/public/map/components/charts/BarChartMinute.vue new file mode 100644 index 0000000..5ecd646 --- /dev/null +++ b/public/map/components/charts/BarChartMinute.vue @@ -0,0 +1,182 @@ + + + + + \ No newline at end of file diff --git a/public/map/components/LineChart.vue b/public/map/components/charts/LineChart.vue similarity index 93% rename from public/map/components/LineChart.vue rename to public/map/components/charts/LineChart.vue index 1f3b849..925d538 100644 --- a/public/map/components/LineChart.vue +++ b/public/map/components/charts/LineChart.vue @@ -37,7 +37,7 @@ const updateChart = () => { const option = { title: { - text: props.title, + // text: props.title, textStyle: { color: '#fff', fontSize: 14 @@ -113,10 +113,10 @@ const updateChart = () => { } ], grid: { - left: '5%', - right: '5%', - top: '15%', - bottom: '10%', + left: '1%', + right: '1%', + top: '6%', + bottom: '1%', containLabel: true } } @@ -142,7 +142,10 @@ const handleResize = () => { // 组件挂载时初始化图表 onMounted(() => { - initChart() + // 延迟初始化,确保DOM已经完全渲染 + setTimeout(() => { + initChart() + }, 200) window.addEventListener('resize', handleResize) }) @@ -160,6 +163,6 @@ onBeforeUnmount(() => { .line-chart-container { width: 100%; height: 100%; - min-height: 200px; + min-height: 0; } \ No newline at end of file diff --git a/public/map/components/PieChart.vue b/public/map/components/charts/PieChart.vue similarity index 100% rename from public/map/components/PieChart.vue rename to public/map/components/charts/PieChart.vue diff --git a/public/map/components/index.html b/public/map/components/index.html deleted file mode 100644 index 0305cf7..0000000 --- a/public/map/components/index.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - CesiumJS 天地图纯影像示例 - - - - - - - -
- - - -
- - - - - -
- - - - \ No newline at end of file diff --git a/public/map/index.vue b/public/map/index.vue index 87d8ce3..da435de 100644 --- a/public/map/index.vue +++ b/public/map/index.vue @@ -1,8 +1,6 @@