| | |
| | | {(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 && config && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config.components[0]} /> : null} |
| | | {!window.GLOB.mkHS && config && autoMatic ? <AutoMatic autoMatic={autoMatic} tabId={config.MenuID} config={config.components[0]} /> : null} |
| | | {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <TableNodes config={config} /> : null} |
| | | {!window.GLOB.mkHS && config ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts || []}/> : null} |
| | | {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} |
| | |
| | | const SubTable = asyncSpinComponent(() => import('@/tabviews/subtable')) |
| | | const CardComponent = asyncSpinComponent(() => import('@/tabviews/zshare/cardcomponent')) |
| | | const ChartComponent = asyncSpinComponent(() => import('@/tabviews/zshare/chartcomponent')) |
| | | const PagemsgComponent = asyncComponent(() => import('@/tabviews/zshare/pageMessage')) |
| | | const AutoMatic = asyncComponent(() => import('@/tabviews/zshare/automatic')) |
| | | // const PagemsgComponent = asyncComponent(() => import('@/tabviews/zshare/pageMessage')) |
| | | // const AutoMatic = asyncComponent(() => import('@/tabviews/zshare/automatic')) |
| | | const DebugTable = asyncComponent(() => import('@/tabviews/debugtable')) |
| | | |
| | | const { TabPane } = Tabs |
| | |
| | | |
| | | render() { |
| | | const { MenuID } = this.props |
| | | const { BID, setting, pageSize, actions, columns, loadingview, viewlost, pickup, config, chartId, search, selectedData, shortcuts, autoMatic } = this.state |
| | | const { BID, setting, pageSize, actions, columns, loadingview, viewlost, pickup, config, chartId, search, selectedData, shortcuts } = this.state |
| | | |
| | | return ( |
| | | <div className="commontable" id={this.state.ContainerId}> |
| | |
| | | </Tabs>)) |
| | | } |
| | | {setting && window.GLOB.breakpoint ? <DebugTable /> : null} |
| | | {!window.GLOB.mkHS && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null} |
| | | {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config}/> : null} |
| | | {/* {!window.GLOB.mkHS && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null} */} |
| | | {/* {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config}/> : null} */} |
| | | {!window.GLOB.mkHS && setting ? <SettingComponent config={config} shortcuts={shortcuts || []}/> : null} |
| | | {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} |
| | | </div> |
| | |
| | | class AutoMatic extends Component { |
| | | static propTpyes = { |
| | | autoMatic: PropTypes.object, |
| | | tabId: PropTypes.string, |
| | | config: PropTypes.object |
| | | } |
| | | |
| | |
| | | timer = null |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | const { autoMatic } = this.props |
| | | const { autoMatic, tabId } = this.props |
| | | |
| | | if (autoMatic.gap && autoMatic.gap >= 1) { |
| | | this.setState({gap: autoMatic.gap * 1000}) |
| | | } |
| | | |
| | | if (tabId && tabId === sessionStorage.getItem('autoExecId')) { |
| | | sessionStorage.removeItem('autoExecId') |
| | | |
| | | setTimeout(() => { |
| | | this.trigger() |
| | | }, 10000) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | autoMaticOver = (MenuID) => { |
| | | const { config, autoMatic } = this.props |
| | | const { config, autoMatic, tabId } = this.props |
| | | |
| | | if (!this.state.running || MenuID !== config.MenuID) return |
| | | |
| | |
| | | if (autoMatic.onFinish !== 'over') { |
| | | let interval = autoMatic.interval * 1000 || 10 |
| | | |
| | | if (autoMatic.restart === 'refresh') { |
| | | this.timer = setTimeout(() => { |
| | | sessionStorage.setItem('ThirdMenu', tabId) |
| | | sessionStorage.setItem('autoExecId', tabId) |
| | | window.location.reload() |
| | | }, interval) |
| | | } else { |
| | | if (autoMatic.restart === 'first') { |
| | | this.setState({line: 1}) |
| | | } else { |
| | |
| | | }, interval) |
| | | } |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { running } = this.state |
| | |
| | | <Radio.Group> |
| | | <Radio value="first">第一行</Radio> |
| | | <Radio value="next">下一行</Radio> |
| | | <Radio value="refresh">刷新页面</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |