#
luxiaotao1123
2024-03-20 6a6bee4e9b039f54674185562de2ae96d0fe4e73
#
1个文件已修改
1个文件已添加
48 ■■■■■ 已修改文件
zy-asrs-flow/src/pages/map/header/floor.jsx 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/header/floor.jsx
New file
@@ -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;
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={{