|
|
|
@ -454,20 +454,6 @@ class ShixunHomework extends Component{
|
|
|
|
|
checkBoxValues:[]
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let coursesId=this.props.match.params.coursesId;
|
|
|
|
|
let url ="/courses/"+coursesId+"/homework_commons/shixuns.json";
|
|
|
|
|
|
|
|
|
|
axios.get(url).then((result)=>{
|
|
|
|
|
if(result.status===200){
|
|
|
|
|
this.setState({
|
|
|
|
|
shixunmodallist:result.data,
|
|
|
|
|
hometypepvisible:false,
|
|
|
|
|
newshixunmodallist:result.data.shixun_list,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -477,24 +463,10 @@ class ShixunHomework extends Component{
|
|
|
|
|
this.setState({
|
|
|
|
|
hometypepvisible:true,
|
|
|
|
|
patheditarry:[],
|
|
|
|
|
checkBoxValues:[]
|
|
|
|
|
checkBoxValues:[],
|
|
|
|
|
shixunpath: true,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let coursesId=this.props.match.params.coursesId;
|
|
|
|
|
let url ="/courses/"+coursesId+"/homework_commons/subjects.json";
|
|
|
|
|
|
|
|
|
|
axios.get(url).then((result)=>{
|
|
|
|
|
if(result.status===200){
|
|
|
|
|
this.setState({
|
|
|
|
|
shixunpath:true,
|
|
|
|
|
shixunpathlist:result.data,
|
|
|
|
|
hometypepvisible:false,
|
|
|
|
|
newshixunpathlist:result.data.subject_list,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -508,116 +480,80 @@ class ShixunHomework extends Component{
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
funshixunmodallist=(search,type,loading,page)=>{
|
|
|
|
|
let{newshixunmodallist}=this.state;
|
|
|
|
|
let newshixunmodallists=[]
|
|
|
|
|
if(page>1){
|
|
|
|
|
newshixunmodallists=newshixunmodallist;
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
hometypepvisible:loading
|
|
|
|
|
})
|
|
|
|
|
let coursesId=this.props.match.params.coursesId;
|
|
|
|
|
let url ="/courses/"+coursesId+"/homework_commons/shixuns.json";
|
|
|
|
|
|
|
|
|
|
axios.get(url, {
|
|
|
|
|
params: {
|
|
|
|
|
search: search,
|
|
|
|
|
type:type,
|
|
|
|
|
page:page
|
|
|
|
|
}
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
if(result.status===200){
|
|
|
|
|
|
|
|
|
|
let shixun_list=result.data.shixun_list;
|
|
|
|
|
for(var i=0; i<shixun_list.length;i++){
|
|
|
|
|
newshixunmodallists.push(shixun_list[i])
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
shixunmodal:true,
|
|
|
|
|
shixunmodallist:result.data,
|
|
|
|
|
newshixunmodallist:newshixunmodallists,
|
|
|
|
|
hometypepvisible:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
funshixunpathlist=(search,type,loading,page)=>{
|
|
|
|
|
let{newshixunpathlist}=this.state;
|
|
|
|
|
let newshixunmodallists=[]
|
|
|
|
|
if(page>1){
|
|
|
|
|
newshixunmodallists=newshixunpathlist;
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
hometypepvisible:loading
|
|
|
|
|
})
|
|
|
|
|
let coursesId=this.props.match.params.coursesId;
|
|
|
|
|
let url ="/courses/"+coursesId+"/homework_commons/subjects.json";
|
|
|
|
|
|
|
|
|
|
axios.get(url, {
|
|
|
|
|
params: {
|
|
|
|
|
search: search,
|
|
|
|
|
type:type,
|
|
|
|
|
page:page
|
|
|
|
|
}
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
if(result.status===200){
|
|
|
|
|
|
|
|
|
|
let shixun_list=result.data.subject_list;
|
|
|
|
|
for(var i=0; i<shixun_list.length;i++){
|
|
|
|
|
newshixunmodallists.push(shixun_list[i])
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
shixunpath:true,
|
|
|
|
|
shixunpathlist:result.data,
|
|
|
|
|
newshixunpathlist:newshixunmodallists,
|
|
|
|
|
hometypepvisible:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// funshixunmodallist=(search,type,loading,page)=>{
|
|
|
|
|
// let{newshixunmodallist}=this.state;
|
|
|
|
|
// let newshixunmodallists=[]
|
|
|
|
|
// if(page>1){
|
|
|
|
|
// newshixunmodallists=newshixunmodallist;
|
|
|
|
|
// }
|
|
|
|
|
// this.setState({
|
|
|
|
|
// hometypepvisible:loading
|
|
|
|
|
// })
|
|
|
|
|
// let coursesId=this.props.match.params.coursesId;
|
|
|
|
|
// let url ="/courses/"+coursesId+"/homework_commons/shixuns.json";
|
|
|
|
|
//
|
|
|
|
|
// axios.get(url, {
|
|
|
|
|
// params: {
|
|
|
|
|
// search: search,
|
|
|
|
|
// type:type,
|
|
|
|
|
// page:page
|
|
|
|
|
// }
|
|
|
|
|
// }).then((result)=>{
|
|
|
|
|
// if(result.status===200){
|
|
|
|
|
//
|
|
|
|
|
// let shixun_list=result.data.shixun_list;
|
|
|
|
|
// for(var i=0; i<shixun_list.length;i++){
|
|
|
|
|
// newshixunmodallists.push(shixun_list[i])
|
|
|
|
|
// }
|
|
|
|
|
// this.setState({
|
|
|
|
|
// shixunmodal:true,
|
|
|
|
|
// shixunmodallist:result.data,
|
|
|
|
|
// newshixunmodallist:newshixunmodallists,
|
|
|
|
|
// hometypepvisible:false
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// }).catch((error)=>{
|
|
|
|
|
// console.log(error);
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
funshixunpathlist=(search,type,loading,page)=>{
|
|
|
|
|
let{newshixunpathlist}=this.state;
|
|
|
|
|
let newshixunmodallists=[]
|
|
|
|
|
if(page>1){
|
|
|
|
|
newshixunmodallists=newshixunpathlist;
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
hometypepvisible:loading
|
|
|
|
|
})
|
|
|
|
|
let coursesId=this.props.match.params.coursesId;
|
|
|
|
|
let url ="/courses/"+coursesId+"/homework_commons/subjects.json";
|
|
|
|
|
|
|
|
|
|
axios.get(url, {
|
|
|
|
|
params: {
|
|
|
|
|
search: search,
|
|
|
|
|
type:type,
|
|
|
|
|
page:page
|
|
|
|
|
}
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
if(result.status===200){
|
|
|
|
|
|
|
|
|
|
let shixun_list=result.data.subject_list;
|
|
|
|
|
for(var i=0; i<shixun_list.length;i++){
|
|
|
|
|
newshixunmodallists.push(shixun_list[i])
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
shixunpath:true,
|
|
|
|
|
shixunpathlist:result.data,
|
|
|
|
|
newshixunpathlist:newshixunmodallists,
|
|
|
|
|
hometypepvisible:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// funshixunpathlist=(search,type,loading,page)=>{
|
|
|
|
|
// let{newshixunpathlist}=this.state;
|
|
|
|
|
// let newshixunmodallists=[]
|
|
|
|
|
// if(page>1){
|
|
|
|
|
// newshixunmodallists=newshixunpathlist;
|
|
|
|
|
// }
|
|
|
|
|
// this.setState({
|
|
|
|
|
// hometypepvisible:loading
|
|
|
|
|
// })
|
|
|
|
|
// let coursesId=this.props.match.params.coursesId;
|
|
|
|
|
// let url ="/courses/"+coursesId+"/homework_commons/subjects.json";
|
|
|
|
|
//
|
|
|
|
|
// axios.get(url, {
|
|
|
|
|
// params: {
|
|
|
|
|
// search: search,
|
|
|
|
|
// type:type,
|
|
|
|
|
// page:page
|
|
|
|
|
// }
|
|
|
|
|
// }).then((result)=>{
|
|
|
|
|
// if(result.status===200){
|
|
|
|
|
//
|
|
|
|
|
// let shixun_list=result.data.subject_list;
|
|
|
|
|
// for(var i=0; i<shixun_list.length;i++){
|
|
|
|
|
// newshixunmodallists.push(shixun_list[i])
|
|
|
|
|
// }
|
|
|
|
|
// this.setState({
|
|
|
|
|
// shixunpath:true,
|
|
|
|
|
// shixunpathlist:result.data,
|
|
|
|
|
// newshixunpathlist:newshixunmodallists,
|
|
|
|
|
// hometypepvisible:false
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// }).catch((error)=>{
|
|
|
|
|
// console.log(error);
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
PaginationCourse=(pageNumber)=>{
|
|
|
|
|
let {Coursename,order}=this.state;
|
|
|
|
@ -1012,13 +948,16 @@ class ShixunHomework extends Component{
|
|
|
|
|
course_groups={course_groups}
|
|
|
|
|
getcourse_groupslist={(id)=>this.getcourse_groupslist(id)}
|
|
|
|
|
/>:""}
|
|
|
|
|
|
|
|
|
|
{/*选择实训*/}
|
|
|
|
|
{shixunmodal===true?<ShixunModal
|
|
|
|
|
{...this.props}
|
|
|
|
|
{...this.state}
|
|
|
|
|
datas={datas}
|
|
|
|
|
category_id={this.props.match.params.category_id}
|
|
|
|
|
visible={shixunmodal}
|
|
|
|
|
shixunmodallist={shixunmodallist}
|
|
|
|
|
funshixunmodallist={(search,type,loading,page)=>this.funshixunmodallist(search,type,loading,page)}
|
|
|
|
|
// funshixunmodallist={(search,type,loading,page)=>this.funshixunmodallist(search,type,loading,page)}
|
|
|
|
|
hometypepvisible={hometypepvisible}
|
|
|
|
|
hidecouseShixunModal={this.hidecouseShixunModal}
|
|
|
|
|
newshixunmodallist={newshixunmodallist}
|
|
|
|
@ -1027,6 +966,7 @@ class ShixunHomework extends Component{
|
|
|
|
|
funpatheditarry={(patheditarry)=>this.funpatheditarry(patheditarry)}
|
|
|
|
|
patheditarry={patheditarry}
|
|
|
|
|
/>:""}
|
|
|
|
|
|
|
|
|
|
{shixunmodal===true||shixunpath===true?<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
@ -1038,11 +978,13 @@ class ShixunHomework extends Component{
|
|
|
|
|
</style>:""}
|
|
|
|
|
{/*选择实训路径*/}
|
|
|
|
|
{shixunpath===true? <PathModal
|
|
|
|
|
{...this.props}
|
|
|
|
|
{...this.state}
|
|
|
|
|
datas={datas}
|
|
|
|
|
visible={shixunpath}
|
|
|
|
|
shixunmodallist={this.state.shixunpathlist}
|
|
|
|
|
newshixunmodallist={this.state.newshixunpathlist}
|
|
|
|
|
funshixunpathlist={(search,type,loading,page)=>this.funshixunpathlist(search,type,loading,page)}
|
|
|
|
|
// funshixunpathlist={(search,type,loading,page)=>this.funshixunpathlist(search,type,loading,page)}
|
|
|
|
|
hometypepvisible={hometypepvisible}
|
|
|
|
|
hidecouseShixunModal={this.hidecouseShixunModal}
|
|
|
|
|
coursesId={this.props.match.params.coursesId}
|
|
|
|
|