hjm 6 years ago
commit 982b04234d

@ -1907,7 +1907,7 @@ class Studentshavecompletedthelist extends Component {
})
}
} else {
console.log("2699包含主观题包含分班");
// console.log("2699包含主观题包含分班");
if (response.data.exercise_types.groups_count > 0) {
this.setState({
data: datalist,

@ -113,19 +113,21 @@ class Testpapersettinghomepage extends Component{
experiment=(url)=>{
axios.get(url).then((response) => {
console.log(response);
debugger
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:false,
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:false,
DownloadType:true,
DownloadMessageval:500
})
}

@ -1,5 +1,5 @@
import React, {Component} from "React";
import {Form, Select, Input, Button, Checkbox, DatePicker,Spin} from "antd";
import {Form, Select, Input, Button, Checkbox, DatePicker,Spin,Icon} from "antd";
import axios from 'axios';
import "../css/Courses.css";
import locale from 'antd/lib/date-picker/locale/zh_CN';
@ -412,7 +412,7 @@ class CoursesNew extends Component {
})(
<Select
showSearch
className={"fl construction mr10 "}
className={"fl construction "}
placeholder="例如:数据结构"
// value={this.state.course}
onSearch={this.handleSearch}
@ -426,13 +426,13 @@ class CoursesNew extends Component {
)}
<span className={"newcoursestitle fl"}>
{/*错误示例数据结构2017本部数据结构2017秋季数据结构2017电子商务1班*/}
<p className="ant-progress-text ml10">
<i aria-label="图标: check-circle" className="ant-progress-textyes anticon anticon-check-circle"></i>
<span className={"color-grey-9 font-12"}>正确示例数据结构</span>
<p className="ant-progress-text">
<Icon style={{ color: '#52c41a' }} type="check-circle" theme="filled"/>
<span className={"color-grey-9 font-12 ml5"}>正确示例数据结构</span>
</p>
<p className="ant-progress-text ml10">
<i aria-label="图标: close-circle" className="ant-progress-textno anticon anticon-close-circle"></i>
<span className={"color-grey-9 font-12"}>错误示例数据结构2019春</span>
<p className="ant-progress-text">
<Icon style={{ color: 'red' }} theme="filled" type="close-circle"/>
<span className={"color-grey-9 font-12 ml5"}>错误示例数据结构2019春</span>
</p>
</span>
<div id='iscourse'></div>
@ -458,14 +458,13 @@ class CoursesNew extends Component {
})(<Input className={"greyInput fl"} placeholder="例如数据结构2016秋季班级"/>)}
<span className={"newcoursestitle fl"}>
{/*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*/}
<p className="ant-progress-text ml19">
<i aria-label="图标: check-circle" className="ant-progress-textyes anticon anticon-check-circle"></i>
<span className={"color-grey-9 font-12"}>正确示例数据结构2019春季班级</span>
<p className="ant-progress-text">
<Icon style={{ color: '#52c41a' }} type="check-circle" theme="filled"/>
<span className={"color-grey-9 font-12 ml5"}>正确示例数据结构2019春季班级</span>
</p>
<p className="ant-progress-text ml19">
<i aria-label="图标: close-circle" className="ant-progress-textno anticon anticon-close-circle"></i>
<span className={"color-grey-9 font-12"}>错误示例2019春季班级数据结构</span>
<p className="ant-progress-text">
<Icon style={{ color: 'red' }} theme="filled" type="close-circle"/>
<span className={"color-grey-9 font-12 ml5"}>错误示例2019春季班级数据结构</span>
</p>
</span>
<div id='isclassroom'></div>

@ -1353,13 +1353,13 @@ class Listofworks extends Component {
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:false,
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:false,
DownloadType:true,
DownloadMessageval:500
})
}

@ -1138,7 +1138,7 @@ 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[0]==="开启挑战"?"":<span>
{teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:<div className={"computeTimes font-13"} onClick={this.setComputeTime}>

@ -468,13 +468,13 @@ class ShixunStudentWork extends Component {
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:false,
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:false,
DownloadType:true,
DownloadMessageval:500
})
}

@ -95,7 +95,7 @@ class ShixunWorkDetails extends Component {
</div>
<div className="padding10-30 edu-back-white clearfix" style={{
padding: '10px 2px'
padding: '10px 13px'
}}>
<span className="fl color-orange font-14">非编程类型任务不参与查重</span>
<span className="fr mt4">

@ -41,13 +41,13 @@ class ShixunWorkReport extends Component {
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:false,
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:false,
DownloadType:true,
DownloadMessageval:500
})
}

