dev_aliyun2
杨树明 5 years ago committed by harry
parent 1313f5840a
commit 0b46857684

@ -101,36 +101,43 @@ class Fileslists extends Component{
}
}
componentDidUpdate = (prevProps) => {
if(prevProps.match.params.main_id != this.props.match.params.main_id){
this.getcourse_groupslists()
this.setState({
isSpin:true,
checkBoxValues:[],
checkAllValue:false,
})
if(this.props.match.params.main_id!=undefined){
this.setState({
child:false,
sort:"desc"
})
this.seactall(undefined,"desc");
if(prevProps.coursesidtype!=this.props.coursesidtype||prevProps.match.params.main_id!=this.props.match.params.main_id||prevProps.match.params.Id!=this.props.match.params.Id){
if(this.props.match.params.main_id){
this.getcourse_groupslists()
this.setState({
isSpin:true,
checkBoxValues:[],
checkAllValue:false,
})
if(this.props.match.params.main_id!=undefined){
this.setState({
child:false,
sort:"desc"
})
this.seactall(undefined,"desc");
}
}
}
if(prevProps.match.params.Id != this.props.match.params.Id){
this.getcourse_groupslists()
this.setState({
isSpin:true,
checkBoxValues:[],
checkAllValue:false,
})
if(this.props.match.params.Id!=undefined){
this.setState({
child:true,
sort:"desc"
})
this.seactall(parseInt(this.props.match.params.Id),"desc")
if(this.props.match.params.Id){
this.getcourse_groupslists()
this.setState({
isSpin:true,
checkBoxValues:[],
checkAllValue:false,
})
if(this.props.match.params.Id!=undefined){
this.setState({
child:true,
sort:"desc"
})
this.seactall(parseInt(this.props.match.params.Id),"desc")
}
}
}
}
updadatalist=(id)=>{
@ -916,7 +923,7 @@ class Fileslists extends Component{
{
`
.filesnameslist{
max-width: 200px;
max-width: 370px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

@ -295,9 +295,11 @@ function buildColumns(that, student_works, studentData) {
key: 'user_comment_count',
dataIndex: 'user_comment_count',
render: (student_score, record) => (
render: (user_comment_count, record) => (
<span style={{color:'#989898', cursor: 'default'}}>
{record.user_comment_count}
<Tooltip title={"在匿评期间评阅的作品数量"}>
{record.user_comment_count}
</Tooltip>
</span>
),
})

@ -548,7 +548,11 @@ class Coursesleftnav extends Component{
description:result.data.message
});
if(positiontype==="shixun_homeworks"){
this.updasaveNavmoda()
trigger('updateNavSuccess')
this.props.history.push(`/classrooms/${coursesId}/shixun_homework/${result.data.category_id}`);
}
if(positiontype==="files"){
this.updasaveNavmoda()
trigger('updateNavSuccess')
@ -561,7 +565,7 @@ class Coursesleftnav extends Component{
this.props.history.push(`/classrooms/${coursesId}/boards/${result.data.category_id}`);
}
if(positiontype!="course_groups"){
if(positiontype!="course_groups"&&positiontype!="shixun_homeworks"){
this.updasaveNavmoda()
}

@ -146,27 +146,31 @@ class ShixunHomework extends Component{
componentDidUpdate = (prevProps) => {
if(prevProps.match.params.main_id != this.props.match.params.main_id){
if(this.props.match.params.main_id!=undefined){
this.setState({
checkedtype:false,
orders:"8",
order:undefined,
page:1
})
this.seactall();
if(prevProps.coursesidtype!=this.props.coursesidtype||prevProps.match.params.main_id!=this.props.match.params.main_id||prevProps.match.params.category_id!=this.props.match.params.category_id) {
if(this.props.match.params.main_id){
if(this.props.match.params.main_id!=undefined){
this.setState({
checkedtype:false,
orders:"8",
order:undefined,
page:1
})
this.seactall();
}
}
}
if(prevProps.match.params.category_id != this.props.match.params.category_id){
if(this.props.match.params.category_id!=undefined){
this.setState({
checkedtype:false,
orders:"8",
order:undefined,
page:1
})
this.seactall(parseInt(this.props.match.params.category_id))
if(this.props.match.params.category_id){
if(this.props.match.params.category_id!=undefined){
this.setState({
checkedtype:false,
orders:"8",
order:undefined,
page:1
})
this.seactall(parseInt(this.props.match.params.category_id))
}
}
}
}

Loading…
Cancel
Save