diff --git a/src/pages/GlobalModalServices/modals/KeyAreaDetail/Map/index.tsx b/src/pages/GlobalModalServices/modals/KeyAreaDetail/Map/index.tsx index 7179de60511b3b45137908003c5372fcbe67aae2..65e02c75327851d7523fb639b4c4a1499bb6cca4 100644 --- a/src/pages/GlobalModalServices/modals/KeyAreaDetail/Map/index.tsx +++ b/src/pages/GlobalModalServices/modals/KeyAreaDetail/Map/index.tsx @@ -1,18 +1,12 @@ -import myVideo1 from '@/assets/media/movie.mp4'; - // import BMapView from '@/components/BMapView'; import CooglMap from '@/components/CooglMap'; -import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons'; -import { Flex, Space } from 'antd'; +import EmptySpace from '@/components/EmptySpace'; +import services from '@/services'; import gsap from 'gsap'; import React, { useEffect, useRef, useState } from 'react'; -import { Marker } from 'react-bmapgl'; -import FilterTree from '../FilterTree'; import LiveSlideshow from '../LiveSlideshow'; import InfoWindow from './components/InfoWindow'; import styles from './index.less'; -import services from '@/services'; -import EmptySpace from '@/components/EmptySpace'; interface MapProps { objectId: string; @@ -21,7 +15,7 @@ interface MapProps { const Map: React.FC = (props) => { const { objectId } = props; - const [currentObjectData, setCurrentObjectData] = useState({}) + const [currentObjectData, setCurrentObjectData] = useState({}); const [expandStatus, setExpandStatus] = useState(true); const listRef = useRef(null); @@ -88,18 +82,18 @@ const Map: React.FC = (props) => { const params = { physicalSignType: 1, objectHierarchy: 19, - objectId - } - const res = await services.Physicalsign.getObjectPolygon(params) + objectId, + }; + const res = await services.Physicalsign.getObjectPolygon(params); if (res.code === 200) { if (res.data?.length) { - console.log(res.data) - setCurrentObjectData(res.data[0]) + console.log(res.data); + setCurrentObjectData(res.data[0]); } } - } + }; - const [eventList, setEventList] = useState([]) + const [eventList, setEventList] = useState([]); const getEventListData = async () => { const params = { @@ -107,18 +101,20 @@ const Map: React.FC = (props) => { keyAreaId: objectId, // objectId dateType: 'monthly', // dateType // limit: 3 - } - const res = await services.Physicalsign.getNormalEventListForKeyAreas(params) + }; + const res = await services.Physicalsign.getNormalEventListForKeyAreas( + params, + ); if (res.code === 200) { - console.log('getTimesData', res.data) - setEventList(res.data) + console.log('getTimesData', res.data); + setEventList(res.data); } - } + }; useEffect(() => { - getEventListData() - getObjectPolygon() - }, [objectId]) + getEventListData(); + getObjectPolygon(); + }, [objectId]); return (
@@ -222,38 +218,47 @@ const Map: React.FC = (props) => {
- {eventList?.map((item:any, index) => { + zoom={0.5} + ref={MapRef} + center={{ + x: currentObjectData?.centerX || 104.066349, + y: currentObjectData?.centerY || 30.658842, + }} + > + {eventList?.map((item: any, index) => { + return ( + { + setSelected({ ...item, type: 2 }); + }} + position={[item?.lon, item?.lat]} + icon={(iconList as any)[5]} + > + ); + })} + {selected && ( + { + setSelected(undefined); + }} + > + )} + <> + {currentObjectData?.multiPoints?.map((it) => { return ( - { - setSelected({...item, type: 2}); - }} - position={[item?.lon, item?.lat]} - icon={(iconList as any)[5]} - > + ); })} - {selected && ( - { - setSelected(undefined); - }} - > - )} - - + +
{expandStatus ? ( diff --git a/src/pages/SecurityServiceOverview/SafetyMap/index.less b/src/pages/SecurityServiceOverview/SafetyMap/index.less index e523a87ae777713f7da43d547d99bc90007e4f43..79bcfdda8f13ae560f79c1a67cebbdbe7b2d5179 100644 --- a/src/pages/SecurityServiceOverview/SafetyMap/index.less +++ b/src/pages/SecurityServiceOverview/SafetyMap/index.less @@ -1,7 +1,7 @@ .container { width: 100%; overflow: hidden; - height: 100%; + height: 940px; position: relative; border-radius: 20px; diff --git a/src/pages/SecurityServiceOverview/SafetyMap/index.tsx b/src/pages/SecurityServiceOverview/SafetyMap/index.tsx index 8480e647169aab27c3cece648674de287abece79..d0174d0846db6847ba8804b173109418595c128d 100644 --- a/src/pages/SecurityServiceOverview/SafetyMap/index.tsx +++ b/src/pages/SecurityServiceOverview/SafetyMap/index.tsx @@ -212,7 +212,7 @@ const SafetyMap = () => { }; return (
-
+
{ setWayModalOpt({ open: false, title: '' })} + // onCancel={() => setWayModalOpt({ open: false, title: '' })} width={650} height={846} > diff --git a/src/pages/SecurityServiceOverview/SecurityState/FacilityWarn/index.tsx b/src/pages/SecurityServiceOverview/SecurityState/FacilityWarn/index.tsx index b6631e3ad6b71953c3fa2ae9fea6ff2a76edab90..fcd89fd8fb3a35a5a6747eb07ed90fed50173bde 100644 --- a/src/pages/SecurityServiceOverview/SecurityState/FacilityWarn/index.tsx +++ b/src/pages/SecurityServiceOverview/SecurityState/FacilityWarn/index.tsx @@ -188,9 +188,12 @@ const FacilityWarn = ({ key={index} data={{ ...item, - - typeCode: zm?.typeCode, - parentData: zm, + generalList: [ + { typeName: '当前异常数', total: 0 }, + { typeName: '风险管控数', total: item?.total }, + { typeName: `${item?.typeName}总数`, total: item?.total }, + ], + controlTotal: item?.total }} style={{ width: 210, marginBottom: 30 }} /> @@ -259,8 +262,12 @@ const FacilityWarn = ({ data={{ ...item, icon: require('@/assets/images/SecurityServiceOverview/guanlang.png'), - typeCode: gl?.typeCode, - parentData: gl, + generalList: [ + { typeName: '当前异常数', total: 0 }, + { typeName: '风险管控数', total: item?.total }, + { typeName: `${item?.typeName}总数`, total: item?.total }, + ], + controlTotal: item?.total }} style={{ width: 210, marginBottom: 30 }} /> diff --git a/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.less b/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.less index 2bfaf64c892fdff1b4e64008c7b4d477530c8f7b..7828a2213ee646554ab31652c5ca4f06b42a9e68 100644 --- a/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.less +++ b/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.less @@ -28,6 +28,7 @@ cursor: pointer; color: rgb(255, 255, 255); font-size: 14px; font-family: DingTalk JinBuTi; + } @@ -44,7 +45,10 @@ cursor: pointer; font-size: 26px; font-family: DingTalk JinBuTi; - + // width: 100%; + // white-space: nowrap; + // overflow: hidden; + // text-overflow: ellipsis; } .count1 { color: rgb(43, 136, 172); diff --git a/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.tsx b/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.tsx index b486cd257e5bcb7d770741e682e205417f653919..c09a5839008fe2cac2ee3e1230ccf32fb975f3ff 100644 --- a/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.tsx +++ b/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/IndustryWiget/index.tsx @@ -46,7 +46,7 @@ const IndustryWiget = ({
{data?.total} - {data?.c && /{data?.c}} + {data?.controlTotal ? /{data?.controlTotal}:null}
{data?.typeName}
diff --git a/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/index.tsx b/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/index.tsx index 6d95b055db695813dc3779b563db2c33c160fe3a..774eea4bd4e0f5b273ce0245d187d77c56fc278f 100644 --- a/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/index.tsx +++ b/src/pages/SecurityServiceOverview/SecurityState/IndustryWarn/index.tsx @@ -233,7 +233,12 @@ const IndustryWarn = ({ data={{ ...item, // typeCode: dlql?.typeCode, - parentData: item, + generalList: [ + { typeName: '当前异常数', total: 0 }, + { typeName: '风险管控数', total: item?.total }, + { typeName: `${item?.typeName}总数`, total: item?.total }, + ], + controlTotal: item?.total // warn: 33, }} // style={{ width: 170 }} @@ -267,9 +272,13 @@ const IndustryWarn = ({ key={index} data={{ ...item, - - typeCode: hw?.typeCode, - parentData: hw, + generalList: [ + { typeName: '当前异常数', total: 0 }, + { typeName: '风险管控数', total: item?.total }, + { typeName: `${item?.typeName}总数`, total: item?.total }, + ], + controlTotal: item?.total + }} style={{ width: 170 }} /> diff --git a/src/pages/SecurityServiceOverview/components/IndustrySign/index.tsx b/src/pages/SecurityServiceOverview/components/IndustrySign/index.tsx index 3290c919c8939d58fe98295169f3822a30ec5115..3e0f656d30e0d34ea1bc956295cdd79e804b79af 100644 --- a/src/pages/SecurityServiceOverview/components/IndustrySign/index.tsx +++ b/src/pages/SecurityServiceOverview/components/IndustrySign/index.tsx @@ -241,7 +241,7 @@ const IndustrySign = ({ param ,onClose}: { param: any ,onClose?:()=>void}) => { }} >
- {[param]?.map((item, index) => ( + {param?.generalList?.map((item, index) => ( = (props) => {
{ }); }, []); + useEffect(() => { let intervalId!: NodeJS.Timeout; if (!eventHtmlRef.current) { @@ -210,16 +211,18 @@ const DistrictMap: React.FC = () => { <> {/**区域 */} {data?.map((item, index) => { - return ( - - ); + return item?.multiPoints.map((it,idx) => { + return ( + + ); + }); })} {data?.map((item, index) => { const point = [Number(item.centerX), Number(item.centerY)]; diff --git a/src/pages/TheOperationOfTheDistrictCityAndCounty/components/Map/index.tsx b/src/pages/TheOperationOfTheDistrictCityAndCounty/components/Map/index.tsx index 746c2c6e059af7c8178b3daf3769723863f81e30..5897c747f0f951e600f038d4b6078419bf458833 100644 --- a/src/pages/TheOperationOfTheDistrictCityAndCounty/components/Map/index.tsx +++ b/src/pages/TheOperationOfTheDistrictCityAndCounty/components/Map/index.tsx @@ -31,7 +31,7 @@ const DistrictMap: React.FC = () => { physicalSignType: 1, objectHierarchy: 1, }).then((res) => { - console.log(res) + console.log(res); setData(res.data); }); }, []); @@ -58,6 +58,7 @@ const DistrictMap: React.FC = () => { setSelectedData(temp); }, [data, selectDistrict]); +console.log(selectedData); return (
@@ -69,16 +70,18 @@ const DistrictMap: React.FC = () => { {!selectDistrict ? ( {data?.map((item, index) => { - return ( - - ); + return item?.multiPoints.map((it) => { + return ( + + ); + }); })} {data?.map((item, index) => { const point = [Number(item.centerX), Number(item.centerY)]; @@ -101,13 +104,20 @@ const DistrictMap: React.FC = () => { ) : ( <> - + {selectedData?.multiPoints?.map((it) => { + return ( + + ); + })} +