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:"立即发布",

@ -1,239 +1,239 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { Modal,Checkbox,Upload,Button,Icon,message,Input,Radio} from "antd"; import { Modal,Checkbox,Upload,Button,Icon,message,Input,Radio} from "antd";
import axios from 'axios'; import axios from 'axios';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
const RadioGroup = Radio.Group; const RadioGroup = Radio.Group;
const Search = Input.Search; const Search = Input.Search;
class Associationmodel extends Component{ class Associationmodel extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state={ this.state={
group_ids:[], group_ids:[],
fileList:[], fileList:[],
Modalstype:false, Modalstype:false,
Modalstopval:"", Modalstopval:"",
ModalCancel:"", ModalCancel:"",
ModalSave:"", ModalSave:"",
loadtype:false, loadtype:false,
search:undefined, search:undefined,
page:1, page:1,
limit:"", limit:"",
projects:undefined, projects:undefined,
projectvalue:undefined, projectvalue:undefined,
projectvaluetype:false, projectvaluetype:false,
} }
} }
componentDidMount() { componentDidMount() {
this.searchValue(); this.searchValue();
} }
searchValue=()=>{ searchValue=()=>{
let {search}=this.state; let {search}=this.state;
let url="/users/search_user_projects.json"; let url="/users/search_user_projects.json";
axios.get(url, { axios.get(url, {
params: { params: {
search: search search: search
} }
}).then((result)=>{ }).then((result)=>{
console.log(result) console.log(result)
if(result.status===200){ if(result.status===200){
this.setState({ this.setState({
projects:result.data.projects projects:result.data.projects
}) })
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error) console.log(error)
}) })
} }
inputSearchValue=(e)=>{ inputSearchValue=(e)=>{
this.setState({ this.setState({
search:e.target.value search:e.target.value
}) })
} }
goback=()=>{ goback=()=>{
this.props.funlist() this.props.funlist()
this.props.Cancel() this.props.Cancel()
console.log(this.props) console.log(this.props)
this.setState({ this.setState({
Modalstype:false, Modalstype:false,
}) })
} }
setSaves=()=>{ setSaves=()=>{
let {projectvalue}=this.state; let {projectvalue}=this.state;
let taskid=this.props.taskid; let taskid=this.props.taskid;
let url="/graduation_tasks/"+taskid+"/graduation_works/relate_project.json"; let url="/graduation_tasks/"+taskid+"/graduation_works/relate_project.json";
axios.post(url, { axios.post(url, {
project_id: projectvalue project_id: projectvalue
}).then((result)=>{ }).then((result)=>{
if(result.status===200){ if(result.status===200){
if(result.data.status===0){ if(result.data.status===0){
this.setState({ this.setState({
Modalstype:true, Modalstype:true,
Modalstopval:result.data.message, Modalstopval:result.data.message,
ModalSave:this.goback, ModalSave:this.goback,
loadtype:true loadtype:true
}) })
this.props.funlist()
} }
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error) console.log(error)
}) })
} }
Saves=()=>{ Saves=()=>{
let {projectvalue}=this.state; let {projectvalue}=this.state;
if(projectvalue===undefined||projectvalue===""){ if(projectvalue===undefined||projectvalue===""){
this.setState({ this.setState({
projectvaluetype:true, projectvaluetype:true,
}) })
}else{ }else{
this.setState({ this.setState({
projectvaluetype:false, projectvaluetype:false,
}) })
} }
let taskid=this.props.taskid; let taskid=this.props.taskid;
console.log(this.props) console.log(this.props)
let url="/graduation_tasks/"+taskid+"/graduation_works/check_project.json"; let url="/graduation_tasks/"+taskid+"/graduation_works/check_project.json";
axios.get(url, { axios.get(url, {
params: { params: {
project_id: projectvalue project_id: projectvalue
} }
}).then((result)=>{ }).then((result)=>{
if(result.status===200){ if(result.status===200){
if(result.data.is_relate===false){ if(result.data.is_relate===false){
this.setSaves() this.setSaves()
}else{ }else{
this.setState({ this.setState({
Modalstype:true, Modalstype:true,
Modalstopval:"该项目已被"+result.data.relate_user+"关联", Modalstopval:"该项目已被"+result.data.relate_user+"关联",
ModalSave:this.ModalSave, ModalSave:this.ModalSave,
loadtype:true loadtype:true
}) })
} }
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error) console.log(error)
}) })
} }
onChange = (e) => { onChange = (e) => {
this.setState({ this.setState({
projectvalue: e.target.value, projectvalue: e.target.value,
}); });
} }
ModalSave=()=>{ ModalSave=()=>{
this.setState({ this.setState({
Modalstype:false Modalstype:false
}) })
} }
render(){ render(){
let { let {
Modalstype, Modalstype,
Modalstopval, Modalstopval,
ModalCancel, ModalCancel,
ModalSave, ModalSave,
loadtype, loadtype,
search, search,
projects, projects,
projectvalue, projectvalue,
projectvaluetype projectvaluetype
}=this.state; }=this.state;
return( return(
<div> <div>
{/*提示*/} {/*提示*/}
<Modals <Modals
modalsType={Modalstype} modalsType={Modalstype}
modalsTopval={Modalstopval} modalsTopval={Modalstopval}
modalCancel={ModalCancel} modalCancel={ModalCancel}
modalSave={ModalSave} modalSave={ModalSave}
loadtype= {loadtype} loadtype= {loadtype}
/> />
<Modal <Modal
className={"HomeworkModal"} className={"HomeworkModal"}
title={this.props.modalname} title={this.props.modalname}
// visible={this.props.visible} // visible={this.props.visible}
visible={this.props.visible} visible={this.props.visible}
closable={false} closable={false}
footer={null} footer={null}
keyboard={false} keyboard={false}
destroyOnClose={true} destroyOnClose={true}
> >
<div className="task-popup-content"> <div className="task-popup-content">
<p className="task-popup-text-center font-16"> <p className="task-popup-text-center font-16">
<Search <Search
placeholder="请输入项目名称进行搜索" placeholder="请输入项目名称进行搜索"
id="subject_search_input" id="subject_search_input"
value={search} value={search}
onInput={this.inputSearchValue} onInput={this.inputSearchValue}
onSearch={this.searchValue} onSearch={this.searchValue}
autoComplete="off" autoComplete="off"
></Search> ></Search>
</p> </p>
<div className={"Association mb20"}> <div className={"Association mb20"}>
<RadioGroup onChange={this.onChange} value={projectvalue}> <RadioGroup onChange={this.onChange} value={projectvalue}>
{projects&&projects.map((item,key)=>{ {projects&&projects.map((item,key)=>{
return( return(
<div key={key} style={{ <div key={key} style={{
width: '375px', width: '375px',
height: '30px' height: '30px'
}}> }}>
<Radio value={item.project_id} className="fl "></Radio> <Radio value={item.project_id} className="fl "></Radio>
<div className={"fl ml5"}>{item.project_name}</div> <div className={"fl ml5"}>{item.project_name}</div>
</div> </div>
) )
})} })}
</RadioGroup> </RadioGroup>
</div> </div>
{projectvaluetype===true?<span className={"color-red ml20 "}>请先选择项目</span>:""} {projectvaluetype===true?<span className={"color-red ml20 "}>请先选择项目</span>:""}
<div className="clearfix mt30 edu-txt-center mb10"> <div className="clearfix mt30 edu-txt-center mb10">
<a className="task-btn color-white mr80" onClick={this.props.Cancel}>取消</a> <a className="task-btn color-white mr80" onClick={this.props.Cancel}>取消</a>
<a className="task-btn task-btn-orange" onClick={this.Saves}>确认</a> <a className="task-btn task-btn-orange" onClick={this.Saves}>确认</a>
</div> </div>
</div> </div>
</Modal> </Modal>
</div> </div>
) )
} }
} }
export default Associationmodel; export default Associationmodel;

@ -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>
)} )}
):"" ):""
@ -1146,7 +1147,7 @@ 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} {tag.name}
</a> </a>
: :
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}} <a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
@ -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,24 +744,20 @@ class GraduationTasks extends Component{
</Checkbox.Group> </Checkbox.Group>
</Spin> </Spin>
<div className="mb40 edu-txt-center padding20-30" {
style={ all_count > 15 &&
{ <div className="mb40 edu-txt-center padding20-30" >
display: all_count===undefined?1:all_count< 15 ? 'none' : 'block' <Pagination
} showQuickJumper
} defaultCurrent={1}
> pageSize={15}
<Pagination total={all_count}
showQuickJumper current={page}
defaultCurrent={1}
pageSize={15} onChange={this.PaginationTask}
total={all_count} />
current={page} </div>
}
onChange={this.PaginationTask}
/>
</div>
<div className="alltask edu-back-white" <div className="alltask edu-back-white"
style={ style={
{ {
@ -769,9 +765,9 @@ 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>
<div> <div>

@ -67,25 +67,35 @@ 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;
let url="/courses/"+course_id+"/graduation_topics/"+graduation_topic_id+"/" this.props.confirm({
if(tableData.user_selected_topic){ content: tableData.user_selected_topic==0?`是否确认取消选题?`:"是否确认选题?",
url+="student_cancel_topic.json" onOk: () => {
}else{ let url="/courses/"+course_id+"/graduation_topics/"+graduation_topic_id+"/"
url+="student_select_topic.json" if(tableData.user_selected_topic==0){
} url+="student_cancel_topic.json"
axios.post((url)).then((result)=>{ }else if(tableData.user_selected_topic==null || tableData.user_selected_topic==2){
console.log(result); url+="student_select_topic.json"
if(result.data.status == 0){ }
this.getDetailList(); axios.post((url)).then((result)=>{
this.props.showNotification(`${result.data.message}`); console.log(result);
if(result.data.status == 0){
this.getDetailList();
this.props.showNotification(`${result.data.message}`);
}
}).catch((error)=>{
console.log(error);
})
} }
}).catch((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>):""
} }

File diff suppressed because it is too large Load Diff

@ -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 && <ul className="fr">
<div className="homepagePostSetting" style={{"right":"0px","top":"-5px","position":"absolute","display":"block"}}> <WordsBtn style="blue" className="mr20 font-16" to={`/courses/${coursesId}/polls/${item.id}/detail?tab=3`}>设置</WordsBtn>
<ul> <WordsBtn style="blue" className="font-16" to={`/courses/${coursesId}/polls/${item.id}/${"edit"}`}>编辑</WordsBtn>
<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> </ul>
</div> }
} </p>
</div> </div>
</div> </div>
) )

@ -1,282 +1,282 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import Modals from '../../../modals/Modals' import Modals from '../../../modals/Modals'
import { WordsBtn } from 'educoder' import { WordsBtn } from 'educoder'
import HomeworkModal from "../../coursesPublic/HomeworkModal"; import HomeworkModal from "../../coursesPublic/HomeworkModal";
import axios from 'axios' import axios from 'axios'
import moment from 'moment'; import moment from 'moment';
class Immediatelypublish extends Component{ class Immediatelypublish extends Component{
constructor(props){ constructor(props){
super(props) super(props)
this.state={ this.state={
modalname:undefined, modalname:undefined,
modaltype:undefined, modaltype:undefined,
visible:false, visible:false,
Topval:undefined, Topval:undefined,
Topvalright:undefined, Topvalright:undefined,
Botvalleft:undefined, Botvalleft:undefined,
Botval:undefined, Botval:undefined,
starttime:undefined, starttime:undefined,
starttimes:undefined, starttimes:undefined,
endtime:undefined, endtime:undefined,
Cancelname:undefined, Cancelname:undefined,
Savesname:undefined, Savesname:undefined,
Cancel:undefined, Cancel:undefined,
Saves:undefined, Saves:undefined,
course_groups:undefined, course_groups:undefined,
modalsType:false, modalsType:false,
modalsTopval:"", modalsTopval:"",
loadtype:false, loadtype:false,
chooseId:undefined chooseId:undefined
} }
} }
//立即发布 //立即发布
homeworkstart=()=>{ homeworkstart=()=>{
let {checkBoxValues}=this.props let {checkBoxValues}=this.props
// console.log(this.props.Exercisetype==="exercise") // console.log(this.props.Exercisetype==="exercise")
if(checkBoxValues.length==0){ if(checkBoxValues.length==0){
this.props.showNotification("请先在列表中选择数据"); this.props.showNotification("请先在列表中选择数据");
// this.setState({ // this.setState({
// modalsType:true, // modalsType:true,
// modalsTopval:"请先在列表中选择数据", // modalsTopval:"请先在列表中选择数据",
// loadtype:true // loadtype:true
// }) // })
}else{ }else{
let coursesId=this.props.match.params.coursesId; let coursesId=this.props.match.params.coursesId;
if(this.props.Exercisetype==="exercise"){ if(this.props.Exercisetype==="exercise"){
let url=`/courses/${coursesId}/exercises/publish_modal.json`; let url=`/courses/${coursesId}/exercises/publish_modal.json`;
axios.get(url,{ axios.get(url,{
params:{ params:{
check_ids:checkBoxValues check_ids:checkBoxValues
} }
}).then((response) => { }).then((response) => {
if(response.status===200){ if(response.status===200){
let list=[]; let list=[];
if(response.data.course_info){ if(response.data.course_info){
for(var i=0;i<response.data.course_info.length;i++){ for(var i=0;i<response.data.course_info.length;i++){
list.push({ list.push({
id:response.data.course_info[i].course_group_id, id:response.data.course_info[i].course_group_id,
name:response.data.course_info[i].course_group_name, name:response.data.course_info[i].course_group_name,
}) })
} }
} }
this.setState({ this.setState({
course_groups:list, course_groups:list,
}) })
this.setState({ this.setState({
modalname:"立即发布", modalname:"立即发布",
modaltype:response.data.un_publish > 0 ? 1 : 2, modaltype:response.data.un_publish > 0 ? 1 : 2,
visible:true, visible:true,
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:"暂不发布",
Savesname:"立即发布", Savesname:"立即发布",
Cancel:this.homeworkhide, Cancel:this.homeworkhide,
Saves:this.homeworkstartend, Saves:this.homeworkstartend,
}) })
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}); });
}else{ }else{
let url=`/courses/${coursesId}/polls/publish_modal.json`; let url=`/courses/${coursesId}/polls/publish_modal.json`;
axios.get(url,{ axios.get(url,{
params:{ params:{
check_ids:checkBoxValues check_ids:checkBoxValues
} }
}).then((response) => { }).then((response) => {
if(response){ if(response){
let list=[]; let list=[];
if(response.data.course_info){ if(response.data.course_info){
for(var i=0;i<response.data.course_info.length;i++){ for(var i=0;i<response.data.course_info.length;i++){
list.push({ list.push({
id:response.data.course_info[i].course_group_id, id:response.data.course_info[i].course_group_id,
name:response.data.course_info[i].course_group_name, name:response.data.course_info[i].course_group_name,
}) })
} }
} }
this.setState({ this.setState({
course_groups:list, course_groups:list,
}) })
this.setState({ this.setState({
modalname:"立即发布", modalname:"立即发布",
modaltype:response.data.un_publish > 0 ? 1 : 2, modaltype:response.data.un_publish > 0 ? 1 : 2,
visible:true, visible:true,
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:"暂不发布",
Savesname:"立即发布", Savesname:"立即发布",
Cancel:this.homeworkhide, Cancel:this.homeworkhide,
Saves:this.homeworkstartend, Saves:this.homeworkstartend,
}) })
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}); });
} }
} }
} }
//取消提示弹框 //取消提示弹框
modalCancel=()=>{ modalCancel=()=>{
this.setState({ this.setState({
modalsType:false, modalsType:false,
modalsTopval:"", modalsTopval:"",
loadtype:false loadtype:false
}) })
} }
//暂不发布 //暂不发布
homeworkhide=()=>{ homeworkhide=()=>{
this.setState({ this.setState({
modalname:undefined, modalname:undefined,
modaltype:undefined, modaltype:undefined,
visible:false, visible:false,
Topval:undefined, Topval:undefined,
Topvalright:undefined, Topvalright:undefined,
Botvalleft:undefined, Botvalleft:undefined,
Botval:undefined, Botval:undefined,
starttime:undefined, starttime:undefined,
starttimes:undefined, starttimes:undefined,
endtime:undefined, endtime:undefined,
Cancelname:undefined, Cancelname:undefined,
Savesname:undefined, Savesname:undefined,
Cancel:undefined, Cancel:undefined,
Saves:undefined, Saves:undefined,
StudentList_value:undefined, StudentList_value:undefined,
addname:undefined, addname:undefined,
addnametype:false, addnametype:false,
addnametab:undefined addnametab:undefined
}) })
} }
// 确定立即发布 // 确定立即发布
homeworkstartend=(ids,endtime)=>{ homeworkstartend=(ids,endtime)=>{
let {checkBoxValues}=this.props let {checkBoxValues}=this.props
let {chooseId}=this.state; let {chooseId}=this.state;
let coursesId=this.props.match.params.coursesId; let coursesId=this.props.match.params.coursesId;
if(this.props.Exercisetype==="exercise"){ if(this.props.Exercisetype==="exercise"){
let url=`/courses/${coursesId}/exercises/publish.json` let url=`/courses/${coursesId}/exercises/publish.json`
axios.post(url,{ axios.post(url,{
check_ids:checkBoxValues, check_ids:checkBoxValues,
group_ids:chooseId, group_ids:chooseId,
end_time:endtime end_time:endtime
}).then((result)=>{ }).then((result)=>{
if(result){ if(result){
this.props.showNotification(result.data.message); this.props.showNotification(result.data.message);
this.homeworkhide(); this.homeworkhide();
// 调用父级公共头部的接口刷新 // 调用父级公共头部的接口刷新
this.props.action() this.props.action()
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
}else{ }else{
let url=`/courses/${coursesId}/polls/publish.json` let url=`/courses/${coursesId}/polls/publish.json`
axios.post(url,{ axios.post(url,{
check_ids:checkBoxValues, check_ids:checkBoxValues,
group_ids:chooseId, group_ids:chooseId,
end_time:endtime end_time:endtime
}).then((result)=>{ }).then((result)=>{
if(result){ if(result){
this.props.showNotification(result.data.message); this.props.showNotification(result.data.message);
this.homeworkhide(); this.homeworkhide();
// 调用父级公共头部的接口刷新 // 调用父级公共头部的接口刷新
this.props.action() this.props.action()
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
} }
} }
getcourse_groupslist=(id)=>{ getcourse_groupslist=(id)=>{
this.setState({ this.setState({
chooseId:id chooseId:id
}) })
} }
render(){ render(){
let{ let{
modalname, modalname,
modaltype, modaltype,
visible, visible,
Topval, Topval,
Topvalright, Topvalright,
Botvalleft, Botvalleft,
Botval, Botval,
starttime, starttime,
starttimes, starttimes,
endtime, endtime,
Cancelname, Cancelname,
Savesname, Savesname,
Cancel, Cancel,
Saves, Saves,
course_groups, course_groups,
modalsType, modalsType,
modalsTopval, modalsTopval,
loadtype, loadtype,
}=this.state }=this.state
return( return(
<React.Fragment> <React.Fragment>
<HomeworkModal <HomeworkModal
modaltype={modaltype} modaltype={modaltype}
modalname={modalname} modalname={modalname}
visible={visible} visible={visible}
Topval={Topval} Topval={Topval}
Topvalright={Topvalright} Topvalright={Topvalright}
Botvalleft={Botvalleft} Botvalleft={Botvalleft}
Botval={Botval} Botval={Botval}
starttime={starttime} starttime={starttime}
starttimes={starttimes} starttimes={starttimes}
endtime={endtime} endtime={endtime}
Cancelname={Cancelname} Cancelname={Cancelname}
Savesname={Savesname} Savesname={Savesname}
Cancel={Cancel} Cancel={Cancel}
Saves={Saves} Saves={Saves}
course_groups={course_groups} course_groups={course_groups}
getcourse_groupslist={(id)=>this.getcourse_groupslist(id)} getcourse_groupslist={(id)=>this.getcourse_groupslist(id)}
/> />
{/* 公用的提示弹框 */} {/* 公用的提示弹框 */}
<Modals <Modals
modalsType={modalsType} modalsType={modalsType}
modalsTopval={modalsTopval} modalsTopval={modalsTopval}
modalsBottomval="" modalsBottomval=""
loadtype={loadtype} loadtype={loadtype}
modalCancel={this.modalCancel} modalCancel={this.modalCancel}
modalSave={this.modalCancel} modalSave={this.modalCancel}
></Modals> ></Modals>
<WordsBtn style={this.props.style} className={this.props.className} onClick={this.homeworkstart}>立即发布</WordsBtn> <WordsBtn style={this.props.style} className={this.props.className} onClick={this.homeworkstart}>立即发布</WordsBtn>
</React.Fragment> </React.Fragment>
) )
} }
} }
export default Immediatelypublish export default Immediatelypublish

@ -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,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -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>
<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> is_current &&
<li className={status=="processing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("processing")}>正在进行</a></li> <div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status=="end" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("end")}>已结束</a></li> <li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
</div> <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"> <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>
<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> is_current &&
<li className={status=="publicly" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("publicly")}>公开</a></li> <div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status=="personal" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("personal")}>私有</a></li> <li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
</div> <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"> <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