From 75c15a1ec553cc5043bde9dbfaf0314b1f870db4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Sat, 6 Sep 2025 17:14:54 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E5=A2=9E=E5=8A=A0=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dashboard/grid/ChartLayoutPreview.vue | 212 ++++++++++++++++++ gear-ui3/src/views/dashboard/grid/setting.vue | 164 +------------- .../src/views/purchase/dashboard/index.vue | 5 - 3 files changed, 223 insertions(+), 158 deletions(-) create mode 100644 gear-ui3/src/views/dashboard/grid/ChartLayoutPreview.vue diff --git a/gear-ui3/src/views/dashboard/grid/ChartLayoutPreview.vue b/gear-ui3/src/views/dashboard/grid/ChartLayoutPreview.vue new file mode 100644 index 0000000..6a56a14 --- /dev/null +++ b/gear-ui3/src/views/dashboard/grid/ChartLayoutPreview.vue @@ -0,0 +1,212 @@ + + + + + + \ No newline at end of file diff --git a/gear-ui3/src/views/dashboard/grid/setting.vue b/gear-ui3/src/views/dashboard/grid/setting.vue index eb866e3..9c08c05 100644 --- a/gear-ui3/src/views/dashboard/grid/setting.vue +++ b/gear-ui3/src/views/dashboard/grid/setting.vue @@ -5,7 +5,6 @@

图表布局设置

- 应用设置 @@ -14,12 +13,11 @@
- +

- 图表配置

- + @@ -140,60 +138,11 @@
- -
-

- - 布局预览(实时同步配置) -

- -
- -
- -
- - - - - - -
- {{ chart.title }} - [{{ chart.id }}] -
- -
-
-
-

高度:{{ chart.height }}px

-

布局:xs={{ chart.layout.xs }} / sm={{ chart.layout.sm }} / md={{ chart.layout.md }}

-
-
-
-
-
-
-
+ +
@@ -212,10 +161,10 @@ import { ref, onMounted, reactive } from 'vue'; import { useStorage } from '@vueuse/core'; import { useEventListener } from '@vueuse/core'; import { ElMessage, ElMessageBox, ElEmpty, ElRow, ElCol, ElCard } from 'element-plus'; -// 新增导入预览用图标 -import { Loading, Grid, Eye } from '@element-plus/icons-vue'; +// 引入独立预览组件 +import ChartLayoutPreview from './ChartLayoutPreview.vue'; -// 原有逻辑保持不变,仅新增预览相关变量(如有需要) +// 原有逻辑保持不变(与原代码一致) const props = defineProps({ storageKey: { type: String, @@ -259,7 +208,6 @@ const batchSettings = reactive({ layout: { xs: null, sm: null, md: null, lg: null, xl: null } }); -// 原有方法(onMounted、calculateTableHeight、resetToSession等)保持不变 useEventListener('resize', () => { windowWidth.value = window.innerWidth; calculateTableHeight(); @@ -403,7 +351,7 @@ defineExpose({ resetToSession, applySettings }); \ No newline at end of file diff --git a/gear-ui3/src/views/purchase/dashboard/index.vue b/gear-ui3/src/views/purchase/dashboard/index.vue index a9187c1..efcd698 100644 --- a/gear-ui3/src/views/purchase/dashboard/index.vue +++ b/gear-ui3/src/views/purchase/dashboard/index.vue @@ -11,11 +11,6 @@ style="margin-bottom: 20px;" /> - -
- 数据分析页面 -
-