Compare commits
6 Commits
2b6b5a0862
...
eaa507c253
| Author | SHA1 | Date |
|---|---|---|
|
|
eaa507c253 | |
|
|
6f288f8768 | |
|
|
6456b4f76a | |
|
|
e63244a2db | |
|
|
2a141f498e | |
|
|
631fb9ef91 |
|
|
@ -390,7 +390,7 @@ const map = {
|
||||||
RealHDLayer: false,
|
RealHDLayer: false,
|
||||||
RealSkLayer: false,
|
RealSkLayer: false,
|
||||||
BxSkLayer: false,
|
BxSkLayer: false,
|
||||||
XunchaLayer: true,
|
XunchaLayer: false,
|
||||||
FzdxLayer: false,
|
FzdxLayer: false,
|
||||||
WataLayer: false,
|
WataLayer: false,
|
||||||
AdcdLayer: true,
|
AdcdLayer: true,
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@ export default function calcLayout(view, rightStack, hidePanels) {
|
||||||
// { key: '警报' },
|
// { key: '警报' },
|
||||||
{ key: '防洪形势雨情2', style: {} },
|
{ key: '防洪形势雨情2', style: {} },
|
||||||
{ key: '重点关注水情', style: { height: '18rem'} },
|
{ key: '重点关注水情', style: { height: '18rem'} },
|
||||||
{ key: '测站到报率', style: { height: '18rem' } },
|
// { key: '测站到报率', style: { height: '18rem' } },
|
||||||
// { key: '防洪形势天气预报', style: { height: '18.5rem'} },
|
// { key: '防洪形势天气预报', style: { height: '18.5rem'} },
|
||||||
// { key: '防洪形势水情', style: { height: '18.5rem'} },
|
// { key: '防洪形势水情', style: { height: '18.5rem'} },
|
||||||
// { key: '河道水位', style: { height: '10rem', flexGrow: 1 } },
|
// { key: '河道水位', style: { height: '10rem', flexGrow: 1 } },
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ const TaskList = () => {
|
||||||
const [startDate, setStartDate] = useState(null);
|
const [startDate, setStartDate] = useState(null);
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const [endDate, setEndDate] = useState(null);
|
const [endDate, setEndDate] = useState(null);
|
||||||
const [activeType, setActiveType] = useState('daily');
|
const [activeType, setActiveType] = useState('all');
|
||||||
const [visible, setVisible] = useState(false)
|
const [visible, setVisible] = useState(false)
|
||||||
const handleTypeChange = (type) => {
|
const handleTypeChange = (type) => {
|
||||||
setActiveType(type);
|
setActiveType(type);
|
||||||
|
|
@ -259,7 +259,7 @@ const TaskList = () => {
|
||||||
className={activeType === 'all' ? 'active' : ''}
|
className={activeType === 'all' ? 'active' : ''}
|
||||||
onClick={() => handleTypeChange('all')}
|
onClick={() => handleTypeChange('all')}
|
||||||
>
|
>
|
||||||
全部(5024)
|
全部(5)
|
||||||
</Button>
|
</Button>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
|
||||||
|
|
@ -147,12 +147,14 @@ export default function MapCtrl({ initParams, onLoad }) {
|
||||||
dispatch?.runtime.setInfoDlg({ layerId: 'ByjcLayer', properties: record })
|
dispatch?.runtime.setInfoDlg({ layerId: 'ByjcLayer', properties: record })
|
||||||
}else if (record.stnm == '浮桥河水库') {
|
}else if (record.stnm == '浮桥河水库') {
|
||||||
dispatch?.runtime.setInfoDlg({ layerId: 'RealSkLayer', properties: record })
|
dispatch?.runtime.setInfoDlg({ layerId: 'RealSkLayer', properties: record })
|
||||||
} else if (record.type == 'sw') {
|
}else if (record.type == 'sw') {
|
||||||
dispatch?.runtime.setFeaturePop({ type: 'RealHDPop', properties: record,coordinates: [record.lgtd, record.lttd] })
|
dispatch?.runtime.setFeaturePop({ type: 'RealHDPop', properties: record,coordinates: [record.lgtd, record.lttd] })
|
||||||
} else if (record.type == 'qx') {
|
} else if (record.type == 'qx') {
|
||||||
dispatch?.runtime.setFeaturePop({ type: 'RealDrpPop', properties: record,coordinates: [record.lgtd, record.lttd] })
|
dispatch?.runtime.setFeaturePop({ type: 'RealDrpPop', properties: record,coordinates: [record.lgtd, record.lttd] })
|
||||||
} else if (record.flow == 1) {
|
} else if (record.flow == 1) {
|
||||||
dispatch?.runtime.setInfoDlg({ layerId: 'flowjcLayer', properties: record })
|
dispatch?.runtime.setInfoDlg({ layerId: 'flowjcLayer', properties: record })
|
||||||
|
} else if (record.taskType) {
|
||||||
|
dispatch?.runtime.setInfoDlg({ layerId: 'XcxqLayer', properties: record })
|
||||||
}
|
}
|
||||||
// dispatch.runtime.setFeaturePop({ type: 'RealSkPop', properties: record, coordinates: [record.lgtd, record.lttd] });
|
// dispatch.runtime.setFeaturePop({ type: 'RealSkPop', properties: record, coordinates: [record.lgtd, record.lttd] });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,48 +7,50 @@ import { makeStyles, Tooltip, Typography } from '@material-ui/core';
|
||||||
const VIEWS = [
|
const VIEWS = [
|
||||||
|
|
||||||
{
|
{
|
||||||
id: 100, title: '防汛', img: process.env.PUBLIC_URL+'/assets/menu/防洪形势.png', children: [
|
id: 100, title: '防汛', img: process.env.PUBLIC_URL + '/assets/menu/防洪形势.png', children: [
|
||||||
// { id: 0, title: '防洪形势', img: process.env.PUBLIC_URL+'/assets/menu/防洪形势.png' },
|
// { id: 0, title: '防洪形势', img: process.env.PUBLIC_URL+'/assets/menu/防洪形势.png' },
|
||||||
{ id: 8, title: '防洪形势', img: process.env.PUBLIC_URL+'/assets/menu/防洪形势.png' },
|
{ id: 8, title: '防洪形势', img: process.env.PUBLIC_URL + '/assets/menu/防洪形势.png' },
|
||||||
// { id: 9, title: '防洪形势', img: process.env.PUBLIC_URL+'/assets/menu/防洪形势.png' },
|
// { id: 9, title: '防洪形势', img: process.env.PUBLIC_URL+'/assets/menu/防洪形势.png' },
|
||||||
{ id: 1, title: '监测数据', img: process.env.PUBLIC_URL+'/assets/menu/实时数据.png' },
|
{ id: 1, title: '监测数据', img: process.env.PUBLIC_URL + '/assets/menu/实时数据.png' },
|
||||||
// { id: 2, title: '水利设施', img: process.env.PUBLIC_URL+'/assets/menu/水利设施.png' },
|
// { id: 2, title: '水利设施', img: process.env.PUBLIC_URL+'/assets/menu/水利设施.png' },
|
||||||
{ id: 5, title: '预报', img: process.env.PUBLIC_URL+'/assets/menu/降雨中心.png' },
|
{ id: 5, title: '预报', img: process.env.PUBLIC_URL + '/assets/menu/降雨中心.png' },
|
||||||
{ id: 6, title: '预警', img: process.env.PUBLIC_URL+'/assets/menu/病险水库.png' },
|
{ id: 6, title: '预警', img: process.env.PUBLIC_URL + '/assets/menu/病险水库.png' },
|
||||||
{ id: 4, title: '预演', img: process.env.PUBLIC_URL+'/assets/menu/预警分析.png' },
|
{ id: 4, title: '预演', img: process.env.PUBLIC_URL + '/assets/menu/预警分析.png' },
|
||||||
{ id: 3, title: '预案', img: process.env.PUBLIC_URL+'/assets/menu/辅助决策.png' },
|
{ id: 3, title: '预案', img: process.env.PUBLIC_URL + '/assets/menu/辅助决策.png' },
|
||||||
// { id: 7, title: '调度', img: process.env.PUBLIC_URL+'/assets/menu/辅助决策.png' },
|
// { id: 7, title: '调度', img: process.env.PUBLIC_URL+'/assets/menu/辅助决策.png' },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ id: 200, title: '水库', img: process.env.PUBLIC_URL+'/assets/menu/水库专题.png',children:[
|
{
|
||||||
{ id: 207, title: '水库总览', img: process.env.PUBLIC_URL+'/assets/menu/水库管理.png' },
|
id: 200, title: '水库', img: process.env.PUBLIC_URL + '/assets/menu/水库专题.png', children: [
|
||||||
|
{ id: 207, title: '水库总览', img: process.env.PUBLIC_URL + '/assets/menu/水库管理.png' },
|
||||||
// { id: 201, title: '雨情监测', img: process.env.PUBLIC_URL+'/assets/menu/雨情监测.png' },
|
// { id: 201, title: '雨情监测', img: process.env.PUBLIC_URL+'/assets/menu/雨情监测.png' },
|
||||||
// { id: 202, title: '水情监测', img: process.env.PUBLIC_URL+'/assets/menu/水情监测.png' },
|
// { id: 202, title: '水情监测', img: process.env.PUBLIC_URL+'/assets/menu/水情监测.png' },
|
||||||
{ id: 203, title: '水库监测', img: process.env.PUBLIC_URL+'/assets/menu/安全监测.png' },
|
{ id: 203, title: '水库监测', img: process.env.PUBLIC_URL + '/assets/menu/安全监测.png' },
|
||||||
// { id: 204, title: '视频监视', img: process.env.PUBLIC_URL+'/assets/menu/视频监视.png' },
|
// { id: 204, title: '视频监视', img: process.env.PUBLIC_URL+'/assets/menu/视频监视.png' },
|
||||||
{ id: 205, title: '防汛调度', img: process.env.PUBLIC_URL+'/assets/menu/防汛调度.png' },
|
{ id: 205, title: '防汛调度', img: process.env.PUBLIC_URL + '/assets/menu/防汛调度.png' },
|
||||||
{ id: 206, title: '巡查维养', img: process.env.PUBLIC_URL+'/assets/menu/水库管理.png' },
|
{ id: 206, title: '巡查维养', img: process.env.PUBLIC_URL + '/assets/menu/水库管理.png' },
|
||||||
] },
|
]
|
||||||
|
},
|
||||||
// { id: 200, title: '水库', img: process.env.PUBLIC_URL+'/assets/menu/水库专题.png'},
|
// { id: 200, title: '水库', img: process.env.PUBLIC_URL+'/assets/menu/水库专题.png'},
|
||||||
{
|
{
|
||||||
id: 300, title: '水厂', img: process.env.PUBLIC_URL+'/assets/menu/水利设施.png', children: [
|
id: 300, title: '水厂', img: process.env.PUBLIC_URL + '/assets/menu/水利设施.png', children: [
|
||||||
{ id: 301, title: '供水态势', img: process.env.PUBLIC_URL+'/assets/menu/降雨中心.png' },
|
{ id: 301, title: '供水态势', img: process.env.PUBLIC_URL + '/assets/menu/降雨中心.png' },
|
||||||
{ id: 302, title: '水质安全', img: process.env.PUBLIC_URL+'/assets/menu/水情监测.png' },
|
{ id: 302, title: '水质安全', img: process.env.PUBLIC_URL + '/assets/menu/水情监测.png' },
|
||||||
{ id: 303, title: '水厂运行', img: process.env.PUBLIC_URL+'/assets/menu/水库管理.png' },
|
{ id: 303, title: '水厂运行', img: process.env.PUBLIC_URL + '/assets/menu/水库管理.png' },
|
||||||
{ id: 306, title: '管网健康诊断', img: process.env.PUBLIC_URL+'/assets/menu/水利设施.png' },
|
{ id: 306, title: '管网健康诊断', img: process.env.PUBLIC_URL + '/assets/menu/水利设施.png' },
|
||||||
{ id: 307, title: '应急指挥调度', img: process.env.PUBLIC_URL+'/assets/menu/病险水库.png' },
|
{ id: 307, title: '应急指挥调度', img: process.env.PUBLIC_URL + '/assets/menu/病险水库.png' },
|
||||||
// { id: 305, title: '决策支持与报表', img: process.env.PUBLIC_URL+'/assets/menu/辅助决策.png' },
|
// { id: 305, title: '决策支持与报表', img: process.env.PUBLIC_URL+'/assets/menu/辅助决策.png' },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 400, title: '灌区', img: process.env.PUBLIC_URL+'/assets/menu/预警分析.png', children: [
|
id: 400, title: '灌区', img: process.env.PUBLIC_URL + '/assets/menu/预警分析.png', children: [
|
||||||
{ id: 501, title: '灌区监测', img: process.env.PUBLIC_URL+'/assets/menu/防洪形势.png' },
|
{ id: 501, title: '灌区监测', img: process.env.PUBLIC_URL + '/assets/menu/防洪形势.png' },
|
||||||
{ id: 504, title: '水旱灾害防御', img: process.env.PUBLIC_URL+'/assets/menu/水利设施.png' },
|
{ id: 504, title: '水旱灾害防御', img: process.env.PUBLIC_URL + '/assets/menu/水利设施.png' },
|
||||||
// { id: 502, title: '预警信息管理', img: process.env.PUBLIC_URL+'/assets/menu/实时数据.png' },
|
// { id: 502, title: '预警信息管理', img: process.env.PUBLIC_URL+'/assets/menu/实时数据.png' },
|
||||||
{ id: 503, title: '水资源调度', img: process.env.PUBLIC_URL+'/assets/menu/病险水库.png' },
|
{ id: 503, title: '水资源调度', img: process.env.PUBLIC_URL + '/assets/menu/病险水库.png' },
|
||||||
{ id: 505, title: '量测水管理', img: process.env.PUBLIC_URL+'/assets/menu/辅助决策.png' },
|
{ id: 505, title: '量测水管理', img: process.env.PUBLIC_URL + '/assets/menu/辅助决策.png' },
|
||||||
{ id: 506, title: '水政管理', img: process.env.PUBLIC_URL+'/assets/menu/预警分析.png' },
|
{ id: 506, title: '水政管理', img: process.env.PUBLIC_URL + '/assets/menu/预警分析.png' },
|
||||||
{ id: 507, title: '工程管理', img: process.env.PUBLIC_URL+'/assets/menu/降雨中心.png' },
|
{ id: 507, title: '工程管理', img: process.env.PUBLIC_URL + '/assets/menu/降雨中心.png' },
|
||||||
// 图层控制
|
// 图层控制
|
||||||
// 灌区监测
|
// 灌区监测
|
||||||
// 预警信息管理
|
// 预警信息管理
|
||||||
|
|
@ -92,6 +94,11 @@ export default function ActionDock({ }) {
|
||||||
map.removeLayer('关联站点');
|
map.removeLayer('关联站点');
|
||||||
map.removeSource('关联站点');
|
map.removeSource('关联站点');
|
||||||
}
|
}
|
||||||
|
const layer1 = map.getLayer('临时线')
|
||||||
|
if(layer1){
|
||||||
|
map.removeLayer('临时线');
|
||||||
|
map.removeSource('临时线');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -107,7 +114,7 @@ export default function ActionDock({ }) {
|
||||||
removePoint()
|
removePoint()
|
||||||
}}>
|
}}>
|
||||||
<div className={clsx('button', { active: false })}>
|
<div className={clsx('button', { active: false })}>
|
||||||
<img width={40} style={{ marginLeft: '5px' }} src={process.env.PUBLIC_URL+'/assets/pump/退出.png'} />
|
<img width={40} style={{ marginLeft: '5px' }} src={process.env.PUBLIC_URL + '/assets/pump/退出.png'} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</BootstrapTooltip>
|
</BootstrapTooltip>
|
||||||
|
|
@ -140,11 +147,20 @@ export default function ActionDock({ }) {
|
||||||
//二级菜单
|
//二级菜单
|
||||||
dispatch.map.setView(o.id)
|
dispatch.map.setView(o.id)
|
||||||
if (o.id == 6) {
|
if (o.id == 6) {
|
||||||
sessionStorage.setItem('point',o.id)
|
sessionStorage.setItem('point', o.id)
|
||||||
} else {
|
} else {
|
||||||
sessionStorage.setItem('point','')
|
sessionStorage.setItem('point', '')
|
||||||
}
|
}
|
||||||
removePoint()
|
removePoint()
|
||||||
|
if (o.id == 206) {
|
||||||
|
dispatch.runtime.setCameraTarget({
|
||||||
|
center: [114.88069, 31.171967 + 0.005],
|
||||||
|
zoom: 13,
|
||||||
|
pitch: 50,
|
||||||
|
bearing: 0
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
{/* <div className={clsx('button', { active: o.id===200?(view===207||view===203||view===205||view===206||view===200):view === o.id })}> */}
|
{/* <div className={clsx('button', { active: o.id===200?(view===207||view===203||view===205||view===206||view===200):view === o.id })}> */}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ function DrpReal({ style }) {
|
||||||
"max_de": 2.9303,
|
"max_de": 2.9303,
|
||||||
"max_dn": -2.1648,
|
"max_dn": -2.1648,
|
||||||
"max_du": 2.53,
|
"max_du": 2.53,
|
||||||
"dt": "2025-05-25",
|
"dt": "2025-05-25 10:00:00",
|
||||||
"is_has_data": "y"
|
"is_has_data": "y"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -95,7 +95,7 @@ function DrpReal({ style }) {
|
||||||
"max_de": 1.0981,
|
"max_de": 1.0981,
|
||||||
"max_dn": -2.3255,
|
"max_dn": -2.3255,
|
||||||
"max_du": 3.12,
|
"max_du": 3.12,
|
||||||
"dt": "2025-05-20",
|
"dt": "2025-05-25 10:00:00",
|
||||||
"is_has_data": "y"
|
"is_has_data": "y"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -129,7 +129,7 @@ function DrpReal({ style }) {
|
||||||
"max_de": 1.0981,
|
"max_de": 1.0981,
|
||||||
"max_dn": -2.3255,
|
"max_dn": -2.3255,
|
||||||
"max_du": 1.23,
|
"max_du": 1.23,
|
||||||
"dt": "2025-05-20",
|
"dt": "2025-05-25 10:00:00",
|
||||||
"is_has_data": "y"
|
"is_has_data": "y"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -163,7 +163,7 @@ function DrpReal({ style }) {
|
||||||
"max_de": -5.1079,
|
"max_de": -5.1079,
|
||||||
"max_dn": 4.6055,
|
"max_dn": 4.6055,
|
||||||
"max_du": -1.34,
|
"max_du": -1.34,
|
||||||
"dt": "2025-05-20",
|
"dt": "2025-05-25 10:00:00",
|
||||||
"is_has_data": "y"
|
"is_has_data": "y"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -197,7 +197,7 @@ function DrpReal({ style }) {
|
||||||
"max_de": -5.1079,
|
"max_de": -5.1079,
|
||||||
"max_dn": 4.6055,
|
"max_dn": 4.6055,
|
||||||
"max_du": -2.45,
|
"max_du": -2.45,
|
||||||
"dt": "2025-05-20",
|
"dt": "2025-05-25 10:00:00",
|
||||||
"is_has_data": "y"
|
"is_has_data": "y"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -231,7 +231,7 @@ function DrpReal({ style }) {
|
||||||
"max_de": 2.6901,
|
"max_de": 2.6901,
|
||||||
"max_dn": 3.7945,
|
"max_dn": 3.7945,
|
||||||
"max_du": 1.68,
|
"max_du": 1.68,
|
||||||
"dt": "2025-05-20",
|
"dt": "2025-05-25 10:00:00",
|
||||||
"is_has_data": "y"
|
"is_has_data": "y"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -265,7 +265,7 @@ function DrpReal({ style }) {
|
||||||
"max_de": -5.1079,
|
"max_de": -5.1079,
|
||||||
"max_dn": 4.6055,
|
"max_dn": 4.6055,
|
||||||
"max_du": -3.12,
|
"max_du": -3.12,
|
||||||
"dt": "2025-05-20",
|
"dt": "2025-05-25 10:00:00",
|
||||||
"is_has_data": "y"
|
"is_has_data": "y"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -299,7 +299,7 @@ function DrpReal({ style }) {
|
||||||
"max_de": -0.4931,
|
"max_de": -0.4931,
|
||||||
"max_dn": 4.3759,
|
"max_dn": 4.3759,
|
||||||
"max_du": -2.11,
|
"max_du": -2.11,
|
||||||
"dt": "2025-05-20",
|
"dt": "2025-05-25 10:00:00",
|
||||||
"is_has_data": "y"
|
"is_has_data": "y"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -333,7 +333,7 @@ function DrpReal({ style }) {
|
||||||
"max_de": -5.1079,
|
"max_de": -5.1079,
|
||||||
"max_dn": 4.6055,
|
"max_dn": 4.6055,
|
||||||
"max_du": 3.12,
|
"max_du": 3.12,
|
||||||
"dt": "2025-05-20",
|
"dt": "2025-05-25 10:00:00",
|
||||||
"is_has_data": "y"
|
"is_has_data": "y"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
@ -603,7 +603,7 @@ function DrpReal({ style }) {
|
||||||
"value": 0.3,
|
"value": 0.3,
|
||||||
"diff_value": -0.02,
|
"diff_value": -0.02,
|
||||||
"trend": -1,
|
"trend": -1,
|
||||||
"dt": "2025-05-20",
|
"dt": "2025-05-25 10:00:00",
|
||||||
"is_has_data": "y",
|
"is_has_data": "y",
|
||||||
"max_value": 0.3
|
"max_value": 0.3
|
||||||
},
|
},
|
||||||
|
|
@ -1228,7 +1228,7 @@ function DrpReal({ style }) {
|
||||||
<DpTableCell style={{ minWidth: '8rem' }} align="center">垂直位移(mm)</DpTableCell>
|
<DpTableCell style={{ minWidth: '8rem' }} align="center">垂直位移(mm)</DpTableCell>
|
||||||
<DpTableCell style={{ minWidth: '6rem' }} align="center">上下游(mm)</DpTableCell>
|
<DpTableCell style={{ minWidth: '6rem' }} align="center">上下游(mm)</DpTableCell>
|
||||||
<DpTableCell style={{ minWidth: '6rem' }} align="center">左右岸(mm)</DpTableCell>
|
<DpTableCell style={{ minWidth: '6rem' }} align="center">左右岸(mm)</DpTableCell>
|
||||||
<DpTableCell style={{ minWidth: '10rem' }} align="center">监测时间</DpTableCell>
|
<DpTableCell style={{ minWidth: '15rem' }} align="center">监测时间</DpTableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableHead>
|
</TableHead>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ const WaterSupplyChart = ({type}) => {
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'value',
|
type: 'value',
|
||||||
name: 'm³',
|
name: '供水量m³',
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
fontSize: 12
|
fontSize: 12
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import React, { useMemo, useState } from 'react';
|
||||||
import useRequest from '../../../../utils/useRequest';
|
import useRequest from '../../../../utils/useRequest';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
import PanelBox from '../../components/PanelBox';
|
import PanelBox from '../../components/PanelBox';
|
||||||
|
import { parseGeoJSON } from "../../../../utils/tools";
|
||||||
|
|
||||||
import Table from '@material-ui/core/Table';
|
import Table from '@material-ui/core/Table';
|
||||||
import TableContainer from '@material-ui/core/TableContainer';
|
import TableContainer from '@material-ui/core/TableContainer';
|
||||||
|
|
@ -1755,11 +1756,64 @@ function DrpReal({ style }) {
|
||||||
const value = event.target.value;
|
const value = event.target.value;
|
||||||
setDimension(value);
|
setDimension(value);
|
||||||
}
|
}
|
||||||
|
const setLayer = (data = [], type) => {
|
||||||
|
const map = window.__mapref;
|
||||||
|
const layer = map.getLayer('关联站点')
|
||||||
|
if (layer) {
|
||||||
|
map.removeLayer('关联站点');
|
||||||
|
map.removeSource('关联站点');
|
||||||
|
}
|
||||||
|
if (data.length === 0) { return }
|
||||||
|
map.addLayer({
|
||||||
|
'id': '关联站点',//+new Date().getTime(),
|
||||||
|
'type': 'symbol',
|
||||||
|
'source': {
|
||||||
|
'type': 'geojson',
|
||||||
|
'data': {
|
||||||
|
'type': 'FeatureCollection',
|
||||||
|
'features': [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'layout': {
|
||||||
|
'icon-allow-overlap': true,
|
||||||
|
'text-allow-overlap': true,
|
||||||
|
'icon-image': '巡查',
|
||||||
|
'icon-size': [
|
||||||
|
'interpolate', ['linear'], ['zoom'],
|
||||||
|
10, 0.4,
|
||||||
|
14, 0.8,
|
||||||
|
],
|
||||||
|
|
||||||
|
'text-allow-overlap': true,
|
||||||
|
'text-size': [
|
||||||
|
'interpolate', ['linear'], ['zoom'],
|
||||||
|
10, 10,
|
||||||
|
14, 14,
|
||||||
|
],
|
||||||
|
'text-font': ['Roboto Black'],
|
||||||
|
'text-field': [
|
||||||
|
'step',
|
||||||
|
['zoom'],
|
||||||
|
'',
|
||||||
|
12, ['get', 'stnm']
|
||||||
|
],
|
||||||
|
'text-anchor': 'top',
|
||||||
|
'text-offset': [0, 1],
|
||||||
|
},
|
||||||
|
'paint': {
|
||||||
|
'text-color': '#fff'
|
||||||
|
},
|
||||||
|
'visibility': 'visible',
|
||||||
|
});
|
||||||
|
|
||||||
|
map.getSource('关联站点').setData(parseGeoJSON(data))
|
||||||
|
}
|
||||||
const jumpTo = (record) => {
|
const jumpTo = (record) => {
|
||||||
const { lgtd, lttd } = record;
|
const { lgtd, lttd } = record;
|
||||||
const lgtdNum = Number(lgtd);
|
const lgtdNum = Number(lgtd);
|
||||||
const lttdNum = Number(lttd)
|
const lttdNum = Number(lttd)
|
||||||
if (record.code == 1) {
|
if (record.code == 1) {
|
||||||
|
setLayer([{...record,lgtd:lgtdNum,lttd:lttdNum,stnm:"06-02浮桥河水库日常巡查"}])
|
||||||
if (lgtdNum && lttdNum) {
|
if (lgtdNum && lttdNum) {
|
||||||
dispatch.runtime.setCameraTarget({
|
dispatch.runtime.setCameraTarget({
|
||||||
center: [lgtdNum, lttdNum],
|
center: [lgtdNum, lttdNum],
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import React, { useMemo, useState } from 'react';
|
||||||
import useRequest from '../../../../utils/useRequest';
|
import useRequest from '../../../../utils/useRequest';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
import PanelBox from '../../components/PanelBox';
|
import PanelBox from '../../components/PanelBox';
|
||||||
|
import { parseGeoJSON } from "../../../../utils/tools";
|
||||||
|
|
||||||
import Table from '@material-ui/core/Table';
|
import Table from '@material-ui/core/Table';
|
||||||
import TableContainer from '@material-ui/core/TableContainer';
|
import TableContainer from '@material-ui/core/TableContainer';
|
||||||
|
|
@ -118,12 +119,66 @@ function DrpReal({ style }) {
|
||||||
'visibility': 'visible',
|
'visibility': 'visible',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const setLayer = (data = [], type) => {
|
||||||
|
const map = window.__mapref;
|
||||||
|
const layer = map.getLayer('关联站点')
|
||||||
|
if (layer) {
|
||||||
|
map.removeLayer('关联站点');
|
||||||
|
map.removeSource('关联站点');
|
||||||
|
}
|
||||||
|
if (data.length === 0) { return }
|
||||||
|
map.addLayer({
|
||||||
|
'id': '关联站点',//+new Date().getTime(),
|
||||||
|
'type': 'symbol',
|
||||||
|
'source': {
|
||||||
|
'type': 'geojson',
|
||||||
|
'data': {
|
||||||
|
'type': 'FeatureCollection',
|
||||||
|
'features': [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'layout': {
|
||||||
|
'icon-allow-overlap': true,
|
||||||
|
'text-allow-overlap': true,
|
||||||
|
'icon-image': '巡查',
|
||||||
|
'icon-size': [
|
||||||
|
'interpolate', ['linear'], ['zoom'],
|
||||||
|
10, 0.4,
|
||||||
|
14, 0.8,
|
||||||
|
],
|
||||||
|
|
||||||
|
'text-allow-overlap': true,
|
||||||
|
'text-size': [
|
||||||
|
'interpolate', ['linear'], ['zoom'],
|
||||||
|
10, 10,
|
||||||
|
14, 14,
|
||||||
|
],
|
||||||
|
'text-font': ['Roboto Black'],
|
||||||
|
'text-field': [
|
||||||
|
'step',
|
||||||
|
['zoom'],
|
||||||
|
'',
|
||||||
|
12, ['get', 'stnm']
|
||||||
|
],
|
||||||
|
'text-anchor': 'top',
|
||||||
|
'text-offset': [0, 1],
|
||||||
|
},
|
||||||
|
'paint': {
|
||||||
|
'text-color': '#fff'
|
||||||
|
},
|
||||||
|
'visibility': 'visible',
|
||||||
|
});
|
||||||
|
|
||||||
|
map.getSource('关联站点').setData(parseGeoJSON(data))
|
||||||
|
}
|
||||||
const jumpTo = (record) => {
|
const jumpTo = (record) => {
|
||||||
const { lgtd, lttd } = record;
|
const { lgtd, lttd } = record;
|
||||||
const lgtdNum = Number(lgtd);
|
const lgtdNum = Number(lgtd);
|
||||||
const lttdNum = Number(lttd)
|
const lttdNum = Number(lttd)
|
||||||
if (record.code == 1) {
|
if (record.code == 1) {
|
||||||
setSkLayer1()
|
setSkLayer1()
|
||||||
|
setLayer([{...record,lgtd:lgtdNum,lttd:lttdNum,stnm:"06-02浮桥河水库日常巡查"}])
|
||||||
if (lgtdNum && lttdNum) {
|
if (lgtdNum && lttdNum) {
|
||||||
dispatch.runtime.setCameraTarget({
|
dispatch.runtime.setCameraTarget({
|
||||||
center: [lgtdNum, lttdNum],
|
center: [lgtdNum, lttdNum],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue