diff --git a/src/views/Home/btn/index.js b/src/views/Home/btn/index.js index 248ca0482..b22b3b348 100644 --- a/src/views/Home/btn/index.js +++ b/src/views/Home/btn/index.js @@ -1,5 +1,6 @@ import React, { useEffect, useReducer, useRef, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; +import { useNavigate } from "react-router"; import DiQiu from '../img/DiQiu.png' import ZhongXin from '../img/ZhongXin.png' import Shouqi2 from '../img/shouqi2.png' @@ -11,7 +12,7 @@ export default function Btn({showPanels,setShowPanels}) { const mode = useSelector((s) => s.map.mode); const layerVisible = useSelector(getLayerVisible); let mapObj = useSelector((s) => s.map.map); - + const navigate = useNavigate(); const dispatch = useDispatch() @@ -60,11 +61,14 @@ export default function Btn({showPanels,setShowPanels}) { if(layer.values_.name === "HLLayer2"){ layer.setVisible(false); } - }); + }); } //3Dbtn const btn3d = ()=>{ - dispatch.map.setMode('3d'); + navigate('/mgr/sy/hsyy'); + setOpen(false) + // dispatch.map.setMode('3d'); + } return ( diff --git a/src/views/Home/hsyy/ymtj.js b/src/views/Home/hsyy/ymtj.js index f57514723..e43cd8863 100644 --- a/src/views/Home/hsyy/ymtj.js +++ b/src/views/Home/hsyy/ymtj.js @@ -17,29 +17,29 @@ const Page = ({ ctx, setCtx }) => { const [data1,setData1] = useState([ { cz:'檀树岗村', - rk:10, + rk:28, + sd:0.3, + sj:'2025-08-04 18:00:00', + }, + { + cz:'程维德村', + rk:6, sd:15, sj:'2025-08-04 18:00:00', }, { - cz:'檀树岗村', - rk:10, + cz:'程维德村', + rk:6, sd:15, - sj:20, - }, - { - cz:'檀树岗村', - rk:10, - sd:15, - sj:20, + sj:'2025-08-04 18:00:00', }, ]) const [data2,setData2] = useState([ { dwmc:'七里坪镇檀树中学', rk:10, - sd:15, - sj:20, + sd:0.5, + sj:'2025-08-04 18:00:00', } ]) @@ -84,7 +84,7 @@ const Page = ({ ctx, setCtx }) => {
-
-
-