From 9afef7ac219515fd7c04f6f80edcb690ed60752e Mon Sep 17 00:00:00 2001 From: lijingqi <1437862981@qq.com> Date: Wed, 18 Dec 2024 20:29:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A4=A7=E5=B1=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SecurityState/SecurityCqi/index.tsx | 4 ++-- .../SecurityState/index.tsx | 1 - .../MapCantainer/DistrictMap/index.tsx | 16 +++++++--------- .../MapCantainer/EmphasisAreaMap/index.tsx | 12 ++++++------ src/utils/ui.ts | 4 ++-- 5 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/pages/SecurityServiceOverview/SecurityState/SecurityCqi/index.tsx b/src/pages/SecurityServiceOverview/SecurityState/SecurityCqi/index.tsx index 9e1b9253..3440f0f7 100644 --- a/src/pages/SecurityServiceOverview/SecurityState/SecurityCqi/index.tsx +++ b/src/pages/SecurityServiceOverview/SecurityState/SecurityCqi/index.tsx @@ -221,7 +221,7 @@ const SecurityCqi = ({ warnLevel }: { warnLevel: number }) => {
{ data?.data?.records?.[0]?.yjqktj?.find( - (item) => item?.status == '未处理', + (item:any) => item?.status == '未处理', )?.num }
@@ -231,7 +231,7 @@ const SecurityCqi = ({ warnLevel }: { warnLevel: number }) => {
{ data?.data?.records?.[0]?.yjqktj?.find( - (item) => item?.status == '已解除', + (item:any) => item?.status == '已解除', )?.num }
diff --git a/src/pages/SecurityServiceOverview/SecurityState/index.tsx b/src/pages/SecurityServiceOverview/SecurityState/index.tsx index 9eed02e4..a9a3db72 100644 --- a/src/pages/SecurityServiceOverview/SecurityState/index.tsx +++ b/src/pages/SecurityServiceOverview/SecurityState/index.tsx @@ -9,7 +9,6 @@ import RightLayout from './RightLayout'; import SafetyAccident from './SafetyAccident'; import SafetyTips from './SafetyTips'; import SecurityCqi from './SecurityCqi'; -import MapCantainer from '../components/MapCantainer'; export const StateMap = { 正常: 0, 一般风险: 1, diff --git a/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx b/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx index fc57a701..82fe362d 100644 --- a/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx +++ b/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx @@ -136,7 +136,7 @@ const DistrictMap: React.FC = () => { page: 1, count: 10, // protrudeFlag: '1', - }).then((res) => { + }).then((res:any) => { console.log('getUpToDateEvent', res); if (res.code === 200) { setEventData(res.data?.items); @@ -253,7 +253,7 @@ const DistrictMap: React.FC = () => { onSet={() => { const obj = signData?.find( - (signItem) => item.objectId === signItem?.objectId, + (signItem:any) => item.objectId === signItem?.objectId, ); setSelected({ ...item, @@ -305,7 +305,7 @@ const DistrictMap: React.FC = () => { ) : ( <> {warnMark?.items - ?.filter((item) => checkedKeys?.includes(item?.riskLevel)) + ?.filter((item:any) => checkedKeys?.includes(item?.riskLevel)) ?.map((item: any, index: number) => { const point = [Number(item?.x_pos), Number(item?.y_pos)]; @@ -364,8 +364,7 @@ const DistrictMap: React.FC = () => { top: -50, }} onDetail={(e) => { - e?.stopPropagation(); - e?.nativeEvent?.stopImmediatePropagation(); + setDetailModalOpt({ open: true, eventId: fxSelectd?.riskId, @@ -373,8 +372,7 @@ const DistrictMap: React.FC = () => { }); }} onClose={(e) => { - e?.stopPropagation(); - e?.nativeEvent?.stopImmediatePropagation(); + setFxSelectd(undefined); }} @@ -469,7 +467,7 @@ const DistrictMap: React.FC = () => { checkable defaultExpandAll - onCheck={(e) => { + onCheck={(e:any) => { setCheckedKeys(e); }} checkedKeys={checkedKeys} @@ -546,7 +544,7 @@ const DistrictMap: React.FC = () => {
- {eventList?.items?.map((it, index) => { + {eventList?.items?.map((it:any, index:number) => { return ( { ) : ( <> {warnMark?.data?.items - ?.filter((item) => checkedKeys?.includes(item?.riskLevel)) + ?.filter((item:any) => checkedKeys?.includes(item?.riskLevel)) ?.map((item: any, index: number) => { const point = [Number(item?.x_pos), Number(item?.y_pos)]; return ( @@ -362,12 +362,12 @@ const EmphasisAreaMap: React.FC = () => { ); })} {newEvent?.data?.items - ?.filter((item) => + ?.filter((item:any) => checkedKeys?.includes( item?.protrudeFlag == '2' ? '突出问题' : '其他问题', ), ) - .map((item, index) => { + .map((item:any, index:number) => { const point = [Number(item?.lon), Number(item?.lat)]; return ( {
重点区域列表
- {areaList?.map((item, index) => { + {areaList?.map((item:any, index:number) => { return (
{ {expand === index && (
- {item?.objects.map((child, child_index) => { + {item?.objects.map((child:any, child_index:any) => { return ( { { + onCheck={(e:any) => { setCheckedKeys(e); }} checkedKeys={checkedKeys} diff --git a/src/utils/ui.ts b/src/utils/ui.ts index 4ae09c57..2f47ca99 100644 --- a/src/utils/ui.ts +++ b/src/utils/ui.ts @@ -137,8 +137,8 @@ export function isFullscreenElement() { } export const getWarnTotal = (data: any) => { if (!data) return; - const ycz = data?.find((item) => item?.status === '已解除')?.num ?? 0; - const czz = data?.find((item) => item?.status === '未处理')?.num ?? 0; + const ycz = data?.find((item:any) => item?.status === '已解除')?.num ?? 0; + const czz = data?.find((item:any) => item?.status === '未处理')?.num ?? 0; return { ycz, czz, -- GitLab