Renxy 2 gadi atpakaļ
vecāks
revīzija
785dc3595d
40 mainītis faili ar 510 papildinājumiem un 47 dzēšanām
  1. 0 4
      .husky/commit-msg
  2. 0 4
      .husky/pre-commit
  3. 2 1
      package.json
  4. 16 1
      src/Frameworks/SysRouter.ts
  5. 11 4
      src/Project/Functions/FuncMain.ts
  6. 1 1
      src/Project/Functions/Handlers/PlatformMenuHandle.ts
  7. 0 27
      src/Project/Functions/LevelAFunctions/FuncAppPlatform.ts
  8. 2 1
      src/Project/Functions/LevelAFunctions/FuncLogin.ts
  9. 26 0
      src/Project/Functions/LevelAFunctions/FuncPlatformMenu.ts
  10. 3 3
      src/Project/Os.ts
  11. BIN
      src/Project/assets/platformMenu/ICON/func-01-DirectDrinking.png
  12. BIN
      src/Project/assets/platformMenu/ICON/func-01-build-0.png
  13. BIN
      src/Project/assets/platformMenu/ICON/func-01-build-10.png
  14. BIN
      src/Project/assets/platformMenu/ICON/func-01-build-3.png
  15. BIN
      src/Project/assets/platformMenu/ICON/func-01-build-4.png
  16. BIN
      src/Project/assets/platformMenu/ICON/func-01-build.png
  17. BIN
      src/Project/assets/platformMenu/ICON/func-01-ops-BaseInfo.png
  18. BIN
      src/Project/assets/platformMenu/ICON/func-01-ops-ConfigManagement.png
  19. BIN
      src/Project/assets/platformMenu/ICON/func-01-ops-DataCenter.png
  20. BIN
      src/Project/assets/platformMenu/ICON/func-01-ops-DataView.png
  21. BIN
      src/Project/assets/platformMenu/ICON/func-01-ops-DeviceManagement.png
  22. BIN
      src/Project/assets/platformMenu/ICON/func-01-ops-EnergyManagement.png
  23. BIN
      src/Project/assets/platformMenu/ICON/func-01-ops-LimitedSpace.png
  24. BIN
      src/Project/assets/platformMenu/ICON/func-01-ops-ProManagement.png
  25. BIN
      src/Project/assets/platformMenu/ICON/func-01-ops-SecurityManagement.png
  26. BIN
      src/Project/assets/platformMenu/ICON/func-01-ops-WaterQManagement.png
  27. BIN
      src/Project/assets/platformMenu/ICON/func-01-ops.png
  28. BIN
      src/Project/assets/platformMenu/ICON/func-01-point-bom.png
  29. BIN
      src/Project/assets/platformMenu/ICON/func-06-ManDay.png
  30. BIN
      src/Project/assets/platformMenu/ICON/func-06-globalCockpit.png
  31. BIN
      src/Project/assets/platformMenu/ICON/newModel.png
  32. BIN
      src/Project/assets/platformMenu/newModel.png
  33. BIN
      src/Project/assets/platformMenu/noIcon.png
  34. 2 1
      src/Project/constants/index.ts
  35. 219 0
      src/Project/pages/PlatformMenu/index.js
  36. 46 0
      src/Project/pages/PlatformMenu/models/menu.js
  37. 165 0
      src/Project/pages/PlatformMenu/moduleMenuStyle.less
  38. 6 0
      src/Project/services/platformMenu.js
  39. 4 0
      src/Project/services/user.ts
  40. 7 0
      yarn.lock

+ 0 - 4
.husky/commit-msg

@@ -1,4 +0,0 @@
-#!/usr/bin/env sh
-. "$(dirname -- "$0")/_/husky.sh"
-
-npx --no-install max verify-commit $1

+ 0 - 4
.husky/pre-commit

@@ -1,4 +0,0 @@
-#!/usr/bin/env sh
-. "$(dirname -- "$0")/_/husky.sh"
-
-npx --no-install lint-staged --quiet

