From 74db6a82efc73a8fcaa0c368009fcde4f5ac7912 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 3 Jul 2019 17:09:15 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/page/VNCDisplay.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/public/react/src/modules/page/VNCDisplay.js b/public/react/src/modules/page/VNCDisplay.js index 1e443ed1d..fd52fef07 100644 --- a/public/react/src/modules/page/VNCDisplay.js +++ b/public/react/src/modules/page/VNCDisplay.js @@ -108,6 +108,17 @@ class VNCDisplay extends Component { rfb.addEventListener("desktopname", updateDesktopName); // Set parameters that can be changed on an active connection 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); } From bf8af06de2d81f023012dc842dea7cd3183f621f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 4 Jul 2019 01:00:44 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/Studentshavecompletedthelist.js | 340 +++++++++--------- .../courses/shixunHomework/Listofworks.js | 103 +++--- .../shixunHomework/Listofworksstudentone.js | 34 +- .../shixunHomework/Workquestionandanswer.js | 31 +- .../src/modules/user/FindPasswordComponent.js | 35 +- .../modules/user/LoginRegisterComponent.js | 53 ++- 6 files changed, 349 insertions(+), 247 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index c2930bcdf..09cfdf947 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -1246,43 +1246,43 @@ class Studentshavecompletedthelist extends Component { this.Generatenewdatas(response.data.exercise_users); if (response.data.exercise_types.subjective === 0) { 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{ + var arr =[]; + for(var i=0;i{ + var arr =[]; + for(var i=0;i{ + else{ + arr.push(item); + } + } + + var arr2 =[]; + for(var i=0;i{ + + var arr =[]; + for(var i=0;i{ - if(item.title==="客观题得分"){ - this.state.columns.splice(key,1) + else{ + arr.push(item); } - if(item.title==="主观题得分"){ - this.state.columns.splice(key,1) + } + var arr2 =[]; + for(var i=0;i{ + + var arr =[]; + for(var i=0;i{ + else{ + arr.push(item); + } + } + + var arr2 =[]; + for(var i=0;i{ + // this.state.columnsys.map((item,key)=>{ + // + // }) + var arr =[]; + for(var i=0;i{ + + var arr =[]; + for(var i=0;i 0) { //显示分班 //8ge - this.state.columnsys.map((item,key)=>{ + + var arr =[]; + for(var i=0;i{ + var arr =[]; + for(var i=0;i 0) { - this.state.columnsys.map((item,key)=>{ - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columnsys.splice(key,1) - } + var arr =[]; + for(var i=0;i{ + var arr =[]; + for(var i=0;i{ + var arr =[]; + for(var i=0;i{ + for(var i=0;i< this.state.columns.length;i++){ + var item = this.state.columns[i]; if(item.title==="分班"){ - columns.splice(key,1) } - if(item.title==="关卡得分"){ - columns.splice(key,1) + else if(item.title==="关卡得分"){ } - if(item.title==="效率分"){ - columns.splice(key,1) + else if(item.title==="效率分"){ } - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columnss.splice(key,1) - } + else if(this.props.isNotMember()===true&&item.title==="学号") { + + }else{ + columns.push(item); } - }) + } + + }else{ if(course_group_info.length < 2){ - - columns.map((item,key)=>{ + for(var i=0;i< this.state.columns.length;i++){ + var item = this.state.columns[i]; if(item.title==="分班"){ - columns.splice(key,1) } - if(item.title==="关卡得分"){ - columns.splice(key,1) + else if(item.title==="关卡得分"){ } - if(item.title==="效率分"){ - columns.splice(key,1) + else if(item.title==="效率分"){ } - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columnss.splice(key,1) - } + else if(this.props.isNotMember()===true&&item.title==="学号") { + + }else{ + columns.push(item); } - }) - }else { + } - columns.map((item,key)=>{ - if(item.title==="关卡得分"){ - columns.splice(key,1) + }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) + else if(item.title==="效率分"){ } - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columnss.splice(key,1) - } + else if(this.props.isNotMember()===true&&item.title==="学号") { + + }else{ + columns.push(item); } - }) + } } } }else { if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined || course_group_info === null){ - columns.map((item,key)=>{ - if(item.title==="分班"){ - columns.splice(key,1) + + for(var i=0;i< this.state.columns.length;i++){ + var item = this.state.columns[i]; + if(item.title==="分班"){ } - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columnss.splice(key,1) - } + else if(this.props.isNotMember()===true&&item.title==="学号") { + + }else{ + columns.push(item); } - }) + } + + + + }else { if(course_group_info.length < 2) { - - columns.map((item,key)=>{ + for(var i=0;i< this.state.columns.length;i++){ + var item = this.state.columns[i]; if(item.title==="分班"){ - columns.splice(key,1) } - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columnss.splice(key,1) - } + else if(this.props.isNotMember()===true&&item.title==="学号") { + + }else{ + columns.push(item); } - }) + } } columns=this.state.columnss; } diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 2974bf6ac..cac639d13 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -391,16 +391,16 @@ class Listofworksstudentone extends Component { let datalist = []; let datalists = []; var styletable = {"display": "none"} + var arr =[]; + for(var i=0;i{ - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columns.splice(key,1) - } + }else{ + arr.push(item); } - }) - let columns2=this.state.columns; - + } + let columns2= arr; var teacherlist = undefined; var teacherlists = undefined; if (teacherdata !== undefined) { @@ -509,14 +509,18 @@ class Listofworksstudentone extends Component { // 设置数据 seacthdata = (teacherdata) => { let datalist = []; - this.state.columns.map((item,key)=>{ - if(this.props.isNotMember()===true) { - if(item.title==="学号"){ - this.state.columns.splice(key,1) - } + + + var arr =[]; + for(var i=0;i设置 {/*导出成绩*/} - {this.props.isAdmin() ? 导出 : ""} + + {this.props.isAdmin() ?
  • + 导出 + +
  • : ""} {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? 立即截止:"" : ""} {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true? diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index 393dbc023..2fe5df943 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -185,27 +185,44 @@ class LoginRegisterComponent extends Component { }; loginInputonChange = (e) => { // 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({ - login: e.target.value, + login: stirngt, }) - - } loginInputonChanges = (e) => { // 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({ - password: e.target.value, + password: stirngt, }) - } loginInputonChangess = (e) => { // 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({ - passwords: e.target.value, + passwords: stirngt, }) - } //获取code codesonChange = (e) => { @@ -380,12 +397,12 @@ class LoginRegisterComponent extends Component { { Phonenumberisnotco && Phonenumberisnotco != "" ?

    - {Phonenumberisnotco} + {Phonenumberisnotco}

    :
    } diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 9d7790ee1..12afd7831 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -468,11 +468,17 @@ class LoginRegisterComponent extends Component { //获取登入 loginInputonChange = (e) => { // 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({ - login: e.target.value, + login: stirngt, }) - } //失去焦点判断 inputOnBlur = (e, id) => { @@ -482,23 +488,48 @@ class LoginRegisterComponent extends Component { //获取登入密码 passwordonChange = (e) => { // 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({ - password: e.target.value + password: stirngt, }) + // this.setState({ + // password: e.target.value + // }) } //获取注册登入 loginInputonChanges = (e) => { // 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({ - logins: e.target.value, + logins: stirngt, }) } //获取注册密码 passwordonChanges = (e) => { // 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({ - passwords: e.target.value + passwords: stirngt, }) } //获取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) } + loginonkeyup =(e)=>{ + if(e.keyCode==32){ + + return false; + } + } render() { const { activeKey, @@ -612,7 +649,7 @@ class LoginRegisterComponent extends Component { { Phonenumberisnotco && Phonenumberisnotco != "" ?

    - {Phonenumberisnotco} + {Phonenumberisnotco}

    :
    } @@ -669,14 +706,14 @@ class LoginRegisterComponent extends Component { { Phonenumberisnotcos && Phonenumberisnotcos != "" ?

    - {Phonenumberisnotcos} + {Phonenumberisnotcos}

    :
    } From 3079a10c9ef5908c0c77c8ce538ed62c37419a8e Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 4 Jul 2019 09:15:12 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/page/component/UpdateDrawer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/component/UpdateDrawer.js b/public/react/src/modules/page/component/UpdateDrawer.js index b39445d9a..396e7a683 100644 --- a/public/react/src/modules/page/component/UpdateDrawer.js +++ b/public/react/src/modules/page/component/UpdateDrawer.js @@ -198,7 +198,7 @@ class UpdateDrawer extends Component { } - + { needUpdateScript ?