| | |
| | | newconfig.columns = result.columns.map(column => { |
| | | return column |
| | | }) |
| | | // newconfig.columns.length = 4 |
| | | newconfig.columns.length = 4 |
| | | } |
| | | newconfig.select = result.select |
| | | this.setState(newconfig) |
| | |
| | | } |
| | | |
| | | refreshbysearch = (searches) => { |
| | | console.log(searches) |
| | | this.loadmaindata(this.state.param.pageIndex, this.state.param.pageSize, this.state.param.orderColumn, this.state.param.orderType, searches) |
| | | let param = Object.assign({}, this.state.param, { |
| | | search: searches |
| | |
| | | loading: true, |
| | | param: param |
| | | }) |
| | | // window.print() |
| | | } |
| | | |
| | | refreshbytable = (pagination, filters, sorter) => { |
| | |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | componentDidMount () { |
| | | // console.log(this.props.MenuNo) |
| | | } |
| | | |
| | | render() { |
| | | return ( |
| | | <div className="commontable"> |
| | | {!this.state.searchlist && <Loading />} |
| | | {this.state.searchlist && <MainSearch refreshdata={this.refreshbysearch} searchlist={this.state.searchlist} dict={this.state.dict} />} |
| | | {this.state.actions && <MainAction actions={this.state.actions} dict={this.state.dict} />} |
| | | {this.state.actions && <MainAction fixed={true} actions={this.state.actions} dict={this.state.dict} />} |
| | | {this.state.columns && <MainTable refreshdata={this.refreshbytable} columns={this.state.columns} data={this.state.data} select={this.state.select} total={this.state.total} loading={this.state.loading} dict={this.state.dict} />} |
| | | <Button className="main-copy" icon="copy" onClick={this.copyMenuNo} shape="circle" /> |
| | | <BackTop> |