Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 5 years ago
commit e2b8c69f1e

@ -349,7 +349,7 @@ class Boards extends Component{
<React.Fragment> <React.Fragment>
{ isAdmin && !parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>添加目录</WordsBtn> } { isAdmin && !parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>添加目录</WordsBtn> }
{ isAdmin && !!parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>目录重命名</WordsBtn> } { isAdmin && !!parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>目录重命名</WordsBtn> }
{ isAdminOrStudent && <WordsBtn style="blue" className="" onClick={()=>this.onToBoardsNew()}>我要发</WordsBtn> } { isAdminOrStudent && <WordsBtn style="blue" className="" onClick={()=>this.onToBoardsNew()}>我要发</WordsBtn> }
</React.Fragment> </React.Fragment>
} }
secondRowLeft={ secondRowLeft={

@ -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{
let columnss2=this.state.columnss; arr.push(item);
}
}
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{
let columnss2=this.state.columnss; arr.push(item);
}
}
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{
let columnstwo2=this.state.columnstwo; arr.push(item);
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{
let columns2=this.state.columns arr2.push(item);
}
}
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{
let columnstwo2=this.state.columnstwo; arr.push(item);
this.state.columns.map((item,key)=>{
if(item.title==="客观题得分"){
this.state.columns.splice(key,1)
} }
if(item.title==="主观题得分"){ }
this.state.columns.splice(key,1) var arr2 =[];
for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="客观题得分"){
} }
if(this.props.isNotMember()===true) { else if(item.title==="主观题得分"){
if(item.title==="学号"){
this.state.columns.splice(key,1)
}
} }
}) else if(this.props.isNotMember()===true&&item.title==="学号") {
let columns2=this.state.columns
}
else{
arr2.push(item);
}
}
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{
let columnstwo2=this.state.columnstwo; arr.push(item);
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{
let columns2=this.state.columns arr2.push(item);
}
}
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{
thiss.setState({ arr.push(item);
}
}
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)
} }
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,
@ -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 {
if(item.title==="关卡得分"){ for(var i=0;i< this.state.columns.length;i++){
columns.splice(key,1) var item = this.state.columns[i];
if(item.title==="关卡得分"){
} }
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)=>{
if(item.title==="分班"){ for(var i=0;i< this.state.columns.length;i++){
columns.splice(key,1) var item = this.state.columns[i];
if(item.title==="分班"){
} }
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;
} }
@ -1326,6 +1327,47 @@ class Listofworks extends Component {
}); });
} }
// 导出实习报告批量
internshipreport = ()=>{
console.log("internshipreport");
let url = "/zip/shixun_report";
let homeworkid = this.props.match.params.homeworkid;
axios.get((url),{
params: {
homework_common_id: homeworkid,
work_status: this.state.course_groupyslstwo,
course_group: this.state.checkedValuesineinfo,
search: this.state.searchtext,
}
}).then((response) => {
console.log("1342");
console.log(response);
}).catch((error) => {
console.log(error)
});
}
// 课堂学生成绩的导出下载
Classstudentachievement=()=>{
console.log("Classstudentachievement");
const course_id = this.props.match.params.coursesId;
let url = "/courses/"+course_id+"/export_member_scores_excel.xlsx";
axios.get((url),{
params: {
group_id: this.state.checkedValuesineinfo,
search: this.state.searchtext,
}
}).then((response) => {
console.log("1306");
console.log(response);
}).catch((error) => {
console.log(error)
});
}
render() { render() {
// console.log("Listofworks.js000") // console.log("Listofworks.js000")
@ -1474,8 +1516,8 @@ class Listofworks extends Component {
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}> {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> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-0px","left":"unset","height":"auto"}}> <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 onClick={()=>this.internshipreport()}>实训报告</a></li>
<li><a href={`/api/homework_commons/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/works_list.xlsx`} >学生成绩</a></li> <li><a onClick={()=>this.Classstudentachievement()} >学生成绩</a></li>
</ul> </ul>
</li>:""} </li>:""}
{this.props.isAdmin() ? {this.props.isAdmin() ?

@ -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=this.state.columns; let columns2= arr;
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=this.state.columns; let columns2= arr;
if (teacherdata !== undefined) { if (teacherdata !== undefined) {
// console.log("seacthdata设置数据") // console.log("seacthdata设置数据")

@ -108,6 +108,17 @@ class VNCDisplay extends Component {
rfb.addEventListener("desktopname", updateDesktopName); rfb.addEventListener("desktopname", updateDesktopName);
// Set parameters that can be changed on an active connection // Set parameters that can be changed on an active connection
rfb.viewOnly = readQueryVariable('view_only', false); rfb.viewOnly = readQueryVariable('view_only', false);
// TODO scale
// https://github.com/novnc/noVNC/issues/1181
// http://localhost:3007/tasks/et8zqfkh9lsn
/**
https://www.shiyanlou.com/courses/?fee=free&page_size=20&category=Linux%E8%BF%90%E7%BB%B4&tag=%E5%85%A8%E9%83%A8&sort=default&preview=false
参考实验楼实现方式
div position: relative; width: 744.9px; height: 558.675px;
div position: relative; width: 1152px; height: 864px; transform-origin: 0px 0px; transform: scale(0.646615, 0.646615);
div width: 1152px; height: 864px; position: absolute; left: 0px; top: 0px; overflow: hidden;
canvas
*/
rfb.scaleViewport = readQueryVariable('scale', false); rfb.scaleViewport = readQueryVariable('scale', false);
} }

@ -198,7 +198,7 @@ class UpdateDrawer extends Component {
} }
</div> </div>
</DialogContent> </DialogContent>
<DialogActions id="dialog-actions" style={{ 'margin-bottom': '16px'}}> <DialogActions id="dialog-actions" >
{ needUpdateScript ? { needUpdateScript ?
<React.Fragment> <React.Fragment>
<Button <Button

@ -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