From 736e8331f81692c4bc5dcd886ff6406e240b6a70 Mon Sep 17 00:00:00 2001 From: qzc Date: Thu, 3 Jul 2025 10:11:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.js | 1 + src/models/map/layout.js | 2 +- src/views/Home/components/ActionDock/index.js | 24 +++++++++++-------- src/views/Home/components/Title/index.js | 10 +++++++- src/views/Home/index.js | 4 ++++ src/views/Home/panels/JbqkLeft/index.js | 17 ++++++------- 6 files changed, 38 insertions(+), 20 deletions(-) diff --git a/src/config.js b/src/config.js index a72ecb5..b5e82fb 100644 --- a/src/config.js +++ b/src/config.js @@ -9,6 +9,7 @@ const isShYjDebug = false; const config = { address, title: '麻城市智慧水利一张图', + title2: '麻城市防汛一张图', ADCD, ADCD6, ADCD12, diff --git a/src/models/map/layout.js b/src/models/map/layout.js index cf0d1c0..3cfdb1c 100644 --- a/src/models/map/layout.js +++ b/src/models/map/layout.js @@ -232,7 +232,7 @@ export default function calcLayout(view, rightStack, hidePanels) { } else { if (view === 0) { right = [ - { key: '警报' }, + // { key: '警报' }, { key: '防汛基本情况右侧', style: { height: '50rem',flexGrow: 1 } }, ]; rightFullHeight = true; diff --git a/src/views/Home/components/ActionDock/index.js b/src/views/Home/components/ActionDock/index.js index c36c032..370bd33 100644 --- a/src/views/Home/components/ActionDock/index.js +++ b/src/views/Home/components/ActionDock/index.js @@ -32,16 +32,16 @@ const VIEWS = [ ] }, // { id: 200, title: '水库', img: process.env.PUBLIC_URL+'/assets/menu/水库专题.png'}, - { - id: 300, title: '水厂', img: process.env.PUBLIC_URL + '/assets/menu/水利设施.png', children: [ - { id: 301, 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: 306, 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: 300, title: '水厂', img: process.env.PUBLIC_URL + '/assets/menu/水利设施.png', children: [ + // { id: 301, 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: 306, 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: 400, title: '灌区', img: process.env.PUBLIC_URL + '/assets/menu/预警分析.png', children: [ { id: 501, title: '灌区监测', img: process.env.PUBLIC_URL + '/assets/menu/防洪形势.png' }, @@ -125,6 +125,10 @@ export default function ActionDock({ }) { {o.title}}>
{ if (o.children) { + if(o.id===400){ + window.open("https://axhub.im/ax9/eec435b86544bac8/#id=arlcql&p=%E7%81%8C%E5%8C%BA%E6%80%BB%E8%A7%88&sc=1&c=1") + return + } //一级菜单 dispatch.map.setView(o.children[0].id) setViewKey(o.id) diff --git a/src/views/Home/components/Title/index.js b/src/views/Home/components/Title/index.js index c6ce5c9..16489f6 100644 --- a/src/views/Home/components/Title/index.js +++ b/src/views/Home/components/Title/index.js @@ -77,6 +77,14 @@ export default function Title() { dispatch.runtime.setHome(); } + const getTitle = (view)=>{ + if(view===1||view===3||view===4||view===5||view===6||view===8){ + return `${ config.title2 }` + }else{ + return `${ config.title }` + } + } + return (
@@ -97,7 +105,7 @@ export default function Title() {
-
{`${config.title}`}
+
{getTitle(view)}
管理平台 diff --git a/src/views/Home/index.js b/src/views/Home/index.js index 0f03df4..3c327c3 100644 --- a/src/views/Home/index.js +++ b/src/views/Home/index.js @@ -25,6 +25,7 @@ export default function Demo1() { const showGw = useSelector(s => s.runtime.showGw) const yuananType = useSelector(s => s.runtime.yuananType); const xiayou = useSelector(s => s.runtime.xiayouxh); + const jbqkKey = useSelector(s=>s.runtime.jbqkKey) console.log('wg', wg); @@ -98,6 +99,9 @@ export default function Demo1() { { layout.right.map(({ key, ...params }) => { + if(key==='防汛基本情况右侧'&&jbqkKey===''){ + return + } if (key != '网格' && key != '单个预案') { return ( diff --git a/src/views/Home/panels/JbqkLeft/index.js b/src/views/Home/panels/JbqkLeft/index.js index c545885..fd2a087 100644 --- a/src/views/Home/panels/JbqkLeft/index.js +++ b/src/views/Home/panels/JbqkLeft/index.js @@ -43,14 +43,15 @@ function DrpReal({ style }) { useEffect(()=>{ getSkData() - // return ()=>{ - // const map = window.__mapref; - // const layer = map.getLayer('临时水库tz') - // if(layer){ - // map.removeLayer('临时水库tz'); - // map.removeSource('临时水库tz'); - // } - // } + return ()=>{ + dispatch.runtime.setJbqkKey('') + // const map = window.__mapref; + // const layer = map.getLayer('临时水库tz') + // if(layer){ + // map.removeLayer('临时水库tz'); + // map.removeSource('临时水库tz'); + // } + } },[]) const getSkData = async()=>{