|
@@ -1,7 +1,7 @@
|
|
|
/*
|
|
|
* @Author: your name
|
|
|
* @Date: 2022-01-06 15:25:39
|
|
|
- * @LastEditTime: 2023-03-23 16:41:41
|
|
|
+ * @LastEditTime: 2023-04-17 14:59:06
|
|
|
* @LastEditors: code4eat awesomedema@gmail.com
|
|
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
* @FilePath: /KC-MiddlePlatform/src/pages/platform/_layout.tsx
|
|
@@ -17,6 +17,8 @@ import { Iframe, SpacicalPageParamsType } from '@/typings';
|
|
|
import { Key, useEffect, useState } from 'react';
|
|
|
import IconFont from '@ant-design/icons/lib/components/IconFont';
|
|
|
import { FileOutlined, FolderOutlined, SmileOutlined } from '@ant-design/icons';
|
|
|
+import { getParamsManaTableData } from './setting/paramsMana/service';
|
|
|
+import { getAllParams } from '@/service';
|
|
|
|
|
|
export default function Layout({ children, location, route, history, match, ...rest }: IRouteComponentProps) {
|
|
|
const { initialState, setInitialState } = useModel('@@initialState');
|
|
@@ -26,8 +28,7 @@ export default function Layout({ children, location, route, history, match, ...r
|
|
|
const [isShowPageMenu, set_isShowPageMenu] = useState(true);
|
|
|
const [isEmpty, set_isEmpty] = useState(false);
|
|
|
|
|
|
- //const isShowMenu = localStorage.getItem('isChildShowMenu');
|
|
|
- // console.log({ children, location, route, history, match});
|
|
|
+
|
|
|
|
|
|
const { pathname } = location;
|
|
|
|
|
@@ -66,7 +67,32 @@ export default function Layout({ children, location, route, history, match, ...r
|
|
|
//临时演示处理
|
|
|
|
|
|
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>;
|
|
|
+
|
|
|
+ //临时解决未嵌入成本核算,而实现访问的效果
|
|
|
+ const [pageUrl,set_pageUrl] = useState<string|undefined>(undefined);
|
|
|
+
|
|
|
+ const getToken =async () => {
|
|
|
+ const resp = await getAllParams();
|
|
|
+
|
|
|
+ if (resp) {
|
|
|
+ const needItem = resp.filter((a: any) => a.code == '1647777324889935872');
|
|
|
+
|
|
|
+ if (needItem.length > 0) {
|
|
|
+ set_pageUrl(`http://localhost:8002/platformMana/roleManage?hospSign=dOBHdoPmJgPGnMSH&token=${needItem[0].value}`)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ useEffect(()=>{
|
|
|
+ getToken();
|
|
|
+ },[])
|
|
|
+
|
|
|
+
|
|
|
+ return (
|
|
|
+ <>
|
|
|
+ {pageUrl&&<iframe id={'bi_iframe'} style={{ width: '100%', height: '100%', border: 'none' }} src={pageUrl} onLoad={() => adjustIframe()} ></iframe>};
|
|
|
+ </>
|
|
|
+ )
|
|
|
}
|
|
|
|
|
|
|