+ 2 - 1
package.json

@@ -14,7 +14,8 @@
     "@ant-design/icons": "^4.7.0",
     "@ant-design/icons": "^4.7.0",
     "@ant-design/pro-components": "^2.0.1",
     "@ant-design/pro-components": "^2.0.1",
     "@umijs/max": "^4.0.41",
     "@umijs/max": "^4.0.41",
-    "antd": "^5.0.0"
+    "antd": "^5.0.0",
+    "qs": "^6.11.0"
   },
   },
   "devDependencies": {
   "devDependencies": {
     "@types/react": "^18.0.0",
     "@types/react": "^18.0.0",

+ 16 - 1
src/Frameworks/SysRouter.ts

@@ -30,7 +30,7 @@ export const route: GT.IRouterOptions[] = [
     //@ts-ignore
     //@ts-ignore
     component: () => import('@/Project/pages/Login'),
     component: () => import('@/Project/pages/Login'),
     //@ts-ignore
     //@ts-ignore
-    models:() => import('@/Project/pages/Login/models/login'),
+    models: () => import('@/Project/pages/Login/models/login'),
     options: {
     options: {
       name: '登录页',
       name: '登录页',
       left: 0,
       left: 0,
@@ -39,6 +39,21 @@ export const route: GT.IRouterOptions[] = [
       height: '100%',
       height: '100%',
     },
     },
   },
   },
+  {
+    key: PAGE_KEY.PlatformMenu,
+    //@ts-ignore
+    component: () => import('@/Project/pages/PlatformMenu'),
+    //@ts-ignore
+    models: () => import('@/Project/pages/PlatformMenu/models/menu'),
+    options: {
+      name: '首页',
+      left: 0,
+      top: 0,
+      width: '100%',
+      height: '100%',
+      header: false,
+    },
+  },
 ];
 ];
 
 
 let Pages: { [key: string]: any } = {};
 let Pages: { [key: string]: any } = {};

+ 11 - 4
src/Project/Functions/FuncMain.ts

@@ -1,10 +1,13 @@
 import Func from '@/Engine/ECS/Function';
 import Func from '@/Engine/ECS/Function';
 import LoginHandle from './Handlers/LoginHandler';
 import LoginHandle from './Handlers/LoginHandler';
-import AppPlatformHandle from "./Handlers/AppPlatformHandle"
+import AppPlatformHandle from './Handlers/PlatformMenuHandle';
+import { PAGE_KEY } from '../constants';
+import SysPage from '@/Frameworks/SysPage';
+import PlatformMenuHandle from './Handlers/PlatformMenuHandle';
 
 
 export enum FuncMainState {
 export enum FuncMainState {
   Login, // 登录页
   Login, // 登录页
-  AppPlatform, // 平台选择
+  PlatformMenu, // 首
   ProjectSelection, // 项目选择页
   ProjectSelection, // 项目选择页
   PageMenu, // 菜单页
   PageMenu, // 菜单页
 }
 }
@@ -14,8 +17,12 @@ export default class FuncMain extends Func<FuncMainState> {
     super(name);
     super(name);
     super.initStates((sm) => {
     super.initStates((sm) => {
       sm.addState(FuncMainState.Login, new LoginHandle());
       sm.addState(FuncMainState.Login, new LoginHandle());
-      sm.addState(FuncMainState.AppPlatform, new AppPlatformHandle());
+      sm.addState(
+        FuncMainState.PlatformMenu,
+        () => window.GT_APP.funcPlatformMenu.setActive(true),
+        () => null,
+        () => window.GT_APP.funcPlatformMenu.setActive(false),
+      );
     });
     });
   }
   }
 }
 }
-

+ 1 - 1
src/Project/Functions/Handlers/AppPlatformHandle.ts → src/Project/Functions/Handlers/PlatformMenuHandle.ts

