|
@@ -1,7 +1,7 @@
|
|
/*
|
|
/*
|
|
* @Author: your name
|
|
* @Author: your name
|
|
* @Date: 2021-11-16 09:12:37
|
|
* @Date: 2021-11-16 09:12:37
|
|
- * @LastEditTime: 2022-09-08 09:23:39
|
|
|
|
|
|
+ * @LastEditTime: 2022-12-05 11:23:46
|
|
* @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/index/components/topBar/index.tsx
|
|
* @FilePath: /KC-MiddlePlatform/src/pages/index/components/topBar/index.tsx
|
|
@@ -41,7 +41,7 @@ const TopBar: React.FC<TopBarType> = (props) => {
|
|
const [currentSelectedTab, setCurrentSelectedTab] = useState<TopBar.Tab>();
|
|
const [currentSelectedTab, setCurrentSelectedTab] = useState<TopBar.Tab>();
|
|
const [ifOpenPannel, setIfOpenPannel] = useState(false);
|
|
const [ifOpenPannel, setIfOpenPannel] = useState(false);
|
|
const [arrowRotate, setArrowRotate] = useState(false);
|
|
const [arrowRotate, setArrowRotate] = useState(false);
|
|
- const [pageTitle, set_pageTitle] = useState('欢迎进入医管平台');
|
|
|
|
|
|
+ const [pageTitle, set_pageTitle] = useState('我的系统');
|
|
const [currentActivedBlockIndex, set_currentActivedBlockIndex] = useState(0);
|
|
const [currentActivedBlockIndex, set_currentActivedBlockIndex] = useState(0);
|
|
const [panelData, set_panelData] = useState<TopBar.PanelData[]>([]);
|
|
const [panelData, set_panelData] = useState<TopBar.PanelData[]>([]);
|
|
|
|
|
|
@@ -180,7 +180,6 @@ const TopBar: React.FC<TopBarType> = (props) => {
|
|
|
|
|
|
if (_panelData[index] && _panelData[index].child) {
|
|
if (_panelData[index] && _panelData[index].child) {
|
|
two: for (let i = 0; i < _panelData[index].child.length; i++) {
|
|
two: for (let i = 0; i < _panelData[index].child.length; i++) {
|
|
-
|
|
|
|
channelIndex = i;
|
|
channelIndex = i;
|
|
if (_panelData && _panelData.length > 0) {
|
|
if (_panelData && _panelData.length > 0) {
|
|
const _systems = _panelData[index].child[i].child;
|
|
const _systems = _panelData[index].child[i].child;
|
|
@@ -195,7 +194,6 @@ const TopBar: React.FC<TopBarType> = (props) => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -212,7 +210,6 @@ const TopBar: React.FC<TopBarType> = (props) => {
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
if (currentSelectedTabFromLocal) {
|
|
if (currentSelectedTabFromLocal) {
|
|
-
|
|
|
|
reSetNav(navData, currentSelectedTabFromLocal);
|
|
reSetNav(navData, currentSelectedTabFromLocal);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -223,7 +220,6 @@ const TopBar: React.FC<TopBarType> = (props) => {
|
|
|
|
|
|
if(currentTab)reSetNav(panelData,currentTab);
|
|
if(currentTab)reSetNav(panelData,currentTab);
|
|
|
|
|
|
-
|
|
|
|
},[currentTab]);
|
|
},[currentTab]);
|
|
|
|
|
|
// useEffect(()=>{
|
|
// useEffect(()=>{
|
|
@@ -235,7 +231,6 @@ const TopBar: React.FC<TopBarType> = (props) => {
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
|
|
|
-
|
|
|
|
_systemTabClickHandle(currentSelectedTabFromLocal); //恢复选中的tab
|
|
_systemTabClickHandle(currentSelectedTabFromLocal); //恢复选中的tab
|
|
|
|
|
|
document.body.addEventListener('click', (e:any) => {
|
|
document.body.addEventListener('click', (e:any) => {
|
|
@@ -261,7 +256,7 @@ const TopBar: React.FC<TopBarType> = (props) => {
|
|
</div>
|
|
</div>
|
|
<span className='systemTitle' onClick={()=>goSystemIndex(pageTitle)}>{pageTitle}</span>
|
|
<span className='systemTitle' onClick={()=>goSystemIndex(pageTitle)}>{pageTitle}</span>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
|
|
+
|
|
<div className='userRelaInfoWrap'>
|
|
<div className='userRelaInfoWrap'>
|
|
<>
|
|
<>
|
|
{/**
|
|
{/**
|
|
@@ -295,6 +290,7 @@ const TopBar: React.FC<TopBarType> = (props) => {
|
|
{
|
|
{
|
|
ifOpenPannel && (
|
|
ifOpenPannel && (
|
|
<div className='panel' onClick={e => e.stopPropagation()}>
|
|
<div className='panel' onClick={e => e.stopPropagation()}>
|
|
|
|
+
|
|
<div className='left'>
|
|
<div className='left'>
|
|
{
|
|
{
|
|
panelData.map((item, index) => {
|
|
panelData.map((item, index) => {
|