Compare commits
No commits in common. "265960cf242090e6bdee05f660ac904fcc4c0d0e" and "cd3612f4e09c8877e8a3d572ab5f11357957f5d2" have entirely different histories.
265960cf24
...
cd3612f4e0
Binary file not shown.
|
Before Width: | Height: | Size: 88 KiB |
|
|
@ -1 +0,0 @@
|
||||||
{"type":"FeatureCollection","features":[{"type":"Feature","id":2,"bbox":[114.88191247,31.16683581,114.88643309,31.16825998],"properties":{"gid":2,"geometry":"LineString"},"geometry":{"type":"LineString","coordinates":[[114.88610432,31.16825998],[114.88643309,31.16788196],[114.8862687,31.16732812],[114.88574472,31.16687977],[114.88494334,31.16683581],[114.88393648,31.16690614],[114.88327893,31.16732812],[114.88235426,31.16720504],[114.88191247,31.16709955]]}}]}
|
|
||||||
|
|
@ -111,9 +111,9 @@ export default function calcLayout(view, rightStack, hidePanels) {
|
||||||
left = [
|
left = [
|
||||||
{ key: '天气' },
|
{ key: '天气' },
|
||||||
{ key: '水库总览', style: { height: '30rem', flexGrow: 1 } },
|
{ key: '水库总览', style: { height: '30rem', flexGrow: 1 } },
|
||||||
|
{ key: '超汛水库', style: { height: '16rem'} },
|
||||||
// { key: '水库列表', style: { height: '16rem'} },
|
// { key: '水库列表', style: { height: '16rem'} },
|
||||||
];
|
];
|
||||||
leftFullHeight = true;
|
|
||||||
} else if (view === 301) {
|
} else if (view === 301) {
|
||||||
left = [
|
left = [
|
||||||
{ key: '天气' },
|
{ key: '天气' },
|
||||||
|
|
@ -323,9 +323,6 @@ export default function calcLayout(view, rightStack, hidePanels) {
|
||||||
} else if (view === 200) {
|
} else if (view === 200) {
|
||||||
right = [
|
right = [
|
||||||
{ key: '警报' },
|
{ key: '警报' },
|
||||||
{ key: '超汛水库', style: { height: '16rem'} },
|
|
||||||
{ key: '站点统计', style: { height: '17rem'} },
|
|
||||||
{ key: '监测告警', style: { height: '20rem'} },
|
|
||||||
// { key: '关联站点',style: { height: '15rem', flexGrow: 1 } },
|
// { key: '关联站点',style: { height: '15rem', flexGrow: 1 } },
|
||||||
// { key: '水库水量统计',style: { height: '22rem' } },
|
// { key: '水库水量统计',style: { height: '22rem' } },
|
||||||
// { key: '洪水防御',style: { height: '18rem', flexGrow: 1 } },
|
// { key: '洪水防御',style: { height: '18rem', flexGrow: 1 } },
|
||||||
|
|
|
||||||
|
|
@ -134,15 +134,6 @@ export default function MapCtrl({ initParams, onLoad }) {
|
||||||
}
|
}
|
||||||
dispatch.runtime.setFeaturePop({ type: record.layerPop, properties: record, coordinates: [record.lgtd, record.lttd] });
|
dispatch.runtime.setFeaturePop({ type: record.layerPop, properties: record, coordinates: [record.lgtd, record.lttd] });
|
||||||
}
|
}
|
||||||
if(feature.layer.id==='临时线'){
|
|
||||||
debugger
|
|
||||||
const record = feature.properties
|
|
||||||
if(feature.layer.id==='临时水库tz'){
|
|
||||||
dispatch.map.setView(203)
|
|
||||||
sessionStorage.setItem('lastCenter',JSON.stringify([record.lgtd, record.lttd]))
|
|
||||||
}
|
|
||||||
dispatch.runtime.setFeaturePop({ type: record.layerPop, properties: record, coordinates: [record.lgtd, record.lttd] });
|
|
||||||
}
|
|
||||||
if (feature.layer.id === '关联站点') {
|
if (feature.layer.id === '关联站点') {
|
||||||
const record = feature.properties
|
const record = feature.properties
|
||||||
if (record.cd_nm == 'GN1') {
|
if (record.cd_nm == 'GN1') {
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,6 @@ import Fadb from './panels/Fadb'
|
||||||
import Sksltj from './panels/Sksltj'
|
import Sksltj from './panels/Sksltj'
|
||||||
import Hsfy from './panels/Hsfy'
|
import Hsfy from './panels/Hsfy'
|
||||||
import Cxsk from './panels/Cxsk'
|
import Cxsk from './panels/Cxsk'
|
||||||
import Zdtj from './panels/Zdtj'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -401,8 +400,6 @@ export default function PanelIndex({ name, style, ...params }) {
|
||||||
return <Gsfhqx style={style} />
|
return <Gsfhqx style={style} />
|
||||||
} else if (name === '超汛水库') {
|
} else if (name === '超汛水库') {
|
||||||
return <Cxsk style={style} />
|
return <Cxsk style={style} />
|
||||||
} else if (name === '站点统计') {
|
|
||||||
return <Zdtj style={style} />
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ function DrpReal({ style }) {
|
||||||
(<>
|
(<>
|
||||||
<CollapsePage type={item.type} name={item.name} num1={item.num1} num2={item.num2} skType={skType} setSkType={setSkType}/>
|
<CollapsePage type={item.type} name={item.name} num1={item.num1} num2={item.num2} skType={skType} setSkType={setSkType}/>
|
||||||
<Collapse in={skType===item.type} timeout="auto" unmountOnExit>
|
<Collapse in={skType===item.type} timeout="auto" unmountOnExit>
|
||||||
<TableContainer style={{ maxHeight: 'calc( 100vh - 28.2rem )' }}>
|
<TableContainer style={{ height: '12.8rem' }}>
|
||||||
<Table size="small" stickyHeader>
|
<Table size="small" stickyHeader>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
|
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
import React, { useMemo, useState } from 'react';
|
|
||||||
import PanelBox from '../../components/PanelBox';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function DrpReal({ style }) {
|
|
||||||
const setSkLayer1 = ()=>{
|
|
||||||
const map = window.__mapref;
|
|
||||||
const layer = map.getLayer('临时线')
|
|
||||||
if(layer){
|
|
||||||
map.removeLayer('临时线');
|
|
||||||
map.removeSource('临时线');
|
|
||||||
}
|
|
||||||
map.addLayer({
|
|
||||||
'id': '临时线',
|
|
||||||
'type': 'line',
|
|
||||||
'source': {
|
|
||||||
'type': 'geojson',
|
|
||||||
'data': `${window.location.origin}/data3/line1.geojson`
|
|
||||||
},
|
|
||||||
'layout': {
|
|
||||||
'line-join': 'round'
|
|
||||||
},
|
|
||||||
'paint': {
|
|
||||||
'line-color': 'red',
|
|
||||||
'line-width': 10
|
|
||||||
// [
|
|
||||||
// 'case',
|
|
||||||
// ['==', ['get', 'LEVEL'], 1], 2.2,
|
|
||||||
// ['==', ['get', 'LEVEL'], 2], 2.2,
|
|
||||||
// ['==', ['get', 'LEVEL'], 3], 2.2,
|
|
||||||
// ['==', ['get', 'LEVEL'], 4], 1.6,
|
|
||||||
// ['==', ['get', 'LEVEL'], 5], 1.3,
|
|
||||||
// 10
|
|
||||||
// ]
|
|
||||||
},
|
|
||||||
'visibility': 'visible',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const setSkLayer2 = ()=>{
|
|
||||||
const map = window.__mapref;
|
|
||||||
const layer = map.getLayer('临时线')
|
|
||||||
if(layer){
|
|
||||||
map.removeLayer('临时线');
|
|
||||||
map.removeSource('临时线');
|
|
||||||
}
|
|
||||||
map.addLayer({
|
|
||||||
'id': '临时线',
|
|
||||||
'type': 'line',
|
|
||||||
'source': {
|
|
||||||
'type': 'geojson',
|
|
||||||
'data': {
|
|
||||||
'type': 'FeatureCollection',
|
|
||||||
'features': [],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'layout': {
|
|
||||||
'line-join': 'round'
|
|
||||||
},
|
|
||||||
'paint': {
|
|
||||||
'line-color': 'red',
|
|
||||||
'line-width': 10
|
|
||||||
// [
|
|
||||||
// 'case',
|
|
||||||
// ['==', ['get', 'LEVEL'], 1], 2.2,
|
|
||||||
// ['==', ['get', 'LEVEL'], 2], 2.2,
|
|
||||||
// ['==', ['get', 'LEVEL'], 3], 2.2,
|
|
||||||
// ['==', ['get', 'LEVEL'], 4], 1.6,
|
|
||||||
// ['==', ['get', 'LEVEL'], 5], 1.3,
|
|
||||||
// 10
|
|
||||||
// ]
|
|
||||||
},
|
|
||||||
'visibility': 'visible',
|
|
||||||
});
|
|
||||||
map.getSource('临时线').setData({"type":"FeatureCollection","features":[{"type":"Feature","id":2,"bbox":[114.88191247,31.16683581,114.88643309,31.16825998],"properties":{"gid":2,"geometry":"LineString"},"geometry":{"type":"LineString","coordinates":[[114.88610432,31.16825998],[114.88643309,31.16788196],[114.8862687,31.16732812],[114.88574472,31.16687977],[114.88494334,31.16683581],[114.88393648,31.16690614],[114.88327893,31.16732812],[114.88235426,31.16720504],[114.88191247,31.16709955]]}}]})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
|
||||||
<PanelBox
|
|
||||||
style={style}
|
|
||||||
title="站点统计"
|
|
||||||
color="green"
|
|
||||||
>
|
|
||||||
<img src='/assets/站点统计.jpg' style={{width:'27rem',marginLeft:'0rem',marginTop:'0rem'}} onClick={()=>{setSkLayer1()}}/>
|
|
||||||
</PanelBox>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default DrpReal;
|
|
||||||
Loading…
Reference in New Issue