From e72b2b72a178da9f7657e588c28ec8521d1ec2e3 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 02 三月 2024 09:27:32 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/components/edit.jsx | 22 ++++++++++++++++++++++
zy-asrs-flow/src/pages/map/index.jsx | 23 +++++++++++++++++++----
2 files changed, 41 insertions(+), 4 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/components/edit.jsx b/zy-asrs-flow/src/pages/map/components/edit.jsx
new file mode 100644
index 0000000..acc2a69
--- /dev/null
+++ b/zy-asrs-flow/src/pages/map/components/edit.jsx
@@ -0,0 +1,22 @@
+import React, { useState, useRef, useEffect } from 'react';
+import { Col, Form, Modal, Row, Checkbox, Skeleton, Tree, Drawer, Space, Button, Card } from 'antd';
+
+const Edit = (props) => {
+
+ return (
+ <>
+ <Drawer
+ open={props.open}
+ onClose={() => {
+ props.onCancel();
+ }}
+ >
+ <Card>
+
+ </Card>
+ </Drawer>
+ </>
+ )
+}
+
+export default Edit;
\ No newline at end of file
diff --git a/zy-asrs-flow/src/pages/map/index.jsx b/zy-asrs-flow/src/pages/map/index.jsx
index 8a60fb8..abfbe68 100644
--- a/zy-asrs-flow/src/pages/map/index.jsx
+++ b/zy-asrs-flow/src/pages/map/index.jsx
@@ -5,9 +5,10 @@
const { Header, Content } = Layout;
import './index.css'
import { createStyles } from 'antd-style';
+import Edit from './components/edit'
const useStyles = createStyles(({ token }) => {
- let dark = token.colorBgBase==='#000';
+ let dark = token.colorBgBase === '#000';
return {
layout: {
// overflow: 'hidden',
@@ -35,6 +36,8 @@
const { styles } = useStyles();
const mapRef = React.useRef();
const contentRef = React.useRef();
+
+ const [editModalVisible, setEditModalVisible] = React.useState(false);
const [app, setApp] = React.useState(() => {
return new PIXI.Application({
@@ -95,19 +98,31 @@
app.renderer.resize(width, height);
}, [windowSize]);
+ const editHandle = () => {
+ setEditModalVisible(true);
+ }
+
return (
<>
<Layout className={styles.layout}>
<Header className={styles.header}>
<Flex className={styles.flex} gap={'large'} justify={'flex-end'} align={'center'}>
- <Button size={'large'}><FormattedMessage id='map.edit' defaultMessage='缂栬緫鍦板浘' /></Button>
+ <Button onClick={editHandle} size={'large'}><FormattedMessage id='map.edit' defaultMessage='缂栬緫鍦板浘' /></Button>
</Flex>
</Header>
<Content ref={contentRef} className={styles.content}>
- <div ref={mapRef}>
- </div>
+ <div ref={mapRef}></div>
</Content>
</Layout>
+
+ <Edit
+ open={editModalVisible}
+ onCancel={
+ () => {
+ setEditModalVisible(false);
+ }
+ }
+ />
</>
)
}
--
Gitblit v1.9.1