dev_forum
杨树明 5 years ago
parent 1b1aee1041
commit 45b6fa412c

@ -86,12 +86,16 @@ class ShixunWorkDetails extends Component {
</p> </p>
</div> </div>
<div className="padding10-30 clearfix"> <div className="padding10-30 clearfix" style={{
padding: '10px 2px'
}}>
<span className="fl font-18">{data&&data.homework_common_name}</span> <span className="fl font-18">{data&&data.homework_common_name}</span>
<a className="fr color-grey-9 mt4" onClick={this.goback}>返回</a> <a className="fr color-grey-9 mt4" onClick={this.goback}>返回</a>
</div> </div>
<div className="padding10-30 edu-back-white clearfix"> <div className="padding10-30 edu-back-white clearfix" style={{
padding: '10px 2px'
}}>
<span className="fl color-orange font-14">非编程类型任务不参与查重</span> <span className="fl color-orange font-14">非编程类型任务不参与查重</span>
<span className="fr mt4"> <span className="fr mt4">
<span className={"color656565"}>被查作品</span> <span className={"color656565"}>被查作品</span>

@ -1,259 +1,263 @@
import React, {Component} from "react"; import React, {Component} from "react";
import {WordsBtn} from 'educoder'; import {WordsBtn} from 'educoder';
import {Table} from "antd"; import {Table} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom'; import {Link,Switch,Route,Redirect} from 'react-router-dom';
import moment from 'moment'; import moment from 'moment';
import { MonacoDiffEditor } from 'react-monaco-editor'; import { MonacoDiffEditor } from 'react-monaco-editor';
class ShixunCustomsPass extends Component { class ShixunCustomsPass extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
loadingstate:true, loadingstate:true,
datas:undefined datas:undefined
} }
} }
componentDidMount() { componentDidMount() {
} }
render() { render() {
let {data}=this.props; let {data}=this.props;
console.log(data) console.log(data)
let datas=[]; let datas=[];
data&&data.challenge_list.forEach((item,key)=>{ data&&data.challenge_list.forEach((item,key)=>{
datas.push({ datas.push({
customs:{position:item.position,subject:item.subject}, customs:{position:item.position,subject:item.subject},
taskname:{name:item.username}, taskname:{name:item.username},
openingtime:moment(item.end_time).format('YYYY-MM-DD HH:mm:ss'), openingtime:moment(item.end_time).format('YYYY-MM-DD HH:mm:ss'),
evaluating: {final_score:item.final_score,all_score:item.all_score}, evaluating: {final_score:item.final_score,all_score:item.all_score},
finishtime:item.copy_username, finishtime:item.copy_username,
elapsedtime:moment(item.copy_end_time).format('YYYY-MM-DD HH:mm:ss'), elapsedtime:moment(item.copy_end_time).format('YYYY-MM-DD HH:mm:ss'),
empvalue:item.code_rate, empvalue:item.code_rate,
// adjustmentminute:asdasd // adjustmentminute:asdasd
}) })
}) })
let columns=[{ let columns=[{
title: '关卡', title: '关卡',
dataIndex: 'customs', dataIndex: 'customs',
key: 'customs', key: 'customs',
render: (text, record) => ( className:"customsPass",
<span> render: (text, record) => (
<style> <span>
{` <style>
.backgroud4CACFF{ {`
background: #4CACFF; .backgroud4CACFF{
} background: #4CACFF;
`} }
</style> `}
<span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF"> </style>
<i className="fa fa-code font-16 color_white"></i> <span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF">
</span> <i className="fa fa-code font-16 color_white"></i>
<span className="fl mt3 font-14"> </span>
<span className="font-bd mr15">{record.customs.position}</span> <span className="fl mt3 font-14">
<span className={"font-14"}>{record.customs.subject}</span> <span className="font-bd mr15">{record.customs.position}</span>
</span> <span className={"font-14"}>{record.customs.subject}</span>
</span> </span>
), </span>
}, { ),
title: '被查作品', }, {
dataIndex: 'taskname', title: '被查作品',
key: 'taskname', dataIndex: 'taskname',
render: (text, record) => ( key: 'taskname',
<span className={"colorC8161D"}> render: (text, record) => (
{record.taskname.name} <span className={"colorC8161D"}>
</span> {record.taskname.name}
), </span>
}, { ),
title: '被查作品完成时间', }, {
dataIndex: 'openingtime', title: '被查作品完成时间',
key: 'openingtime', dataIndex: 'openingtime',
render: (text, record) => ( key: 'openingtime',
<span className={"color-grey-9"}> render: (text, record) => (
{record.openingtime} <span className={"color-grey-9"}>
</span> {record.openingtime}
), </span>
}, { ),
title: '得分/满分', }, {
key: 'evaluating', title: '得分/满分',
dataIndex: 'evaluating', key: 'evaluating',
dataIndex: 'evaluating',
render: (text, record) => (
<span className={"color-grey-9"}> render: (text, record) => (
<span style={{color:'#FF6800'}}>{record.evaluating.final_score}</span><span className={"color-grey-9"}>/{record.evaluating.all_score}</span> <span className={"color-grey-9"}>
</span> <span style={{color:'#FF6800'}}>{record.evaluating.final_score}</span><span className={"color-grey-9"}>/{record.evaluating.all_score}</span>
), </span>
}, { ),
title: '疑被抄袭作品', }, {
key: 'finishtime', title: '疑被抄袭作品',
dataIndex: 'finishtime', key: 'finishtime',
render: (text, record) => ( dataIndex: 'finishtime',
<span className={"color-green"}> render: (text, record) => (
{record.finishtime} <span className={"color-green"}>
</span> {record.finishtime}
), </span>
}, { ),
title: '疑被抄袭作品完成时间', }, {
key: 'elapsedtime', title: '疑被抄袭作品完成时间',
dataIndex: 'elapsedtime', key: 'elapsedtime',
dataIndex: 'elapsedtime',
render: (text, record) => (
<span className={"color-grey-9"}> render: (text, record) => (
{record.elapsedtime} <span className={"color-grey-9"}>
</span> {record.elapsedtime}
), </span>
}, { ),
title: '相似度', }, {
key: 'empvalue', title: '相似度',
dataIndex: 'empvalue', key: 'empvalue',
dataIndex: 'empvalue',
render: (text, record) => (
<span className={"colorC8161D"}> render: (text, record) => (
{record.empvalue}% <span className={"colorC8161D"}>
</span> {record.empvalue}%
), </span>
}]; ),
// { }];
// title: '调分', // {
// key: 'adjustmentminute', // title: '调分',
// dataIndex: 'adjustmentminute', // key: 'adjustmentminute',
// // dataIndex: 'adjustmentminute',
// render: (text, record) => ( //
// <span> // render: (text, record) => (
// <a>6小时 50分钟 6秒</a> // <span>
// </span> // <a>6小时 50分钟 6秒</a>
// ), // </span>
// }, // ),
// },
return (
<div> return (
<div>
<style>{`
.ant-table-thead > tr > th{ <style>{`
text-align: center; .ant-table-thead > tr > th{
} text-align: center;
.tasknamebox{ }
width: 50px; .tasknamebox{
height: 24px; width: 50px;
border: 1px solid rgba(221,23,23,1); height: 24px;
border-radius: 12px; border: 1px solid rgba(221,23,23,1);
color: rgba(221,23,23,1); border-radius: 12px;
display: inline-block; color: rgba(221,23,23,1);
line-height: 24px; display: inline-block;
} line-height: 24px;
.ant-table-tbody > tr > td{ }
font-size:14px; .ant-table-tbody > tr > td{
} font-size:14px;
.task-hide{ }
max-width: 345px; .task-hide{
overflow: hidden; max-width: 345px;
white-space: nowrap; overflow: hidden;
text-overflow: ellipsis; white-space: nowrap;
} text-overflow: ellipsis;
.ant-table-tbody > tr{ }
height:64px; .ant-table-tbody > tr{
} height:64px;
.colorC8161D{ }
color:#C8161D; .colorC8161D{
} color:#C8161D;
.ant-table-tbody> tr > td{ }
text-align: center; .ant-table-tbody> tr > td{
} text-align: center;
`} }
</style> .customsPass{
{datas===undefined?"":<Table text-align: left !important;
dataSource={datas} }
columns={columns} `}
pagination={false} </style>
/>} {datas===undefined?"":<Table
dataSource={datas}
<div className="stud-class-set bor-bottom-greyE"> columns={columns}
<div className="clearfix edu-back-white poll_list pad40px"> pagination={false}
<div className="font-16 color-dark-21 shixunreporttitle ml20">实训详情</div> />}
<style>
{` <div className="stud-class-set bor-bottom-greyE mt20">
.poll_list a{ <div className="clearfix edu-back-white poll_list pad40px">
padding:0px !important; <div className="font-16 color-dark-21 shixunreporttitle mb20">实训详情</div>
} <style>
.backgroud4CACFF{ {`
background: #4CACFF; .poll_list a{
} padding:0px !important;
`} }
</style> .backgroud4CACFF{
{ background: #4CACFF;
data&&data.challenge_list.map((item,key)=>{ }
return( `}
<div key={key} className={"mb20"}> </style>
<div className="font-16 color-dark-21 ml20 mr20"> {
<p className="clearfix mb20"> data&&data.challenge_list.map((item,key)=>{
<span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF"> return(
<i className="fa fa-code font-16 color_white"></i> <div key={key} className={"mb20"}>
</span> <div className="font-16 color-dark-21 ml20 mr20">
<span className="fl mt3 font-14"> <p className="clearfix mb20">
<span className="font-bd mr15">{item.position}</span> <span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF">
<a> <i className="fa fa-code font-16 color_white"></i>
<span className={"font-14"}>{item.subject}</span> </span>
</a> <span className="fl mt3 font-14">
</span> <span className="font-bd mr15">{item.position}</span>
<span className="fr codeboxright">代码文件{item.code_list[0].path}</span> <a>
</p> <span className={"font-14"}>{item.subject}</span>
</a>
</div> </span>
<span className="fr codeboxright">代码文件{item.code_list[0].path}</span>
</p>
{item.code_list.map((ite,k)=>{
return( </div>
<div className="font-16 color-dark-21 ml20 mr20" key={k}>
<div className=" mt15">
<p className="clearfix pt5 pb5 pl15 pr15 codebox"> {item.code_list.map((ite,k)=>{
<span className="fl"> return(
<span className={"colorC8161D"}>{item.username}</span> <div className="font-16 color-dark-21 ml20 mr20" key={k}>
的代码文件 <div className=" mt15">
</span> <p className="clearfix pt5 pb5 codebox">
<span className="fr"> <span className="fl">
<span className={"color-green"}>{item.copy_username}</span> <span className={"colorC8161D"}>{item.username}</span>
的代码文件 的代码文件
</span> </span>
</p> <span className="fr">
<style> <span className={"color-green"}>{item.copy_username}</span>
{` 的代码文件
.borderccc{ </span>
border:1px solid #ccc </p>
} <style>
`} {`
</style> .borderccc{
<div className="test-code mt20 borderccc"> border:1px solid #ccc
<li className="clearfix"> }
<MonacoDiffEditor `}
height="500" </style>
// language="javascript" <div className="test-code mt20 borderccc">
original={ite.origin_content} <li className="clearfix">
value={ ite.target_content} <MonacoDiffEditor
// options={options} height="500"
/> // language="javascript"
</li> original={ite.origin_content}
</div> value={ ite.target_content}
</div> // options={options}
</div> />
) </li>
})} </div>
</div> </div>
) </div>
}) )
} })}
</div> </div>
</div> )
</div> })
}
) </div>
} </div>
} </div>
)
}
}
export default ShixunCustomsPass; export default ShixunCustomsPass;
Loading…
Cancel
Save