更新安装页面内容

master
鲁誉程 10 months ago
parent ff6d786877
commit 83217ad29e

@ -17,8 +17,9 @@ const InitialSystem: FC<PageProps> = ({ }) => {
const [visibility, setVisibility] = useState<boolean>(true);
const urlParams = useParams();
let installExe: any = localStorage.getItem('installExe')
let info = JSON.parse(installExe);
let installExe = localStorage.getItem(`${urlParams?.fileType}`);
let info = installExe ? JSON.parse(installExe) : null;
const MenuList: any = {
'admin': [
{ name: '算法加载', dom: <div></div>, img: '' },
@ -60,7 +61,7 @@ const InitialSystem: FC<PageProps> = ({ }) => {
return (
<div className={styles.initial_warp}>
{info[14].select ? <>
{info.installExe[14].select ? <>
{/* 头部 */}
<div className={styles.header_warp}>
<div className='ml20'></div>
@ -103,7 +104,7 @@ const InitialSystem: FC<PageProps> = ({ }) => {
maskClosable={false}
>
<div style={{padding: '20px 0'}}>
</div>
</Modal>

@ -16,6 +16,10 @@ const CodeDriver: FC<PageProps> = ({
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 3) {

@ -21,6 +21,10 @@ const CodeManage: FC<PageProps> = ({
const urlParams = useParams();
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 3) {

@ -27,6 +27,14 @@ const CoreArea: FC<PageProps> = ({
const urlParams = useParams();
useEffect(() => {
if (open) {
setActive(1)
setPassword('')
setServerIp('127.0.0.1')
}
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 4) {
@ -86,9 +94,13 @@ const CoreArea: FC<PageProps> = ({
return true;
}
if (false) {
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;
}
}
}
@ -99,35 +111,35 @@ const CoreArea: FC<PageProps> = ({
<div className={styles.modal} style={{ width: 500, height: 460 }}>
<img src={require(`../../../assets/images/coreArea/${active}.png`)} width={500} height={460} />
<div className={styles.close} onClick={()=>{
<div className={styles.close} onClick={() => {
onCancel('核心区安装程序')
}}></div>
}}></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}}/>
<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>
<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
@ -144,7 +156,7 @@ const CoreArea: FC<PageProps> = ({
{[5, 6].includes(active) && <div
className={styles.net}
style={{ bottom: 17, right: active == 5 ? 27 : 187}}
style={{ bottom: 17, right: active == 5 ? 27 : 187 }}
onClick={() => {
active == 5 ? setValue() : installSuccess()
}}>

@ -17,6 +17,10 @@ const CodeDriver: FC<PageProps> = ({
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 3) {

@ -27,6 +27,14 @@ const DutyArea: FC<PageProps> = ({
const urlParams = useParams();
useEffect(() => {
if (open) {
setActive(1)
setPassword('')
setServerIp('127.0.0.1')
}
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 4) {

@ -16,6 +16,10 @@ const FlashPlayer: FC<PageProps> = ({
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 2) {

@ -20,6 +20,14 @@ const GBase: FC<PageProps> = ({
const [confirmPassword, setConfirmPassword] = useState('');
const [percentVal, setPercentVal] = useState(0);
useEffect(() => {
if (open) {
setActive(1)
setPassword('')
setConfirmPassword('')
}
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 11) {

@ -17,6 +17,10 @@ const HGoogleEarth: FC<PageProps> = ({
const [percentVal, setPercentVal] = useState(0);
const [showOk, setShowOk] = useState(false);
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 2) {

@ -16,6 +16,10 @@ const MSXML: FC<PageProps> = ({
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 6) {

@ -16,6 +16,10 @@ const Net: FC<PageProps> = ({
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 3) {

@ -16,6 +16,10 @@ const NetSP1: FC<PageProps> = ({
const [active, setActive] = useState(1);
const [percentVal, setPercentVal] = useState(0);
useEffect(() => {
if (open) setActive(1)
}, [open])
// 监听是否到安装进度条步骤
useEffect(() => {
if (active == 3) {

Loading…
Cancel
Save