hjm 5 years ago
commit ed52b674a2

@ -125,7 +125,7 @@ $(window).resize(function() {
rightSlider(); rightSlider();
}); });
function rightSlider() { function rightSlider() {
var poi = parseInt((parseInt($(window).width()) - 1200) / 2) - 60; var poi = parseInt((parseInt($(window).width()) - 1200) / 2) - 34;
// console.log(parseInt($(window).width())+" "+poi); // console.log(parseInt($(window).width())+" "+poi);
if (poi > 0) { if (poi > 0) {
$(".-task-sidebar").css("right", poi); $(".-task-sidebar").css("right", poi);

@ -2,12 +2,14 @@ import React, { Component } from 'react';
import { BrowserRouter as Router, Route, Link } from "react-router-dom"; import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import { Spin } from 'antd';
class Loading extends Component { class Loading extends Component {
render() { render() {
// Loading // Loading
return ( return (
<div className="App" style={{minHeight: '800px'}}> <div className="App" style={{minHeight: '800px'}}>
<Spin size="large" />
</div> </div>
); );
} }

@ -103,7 +103,14 @@ class UseBank extends Component{
} }
closeSelectBank=()=>{ closeSelectBank=()=>{
this.setState({ this.setState({
flag:false flag:false,
nav_my: 'myself',
search: '',
page: 1,
checkBoxValues: [],
isChecked:'',
is_teacher:undefined,
hometypepvisible:false
}) })
} }
@ -190,7 +197,7 @@ class UseBank extends Component{
width:218px !important; width:218px !important;
} }
.bankwidth{ .bankwidth{
width:29% !important; width:24% !important;
overflow:hidden; overflow:hidden;
text-overflow:ellipsis; text-overflow:ellipsis;
white-space:nowrap white-space:nowrap
@ -275,7 +282,7 @@ class UseBank extends Component{
<span className="fl with65"> <span className="fl with65">
<label className="task-hide fl" title={item.name && item.name.length > 30 ? item.name:""} style={{"maxWidth":"100%"}}>{item.name}</label> <label className="task-hide fl" title={item.name && item.name.length > 30 ? item.name:""} style={{"maxWidth":"100%"}}>{item.name}</label>
</span> </span>
<span title={item.course_list_name && item.course_list_name.length > 14 && item.course_list_name} <span title={item.course_list_name && item.course_list_name.length > 10 && item.course_list_name}
className={nav_my==='myself'?"fl with30 color-grey-6 task-hide pl5 bankwidth":"fl with30 color-grey-6 task-hide pl5 bankwidth"} className={nav_my==='myself'?"fl with30 color-grey-6 task-hide pl5 bankwidth":"fl with30 color-grey-6 task-hide pl5 bankwidth"}
>{item.course_list_name}</span> >{item.course_list_name}</span>

@ -17,7 +17,8 @@ class AccessoryModal extends Component{
ModalSave:"", ModalSave:"",
loadtype:false, loadtype:false,
updatas:false, updatas:false,
shixunsreplace:false shixunsreplace:false,
Errormessage:false,
} }
} }
@ -41,7 +42,10 @@ class AccessoryModal extends Component{
// for(var list of fileList ){ // for(var list of fileList ){
// console.log(fileList) // console.log(fileList)
// } // }
this.setState({ fileList }); this.setState({
fileList:fileList,
Errormessage:false,
});
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
@ -121,10 +125,23 @@ class AccessoryModal extends Component{
if (newfileList.length == 0) { if (newfileList.length == 0) {
// this.props.showNotification('请先上传附件') // this.props.showNotification('请先上传附件')
this.setState({ if(this.props.modalname === "补交附件"){
shixunsreplace:true, this.setState({
}) Errormessage:true,
shixunsreplace:false,
})
}else{
this.setState({
shixunsreplace:true,
Errormessage:false,
})
}
return; return;
}else{
this.setState({
shixunsreplace:false,
Errormessage:false,
})
} }
let url= this.props.reviseAttachmentUrl || "/graduation_works/"+id+"/revise_attachment.json" let url= this.props.reviseAttachmentUrl || "/graduation_works/"+id+"/revise_attachment.json"
@ -326,6 +343,14 @@ class AccessoryModal extends Component{
border:'1px solid rgba(234,234,234,1)', border:'1px solid rgba(234,234,234,1)',
padding: '10px' padding: '10px'
}}></textarea> }}></textarea>
{
this.state.Errormessage && this.state.Errormessage === true ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"left",width: " 100%"}}>还未上传附件</span>
</p>
: <div style={{height:"25px"}}></div>
}
{this.state.updatas===true?<span className={"color-red"}>请上传附件</span>:""} {this.state.updatas===true?<span className={"color-red"}>请上传附件</span>:""}
<div className="clearfix mt30 edu-txt-center mb10"> <div className="clearfix mt30 edu-txt-center mb10">
<a className="task-btn color-white mr70" onClick={this.props.Cancel}>{this.props.Cancelname || '取消'}</a> <a className="task-btn color-white mr70" onClick={this.props.Cancel}>{this.props.Cancelname || '取消'}</a>

@ -193,7 +193,7 @@ class Exercise extends Component{
} }
// 题库选用成功后刷新页面 // 题库选用成功后刷新页面
useBankSuccess=(checkValue,value)=>{ useBankSuccess=(checkValue,value)=>{
debugger
let{type,StudentList_value,page,limit}=this.state; let{type,StudentList_value,page,limit}=this.state;
let coursesId=this.props.match.params.coursesId; let coursesId=this.props.match.params.coursesId;
let url=`/courses/${coursesId}/exercises/publish_modal.json`; let url=`/courses/${coursesId}/exercises/publish_modal.json`;

@ -116,7 +116,7 @@ class ExerciseListItem extends Component{
{ {
item.lock_status === 0 ? item.lock_status === 0 ?
<Tooltip title={ this.props.isNotMember()?"私有属性,非课堂成员不能访问":"私有属性"} placement="bottom"> <Tooltip title={ this.props.isNotMember()===true?"私有属性,非课堂成员不能访问":"私有属性"} placement="bottom">
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i> <i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i>
</Tooltip> </Tooltip>
:"" :""

@ -197,18 +197,18 @@ class Exercisestatisticalresult extends Component {
item.ques_details.map((ite,k)=>{ item.ques_details.map((ite,k)=>{
return( return(
<div> <div className={"mt20"}>
<div className="clearfix edu-back-white poll_list" style={{padding: '0px 20px'}}> <div className="clearfix edu-back-white poll_list" style={{padding: '0px 20px'}}>
<div className="font-16 shixunreporttitle fl" > <div className="font-16 shixunreporttitle fl" >
<span> {ite.challenge_position}{ite.challenge_name}</span> <span> {ite.challenge_position}{ite.challenge_name}</span>
</div>
</div> </div>
</div> <Exercisetablesmubu
<Exercisetablesmubu data={ite.challenge_details}
data={ite.challenge_details} type={item.ques_type}
type={item.ques_type} effictive_counts={item.effictive_counts}
effictive_counts={item.effictive_counts} choicetype={choicetype}
choicetype={choicetype} />
/>
</div> </div>
) )
}): }):

@ -159,7 +159,7 @@ class Testpapersettinghomepage extends Component{
return( return(
<div className="newMain clearfix "> <div className="newMain clearfix ">
<div className={"educontent mb20"} style={{width:"1250px"}}> <div className={"educontent mb20"} style={{width:"1200px"}}>
{/* 公用的提示弹框 */} {/* 公用的提示弹框 */}
{this.state.Modalstype===true?<Modals {this.state.Modalstype===true?<Modals
modalsType={this.state.Modalstype} modalsType={this.state.Modalstype}
@ -177,7 +177,7 @@ class Testpapersettinghomepage extends Component{
callback={this.callback} callback={this.callback}
/>:""} />:""}
<div className="educontent mb20" style={{width:"1250px"}}> <div className="educontent mb20" style={{width:"1200px"}}>
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue " to={`/courses/${this.props.match.params.coursesId}/students}`}>{this.props.coursedata.name}</ActionBtn> <ActionBtn className=" btn colorgrey fl hovercolorblue " to={`/courses/${this.props.match.params.coursesId}/students}`}>{this.props.coursedata.name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
@ -195,7 +195,7 @@ class Testpapersettinghomepage extends Component{
`} `}
</style> </style>
<div className="educontent" style={{width:"1250px"}}> <div className="educontent" style={{width:"1200px"}}>
<p className=" fl color-black summaryname "> <p className=" fl color-black summaryname ">
{Commonheadofthetestpaper === undefined?"":Commonheadofthetestpaper.exercise_name} {Commonheadofthetestpaper === undefined?"":Commonheadofthetestpaper.exercise_name}
</p> </p>
@ -252,19 +252,18 @@ class Testpapersettinghomepage extends Component{
padding-top: 10px; padding-top: 10px;
padding-bottom: 8px; padding-bottom: 8px;
} }
a:hover {
color:#1A0B00 !important;
}
`} `}
</style> </style>
<div className={"studentList_operation_ul mt23"}> <div className={"studentList_operation_ul mt23"}>
{isAdmin === true? <li className="li_line drop_down fr color-blue font-15" style={{"paddingLeft":"0px"}}> {isAdmin === true? <li className="li_line drop_down fr color-blue font-15" 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 <li><a onClick={()=>this.experiment(`/api/exercises/${this.props.match.params.Id}/exercise_lists.xlsx`)}>学生成绩</a></li>
onClick={()=>this.experiment(`/api/exercises/${this.props.match.params.Id}/exercise_lists.xlsx`)} <li><a href={`/api/exercises/${this.props.match.params.Id}/export_exercise`} >空白试卷</a></li>
className="color-dark">学生成绩</a></li> <li><a onClick={()=>this.experiment(`/api/zip/export_exercises?exercise_id=${this.props.match.params.Id}${this.state.groupyslsval}`)}>学生答题试卷</a></li>
<li><a href={`/api/exercises/${this.props.match.params.Id}/export_exercise`} className="color-dark">空白试卷</a></li>
<li><a className="color-dark"
onClick={()=>this.experiment(`/api/zip/export_exercises?exercise_id=${this.props.match.params.Id}${this.state.groupyslsval}`)}
>学生答题试卷</a></li>
</ul> </ul>
</li>:""} </li>:""}
</div> </div>

@ -200,7 +200,7 @@ class shixunAnswer extends Component{
className:"edu-txt-center", className:"edu-txt-center",
render:(testCount,item,index)=>{ render:(testCount,item,index)=>{
return( return(
<span>{ item.testCount ? item.testCount : "--" }</span> <span>{ item.testCount ? item.testCount : <span className="color-grey-9">--</span> }</span>
) )
} }
}, { }, {
@ -210,7 +210,7 @@ class shixunAnswer extends Component{
className:"edu-txt-center", className:"edu-txt-center",
render:(endTime,item,index)=>{ render:(endTime,item,index)=>{
return( return(
<span>{ item.endTime ? item.endTime : "--" }</span> <span>{ item.endTime ? item.endTime : <span className="color-grey-9">--</span> }</span>
) )
} }
}, { }, {
@ -220,7 +220,7 @@ class shixunAnswer extends Component{
className:"edu-txt-center", className:"edu-txt-center",
render:(needTime,item,index)=>{ render:(needTime,item,index)=>{
return( return(
<span>{ item.needTime ? item.needTime : "--" }</span> <span>{ item.needTime ? item.needTime : <span className="color-grey-9">--</span> }</span>
) )
} }
}, { }, {
@ -259,7 +259,7 @@ class shixunAnswer extends Component{
step={0.1} step={0.1}
precision={1} precision={1}
value={item.input_score} value={item.input_score}
style={{width:"60px",marginRight:"5px"}} style={{width:"60px",marginLeft:"5px"}}
placeholder="请输入分数" placeholder="请输入分数"
onChange={(value)=>{this.changeThis(value,index)}} onChange={(value)=>{this.changeThis(value,index)}}
onBlur={(value)=>this.changeThisScore(value,item.id,index)} onBlur={(value)=>this.changeThisScore(value,item.id,index)}
@ -269,9 +269,9 @@ class shixunAnswer extends Component{
} }
{ {
item.operation ? item.operation ?
<a className={isAdmin ? "color-blue ml20":"color-blue"} target="_blank" href='javascript:void(0)' onClick={()=>this.scrollToAnchor(`${questionType.question_id}${index+1}`)}>查看</a> <a className={isAdmin ? "color-blue mt5 fr":"color-blue"} target="_blank" href='javascript:void(0)' onClick={()=>this.scrollToAnchor(`${questionType.question_id}${index+1}`)}>查看</a>
: :
<a className={isAdmin ? "color-grey-9 ml20":"color-grey-9"} target="_blank" href='javascript:void(0)'>--</a> <span className={isAdmin ? "color-grey-9 mt5 fr":"color-grey-9"} >--</span>
} }
</span> </span>
) )
@ -279,28 +279,38 @@ class shixunAnswer extends Component{
}]; }];
return( return(
<div> <div>
<style>
{`
.resetTableStyle .ant-table-tbody > tr > td{
padding:10px 5px!important;
}
.resetCodeMirrorStyle .CodeMirror{
height:auto!important;
}
`}
</style>
{ exercise && ((exercise.student_commit_status && exercise.student_commit_status != 0) || (exercise.user_exercise_status && exercise.user_exercise_status !=0) ) ? { exercise && ((exercise.student_commit_status && exercise.student_commit_status != 0) || (exercise.user_exercise_status && exercise.user_exercise_status !=0) ) ?
<div> <div>
<p className="padding20-30 font-16 color-grey-6 pl30">阶段成绩</p> <p className="padding20-30 font-16 color-grey-6 pl30">阶段成绩</p>
<div className="stageTable"> <div className={challenge && challenge.length > 0 ? "pl30 pr30 resetTableStyle":"pl30 pr30 resetTableStyle stageTable"}>
{ data && data.length>0 ? <Table columns={columns} dataSource={data} pagination={false}></Table> : "" } { data && data.length>0 ? <Table columns={columns} dataSource={data} pagination={false}></Table> : "" }
</div> </div>
{ {
challenge && challenge.length > 0 && challenge && challenge.length > 0 &&
<div> <div>
<p className="padding20-30 font-16 color-grey-6 pl30">实训详情</p> <p className="mt20 pr30 font-16 color-grey-6 pl30">实训详情</p>
{ {
challenge.map((item,key)=>{ challenge.map((item,key)=>{
return( return(
<div className="pl30 pr30" id={`challenge_${questionType.question_id}${key+1}`}> <div className="pl30 pr30 mt20" id={`challenge_${questionType.question_id}${key+1}`}>
<p className="clearfix mb20"> <p className="clearfix mb20">
<span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF"> <span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF">
<i className="fa fa-code font-16 color_white"></i> <i className="fa fa-code font-16 color_white"></i>
</span> </span>
<span className="fl mt3 font-14"> <span className="fl mt3 font-16">
<span className="font-bd mr15">{item[0].position}</span> <span className="font-bd mr15">{item[0].position}</span>
<Link to={"/shixuns/"+item[0].game_identifier+"/challenges"}> <Link to={"/shixuns/"+item[0].game_identifier+"/challenges"}>
<span className={"font-14"}>{item[0].name}</span> <span className={"font-16"}>{item[0].name}</span>
</Link> </Link>
</span> </span>
</p> </p>
@ -308,7 +318,7 @@ class shixunAnswer extends Component{
{...this.props} {...this.state} challenge={item[0].outputs} {...this.props} {...this.state} challenge={item[0].outputs}
></ShixunAnswerDetail> ></ShixunAnswerDetail>
{ item[0].st===0 ? <div className="font-16 color-dark-21 mb10"> { item[0].st===0 ? <div className="font-16 color-dark-21">
<div className="bor-grey-e mt15"> <div className="bor-grey-e mt15">
<p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox"> <p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox">
<span className="fl">最近通过的代码</span> <span className="fl">最近通过的代码</span>
@ -316,7 +326,7 @@ class shixunAnswer extends Component{
</p> </p>
<div className="test-code bor-top-greyE"> <div className="test-code bor-top-greyE">
<li className="clearfix"> <li className="clearfix resetCodeMirrorStyle">
<CodeMirror <CodeMirror
value={item[0].passed_code} value={item[0].passed_code}
options={{ options={{

@ -613,7 +613,7 @@ class GraduationTasksSubmitedit extends Component{
{item.delete===true? {item.delete===true?
<i className="font-14 iconfont icon-guanbi " <i className="font-14 iconfont icon-guanbi "
id={item.id} id={item.id}
onClick={()=>this.onAttachmentRemove(item)} onClick={()=>this.onAttachmentRemove(item.id)}
aria-hidden="true"> aria-hidden="true">
</i>:""} </i>:""}
</div> </div>

@ -2,7 +2,7 @@ import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import { WordsBtn,getUrl } from 'educoder'; import { WordsBtn,getUrl ,bytesToSize} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import '../../css/Courses.css'; import '../../css/Courses.css';
@ -40,27 +40,28 @@ class GraduationTasksedit extends Component{
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
// console.log(result) // console.log(result)
let newfilelist=[]; // let newfilelist=[];
if(result.data.attachments.length!=0){ // if(result.data.attachments.length!=0){
for(var list of result.data.attachments){ // for(var list of result.data.attachments){
newfilelist.push({ // newfilelist.push({
uid:list.id, // uid:list.id,
name:list.title, // name:list.title,
status: 'done', // status: 'done',
url:list.url, // url:list.url,
}) // })
} // }
//
} // }
let namelength=result.data.task_name.length; let namelength=result.data.task_name.length;
let sixlength=title_num-namelength let sixlength=title_num-namelength
this.setState({ this.setState({
fileList:newfilelist, // fileList:newfilelist,
description:result.data.description, description:result.data.description,
tasktype:result.data.task_type, tasktype:result.data.task_type,
name:result.data.task_name, name:result.data.task_name,
data:result.data, data:result.data,
title_num:sixlength title_num:sixlength,
attachments:result.data.attachments,
}) })
@ -100,36 +101,36 @@ class GraduationTasksedit extends Component{
// 附件相关 START // 附件相关 START
handleChange = (info) => { handleChange = (info) => {
let fileList = info.fileList; let fileList = info.fileList;
console.log(fileList) // console.log(fileList)
// for(var list of fileList ){ // for(var list of fileList ){
// console.log(fileList) // console.log(fileList)
// } // }
this.setState({ fileList }); this.setState({ fileList });
} }
onAttachmentRemove = (file) => { // onAttachmentRemove = (file) => {
// confirm({ // // confirm({
// title: '确定要删除这个附件吗?', // // title: '确定要删除这个附件吗?',
// okText: '确定', // // okText: '确定',
// cancelText: '取消', // // cancelText: '取消',
// // content: 'Some descriptions', // // // content: 'Some descriptions',
// onOk: () => { // // onOk: () => {
// this.deleteAttachment(file) // // this.deleteAttachment(file)
// }, // // },
// onCancel() { // // onCancel() {
// console.log('Cancel'); // // console.log('Cancel');
// }, // // },
// }); // // });
// return false; // // return false;
//
this.setState({ // this.setState({
Modalstype:true, // Modalstype:true,
Modalstopval:'确定要删除这个附件吗?', // Modalstopval:'确定要删除这个附件吗?',
ModalSave: ()=>this.deleteAttachment(file), // ModalSave: ()=>this.deleteAttachment(file),
ModalCancel:this.cancelAttachment // ModalCancel:this.cancelAttachment
}) // })
return false; // return false;
} // }
cancelAttachment=()=>{ cancelAttachment=()=>{
this.setState({ this.setState({
@ -141,10 +142,11 @@ class GraduationTasksedit extends Component{
}) })
} }
deleteAttachment = (file) => { onAttachmentRemove = (file) => {
this.cancelAttachment(); this.cancelAttachment();
const url = `/attachments/${file.response ? file.response.id : file.uid}.json` // const url = `/attachments/${file.response ? file.response.id : file.uid}.json`
const url = `/attachments/${file}.json`
axios.delete(url, { axios.delete(url, {
}) })
.then((response) => { .then((response) => {
@ -268,7 +270,7 @@ class GraduationTasksedit extends Component{
} }
render(){ render(){
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
let {title_num,pageType,name,description,Loadtype, let {title_num,pageType,name,description,Loadtype,attachments,
Modalstype,Modalstopval,ModalCancel,ModalSave,shixunsreplace} =this.state; Modalstype,Modalstopval,ModalCancel,ModalSave,shixunsreplace} =this.state;
let {coursedata}=this.props; let {coursedata}=this.props;
@ -279,7 +281,7 @@ class GraduationTasksedit extends Component{
width: 600, width: 600,
// https://github.com/ant-design/ant-design/issues/15505 // https://github.com/ant-design/ant-design/issues/15505
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
// showUploadList: false, showUploadList: false,
action: `${getUrl()}/api/attachments.json`, action: `${getUrl()}/api/attachments.json`,
onChange: this.handleChange, onChange: this.handleChange,
onRemove: this.onAttachmentRemove, onRemove: this.onAttachmentRemove,
@ -418,8 +420,65 @@ class GraduationTasksedit extends Component{
</Button> </Button>
(单个文件150M以内) (单个文件150M以内)
</Upload> </Upload>
{attachments&&attachments.map((item,key)=>{
return(
<div className="color-grey mt5"
key={key}
>
<a className="color-grey ml3">
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>
</a>
<a
href={item.url}
className="mr12 color9B9B" length="58">
{item.title}
</a>
<span className="color656565 mt2 color-grey-6 font-12 mr8">
{item.filesize}
</span>
{item.delete===true?
<i className="font-14 iconfont icon-guanbi "
id={item.id}
onClick={()=>this.onAttachmentRemove(item.id)}
aria-hidden="true">
</i>:""}
</div>
)
})}
<style>
{
`
.maxwidth500{
max-width:500px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #05101a;
}
`
}
</style>
{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{
return(
<p className="color-grey mt10" key={key} >
<a className="color-grey fl">
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>
</a>
<span className="mr12 color9B9B maxwidth500 fl" length="58">
{item.name}
</span>
<span className="color656565 mt2 color-grey-6 font-12 mr8">
{item.response===undefined?"":bytesToSize(item.size)}
</span>
<i className="font-14 iconfont icon-guanbi "
id={item.response===undefined?"":item.response.id}
aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}></i>
</p>
)
})}
{/*{attachments&&attachments.map((item,key)=>{*/} {/*{attachments&&attachments.map((item,key)=>{*/}
{/*return(*/} {/*return(*/}

@ -2,7 +2,7 @@ import React, {Component} from "React";
import {Form, Select, Input, Button, Checkbox, Upload, Icon, message, Modal} from "antd"; import {Form, Select, Input, Button, Checkbox, Upload, Icon, message, Modal} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import {WordsBtn, getUrl} from 'educoder'; import {WordsBtn, getUrl,bytesToSize} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import '../../css/Courses.css'; import '../../css/Courses.css';
@ -133,29 +133,29 @@ class GraduationTasksnew extends Component {
this.setState({fileList}); this.setState({fileList});
} }
onAttachmentRemove = (file) => { // onAttachmentRemove = (file) => {
// confirm({ // // confirm({
// title: '确定要删除这个附件吗?', // // title: '确定要删除这个附件吗?',
// okText: '确定', // // okText: '确定',
// cancelText: '取消', // // cancelText: '取消',
// // content: 'Some descriptions', // // // content: 'Some descriptions',
// onOk: () => { // // onOk: () => {
// this.deleteAttachment(file) // // this.deleteAttachment(file)
// }, // // },
// onCancel() { // // onCancel() {
// console.log('Cancel'); // // console.log('Cancel');
// }, // // },
// }); // // });
// return false; // // return false;
//
this.setState({ // this.setState({
Modalstype: true, // Modalstype: true,
Modalstopval: '确定要删除这个附件吗?', // Modalstopval: '确定要删除这个附件吗?',
ModalSave: () => this.deleteAttachment(file), // ModalSave: () => this.deleteAttachment(file),
ModalCancel: this.cancelAttachment // ModalCancel: this.cancelAttachment
}) // })
return false; // return false;
} // }
cancelAttachment = () => { cancelAttachment = () => {
this.setState({ this.setState({
@ -166,8 +166,9 @@ class GraduationTasksnew extends Component {
}) })
} }
deleteAttachment = (file) => { onAttachmentRemove = (file) => {
const url = `/attachments/${file.response ? file.response.id : file.uid}.json` // const url = `/attachments/${file.response ? file.response.id : file.uid}.json`
const url = `/attachments/${file}.json`
axios.delete(url, {}) axios.delete(url, {})
.then((response) => { .then((response) => {
if (response.data) { if (response.data) {
@ -256,7 +257,7 @@ class GraduationTasksnew extends Component {
multiple: true, multiple: true,
// https://github.com/ant-design/ant-design/issues/15505 // https://github.com/ant-design/ant-design/issues/15505
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
// showUploadList: false, showUploadList: false,
action: `${getUrl()}/api/attachments.json`, action: `${getUrl()}/api/attachments.json`,
onChange: this.handleChange, onChange: this.handleChange,
onRemove: this.onAttachmentRemove, onRemove: this.onAttachmentRemove,
@ -385,7 +386,7 @@ class GraduationTasksnew extends Component {
</div> </div>
<div className="stud-class-set pt20 pl20 pr20 coursenavbox edu-back-white"> <div className="stud-class-set pd20 coursenavbox edu-back-white">
<style>{` <style>{`
.uploadBtn.ant-btn { .uploadBtn.ant-btn {
border: none; border: none;
@ -428,6 +429,39 @@ class GraduationTasksnew extends Component {
</Button> </Button>
(单个文件150M以内) (单个文件150M以内)
</Upload> </Upload>
<style>
{
`
.maxwidth500{
max-width:500px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #05101a;
}
`
}
</style>
{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{
return(
<p className="color-grey mt10" key={key} >
<a className="color-grey fl">
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>
</a>
<span className="mr12 color9B9B maxwidth500 fl" length="58">
{item.name}
</span>
<span className="color656565 mt2 color-grey-6 font-12 mr8">
{item.response===undefined?"":bytesToSize(item.size)}
</span>
<i className="font-14 iconfont icon-guanbi "
id={item.response===undefined?"":item.response.id}
aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}></i>
</p>
)
})}
</div> </div>

@ -316,6 +316,30 @@ class GraduationTaskssettingapp extends Component{
}) })
} }
updatesfuncrosscomment=(types,checked,newlatetime,newcommenttime)=>{
let {endtimetype}=this.state;
if(types===1){
this.setState({
latetime:newlatetime,
crosscomment:checked,
commenttime:newcommenttime
})
}else{
if(endtimetype===true){
this.setState({
crosscomment:checked,
commenttime:newcommenttime
})
}else{
this.setState({
end_time:newlatetime,
crosscomment:checked,
commenttime:newcommenttime
})
}
}
}
funcrosscomment=(e)=>{ funcrosscomment=(e)=>{
let {latetime,end_time,allowlate}=this.state; let {latetime,end_time,allowlate}=this.state;
@ -325,41 +349,23 @@ class GraduationTaskssettingapp extends Component{
if(latetime===null||latetime===""){ if(latetime===null||latetime===""){
let newlatetime=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm"); let newlatetime=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttime=moment(new Date()).format("YYYY-MM-DD HH:mm"); let newcommenttime=moment(new Date()).format("YYYY-MM-DD HH:mm");
this.setState({ this.updatesfuncrosscomment=(1,e.target.checked,newlatetime,newcommenttime)
latetime:newlatetime,
crosscomment:e.target.checked,
commenttime:newcommenttime
})
}else{ }else{
let newlatetime=moment(latetime).add(7, 'days').format("YYYY-MM-DD HH:mm"); let newlatetime=moment(latetime).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttime=moment(latetime).format("YYYY-MM-DD HH:mm"); let newcommenttime=moment(latetime).format("YYYY-MM-DD HH:mm");
this.setState({ this.updatesfuncrosscomment=(1,e.target.checked,newlatetime,newcommenttime)
latetime:newlatetime,
crosscomment:e.target.checked,
commenttime:newcommenttime
})
} }
}else{ }else{
if(end_time===null||end_time===""){ if(end_time===null||end_time===""){
let newend_time=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm"); let newend_time=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttime=moment(new Date()).add(8, 'days').format("YYYY-MM-DD HH:mm"); let newcommenttime=moment(new Date()).add(8, 'days').format("YYYY-MM-DD HH:mm");
this.setState({ this.updatesfuncrosscomment=(2,e.target.checked,newend_time,newcommenttime)
end_time:newend_time,
crosscomment:e.target.checked,
commenttime:newcommenttime
})
}else{ }else{
let newend_time=moment(end_time).add(7, 'days').format("YYYY-MM-DD HH:mm"); let newend_time=moment(end_time).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttime=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm"); let newcommenttime=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm");
this.setState({ this.updatesfuncrosscomment=(2,e.target.checked,newend_time,newcommenttime)
end_time:newend_time,
crosscomment:e.target.checked,
commenttime:newcommenttime
})
} }
} }

@ -103,7 +103,7 @@ class GraduateTopicDetail extends Component{
return( return(
<div className="newMain"> <div className="newMain">
<div className="educontent mt10 mb50"> <div className="educontent mt10 mb50">
<p className="clearfix mb10"> <p className="clearfix mb15 lineh-20">
<WordsBtn style="grey" className="fl" to={`/courses/${tableData.course_id}`}>{tableData && tableData.course_name}</WordsBtn> <WordsBtn style="grey" className="fl" to={`/courses/${tableData.course_id}`}>{tableData && tableData.course_name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl" to={`/courses/${tableData.course_id}/graduation_topics/${tableData.graduation_id}`}>{tableData.graduation_name}</WordsBtn> <WordsBtn style="grey" className="fl" to={`/courses/${tableData.course_id}/graduation_topics/${tableData.graduation_id}`}>{tableData.graduation_name}</WordsBtn>
@ -111,9 +111,9 @@ class GraduateTopicDetail extends Component{
<span>选题详情</span> <span>选题详情</span>
</p> </p>
<p className="clearfix mb20 lineh-25"> <p className="clearfix mb20 lineh-25">
<span className="color-grey-3 font-24 fl task-hide" style={{lineHeight:"30px",maxWidth:"900px"}}>{tableData && tableData.graduation_topic_name}</span> <span className="color-grey-3 font-24 fl task-hide" style={{lineHeight:"25px",maxWidth:"900px"}}>{tableData && tableData.graduation_topic_name}</span>
<span className="fl mt4" style={{height:"25px"}}><CoursesListType typelist={[`${tableData && tableData.status_name}`]} typesylename={""} /></span> <span className="fl mt1" style={{height:"25px"}}><CoursesListType typelist={[`${tableData && tableData.status_name}`]} typesylename={""} /></span>
<WordsBtn className="fr font-16 mt2" style="grey" onClick={()=>this.props.history.goBack()}>返回</WordsBtn> <WordsBtn className="fr font-16 mt1" style="grey" onClick={()=>this.props.history.goBack()}>返回</WordsBtn>
</p> </p>
<div> <div>
<div className="clearfix edu-back-white bor-bottom-greyE" > <div className="clearfix edu-back-white bor-bottom-greyE" >

@ -169,6 +169,7 @@ class GraduateTopicDetailTable extends Component{
} = this.state } = this.state
const isAdmin =this.props.isAdmin(); const isAdmin =this.props.isAdmin();
const isStudent =this.props.isStudent(); const isStudent =this.props.isStudent();
const isNotMember=this.props.isNotMember();
console.log(un_addClass_notice) console.log(un_addClass_notice)
return( return(
<div className="minH-560 edu-back-white"> <div className="minH-560 edu-back-white">
@ -176,7 +177,7 @@ class GraduateTopicDetailTable extends Component{
<div className="topHead edu-txt-center"> <div className="topHead edu-txt-center">
<span style={{"width":"5%"}}>序号</span> <span style={{"width":"5%"}}>序号</span>
<span style={{"width":"12%"}}>姓名</span> <span style={{"width":"12%"}}>姓名</span>
<span style={{"width":"13%"}}>学号</span> {isNotMember ?"" :<span style={{"width":"13%"}}>学号</span>}
<span style={{"width":"15%"}}>分班</span> <span style={{"width":"15%"}}>分班</span>
<span style={{"width":"15%"}}>选题时间</span> <span style={{"width":"15%"}}>选题时间</span>
<span style={{"width":"12%"}} className="fr">操作</span> <span style={{"width":"12%"}} className="fr">操作</span>
@ -260,7 +261,7 @@ class GraduateTopicDetailTable extends Component{
<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+1)+(parseInt(page-1)*15)}</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> {isNotMember ?"" :<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>
<span style={{"width":"15%"}}>{item.selected_time}</span> <span style={{"width":"15%"}}>{item.selected_time}</span>
{ {
@ -288,6 +289,9 @@ class GraduateTopicDetailTable extends Component{
isAdmin && isAdmin &&
<span style={{"width":"12%"}} className={item.result === "已拒绝"?"fr color-orange-tip":"fr"}>{item.result=== "待确认"?"--":item.result}</span> <span style={{"width":"12%"}} className={item.result === "已拒绝"?"fr color-orange-tip":"fr"}>{item.result=== "待确认"?"--":item.result}</span>
} }
{
isNotMember && <span style={{"width":"12%"}} className="fr color-grey-9">--</span>
}
</li> </li>
) )

@ -70,9 +70,9 @@ class GraduateTopicItem extends Component{
`}</style> `}</style>
<h6> <h6>
{ {
isNotMember?discussMessage.private_icon===true? isNotMember && discussMessage.private_icon===true ?
<a className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:<a onClick={() => this.toDetailPage(`${discussMessage.id}`)} <a className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:"" <a onClick={() => this.toDetailPage(`${discussMessage.id}`)} className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>
} }
{ {
@ -86,7 +86,7 @@ class GraduateTopicItem extends Component{
{ {
discussMessage.private_icon===true? discussMessage.private_icon===true?
<Tooltip title={ this.props.isNotMember?"私有属性,非课堂成员不能访问":"私有属性"} placement="bottom"> <Tooltip title={ this.props.isNotMember()===true?"私有属性,非课堂成员不能访问":"私有属性"} placement="bottom">
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i> <i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i>
</Tooltip> </Tooltip>
:"" :""

@ -192,7 +192,12 @@ class PollDetailTabFirst extends Component{
key: 'classes', key: 'classes',
dataIndex: 'classes', dataIndex: 'classes',
width:160, width:160,
className:poll_types && poll_types.groups_count > 0 ? "edu-txt-center":"edu-txt-center none" className:poll_types && poll_types.groups_count > 0 ? "edu-txt-center":"edu-txt-center none",
render:(classes,item,index)=>{
return(
item.classes ? <span>{item.classes}</span> : <span className="color-grey-9">--</span>
)
}
}, { }, {
title: '提交状态', title: '提交状态',
dataIndex: 'status', dataIndex: 'status',
@ -212,22 +217,42 @@ class PollDetailTabFirst extends Component{
width:160, width:160,
render:(time,item,index)=>{ render:(time,item,index)=>{
return( return(
item.time == null ? "--" : moment(item.time).format('YYYY-MM-DD HH:mm') item.time == null ? <span className="color-grey-9">--</span> : moment(item.time).format('YYYY-MM-DD HH:mm')
) )
} }
},{ },{
title: '操作', title: '操作',
dataIndex: 'operation', dataIndex: 'operation',
key: 'operation', key: 'operation',
className:poll_types && poll_types.un_anonymous ? "edu-txt-center":"edu-txt-center none", className:"edu-txt-center",
width:120, width:120,
render:(operation,item,index)=>{ render:(operation,item,index)=>{
return( return(
item.status == 1 ? <WordsBtn style="blue" to={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/users/${item.login}`}>查看</WordsBtn>:<span>--</span> item.status == 1 ? <WordsBtn style="blue" to={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/users/${item.login}`}>查看</WordsBtn>:<span className="color-grey-9">--</span>
) )
} }
}]; }];
// 非课堂成员不显示学号列
let isNotMember =this.props.isNotMember();
if(isNotMember){
columns.some((item,key)=> {
if (item.title === "学号") {
columns.splice(key, 1)
return true
}
}
)
}
// un_anonymous true为实名问卷显示操作列否则隐藏 // un_anonymous true为实名问卷显示操作列否则隐藏
if(poll_types && (isNotMember || poll_types.un_anonymous == false)){
columns.some((item,key)=> {
if (item.title === "操作") {
columns.splice(key, 1)
return true
}
}
)
}
return( return(
<div> <div>
{ {

@ -796,6 +796,11 @@ class Listofworks extends Component {
if(item.title==="效率分"){ if(item.title==="效率分"){
columns.splice(key,1) columns.splice(key,1)
} }
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
}
}
}) })
}else{ }else{
if(course_group_info.length < 2){ if(course_group_info.length < 2){
@ -810,6 +815,11 @@ class Listofworks extends Component {
if(item.title==="效率分"){ if(item.title==="效率分"){
columns.splice(key,1) columns.splice(key,1)
} }
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
}
}
}) })
}else { }else {
@ -820,6 +830,11 @@ class Listofworks extends Component {
if(item.title==="效率分"){ if(item.title==="效率分"){
columns.splice(key,1) columns.splice(key,1)
} }
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
}
}
}) })
} }
} }
@ -830,6 +845,11 @@ class Listofworks extends Component {
if(item.title==="分班"){ if(item.title==="分班"){
columns.splice(key,1) columns.splice(key,1)
} }
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
}
}
}) })
}else { }else {
if(course_group_info.length < 2) { if(course_group_info.length < 2) {
@ -838,6 +858,11 @@ class Listofworks extends Component {
if(item.title==="分班"){ if(item.title==="分班"){
columns.splice(key,1) columns.splice(key,1)
} }
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
}
}
}) })
} }
columns=this.state.columnss; columns=this.state.columnss;
@ -1192,8 +1217,9 @@ class Listofworks extends Component {
course_groupyslstwo: [], course_groupyslstwo: [],
unlimited: 0, unlimited: 0,
loadingstate: true, loadingstate: true,
page:1,
}) })
this.Startsorting(this.state.order, [], this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit); this.Startsorting(this.state.order, [], this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
} }
notlimitedst = () => { notlimitedst = () => {
@ -1204,7 +1230,7 @@ class Listofworks extends Component {
course_groupysls: undefined, course_groupysls: undefined,
loadingstate: true, loadingstate: true,
}) })
this.Startsorting(this.state.order, this.state.course_groupyslstwo, [], this.state.searchtext, this.state.page, this.state.limit); this.Startsorting(this.state.order, this.state.course_groupyslstwo, [], this.state.searchtext, 1, this.state.limit);
} }
//立即截止确定按钮 //立即截止确定按钮
coursetaskend = () => { coursetaskend = () => {
@ -1417,22 +1443,25 @@ class Listofworks extends Component {
font-size: 14px; font-size: 14px;
} }
.drop_down_menu { .drop_down_menu {
width: 121px; width: 93px;
} }
.drop_down_menu li { .drop_down_menu li {
overflow: visible; overflow: visible;
width: 121px; width: 93px;
} }
.drop_down_menu, .drop_down_normal { .drop_down_menu, .drop_down_normal {
padding-top: 10px; padding-top: 10px;
padding-bottom: 8px; padding-bottom: 8px;
} }
a:hover {
color:#1A0B00 !important;
}
`}</style> `}</style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
导出<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":"-0px","left":"unset","height":"auto"}}>
<li><a href={`/api/student_works/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/export_shixun_work_report.pdf`} calssName="color-dark">实训报告</a></li> <li><a href={`/api/student_works/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/export_shixun_work_report.pdf`} >实训报告</a></li>
<li><a href={`/api/homework_commons/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/works_list.xlsx`} calssName="color-dark">学生成绩</a></li> <li><a href={`/api/homework_commons/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/works_list.xlsx`} >学生成绩</a></li>
</ul> </ul>
</li>:""} </li>:""}
{this.props.isAdmin() ? {this.props.isAdmin() ?
@ -1529,16 +1558,16 @@ class Listofworks extends Component {
<div className="clearfix"> <div className="clearfix">
<span className="fl color-grey-6 font-12"><span <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> className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.student_works.length}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count} </span>
<div className="fr color-grey-6 edu-menu-panel"> <div className="fr edu-menu-panel">
<ul> <ul>
<li className="edu-position edu-position-hidebox"> <li className="edu-position edu-position-hidebox">
<a className="font-12 color-grey-6"> <a className="font-12">
{order === "update_time" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a> {order === "update_time" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a>
<i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i> <i className="iconfont icon-xiajiantou ml5 font-12 "></i>
<ul className="edu-position-hide undis mt10"> <ul className="edu-position-hide undis mt10">
<li> <a onClick={(e) => this.funorder("update_time")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li> <li> <a onClick={(e) => this.funorder("update_time")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>更新时间</a></li>
<li> <a onClick={(e) => this.funorder("work_score")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>最终成绩</a></li> <li> <a onClick={(e) => this.funorder("work_score")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>最终成绩</a></li>
<li> <a onClick={(e) => this.funorder("student_id")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>学生学号</a></li> <li> <a onClick={(e) => this.funorder("student_id")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>学生学号</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -1581,7 +1610,6 @@ class Listofworks extends Component {
columns={columns} columns={columns}
pagination={false} pagination={false}
loading={loadingstate} loading={loadingstate}
onChange={this.TablePagination}
/>} />}
</div> </div>
</div> </div>

@ -40,6 +40,7 @@ class Listofworksstudentone extends Component {
props: props, props: props,
data: [], data: [],
datas: [], datas: [],
view_report:false,
page: 1, page: 1,
pages: 1, pages: 1,
limit: 20, limit: 20,
@ -60,7 +61,202 @@ class Listofworksstudentone extends Component {
"display": "none" "display": "none"
}, },
student_works: [], student_works: [],
startbtn: false startbtn: false,
columns: [
{
title: '序号',
dataIndex: 'number',
key: 'number',
align: "center",
className:'font-14',
render: (text, record) => (
<span>
{record.number === undefined ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}> --</span>
: record.number === "" ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</span>
: record.number === "--" ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</span>
:
<span style={{
"color": '#07111B',
"text-align": "center"
}}> {record.number}</span>
}
</span>
),
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
align: "center",
className:'font-14',
render: (text, record) => (
<span>
{record.name === undefined ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</span>
:
record.name === "" ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</span>
:
record.name === null ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</span>
:
record.name === "--" ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</span>
:
<span style={{
"color": '#07111B',
"text-align": "center"
}}>{record.name}</span>
}
</span>
),
},
{
title: '学号',
dataIndex: 'stduynumber',
key: 'stduynumber',
align: "center",
className:'font-14',
render: (text, record) => (
<span>
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}</span>
</span>
),
},
{
title: '分班',
key: 'classroom',
dataIndex: 'classroom',
align: "center",
className:'font-14',
width:'288px',
render: (text, record) => (
<span>
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.classroom === undefined ? "--" : record.classroom === "" ? "--" : record.classroom === null ? "--" : record.classroom}</span>
</span>
),
},
{
title: '提交状态',
dataIndex: 'submitstate',
key: 'submitstate',
align: "center",
className:'font-14',
render: (text, record) => (
<span>
<span style={record.submitstate === "延时提交" ? {
"color": '#DD1717',
"text-align": "center"
} : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
}}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</span>
</span>
),
},
{
title: '更新时间',
dataIndex: 'updatetime',
key: 'updatetime',
align: "center",
className:'font-14',
render: (text, record) => (
<span>
<span style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.updatetime === undefined ? "--" : record.updatetime === "" ? "--" : record.updatetime}</span>
</span>
),
},
{
title: '完成情况',
dataIndex: 'completion',
key: 'completion',
align: "center",
className:'font-14',
render: (text, record) => (
<span>
<span style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count}</span>
</span>
),
},
{
title: '最终成绩',
dataIndex: 'levelscore',
key: 'levelscore',
align: "center",
className:'font-14',
render: (text, record) => (
<span>
{
record.levelscore && record.levelscore === "--"?
<span style={{"color": '#9A9A9A', "text-align": "center"}}>{record.levelscore}</span>
:
<span style={parseInt(record.levelscore) >=90 ? {
"color": '#DD1717',
"text-align": "center"
} : parseInt(record.levelscore) <= 60?{
"color": '#FF6800',
"text-align": "center",
}: {"color": '#747A7F', "text-align": "center"}}>{record.levelscore}</span>
}
</span>
),
},
{
title: '操作',
dataIndex: 'operating',
key: 'operating',
align: "center",
className:'font-14',
render: (text, record) => (
<span>
{
record.submitstate === "未提交" ?<span style={{ color: '#9A9A9A'}}>--</span>
:
<span style={{"text-align": "center"}}
className="color-blue"
onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}</span>
}
</span>
),
},
],
} }
// //
} }
@ -110,11 +306,12 @@ class Listofworksstudentone extends Component {
work_efficiency: result.data.work_efficiency, work_efficiency: result.data.work_efficiency,
code_review: result.data.code_review, code_review: result.data.code_review,
challenges_count:result.data.challenges_count, challenges_count:result.data.challenges_count,
view_report:result.data.view_report,
}) })
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata(); this.seacthdata(result.data);
} else { } else {
this.seacthdatas(); this.seacthdatas(result.data,result.data.student_works);
} }
} }
@ -164,11 +361,12 @@ class Listofworksstudentone extends Component {
end_immediately: result.data.end_immediately, end_immediately: result.data.end_immediately,
code_review: result.data.code_review, code_review: result.data.code_review,
challenges_count:result.data.challenges_count, challenges_count:result.data.challenges_count,
view_report:result.data.view_report,
}) })
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata(); this.seacthdata(result.data);
} else { } else {
this.seacthdatas(); this.seacthdatas(result.data,result.data.student_works);
} }
} }
@ -187,20 +385,27 @@ class Listofworksstudentone extends Component {
} }
seacthdatas = () => { seacthdatas = (teacherdata,student_works) => {
let {page, limit} = this.state; let {page, limit} = this.state;
let datalist = []; let datalist = [];
let datalists = []; let datalists = [];
var styletable = {"display": "none"} var styletable = {"display": "none"}
// console.log("seacthdata设置数据3") this.state.columns.map((item,key)=>{
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columns.splice(key,1)
}
}
})
let columns2=this.state.columns;
var teacherlist = undefined; var teacherlist = undefined;
var teacherlists = undefined; var teacherlists = undefined;
if (this.state.teacherdata !== undefined) { if (teacherdata !== undefined) {
// console.log("seacthdata设置数据") // console.log("seacthdata设置数据")
// console.log(this.state.teacherdata.id ) // console.log(this.state.teacherdata.id )
if (this.state.teacherdata.id === undefined) { if (teacherdata.id === undefined) {
this.setState({ this.setState({
data: [], data: [],
teacherlist: undefined, teacherlist: undefined,
@ -209,36 +414,36 @@ class Listofworksstudentone extends Component {
}) })
} else { } else {
console.log(this.state.teacherdata) console.log(teacherdata)
if (this.state.teacherdata.id !== undefined || this.state.teacherdata.id !== null || this.state.teacherdata.id !== "") { if (teacherdata.id !== undefined || teacherdata.id !== null || teacherdata.id !== "") {
// console.log("seacthdata设置数据1") // console.log("seacthdata设置数据1")
// console.log(this.state.teacherdata ) // console.log(this.state.teacherdata )
var timedata = moment(this.state.teacherdata.update_time).format('YYYY-MM-DD HH:mm'); var timedata = moment(teacherdata.update_time).format('YYYY-MM-DD HH:mm');
datalist.push({ datalist.push({
myid: this.state.teacherdata.id, myid: teacherdata.id,
number: 1, number: 1,
name: this.state.teacherdata.user_name, name: teacherdata.user_name,
stduynumber: this.state.teacherdata.student_id, stduynumber: teacherdata.student_id,
classroom: this.state.teacherdata.group_name, classroom: teacherdata.group_name,
submitstate: this.state.teacherdata.work_status === 0 ? "未提交" : this.state.teacherdata.work_status === 1 ? "按时提交" : this.state.teacherdata.work_status === 2 ? "延时提交" : "未提交", submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时提交" : teacherdata.work_status === 2 ? "延时提交" : "未提交",
// updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:this.state.teacherdata.student_works[i].update_time,
// updatetime:"", // updatetime:"",
updatetime: timedata === "Invalid date" ? "--" : timedata, updatetime: timedata === "Invalid date" ? "--" : timedata,
completion: this.state.teacherdata.complete_count === null ? "0" :this.state.teacherdata.complete_count === undefined ? "0": this.state.teacherdata.complete_count, completion: teacherdata.complete_count === null ? "0" :teacherdata.complete_count === undefined ? "0": teacherdata.complete_count,
levelscore: this.state.teacherdata.final_score, levelscore: teacherdata.final_score,
efficiencyscore: this.state.teacherdata.eff_score, efficiencyscore: teacherdata.eff_score,
finalscore: this.state.teacherdata.work_score, finalscore: teacherdata.work_score,
operating: "查看", operating: "查看",
late_penalty: this.state.teacherdata.late_penalty=== null?"0":this.state.teacherdata.late_penalty === undefined?"0":this.state.teacherdata.late_penalty, late_penalty: teacherdata.late_penalty=== null?"0":teacherdata.late_penalty === undefined?"0":teacherdata.late_penalty,
ultimate_score:this.state.teacherdata.ultimate_score, ultimate_score:teacherdata.ultimate_score,
user_name: this.state.teacherdata.user_name, user_name: teacherdata.user_name,
user_login: this.state.teacherdata.user_login, user_login: teacherdata.user_login,
}) })
// } // }
var teacherlist = { //分页 var teacherlist = { //分页
total: this.state.teacherdata.student_works.length, //数据总数量 total: teacherdata.student_works.length, //数据总数量
pageSize: this.state.teacherdata.student_works.length, //一页显示几条 pageSize: teacherdata.student_works.length, //一页显示几条
current: this.state.page, current: this.state.page,
} }
styletable = {"display": "block",} styletable = {"display": "block",}
@ -252,30 +457,30 @@ class Listofworksstudentone extends Component {
} }
if (this.state.student_works !== undefined) { if (student_works !== undefined) {
for (var i = 0; i < this.state.student_works.length; i++) { for (var i = 0; i <student_works.length; i++) {
var timedata = moment(this.state.student_works[i].update_time).format('YYYY-MM-DD HH:mm'); var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm');
datalists.push({ datalists.push({
myid: this.state.student_works[i].id, myid: student_works[i].id,
number: (parseInt(page) - 1) * parseInt(limit) + (i + 1), number: (parseInt(page) - 1) * parseInt(limit) + (i + 1),
name: this.state.student_works[i].user_name, name: student_works[i].user_name,
stduynumber: this.state.student_works[i].student_id, stduynumber: student_works[i].student_id,
classroom: this.state.student_works[i].group_name, classroom: student_works[i].group_name,
submitstate: this.state.student_works[i].work_status === 0 ? "未提交" : this.state.student_works[i].work_status === 1 ? "按时提交" : this.state.student_works[i].work_status === 2 ? "延时提交" : "未提交", submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时提交" : student_works[i].work_status === 2 ? "延时提交" : "未提交",
// updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:this.state.teacherdata.student_works[i].update_time,
// updatetime:"", // updatetime:"",
updatetime: timedata === "Invalid date" ? "--" : timedata, updatetime: timedata === "Invalid date" ? "--" : timedata,
completion: this.state.teacherdata.student_works[i].complete_count === null ? "0" :this.state.teacherdata.student_works[i].complete_count === undefined ? "0": this.state.teacherdata.student_works[i].complete_count, completion: student_works[i].complete_count === null ? "0" :student_works[i].complete_count === undefined ? "0":student_works[i].complete_count,
levelscore: this.state.student_works[i].final_score, levelscore: student_works[i].final_score,
efficiencyscore: this.state.student_works[i].eff_score, efficiencyscore: student_works[i].eff_score,
finalscore: this.state.student_works[i].work_score, finalscore:student_works[i].work_score,
operating: "查看", operating: "查看",
late_penalty: this.state.teacherdata.student_works[i].late_penalty=== null?"0":this.state.teacherdata.student_works[i].late_penalty === undefined?"0":this.state.teacherdata.student_works[i].late_penalty, late_penalty: student_works[i].late_penalty=== null?"0":student_works[i].late_penalty === undefined?"0":student_works[i].late_penalty,
ultimate_score:this.state.teacherdata.student_works[i].ultimate_score, ultimate_score:student_works[i].ultimate_score,
user_name: this.state.teacherdata.student_works[i].user_name, user_name: student_works[i].user_name,
user_login: this.state.teacherdata.student_works[i].user_login, user_login: student_works[i].user_login,
}) })
} }
@ -297,15 +502,25 @@ class Listofworksstudentone extends Component {
teacherlists: teacherlists, teacherlists: teacherlists,
loadingstate: false, loadingstate: false,
styletable: styletable, styletable: styletable,
columns:columns2,
}) })
} }
// 设置数据 // 设置数据
seacthdata = () => { seacthdata = (teacherdata) => {
let datalist = []; let datalist = [];
if (this.state.teacherdata !== undefined) { this.state.columns.map((item,key)=>{
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columns.splice(key,1)
}
}
})
let columns2=this.state.columns;
if (teacherdata !== undefined) {
// console.log("seacthdata设置数据") // console.log("seacthdata设置数据")
// console.log(this.state.teacherdata.id ) // console.log(this.state.teacherdata.id )
if (this.state.teacherdata.id === undefined) { if (teacherdata.id === undefined) {
this.setState({ this.setState({
data: [], data: [],
teacherlist: undefined, teacherlist: undefined,
@ -314,35 +529,35 @@ class Listofworksstudentone extends Component {
return return
} }
// console.log(this.state.teacherdata ) // console.log(this.state.teacherdata )
if (this.state.teacherdata.id !== undefined || this.state.teacherdata.id !== null || this.state.teacherdata.id !== "") { if (teacherdata.id !== undefined || teacherdata.id !== null ||teacherdata.id !== "") {
// console.log("seacthdata设置数据1") // console.log("seacthdata设置数据1")
// console.log(this.state.teacherdata ) // console.log(this.state.teacherdata )
var timedata = moment(this.state.teacherdata.update_time).format('YYYY-MM-DD HH:mm'); var timedata = moment(teacherdata.update_time).format('YYYY-MM-DD HH:mm');
datalist.push({ datalist.push({
myid: this.state.teacherdata.id, myid: teacherdata.id,
number: 1, number: 1,
name: this.state.teacherdata.user_name, name: teacherdata.user_name,
stduynumber: this.state.teacherdata.student_id, stduynumber: teacherdata.student_id,
classroom: this.state.teacherdata.group_name, classroom: teacherdata.group_name,
submitstate: this.state.teacherdata.work_status === 0 ? "未提交" : this.state.teacherdata.work_status === 1 ? "按时提交" : this.state.teacherdata.work_status === 2 ? "延时提交" : "未提交", submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时提交" : teacherdata.work_status === 2 ? "延时提交" : "未提交",
// updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:this.state.teacherdata.student_works[i].update_time,
// updatetime:"", // updatetime:"",
updatetime: timedata === "Invalid date" ? "--" : timedata, updatetime: timedata === "Invalid date" ? "--" : timedata,
completion: this.state.teacherdata.complete_count === null ? "0" :this.state.teacherdata.complete_count === undefined ? "0": this.state.teacherdata.complete_count, completion: teacherdata.complete_count === null ? "0" :teacherdata.complete_count === undefined ? "0": teacherdata.complete_count,
levelscore: this.state.teacherdata.final_score, levelscore: teacherdata.final_score,
efficiencyscore: this.state.teacherdata.eff_score, efficiencyscore: teacherdata.eff_score,
finalscore: this.state.teacherdata.work_score, finalscore: teacherdata.work_score,
operating: "查看", operating: "查看",
late_penalty: this.state.teacherdata.late_penalty=== null?"0":this.state.teacherdata.late_penalty === undefined?"0":this.state.teacherdata.late_penalty, late_penalty: teacherdata.late_penalty=== null?"0":teacherdata.late_penalty === undefined?"0":teacherdata.late_penalty,
ultimate_score:this.state.teacherdata.ultimate_score, ultimate_score:teacherdata.ultimate_score,
user_name: this.state.teacherdata.user_name, user_name: teacherdata.user_name,
user_login: this.state.teacherdata.user_login, user_login: teacherdata.user_login,
}) })
// } // }
var teacherlist = { //分页 var teacherlist = { //分页
total: this.state.teacherdata.student_works.length, //数据总数量 total: teacherdata.student_works.length, //数据总数量
pageSize: this.state.teacherdata.student_works.length, //一页显示几条 pageSize: teacherdata.student_works.length, //一页显示几条
current: this.state.page, current: this.state.page,
} }
} else { } else {
@ -361,6 +576,7 @@ class Listofworksstudentone extends Component {
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,
loadingstate: false, loadingstate: false,
columns:columns2,
}) })
} }
// 查看学员实训信息 // 查看学员实训信息
@ -494,8 +710,9 @@ class Listofworksstudentone extends Component {
end_immediately: result.data.end_immediately, end_immediately: result.data.end_immediately,
code_review: result.data.code_review, code_review: result.data.code_review,
challenges_count:result.data.challenges_count, challenges_count:result.data.challenges_count,
view_report:result.data.view_report,
}) })
this.seacthdata(); this.seacthdata(result.data);
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -530,205 +747,8 @@ class Listofworksstudentone extends Component {
} }
render() { render() {
let {visibles, game_list, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state; let {visibles, game_list,columns, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state;
let columns = [
{
title: '序号',
dataIndex: 'number',
key: 'number',
align: "center",
width: '96px',
render: (text, record) => (
<span>
{record.number === undefined ?
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}> --</a>
: record.number === "" ?
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</a>
: record.number === "--" ?
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</a>
:
<a style={{
"color": '#07111B',
"text-align": "center"
}}> {record.number}</a>
}
</span>
),
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
align: "center",
width: '147px',
render: (text, record) => (
<span>
{record.name === undefined ?
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</a>
:
record.name === "" ?
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</a>
:
record.name === null ?
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</a>
:
record.name === "--" ?
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</a>
:
<a style={{
"color": '#07111B',
"text-align": "center"
}}>{record.name}</a>
}
</span>
),
},
{
title: '学号',
dataIndex: 'stduynumber',
key: 'stduynumber',
align: "center",
width: '200px',
render: (text, record) => (
<span>
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}</a>
</span>
),
},
{
title: '分班',
key: 'classroom',
dataIndex: 'classroom',
align: "center",
render: (text, record) => (
<span>
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.classroom === undefined ? "--" : record.classroom === "" ? "--" : record.classroom === null ? "--" : record.classroom}</a>
</span>
),
},
{
title: '提交状态',
dataIndex: 'submitstate',
key: 'submitstate',
align: "center",
render: (text, record) => (
<span>
<a style={record.submitstate === "延时提交" ? {
"color": '#DD1717',
"text-align": "center"
} : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
}}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</a>
</span>
),
},
{
title: '更新时间',
dataIndex: 'updatetime',
key: 'updatetime',
align: "center",
render: (text, record) => (
<span>
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.updatetime === undefined ? "--" : record.updatetime === "" ? "--" : record.updatetime}</a>
</span>
),
},
{
title: '完成情况',
dataIndex: 'completion',
key: 'completion',
align: "center",
render: (text, record) => (
<span>
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count}</a>
</span>
),
},
{
title: '最终成绩',
dataIndex: 'levelscore',
key: 'levelscore',
align: "center",
render: (text, record) => (
<span>
{
record.levelscore && record.levelscore === "--"?
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.levelscore}</a>
:
<a style={parseInt(record.levelscore) > 90 ? {
"color": '#DD1717',
"text-align": "center"
} : parseInt(record.levelscore) <= 90 ? {
"color": '#FF6800',
"text-align": "center",
"margin-left": "20px"
} : parseInt(record.levelscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
} : {"color": '#747A7F', "text-align": "center"}}>{record.levelscore}</a>
}
</span>
),
},
{
title: '操作',
dataIndex: 'operating',
key: 'operating',
align: "center",
width: '96px',
render: (text, record) => (
<span>
{
record.submitstate === "未提交" ?<span style={{ color: '#9A9A9A'}}>--</span>
:
<a style={{"text-align": "center"}}
className="color-blue"
onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}</a>
}
</span>
),
},
];
// console.log("teacherdatateacherdatateacherdata");
// console.log(teacherdata);
// console.log("teacherdata.work_count");
// console.log(teacherdata&&teacherdata.work_count);
return ( return (
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ? teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
// 学生不能查看别人的 // 学生不能查看别人的
@ -794,10 +814,10 @@ class Listofworksstudentone extends Component {
<Link <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`} to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link> >设置</Link>
<Link className="fr color-blue font-16" target={"_blank"} {this.state.view_report===true?<Link className="fr color-blue font-16" target={"_blank"}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/shixun_work_report`}> to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/shixun_work_report`}>
查看实训报告 查看实训报告
</Link> </Link>:""}
{/*<a className="fr color-blue font-16">查看实训报告</a>*/} {/*<a className="fr color-blue font-16">查看实训报告</a>*/}
{ {
teacherdata === undefined ? "" teacherdata === undefined ? ""
@ -925,10 +945,10 @@ class Listofworksstudentone extends Component {
<Link <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`} to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link> >设置</Link>
<Link className="fr color-blue font-16" target={"_blank"} {this.state.view_report===true?<Link className="fr color-blue font-16" target={"_blank"}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/shixun_work_report`}> to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/shixun_work_report`}>
查看实训报告 查看实训报告
</Link> </Link>:""}
{ {
teacherdata === undefined ? "" teacherdata === undefined ? ""
: teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" : : teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :
@ -981,12 +1001,12 @@ class Listofworksstudentone extends Component {
style={{"color": '#FF6800'}}>{teacherdata.left_time.time}</span>} style={{"color": '#FF6800'}}>{teacherdata.left_time.time}</span>}
</span> </span>
<div className="fr color-grey-6 edu-menu-panel"> <div className="fr edu-menu-panel">
<ul> <ul>
<li className="edu-position edu-position-hidebox"> <li className="edu-position edu-position-hidebox">
<a className="font-12 color-grey-6"> <a className="font-12 ">
{order === "updated_at" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a> {order === "updated_at" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a>
<i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i> <i className="iconfont icon-xiajiantou ml5 font-12 "></i>
<ul className="edu-position-hide undis mt10"> <ul className="edu-position-hide undis mt10">
<li><a onClick={(e) => this.funorder("updated_at")} data-remote="true" <li><a onClick={(e) => this.funorder("updated_at")} data-remote="true"
className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li> className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li>
@ -1016,7 +1036,6 @@ class Listofworksstudentone extends Component {
columns={columns} columns={columns}
pagination={false} pagination={false}
loading={loadingstate} loading={loadingstate}
onChange={this.TablePagination}
/>} />}
</div> </div>
{ {

@ -80,7 +80,7 @@ function startechart(data){
{ {
name:'', name:'',
type:'scatter', type:'scatter',
data:data.echart_data.efficiency_list, data:data.echart_data===undefined?"":data.echart_data.efficiency_list,
itemStyle:{ itemStyle:{
normal:{color:'#2e65ad'} normal:{color:'#2e65ad'}
}, },
@ -106,9 +106,9 @@ function startechart(data){
data : [ data : [
{ {
name: data.username, name: data.username,
xAxis:data.echart_data.myself_eff[0], xAxis:data.echart_data===undefined?"":data.echart_data.myself_eff[0],
yAxis:data.echart_data.myself_eff[1], yAxis:data.echart_data===undefined?"":data.echart_data.myself_eff[1],
value:data.echart_data.myself_eff[1], value:data.echart_data===undefined?"":data.echart_data.myself_eff[1],
} }
], ],
itemStyle: { itemStyle: {
@ -132,7 +132,7 @@ function startechart(data){
{ {
name:'二班', name:'二班',
type:'scatter', type:'scatter',
data: data.echart_data.myself_eff, data: data.echart_data===undefined?"":data.echart_data.myself_eff,
itemStyle:{ itemStyle:{
color:'#c23531' color:'#c23531'
}} }}
@ -141,7 +141,7 @@ function startechart(data){
var ablChart = echarts.init(document.getElementById('shixun_overall_ablility_chart')); var ablChart = echarts.init(document.getElementById('shixun_overall_ablility_chart'));
var dataBJ = data.echart_data.consume_list; var dataBJ = data.echart_data===undefined?"":data.echart_data.consume_list;
var itemStyle = { var itemStyle = {
@ -188,7 +188,7 @@ function startechart(data){
formatter: function (obj) { formatter: function (obj) {
var value = obj.value; var value = obj.value;
if(obj.name ==data.username){ if(obj.name ==data.username){
return "姓名:"+data.username + "<br/>"+'学号: '+data.user_id + "<br/>"+'得分:'+ data.echart_data.myself_object[1]; return "姓名:"+data.username + "<br/>"+'学号: '+data.user_id + "<br/>"+'得分:'+ data.echart_data===undefined?"":data.echart_data.myself_object[1];
} }
} }
@ -241,9 +241,9 @@ function startechart(data){
data : [ data : [
{ {
name: data.username, name: data.username,
xAxis: data.echart_data.myself_object[0], xAxis: data.echart_data===undefined?"":data.echart_data.myself_object[0],
yAxis:data.echart_data.myself_object[1], yAxis:data.echart_data===undefined?"":data.echart_data.myself_object[1],
value:data.echart_data.myself_object[1] value:data.echart_data===undefined?"":data.echart_data.myself_object[1]
} }
], ],
itemStyle: { itemStyle: {
@ -256,7 +256,7 @@ function startechart(data){
{ {
name: '能力1', name: '能力1',
type: 'scatter', type: 'scatter',
data: data.echart_data.myself_object, data: data.echart_data===undefined?"":data.echart_data.myself_object,
itemStyle:itemStyle1, itemStyle:itemStyle1,
symbolSize: function (val){ symbolSize: function (val){
return Math.round(val[2]); return Math.round(val[2]);
@ -367,8 +367,8 @@ class Shixunechart extends Component {
<div className="fl with65" style={{paddingLeft: "5%"}}> <div className="fl with65" style={{paddingLeft: "5%"}}>
<li className="mt5 mb5">{data&&data.username}</li> <li className="mt5 mb5">{data&&data.username}</li>
<li className="mt5 mb5">{data&&data.user_id}</li> <li className="mt5 mb5">{data&&data.user_id}</li>
<li className="mt5 mb5 color-orange03"><span className="color-orange03">{data&&data.echart_data.myself_eff[1]}</span></li> <li className="mt5 mb5 color-orange03"><span className="color-orange03">{data&&data.echart_data===undefined?"":data&&data.echart_data.myself_eff[1]}</span></li>
<li className="mt5 mb5 color-orange03"><span className="color-orange03">{data&&data.echart_data.myself_eff[0]}</span></li> <li className="mt5 mb5 color-orange03"><span className="color-orange03">{data&&data.echart_data===undefined?"":data&&data.echart_data.myself_eff[0]}</span></li>
</div> </div>
</div> </div>
<div className="pr mt20 with100"> <div className="pr mt20 with100">
@ -393,7 +393,7 @@ class Shixunechart extends Component {
<div className="fl with65" style={{paddingLeft: "5%"}}> <div className="fl with65" style={{paddingLeft: "5%"}}>
<li className="mt5 mb5">{data&&data.username}</li> <li className="mt5 mb5">{data&&data.username}</li>
<li className="mt5 mb5">{data&&data.user_id}</li> <li className="mt5 mb5">{data&&data.user_id}</li>
<li className="mt5 mb5 color-orange03"><span className="color-orange03">{data&&data.echart_data.myself_object[1]}</span></li> <li className="mt5 mb5 color-orange03"><span className="color-orange03">{data&&data.echart_data===undefined?"":data&&data.echart_data.myself_object[1]}</span></li>
</div> </div>
</div> </div>
<div className="popup_tip_box fontGrey2 with100 disc mt20" <div className="popup_tip_box fontGrey2 with100 disc mt20"

@ -198,13 +198,13 @@ class ShixunsHome extends Component {
</div> </div>
<Link to={"/paths"} className="moreitem">更多<i className="fa fa-angle-right ml5"></i></Link> <Link to={"/paths"} className="moreitem">更多<i className="fa fa-angle-right ml5"></i></Link>
<div className="square-list clearfix"> <div className="square-list clearfix" style={{width:'102%'}}>
{homedatalist===undefined?"":homedatalist.subjects.map((item,key)=>{ {homedatalist===undefined?"":homedatalist.subjects.map((item,key)=>{
if(key<8) if(key<8)
return( return(
<div className="square-Item" key={key} id={item.id}> <div className="square-Item" key={key} id={item.id} style={{width:'286px'}}>
<div className="tag-green"> <div className="tag-green">
<span className="tag-name"> {item.name}</span> <span className="tag-name"> {item.name}</span>
@ -272,10 +272,10 @@ class ShixunsHome extends Component {
</div> </div>
<Link to={"/shixuns"} className="moreitem">更多<i className="fa fa-angle-right ml5"></i></Link> <Link to={"/shixuns"} className="moreitem">更多<i className="fa fa-angle-right ml5"></i></Link>
<div className="square-list clearfix"> <div className="square-list clearfix" style={{width:'102%'}}>
{homedatalist===undefined?"":homedatalist.shixuns.map((item,key)=>{ {homedatalist===undefined?"":homedatalist.shixuns.map((item,key)=>{
return( return(
<div className="square-Item" key={key} id={item.id}> <div className="square-Item" key={key} id={item.id} style={{width:'286px'}}>
<div className="tag-green"> <div className="tag-green">
<span className="tag-name"> {item.tag_name}</span> <span className="tag-name"> {item.tag_name}</span>

@ -16,7 +16,7 @@ class NewFooter extends Component {
render() { render() {
return ( return (
<div className="newFooter edu-txt-center"> <div className="newFooter edu-txt-center newContainers">
<div className="inner-footer_con"> <div className="inner-footer_con">
<div className="footercon"> <div className="footercon">
<div className="inline mt40 mb5"> <div className="inline mt40 mb5">

@ -671,7 +671,7 @@ submittojoinclass=(value)=>{
</div> </div>
</li> </li>
<li className=""><a href={"/libraries"}>教学案例</a></li>
<li className=""><a href={this.props.Headertop===undefined?"":this.props.Headertop.competitions_url}>竞赛</a></li> <li className=""><a href={this.props.Headertop===undefined?"":this.props.Headertop.competitions_url}>竞赛</a></li>
<li className={`${activeForums === true ? 'active' : ''}`}><a href={this.props.Headertop===undefined?"":this.props.Headertop.topic_url}>问答</a></li> <li className={`${activeForums === true ? 'active' : ''}`}><a href={this.props.Headertop===undefined?"":this.props.Headertop.topic_url}>问答</a></li>

@ -23,7 +23,7 @@ $(window).scroll(function(){
}); });
function rightSlider(){ function rightSlider(){
var poi=parseInt((parseInt($(window).width())- 1200 )/2)-60; var poi=parseInt((parseInt($(window).width())- 1200 )/2)-34;
// console.log(parseInt($(window).width())+" "+poi); // console.log(parseInt($(window).width())+" "+poi);
if(poi>0){ if(poi>0){
$(".-task-sidebar").css("right",poi); $(".-task-sidebar").css("right",poi);

@ -294,23 +294,34 @@ export function TPMIndexHOC(WrappedComponent) {
return ( return (
<div> <div>
<SiderBar Headertop={Headertop}/>
<SiderBar <style>{
Headertop={Headertop} `
/> .newContainers{
<NewHeader {...this.state} {...this.props}></NewHeader> width: 100%;
<div className="newContainer"> min-width: 1440px;
<WrappedComponent initCommonState={(user)=>this.initCommonState(user)} max-width: unset;
{...this.props} {...this.state} }
showShixun={this.showShixun} aboutFocus={this.aboutFocus} // .-task-sidebar{
{...common} // right: 270px !important;
> // }
</WrappedComponent> `
}</style>
</div> <NewHeader {...this.state} {...this.props}></NewHeader>
<NewFooter <div className="newContainer newContainers">
Footerdown={Footerdown} <WrappedComponent initCommonState={(user)=>this.initCommonState(user)}
/> {...this.props} {...this.state}
showShixun={this.showShixun} aboutFocus={this.aboutFocus}
{...common}
>
</WrappedComponent>
</div>
<NewFooter
Footerdown={Footerdown}
/>
</div> </div>
); );
} }

Loading…
Cancel
Save