Merge branch 'dev_hjm_a' into dev_aliyun

dev_ec
hjm 6 years ago
commit 33e13837ba

@ -212,7 +212,7 @@ function initOnlineOfflineListener() {
$(window).bind("online", () => { $(window).bind("online", () => {
notification.destroy() notification.destroy()
notification.success({ notification.success({
duration: null, duration: 2,
message: '网络恢复正常', message: '网络恢复正常',
description: description:
'网络恢复正常,感谢使用。', '网络恢复正常,感谢使用。',

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

@ -302,7 +302,8 @@ class studentsList extends Component{
} }
componentDidUpdate(prevProps) { componentDidUpdate(prevProps) {
if (prevProps.match.params.course_group_id != this.props.match.params.course_group_id) { if (prevProps.match.params.course_group_id != this.props.match.params.course_group_id) {
this.setState({checkBoxValues: []}) this.setState({checkBoxValues: [], checkAllValue: false })
this.fetchAll(1) this.fetchAll(1)
} }
// 加载了2次 // 加载了2次

Loading…
Cancel
Save