king
2022-10-07 c593048fd2b71df0bed46c97110e19e0b9bb3cd4
src/tabviews/custom/index.jsx
@@ -42,6 +42,7 @@
const CustomChart = asyncComponent(() => import('./components/chart/custom-chart'))
const TimeLine = asyncComponent(() => import('./components/timeline/normal-timeline'))
const Voucher = asyncComponent(() => import('./components/module/voucher'))
const DebugTable = asyncComponent(() => import('@/tabviews/debugtable'))
class CustomPage extends Component {
  static propTpyes = {
@@ -87,9 +88,7 @@
      try { // 配置信息解析
        config = window.decodeURIComponent(window.atob(result.LongParam))
        config = config.replace(/@mywebsite@\//ig, window.GLOB.baseurl)
        config = JSON.parse(config)
      } catch (e) {
        console.warn('Parse Failure')
@@ -304,9 +303,9 @@
      inters.push(item)
    })
    
    if (inters.length > 0) {
      this.loadOutResource(inters)
    }
    // if (inters.length > 0) {
    //   this.loadOutResource(inters)
    // }
  }
  loadOutResource = (inters) => {
@@ -1040,13 +1039,13 @@
      }
  
      if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
        component.setting.dataresource = component.setting.dataresource.replace(/\$@/ig, '/*').replace(/@datam@/ig, 'Y')
        component.setting.dataresource = component.setting.dataresource.replace(/\$@/ig, '/*').replace(/@datam@/ig, '\'Y\'')
        component.setting.dataresource = component.setting.dataresource.replace(/@\$/ig, '*/')
        _customScript = _customScript.replace(/\$@/ig, '/*').replace(/@datam@/ig, 'Y')
        _customScript = _customScript.replace(/\$@/ig, '/*').replace(/@datam@/ig, '\'Y\'')
        _customScript = _customScript.replace(/@\$/ig, '*/')
      } else {
        component.setting.dataresource = component.setting.dataresource.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '')
        _customScript = _customScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '')
        component.setting.dataresource = component.setting.dataresource.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
        _customScript = _customScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
      }
      regs.forEach(cell => {
@@ -1368,6 +1367,7 @@
      <div className={'custom-page-wrap ' + (loadingview || loading ? 'loading' : '')} id={this.state.ContainerId} style={config ? config.style : null}>
        {(loadingview || loading) ? <Spin className="view-spin" size="large" /> : null}
        <Row className="component-wrap">{this.getComponents()}</Row>
        {config && window.GLOB.breakpoint ? <DebugTable /> : null}
        {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}