|
@@ -1,7 +1,7 @@
|
|
/*
|
|
/*
|
|
* @Author: your name
|
|
* @Author: your name
|
|
* @Date: 2022-01-06 15:25:39
|
|
* @Date: 2022-01-06 15:25:39
|
|
- * @LastEditTime: 2022-12-12 15:40:54
|
|
|
|
|
|
+ * @LastEditTime: 2023-02-27 15:43:12
|
|
* @LastEditors: code4eat awesomedema@gmail.com
|
|
* @LastEditors: code4eat awesomedema@gmail.com
|
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
* @FilePath: /KC-MiddlePlatform/src/pages/platform/_layout.tsx
|
|
* @FilePath: /KC-MiddlePlatform/src/pages/platform/_layout.tsx
|
|
@@ -13,7 +13,7 @@ import ProLayout, { PageContainer } from '@ant-design/pro-layout';
|
|
import { getPlatformMenu, getSpecifyMenuDetail } from '@/service/menu';
|
|
import { getPlatformMenu, getSpecifyMenuDetail } from '@/service/menu';
|
|
import './index.less';
|
|
import './index.less';
|
|
import { TreeItemType } from '@/utils';
|
|
import { TreeItemType } from '@/utils';
|
|
-import { SpacicalPageParamsType } from '@/typings';
|
|
|
|
|
|
+import { Iframe, SpacicalPageParamsType } from '@/typings';
|
|
import { Key, useEffect, useState } from 'react';
|
|
import { Key, useEffect, useState } from 'react';
|
|
import IconFont from '@ant-design/icons/lib/components/IconFont';
|
|
import IconFont from '@ant-design/icons/lib/components/IconFont';
|
|
import { FileOutlined, FolderOutlined, SmileOutlined } from '@ant-design/icons';
|
|
import { FileOutlined, FolderOutlined, SmileOutlined } from '@ant-design/icons';
|
|
@@ -29,7 +29,7 @@ export default function Layout({ children, location, route, history, match, ...r
|
|
//const isShowMenu = localStorage.getItem('isChildShowMenu');
|
|
//const isShowMenu = localStorage.getItem('isChildShowMenu');
|
|
// console.log({ children, location, route, history, match});
|
|
// console.log({ children, location, route, history, match});
|
|
|
|
|
|
-
|
|
|
|
|
|
+ const {pathname} = location;
|
|
|
|
|
|
const setEmptyPageContent = async (menuId: Key) => {
|
|
const setEmptyPageContent = async (menuId: Key) => {
|
|
const menuItem = await getSpecifyMenuDetail(menuId);
|
|
const menuItem = await getSpecifyMenuDetail(menuId);
|
|
@@ -55,7 +55,23 @@ export default function Layout({ children, location, route, history, match, ...r
|
|
}
|
|
}
|
|
|
|
|
|
set_isEmpty(location.query.isEmpty == 'true');
|
|
set_isEmpty(location.query.isEmpty == 'true');
|
|
- }, [location])
|
|
|
|
|
|
+ }, [location]);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ const adjustIframe = ()=>{
|
|
|
|
+ // var ifm:any = document.getElementById("bi_iframe");
|
|
|
|
+ // if(ifm){
|
|
|
|
+ // ifm.height=document.documentElement.clientHeight;
|
|
|
|
+ // ifm.width=document.documentElement.clientWidth;
|
|
|
|
+ // }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //临时演示处理
|
|
|
|
+
|
|
|
|
+ if (location.pathname == '/platform/costMana') {
|
|
|
|
+ return <iframe id={'bi_iframe'} style={{ width: '100%', height: '100%', border: 'none' }} src="http://112.124.59.133:4000/platformMana/roleManage?hospSign=dOBHdoPmJgPGnMSH" onLoad={()=>adjustIframe()} ></iframe>;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
@@ -144,7 +160,8 @@ export default function Layout({ children, location, route, history, match, ...r
|
|
// console.log({homePage});
|
|
// console.log({homePage});
|
|
set_openKeys([homePage.key]);
|
|
set_openKeys([homePage.key]);
|
|
set_selectedKeys([homePage.key]);
|
|
set_selectedKeys([homePage.key]);
|
|
- history.push(homePage.path)
|
|
|
|
|
|
+ history.push(homePage.path);
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
|
|
|
|
if (path == '/platform') {
|
|
if (path == '/platform') {
|