From 6a6bee4e9b039f54674185562de2ae96d0fe4e73 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 20 三月 2024 16:40:28 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/header/floor.jsx | 42 ++++++++++++++++++++++++++++++++++++++++++
zy-asrs-flow/src/pages/map/index.jsx | 6 +++++-
2 files changed, 47 insertions(+), 1 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/header/floor.jsx b/zy-asrs-flow/src/pages/map/header/floor.jsx
new file mode 100644
index 0000000..abba5aa
--- /dev/null
+++ b/zy-asrs-flow/src/pages/map/header/floor.jsx
@@ -0,0 +1,42 @@
+import React, { useState, useRef, useEffect } from 'react';
+import { Segmented, AutoComplete } from 'antd';
+import { FormattedMessage, useIntl } from '@umijs/max';
+import { createStyles } from 'antd-style';
+import * as Utils from '../utils'
+
+const useStyles = createStyles(({ token }) => {
+ return {
+ floorBox: {
+ position: 'absolute',
+ left: '50%',
+ top: '3%',
+ transform: 'translate(-50%, -50%)',
+ }
+ }
+})
+
+
+const MapFloor = (props) => {
+ const intl = useIntl();
+ const { styles } = useStyles();
+
+ React.useEffect(() => {
+
+ }, [props]);
+
+ return (
+ <>
+ <div className={styles.floorBox}>
+ <Segmented
+ size={'large'}
+ options={['1F', '2F', '3F', '4F', '5F']}
+ onChange={(value) => {
+ console.log(value); // string
+ }}
+ />
+ </div>
+ </>
+ )
+}
+
+export default MapFloor;
\ 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 9b94472..0d54d1e 100644
--- a/zy-asrs-flow/src/pages/map/index.jsx
+++ b/zy-asrs-flow/src/pages/map/index.jsx
@@ -1,7 +1,7 @@
import * as React from 'react'
import * as PIXI from 'pixi.js';
import { FormattedMessage, useIntl, useModel } from '@umijs/max';
-import { Layout, Button, Flex, Row, Col, FloatButton, Select, notification } from 'antd';
+import { Layout, Button, Flex, Row, Col, FloatButton, Select, notification, Segmented } from 'antd';
const { Header, Content } = Layout;
import {
AppstoreAddOutlined,
@@ -17,6 +17,7 @@
import * as Utils from './utils'
import Player from './player';
import MapSearch from './header/search';
+import MapFloor from './header/floor';
import MapDrawer from './drawer';
const useStyles = createStyles(({ token }) => {
@@ -341,6 +342,9 @@
</Header>
<Content ref={contentRef} className={styles.content}>
<div ref={mapRef} style={{ position: "relative" }} >
+ <MapFloor
+
+ />
<FloatButton.Group
shape="square"
style={{
--
Gitblit v1.9.1