diff --git a/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/Problem/index.tsx b/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/Problem/index.tsx
index 4f626e5b2516174ee54a69b2d1eb9a20b11d2e28..91d5e137b515f55fa3483e246ddffbdbe1f9daf1 100644
--- a/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/Problem/index.tsx
+++ b/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/Problem/index.tsx
@@ -10,17 +10,19 @@ import OtherEvent from '@/pages/Common/Event/OtherEvent';
import ToDisposed from '@/pages/Common/Event/ToDisposed';
import UrbanOperation from '@/pages/Common/Event/UrbanOperation';
import services from '@/services';
+import { formatNumber } from '@/utils/ui';
import type { StatisticProps } from 'antd';
import { Flex, Space, Statistic } from 'antd';
import React, { useEffect, useMemo, useState } from 'react';
import CountUp from 'react-countup';
-import styles from './index.less';
import PeopleComplaintPage from '../PeopleComplaint';
+import styles from './index.less';
// import PeopleComplaint111 from '../PeopleComplaint';
-const formatter: StatisticProps['formatter'] = (value) => (
-
-);
+const formatter: StatisticProps['formatter'] = (value) => {
+
+ return ;
+};
const Problem: React.FC = () => {
const [modalOpt, setModalOpt] = useState<{
@@ -65,51 +67,62 @@ const Problem: React.FC = () => {
topCard: [
{
name: '诚管24高速通道',
+
value: statisticsData.cityHighNum,
+
modalConf: {
type: 'CgftEvent',
title: '诚管24高速通道处置情况',
singleType: '1',
},
+ unit: formatNumber(statisticsData.cityHighNum)?.unit,
},
{
name: '智慧蓉城提级通道',
value: statisticsData.moreNum,
+ // value: formatNumber(statisticsData.moreNum)?.num,
modalConf: {
type: 'urbanOperation',
title: '智慧蓉城提级通道处置情况',
eventType: '5',
},
+ unit: formatNumber(statisticsData.moreNum)?.unit,
},
{
name: '诚管24普通通道',
value: statisticsData.cityCommonNum,
+ // value: formatNumber(statisticsData.cityCommonNum)?.num,
modalConf: {
type: 'CgftEvent',
title: '诚管24普通通道处置情况',
singleType: '2',
},
+ unit: formatNumber(statisticsData.cityCommonNum)?.unit,
},
{
name: '行业自闭环通道',
value: statisticsData.otherSourceNum,
+ // value: formatNumber(statisticsData.otherSourceNum)?.num,
modalConf: {
type: 'otherEvent',
title: '行业自闭环通道处置情况',
isOther: '1',
},
+ unit: formatNumber(statisticsData.otherSourceNum)?.unit,
},
],
centerStatistic: [
{
name: '待处置',
- value: statisticsData.disposalNum,
+ //value: statisticsData.disposalNum,
// value: statisticsData.toDisposedNum,
- unit: '件',
+ value: formatNumber(statisticsData.disposalNum)?.num,
+ // unit: '件',
modalConf: {
type: 'toDisposed',
title: '待处置事件',
},
+ unit: formatNumber(statisticsData.disposalNum)?.unit,
},
{
name: '办结率',
@@ -122,38 +135,46 @@ const Problem: React.FC = () => {
},
{
name: '委内疑难案件',
- value: statisticsData.problemNum,
- unit: '件',
+ // value: statisticsData.problemNum,
+ value: formatNumber(statisticsData.problemNum)?.num,
+ // unit: '件',
modalConf: {
type: 'difficultEvents',
title: '疑难案件',
width: 2000,
},
+ unit: formatNumber(statisticsData.problemNum)?.unit,
},
{
name: '委外疑难案件',
- value: statisticsData.outsideProblemNum,
- unit: '件',
+ //value: statisticsData.outsideProblemNum,
+ value: formatNumber(statisticsData.outsideProblemNum)?.num,
+ // unit: '件',
modalConf: {
type: 'difficultEvents',
title: '疑难案件',
width: 2000,
},
+ unit: formatNumber(statisticsData.outsideProblemNum)?.unit,
},
],
bottomCard: [
{
name: '市民投诉',
value: statisticsData.smtsNum,
+ //value: formatNumber(statisticsData.smtsNum)?.num,
modalConf: {
type: 'collectionEvent',
title: '市民投诉事件',
collectionMode: '0',
},
+ unit: formatNumber(statisticsData.smtsNum)?.unit,
},
{
name: '智能感知',
- value: statisticsData.wlgzNum,
+ value: statisticsData.wlgzNum,
+ //value: formatNumber(statisticsData.wlgzNum)?.num,
+ unit: formatNumber(statisticsData.wlgzNum)?.unit,
modalConf: {
type: 'collectionEvent',
title: '智能感知事件',
@@ -163,6 +184,8 @@ const Problem: React.FC = () => {
{
name: '监督员上报',
value: statisticsData.rgxcNum,
+ //value: formatNumber(statisticsData.rgxcNum)?.num,
+ unit: formatNumber(statisticsData.rgxcNum)?.unit,
modalConf: {
type: 'collectionEvent',
title: '监督员上报事件',
@@ -182,7 +205,9 @@ const Problem: React.FC = () => {
// },
{
name: '行走成都',
- value: statisticsData.otherNum,
+ value: statisticsData.otherNum,
+ //value: formatNumber(statisticsData.otherNum)?.num,
+ unit: formatNumber(statisticsData.otherNum)?.unit,
modalConf: {
type: 'collectionEvent',
title: '行走成都事件',
@@ -192,6 +217,7 @@ const Problem: React.FC = () => {
],
};
}, [statisticsData]);
+ console.log(groupCard);
const getStatisticsData = () => {
services.CityProblemApi.getCityProblemStatistics().then((res) => {
@@ -234,7 +260,7 @@ const Problem: React.FC = () => {
value={item.value}
formatter={formatter}
/>
- 件
+ {item?.unit}
{item.name}
@@ -275,6 +301,7 @@ const Problem: React.FC = () => {
fontSize: 30,
lineHeight: 1,
}}
+ precision={item?.unit=='件'?0:2}
/>
{item.unit}
@@ -308,7 +335,7 @@ const Problem: React.FC = () => {
value={item.value}
formatter={formatter}
/>
- 件
+ {item?.unit}
{item.name}
diff --git a/src/pages/SecurityServiceOverview/SafetyMap/index.tsx b/src/pages/SecurityServiceOverview/SafetyMap/index.tsx
index d0174d0846db6847ba8804b173109418595c128d..961be3e0269b7f855b29925981577b1c882f4ebb 100644
--- a/src/pages/SecurityServiceOverview/SafetyMap/index.tsx
+++ b/src/pages/SecurityServiceOverview/SafetyMap/index.tsx
@@ -210,6 +210,8 @@ const SafetyMap = () => {
return {};
}
};
+
+
return (
@@ -222,6 +224,8 @@ const SafetyMap = () => {
{facility?.data?.records?.map((item: any, index: number) => {
const point = [Number(item?.longitude), Number(item?.latitude)];
+
+
return (
);
})}
diff --git a/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/DisposeFlow/index.tsx b/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/DisposeFlow/index.tsx
index c6a509c987746b5cdec9c4d7c8c5f8b92a49105b..8470c488275cbbb65b3815bf1348f05d44cff163 100644
--- a/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/DisposeFlow/index.tsx
+++ b/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/DisposeFlow/index.tsx
@@ -1,7 +1,10 @@
+import Modal from '@/components/HncyModal';
+import RiskWarn from '@/pages/SecurityServiceOverview/components/RiskWarn';
import services from '@/services';
import { getWarnTotal } from '@/utils/ui';
import { useModel } from '@umijs/max';
import { useRequest } from 'ahooks';
+import { useState } from 'react';
import styles from './index.less';
const DisposeFlow = ({
countWidth,
@@ -12,7 +15,13 @@ const DisposeFlow = ({
industryCode?: string;
}) => {
const { selectAreaId } = useModel('safetyAreaId');
-
+ const [riskModalOpt, setRiskModalOpt] = useState<{
+ open: boolean;
+ title: string;
+ }>({
+ open: false,
+ title: '风险预警列表',
+ });
const { data } = useRequest(
() =>
services.DataBase.getSjdzInfoData({
@@ -30,52 +39,68 @@ const DisposeFlow = ({
// console.log(data?.data?.data?.records?.[0]?.yjqktj);
return (
-
-
-
})
-
预警
-
- {getWarnTotal(data?.data?.data?.records?.[0]?.yjqktj)?.total ?? '--'}
+ <>
+
+
{
+ setRiskModalOpt({ open: true, title: '风险预警列表' })
+ }}>
+
+
})
+
预警
+
+ {getWarnTotal(data?.data?.data?.records?.[0]?.yjqktj)?.total ??
+ '--'}
+
-
-
})
-
})
-
处置
-
- {getWarnTotal(data?.data?.data?.records?.[0]?.yjqktj)?.czz ?? '--'}
+
+
})
+
处置
+
+ {getWarnTotal(data?.data?.data?.records?.[0]?.yjqktj)?.czz ?? '--'}
+
-
-
})
-
})
-
办结
-
- {getWarnTotal(data?.data?.data?.records?.[0]?.yjqktj)?.ycz ?? '--'}
+
+
})
+
办结
+
+ {getWarnTotal(data?.data?.data?.records?.[0]?.yjqktj)?.ycz ?? '--'}
+
-
-
+
{' '}
+ {/**风险预警 */}
+
setRiskModalOpt({ open: false, title: '' })}
+ width={1500}
+ height={846}
+ >
+
+
+ >
);
};
export default DisposeFlow;
diff --git a/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.less b/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.less
index 7828a2213ee646554ab31652c5ca4f06b42a9e68..739aa28bbfcd7a3dadc9e4f4693dabe11ae449a2 100644
--- a/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.less
+++ b/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.less
@@ -2,7 +2,8 @@
display: flex;
align-items: center;
min-width: 150px;
-cursor: pointer;
+ cursor: pointer;
+
.leftWrap {
.icon {
width: 52px;
@@ -28,10 +29,10 @@ cursor: pointer;
color: rgb(255, 255, 255);
font-size: 14px;
font-family: DingTalk JinBuTi;
-
+
}
-
+
}
}
@@ -44,16 +45,20 @@ cursor: pointer;
color: rgb(66, 203, 255);
font-size: 26px;
font-family: DingTalk JinBuTi;
-
+ display: flex;
+ flex-wrap: wrap;
+ align-items: flex-end;
// width: 100%;
// white-space: nowrap;
// overflow: hidden;
// text-overflow: ellipsis;
}
+
.count1 {
color: rgb(43, 136, 172);
font-size: 16px;
}
+
.name {
width: 100%;
color: rgb(202, 223, 252);
diff --git a/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.tsx b/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.tsx
index c09a5839008fe2cac2ee3e1230ccf32fb975f3ff..222dca65fed4e3de0d9d349ed7edfd16b20cf4bd 100644
--- a/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.tsx
+++ b/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.tsx
@@ -45,8 +45,11 @@ const IndustryWiget = ({
+
{data?.total}
- {data?.controlTotal ? /{data?.controlTotal}:null}
+
+
+ {data?.controlTotal ?
/{data?.controlTotal}
:null}
{data?.typeName}
diff --git a/src/pages/SecurityServiceOverview/SecurityState/MeetSafeguard/index.tsx b/src/pages/SecurityServiceOverview/SecurityState/MeetSafeguard/index.tsx
index 3066e848e37515b68d05d17823a573701e6f0a04..bb027d776eea2af8ea9c1539a09824db8e83a195 100644
--- a/src/pages/SecurityServiceOverview/SecurityState/MeetSafeguard/index.tsx
+++ b/src/pages/SecurityServiceOverview/SecurityState/MeetSafeguard/index.tsx
@@ -9,7 +9,9 @@ import services from '@/services';
import { SearchOutlined } from '@ant-design/icons';
import { useDebounceFn, useRequest } from 'ahooks';
import { Input } from 'antd';
+import { useModel } from '@umijs/max';
const MeetSafeguard = () => {
+ const { selectAreaId } = useModel('safetyAreaId');
// 弹窗
const [detailModalOpt, setDetailModalOpt] = useState
({
open: false,
@@ -20,46 +22,46 @@ const MeetSafeguard = () => {
page: 1,
count: 10,
});
-
+ //道路桥梁
+ const { data:meetData } = useRequest(
+ () =>
+ services.DataBase.getSjdzInfoData({
+ typeCode: 'zzcc-aq-yjbz',
+ data: {
+ regionCode: selectAreaId,
+ },
+ }),
+ {
+ refreshDeps: [selectAreaId],
+ },
+ );
+console.log(meetData?.data?.data?.records?.[0]);
const items = useMemo(() => {
return [
{
icon: require('@/assets/images/SecurityServiceOverview/yjdw.png'),
label: '应急队伍',
- value: 1586,
+ value:meetData?.data?.data?.records?.[0]?.yjdw??'--' ,
},
{
icon: require('@/assets/images/SecurityServiceOverview/aqzj.png'),
label: '安全专家',
- value: 1586,
+ value: meetData?.data?.data?.records?.[0]?.aqzj??'--',
},
{
icon: require('@/assets/images/SecurityServiceOverview/yjwz.png'),
label: '应急物资',
- value: 1586,
+ value: meetData?.data?.data?.records?.[0]?.yjwz??'--',
},
{
icon: require('@/assets/images/SecurityServiceOverview/yjzb.png'),
label: '应急装备',
- value: 158313131316,
+ value: meetData?.data?.data?.records?.[0]?.yjzb??'--',
},
];
- }, []);
- // //获取问题来源getEventCountBySource
- // const { data: eventSource, loading: eventSourceLoading } = useRequest(
- // services.Physicalsign.getEventCountBySource,
- // {
- // defaultParams: [
- // {
- // physicalSignType: '1',
- // indexId: '1',
- // indexType: '1',
- // objectId: areaId,
- // },
- // ],
- // },
- // );
+ }, [meetData]);
+
const pieData = useMemo(() => {
return [
{
diff --git a/src/pages/SecurityServiceOverview/SecurityState/RightLayout/RiskNotice/index.tsx b/src/pages/SecurityServiceOverview/SecurityState/RightLayout/RiskNotice/index.tsx
index 217228adedcb1055d835fcfacfc6e2de90e77ac6..2b13d42fd2e13ea0c714709bcdc0cbbb82926bc8 100644
--- a/src/pages/SecurityServiceOverview/SecurityState/RightLayout/RiskNotice/index.tsx
+++ b/src/pages/SecurityServiceOverview/SecurityState/RightLayout/RiskNotice/index.tsx
@@ -121,6 +121,7 @@ const RiskNotice: React.FC = () => {
warnCoutnData?.data?.records?.[0]?.stat?.find(
(item) => item?.risklevel === '红色预警',
)?.num || '--',
+ key: '3',
},
{
label: '橙色风险',
@@ -129,6 +130,7 @@ const RiskNotice: React.FC = () => {
warnCoutnData?.data?.records?.[0]?.stat?.find(
(item) => item?.risklevel === '橙色预警',
)?.num || '--',
+ key: '4',
},
{
label: '黄色风险',
@@ -138,6 +140,7 @@ const RiskNotice: React.FC = () => {
warnCoutnData?.data?.records?.[0]?.stat?.find(
(item) => item?.risklevel === '黄色预警',
)?.num || '--',
+ key: '2',
},
{
label: '一般风险',
@@ -146,6 +149,7 @@ const RiskNotice: React.FC = () => {
warnCoutnData?.data?.records?.[0]?.stat?.find(
(item) => item?.risklevel === '一般预警',
)?.num || '--',
+ key: '1',
},
];
}, [warnCoutnData]);
@@ -177,6 +181,16 @@ const RiskNotice: React.FC = () => {
className={styles.levelWrap}
key={it.label}
style={{ '--bg': it.color } as CSSProperties}
+ onClick={() => {
+ setRiskModalOpt({
+ open: true,
+ title: '风险预警列表',
+ params:{
+ risklevelid: it?.key,
+ }
+
+ });
+ }}
>
{it.label}
{it.num}
diff --git a/src/pages/SecurityServiceOverview/SecurityState/SecurityCqi/index.tsx b/src/pages/SecurityServiceOverview/SecurityState/SecurityCqi/index.tsx
index 8231239e5b989bdc9af57de5b34593824ef6ffcc..e208780b6e82b8f25769a4ecd4cb2b6cef640ed8 100644
--- a/src/pages/SecurityServiceOverview/SecurityState/SecurityCqi/index.tsx
+++ b/src/pages/SecurityServiceOverview/SecurityState/SecurityCqi/index.tsx
@@ -7,6 +7,7 @@ import { ConfigProvider, Popover } from 'antd';
import { useState } from 'react';
import ModalContent from '../../components/ModalContent';
import styles from './index.less';
+import RiskWarn from '../../components/RiskWarn';
const StatusMap = {
红色风险: {
// bg: require('@/assets/images/SecurityServiceOverview/topStateBg.png'),
@@ -55,9 +56,13 @@ const SecurityCqi = ({ warnLevel }: { warnLevel: number }) => {
open: false,
title: '安全指数溯源',
});
- // const { data: statisticalEvent } = useRequest(
- // services.CityRiskApi.getstatisticalEvent,
- // );
+ const [riskModalOpt, setRiskModalOpt] = useState<{
+ open: boolean;
+ title: string;
+ }>({
+ open: false,
+ title: '风险预警列表',
+ });
const { data } = useRequest(
() =>
services.DataBase.getSjdzInfoData({
@@ -100,36 +105,7 @@ const SecurityCqi = ({ warnLevel }: { warnLevel: number }) => {
取决于各个行业最高风险等级
- {/*
- { StatusMap[
- getState(data?.data?.records?.[0]?.yjzgdj?.risklevelid)
- ]?.icon&& (
-

- )}
-
- {
- StatusMap[
- getState(data?.data?.records?.[0]?.yjzgdj?.risklevelid)
- ]?.name
- }
-
-
*/}
+
{ StatusMap[
'正常'
@@ -243,7 +219,15 @@ const SecurityCqi = ({ warnLevel }: { warnLevel: number }) => {
-
+
{
+ setRiskModalOpt({
+ open:true,
+ title:'风险预警列表',
+ params:{
+ dateType:'month'
+ }
+ })
+ }}>
{getWarnTotal(data?.data?.records?.[0]?.yjqktj)?.total}
@@ -293,6 +277,16 @@ const SecurityCqi = ({ warnLevel }: { warnLevel: number }) => {
}
/>
+ {/**风险预警 */}
+ setRiskModalOpt({ open: false, title: '' })}
+ width={1500}
+ height={846}
+ >
+
+
);
};
diff --git a/src/pages/SecurityServiceOverview/components/BaseInfo/DetMap/index.less b/src/pages/SecurityServiceOverview/components/BaseInfo/DetMap/index.less
index f18f7b34b55245b61d50a1da437ec22e71b03a34..e7eae64971e35a10771afe832a6b1b9449a94a45 100644
--- a/src/pages/SecurityServiceOverview/components/BaseInfo/DetMap/index.less
+++ b/src/pages/SecurityServiceOverview/components/BaseInfo/DetMap/index.less
@@ -1,9 +1,8 @@
.container {
width: 1600px;
- height: 100%;
+ height: 760px;
border-radius: 20px;
overflow: hidden;
padding: 0 20px;
-
-
+
}
\ No newline at end of file
diff --git a/src/pages/SecurityServiceOverview/components/BaseInfo/DetMap/index.tsx b/src/pages/SecurityServiceOverview/components/BaseInfo/DetMap/index.tsx
index 36929b254689f08bb5a2e28188cfadfe52bddd96..f04a113f8fb3bbab216c0c4e463aa3ee91f7c989 100644
--- a/src/pages/SecurityServiceOverview/components/BaseInfo/DetMap/index.tsx
+++ b/src/pages/SecurityServiceOverview/components/BaseInfo/DetMap/index.tsx
@@ -1,136 +1,60 @@
-import { CSSProperties, useRef, useState } from 'react';
+import { useEffect, useRef } from 'react';
// import { CustomOverlay, Polygon } from 'react-bmapgl';
-import blueBg from '@/assets/images/SecurityServiceOverview/right/blueBg.png';
-import orangeBg from '@/assets/images/SecurityServiceOverview/right/orangeBg.png';
-import redBg from '@/assets/images/SecurityServiceOverview/right/redBg.png';
-import yellowBg from '@/assets/images/SecurityServiceOverview/right/yellowBg.png';
import CooglMap from '@/components/CooglMap';
+import { colorConfig } from '@/pages/SecurityServiceOverview/SafetyMap';
import styles from './index.less';
const DetMap = ({ data }: { data: any }) => {
- const colorConfig: Record<
- string,
- {
- color: CSSProperties['color'];
- bg: string;
- icon: string;
- }
- > = {
- 红色风险: {
- //红色风险
- color: '#FFBCBC',
- bg: redBg,
- icon: 'redIcon',
- },
- 橙色风险: {
- //橙色风险
- color: '#FDDFCE',
- bg: orangeBg,
- icon: 'orangeIcon',
- },
- 黄色风险: {
- //黄色风险
- color: '#FFE892',
- bg: yellowBg,
- icon: 'yellowIcon',
- },
- 一般风险: {
- //一般风险
- color: '#BFE4FF',
- bg: blueBg,
- icon: 'blueIcon',
- },
- };
-
const MapRef = useRef
();
- const [searchParams, setSearchParams] = useState({
- parentTypeCode: 'dlql',
- lat: 30.680193,
- lon: 104.075555,
- distance: 1000,
- page: 1,
- count: 100,
- });
- // 事件详情弹窗
- const [detailModalOpt, setDetailModalOpt] = useState({
- open: false,
- title: '',
- eventId: '',
- });
- const [wayModalOpt, setWayModalOpt] = useState<{
- open: boolean;
- title: string;
- }>({
- open: false,
- title: '道路桥梁情况',
- });
+ useEffect(() => {
+ if (data) {
+ MapRef?.current?.flyTo({
+ destination: {
+ x: Number(data?.longitude),
+ y: Number(data?.latitude),
+ z: 239,
+ },
+ // orientation: {
+ // heading: 6.283185307179586,
+ // pitch: -1.568627330287271,
+ // roll: 0,
+ // },
+ });
+ }
+ }, [data]);
+ if (!data) {
+ return;
+ }
return (
-
-
- <>
- {
- // setDetailModalOpt({
- // open: true,
- // eventId: item?.riskId,
- // ...item,
- // });
- }}
- >
-
-
- >
- {/*
- {warnMark?.items?.map((item: any, index: number) => {
- const point = [Number(item?.x_pos), Number(item?.y_pos)];
-
- return (
- {
- setDetailModalOpt({
- open: true,
- eventId: item?.riskId,
- ...item,
- });
- }}
- >
-
-
- );
- })}
- */}
-
-
+ <>
+
{
+ // setDetailModalOpt({
+ // open: true,
+ // eventId: item?.riskId,
+ // ...item,
+ // });
+ }}
+ >
+
+
+ >
+
);
};
diff --git a/src/pages/SecurityServiceOverview/components/BaseInfo/index.tsx b/src/pages/SecurityServiceOverview/components/BaseInfo/index.tsx
index cf8458a2712221a1eaf8e1860db4c30ab80b673f..974a00be35eda926523ba0060d9fea4d27826b17 100644
--- a/src/pages/SecurityServiceOverview/components/BaseInfo/index.tsx
+++ b/src/pages/SecurityServiceOverview/components/BaseInfo/index.tsx
@@ -139,7 +139,10 @@ const BaseInfo: React.FC<{
*/}
+
+
+
({
diff --git a/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx b/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx
index c50158b15b915c6d48f866bc288da2579fbe05c7..ec9e8590754272c5abb89ffc57ab63659bc40db4 100644
--- a/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx
+++ b/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx
@@ -214,7 +214,7 @@ console.log(data);
<>
{/**区域 */}
{data?.map((item, index) => {
- return item?.multiPoints.map((it,idx) => {
+ return item?.multiPoints?.map((it,idx) => {
return (
void }) => {
- const [searchParams, setSearchParams] = useState({dateType:'all'});
-
-
- // const { data: sourceOption } = useRequest(
- // services.CityRiskApi.eventSourceTypeSelect,
- // );
- const { data } = useRequest(
- services.CityRiskApi.statisticalEventPc,
+const TopSearch = ({
+ onSearch,
+ defaultFetchParams,
+}: {
+ onSearch: (val: any) => void;
+ defaultFetchParams: any;
+}) => {
+ const [searchParams, setSearchParams] = useState({ dateType:defaultFetchParams?.dateType|| 'all' });
+ const { selectAreaId } = useModel('safetyAreaId');
+ //预警数
+ const { data: warnTotal } = useRequest(
+ () =>
+ services.DataBase.getSjdzInfoData({
+ typeCode: 'zzcc-aq-yjgl',
+ data: {
+ regionCode: selectAreaId,
+ },
+ }),
+ {
+ refreshDeps: [selectAreaId],
+ },
);
+
const items = useMemo(() => {
return [
{
key: 'month',
name: '当前预警',
- count: data?.data?.monthEventTotal,
+ count: warnTotal?.data?.data?.records?.[0]?.dqyjs ?? '--',
},
{
key: 'today',
name: '今日预警',
- count: data?.data?.todayEventTotal,
+ count: warnTotal?.data?.data?.records?.[0]?.jryjs ?? '--',
},
{
key: 'all',
name: '全部预警',
- count: data?.data?.historyEventTotal,
+ count: warnTotal?.data?.data?.records?.[0]?.qbyjs ?? '--',
},
];
- }, [data]);
+ }, [warnTotal]);
+
useUpdateEffect(() => {
onSearch(searchParams);
}, [searchParams]);
@@ -96,20 +111,23 @@ const TopSearch = ({ onSearch }: { onSearch: (val: any) => void }) => {
]}
placeholder="全部等级"
allowClear
+ defaultValue={defaultFetchParams?.risklevelid}
onChange={(e) => {
setSearchParams({ ...searchParams, risklevelid: e });
}}
/>