|
|
|
@ -64,6 +64,7 @@ class Fileslists extends Component{
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
componentDidMount=()=>{
|
|
|
|
|
|
|
|
|
|
this.getcourse_groupslists()
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpin:true,
|
|
|
|
@ -85,43 +86,45 @@ class Fileslists extends Component{
|
|
|
|
|
this.seactall(parseInt(this.props.match.params.Id),"desc")
|
|
|
|
|
}
|
|
|
|
|
this.updadatalist();
|
|
|
|
|
on('updateNavSuccess', this.updateNavSuccess)
|
|
|
|
|
on('updateNavSuccess',this.updadatalist)
|
|
|
|
|
on('files', this.updateNavSuccess)
|
|
|
|
|
on('files',this.updadatalist)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updateNavSuccess=()=>{
|
|
|
|
|
|
|
|
|
|
let{sort}=this.state;
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpin:true
|
|
|
|
|
})
|
|
|
|
|
if(this.props.match.params.main_id){
|
|
|
|
|
|
|
|
|
|
this.seactall(undefined,sort);
|
|
|
|
|
}else if(this.props.match.params.Id){
|
|
|
|
|
|
|
|
|
|
this.seactall(parseInt(this.props.match.params.Id),sort)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
componentDidUpdate = (prevProps) => {
|
|
|
|
|
|
|
|
|
|
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(prevProps.coursesidtype!=this.props.coursesidtype||prevProps.match.params.Id!=this.props.match.params.Id&&this.props.coursesidtype!="node") {
|
|
|
|
|
|
|
|
|
|
if(this.props.coursesidtype==="node") {
|
|
|
|
|
|
|
|
|
|
if(this.props.match.params.main_id){
|
|
|
|
|
this.getcourse_groupslists()
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpin:true,
|
|
|
|
|
checkBoxValues:[],
|
|
|
|
|
checkAllValue:false,
|
|
|
|
|
isSpin: true,
|
|
|
|
|
checkBoxValues: [],
|
|
|
|
|
checkAllValue: false,
|
|
|
|
|
})
|
|
|
|
|
if(this.props.match.params.main_id!=undefined){
|
|
|
|
|
if (this.props.match.params.main_id != undefined) {
|
|
|
|
|
this.setState({
|
|
|
|
|
child:false,
|
|
|
|
|
sort:"desc"
|
|
|
|
|
child: false,
|
|
|
|
|
sort: "desc"
|
|
|
|
|
})
|
|
|
|
|
this.seactall(undefined,"desc");
|
|
|
|
|
}
|
|
|
|
|
this.seactall(undefined, "desc");
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
if(this.props.match.params.Id){
|
|
|
|
|
this.getcourse_groupslists()
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpin:true,
|
|
|
|
@ -136,8 +139,12 @@ class Fileslists extends Component{
|
|
|
|
|
this.seactall(parseInt(this.props.match.params.Id),"desc")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updadatalist=(id)=>{
|
|
|
|
@ -174,6 +181,7 @@ class Fileslists extends Component{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
updatafiled=()=>{
|
|
|
|
|
|
|
|
|
|
let{sort}=this.state;
|
|
|
|
|
if(this.props.match.params.main_id){
|
|
|
|
|
this.seactall(undefined,sort);
|
|
|
|
@ -640,7 +648,7 @@ class Fileslists extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Settingtypess=(id,title,link)=>{
|
|
|
|
|
debugger
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
Addanexternallink:true,
|
|
|
|
|
Exterchainname:"资源设置",
|
|
|
|
@ -951,10 +959,12 @@ class Fileslists extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
secondRowLeft={
|
|
|
|
|
<div style={{"display":"inline-block", "marginTop": "22px"}}>
|
|
|
|
|
this.props.isAdmin()?<div style={{"display":"inline-block", "marginTop": "22px"}}>
|
|
|
|
|
<span>共 {total_count} 个资源</span>
|
|
|
|
|
<span style={{"marginLeft":"16px"}}>已发布:{publish_count}个</span>
|
|
|
|
|
<span style={{"marginLeft":"16px"}}>未发布:{unpublish_count}个</span>
|
|
|
|
|
</div>:<div style={{"display":"inline-block", "marginTop": "22px"}}>
|
|
|
|
|
<span>共 {publish_count} 个资源</span>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
onPressEnter={this.onPressEnter}
|
|
|
|
|