xjj
2024-02-29 04573129a26c9baae8aba2118422fad4bda991f8
Merge remote-tracking branch 'origin/master'
2个文件已修改
1个文件已添加
52 ■■■■■ 已修改文件
zy-asrs-flow/package.json 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/index.jsx 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/services/route.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/package.json
@@ -57,12 +57,14 @@
    "lodash": "^4.17.21",
    "moment": "^2.30.1",
    "omit.js": "^2.0.2",
    "pixi.js": "^7.4.0",
    "querystring": "^0.2.1",
    "rc-menu": "^9.12.4",
    "rc-util": "^5.38.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-helmet-async": "^1.3.0"
    "react-helmet-async": "^1.3.0",
    "tweedle.js": "^2.1.0"
  },
  "devDependencies": {
    "@ant-design/pro-cli": "^3.3.0",
zy-asrs-flow/src/pages/map/index.jsx
New file
@@ -0,0 +1,38 @@
import * as React from 'react'
import * as PIXI from 'pixi.js';
import * as TWEEDLE from 'tweedle.js';
const Map = () => {
    const map = React.useRef();
    React.useEffect(() => {
        const app = new PIXI.Application({
            width: window.innerWidth,
            height: window.innerHeight,
            background: '#1099bb',
            antialias: true,
        })
        app.stage.interactive = true;
        app.stage.hitArea = app.screen;
        globalThis.__PIXI_APP__ = app;
        map.current.appendChild(app.view);
        return () => {
            app.destroy(true, true);
        }
    }, []);
    return (
        <>
            <div
                ref={map}
            >
            </div>
        </>
    )
}
export default Map;
zy-asrs-flow/src/services/route.js
@@ -62,6 +62,7 @@
            break;
        }
    }
    addMapMenu(remoteMenu);
    addHomeMenu(remoteMenu);
    addUserSettingMenu(remoteMenu);
    patchRouteItems(proLayout, remoteMenu);
@@ -107,6 +108,15 @@
    })
}
function addMapMenu(remoteMenu) {
    remoteMenu.unshift({
        name: "地图监控",
        path: "/map",
        component: "/map",
        icon: createIcon('HeatMapOutlined')
    })
}
function addUserSettingMenu(remoteMenu) {
    // const settingRoute = {
    //     name: "个人设置",