From f2b99c3e542d66abf7981f30abddcb258b0f17a0 Mon Sep 17 00:00:00 2001 From: wintsa <770775984@qq.com> Date: Fri, 21 Aug 2026 14:39:39 +0800 Subject: [PATCH] 1 --- .reasonix/desktop-topic-auto-title-meta.json | 8 +++++ .reasonix/desktop-topic-created-at.json | 3 ++ .reasonix/desktop-topic-title-sources.json | 3 ++ .reasonix/desktop-topic-titles.json | 3 ++ src/App.tsx | 32 +------------------- 5 files changed, 18 insertions(+), 31 deletions(-) create mode 100644 .reasonix/desktop-topic-auto-title-meta.json create mode 100644 .reasonix/desktop-topic-created-at.json create mode 100644 .reasonix/desktop-topic-title-sources.json create mode 100644 .reasonix/desktop-topic-titles.json diff --git a/.reasonix/desktop-topic-auto-title-meta.json b/.reasonix/desktop-topic-auto-title-meta.json new file mode 100644 index 0000000..1b90c96 --- /dev/null +++ b/.reasonix/desktop-topic-auto-title-meta.json @@ -0,0 +1,8 @@ +{ + "topic_20260821-062201_c21eb2dbea49a53e": { + "stage": 1, + "userTurns": 1, + "basisHash": "10579074257f2c51", + "updatedAt": 1787293862779 + } +} \ No newline at end of file diff --git a/.reasonix/desktop-topic-created-at.json b/.reasonix/desktop-topic-created-at.json new file mode 100644 index 0000000..0b76bd6 --- /dev/null +++ b/.reasonix/desktop-topic-created-at.json @@ -0,0 +1,3 @@ +{ + "topic_20260821-062201_c21eb2dbea49a53e": 1787293321185 +} \ No newline at end of file diff --git a/.reasonix/desktop-topic-title-sources.json b/.reasonix/desktop-topic-title-sources.json new file mode 100644 index 0000000..f6e3295 --- /dev/null +++ b/.reasonix/desktop-topic-title-sources.json @@ -0,0 +1,3 @@ +{ + "topic_20260821-062201_c21eb2dbea49a53e": "auto" +} \ No newline at end of file diff --git a/.reasonix/desktop-topic-titles.json b/.reasonix/desktop-topic-titles.json new file mode 100644 index 0000000..12dbf91 --- /dev/null +++ b/.reasonix/desktop-topic-titles.json @@ -0,0 +1,3 @@ +{ + "topic_20260821-062201_c21eb2dbea49a53e": "aggrid导出的时候数值不对,现在…" +} \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 7ca7d94..739512e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -147,18 +147,6 @@ const defaultTemplateFilterNode = { label: '默认模板', } as const; const overallSummaryKey = 'summary'; -const pivotGridWanValueFields = new Set([ - 'lowValue', - 'centerValue', - 'highValue', - 'maxValue', - 'minValue', - 'avgValue', - 'medianValue', - 'standardDeviation', - 'interquartileRange', -]); - // const mockGeoLocationPayload = { // checkStrictly: true, // type: 3, @@ -279,9 +267,6 @@ function formatNumber(value: number, maximumFractionDigits: number) { function formatCostValue(value: number) { const absValue = Math.abs(value); - if (absValue >= 10000) { - return `${formatNumber(value / 10000, 2)}万元`; - } const fractionDigits = absValue > 0 && absValue < 1 ? 4 : 2; return `${formatNumber(value, fractionDigits)}元`; } @@ -302,16 +287,7 @@ function formatChartValue(value: number, metricKey: MetricKey) { return formatAreaMetricValue(value); } -function formatGridWanValue(value: number) { - const wanValue = value / 10000; - const fractionDigits = Math.abs(wanValue) > 0 && Math.abs(wanValue) < 1 ? 4 : 2; - return formatNumber(wanValue, fractionDigits); -} - function formatGridMetricValue(value: number, metricKey: MetricKey) { - if (metricKey === 'cost') { - return formatGridWanValue(value); - } const absValue = Math.abs(value); const fractionDigits = absValue > 0 && absValue < 1 ? 4 : 2; return formatNumber(value, fractionDigits); @@ -1070,7 +1046,7 @@ function App() { ); const pivotGridColumnDefs = useMemo<(ColDef | ColGroupDef)[]>( () => { - const valueUnit = requestMetricKey === 'cost' ? '万元' : '元/m²'; + const valueUnit = requestMetricKey === 'cost' ? '元' : '元/m²'; const valueColumnMinWidth = requestMetricKey === 'cost' ? 112 : 142; const valueFormatter = ({ value }: ValueFormatterParams) => ( value == null ? '' : formatGridMetricValue(Number(value), requestMetricKey) @@ -1199,12 +1175,6 @@ function App() { const exportPivotGrid = useCallback(() => { pivotGridApiRef.current?.exportDataAsCsv({ fileName: '组团统计表.csv', - processCellCallback: ({ column, value }) => { - if (value == null) return ''; - return pivotGridWanValueFields.has(column.getColId()) - ? String(Number(value) / 10000) - : String(value); - }, }); setGridContextMenuPosition(null); }, []);