From 20f2a8fa812f232692c41e058fc840bb71c6cfa7 Mon Sep 17 00:00:00 2001 From: Aifeilong <2993607249@qq.com> Date: Mon, 16 Oct 2023 17:24:22 +0800 Subject: [PATCH] fix --- src/App.js | 9 +- .../ClimateReconDataAssim/FormPanel.jsx | 75 ++++++++++ .../ClimateReconDataAssim/Legend.jsx | 36 +++++ .../ClimateReconDataAssim/index.jsx | 19 +++ .../ClimateReconDataAssim/index.module.less | 98 +++++++++++++ src/components/common/CustomToolbar/index.jsx | 60 ++++++++ .../domain/Six/SceneOne/ChartPanel.jsx | 138 ++++++++++++++++++ src/components/domain/Six/SceneOne/Legend.jsx | 48 ++++++ .../domain/Six/SceneOne/ViewerOne.jsx | 24 +++ .../domain/Six/SceneOne/ViewerThree.jsx | 21 +++ .../domain/Six/SceneOne/ViewerTwo.jsx | 21 +++ src/components/domain/Six/SceneOne/index.jsx | 33 +++++ .../domain/Six/SceneOne/index.module.less | 136 +++++++++++++++++ src/components/domain/Six/SceneSwitch.jsx | 15 ++ src/components/domain/Six/SceneTwo/index.jsx | 12 ++ .../domain/Six/SceneTwo/index.module.less | 3 + src/components/domain/Six/index.jsx | 19 +++ src/components/domain/Six/index.module.less | 10 ++ src/components/domain/Two/index.jsx | 1 - src/components/home/Layout/NavBar.jsx | 2 +- src/components/home/Layout/index.module.less | 3 +- 21 files changed, 779 insertions(+), 4 deletions(-) create mode 100644 src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/FormPanel.jsx create mode 100644 src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/Legend.jsx create mode 100644 src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/index.jsx create mode 100644 src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/index.module.less create mode 100644 src/components/domain/Six/SceneOne/ChartPanel.jsx create mode 100644 src/components/domain/Six/SceneOne/Legend.jsx create mode 100644 src/components/domain/Six/SceneOne/ViewerOne.jsx create mode 100644 src/components/domain/Six/SceneOne/ViewerThree.jsx create mode 100644 src/components/domain/Six/SceneOne/ViewerTwo.jsx create mode 100644 src/components/domain/Six/SceneOne/index.jsx create mode 100644 src/components/domain/Six/SceneOne/index.module.less create mode 100644 src/components/domain/Six/SceneSwitch.jsx create mode 100644 src/components/domain/Six/SceneTwo/index.jsx create mode 100644 src/components/domain/Six/SceneTwo/index.module.less create mode 100644 src/components/domain/Six/index.jsx create mode 100644 src/components/domain/Six/index.module.less diff --git a/src/App.js b/src/App.js index 5b02128..4662e65 100644 --- a/src/App.js +++ b/src/App.js @@ -4,7 +4,9 @@ import DomainOne from "@/components/domain/One"; import DomainTwo from "@/components/domain/Two"; import DomainThree from "@/components/domain/Three"; import DomainFour from "@/components/domain/Four"; -import DomainFive from "./components/domain/Five"; +import DomainFive from "@/components/domain/Five"; +import DomainSix from "@/components/domain/Six"; +import ClimateReconDataAssim from "@/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim"; import "./App.less"; function App() { @@ -16,6 +18,11 @@ function App() { }> }> }> + }> + } + > } /> ); diff --git a/src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/FormPanel.jsx b/src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/FormPanel.jsx new file mode 100644 index 0000000..63e4bea --- /dev/null +++ b/src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/FormPanel.jsx @@ -0,0 +1,75 @@ +import { Button, Form, Input, InputNumber, Select } from "antd"; + +const layout = { + labelCol: { span: 10 }, + wrapperCol: { span: 12 }, +}; +const tailLayout = { + wrapperCol: { offset: 10, span: 14 }, +}; + +export default function FormPanel({ setShow }) { + const [form] = Form.useForm(); + + return ( +
+
{ + // 根据values生成charts + // setShow(true); + }} + > + + + + + + + + + + + + + + + +
+
+ ); +} diff --git a/src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/Legend.jsx b/src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/Legend.jsx new file mode 100644 index 0000000..931bc5e --- /dev/null +++ b/src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/Legend.jsx @@ -0,0 +1,36 @@ +import styles from "./index.module.less"; + +// const colorBar = [ +// #830000 +// #000083 +// ]; + +function Legend({ style }) { + return ( +
+
Temperature anomaly(℃)
+
+
+ {[-1, -0.5, 0, 0.5, 1].map((item, index) => { + return ( +
+ {item} +
+ ); + })} +
+
+ ); +} + +export default Legend; diff --git a/src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/index.jsx b/src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/index.jsx new file mode 100644 index 0000000..bfc7e19 --- /dev/null +++ b/src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/index.jsx @@ -0,0 +1,19 @@ +import MapLayout from "@/components/map/Layout"; +import FormPanel from "./FormPanel"; +import styles from "./index.module.less"; +import Legend from "./Legend"; + +function ClimateReconDataAssim() { + return ( +
+ +
+ +
+ +
+
+ ); +} + +export default ClimateReconDataAssim; diff --git a/src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/index.module.less b/src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/index.module.less new file mode 100644 index 0000000..ee393a2 --- /dev/null +++ b/src/components/catalog/IntegrationAndOnlineCalc/ClimateReconDataAssim/index.module.less @@ -0,0 +1,98 @@ +.climateReconDataAssim :global { + .formPanel { + position: absolute; + top: 84px; + right: 12px; + width: 450px; + background-color: #000000e7; + + .form-panel { + width: 100%; + height: 100%; + pointer-events: auto; + padding: 12px; + border: 1px solid #04fbfd; + color: #02f9ff !important; + background-color: #000000e7; + border-radius: 8px; + + .ant-form-item-label { + label { + color: white; + } + } + + .ant-form-item-control { + .ant-select-multiple { + max-height: 300px; + overflow-y: scroll; + + &::-webkit-scrollbar { + width: 6px; + height: 1px; + } + &::-webkit-scrollbar-thumb { + border-radius: 6px; + background: #00a2a2; + } + &::-webkit-scrollbar-track { + border-radius: 6px; + background: none; + } + } + } + } + } +} + +.legend :global { + position: absolute; + bottom: 14px; + width: 50%; + left: 25%; + z-index: 1000; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + background-color: #000000e7; + border: 1px solid #04fbfd; + border-radius: 8px; + padding: 8px; + + .legend-title { + color: #04fbfd; + } + + .colorbar { + width: 100%; + height: 14px; + display: flex; + margin: 8px 0; + + .colorbar-item { + flex: 1; + height: 100%; + border: 1px black solid; + + &:not(:nth-child(1)) { + border-left: none; + } + } + } + + .legend-text { + display: flex; + justify-content: space-evenly; + width: 100%; + height: 20px; + + .legend-text-item { + flex: 1; + text-align: right; + font-weight: 600; + color: white; + -webkit-text-stroke: #04fbfd 1px; + } + } +} diff --git a/src/components/common/CustomToolbar/index.jsx b/src/components/common/CustomToolbar/index.jsx index a820c8b..10d7275 100644 --- a/src/components/common/CustomToolbar/index.jsx +++ b/src/components/common/CustomToolbar/index.jsx @@ -17,6 +17,56 @@ function CustomToolbar() { }, key: "/", }, + { + label: "数据集成和共享", + title: "数据集成和共享", + value: "/map/", + icon: , + onClick: () => { + navigate("/", { replace: true }); + }, + // key: "/ ", + }, + { + label: "随机森林方法在线计算案例", + title: "随机森林方法在线计算案例", + value: "/map/", + icon: , + onClick: () => { + navigate("/", { replace: true }); + }, + // key: "/ ", + }, + { + label: "过去千年气候重建数据同化", + title: "过去千年气候重建数据同化", + value: "/map/", + icon: , + onClick: () => { + navigate("/map/climateReconDataAssim", { replace: true }); + }, + key: "/map/climateReconDataAssim", + }, + { + label: "北极海冰预报", + title: "北极海冰预报", + value: "/map/", + icon: , + onClick: () => { + navigate("/", { replace: true }); + }, + // key: "/ ", + }, + { + label: "北极航线智能规划", + title: "北极航线智能规划", + value: "/map/", + icon: , + onClick: () => { + navigate("/", { replace: true }); + }, + // key: "/ ", + }, { label: "两极协同—拉布拉多海海温偏暖控制夏季高原年代际增温", title: "两极协同—拉布拉多海海温偏暖控制夏季高原年代际增温", @@ -67,6 +117,16 @@ function CustomToolbar() { }, key: "/map/5", }, + { + label: "三极冰盖/冰川表面冰雪冻融对比关联与科学认知", + title: "三极冰盖/冰川表面冰雪冻融对比关联与科学认知", + value: "/map/6", + icon: , + onClick: () => { + navigate("/map/6", { replace: true }); + }, + key: "/map/6", + }, ]; return ( diff --git a/src/components/domain/Six/SceneOne/ChartPanel.jsx b/src/components/domain/Six/SceneOne/ChartPanel.jsx new file mode 100644 index 0000000..0136df8 --- /dev/null +++ b/src/components/domain/Six/SceneOne/ChartPanel.jsx @@ -0,0 +1,138 @@ +import ReactECharts from "echarts-for-react"; + +const years = []; + +for (let year = 1961; year <= 2010; year++) { + years.push(year); +} + +// 北极 +const AntarcticaData = []; + +// 南极 +const ArcticData = []; + +// 青藏高原 +const TibetanData = []; + +function ChartPanel() { + const option = { + title: { + // text: "Stacked Line", + }, + tooltip: { + trigger: "axis", + }, + legend: { + data: ["南极", "北极", "青藏高原"], + textStyle: { color: "#04fbfd", cursor: "point" }, + }, + animationDuration: 10 * 1000, + animationEasing: "cubicInOut", + grid: { + left: "3%", + right: "4%", + bottom: "3%", + containLabel: true, + }, + // toolbox: { + // feature: { + // // 下载 + // saveAsImage: {}, + // }, + // }, + xAxis: { + type: "category", + boundaryGap: false, + data: years, + axisLine: { + onZero: false, + symbol: ["none", "arrow"], + symbolOffser: [0, 10], + lineStyle: { + color: "#04fbfd", + }, + }, + axisLabel: { + interval: 4, + }, + }, + yAxis: { + type: "value", + min: 0, + max: 1800000, + // interval: 0.5, + // splitNumber: 5, + splitLine: { show: false }, + axisLine: { + onZero: false, + show: true, + symbol: ["none", "arrow"], + symbolOffset: [0, 1], + lineStyle: { + color: "#04fbfd", + }, + }, + axisLabel: { + show: true, + interval: 300000, + }, + axisTick: { show: true }, + scale: true, + }, + dataZoom: { type: "inside", start: 0, end: 100 }, + series: [ + { + name: "北极", + type: "line", + stack: "Total", + data: AntarcticaData, + smooth: true, + color: "red", + symbol: "none", + itemStyle: { + color: "red", + }, + }, + { + name: "南极", + type: "line", + // stack: "Total", + data: ArcticData, + smooth: true, + color: "blue", + symbol: "none", + itemStyle: { + color: "blue", + }, + }, + { + name: "青藏高原", + type: "line", + // stack: "Total", + data: TibetanData, + smooth: true, + color: "green", + symbol: "none", + itemStyle: { + color: "green", + }, + }, + ], + }; + + return ( +
+ +
+ ); +} + +export default ChartPanel; diff --git a/src/components/domain/Six/SceneOne/Legend.jsx b/src/components/domain/Six/SceneOne/Legend.jsx new file mode 100644 index 0000000..a842151 --- /dev/null +++ b/src/components/domain/Six/SceneOne/Legend.jsx @@ -0,0 +1,48 @@ +const colorBar = [ + "#FB2421", + "#FF0000", + "#FF3602", + "#FF8103", + "#FFC207", + "#F8F805", + "#CEFE4C", + "#95FF8C", + "#94FF8D", + "#15FEC8", + "#0AFEFB", + "#00C3FF", + "#3D74FD", + "#4C08FF", + "#4600FF", +]; + +function Legend() { + return ( +
+
1
+
+ {[-0.8, -0.4, 0, 0.4, 0.8].map((item, index) => { + return ( +
+ {item} +
+ ); + })} +
+
+ ); +} + +export default Legend; diff --git a/src/components/domain/Six/SceneOne/ViewerOne.jsx b/src/components/domain/Six/SceneOne/ViewerOne.jsx new file mode 100644 index 0000000..cdeb5ae --- /dev/null +++ b/src/components/domain/Six/SceneOne/ViewerOne.jsx @@ -0,0 +1,24 @@ +import { Cartesian3 } from "cesium"; +import { CameraFlyTo } from "resium"; +import WavePoint from "@/components/common/WavePoint"; +import MapLayout from "@/components/map/Layout"; + +function ViewerOne() { + return ( +
+ +
+ 三极冰盖/冰川表面冰雪融化时空变化特征对比及其变化原因异同 +
+ + +
+
南极冻融天数
+
+ ); +} + +export default ViewerOne; diff --git a/src/components/domain/Six/SceneOne/ViewerThree.jsx b/src/components/domain/Six/SceneOne/ViewerThree.jsx new file mode 100644 index 0000000..aca0295 --- /dev/null +++ b/src/components/domain/Six/SceneOne/ViewerThree.jsx @@ -0,0 +1,21 @@ +import { Cartesian3 } from "cesium"; +import { CameraFlyTo } from "resium"; +import WavePoint from "@/components/common/WavePoint"; +import MapLayout from "@/components/map/Layout"; + +function ViewerThree() { + return ( +
+ + + + +
青藏高原冻融天数
+
+ ); +} + +export default ViewerThree; diff --git a/src/components/domain/Six/SceneOne/ViewerTwo.jsx b/src/components/domain/Six/SceneOne/ViewerTwo.jsx new file mode 100644 index 0000000..f10eae1 --- /dev/null +++ b/src/components/domain/Six/SceneOne/ViewerTwo.jsx @@ -0,0 +1,21 @@ +import { Cartesian3 } from "cesium"; +import { CameraFlyTo } from "resium"; +import WavePoint from "@/components/common/WavePoint"; +import MapLayout from "@/components/map/Layout"; + +function ViewerTwo() { + return ( +
+ + + + +
格陵兰岛冻融天数
+
+ ); +} + +export default ViewerTwo; diff --git a/src/components/domain/Six/SceneOne/index.jsx b/src/components/domain/Six/SceneOne/index.jsx new file mode 100644 index 0000000..34d0afb --- /dev/null +++ b/src/components/domain/Six/SceneOne/index.jsx @@ -0,0 +1,33 @@ +import TextInfoPanel from "@/components/common/TextInfoPanel"; +import ViewerOne from "./ViewerOne"; +import ViewerThree from "./ViewerThree"; +import ViewerTwo from "./ViewerTwo"; +import ChartPanel from "./ChartPanel"; +import styles from "./index.module.less"; +import Legend from "./Legend"; + +function SceneOne() { + return ( +
+
+ + + + {/* */} +
+
+
+ +
+
+ +
+
+
+ ); +} + +export default SceneOne; diff --git a/src/components/domain/Six/SceneOne/index.module.less b/src/components/domain/Six/SceneOne/index.module.less new file mode 100644 index 0000000..a3894c6 --- /dev/null +++ b/src/components/domain/Six/SceneOne/index.module.less @@ -0,0 +1,136 @@ +.sceneOne :global { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + background-color: darkslategray; + + .domain-viewers { + width: 100%; + flex: 1; + display: flex; + position: relative; + + .domain-viewer { + flex: 1; + position: relative; + + .title { + pointer-events: none; + } + + .name { + position: absolute; + bottom: 0; + left: 12px; + font-size: 18px; + color: white; + padding: 4px; + background-color: rgba(0, 0, 0, 0.5); + } + } + + .legend { + position: absolute; + bottom: 0; + left: 25%; + color: #02f9ff; + width: 50%; + } + } + + .domain-info { + flex: 1; + margin: 12px; + display: flex; + justify-content: space-between; + gap: 12px; + + .left-panel { + width: 450px; + display: flex; + flex-direction: column; + height: 100%; + + .text-info-panel { + width: 100%; + height: 100%; + padding: 12px; + border: 1px solid #04fbfd; + color: #02f9ff !important; + background-color: #000000e7; + pointer-events: auto; + font-size: 18px; + text-indent: 2em; + line-height: 1.5; + z-index: 999; + border-radius: 8px; + } + } + + .right-panel { + flex: 1; + min-width: 450px; + display: flex; + flex-direction: column; + gap: 12px; + + .top-panel { + flex: 1; + } + + .bottom-panel { + flex: 1; + } + + .form-panel { + width: 100%; + height: 100%; + pointer-events: auto; + padding: 12px; + border: 1px solid #04fbfd; + color: #02f9ff !important; + background-color: #000000e7; + border-radius: 8px; + + .ant-form-item-label { + label { + color: white; + } + } + + .ant-form-item-control { + .ant-select-multiple { + max-height: 300px; + overflow-y: scroll; + + &::-webkit-scrollbar { + width: 6px; + height: 1px; + } + &::-webkit-scrollbar-thumb { + border-radius: 6px; + background: #00a2a2; + } + &::-webkit-scrollbar-track { + border-radius: 6px; + background: none; + } + } + } + } + + .chart-info-panel { + width: 100%; + height: 100%; + pointer-events: auto; + padding: 12px; + border: 1px solid #04fbfd; + color: #02f9ff !important; + background-color: #000000e7; + transition: all 0.3s ease-in-out; + border-radius: 8px; + } + } + } +} diff --git a/src/components/domain/Six/SceneSwitch.jsx b/src/components/domain/Six/SceneSwitch.jsx new file mode 100644 index 0000000..7b29f62 --- /dev/null +++ b/src/components/domain/Six/SceneSwitch.jsx @@ -0,0 +1,15 @@ +import { Button } from "antd"; + +function SceneSwitch({ scene, setScene }) { + const switchHandler = () => { + setScene(scene === 1 ? 2 : 1); + }; + + return ( + + ); +} + +export default SceneSwitch; diff --git a/src/components/domain/Six/SceneTwo/index.jsx b/src/components/domain/Six/SceneTwo/index.jsx new file mode 100644 index 0000000..b4be93a --- /dev/null +++ b/src/components/domain/Six/SceneTwo/index.jsx @@ -0,0 +1,12 @@ +import MapLayout from "@/components/map/Layout"; +import styles from "./index.module.less"; + +function SceneTwo() { + return ( +
+ +
+ ); +} + +export default SceneTwo; diff --git a/src/components/domain/Six/SceneTwo/index.module.less b/src/components/domain/Six/SceneTwo/index.module.less new file mode 100644 index 0000000..70990f6 --- /dev/null +++ b/src/components/domain/Six/SceneTwo/index.module.less @@ -0,0 +1,3 @@ +.sceneTwo :global { + height: 100%; +} diff --git a/src/components/domain/Six/index.jsx b/src/components/domain/Six/index.jsx new file mode 100644 index 0000000..c452f74 --- /dev/null +++ b/src/components/domain/Six/index.jsx @@ -0,0 +1,19 @@ +import { useState } from "react"; +import TextInfoPanel from "@/components/common/TextInfoPanel"; +import styles from "./index.module.less"; +import SceneOne from "./SceneOne"; +import SceneTwo from "./SceneTwo"; +import SceneSwitch from "./SceneSwitch"; + +function DomainSix() { + const [scene, setScene] = useState(1); + + return ( +
+ {scene === 1 ? : } + +
+ ); +} + +export default DomainSix; diff --git a/src/components/domain/Six/index.module.less b/src/components/domain/Six/index.module.less new file mode 100644 index 0000000..e0ba772 --- /dev/null +++ b/src/components/domain/Six/index.module.less @@ -0,0 +1,10 @@ +.domainSix :global { + width: 100%; + height: 100%; + + .scene-switch { + position: absolute; + left: 8px; + top: 8px; + } +} diff --git a/src/components/domain/Two/index.jsx b/src/components/domain/Two/index.jsx index 3c850a2..3bb8874 100644 --- a/src/components/domain/Two/index.jsx +++ b/src/components/domain/Two/index.jsx @@ -16,7 +16,6 @@ import SiteLegend from "./SiteLegend"; import Labels from "./Labels"; export default function DomainTwo() { - console.log("111 :>> ", 111); return (
两极协同—南极涛动有效调节青藏高原降水和加热
diff --git a/src/components/home/Layout/NavBar.jsx b/src/components/home/Layout/NavBar.jsx index 9ebe4c8..e472b2c 100644 --- a/src/components/home/Layout/NavBar.jsx +++ b/src/components/home/Layout/NavBar.jsx @@ -25,7 +25,7 @@ function NavBar() { /> navigateHandler(1)} + onClick={() => navigateHandler("climateReconDataAssim")} />