Merge branch 'master' into master_055

master_055
张瑞宁 10 months ago
commit e6d9b008a7

@ -15,7 +15,7 @@ const routes = [
// ------------------------------流程------------------------------
{ path: '/installExe/:fileType', name: '01MMD049安装.exe', component: '@/pages/InstallExe', layout: false },
{ path: '/initialSystem/:fileType', name: '初装系统', component: '@/pages/InitialSystem', layout: false },
{ path: '/coreSystemEntrance', name: '核心管理系统', component: '@/pages/CoreSystemEntrance', layout: false },
{ path: '/coreSystemEntrance/:fileType', name: '核心管理系统', component: '@/pages/CoreSystemEntrance', layout: false },
// ------------------------------GLQ远程维护----------------------------------

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@ -52,11 +52,3 @@
background-color: saddlebrown;
}
}
.goback {
position: absolute;
left: 20px;
top: 20px;
font-size: 18px;
cursor: pointer;
}

@ -1,5 +1,5 @@
import { FC, useEffect, useState } from 'react';
import { history, useLocation } from "umi";
import { history, useLocation, useParams } from "umi";
import styles from './index.less';
import { Input, Modal, message } from 'antd';
import ButtonComp from '@/components/ButtonComp';
@ -8,11 +8,20 @@ import { LeftOutlined } from '@ant-design/icons';
interface PageProps { }
const CoreSystemEntrance: FC<PageProps> = ({ }) => {
const urlParams = useParams();
const loaction = useLocation();
const [visibility, setVisibility] = useState<boolean>(false);
const [key, setKey] = useState<string>('一');
const [pin, setPin] = useState<any>('');
useEffect(() => {
let sysName = localStorage.getItem(`${urlParams?.fileType}`);
if (sysName) {
let data = JSON.parse(sysName);
console.log("1",data);
}
function handleKeyPress(e: any) {
if (e.key === 'Enter') {
setVisibility(true)
@ -35,10 +44,10 @@ const CoreSystemEntrance: FC<PageProps> = ({ }) => {
}
const submit = () => {
if (key == '一' && pin == '123123') {
if (key == '一' && pin == 'admin') {
setKey('二');
setPin('')
} else if (key == '二' && pin == '123123') {
} else if (key == '二' && pin == 'test') {
initData()
// 登录成功进入系统
history.push('/teamViewer/paramsSetting')
@ -49,7 +58,6 @@ const CoreSystemEntrance: FC<PageProps> = ({ }) => {
return (
<div className={styles.entrance}>
<div className={styles.goback} onClick={() => history.push('/')}><LeftOutlined /></div>
<div className={styles.text_warp}>
<div></div>
<div></div>
@ -60,7 +68,7 @@ const CoreSystemEntrance: FC<PageProps> = ({ }) => {
{/* 登录弹窗 */}
<Modal
title="用户登录pin码123123"
title="用户登录"
open={visibility}
centered
width={550}

@ -3,11 +3,14 @@ import styles from './index.less';
import { Input, Upload, UploadProps, message } from 'antd';
import ButtonComp from '@/components/ButtonComp';
import { college_table_query, deviceInit_init, deviceInstall_deviceInstall } from '@/services/api';
import { useParams } from 'umi';
import { fileStr, sysType } from '@/utils';
interface PageProps {
}
const DeviceInstall: FC<PageProps> = ({ }) => {
const urlParams = useParams();
const [dataLoading, setDataLoading] = useState(false);
const [fileInfo, setFileInfo] = useState({
"secret": "",
@ -35,11 +38,13 @@ const DeviceInstall: FC<PageProps> = ({ }) => {
const props: UploadProps = {
maxCount: 1,
beforeUpload: (file: any) => {
let str = sysType[urlParams?.fileType] + fileStr[urlParams?.fileType]
const formData = new FormData();
formData.append('file', file);
formData.append('sysType ', str);
deviceInit_init(formData).then((res) => {
if (res?.result == "success" && res?.data.length > 0) {
message.success('数据加载成功');
message.success('数据加载成功')
setFileInfo(res?.data[0]);
localStorage.setItem('deviceInit', JSON.stringify(res?.data[0]));
setDataLoading(true);

@ -24,8 +24,12 @@ const PowerOnAuth: FC<PageProps> = ({ }) => {
"fileName": null,
"dataInstalled": ""
});
const [isDeviceInit, setIsDeviceInit] = useState<boolean>(false);
useEffect(() => {
let deviceInit = localStorage.getItem('deviceInit');
if (deviceInit) {
setIsDeviceInit(true);
college_table_query({}).then((res) => {
if (res?.result == "success" && res?.data.length > 0) {
let layoutInfo: any = localStorage.getItem('powerOn');
@ -38,6 +42,9 @@ const PowerOnAuth: FC<PageProps> = ({ }) => {
message.error(res?.errorMsg);
}
})
}else {
setVisibility(true);
}
}, [])
return (
@ -97,7 +104,7 @@ const PowerOnAuth: FC<PageProps> = ({ }) => {
maskClosable={false}
>
<div style={{ fontSize: 16 }}>
!
{isDeviceInit ? '开机认证成功!' :'开机认证失败,请先完成设备初装!'}
</div>
<div className='flex_jE mt20'>

@ -4,6 +4,7 @@ import styles from './index.less';
import DeviceInstall from './DeviceInstall';
import PowerOnAuth from './PowerOnAuth';
import { LeftOutlined } from '@ant-design/icons';
import { Modal } from 'antd';
interface PageProps { }
@ -13,14 +14,17 @@ const InitialSystem: FC<PageProps> = ({ }) => {
const queryParams = new URLSearchParams(location.search);
const type = queryParams.get('type');
const count = queryParams.get('count');
const [visibility, setVisibility] = useState<boolean>(true);
const urlParams = useParams();
let installExe = localStorage.getItem(`${urlParams?.fileType}`);
let info = installExe ? JSON.parse(installExe) : null;
const MenuList: any = {
'admin': [
{ name: '算法加载', dom: <div></div>, img: '' },
{ name: '设备初装', dom: <DeviceInstall/>, img: '' },
{ name: '开机认证', dom: <PowerOnAuth/>, img: '' },
{ name: '设备初装', dom: <DeviceInstall />, img: '' },
{ name: '开机认证', dom: <PowerOnAuth />, img: '' },
{ name: '状态查询', dom: <div></div>, img: '' },
{ name: '安全销毁', dom: <div></div>, img: '' },
],
@ -36,7 +40,7 @@ const InitialSystem: FC<PageProps> = ({ }) => {
useEffect(() => {
if (type && count) {
setActiveItem(MenuList[type][count])
}else {
} else {
setActiveItem(null)
}
}, [location.search])
@ -57,6 +61,7 @@ const InitialSystem: FC<PageProps> = ({ }) => {
return (
<div className={styles.initial_warp}>
{info.installExe[14].select ? <>
{/* 头部 */}
<div className={styles.header_warp}>
<div className='ml20'></div>
@ -89,6 +94,23 @@ const InitialSystem: FC<PageProps> = ({ }) => {
}
</div>
</div>
</> : <Modal
title={'系统提示'}
open={visibility}
centered
width={500}
closeIcon={false}
footer={null}
maskClosable={false}
>
<div style={{padding: '20px 0'}}>
</div>
</Modal>
}
</div>
)
}

@ -0,0 +1,93 @@
import React, { FC, useEffect, useState } from 'react';
import styles from './index.less';
import { Input, Progress, message } from 'antd';
interface PageProps {
open: boolean;
onCancel: (name?: string) => void;
setInstallExe: (index: number, text: string) => void;
}
const CodeDriver: FC<PageProps> = ({
open = false,
onCancel,
setInstallExe
}) => {
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 3) {
const interval = setInterval(() => {
setPercentVal((val) => {
const randomStep = Math.round(Math.random() * (100 / 10));
const newPercent = val + randomStep;
if (newPercent >= 100) {
clearInterval(interval);
setValue()
return 100;
}
return newPercent;
});
}, 500);
return () => clearInterval(interval);
}
}, [active])
// 设置安装步骤进度
const setValue = () => {
setActive((e) => { return e + 1 })
}
const installSuccess = () => {
setInstallExe(14,'一体化密码机驱动安装成功!')
onCancel()
}
return <>
{
open &&
<div className={styles.modalOverlay}>
<div className={styles.modal} style={{ width: 500, height: 460 }}>
<img src={require(`../../../assets/images/codemanage/${active}.png`)} width={500} height={460} />
<div className={styles.close} onClick={()=>{
onCancel('一体化密码机驱动安装程序')
}}></div>
{[1, 2].includes(active) && <div className={styles.title}> </div>}
{![1, 2].includes(active) && <div className={styles.title1}> </div>}
{active == 1 && <div className={styles.pic1}></div>}
{active == 2 && <div className={styles.pic1} style={{ top: 166, left: 85 }}></div>}
{active == 4 && <div className={styles.pic1} style={{ top: 123, left: 85 }}></div>}
{[1, 2].includes(active) && <div
className={styles.net}
onClick={() => setValue()}>
</div>}
{active == 3 && <div className={styles.progress} style={{ background: '#fff', height: 15, width: 375, bottom: 222, left: 33, }}>
<Progress percent={percentVal} steps={42} size={[7, 14]} strokeColor={'rgb(56, 158, 13)'} trailColor={'rgba(0,0,0,0)'} showInfo={false} />
</div>}
{active == 4 && <div
className={styles.net}
style={{ bottom: 17, right: 27 }}
onClick={() => installSuccess()}>
</div>}
</div>
</div>
}
</>
};
export default CodeDriver;

@ -0,0 +1,114 @@
import React, { FC, useEffect, useState } from 'react';
import styles from './index.less';
import { Input, Progress, message } from 'antd';
import { countType } from '@/utils';
import { useParams } from 'umi';
import DEV from '@/utils/env/dev';
interface PageProps {
open: boolean;
onCancel: (name?: string) => void;
setInstallExe: (index: number, text: string) => void;
}
const CodeManage: FC<PageProps> = ({
open = false,
onCancel,
setInstallExe
}) => {
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
const urlParams = useParams();
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 3) {
const interval = setInterval(() => {
setPercentVal((val) => {
const randomStep = Math.round(Math.random() * (100 / 10));
const newPercent = val + randomStep;
if (newPercent >= 100) {
clearInterval(interval);
setValue()
return 100;
}
return newPercent;
});
}, 500);
return () => clearInterval(interval);
}
}, [active])
// 设置安装步骤进度
const setValue = () => {
setActive((e) => { return e + 1 })
}
// 在指定的目录下安装快捷方式
const installSuccess = async () => {
try {
const response = await fetch('http://localhost:3000/createShortcut', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
mode: "cors",
body: JSON.stringify({
folderPath: `${DEV.FILE_URL}/${countType[urlParams?.fileType]}`,
shortcutName: '专用核心密码综合管理系统',
shortcutURL: `${DEV.LOCAL_URL}/initialSystem/${urlParams?.fileType}`
}),
});
const data = await response.text();
setInstallExe(13, data)
onCancel()
} catch (error) {
message.error(error); // 处理请求错误
}
}
return <>
{
open &&
<div className={styles.modalOverlay}>
<div className={styles.modal} style={{ width: 500, height: 460 }}>
<img src={require(`../../../assets/images/codemanage/${active}.png`)} width={500} height={460} />
<div className={styles.close} onClick={()=>{
onCancel('一体化密码机管理软件')
}}></div>
{[1, 2].includes(active) && <div className={styles.title}> </div>}
{![1, 2].includes(active) && <div className={styles.title1}> </div>}
{active == 1 && <div className={styles.pic1}></div>}
{active == 2 && <div className={styles.pic1} style={{ top: 166, left: 85 }}></div>}
{active == 4 && <div className={styles.pic1} style={{ top: 123, left: 85 }}></div>}
{[1, 2].includes(active) && <div
className={styles.net}
onClick={() => setValue()}>
</div>}
{active == 3 && <div className={styles.progress} style={{ background: '#fff', height: 15, width: 375, bottom: 222, left: 33, }}>
<Progress percent={percentVal} steps={42} size={[7, 14]} strokeColor={'rgb(56, 158, 13)'} trailColor={'rgba(0,0,0,0)'} showInfo={false} />
</div>}
{active == 4 && <div
className={styles.net}
style={{ bottom: 17, right: 27 }}
onClick={() => installSuccess()}>
</div>}
</div>
</div>
}
</>
};
export default CodeManage;

@ -1,26 +1,43 @@
import React, { FC, useEffect, useState } from 'react';
import styles from './index.less';
import { Input, Progress, message } from 'antd';
import { countType } from '@/utils';
import { countType, sysType } from '@/utils';
import { useParams } from 'umi';
import DEV from '@/utils/env/dev';
interface PageProps {
open: boolean;
onCancel: () => void;
onCancel: (name?: string) => void;
setInstallExe: (index: number, text: string) => void;
}
const CoreArea: FC<PageProps> = ({
open = false,
onCancel
onCancel,
setInstallExe
}) => {
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
const [userName, setUserName] = useState('root');
const [password, setPassword] = useState('');
const [serverIp, setServerIp] = useState('127.0.0.1');
const [serverPort, setServerPort] = useState('2222');
const [localPort, setLocalPort] = useState('11110');
const urlParams = useParams();
useEffect(() => {
if (open) {
setActive(1)
setPassword('')
setServerIp('127.0.0.1')
}
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 3) {
if (active == 4) {
const interval = setInterval(() => {
setPercentVal((val) => {
const randomStep = Math.round(Math.random() * (100 / 10));
@ -53,54 +70,96 @@ const CoreArea: FC<PageProps> = ({
headers: { 'Content-Type': 'application/json' },
mode: "cors",
body: JSON.stringify({
folderPath: `C:/Users/lyc/Desktop/${countType[urlParams?.fileType]}`,
shortcutName: '专用核心密码综合管理系统',
shortcutURL: `http://localhost:8000/initialSystem/${urlParams?.fileType}`
folderPath: `${DEV.FILE_URL}/${countType[urlParams?.fileType]}`,
shortcutName: '核心区客户端',
shortcutURL: `${DEV.LOCAL_URL}/coreSystemEntrance/${urlParams?.fileType}?sysType=${encodeURIComponent(sysType[urlParams?.fileType] + '核心区')}`
}),
});
const data = await response.text();
message.success(data)
// 储存信息
let installExe: any = localStorage.getItem('installExe')
let obj = JSON.parse(installExe);
obj[9].select = true;
localStorage.setItem('installExe', JSON.stringify(obj));
setInstallExe(9, data)
onCancel()
} catch (error) {
message.error(error); // 处理请求错误
}
}
return <>
{
// open && <div>
const verifyPassword = () => {
if (userName.trim().length == 0) {
message.error('请输入用户名!')
return true;
}
// </div>
if (password.trim().length == 0) {
message.error('请输入密码!');
return true;
}
let sysName = localStorage.getItem(`${urlParams?.fileType}`);
if (sysName) {
let info = JSON.parse(sysName)
if (password !== info.GBasePassword) {
message.error('密码错误!');
return true;
}
}
}
return <>
{
open &&
<div className={styles.modalOverlay}>
<div className={styles.modal} style={{width: 500, height: 460}}>
<div className={styles.modal} style={{ width: 500, height: 460 }}>
<img src={require(`../../../assets/images/coreArea/${active}.png`)} width={500} height={460} />
<div className={styles.title}> </div>
<div></div>
{[1,2].includes(active) && <div
<div className={styles.close} onClick={() => {
onCancel('核心区安装程序')
}}></div>
{[1, 2, 3].includes(active) && <div className={styles.title}> </div>}
{![1, 2, 3].includes(active) && <div className={styles.title1}> </div>}
{active == 1 && <div className={styles.pic1}></div>}
{active == 2 && <>
<div className={styles.pic1} style={{ left: 10 }}>GBase</div>
<div className={styles.pic1} style={{ fontSize: 12, top: 130, left: 16 }}></div>
<div className={styles.pic1} style={{ fontSize: 12, top: 180, left: 27 }}></div>
<Input disabled value={userName} onChange={(e) => { setUserName(e.target.value) }} className={styles.input1} style={{ top: 121, left: 59, width: 325 }} />
<Input value={password} onChange={(e) => { setPassword(e.target.value) }} className={styles.input2} style={{ top: 171, left: 59, width: 325 }} />
</>}
{active == 3 && <div className={styles.pic1} style={{ top: 166, left: 85 }}></div>}
{active == 5 && <div className={styles.pic1} style={{ top: 123, left: 85 }}></div>}
{active == 6 && <>
<div className={styles.pic1} style={{ left: 15, top: 45 }}>GBase</div>
<div className={styles.pic1} style={{ fontSize: 12, top: 130, left: 16 }}>ip</div>
<div className={styles.pic1} style={{ fontSize: 12, top: 180, left: 39 }}></div>
<div className={styles.pic1} style={{ fontSize: 12, top: 230, left: 50 }}></div>
<Input value={serverIp} onChange={(e) => { setServerIp(e.target.value) }} className={styles.input1} style={{ top: 121, left: 109, width: 325 }} />
<Input disabled value={serverPort} onChange={(e) => { setServerPort(e.target.value) }} className={styles.input2} style={{ top: 171, left: 109, width: 325 }} />
<Input disabled value={localPort} onChange={(e) => { setLocalPort(e.target.value) }} className={styles.input2} style={{ top: 221, left: 109, width: 325 }} />
<div className={styles.pic1} style={{ fontSize: 12, top: 427, left: 265 }}></div>
<div className={styles.pic1} style={{ fontSize: 12, top: 427, left: 343 }}></div>
<div className={styles.pic1} style={{ fontSize: 12, top: 427, left: 420 }}></div>
</>}
{[1, 2, 3].includes(active) && <div
className={styles.net}
onClick={() => setValue()}>
onClick={() => {
if (active == 2 && verifyPassword()) return
setValue()
}}>
</div>}
{active == 3 && <div className={styles.progress} style={{background: '#fff', height: 15, width: 375, bottom: 222, left: 33,}}>
{active == 4 && <div className={styles.progress} style={{ background: '#fff', height: 15, width: 375, bottom: 222, left: 33, }}>
<Progress percent={percentVal} steps={42} size={[7, 14]} strokeColor={'rgb(56, 158, 13)'} trailColor={'rgba(0,0,0,0)'} showInfo={false} />
</div>}
{active == 4 && <div
{[5, 6].includes(active) && <div
className={styles.net}
style={{bottom: 17, right: 27}}
onClick={() => installSuccess()}>
style={{ bottom: 17, right: active == 5 ? 27 : 187 }}
onClick={() => {
active == 5 ? setValue() : installSuccess()
}}>
</div>}
</div>
</div>

@ -0,0 +1,93 @@
import React, { FC, useEffect, useState } from 'react';
import styles from './index.less';
import { Input, Progress, message } from 'antd';
interface PageProps {
open: boolean;
onCancel: (name?: string) => void;
setInstallExe: (index: number, text: string) => void;
}
const CodeDriver: FC<PageProps> = ({
open = false,
onCancel,
setInstallExe
}) => {
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 3) {
const interval = setInterval(() => {
setPercentVal((val) => {
const randomStep = Math.round(Math.random() * (100 / 10));
const newPercent = val + randomStep;
if (newPercent >= 100) {
clearInterval(interval);
setValue()
return 100;
}
return newPercent;
});
}, 500);
return () => clearInterval(interval);
}
}, [active])
// 设置安装步骤进度
const setValue = () => {
setActive((e) => { return e + 1 })
}
const installSuccess = () => {
setInstallExe(12, '密码资源输入输出设备驱动安装成功!')
onCancel()
}
return <>
{
open &&
<div className={styles.modalOverlay}>
<div className={styles.modal} style={{ width: 500, height: 460 }}>
<img src={require(`../../../assets/images/codemanage/${active}.png`)} width={500} height={460} />
<div className={styles.close} onClick={()=>{
onCancel('密码资源输入输出设备驱动')
}}></div>
{[1, 2].includes(active) && <div className={styles.title}> </div>}
{![1, 2].includes(active) && <div className={styles.title1}> </div>}
{active == 1 && <div className={styles.pic1}></div>}
{active == 2 && <div className={styles.pic1} style={{ top: 166, left: 85}}></div>}
{active == 4 && <div className={styles.pic1} style={{ top: 123, left: 85}}></div>}
{[1, 2].includes(active) && <div
className={styles.net}
onClick={() => setValue()}>
</div>}
{active == 3 && <div className={styles.progress} style={{ background: '#fff', height: 15, width: 375, bottom: 222, left: 33, }}>
<Progress percent={percentVal} steps={42} size={[7, 14]} strokeColor={'rgb(56, 158, 13)'} trailColor={'rgba(0,0,0,0)'} showInfo={false} />
</div>}
{active == 4 && <div
className={styles.net}
style={{ bottom: 17, right: 27 }}
onClick={() => installSuccess()}>
</div>}
</div>
</div>
}
</>
};
export default CodeDriver;

@ -1,26 +1,43 @@
import React, { FC, useEffect, useState } from 'react';
import styles from './index.less';
import { Input, Progress, message } from 'antd';
import { countType } from '@/utils';
import { countType, sysType } from '@/utils';
import { useParams } from 'umi';
import DEV from '@/utils/env/dev';
interface PageProps {
open: boolean;
onCancel: () => void;
onCancel: (name?: string) => void;
setInstallExe: (index: number, text: string) => void;
}
const DutyArea: FC<PageProps> = ({
open = false,
onCancel
onCancel,
setInstallExe
}) => {
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
const [userName, setUserName] = useState('root');
const [password, setPassword] = useState('');
const [serverIp, setServerIp] = useState('127.0.0.1');
const [serverPort, setServerPort] = useState('2222');
const [localPort, setLocalPort] = useState('11110');
const urlParams = useParams();
useEffect(() => {
if (open) {
setActive(1)
setPassword('')
setServerIp('127.0.0.1')
}
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 3) {
if (active == 4) {
const interval = setInterval(() => {
setPercentVal((val) => {
const randomStep = Math.round(Math.random() * (100 / 10));
@ -53,46 +70,92 @@ const DutyArea: FC<PageProps> = ({
headers: { 'Content-Type': 'application/json' },
mode: "cors",
body: JSON.stringify({
folderPath: `C:/Users/lyc/Desktop/${countType[urlParams?.fileType]}`,
shortcutName: '专用核心密码综合管理系统',
shortcutURL: `http://localhost:8000/initialSystem/${urlParams?.fileType}`
folderPath: `${DEV.FILE_URL}/${countType[urlParams?.fileType]}`,
shortcutName: '执勤区客户端',
shortcutURL: `${DEV.LOCAL_URL}/coreSystemEntrance/${urlParams?.fileType}?sysType=${encodeURIComponent(sysType[urlParams?.fileType] + '执勤区')}`
}),
});
const data = await response.text();
message.success(data)
// 储存信息
// let installExe: any = localStorage.getItem('installExe')
// let obj = JSON.parse(installExe);
// obj[10].select = true;
// localStorage.setItem('installExe', JSON.stringify(obj));
setInstallExe(10, data)
onCancel()
} catch (error) {
message.error(error); // 处理请求错误
}
}
const verifyPassword = () => {
if (userName.trim().length == 0) {
message.error('请输入用户名!')
return true;
}
if (password.trim().length == 0) {
message.error('请输入密码!');
return true;
}
if (false) {
message.error('用户名或密码错误!');
return true;
}
}
return <>
{
open &&
<div className={styles.modalOverlay}>
<div className={styles.modal} style={{width: 500, height: 460}}>
<div className={styles.modal} style={{ width: 500, height: 460 }}>
<img src={require(`../../../assets/images/coreArea/${active}.png`)} width={500} height={460} />
{[1,2].includes(active) && <div
<div className={styles.close} onClick={()=>{
onCancel('执勤区安装程序')
}}></div>
{[1, 2, 3].includes(active) && <div className={styles.title}> </div>}
{![1, 2, 3].includes(active) && <div className={styles.title1}> </div>}
{active == 1 && <div className={styles.pic1}></div>}
{active == 2 && <>
<div className={styles.pic1} style={{left: 10}}>GBase</div>
<div className={styles.pic1} style={{fontSize: 12, top: 130, left: 16}}></div>
<div className={styles.pic1} style={{fontSize: 12, top: 180, left: 27}}></div>
<Input value={userName} onChange={(e) => { setUserName(e.target.value) }} className={styles.input1} style={{top: 121, left: 59, width: 325}}/>
<Input value={password} onChange={(e) => { setPassword(e.target.value) }} className={styles.input2} style={{top: 171, left: 59, width: 325}}/>
</>}
{active == 3 && <div className={styles.pic1} style={{ top: 166, left: 85 }}></div>}
{active == 5 && <div className={styles.pic1} style={{ top: 123, left: 85 }}></div>}
{active == 6 && <>
<div className={styles.pic1} style={{left: 15, top: 45}}>GBase</div>
<div className={styles.pic1} style={{fontSize: 12, top: 130, left: 16}}>ip</div>
<div className={styles.pic1} style={{fontSize: 12, top: 180, left: 39}}></div>
<div className={styles.pic1} style={{fontSize: 12, top: 230, left: 50}}></div>
<Input value={serverIp} onChange={(e) => { setServerIp(e.target.value) }} className={styles.input1} style={{top: 121, left: 109, width: 325}}/>
<Input disabled value={serverPort} onChange={(e) => { setServerPort(e.target.value) }} className={styles.input2} style={{top: 171, left: 109, width: 325}}/>
<Input disabled value={localPort} onChange={(e) => { setLocalPort(e.target.value) }} className={styles.input2} style={{top: 221, left: 109, width: 325}}/>
<div className={styles.pic1} style={{fontSize: 12, top: 427, left: 265}}></div>
<div className={styles.pic1} style={{fontSize: 12, top: 427, left: 343}}></div>
<div className={styles.pic1} style={{fontSize: 12, top: 427, left: 420}}></div>
</>}
{[1, 2, 3].includes(active) && <div
className={styles.net}
onClick={() => setValue()}>
onClick={() => {
if (active == 2 && verifyPassword()) return
setValue()
}}>
</div>}
{active == 3 && <div className={styles.progress} style={{background: '#fff', height: 15, width: 375, bottom: 222, left: 33,}}>
{active == 4 && <div className={styles.progress} style={{ background: '#fff', height: 15, width: 375, bottom: 222, left: 33, }}>
<Progress percent={percentVal} steps={42} size={[7, 14]} strokeColor={'rgb(56, 158, 13)'} trailColor={'rgba(0,0,0,0)'} showInfo={false} />
</div>}
{active == 4 && <div
{[5, 6].includes(active) && <div
className={styles.net}
style={{bottom: 17, right: 27}}
onClick={() => installSuccess()}>
style={{ bottom: 17, right: active == 5 ? 27 : 187}}
onClick={() => {
active == 5 ? setValue() : installSuccess()
}}>
</div>}
</div>
</div>

@ -1,18 +1,25 @@
import React, { FC, useEffect, useState } from 'react';
import styles from './index.less';
import { Input, Progress, message } from 'antd';
interface PageProps {
open: boolean;
onCancel: () => void;
onCancel: (name?: string) => void;
setInstallExe: (index: number, text: string) => void;
}
const FlashPlayer: FC<PageProps> = ({
open = false,
onCancel
onCancel,
setInstallExe
}) => {
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 2) {
@ -42,11 +49,7 @@ const FlashPlayer: FC<PageProps> = ({
// 安装完成后 记录安装的信息
const installSuccess = () => {
let installExe: any = localStorage.getItem('installExe')
let data = JSON.parse(installExe);
data[2].select = true;
localStorage.setItem('installExe', JSON.stringify(data));
message.success('FlashPlayer安装成功')
setInstallExe(2, 'FlashPlayer安装成功')
onCancel()
}
@ -57,6 +60,10 @@ const FlashPlayer: FC<PageProps> = ({
<div className={styles.modal} style={{ width: 656, height: 403 }}>
<img src={require(`../../../assets/images/flashPlayer/${active}.png`)} width={656} height={403} />
<div className={styles.close} onClick={()=>{
onCancel('FlashPlayer9')
}}></div>
{active != 2 && <div
className={styles.f_p}
onClick={() => {

@ -1,20 +1,33 @@
import React, { FC, useEffect, useState } from 'react';
import styles from './index.less';
import { Input, Progress, message } from 'antd';
import { useParams } from 'umi';
interface PageProps {
open: boolean;
onCancel: () => void;
onCancel: (name?: string) => void;
setInstallExe: (index: number, text: string) => void;
}
const GBase: FC<PageProps> = ({
open = false,
onCancel
onCancel,
setInstallExe
}) => {
const urlParams = useParams();
const [active, setActive] = useState(1);
const [password, setPassword] = useState('');
const [confirmPassword, setConfirmPassword] = useState('');
const [percentVal, setPercentVal] = useState(0);
useEffect(() => {
if (open) {
setActive(1)
setPassword('')
setConfirmPassword('')
}
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 11) {
@ -44,17 +57,13 @@ const GBase: FC<PageProps> = ({
// 安装完成后 记录安装的信息
const installSuccess = () => {
let installExe: any = localStorage.getItem('installExe')
let data = JSON.parse(installExe);
data[0].select = true;
localStorage.setItem('installExe', JSON.stringify(data));
message.success('Gbase安装成功')
setInstallExe(0, 'Gbase安装成功')
onCancel()
}
const verifyPassword = () => {
if (password.trim().length == 0 || confirmPassword.trim().length == 0) {
message.info('请输入密码!')
message.error('请输入密码!')
return true;
}
@ -64,6 +73,15 @@ const GBase: FC<PageProps> = ({
}
}
const setGBasePassword = () => {
let sysName = localStorage.getItem(`${urlParams?.fileType}`);
if (sysName) {
let info = JSON.parse(sysName);
info.GBasePassword = password;
localStorage.setItem(`${urlParams?.fileType}`, JSON.stringify(info));
}
}
return <>
{
open &&
@ -73,11 +91,9 @@ const GBase: FC<PageProps> = ({
{active == 1 && <div className={styles.a1} onClick={() => setValue()}></div>}
{(active > 1 && active != 11) && <div className={styles.a2} onClick={() => {
if (active == 8 && verifyPassword()) return
if (active == 8 && verifyPassword()) return;
if (active == 8) setGBasePassword();
if (active == 12) { installSuccess(); return }
setValue()
}}></div>}
@ -96,6 +112,9 @@ const GBase: FC<PageProps> = ({
{active == 11 && <div className={styles.progress}>
<Progress percent={percentVal} steps={41} size={[9, 19]} strokeColor={'rgb(56, 158, 13)'} trailColor={'rgba(0,0,0,0)'} showInfo={false} />
</div>}
<div className={styles.gbase_close} onClick={() => onCancel('GBase')}></div>
</div>
</div>
}

@ -1,19 +1,26 @@
import React, { FC, useEffect, useState } from 'react';
import styles from './index.less';
import { Input, Progress, message } from 'antd';
interface PageProps {
open: boolean;
onCancel: () => void;
onCancel: (name?: string) => void;
setInstallExe: (index: number, text: string) => void;
}
const HGoogleEarth: FC<PageProps> = ({
open = false,
onCancel
onCancel,
setInstallExe
}) => {
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
const [showOk, setShowOk] = useState(false);
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 2) {
@ -39,11 +46,7 @@ const HGoogleEarth: FC<PageProps> = ({
// 安装完成后 记录安装的信息
const installSuccess = () => {
let installExe: any = localStorage.getItem('installExe')
let data = JSON.parse(installExe);
data[6].select = true;
localStorage.setItem('installExe', JSON.stringify(data));
message.success('HGoogleEarth安装成功')
setInstallExe(6, 'HGoogleEarth安装成功')
onCancel()
}
@ -59,6 +62,10 @@ const HGoogleEarth: FC<PageProps> = ({
<div className={styles.modal} style={{ width: 'auto', height: ' auto' }}>
<img src={require(`../../../assets/images/googleEarth/${active}.jpg`)} />
<div className={styles.close} onClick={()=>{
onCancel('HGoogleEarth')
}}></div>
{active == 1 && <div className={styles.g_e} onClick={() => setValue()}></div>}
{active == 2 && <>

@ -1,18 +1,25 @@
import React, { FC, useEffect, useState } from 'react';
import styles from './index.less';
import { Input, Progress, message } from 'antd';
interface PageProps {
open: boolean;
onCancel: () => void;
onCancel: (name?: string) => void;
setInstallExe: (index: number, text: string) => void;
}
const MSXML: FC<PageProps> = ({
open = false,
onCancel
onCancel,
setInstallExe
}) => {
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 6) {
@ -42,11 +49,7 @@ const MSXML: FC<PageProps> = ({
// 安装完成后 记录安装的信息
const installSuccess = () => {
let installExe: any = localStorage.getItem('installExe')
let data = JSON.parse(installExe);
data[3].select = true;
localStorage.setItem('installExe', JSON.stringify(data));
message.success('MSXML安装成功')
setInstallExe(3, 'MSXML安装成功')
onCancel()
}
@ -57,6 +60,10 @@ const MSXML: FC<PageProps> = ({
<div className={styles.modal}>
<img src={require(`../../../assets/images/MSXML/${active}.jpg`)} width={689} height={508} />
<div className={styles.close} onClick={()=>{
onCancel('MSXML4')
}}></div>
{![6, 7].includes(active) && <div
className={styles.msx1}
style={active == 5 ? {width: 140, right: 170} : {}}

@ -1,18 +1,25 @@
import React, { FC, useEffect, useState } from 'react';
import styles from './index.less';
import { Input, Progress, message } from 'antd';
interface PageProps {
open: boolean;
onCancel: () => void;
onCancel: (name?: string) => void;
setInstallExe: (index: number, text: string) => void;
}
const Net: FC<PageProps> = ({
open = false,
onCancel
onCancel,
setInstallExe
}) => {
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 3) {
@ -42,11 +49,7 @@ const Net: FC<PageProps> = ({
// 安装完成后 记录安装的信息
const installSuccess = () => {
let installExe: any = localStorage.getItem('installExe')
let data = JSON.parse(installExe);
data[4].select = true;
localStorage.setItem('installExe', JSON.stringify(data));
message.success('Net安装成功')
setInstallExe(4, 'Net安装成功')
onCancel()
}
@ -57,6 +60,10 @@ const Net: FC<PageProps> = ({
<div className={styles.modal} style={{width: 500, height: 460}}>
<img src={require(`../../../assets/images/net/${active}.png`)} width={500} height={460} />
<div className={styles.close} onClick={()=>{
onCancel('.NET 2.0')
}}></div>
{[1,2].includes(active) && <div
className={styles.net}
onClick={() => setValue()}>

@ -1,18 +1,25 @@
import React, { FC, useEffect, useState } from 'react';
import styles from './index.less';
import { Input, Progress, message } from 'antd';
interface PageProps {
open: boolean;
onCancel: () => void;
onCancel: (name?: string) => void;
setInstallExe: (index: number, text: string) => void;
}
const NetSP1: FC<PageProps> = ({
open = false,
onCancel
onCancel,
setInstallExe
}) => {
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 3) {
@ -42,11 +49,7 @@ const NetSP1: FC<PageProps> = ({
// 安装完成后 记录安装的信息
const installSuccess = () => {
let installExe: any = localStorage.getItem('installExe')
let data = JSON.parse(installExe);
data[5].select = true;
localStorage.setItem('installExe', JSON.stringify(data));
message.success('Net安装成功')
setInstallExe(5, 'Net SP1安装成功')
onCancel()
}
@ -57,6 +60,10 @@ const NetSP1: FC<PageProps> = ({
<div className={styles.modal} style={{width: 500, height: 460}}>
<img src={require(`../../../assets/images/netsp1/${active}.png`)} width={500} height={460} />
<div className={styles.close} onClick={()=>{
onCancel('.NET 2.0 SP1')
}}></div>
{[1,2].includes(active) && <div
className={styles.net}
onClick={() => setValue()}>

@ -155,4 +155,49 @@
font-size: 13px;
cursor: pointer;
}
.gbase_close {
position: absolute;
width: 18px;
height: 18px;
top: 3px;
right: 5px;
cursor: pointer;
}
}
.title{
position: absolute;
top: 8px;
left: 25px;
color: #fff;
font-size: 12px;
font-weight: bold;
}
.title1{
position: absolute;
top: 10px;
left: 25px;
color: #fff;
font-size: 12px;
font-weight: bold;
}
.pic1{
position: absolute;
top: 41px;
left: 70px;
font-size: 13px;
font-weight: bold;
}
.close{
width: 25px;
height: 25px;
// background: red;
position: absolute;
top: 0px;
right: 5px;
&:hover{
cursor: pointer;
}
}

@ -12,6 +12,9 @@ import Net from './exeDialog/Net';
import NetSP1 from './exeDialog/NetSP1';
import CoreArea from './exeDialog/CoreArea';
import DutyArea from './exeDialog/DutyArea';
import CodeManage from './exeDialog/CodeManage';
import CodeDriver from './exeDialog/CodeDriver';
import DeviceDriver from './exeDialog/DeviceDriver';
const typeData = [
// 依赖程序
@ -40,7 +43,9 @@ const typeData = [
interface PageProps { }
const InstallExe: FC<PageProps> = ({ }) => {
const [listData, setListData] = useState<any[]>([]);
const urlParams = useParams();
const [listData, setListData] = useState<any[]>(typeData);
const [open1, setOpen1] = useState(false); // Gbase
const [open2, setOpen2] = useState(false); // HGoogleEarth
const [open3, setOpen3] = useState(false); // MSXML4
@ -49,16 +54,26 @@ const InstallExe: FC<PageProps> = ({ }) => {
const [open6, setOpen6] = useState(false); // NET 2.0 SP1
const [open7, setOpen7] = useState(false); // 核心区安装程序
const [open8, setOpen8] = useState(false); // 核心区安装程序
const [open8, setOpen8] = useState(false); // 执勤区安装程序
const [open9, setOpen9] = useState(false); // 密码资源输入输出设备驱动
const [open11, setOpen11] = useState(false); // 一体化密码机管理软件
const [open12, setOpen12] = useState(false); // 一体化密码机驱动安装程序
useEffect(() => {
let data = localStorage.getItem('installExe');
if (data) {
setListData(JSON.parse(data));
let sysName = localStorage.getItem(`${urlParams?.fileType}`);
if (sysName) {
let info = JSON.parse(sysName)
if (info?.installExe) {
setListData(info.installExe);
} else {
localStorage.setItem('installExe', JSON.stringify(typeData));
info.installExe = typeData
localStorage.setItem(`${urlParams?.fileType}`, JSON.stringify(info));
setListData(typeData);
}
} else {
localStorage.setItem(`${urlParams?.fileType}`, JSON.stringify({}));
}
}, [])
const itemDom = (item: any, index: number) => {
@ -85,17 +100,6 @@ const InstallExe: FC<PageProps> = ({ }) => {
// 如果(选中) 或者 (不需要安装的) 就返回
if (data.select || notRequireds.includes(item.name)) return data;
// 暂时先gbase升级程序没找到安装流程图片通过点击就安装成功
if (data.name == 'GBase升级程序') {
message.success('GBase升级成功')
let installExe: any = localStorage.getItem('installExe')
let obj = JSON.parse(installExe);
obj[1].select = true;
localStorage.setItem('installExe', JSON.stringify(data));
return { ...data, select: !data.select };
}
// 依赖程序必安装的完成后才能点就右侧2块的内容专用核心密码管理分系统、一体化密码机、JJP903C密码钥匙)
if (key > 8 && needArr) {
message.info('请将需要的依赖程序安装完成!');
@ -119,6 +123,15 @@ const InstallExe: FC<PageProps> = ({ }) => {
case 'GBase':
setOpen1(true)
break;
case 'GBase升级程序':
let sysName = localStorage.getItem(`${urlParams?.fileType}`);
if (sysName) {
let info = JSON.parse(sysName);
info.installExe[1].select = true;
localStorage.setItem(`${urlParams?.fileType}`, JSON.stringify(info));
message.success('GBase升级成功')
}
break;
case 'HGoogleEarth':
setOpen2(true)
break;
@ -138,15 +151,44 @@ const InstallExe: FC<PageProps> = ({ }) => {
setOpen7(true)
break;
case '执勤区安装程序':
// setOpen8(true)
let data: any = localStorage.getItem('installExe')
let obj = JSON.parse(data);
obj[9].select = false;
localStorage.setItem('installExe', JSON.stringify(obj));
setOpen8(true)
break;
case '密码资源输入输出设备驱动':
setOpen9(true)
break;
case '一体化密码机管理软件':
setOpen11(true)
break;
case '一体化密码机驱动安装程序':
setOpen12(true)
break;
}
}
const setInstallExe = (index: number, text: string) => {
let sysName = localStorage.getItem(`${urlParams?.fileType}`);
if (sysName) {
let info = JSON.parse(sysName);
info.installExe[index].select = true;
localStorage.setItem(`${urlParams?.fileType}`, JSON.stringify(info));
message.success(text)
}
}
// 取消选中
const uncheck = (name: any) => {
if (name) {
setListData((prevListData) => {
return prevListData.map((e) => {
if (e.name === name) {
return { ...e, select: false };
}
return e;
});
});
}
};
return (
<div className={styles.exeInstall}>
<div className={styles.title_con}></div>
@ -173,20 +215,62 @@ const InstallExe: FC<PageProps> = ({ }) => {
</div>
</div>
<div className='flex_jE' style={{ marginTop: '3vh', paddingRight: '4.5vh' }}>
<ButtonComp text={'退出'} onClick={() => history.push('/index')} />
<ButtonComp text={'退出'} onClick={() => { }} />
</div>
{/* 依赖程序安装--弹窗 */}
<GBase open={open1} onCancel={() => setOpen1(false)} />
<HGoogleEarth open={open2} onCancel={() => setOpen2(false)} />
<MSXML open={open3} onCancel={() => setOpen3(false)} />
<FlashPlayer open={open4} onCancel={() => setOpen4(false)} />
<Net open={open5} onCancel={() => setOpen5(false)} />
<NetSP1 open={open6} onCancel={() => setOpen6(false)} />
<GBase
open={open1}
onCancel={(e) => { uncheck(e); setOpen1(false) }}
setInstallExe={(i, t) => { setInstallExe(i, t) }}
/>
<HGoogleEarth
open={open2}
onCancel={(e) => { uncheck(e); setOpen2(false) }}
setInstallExe={(i, t) => { setInstallExe(i, t) }} />
<MSXML
open={open3}
onCancel={(e) => { uncheck(e); setOpen3(false) }}
setInstallExe={(i, t) => { setInstallExe(i, t) }} />
<FlashPlayer
open={open4}
onCancel={(e) => { uncheck(e); setOpen4(false) }}
setInstallExe={(i, t) => { setInstallExe(i, t) }} />
<Net
open={open5}
onCancel={(e) => { uncheck(e); setOpen5(false) }}
setInstallExe={(i, t) => { setInstallExe(i, t) }} />
<NetSP1
open={open6}
onCancel={(e) => { uncheck(e); setOpen6(false) }}
setInstallExe={(i, t) => { setInstallExe(i, t) }} />
{/* 专用核心密码管理分系统--弹窗 */}
<CoreArea open={open7} onCancel={() => setOpen7(false)} />
<DutyArea open={open8} onCancel={() => setOpen8(false)} />
<CoreArea
open={open7}
onCancel={(e) => { uncheck(e); setOpen7(false) }}
setInstallExe={(i, t) => { setInstallExe(i, t) }} />
<DutyArea
open={open8}
onCancel={(e) => { uncheck(e); setOpen8(false) }}
setInstallExe={(i, t) => { setInstallExe(i, t) }} />
<DeviceDriver
open={open9}
onCancel={(e) => { uncheck(e); setOpen9(false) }}
setInstallExe={(i, t) => { setInstallExe(i, t) }} />
{/* 一体化密码机--弹窗 */}
<CodeManage
open={open11}
onCancel={(e) => { uncheck(e); setOpen11(false) }}
setInstallExe={(i, t) => { setInstallExe(i, t) }} />
<CodeDriver
open={open12}
onCancel={(e) => { uncheck(e); setOpen12(false) }}
setInstallExe={(i, t) => { setInstallExe(i, t) }} />
</div>
)
}

@ -11,8 +11,8 @@ import ClearInfoDialog from '@/components/ClearInfoDialog';
// 首页(目前无用了)
export default function IndexPage() {
// 是否认证通过
const [isAuth, setIsAuth] = useState(false);
const [visibility, setVisibility] = useState<boolean>(false);
const [isAuth, setIsAuth] = useState(true);
const [visibility, setVisibility] = useState<boolean>(true);
const [form] = Form.useForm();
const [loading, setLoading] = useState(false);
const [tishiDialog, setTishiDialog] = useState(false);
@ -20,19 +20,19 @@ export default function IndexPage() {
const list = [
{ name: '01MMD049安装.exe', img: '', url: '/installExe' },
{ name: '初装系统', img: '', url: '/initialSystem' },
{ name: '核心管理系统', img: '', url: '/coreSystemEntrance' },
{ name: '核心管理系统', img: '', url: '/coreSystemEntrance/hx1' },
{ name: '需要导出的文件', img: '', url: null },
{ name: '生成导出的文件', img: '', url: null },
]
useEffect(() => {
let is_auth: any = localStorage.getItem('is_auth');
if (is_auth) {
setIsAuth(true)
} else {
initForm();
setVisibility(true);
}
// let is_auth: any = localStorage.getItem('is_auth');
// if (is_auth) {
// setIsAuth(true)
// } else {
// initForm();
// setVisibility(true);
// }
}, [])

@ -1,6 +1,8 @@
export const DEV = {
PROXY_SERVER: 'http://localhost:8088',
// PROXY_SERVER: 'http://127.0.0.1:8088',
LOCAL_URL: 'http://localhost:8000',
FILE_URL: 'C:/Users/lyc/Desktop' // 快捷方式储存的路径
};
export default DEV;

@ -5,6 +5,20 @@ export const countType = {
'zq2': '执勤区二'
}
export const fileStr = {
'hx1': '核心区',
'hx2': '核心区',
'zq1': '执勤区',
'zq2': '执勤区'
}
export const sysType = {
'hx1': '上级',
'hx2': '下级',
'zq1': '上级',
'zq2': '下级'
}
export const rowClassName = (record:any, index: any) => {
return index % 2 === 0 ? 'even-row' : 'odd-row';
};
Loading…
Cancel
Save