luxiaotao1123
2024-04-07 9e2e9f912340b806e32593689a408f477e0a1516
zy-asrs-flow/src/pages/map/index.jsx
@@ -8,13 +8,13 @@
    FileAddOutlined,
    CompressOutlined,
    SettingOutlined,
    CloseOutlined
} from '@ant-design/icons';
import './index.css'
import { createStyles } from 'antd-style';
import Edit from './components/device';
import Settings from './components/settings'
import * as Utils from './utils'
import WebSocketClient from './websocket'
import Player from './player';
import MapSearch from './header/search';
import MapFloor from './header/floor';
@@ -60,7 +60,7 @@
    SETTINGS_MODEL: "3",
})
let player;
let player, websocket;
const Map = () => {
    const intl = useIntl();
@@ -102,6 +102,10 @@
            Utils.syncApp(player.app);
            Utils.syncMapContainer(player.mapContainer);
            Utils.syncNotify(notify);
            websocket = new WebSocketClient('/ws/map/websocket');
            websocket.connect();
            websocket.onMessage = Utils.updateMapStatusInRealTime;
            const handleResize = () => {
                setWindowSize({
@@ -432,6 +436,7 @@
            <MapDrawer
                open={drawerVisible}
                curSprite={curSprite}
                curFloor={curFloor}
                refCurr={mapRef.current}
                onCancel={() => {
                    setCurSPrite(null);