king
2022-11-21 f6626b05f1275cc2f8ca77f773d4f6a6af1b0a89
src/tabviews/subtable/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { notification, Spin, Switch, Row, Col, Tabs} from 'antd'
import { notification, Spin, Switch, Row, Col, Tabs, Modal } from 'antd'
import Api from '@/api'
import zhCN from '@/locales/zh-CN/main.js'
@@ -33,7 +33,6 @@
    MenuID: PropTypes.string,        // 菜单Id
    SupMenuID: PropTypes.string,     // 上级菜单Id
    mainSearch: PropTypes.any,       // 主表搜索条件
    ContainerId: PropTypes.any,      // 三级菜单Container(html) ID
  }
  state = {
@@ -99,6 +98,7 @@
        config.setting.$name = Tab.label
        config.setting.foreignKey = Tab.foreignKey || ''
        config.setting.supModule = Tab.supMenu || ''
        config.setting.ContainerId = Tab.ContainerId || ''
      } catch (e) {
        console.warn('Parse Failure')
        config = ''
@@ -407,7 +407,7 @@
        statFValue: [],
        total: 0
      })
      MKEmitter.emit('changeTableLine', this.props.ContainerId, this.props.Tab.uuid, '', '')
      MKEmitter.emit('changeTableLine', this.props.Tab.ContainerId, this.props.Tab.uuid, '', '')
      return
    } else if (window.GLOB.systemType === 'production' && setting.interType === 'custom' && !setting.proInterface) {
      notification.warning({
@@ -421,7 +421,7 @@
    this.setState({
      selectedData: []
    })
    MKEmitter.emit('changeTableLine', this.props.ContainerId, this.props.Tab.uuid, '', '')
    MKEmitter.emit('changeTableLine', this.props.Tab.ContainerId, this.props.Tab.uuid, '', '')
    if (setting.interType === 'custom' && loadCustomApi) {
      if (setting.execTime === 'once') {
@@ -668,11 +668,17 @@
        loading: false
      })
      if (result.ErrCode === 'N') {
        Modal.error({
          title: prex + result.message,
        })
      } else {
      notification.error({
        top: 92,
        message: prex + result.message,
        duration: 10
      })
      }
    }
  }
@@ -1025,7 +1031,6 @@
                      columns={columns}
                      MenuID={this.props.MenuID}
                      selectedData={selectedData}
                      ContainerId={this.props.ContainerId}
                    />
                  </div>
                  <div className="subtable-box">
@@ -1045,7 +1050,6 @@
                      MenuID={this.props.MenuID}
                      loading={this.state.loading}
                      statFValue={this.state.statFValue}
                      ContainerId={this.props.ContainerId}
                      refreshdata={this.refreshbytable}
                      chgSelectData={this.changeSelectedData}
                    />
@@ -1065,7 +1069,6 @@
                    MenuID={this.props.MenuID}
                    loading={this.state.loading}
                    tableId={this.props.Tab.uuid}
                    ContainerId={this.props.ContainerId}
                  />
                </Col>
              )
@@ -1094,7 +1097,6 @@
              columns={columns}
              MenuID={this.props.MenuID}
              selectedData={selectedData}
              ContainerId={this.props.ContainerId}
            />
          </div>
          <div className="subtable-box">
@@ -1114,7 +1116,6 @@
              MenuID={this.props.MenuID}
              loading={this.state.loading}
              statFValue={this.state.statFValue}
              ContainerId={this.props.ContainerId}
              refreshdata={this.refreshbytable}
              chgSelectData={this.changeSelectedData}
            />