master_basic
鲁誉程 1 year ago
parent c0808b902d
commit 80bd4cbbcb

@ -2,6 +2,7 @@ import { defineConfig } from "umi";
import routes from './config/routes/index'
export default defineConfig({
hash: true,
routes,
npmClient: 'yarn',
});

@ -42,27 +42,27 @@ const routes = [
// ------------------------------MY管理----------------------------------
// 密钥体管理
// { path: '/KeyBodyManage/name', name: '密钥体格式导入', component: '@/pages/MY/KeyBodyManage/name' },
// { path: '/KeyBodyManage/name', name: '密钥体格式发布', component: '@/pages/MY/KeyBodyManage/name' },
// { path: '/KeyBodyManage/name', name: '密钥体申请', component: '@/pages/MY/KeyBodyManage/name' },
// { path: '/KeyBodyManage/name', name: '密钥体导入', component: '@/pages/MY/KeyBodyManage/name' },
// { path: '/KeyBodyManage/name', name: '密钥体接收单', component: '@/pages/MY/KeyBodyManage/name' },
// { path: '/KeyBodyManage/name', name: '已清理密钥体', component: '@/pages/MY/KeyBodyManage/name' },
// { path: '/KeyBodyManage/name', name: '密钥体代号对照表', component: '@/pages/MY/KeyBodyManage/name' },
// { path: '/KeyBodyManage/name', name: '向下级配发', component: '@/pages/MY/KeyBodyManage/name' },
// { path: '/KeyBodyManage/name', name: '向邮箱配发', component: '@/pages/MY/KeyBodyManage/name' },
// { path: '/KeyBodyManage/name', name: '向专用密码管理系统配发', component: '@/pages/MY/KeyBodyManage/name' },
// { path: '/KeyBodyManage/name', name: '密钥体配发三联单', component: '@/pages/MY/KeyBodyManage/name' },
// { path: '/KeyBodyManage/name', name: '明文载体包封', component: '@/pages/MY/KeyBodyManage/name' },
// { path: '/KeyBodyManage/name', name: '密文载体包封', component: '@/pages/MY/KeyBodyManage/name' },
{ path: '/KeyBodyManage/formatImport', name: '密钥体格式导入', component: '@/pages/MY/KeyBodyManage/FormatImport' },
{ path: '/KeyBodyManage/formatPublishing', name: '密钥体格式发布', component: '@/pages/MY/KeyBodyManage/FormatPublishing' },
{ path: '/KeyBodyManage/application', name: '密钥体申请', component: '@/pages/MY/KeyBodyManage/Application' },
{ path: '/KeyBodyManage/import', name: '密钥体导入', component: '@/pages/MY/KeyBodyManage/Import' },
{ path: '/KeyBodyManage/receiptForm', name: '密钥体接收单', component: '@/pages/MY/KeyBodyManage/ReceiptForm' },
{ path: '/KeyBodyManage/cleaned', name: '已清理密钥体', component: '@/pages/MY/KeyBodyManage/Cleaned' },
{ path: '/KeyBodyManage/codeComparisonTable', name: '密钥体代号对照表', component: '@/pages/MY/KeyBodyManage/CodeComparisonTable' },
{ path: '/KeyBodyManage/subordinateDistr', name: '向下级配发', component: '@/pages/MY/KeyBodyManage/SubordinateDistr' },
{ path: '/KeyBodyManage/emailDistr', name: '向邮箱配发', component: '@/pages/MY/KeyBodyManage/EmailDistr' },
{ path: '/KeyBodyManage/systemDistr', name: '向专用密码管理系统配发', component: '@/pages/MY/KeyBodyManage/SystemDistr' },
{ path: '/KeyBodyManage/distrTriple', name: '密钥体配发三联单', component: '@/pages/MY/KeyBodyManage/DistrTriple' },
{ path: '/KeyBodyManage/plaintext', name: '明文载体包封', component: '@/pages/MY/KeyBodyManage/Plaintext' },
{ path: '/KeyBodyManage/ciphertext', name: '密文载体包封', component: '@/pages/MY/KeyBodyManage/Ciphertext' },
// 密钥管理
// { path: '/KeyManage/name', name: '管理系统管理盘数据维护', component: '@/pages/MY/KeyManage/name' },
// { path: '/KeyManage/name', name: '统型完善普密设备密钥互通关系配置', component: '@/pages/MY/KeyManage/name' },
// { path: '/KeyManage/name', name: '管理密钥装配', component: '@/pages/MY/KeyManage/name' },
// { path: '/KeyManage/name', name: '用户密钥装配', component: '@/pages/MY/KeyManage/name' },
// { path: '/KeyManage/name', name: '专用密钥装配', component: '@/pages/MY/KeyManage/name' },
// { path: '/KeyManage/name', name: '密钥配置查询', component: '@/pages/MY/KeyManage/name' },
// { path: '/KeyManage/name', name: '密钥配发三联单', component: '@/pages/MY/KeyManage/name' },
{ path: '/KeyManage/dataMaintenance', name: '管理系统管理盘数据维护', component: '@/pages/MY/KeyManage/DataMaintenance' },
{ path: '/KeyManage/relationConfig', name: '统型完善普密设备密钥互通关系配置', component: '@/pages/MY/KeyManage/RelationConfig' },
{ path: '/KeyManage/manageKeys', name: '管理密钥装配', component: '@/pages/MY/KeyManage/ManageKeys' },
{ path: '/KeyManage/userKey', name: '用户密钥装配', component: '@/pages/MY/KeyManage/UserKey' },
{ path: '/KeyManage/privateKey', name: '专用密钥装配', component: '@/pages/MY/KeyManage/PrivateKey' },
{ path: '/KeyManage/keyConfigQuery', name: '密钥配置查询', component: '@/pages/MY/KeyManage/KeyConfigQuery' },
{ path: '/KeyManage/tripleKeyDistri', name: '密钥配发三联单', component: '@/pages/MY/KeyManage/TripleKeyDistri' },
// 邮箱管理
{ path: '/mailboxManage/index', name: '邮箱管理', component: '@/pages/MY/MailboxManage/index' },
// ---------------------------------------------------------------------------
@ -70,10 +70,10 @@ const routes = [
// ------------------------------SB管理----------------------------------
// 设备管理
// { path: '/DeviceManage/name', name: '执勤区配置', component: '@/pages/SB/DeviceManage/name' },
// { path: '/DeviceManage/name', name: '数据同步', component: '@/pages/SB/DeviceManage/name' },
// { path: '/DeviceManage/name', name: '远程维护', component: '@/pages/SB/DeviceManage/name' },
// { path: '/DeviceManage/name', name: '报号维护', component: '@/pages/SB/DeviceManage/name' },
{ path: '/DeviceManage/dutyAreaConfig', name: '执勤区配置', component: '@/pages/SB/DeviceManage/DutyAreaConfig' },
{ path: '/DeviceManage/dataSync', name: '数据同步', component: '@/pages/SB/DeviceManage/DataSync' },
{ path: '/DeviceManage/remoteMaintenance', name: '远程维护', component: '@/pages/SB/DeviceManage/RemoteMaintenance' },
{ path: '/DeviceManage/numberMaintenance', name: '报号维护', component: '@/pages/SB/DeviceManage/NumberMaintenance' },
// 日志管理
{ path: '/logManage/index', name: '日志管理', component: '@/pages/SB/LogManage/index' },
// 审计管理

@ -16,9 +16,9 @@
right: 20px;
width: 0;
height: 0;
border-top: 6px solid #fff;
border-right: 6px solid transparent;
border-left: 6px solid transparent;
border-left: 6px solid #fff;
border-bottom: 6px solid transparent;
border-top: 6px solid transparent;
transition: all 0.15s ease-in;
}
}

