|
|
@ -44,6 +44,7 @@ class ShixunHomework extends Component{
|
|
|
|
page:1,
|
|
|
|
page:1,
|
|
|
|
Coursename:"",
|
|
|
|
Coursename:"",
|
|
|
|
order:"",
|
|
|
|
order:"",
|
|
|
|
|
|
|
|
orders:"8",
|
|
|
|
shixunmodal:false,
|
|
|
|
shixunmodal:false,
|
|
|
|
shixunmodallist:undefined,
|
|
|
|
shixunmodallist:undefined,
|
|
|
|
hometypepvisible:false,
|
|
|
|
hometypepvisible:false,
|
|
|
@ -90,7 +91,8 @@ class ShixunHomework extends Component{
|
|
|
|
if(this.props.match.params.main_id){
|
|
|
|
if(this.props.match.params.main_id){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
isSpin:true,
|
|
|
|
isSpin:true,
|
|
|
|
checkedtype:false
|
|
|
|
checkedtype:false,
|
|
|
|
|
|
|
|
orders:"8"
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.seactall();
|
|
|
|
this.seactall();
|
|
|
|
if(this.props.isAdmin()===true){
|
|
|
|
if(this.props.isAdmin()===true){
|
|
|
@ -100,7 +102,8 @@ class ShixunHomework extends Component{
|
|
|
|
}else if(this.props.match.params.category_id){
|
|
|
|
}else if(this.props.match.params.category_id){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
isSpin:true,
|
|
|
|
isSpin:true,
|
|
|
|
checkedtype:false
|
|
|
|
checkedtype:false,
|
|
|
|
|
|
|
|
orders:"8"
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.seactall(parseInt(this.props.match.params.category_id))
|
|
|
|
this.seactall(parseInt(this.props.match.params.category_id))
|
|
|
|
if(this.props.isAdmin()===true){
|
|
|
|
if(this.props.isAdmin()===true){
|
|
|
@ -139,7 +142,8 @@ class ShixunHomework extends Component{
|
|
|
|
if(prevProps.match.params.main_id != this.props.match.params.main_id){
|
|
|
|
if(prevProps.match.params.main_id != this.props.match.params.main_id){
|
|
|
|
if(this.props.match.params.main_id!=undefined){
|
|
|
|
if(this.props.match.params.main_id!=undefined){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
checkedtype:false
|
|
|
|
checkedtype:false,
|
|
|
|
|
|
|
|
orders:"8"
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.seactall();
|
|
|
|
this.seactall();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -147,7 +151,8 @@ class ShixunHomework extends Component{
|
|
|
|
if(prevProps.match.params.category_id != this.props.match.params.category_id){
|
|
|
|
if(prevProps.match.params.category_id != this.props.match.params.category_id){
|
|
|
|
if(this.props.match.params.category_id!=undefined){
|
|
|
|
if(this.props.match.params.category_id!=undefined){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
checkedtype:false
|
|
|
|
checkedtype:false,
|
|
|
|
|
|
|
|
orders:"8"
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.seactall(parseInt(this.props.match.params.category_id))
|
|
|
|
this.seactall(parseInt(this.props.match.params.category_id))
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -162,8 +167,8 @@ class ShixunHomework extends Component{
|
|
|
|
let category_id=this.props.match.params.category_id
|
|
|
|
let category_id=this.props.match.params.category_id
|
|
|
|
let url="/courses/"+coursesId+"/homework_commons.json?type=4";
|
|
|
|
let url="/courses/"+coursesId+"/homework_commons.json?type=4";
|
|
|
|
let neworder=order;
|
|
|
|
let neworder=order;
|
|
|
|
if(order==="null"){
|
|
|
|
if(order==="8"){
|
|
|
|
neworder=""
|
|
|
|
neworder=undefined
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
axios.get(url, {
|
|
|
|
axios.get(url, {
|
|
|
@ -600,14 +605,16 @@ class ShixunHomework extends Component{
|
|
|
|
let {Coursename,page}=this.state;
|
|
|
|
let {Coursename,page}=this.state;
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
order: e.key,
|
|
|
|
order: e.key,
|
|
|
|
|
|
|
|
orders:e.key,
|
|
|
|
checkBoxValues:[],
|
|
|
|
checkBoxValues:[],
|
|
|
|
checkedtype:false,
|
|
|
|
checkedtype:false,
|
|
|
|
isSpin:true
|
|
|
|
isSpin:true
|
|
|
|
});
|
|
|
|
});
|
|
|
|
let newkey=e.key;
|
|
|
|
let newkey=e.key;
|
|
|
|
if(newkey==="null"){
|
|
|
|
if(newkey==="8"){
|
|
|
|
newkey=""
|
|
|
|
newkey=undefined
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.homeworkupdatalist(Coursename,page,newkey);
|
|
|
|
this.homeworkupdatalist(Coursename,page,newkey);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -955,6 +962,7 @@ class ShixunHomework extends Component{
|
|
|
|
course_modules,
|
|
|
|
course_modules,
|
|
|
|
shixunpath,
|
|
|
|
shixunpath,
|
|
|
|
order,
|
|
|
|
order,
|
|
|
|
|
|
|
|
orders,
|
|
|
|
NewShixunModelType,
|
|
|
|
NewShixunModelType,
|
|
|
|
}=this.state;
|
|
|
|
}=this.state;
|
|
|
|
|
|
|
|
|
|
|
@ -1084,8 +1092,8 @@ class ShixunHomework extends Component{
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<div className="fl mt6 task_menu_ul">
|
|
|
|
<div className="fl mt6 task_menu_ul">
|
|
|
|
<Menu mode="horizontal" defaultSelectedKeys="null" onClick={this.handleClick}>
|
|
|
|
<Menu mode="horizontal" selectedKeys={orders} onClick={this.handleClick}>
|
|
|
|
<Menu.Item key="null">全部</Menu.Item>
|
|
|
|
<Menu.Item key="8">全部</Menu.Item>
|
|
|
|
{this.props.isAdmin()?<Menu.Item key="0">未发布</Menu.Item>:""}
|
|
|
|
{this.props.isAdmin()?<Menu.Item key="0">未发布</Menu.Item>:""}
|
|
|
|
<Menu.Item key="1">提交中</Menu.Item>
|
|
|
|
<Menu.Item key="1">提交中</Menu.Item>
|
|
|
|
<Menu.Item key="2">补交中</Menu.Item>
|
|
|
|
<Menu.Item key="2">补交中</Menu.Item>
|
|
|
|