@ -50,14 +50,20 @@ class ShixunCustomsPass extends Component {
.backgroud4CACFF{
background: #4CACFF;
}
.fontpass{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 346px;
}
`}
</style>
<span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF">
<i className="fa fa-code font-16 color_white"></i>
</span>
<span className="fl mt3 font-14">
<span className="fl mt3 font-14 fontpass">
<span className="font-bd mr15">{record.customs.position}</span>
<span className={"font-14"}>{record.customs.subject}</span>
<span className={"font-14"} title={record.customs.subject}>{record.customs.subject}</span>
</span>
</span>
),

@ -217,7 +217,7 @@ class TraineetraininginformationModal extends Component {
<span className="ml10 " style={{"text-align": "left","color":'#29BD8B'}} >经验值<span style={{"color":'#29BD8B'}}> {this.props.experience=== undefined?"0" :this.props.experience}/</span><span style={{"color":'#29BD8B'}}>{this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_score}</span></span>
</div>
{/*<Button type="primary" className="ml30" >实训报告</Button>*/}
<Button type="primary" className="lh38 fr" style={{"text-align": "center","width": "100px",color: "#fff"}} href={`/courses/${this.props.coursesId}/shixun_homeworks/${this.props.viewtrainingdata.work_id}/shixun_work_report`}>
<Button type="primary" target="_blank" className="lh38 fr" style={{"text-align": "center","width": "100px",color: "#fff"}} href={`/courses/${this.props.coursesId}/shixun_homeworks/${this.props.viewtrainingdata.work_id}/shixun_work_report`}>
实训报告
</Button>
{/*这里到时候要做判断*/}

@ -693,11 +693,11 @@ class Trainingjobsetting extends Component {
this.state.proportion=e.target.value
if (e.target.value === "均分比例") {
this.Equalproportion();
this.Equalproportion(this.state.latedeductiontwo);
}
if (e.target.value === "经验值比例") {
this.Empiricalvalueratio();
this.Empiricalvalueratio(this.state.latedeductiontwo);
}
if (e.target.value === "自定义分值") {
@ -717,11 +717,11 @@ class Trainingjobsetting extends Component {
}
onChangeslevelproportiontwo=(value)=>{
if (value === "均分比例") {
this.Equalproportion();
this.Equalproportion(this.state.latedeductiontwo);
}
if (value === "经验值比例") {
this.Empiricalvalueratio();
this.Empiricalvalueratio(this.state.latedeductiontwo);
}
if (value=== "自定义分值") {
@ -739,9 +739,9 @@ class Trainingjobsetting extends Component {
})
}
//均分比例
Equalproportion = () => {
Equalproportion = (latedeductiontwo) => {
var challenge_settingsdata=this.state.challenge_settings;
var latedeductiontwos=this.state.latedeductiontwo;
var latedeductiontwos=latedeductiontwo;
if(latedeductiontwos === undefined || latedeductiontwos===null || latedeductiontwos===""){
latedeductiontwos=0;
}
@ -774,15 +774,22 @@ class Trainingjobsetting extends Component {
var intkks=0;
if(srbool==true){
// 奇数
var exams = Math.round(Proportion)
var exams = parseFloat(Proportion.toFixed(1));
var intk = srorelength*exams;
intkk=oushution - intk;
console.log("奇数");
console.log(srorelength);//3
console.log(oushution);//79
console.log(exams);//26.3
console.log(intk);//78.9
console.log(intkk);
}else {
// 偶数
var examsy = Math.round(Proportion)
var examsy =parseFloat(Proportion.toFixed(1));
intkks=oushution - (examsy*srorelength);
console.log("偶数");
console.log(oushution);
console.log((examsy*srorelength));
}
var mact=0;
@ -790,20 +797,23 @@ class Trainingjobsetting extends Component {
for (var i=0;i<challenge_settingsdata.length;i++){
if(challenge_settingsdata[i].checked === true) {
if(srbool===false){
console.log(intkks);
mact=mact+1;
if(mact===srorelength){
challenge_settingsdata[i].challenge_score = Math.round(Proportion)+intkks;
challenge_settingsdata[i].challenge_score = (parseFloat(Proportion.toFixed(1))+parseFloat(intkks.toFixed(1))).toFixed(1);
console.log( challenge_settingsdata[i].challenge_score);
}else {
challenge_settingsdata[i].challenge_score = Math.round(Proportion);
challenge_settingsdata[i].challenge_score = Proportion.toFixed(1);
}
}else{
console.log(intkk);
mact=mact+1;
if(mact===srorelength){
challenge_settingsdata[i].challenge_score = Math.round(Proportion)+intkk;
challenge_settingsdata[i].challenge_score = (parseFloat(Proportion.toFixed(1))+parseFloat( intkk.toFixed(1))).toFixed(1);
console.log( challenge_settingsdata[i].challenge_score);
}else {
challenge_settingsdata[i].challenge_score = Math.round(Proportion);
challenge_settingsdata[i].challenge_score = Proportion.toFixed(1);
}
}
@ -822,10 +832,10 @@ class Trainingjobsetting extends Component {
}
//经验值比例
Empiricalvalueratio=()=>{
Empiricalvalueratio=(latedeductiontwo)=>{
var shixun_exp = this.state.shixun_exp;
var challenge_settingsdata=this.state.challenge_settings;
var latedeductiontwos=this.state.latedeductiontwo;
var latedeductiontwos=latedeductiontwo;
if(latedeductiontwos === undefined || latedeductiontwos===null || latedeductiontwos===""){
latedeductiontwos=0;
}
@ -845,14 +855,53 @@ class Trainingjobsetting extends Component {
}
}
//开始循环赋值
var expzs=0;
var mact=0;
for (var i=0;i<challenge_settingsdata.length;i++){
if(challenge_settingsdata[i].checked===true) {
mact=mact+1;
var myint = (challenge_settingsdata[i].challenge_exp / Proportion) * ionsp;
challenge_settingsdata[i].challenge_score = myint.toFixed(2);
challenge_settingsdata[i].challenge_score = myint.toFixed(1);
expzs=parseFloat(myint.toFixed(1))+parseFloat(expzs);
}else{
challenge_settingsdata[i].challenge_score =0;
}
}
var expzsy=0;
var bool= true;
if(ionsp - expzs>0){
expzsy=parseFloat(ionsp.toFixed(1)) - parseFloat(expzs.toFixed(1));
expzsy=Math.abs(expzsy);
bool=true;
}else{
expzsy= parseFloat(ionsp.toFixed(1)) - parseFloat(expzs.toFixed(1));
expzsy= Math.abs(expzsy);
bool=false;
}
var macts=0;
for (var i=0;i<challenge_settingsdata.length;i++){
if(challenge_settingsdata[i].checked===true) {
macts= macts+1;
if(mact===macts){
if(bool===true){
challenge_settingsdata[i].challenge_score = (parseFloat(challenge_settingsdata[i].challenge_score)+parseFloat(expzsy.toFixed(1))).toFixed(1);
console.log(parseFloat(challenge_settingsdata[i].challenge_score)+parseFloat(expzsy.toFixed(1)));
console.log(parseFloat(expzsy.toFixed(1)));
}else {
challenge_settingsdata[i].challenge_score = (parseFloat(challenge_settingsdata[i].challenge_score)-parseFloat(expzsy.toFixed(1))).toFixed(1);
console.log(parseFloat(challenge_settingsdata[i].challenge_score)-parseFloat(expzsy.toFixed(1)));
console.log(parseFloat(expzsy.toFixed(1)));
}
}
}else{
challenge_settingsdata[i].challenge_score =0;
}
}
}
}
}
@ -873,10 +922,10 @@ class Trainingjobsetting extends Component {
})
//均分比例
if(this.state.proportion==="均分比例"){
this.Equalproportion();
this.Equalproportion(20);
}else if(this.state.proportion==="经验值比例"){
this.Empiricalvalueratio();
this.Empiricalvalueratio(20);
}
@ -889,10 +938,10 @@ class Trainingjobsetting extends Component {
})
//均分比例
if(this.state.proportion==="均分比例"){
this.Equalproportion();
this.Equalproportion(0);
}else if(this.state.proportion==="经验值比例"){
this.Empiricalvalueratio();
this.Empiricalvalueratio(0);
}
}
@ -961,10 +1010,10 @@ class Trainingjobsetting extends Component {
})
//均分比例
if(this.state.proportion==="均分比例"){
this.Equalproportion();
this.Equalproportion(value);
}else if(this.state.proportion==="经验值比例"){
this.Empiricalvalueratio();
this.Empiricalvalueratio(value);
}
@ -1627,13 +1676,13 @@ class Trainingjobsetting extends Component {
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:false,
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:false,
DownloadType:true,
DownloadMessageval:500
})
}

@ -322,13 +322,13 @@ class Workquestionandanswer extends Component {
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:false,
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:false,
DownloadType:true,
DownloadMessageval:500
})
}

Loading…
Cancel
Save