From dcab8ad79ff25747cacab58dd3116d0e04593fee Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 6 Sep 2019 10:33:41 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E8=BF=99=E4=B8=AA=E6=B2=A1=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E6=8A=96=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/NewWork.js | 2 +- public/react/src/modules/tpm/challengesnew/TPMMDEditor.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/NewWork.js b/public/react/src/modules/courses/busyWork/NewWork.js index 8000de59f..411cb351b 100644 --- a/public/react/src/modules/courses/busyWork/NewWork.js +++ b/public/react/src/modules/courses/busyWork/NewWork.js @@ -455,7 +455,7 @@ class NewWork extends Component{ `} - + {/* TpmQuestionEdit 这个没出现抖动 */} { 恢复 ? / 不恢复'; From 443e427a7eead02d0086a5d6d36c7d32a1355a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 6 Sep 2019 10:34:08 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E8=AF=BE=E5=A0=82=E6=96=B0=E5=BC=80=E9=A1=B5=20goback=20?= =?UTF-8?q?=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/new/CoursesNew.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index ec73cc17d..a2cc45916 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -335,11 +335,19 @@ class CoursesNew extends Component { // this.props.history.push(this.props.current_user.first_category_url); // } // window.history.go(-1) - if(id===undefined){ - this.props.history.goBack() - }else{ - this.props.history.push(this.props.current_user.first_category_url); - } + try { + if(id===undefined){ + this.props.history.push("/"); + }else{ + if(this.props.current_user.first_category_url===undefined){ + this.props.history.push("/"); + }else{ + this.props.history.push(this.props.current_user.first_category_url); + } + } + }catch (e) { + this.props.history.push("/"); + } } From 82c8634821da00a1110f3c6ecce826a8de5f4ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 6 Sep 2019 10:34:53 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/shixunHomework/ShixunWorkReport.js | 14 ++++++++------ .../shixunreport/ConclusionEvaluation.js | 2 +- .../shixunreport/OfficialAcademicTranscript.js | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index e74627c03..11a9b2f34 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -168,27 +168,29 @@ class ShixunWorkReport extends Component { // }) // // } + let{work_comment,work_comment_hidden}=this.state; this.setState({ showAppraiseModaltype:true, + work_comment_hidden:work_comment===null||work_comment===undefined?this.state.work_type?true:false:work_comment_hidden, }) } hideAppraiseModal=()=>{ - let{data,work_comment}=this.state; + let{work_comment,work_comment_hidden}=this.state; this.setState({ showAppraiseModaltype:false, - work_comment_hidden:data&&data.work_comment_hidden===true?true:work_comment!=null?true:false, + work_comment_hidden:work_comment===null||work_comment===undefined?this.state.work_type===1?true:false:work_comment_hidden, }) } showAppraiseModals=(list,type)=>{ - let{data,work_comment}=this.state; + this.setState({ showAppraiseModaltype:false, - work_comment_hidden:data&&data.work_comment_hidden===true?true:work_comment!=null?true:false, + work_comment_hidden:type===0?false:true, work_comment:list, work_type:type, showAppraiseModals:true, - showAppraiseModalsshow:true + showAppraiseModalsshow:true, }) } isdeleteModal=()=>{ @@ -258,7 +260,7 @@ class ShixunWorkReport extends Component { Cancel={()=>this.hideAppraiseModal()} showCancel={(list,type)=>this.showAppraiseModals(list,type)} work_comment={this.state.work_comment} - work_type={this.state.work_type} + work_type={work_comment===null||work_comment===undefined?this.state.work_type:work_comment_hidden===true?1:0} />:""}
diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js b/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js index 3ae69dfaa..d5c8aa57f 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js +++ b/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js @@ -81,7 +81,7 @@ class ConclusionEvaluation extends Component { ), }, { - title: '耗时', + title: '实战耗时', key: 'elapsed', dataIndex: 'elapsed', diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js index 2195228e1..2a79ce829 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js +++ b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js @@ -150,7 +150,7 @@ class OfficialAcademicTranscript extends Component { ), }, { - title: '耗时', + title: '实战耗时', key: 'elapsedtime', dataIndex: 'elapsedtime', From e9ec302cfd05050259e412ce29bac1eac7229728 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 6 Sep 2019 10:35:42 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=9A=84=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E4=B8=8D=E5=8A=A0=E7=AE=A1=E7=90=86=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/home_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 37cfed3fb..665eaa294 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -29,7 +29,7 @@ class HomeController < ApplicationController @subjects = Subject.where(homepage_show: 1).includes(:shixuns, :repertoire).limit(8) @tea_users = User.where(homepage_teacher: 1).includes(:user_extension).limit(10).order("experience desc") - @stu_users = User.includes(:user_extension).where(user_extensions: {identity: 1}).limit(10).order("experience desc") + @stu_users = User.where(is_test: 0).includes(:user_extension).where(user_extensions: {identity: 1}).limit(10).order("experience desc") end def search From bfcb26af6712ca7ffce4bc855e916fa6e5a99ebc Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 6 Sep 2019 11:00:01 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E8=AF=95=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/Testpapersettinghomepage.js | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index 2c56b8b58..5775bd240 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -200,19 +200,20 @@ class Testpapersettinghomepage extends Component{ }) } }else { - this.setState({ donwloading: true }) - downloadFile({ - url: urll, - successCallback: (url) => { - this.setState({ donwloading: false }) - console.log('successCallback') - }, - failCallback: (responseHtml, url) => { - this.setState({ donwloading: false }) - console.log('failCallback') - } - }) - this.props.showNotification(`正在下载中`); + this.props.slowDownload(urll) + // this.setState({ donwloading: true }) + // downloadFile({ + // url: urll, + // successCallback: (url) => { + // this.setState({ donwloading: false }) + // console.log('successCallback') + // }, + // failCallback: (responseHtml, url) => { + // this.setState({ donwloading: false }) + // console.log('failCallback') + // } + // }) + // this.props.showNotification(`正在下载中`); // window.open("/api"+url+`?${queryString.stringify(params)}`+ '&export=true', '_blank'); } @@ -380,7 +381,8 @@ class Testpapersettinghomepage extends Component{ 导出 :""} From 71ba4136232f910e2642bd97a558b510c07ec7d0 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 6 Sep 2019 11:21:47 +0800 Subject: [PATCH 6/6] disableVideoContextMenu = () => { --- public/react/src/App.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/public/react/src/App.js b/public/react/src/App.js index 7cd219dba..520855519 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -334,8 +334,17 @@ class App extends Component { }) } } + disableVideoContextMenu = () => { + window.$( "body" ).on( "mousedown", "video", function() { + if(event.which === 3) { + window.$('video').bind('contextmenu',function () { return false; }); + } else { + window.$('video').unbind('contextmenu'); + } + }); + } componentDidMount() { - + this.disableVideoContextMenu(); // force an update if the URL changes history.listen(() => {