From 117523a7ddb8acc98771d5d2af3919fd41ee1a2e Mon Sep 17 00:00:00 2001 From: Aifeilong <2993607249@qq.com> Date: Wed, 11 Oct 2023 14:35:52 +0800 Subject: [PATCH] fix --- package.json | 1 + src/components/domain/Five/FormPanel.jsx | 43 ++++++++++++++++++- .../Entities => domain/Two}/Site/HeatFlux.jsx | 0 .../Entities => domain/Two}/Site/Rain.jsx | 0 .../Entities => domain/Two}/Site/Site.jsx | 0 .../Entities => domain/Two}/Site/index.jsx | 7 +-- src/components/domain/Two/index.jsx | 2 + src/components/home/Layout/NavBar.jsx | 15 ++++++- src/components/home/Layout/NavBarButton.jsx | 10 ++++- src/components/home/Layout/index.module.less | 21 ++++++--- yarn.lock | 3 +- 11 files changed, 85 insertions(+), 17 deletions(-) rename src/components/{map/Layout/Entities => domain/Two}/Site/HeatFlux.jsx (100%) rename src/components/{map/Layout/Entities => domain/Two}/Site/Rain.jsx (100%) rename src/components/{map/Layout/Entities => domain/Two}/Site/Site.jsx (100%) rename src/components/{map/Layout/Entities => domain/Two}/Site/index.jsx (83%) diff --git a/package.json b/package.json index 88ef6aa..e46bd9e 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "echarts": "^5.0.2", "echarts-for-react": "^3.0.2", "lodash-es": "^4.17.21", + "moment": "^2.29.4", "node-polyfill-webpack-plugin": "^2.0.1", "react": "^18.2.0", "react-custom-scrollbars-2": "^4.5.0", diff --git a/src/components/domain/Five/FormPanel.jsx b/src/components/domain/Five/FormPanel.jsx index 9fb1726..bd0f63e 100644 --- a/src/components/domain/Five/FormPanel.jsx +++ b/src/components/domain/Five/FormPanel.jsx @@ -1,4 +1,7 @@ -import { Button, Form, Select } from "antd"; +import { Button, DatePicker, Form, Select } from "antd"; +import moment from "moment"; + +const { RangePicker } = DatePicker; const layout = { labelCol: { span: 6 }, @@ -53,6 +56,19 @@ const options = [ value: item, })); +let timeOptions = []; +for (let index = 1861; index < 2004; index++) { + timeOptions.push({ + item: index, + value: index, + }); +} + +const dataOptions = ["表面温度", "表面向上感热通量"].map((item) => ({ + label: item, + value: item, +})); + export default function FormPanel({ setShow }) { const [form] = Form.useForm(); @@ -104,6 +120,8 @@ export default function FormPanel({ setShow }) { "SAM0-UNICON", "TaiESM1", ], + time: [moment("1861", "YYYY"), moment("2004", "YYYY")], + data: ["表面温度", "表面向上感热通量"], }} onFinish={(values) => { setShow(true); @@ -121,6 +139,29 @@ export default function FormPanel({ setShow }) { options={options} /> + + + + +