diff --git a/src/layouts/Header/index.tsx b/src/layouts/Header/index.tsx index 214f1e2a31621de34f918e34ce125b10aa1e46b6..43a3a55f3a1b6f6e1c27313d41df7ea1e60ab01e 100644 --- a/src/layouts/Header/index.tsx +++ b/src/layouts/Header/index.tsx @@ -11,7 +11,7 @@ export default function Header() { const handleModeChange = (checked: boolean) => { // true 为统览模式, false 为专题模式 - navigate(checked ? '/overview' : '/'); + navigate(checked ? '/overview' : '/home/urbanSituation'); }; const handleJump = () => { diff --git a/src/pages/Common/Quality/SafetyProblem/index.tsx b/src/pages/Common/Quality/SafetyProblem/index.tsx index 554c92c8a0761171a54f28f5bed65a3094eff3a7..34c8066c5b4a68d19171ac7434344918a39ebd44 100644 --- a/src/pages/Common/Quality/SafetyProblem/index.tsx +++ b/src/pages/Common/Quality/SafetyProblem/index.tsx @@ -51,8 +51,8 @@ const SafetyProblem: React.FC = ({ listHeight = 650, indexsI indexId: indexsItems?.id, objectId: indexsItems?.objectId, indexType: '1', - // pageNo: page.current.page, - // pageSize: 10 + pageNo: page.current.page, + pageSize: 50 } services.Physicalsign.getIndexSafetyProblemList(params).then((res: any) => { if (res.code === 200) { diff --git a/src/pages/GlobalModalServices/modals/KeyArea/Map/index.less b/src/pages/GlobalModalServices/modals/KeyArea/Map/index.less index a121e78fce8ba45b047333029d6153d6a4753082..b5342b2e5fb84638744231902e6672e97cecaf2c 100644 --- a/src/pages/GlobalModalServices/modals/KeyArea/Map/index.less +++ b/src/pages/GlobalModalServices/modals/KeyArea/Map/index.less @@ -80,6 +80,7 @@ left: 0; top: 40px; padding: 16px 25px; + overflow-y: auto; } .listTitle { diff --git a/src/pages/GlobalModalServices/modals/KeyArea/Map/index.tsx b/src/pages/GlobalModalServices/modals/KeyArea/Map/index.tsx index 65d24994ced221f72d4a88bf499da4860f378f7a..1840999d286ef0896e4cd3727e57ac55472d4680 100644 --- a/src/pages/GlobalModalServices/modals/KeyArea/Map/index.tsx +++ b/src/pages/GlobalModalServices/modals/KeyArea/Map/index.tsx @@ -2,12 +2,13 @@ import BMapView from '@/components/BMapView'; import CooglMap from '@/components/CooglMap'; import { useGlobalModalServices } from '@/pages/GlobalModalServices/provider'; import BMapService from '@/utils/mapService'; -import { getColorByIndex } from '@/utils/ui'; +import { getColorByIndex, getCqiStatusStyle } from '@/utils/ui'; import { DownCircleFilled, UpCircleFilled } from '@ant-design/icons'; import { Flex, Space, Switch } from 'antd'; import React, { CSSProperties, useEffect, useRef, useState } from 'react'; import { CustomOverlay } from 'react-bmapgl'; import styles from './index.less'; +import services from '@/services'; const Map: React.FC = () => { const [expand, setExpand] = useState(); @@ -17,6 +18,8 @@ const Map: React.FC = () => { const [isBmap, setIsBmap] = useState(false); const MapRef = useRef(); + const [areaList, setAreaList] = useState([]) + const data = [ { name: '党政机关', @@ -108,6 +111,26 @@ const Map: React.FC = () => { useEffect(() => { setViewport(); }, [MapRef.current]); + + + // 重点区域列表 + const getImportantAreaList = async () => { + const params = { + physicalSignType: 1, + objectHierarchy: 19 + } + const res = await services.Physicalsign.getGroupObjectPhysicalSignIndex(params) + console.log(res); + if(res.code === 200) { + setAreaList(res.data) + } + } + + useEffect(() => { + getImportantAreaList() + }, []) + + return (
{isBmap ? ( @@ -201,7 +224,7 @@ const Map: React.FC = () => {
重点区域列表
- {data.map((item, index) => { + {areaList?.map((item, index) => { return (
{ setExpand(index); }} > -
{item.name}
+
{item?.objGroup}
-
{item.num}
+
{item?.objects?.length}
{index === expand ? ( @@ -231,7 +254,7 @@ const Map: React.FC = () => {
{expand === index && (
- {item.child.map((child, child_index) => { + {item?.objects.map((child, child_index) => { return ( { className={styles.childItem} justify="space-between" > -
{child.name}
-
- {child.value} +
{child.objectName}
+
+ {child.cqi}
); diff --git a/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx b/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx index 8cadac8a4e0938d1bb49261603575e3586296bfc..40638238a01884d751779305a38a1506fa708ede 100644 --- a/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx +++ b/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx @@ -17,6 +17,7 @@ import classNames from 'classnames'; import React, { CSSProperties, useEffect, useRef, useState } from 'react'; import BaseInfo from '../../BaseInfo'; import styles from './index.less'; +import { useGlobalModalServices } from '@/pages/GlobalModalServices/provider'; /** 地图 */ const DistrictMap: React.FC = () => { const [selected, setSelected] = useState(); @@ -54,9 +55,18 @@ const DistrictMap: React.FC = () => { }, }; /** @description store */ - const { selectDistrict, areaListDto } = useModel('regionalIndex'); + const [checkedKeys,setCheckedKeys]=useState(['aq', 'cswt']) const MapRef = useRef(); + const { selectDistrict, areaListDto, getIndexs, indexs } = useModel( + 'regionalIndex', + (store) => ({ + areaListDto: store.areaListDto, + selectDistrict: store.selectDistrict!, + getIndexs: store.getIndexs, + indexs: store.indexs, + }), + ); // 事件详情弹窗 const [detailModalOpt, setDetailModalOpt] = useState({ open: false, @@ -67,6 +77,8 @@ const DistrictMap: React.FC = () => { const [isBmap, setIsBmap] = useState(false); const [leftTabKey, setLeftTabKey] = useState('1'); const [data, setData] = useState([]); + + const { dispatch } = useGlobalModalServices(); const [searchParams, setSearchParams] = useState({ parentTypeCode: 'dlql', lat: 30.680193, @@ -156,6 +168,8 @@ const DistrictMap: React.FC = () => { ); }; + + return (
{ onSet={() => { console.log('hello world'); setSelected(item); + dispatch.push('districtIndex', { + title: item?.objectName + '运行情况', + props: { + data: item, + indexs: indexs, + }, + }); }} + >
{ const [isBmap, setIsBmap] = useState(false); const MapRef = useRef(); const [leftTabKey, setLeftTabKey] = useState('1'); - const [checkedKeys,setCheckedKeys]=useState(['aq', 'cswt']) + const [checkedKeys, setCheckedKeys] = useState(['aq', 'cswt']) // 事件详情弹窗 const [detailModalOpt, setDetailModalOpt] = useState({ open: false, title: '', eventId: '', }); + const [areaList, setAreaList] = useState([]) + const [allAreaMapData, setAllAreaMapData] = useState([]) const [searchParams, setSearchParams] = useState({ parentTypeCode: 'dlql', lat: 30.680193, @@ -152,6 +154,24 @@ const EmphasisAreaMap: React.FC = () => { 4: require('@/assets/images/wtIc.png'), 5: require('@/assets/images/tuchuIc.png'), }; + + // 重点区域列表 + const getImportantAreaList = async () => { + const params = { + physicalSignType: 1, + objectHierarchy: 19 + } + const res = await services.Physicalsign.getGroupObjectPhysicalSignIndex(params) + console.log(res); + if (res.code === 200) { + setAreaList(res.data) + } + } + + useEffect(() => { + getImportantAreaList() + }, []) + const pList = [ { l: [103.87453593938976, 30.746739203687397], @@ -175,6 +195,24 @@ const EmphasisAreaMap: React.FC = () => { }, ]; + const getObjectPolygon = async () => { + const params = { + physicalSignType: 1, + objectHierarchy: 19, + } + const res = await services.Physicalsign.getObjectPolygon(params) + if (res.code === 200) { + if (res.data?.length) { + console.log(res.data) + setAllAreaMapData(res.data) + } + } + } + + useEffect(() => { + getObjectPolygon() + }, []) + /** 标题渲染 */ const titleRender = () => { @@ -184,9 +222,8 @@ const EmphasisAreaMap: React.FC = () => { @@ -248,7 +285,7 @@ const EmphasisAreaMap: React.FC = () => { > {leftTabKey === '1' ? ( <> - { dispatch.push('KeyAreaDetail', { @@ -291,13 +328,41 @@ const EmphasisAreaMap: React.FC = () => { style={{ borderColor: getColorByIndex(98.5) }} >
- + */} + { + allAreaMapData?.map((item: any) => ( + { + dispatch.push('KeyAreaDetail', { + title: item.objectName, + props: { + objectId: item?.objectId, + cqi: item?.qualitySign, + }, + }); + }} + key={item.objectId} + > +
+
+ { item?.objectName } + {item?.qualitySign} +
+
+
+
+ )) + } ) : ( <> {warnMark?.data?.items?.map((item: any, index: number) => { const point = [Number(item?.x_pos), Number(item?.y_pos)]; - + return ( { > @@ -325,7 +389,7 @@ const EmphasisAreaMap: React.FC = () => { return ( {}} + onClick={() => { }} position={item.l} icon={(iconList as any)[index + 1]} > @@ -339,7 +403,7 @@ const EmphasisAreaMap: React.FC = () => {
重点区域列表
- {data.map((item, index) => { + {areaList?.map((item, index) => { return (
{ setExpand(index); }} > -
{item.name}
+
{item?.objGroup}
-
{item.num}
+
{item?.objects?.length}
{index === expand ? ( @@ -369,7 +433,7 @@ const EmphasisAreaMap: React.FC = () => {
{expand === index && (
- {item.child.map((child, child_index) => { + {item?.objects.map((child, child_index) => { return ( { className={styles.childItem} justify="space-between" > -
{child.name}
-
- {child.value} +
{child.objectName}
+
+ {child.cqi}
); @@ -435,7 +499,7 @@ const EmphasisAreaMap: React.FC = () => { components: { Tree: { directoryNodeSelectedBg: '#1b4761', - + }, }, }} @@ -445,13 +509,13 @@ const EmphasisAreaMap: React.FC = () => { defaultExpandAll onSelect={(e) => { console.log(e); - + }} - onCheck={(e)=>{ - + onCheck={(e) => { + setCheckedKeys(e) - }} - checkedKeys={checkedKeys} + }} + checkedKeys={checkedKeys} treeData={[ { title: '安全风险', @@ -523,8 +587,8 @@ const EmphasisAreaMap: React.FC = () => { )}
- {/* 事件详情 */} - { diff --git a/src/pages/SecurityServiceOverview/components/MapCantainer/index.less b/src/pages/SecurityServiceOverview/components/MapCantainer/index.less index c916619580da5a46f82852daa225a943e7ce0deb..5ec0350a1a45a73b4c8a519018d63fd2a3648c68 100644 --- a/src/pages/SecurityServiceOverview/components/MapCantainer/index.less +++ b/src/pages/SecurityServiceOverview/components/MapCantainer/index.less @@ -15,7 +15,7 @@ .botTabWarp { width: 100%; position: absolute; - bottom: 0; + bottom: 20px; display: flex; justify-content: center; z-index: 997; diff --git a/src/pages/SecurityServiceOverview/components/MapCantainer/index.tsx b/src/pages/SecurityServiceOverview/components/MapCantainer/index.tsx index a0f7669357090da0abcad89bcaad25e023777ea5..525a71431d396bf760902ddd36c315b46bb52d7f 100644 --- a/src/pages/SecurityServiceOverview/components/MapCantainer/index.tsx +++ b/src/pages/SecurityServiceOverview/components/MapCantainer/index.tsx @@ -16,7 +16,8 @@ const MapContainer = () => { key: '2', img: require('@/assets/images/aqyztTab.png'), onclick: () => { - history.push('/securityServiceOverview'); + // history.push('/securityServiceOverview'); + window.open(`${window.location.origin}/cd-comprehensive/securityServiceOverview`, '_blank'); }, }, { @@ -28,8 +29,8 @@ const MapContainer = () => { }, ]; const Mpa = { - '1': , - '2': , + '1': , + '2': , }; return (
diff --git a/src/services/Physicalsign.ts b/src/services/Physicalsign.ts index 5f5bc1b90be894ede57e262a0319abc62797012c..2362d138d9da390635664124fa9047fad0b2a472 100644 --- a/src/services/Physicalsign.ts +++ b/src/services/Physicalsign.ts @@ -79,16 +79,15 @@ export async function getObjectPolygon( } //中观体征县区体征数据 -export async function getGroupObjectPhysicalSignIndex(data: { - physicalSignType: number; - indexType: number; -}): Promise> { +export async function getGroupObjectPhysicalSignIndex( + params: any +): Promise> { return request( urlProxyApis( - `/middlePhysicalSign/getGroupObjectPhysicalSignIndex?physicalSignType=1&indexType=1`, + `/middlePhysicalSign/getGroupObjectPhysicalSignIndex`, ), { - params: data, + params, }, ); }