更新安装页面内容

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

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

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

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

@ -27,6 +27,14 @@ const CoreArea: FC<PageProps> = ({
const urlParams = useParams(); const urlParams = useParams();
useEffect(() => {
if (open) {
setActive(1)
setPassword('')
setServerIp('127.0.0.1')
}
}, [open])
// 监听是否到安装进度条步骤 // 监听是否到安装进度条步骤
useEffect(() => { useEffect(() => {
if (active == 4) { if (active == 4) {
@ -86,11 +94,15 @@ const CoreArea: FC<PageProps> = ({
return true; return true;
} }
if (false) { let sysName = localStorage.getItem(`${urlParams?.fileType}`);
message.error('用户名或密码错误!'); if (sysName) {
let info = JSON.parse(sysName)
if (password !== info.GBasePassword) {
message.error('密码错误!');
return true; return true;
} }
} }
}
return <> return <>
{ {
@ -111,7 +123,7 @@ const CoreArea: FC<PageProps> = ({
<div className={styles.pic1} style={{ left: 10 }}>GBase</div> <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: 130, left: 16 }}></div>
<div className={styles.pic1} style={{ fontSize: 12, top: 180, left: 27 }}></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 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 }} /> <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 == 3 && <div className={styles.pic1} style={{ top: 166, left: 85 }}></div>}

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

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

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

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

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

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

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

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

Loading…
Cancel
Save