dev_forum
杨树林 6 years ago
parent f7b4681448
commit 3ba3c1f7f5

@ -1,6 +1,4 @@
import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn, ActionBtn} from 'educoder';
import TraineetraininginformationModal from './TraineetraininginformationModal';
import ModulationModal from "../coursesPublic/ModulationModal";
import HomeworkModal from "../coursesPublic/HomeworkModal";
@ -64,7 +62,7 @@ class Listofworks extends Component {
computeTimetype:true,
limit: 20,
loadingstate: true,
order: "update_time",
orders: "update_time",
b_order:"desc",
search: null,
allow_late:false,
@ -354,7 +352,7 @@ class Listofworks extends Component {
record.submitstate === "未提交" ? <span style={{ color: '#9A9A9A'}}>--</span> :
<span>
<a style={{"text-align": "center"}} className="color-blue"
onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}</a>
onClick={() => this.Viewstudenttraininginformationt(record)}>{record.operating}</a>
</span>
)
},
@ -616,7 +614,7 @@ class Listofworks extends Component {
record.submitstate === "未提交" ? <span style={{ color: '#9A9A9A'}}>--</span> :
<span>
<a style={{"text-align": "center"}} className="color-blue"
onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}</a>
onClick={() => this.Viewstudenttraininginformationt(record)}>{record.operating}</a>
</span>
)
},
@ -630,751 +628,15 @@ class Listofworks extends Component {
componentDidMount() {
console.log("Listofworks");
console.log("componentDidMount");
this.props.triggerRef(this)
var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid)
// this.Gettitleinformation(homeworkid);
this.Getalistofworks(homeworkid);
let query = this.props.location.pathname;
const type = query.split('/');
this.setState({
shixuntypes: type[3]
})
this.tearchar();
}
isupdatas = () => {
var homeworkid = this.props.match.params.homeworkid;
// this.Gettitleinformation(homeworkid);
this.Getalistofworks(homeworkid);
}
// 获取作品列表
Getalistofworks = (homeworkid) => {
// console.log("获取作品列表");7009
let urll = `/homework_commons/${homeworkid}/works_list.json`;
// console.log(homeworkid);
// search:搜索关键字
// order:排序方式更新时间update_time最终成绩work_score学号student_id
// b_order:desc倒序 asc顺序
// work_status:0:未提交, 1:按时提交, 2:延时提交,“”不限
// course_group:分班情况 [232, 231] []:不限(空数组)
var data = {
search: "",
order: this.state.order,
b_order: "desc",
work_status: "",
course_group: "",
page:1,
limit:20,
}
axios.post(urll, data).then((result) => {
if(this.props.isNotMember()===false){
if (result !== undefined) {
// console.log(url)
// console.log("作品列表6789077")
// console.log(JSON.stringify(result))
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
allow_late:result.data.allow_late,
course_group_info: result.data.course_group_info,
loadingstate: false,
jobsettingsdata: result,
publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1);
} }
}).catch((error) => {
console.log(error)
this.setState({
loadingstate: false,
})
})
}
//开始排序操作
Startsorting = (ordervlue, checkedValuesine, checkedValuesineinfo, searchtext, page, limit) => {
//要提交的作品状态checkedValuesine
//要提交的分班状态checkedValuesineinfo
//searchtext 输入的姓名和学号
//order 排序时间
//debug=t 是老师的意思
// console.log(ordervlue)7009
var homeworkid = this.props.match.params.homeworkid;
let urll = `/homework_commons/${homeworkid}/works_list.json?`;
var order = "asc";
if (ordervlue === "update_time") {
order = "desc";
}
var checkedValuesines = checkedValuesine;
var checkedValuesineinfos = checkedValuesineinfo;
var searchtexts = searchtext
var data = {
search: searchtexts,
order: ordervlue,
b_order: order,
work_status: checkedValuesines,
course_group: checkedValuesineinfos,
page: page,
limit: limit,
}
// console.log("Startsorting");
// console.log(data);
axios.post(urll, data).then((result) => {
// if (result.status === 200) {/]
// console.log(url)
// console.log("作品列表______________________")
// console.log(JSON.stringify(result))
if(this.props.isNotMember()===false){
if (result !== undefined) {
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
loadingstate: false,
jobsettingsdata: result,
allow_late:result.data.allow_late,
publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
}
}
// }
}).catch((error) => {
console.log(error)
this.setState({
loadingstate: false
})
})
}
TablePagination = (e) => {
// console.log(e.current);
var teacherlist = { //分页
total: this.state.teacherdata.student_works.length, //数据总数量
pageSize: 20, //一页显示几条
current: e.current,
}
this.setState({
page: e.current,
teacherlist: teacherlist
})
}
// 设置数据
seacthdata = (teacherdata,student_works,work_efficiency,course_group_info) => {
let {page, limit} = this.state;
let datalist = [];
let columns = this.state.columns;
var columns2=[];
if (teacherdata !== undefined) {
for (var i = 0; i < student_works.length; i++) {
var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm');
datalist.push({
myid: student_works[i].id,
number: (parseInt(page) - 1) * parseInt(limit) + (i + 1),
name: student_works[i].user_name,
stduynumber: student_works[i].student_id,
classroom: student_works[i].group_name,
cost_time: student_works[i].cost_time,
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:"",
updatetime: timedata === "Invalid date" ? "--" : timedata,
completion: student_works[i].complete_count === null ? "0" :student_works[i].complete_count === undefined ? "0": student_works[i].complete_count,
levelscore: student_works[i].final_score,
efficiencyscore: student_works[i].eff_score==="0.0"?"--":student_works[i].eff_score==="0"?"--":student_works[i].eff_score,
finalscore: student_works[i].work_score,
operating: "查看",
late_penalty: student_works[i].late_penalty=== null?"0":student_works[i].late_penalty === undefined?"0":student_works[i].late_penalty,
ultimate_score:student_works[i].ultimate_score,
user_name: student_works[i].user_name,
user_login: student_works[i].user_login,
})
}
var teacherlist = { //分页
total: student_works.length, //数据总数量
pageSize: 20, //一页显示几条
current: page,
}
if (work_efficiency === false) {
if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined||course_group_info === null){
//这里没有分班 没有 关卡得分 没有效率分
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){
}
else if(item.title==="关卡得分"){
}
else if(item.title==="效率分"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
columns2.push(item);
}
}
}else{
if(course_group_info.length < 2){
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){
}
else if(item.title==="关卡得分"){
}
else if(item.title==="效率分"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
columns2.push(item);
}
}
}else {
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="关卡得分"){
}
else if(item.title==="效率分"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
columns2.push(item);
}
}
}
}
}else {
if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined || course_group_info === null){
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
columns2.push(item);
}
}
}else {
if(course_group_info.length < 2) {
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
columns2.push(item);
}
}
}
columns2=this.state.columnss;
}
}
} else {
var teacherlist = undefined;
}
this.setState({
data: datalist,
teacherlist: teacherlist,
columns: columns2,
loadingstate: false,
})
}
//作品状态
funtaskstatus = (checkedValues, data) => {
if (JSON.stringify(checkedValues) === "[]") {
// console.log(checkedValues);
this.setState({
unlimited: 0,
course_groupyslstwo: [],
loadingstate: true,
page:1,
})
this.Startsorting(this.state.order, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
} else if (checkedValues.length === data.length) {
this.setState({
unlimited: 0,
course_groupyslstwo: [],
loadingstate: true,
page:1,
})
this.Startsorting(this.state.order, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
} else {
// console.log(checkedValues);
this.setState({
course_groupyslstwo: checkedValues,
unlimited: 1,
loadingstate: true,
page:1,
})
this.Startsorting(this.state.order, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
}
}
//作品状态2
funtaskstatustwo = (checkedValues, data) => {
// console.log("funtaskstatustwo");
// console.log(checkedValues);
if (JSON.stringify(checkedValues) === "[]") {
// console.log(checkedValues);
this.setState({
unlimitedtwo: 1,
course_groupysls: undefined,
checkedValuesineinfo:[],
loadingstate: true,
page: 1,
})
this.Startsorting(this.state.order, this.state.course_groupyslstwo, checkedValues, this.state.searchtext, 1, this.state.limit);
} else if (checkedValues.length === data.length) {
this.setState({
unlimitedtwo: 1,
course_groupysls: undefined,
checkedValuesineinfo:[],
loadingstate: true,
page: 1,
})
this.Startsorting(this.state.order, this.state.checcourse_groupyslstwokedValuesine, checkedValues, this.state.searchtext, 1, this.state.limit);
} else {
this.setState({
checkedValuesineinfo: checkedValues,
course_groupysls: checkedValues,
unlimitedtwo: 0,
loadingstate: true,
page: 1,
})
this.Startsorting(this.state.order, this.state.course_groupyslstwo, checkedValues, this.state.searchtext, 1, this.state.limit);
}
}
//搜索学生 文字输入
inputSearchValues = (e) => {
// console.log(e.target.value)
if (e.target.value === "") {
this.setState({
searchtext: undefined
})
} else {
this.setState({
searchtext: e.target.value
})
}
}
//搜索学生按钮输入
searchValues = (value) => {
//点击直接搜索
// if(value === ""){
// message.error("请输入姓名或学号搜索");
// return
// }
this.setState({
loadingstate: true
})
this.Startsorting(this.state.order, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, value, this.state.page, this.state.limit);
// console.log(value)
}
// 输入关键字后按回车,自动提交
onSearchKeywordKeyUp = (e) => {
if (e.keyCode === 13) {
// this.onSearch();
// console.log("使用了回车键");
this.setState({
loadingstate: true
})
this.Startsorting(this.state.order, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
}
}
//排序
funorder = (e) => {
if (e === "update_time") {
// 时间
// 时间排序是从小到大
this.setState({
order: "update_time",
loadingstate: true,
})
this.Startsorting("update_time", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
}
if (e === "work_score") {
// 成绩
//成绩排序是从大到小
this.setState({
order: "work_score",
loadingstate: true,
})
this.Startsorting("work_score", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
}
if (e === "student_id") {
//学号
//学号排序是从大到小
this.setState({
order: "student_id",
loadingstate: true,
})
this.Startsorting("student_id", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
}
}
// 调分
// 查看学员实训信息
Viewstudenttraininginformation = (e) => {
// console.log("Viewstudenttraininginformation");
// console.log(e);
this.setState({
userids: e.myid,
})
this.viewtraining(e.myid);
}
// 关闭调分
cancelModulationModels = () => {
this.setState({visibles: false})
}
// 关闭查看
cancelModulationModel = () => {
this.setState({visible: false})
}
// 调分
Viewstudenttraininginformations = (e) => {
// console.log("Viewstudenttraininginformations2");
// console.log(e.myid);
this.setState({
visible: true,
userid: e.myid,
// Tune
})
}
//确定
saveModulationModal = (value, num) => {
var userid = this.state.userid;
const url = `/student_works/${userid}/adjust_score.json`;
// console.log(url);
axios.post(url, {
score: num,
comment: value
})
.then((response) => {
if (response.data.status == '0') {
this.setState({visible: false});
this.props.showNotification(`调分成功`);
this.Startsorting(this.state.order, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
}
})
.catch(function (error) {
console.log(error);
});
}
viewtraining = (userids) => {
// console.log(JSON.stringify(this.props.user))
var url = `/student_works/${userids}/shixun_work.json`;
axios.get(url).then((result) => {
if (result.status === 200) {
// console.log("TraineetraininginformationModal.js")
// console.log(JSON.stringify(result))
let datalist = [];
var game_list = result.data.game_list
var boolgalist=true;
var experience=0;
for (var i = 0; i < game_list.length; i++) {
datalist.push({
number: "第" + game_list[i].position + "关",
name: moment(game_list[i].end_time).format('YYYY-MM-DD HH:mm'),
stduynumber: game_list[i].cost_time,
classroom: game_list[i].score,
complete_status: game_list[i].complete_status,
})
experience=game_list[i].score+experience;
if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){
boolgalist=false;
}
}
// console.log("viewtraining");
// console.log(datalist);
// console.log(JSON.stringify(datalist));
this.setState({
viewtrainingdata: result.data,
visibles: true,
game_list: datalist,
experience:experience,
boolgalist:boolgalist,
})
}
}).catch((error) => {
})
}
//立即发布
homeworkstart = () => {
let homeworkid = this.props.match.params.homeworkid;
let url = "/homework_commons/" + homeworkid + "/publish_groups.json";
axios.get(url).then((response) => {
if (response.status === 200) {
let starttime = this.props.getNowFormatDates(1);
let endtime = this.props.getNowFormatDates(2);
this.setState({
modalname: "立即发布",
modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1,
svisible: true,
Topval:"学生将立即收到作业",
// Botvalleft:"暂不发布",
Botval:`本操作只对"未发布"的分班有效`,
starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime: "截止时间:" + endtime,
starttimes:starttime,
typs:"start",
Cancelname: "暂不发布",
Savesname: "立即发布",
Cancel: this.homeworkhide,
Saves: this.homeworkstartend,
course_groups: response.data.course_groups,
})
}
}).catch((error) => {
console.log(error)
});
}
//立即截止
homeworkends = () => {
console.log("1160");
let homeworkid = this.props.match.params.homeworkid;
let url = "/homework_commons/" + homeworkid + "/end_groups.json";
axios.get(url).then((response) => {
if (response.status === 200) {
this.setState({})
this.setState({
modalname: "立即截止",
modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1,
svisible: true,
Topval:"学生将不能再提交作业",
// Botvalleft:"暂不截止",
Botval:`本操作只对"提交中"的分班有效`,
Cancelname: "暂不截止",
Savesname: "立即截止",
Cancel: this.homeworkhide,
Saves: this.coursetaskend,
starttime: undefined,
endtime: undefined,
course_groups: response.data.course_groups,
typs:"end",
})
}
}).catch((error) => {
console.log(error)
});
}
// 立即发布
homeworkstartend = (ds,endtime) => {
var homeworkid = this.props.match.params.homeworkid;
let {course_groupslist} = this.state;
let coursesId = this.props.match.params.coursesId;
let url = "/courses/" + coursesId + "/homework_commons/publish_homework.json";
axios.post(url, {
homework_ids: [homeworkid],
group_ids: course_groupslist,
end_time:endtime,
}).then((result) => {
if (result.status === 200) {
if (result.data.status === 0) {
notification.open({
message: "提示",
description: result.data.message
});
this.homeworkhide()
}
}
}).catch((error) => {
console.log(error);
})
}
notlimiteds = () => {
this.setState({
checkedValuesine: undefined,
course_groupyslstwo: [],
unlimited: 0,
loadingstate: true,
page:1,
})
this.Startsorting(this.state.order, [], this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
}
notlimitedst = () => {
// console.log(this.state.course_group_info);
this.setState({
unlimitedtwo: 1,
checkedValuesineinfo: [],
course_groupysls: undefined,
loadingstate: true,
})
this.Startsorting(this.state.order, this.state.course_groupyslstwo, [], this.state.searchtext, 1, this.state.limit);
}
//立即截止确定按钮
coursetaskend = () => {
var homeworkid = this.props.match.params.homeworkid;
let {course_groupslist} = this.state;
const cid = this.props.match.params.coursesId;
let url = "/courses/" + cid + "/homework_commons/end_homework.json";
axios.post(url, {
group_ids: course_groupslist,
homework_ids: [homeworkid],
})
.then((response) => {
if (response.data.status == 0) {
notification.open({
message: "提示",
description: response.data.message
});
this.homeworkhide()
}
})
.catch(function (error) {
console.log(error);
});
}
getcourse_groupslist = (id) => {
this.setState({
course_groupslist: id
})
}
homeworkhide = () => {
this.isupdatas()
this.setState({
modalname: undefined,
modaltype: undefined,
svisible: false,
Topval: undefined,
Topvalright: undefined,
Botvalleft: undefined,
Botval: undefined,
starttime: undefined,
endtime: undefined,
Cancelname: undefined,
Savesname: undefined,
Cancel: undefined,
Saves: undefined,
StudentList_value: undefined,
addname: undefined,
addnametype: false,
addnametab: undefined,
course_groupyslstwo: undefined,
typs:undefined,
starttimes:undefined,
})
}
workshowmodel = () => {
this.setState({
showmodel: true
})
}
hideshowmodel = () => {
this.setState({
showmodel: false
})
}
paginationonChanges = (pageNumber) => {
this.setState({
page: pageNumber,
loadingstate: true,
})
this.Startsorting(this.state.order, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, pageNumber, this.state.limit);
}
setComputeTime=()=>{
this.setState({
computeTimetype:false
})
let homeworkid = this.props.match.params.homeworkid;
let url = "/homework_commons/"+homeworkid+"/update_score.json";
axios.get(url).then((response) => {
if(response){
this.props.showNotification(response.data.message);
this.setState({
loadingstate: true
})
this.Startsorting(this.state.order, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
}
}).catch((error) => {
console.log(error)
});
}
render() {
// console.log("Listofworks.js000")
let {columns,computeTimetype, page, boolgalist,limit,experience,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,computeTimetype, page, boolgalist,limit,experience,course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, orders, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state;
//
// console.log(teacherdata&&teacherdata.shixun_identifier)
// console.log(this.props.teacherdata&&this.props.teacherdata.publish_immediately)
@ -1527,9 +789,9 @@ class Listofworks extends Component {
id="subject_search_input"
autoComplete="off"
value={searchtext}
onKeyUp={(e) => this.onSearchKeywordKeyUp(e)}
onInput={this.inputSearchValues}
onSearch={this.searchValues}
onKeyUp={(e) => this.onSearchKeywordKeyUpt(e)}
onInput={this.inputSearchValuest}
onSearch={this.searchValuest}
></Search>
</div>
</li>
@ -1541,7 +803,7 @@ class Listofworks extends Component {
className={unlimited === 0 ? "pl10 pr10 mr20 check_on" : "pl10 pr10 mr20 "}
onClick={() => this.notlimiteds()}>不限</a></span>
<CheckboxGroup value={course_groupyslstwo}
onChange={(e) => this.funtaskstatus(e, task_status && task_status)}
onChange={(e) => this.funtaskstatust(e, task_status && task_status)}
style={{paddingTop: '4px'}}>
{task_status === undefined ? "" : task_status.map((item, key) => {
@ -1572,7 +834,7 @@ class Listofworks extends Component {
className={unlimitedtwo === 0 ? "pl10 pr10 mr20 " : "pl10 pr10 mr20 check_on"}
onClick={() => this.notlimitedst()}>不限</a></span>
<CheckboxGroup value={course_groupysls}
onChange={(e) => this.funtaskstatustwo(e, course_group_info && course_group_info)}
onChange={(e) => this.funtaskstatustwot(e, course_group_info && course_group_info)}
style={{paddingTop: '4px',width:'1017px'}}>
{course_group_info === undefined ? "" :
course_group_info.map((item, key) => {
@ -1611,12 +873,12 @@ class Listofworks extends Component {
<ul>
<li className="edu-position edu-position-hidebox">
<a className="font-12">
{order === "update_time" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a>
{orders === "update_time" ? "时间" : orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序</a>
<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=" 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>
<li> <a onClick={(e) => this.funordert("update_time")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>更新时间</a></li>
<li> <a onClick={(e) => this.funordert("work_score")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>最终成绩</a></li>
<li> <a onClick={(e) => this.funordert("student_id")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>学生学号</a></li>
</ul>
</li>
</ul>

@ -11,7 +11,6 @@ import '../css/Courses.css';
import './style.css';
import '../css/busyWork.css';
import '../poll/pollStyle.css';
import Listofworks from "./Listofworks";
import Listofworksstudentone from './Listofworksstudentone';
import Trainingjobsetting from './Trainingjobsetting';
import Workquestionandanswer from './Workquestionandanswer';
@ -280,26 +279,15 @@ class ShixunHomeworkPage extends Component {
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{
// 教师列表
parseInt(tab) === 0 ? (isAdmin === true ?
<Listofworks triggerRef={this.bindRef} {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworks>
:
<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>)
:
parseInt(tab) === 1 ?
<Workquestionandanswer triggerRef={this.bindRef} {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Workquestionandanswer>
:
parseInt(tab) === 2 ?
<ShixunStudentWork triggerRef={this.bindRef} {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>
:
<Trainingjobsetting triggerRef={this.bindRef} {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>
}
{parseInt(tab) === 0 &&<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>}
{parseInt(tab) === 1 &&<Workquestionandanswer triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Workquestionandanswer>}
{parseInt(tab) === 2 &&<ShixunStudentWork triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>}
{parseInt(tab) === 3 &&<Trainingjobsetting triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>}
</div>
</div>
)

Loading…
Cancel
Save