king
2024-10-11 6ca240a14ccf55d4e0a94fff77e95f64db2cdfcc
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>
    )