hjm 6 years ago
commit 9511600e03

@ -241,6 +241,7 @@ class App extends Component {
render() { render() {
// let {isRenders} = this.state; // let {isRenders} = this.state;
return ( return (
<LocaleProvider locale={zhCN}> <LocaleProvider locale={zhCN}>
@ -254,7 +255,7 @@ class App extends Component {
{/*{*/} {/*{*/}
{/* isRenders === true?*/} {/* isRenders === true?*/}
<Trialapplication></Trialapplication> {/*<Trialapplication></Trialapplication>*/}
{/*:""*/} {/*:""*/}
{/*}*/} {/*}*/}

@ -421,7 +421,7 @@ class CommonWorkSetting extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:starttime, starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime:endtime, endtime:endtime,
Cancelname:"暂不发布", Cancelname:"暂不发布",
Savesname:"立即发布", Savesname:"立即发布",

@ -86,7 +86,7 @@ class Associationmodel extends Component{
ModalSave:this.goback, ModalSave:this.goback,
loadtype:true loadtype:true
}) })
this.props.funlist()
} }
} }

@ -213,7 +213,7 @@ class Exercise extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+this.props.getNowFormatDates(1), starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
endtime:"截止时间:"+this.props.getNowFormatDates(2), endtime:"截止时间:"+this.props.getNowFormatDates(2),
Cancelname:"暂不发布", Cancelname:"暂不发布",

