From 6ca240a14ccf55d4e0a94fff77e95f64db2cdfcc Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 11 十月 2024 17:34:25 +0800 Subject: [PATCH] 2024-10-11 --- src/views/mkiframe/index.jsx | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/views/mkiframe/index.jsx b/src/views/mkiframe/index.jsx index b6e9761..4730c77 100644 --- a/src/views/mkiframe/index.jsx +++ b/src/views/mkiframe/index.jsx @@ -1,6 +1,5 @@ import React, {Component} from 'react' -import { Spin, notification, ConfigProvider } from 'antd' -import zhCN from 'antd/es/locale/zh_CN' +import { Spin, notification } from 'antd' import Api from '@/api' import asyncComponent from '@/utils/asyncLoadComponent' @@ -76,6 +75,7 @@ } else { sessionStorage.clear() this.props.history.replace('/login') + window.location.reload() } }) } @@ -103,6 +103,7 @@ sessionStorage.clear() sessionStorage.setItem('iframe', `/iframe/${menuId}/@loginuid@/${bid || ''}`) this.props.history.replace('/login') + window.location.reload() } }) } @@ -164,6 +165,14 @@ reloadTabs = () => { if (this.reloading) return + + let time = new Date().getTime() + + let oldTime = sessionStorage.getItem('mk_reloadTabs') + + if (oldTime && time - oldTime < 180000) return + + sessionStorage.setItem('mk_reloadTabs', time) this.reloading = true @@ -267,11 +276,9 @@ return ( <div className="main-iframe"> - <ConfigProvider locale={zhCN}> - {loading ? <Spin size="large" /> : null} - {!loading && type === 'CustomPage' ? <CustomPage MenuID={MenuId} param={{$BID: BID}} changeTemp={this.changeTemp}/> : null} - {!loading && type === 'BaseTable' ? <BaseTable MenuID={MenuId} param={{$BID: BID}} changeTemp={this.changeTemp}/> : null} - </ConfigProvider> + {loading ? <Spin size="large" /> : null} + {!loading && type === 'CustomPage' ? <CustomPage MenuID={MenuId} param={{$BID: BID}} changeTemp={this.changeTemp}/> : null} + {!loading && type === 'BaseTable' ? <BaseTable MenuID={MenuId} param={{$BID: BID}} changeTemp={this.changeTemp}/> : null} <ImgScale /> </div> ) -- Gitblit v1.8.0