dev_forum
杨树林 5 years ago
parent e4fda5f9a0
commit bf8af06de2

@ -1246,43 +1246,43 @@ class Studentshavecompletedthelist extends Component {
this.Generatenewdatas(response.data.exercise_users); this.Generatenewdatas(response.data.exercise_users);
if (response.data.exercise_types.subjective === 0) { if (response.data.exercise_types.subjective === 0) {
if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) { if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) {
this.state.columnss.map((item,key)=>{ var arr =[];
for(var i=0;i<this.state.columnss.length;i++){
var item = this.state.columnss[i];
if(item.title==="分班"){ if(item.title==="分班"){
this.state.columnss.splice(key,1)
} }
if(item.title==="客观题得分"){ else if(item.title==="客观题得分"){
this.state.columnss.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnss.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnss.splice(key,1) }
else{
arr.push(item);
} }
} }
})
let columnss2=this.state.columnss;
this.setState({ this.setState({
columnss: columnss2, columnss: arr,
}) })
} else { } else {
this.state.columnss.map((item,key)=>{ var arr =[];
for(var i=0;i<this.state.columnss.length;i++){
var item = this.state.columnss[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columnss.splice(key,1)
} }
if(item.title==="主观题得分"){ if(item.title==="主观题得分"){
this.state.columnss.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnss.splice(key,1) }
else{
arr.push(item);
} }
} }
})
let columnss2=this.state.columnss;
this.setState({ this.setState({
columnss: columnss2 columnss: arr
}) })
} }
@ -1291,73 +1291,73 @@ class Studentshavecompletedthelist extends Component {
//学生已截止 //学生已截止
if (response.data.exercise_types.subjective === 0) { if (response.data.exercise_types.subjective === 0) {
if (this.state.loadingstate === false) { if (this.state.loadingstate === false) {
this.state.columnstwo.map((item,key)=>{ var arr =[];
for(var i=0;i<this.state.columnstwo.length;i++){
var item = this.state.columnstwo[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columnstwo.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnstwo.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnstwo.splice(key,1)
} }
else{
arr.push(item);
} }
}) }
let columnstwo2=this.state.columnstwo;
this.state.columns.map((item,key)=>{ var arr2 =[];
for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columns.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columns.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columns.splice(key,1) }
else{
arr2.push(item);
} }
} }
})
let columns2=this.state.columns
thiss.setState({ thiss.setState({
columns: columns2, columns: arr2,
columnstwo: columnstwo2, columnstwo: arr,
loadingstate: true, loadingstate: true,
}) })
} else { } else {
this.state.columnstwo.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnstwo.length;i++){
var item = this.state.columnstwo[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columnstwo.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnstwo.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnstwo.splice(key,1)
} }
else{
arr.push(item);
} }
}) }
let columnstwo2=this.state.columnstwo; var arr2 =[];
this.state.columns.map((item,key)=>{ for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columns.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columns.splice(key,1) }
else if(this.props.isNotMember()===true&&item.title==="学号") {
} }
if(this.props.isNotMember()===true) { else{
if(item.title==="学号"){ arr2.push(item);
this.state.columns.splice(key,1)
} }
} }
})
let columns2=this.state.columns
thiss.setState({ thiss.setState({
columns: columns2, columns: arr2,
columnstwo:columnstwo2, columnstwo:arr,
}) })
} }
@ -1610,37 +1610,39 @@ class Studentshavecompletedthelist extends Component {
current_answer_user: response.data.current_answer_user, current_answer_user: response.data.current_answer_user,
}) })
if (response.data.exercise_types.subjective === 0) { if (response.data.exercise_types.subjective === 0) {
this.state.columnstwo.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnstwo.length;i++){
var item = this.state.columnstwo[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columnstwo.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnstwo.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnstwo.splice(key,1)
} }
else{
arr.push(item);
} }
}) }
let columnstwo2=this.state.columnstwo;
this.state.columns.map((item,key)=>{ var arr2 =[];
for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columns.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columns.splice(key,1) }
else if(this.props.isNotMember()===true&&item.title==="学号") {
} }
if(this.props.isNotMember()===true) { else{
if(item.title==="学号"){ arr2.push(item);
this.state.columns.splice(key,1)
} }
} }
})
let columns2=this.state.columns
this.setState({ this.setState({
columns: columns2, columns: arr2,
columnstwo: columnstwo2, columnstwo: arr,
loadingstate: false, loadingstate: false,
}) })
} }
@ -1706,7 +1708,6 @@ class Studentshavecompletedthelist extends Component {
// } // }
} }
if (response.data.exercise_types.subjective === 0) { if (response.data.exercise_types.subjective === 0) {
//===0 不包括主观题 //===0 不包括主观题
if (indexi === exercise_users.length) { if (indexi === exercise_users.length) {
@ -1715,20 +1716,25 @@ class Studentshavecompletedthelist extends Component {
// console.log("77771111111"); // console.log("77771111111");
//分班大于0显示分班 //分班大于0显示分班
//7ge //7ge
this.state.columnsys.map((item,key)=>{ // this.state.columnsys.map((item,key)=>{
//
// })
var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columnsys.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnsys.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnsys.splice(key,1)
} }
else{
arr.push(item);
} }
}) }
thiss.setState({
this.setState({
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,
Teacherliststudentlist: response.data, Teacherliststudentlist: response.data,
@ -1737,27 +1743,27 @@ class Studentshavecompletedthelist extends Component {
exercise_users: response.data.exercise_users, exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
loadingstate: false, loadingstate: false,
columnsys: this.state.columnsys, columnsys: arr,
}) })
} else { } else {
//分班小于0不显示分班 //分班小于0不显示分班
//6ge //6ge
this.state.columnsys.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="分班"){ if(item.title==="分班"){
this.state.columnsys.splice(key,1)
} }
if(item.title==="客观题得分"){ else if(item.title==="客观题得分"){
this.state.columnsys.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnsys.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){ }
this.state.columnsys.splice(key,1) else{
arr.push(item);
} }
} }
})
thiss.setState({ thiss.setState({
data: datalist, data: datalist,
@ -1768,7 +1774,7 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status, commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users, exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
columnsys: this.state.columnsys, columnsys: arr,
}) })
} }
@ -1778,19 +1784,23 @@ class Studentshavecompletedthelist extends Component {
if (response.data.exercise_types.groups_count > 0) { if (response.data.exercise_types.groups_count > 0) {
//显示分班 //显示分班
//8ge //8ge
this.state.columnsys.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columnsys.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnsys.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnsys.splice(key,1) }else{
arr.push(item);
} }
} }
}) // console.log(thiss.state.columnsys);
// console.log(arr);
this.setState({ this.setState({
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,
@ -1800,27 +1810,28 @@ class Studentshavecompletedthelist extends Component {
exercise_users: response.data.exercise_users, exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
loadingstate: false, loadingstate: false,
columnsys: this.state.columnsys, columnsys: arr,
}) })
} else { } else {
//不显示分班 //不显示分班
//7ge //7ge
this.state.columnsys.map((item,key)=>{ var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="分班"){ if(item.title==="分班"){
this.state.columnsys.splice(key,1)
} }
if(item.title==="客观题得分"){ else if(item.title==="客观题得分"){
this.state.columnsys.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnsys.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnsys.splice(key,1) }else{
arr.push(item);
} }
} }
})
this.setState({ this.setState({
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,
@ -1830,7 +1841,7 @@ class Studentshavecompletedthelist extends Component {
exercise_users: response.data.exercise_users, exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
loadingstate: false, loadingstate: false,
columnsys: this.state.columnsys, columnsys: arr,
}) })
} }
@ -1842,13 +1853,16 @@ class Studentshavecompletedthelist extends Component {
console.log("2548包含主观题不包含分班"); console.log("2548包含主观题不包含分班");
if (response.data.exercise_types.groups_count > 0) { if (response.data.exercise_types.groups_count > 0) {
this.state.columnsys.map((item,key)=>{ var arr =[];
if(this.props.isNotMember()===true) { for(var i=0;i<this.state.columnsys.length;i++){
if(item.title==="学号"){ var item = this.state.columnsys[i];
this.state.columnsys.splice(key,1) if(this.props.isNotMember()===true&&item.title==="学号") {
}
else{
arr.push(item);
} }
} }
})
this.setState({ this.setState({
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,
@ -1857,19 +1871,22 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status, commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users, exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
columnsys: this.state.columnsys, columnsys: arr,
}) })
} else { } else {
this.state.columnsys.map((item,key)=>{ var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="分班"){ if(item.title==="分班"){
this.state.columnsys.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnsys.splice(key,1) }
else{
arr.push(item);
} }
} }
})
this.setState({ this.setState({
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,
@ -1878,7 +1895,7 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status, commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users, exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
columnsys: this.state.columnsys, columnsys:arr,
}) })
} }
} else { } else {
@ -1896,16 +1913,19 @@ class Studentshavecompletedthelist extends Component {
columnsys: this.state.columnsystwo, columnsys: this.state.columnsystwo,
}) })
} else { } else {
this.state.columnsys.map((item,key)=>{ var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="分班"){ if(item.title==="分班"){
this.state.columnsys.splice(key,1)
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
} }
if(this.props.isNotMember()===true) { else{
if(item.title==="学号"){ arr.push(item);
this.state.columnsys.splice(key,1)
} }
} }
})
this.setState({ this.setState({
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,
@ -1915,7 +1935,7 @@ class Studentshavecompletedthelist extends Component {
exercise_users: response.data.exercise_users, exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
loadingstate: false, loadingstate: false,
columnsys: this.state.columnsys, columnsys: arr,
}) })
} }

