|
|
|
@ -1,10 +1,11 @@
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -13,6 +14,7 @@ const GBase: FC<PageProps> = ({
|
|
|
|
|
onCancel,
|
|
|
|
|
setInstallExe
|
|
|
|
|
}) => {
|
|
|
|
|
const urlParams = useParams();
|
|
|
|
|
const [active, setActive] = useState(1);
|
|
|
|
|
const [password, setPassword] = useState('');
|
|
|
|
|
const [confirmPassword, setConfirmPassword] = useState('');
|
|
|
|
@ -63,6 +65,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 &&
|
|
|
|
@ -72,15 +83,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) {
|
|
|
|
|
// localStorage.setItem('GBasePassword', '');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (active == 8 && verifyPassword()) return;
|
|
|
|
|
if (active == 8) setGBasePassword();
|
|
|
|
|
if (active == 12) { installSuccess(); return }
|
|
|
|
|
|
|
|
|
|
setValue()
|
|
|
|
|
}}></div>}
|
|
|
|
|
|
|
|
|
@ -99,6 +104,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>
|
|
|
|
|
}
|
|
|
|
|