@ -65,6 +65,7 @@ class GraduateTaskItem extends Component{
cardsModalsavetype:this.cannerassocition, cardsModalsavetype:this.cannerassocition,
loadtype:true loadtype:true
}) })
this.props.funlist()
} }
}).catch((error)=>{ }).catch((error)=>{

@ -125,7 +125,7 @@ class GraduationTasksedit extends Component{
GraduationTasksedittype=false; GraduationTasksedittype=false;
// window.location.href="/courses/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions"; // window.location.href="/courses/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions";
// this.goback() // this.goback()
this.props.history.push("/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting"); window.location.href="/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting";
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)

@ -140,9 +140,11 @@ class GraduationTaskssettingapp extends Component{
componentDidMount(){ componentDidMount(){
let query=this.props.location.search
const type = query.split('?tab=');
let id=parseInt(type[1])
this.getsettings(); this.getsettings();
if(this.props.isAdmin()===true){ if(this.props.isAdmin()===true&&isNaN(id)){
this.editSetting() this.editSetting()
} }
} }
@ -413,7 +415,7 @@ class GraduationTaskssettingapp extends Component{
Topval:"发布设置均可修改", Topval:"发布设置均可修改",
Botvalleft:"点击修改", Botvalleft:"点击修改",
Botval:"此设置将对所有分班生效", Botval:"此设置将对所有分班生效",
starttime:moment(moment(handleDateString(this.props.getNowFormatDates(1)))).format("YYYY-MM-DD HH:mm") , starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") ,
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
typs:"start", typs:"start",
endtime:endtime, endtime:endtime,
@ -484,6 +486,31 @@ class GraduationTaskssettingapp extends Component{
let {latepenalty,hascommit,minnums,max_nums,publish_time,end_time,crosscomment,latetime,starttimetype}=this.state; let {latepenalty,hascommit,minnums,max_nums,publish_time,end_time,crosscomment,latetime,starttimetype}=this.state;
if(isNaN(parseInt(this.state.minnum))){
this.setState({
numtype:true
})
this.scrollToAnchor("publishtimestart");
return
}else{
this.setState({
numtype:false
})
}
if(isNaN(parseInt(this.state.maxnum))){
this.setState({
numtype:true
})
this.scrollToAnchor("publishtimestart");
return
}else{
this.setState({
numtype:false
})
}
if(latepenalty===undefined){ if(latepenalty===undefined){
this.setState({ this.setState({
latepenaltytype:true, latepenaltytype:true,
@ -611,26 +638,7 @@ class GraduationTaskssettingapp extends Component{
return return
} }
if(isNaN(parseInt(this.state.minnum))){
this.setState({
numtype:true
})
return
}else{
this.setState({
numtype:false
})
}
if(isNaN(parseInt(this.state.maxnum))){
this.setState({
numtype:true
})
return
}else{
this.setState({
numtype:false
})
}
@ -1036,7 +1044,7 @@ class GraduationTaskssettingapp extends Component{
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link>
<Link className="active" <Link className="active"
style={{paddingLeft:'38px'}} style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link> to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link>
{/*<a className={"fr color-blue font-16"}>导出</a>*/} {/*<a className={"fr color-blue font-16"}>导出</a>*/}
<style> <style>
@ -1066,7 +1074,7 @@ class GraduationTaskssettingapp extends Component{
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} calssName="color-dark">导出成绩</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} calssName="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}
@ -1093,9 +1101,9 @@ class GraduationTaskssettingapp extends Component{
{task_type===2?<div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl30" > {task_type===2?<div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl30" >
<div className={"xingrequired font-16 color-dark h20 mb20"}>分组设置 <span className={"font-14 color-grey-c"}>提交作品时需要关联同组成员组内成员作品共享</span></div> <div className={"xingrequired font-16 color-dark h20 mb20"}>分组设置 <span className={"font-14 color-grey-c"}>提交作品时需要关联同组成员组内成员作品共享</span></div>
<div className={"mb30 h20 ml40"}> <div className={"mb30 h20 ml40"}>
<Input className="mr20" style={{ width:"100px" }} value={minnum} onInput={this.setminnum} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}/> <Input className={numtype===true?"noticeTip mr20":"mr20"} style={{ width:"100px" }} value={minnum} onInput={this.setminnum} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}/>
<span className="mr20">~</span> <span className="mr20">~</span>
<Input className="mr20" style={{width:"100px" }} value={maxnum} onInput={this.setmaxnum} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}/> <Input className={numtype===true?"noticeTip mr20":"mr20"} style={{width:"100px" }} value={maxnum} onInput={this.setmaxnum} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}/>
<span className="mr10"></span> <span className="mr10"></span>
<span className={"font-14 color-grey-c"}>学生提交作品时需要关联同组成员组内成员作品共享</span> <span className={"font-14 color-grey-c"}>学生提交作品时需要关联同组成员组内成员作品共享</span>
</div> </div>
@ -1156,7 +1164,7 @@ class GraduationTaskssettingapp extends Component{
<div className={"h20 mb30 ml30"} > <div className={"h20 mb30 ml30"} >
<span>截止时间</span> <span>截止时间</span>
<Tooltip placement="bottom" title={this.props.isAdmin()===true?endtimetype===true?"时间已过,不能再修改":"":""}> <Tooltip placement="bottom" title={this.props.isSuperAdmin()===true?"":this.props.isAdmin()===true?endtimetype===true?"时间已过,不能再修改":"":""}>
<span> <span>
<DatePicker <DatePicker
showToday={false} showToday={false}
@ -1293,8 +1301,10 @@ class GraduationTaskssettingapp extends Component{
<RadioGroup onChange={this.funcommentstatus} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true} value={crosscomment===false?undefined:commentstatus===0?2:commentstatus===2?2:commentstatus===4?4:undefined}> <RadioGroup onChange={this.funcommentstatus} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true} value={crosscomment===false?undefined:commentstatus===0?2:commentstatus===2?2:commentstatus===4?4:undefined}>
<Radio style={radioStyle} value={2}>指导老师手动分配 <span className={"font-14 color-grey-c ml10"}>由指导老师在作品列表中手动选择每个作品被分配的评阅老师</span></Radio> <Radio style={radioStyle} value={2}>指导老师手动分配 <span className={"font-14 color-grey-c ml10"}>由指导老师在作品列表中手动选择每个作品被分配的评阅老师</span></Radio>
<Radio style={radioStyle} value={4}>答辩组间老师互评 <span className={"font-14 color-grey-c ml10"}>由系统按照设置在答辩组之间自动分配:<Link to={"/courses/"+courseId+"/teachers"}> <Radio style={radioStyle} value={4}>答辩组间老师互评 <span className={"font-14 color-grey-c ml10"}>由系统按照设置在答辩组之间自动分配:
<span className={"color-blue"}>答辩组设置</span></Link></span></Radio> <a href={"/courses/"+courseId+"/teachers"} target="_blank">
<span className={"color-blue"}>答辩组设置</span></a>
</span></Radio>
</RadioGroup> </RadioGroup>
</span> </span>

@ -332,7 +332,7 @@ class GraduationTaskssettinglist extends Component{
Topval:"发布设置均可修改", Topval:"发布设置均可修改",
Botvalleft:"点击修改", Botvalleft:"点击修改",
Botval:"此设置将对所有分班生效", Botval:"此设置将对所有分班生效",
starttime:moment(new Date()).format('YYYY-MM-DD 00:00'), starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") ,
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
typs:"start", typs:"start",
endtime:endtime, endtime:endtime,
@ -544,6 +544,7 @@ class GraduationTaskssettinglist extends Component{
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
if(result.data.status===0){ if(result.data.status===0){
this.searchValue()
this.setState({ this.setState({
Modalstype:true, Modalstype:true,
Modalstopval:result.data.message, Modalstopval:result.data.message,
@ -747,7 +748,7 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => { operation.map((tag,key) => {
return( return(
<div key={key}> <div key={key}>
<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >{tag.status===0?"":"查看"}</a> {tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a>}
</div> </div>
)} )}
):"" ):""
@ -881,10 +882,9 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => { operation.map((tag,key) => {
return( return(
<div key={key}> <div key={key}>
<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} > {tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.status===0?"":"查看"} 查看
</a> </a>}
</div> </div>
)} )}
):"" ):""
@ -1013,7 +1013,8 @@ class GraduationTaskssettinglist extends Component{
<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/> <Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
其它历史评分将全部失效</pre>:""}> 其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} > {tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name}</a> {tag.name}
</a>
: :
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}} <a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""} onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}
@ -1030,9 +1031,9 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => { operation.map((tag,key) => {
return( return(
<div key={key}> <div key={key}>
<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} > {tag.status===0?"--": <a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.status===0?"":"查看"} 查看
</a> </a>}
</div> </div>
)} )}
):"" ):""
@ -1164,8 +1165,8 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => { operation.map((tag,key) => {
return( return(
<div key={key}> <div key={key}>
<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} > {tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.status===0?"":"查看"}</a> 查看</a>}
</div> </div>
)} )}
):"" ):""
@ -1257,6 +1258,7 @@ class GraduationTaskssettinglist extends Component{
visible={visibles} visible={visibles}
Cancel={this.Cancel} Cancel={this.Cancel}
taskid={taskslistdata&&taskslistdata.task_id} taskid={taskslistdata&&taskslistdata.task_id}
funlist={this.searchValue()}
/>:""} />:""}
{taskslistdata&&taskslistdata? {taskslistdata&&taskslistdata?
@ -1289,7 +1291,7 @@ class GraduationTaskssettinglist extends Component{
<Link className="active" to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link> <Link className="active" to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link>
<Link style={{paddingLeft:'38px'}} <Link style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link> to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link>
{/*<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a>*/} {/*<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a>*/}
{/*<a className={"fr color-blue font-16"} onClick={this.end}>立即截止</a>*/} {/*<a className={"fr color-blue font-16"} onClick={this.end}>立即截止</a>*/}
@ -1323,7 +1325,7 @@ class GraduationTaskssettinglist extends Component{
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} calssName="color-dark">导出成绩</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} calssName="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}
@ -1358,7 +1360,7 @@ class GraduationTaskssettinglist extends Component{
<a id="graduation_comment_no_limit" alue={null} className={teacher_comment===null?"pl10 pr10 check_on":"pl10 pr10 "} onClick={this.funteachercomment}>不限</a> <a id="graduation_comment_no_limit" alue={null} className={teacher_comment===null?"pl10 pr10 check_on":"pl10 pr10 "} onClick={this.funteachercomment}>不限</a>
</span> </span>
<CheckboxGroup value={teacher_comment} onChange={(e)=>this.funteachercomment(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.length)} style={{ paddingTop: '4px'}}> <CheckboxGroup value={teacher_comment} onChange={(e)=>this.funteachercomment(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.length)} style={{ paddingTop: '4px'}}>
{taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.map((item,key)=>{ {taskslistdata.search_assistants && taskslistdata.search_assistants.teacher_comment && taskslistdata.search_assistants.teacher_comment.map((item,key)=>{
return( return(
<span key={key}> <span key={key}>
<Checkbox value={item.id} onClick={this.funteachercomment} className="fl ">{item.name} <Checkbox value={item.id} onClick={this.funteachercomment} className="fl ">{item.name}
@ -1500,7 +1502,7 @@ class GraduationTaskssettinglist extends Component{
pagination={false} pagination={false}
loading={loadingstate} loading={loadingstate}
onChange={this.TablePagination} onChange={this.TablePagination}
className="edu-txt-center"
/>} />}
</div> </div>
</div> </div>
@ -1552,12 +1554,13 @@ class GraduationTaskssettinglist extends Component{
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link> to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link>
{taskslistdata.work_status===undefined?"":taskslistdata.work_status.map((item,key)=>{ {taskslistdata.work_status===undefined||taskslistdata.work_status===null||taskslistdata.work_status.length===0?"":taskslistdata.work_status.map((item,key)=>{
return( return(
<span key={key}> <span key={key}>
{item==="提交作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>提交作品</a>:""} {item==="提交作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>提交作品</a>:""}
{item==="修改作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/edit"}>修改作品</a>:""} {item==="补交作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>补交作品</a>:""}
{item==="查看作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/edit"}>查看作品</a> :""} {item==="修改作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+taskslistdata.work_id+"/works/edit"}>修改作品</a>:""}
{item==="查看作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+taskslistdata.work_id+"/works/edit"}>查看作品</a> :""}
{item==="创建项目"?<a className={"fr color-blue font-16"} href={'/projects/new'}>创建项目</a>:""} {item==="创建项目"?<a className={"fr color-blue font-16"} href={'/projects/new'}>创建项目</a>:""}
{item==="关联项目"?<a className={"fr color-blue font-16"} onClick={this.AssociationItems}>关联项目</a>:""} {item==="关联项目"?<a className={"fr color-blue font-16"} onClick={this.AssociationItems}>关联项目</a>:""}
{item==="取消关联"?<a className={"fr color-blue font-16"} onClick={this.cannelAssociation}>取消关联</a>:""} {item==="取消关联"?<a className={"fr color-blue font-16"} onClick={this.cannelAssociation}>取消关联</a>:""}
@ -1741,6 +1744,7 @@ class GraduationTaskssettinglist extends Component{
pagination={false} pagination={false}
loading={loadingstate} loading={loadingstate}
onChange={this.TablePagination} onChange={this.TablePagination}
className="edu-txt-center"
/>} />}
</div> </div>
</div> </div>

@ -81,7 +81,7 @@ class GraduationTasksquestions extends Component{
Topval:"发布设置均可修改", Topval:"发布设置均可修改",
Botvalleft:"点击修改", Botvalleft:"点击修改",
Botval:"此设置将对所有分班生效", Botval:"此设置将对所有分班生效",
starttime:moment(new Date()).format('YYYY-MM-DD 00:00'), starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") ,
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
typs:"start", typs:"start",
endtime:endtime, endtime:endtime,
@ -275,7 +275,7 @@ class GraduationTasksquestions extends Component{
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
<Link className="active" to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link> <Link className="active" to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link>
<Link style={{paddingLeft:'38px'}} <Link style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link> to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link>
{/*<a className={"fr color-blue font-16"}>导出成绩</a>*/} {/*<a className={"fr color-blue font-16"}>导出成绩</a>*/}
{/*{this.props.isAdmin()?<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a>:""}*/} {/*{this.props.isAdmin()?<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a>:""}*/}
@ -308,7 +308,7 @@ class GraduationTasksquestions extends Component{
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} calssName="color-dark">导出成绩</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} calssName="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}

@ -413,7 +413,7 @@ class GraduationTasks extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+starttime, starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
typs:"start", typs:"start",
endtime:"截止时间:"+endtime, endtime:"截止时间:"+endtime,
@ -744,13 +744,9 @@ class GraduationTasks extends Component{
</Checkbox.Group> </Checkbox.Group>
</Spin> </Spin>
<div className="mb40 edu-txt-center padding20-30"
style={
{ {
display: all_count===undefined?1:all_count< 15 ? 'none' : 'block' all_count > 15 &&
} <div className="mb40 edu-txt-center padding20-30" >
}
>
<Pagination <Pagination
showQuickJumper showQuickJumper
defaultCurrent={1} defaultCurrent={1}
@ -761,7 +757,7 @@ class GraduationTasks extends Component{
onChange={this.PaginationTask} onChange={this.PaginationTask}
/> />
</div> </div>
}
<div className="alltask edu-back-white" <div className="alltask edu-back-white"
style={ style={
{ {
@ -769,8 +765,8 @@ class GraduationTasks extends Component{
} }
} }
> >
<div className="edu-tab-con-box clearfix edu-txt-center"><img className="edu-nodata-img mb20" <div className="edu-tab-con-box clearfix edu-txt-center">
src="https://www.educoder.net/images/educoder/nodata.png" /> <img className="edu-nodata-img mb20" src="https://www.educoder.net/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂无数据哦~</p></div> <p className="edu-nodata-p mb20">暂无数据哦~</p></div>
</div> </div>

@ -67,10 +67,13 @@ class GraduateTopicDetail extends Component{
let course_id=this.props.match.params.course_id; let course_id=this.props.match.params.course_id;
let {tableData}=this.state; let {tableData}=this.state;
this.props.confirm({
content: tableData.user_selected_topic==0?`是否确认取消选题?`:"是否确认选题?",
onOk: () => {
let url="/courses/"+course_id+"/graduation_topics/"+graduation_topic_id+"/" let url="/courses/"+course_id+"/graduation_topics/"+graduation_topic_id+"/"
if(tableData.user_selected_topic){ if(tableData.user_selected_topic==0){
url+="student_cancel_topic.json" url+="student_cancel_topic.json"
}else{ }else if(tableData.user_selected_topic==null || tableData.user_selected_topic==2){
url+="student_select_topic.json" url+="student_select_topic.json"
} }
axios.post((url)).then((result)=>{ axios.post((url)).then((result)=>{
@ -83,9 +86,16 @@ class GraduateTopicDetail extends Component{
console.log(error); console.log(error);
}) })
} }
})
}
render(){ render(){
let {tableData,tablePage,tablePageSize,tab}=this.state let {
tableData,
tablePage,
tablePageSize,
tab,
}=this.state
let {course_id,graduation_topic_id}=this.props.match.params; let {course_id,graduation_topic_id}=this.props.match.params;
const isStudent =this.props.isStudent(); const isStudent =this.props.isStudent();
const isAdmin =this.props.isAdmin(); const isAdmin =this.props.isAdmin();
@ -110,11 +120,17 @@ class GraduateTopicDetail extends Component{
<div className="fl mt6 task_menu_ul ml30"> <div className="fl mt6 task_menu_ul ml30">
<Menu mode="horizontal" defaultSelectedKeys="1" onClick={this.onChangeStatus}> <Menu mode="horizontal" defaultSelectedKeys="1" onClick={this.onChangeStatus}>
<Menu.Item key="1">选题列表</Menu.Item> <Menu.Item key="1">选题列表</Menu.Item>
<Menu.Item key="2">课题详情</Menu.Item> <Menu.Item key="2">选题问答</Menu.Item>
</Menu> </Menu>
</div> </div>
{/* null: 未选题 0待确认 1已同意 2已拒绝 */}
{
isStudent && tableData.user_selected == false && (tableData.user_selected_topic==null || tableData.user_selected_topic==2) &&
<WordsBtn className="fr font-16 mt22 mr30" style="blue" onClick={this.actionTopic}>选题</WordsBtn>
}
{ {
isStudent && <WordsBtn className="fr font-16 mt22 mr30" style="blue" onClick={this.actionTopic}>{tableData.user_selected_topic ? "取消选题":"选题"}</WordsBtn> isStudent && tableData.user_selected == true && tableData.user_selected_topic==0 &&
<WordsBtn className="fr font-16 mt22 mr30" style="blue" onClick={this.actionTopic}>取消选题</WordsBtn>
} }
{ {
isAdmin && <WordsBtn className="fr font-16 mt22 mr30" to={`/courses/${course_id}/graduation_topics/${graduation_topic_id}/edit`} style="blue">编辑</WordsBtn> isAdmin && <WordsBtn className="fr font-16 mt22 mr30" to={`/courses/${course_id}/graduation_topics/${graduation_topic_id}/edit`} style="blue">编辑</WordsBtn>

@ -6,7 +6,7 @@ import '../style.css'
import axios from "axios"; import axios from "axios";
import GraduateTopicReply from './GraduateTopicReply' import GraduateTopicReply from './GraduateTopicReply'
import { ConditionToolTip,markdownToHTML } from 'educoder' import { ConditionToolTip,MarkdownToHtml } from 'educoder'
const $=window.$; const $=window.$;
const type={1: "设计",2: "论文", 3: "创作"} const type={1: "设计",2: "论文", 3: "创作"}
@ -21,18 +21,6 @@ class GraduateTopicDetailTable extends Component{
topicInfo:undefined topicInfo:undefined
} }
} }
updatamakedown=(id)=>{
setTimeout(()=>{
var shixunDescr = window.editormd.markdownToHTML(id, {
htmlDecode: "style,script,iframe",
taskList: true,
tex: true,
flowChart: true,
sequenceDiagram: true
});
$("#"+id+" p:first").addClass("ReactMarkdown");
}, 200)
}
componentDidMount=()=>{ componentDidMount=()=>{
let course_id=this.props.match.params.course_id; let course_id=this.props.match.params.course_id;
let graduation_topic_id=this.props.match.params.graduation_topic_id; let graduation_topic_id=this.props.match.params.graduation_topic_id;
@ -47,7 +35,6 @@ class GraduateTopicDetailTable extends Component{
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
this.updatamakedown("gratuationTopic_Detail");
} }
render(){ render(){
let{topicInfo}=this.state let{topicInfo}=this.state
@ -57,12 +44,17 @@ class GraduateTopicDetailTable extends Component{
return( return(
<div> <div>
<style>{`
.editormd-html-preview{
width:100%!important;
}
`}</style>
<div className="edu-back-white mb20 padding30"> <div className="edu-back-white mb20 padding30">
<div className="bor-bottom-greyE pb30"> <div className="bor-bottom-greyE pb30">
<div id="gratuationTopic_Detail" className="new_li markdown-body justify"> <div id="gratuationTopic_Detail" className="new_li markdown-body justify">
{ {
topicInfo && topicInfo.description!="" && topicInfo && topicInfo.description!="" &&
<span className="markdown-body fl" dangerouslySetInnerHTML={{__html: markdownToHTML(topicInfo.description)}}></span> <MarkdownToHtml content={topicInfo.description} ></MarkdownToHtml>
} }
</div> </div>
{ {

@ -254,7 +254,7 @@ class GraduateTopicDetailTable extends Component{
tableData.users_list && tableData.users_list.length > 0 && tableData.users_list.map((item,key)=>{ tableData.users_list && tableData.users_list.length > 0 && tableData.users_list.map((item,key)=>{
return( return(
<li className="color-grey-9 clearfix" key={key}> <li className="color-grey-9 clearfix" key={key}>
<span style={{"width":"5%"}} className="color-grey-6">{parseInt(key)*parseInt(page*15)+1}</span> <span style={{"width":"5%"}} className="color-grey-6">{parseInt(key+1)+(parseInt(page-1)*15)}</span>
<span style={{"width":"12%"}} className="color-grey-3">{item.student_name}</span> <span style={{"width":"12%"}} className="color-grey-3">{item.student_name}</span>
<span style={{"width":"13%"}}>{item.student_id}</span> <span style={{"width":"13%"}}>{item.student_id}</span>
<span style={{"width":"15%"}}>{item.class_group_name || "--"}</span> <span style={{"width":"15%"}}>{item.class_group_name || "--"}</span>

@ -96,26 +96,26 @@ class GraduateTopicItem extends Component{
<div className="cl"></div> <div className="cl"></div>
<p className="color-grey mt20 clearfix"> <p className="color-grey mt20 clearfix">
<span className="fl mr40"> <span className="fl mr40 mt1">
<Tooltip title="指导老师" placement="bottom"> <Tooltip title="指导老师" placement="bottom">
<span className="color-grey3">{discussMessage.author}</span> <span className="color-grey3">{discussMessage.author}</span>
</Tooltip> </Tooltip>
</span> </span>
<span className="mr20 color-grey-9">{discussMessage.selected_count} 已选</span> <span className="fl mr20 color-grey-9 mt1">{discussMessage.selected_count} 已选</span>
<span className="color-grey-9">{discussMessage.confirmation_count} 已确认</span> <span className="fl color-grey-9 mt1">{discussMessage.confirmation_count} 已确认</span>
<span className="fr"> <span className="fr">
{ {
isAdmin && <WordsBtn onClick={()=>this.editTopic(`${discussMessage.id}`)} style="blue" className="font-16">编辑</WordsBtn> isAdmin && <WordsBtn onClick={()=>this.editTopic(`${discussMessage.id}`)} style="blue" className="font-16">编辑</WordsBtn>
} }
{ {
isStudent && data.user_selected == true && discussMessage.user_selected==true && isStudent && data.user_selected == true && discussMessage.user_topic_status==0 &&
<WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,discussMessage.user_selected)} style="blue" className="font-16"> <WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,true)} style="blue" className="font-16">
取消选题 取消选题
</WordsBtn> </WordsBtn>
} }
{ {
isStudent && data.user_selected == false && discussMessage.user_selected == false && isStudent && data.user_selected==false && (discussMessage.user_topic_status == null || discussMessage.user_topic_status == 2) &&
<WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,discussMessage.user_selected)} style="blue" className="font-16"> <WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,false)} style="blue" className="font-16">
选题 选题
</WordsBtn> </WordsBtn>
} }

@ -38,7 +38,7 @@ class GraduateTopicNew extends Component{
topic_source:[], topic_source:[],
topic_type:[], topic_type:[],
attachments:undefined, attachments:undefined,
addonAfter:20, addonAfter:60,
left_banner_id:undefined, left_banner_id:undefined,
course_name:undefined course_name:undefined
} }
@ -87,7 +87,7 @@ class GraduateTopicNew extends Component{
let topicId=this.props.match.params.topicId let topicId=this.props.match.params.topicId
let url=`/courses/${cid}/graduation_topics/${topicId}/edit.json`; let url=`/courses/${cid}/graduation_topics/${topicId}/edit.json`;
axios.get((url)).then((result)=>{ axios.get((url)).then((result)=>{
if(result.status==200){ if(result){
this.setState({ this.setState({
left_banner_id:result.data.left_banner_id, left_banner_id:result.data.left_banner_id,
course_name:result.data.course_name, course_name:result.data.course_name,
@ -257,7 +257,7 @@ class GraduateTopicNew extends Component{
// 附件相关 ------------ END // 附件相关 ------------ END
changeTopicName=(e)=>{ changeTopicName=(e)=>{
let num= 20 - parseInt(e.target.value.length); let num= 60 - parseInt(e.target.value.length);
this.setState({ this.setState({
addonAfter:num < 0 ? 0 : num addonAfter:num < 0 ? 0 : num
}) })
@ -315,6 +315,11 @@ class GraduateTopicNew extends Component{
console.log(this.props); console.log(this.props);
return( return(
<div className="newMain "> <div className="newMain ">
<style>{`
.courseForm .ant-form-item-label{
margin-left:unset!important
}
`}</style>
<div className="edu-class-container edu-position courseForm"> <div className="edu-class-container edu-position courseForm">
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
<WordsBtn style="grey" className="fl" to={`/courses/${coursesId}`}>{course_name}</WordsBtn> <WordsBtn style="grey" className="fl" to={`/courses/${coursesId}`}>{course_name}</WordsBtn>
@ -357,10 +362,10 @@ class GraduateTopicNew extends Component{
rules: [{ rules: [{
required: true, message: '请输入选题名称', required: true, message: '请输入选题名称',
}, { }, {
max: 20, message: '最大限制为20个字符', max: 60, message: '最大限制为60个字符',
}], }],
})( })(
<Input placeholder="请输入帖子选题名称,最大限制20个字符" maxLength="20" onInput={this.changeTopicName} autoComplete="off" addonAfter={String(addonAfter)} className="searchViewAfter" /> <Input placeholder="请输入帖子选题名称,最大限制60个字符" maxLength="60" onInput={this.changeTopicName} autoComplete="off" addonAfter={String(addonAfter)} className="searchViewAfter" />
)} )}
</Form.Item> </Form.Item>
</div> </div>
@ -381,6 +386,34 @@ class GraduateTopicNew extends Component{
width: 350px; width: 350px;
margin-bottom:10px; margin-bottom:10px;
} }
.ant-upload-list-item{
margin-top:0px!important;
}
.ant-form-item-children{
position:unset
}
.rememberTip{
position:absolute;
right:0px;
bottom:-10px;
}
.chooseDes .ant-form-explain{
position:absolute;
bottom:-10px;
left:0px;
}
.setUploadStyle .uploadBtn{
height:20px;
line-height:20px;
}
.setUploadStyle .ant-form-item-control{
margin-top:15px!important;
line-height:22px!important;
}
.setUploadStyle .ant-upload-list{
margin-top:5px;
}
`}</style> `}</style>
@ -389,7 +422,7 @@ class GraduateTopicNew extends Component{
<Form.Item <Form.Item
label="选题简介" label="选题简介"
style={{"borderBottom":'none'}} style={{"borderBottom":'none'}}
className="chooseDes" className="chooseDes pr"
> >
{getFieldDecorator('description', { {getFieldDecorator('description', {
rules: [{ rules: [{
@ -402,7 +435,9 @@ class GraduateTopicNew extends Component{
mdID={'courseMessageMD'} initValue={this.editTopic ? this.editTopic.content : ''} className="courseMessageMD"></TPMMDEditor> mdID={'courseMessageMD'} initValue={this.editTopic ? this.editTopic.content : ''} className="courseMessageMD"></TPMMDEditor>
)} )}
</Form.Item> </Form.Item>
<Form.Item> <Form.Item
className="setUploadStyle"
>
{ {
getFieldDecorator('file',{ getFieldDecorator('file',{
rules:[{ rules:[{
@ -505,6 +540,9 @@ class GraduateTopicNew extends Component{
.flexBlock .ant-row.ant-form-item { .flexBlock .ant-row.ant-form-item {
margin-bottom: 6px; margin-bottom: 6px;
} }
.ant-cascader-menu{
min-width:125px!important;
}
`}</style> `}</style>
@ -543,7 +581,7 @@ class GraduateTopicNew extends Component{
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="调研或实习地点" label="调研或实习地点"
className="mt15 with22" className="mt15 with22 setAreaStyle"
> >
{getFieldDecorator('city', { {getFieldDecorator('city', {
rules: [{ rules: [{

@ -223,7 +223,23 @@ onDelete=(index)=>{
}) })
}else{ }else{
// 加入题库 // 加入题库
let courseid=this.props.match.params.coursesId
let url=`/courses/${courseid}/graduation_topics/add_to_bank.json`;
axios.post((url),{
topic_ids:checkBoxValues
}).then((result)=>{
if(result){
this.props.showNotification(`题库更新成功`);
let {searchValue,page,status} =this.state
this.fetchAll(searchValue,page,status);
this.setState({
checkBoxValues:[],
checkAllValue:false
})
}
}).catch((error)=>{
console.log(error)
})
} }
}else{ }else{
@ -337,7 +353,7 @@ onBoardsNew=()=>{
{/* 参考普通作业 - 题库选用 */} {/* 参考普通作业 - 题库选用 */}
{/* <WordsBtn style="blue" className="mr30" onClick={()=>this.useFromBank()}>题库选用</WordsBtn> 正式版没有,先隐藏*/} {/* <WordsBtn style="blue" className="mr30" onClick={()=>this.useFromBank()}>题库选用</WordsBtn> 正式版没有,先隐藏*/}
<p className="fl"><UseBank {...this.props} {...this.state} object_type={"gtopic"} useBankSuccess={this.useBankSuccess}></UseBank></p> <p className="fl"><UseBank {...this.props} {...this.state} object_type={"gtopic"} useBankSuccess={this.useBankSuccess}></UseBank></p>
< a href={`/api/courses/${this.props.match.params.coursesId}/graduation_topics/export.xls`} className={"color-blue mr20 font-16"}>导出</a> < a href={`/api/courses/${this.props.match.params.coursesId}/graduation_topics/export.xlsx`} className={"color-blue mr20 font-16"}>导出</a>
<WordsBtn style="blue" className="font-16" onClick={()=>this.onBoardsNew()}>新建</WordsBtn> <WordsBtn style="blue" className="font-16" onClick={()=>this.onBoardsNew()}>新建</WordsBtn>
</React.Fragment>):"" </React.Fragment>):""
} }

@ -355,7 +355,7 @@ class Poll extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+this.props.getNowFormatDates(1), starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
endtime:"截止时间:"+this.props.getNowFormatDates(2), endtime:"截止时间:"+this.props.getNowFormatDates(2),
Cancelname:"暂不发布", Cancelname:"暂不发布",

@ -187,7 +187,7 @@ class PollDetailTabFirst extends Component{
key: 'classes', key: 'classes',
dataIndex: 'classes', dataIndex: 'classes',
width:160, width:160,
className:course_groups && course_groups.length > 0?"edu-txt-center":"edu-txt-center none" className:poll_types && poll_types.groups_count > 0 ? "edu-txt-center":"edu-txt-center none"
}, { }, {
title: '提交状态', title: '提交状态',
dataIndex: 'status', dataIndex: 'status',

@ -49,23 +49,23 @@ class PollListItem extends Component{
<p className="color-grey-9 clearfix"> <p className="color-grey-9 clearfix">
{ {
item.polls_status !=1 && item.polls_status !=1 &&
<span className="fl mt2"> <span className="fl mt3">
<span className="mr20">{item.poll_answer} 已答</span> <span className="mr20">{item.poll_answer} 已答</span>
<span className="mr20">{item.poll_unanswer} 未答</span> <span className="mr20">{item.poll_unanswer} 未答</span>
</span> </span>
} }
{ {
item.polls_status ==1 && item.publish_time ==null && item.created_at && item.polls_status ==1 && item.publish_time ==null && item.created_at &&
<span className="mr20 fl mt2">创建于{moment(item.created_at).format(dataformat)}</span> <span className="mr20 fl mt3">创建于{moment(item.created_at).format(dataformat)}</span>
} }
{ {
item.polls_status ==1 && item.publish_time !=null && item.polls_status ==1 && item.publish_time !=null &&
<span className="mr20 fl mt2">将发布于{moment(item.publish_time).format(dataformat)}</span> <span className="mr20 fl mt3">将发布于{moment(item.publish_time).format(dataformat)}</span>
} }
{ {
item.polls_status ==2 && item.publish_time !=null && item.polls_status ==2 && item.publish_time !=null &&
<Tooltip title="提交剩余时间"> <Tooltip title="提交剩余时间">
<span className="mr20 fl mt2">{formatDuring(t)}</span> <span className="mr20 fl mt3">{formatDuring(t)}</span>
</Tooltip> </Tooltip>
} }
{ {
@ -81,21 +81,14 @@ class PollListItem extends Component{
} }
</WordsBtn>:"" </WordsBtn>:""
} }
</p>
{ {
IsAdmin && IsAdmin &&
<div className="homepagePostSetting" style={{"right":"0px","top":"-5px","position":"absolute","display":"block"}}> <ul className="fr">
<ul> <WordsBtn style="blue" className="mr20 font-16" to={`/courses/${coursesId}/polls/${item.id}/detail?tab=3`}>设置</WordsBtn>
<li className="edu-position edu-position-hidebox"> <WordsBtn style="blue" className="font-16" to={`/courses/${coursesId}/polls/${item.id}/${"edit"}`}>编辑</WordsBtn>
<i className="fa fa-bars color-grey-b"></i>
<ul className="edu-position-hide undis">
<li> <WordsBtn className="" to={`/courses/${coursesId}/polls/${item.id}/${"edit"}`}>编辑</WordsBtn></li>
<li> <WordsBtn className="" to={`/courses/${coursesId}/polls/${item.id}/detail?tab=3`}>设置</WordsBtn></li>
</ul>
</li>
</ul> </ul>
</div>
} }
</p>
</div> </div>
</div> </div>
) )

@ -81,7 +81,7 @@ class Immediatelypublish extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+this.props.getNowFormatDates(1), starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
endtime:"截止时间:"+this.props.getNowFormatDates(2), endtime:"截止时间:"+this.props.getNowFormatDates(2),
Cancelname:"暂不发布", Cancelname:"暂不发布",
@ -120,7 +120,7 @@ class Immediatelypublish extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+this.props.getNowFormatDates(1), starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
endtime:"截止时间:"+this.props.getNowFormatDates(2), endtime:"截止时间:"+this.props.getNowFormatDates(2),
Cancelname:"暂不发布", Cancelname:"暂不发布",

@ -821,7 +821,7 @@ class Listofworks extends Component {
Topval: "本操作只对“未发布”的对象生效", Topval: "本操作只对“未发布”的对象生效",
Botvalleft: "暂不发布", Botvalleft: "暂不发布",
Botval: "则通过后续手动设置,定时发布", Botval: "则通过后续手动设置,定时发布",
starttime: "发布时间:" + starttime, starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime: "截止时间:" + endtime, endtime: "截止时间:" + endtime,
starttimes:starttime, starttimes:starttime,
typs:"start", typs:"start",
@ -1116,7 +1116,7 @@ class Listofworks extends Component {
>设置</Link> >设置</Link>
{this.props.isAdmin() ? <a {this.props.isAdmin() ? <a
className="fr color-blue font-16" className="fr color-blue font-16"
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`} href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
>导出</a> : ""} >导出</a> : ""}
{this.props.isAdmin() ? {this.props.isAdmin() ?
teacherdata && teacherdata.end_immediately === true ? teacherdata && teacherdata.end_immediately === true ?

@ -304,7 +304,7 @@ class ShixunStudentWork extends Component {
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+starttime, starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime:"截止时间:"+endtime, endtime:"截止时间:"+endtime,
Cancelname:"暂不发布", Cancelname:"暂不发布",
Savesname:"立即发布", Savesname:"立即发布",
@ -590,7 +590,7 @@ class ShixunStudentWork extends Component {
>设置</Link> >设置</Link>
{this.props.isAdmin() ? <a {this.props.isAdmin() ? <a
className="fr color-blue font-16" className="fr color-blue font-16"
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`} href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
>导出</a> : ""} >导出</a> : ""}
{this.props.isAdmin()? {this.props.isAdmin()?
data.end_immediately===true? data.end_immediately===true?

@ -1237,7 +1237,7 @@ class Trainingjobsetting extends Component {
Topval: "本操作只对“未发布”的对象生效", Topval: "本操作只对“未发布”的对象生效",
Botvalleft: "暂不发布", Botvalleft: "暂不发布",
Botval: "则通过后续手动设置,定时发布", Botval: "则通过后续手动设置,定时发布",
starttime: "发布时间:" + starttime, starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:starttime, starttimes:starttime,
typs:"start", typs:"start",
endtime: "截止时间:" + endtime, endtime: "截止时间:" + endtime,
@ -1592,7 +1592,7 @@ class Trainingjobsetting extends Component {
{/*</Link>*/} {/*</Link>*/}
{this.props.isAdmin() ? <a {this.props.isAdmin() ? <a
className="fr color-blue font-16" className="fr color-blue font-16"
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`} href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
>导出</a> : ""} >导出</a> : ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "": ""} <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "": ""}

@ -148,7 +148,7 @@ class Workquestionandanswer extends Component {
Topval: "本操作只对“未发布”的对象生效", Topval: "本操作只对“未发布”的对象生效",
Botvalleft: "暂不发布", Botvalleft: "暂不发布",
Botval: "则通过后续手动设置,定时发布", Botval: "则通过后续手动设置,定时发布",
starttime: "发布时间:" + starttime, starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime: "截止时间:" + endtime, endtime: "截止时间:" + endtime,
Cancelname: "暂不发布", Cancelname: "暂不发布",
Savesname: "立即发布", Savesname: "立即发布",
@ -411,7 +411,7 @@ class Workquestionandanswer extends Component {
{/*<a className="fr color-blue font-16" href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`}>导出成绩</a>*/} {/*<a className="fr color-blue font-16" href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`}>导出成绩</a>*/}
{this.props.isAdmin() ? <a {this.props.isAdmin() ? <a
className="fr color-blue font-16" className="fr color-blue font-16"
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`} href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
>导出</a> : ""} >导出</a> : ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>:"" : ""} <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>:"" : ""}

@ -209,7 +209,7 @@ class ShixunHomework extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+starttime, starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:starttime, starttimes:starttime,
endtime:"截止时间:"+endtime, endtime:"截止时间:"+endtime,
Cancelname:"暂不发布", Cancelname:"暂不发布",
@ -403,7 +403,7 @@ class ShixunHomework extends Component{
Topval:"本操作只对“未发布”的对象生效", Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布", Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布", Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+ starttime, starttime:"发布时间:"+ moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:starttime, starttimes:starttime,
typs:"start", typs:"start",
endtime:"截止时间:"+ endtime, endtime:"截止时间:"+ endtime,

@ -18,24 +18,29 @@ class Trialapplication extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
props:props, props: props,
login: "", login: "",
Phonenumberisnotcocodes:undefined, Phonenumberisnotcocodes: undefined,
codes: "", codes: "",
reason: "", reason: "",
Phonenumberisnotcoreason:undefined, Phonenumberisnotcoreason: undefined,
isRenders:false, isRenders: false,
seconds: 60, seconds: 60,
getverificationcodes: true, getverificationcodes: true,
Phonenumberisnotco: undefined, Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false, Phonenumberisnotcobool: false,
readonlyInput: true, readonlyInput: true,
user_phone_binded: false,
showTrial: false,
} }
// //user_phone_binded 判断是否手机号验证
console.log("Trialapplication"); console.log("Trialapplication");
console.log(props); console.log(props);
} }
Cancel = () => {
this.props.Cancel()
}
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
@ -45,46 +50,50 @@ class Trialapplication extends Component {
// console.log("componentWillReceiveProps"); // console.log("componentWillReceiveProps");
// console.log(nextProps); // console.log(nextProps);
} }
//初始化数据 //初始化数据
componentDidMount() { componentDidMount() {
// console.log("53");
// console.log(this.props.isRenders);
if (this.props.isRenders != undefined) { if (this.props.isRenders != undefined) {
this.setState({ this.setState({
isRenders: this.props.isRenders isRenders: this.props.isRenders
}) })
} }
if (this.props.showTrial != undefined) {
// 判断是否返回主页的参数
this.setState({
showTrial: this.props.showTrial
})
}
axios.interceptors.response.use((response) => { axios.interceptors.response.use((response) => {
if(response!=undefined) if (response != undefined)
if (response&&response.data.status === 407) { if (response && response.data.status === 407) {
this.setState({ this.setState({
isRenders: true isRenders: true
}) })
} }
return response; return response;
}, (error) => { }, (error) => {
// // if (error.response && error.response.data.error === '401 Unauthorized') {
// // this.back_url = window.location.href;
// // this.setState({
// // isRender: true
// // })
// // // TODO 这里如果样式变了会出现css不加载的情况 // // // TODO 这里如果样式变了会出现css不加载的情况
// // const $ = window.$;
// // const isCssLoaded = window.getComputedStyle($('.log_nav li.active')[0], null)
// // .getPropertyValue('border-bottom')
// // == "2px solid rgb(69, 155, 229)"
// // if (!isCssLoaded) {
// // const isPort3007 = window.location.port == 3007;
// // let _url_origin = isPort3007 ? 'http://localhost:3000' : ''
// //
// // $('head').append( $('<link rel="stylesheet" type="text/css" />')
// // .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css`) );
// // $('head').append( $('<link rel="stylesheet" type="text/css" />')
// // .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css`) );
// // }
// // }
// // return Promise.reject(error);
}); });
// console.log("89");
try {
// console.log(this.state.props.user && this.state.props.user.user_phone_binded);
if (this.state.props.user !== undefined) {
this.setState({
user_phone_binded: this.state.props.user.user_phone_binded,
})
}
} catch (e) {
console.log(e);
}
} }
//获取登入 //获取登入
@ -101,7 +110,7 @@ class Trialapplication extends Component {
// console.log(e.target.value); // console.log(e.target.value);
this.setState({ this.setState({
reason: e.target.value, reason: e.target.value,
Phonenumberisnotcoreason:undefined, Phonenumberisnotcoreason: undefined,
}) })
@ -110,7 +119,7 @@ class Trialapplication extends Component {
codesonChange = (e) => { codesonChange = (e) => {
this.setState({ this.setState({
codes: e.target.value, codes: e.target.value,
Phonenumberisnotcocodes:undefined, Phonenumberisnotcocodes: undefined,
}) })
} }
@ -199,47 +208,57 @@ class Trialapplication extends Component {
} }
handleDialogClose() { handleDialogClose() {
if (this.state.showTrial === false) {
this.setState({ this.setState({
isRenders: false isRenders: false
}) })
this.Cancel();
window.location.href = "/"; window.location.href = "/";
} else {
this.setState({
isRenders: false
})
this.Cancel();
}
} }
postregistered = () => { postregistered = () => {
//提交按钮 //提交按钮
debugger
if (this.state.user_phone_binded === false) {
if (this.state.Phonenumberisnotcobool === false) { if (this.state.Phonenumberisnotcobool === false) {
// if (this.state.login.length === 0) { var iphones = "";
// this.setState({ if (this.state.Phonenumberisnotco === undefined || this.state.Phonenumberisnotco === null || this.state.Phonenumberisnotco === "") {
// Phonenumberisnotco: "请输入手机号或邮箱", iphones = "请输入手机号";
// }) } else {
// console.log("postregistered"); iphones = this.state.Phonenumberisnotco;
// console.log("123456"); }
//
// return
// } else {
this.setState({ this.setState({
Phonenumberisnotco: this.state.Phonenumberisnotco, Phonenumberisnotco: iphones,
}) })
// console.log("postregistered");
// console.log("1234567");
//
// }
return; return;
} }
if(this.state.codes.length===0){ if (this.state.codes.length === 0) {
this.setState({ this.setState({
Phonenumberisnotcocodes: "请输入验证码", Phonenumberisnotcocodes: "请输入验证码",
}) })
return; return;
} }
if(this.state.reason.length === 0){
}
if (this.state.reason.length === 0) {
this.setState({ this.setState({
Phonenumberisnotcoreason: "请输入推荐人信息或申请理由", Phonenumberisnotcoreason: "请输入推荐人信息或申请理由",
}) })
return; return;
} }
var thiss = this;
var url = "/users/trial_apply.json"; var url = "/users/trial_apply.json";
axios.post(url, { axios.post(url, {
phone: this.state.login, phone: this.state.login,
@ -249,7 +268,21 @@ class Trialapplication extends Component {
// console.log(result); // console.log(result);
try { try {
// this.onTabChange("1"); // this.onTabChange("1");
thiss.props.showNotification(`试用申请已提交,我们将尽快完成审核`);
if (thiss.state.showTrial === false) {
window.location.href = "/"; window.location.href = "/";
thiss.setState({
isRenders: false
})
thiss.Cancel();
} else {
thiss.setState({
isRenders: false
})
thiss.Cancel();
}
} catch (e) { } catch (e) {
} }
@ -339,13 +372,14 @@ class Trialapplication extends Component {
//执行view //执行view
render() { render() {
let {login, codes, reason, isRenders, Phonenumberisnotco, getverificationcodes,Phonenumberisnotcocodes,Phonenumberisnotcoreason, seconds} = this.state; let {login, codes, reason, isRenders, user_phone_binded, Phonenumberisnotco, getverificationcodes, Phonenumberisnotcocodes, Phonenumberisnotcoreason, seconds} = this.state;
// console.log("Trialapplication22222222"); // console.log("Trialapplication22222222");
// console.log(this.props); // console.log(this.props);
return ( return (
<div> <div>
{ {
isRenders === false?"": isRenders === false ? "" :
<div style={{"border-radius": "15px"}}> <div style={{"border-radius": "15px"}}>
<style> <style>
@ -515,8 +549,22 @@ class Trialapplication extends Component {
}}> }}>
<i className="iconfont icon-shanchudiao"></i> <i className="iconfont icon-shanchudiao"></i>
</div> </div>
<div className={"login_register_content"} style={{"border-radius": "15px","width": "560px"}}> <div className={"login_register_content"} style={{"border-radius": "15px", "width": "560px"}}>
<div className={"login_register_content"} style={{
<div className={"login_register_content"} style={
user_phone_binded === true ?
{
"width": "560px", "height": "304px",
"border-radius": "15px",
"background": " #FFFFff",
"text-align": "center",
// "position": "absolute",
"left": " 0px",
"box-sizing": "border-box",
"padding": "10px",
}
:
{
"width": "560px", "height": "390px", "width": "560px", "height": "390px",
"border-radius": "15px", "border-radius": "15px",
"background": " #FFFFff", "background": " #FFFFff",
@ -524,8 +572,10 @@ class Trialapplication extends Component {
// "position": "absolute", // "position": "absolute",
"left": " 0px", "left": " 0px",
"box-sizing": "border-box", "box-sizing": "border-box",
"padding":"10px", "padding": "10px",
}}> }
}
>
<ul> <ul>
<span style={{ <span style={{
"padding": "20px", "padding": "20px",
@ -544,6 +594,9 @@ class Trialapplication extends Component {
<div> <div>
<span style={{"color": "#4D4D4D"}}>管理员审核批准后即可继续访问网站</span> <span style={{"color": "#4D4D4D"}}>管理员审核批准后即可继续访问网站</span>
</div> </div>
{
user_phone_binded === true ? "" :
<div style={{ <div style={{
"margin-top": "15px", "padding-left": "50px", "margin-top": "15px", "padding-left": "50px",
"padding-right": "50px" "padding-right": "50px"
@ -562,11 +615,15 @@ class Trialapplication extends Component {
: <div className="mt5 mb5" style={{height: "20px"}}></div> : <div className="mt5 mb5" style={{height: "20px"}}></div>
} }
</div> </div>
}
{
user_phone_binded === true ? "" :
<div style={{"display": "flex", "justify-content": "center"}}> <div style={{"display": "flex", "justify-content": "center"}}>
<Input className="fl mr5" name="codes" type="text" autoComplete="off" readonly <Input className="fl mr5" name="codes" type="text" autoComplete="off"
readonly
onfocus="this.removeAttribute('readonly')" style={{ onfocus="this.removeAttribute('readonly')" style={{
"width": "316px", "width": "316px",
"height": "38px", "height": "38px",
@ -591,17 +648,22 @@ class Trialapplication extends Component {
"text-align": "center", "text-align": "center",
"height": "38px", "height": "38px",
}} type="primary" }} type="primary"
onClick={() => this.getverificationcode()} size={"large"}>验证码</Button> onClick={() => this.getverificationcode()}
size={"large"}>验证码</Button>
: :
<Button className="fl ml5 " style={{ <Button className="fl ml5 " style={{
"background": "#4cacff!important", "background": "#4cacff!important",
"width": "120px", "width": "120px",
"text-align": "center", "text-align": "center",
"height": "38px", "height": "38px",
}}type="primary" }} type="primary"
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button> onClick={() => this.getverificationcode()}
size={"large"}>重新发送</Button>
} }
</div> </div>
}
{ {
Phonenumberisnotcocodes && Phonenumberisnotcocodes != "" ? Phonenumberisnotcocodes && Phonenumberisnotcocodes != "" ?
<p className="color-red mt2 mb2" style={{width: " 100%", height: "23px"}}> <p className="color-red mt2 mb2" style={{width: " 100%", height: "23px"}}>
@ -637,6 +699,8 @@ class Trialapplication extends Component {
</div> </div>
</div> </div>
</Dialog> </Dialog>
@ -646,7 +710,6 @@ class Trialapplication extends Component {
</div> </div>
) )

@ -170,6 +170,7 @@ class NewHeader extends Component {
submitapplications:false, submitapplications:false,
isRender:false, isRender:false,
isRenders:false, isRenders:false,
showTrial:false,
user:undefined, user:undefined,
} }
} }
@ -511,13 +512,18 @@ submittojoinclass=(value)=>{
} }
} }
trialapplications =()=>{ // trialapplications =()=>{
this.setState({ // console.log("点击了")
isRenders: true, // this.setState({
}) // isRenders: true,
} // showTrial:true,
// })
// }
// 关闭
cancelModulationModels = () => {
this.setState({isRenders: false})
}
render() { render() {
const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。 const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。
@ -537,8 +543,8 @@ submittojoinclass=(value)=>{
submitapplications, submitapplications,
submitapplicationsvalue, submitapplicationsvalue,
user, user,
isRenders,
isRender, isRender,
isRenders,
}=this.state; }=this.state;
/* /*
用户名称 用户头像url 用户名称 用户头像url
@ -575,14 +581,16 @@ submittojoinclass=(value)=>{
/> />
{/* :""*/} {/* :""*/}
{/*}*/} {/*}*/}
<Trialapplication></Trialapplication>
{ {/*{*/}
isRenders&&isRenders===true? {/* isRenders&&isRenders===true?*/}
<Trialapplication {/* <Trialapplication*/}
{...this.state} {/* {...this.state}*/}
/> {/* Cancel={() => this.cancelModulationModels()}*/}
:"" {/* />*/}
} {/* :""*/}
{/*}*/}
<div className="educontent clearfix"> <div className="educontent clearfix">
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} {/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/}
@ -713,7 +721,7 @@ submittojoinclass=(value)=>{
<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.my_project_url}>我的项目</a></li> <li><a href={this.props.Headertop===undefined?"":this.props.Headertop.my_project_url}>我的项目</a></li>
<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.account_manager_url}>账号管理</a></li> <li><a href={this.props.Headertop===undefined?"":this.props.Headertop.account_manager_url}>账号管理</a></li>
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/} {/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li> {/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/}
<li className="bor-top-greyE"> <li className="bor-top-greyE">
{/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.logout_url}>退出</a>*/} {/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.logout_url}>退出</a>*/}
{/*<a onClick={()=>this.educoderlogin()}>退出</a>*/} {/*<a onClick={()=>this.educoderlogin()}>退出</a>*/}

@ -300,7 +300,7 @@ export default class TPMMDEditor extends Component {
</div> </div>
</div> </div>
</div> </div>
<div className={"fr"}> <div className={"fr rememberTip"}>
{noStorage == true ? '' : <p id={`e_tip_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>} {noStorage == true ? '' : <p id={`e_tip_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>}
{noStorage == true ? '' : <p id={`e_tips_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>} {noStorage == true ? '' : <p id={`e_tips_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>}
</div> </div>

@ -15,6 +15,8 @@ import "../../courses/css/members.css"
import "../../courses/css/Courses.css" import "../../courses/css/Courses.css"
import update from 'immutability-helper' import update from 'immutability-helper'
import Trialapplication from '../../login/Trialapplication'
const $ = window.$; const $ = window.$;
class Infos extends Component{ class Infos extends Component{
@ -26,7 +28,8 @@ class Infos extends Component{
is_edit:false, is_edit:false,
sign:undefined, sign:undefined,
type:0, type:0,
login:undefined login:undefined,
isRenders:false
} }
} }
componentDidMount =()=>{ componentDidMount =()=>{
@ -44,6 +47,8 @@ class Infos extends Component{
} }
} }
} }
//获取个人主页信息 //获取个人主页信息
getInfo = (user_login) =>{ getInfo = (user_login) =>{
let url =`/users/${user_login}/homepage_info.json`; let url =`/users/${user_login}/homepage_info.json`;
@ -146,6 +151,22 @@ class Infos extends Component{
} }
} }
// 试用申请
trialapplications =()=>{
this.setState({
isRenders: true,
showTrial:true
})
}
cancelModulationModels=()=>{
this.setState({
isRenders: false
})
}
ToBank=(url)=>{
window.location.href=url;
}
render(){ render(){
let { let {
data , data ,
@ -155,12 +176,16 @@ class Infos extends Component{
type, type,
followed, followed,
id, id,
login login,
isRenders
}=this.state; }=this.state;
let {username}= this.props.match.params; let {username}= this.props.match.params;
let {isAdmin}=this.props.isAdmin(); let {isAdmin}=this.props.isAdmin();
return( return(
<div className="newMain"> <div className="newMain">
{
isRenders && <Trialapplication {...this.state} Cancel={() => this.cancelModulationModels()}/>
}
<div className="user-main-half"> <div className="user-main-half">
<div className="user-headImg"></div> <div className="user-headImg"></div>
<div className="user-headCon"> <div className="user-headCon">
@ -251,7 +276,7 @@ class Infos extends Component{
: :
<a herf="javascript:void(0);" onClick={this.signFor} id="attendance" className="user_default_btn user_orange_btn fl mb15">签到</a> <a herf="javascript:void(0);" onClick={this.signFor} id="attendance" className="user_default_btn user_orange_btn fl mb15">签到</a>
: :
<a herf="javascript:void(0);" onClick="user_apply_trail();" id="authentication_apply" className="user_default_btn user_private_btn fl ml15">试用申请</a> <a herf="javascript:void(0);" onClick={this.trialapplications} id="authentication_apply" className="user_default_btn user_private_btn fl ml15">试用申请</a>
} }
</div> </div>
: :
@ -268,7 +293,7 @@ class Infos extends Component{
<Menu.Item key="1">实训</Menu.Item> <Menu.Item key="1">实训</Menu.Item>
<Menu.Item key="2">实训课程</Menu.Item> <Menu.Item key="2">实训课程</Menu.Item>
<Menu.Item key="3">项目</Menu.Item> <Menu.Item key="3">项目</Menu.Item>
{ isAdmin && <Menu.Item key="4">题库</Menu.Item> } { data && data.identity !="学生" && <Menu.Item key="4" onClick={()=>this.ToBank(`/users/${username}?type=a_project`)}>题库</Menu.Item> }
</Menu> </Menu>
</div> </div>
</div> </div>

@ -41,7 +41,7 @@ class InfosCourse extends Component{
category, category,
status, status,
page, page,
per_page:category && page ==1?17:16 per_page: this.props.is_current && category && page ==1?17:16
}}).then((result)=>{ }}).then((result)=>{
if(result){ if(result){
this.setState({ this.setState({
@ -111,18 +111,21 @@ class InfosCourse extends Component{
<li className={category=="manage" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的</a></li> <li className={category=="manage" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的</a></li>
<li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li> <li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li>
</div> </div>
{
is_current &&
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE"> <div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li> <li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
<li className={status=="processing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("processing")}>正在进行</a></li> <li className={status=="processing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("processing")}>正在进行</a></li>
<li className={status=="end" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("end")}>已结束</a></li> <li className={status=="end" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("end")}>已结束</a></li>
</div> </div>
}
<p className="pl25 pr25 clearfix font-12 mb20 mt20"> <p className="pl25 pr25 clearfix font-12 mb20 mt20">
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"课堂"}</span> <span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"课堂"}</span>
<span className="fr color-grey-9">时间最新</span> <span className="fr color-grey-9">时间最新</span>
</p> </p>
<div className="square-list clearfix"> <div className="square-list clearfix">
{ {
!isStudent && page == 1 && !category && !isStudent && page == 1 && !category && is_current &&
<Create href={"/courses/new"} name={"新建课堂"} index="1"></Create> <Create href={"/courses/new"} name={"新建课堂"} index="1"></Create>
} }
{ {

@ -44,7 +44,7 @@ class InfosPath extends Component{
status, status,
sort_by, sort_by,
page, page,
per_page:category && page ==1?17:16 per_page:this.props.is_current && category && page ==1?17:16
}}).then((result)=>{ }}).then((result)=>{
if(result){ if(result){
this.setState({ this.setState({
@ -126,7 +126,7 @@ class InfosPath extends Component{
<li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li> <li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li>
</div> </div>
{ {
category && category == "manage" && category && category == "manage" && is_current &&
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE"> <div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li> <li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
<li className={status=="editing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("editing")}>编辑中</a></li> <li className={status=="editing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("editing")}>编辑中</a></li>
@ -135,7 +135,7 @@ class InfosPath extends Component{
</div> </div>
} }
{ {
category && category == "study" && category && category == "study" && is_current &&
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE"> <div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li> <li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
<li className={status=="unfinished" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("unfinished")}>未完成</a></li> <li className={status=="unfinished" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("unfinished")}>未完成</a></li>
@ -148,7 +148,7 @@ class InfosPath extends Component{
</div> </div>
<div className="square-list clearfix"> <div className="square-list clearfix">
{ {
isStudent ==false && page == 1 && !category && !isStudent && page == 1 && !category && is_current &&
<Create href={"/paths/new"} name={"新建实训课程"} index="3"></Create> <Create href={"/paths/new"} name={"新建实训课程"} index="3"></Create>
} }
{ {

@ -37,7 +37,7 @@ class InfosProject extends Component{
category, category,
status, status,
page, page,
per_page:category && page ==1?17:16 per_page:this.props.is_current && category && page ==1?17:16
}}).then((result)=>{ }}).then((result)=>{
if(result){ if(result){
this.setState({ this.setState({
@ -107,18 +107,21 @@ class InfosProject extends Component{
<li className={category=="manage" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的</a></li> <li className={category=="manage" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的</a></li>
<li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li> <li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li>
</div> </div>
{
is_current &&
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE"> <div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li> <li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
<li className={status=="publicly" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("publicly")}>公开</a></li> <li className={status=="publicly" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("publicly")}>公开</a></li>
<li className={status=="personal" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("personal")}>私有</a></li> <li className={status=="personal" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("personal")}>私有</a></li>
</div> </div>
}
<p className="pl25 pr25 clearfix font-12 mb20 mt20"> <p className="pl25 pr25 clearfix font-12 mb20 mt20">
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"项目"}</span> <span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"项目"}</span>
<span className="fr color-grey-9">时间最新</span> <span className="fr color-grey-9">时间最新</span>
</p> </p>
<div className="square-list clearfix"> <div className="square-list clearfix">
{ {
!isStudent && page == 1 && !category && !isStudent && page == 1 && !category && is_current &&
<Create href={"/projects/new"} name={"新建项目"} index="4"></Create> <Create href={"/projects/new"} name={"新建项目"} index="4"></Create>
} }
{ {

@ -44,7 +44,7 @@ class InfosShixun extends Component{
status, status,
sort_by, sort_by,
page, page,
per_page:category && page ==1?17:16 per_page:this.props.is_current && category && page ==1?17:16
}}).then((result)=>{ }}).then((result)=>{
if(result){ if(result){
this.setState({ this.setState({
@ -126,7 +126,7 @@ class InfosShixun extends Component{
<li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li> <li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li>
</div> </div>
{ {
category && category == "manage" && category && category == "manage" && is_current &&
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE"> <div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li> <li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
<li className={status=="editing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("editing")}>编辑中</a></li> <li className={status=="editing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("editing")}>编辑中</a></li>
@ -136,7 +136,7 @@ class InfosShixun extends Component{
</div> </div>
} }
{ {
category && category == "study" && category && category == "study" && is_current &&
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE"> <div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li> <li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
<li className={status=="processing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("processing")}>未通关</a></li> <li className={status=="processing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("processing")}>未通关</a></li>
@ -157,7 +157,7 @@ class InfosShixun extends Component{
</div> </div>
<div className="square-list clearfix"> <div className="square-list clearfix">
{ {
isStudent ==false && page == 1 && !category && !isStudent && page == 1 && !category && is_current &&
<Create href={"/shixuns/new"} name={"新建实训"} index="2"></Create> <Create href={"/shixuns/new"} name={"新建实训"} index="2"></Create>
} }
{ {

Loading…
Cancel
Save