地图修改

lsf-dev
秦子超 2024-09-29 16:24:07 +08:00
parent e2105c1019
commit 165bd1c341
23 changed files with 2789 additions and 1201 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -49,7 +49,7 @@ export const HDRealPromiseWX = new CachePromise(
// })
// .catch(() => null),
// 5000
() => httppost2(apiurl.station.gaugingStation.list, {"sources": ["SW","SH"],"args": ""})
() => httppost2(apiurl.station.gaugingStation.list)
.then(({ data }) => data || [])
.then((data) => {
// if (config.notShowPOI?.hd) {

View File

@ -30,7 +30,7 @@ function initState() {
BouaOutLayer: false,//咸丰县边界_省外
BouaOutsideLayer:true,//咸丰县以外边界
highroadLayer:false,//省级公路
highroadLayer:true,//省级公路
jcsjLayer:true,//监测数据

View File

@ -172,7 +172,7 @@ export default class Map2D extends BaseMap {
var view = map.getView();
var resolution = view.getResolution();
if (resolution <20){
if (resolution <120){
map && map.getLayers().getArray().forEach((layer)=> {
// if( (layer.values_.name) && ((layer.values_.name).indexOf("HL2Layer")>-1) ){
if( (layer.values_.name) && ((layer.values_.name).indexOf("highroadLayer")>-1) ){

View File

@ -122,15 +122,15 @@ export default class LayerMgr2D extends LayerMgr {
//河流
// this.addLayer(new HLLayer2D2({ visible: visible[HLLayer2D2.LayerName], setting, dispatch }));//河流线-卫星图 //缺失
this.addLayer(new HLLayer2D2({ visible: visible[HLLayer2D2.LayerName], setting, dispatch }));//河流线-卫星图
this.addLayer(new HLLayer2D({ visible: visible[HLLayer2D.LayerName], setting, dispatch }));//河流线-矢量图
// this.addLayer(new HL2Layer2D({ visible: visible[HL2Layer2D.LayerName], setting, dispatch }));//河流面 //缺失
this.addLayer(new HL2Layer2D({ visible: visible[HL2Layer2D.LayerName], setting, dispatch }));//河流面
//省级公路
// this.addLayer(new highroadLayer2D({ visible: visible[highroadLayer2D.LayerName], setting, dispatch })); //缺失
this.addLayer(new highroadLayer2D({ visible: visible[highroadLayer2D.LayerName], setting, dispatch }));
//咸丰边界
// this.addLayer(new BouaLayer2D({ visible: visible[BouaLayer2D.LayerName], setting, dispatch }));//缺失
this.addLayer(new BouaLayer2D({ visible: visible[BouaLayer2D.LayerName], setting, dispatch }));
// this.addLayer(new BouaInLayer2D({ visible: visible[BouaInLayer2D.LayerName], setting, dispatch }));
// this.addLayer(new BouaOutLayer2D({ visible: visible[BouaOutLayer2D.LayerName], setting, dispatch }));

View File

@ -45,7 +45,7 @@ export default class BouaLayer2D extends POILayer2D {
async dataPromise() {
const address = localStorage.getItem('address');
const a1 = await fetch(`${process.env.PUBLIC_URL}/data/geojson/macheng/麻城市.geojson`)
const a1 = await fetch(`${process.env.PUBLIC_URL}/data/geojson/macheng/县界.geojson`)
.then(resp => resp.json())
.then(data => data.features)
.then(features => features.map(o => ({

View File

@ -112,7 +112,7 @@ export default class HLLayer2D extends POILayer2D {
return null;
}
const RVNM = e.props.RVNM
const LEVEL = e.props.LEVEL
const LEVEL = e.props.LEVEL || e.props.LEVLE
return this.getStyle(RVNM,LEVEL);
}
}

View File

@ -14,7 +14,7 @@ export default class highroadLayer2D extends POILayer2D {
this._style1 = new Style({
zIndex: 6,//zindex2d.boua2,
stroke: new StrokeStyle({
color: '#d5d5d9',//'rgba(138,189,165)',
color: 'rgba(138,189,165,0.1)',
width: 4,
}),
});

View File

@ -30,11 +30,11 @@ function renderMarker({ status, warning }, { width, highlight }) {
// }
return `
<div style="cursor:pointer">
<svg t="1619076397355" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4205" width="${width}" height="${width}">
<path d="M512 25.6l277.94432 972.8H234.05568z" fill="${color1}" p-id="4206" data-spm-anchor-id="a313x.7781069.0.i9" class="selected"></path>
<path d="M512 164.57216l208.45568 764.34432H303.54432z" fill="${color1}" p-id="4207" data-spm-anchor-id="a313x.7781069.0.i6" class=""></path>
</svg>
<div style="position:relative">
<svg t="1616148185046" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4230" width="${width}">
</svg>
<img width="${width}" style="position:absolute;top:0;left:0" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAA1CAYAAAAgYencAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAJLSURBVFhHxZk/T8JAGIcBo8HBhMTFmDgbJ930Uxg/pnECYqJlUiZ10k033dRFoiCl/LO/9lqupXd977w7nqW9K4GH6/v+eoRqtV6tbxxvnlRWwNyf+5HAzuf+F45s3hnDi+/zGixGnf41m3NK+LleDSd++6cVzTjGb/ebsYA3cL4Cwf3wbtab9iKB2cfkHRPRFUeMOgMPx0gAJBOuCG97E8dUIJlwwfRt/Dp+8h9xngpgAhfY0Cq+t+i6VADwF2wSVn/adVkB7oItkDtBd3DDhlkBXMAL2NAKCD3+MzICLlIxH3oZAWA7FfOhtyxgMRWj9AtDjw0jlgRspmJR2C0JAFupWBR2hQI2UhErm6QfT6GAjVQU1VahADCdiqLuEgsYTEVZvggFTKai7L2EAiZTUbaaQgFgKhVl9SQXMJCKZR0lFTCRimXFLBUA/03FsjoiCOgXImUFSwWKnmBUKDVUKgB0i5HSRTQBjXZEjgTd33TvJ4IkgDpQTcXxQ/zTiw2FkATib7PYyVIYtmirRhIAqg8n6p6CLqDweJ68BM/U/QRZgP89Vwb12wOyAKDehrBoyempJEBJRVT+6La8/RKUBCipGK6S0oZWSQCUpaLK8gN1AUkqxrsotdhWFpClIjX9eJQFZKlITT8eZQEgakdKl+TREyhIRQQVEpANyWgJFKWiSvrxaAmA/G3Q2TMAbQH+fqPydXfP2gJ8KqL3VTcsCdoCIElF1fQzRv1062w3OJjXGmsNNuUW/Muyfbl3xYarYf2wfsRONahU/gBd1OeNjK84SwAAAABJRU5ErkJggg=="
alt="" className="panel-icon" />
</div>
`;
}
@ -55,7 +55,7 @@ function HdswMarker({ data, dispatch, setting, zoom, distSq }) {
}
useEffect(() => {
const width = 12;
const width = 8;
const placeholder = document.getElementById(`marker_hdsw_${data.id}`);
if (!placeholder) {

View File

@ -137,12 +137,12 @@ function HdswPop({ id, dispatch, data }) {
{/* <Tabs.TabPane tab="" key="3">
<Txjc record={data}/>
</Tabs.TabPane> */}
<Tabs.TabPane tab="视频监测" key="4">
{/* <Tabs.TabPane tab="" key="4">
<Spjc record={data}/>
</Tabs.TabPane>
<Tabs.TabPane tab="周边雨情" key="5">
</Tabs.TabPane> */}
{/* <Tabs.TabPane tab="" key="5">
<DrpStAround data={data}/>
</Tabs.TabPane>
</Tabs.TabPane> */}
</Tabs>
</Modal>

View File

@ -0,0 +1,62 @@
import React, { useEffect, useState } from 'react';
import moment from "moment"
import {
CloseOutlined,
} from '@ant-design/icons';
import { Modal, Tabs } from 'antd';
import Sqjcsj from '../components/Sqjcsj'
import Swllgx from '../components/Swllgx'
import './TangYanBa.less'
function HdswPop2({ id, data, dispatch }) {
const closePop = () => {
dispatch.runtime.closeFeaturePop(id);
};
const width = 1050;
return (
<>
<div className="dp-popup" style={{ position: 'absolute', top: 0, width,left: 0,height:646, lineHeight: 1,backgroundColor:'#fff',borderRadius:'10px'}}>
<div className="dp-popup-content" style={{height:'100%',borderRadius:'10px'}}>
<div className="content-body tyb skpop" id='tyb' style={{ height: '100%' }}>
<div className="normalModalStyle" style={{borderRadius:10}}>
<div className="normalModalStyle_title" style={{marginBottom:0}}>
<div className="normalModalStyle_title_icon"></div>
<span>{data?.name}&emsp;</span>
{data?.sttp &&
<span style={
{
display:"inline-block",
padding: "5px 10px",
color: "#74a7ff",
border: "1px solid #74a7ff",
borderRadius: "5px"
}
}> {{MM: '气象站',PP: '雨量站',RR: '水库水文站',ZZ: '河道水位站',ZQ:"河道水文站"}?.[data?.sttp]}{{'SH':'山洪','SW':'水文','QX':'气象','SK':'水库'}?.[data.source]}</span>}
<div className="normalModalStyle_title_cancel">
<CloseOutlined onClick={closePop} style={{color:"#333"}}/>
</div>
</div>
<div style={{paddingLeft:15}}>
<Tabs defaultActiveKey="1">
<Tabs.TabPane tab="监测数据" key="1">
<Sqjcsj record={data}/>
</Tabs.TabPane>
<Tabs.TabPane tab="水位流量关系" key="2">
<Swllgx record={data}/>
</Tabs.TabPane>
</Tabs>
</div>
</div>
</div >
<div className="boxfoot"></div>
</div>
</div>
</>
)
}
export default React.memo(HdswPop2);

View File

@ -36,7 +36,7 @@ function Wxq({ id, data, dispatch }) {
<div className="title">
<div className="name flex flexac">
<div className='nameBorder'></div>
{data.name || detail?.name}
{data.NAME || detail?.name}
</div>
<div className="extra">
<CloseOutlined onClick={closePop} style={{color:"#333"}}/>

View File

@ -4,6 +4,7 @@ import { useDispatch, useSelector } from 'react-redux'
import PciStPop from './PciStPop';
import HdswPop from './HdswPop';
import HdswPop2 from './HdswPop2'
import ShuikuPop from './ShuikuPop';
import ShuikuPop2 from './ShuikuPop2'
import ShuiDianZhanPop from './ShuiDianZhanPop';
@ -88,7 +89,12 @@ function FeaturePops({ mapobj }) {
</Modal>
)
}else if (type === 'hdsw') {
Comp = HdswPop;
// Comp = HdswPop;
return (
<Modal width={1050} wrapClassName='home_modal' bodyStyle={{padding:0}} title={null} closable={false} footer={null} open={true} onCancel={()=>dispatch.runtime.closeFeaturePop(id)} destroyOnClose={true}>
<HdswPop2 id={id} data={data} dispatch={dispatch} record={data}/>
</Modal>
)
}else if (type === 'shuiku' || type === InfoPopNames.RealSkPop) {
// 水库
// Comp = ShuikuPop;

View File

@ -24,7 +24,7 @@ export default function TuLi() {
<div className='homePage_tuli2_row_item_icon2'>
<img width={13} height={13} src={`${process.env.PUBLIC_URL}/assets/xyt/homeImg/shi.png`} alt="" />
</div>
<div className='homePage_tuli2_row_item_text2'>麻城市</div>
<div className='homePage_tuli2_row_item_text2'>红安县</div>
</div>
</div>

View File

@ -24,7 +24,7 @@ export default function TuLi() {
<div className='homePage_tuli2_row_item_icon2'>
<img width={13} height={13} src={`${process.env.PUBLIC_URL}/assets/xyt/homeImg/shi.png`} alt="" />
</div>
<div className='homePage_tuli2_row_item_text2'>麻城市</div>
<div className='homePage_tuli2_row_item_text2'>红安县</div>
</div>
</div>

View File

@ -24,7 +24,7 @@ export default function TuLi() {
<div className='homePage_tuli2_row_item_icon2'>
<img width={13} height={13} src={`${process.env.PUBLIC_URL}/assets/xyt/homeImg/shi.png`} alt="" />
</div>
<div className='homePage_tuli2_row_item_text2'>麻城市</div>
<div className='homePage_tuli2_row_item_text2'>红安县</div>
</div>
</div>

View File

@ -24,7 +24,7 @@ export default function TuLi() {
<div className='homePage_tuli2_row_item_icon2'>
<img width={13} height={13} src={`${process.env.PUBLIC_URL}/assets/xyt/homeImg/shi.png`} alt="" />
</div>
<div className='homePage_tuli2_row_item_text2'>麻城市</div>
<div className='homePage_tuli2_row_item_text2'>红安县</div>
</div>
</div>

View File

@ -131,7 +131,7 @@ const HomePage = ({showPanels}) => {
setCheckedObj({ key:'21', label:'巡查巡检', labelRight:'工程巡检', icon:'shuiku' })
}else if(a==='3'){
dispatch.runtime.setCameraTarget({
center: [114.96, 31.453],
center: [114.75, 31.493],
zoom: 13.5,
pitch: 60
})

View File

@ -12,9 +12,11 @@ const Page = () => {
console.log('aaa',data);
useEffect(()=>{
dispatch.map.setLayerVisible({ ShuiKuLayer: true })
dispatch.map.setLayerVisible({ HdswLayer: true })
getData()
return ()=>{
dispatch.map.setLayerVisible({ ShuiKuLayer: false })
dispatch.map.setLayerVisible({ HdswLayer: false })
}
},[])