From b222c062f54c9ab62ba468a35d8f015d116d9ae9 Mon Sep 17 00:00:00 2001 From: qzc Date: Mon, 23 Sep 2024 10:33:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A7=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/auth/_.ts | 84 ++++++++++++++------ src/models/map/index.ts | 2 +- src/views/AppRouters.tsx | 13 +-- src/views/Home/homePanelsLayoutPage/index.js | 36 +++++---- src/views/Home/index.tsx | 8 +- src/views/fxzb/csgl/index.js | 2 +- src/views/fxzb/ybfagl/index.js | 6 +- 7 files changed, 99 insertions(+), 52 deletions(-) diff --git a/src/models/auth/_.ts b/src/models/auth/_.ts index 57f0cbfc0..e0ef8d364 100644 --- a/src/models/auth/_.ts +++ b/src/models/auth/_.ts @@ -196,33 +196,71 @@ export async function loadMenu(): Promise { { id: id(), title: '四预', redirect: '/mgr/sy/fhxzfx', icon: 'fxzb', children: [ - { id: id(), title: '防洪形势', path: '/mgr/sy/fhxzfx'}, - // { id: id(), title: '天气预报', path: '/mgr/fxzb/tqyb'}, - // { - // id: id(), title: '洪水预报', redirect: '/mgr/fxzb/hsyb/hyybjs', - // children: [ - // { id: id(), title: '洪水预报计算', path: '/mgr/fxzb/hsyb/hyybjs' }, - // { id: id(), title: '预报方案管理', path: '/mgr/fxzb/hsyb/ybfagl' }, - // { id: id(), title: '参数管理', path: '/mgr/fxzb/hsyb/csgl' }, - // ] - // }, - // { id: id(), title: '调度规程', path: '/mgr/fxzb/ddgc'}, - // { id: id(), title: '防汛预案', path: '/mgr/fxzb/fxya'}, - // { - // id: id(), - // title: '抢险物料', - // path: '/mgr/fxzb/qxwl', - // }, - // { - // id: id(), - // title: '抢险队伍', - // path: '/mgr/fxzb/qxdw', - // }, + { id: id(), title: '防洪现状分析', path: '/mgr/sy/fhxzfx'}, + { id: id(), title: '天气预报', path: '/mgr/sy/tqyb'}, + { + id: id(), title: '洪水预报', redirect: '/mgr/sy/hsyb/hyybjs', + children: [ + { id: id(), title: '洪水预报计算', path: '/mgr/sy/hsyb/hyybjs' }, + { id: id(), title: '预报方案管理', path: '/mgr/sy/hsyb/ybfagl' }, + { id: id(), title: '参数管理', path: '/mgr/sy/hsyb/csgl' }, + ] + }, + { id: id(), title: '调度规程', path: '/mgr/fxzb/ddgc'}, + { id: id(), title: '防汛预案', path: '/mgr/fxzb/fxya'}, + { + id: id(), + title: '抢险物料', + path: '/mgr/fxzb/qxwl', + }, + { + id: id(), + title: '抢险队伍', + path: '/mgr/fxzb/qxdw', + }, ], }, + { + id: id(), + title: '工程安全监测', + redirect: '/mgr/gcaqjc/gcaqyj/bzt', + icon: 'fxzb', + children: [ + { id: id(), title: '布置图', path: '/mgr/gcaqjc/gcaqyj/bzt' }, + { + id: id(), title: '工程安全分析', redirect: '/mgr/gcaqjc/gcaqfx/jrx', + children: [ + { id: id(), title: '浸润线', path: '/mgr/gcaqjc/gcaqfx/jrx' }, + + ] + }, + { + id: id(), title: '工程安全预警', redirect: '/mgr/gcaqjc/gcaqyj/yhyj', + children: [ + { id: id(), title: '隐患预警', path: '/mgr/gcaqjc/gcaqyj/yhyj' }, + { id: id(), title: '预警规则配置', path: '/mgr/gcaqjc/gcaqyj/yjgzpz' }, + + ] + }, + { + id: id(), title: '数据统计查询', redirect: '/mgr/gcaqjc/sjtjcx/sljx', + children: [ + { id: id(), title: '测值查询', path: '/mgr/gcaqjc/sjtjcx/czcx' }, + { id: id(), title: '渗压监测', path: '/mgr/gcaqjc/sjtjcx/syjx' }, + { id: id(), title: '渗流监测', path: '/mgr/gcaqjc/sjtjcx/sljx' }, + { id: id(), title: '位移监测', path: '/mgr/gcaqjc/sjtjcx/wyjx' }, + { id: id(), title: '年度渗压统计表', path: '/mgr/gcaqjc/sjtjcx/ndsytjb' }, + { id: id(), title: '年度渗流统计表', path: '/mgr/gcaqjc/sjtjcx/ndsltjb' }, + { id: id(), title: '年度位移统计表', path: '/mgr/gcaqjc/sjtjcx/ndwytjb' }, + + ] + }, + + ], + }, - // { id: id(), title: '基本2情况', path: '/mgr/home', icon: 'jbqk' }, + // { id: id(), title: '基本情况', path: '/mgr/home', icon: 'jbqk' }, // { // id: id(), // title: '防汛调度', diff --git a/src/models/map/index.ts b/src/models/map/index.ts index 64d2a7fc0..1c9d7050d 100644 --- a/src/models/map/index.ts +++ b/src/models/map/index.ts @@ -6,7 +6,7 @@ import { parseGeoJSONFeature } from "../../utils/tools"; function initState() { return { layerVisible: { - AdcdLayer: true,//行政区划 + AdcdLayer: false,//行政区划 AdcdBorderInLayer: true,//乡镇边界 AdcdAllLayer: false,//县行政区划图层 HeLiuZhuJiLayer:true,//12条河流注记 diff --git a/src/views/AppRouters.tsx b/src/views/AppRouters.tsx index 560707546..0b41e1b57 100644 --- a/src/views/AppRouters.tsx +++ b/src/views/AppRouters.tsx @@ -108,13 +108,14 @@ const AppRouters: React.FC = () => { children: [ { path: 'home', element: }, - // 防汛调度 + //四预 { path: 'sy/fhxzfx', element: }, - { path: 'fxzb/tqyb', element: }, - //洪水预报 - { path: 'fxzb/hsyb/hyybjs', element: }, - { path: 'fxzb/hsyb/ybfagl', element: }, - { path: 'fxzb/hsyb/csgl', element: }, + { path: 'sy/tqyb', element: }, + + //四预-洪水预报 + { path: 'sy/hsyb/hyybjs', element: }, + { path: 'sy/hsyb/ybfagl', element: }, + { path: 'sy/hsyb/csgl', element: }, // 调度规程 { path: 'fxzb/ddgc', element: }, diff --git a/src/views/Home/homePanelsLayoutPage/index.js b/src/views/Home/homePanelsLayoutPage/index.js index 438aef663..b3079f5ec 100644 --- a/src/views/Home/homePanelsLayoutPage/index.js +++ b/src/views/Home/homePanelsLayoutPage/index.js @@ -37,27 +37,34 @@ const { Panel } = Collapse; const { RangePicker } = DatePicker; const items = [ - { key:'1', label:'实时监测', children:[ + { key:'1', label:'综合监视', children:[ { key:'11', label:'预警', labelRight:'预警', icon:'yujing' }, { key:'12', label:'雨情', labelRight:'统计', icon:'yuqing' }, - { key:'13', label:'水库水情', labelRight:'实时水情', icon:'shuikushuiqing' }, - { key:'14', label:'供水', labelRight:'今日供水实况', icon:'gongshui' }, + { key:'13', label:'水情', labelRight:'实时水情', icon:'shuikushuiqing' }, { key:'15', label:'工程安全', labelRight:'工程安全监测', icon:'gongchenganquan' }, { key:'16', label:'监测设备状态', labelRight:'监测设备运行', icon:'jianceshebeizhuangtai' }, { key:'17', label:'水质', labelRight:'水质', icon:'shuizhi' }, { key:'18', label:'视频点', labelRight:'视频点', icon:'shipindian' }, ] }, - { key:'2', label:'水库工程', children:[ - { key:'21', label:'水库', labelRight:'基本信息', icon:'shuiku' }, - { key:'22', label:'大坝', labelRight:'基本信息', icon:'daba' }, - { key:'23', label:'溢洪道', labelRight:'基本信息', icon:'yihongdao' }, + // { key:'2', label:'水库工程', children:[ + // { key:'21', label:'水库', labelRight:'基本信息', icon:'shuiku' }, + // { key:'22', label:'大坝', labelRight:'基本信息', icon:'daba' }, + // { key:'23', label:'溢洪道', labelRight:'基本信息', icon:'yihongdao' }, + // ] }, + { key:'2', label:'巡查巡检', children:[ + { key:'21', label:'巡查巡检', labelRight:'工程巡检', icon:'shuiku' }, + // { key:'22', label:'大坝', labelRight:'基本信息', icon:'daba' }, + // { key:'23', label:'溢洪道', labelRight:'基本信息', icon:'yihongdao' }, ] }, - { key:'3', label:'洪水影响范围', children:[ + { key:'3', label:'洪水防御', children:[ { key:'31', label:'危险区', labelRight:'危险区列表', icon:'weixianqu' }, { key:'32', label:'安置点', labelRight:'安置点列表', icon:'anzhidian' }, { key:'33', label:'企事业单位', labelRight:'企事业单位列表', icon:'qishiyedanwei' }, { key:'34', label:'沿河居民户', labelRight:'沿河居民户列表', icon:'yanhejuminhu' }, ] }, + { key:'4', label:'水资源调度', children:[ + { key:'41', label:'供水', labelRight:'今日供水实况', icon:'gongshui' }, + ] }, ] @@ -118,9 +125,9 @@ const HomePage = ({showPanels}) => { dispatch.runtime.setHome() setCheckedObj({ key:'11', label:'预警', labelRight:'预警', icon:'yujing' }) }else if(a==='2'){ - setShowTable(true) - dispatch.runtime.setHome() - setCheckedObj({ key:'21', label:'水库', labelRight:'基本信息', icon:'shuiku' }) + // setShowTable(true) + // dispatch.runtime.setHome() + setCheckedObj({ key:'21', label:'巡查巡检', labelRight:'工程巡检', icon:'shuiku' }) }else if(a==='3'){ dispatch.runtime.setCameraTarget({ center: [114.96, 31.453], @@ -129,8 +136,9 @@ const HomePage = ({showPanels}) => { }) setShowTable(true) setCheckedObj({ key:'31', label:'危险区', labelRight:'危险区列表', icon:'weixianqu' }) + }else if(a==='4'){ + setCheckedObj({ key:'41', label:'供水', labelRight:'今日供水实况', icon:'gongshui' }) }else{ - } }} expandIconPosition="end" accordion={true} bordered={false}> { @@ -191,7 +199,7 @@ const HomePage = ({showPanels}) => { } { checkedObj.label === '预警' ? <>:null } { checkedObj.label === '雨情' ? :null } - { checkedObj.label === '水库水情' ? :null } + { checkedObj.label === '水情' ? :null } { checkedObj.label === '供水' ? :null } { checkedObj.label === '工程安全' ? :null } { checkedObj.label === '监测设备状态' ? :null } @@ -221,7 +229,7 @@ const HomePage = ({showPanels}) => {
{ checkedObj.label==='雨情'?:null } - { checkedObj.label==='水库水情'?:null } + { checkedObj.label==='水情'?:null } { checkedObj.label==='供水'?:null } { (checkedObj.label==='水库'||checkedObj.label==='大坝'||checkedObj.label==='溢洪道'||checkedObj.label==='视频点')?:null } { (checkedObj.label==='危险区'||checkedObj.label==='安置点'||checkedObj.label==='企事业单位'||checkedObj.label==='沿河居民户')?:null } diff --git a/src/views/Home/index.tsx b/src/views/Home/index.tsx index bacfd6f71..bbd39d234 100644 --- a/src/views/Home/index.tsx +++ b/src/views/Home/index.tsx @@ -190,13 +190,13 @@ const HomePage = () => { ) : null} - {/*防汛调度-防洪形势*/} - {pathname === '/mgr/fxzb/fhxs' ? ( + {/*四预-防洪形势*/} + {pathname === '/mgr/sy/fhxzfx' ? ( ) : null} - {/*防汛调度-天气预报*/} - {pathname === '/mgr/fxzb/tqyb' ? ( + {/*四预-天气预报*/} + {pathname === '/mgr/sy/tqyb' ? ( ) : null} diff --git a/src/views/fxzb/csgl/index.js b/src/views/fxzb/csgl/index.js index 3dd7eae7d..112c089a7 100644 --- a/src/views/fxzb/csgl/index.js +++ b/src/views/fxzb/csgl/index.js @@ -16,7 +16,7 @@ const Page = () => { const refModal2 = useRef(); const refModal3 = useRef(); const role = useSelector(state => state.auth.role); - const editBtn = (role?.rule?.find(item => item.menuName == "编辑"))?true:false; + const editBtn = (role?.rule?.find(item => item.menuName == "编辑"))?true:true; const [searchVal, setSearchVal] = useState(false) const columns = [ { title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" }, diff --git a/src/views/fxzb/ybfagl/index.js b/src/views/fxzb/ybfagl/index.js index f6808d186..f8f85caa5 100644 --- a/src/views/fxzb/ybfagl/index.js +++ b/src/views/fxzb/ybfagl/index.js @@ -11,9 +11,9 @@ import {CrudOpRender_text} from '../../../components/crud/CrudOpRender'; import { httpget2 } from '../../../utils/request'; const Page = () => { const role = useSelector(state => state.auth.role); - const editBtn = (role?.rule?.find(item => item.menuName == "查询"))?true:false; - const viewBtn = (role?.rule?.find(item => item.menuName == "详情"))?true:false; - const delBtn = (role?.rule?.find(item => item.menuName == "删除"))?true:false; + const editBtn = (role?.rule?.find(item => item.menuName == "查询"))?true:true; + const viewBtn = (role?.rule?.find(item => item.menuName == "详情"))?true:true; + const delBtn = (role?.rule?.find(item => item.menuName == "删除"))?true:true; const [open, setOpen] = useState(false) const [projectId, setProjectId] = useState('')