dev_forum
杨树林 6 years ago
parent 19f678e597
commit 618efb6df1

@ -91,6 +91,7 @@ class Listofworks extends Component {
unlimited: 0,
unlimitedtwo: 1,
code_review: false,
boolgalist:false,
columns: [
{
title: '序号',
@ -778,7 +779,7 @@ class Listofworks extends Component {
// console.log(JSON.stringify(result))
let datalist = [];
var game_list = result.data.game_list
var boolgalist=false;
for (var i = 0; i < game_list.length; i++) {
datalist.push({
@ -789,6 +790,10 @@ class Listofworks extends Component {
complete_status: game_list[i].complete_status,
})
if(game_list[i].complete_status === 1){
boolgalist=true;
}
}
// console.log("viewtraining");
// console.log(datalist);
@ -796,7 +801,8 @@ class Listofworks extends Component {
this.setState({
viewtrainingdata: result.data,
visibles: true,
game_list: datalist
game_list: datalist,
boolgalist:boolgalist,
})
}
}).catch((error) => {
@ -1001,7 +1007,7 @@ class Listofworks extends Component {
render() {
// console.log("Listofworks.js000")
let {columns, page, limit, course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state;
let {columns, page, boolgalist,limit, course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state;
//
// console.log(teacherdata&&teacherdata.shixun_identifier)
// console.log(course_group_info)
@ -1045,6 +1051,7 @@ class Listofworks extends Component {
viewtrainingdata={viewtrainingdata}
game_list={game_list}
visible={visibles}
boolgalist={boolgalist}
Cancel={() => this.cancelModulationModels()}
/>
@ -1080,12 +1087,12 @@ class Listofworks extends Component {
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn
className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id===undefined?"":jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
<div className="educontent mb30">
<div className="educontent mb30" style={{width:"1250px"}}>
<p className=" fl color-black summaryname">
{teacherdata === undefined ? "" : teacherdata.homework_name}
</p>
@ -1101,7 +1108,7 @@ class Listofworks extends Component {
</div>
<div className="edu-back-white">
<div className="edu-back-white" style={{width:"1250px"}}>
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<Link className="active"
@ -1164,7 +1171,7 @@ class Listofworks extends Component {
</CheckboxGroup>
{/*请输入姓名或学号搜索*/}
<div className="fr mr5 search-new" style={{marginBottom: '1px'}}>
<div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}>
<Search
placeholder="请输入姓名或学号搜索"
id="subject_search_input"

@ -688,7 +688,7 @@ class Listofworksstudentone extends Component {
<WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
<div className="educontent mb30">
<div className="educontent mb30" style={{width:"1250px"}}>
<p className=" fl color-black summaryname">
{teacherdata === undefined ? "" : teacherdata.homework_name}
</p>
@ -696,11 +696,11 @@ class Listofworksstudentone extends Component {
typelist={teacherdata === undefined ? [""] : teacherdata.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}`}>返回</a>
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id===undefined?"":jobsettingsdata.data.category.category_id}`}>返回</a>
<p className="color-grey-9 fr font-16"></p>
</div>
<div className="edu-back-white">
<div className="edu-back-white" style={{width:"1250px"}}>
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<Link className="active"

@ -36,10 +36,10 @@ class TraineetraininginformationModal extends Component {
props: this.props,
userids: this.props.userids,
game_list:this.props.game_list,
gline:0,
boolgalist:this.props.boolgalist,
})
// console.log("TraineetraininginformationModal")
// console.log("TraineetraininginformationModal")
// console.log(this.props)
}
@ -51,123 +51,133 @@ class TraineetraininginformationModal extends Component {
// this.seacthdata();
}
// 设置数据
// seacthdata = () => {
//
// console.log(datalist)
// }
LimitNumber=(txt)=> {
var str = txt;
if(str.length>25){
str = str.substring(0,25)+"......"
}
return str;
}
render() {
const columns = [
var columns;
if(this.props.boolgalist === true) {
columns = [
{
title: '关卡',
dataIndex: 'number',
key: 'number',
width: 92,
align: "center",
render: (text, record) => (
<span >
<a style={{"color":'#07111B', "text-align": "center"}}>{record.number}</a>
<span>
<a style={{"color": '#07111B', "text-align": "center"}}>{record.number}</a>
</span>
),
},
{
title: '完成时间',
dataIndex: 'name',
key: 'name',
width: 178,
align: "center",
render: (text, record) => (
<span >
<a style={{"color":'#989898', "text-align": "center"}} >{record.name==='Invalid date'?"--":record.name}</a>
{
title: '完成时间',
dataIndex: 'name',
key: 'name',
width: 178,
align: "center",
render: (text, record) => (
<span>
<a style={{
"color": '#989898',
"text-align": "center"
}}>{record.name === 'Invalid date' ? "--" : record.name}</a>
</span>
),
},
{
title: '耗时',
dataIndex: 'stduynumber',
key: 'stduynumber',
align: "center",
render: (text, record) => (
<span>
<a style={{"color":'#989898', "text-align": "center"}}>{record.stduynumber}</a>
),
},
{
title: '',
dataIndex: 'complete_status',
key: 'complete_status',
width: 100,
align: "center",
render: (text, record) => (
<span>
{record.complete_status === 2 ? <img src={delay}/> : record.complete_status === 3 ?
<img src={invalid}/> : ""}
</span>
),
},
{
title: '经验值',
key: 'classroom',
dataIndex: 'classroom',
align: "center",
render: (text, record) => (
<span>
<a style={{"color":'#29BD8B', "text-align": "center"}}>{record.classroom}</a>
),
},
{
title: '耗时',
dataIndex: 'stduynumber',
key: 'stduynumber',
width: 92,
align: "center",
render: (text, record) => (
<span>
<a style={{"color": '#989898', "text-align": "center"}}>{record.stduynumber}</a>
</span>
),
}
];
const columnss = [
),
},
{
title: '关卡',
dataIndex: 'number',
key: 'number',
title: '经验值',
key: 'classroom',
width: 92,
dataIndex: 'classroom',
align: "center",
render: (text, record) => (
<span >
<span>
<a style={{"color": '#29BD8B', "text-align": "center"}}>{record.classroom}</a>
</span>
),
}
]
}
else {
columns = [
{
title: '关卡',
dataIndex: 'number',
key: 'number',
align: "center",
render: (text, record) => (
<span >
<a style={{"color":'#07111B', "text-align": "center"}}>{record.number}</a>
</span>
),
},
{
title: '完成时间',
dataIndex: 'name',
key: 'name',
width: 178,
align: "center",
render: (text, record) => (
<span >
),
},
{
title: '完成时间',
dataIndex: 'name',
key: 'name',
width: 178,
align: "center",
render: (text, record) => (
<span >
<a style={{"color":'#989898', "text-align": "center"}} >{record.name==='Invalid date'?"--":record.name}</a>
</span>
),
},
{
title: '',
dataIndex: 'complete_status',
key: 'complete_status',
width: 100,
align: "center",
render: (text, record) => (
<span>
{record.complete_status===2?<img src={delay}/>:record.complete_status===3?<img src={invalid}/>:""}
</span>
),
},
{
title: '耗时',
dataIndex: 'stduynumber',
key: 'stduynumber',
width: 92,
align: "center",
render: (text, record) => (
<span>
),
},
{
title: '耗时',
dataIndex: 'stduynumber',
key: 'stduynumber',
align: "center",
render: (text, record) => (
<span>
<a style={{"color":'#989898', "text-align": "center"}}>{record.stduynumber}</a>
</span>
),
},
{
title: '经验值',
key: 'classroom',
width: 92,
dataIndex: 'classroom',
align: "center",
render: (text, record) => (
<span>
),
},
{
title: '经验值',
key: 'classroom',
dataIndex: 'classroom',
align: "center",
render: (text, record) => (
<span>
<a style={{"color":'#29BD8B', "text-align": "center"}}>{record.classroom}</a>
</span>
),
),
}
]
}
];
return (
<div>
<Modal
@ -181,7 +191,7 @@ class TraineetraininginformationModal extends Component {
<div style={{width:"100%" }}className="login_register_content" >
<div style={{"width": "100%","text-align": "left","clear": "both"}}>
<div className="mt5 fl" >
<span style={{"text-align": "left"}}>{this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_name}</span>
<span style={{"text-align": "left"}}>{this.props.viewtrainingdata === undefined ? "" : this.LimitNumber(this.props.viewtrainingdata.shixun_name)}</span>
<span className="ml10 " style={{"text-align": "left","color":'#29BD8B'}} >经验值<span style={{"color":'#29BD8B'}}> {this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_score}</span></span>
</div>
{/*<Button type="primary" className="ml30" >实训报告</Button>*/}

@ -2,6 +2,7 @@
.educontent {
margin-bottom: 20px;
}
/* 左侧区域最小高度*/
#forum_index_list {
min-height: 400px;

@ -8,6 +8,11 @@
height: 30px;
margin-bottom: 30px;
margin-right: 35px;
}
.search-newysl {
width:237px!important;
height: 30px;
margin-bottom: 30px;
}
.search-new-input {
padding-left: 16px;

@ -319,7 +319,7 @@ class LoginDialog extends Component {
this.setState({
isRender: false
})
window.location.href="/";
// window.location.href="/";
}
loginEDU=()=>{

@ -782,3 +782,4 @@ html>body #ajax-indicator { position: fixed; }
.editormd-dialog-footer{
padding: 0px;
}
.educontentysl{width: 1250px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/

Loading…
Cancel
Save