# Conflicts:
#	public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
dev_forum
杨树明 5 years ago
parent cdbfaef473
commit 75cfe55863

@ -284,7 +284,7 @@ class Listofworksstudentone extends Component {
<span>
{
record.efficiencyscore&& record.efficiencyscore=== "--"?(
<span style={{color:"#9A9A9A"}}>
<span style={{color:"#9A9A9A"}}>
--
</span>
)
@ -963,32 +963,32 @@ class Listofworksstudentone extends Component {
course_group: "",
}
axios.post(urll, data).then((result) => {
if(result === undefined){
return
}
if(result === undefined){
return
}
// console.log("951");
// console.log(result);
// debugger
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
student_works: result.data.student_works,
jobsettingsdata: result,
publish_immediately: result.data.publish_immediately,
end_immediately: result.data.end_immediately,
id: result.data.id,
work_efficiency: result.data.work_efficiency,
code_review: result.data.code_review,
challenges_count: result.data.challenges_count,
view_report: result.data.view_report,
})
this.props.Getdataback(result,result.data);
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata(result.data);
} else {
this.seacthdatas(result.data, result.data.student_works);
}
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
student_works: result.data.student_works,
jobsettingsdata: result,
publish_immediately: result.data.publish_immediately,
end_immediately: result.data.end_immediately,
id: result.data.id,
work_efficiency: result.data.work_efficiency,
code_review: result.data.code_review,
challenges_count: result.data.challenges_count,
view_report: result.data.view_report,
})
this.props.Getdataback(result,result.data);
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata(result.data);
} else {
this.seacthdatas(result.data, result.data.student_works);
}
}).catch((error) => {
console.log(error);
@ -1070,13 +1070,13 @@ class Listofworksstudentone extends Component {
for(var i=0;i<this.state.columnsstu.length;i++){
var item = this.state.columnsstu[i];
if (work_efficiency === false) {
if(item.title==="关卡得分"){
}
else if(item.title==="效率分"){
}
if(item.title==="关卡得分"){
}
else if(item.title==="效率分"){
}
}
if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
@ -1193,7 +1193,7 @@ class Listofworksstudentone extends Component {
}
}
if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
@ -1399,8 +1399,8 @@ class Listofworksstudentone extends Component {
challenges_count:result.data.challenges_count,
view_report:result.data.view_report,
})
this.props.Getdataback(result,result.data);
this.seacthdata(result.data);
this.props.Getdataback(result,result.data);
this.seacthdata(result.data);
}
}).catch((error) => {
console.log(error)
@ -1433,7 +1433,7 @@ class Listofworksstudentone extends Component {
})
this.Getalistofworkstwo(this.state.order, "", "", "", pageNumber, this.state.limit);
}
//计算成绩
//计算成绩
setComputeTime=()=>{
let {teacherdata}=this.state;
this.setState({
@ -1497,26 +1497,26 @@ class Listofworksstudentone extends Component {
limit:20,
}
axios.post(urll, data).then((result) => {
if (result) {
// console.log(url)
// console.log("作品列表6789077")
// console.log(JSON.stringify(result))
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
allow_late:result.data.allow_late,
course_group_info: result.data.course_group_info,
loadingstate: false,
jobsettingsdata: result,
publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1);
}
if (result) {
// console.log(url)
// console.log("作品列表6789077")
// console.log(JSON.stringify(result))
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
allow_late:result.data.allow_late,
course_group_info: result.data.course_group_info,
loadingstate: false,
jobsettingsdata: result,
publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1);
}
}).catch((error) => {
console.log(error)
this.setState({
@ -1559,22 +1559,22 @@ class Listofworksstudentone extends Component {
// console.log(url)
// console.log("作品列表______________________")
// console.log(JSON.stringify(result))
if (result !== undefined) {
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
loadingstate: false,
jobsettingsdata: result,
allow_late:result.data.allow_late,
publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
if (result !== undefined) {
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
loadingstate: false,
jobsettingsdata: result,
allow_late:result.data.allow_late,
publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
// }
}
}).catch((error) => {
@ -1591,7 +1591,7 @@ class Listofworksstudentone extends Component {
// 设置数据
seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => {
debugger
debugger
let {page, limit} = this.state;
let datalist = [];
let columns = this.state.columns;
@ -2216,81 +2216,81 @@ class Listofworksstudentone extends Component {
return (
this.props.isAdmin() === true ?
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{visible === true ? <ModulationModal
visible={visible}
Cancel={this.cancelModulationModel}
Saves={(value, num) => this.saveModulationModal(value, num)}
/> : ""}
{this.state.showmodel === true ? <ShixunWorkModal
{...this.props}
visible={this.state.showmodel}
modalname={"代码查重"}
data={[]}
issCancel={() => this.hideshowmodel()}
updatas={() => this.isupdatas()}
/> : ""}
{visibles === true ?
<div>
<style>
{
`
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{visible === true ? <ModulationModal
visible={visible}
Cancel={this.cancelModulationModel}
Saves={(value, num) => this.saveModulationModal(value, num)}
/> : ""}
{this.state.showmodel === true ? <ShixunWorkModal
{...this.props}
visible={this.state.showmodel}
modalname={"代码查重"}
data={[]}
issCancel={() => this.hideshowmodel()}
updatas={() => this.isupdatas()}
/> : ""}
{visibles === true ?
<div>
<style>
{
`
body {
overflow: hidden !important;
}
`
}
</style>
<TraineetraininginformationModal
{...this.props} {...this.state}
homeworkid={this.props.match.params.homeworkid}
coursesId={this.props.match.params.coursesId}
workid={teacherdata.id}
isAdmins={this.props.isAdmin()}
userids={this.state.userids}
viewtrainingdata={viewtrainingdata}
game_list={game_list}
visible={visibles}
experience={experience}
boolgalist={boolgalist}
Cancel={() => this.cancelModulationModels()}
/>
</div>
: ""
}
{/*立即发布*/}
<HomeworkModal
modaltype={this.state.modaltype}
modalname={this.state.modalname}
visible={this.state.svisible}
Topval={this.state.Topval}
Topvalright={this.state.Topvalright}
Botvalleft={this.state.Botvalleft}
Botval={this.state.Botval}
starttime={this.state.starttime}
endtime={this.state.endtime}
Cancelname={this.state.Cancelname}
Savesname={this.state.Savesname}
Cancel={this.state.Cancel}
Saves={this.state.Saves}
course_groups={this.state.course_groups}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
starttimes={this.state.starttimes}
typs={this.state.typs}
/>
<div className={"educontent "}>
<div className="edu-back-white">
}
</style>
<TraineetraininginformationModal
{...this.props} {...this.state}
homeworkid={this.props.match.params.homeworkid}
coursesId={this.props.match.params.coursesId}
workid={teacherdata.id}
isAdmins={this.props.isAdmin()}
userids={this.state.userids}
viewtrainingdata={viewtrainingdata}
game_list={game_list}
visible={visibles}
experience={experience}
boolgalist={boolgalist}
Cancel={() => this.cancelModulationModels()}
/>
</div>
: ""
}
<style>
{`
{/*立即发布*/}
<HomeworkModal
modaltype={this.state.modaltype}
modalname={this.state.modalname}
visible={this.state.svisible}
Topval={this.state.Topval}
Topvalright={this.state.Topvalright}
Botvalleft={this.state.Botvalleft}
Botval={this.state.Botval}
starttime={this.state.starttime}
endtime={this.state.endtime}
Cancelname={this.state.Cancelname}
Savesname={this.state.Savesname}
Cancel={this.state.Cancel}
Saves={this.state.Saves}
course_groups={this.state.course_groups}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
starttimes={this.state.starttimes}
typs={this.state.typs}
/>
<div className={"educontent "}>
<div className="edu-back-white">
<style>
{`
.startbox{
height: 48px;
background: rgba(255,104,0,0.1);
@ -2332,149 +2332,151 @@ class Listofworksstudentone extends Component {
}
`}
</style>
{computeTimetype===false?<li className="clearfix startbox">
</style>
{computeTimetype===false?<li className="clearfix startbox">
<span className={"startfont"}>
正在执行成绩计算请稍后刷新页面查看结果
温馨提示执行时间因作品数量而异
</span>
</li>:""}
{/*作品状态GraduationTaskssettinglist*/}
<ul className="clearfix" style={{padding: '20px 15px 10px 20px'}}>
<li className="clearfix ">
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
{teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status=== 0? "":
computeTimetype===true&&this.props.isNotMember()===false? <div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:<div className={"computeTimes font-13"}>
计算成绩
</div>}
</span>}
<div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}>
<Search
placeholder="请输入姓名或学号搜索"
id="subject_search_input"
autoComplete="off"
value={searchtext}
onKeyUp={(e) => this.onSearchKeywordKeyUpt(e)}
onInput={this.inputSearchValuest}
onSearch={this.searchValuest}
></Search>
</div>
</li>
</li>:""}
{/*作品状态GraduationTaskssettinglist*/}
<ul className="clearfix" style={{padding: '20px 15px 10px 20px'}}>
<li className="clearfix ">
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
<span>
{teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true?
(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTimet}>
计算成绩
</div>:""):
teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
计算成绩
</div>:"")
}
</span>
<div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}>
<Search
placeholder="请输入姓名或学号搜索"
id="subject_search_input"
autoComplete="off"
value={searchtext}
onKeyUp={(e) => this.onSearchKeywordKeyUpt(e)}
onInput={this.inputSearchValuest}
onSearch={this.searchValuest}
></Search>
</div>
</li>
<li className="clearfix mt10">
<li className="clearfix mt10">
<span className="fl mr10 color-grey-8 ">作品状态</span>
<span className="fl "><a id="graduation_comment_no_limit"
className={unlimited === 0 ? "pl10 pr10 mr20 check_on" : "pl10 pr10 mr20 "}
onClick={() => this.notlimiteds()}>不限</a></span>
<CheckboxGroup value={course_groupyslstwo}
onChange={(e) => this.funtaskstatust(e, task_status && task_status)}
style={{paddingTop: '4px'}}>
<span className="fl mr10 color-grey-8 ">作品状态</span>
<span className="fl "><a id="graduation_comment_no_limit"
className={unlimited === 0 ? "pl10 pr10 mr20 check_on" : "pl10 pr10 mr20 "}
onClick={() => this.notlimiteds()}>不限</a></span>
<CheckboxGroup value={course_groupyslstwo}
onChange={(e) => this.funtaskstatust(e, task_status && task_status)}
style={{paddingTop: '4px'}}>
{task_status === undefined ? "" : task_status.map((item, key) => {
return (
<span key={key}>
{task_status === undefined ? "" : task_status.map((item, key) => {
return (
<span key={key}>
<Checkbox value={item.id}
className="fl ">{item.name}
<span>({item.count})</span>
</Checkbox>
</span>
)
})}
</CheckboxGroup>
{/*请输入姓名或学号搜索*/}
</li>
{/*分班情况*/}
<li className="clearfix mt10 ">
{JSON.stringify(course_group_info) === "[]" ? "" : course_group_info === undefined ? "" : course_group_info.length < 2 ? "" :
<div>
<span className="fl mr10 color-grey-8">分班情况</span>
<span className="fl "><a id="graduation_comment_no_limit"
className={unlimitedtwo === 0 ? "pl10 pr10 mr20 " : "pl10 pr10 mr20 check_on"}
onClick={() => this.notlimitedst()}>不限</a></span>
<CheckboxGroup value={course_groupysls}
onChange={(e) => this.funtaskstatustwot(e, course_group_info && course_group_info)}
style={{paddingTop: '4px',width:'1017px'}}>
{course_group_info === undefined ? "" :
course_group_info.map((item, key) => {
return (
<span key={key}>
)
})}
</CheckboxGroup>
{/*请输入姓名或学号搜索*/}
</li>
{/*分班情况*/}
<li className="clearfix mt10 ">
{JSON.stringify(course_group_info) === "[]" ? "" : course_group_info === undefined ? "" : course_group_info.length < 2 ? "" :
<div>
<span className="fl mr10 color-grey-8">分班情况</span>
<span className="fl "><a id="graduation_comment_no_limit"
className={unlimitedtwo === 0 ? "pl10 pr10 mr20 " : "pl10 pr10 mr20 check_on"}
onClick={() => this.notlimitedst()}>不限</a></span>
<CheckboxGroup value={course_groupysls}
onChange={(e) => this.funtaskstatustwot(e, course_group_info && course_group_info)}
style={{paddingTop: '4px',width:'1017px'}}>
{course_group_info === undefined ? "" :
course_group_info.map((item, key) => {
return (
<span key={key}>
<Checkbox value={item.course_group_id}
className="fl ">{item.group_group_name}
<span>({item.count})</span>
</Checkbox>
</span>
)
})
}
</CheckboxGroup>
</div>}
</li>
)
})
}
</CheckboxGroup>
</div>}
</li>
</ul>
</ul>
<div id="graduation_work_list" style={{padding: '0px 20px 10px 20px'}}>
<div id="graduation_work_list" style={{padding: '0px 20px 10px 20px'}}>
<div className="clearfix">
<div className="clearfix">
<span className="fl color-grey-6 font-12"><span
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.student_works.length}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count} </span>
<style>
{
`
<style>
{
`
.edu-position-hide li a:hover {
background: #F0F0F0;
}
`
}
</style>
<div className="fr edu-menu-panel">
<ul>
<li className="edu-position edu-position-hidebox">
<a className="font-12">
{orders === "update_time" ? "时间" : orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序</a>
<i className="iconfont icon-xiajiantou ml5 font-12 "></i>
<ul className="edu-position-hide undis mt10">
<li> <a onClick={(e) => this.funordert("update_time")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>更新时间</a></li>
<li> <a onClick={(e) => this.funordert("work_score")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>最终成绩</a></li>
<li> <a onClick={(e) => this.funordert("student_id")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>学生学号</a></li>
</ul>
</li>
</ul>
</div>
}
</style>
<div className="fr edu-menu-panel">
<ul>
<li className="edu-position edu-position-hidebox">
<a className="font-12">
{orders === "update_time" ? "时间" : orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序</a>
<i className="iconfont icon-xiajiantou ml5 font-12 "></i>
<ul className="edu-position-hide undis mt10">
<li> <a onClick={(e) => this.funordert("update_time")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>更新时间</a></li>
<li> <a onClick={(e) => this.funordert("work_score")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>最终成绩</a></li>
<li> <a onClick={(e) => this.funordert("student_id")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>学生学号</a></li>
</ul>
</li>
</ul>
</div>
</div>
{
JSON.stringify(data) === "[]" ?
<div id="forum_list" className="forum_table">
<div className="mh650 edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">没有数据可以显示.</p>
</div>
</div>
</div>
{
JSON.stringify(data) === "[]" ?
<div id="forum_list" className="forum_table">
<div className="mh650 edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">没有数据可以显示.</p>
</div>
</div>
:
<div className={"justify break_full_word new_li edu-back-white"} style={{minHeight: "480px"}}>
<style>{`
</div>
:
<div className={"justify break_full_word new_li edu-back-white"} style={{minHeight: "480px"}}>
<style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;}
}
@ -2486,32 +2488,32 @@ class Listofworksstudentone extends Component {
height: 85px;
}
`}</style>
<div className="edu-table edu-back-white ant-tables">
{data === undefined ? "" : <Table
dataSource={data}
columns={columns}
pagination={false}
loading={loadingstate}
/>}
</div>
<div className="edu-table edu-back-white ant-tables">
{data === undefined ? "" : <Table
dataSource={data}
columns={columns}
pagination={false}
loading={loadingstate}
/>}
</div>
}
</div>
{
teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
<div className="edu-txt-center mt30 ">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit}
total={teacherdata.work_count}></Pagination>
</div>
: ""
}
</div>
</div>
{
teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
<div className="edu-txt-center mt30 ">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit}
total={teacherdata.work_count}></Pagination>
</div>
: ""
}
</div>
:
</div>
:
<div>
{
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
@ -2631,15 +2633,21 @@ class Listofworksstudentone extends Component {
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
{teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status=== 0? "":
computeTimetype===true&&this.props.isNotMember()===false? <div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:<div className={"computeTimes font-13"}>
计算成绩
</div>}
</span>}
{computeTimetype===true?
(this.props.isNotMember()===false?
<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>
:"")
:
(teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
this.props.isNotMember()===false?
<div className={"computeTimes font-13"}>
计算成绩
</div>
:"")
}
</span>}
</div>
@ -2792,16 +2800,17 @@ class Listofworksstudentone extends Component {
<div className="fr">
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
{teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":
<span>
{teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status===0?"":
this.props.isNotMember()===false&&computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:<div className={"computeTimes font-13"}>
计算成绩
</div>}
</span>
}
{teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?
(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:""):
teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
计算成绩
</div>:"")
}
</span>}
</div>
{/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/}

Loading…
Cancel
Save