From 821cc1753f3760e9fbebb71e48fb348c0a994e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=B1=E8=BE=BE?= Date: Fri, 16 May 2025 11:59:37 +0800 Subject: [PATCH] =?UTF-8?q?refactor(analysis):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=88=86=E6=9E=90=E9=A1=B5=E9=9D=A2=E5=B1=95=E7=A4=BA=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整饼图容器宽度为 100%,高度固定为 300px - 重构 questionTypeMap,使用 basicQuesTypeList 自动生成 - 优化 AnalysisInfo 组件,增加表格展示功能- 调整 useAnalysis hook,添加 aiAnalysisData 状态保存分析数据 - 在 pieSeries 中添加示例数据,优化饼图展示效果 --- components.d.ts | 3 - src/components/Analysis/Index.vue | 4 +- src/hooks/chart/usePieChart.ts | 2 + src/utils/question/typeMapping.ts | 16 ++--- .../components/AnalysisInfo/Index.vue | 67 ++++++++++++------- .../AnalysisInfo/hooks/pieSeries.ts | 25 ++++--- .../views/Analysis/hooks/useAnalysis.ts | 7 +- 7 files changed, 72 insertions(+), 52 deletions(-) diff --git a/components.d.ts b/components.d.ts index 68492ee..2467701 100644 --- a/components.d.ts +++ b/components.d.ts @@ -32,12 +32,10 @@ declare module 'vue' { RouterView: typeof import('vue-router')['RouterView'] VanActionSheet: typeof import('vant/es')['ActionSheet'] VanButton: typeof import('vant/es')['Button'] - VanCard: typeof import('vant/es')['Card'] VanCell: typeof import('vant/es')['Cell'] VanCellGroup: typeof import('vant/es')['CellGroup'] VanCheckbox: typeof import('vant/es')['Checkbox'] VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup'] - VanCol: typeof import('vant/es')['Col'] VanDivider: typeof import('vant/es')['Divider'] VanField: typeof import('vant/es')['Field'] VanIcon: typeof import('vant/es')['Icon'] @@ -48,7 +46,6 @@ declare module 'vue' { VanPopup: typeof import('vant/es')['Popup'] VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] - VanRow: typeof import('vant/es')['Row'] VanSearch: typeof import('vant/es')['Search'] VanStepper: typeof import('vant/es')['Stepper'] VanSwipe: typeof import('vant/es')['Swipe'] diff --git a/src/components/Analysis/Index.vue b/src/components/Analysis/Index.vue index b59f075..b398166 100644 --- a/src/components/Analysis/Index.vue +++ b/src/components/Analysis/Index.vue @@ -13,9 +13,7 @@ useSetPieChart(pieChart, series, { title: false, legend: false });