hjm 6 years ago
commit 9511600e03

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

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

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

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

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

@ -125,7 +125,7 @@ class GraduationTasksedit extends Component{
GraduationTasksedittype=false;
// window.location.href="/courses/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions";
// 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) => {
console.log(error)

@ -140,9 +140,11 @@ class GraduationTaskssettingapp extends Component{
componentDidMount(){
let query=this.props.location.search
const type = query.split('?tab=');
let id=parseInt(type[1])
this.getsettings();
if(this.props.isAdmin()===true){
if(this.props.isAdmin()===true&&isNaN(id)){
this.editSetting()
}
}
@ -413,7 +415,7 @@ class GraduationTaskssettingapp extends Component{
Topval:"发布设置均可修改",
Botvalleft:"点击修改",
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),
typs:"start",
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;
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){
this.setState({
latepenaltytype:true,
@ -611,26 +638,7 @@ class GraduationTaskssettingapp extends Component{
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 className="active"
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>*/}
<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"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<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>
</ul>
</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" >
<div className={"xingrequired font-16 color-dark h20 mb20"}>分组设置 <span className={"font-14 color-grey-c"}>提交作品时需要关联同组成员组内成员作品共享</span></div>
<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>
<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={"font-14 color-grey-c"}>学生提交作品时需要关联同组成员组内成员作品共享</span>
</div>
@ -1156,7 +1164,7 @@ class GraduationTaskssettingapp extends Component{
<div className={"h20 mb30 ml30"} >
<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>
<DatePicker
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}>
<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"}>
<span className={"color-blue"}>答辩组设置</span></Link></span></Radio>
<Radio style={radioStyle} value={4}>答辩组间老师互评 <span className={"font-14 color-grey-c ml10"}>由系统按照设置在答辩组之间自动分配:
<a href={"/courses/"+courseId+"/teachers"} target="_blank">
<span className={"color-blue"}>答辩组设置</span></a>
</span></Radio>
</RadioGroup>
</span>

@ -332,7 +332,7 @@ class GraduationTaskssettinglist extends Component{
Topval:"发布设置均可修改",
Botvalleft:"点击修改",
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),
typs:"start",
endtime:endtime,
@ -544,6 +544,7 @@ class GraduationTaskssettinglist extends Component{
axios.get(url).then((result)=>{
if(result.data.status===0){
this.searchValue()
this.setState({
Modalstype:true,
Modalstopval:result.data.message,
@ -747,7 +748,7 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => {
return(
<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>
)}
):""
@ -881,10 +882,9 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => {
return(
<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>
)}
):""
@ -1013,7 +1013,8 @@ class GraduationTaskssettinglist extends Component{
<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
其它历史评分将全部失效</pre>:""}>
{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'}}
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) => {
return(
<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>
)}
):""
@ -1164,8 +1165,8 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => {
return(
<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>
)}
):""
@ -1257,6 +1258,7 @@ class GraduationTaskssettinglist extends Component{
visible={visibles}
Cancel={this.Cancel}
taskid={taskslistdata&&taskslistdata.task_id}
funlist={this.searchValue()}
/>:""}
{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 to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link>
<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"} 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"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<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>
</ul>
</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>
</span>
<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(
<span key={key}>
<Checkbox value={item.id} onClick={this.funteachercomment} className="fl ">{item.name}
@ -1500,7 +1502,7 @@ class GraduationTaskssettinglist extends Component{
pagination={false}
loading={loadingstate}
onChange={this.TablePagination}
className="edu-txt-center"
/>}
</div>
</div>
@ -1552,12 +1554,13 @@ class GraduationTaskssettinglist extends Component{
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(
<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/edit"}>修改作品</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+"/"+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"} onClick={this.AssociationItems}>关联项目</a>:""}
{item==="取消关联"?<a className={"fr color-blue font-16"} onClick={this.cannelAssociation}>取消关联</a>:""}
@ -1741,6 +1744,7 @@ class GraduationTaskssettinglist extends Component{
pagination={false}
loading={loadingstate}
onChange={this.TablePagination}
className="edu-txt-center"
/>}
</div>
</div>

@ -81,7 +81,7 @@ class GraduationTasksquestions extends Component{
Topval:"发布设置均可修改",
Botvalleft:"点击修改",
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),
typs:"start",
endtime:endtime,
@ -275,7 +275,7 @@ class GraduationTasksquestions extends Component{
<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 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>*/}
{/*{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"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<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>
</ul>
</li>:""}

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

@ -67,10 +67,13 @@ class GraduateTopicDetail extends Component{
let course_id=this.props.match.params.course_id;
let {tableData}=this.state;
this.props.confirm({
content: tableData.user_selected_topic==0?`是否确认取消选题?`:"是否确认选题?",
onOk: () => {
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"
}else{
}else if(tableData.user_selected_topic==null || tableData.user_selected_topic==2){
url+="student_select_topic.json"
}
axios.post((url)).then((result)=>{
@ -83,9 +86,16 @@ class GraduateTopicDetail extends Component{
console.log(error);
})
}
})
}
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;
const isStudent =this.props.isStudent();
const isAdmin =this.props.isAdmin();
@ -110,11 +120,17 @@ class GraduateTopicDetail extends Component{
<div className="fl mt6 task_menu_ul ml30">
<Menu mode="horizontal" defaultSelectedKeys="1" onClick={this.onChangeStatus}>
<Menu.Item key="1">选题列表</Menu.Item>
<Menu.Item key="2">课题详情</Menu.Item>
<Menu.Item key="2">选题问答</Menu.Item>
</Menu>
</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>

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

@ -254,7 +254,7 @@ class GraduateTopicDetailTable extends Component{
tableData.users_list && tableData.users_list.length > 0 && tableData.users_list.map((item,key)=>{
return(
<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":"13%"}}>{item.student_id}</span>
<span style={{"width":"15%"}}>{item.class_group_name || "--"}</span>

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

@ -38,7 +38,7 @@ class GraduateTopicNew extends Component{
topic_source:[],
topic_type:[],
attachments:undefined,
addonAfter:20,
addonAfter:60,
left_banner_id:undefined,
course_name:undefined
}
@ -87,7 +87,7 @@ class GraduateTopicNew extends Component{
let topicId=this.props.match.params.topicId
let url=`/courses/${cid}/graduation_topics/${topicId}/edit.json`;
axios.get((url)).then((result)=>{
if(result.status==200){
if(result){
this.setState({
left_banner_id:result.data.left_banner_id,
course_name:result.data.course_name,
@ -257,7 +257,7 @@ class GraduateTopicNew extends Component{
// 附件相关 ------------ END
changeTopicName=(e)=>{
let num= 20 - parseInt(e.target.value.length);
let num= 60 - parseInt(e.target.value.length);
this.setState({
addonAfter:num < 0 ? 0 : num
})
@ -315,6 +315,11 @@ class GraduateTopicNew extends Component{
console.log(this.props);
return(
<div className="newMain ">
<style>{`
.courseForm .ant-form-item-label{
margin-left:unset!important
}
`}</style>
<div className="edu-class-container edu-position courseForm">
<p className="clearfix mb20 mt10">
<WordsBtn style="grey" className="fl" to={`/courses/${coursesId}`}>{course_name}</WordsBtn>
@ -357,10 +362,10 @@ class GraduateTopicNew extends Component{
rules: [{
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>
</div>
@ -381,6 +386,34 @@ class GraduateTopicNew extends Component{
width: 350px;
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>
@ -389,7 +422,7 @@ class GraduateTopicNew extends Component{
<Form.Item
label="选题简介"
style={{"borderBottom":'none'}}
className="chooseDes"
className="chooseDes pr"
>
{getFieldDecorator('description', {
rules: [{
@ -402,7 +435,9 @@ class GraduateTopicNew extends Component{
mdID={'courseMessageMD'} initValue={this.editTopic ? this.editTopic.content : ''} className="courseMessageMD"></TPMMDEditor>
)}
</Form.Item>
<Form.Item>
<Form.Item
className="setUploadStyle"
>
{
getFieldDecorator('file',{
rules:[{
@ -505,6 +540,9 @@ class GraduateTopicNew extends Component{
.flexBlock .ant-row.ant-form-item {
margin-bottom: 6px;
}
.ant-cascader-menu{
min-width:125px!important;
}
`}</style>
@ -543,7 +581,7 @@ class GraduateTopicNew extends Component{
</Form.Item>
<Form.Item
label="调研或实习地点"
className="mt15 with22"
className="mt15 with22 setAreaStyle"
>
{getFieldDecorator('city', {
rules: [{

@ -223,7 +223,23 @@ onDelete=(index)=>{
})
}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{
@ -337,7 +353,7 @@ onBoardsNew=()=>{
{/* 参考普通作业 - 题库选用 */}
{/* <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>
< 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>
</React.Fragment>):""
}

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

@ -187,7 +187,7 @@ class PollDetailTabFirst extends Component{
key: 'classes',
dataIndex: 'classes',
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: '提交状态',
dataIndex: 'status',

@ -49,23 +49,23 @@ class PollListItem extends Component{
<p className="color-grey-9 clearfix">
{
item.polls_status !=1 &&
<span className="fl mt2">
<span className="fl mt3">
<span className="mr20">{item.poll_answer} 已答</span>
<span className="mr20">{item.poll_unanswer} 未答</span>
</span>
}
{
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 &&
<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 &&
<Tooltip title="提交剩余时间">
<span className="mr20 fl mt2">{formatDuring(t)}</span>
<span className="mr20 fl mt3">{formatDuring(t)}</span>
</Tooltip>
}
{
@ -81,21 +81,14 @@ class PollListItem extends Component{
}
</WordsBtn>:""
}
</p>
{
IsAdmin &&
<div className="homepagePostSetting" style={{"right":"0px","top":"-5px","position":"absolute","display":"block"}}>
<ul>
<li className="edu-position edu-position-hidebox">
<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 className="fr">
<WordsBtn style="blue" className="mr20 font-16" to={`/courses/${coursesId}/polls/${item.id}/detail?tab=3`}>设置</WordsBtn>
<WordsBtn style="blue" className="font-16" to={`/courses/${coursesId}/polls/${item.id}/${"edit"}`}>编辑</WordsBtn>
</ul>
</div>
}
</p>
</div>
</div>
)

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

@ -821,7 +821,7 @@ class Listofworks extends Component {
Topval: "本操作只对“未发布”的对象生效",
Botvalleft: "暂不发布",
Botval: "则通过后续手动设置,定时发布",
starttime: "发布时间:" + starttime,
starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime: "截止时间:" + endtime,
starttimes:starttime,
typs:"start",
@ -1116,7 +1116,7 @@ class Listofworks extends Component {
>设置</Link>
{this.props.isAdmin() ? <a
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> : ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.end_immediately === true ?

@ -304,7 +304,7 @@ class ShixunStudentWork extends Component {
Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布",
starttime:"发布时间:"+starttime,
starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime:"截止时间:"+endtime,
Cancelname:"暂不发布",
Savesname:"立即发布",
@ -590,7 +590,7 @@ class ShixunStudentWork extends Component {
>设置</Link>
{this.props.isAdmin() ? <a
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> : ""}
{this.props.isAdmin()?
data.end_immediately===true?

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

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

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

@ -30,12 +30,17 @@ class Trialapplication extends Component {
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
readonlyInput: true,
user_phone_binded: false,
showTrial: false,
}
//
//user_phone_binded 判断是否手机号验证
console.log("Trialapplication");
console.log(props);
}
Cancel = () => {
this.props.Cancel()
}
componentWillReceiveProps(nextProps) {
@ -45,15 +50,25 @@ class Trialapplication extends Component {
// console.log("componentWillReceiveProps");
// console.log(nextProps);
}
//初始化数据
componentDidMount() {
// console.log("53");
// console.log(this.props.isRenders);
if (this.props.isRenders != undefined) {
this.setState({
isRenders: this.props.isRenders
})
}
if (this.props.showTrial != undefined) {
// 判断是否返回主页的参数
this.setState({
showTrial: this.props.showTrial
})
}
axios.interceptors.response.use((response) => {
if (response != undefined)
if (response && response.data.status === 407) {
@ -63,28 +78,22 @@ class Trialapplication extends Component {
}
return response;
}, (error) => {
// // if (error.response && error.response.data.error === '401 Unauthorized') {
// // this.back_url = window.location.href;
// // this.setState({
// // isRender: true
// // })
// // // 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);
}
}
//获取登入
@ -199,31 +208,38 @@ class Trialapplication extends Component {
}
handleDialogClose() {
if (this.state.showTrial === false) {
this.setState({
isRenders: false
})
this.Cancel();
window.location.href = "/";
} else {
this.setState({
isRenders: false
})
this.Cancel();
}
}
postregistered = () => {
//提交按钮
debugger
if (this.state.user_phone_binded === false) {
if (this.state.Phonenumberisnotcobool === false) {
// if (this.state.login.length === 0) {
// this.setState({
// Phonenumberisnotco: "请输入手机号或邮箱",
// })
// console.log("postregistered");
// console.log("123456");
//
// return
// } else {
var iphones = "";
if (this.state.Phonenumberisnotco === undefined || this.state.Phonenumberisnotco === null || this.state.Phonenumberisnotco === "") {
iphones = "请输入手机号";
} else {
iphones = this.state.Phonenumberisnotco;
}
this.setState({
Phonenumberisnotco: this.state.Phonenumberisnotco,
Phonenumberisnotco: iphones,
})
// console.log("postregistered");
// console.log("1234567");
//
// }
return;
}
if (this.state.codes.length === 0) {
@ -232,6 +248,9 @@ class Trialapplication extends Component {
})
return;
}
}
if (this.state.reason.length === 0) {
this.setState({
Phonenumberisnotcoreason: "请输入推荐人信息或申请理由",
@ -239,7 +258,7 @@ class Trialapplication extends Component {
return;
}
var thiss = this;
var url = "/users/trial_apply.json";
axios.post(url, {
phone: this.state.login,
@ -249,7 +268,21 @@ class Trialapplication extends Component {
// console.log(result);
try {
// this.onTabChange("1");
thiss.props.showNotification(`试用申请已提交,我们将尽快完成审核`);
if (thiss.state.showTrial === false) {
window.location.href = "/";
thiss.setState({
isRenders: false
})
thiss.Cancel();
} else {
thiss.setState({
isRenders: false
})
thiss.Cancel();
}
} catch (e) {
}
@ -339,9 +372,10 @@ class Trialapplication extends Component {
//执行view
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(this.props);
return (
<div>
{
@ -516,7 +550,21 @@ class Trialapplication extends Component {
<i className="iconfont icon-shanchudiao"></i>
</div>
<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",
"border-radius": "15px",
"background": " #FFFFff",
@ -525,7 +573,9 @@ class Trialapplication extends Component {
"left": " 0px",
"box-sizing": "border-box",
"padding": "10px",
}}>
}
}
>
<ul>
<span style={{
"padding": "20px",
@ -544,6 +594,9 @@ class Trialapplication extends Component {
<div>
<span style={{"color": "#4D4D4D"}}>管理员审核批准后即可继续访问网站</span>
</div>
{
user_phone_binded === true ? "" :
<div style={{
"margin-top": "15px", "padding-left": "50px",
"padding-right": "50px"
@ -562,11 +615,15 @@ class Trialapplication extends Component {
: <div className="mt5 mb5" style={{height: "20px"}}></div>
}
</div>
}
{
user_phone_binded === true ? "" :
<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={{
"width": "316px",
"height": "38px",
@ -591,7 +648,8 @@ class Trialapplication extends Component {
"text-align": "center",
"height": "38px",
}} type="primary"
onClick={() => this.getverificationcode()} size={"large"}>验证码</Button>
onClick={() => this.getverificationcode()}
size={"large"}>验证码</Button>
:
<Button className="fl ml5 " style={{
"background": "#4cacff!important",
@ -599,9 +657,13 @@ class Trialapplication extends Component {
"text-align": "center",
"height": "38px",
}} type="primary"
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>
onClick={() => this.getverificationcode()}
size={"large"}>重新发送</Button>
}
</div>
}
{
Phonenumberisnotcocodes && Phonenumberisnotcocodes != "" ?
<p className="color-red mt2 mb2" style={{width: " 100%", height: "23px"}}>
@ -637,6 +699,8 @@ class Trialapplication extends Component {
</div>
</div>
</Dialog>
@ -646,7 +710,6 @@ class Trialapplication extends Component {
</div>
)

@ -170,6 +170,7 @@ class NewHeader extends Component {
submitapplications:false,
isRender:false,
isRenders:false,
showTrial:false,
user:undefined,
}
}
@ -511,13 +512,18 @@ submittojoinclass=(value)=>{
}
}
trialapplications =()=>{
this.setState({
isRenders: true,
})
}
// trialapplications =()=>{
// console.log("点击了")
// this.setState({
// isRenders: true,
// showTrial:true,
// })
// }
// 关闭
cancelModulationModels = () => {
this.setState({isRenders: false})
}
render() {
const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。
@ -537,8 +543,8 @@ submittojoinclass=(value)=>{
submitapplications,
submitapplicationsvalue,
user,
isRenders,
isRender,
isRenders,
}=this.state;
/*
用户名称 用户头像url
@ -575,14 +581,16 @@ submittojoinclass=(value)=>{
/>
{/* :""*/}
{/*}*/}
<Trialapplication></Trialapplication>
{
isRenders&&isRenders===true?
<Trialapplication
{...this.state}
/>
:""
}
{/*{*/}
{/* isRenders&&isRenders===true?*/}
{/* <Trialapplication*/}
{/* {...this.state}*/}
{/* Cancel={() => this.cancelModulationModels()}*/}
{/* />*/}
{/* :""*/}
{/*}*/}
<div className="educontent clearfix">
{/*<%= 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.account_manager_url}>账号管理</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">
{/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.logout_url}>退出</a>*/}
{/*<a onClick={()=>this.educoderlogin()}>退出</a>*/}

@ -300,7 +300,7 @@ export default class TPMMDEditor extends Component {
</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_tips_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>}
</div>

@ -15,6 +15,8 @@ import "../../courses/css/members.css"
import "../../courses/css/Courses.css"
import update from 'immutability-helper'
import Trialapplication from '../../login/Trialapplication'
const $ = window.$;
class Infos extends Component{
@ -26,7 +28,8 @@ class Infos extends Component{
is_edit:false,
sign:undefined,
type:0,
login:undefined
login:undefined,
isRenders:false
}
}
componentDidMount =()=>{
@ -44,6 +47,8 @@ class Infos extends Component{
}
}
}
//获取个人主页信息
getInfo = (user_login) =>{
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(){
let {
data ,
@ -155,12 +176,16 @@ class Infos extends Component{
type,
followed,
id,
login
login,
isRenders
}=this.state;
let {username}= this.props.match.params;
let {isAdmin}=this.props.isAdmin();
return(
<div className="newMain">
{
isRenders && <Trialapplication {...this.state} Cancel={() => this.cancelModulationModels()}/>
}
<div className="user-main-half">
<div className="user-headImg"></div>
<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="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>
:
@ -268,7 +293,7 @@ class Infos extends Component{
<Menu.Item key="1">实训</Menu.Item>
<Menu.Item key="2">实训课程</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>
</div>
</div>

@ -41,7 +41,7 @@ class InfosCourse extends Component{
category,
status,
page,
per_page:category && page ==1?17:16
per_page: this.props.is_current && category && page ==1?17:16
}}).then((result)=>{
if(result){
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=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li>
</div>
{
is_current &&
<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=="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>
</div>
}
<p className="pl25 pr25 clearfix font-12 mb20 mt20">
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"课堂"}</span>
<span className="fr color-grey-9">时间最新</span>
</p>
<div className="square-list clearfix">
{
!isStudent && page == 1 && !category &&
!isStudent && page == 1 && !category && is_current &&
<Create href={"/courses/new"} name={"新建课堂"} index="1"></Create>
}
{

@ -44,7 +44,7 @@ class InfosPath extends Component{
status,
sort_by,
page,
per_page:category && page ==1?17:16
per_page:this.props.is_current && category && page ==1?17:16
}}).then((result)=>{
if(result){
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>
</div>
{
category && category == "manage" &&
category && category == "manage" && is_current &&
<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=="editing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("editing")}>编辑中</a></li>
@ -135,7 +135,7 @@ class InfosPath extends Component{
</div>
}
{
category && category == "study" &&
category && category == "study" && is_current &&
<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=="unfinished" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("unfinished")}>未完成</a></li>
@ -148,7 +148,7 @@ class InfosPath extends Component{
</div>
<div className="square-list clearfix">
{
isStudent ==false && page == 1 && !category &&
!isStudent && page == 1 && !category && is_current &&
<Create href={"/paths/new"} name={"新建实训课程"} index="3"></Create>
}
{

@ -37,7 +37,7 @@ class InfosProject extends Component{
category,
status,
page,
per_page:category && page ==1?17:16
per_page:this.props.is_current && category && page ==1?17:16
}}).then((result)=>{
if(result){
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=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li>
</div>
{
is_current &&
<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=="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>
</div>
}
<p className="pl25 pr25 clearfix font-12 mb20 mt20">
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"项目"}</span>
<span className="fr color-grey-9">时间最新</span>
</p>
<div className="square-list clearfix">
{
!isStudent && page == 1 && !category &&
!isStudent && page == 1 && !category && is_current &&
<Create href={"/projects/new"} name={"新建项目"} index="4"></Create>
}
{

@ -44,7 +44,7 @@ class InfosShixun extends Component{
status,
sort_by,
page,
per_page:category && page ==1?17:16
per_page:this.props.is_current && category && page ==1?17:16
}}).then((result)=>{
if(result){
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>
</div>
{
category && category == "manage" &&
category && category == "manage" && is_current &&
<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=="editing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("editing")}>编辑中</a></li>
@ -136,7 +136,7 @@ class InfosShixun extends Component{
</div>
}
{
category && category == "study" &&
category && category == "study" && is_current &&
<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=="processing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("processing")}>未通关</a></li>
@ -157,7 +157,7 @@ class InfosShixun extends Component{
</div>
<div className="square-list clearfix">
{
isStudent ==false && page == 1 && !category &&
!isStudent && page == 1 && !category && is_current &&
<Create href={"/shixuns/new"} name={"新建实训"} index="2"></Create>
}
{

Loading…
Cancel
Save