import React,{useEffect} from 'react'; import { useSelector,useDispatch } from 'react-redux'; import { TransitionGroup, CSSTransition } from 'react-transition-group'; import './index.less'; import ActionDock from './components/ActionDock'; import Title from './components/Title'; import { getLayout, hidePanels } from '../../models/map/selectors'; import PanelIndex from './PanelIndex'; import MapCtrl from './MapCtrl'; import InfoDlg from './InfoDlg'; import clsx from 'clsx'; import Calculating from './components/Calculating'; //import SocketCtrl from './components/SocketCtrl'; export default function Demo1() { const dispatch = useDispatch(); const layout = useSelector(getLayout); const hp = useSelector(hidePanels); console.log("hp", hp); const yyRes = useSelector(s => s.runtime.yyObj); const isSc = useSelector(s => s.runtime.scya); const wg = useSelector(s => s.runtime.shkshObj) console.log('wg',wg); return (
{ yyRes.yy && <> } { isSc && }
{ !hp && ( { layout.left.map(({ key, ...params }) => ( )) } ) }
</div> { !hp && ( <TransitionGroup className={clsx('right', 'dp-panel-container', layout.rightFullHeight && 'fullheight')}> { layout.right.map(({ key, ...params }) => { if (key != '网格') { return ( <CSSTransition key={key} unmountOnExit exit={false} timeout={500} classNames="dp-panelgroup"> <PanelIndex name={key} {...params} /> </CSSTransition> ) } else if(wg) { return ( <CSSTransition key={key} unmountOnExit exit={false} timeout={500} classNames="dp-panelgroup"> <PanelIndex name={key} {...params} /> </CSSTransition> ) } } ) } </TransitionGroup> ) } <InfoDlg /> <Calculating /> </div> ) }