Skip to content
Snippets Groups Projects
Commit 2a2d8e74 authored by 1437862981's avatar 1437862981
Browse files

跟新

parent 116a7f38
Branches
Tags
No related merge requests found
......@@ -82,11 +82,11 @@ const Top5: React.FC<{
return list?.map((item: any) => ({
name: item?.gridName,
num: item?.num,
percent: (
percent:total? (
(item?.num /
total) *
100
).toFixed(2),
).toFixed(2):0,
}));
}, [qysl, areaKey,total]);
......
......@@ -10,9 +10,9 @@ import styles from './index.less';
const Top5: React.FC<{
modalDispatch: ChildrenModalMethods;
searchTime: any;
total:number
total: number;
}> = memo((props) => {
const { modalDispatch, searchTime ,total} = props;
const { modalDispatch, searchTime, total } = props;
const { data: wfxwsl } = useRequest(
() =>
......@@ -33,13 +33,9 @@ const Top5: React.FC<{
return list?.map((item: any) => ({
name: item?.wfxwlx,
num: item?.num,
percent: (
(item?.num /
total) *
100
).toFixed(2),
percent: total?((item?.num / total) * 100).toFixed(2):0,
}));
}, [wfxwsl,total]);
}, [wfxwsl, total]);
return (
<BaseCard w={457} h={430} title="违法行为类型TOP5">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment