From c06ef2e9dce65aed8a3067de3898034402bc67af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=8D=9A=E6=96=87?= <1179111926@qq.com> Date: Wed, 7 Sep 2022 12:00:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .umirc.ts | 2 +- src/pages/Simulation/index.less | 9 ++ src/pages/Simulation/index.tsx | 206 +++++++++++++++++++++++----- src/styles/iconfont/demo_index.html | 81 ++++++++++- src/styles/iconfont/iconfont.css | 24 +++- src/styles/iconfont/iconfont.eot | Bin 13056 -> 13672 bytes src/styles/iconfont/iconfont.js | 130 +++++++++--------- src/styles/iconfont/iconfont.json | 21 +++ src/styles/iconfont/iconfont.svg | 6 + src/styles/iconfont/iconfont.ttf | Bin 12888 -> 13504 bytes src/styles/iconfont/iconfont.woff | Bin 8468 -> 8848 bytes src/styles/iconfont/iconfont.woff2 | Bin 7180 -> 7548 bytes 12 files changed, 367 insertions(+), 112 deletions(-) diff --git a/.umirc.ts b/.umirc.ts index bca2892..d82f5c0 100644 --- a/.umirc.ts +++ b/.umirc.ts @@ -4,7 +4,7 @@ let publicPath = process.env.NODE_ENV === 'development' ? '/' : '/react/build/'; export default defineConfig({ publicPath, - title: '管理基础设施', + title: false, nodeModulesTransform: { type: 'none', }, diff --git a/src/pages/Simulation/index.less b/src/pages/Simulation/index.less index 40748a3..0675d24 100644 --- a/src/pages/Simulation/index.less +++ b/src/pages/Simulation/index.less @@ -48,6 +48,15 @@ } } +.s0 { + flex: 0 0 50px !important; + text-align: center !important; + + > i { + cursor: pointer; + } +} + .s1 { flex: 1 !important; } diff --git a/src/pages/Simulation/index.tsx b/src/pages/Simulation/index.tsx index 588ffac..a61615d 100644 --- a/src/pages/Simulation/index.tsx +++ b/src/pages/Simulation/index.tsx @@ -1,8 +1,21 @@ import styles from './index.less'; -import { message, Input, Button, Row, Modal, Form, Tabs, Empty } from 'antd'; +import { + message, + Input, + Button, + Row, + Modal, + Form, + Table, + Empty, + Col, + Select, + DatePicker, +} from 'antd'; import Fetch from '@/utils/fetch'; import { useEffect, useState, FC, Fragment, useRef } from 'react'; import { cloneDeep } from 'lodash'; +import { ColumnsType } from 'antd/lib/table'; const testData = { id: 1, @@ -26,7 +39,7 @@ const testData = { cProgress: 0, }; -const Progress = ({ item, onFinish, start }: any) => { +const Progress = ({ item, onFinish, start, setVisible }: any) => { const [data, setData] = useState({}); const timer = useRef(null); const dataSave = useRef({}); @@ -88,6 +101,12 @@ const Progress = ({ item, onFinish, start }: any) => {
{data.deviceId}
{data.name}
+
+ setVisible(true)} + className="iconfont icon-bianji10" + /> +
{data.aText}
@@ -100,6 +119,9 @@ const Progress = ({ item, onFinish, start }: any) => {
{data.aProgress}%
+
+ +
{data.bText}
@@ -112,6 +134,9 @@ const Progress = ({ item, onFinish, start }: any) => {
{data.bProgress}%
+
+ +
{data.cText}
@@ -124,6 +149,9 @@ const Progress = ({ item, onFinish, start }: any) => {
{data.cProgress}%
+
+ +
); @@ -134,10 +162,16 @@ const Page = () => { const [disabled, setDisabled] = useState(false); const [start, setStart] = useState(false); const [loading, setLoading] = useState(false); + + const [visible, setVisible] = useState(false); + const [modalData, setModalData] = useState([]); + const [modalSelectKey, setModalSelectKey] = useState([]); + const resizeBar = useRef(null); const resizeBox = useRef(null); const iframeBox = useRef(null); const dataSave = useRef([]); + const [form] = Form.useForm(); console.log(data, 'data'); @@ -154,7 +188,7 @@ const Page = () => { const getData = (e: any) => { if (e.origin === 'https://edu-xnfz.educoder.net') { - // alert(e.data) + console.log(e.data, 22222); let newData: any = []; try { if (e.data) { @@ -284,6 +318,40 @@ const Page = () => { } }; + const handleModalFinish = async (v: any) => { + console.log(v, 222); + }; + + const getModalData = async (p: any) => {}; + + const columns: ColumnsType = [ + { + width: 120, + title: '编号', + align: 'center', + dataIndex: 'index', + }, + { + title: '设备物理标识', + dataIndex: 'number', + }, + { + title: '注册时间', + dataIndex: 'beginTime', + }, + { + width: 120, + title: '状态', + dataIndex: 'status', + render: (v: any, r: any) => + v === '1' ? ( + 已同步 + ) : ( + 未同步 + ), + }, + ]; + return (