@ -753,6 +753,7 @@ class Listofworks extends Component {
let {page, limit} = this.state; let {page, limit} = this.state;
let datalist = []; let datalist = [];
let columns = this.state.columns; let columns = this.state.columns;
// var columns2=[];
if (teacherdata !== undefined) { if (teacherdata !== undefined) {
for (var i = 0; i < student_works.length; i++) { for (var i = 0; i < student_works.length; i++) {
var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm'); var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm');
@ -768,7 +769,7 @@ class Listofworks extends Component {
updatetime: timedata === "Invalid date" ? "--" : timedata, 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, 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, levelscore: student_works[i].final_score,
efficiencyscore: student_works[i].eff_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, finalscore: student_works[i].work_score,
operating: "查看", operating: "查看",
late_penalty: student_works[i].late_penalty=== null?"0":student_works[i].late_penalty === undefined?"0":student_works[i].late_penalty, late_penalty: student_works[i].late_penalty=== null?"0":student_works[i].late_penalty === undefined?"0":student_works[i].late_penalty,
@ -787,84 +788,84 @@ class Listofworks extends Component {
if (work_efficiency === false) { if (work_efficiency === false) {
if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined||course_group_info === null){ if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined||course_group_info === null){
//这里没有分班 没有 关卡得分 没有效率分 //这里没有分班 没有 关卡得分 没有效率分
columns.map((item,key)=>{ for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){ if(item.title==="分班"){
columns.splice(key,1)
} }
if(item.title==="关卡得分"){ else if(item.title==="关卡得分"){
columns.splice(key,1)
} }
if(item.title==="效率分"){ else if(item.title==="效率分"){
columns.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnss.splice(key,1) }else{
columns.push(item);
} }
} }
})
}else{ }else{
if(course_group_info.length < 2){ if(course_group_info.length < 2){
for(var i=0;i< this.state.columns.length;i++){
columns.map((item,key)=>{ var item = this.state.columns[i];
if(item.title==="分班"){ if(item.title==="分班"){
columns.splice(key,1)
} }
if(item.title==="关卡得分"){ else if(item.title==="关卡得分"){
columns.splice(key,1)
} }
if(item.title==="效率分"){ else if(item.title==="效率分"){
columns.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnss.splice(key,1) }else{
columns.push(item);
} }
} }
})
}else {
columns.map((item,key)=>{ }else {
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="关卡得分"){ if(item.title==="关卡得分"){
columns.splice(key,1)
} }
if(item.title==="效率分"){ else if(item.title==="效率分"){
columns.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnss.splice(key,1) }else{
columns.push(item);
} }
} }
})
} }
} }
}else { }else {
if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined || course_group_info === null){ if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined || course_group_info === null){
columns.map((item,key)=>{
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){ if(item.title==="分班"){
columns.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnss.splice(key,1) }else{
columns.push(item);
} }
} }
})
}else { }else {
if(course_group_info.length < 2) { if(course_group_info.length < 2) {
for(var i=0;i< this.state.columns.length;i++){
columns.map((item,key)=>{ var item = this.state.columns[i];
if(item.title==="分班"){ if(item.title==="分班"){
columns.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnss.splice(key,1) }else{
columns.push(item);
} }
} }
})
} }
columns=this.state.columnss; columns=this.state.columnss;
} }