@@ -2,7 +2,7 @@ import StateHandler from '@/Engine/StateMahines/StateHandler';
 import SysPage from '@/Frameworks/SysPage';
 import SysPage from '@/Frameworks/SysPage';
 import { PAGE_KEY } from '@/Project/constants';
 import { PAGE_KEY } from '@/Project/constants';
 import { FuncMainState } from '../FuncMain';
 import { FuncMainState } from '../FuncMain';
-window.GT_APP
+
 export default class AppPlatformHandle implements StateHandler<FuncMainState> {
 export default class AppPlatformHandle implements StateHandler<FuncMainState> {
   stateIn(): void {
   stateIn(): void {
     SysPage.add(PAGE_KEY.Access);
     SysPage.add(PAGE_KEY.Access);

+ 0 - 27
src/Project/Functions/LevelAFunctions/FuncAppPlatform.ts

@@ -1,27 +0,0 @@
-import Func from "@/Engine/ECS/Function";
-export enum FuncAppPlatformState {
-  GlobalMenu,
-  ModuleMenu,
-}
-
-export default class FuncAppPlatform extends Func<FuncAppPlatformState>{
-  constructor(name: string) {
-    super(name);
-    super.initStates(sm => {
-      sm.addState(FuncAppPlatformState.GlobalMenu, this.onGlobalMenuStateIn, null, this.onGlobalMenuStateExit);
-      sm.addState(FuncAppPlatformState.ModuleMenu, this.onModuleMenuStateIn, null, this.onModuleMenuStateExit);
-    })
-  }
-  onGlobalMenuStateIn(): void {
-
-  }
-  onGlobalMenuStateExit(): void {
-
-  }
-  onModuleMenuStateIn(): void {
-
-  }
-  onModuleMenuStateExit(): void {
-
-  }
-}

+ 2 - 1
src/Project/Functions/LevelAFunctions/FuncLogin.ts

@@ -22,7 +22,8 @@ export default class FuncLogin extends Func<FuncLoginState> {
   onIdleStateIn(): void {
   onIdleStateIn(): void {
     SysPage.add(PAGE_KEY.Login, {
     SysPage.add(PAGE_KEY.Login, {
       test: 11111,
       test: 11111,
-      gotoA: () => window.GT_APP.funcMain.changeState(FuncMainState.AppPlatform),
+      gotoA: () =>
+        window.GT_APP.funcMain.changeState(FuncMainState.PlatformMenu),
     });
     });
   }
   }
   onIdleStateExit(): void {
   onIdleStateExit(): void {

+ 26 - 0
src/Project/Functions/LevelAFunctions/FuncPlatformMenu.ts

@@ -0,0 +1,26 @@
+import Func from '@/Engine/ECS/Function';
+import SysPage from '@/Frameworks/SysPage';
+import { PAGE_KEY } from '@/Project/constants';
+export enum FuncPlatformMenuState {
+  PlatformMenu,
+}
+
+export default class FuncPlatformMenu extends Func<FuncPlatformMenuState> {
+  constructor(name: string) {
+    super(name);
+    super.initStates((sm) => {
+      sm.addState(
+        FuncPlatformMenuState.PlatformMenu,
+        this.onStateIn,
+        null,
+        this.onStateExit,
+      );
+    });
+  }
+  onStateIn(): void {
+    SysPage.add(PAGE_KEY.PlatformMenu);
+  }
+  onStateExit(): void {
+    SysPage.removeByKey(PAGE_KEY.PlatformMenu);
+  }
+}

+ 3 - 3
src/Project/Os.ts

@@ -1,15 +1,15 @@
 import FuncMain from './Functions/FuncMain';
 import FuncMain from './Functions/FuncMain';
 import FuncLogin from './Functions/LevelAFunctions/FuncLogin';
 import FuncLogin from './Functions/LevelAFunctions/FuncLogin';
-import FuncAppPlatform from './Functions/LevelAFunctions/FuncAppPlatform';
+import FuncPlatformMenu from './Functions/LevelAFunctions/FuncPlatformMenu';
 
 
 class Os {
 class Os {
   funcMain: FuncMain;
   funcMain: FuncMain;
   funcLogin: FuncLogin;
   funcLogin: FuncLogin;
-  funcAppPlatform: FuncAppPlatform;
+  funcPlatformMenu: FuncPlatformMenu;
   constructor() {
   constructor() {
     this.funcMain = new FuncMain('FuncMain');
     this.funcMain = new FuncMain('FuncMain');
     this.funcLogin = new FuncLogin('FuncLogin');
     this.funcLogin = new FuncLogin('FuncLogin');
-    this.funcAppPlatform = new FuncAppPlatform('FuncAppPlatform');
+    this.funcPlatformMenu = new FuncPlatformMenu('FuncPlatformMenu');
   }
   }
 }
 }
 
 

BIN
src/Project/assets/platformMenu/ICON/func-01-DirectDrinking.png


BIN
src/Project/assets/platformMenu/ICON/func-01-build-0.png


BIN
src/Project/assets/platformMenu/ICON/func-01-build-10.png


BIN
src/Project/assets/platformMenu/ICON/func-01-build-3.png


BIN
src/Project/assets/platformMenu/ICON/func-01-build-4.png


BIN
src/Project/assets/platformMenu/ICON/func-01-build.png


BIN
src/Project/assets/platformMenu/ICON/func-01-ops-BaseInfo.png


BIN
src/Project/assets/platformMenu/ICON/func-01-ops-ConfigManagement.png


BIN
src/Project/assets/platformMenu/ICON/func-01-ops-DataCenter.png


BIN
src/Project/assets/platformMenu/ICON/func-01-ops-DataView.png


BIN
src/Project/assets/platformMenu/ICON/func-01-ops-DeviceManagement.png


BIN
src/Project/assets/platformMenu/ICON/func-01-ops-EnergyManagement.png


BIN
src/Project/assets/platformMenu/ICON/func-01-ops-LimitedSpace.png


BIN
src/Project/assets/platformMenu/ICON/func-01-ops-ProManagement.png


BIN
src/Project/assets/platformMenu/ICON/func-01-ops-SecurityManagement.png


BIN
src/Project/assets/platformMenu/ICON/func-01-ops-WaterQManagement.png


BIN
src/Project/assets/platformMenu/ICON/func-01-ops.png


BIN
src/Project/assets/platformMenu/ICON/func-01-point-bom.png


BIN
src/Project/assets/platformMenu/ICON/func-06-ManDay.png


BIN
src/Project/assets/platformMenu/ICON/func-06-globalCockpit.png


BIN
src/Project/assets/platformMenu/ICON/newModel.png


BIN
src/Project/assets/platformMenu/newModel.png


BIN
src/Project/assets/platformMenu/noIcon.png


+ 2 - 1
src/Project/constants/index.ts

@@ -2,4 +2,5 @@ export enum PAGE_KEY {
   Home,
   Home,
   Access,
   Access,
   Login,
   Login,
-}
+  PlatformMenu,
+}

+ 219 - 0
src/Project/pages/PlatformMenu/index.js

@@ -0,0 +1,219 @@
+import React, { useState, useEffect } from 'react';
+import { message } from 'antd';
+import menuStyle from './moduleMenuStyle.less';
+import { connect } from 'umi';
+// import {
+//   UnityAction,
+//   getGlobalData,
+//   setGlobalData,
+// } from '@/utils/utils';
+// import router from 'umi/router';
+// import {
+//   platformPageConfig,
+//   BuildNodeCode,
+//   OpsNodeCode,
+// } from '@/utils/constants';
+const noIcon = require('@/Project/assets/platformMenu/noIcon.png');
+
+function PlatformMenu(props) {
+  const {
+    dispatch,
+    // location: { query = {} },
+  } = props;
+  let query = {};
+  const [curMenu, setCurMenu] = useState([]);
+  useEffect(() => {
+    console.log('====================', dispatch);
+    dispatch({
+      type: 'menu/getPlatformMenu',
+      callback: (menu, permission) => {
+        initMenu(menu, permission);
+      },
+      payload: { version: 2 },
+    });
+    // dispatch({
+    //   type: 'user/fetchCurrent',
+    // });
+  }, []);
+  const initMenu = (parent, permission) => {
+    console.log(parent, permission);
+    if (parent?.children) {
+      let menu = parent.children;
+      for (let i = 0; i < menu.length; i++) {
+        let element = menu[i];
+        if (element.Type != 1 || !permission[element.Code]) {
+          menu.splice(i, 1);
+          i--; //i
+          continue;
+        }
+        element.name = element.Name;
+        element.iconPath = element.Icon || noIcon;
+        element.active =
+          element.children != undefined ||
+          element.WebPath != '' ||
+          element.UnityPath != '';
+        if (!element.active) continue;
+      }
+      menu = menu.concat([
+        {
+          name: '新增功能',
+          ID: '新增功能',
+          Code: '',
+          Type: 1,
+          iconPath: require('@/Project/assets/platformMenu/newModel.png'),
+          WebPath: '',
+          UnityPath: '',
+          active: false,
+        },
+      ]);
+      setCurMenu(menu);
+    }
+  };
+  const handleMenuClick = (element) => {
+    if (element.Name == '运营平台' || element.Name == '建设平台') {
+      if (query.unity == undefined) {
+        message.error('请使用客户端进入');
+        return;
+      }
+      const subModule = element.Name == '运营平台' ? 2 : 1;
+      // const forbiddenModel = getGlobalData('forbiddenModel');
+      // 设置全局变量
+      // setGlobalData('curApp', subModule);
+      // UnityAction.sendMsg('EnterApp', element.Code);
+      // PageAction.sendMsg('HTML_changePage', {
+      //   code: 'projectSelect',
+      //   urlParams: {
+      //     subModule,
+      //     forbiddenModel,
+      //   },
+      // });
+      // PageAction.sendMsg('HTML_changeState', {
+      //   curMenu: null,
+      // });
+    } else {
+      //网页端跳转页面
+      if (query.unity == undefined) {
+        let curHref = window.location.href;
+        let sign = '?';
+        if (curHref.indexOf('?') != -1) {
+          sign = '&';
+        }
+        if (element.WebPath == undefined) return;
+        let isUrl =
+          element.WebPath.indexOf('http') != -1 ||
+          element.WebPath.indexOf('https') != -1;
+        // console.log(isUrl);
+        if (isUrl)
+          window.location.href =
+            element.WebPath + sign + 'JWT-TOKEN=' + localStorage['JWT-TOKEN'];
+      } else {
+        // UnityAction.sendMsg('EnterApp', element.Code);
+      }
+    }
+  };
+  const grayIcon = [
+    {
+      code: 'func-01-point-bom',
+      iconPath: require('@/Project/assets/platformMenu/ICON/func-01-point-bom.png'),
+      name: 'BOM清单',
+    },
+    {
+      code: 'func-01-build',
+      iconPath: require('@/Project/assets/platformMenu/ICON/func-01-build.png'),
+      name: '建设平台',
+    },
+    {
+      code: 'func-01-ops',
+      iconPath: require('@/Project/assets/platformMenu/ICON/func-01-ops.png'),
+      name: '运营平台',
+    },
+    {
+      code: 'func-06-ManDay',
+      iconPath: require('@/Project/assets/platformMenu/ICON/func-06-ManDay.png'),
+      name: '人日系统',
+    },
+    {
+      code: 'func-06-globalCockpit',
+      iconPath: require('@/Project/assets/platformMenu/ICON/func-06-globalCockpit.png'),
+      name: '全局驾驶舱',
+    },
+    {
+      code: 'func-01-DirectDrinking',
+      iconPath: require('@/Project/assets/platformMenu/ICON/func-01-DirectDrinking.png'),
+      name: '直饮水平台',
+    },
+    {
+      code: '',
+      iconPath: require('@/Project/assets/platformMenu/ICON/newModel.png'),
+      name: '新增功能',
+    },
+  ];
+  const getProjectSelectionUrl = (subModule) => {
+    // TODO 获取全局变量forbiddenModel
+    // const forbiddenModel = getGlobalData('forbiddenModel');
+    // return `#/smart-water/platform/projectSelect?subModule=${subModule}&forbiddenModel=${forbiddenModel}`;
+  };
+
+  // return <Menu onClickMenu={menu => handleMenuClick(menu)} menuData={curMenu}></Menu>;
+  return (
+    <div className={menuStyle.background}>
+      <div className={menuStyle.menuContent}>
+        <div className={menuStyle.wrap}>
+          {curMenu.map((item) => (
+            <div className={menuStyle.item}>
+              <div
+                onClick={() => handleMenuClick(item)}
+                className={menuStyle.menu}
+                style={
+                  item.active
+                    ? {}
+                    : item.ID === '新增功能'
+                    ? { cursor: 'not-allowed' }
+                    : {}
+                }
+              >
+                <img
+                  className={menuStyle.pic}
+                  src={
+                    item.active
+                      ? item.Icon ||
+                        require('@/Project/assets/platformMenu/ICON/newModel.png')
+                      : grayIcon.find((icon) => icon.code === item.Code)
+                          ?.iconPath ||
+                        require('@/Project/assets/platformMenu/ICON/newModel.png')
+                  }
+                  style={item.active ? {} : { cursor: 'not-allowed' }}
+                />
+              </div>
+              <div
+                style={{
+                  marginTop: '0.22rem',
+                  width: '1.52rem',
+                  textAlign: 'center',
+                }}
+              >
+                <span
+                  onClick={() => item.click?.(item)}
+                  className={menuStyle.menuFriName}
+                  style={
+                    item.active
+                      ? {}
+                      : { color: '#6081B2', cursor: 'not-allowed' }
+                  }
+                >
+                  {item.name}
+                </span>
+              </div>
+            </div>
+          ))}
+        </div>
+      </div>
+    </div>
+  );
+}
+export default connect(({ loading }) => ({
+  // waterMenuData: menu.waterMenuData,
+  // loading: loading.models.menu,
+  // currentUser: user.currentUser,
+  // Permission: user.currentUser.Permission,
+}))(PlatformMenu);

+ 46 - 0
src/Project/pages/PlatformMenu/models/menu.js

@@ -0,0 +1,46 @@
+import { getMenuData } from '@/Project/services/platformMenu';
+import { queryCurrentV2 } from '@/Project/services/user';
+
+const filterWaterMenuData = (menuData) => {
+  if (!menuData) {
+    return [];
+  }
+  var arr = [];
+  menuData.forEach((item) => {
+    if (item.Type != 1) return;
+    arr.push(item);
+    if (item.children) {
+      let newChildren = filterWaterMenuData(item.children);
+      item.children = newChildren.length == 0 ? null : newChildren;
+    }
+  });
+  return arr;
+};
+
+export default {
+  namespace: 'menu',
+  state: {},
+
+  effects: {
+    *getPlatformMenu({ callback, payload }, { put, call }) {
+      const allMenu = yield call(getMenuData, payload);
+      const response = yield call(queryCurrentV2);
+      let permission = {};
+      if (response && allMenu) {
+        for (let i = 0; i < response?.data?.Permissions?.length; i++) {
+          let item = response.data.Permissions[i];
+          if (!item.Menus || typeof item.Menus != 'object') return;
+          permission = {
+            ...permission,
+            ...item.Menus,
+          };
+        }
+        let menu = allMenu.data?.list.find((item) => item.MenuType == 0) || {};
+        menu.children = filterWaterMenuData(menu.children);
+        callback?.(menu, permission);
+      }
+    },
+  },
+
+  reducers: {},
+};

+ 165 - 0
src/Project/pages/PlatformMenu/moduleMenuStyle.less

@@ -0,0 +1,165 @@
+// .background {
+//   background-image: url(@/assets/UnityMenu/newBackground.jpg);
+//   width: 100%;
+//   height: 100vh;
+//   background-size: cover;
+//   background-repeat: no-repeat;
+//   display: flex;
+//   justify-content: center;
+//   // align-items: flex-start;
+//   :global {
+//     .ant-popover-inner {
+//       background: #0d1a2b;
+//     }
+//   }
+// }
+// .menu {
+//   width: 1.52rem;
+//   height: 1.52rem;
+//   // background: linear-gradient(0deg, #285098, #1d3969);
+//   // box-shadow: 0px 3px 0.16rem 2px rgba(0, 0, 0, 0.3), 0px 5px 0.39rem 0.1rem rgba(0, 0, 0, 0.1);
+//   // border-radius: 50%;
+//   display: flex;
+//   justify-content: center;
+//   align-items: center;
+//   cursor: pointer;
+// }
+// .TogMenu {
+//   background-image: url(@/assets/UnityMenu/TogMenuBackground.png);
+//   width: 3.56rem;
+//   background-size: cover;
+//   background-repeat: no-repeat;
+//   position: absolute;
+//   top: 0.6rem;
+//   left: 0;
+//   display: flex;
+//   flex-direction: column;
+//   z-index: 99999;
+// }
+// .TogMenuClose {
+//   background-image: url(@/assets/UnityMenu/TogMenuClose.png);
+//   width: 0.23rem;
+//   height: 5px;
+//   background-size: cover;
+//   background-repeat: no-repeat;
+//   position: absolute;
+//   right: 0.1rem;
+//   top: 0.14rem;
+// }
+// .TogMenuItem {
+//   margin-left: 0.22rem;
+//   margin-right: 0.4rem;
+//   height: 0.6rem;
+//   display: flex;
+//   align-items: center;
+//   border-bottom: 1px solid rgb(176, 192, 224);
+// }
+// .TogMenuItemLeftLine {
+//   background-image: url(@/assets/UnityMenu/leftLine.png);
+//   height: 0.16rem;
+//   width: 4px;
+//   background-size: cover;
+//   background-repeat: no-repeat;
+// }
+// .TogMenuItemText {
+//   font-size: 0.18rem;
+//   font-family: 'Microsoft YaHei UI'; /* Microsoft YaHei UI;*/
+//   font-weight: 400;
+//   color: #ffffff;
+//   line-height: 0.34rem;
+//   margin-left: 0.18rem;
+//   cursor: pointer;
+// }
+// .menuContent {
+//   height: 100%;
+//   padding-top: 1.6rem;
+//   width: 14.8rem;
+//   max-height: 100vh;
+//   overflow-y: hidden;
+// }
+// .menuFriName {
+//   font-size: 0.24rem;
+//   font-family: 'Microsoft YaHei UI'; /* Microsoft YaHei UI;*/
+//   // font-weight: 400;
+//   color: #bae3ff;
+//   // line-height: 0.45rem;
+//   // text-shadow: 0px 5px 14px rgba(0, 0, 0, 0.35), 0px 3px 12px rgba(0, 0, 0, 0.19);
+//   cursor: pointer;
+//   user-select: none;
+//   letter-spacing: 2px;
+//   text-align: center;
+//   word-break: keep-all;
+// }
+// .card {
+//   width: 12rem;
+//   height: 6.4rem;
+// }
+// .wrap {
+//   display: flex;
+//   flex-wrap: wrap;
+//   justify-content: start;
+//   align-items: center;
+// }
+// .item {
+//   display: flex;
+//   flex-direction: column;
+//   align-items: center;
+//   width: 2.92rem;
+//   height: 2.2rem;
+//   margin-bottom: 0.64rem;
+// }
+
+// .headerText {
+//   width: 6rem;
+//   font-size: 0.36rem;
+//   font-family: YouSheBiaoTiHei;
+//   font-weight: 400;
+//   color: #ffffff;
+//   line-height: 0.63rem;
+//   text-align: center;
+//   cursor: default;
+// }
+
+// .BreadcrumbWrap {
+//   position: absolute;
+//   left: 0.77rem;
+//   top: 0.15rem;
+//   height: 0.34rem;
+//   // width: 3.4rem;
+//   display: flex;
+//   align-items: center;
+// }
+// .BreadcrumbItem {
+//   background-size: contain;
+//   background-repeat: no-repeat;
+//   height: 0.34rem;
+//   font-size: 16px;
+//   font-family: 'Microsoft YaHei UI'; /* Microsoft YaHei UI;*/
+//   font-weight: bold;
+//   color: #ffffff;
+//   line-height: 0.34rem;
+//   background: url(@/assets/UnityMenu/BreadcrumbSelect.png) no-repeat center;
+//   background-size: 100% 100%;
+//   padding-left: 0.18rem;
+//   padding-right: 0.16rem;
+//   cursor: pointer;
+//   &.active {
+//     background-image: url(@/assets/UnityMenu/Breadcrumb.png);
+//   }
+// }
+
+// .BreadcrumbContent {
+//   background-image: url(@/assets/UnityMenu/TogMenuBackground.png);
+//   width: 2.68rem;
+//   background-size: cover;
+//   background-repeat: no-repeat;
+//   position: absolute;
+//   display: flex;
+//   flex-direction: column;
+// }
+// .pic {
+//   width: 1.52rem;
+//   height: 1.52rem;
+//   background-size: cover;
+//   background-repeat: no-repeat;
+// }

+ 6 - 0
src/Project/services/platformMenu.js

@@ -0,0 +1,6 @@
+import { stringify } from 'qs';
+import { request } from 'umi';
+// import { stringify } from 'qs';
+export async function getMenuData(params = {}) {
+  return request(`/api/v1/menu?${stringify(params)}`);
+}

+ 4 - 0
src/Project/services/user.ts

@@ -25,6 +25,10 @@ export async function queryDepList(userName: string) {
 export async function queryCurrent(): Promise<Api.IUser> {
 export async function queryCurrent(): Promise<Api.IUser> {
   return request('/api/v2/user/current-user');
   return request('/api/v2/user/current-user');
 }
 }
+export async function queryCurrentV2() {
+  return request('/api/v2/user/current-user', { method: 'GET' });
+}
+
 // 获取角色在此项目下的权限
 // 获取角色在此项目下的权限
 export async function queryAccess(
 export async function queryAccess(
   projectId: number | string,
   projectId: number | string,

+ 7 - 0
yarn.lock

@@ -6746,6 +6746,13 @@ qrcode.react@^3.1.0:
   resolved "https://registry.yarnpkg.com/qrcode.react/-/qrcode.react-3.1.0.tgz#5c91ddc0340f768316fbdb8fff2765134c2aecd8"
   resolved "https://registry.yarnpkg.com/qrcode.react/-/qrcode.react-3.1.0.tgz#5c91ddc0340f768316fbdb8fff2765134c2aecd8"
   integrity sha512-oyF+Urr3oAMUG/OiOuONL3HXM+53wvuH3mtIWQrYmsXoAq0DkvZp2RYUWFSMFtbdOpuS++9v+WAkzNVkMlNW6Q==
   integrity sha512-oyF+Urr3oAMUG/OiOuONL3HXM+53wvuH3mtIWQrYmsXoAq0DkvZp2RYUWFSMFtbdOpuS++9v+WAkzNVkMlNW6Q==
 
 
+qs@^6.11.0:
+  version "6.11.0"
+  resolved "https://registry.npmmirror.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a"
+  integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==
+  dependencies:
+    side-channel "^1.0.4"
+
 query-string@^6.13.6:
 query-string@^6.13.6:
   version "6.14.1"
   version "6.14.1"
   resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a"
   resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a"