master_basic
鲁誉程 1 year ago
parent f3777c5ba4
commit 1891c46e04

@ -1,7 +1,47 @@
const routes = [
{path: '/', component: '@/pages/index'},
{path: '/home', component: '@/pages/index'},
// {path: '/aaa', component: '@/pages/Aaa/index', layout: false},
{ path: '/', redirect: '/teamViewer/paramsSetting', },
// ------------------------------GLQ远程维护----------------------------------
// 建立远程链接
{ path: '/teamViewer/paramsSetting', name: '参数设置', component: '@/pages/GLQ/TeamViewer/ParamsSetting' },
// 交互维护命令
{ path: '/teamViewer/systemTime', name: '系统时间', component: '@/pages/GLQ/TeamViewer/SystemTime' },
{ path: '/teamViewer/currentIP', name: '当前IP', component: '@/pages/GLQ/TeamViewer/CurrentIP' },
{ path: '/teamViewer/pingCommand', name: 'PING命令', component: '@/pages/GLQ/TeamViewer/PingCommand' },
{ path: '/teamViewer/telnetCommand', name: 'TELNET命令', component: '@/pages/GLQ/TeamViewer/TelnetCommand' },
{ path: '/teamViewer/otherCommand', name: '其他命令', component: '@/pages/GLQ/TeamViewer/OtherCommand' },
// ---------------------------------------------------------------------------
// ------------------------------网络MMJ管理----------------------------------
{ path: '/webMMJ/mmjInitInstall', name: 'MMJ初装', component: '@/pages/GLQ/WebMMJ/MmjInitInstall' },
{ path: '/webMMJ/statusQuery', name: '状态查询', component: '@/pages/GLQ/WebMMJ/StatusQuery' },
{ path: '/webMMJ/keyDestruction', name: '密钥销毁', component: '@/pages/GLQ/WebMMJ/KeyDestruction' },
{ path: '/webMMJ/keyRemoteKill', name: '密钥遥毙', component: '@/pages/GLQ/WebMMJ/KeyRemoteKill' },
{ path: '/webMMJ/mmjRemoteKill', name: 'MMJ遥毙', component: '@/pages/GLQ/WebMMJ/MmjRemoteKill' },
// ---------------------------------------------------------------------------
// ------------------------------网络GLQ配置----------------------------------
// 获取配置信息
// { path: '/webGLQ/systemTime', name: '服务列表信息', component: '@/pages/GLQ/webGLQ/SystemTime' },
// { path: '/webGLQ/currentIP', name: '网络配置信息', component: '@/pages/GLQ/webGLQ/CurrentIP' },
// { path: '/webGLQ/pingCommand', name: '安全策略信息', component: '@/pages/GLQ/webGLQ/PingCommand' },
// { path: '/webGLQ/telnetCommand', name: '管理配置信息', component: '@/pages/GLQ/webGLQ/TelnetCommand' },
// { path: '/webGLQ/otherCommand', name: 'VPN策略信息', component: '@/pages/GLQ/webGLQ/OtherCommand' },
// { path: '/webGLQ/paramsSetting', name: '防火墙策略信息', component: '@/pages/GLQ/webGLQ/ParamsSetting' },
// { path: '/webGLQ/paramsSetting', name: '日志记录信息', component: '@/pages/GLQ/webGLQ/ParamsSetting' },
// 远程文件配置
// { path: '/webMMJ/systemTime', name: '服务列表', component: '@/pages/GLQ/webMMJ/SystemTime' },
// { path: '/webMMJ/currentIP', name: '网络参数', component: '@/pages/GLQ/webMMJ/CurrentIP' },
// { path: '/webMMJ/pingCommand', name: '安全策略', component: '@/pages/GLQ/webMMJ/PingCommand' },
// { path: '/webMMJ/telnetCommand', name: '管理配置', component: '@/pages/GLQ/webMMJ/TelnetCommand' },
// { path: '/webMMJ/otherCommand', name: 'VPN策略', component: '@/pages/GLQ/webMMJ/OtherCommand' },
// ---------------------------------------------------------------------------
{
path: '*',
component: '@/pages/404',
layout: false
}
]
export default routes;

