From a6c2e6f8fb585b065a445de9af0dd431cce5dbe5 Mon Sep 17 00:00:00 2001 From: Swanky <413564165@qq.com> Date: Thu, 11 Jan 2024 22:10:31 +0800 Subject: [PATCH] 1 --- public/config/app.json | 66 ++++++++++- src/components/Main/Content/index.js | 1 + .../Main/Map/BusinessLayer/index.js | 111 ++++++++++++++---- .../Main/Map/BusinessLayer/index.less | 32 +++++ .../Main/components/Cdth/CdthFilter/index.js | 22 +++- .../components/Cdzzy/CdzzyFilter/index.js | 28 ++++- .../components/Stxfgc/StxfgcFilter/index.js | 25 +++- src/components/Main/index.js | 1 + 8 files changed, 259 insertions(+), 27 deletions(-) create mode 100644 src/components/Main/Map/BusinessLayer/index.less diff --git a/public/config/app.json b/public/config/app.json index 7590809..413b51f 100644 --- a/public/config/app.json +++ b/public/config/app.json @@ -15,7 +15,71 @@ layers: { cdzy: { // 草地资源 - layerName: 'yzt:t_grassland_result' + layerName: 'yzt:t_grassland_result', + legends: [ + { + name: '高寒草甸类', + fillColor: '#0DFBFE', + strokeColor: '#0DFBFE' + }, + { + name: '低地草甸类', + fillColor: '#0EFE63', + strokeColor: '#0EFE63' + }, + { + name: '山地草甸类', + fillColor: '#FEEA09', + strokeColor: '#FEEA09' + } + ] + }, + cdth: { + // 草地退化 + layerName: 'yzt:t_grassland_result_degradation_level', + legends: [ + { + name: '未退化', + fillColor: '#35DF95', + strokeColor: '#35DF95' + }, + { + name: '轻度退化', + fillColor: '#27DDFA', + strokeColor: '#27DDFA' + }, + { + name: '中度退化', + fillColor: '#FFB12A', + strokeColor: '#FFB12A' + }, + { + name: '重度退化', + fillColor: '#EF2B67', + strokeColor: '#EF2B67' + } + ] + }, + + stxfgc: { + // 生态修复工程 + layerName: 'yzt:stxfgc' + }, + cdzzy: { + // 草地征占用 + layerName: 'yzt:cdzzy_view', + legends: [ + { + name: '临时占用', + fillColor: '#00ADFF', + strokeColor: '#00ADFF' + }, + { + name: '永久占用', + fillColor: '#FFB12A', + strokeColor: '#FFB12A' + } + ] } } } diff --git a/src/components/Main/Content/index.js b/src/components/Main/Content/index.js index 614d2da..94f6d9f 100644 --- a/src/components/Main/Content/index.js +++ b/src/components/Main/Content/index.js @@ -121,6 +121,7 @@ export default function Content(props) { }}>{item.name} + ; } \ No newline at end of file diff --git a/src/components/Main/components/Cdzzy/CdzzyFilter/index.js b/src/components/Main/components/Cdzzy/CdzzyFilter/index.js index 2e133fd..7a154b5 100644 --- a/src/components/Main/components/Cdzzy/CdzzyFilter/index.js +++ b/src/components/Main/components/Cdzzy/CdzzyFilter/index.js @@ -1,4 +1,4 @@ -import { Col, Divider, Form, Input, Radio, Row, Select, Space } from 'antd'; +import { Button, Col, Divider, Form, Input, Radio, Row, Select, Space } from 'antd'; import { useState, useEffect } from 'react' import ZoneSelector from '../../../../common/ZoneSelector'; import CdzyApi from '../../../../../utils/apis/CdzyApi'; @@ -28,12 +28,32 @@ export default function CdzzyFilter(props) { marginTop: 0, borderColor: "#075C88" }} /> - + 全部 - 临时占用 - 永久占用 + 临时占用 + 永久占用 + + + ; } \ No newline at end of file diff --git a/src/components/Main/components/Stxfgc/StxfgcFilter/index.js b/src/components/Main/components/Stxfgc/StxfgcFilter/index.js index 58ae5da..b1d1389 100644 --- a/src/components/Main/components/Stxfgc/StxfgcFilter/index.js +++ b/src/components/Main/components/Stxfgc/StxfgcFilter/index.js @@ -1,4 +1,4 @@ -import { Col, Divider, Form, Input, Radio, Row, Select, Space } from 'antd'; +import { Button, Col, Divider, Form, Input, Radio, Row, Select, Space } from 'antd'; import { useState, useEffect } from 'react' import ZoneSelector from '../../../../common/ZoneSelector'; import CdzyApi from '../../../../../utils/apis/CdzyApi'; @@ -33,5 +33,28 @@ export default function StxfgcFilter(props) { width: 250 }} /> + + + ; } \ No newline at end of file diff --git a/src/components/Main/index.js b/src/components/Main/index.js index 8987197..059c6b4 100644 --- a/src/components/Main/index.js +++ b/src/components/Main/index.js @@ -65,6 +65,7 @@ export default function Main(props) {
{ + setFilterStr('1=1') setLayerKey(key) }} onFilterChange={str=>{ setFilterStr(str)