实训课程选择框

dev_unstable^2
杨树明 6 years ago
parent 1326cd14c2
commit 1344f59d4e

@ -297,8 +297,13 @@ class DetailCardsEditAndAdd extends Component{
contentViewScrolladd=(e)=>{ contentViewScrolladd=(e)=>{
const {ChooseShixunList}=this.state;
//滑动到底判断 //滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
if(ChooseShixunList.shixun_list.length===0){
return
}else{
// console.log("到达底部"); // console.log("到达底部");
this.setState({ this.setState({
hometypepvisible:true hometypepvisible:true
@ -334,6 +339,7 @@ class DetailCardsEditAndAdd extends Component{
console.log(error); console.log(error);
}) })
}
} }

@ -338,8 +338,12 @@ class DetailCardsEditAndEdit extends Component{
contentViewScrolledit=(e)=>{ contentViewScrolledit=(e)=>{
//滑动到底判断 //滑动到底判断
const {ChooseShixunList}=this.state;
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
if(ChooseShixunList.shixun_list.length===0){
return
}else{
this.setState({ this.setState({
hometypepvisible:true hometypepvisible:true
}) })
@ -383,6 +387,11 @@ class DetailCardsEditAndEdit extends Component{
console.log(error); console.log(error);
}) })
}
} }
} }

@ -475,7 +475,10 @@ export default class TPMevaluation extends Component {
} }
handpathoptionvalue=(value)=>{ handpathoptionvalue=(value)=>{
this.setState({ this.setState({
pathoptionvalue:value pathoptionvalue:value,
shixunfileexpectpicturepath:undefined,
shixunfilestandardpicturepath:undefined,
shixunfilepicturepath:undefined
}) })
} }
showrepositoryurltip=(type)=>{ showrepositoryurltip=(type)=>{
@ -640,19 +643,20 @@ export default class TPMevaluation extends Component {
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
let{checkpointId}=this.state; let{checkpointId}=this.state;
let url = "/shixuns/"+id+"/challenges/"+checkpointId+".json"; let url = "/shixuns/"+id+"/challenges/"+checkpointId+".json";
axios.put(url,{ let newchallenge={
tab:1,
challenge:{
path:shixunfilepath, path:shixunfilepath,
exec_path:shixunfilepathplay, exec_path:shixunfilepathplay,
show_type:pathoptionvalue, show_type:pathoptionvalue===-1?undefined:pathoptionvalue,
original_picture_path:shixunfileexpectpicturepath, original_picture_path:pathoptionvalue===-1?undefined:shixunfileexpectpicturepath,
expect_picture_path:shixunfilestandardpicturepath, expect_picture_path:pathoptionvalue===-1?undefined:shixunfilestandardpicturepath,
picture_path:shixunfilepicturepath, picture_path:pathoptionvalue===-1?undefined:shixunfilepicturepath,
test_set_score:newscorevalue, test_set_score:newscorevalue,
test_set_average:markvalue, test_set_average:markvalue,
web_route:web_route===null?undefined:web_route web_route:web_route===null?undefined:web_route
}, }
axios.put(url,{
tab:1,
challenge:newchallenge,
test_set:evaluationlist test_set:evaluationlist
} }
).then((response) => { ).then((response) => {

Loading…
Cancel
Save