|
@@ -1,10 +1,10 @@
|
|
|
-import { GridContent } from '@ant-design/pro-layout'
|
|
|
+// import { GridContent } from '@ant-design/pro-layout'
|
|
|
import React, { useState, useRef, useLayoutEffect } from 'react'
|
|
|
import { Menu } from 'antd'
|
|
|
import Staff from './components/Staff'
|
|
|
import Organization from './components/Organization'
|
|
|
// import Role from './components/Role'
|
|
|
-import styles from './style.less'
|
|
|
+// import styles from './style.less'
|
|
|
import type { RouteComponentProps } from 'react-router'
|
|
|
import { PageContainer } from '@ant-design/pro-layout'
|
|
|
|
|
@@ -25,7 +25,7 @@ type CompanyDetailProps = RouteComponentProps
|
|
|
const CompanyDetail: React.FC<CompanyDetailProps> = ({ location }) => {
|
|
|
const { dataID, structureType, name } = location.state
|
|
|
|
|
|
- const menuMap: Record<string, React.ReactNode> = {
|
|
|
+ const menuMap: Record<string, string> = {
|
|
|
[TabEnum.STAFF]: '人员管理',
|
|
|
[TabEnum.ORGANIZATION]: '组织架构'
|
|
|
// [TabEnum.ROLE]: '角色权限'
|
|
@@ -80,8 +80,21 @@ const CompanyDetail: React.FC<CompanyDetailProps> = ({ location }) => {
|
|
|
}
|
|
|
|
|
|
return (
|
|
|
- <PageContainer title={name}>
|
|
|
- <GridContent>
|
|
|
+ <PageContainer
|
|
|
+ title={name}
|
|
|
+ fixedHeader
|
|
|
+ tabList={[
|
|
|
+ { tab: menuMap[TabEnum.STAFF], key: TabEnum.STAFF },
|
|
|
+ { tab: menuMap[TabEnum.ORGANIZATION], key: TabEnum.ORGANIZATION }
|
|
|
+ ]}
|
|
|
+ onTabChange={key =>
|
|
|
+ setInitConfig({
|
|
|
+ ...initConfig,
|
|
|
+ selectKey: key
|
|
|
+ })
|
|
|
+ }>
|
|
|
+ {renderChildren()}
|
|
|
+ {/* <GridContent>
|
|
|
<div
|
|
|
className={styles.main}
|
|
|
ref={ref => {
|
|
@@ -89,7 +102,9 @@ const CompanyDetail: React.FC<CompanyDetailProps> = ({ location }) => {
|
|
|
dom.current = ref
|
|
|
}
|
|
|
}}>
|
|
|
- <div className={styles.leftMenu}>
|
|
|
+ */}
|
|
|
+
|
|
|
+ {/* <div className={styles.leftMenu}>
|
|
|
<Menu
|
|
|
mode={initConfig.mode}
|
|
|
selectedKeys={[initConfig.selectKey]}
|
|
@@ -104,10 +119,9 @@ const CompanyDetail: React.FC<CompanyDetailProps> = ({ location }) => {
|
|
|
</div>
|
|
|
<div className={styles.right}>
|
|
|
<div className={styles.title}>{menuMap[initConfig.selectKey]}</div>
|
|
|
- {renderChildren()}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </GridContent>
|
|
|
+ </div> */}
|
|
|
+ {/* </div>
|
|
|
+ </GridContent> */}
|
|
|
</PageContainer>
|
|
|
)
|
|
|
}
|