|
|
|
@ -43,6 +43,8 @@ const typeData = [
|
|
|
|
|
interface PageProps { }
|
|
|
|
|
|
|
|
|
|
const InstallExe: FC<PageProps> = ({ }) => {
|
|
|
|
|
const urlParams = useParams();
|
|
|
|
|
|
|
|
|
|
const [listData, setListData] = useState<any[]>([]);
|
|
|
|
|
const [open1, setOpen1] = useState(false); // Gbase
|
|
|
|
|
const [open2, setOpen2] = useState(false); // HGoogleEarth
|
|
|
|
@ -59,12 +61,18 @@ const InstallExe: FC<PageProps> = ({ }) => {
|
|
|
|
|
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 {
|
|
|
|
|
info.installExe = typeData
|
|
|
|
|
localStorage.setItem(`${urlParams?.fileType}`, JSON.stringify(info));
|
|
|
|
|
setListData(typeData);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
localStorage.setItem('installExe', JSON.stringify(typeData));
|
|
|
|
|
setListData(typeData);
|
|
|
|
|
localStorage.setItem(`${urlParams?.fileType}`, JSON.stringify({}));
|
|
|
|
|
}
|
|
|
|
|
}, [])
|
|
|
|
|
|
|
|
|
@ -116,11 +124,13 @@ const InstallExe: FC<PageProps> = ({ }) => {
|
|
|
|
|
setOpen1(true)
|
|
|
|
|
break;
|
|
|
|
|
case 'GBase升级程序':
|
|
|
|
|
let installExe: any = localStorage.getItem('installExe')
|
|
|
|
|
let info = JSON.parse(installExe);
|
|
|
|
|
info[1].select = true;
|
|
|
|
|
localStorage.setItem('installExe', JSON.stringify(info));
|
|
|
|
|
message.success('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)
|
|
|
|
@ -155,6 +165,16 @@ const InstallExe: FC<PageProps> = ({ }) => {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className={styles.exeInstall}>
|
|
|
|
|
<div className={styles.title_con}>一体化对称密码管理系统</div>
|
|
|
|
@ -181,25 +201,25 @@ const InstallExe: FC<PageProps> = ({ }) => {
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className='flex_jE' style={{ marginTop: '3vh', paddingRight: '4.5vh' }}>
|
|
|
|
|
<ButtonComp text={'退出'} onClick={() =>{}} />
|
|
|
|
|
<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={() => setOpen1(false)} setInstallExe={(i, t) => { setInstallExe(i, t) }} />
|
|
|
|
|
<HGoogleEarth open={open2} onCancel={() => setOpen2(false)} setInstallExe={(i, t) => { setInstallExe(i, t) }} />
|
|
|
|
|
<MSXML open={open3} onCancel={() => setOpen3(false)} setInstallExe={(i, t) => { setInstallExe(i, t) }} />
|
|
|
|
|
<FlashPlayer open={open4} onCancel={() => setOpen4(false)} setInstallExe={(i, t) => { setInstallExe(i, t) }} />
|
|
|
|
|
<Net open={open5} onCancel={() => setOpen5(false)} setInstallExe={(i, t) => { setInstallExe(i, t) }} />
|
|
|
|
|
<NetSP1 open={open6} onCancel={() => setOpen6(false)} setInstallExe={(i, t) => { setInstallExe(i, t) }} />
|
|
|
|
|
|
|
|
|
|
{/* 专用核心密码管理分系统--弹窗 */}
|
|
|
|
|
<CoreArea open={open7} onCancel={() => setOpen7(false)} />
|
|
|
|
|
<DutyArea open={open8} onCancel={() => setOpen8(false)} />
|
|
|
|
|
<DeviceDriver open={open9} onCancel={() => setOpen9(false)} />
|
|
|
|
|
<CoreArea open={open7} onCancel={() => setOpen7(false)} setInstallExe={(i, t) => { setInstallExe(i, t) }} />
|
|
|
|
|
<DutyArea open={open8} onCancel={() => setOpen8(false)} setInstallExe={(i, t) => { setInstallExe(i, t) }} />
|
|
|
|
|
<DeviceDriver open={open9} onCancel={() => setOpen9(false)} setInstallExe={(i, t) => { setInstallExe(i, t) }} />
|
|
|
|
|
|
|
|
|
|
{/* 一体化密码机--弹窗 */}
|
|
|
|
|
<CodeManage open={open11} onCancel={() => setOpen11(false)} />
|
|
|
|
|
<CodeDriver open={open12} onCancel={() => setOpen12(false)} />
|
|
|
|
|
<CodeManage open={open11} onCancel={() => setOpen11(false)} setInstallExe={(i, t) => { setInstallExe(i, t) }} />
|
|
|
|
|
<CodeDriver open={open12} onCancel={() => setOpen12(false)} setInstallExe={(i, t) => { setInstallExe(i, t) }} />
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|