@ -1,5 +1,6 @@
import { FC, useEffect, useState } from 'react';
import styles from './index.less';
import {history} from 'umi';
interface PageProps {
data: Array<{
@ -18,7 +19,10 @@ const LeftMenuCom: FC<PageProps> = ({ data }) => {
useEffect(() => {
data.forEach((item,index) => {
item.check = (index == 0 ? true : false);
// 默认展开第一个
// item.check = (index == 0 ? true : false);
// 默认全部展开
item.check = true;
})
setList([...data])
}, [])
@ -41,7 +45,7 @@ const LeftMenuCom: FC<PageProps> = ({ data }) => {
{
item.data.map((item1: any, index1: number) => {
return (
<div className={styles.item1} key={index1}>
<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>

@ -1,5 +1,5 @@
import { Outlet } from 'umi';
import { Outlet, history } from 'umi';
import styles from './index.less';
import { useEffect, useState } from 'react';
import { MenuType, tabsType } from '@/utils/menu';
@ -104,6 +104,15 @@ export default function Layout() {
onClick={() => {
setActive(item.id)
setActiveName(item.name)
// 改变activeName时跳转菜单栏的第一个路由
let info = MenuType[item.name];
if (info[0].data) {
history.push(`${info[0].data[0].url}`)
}else {
history.push(`${info[0].url}`)
}
}}>
{item.name}
</div>

@ -0,0 +1,18 @@
import { history } from 'umi';
import { Button, Result } from 'antd';
import React from 'react';
const NoFoundPage: React.FC = () => (
<Result
status="404"
title="404"
subTitle="Sorry, the page you visited does not exist."
extra={
<Button type="primary" onClick={() => history.push('/')}>
Back Home
</Button>
}
/>
);
export default NoFoundPage;

@ -0,0 +1,10 @@
import styles from './index.less';
// GLQ远程维护 --> 交互维护命令--> 当前IP
export default function Page() {
return (
<div>
{'GLQ远程维护 --> 交互维护命令--> 当前IP'}
</div>
);
}

@ -0,0 +1,10 @@
import styles from './index.less';
// GLQ远程维护 --> 交互维护命令--> 当前IP
export default function Page() {
return (
<div>
{'GLQ远程维护 --> 交互维护命令--> 当前IP'}
</div>
);
}

@ -0,0 +1,10 @@
import styles from './index.less';
// GLQ远程维护 --> 建立远程链接--> 参数设置
export default function Page() {
return (
<div>
{'GLQ远程维护 --> 建立远程链接--> 参数设置'}
</div>
);
}

@ -0,0 +1,10 @@
import styles from './index.less';
// GLQ远程维护 --> 交互维护命令--> PING命令
export default function Page() {
return (
<div>
{'GLQ远程维护 --> 交互维护命令--> PING命令'}
</div>
);
}

@ -0,0 +1,10 @@
import styles from './index.less';
// GLQ远程维护 --> 交互维护命令--> 系统时间
export default function Page() {
return (
<div>
{'GLQ远程维护 --> 交互维护命令--> 系统时间'}
</div>
);
}

@ -0,0 +1,10 @@
import styles from './index.less';
// GLQ远程维护 --> 交互维护命令-->TELNET命令
export default function Page() {
return (
<div>
{'GLQ远程维护 --> 交互维护命令-->TELNET命令'}
</div>
);
}

@ -1,10 +0,0 @@
import styles from './index.less';
// GLQ远程维护
export default function Page() {
return (
<div>
aaaa
</div>
);
}

@ -1,10 +0,0 @@
import styles from './index.less';
// 网络GLQ配置
export default function Page() {
return (
<div>
aaaa
</div>
);
}

@ -0,0 +1,10 @@
import styles from './index.less';
// GLQ远程维护 --> 交互维护命令--> 当前IP
export default function Page() {
return (
<div>
{'GLQ远程维护 --> 交互维护命令--> 当前IP'}
</div>
);
}

@ -0,0 +1,10 @@
import styles from './index.less';
// GLQ远程维护 --> 交互维护命令--> 当前IP
export default function Page() {
return (
<div>
{'GLQ远程维护 --> 交互维护命令--> 当前IP'}
</div>
);
}

@ -0,0 +1,10 @@
import styles from './index.less';
// GLQ远程维护 --> 交互维护命令--> 当前IP
export default function Page() {
return (
<div>
{'GLQ远程维护 --> 交互维护命令--> 当前IP'}
</div>
);
}

@ -0,0 +1,10 @@
import styles from './index.less';
// GLQ远程维护 --> 交互维护命令--> 当前IP
export default function Page() {
return (
<div>
{'GLQ远程维护 --> 交互维护命令--> 当前IP'}
</div>
);
}

@ -0,0 +1,10 @@
import styles from './index.less';
// GLQ远程维护 --> 交互维护命令--> 当前IP
export default function Page() {
return (
<div>
{'GLQ远程维护 --> 交互维护命令--> 当前IP'}
</div>
);
}

@ -1,10 +0,0 @@
import styles from './index.less';
// 网络MMJ管理
export default function Page() {
return (
<div>
aaaa
</div>
);
}

@ -35,25 +35,25 @@ export const MenuType: any = {
{
name: '建立远程连接',
check: true,
data: [{ name: '参数设置', url: '', img: '' }]
data: [{ name: '参数设置', url: '/teamViewer/paramsSetting', img: '' }]
}, {
name: '交互维护命令',
check: false,
check: true,
data: [
{ name: '系统时间', url: '', img: '' },
{ name: '当前IP', url: '', img: '' },
{ name: 'PING命令', url: '', img: '' },
{ name: 'TELNET命令', url: '', img: '' },
{ name: '其他命令', url: '', img: '' },
{ name: '系统时间', url: '/teamViewer/systemTime', img: '' },
{ name: '当前IP', url: '/teamViewer/currentIP', img: '' },
{ name: 'PING命令', url: '/teamViewer/pingCommand', img: '' },
{ name: 'TELNET命令', url: '/teamViewer/telnetCommand', img: '' },
{ name: '其他命令', url: '/teamViewer/otherCommand', img: '' },
]
},
],
'网络MMJ管理' : [
{ name: 'MMJ初装', url: '', img: '' },
{ name: '状态查询', url: '', img: '' },
{ name: '密钥销毁', url: '', img: '' },
{ name: '密钥遥毙', url: '', img: '' },
{ name: 'MMJ遥毙', url: '', img: '' },
{ name: 'MMJ初装', url: '/webMMJ/mmjInitInstall', img: '' },
{ name: '状态查询', url: '/webMMJ/statusQuery', img: '' },
{ name: '密钥销毁', url: '/webMMJ/keyDestruction', img: '' },
{ name: '密钥遥毙', url: '/webMMJ/keyRemoteKill', img: '' },
{ name: 'MMJ遥毙', url: '/webMMJ/mmjRemoteKill', img: '' },
],
'网络GLQ配置' : [
{
@ -70,7 +70,7 @@ export const MenuType: any = {
]
}, {
name: '远程文件配置',
check: false,
check: true,
data: [
{ name: '服务列表', url: '', img: '' },
{ name: '网络参数', url: '', img: '' },

Loading…
Cancel
Save