|
|
@ -59,7 +59,8 @@ class DetailCardsEditAndAdd extends Component{
|
|
|
|
AddShixunBox = () =>{
|
|
|
|
AddShixunBox = () =>{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
selectShixun:true,
|
|
|
|
selectShixun:true,
|
|
|
|
patheditarry:[]
|
|
|
|
patheditarry:[],
|
|
|
|
|
|
|
|
page:1
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.changeTag(0,"");
|
|
|
|
this.changeTag(0,"");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -68,6 +69,7 @@ class DetailCardsEditAndAdd extends Component{
|
|
|
|
cloasShixunBox =()=>{
|
|
|
|
cloasShixunBox =()=>{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
selectShixun:false,
|
|
|
|
selectShixun:false,
|
|
|
|
|
|
|
|
page:1,
|
|
|
|
patheditarry:[]
|
|
|
|
patheditarry:[]
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -103,7 +105,8 @@ class DetailCardsEditAndAdd extends Component{
|
|
|
|
shixuns_listedit:newshixuns_listedit,
|
|
|
|
shixuns_listedit:newshixuns_listedit,
|
|
|
|
shixuns_listeditlist:list,
|
|
|
|
shixuns_listeditlist:list,
|
|
|
|
patheditarry:[],
|
|
|
|
patheditarry:[],
|
|
|
|
selectShixun:false
|
|
|
|
selectShixun:false,
|
|
|
|
|
|
|
|
page:1,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}).catch((error) => {
|
|
|
|
}).catch((error) => {
|
|
|
|
console.log(error)
|
|
|
|
console.log(error)
|
|
|
@ -139,18 +142,23 @@ class DetailCardsEditAndAdd extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
//打开选择实训弹框初始化tag标签和列表
|
|
|
|
//打开选择实训弹框初始化tag标签和列表
|
|
|
|
changeTag=(id,search)=>{
|
|
|
|
changeTag=(id,search)=>{
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
hometypepvisible:true
|
|
|
|
this.setState({
|
|
|
|
})
|
|
|
|
ChooseShixunListshixun_list:[],
|
|
|
|
let pathId=this.props.pathid;
|
|
|
|
page:1,
|
|
|
|
let {page}=this.state;
|
|
|
|
hometypepvisible:true,
|
|
|
|
let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+page
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let pathId=this.props.pathid;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+1
|
|
|
|
if(search!="" && search!=undefined){
|
|
|
|
if(search!="" && search!=undefined){
|
|
|
|
url+="&search="+search;
|
|
|
|
url+="&search="+search;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(id!=0){
|
|
|
|
if(id!=0){
|
|
|
|
url+="&type="+id;
|
|
|
|
url+="&type="+id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
axios.get(url).then((result)=>{
|
|
|
|
axios.get(url).then((result)=>{
|
|
|
|
if(result.status===200){
|
|
|
|
if(result.status===200){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -287,43 +295,45 @@ class DetailCardsEditAndAdd extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
contentViewScrolladd=(e)=>{
|
|
|
|
contentViewScrolladd=(e)=>{
|
|
|
|
|
|
|
|
|
|
|
|
//滑动到底判断
|
|
|
|
//滑动到底判断
|
|
|
|
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
|
|
|
|
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
|
|
|
|
// console.log("到达底部");
|
|
|
|
// console.log("到达底部");
|
|
|
|
this.setState({
|
|
|
|
debugger
|
|
|
|
hometypepvisible:true
|
|
|
|
this.setState({
|
|
|
|
})
|
|
|
|
hometypepvisible:true
|
|
|
|
let pathId=this.props.pathid;
|
|
|
|
})
|
|
|
|
let {search,page,type,ChooseShixunListshixun_list}=this.state;
|
|
|
|
let pathId=this.props.pathid;
|
|
|
|
let newpage=page+1;
|
|
|
|
let {search,page,type,ChooseShixunListshixun_list}=this.state;
|
|
|
|
let newChooseShixunListshixun_list=ChooseShixunListshixun_list;
|
|
|
|
let newpage=page+1;
|
|
|
|
let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+newpage
|
|
|
|
let newChooseShixunListshixun_list=ChooseShixunListshixun_list;
|
|
|
|
if(search!="" && search!=undefined){
|
|
|
|
let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+newpage
|
|
|
|
url+="&search="+search;
|
|
|
|
if(search!="" && search!=undefined){
|
|
|
|
}
|
|
|
|
url+="&search="+search;
|
|
|
|
if(type!=0){
|
|
|
|
}
|
|
|
|
url+="&type="+type;
|
|
|
|
if(type!=0){
|
|
|
|
}
|
|
|
|
url+="&type="+type;
|
|
|
|
axios.get(url).then((result)=>{
|
|
|
|
}
|
|
|
|
if(result.status===200){
|
|
|
|
axios.get(url).then((result)=>{
|
|
|
|
let list =result.data.shixun_list;
|
|
|
|
if(result.status===200){
|
|
|
|
|
|
|
|
let list =result.data.shixun_list;
|
|
|
|
for(var i=0; i<list.length; i++){
|
|
|
|
|
|
|
|
newChooseShixunListshixun_list.push(list[i])
|
|
|
|
for(var i=0; i<list.length; i++){
|
|
|
|
}
|
|
|
|
newChooseShixunListshixun_list.push(list[i])
|
|
|
|
this.setState({
|
|
|
|
}
|
|
|
|
ChooseShixunList:result.data,
|
|
|
|
this.setState({
|
|
|
|
hometypepvisible:false,
|
|
|
|
ChooseShixunList:result.data,
|
|
|
|
type:type,
|
|
|
|
hometypepvisible:false,
|
|
|
|
search:search,
|
|
|
|
type:type,
|
|
|
|
page:newpage,
|
|
|
|
search:search,
|
|
|
|
ChooseShixunListshixun_list:newChooseShixunListshixun_list
|
|
|
|
page:newpage,
|
|
|
|
})
|
|
|
|
ChooseShixunListshixun_list:newChooseShixunListshixun_list
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}).catch((error)=>{
|
|
|
|
}
|
|
|
|
console.log(error);
|
|
|
|
}).catch((error)=>{
|
|
|
|
})
|
|
|
|
console.log(error);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -481,7 +491,7 @@ class DetailCardsEditAndAdd extends Component{
|
|
|
|
`
|
|
|
|
`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
<div className="over180 pl20 pr20"
|
|
|
|
{ChooseShixunListshixun_list && ChooseShixunListshixun_list.length===0?"": <div className="over180 pl20 pr20"
|
|
|
|
onScroll={this.contentViewScrolladd}
|
|
|
|
onScroll={this.contentViewScrolladd}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}>
|
|
|
|
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}>
|
|
|
@ -508,7 +518,7 @@ class DetailCardsEditAndAdd extends Component{
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</Checkbox.Group>
|
|
|
|
</Checkbox.Group>
|
|
|
|
</div>
|
|
|
|
</div>}
|
|
|
|
<div className="mt20 marginauto clearfix edu-txt-center">
|
|
|
|
<div className="mt20 marginauto clearfix edu-txt-center">
|
|
|
|
<a className="pop_close task-btn mr30 margin-tp26" onClick={this.cloasShixunBox}>取消</a>
|
|
|
|
<a className="pop_close task-btn mr30 margin-tp26" onClick={this.cloasShixunBox}>取消</a>
|
|
|
|
<a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.clickShixunchoose}>确定</a>
|
|
|
|
<a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.clickShixunchoose}>确定</a>
|
|
|
|