dev_forum
杨树林 5 years ago
parent df6f12a8ab
commit 755e9fcc5c

@ -250,19 +250,18 @@ class Testpapersettinghomepage extends Component{
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}
</style>
<div className={"studentList_operation_ul mt23"}>
{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>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a
onClick={()=>this.experiment(`/api/exercises/${this.props.match.params.Id}/exercise_lists.xlsx`)}
className="color-dark">学生成绩</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>
<li><a onClick={()=>this.experiment(`/api/exercises/${this.props.match.params.Id}/exercise_lists.xlsx`)}>学生成绩</a></li>
<li><a href={`/api/exercises/${this.props.match.params.Id}/export_exercise`} >空白试卷</a></li>
<li><a onClick={()=>this.experiment(`/api/zip/export_exercises?exercise_id=${this.props.match.params.Id}${this.state.groupyslsval}`)}>学生答题试卷</a></li>
</ul>
</li>:""}
</div>

@ -796,6 +796,11 @@ class Listofworks extends Component {
if(item.title==="效率分"){
columns.splice(key,1)
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
}
}
})
}else{
if(course_group_info.length < 2){
@ -810,6 +815,11 @@ class Listofworks extends Component {
if(item.title==="效率分"){
columns.splice(key,1)
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
}
}
})
}else {
@ -820,6 +830,11 @@ class Listofworks extends Component {
if(item.title==="效率分"){
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==="分班"){
columns.splice(key,1)
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
}
}
})
}else {
if(course_group_info.length < 2) {
@ -838,6 +858,11 @@ class Listofworks extends Component {
if(item.title==="分班"){
columns.splice(key,1)
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
}
}
})
}
columns=this.state.columnss;
@ -1192,8 +1217,9 @@ class Listofworks extends Component {
course_groupyslstwo: [],
unlimited: 0,
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 = () => {
@ -1204,7 +1230,7 @@ class Listofworks extends Component {
course_groupysls: undefined,
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 = () => {
@ -1417,22 +1443,25 @@ class Listofworks extends Component {
font-size: 14px;
}
.drop_down_menu {
width: 121px;
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 121px;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</style>
{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>
<ul className="drop_down_menu" style={{"right":"-34px","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/homework_commons/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/works_list.xlsx`} calssName="color-dark">学生成绩</a></li>
<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`} >实训报告</a></li>
<li><a href={`/api/homework_commons/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/works_list.xlsx`} >学生成绩</a></li>
</ul>
</li>:""}
{this.props.isAdmin() ?
@ -1529,16 +1558,16 @@ class Listofworks extends Component {
<div className="clearfix">
<span className="fl color-grey-6 font-12"><span
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.student_works.length}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count} </span>
<div className="fr color-grey-6 edu-menu-panel">
<div className="fr edu-menu-panel">
<ul>
<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>
<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">
<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("work_score")} 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="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=" 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>
</li>
</ul>
@ -1581,7 +1610,6 @@ class Listofworks extends Component {
columns={columns}
pagination={false}
loading={loadingstate}
onChange={this.TablePagination}
/>}
</div>
</div>

@ -60,7 +60,202 @@ class Listofworksstudentone extends Component {
"display": "none"
},
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>
),
},
],
}
//
}
@ -193,7 +388,14 @@ class Listofworksstudentone extends Component {
let datalists = [];
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 teacherlists = undefined;
@ -297,11 +499,21 @@ class Listofworksstudentone extends Component {
teacherlists: teacherlists,
loadingstate: false,
styletable: styletable,
columns:columns2,
})
}
// 设置数据
seacthdata = (teacherdata) => {
let datalist = [];
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(this.state.teacherdata.id )
@ -361,6 +573,7 @@ class Listofworksstudentone extends Component {
data: datalist,
teacherlist: teacherlist,
loadingstate: false,
columns:columns2,
})
}
// 查看学员实训信息
@ -530,202 +743,8 @@ class Listofworksstudentone extends Component {
}
render() {
let {visibles, game_list, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state;
let 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>
}
let {visibles, game_list,columns, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state;
</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>
),
},
];
return (
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
// 学生不能查看别人的
@ -978,12 +997,12 @@ class Listofworksstudentone extends Component {
style={{"color": '#FF6800'}}>{teacherdata.left_time.time}</span>}
</span>
<div className="fr color-grey-6 edu-menu-panel">
<div className="fr edu-menu-panel">
<ul>
<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>
<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">
<li><a onClick={(e) => this.funorder("updated_at")} data-remote="true"
className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li>
@ -1013,7 +1032,6 @@ class Listofworksstudentone extends Component {
columns={columns}
pagination={false}
loading={loadingstate}
onChange={this.TablePagination}
/>}
</div>
{

Loading…
Cancel
Save