@ -1,6 +1,6 @@
import { FC, useEffect, useState } from 'react';
import styles from './index.less';
import {history} from 'umi';
import {history, useLocation, useParams} from 'umi';
interface PageProps {
data: Array<{
@ -16,6 +16,7 @@ interface PageProps {
const LeftMenuCom: FC<PageProps> = ({ data }) => {
const [list, setList] = useState<any>([]);
const route = useLocation();
useEffect(() => {
data.forEach((item,index) => {
@ -38,16 +39,18 @@ const LeftMenuCom: FC<PageProps> = ({ data }) => {
setList([...list])
}}>
<div>{item.name}</div>
<div className={styles.triangle} style={{ transform: list[index].check ? 'rotate(180deg)' : '' }}></div>
<div className={styles.triangle} style={{ transform: list[index].check ? 'rotate(90deg)' : '' }}></div>
</div>
{/* 列表 */}
<div className={styles.item_warp} style={{ display: list[index].check ? 'block' : 'none' }}>
{
item.data.map((item1: any, index1: number) => {
return (
<div className={styles.item1} key={index1} onClick={() => history.push(item1.url)}>
<div className={styles.item1} key={index1} onClick={() => history.push(item1.url) }>
<div className={styles.item1_img}></div>
<div className={styles.item1_name}>{item1.name}</div>
<div className={styles.item1_name} style={{color: (route.pathname == item1.url ? 'red' : '')}}>
{item1.name}
</div>
</div>
)
})

@ -1,5 +1,5 @@
import { FC, useEffect, useState } from 'react';
import { history } from "umi";
import { history, useLocation } from "umi";
import styles from './index.less';
interface PageProps {
@ -16,6 +16,7 @@ interface PageProps {
const LeftMenuCom: FC<PageProps> = ({ data }) => {
const [list, setList] = useState<any>([]);
const route = useLocation();
useEffect(() => {
setList([...data])
@ -27,7 +28,9 @@ const LeftMenuCom: FC<PageProps> = ({ data }) => {
return (
<div className={styles.item1} key={index} onClick={() => history.push(item.url)}>
<div className={styles.item1_img}></div>
<div className={styles.item1_name}>{item.name}</div>
<div className={styles.item1_name} style={{color: (route.pathname == item.url ? 'red' : '')}}>
{item.name}
</div>
</div>
)
})}

@ -1,5 +1,5 @@
import { Outlet, history } from 'umi';
import { Outlet, history, useLocation } from 'umi';
import styles from './index.less';
import { useEffect, useState } from 'react';
import { MenuType, tabsType } from '@/utils/menu';
@ -26,10 +26,10 @@ const leftMenuType: any = {
'密钥管理': <LeftMenuOne key={5} data={MenuType['密钥管理']} />,
'邮箱管理': <LeftMenuOne key={6} data={MenuType['邮箱管理']} />,
// SB管理
'设备管理': <LeftMenuOne key={7} data={MenuType['设备管理']}/>,
'日志管理': <LeftMenuTwo key={8} data={MenuType['日志管理']}/>,
'审计管理': <LeftMenuTwo key={9} data={MenuType['审计管理']}/>,
'境外任务管理': <LeftMenuTwo key={10} data={MenuType['境外任务管理']}/>,
'设备管理': <LeftMenuOne key={7} data={MenuType['设备管理']} />,
'日志管理': <LeftMenuTwo key={8} data={MenuType['日志管理']} />,
'审计管理': <LeftMenuTwo key={9} data={MenuType['审计管理']} />,
'境外任务管理': <LeftMenuTwo key={10} data={MenuType['境外任务管理']} />,
// SF管理
'算法资源管理': <div />,
'算法配置管理': <div />,
@ -48,24 +48,45 @@ export default function Layout() {
const [active, setActive] = useState<number>(1);
const [activeName, setActiveName] = useState<any>('GLQ远程维护');
// 获取布局信息
let layoutInfo: any = localStorage.getItem('layoutInfo');
layoutInfo = JSON.parse(layoutInfo);
useEffect(() => {
setTabList([...tabsType[selectVal]])
// 校验浏览器是否有储存的布局信息
if (layoutInfo) {
setActive(layoutInfo.active);
setActiveName(layoutInfo.activeName);
setSelectVal(layoutInfo.selectVal);
setTabList([...tabsType[layoutInfo.selectVal]]);
} else {
setTabList([...tabsType[selectVal]]);
}
}, [])
// 页面销毁前记录下当前布局信息
window.addEventListener('beforeunload', function (event) {
let layoutInfo: any = {
selectVal: selectVal,
active: active,
activeName: activeName,
}
localStorage.setItem('layoutInfo', JSON.stringify(layoutInfo));
});
useEffect(() => {
if (tabList.length > 0) {
// 条件判断: 当选择框的值发生改变时tabList长度大于0 并且 没有发现记录布局的数据)时 ,默认进入第一个模块的页面
if (tabList.length > 0 && !layoutInfo) {
setActiveName(tabList[0].name)
let info = MenuType[tabList[0].name];
if (info[0].data) {
history.push(`${info[0].data[0].url}`)
}else {
} else {
history.push(`${info[0].url}`)
}
}
}, [selectVal])
return (
<div id={styles.layout_main}>
{/* 顶部导航 */}
@ -81,6 +102,8 @@ export default function Layout() {
value={selectVal}
style={{ width: 180 }}
onChange={(e) => {
// 改变下拉框数据时将布局信息清空
localStorage.setItem('layoutInfo', JSON.stringify(null));
setSelectVal(e)
setTabList([...tabsType[e]])
setActive(1)
@ -126,7 +149,7 @@ export default function Layout() {
// 改变activeName时跳转菜单栏的第一个路由
if (info[0].data) {
history.push(`${info[0].data[0].url}`)
}else {
} else {
history.push(`${info[0].url}`)
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Page() {
return (
<div>
</div>
);
}

@ -85,39 +85,39 @@ export const MenuType: any = {
name: '密钥体格式管理',
check: true,
data: [
{ name: '密钥体格式导入', url: '', img: '' },
{ name: '密钥体格式发布', url: '', img: '' },
{ name: '密钥体格式导入', url: '/KeyBodyManage/formatImport', img: '' },
{ name: '密钥体格式发布', url: '/KeyBodyManage/formatPublishing', img: '' },
]
}, {
name: '密钥体申请',
check: true,
data: [
{ name: '密钥体申请', url: '', img: '' }
{ name: '密钥体申请', url: '/KeyBodyManage/application', img: '' }
]
}, {
name: '密钥体导入',
check: true,
data: [
{ name: '密钥体导入', url: '', img: '' },
{ name: '密钥体接收单', url: '', img: '' },
{ name: '已清理密钥体', url: '', img: '' },
{ name: '密钥体代号对照表', url: '', img: '' }
{ name: '密钥体导入', url: '/KeyBodyManage/import', img: '' },
{ name: '密钥体接收单', url: '/KeyBodyManage/receiptForm', img: '' },
{ name: '已清理密钥体', url: '/KeyBodyManage/cleaned', img: '' },
{ name: '密钥体代号对照表', url: '/KeyBodyManage/codeComparisonTable', img: '' }
]
}, {
name: '密钥体配发',
check: true,
data: [
{ name: '向下级配发', url: '', img: '' },
{ name: '向邮箱配发', url: '', img: '' },
{ name: '向专用密码管理系统配发', url: '', img: '' },
{ name: '密钥体配发三联单', url: '', img: '' },
{ name: '向下级配发', url: '/KeyBodyManage/subordinateDistr', img: '' },
{ name: '向邮箱配发', url: '/KeyBodyManage/emailDistr', img: '' },
{ name: '向专用密码管理系统配发', url: '/KeyBodyManage/systemDistr', img: '' },
{ name: '密钥体配发三联单', url: '/KeyBodyManage/distrTriple', img: '' },
]
}, {
name: '密钥体载体包封',
check: true,
data: [
{ name: '明文载体包封', url: '', img: '' },
{ name: '密文载体包封', url: '', img: '' },
{ name: '明文载体包封', url: '/KeyBodyManage/plaintext', img: '' },
{ name: '密文载体包封', url: '/KeyBodyManage/ciphertext', img: '' },
]
},
],
@ -126,13 +126,13 @@ export const MenuType: any = {
name: '密钥装配',
check: true,
data: [
{ name: '管理系统管理盘数据维护', url: '', img: '' },
{ name: '统型完善普密设备密钥互通关系配置', url: '', img: '' },
{ name: '管理密钥装配', url: '', img: '' },
{ name: '用户密钥装配', url: '', img: '' },
{ name: '专用密钥装配', url: '', img: '' },
{ name: '密钥配置查询', url: '', img: '' },
{ name: '密钥配发三联单', url: '', img: '' }
{ name: '管理系统管理盘数据维护', url: '/KeyManage/dataMaintenance', img: '' },
{ name: '统型完善普密设备密钥互通关系配置', url: '/KeyManage/relationConfig', img: '' },
{ name: '管理密钥装配', url: '/KeyManage/manageKeys', img: '' },
{ name: '用户密钥装配', url: '/KeyManage/userKey', img: '' },
{ name: '专用密钥装配', url: '/KeyManage/privateKey', img: '' },
{ name: '密钥配置查询', url: '/KeyManage/keyConfigQuery', img: '' },
{ name: '密钥配发三联单', url: '/KeyManage/tripleKeyDistri', img: '' }
]
},
{ name: '密码机安装', check: true, data: [] },
@ -150,10 +150,10 @@ export const MenuType: any = {
name: '系统配置',
check: true,
data: [
{ name: '执勤区配置', url: '', img: '' },
{ name: '数据同步', url: '', img: '' },
{ name: '远程维护', url: '', img: '' },
{ name: '报号维护', url: '', img: '' },
{ name: '执勤区配置', url: '/DeviceManage/dutyAreaConfig', img: '' },
{ name: '数据同步', url: '/DeviceManage/dataSync', img: '' },
{ name: '远程维护', url: '/DeviceManage/remoteMaintenance', img: '' },
{ name: '报号维护', url: '/DeviceManage/numberMaintenance', img: '' },
]
},
],

Loading…
Cancel
Save