diff --git a/src/pages/SecurityServiceOverview/SecurityState/SecurityCqi/index.tsx b/src/pages/SecurityServiceOverview/SecurityState/SecurityCqi/index.tsx index 9e1b92530253d9be01f71e5787430f6ef5323e92..3440f0f7ee5fb085d4c8777ed118fcbe1c8054f6 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 9eed02e42142a99b9eb385a9d2c70c4ca079dd02..a9a3db72fe033ccce8f95934cd4f94bf018ad72b 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 fc57a70177c784f5bb59e9f369be74d4fc4cb20a..82fe362dd4339cc4b85570eb38cfbf709cc66a34 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 4ae09c5704e219137a42cc76fa3cc92c584a1cd5..2f47ca997aa585b85a0c67cfe51b9129aa92fc8c 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,