From 3f35bbfade27765feb2270f0b1938d8ac2c56daf Mon Sep 17 00:00:00 2001 From: Lei OT Date: Fri, 24 Nov 2023 11:41:53 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=B8=9A=E7=BB=A9KPI=E6=8A=98=E7=8E=B0?= =?UTF-8?q?=E5=9B=BE=E7=9A=84=E5=9B=BE=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LineWithKPI.jsx | 5 ++++- src/views/Home.jsx | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/LineWithKPI.jsx b/src/components/LineWithKPI.jsx index 3eb4294..77191bf 100644 --- a/src/components/LineWithKPI.jsx +++ b/src/components/LineWithKPI.jsx @@ -57,7 +57,10 @@ export default observer((props) => { name: ele, value: ele, marker: { symbol: ele.includes(' ') ? 'hyphen' : 'circle', style: { fill: colorSets[ele], stroke: colorSets[ele?.split(' ')?.[0]], r: 3, lineWidth: 2, color: colorSets[ele] } }, - })), + })).sort(sortBy('name')), + }, + tooltip: { + customItems: (items) => items.sort(sortBy('name')), }, // annotations: [ // // 低于 0 颜色变化 diff --git a/src/views/Home.jsx b/src/views/Home.jsx index 1ecb837..65a5105 100644 --- a/src/views/Home.jsx +++ b/src/views/Home.jsx @@ -54,6 +54,7 @@ export default observer(() => { const groupType = _overviewFlag ? 'overview' : 'dept'; queryData.groupType = groupType; setGroupTypeVal(groupType); + setDiffGroupKey('overview'); TradeStore.resetData(); TradeStore.fetchSummaryData(Object.assign({}, queryData, { groupType })); TradeStore.fetchTradeDataByDate(queryData); @@ -169,7 +170,7 @@ export default observer(() => { }; const [diffGroupKey, setDiffGroupKey] = useState(groupKey); const handleChangeDiffType = ({ target: { value } }) => { - console.log('diffGroupKey', diffGroupKey, value); + // console.log('diffGroupKey', diffGroupKey, value); setDiffGroupKey(value); TradeStore.setGroupKey(value); if (!isEmpty(TradeStore.searchPayloadHome)) {