@ -391,16 +391,16 @@ class Listofworksstudentone extends Component {
let datalist = []; let datalist = [];
let datalists = []; let datalists = [];
var styletable = {"display": "none"} var styletable = {"display": "none"}
var arr =[];
for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(this.props.isNotMember()===true&&item.title==="学号") {
this.state.columns.map((item,key)=>{ }else{
if(this.props.isNotMember()===true) { arr.push(item);
if(item.title==="学号"){
this.state.columns.splice(key,1)
} }
} }
}) let columns2= arr;
let columns2=this.state.columns;
var teacherlist = undefined; var teacherlist = undefined;
var teacherlists = undefined; var teacherlists = undefined;
if (teacherdata !== undefined) { if (teacherdata !== undefined) {
@ -509,14 +509,18 @@ class Listofworksstudentone extends Component {
// 设置数据 // 设置数据
seacthdata = (teacherdata) => { seacthdata = (teacherdata) => {
let datalist = []; let datalist = [];
this.state.columns.map((item,key)=>{
if(this.props.isNotMember()===true) {
if(item.title==="学号"){ var arr =[];
this.state.columns.splice(key,1) for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
} }
} }
}) let columns2= arr;
let columns2=this.state.columns;
if (teacherdata !== undefined) { if (teacherdata !== undefined) {
// console.log("seacthdata设置数据") // console.log("seacthdata设置数据")

@ -410,10 +410,33 @@ class Workquestionandanswer extends Component {
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`} to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link> >设置</Link>
{/*<a className="fr color-blue font-16" href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`}>导出成绩</a>*/} {/*<a className="fr color-blue font-16" href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`}>导出成绩</a>*/}
{this.props.isAdmin() ? <a <style>{`
className="fr color-blue font-16" .drop_down_menu li a {
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`} padding: 0px;
>导出</a> : ""} font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
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":"-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() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>:"" : ""} <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>:"" : ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true? {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true?

@ -185,27 +185,44 @@ class LoginRegisterComponent extends Component {
}; };
loginInputonChange = (e) => { loginInputonChange = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({ this.setState({
login: e.target.value, login: stirngt,
}) })
} }
loginInputonChanges = (e) => { loginInputonChanges = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({ this.setState({
password: e.target.value, password: stirngt,
}) })
} }
loginInputonChangess = (e) => { loginInputonChangess = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({ this.setState({
passwords: e.target.value, passwords: stirngt,
}) })
} }
//获取code //获取code
codesonChange = (e) => { codesonChange = (e) => {
@ -380,12 +397,12 @@ class LoginRegisterComponent extends Component {
{ {
Phonenumberisnotco && Phonenumberisnotco != "" ? Phonenumberisnotco && Phonenumberisnotco != "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}> <p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign: "center", width: " 100%"}}>{Phonenumberisnotco}</span> <span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotco}</span>
</p> </p>
: <div style={{height: "25px"}}></div> : <div style={{height: "25px"}}></div>
} }
<DragValidator <DragValidator
height={38} successGreenColor="#45E15F" height={38} successGreenColor="#b0e811"
style={{height: "38px", width: "100%"}} style={{height: "38px", width: "100%"}}
dragOkCallback={this.dragOkCallback} dragOkCallback={this.dragOkCallback}
></DragValidator> ></DragValidator>

@ -468,11 +468,17 @@ class LoginRegisterComponent extends Component {
//获取登入 //获取登入
loginInputonChange = (e) => { loginInputonChange = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({ this.setState({
login: e.target.value, login: stirngt,
}) })
} }
//失去焦点判断 //失去焦点判断
inputOnBlur = (e, id) => { inputOnBlur = (e, id) => {
@ -482,23 +488,48 @@ class LoginRegisterComponent extends Component {
//获取登入密码 //获取登入密码
passwordonChange = (e) => { passwordonChange = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({ this.setState({
password: e.target.value password: stirngt,
}) })
// this.setState({
// password: e.target.value
// })
} }
//获取注册登入 //获取注册登入
loginInputonChanges = (e) => { loginInputonChanges = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({ this.setState({
logins: e.target.value, logins: stirngt,
}) })
} }
//获取注册密码 //获取注册密码
passwordonChanges = (e) => { passwordonChanges = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({ this.setState({
passwords: e.target.value passwords: stirngt,
}) })
} }
//获取code //获取code
@ -527,6 +558,12 @@ class LoginRegisterComponent extends Component {
// this.props.history.push(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key) // this.props.history.push(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key)
} }
loginonkeyup =(e)=>{
if(e.keyCode==32){
return false;
}
}
render() { render() {
const { const {
activeKey, activeKey,
@ -612,7 +649,7 @@ class LoginRegisterComponent extends Component {
{ {
Phonenumberisnotco && Phonenumberisnotco != "" ? Phonenumberisnotco && Phonenumberisnotco != "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}> <p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"center",width: " 100%"}}>{Phonenumberisnotco}</span> <span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotco}</span>
</p> </p>
: <div style={{height:"25px"}}></div> : <div style={{height:"25px"}}></div>
} }
@ -669,14 +706,14 @@ class LoginRegisterComponent extends Component {
{ {
Phonenumberisnotcos && Phonenumberisnotcos != "" ? Phonenumberisnotcos && Phonenumberisnotcos != "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}> <p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"center",width: " 100%"}}>{Phonenumberisnotcos}</span> <span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcos}</span>
</p> </p>
: <div style={{height:"25px"}}></div> : <div style={{height:"25px"}}></div>
} }
<DragValidator <DragValidator
height={38} className="loginInput" successGreenColor="#45E15F" height={38} className="loginInput" successGreenColor="#b0e811"
style={{ height: '38px'}} style={{ height: '38px'}}
dragOkCallback={this.dragOkCallback} dragOkCallback={this.dragOkCallback}
></DragValidator> ></DragValidator>

Loading…
Cancel
Save