Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forum
cxt 5 years ago
commit 36c40dd68a

@ -302,7 +302,7 @@ class CoursesNew extends Component {
if(value!=""){
this.props.form.setFieldsValue({
classroom:value,
course:value
// course:value
});
this.Searchvalue(value)
}
@ -312,7 +312,7 @@ class CoursesNew extends Component {
handleChange=(value)=>{
this.props.form.setFieldsValue({
course:value,
// course:value,
classroom:value
})
};
@ -325,7 +325,8 @@ class CoursesNew extends Component {
// fetching: true,
// });
this.setState({
fetching: true
fetching: true,
school: value
})
this.getschool(value)
}
@ -365,9 +366,13 @@ class CoursesNew extends Component {
if (result.data.status===0) {
this.setState({
searchlistscholl: result.data.school_names,
})
if(result.data.school_names.length!=0){
this.setState({
fetching: false
})
}
}
}).catch((error)=>{
console.log(error)
@ -460,7 +465,7 @@ class CoursesNew extends Component {
<AutoComplete style={{ width: 280 }}
onSearch={this.handleSearch}
// onChange={this.handleChange}
onChange={this.handleChange}
className={"fl construction "}
placeholder="例如:数据结构"
>

@ -256,11 +256,12 @@ export default class TPMevaluation extends Component {
this.setevaluationlist(newevaluationlist);
}
getfilepath=(e,shixunfilepath)=>{
getfilepath=(e,shixunfilepath,type)=>{
this.setState({
evaluationvisible: true,
selectpath:e.target.value,
selectpatharr:[],
pathtype:type
});
let id = this.props.match.params.shixunId;
let url ="/shixuns/"+id+"/repository.json";
@ -283,9 +284,9 @@ export default class TPMevaluation extends Component {
});
}
sendgetfilepath=(newpath,type)=>{
sendgetfilepath=(newpath,type,newpathtype)=>{
let id = this.props.match.params.shixunId;
let{path,main}=this.state;
let{path,main,pathtype}=this.state;
let ary=main;
let paths=path;
@ -329,10 +330,18 @@ export default class TPMevaluation extends Component {
});
}
if(pathtype===2){
this.setState({
selectpath: newpathtype,
})
}
}
goblakepath=(path,key)=>{
let {main,selectpath} =this.state;
let {main,selectpath,pathtype} =this.state;
let newmain=[]
for(var i=0;i<=key;i++){
newmain.push(main[i])
@ -355,6 +364,17 @@ export default class TPMevaluation extends Component {
}).catch((error) => {
console.log(error)
});
if(pathtype===2){
// var str=path;
// str.slice(0,str.length-1)
// debugger
// console.log(str)
this.setState({
selectpath: path,
})
}
}
// delesavegetfilepath=(value)=>{
// let {selectpatharr} = this.state
@ -381,30 +401,9 @@ export default class TPMevaluation extends Component {
// })
// }
savegetfilepath=(value)=>{
let {selectpath,saveshixunfilepath} = this.state
// let newarr =selectpatharr;
// let arrtype=false;
// let arrsum=0;
// let newselectpath="";
// newarr.push(value)
// if(newarr.length>1&&arrtype===false){
// for(var i=0; i<newarr.length;i++){
// if(newarr[i]===value){
// arrsum=arrsum+1;
// if(arrsum===2){
// newarr.splice(i,1);
// arrtype=true;
// }
// }
// }
// }
// for(var z=0; z<newarr.length;z++){
// newselectpath=newselectpath+newarr[z]+ ""
// }
let {selectpath,saveshixunfilepath,pathtype} = this.state
if(pathtype===1){
let newselectpath;
if(saveshixunfilepath==="shixunfilepathplay"){
@ -430,6 +429,32 @@ export default class TPMevaluation extends Component {
selectpath: newselectpath,
})
}
// let newarr =selectpatharr;
// let arrtype=false;
// let arrsum=0;
// let newselectpath="";
// newarr.push(value)
// if(newarr.length>1&&arrtype===false){
// for(var i=0; i<newarr.length;i++){
// if(newarr[i]===value){
// arrsum=arrsum+1;
// if(arrsum===2){
// newarr.splice(i,1);
// arrtype=true;
// }
// }
// }
// }
// for(var z=0; z<newarr.length;z++){
// newselectpath=newselectpath+newarr[z]+ ""
// }
}
evaluationenter=()=>{
@ -650,9 +675,10 @@ export default class TPMevaluation extends Component {
selectpath:e.target.value
})
}
updatepath=(e,name)=>{
updatepath=(e,name,type)=>{
this.setState({
[name]:e.target.value
[name]:e.target.value,
pathtype:type
})
}
@ -818,8 +844,8 @@ export default class TPMevaluation extends Component {
placeholder="请选择版本库中的代码文件。例: src/step1/HelloWorld.java"
value={shixunfilepath}
style={{ width:StudentTaskPapers===true?'100%':""}}
onInput={(e)=>this.updatepath(e,"shixunfilepath")}
onClick={(e)=>this.getfilepath(e,"shixunfilepath")}
onInput={(e)=>this.updatepath(e,"shixunfilepath",1)}
onClick={(e)=>this.getfilepath(e,"shixunfilepath",1)}
/>
<p className="color-grey-9 mt15">该文件将直接显示给学生需要学生在其中填写代码</p>
</div>
@ -844,7 +870,7 @@ export default class TPMevaluation extends Component {
{
main.length===0?"":main.map((item,key)=>{
return(
<a className="f14 fb" onClick={()=>this.goblakepath(item.path,key)}>{item.val}</a>
<a className="f14 fb" onClick={()=>this.goblakepath(item.path,key,item)}>{item.val}</a>
)
})
}
@ -853,7 +879,7 @@ export default class TPMevaluation extends Component {
return(
<li className="entry" key={key}>
<div className="filename_no_report hidden">{
item.type==="tree"?<a onClick={()=>this.sendgetfilepath(item.name,item.type)} data-remote="true">
item.type==="tree"?<a onClick={()=>this.sendgetfilepath(item.name,item.type,path+item.name)} data-remote="true">
<i className="iconfont icon-wenjianjia color-blue mr2"></i>
{path+item.name}</a>:<a data-remote="true">
<i className="iconfont icon-zuoye color-blue mr2"></i>
@ -873,7 +899,7 @@ export default class TPMevaluation extends Component {
<div className="clearfix mt20">
<label className="fl mt5 directory_filepath">选中的文件路径</label>
<Input id="points_tusi" placeholder="选中的文件路径" className="fl input-60-40"
style={{width:"440px"}}
style={{width:"400px"}}
onInput={(e)=>this.saveselectpath(e)}
value={selectpath}/>
</div>
@ -897,8 +923,8 @@ export default class TPMevaluation extends Component {
placeholder="请选择版本库中的代码文件。例src/step1/HelloWorldTest.java"
value={shixunfilepathplay}
style={{width:StudentTaskDocs===true?'100%':""}}
onInput={(e)=>this.updatepath(e,"shixunfilepathplay")}
onClick={(e)=>this.getfilepath(e,"shixunfilepathplay")}
onInput={(e)=>this.updatepath(e,"shixunfilepathplay",1)}
onClick={(e)=>this.getfilepath(e,"shixunfilepathplay",1)}
/>
<p className="color-grey-9 mt15">该文件由平台执行用来测试平台学员代码是否正确</p>
</div>
@ -958,8 +984,8 @@ export default class TPMevaluation extends Component {
id="shixun_file_expect_picture_path" name="challenge[original_picture_path]"
placeholder="请选择版本库中存储了待处理图片的路径。例src/step1/expectedimages"
value={shixunfileexpectpicturepath}
onInput={(e)=>this.updatepath(e,"shixunfileexpectpicturepath")}
onClick={(e)=>this.getfilepath(e,"shixunfileexpectpicturepath")}
onInput={(e)=>this.updatepath(e,"shixunfileexpectpicturepath",2)}
onClick={(e)=>this.getfilepath(e,"shixunfileexpectpicturepath",2)}
/>
<p className="color-grey-9 mt15">
该路径下的文件将在学员评测本关任务时作为原始图片显示在查看效果页供学员参考,任务为图片处理时请指定该路径并注意与程序文件所在文件夹分开
@ -980,8 +1006,8 @@ export default class TPMevaluation extends Component {
id="shixun_file_standard_picture_path" name="challenge[expect_picture_path]"
placeholder="请选择版本库中存储了标准答案代码输出文件的路径。例src/step1/expectedimages"
value={shixunfilestandardpicturepath}
onInput={(e)=>this.updatepath(e,"shixunfilestandardpicturepath")}
onClick={(e)=>this.getfilepath(e,"shixunfilestandardpicturepath")}
onInput={(e)=>this.updatepath(e,"shixunfilestandardpicturepath",2)}
onClick={(e)=>this.getfilepath(e,"shixunfilestandardpicturepath",2)}
/>
<p className="color-grey-9 mt15">
该路径下的文件将在学员评测本关任务时作为参考答案显示在查看效果页供学员参考任务输出结果为文件时请指定该路径并注意与程序文件所在文件夹分开
@ -1001,8 +1027,8 @@ export default class TPMevaluation extends Component {
<input type="text" className="input-100-45 change" autoComplete="off"
id="shixun_file_picture_path" name="challenge[picture_path]"
value={shixunfilepicturepath}
onInput={(e)=>this.updatepath(e,"shixunfilepicturepath")}
onClick={(e)=>this.getfilepath(e,"shixunfilepicturepath")}
onInput={(e)=>this.updatepath(e,"shixunfilepicturepath",2)}
onClick={(e)=>this.getfilepath(e,"shixunfilepicturepath",2)}
placeholder="请在版本库中指定用来保存学员代码实际输出结果的路径。例src/step1/outputimages"/>
<p className="color-grey-9 mt15">
学员评测本关任务时生成的文件将保存在该路径下并作为实际输出显示在查看效果页供学员确认任务输出结果为文件时请指定该路径并注意与程序文件所在文件夹分开

@ -743,9 +743,11 @@ class Newshixuns extends Component {
onChangeTimePicker = (value, dateString) => {
this.setState({
TimePickervalue: handleDateStrings(dateString)
TimePickervalue: moment(handleDateStrings(dateString))
})
}
// 附件相关 START
handleChange = (info) => {
console.log("handleChange1");
@ -1279,13 +1281,14 @@ class Newshixuns extends Component {
<li className="fl">
<DatePicker
showToday={false}
showTime
locale={locale}
showTime={{ format: 'HH:mm' }}
style={{"width": "184px"}}
format="YYYY-MM-DD HH:mm"
placeholder="请选择开启时间"
onChange={this.onChangeTimePicker}
value={TimePickervalue && moment(TimePickervalue, "YYYY-MM-DD HH:mm")}
disabledTime={disabledDateTime}
dropdownClassName="hideDisable"
/>

@ -33,7 +33,11 @@ class Notcompletedysl extends Component {
}
modalCancel=()=>{
window.location.href = "/";
var weekArray = JSON.parse(window.sessionStorage.getItem('yslgeturls'));
if(weekArray===undefined){
weekArray="/";
}
window.location.href = weekArray;
}
setDownload=()=>{
@ -55,11 +59,10 @@ class Notcompletedysl extends Component {
width="530px"
>
<div className="educouddiv">
<div className={"tabeltext-alignleft mt10"}><p>您尚未完善个人资料</p></div>
<div className={"tabeltext-alignleft mt10"}><p>请在完成资料后提交试用申请</p></div>
<div className={"tabeltext-alignleft mt20"}><p>完善您的资料将获得更多的使用权限</p></div>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={()=>this.modalCancel()}>取消</a>
<a className="task-btn task-btn-orange" onClick={()=>this.setDownload()}>立即完善资料</a>
<a className="task-btn task-btn-orange" onClick={()=>this.setDownload()}>立即完善</a>
</div>
</div>
</Modal>

Loading…
Cancel
Save