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