diff --git a/config/routes/index.ts b/config/routes/index.ts index 0ca1156..7093b6a 100644 --- a/config/routes/index.ts +++ b/config/routes/index.ts @@ -8,7 +8,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远程维护---------------------------------- diff --git a/src/assets/images/coreArea/2.png b/src/assets/images/coreArea/2.png index ad72215..89bfaf1 100644 Binary files a/src/assets/images/coreArea/2.png and b/src/assets/images/coreArea/2.png differ diff --git a/src/assets/images/coreArea/3.png b/src/assets/images/coreArea/3.png index 98e8126..ad72215 100644 Binary files a/src/assets/images/coreArea/3.png and b/src/assets/images/coreArea/3.png differ diff --git a/src/assets/images/coreArea/4.png b/src/assets/images/coreArea/4.png index 1114159..98e8126 100644 Binary files a/src/assets/images/coreArea/4.png and b/src/assets/images/coreArea/4.png differ diff --git a/src/assets/images/coreArea/5.png b/src/assets/images/coreArea/5.png new file mode 100644 index 0000000..4af588a Binary files /dev/null and b/src/assets/images/coreArea/5.png differ diff --git a/src/assets/images/coreArea/6.png b/src/assets/images/coreArea/6.png new file mode 100644 index 0000000..252e2f1 Binary files /dev/null and b/src/assets/images/coreArea/6.png differ diff --git a/src/pages/CoreSystemEntrance/index.less b/src/pages/CoreSystemEntrance/index.less index 50dec14..f6cb524 100644 --- a/src/pages/CoreSystemEntrance/index.less +++ b/src/pages/CoreSystemEntrance/index.less @@ -51,12 +51,4 @@ margin-right: 20px; background-color: saddlebrown; } -} - -.goback { - position: absolute; - left: 20px; - top: 20px; - font-size: 18px; - cursor: pointer; } \ No newline at end of file diff --git a/src/pages/CoreSystemEntrance/index.tsx b/src/pages/CoreSystemEntrance/index.tsx index b1246e2..c1b7ae1 100644 --- a/src/pages/CoreSystemEntrance/index.tsx +++ b/src/pages/CoreSystemEntrance/index.tsx @@ -13,6 +13,11 @@ const CoreSystemEntrance: FC = ({ }) => { const [pin, setPin] = useState(''); useEffect(() => { + let installExe: any = localStorage.getItem('installExe') + let data = JSON.parse(installExe); + console.log("1",data); + + function handleKeyPress(e: any) { if (e.key === 'Enter') { setVisibility(true) @@ -35,10 +40,10 @@ const CoreSystemEntrance: FC = ({ }) => { } 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 +54,6 @@ const CoreSystemEntrance: FC = ({ }) => { return (
-
history.push('/')}>返回
总参谋部
一体化对称密码管理系统
@@ -60,7 +64,7 @@ const CoreSystemEntrance: FC = ({ }) => { {/* 登录弹窗 */} = ({ }) => { "fileName": null, "dataInstalled": "" }); + const [isDeviceInit, setIsDeviceInit] = useState(false); useEffect(() => { - college_table_query({}).then((res) => { - if (res?.result == "success" && res?.data.length > 0) { - let layoutInfo: any = localStorage.getItem('powerOn'); - if (!JSON.parse(layoutInfo)) { - setVisibility(true); - localStorage.setItem('powerOn', JSON.stringify({ powerOn: true })); + 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'); + if (!JSON.parse(layoutInfo)) { + setVisibility(true); + localStorage.setItem('powerOn', JSON.stringify({ powerOn: true })); + } + setDeviceInfo(res?.data[0]); + } else { + message.error(res?.errorMsg); } - setDeviceInfo(res?.data[0]); - } else { - message.error(res?.errorMsg); - } - }) + }) + }else { + setVisibility(true); + } }, []) return ( @@ -97,7 +104,7 @@ const PowerOnAuth: FC = ({ }) => { maskClosable={false} >
- 开机认证成功! + {isDeviceInit ? '开机认证成功!' :'开机认证失败,请先完成设备初装!'}
diff --git a/src/pages/InitialSystem/index.tsx b/src/pages/InitialSystem/index.tsx index 69147b2..fe5d95d 100644 --- a/src/pages/InitialSystem/index.tsx +++ b/src/pages/InitialSystem/index.tsx @@ -22,8 +22,8 @@ const InitialSystem: FC = ({ }) => { const MenuList: any = { 'admin': [ { name: '算法加载', dom:
暂无内容
, img: '' }, - { name: '设备初装', dom: , img: '' }, - { name: '开机认证', dom: , img: '' }, + { name: '设备初装', dom: , img: '' }, + { name: '开机认证', dom: , img: '' }, { name: '状态查询', dom:
暂无内容
, img: '' }, { name: '安全销毁', dom:
暂无内容
, img: '' }, ], @@ -38,8 +38,8 @@ const InitialSystem: FC = ({ }) => { useEffect(() => { if (type && count) { - setActiveItem(MenuList[type][count]) - }else { + setActiveItem(MenuList[type][count]) + } else { setActiveItem(null) } }, [location.search]) @@ -47,7 +47,7 @@ const InitialSystem: FC = ({ }) => { const itemDom = (type: string, item: any, index: number) => { return (
{ - setActiveItem(item) + setActiveItem(item) history.push(`/initialSystem/${urlParams?.fileType}?type=${type}&count=${index}`) }}>
@@ -61,40 +61,40 @@ const InitialSystem: FC = ({ }) => { return (
{info[14].select ? <> - {/* 头部 */} -
-
专用核心密码机管理软件
-
-
- {/* 底部 */} -
- {/* 左侧菜单 */} -
+ {/* 头部 */} +
+
专用核心密码机管理软件
+
+
+ {/* 底部 */} +
+ {/* 左侧菜单 */} +
-
密码机管理
- {MenuList['admin'].map((item: any, index: number) => itemDom('admin', item, index))} +
密码机管理
+ {MenuList['admin'].map((item: any, index: number) => itemDom('admin', item, index))} -
密码机测试
- {MenuList['test'].map((item: any, index: number) => itemDom('test', item, index))} +
密码机测试
+ {MenuList['test'].map((item: any, index: number) => itemDom('test', item, index))} +
+ {/* 右侧内容 */} +
+ { + activeItem ? activeItem.dom : +
+
全军一体化对称密码管理系统
+
+
专用核心密码机管理系统
+
软件当前版本:2.0.3
+
总参谋第XXX研究所研制
+
+
+ } +
- {/* 右侧内容 */} -
- { - activeItem ? activeItem.dom : -
-
全军一体化对称密码管理系统
-
-
专用核心密码机管理系统
-
软件当前版本:2.0.3
-
总参谋第XXX研究所研制
-
-
- } -
-
- : : = ({ }) => { footer={null} maskClosable={false} > - -
- 请安装一体化密码机驱动程序 +
+ 请先安装一体化密码机驱动程序
} - - + +
) } diff --git a/src/pages/InstallExe/exeDialog/CodeDriver.tsx b/src/pages/InstallExe/exeDialog/CodeDriver.tsx index df2bd5c..349d5bd 100644 --- a/src/pages/InstallExe/exeDialog/CodeDriver.tsx +++ b/src/pages/InstallExe/exeDialog/CodeDriver.tsx @@ -1,9 +1,6 @@ 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'; - interface PageProps { open: boolean; onCancel: () => void; @@ -16,8 +13,6 @@ const CodeDriver: FC = ({ const [active, setActive] = useState(1); const [percentVal, setPercentVal] = useState(0); - const urlParams = useParams(); - // 监听是否到安装进度条步骤 useEffect(() => { if (active == 3) { @@ -39,7 +34,7 @@ const CodeDriver: FC = ({ return () => clearInterval(interval); } }, [active]) - + // 设置安装步骤进度 const setValue = () => { setActive((e) => { return e + 1 }) @@ -54,33 +49,31 @@ const CodeDriver: FC = ({ } return <> - { - // open &&
- - //
- } { open &&
-
+
- {[1,2].includes(active)&&
一体化密码机驱动 安装程序
} - {![1,2].includes(active)&&
一体化密码机驱动 安装程序
} - {active==1&&
一体化密码机驱动安装程序
} + {[1, 2].includes(active) &&
一体化密码机驱动 安装程序
} + {![1, 2].includes(active) &&
一体化密码机驱动 安装程序
} + + {active == 1 &&
一体化密码机驱动安装程序
} + {active == 2 &&
一体化密码机驱动
} + {active == 4 &&
一体化密码机驱动
} - {[1,2].includes(active) &&
setValue()}>
} - {active == 3 &&
+ {active == 3 &&
} - {active == 4 &&
installSuccess()}>
}
diff --git a/src/pages/InstallExe/exeDialog/CodeManage.tsx b/src/pages/InstallExe/exeDialog/CodeManage.tsx index a2d35ad..89dea42 100644 --- a/src/pages/InstallExe/exeDialog/CodeManage.tsx +++ b/src/pages/InstallExe/exeDialog/CodeManage.tsx @@ -3,6 +3,7 @@ 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; @@ -39,68 +40,65 @@ const CodeManage: FC = ({ 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: `c:/Users/向明星/Desktop/${countType[urlParams?.fileType]}`, - shortcutName: '专用核心密码综合管理系统', - shortcutURL: `http://localhost:8000/initialSystem/${urlParams?.fileType}` - }), - }); - const data = await response.text(); - message.success(data) - - // 储存信息 - let installExe: any = localStorage.getItem('installExe') - let obj = JSON.parse(installExe); - obj[13].select = true; - localStorage.setItem('installExe', JSON.stringify(obj)); - - onCancel() - } catch (error) { - message.error(error); // 处理请求错误 - } + // 在指定的目录下安装快捷方式 + 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(); + message.success(data) + + // 储存信息 + let installExe: any = localStorage.getItem('installExe') + let obj = JSON.parse(installExe); + obj[13].select = true; + localStorage.setItem('installExe', JSON.stringify(obj)); + + onCancel() + } catch (error) { + message.error(error); // 处理请求错误 } + } return <> - { - // open &&
- - //
- } { open &&
-
+
- {[1,2].includes(active)&&
一体化密码机管理软件 安装程序
} - {![1,2].includes(active)&&
一体化密码机管理软件 安装程序
} - {active==1&&
一体化密码机管理软件安装程序
} + {[1, 2].includes(active) &&
一体化密码机管理软件 安装程序
} + {![1, 2].includes(active) &&
一体化密码机管理软件 安装程序
} + {active == 1 &&
一体化密码机管理软件安装程序
} + {active == 2 &&
一体化密码机管理软件
} + {active == 4 &&
一体化密码机管理软件
} - {[1,2].includes(active) &&
setValue()}>
} - {active == 3 &&
+ {active == 3 &&
} - {active == 4 &&
installSuccess()}>
}
diff --git a/src/pages/InstallExe/exeDialog/CoreArea.tsx b/src/pages/InstallExe/exeDialog/CoreArea.tsx index 5949087..98f78f9 100644 --- a/src/pages/InstallExe/exeDialog/CoreArea.tsx +++ b/src/pages/InstallExe/exeDialog/CoreArea.tsx @@ -1,8 +1,9 @@ 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; @@ -15,12 +16,18 @@ const CoreArea: FC = ({ }) => { 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 (active == 3) { + if (active == 4) { const interval = setInterval(() => { setPercentVal((val) => { const randomStep = Math.round(Math.random() * (100 / 10)); @@ -39,68 +46,109 @@ const CoreArea: FC = ({ 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: `C:/Users/lyc/Desktop/${countType[urlParams?.fileType]}`, - // shortcutName: '专用核心密码综合管理系统', - // shortcutURL: `http://localhost:8000/initialSystem/${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)); - - onCancel() - } catch (error) { - message.error(error); // 处理请求错误 - } + // 在指定的目录下安装快捷方式 + 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}/coreSystemEntrance/${urlParams?.fileType}?sysType=${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)); + + onCancel() + } catch (error) { + message.error(error); // 处理请求错误 } + } - return <> - { - // open &&
+ 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 &&
-
+
-
核心区 安装程序
-
核心区安装程序
- - {[1,2].includes(active) &&
setValue()}> + {[1, 2, 3].includes(active) &&
核心区客户端 安装程序
} + {![1, 2, 3].includes(active) &&
核心区客户端 安装程序
} + + {active == 1 &&
核心区客户端安装程序
} + {active == 2 && <> +
填写GBase账号信息
+
用户名
+
密码
+ { setUserName(e.target.value) }} className={styles.input1} style={{top: 121, left: 59, width: 325}}/> + { setPassword(e.target.value) }} className={styles.input2} style={{top: 171, left: 59, width: 325}}/> + } + {active == 3 &&
核心区客户端
} + {active == 5 &&
核心区客户端
} + + {active == 6 && <> +
填写GBase账号信息
+
服务器的ip地址
+
服务器端口
+
本地端口
+ { setServerIp(e.target.value) }} className={styles.input1} style={{top: 121, left: 109, width: 325}}/> + { setServerPort(e.target.value) }} className={styles.input2} style={{top: 171, left: 109, width: 325}}/> + { setLocalPort(e.target.value) }} className={styles.input2} style={{top: 221, left: 109, width: 325}}/> +
确定
+
取消
+
应用
+ } + + {[1, 2, 3].includes(active) &&
{ + if (active == 2 && verifyPassword()) return + setValue() + }}>
} - {active == 3 &&
+ {active == 4 &&
} - {active == 4 &&
installSuccess()}> + {[5, 6].includes(active) &&
{ + active == 5 ? setValue() : installSuccess() + }}>
}
diff --git a/src/pages/InstallExe/exeDialog/DeviceDriver.tsx b/src/pages/InstallExe/exeDialog/DeviceDriver.tsx new file mode 100644 index 0000000..843af24 --- /dev/null +++ b/src/pages/InstallExe/exeDialog/DeviceDriver.tsx @@ -0,0 +1,86 @@ +import React, { FC, useEffect, useState } from 'react'; +import styles from './index.less'; +import { Input, Progress, message } from 'antd'; + +interface PageProps { + open: boolean; + onCancel: () => void; +} + +const CodeDriver: FC = ({ + open = false, + onCancel +}) => { + const [active, setActive] = useState(1); + const [percentVal, setPercentVal] = useState(0); + + // 监听是否到安装进度条步骤 + 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 = () => { + let installExe: any = localStorage.getItem('installExe') + let data = JSON.parse(installExe); + data[12].select = true; + localStorage.setItem('installExe', JSON.stringify(data)); + message.success('密码资源输入输出设备驱动安装成功!') + onCancel() + } + + return <> + { + open && +
+
+ + + {[1, 2].includes(active) &&
密码资源输入输出设备驱动 安装程序
} + {![1, 2].includes(active) &&
密码资源输入输出设备驱动 安装程序
} + + {active == 1 &&
密码资源输入输出设备驱动安装程序
} + {active == 2 &&
密码资源输入输出设备驱动
} + {active == 4 &&
密码资源输入输出设备驱动
} + + {[1, 2].includes(active) &&
setValue()}> +
} + + {active == 3 &&
+ +
} + + {active == 4 &&
installSuccess()}> +
} +
+
+ } + +}; + +export default CodeDriver; diff --git a/src/pages/InstallExe/exeDialog/DutyArea.tsx b/src/pages/InstallExe/exeDialog/DutyArea.tsx index b4b5b3b..e165d16 100644 --- a/src/pages/InstallExe/exeDialog/DutyArea.tsx +++ b/src/pages/InstallExe/exeDialog/DutyArea.tsx @@ -1,8 +1,9 @@ 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; @@ -15,12 +16,18 @@ const DutyArea: FC = ({ }) => { 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 (active == 3) { + if (active == 4) { const interval = setInterval(() => { setPercentVal((val) => { const randomStep = Math.round(Math.random() * (100 / 10)); @@ -39,60 +46,109 @@ const DutyArea: FC = ({ 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: `C:/Users/lyc/Desktop/${countType[urlParams?.fileType]}`, - shortcutName: '专用核心密码综合管理系统', - shortcutURL: `http://localhost:8000/initialSystem/${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)); - - onCancel() - } catch (error) { - message.error(error); // 处理请求错误 - } + // 在指定的目录下安装快捷方式 + 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}/coreSystemEntrance/${urlParams?.fileType}?sysType=${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)); + + 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 &&
-
+
- {[1,2].includes(active) &&
setValue()}> + {[1, 2, 3].includes(active) &&
执勤区客户端 安装程序
} + {![1, 2, 3].includes(active) &&
执勤区客户端 安装程序
} + + {active == 1 &&
执勤区客户端安装程序
} + {active == 2 && <> +
填写GBase账号信息
+
用户名
+
密码
+ { setUserName(e.target.value) }} className={styles.input1} style={{top: 121, left: 59, width: 325}}/> + { setPassword(e.target.value) }} className={styles.input2} style={{top: 171, left: 59, width: 325}}/> + } + {active == 3 &&
执勤区客户端
} + {active == 5 &&
执勤区客户端
} + + {active == 6 && <> +
填写GBase账号信息
+
服务器的ip地址
+
服务器端口
+
本地端口
+ { setServerIp(e.target.value) }} className={styles.input1} style={{top: 121, left: 109, width: 325}}/> + { setServerPort(e.target.value) }} className={styles.input2} style={{top: 171, left: 109, width: 325}}/> + { setLocalPort(e.target.value) }} className={styles.input2} style={{top: 221, left: 109, width: 325}}/> +
确定
+
取消
+
应用
+ } + + {[1, 2, 3].includes(active) &&
{ + if (active == 2 && verifyPassword()) return + setValue() + }}>
} - {active == 3 &&
+ {active == 4 &&
} - {active == 4 &&
installSuccess()}> + {[5, 6].includes(active) &&
{ + active == 5 ? setValue() : installSuccess() + }}>
}
diff --git a/src/pages/InstallExe/exeDialog/GBase.tsx b/src/pages/InstallExe/exeDialog/GBase.tsx index 4f00574..9157013 100644 --- a/src/pages/InstallExe/exeDialog/GBase.tsx +++ b/src/pages/InstallExe/exeDialog/GBase.tsx @@ -54,7 +54,7 @@ const GBase: FC = ({ const verifyPassword = () => { if (password.trim().length == 0 || confirmPassword.trim().length == 0) { - message.info('请输入密码!') + message.error('请输入密码!') return true; } diff --git a/src/pages/InstallExe/exeDialog/index.less b/src/pages/InstallExe/exeDialog/index.less index 1257262..301ff5d 100644 --- a/src/pages/InstallExe/exeDialog/index.less +++ b/src/pages/InstallExe/exeDialog/index.less @@ -158,20 +158,24 @@ } .title{ position: absolute; - top: 5px; + top: 8px; left: 25px; color: #fff; + font-size: 12px; + font-weight: bold; } .title1{ position: absolute; - top: 8px; + top: 10px; left: 25px; color: #fff; + font-size: 12px; + font-weight: bold; } .pic1{ position: absolute; top: 41px; left: 70px; font-size: 13px; - font-weight: 800; + font-weight: bold; } \ No newline at end of file diff --git a/src/pages/InstallExe/index.tsx b/src/pages/InstallExe/index.tsx index 1035611..7f1e145 100644 --- a/src/pages/InstallExe/index.tsx +++ b/src/pages/InstallExe/index.tsx @@ -14,6 +14,7 @@ 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 = [ // 依赖程序 @@ -51,7 +52,8 @@ const InstallExe: FC = ({ }) => { 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); // 一体化密码机驱动安装程序 @@ -91,10 +93,10 @@ const InstallExe: FC = ({ }) => { if (data.select || notRequireds.includes(item.name)) return data; // 依赖程序必安装的完成后才能点就右侧2块的内容(专用核心密码管理分系统、一体化密码机、JJP903C密码钥匙) - // if (key > 8 && needArr) { - // message.info('请将需要的依赖程序安装完成!'); - // return data - // } + if (key > 8 && needArr) { + message.info('请将需要的依赖程序安装完成!'); + return data + } openDialog(item.name); return { ...data, select: !data.select }; @@ -139,11 +141,10 @@ const InstallExe: FC = ({ }) => { 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) @@ -180,7 +181,7 @@ const InstallExe: FC = ({ }) => {
- history.push('/index')} /> + {}} />
{/* 依赖程序安装--弹窗 */} @@ -194,6 +195,8 @@ const InstallExe: FC = ({ }) => { {/* 专用核心密码管理分系统--弹窗 */} setOpen7(false)} /> setOpen8(false)} /> + setOpen9(false)} /> + {/* 一体化密码机--弹窗 */} setOpen11(false)} /> setOpen12(false)} /> diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 956919f..bdaef48 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -11,7 +11,7 @@ import ClearInfoDialog from '@/components/ClearInfoDialog'; // 首页(目前无用了) export default function IndexPage() { // 是否认证通过 - const [isAuth, setIsAuth] = useState(false); + const [isAuth, setIsAuth] = useState(true); const [visibility, setVisibility] = useState(true); const [form] = Form.useForm(); const [loading, setLoading] = useState(false); @@ -20,7 +20,7 @@ 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 }, ] diff --git a/src/utils/env/dev.ts b/src/utils/env/dev.ts index abe130c..a7a1b61 100644 --- a/src/utils/env/dev.ts +++ b/src/utils/env/dev.ts @@ -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; diff --git a/src/utils/index.ts b/src/utils/index.ts index efbf211..c824cf7 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -5,6 +5,13 @@ export const countType = { 'zq2': '执勤区二' } +export const sysType = { + 'hx1': '上级', + 'hx2': '下级', + 'zq1': '上级', + 'zq2': '下级' +} + export const rowClassName = (record:any, index: any) => { return index % 2 === 0 ? 'even-row' : 'odd-row'; }; \ No newline at end of file