hjm 6 years ago
parent b66f5a67ad
commit e1c730d1e3

@ -33,6 +33,7 @@ class commonWork extends Component{
modalsBottomval:"",
modalCancel:"",
mainList:undefined,
selectedKeys: 'all',
order:"",
page:1,
search:"",
@ -77,7 +78,9 @@ class commonWork extends Component{
componentDidUpdate(prevProps, prevState) {
if (prevProps.match.path != this.props.match.path) {
this.clearSelection()
this._getList()
this.setState({ selectedKeys: 'all', order: '' }, () => {
this._getList()
})
}
}
@ -143,6 +146,7 @@ class commonWork extends Component{
this.clearSelection()
this.setState({
order:e.key==="all"?"":e.key,
selectedKeys: e.key,
page:1,
isSpin:true,
checkBoxValues:[],
@ -403,7 +407,7 @@ class commonWork extends Component{
}
secondRowBotton={
<div className="fl mt6 task_menu_ul">
<Menu mode="horizontal" defaultSelectedKeys="all" onClick={this.selectedStatus}>
<Menu mode="horizontal" selectedKeys={this.state.selectedKeys} onClick={this.selectedStatus}>
<Menu.Item key="all">全部</Menu.Item>
{isAdmin && <Menu.Item key="0">未发布</Menu.Item>}
<Menu.Item key="1">提交中</Menu.Item>

Loading…
Cancel
Save