master
parent
66d31d2a78
commit
f66152bdff
|
|
@ -1,5 +1,4 @@
|
||||||
import { useContext, useEffect, useState } from "react";
|
import { useContext, useEffect, useState } from "react";
|
||||||
import { CSSTransition, SwitchTransition } from "react-transition-group";
|
|
||||||
import bg7 from "~/assets/images/map_bi/bottom_utils/bg7.png";
|
import bg7 from "~/assets/images/map_bi/bottom_utils/bg7.png";
|
||||||
import bg8 from "~/assets/images/map_bi/bottom_utils/bg8.png";
|
import bg8 from "~/assets/images/map_bi/bottom_utils/bg8.png";
|
||||||
import titleImg from "~/assets/images/map_bi/bottom_utils/title.png";
|
import titleImg from "~/assets/images/map_bi/bottom_utils/title.png";
|
||||||
|
|
@ -8,8 +7,6 @@ import { branchOfficeUtilsList } from "~/pages/Container/Map/components/BottomUt
|
||||||
import { Context } from "~/pages/Container/Map/js/context";
|
import { Context } from "~/pages/Container/Map/js/context";
|
||||||
import mitt from "~/pages/Container/Map/js/mitt";
|
import mitt from "~/pages/Container/Map/js/mitt";
|
||||||
import {
|
import {
|
||||||
changeBottomUtilsAnimationMittKey,
|
|
||||||
changeContentAnimationKeyMittKey,
|
|
||||||
deletePeoplePositionPointMittKey,
|
deletePeoplePositionPointMittKey,
|
||||||
initBottomUtilsMittKey,
|
initBottomUtilsMittKey,
|
||||||
resetAllBottomUtilsCheckMittKey,
|
resetAllBottomUtilsCheckMittKey,
|
||||||
|
|
@ -47,8 +44,6 @@ function BottomUtils(props) {
|
||||||
}, [currentBranchOffice]);
|
}, [currentBranchOffice]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
mitt.on(changeBottomUtilsAnimationMittKey, () => {
|
|
||||||
});
|
|
||||||
mitt.on(resetBottomCurrentIndexMittKey, () => {
|
mitt.on(resetBottomCurrentIndexMittKey, () => {
|
||||||
props.setBottomUtilsCurrentIndex(-1);
|
props.setBottomUtilsCurrentIndex(-1);
|
||||||
});
|
});
|
||||||
|
|
@ -59,7 +54,6 @@ function BottomUtils(props) {
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
mitt.off(changeBottomUtilsAnimationMittKey);
|
|
||||||
mitt.off(resetBottomCurrentIndexMittKey);
|
mitt.off(resetBottomCurrentIndexMittKey);
|
||||||
mitt.off(resetAllBottomUtilsCheckMittKey);
|
mitt.off(resetAllBottomUtilsCheckMittKey);
|
||||||
mitt.off(deletePeoplePositionPointMittKey);
|
mitt.off(deletePeoplePositionPointMittKey);
|
||||||
|
|
@ -68,7 +62,6 @@ function BottomUtils(props) {
|
||||||
|
|
||||||
const optionsClick = (index) => {
|
const optionsClick = (index) => {
|
||||||
props.setBottomUtilsCurrentIndex(bottomUtilsCurrentIndex === index ? -1 : index);
|
props.setBottomUtilsCurrentIndex(bottomUtilsCurrentIndex === index ? -1 : index);
|
||||||
mitt.emit(changeContentAnimationKeyMittKey);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const optionsItemsClick = (index, index1, item, item1) => {
|
const optionsItemsClick = (index, index1, item, item1) => {
|
||||||
|
|
@ -98,17 +91,7 @@ function BottomUtils(props) {
|
||||||
onClick={() => optionsClick(index)}
|
onClick={() => optionsClick(index)}
|
||||||
>
|
>
|
||||||
<div className="label">{item.label}</div>
|
<div className="label">{item.label}</div>
|
||||||
<CSSTransition
|
{(isCurrentActive && item.list?.length > 0) && (
|
||||||
in={isCurrentActive && item.list?.length > 0}
|
|
||||||
timeout={500}
|
|
||||||
classNames={{
|
|
||||||
enter: "animate__animated animate__faster",
|
|
||||||
enterActive: "animate__animated animate__faster animate__fadeInUp",
|
|
||||||
exit: "animate__animated animate__faster",
|
|
||||||
exitActive: "animate__animated animate__faster animate__fadeOutDown",
|
|
||||||
}}
|
|
||||||
unmountOnExit
|
|
||||||
>
|
|
||||||
<div className="items">
|
<div className="items">
|
||||||
{item.list?.map((item1, index1) => (
|
{item.list?.map((item1, index1) => (
|
||||||
<div
|
<div
|
||||||
|
|
@ -123,7 +106,7 @@ function BottomUtils(props) {
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</CSSTransition>
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
@ -150,17 +133,7 @@ function BottomUtils(props) {
|
||||||
>
|
>
|
||||||
{item.label}
|
{item.label}
|
||||||
</div>
|
</div>
|
||||||
<CSSTransition
|
{(isCurrentActive && item.list?.length > 0) && (
|
||||||
in={isCurrentActive && item.list?.length > 0}
|
|
||||||
timeout={500}
|
|
||||||
classNames={{
|
|
||||||
enter: "animate__animated animate__faster",
|
|
||||||
enterActive: "animate__animated animate__faster animate__fadeInLeft",
|
|
||||||
exit: "animate__animated animate__faster",
|
|
||||||
exitActive: "animate__animated animate__faster animate__fadeOutLeft",
|
|
||||||
}}
|
|
||||||
unmountOnExit
|
|
||||||
>
|
|
||||||
<div className="items">
|
<div className="items">
|
||||||
{item.list?.map((item1, index1) => (
|
{item.list?.map((item1, index1) => (
|
||||||
<div
|
<div
|
||||||
|
|
@ -176,7 +149,7 @@ function BottomUtils(props) {
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</CSSTransition>
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
@ -193,21 +166,7 @@ function BottomUtils(props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="map_content_bottom_utils_container">
|
<div className="map_content_bottom_utils_container">
|
||||||
<SwitchTransition>
|
|
||||||
<CSSTransition
|
|
||||||
timeout={500}
|
|
||||||
classNames={{
|
|
||||||
enter: "animate__animated animate__faster",
|
|
||||||
enterActive: "animate__animated animate__faster animate__fadeInUp",
|
|
||||||
exit: "animate__animated animate__faster",
|
|
||||||
exitActive: "animate__animated animate__faster animate__fadeOutDown",
|
|
||||||
}}
|
|
||||||
unmountOnExit
|
|
||||||
key={currentBranchOffice || currentPort}
|
|
||||||
>
|
|
||||||
{renderUtils()}
|
{renderUtils()}
|
||||||
</CSSTransition>
|
|
||||||
</SwitchTransition>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import { useContext, useState } from "react";
|
import { useContext, useState } from "react";
|
||||||
import { CSSTransition } from "react-transition-group";
|
|
||||||
import statisticsTitleImg from "~/assets/images/map_bi/center_utils/statistics_title.png";
|
import statisticsTitleImg from "~/assets/images/map_bi/center_utils/statistics_title.png";
|
||||||
import guangImg from "~/assets/images/map_bi/center_utils/tabguang.png";
|
import guangImg from "~/assets/images/map_bi/center_utils/tabguang.png";
|
||||||
import tabLeftImg from "~/assets/images/map_bi/center_utils/tableft.png";
|
import tabLeftImg from "~/assets/images/map_bi/center_utils/tableft.png";
|
||||||
|
|
@ -11,8 +10,6 @@ import tabRightOnImg from "~/assets/images/map_bi/center_utils/tabright_on.png";
|
||||||
import { Context } from "~/pages/Container/Map/js/context";
|
import { Context } from "~/pages/Container/Map/js/context";
|
||||||
import mitt from "~/pages/Container/Map/js/mitt";
|
import mitt from "~/pages/Container/Map/js/mitt";
|
||||||
import {
|
import {
|
||||||
changeBottomUtilsAnimationMittKey,
|
|
||||||
changeContentAnimationKeyMittKey,
|
|
||||||
deletePeoplePositionPointMittKey,
|
deletePeoplePositionPointMittKey,
|
||||||
resetAllBottomUtilsCheckMittKey,
|
resetAllBottomUtilsCheckMittKey,
|
||||||
resetBottomCurrentIndexMittKey,
|
resetBottomCurrentIndexMittKey,
|
||||||
|
|
@ -34,26 +31,14 @@ function CenterUtils(props) {
|
||||||
props.setArea(list[index].area);
|
props.setArea(list[index].area);
|
||||||
mapMethods.current.removeBranchOfficePoint();
|
mapMethods.current.removeBranchOfficePoint();
|
||||||
mapMethods.current.addBranchOfficePoint(list[index].area);
|
mapMethods.current.addBranchOfficePoint(list[index].area);
|
||||||
mitt.emit(changeBottomUtilsAnimationMittKey);
|
|
||||||
mitt.emit(resetBottomCurrentIndexMittKey);
|
mitt.emit(resetBottomCurrentIndexMittKey);
|
||||||
mitt.emit(resetAllBottomUtilsCheckMittKey);
|
mitt.emit(resetAllBottomUtilsCheckMittKey);
|
||||||
mitt.emit(deletePeoplePositionPointMittKey);
|
mitt.emit(deletePeoplePositionPointMittKey);
|
||||||
mitt.emit(changeContentAnimationKeyMittKey);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="map_content_center_options_container">
|
<div className="map_content_center_options_container">
|
||||||
<CSSTransition
|
{(currentPort === "00003" && !currentBranchOffice && !pureMap) && (
|
||||||
in={(currentPort === "00003" && !currentBranchOffice && !pureMap)}
|
|
||||||
timeout={1000}
|
|
||||||
classNames={{
|
|
||||||
enter: "animate__animated",
|
|
||||||
enterActive: "animate__animated animate__fadeInDown",
|
|
||||||
exit: "animate__animated",
|
|
||||||
exitActive: "animate__animated animate__fadeOutUp",
|
|
||||||
}}
|
|
||||||
unmountOnExit
|
|
||||||
>
|
|
||||||
<div>
|
<div>
|
||||||
<div className="center_options">
|
<div className="center_options">
|
||||||
<div
|
<div
|
||||||
|
|
@ -96,7 +81,7 @@ function CenterUtils(props) {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</CSSTransition>
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ const weatherIconMap = {
|
||||||
默认: SunIcon,
|
默认: SunIcon,
|
||||||
};
|
};
|
||||||
|
|
||||||
function Index() {
|
function IndexLeft() {
|
||||||
const [weatherData, setWeatherData] = useState({
|
const [weatherData, setWeatherData] = useState({
|
||||||
text: "晴天",
|
text: "晴天",
|
||||||
temp: "36.5",
|
temp: "36.5",
|
||||||
|
|
@ -142,7 +142,7 @@ function Index() {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="branch_office_index">
|
<div className="branch_office_index_left">
|
||||||
<div className="block1">
|
<div className="block1">
|
||||||
<Title title="天气预防情况" />
|
<Title title="天气预防情况" />
|
||||||
<div className="options">
|
<div className="options">
|
||||||
|
|
@ -275,4 +275,4 @@ function Index() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Index;
|
export default IndexLeft;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
.branch_office_index {
|
.branch_office_index_left {
|
||||||
.block1 {
|
.block1 {
|
||||||
background-color: rgba(12, 28, 88, 0.4);
|
background-color: rgba(12, 28, 88, 0.4);
|
||||||
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
function IndexRight() {
|
||||||
|
return (
|
||||||
|
<div className="branch_office_index_right"></div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default IndexRight;
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import { useContext, useEffect, useState } from "react";
|
import { useContext, useState } from "react";
|
||||||
import { CSSTransition, SwitchTransition } from "react-transition-group";
|
|
||||||
import collapseMenuImg1 from "~/assets/images/map_bi/content/collapse_menu1.png";
|
import collapseMenuImg1 from "~/assets/images/map_bi/content/collapse_menu1.png";
|
||||||
import collapseMenuImg2 from "~/assets/images/map_bi/content/collapse_menu2.png";
|
import collapseMenuImg2 from "~/assets/images/map_bi/content/collapse_menu2.png";
|
||||||
import collapseMenuBg1 from "~/assets/images/map_bi/content/collapse_menu_bg1.png";
|
import collapseMenuBg1 from "~/assets/images/map_bi/content/collapse_menu_bg1.png";
|
||||||
import collapseMenuBg2 from "~/assets/images/map_bi/content/collapse_menu_bg2.png";
|
import collapseMenuBg2 from "~/assets/images/map_bi/content/collapse_menu_bg2.png";
|
||||||
import { branchOfficeUtilsList } from "~/pages/Container/Map/components/BottomUtils/branchOfficeUtilsList";
|
import { branchOfficeUtilsList } from "~/pages/Container/Map/components/BottomUtils/branchOfficeUtilsList";
|
||||||
import { portUtilsList } from "~/pages/Container/Map/components/BottomUtils/portUtilsList";
|
import { portUtilsList } from "~/pages/Container/Map/components/BottomUtils/portUtilsList";
|
||||||
import BranchOfficeIndex from "~/pages/Container/Map/components/Content/branchOffice/Index";
|
import BranchOfficeIndexLeft from "~/pages/Container/Map/components/Content/branchOffice/IndexLeft";
|
||||||
|
import BranchOfficeIndexRight from "~/pages/Container/Map/components/Content/branchOffice/IndexRight";
|
||||||
import IndexInfo from "~/pages/Container/Map/components/Content/IndexInfo";
|
import IndexInfo from "~/pages/Container/Map/components/Content/IndexInfo";
|
||||||
import PortFengBi from "~/pages/Container/Map/components/Content/port/FengBi";
|
import PortFengBi from "~/pages/Container/Map/components/Content/port/FengBi";
|
||||||
import PortIndex from "~/pages/Container/Map/components/Content/port/Index";
|
import PortIndex from "~/pages/Container/Map/components/Content/port/Index";
|
||||||
|
|
@ -17,33 +17,13 @@ import PortWeiXian from "~/pages/Container/Map/components/Content/port/WeiXian";
|
||||||
import PortXiaoFang from "~/pages/Container/Map/components/Content/port/XiaoFang";
|
import PortXiaoFang from "~/pages/Container/Map/components/Content/port/XiaoFang";
|
||||||
import PortZhongDian from "~/pages/Container/Map/components/Content/port/ZhongDian";
|
import PortZhongDian from "~/pages/Container/Map/components/Content/port/ZhongDian";
|
||||||
import { Context } from "~/pages/Container/Map/js/context";
|
import { Context } from "~/pages/Container/Map/js/context";
|
||||||
import mitt from "~/pages/Container/Map/js/mitt";
|
|
||||||
import { changeContentAnimationKeyMittKey } from "~/pages/Container/Map/js/mittKey";
|
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
function Content() {
|
function Content() {
|
||||||
const { currentPort, currentBranchOffice, pureMap, bottomUtilsCurrentIndex } = useContext(Context);
|
const { currentPort, currentBranchOffice, pureMap, bottomUtilsCurrentIndex } = useContext(Context);
|
||||||
|
|
||||||
const [animationKey, setAnimationKey] = useState(0);
|
const [collapseLeft, setCollapseLeft] = useState(false);
|
||||||
const [collapse, setCollapse] = useState(false);
|
const [collapseRight, setCollapseRight] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setAnimationKey(Math.random());
|
|
||||||
|
|
||||||
mitt.on(changeContentAnimationKeyMittKey, () => {
|
|
||||||
setAnimationKey(Math.random());
|
|
||||||
setCollapse(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
return () => {
|
|
||||||
mitt.off(changeContentAnimationKeyMittKey);
|
|
||||||
};
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const onChangeCollapse = () => {
|
|
||||||
setAnimationKey(Math.random());
|
|
||||||
setCollapse(!collapse);
|
|
||||||
};
|
|
||||||
|
|
||||||
const renderPortContent = () => {
|
const renderPortContent = () => {
|
||||||
const bottomUtilsCurrentType = bottomUtilsCurrentIndex !== -1 ? portUtilsList[bottomUtilsCurrentIndex].type : "";
|
const bottomUtilsCurrentType = bottomUtilsCurrentIndex !== -1 ? portUtilsList[bottomUtilsCurrentIndex].type : "";
|
||||||
|
|
@ -65,73 +45,99 @@ function Content() {
|
||||||
return <PortFengBi />;
|
return <PortFengBi />;
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderBranchOfficeContent = () => {
|
const renderBranchOfficeContentLeft = () => {
|
||||||
const bottomUtilsCurrentType = bottomUtilsCurrentIndex !== -1 ? branchOfficeUtilsList[bottomUtilsCurrentIndex].type : "";
|
const bottomUtilsCurrentType = bottomUtilsCurrentIndex !== -1 ? branchOfficeUtilsList[bottomUtilsCurrentIndex].type : "";
|
||||||
if (bottomUtilsCurrentType === "")
|
if (bottomUtilsCurrentType === "") {
|
||||||
return <BranchOfficeIndex />;
|
return <BranchOfficeIndexLeft />;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const renderBranchOfficeContentRight = () => {
|
||||||
|
const bottomUtilsCurrentType = bottomUtilsCurrentIndex !== -1 ? branchOfficeUtilsList[bottomUtilsCurrentIndex].type : "";
|
||||||
|
if (bottomUtilsCurrentType === "") {
|
||||||
|
return <BranchOfficeIndexRight />;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderContent = () => {
|
const renderContent = () => {
|
||||||
if (pureMap || collapse)
|
if (pureMap)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`map_content_container__content ${currentPort === "00003" && !currentBranchOffice ? "port" : "branch_office"}`}>
|
<>
|
||||||
|
{!collapseLeft && (
|
||||||
|
<div
|
||||||
|
className={`map_content_container__content ${(!currentPort || (currentPort === "00003" && !currentBranchOffice)) ? "port" : "branch_office"}`}
|
||||||
|
style={{ left: 35 }}
|
||||||
|
>
|
||||||
{!currentPort && <IndexInfo />}
|
{!currentPort && <IndexInfo />}
|
||||||
{(currentPort === "00003" && !currentBranchOffice) && renderPortContent()}
|
{(currentPort === "00003" && !currentBranchOffice) && renderPortContent()}
|
||||||
{currentBranchOffice && renderBranchOfficeContent()}
|
{currentBranchOffice && renderBranchOfficeContentLeft()}
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
|
{!collapseRight && (
|
||||||
|
<div
|
||||||
|
className={`map_content_container__content ${(!currentPort || (currentPort === "00003" && !currentBranchOffice)) ? "port" : "branch_office"}`}
|
||||||
|
style={{ right: 35 }}
|
||||||
|
>
|
||||||
|
{currentBranchOffice && renderBranchOfficeContentRight()}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderCollapseMenu = () => {
|
const renderCollapseMenu = () => {
|
||||||
if (pureMap)
|
if (pureMap)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (currentPort === "00003" && !currentBranchOffice) {
|
if (currentPort === "00003" && !currentBranchOffice) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`collapse_menu port ${collapse ? "active" : ""}`}
|
className={`collapse_menu port left ${collapseLeft ? "active" : ""}`}
|
||||||
style={{ backgroundImage: `url(${collapseMenuBg1})` }}
|
style={{ backgroundImage: `url(${collapseMenuBg1})` }}
|
||||||
onClick={onChangeCollapse}
|
onClick={() => {
|
||||||
|
setCollapseLeft(!collapseLeft);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<img src={collapseMenuImg1} alt="" />
|
<img src={collapseMenuImg1} alt="" />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentBranchOffice) {
|
if (currentBranchOffice) {
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
<div
|
<div
|
||||||
className={`collapse_menu branch_office ${collapse ? "active" : ""}`}
|
className={`collapse_menu branch_office left ${collapseLeft ? "active" : ""}`}
|
||||||
style={{ backgroundImage: `url(${collapseMenuBg2})` }}
|
style={{ backgroundImage: `url(${collapseMenuBg2})` }}
|
||||||
onClick={onChangeCollapse}
|
onClick={() => {
|
||||||
|
setCollapseLeft(!collapseLeft);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<img src={collapseMenuImg2} alt="" />
|
<img src={collapseMenuImg2} alt="" />
|
||||||
</div>
|
</div>
|
||||||
|
{bottomUtilsCurrentIndex === -1 && (
|
||||||
|
<div
|
||||||
|
className={`collapse_menu branch_office right ${collapseRight ? "active" : ""}`}
|
||||||
|
style={{ backgroundImage: `url(${collapseMenuBg2})` }}
|
||||||
|
onClick={() => {
|
||||||
|
setCollapseRight(!collapseRight);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<img src={collapseMenuImg2} alt="" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="map_content_container">
|
<div className="map_content_container">
|
||||||
<SwitchTransition>
|
|
||||||
<CSSTransition
|
|
||||||
timeout={500}
|
|
||||||
classNames={{
|
|
||||||
enter: "animate__animated animate__faster",
|
|
||||||
enterActive: "animate__animated animate__faster animate__fadeInLeft",
|
|
||||||
exit: "animate__animated animate__faster",
|
|
||||||
exitActive: "animate__animated animate__faster animate__fadeOutLeft",
|
|
||||||
}}
|
|
||||||
unmountOnExit
|
|
||||||
key={animationKey}
|
|
||||||
>
|
|
||||||
<div>
|
|
||||||
{renderContent()}
|
{renderContent()}
|
||||||
{renderCollapseMenu()}
|
{renderCollapseMenu()}
|
||||||
</div>
|
</div>
|
||||||
</CSSTransition>
|
|
||||||
</SwitchTransition>
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,4 @@
|
||||||
.map_content_container {
|
.map_content_container {
|
||||||
&__content {
|
|
||||||
width: 430px;
|
|
||||||
position: absolute;
|
|
||||||
left: 35px;
|
|
||||||
|
|
||||||
&.port{
|
|
||||||
top: 75px;
|
|
||||||
max-height: calc(100vh - 75px);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.branch_office{
|
|
||||||
top: 70px;
|
|
||||||
max-height: calc(100vh - 70px);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 定义循环混合宏
|
// 定义循环混合宏
|
||||||
.loop (@i: 1) when (@i <= 5) {
|
.loop (@i: 1) when (@i <= 5) {
|
||||||
.line-@{i} {
|
.line-@{i} {
|
||||||
|
|
@ -40,16 +25,32 @@
|
||||||
|
|
||||||
// 执行循环
|
// 执行循环
|
||||||
.loop();
|
.loop();
|
||||||
|
|
||||||
|
&__content {
|
||||||
|
width: 430px;
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
&.port {
|
||||||
|
top: 75px;
|
||||||
|
max-height: calc(100vh - 75px);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.branch_office {
|
||||||
|
top: 70px;
|
||||||
|
max-height: calc(100vh - 70px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.collapse_menu {
|
.collapse_menu {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 465px;
|
|
||||||
top: calc(50vh - 44.5px);
|
top: calc(50vh - 44.5px);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
&.left {
|
||||||
|
left: 465px;
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
||||||
|
|
@ -69,7 +70,7 @@
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 89px;
|
height: 89px;
|
||||||
|
|
||||||
.img {
|
img {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 17px;
|
height: 17px;
|
||||||
}
|
}
|
||||||
|
|
@ -79,10 +80,52 @@
|
||||||
width: 33px;
|
width: 33px;
|
||||||
height: 116px;
|
height: 116px;
|
||||||
|
|
||||||
.img {
|
img {
|
||||||
width: 13px;
|
width: 13px;
|
||||||
height: 34px;
|
height: 34px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.right {
|
||||||
|
right: 465px;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
img {
|
||||||
|
transform: translate(-50%, -50%) rotate(180deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-50%, -50%) rotate(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.port {
|
||||||
|
width: 30px;
|
||||||
|
height: 89px;
|
||||||
|
transform: rotate(180deg);
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 10px;
|
||||||
|
height: 17px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.branch_office {
|
||||||
|
width: 33px;
|
||||||
|
height: 116px;
|
||||||
|
transform: rotate(180deg);
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 13px;
|
||||||
|
height: 34px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
import { CSSTransition, SwitchTransition } from "react-transition-group";
|
|
||||||
import backImg1 from "~/assets/images/map_bi/back1.png";
|
import backImg1 from "~/assets/images/map_bi/back1.png";
|
||||||
import backImg2 from "~/assets/images/map_bi/back2.png";
|
import backImg2 from "~/assets/images/map_bi/back2.png";
|
||||||
import guangImg from "~/assets/images/map_bi/guang.png";
|
import guangImg from "~/assets/images/map_bi/guang.png";
|
||||||
|
|
@ -8,8 +7,6 @@ import topImg2 from "~/assets/images/map_bi/top2.png";
|
||||||
import { Context } from "~/pages/Container/Map/js/context";
|
import { Context } from "~/pages/Container/Map/js/context";
|
||||||
import mitt from "~/pages/Container/Map/js/mitt";
|
import mitt from "~/pages/Container/Map/js/mitt";
|
||||||
import {
|
import {
|
||||||
changeBottomUtilsAnimationMittKey,
|
|
||||||
changeContentAnimationKeyMittKey,
|
|
||||||
changePeopleTrajectorySelectVisibleMittKey,
|
changePeopleTrajectorySelectVisibleMittKey,
|
||||||
clickBackMittKey,
|
clickBackMittKey,
|
||||||
clickBranchOfficePointMittKey,
|
clickBranchOfficePointMittKey,
|
||||||
|
|
@ -54,28 +51,14 @@ function Header(props) {
|
||||||
mapMethods.current.flyTo();
|
mapMethods.current.flyTo();
|
||||||
mapMethods.current.addPortPoint();
|
mapMethods.current.addPortPoint();
|
||||||
}
|
}
|
||||||
mitt.emit(changeBottomUtilsAnimationMittKey);
|
|
||||||
mitt.emit(resetBottomCurrentIndexMittKey);
|
mitt.emit(resetBottomCurrentIndexMittKey);
|
||||||
mitt.emit(resetAllBottomUtilsCheckMittKey);
|
mitt.emit(resetAllBottomUtilsCheckMittKey);
|
||||||
mitt.emit(clickBackMittKey);
|
mitt.emit(clickBackMittKey);
|
||||||
mitt.emit(changeContentAnimationKeyMittKey);
|
|
||||||
mitt.emit(changePeopleTrajectorySelectVisibleMittKey, false);
|
mitt.emit(changePeopleTrajectorySelectVisibleMittKey, false);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="map_content_header_container">
|
<div className="map_content_header_container">
|
||||||
<SwitchTransition>
|
|
||||||
<CSSTransition
|
|
||||||
timeout={1000}
|
|
||||||
classNames={{
|
|
||||||
enter: "animate__animated",
|
|
||||||
enterActive: "animate__animated animate__fadeInDown",
|
|
||||||
exit: "animate__animated",
|
|
||||||
exitActive: "animate__animated animate__fadeOutUp",
|
|
||||||
}}
|
|
||||||
unmountOnExit
|
|
||||||
key={currentBranchOffice || 1}
|
|
||||||
>
|
|
||||||
<header
|
<header
|
||||||
className={`${props.headerTitle === "秦港股份安全监管平台" ? "port" : "branch_office"}`}
|
className={`${props.headerTitle === "秦港股份安全监管平台" ? "port" : "branch_office"}`}
|
||||||
style={{ backgroundImage: `url(${props.headerTitle === "秦港股份安全监管平台" ? topImg1 : topImg2})` }}
|
style={{ backgroundImage: `url(${props.headerTitle === "秦港股份安全监管平台" ? topImg1 : topImg2})` }}
|
||||||
|
|
@ -96,8 +79,6 @@ function Header(props) {
|
||||||
<div className="title">{props.headerTitle}</div>
|
<div className="title">{props.headerTitle}</div>
|
||||||
<div style={{ backgroundImage: `url(${guangImg})` }} className="guang" />
|
<div style={{ backgroundImage: `url(${guangImg})` }} className="guang" />
|
||||||
</header>
|
</header>
|
||||||
</CSSTransition>
|
|
||||||
</SwitchTransition>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,11 @@
|
||||||
import { message } from "antd";
|
import { message } from "antd";
|
||||||
import { useContext, useEffect, useState } from "react";
|
import { useContext, useEffect, useState } from "react";
|
||||||
import { CSSTransition, SwitchTransition } from "react-transition-group";
|
|
||||||
import tooltipImg2 from "~/assets/images/map_bi/right_utils/branch_office/bg11.png";
|
import tooltipImg2 from "~/assets/images/map_bi/right_utils/branch_office/bg11.png";
|
||||||
import buttonBg from "~/assets/images/map_bi/right_utils/branch_office/button.png";
|
import buttonBg from "~/assets/images/map_bi/right_utils/branch_office/button.png";
|
||||||
import tooltipImg1 from "~/assets/images/map_bi/right_utils/port/tooltip.png";
|
import tooltipImg1 from "~/assets/images/map_bi/right_utils/port/tooltip.png";
|
||||||
import { Context } from "~/pages/Container/Map/js/context";
|
import { Context } from "~/pages/Container/Map/js/context";
|
||||||
import mitt from "~/pages/Container/Map/js/mitt";
|
import mitt from "~/pages/Container/Map/js/mitt";
|
||||||
import {
|
import {
|
||||||
changeBottomUtilsAnimationMittKey,
|
|
||||||
changeContentAnimationKeyMittKey,
|
|
||||||
changePeopleTrajectorySelectVisibleMittKey,
|
changePeopleTrajectorySelectVisibleMittKey,
|
||||||
clickBackMittKey,
|
clickBackMittKey,
|
||||||
clickMarkPointMittKey,
|
clickMarkPointMittKey,
|
||||||
|
|
@ -21,7 +18,7 @@ import { portUtilsList } from "./portUtilsList";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
function RightUtils(props) {
|
function RightUtils(props) {
|
||||||
const { currentPort, mapMethods, pureMap, currentBranchOffice } = useContext(Context);
|
const { currentPort, mapMethods, pureMap, currentBranchOffice, bottomUtilsCurrentIndex } = useContext(Context);
|
||||||
|
|
||||||
const [list, setList] = useState(portUtilsList);
|
const [list, setList] = useState(portUtilsList);
|
||||||
const [isShowChildLevel, setIsShowChildLevel] = useState(true);
|
const [isShowChildLevel, setIsShowChildLevel] = useState(true);
|
||||||
|
|
@ -80,8 +77,6 @@ function RightUtils(props) {
|
||||||
break;
|
break;
|
||||||
case "pureMap":
|
case "pureMap":
|
||||||
props.setPureMap(!pureMap);
|
props.setPureMap(!pureMap);
|
||||||
mitt.emit(changeBottomUtilsAnimationMittKey);
|
|
||||||
mitt.emit(changeContentAnimationKeyMittKey);
|
|
||||||
break;
|
break;
|
||||||
case "weather":
|
case "weather":
|
||||||
mitt.emit(clickMarkPointMittKey, {
|
mitt.emit(clickMarkPointMittKey, {
|
||||||
|
|
@ -139,17 +134,7 @@ function RightUtils(props) {
|
||||||
const renderBranchOfficeUtils = () => {
|
const renderBranchOfficeUtils = () => {
|
||||||
return (
|
return (
|
||||||
<div className="right_utils branch_office">
|
<div className="right_utils branch_office">
|
||||||
<CSSTransition
|
{(isShowChildLevel && bottomUtilsCurrentIndex !== -1) && (
|
||||||
in={isShowChildLevel}
|
|
||||||
timeout={500}
|
|
||||||
classNames={{
|
|
||||||
enter: "animate__animated",
|
|
||||||
enterActive: "animate__animated animate__fadeInUp",
|
|
||||||
exit: "animate__animated",
|
|
||||||
exitActive: "animate__animated animate__fadeOutDown",
|
|
||||||
}}
|
|
||||||
unmountOnExit
|
|
||||||
>
|
|
||||||
<div className="options">
|
<div className="options">
|
||||||
{
|
{
|
||||||
list.map((item, index) => (
|
list.map((item, index) => (
|
||||||
|
|
@ -164,34 +149,22 @@ function RightUtils(props) {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</CSSTransition>
|
)}
|
||||||
|
{bottomUtilsCurrentIndex !== -1 && (
|
||||||
<div
|
<div
|
||||||
className={`bg ${isShowChildLevel ? "active" : ""}`}
|
className={`bg ${isShowChildLevel ? "active" : ""}`}
|
||||||
onClick={() => setIsShowChildLevel(!isShowChildLevel)}
|
onClick={() => setIsShowChildLevel(!isShowChildLevel)}
|
||||||
>
|
>
|
||||||
<img src={buttonBg} alt="" />
|
<img src={buttonBg} alt="" />
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="map_content_right_utils_container">
|
<div className="map_content_right_utils_container">
|
||||||
<SwitchTransition>
|
|
||||||
<CSSTransition
|
|
||||||
timeout={1000}
|
|
||||||
classNames={{
|
|
||||||
enter: "animate__animated",
|
|
||||||
enterActive: `animate__animated ${!currentBranchOffice ? "animate__fadeInRight" : "animate__fadeInUp"}`,
|
|
||||||
exit: "animate__animated",
|
|
||||||
exitActive: `animate__animated ${!currentBranchOffice ? "animate__fadeOutRight" : "animate__fadeOutDown"}`,
|
|
||||||
}}
|
|
||||||
unmountOnExit
|
|
||||||
key={currentBranchOffice || 1}
|
|
||||||
>
|
|
||||||
{!currentBranchOffice ? renderPortUtils() : renderBranchOfficeUtils()}
|
{!currentBranchOffice ? renderPortUtils() : renderBranchOfficeUtils()}
|
||||||
</CSSTransition>
|
|
||||||
</SwitchTransition>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,6 @@ export const clickBranchOfficePointMittKey = "clickBranchOfficePoint";
|
||||||
export const clickMarkPointMittKey = "clickMarkPoint";
|
export const clickMarkPointMittKey = "clickMarkPoint";
|
||||||
// 点击左上角返回
|
// 点击左上角返回
|
||||||
export const clickBackMittKey = "clickBack";
|
export const clickBackMittKey = "clickBack";
|
||||||
// 重新执行底部工具栏动画
|
|
||||||
export const changeBottomUtilsAnimationMittKey = "changeBottomUtilsAnimation";
|
|
||||||
// 重置底部工具栏当前索引
|
// 重置底部工具栏当前索引
|
||||||
export const resetBottomCurrentIndexMittKey = "resetBottomCurrentIndex";
|
export const resetBottomCurrentIndexMittKey = "resetBottomCurrentIndex";
|
||||||
// 重置所有底部工具栏选中状态
|
// 重置所有底部工具栏选中状态
|
||||||
|
|
@ -16,8 +14,6 @@ export const resetAllBottomUtilsCheckMittKey = "resetAllBottomUtilsCheck";
|
||||||
export const initBottomUtilsMittKey = "initBottomUtils";
|
export const initBottomUtilsMittKey = "initBottomUtils";
|
||||||
// 改变覆盖蒙版显隐
|
// 改变覆盖蒙版显隐
|
||||||
export const changeCoverMaskVisibleMittKey = "changeCoverMaskVisible";
|
export const changeCoverMaskVisibleMittKey = "changeCoverMaskVisible";
|
||||||
// 改变内容动画显隐
|
|
||||||
export const changeContentAnimationKeyMittKey = "changeContentAnimationKey";
|
|
||||||
// 改变人员轨迹选择窗口显隐
|
// 改变人员轨迹选择窗口显隐
|
||||||
export const changePeopleTrajectorySelectVisibleMittKey = "changePeopleTrajectorySelectVisible";
|
export const changePeopleTrajectorySelectVisibleMittKey = "changePeopleTrajectorySelectVisible";
|
||||||
// 将人员定位列表提供给人员轨迹选择窗口
|
// 将人员定位列表提供给人员轨迹选择窗口
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@ import PopupInfo from "../components/popup/js/PopupInfo";
|
||||||
import { getPosition } from "./mapUtils";
|
import { getPosition } from "./mapUtils";
|
||||||
import mitt from "./mitt";
|
import mitt from "./mitt";
|
||||||
import {
|
import {
|
||||||
changeBottomUtilsAnimationMittKey,
|
|
||||||
changeContentAnimationKeyMittKey,
|
|
||||||
clickBranchOfficePointMittKey,
|
clickBranchOfficePointMittKey,
|
||||||
clickMarkPointMittKey,
|
clickMarkPointMittKey,
|
||||||
clickPortPointMittKey,
|
clickPortPointMittKey,
|
||||||
|
|
@ -87,10 +85,8 @@ export default class PointClickEvent {
|
||||||
sessionStorage.setItem("mapCurrentBranchOfficeId", data.corpinfoId);
|
sessionStorage.setItem("mapCurrentBranchOfficeId", data.corpinfoId);
|
||||||
}
|
}
|
||||||
}, 2000);
|
}, 2000);
|
||||||
mitt.emit(changeBottomUtilsAnimationMittKey);
|
|
||||||
mitt.emit(resetBottomCurrentIndexMittKey);
|
mitt.emit(resetBottomCurrentIndexMittKey);
|
||||||
mitt.emit(resetAllBottomUtilsCheckMittKey);
|
mitt.emit(resetAllBottomUtilsCheckMittKey);
|
||||||
mitt.emit(changeContentAnimationKeyMittKey);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 分公司点位点击
|
// 分公司点位点击
|
||||||
|
|
@ -123,10 +119,8 @@ export default class PointClickEvent {
|
||||||
mitt.emit(deletePeoplePositionPointMittKey);
|
mitt.emit(deletePeoplePositionPointMittKey);
|
||||||
mitt.emit(clickBranchOfficePointMittKey, data);
|
mitt.emit(clickBranchOfficePointMittKey, data);
|
||||||
sessionStorage.setItem("mapCurrentBranchOfficeId", data.corpinfoId);
|
sessionStorage.setItem("mapCurrentBranchOfficeId", data.corpinfoId);
|
||||||
mitt.emit(changeBottomUtilsAnimationMittKey);
|
|
||||||
mitt.emit(resetBottomCurrentIndexMittKey);
|
mitt.emit(resetBottomCurrentIndexMittKey);
|
||||||
mitt.emit(resetAllBottomUtilsCheckMittKey);
|
mitt.emit(resetAllBottomUtilsCheckMittKey);
|
||||||
mitt.emit(changeContentAnimationKeyMittKey);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 标记点位点击
|
// 标记点位点击
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue