| | |
| | | import './index.scss' |
| | | |
| | | const SubTabTable = asyncComponent(() => import('@/tabviews/subtabtable')) |
| | | const FormTab = asyncComponent(() => import('@/tabviews/formtab')) |
| | | const { TabPane } = Tabs |
| | | |
| | | class NormalTable extends Component { |
| | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | ContainerId: Utils.getuuid(), // 菜单外层html Id |
| | | view: 'commontable', // 当前页面默认为主表 |
| | | loadingview: true, // 页面加载中 |
| | | viewlost: false, // 页面丢失:1、未获取到配置-页面丢失;2、页面未启用 |
| | | lostmsg: '', // 页面丢失时的提示信息 |
| | |
| | | */ |
| | | reloadview = () => { |
| | | this.setState({ |
| | | view: 'commontable', |
| | | loadingview: true, |
| | | viewlost: false, |
| | | lostmsg: '', |
| | |
| | | tabs.splice(index + 1, 0, newtab) |
| | | |
| | | this.props.modifyTabview(tabs) |
| | | } else if (btn.OpenType === 'blank') { |
| | | this.setState({ |
| | | view: 'formtab', |
| | | tabBtn: btn, |
| | | tabParam: { |
| | | btn: btn, |
| | | data: data, |
| | | arr_field: this.state.arr_field |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { setting, searchlist, actions, columns, loadingview, viewlost, setsingle, pickup, isLinkMain, config } = this.state |
| | | const { view, setting, searchlist, actions, columns, loadingview, viewlost, setsingle, pickup, isLinkMain, config } = this.state |
| | | |
| | | return ( |
| | | <div className={'commontable ' + (isLinkMain ? 'pick-control' : '')} id={this.state.ContainerId}> |
| | | <div> |
| | | {view === 'commontable' ? <div className={'commontable ' + (isLinkMain ? 'pick-control' : '')} id={this.state.ContainerId}> |
| | | {loadingview && <Spin size="large" />} |
| | | {searchlist && searchlist.length > 0 ? |
| | | <MainSearch |
| | |
| | | </div> |
| | | </BackTop> |
| | | {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} |
| | | </div> : null} |
| | | {view === 'formtab' ? <FormTab MenuID={this.state.tabBtn.uuid} param={this.state.tabParam}/> : null} |
| | | </div> |
| | | ) |
| | | } |