| | |
| | | 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' |
| | |
| | | MenuID: PropTypes.string, // 菜单Id |
| | | SupMenuID: PropTypes.string, // 上级菜单Id |
| | | mainSearch: PropTypes.any, // 主表搜索条件 |
| | | ContainerId: PropTypes.any, // 三级菜单Container(html) ID |
| | | } |
| | | |
| | | state = { |
| | |
| | | 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 = '' |
| | |
| | | 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({ |
| | |
| | | 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') { |
| | |
| | | loading: false |
| | | }) |
| | | |
| | | notification.error({ |
| | | top: 92, |
| | | message: prex + result.message, |
| | | duration: 10 |
| | | }) |
| | | if (result.ErrCode === 'N') { |
| | | Modal.error({ |
| | | title: prex + result.message, |
| | | }) |
| | | } else { |
| | | notification.error({ |
| | | top: 92, |
| | | message: prex + result.message, |
| | | duration: 10 |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | columns={columns} |
| | | MenuID={this.props.MenuID} |
| | | selectedData={selectedData} |
| | | ContainerId={this.props.ContainerId} |
| | | /> |
| | | </div> |
| | | <div className="subtable-box"> |
| | |
| | | MenuID={this.props.MenuID} |
| | | loading={this.state.loading} |
| | | statFValue={this.state.statFValue} |
| | | ContainerId={this.props.ContainerId} |
| | | refreshdata={this.refreshbytable} |
| | | chgSelectData={this.changeSelectedData} |
| | | /> |
| | |
| | | MenuID={this.props.MenuID} |
| | | loading={this.state.loading} |
| | | tableId={this.props.Tab.uuid} |
| | | ContainerId={this.props.ContainerId} |
| | | /> |
| | | </Col> |
| | | ) |
| | |
| | | columns={columns} |
| | | MenuID={this.props.MenuID} |
| | | selectedData={selectedData} |
| | | ContainerId={this.props.ContainerId} |
| | | /> |
| | | </div> |
| | | <div className="subtable-box"> |
| | |
| | | MenuID={this.props.MenuID} |
| | | loading={this.state.loading} |
| | | statFValue={this.state.statFValue} |
| | | ContainerId={this.props.ContainerId} |
| | | refreshdata={this.refreshbytable} |
| | | chgSelectData={this.changeSelectedData} |
| | | /> |