From 436ce95de28924bf9732eb64190386c8e523f4ac Mon Sep 17 00:00:00 2001 From: wangxi <123456> Date: Fri, 4 Mar 2022 10:35:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=B6=AF=E8=80=83=E8=AF=95=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E5=88=A0=E9=99=A4mock=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../analysis/components/IntroduceRow.tsx | 1 + admin/src/pages/history/analysis/index.tsx | 51 +++++++++++-------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/admin/src/pages/history/analysis/components/IntroduceRow.tsx b/admin/src/pages/history/analysis/components/IntroduceRow.tsx index 150901a..04eead9 100644 --- a/admin/src/pages/history/analysis/components/IntroduceRow.tsx +++ b/admin/src/pages/history/analysis/components/IntroduceRow.tsx @@ -211,6 +211,7 @@ const IntroduceRow = ({ loading, visitData }: { loading: boolean; visitData: Dat onChange={(id) => { area_id=id; handleSearch(''); + run() }} > diff --git a/admin/src/pages/history/analysis/index.tsx b/admin/src/pages/history/analysis/index.tsx index 7c8ab00..2f73357 100644 --- a/admin/src/pages/history/analysis/index.tsx +++ b/admin/src/pages/history/analysis/index.tsx @@ -42,7 +42,7 @@ const Analysis: FC = () => { getTimeDistance('year'), ); - const { loading, data } = useRequest(fakeChartData); + // const { loading, data } = useRequest(fakeChartData); const selectDate = (type: TimeType) => { setRangePickerValue(getTimeDistance(type)); @@ -73,46 +73,55 @@ const Analysis: FC = () => { }; let salesPieData; - if (salesType === 'all') { - salesPieData = data?.salesTypeData; - } else { - salesPieData = salesType === 'online' ? data?.salesTypeDataOnline : data?.salesTypeDataOffline; - } - - const handleChangeSalesType = (e: RadioChangeEvent) => { - setSalesType(e.target.value); - }; - - const handleTabChange = (key: string) => { - setCurrentTabKey(key); - }; - - const activeKey = currentTabKey || (data?.offlineData[0] && data?.offlineData[0].name) || ''; + // if (salesType === 'all') { + // salesPieData = data?.salesTypeData; + // } else { + // salesPieData = salesType === 'online' ? data?.salesTypeDataOnline : data?.salesTypeDataOffline; + // } + // + // const handleChangeSalesType = (e: RadioChangeEvent) => { + // setSalesType(e.target.value); + // }; + // + // const handleTabChange = (key: string) => { + // setCurrentTabKey(key); + // }; + // + // const activeKey = currentTabKey || (data?.offlineData[0] && data?.offlineData[0].name) || ''; return ( <> }> - + - + - +