From 64d78d9df73109fe5e1deea520990da5586e01b5 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 Mar 2020 21:48:22 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/Paperreview.js | 6 +++--- .../src/modules/question/Paperreview_item.js | 2 +- .../src/modules/question/Questionitem_banks.js | 16 ++++++++-------- .../modules/question/component/Contentpart.js | 2 +- .../src/modules/question/component/Listjihe.js | 2 +- .../src/modules/question/component/SiderBars.js | 2 +- .../modules/testpaper/component/Contentpart.js | 4 ++-- .../component/Paperlibraryseeid_item.js | 2 +- .../component/Paperlibraryseeid_itemss.js | 2 +- .../modules/testpaper/component/Seeoagertits.js | 2 +- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/public/react/src/modules/question/Paperreview.js b/public/react/src/modules/question/Paperreview.js index 425815d62..874eb9bbd 100644 --- a/public/react/src/modules/question/Paperreview.js +++ b/public/react/src/modules/question/Paperreview.js @@ -418,7 +418,7 @@ class Paperreview extends Component { artificialtype==="artificial"? 试题库 - 人工组卷 + 人工组卷 试卷预览 : @@ -429,7 +429,7 @@ class Paperreview extends Component { : - 试题库 + 试题库 新增试卷 } @@ -461,7 +461,7 @@ class Paperreview extends Component { this.setCohetepaperbool(bool)} - onSubmits={() => this.preservation()} url={ artificialtype==="artificial"?'/question':'/paperlibrary'}> + onSubmits={() => this.preservation()} url={ artificialtype==="artificial"?'/problemset':'/paperlibrary'}> ) diff --git a/public/react/src/modules/question/Paperreview_item.js b/public/react/src/modules/question/Paperreview_item.js index 8f3ca4f28..a4c5e5773 100644 --- a/public/react/src/modules/question/Paperreview_item.js +++ b/public/react/src/modules/question/Paperreview_item.js @@ -463,7 +463,7 @@ class Paperreview_item extends Component { } jixuxuantioncli = () => { - this.props.history.replace("/question"); + this.props.history.replace("/problemset"); } showparagraphs = (e,name) => { diff --git a/public/react/src/modules/question/Questionitem_banks.js b/public/react/src/modules/question/Questionitem_banks.js index b70332269..aade5de2e 100644 --- a/public/react/src/modules/question/Questionitem_banks.js +++ b/public/react/src/modules/question/Questionitem_banks.js @@ -312,7 +312,7 @@ class Questionitem_banks extends Component { if (result.data.status == 0) { // this.props.showNotification(`新增单选题成功`); this.restricte=true; - this.props.history.replace('/question'); + this.props.history.replace('/problemset'); } }).catch((error) => { @@ -324,7 +324,7 @@ class Questionitem_banks extends Component { if (result.data.status == 0) { // this.props.showNotification(`编辑单选题成功`); this.restricte=true; - this.props.history.replace('/question'); + this.props.history.replace('/problemset'); } @@ -392,7 +392,7 @@ class Questionitem_banks extends Component { if (result.data.status == 0) { // this.props.showNotification(`新增多选题成功`); this.restricte=true; - this.props.history.replace('/question'); + this.props.history.replace('/problemset'); } @@ -406,7 +406,7 @@ class Questionitem_banks extends Component { if (result.data.status == 0) { // this.props.showNotification(`编辑多选题成功`); this.restricte=true; - this.props.history.replace('/question'); + this.props.history.replace('/problemset'); } @@ -461,7 +461,7 @@ class Questionitem_banks extends Component { if (result.data.status == 0) { // this.props.showNotification(`新增判断题成功`); this.restricte=true; - this.props.history.replace('/question'); + this.props.history.replace('/problemset'); } }).catch((error) => { @@ -474,7 +474,7 @@ class Questionitem_banks extends Component { if (result.data.status == 0) { // this.props.showNotification(`编辑判断题成功`); this.restricte=true; - this.props.history.replace('/question'); + this.props.history.replace('/problemset'); } }).catch((error) => { @@ -561,7 +561,7 @@ class Questionitem_banks extends Component {
- 试题库 + 试题库 {JSON.stringify(params) === "{}" ? "新增" : "编辑"}试题
@@ -627,7 +627,7 @@ class Questionitem_banks extends Component { "" : this.preservation()} url={'/question'}> + onSubmits={() => this.preservation()} url={'/problemset'}> }
) diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index 449e0e9e4..f8e2ee400 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -201,7 +201,7 @@ class Contentpart extends Component { } - this.props.history.push("/question/newitem?pages="+this.props.pages+urls); + this.props.history.push("/problemset/newitem?pages="+this.props.pages+urls); } render() { diff --git a/public/react/src/modules/question/component/Listjihe.js b/public/react/src/modules/question/component/Listjihe.js index 34d8844e7..14652cdef 100644 --- a/public/react/src/modules/question/component/Listjihe.js +++ b/public/react/src/modules/question/component/Listjihe.js @@ -495,7 +495,7 @@ class Listjihe extends Component { this.props.Isitapopup&&this.props.Isitapopup==="true"? "" : - this.seturls(`/question/edit/${items.id}`)}> + this.seturls(`/problemset/edit/${items.id}`)}>

编辑 diff --git a/public/react/src/modules/question/component/SiderBars.js b/public/react/src/modules/question/component/SiderBars.js index e6cee7761..724ae7f79 100644 --- a/public/react/src/modules/question/component/SiderBars.js +++ b/public/react/src/modules/question/component/SiderBars.js @@ -117,7 +117,7 @@ class SiderBars extends Component { {this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?

{ - mypath&&mypath==="/question"&&swsilan===true? + mypath&&mypath==="/problemset"&&swsilan===true?
this.props.showDrawer()} > diff --git a/public/react/src/modules/testpaper/component/Contentpart.js b/public/react/src/modules/testpaper/component/Contentpart.js index 5148e00ca..3f86a30f9 100644 --- a/public/react/src/modules/testpaper/component/Contentpart.js +++ b/public/react/src/modules/testpaper/component/Contentpart.js @@ -73,7 +73,7 @@ class Contentpart extends Component { } //跳转人工组卷 Mantegeneration=()=>{ - this.props.history.push('/question'); + this.props.history.push('/problemset'); } @@ -375,7 +375,7 @@ class Contentpart extends Component {
- this.xinzenw('/question')}> + this.xinzenw('/problemset')}>

人工组卷

diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js index 06298299f..58959d745 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js @@ -286,7 +286,7 @@ class Paperreview_item extends Component { } jixuxuantioncli = () => { - this.props.history.replace("/question"); + this.props.history.replace("/problemset"); } showparagraphs = (e,name) => { diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js index 754a45560..2cdc60623 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js @@ -361,7 +361,7 @@ class Paperlibraryseeid_itemss extends Component { } jixuxuantioncli = () => { - this.props.history.replace("/question"); + this.props.history.replace("/problemset"); } showparagraphs = (e,name) => { diff --git a/public/react/src/modules/testpaper/component/Seeoagertits.js b/public/react/src/modules/testpaper/component/Seeoagertits.js index a983bd67e..573655a63 100644 --- a/public/react/src/modules/testpaper/component/Seeoagertits.js +++ b/public/react/src/modules/testpaper/component/Seeoagertits.js @@ -26,7 +26,7 @@ class Seeoagertit extends Component { onChange=(e)=> { } jixuxuantioncli = () => { - this.props.history.replace("/question"); + this.props.history.replace("/problemset"); } render() { From 9ebaedf84a0805d8c61f8b0e48f5a5f0a279ff50 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 Mar 2020 21:50:11 +0800 Subject: [PATCH 02/13] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/App.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/App.js b/public/react/src/App.js index 4c4908771..947cf51a5 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -807,16 +807,16 @@ class App extends Component { render={ (props) => () } /> - () } /> - () } /> - () } /> @@ -835,7 +835,7 @@ class App extends Component { (props) => () }/> - () }/> From 720dd7bdf1e9f5933179c75537429bcc5e3b06aa 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 Mar 2020 21:51:02 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMIndexHOC.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 9ba60c27a..a5da90e2c 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -769,7 +769,7 @@ export function TPMIndexHOC(WrappedComponent) { {...this.dialogObj} />:""} { - mypath&&mypath==="/question"? + mypath&&mypath==="/problemset"? "" : Date: Fri, 6 Mar 2020 21:55:21 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E9=9A=90=E8=97=8F=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E7=BB=84=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../testpaper/component/Contentpart.js | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/testpaper/component/Contentpart.js b/public/react/src/modules/testpaper/component/Contentpart.js index 3f86a30f9..f5c0a5cb4 100644 --- a/public/react/src/modules/testpaper/component/Contentpart.js +++ b/public/react/src/modules/testpaper/component/Contentpart.js @@ -368,18 +368,24 @@ class Contentpart extends Component {
- - this.xinzenw('/Integeneration')}> -
-

智能组卷

-
-
- this.xinzenw('/problemset')}> -
+

人工组卷

+ + + {/*this.xinzenw('/Integeneration')}>*/} + {/*
*/} + {/*

智能组卷

*/} + {/*
*/} + {/*
*/} + + {/*this.xinzenw('/problemset')}>*/} + {/*
*/} + {/*

人工组卷

*/} + {/*
*/} + {/*
*/}
:"" } From c26a13cb1807e220ebeb6a53ed51b5ccc51729e7 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 Mar 2020 22:18:19 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E9=9A=90=E8=97=8F=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E7=BB=84=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/Paperreview.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/question/Paperreview.js b/public/react/src/modules/question/Paperreview.js index 874eb9bbd..273b53a0f 100644 --- a/public/react/src/modules/question/Paperreview.js +++ b/public/react/src/modules/question/Paperreview.js @@ -236,7 +236,8 @@ class Paperreview extends Component { .then((result) => { if (result.data.status === 0) { // this.props.showNotification(`组卷成功`); - this.props.history.replace('/paperlibrary'); + // console.log(result.data.exam_id); + this.props.history.replace('/paperlibrary/see/'+result.data.exam_id); } }).catch((error) => { //console.log(error); From 3b933c1be905aed76274d12b7f876870fba2e0e2 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 Mar 2020 22:18:46 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E9=9A=90=E8=97=8F=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E7=BB=84=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/Paperreview.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/react/src/modules/question/Paperreview.js b/public/react/src/modules/question/Paperreview.js index 273b53a0f..f40ad9519 100644 --- a/public/react/src/modules/question/Paperreview.js +++ b/public/react/src/modules/question/Paperreview.js @@ -237,6 +237,7 @@ class Paperreview extends Component { if (result.data.status === 0) { // this.props.showNotification(`组卷成功`); // console.log(result.data.exam_id); + //本来调试卷库首页的 this.props.history.replace('/paperlibrary/see/'+result.data.exam_id); } }).catch((error) => { From 0f2b00d014c80a9bd643e2b3255b21fb6724f128 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 Mar 2020 22:21:50 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/question/questioncss/questioncom.css | 10 +++++----- .../src/modules/testpaper/testioncss/testioncss.css | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/question/questioncss/questioncom.css b/public/react/src/modules/question/questioncss/questioncom.css index a0c791190..d5ac90d12 100644 --- a/public/react/src/modules/question/questioncss/questioncom.css +++ b/public/react/src/modules/question/questioncss/questioncom.css @@ -419,10 +419,10 @@ color: #4CACFF; } .xiaoshou{ - cursor:pointer; + cursor:pointer !important; } .xiaoshout{ - cursor:default; + cursor:default !important; } .mt40{ margin-top: 40px; @@ -1129,7 +1129,7 @@ .typeGreen{ color:#15DB7A; border:1px solid #15DB7A; -} +} .typeBlue{ color:#0CB9F1; border:1px solid #0CB9F1; @@ -1137,8 +1137,8 @@ .typeRed{ color:#FF5555; border:1px solid #FF5555; -} +} .typeYellow{ color:#FFB538; border:1px solid #FFB538; -} \ No newline at end of file +} diff --git a/public/react/src/modules/testpaper/testioncss/testioncss.css b/public/react/src/modules/testpaper/testioncss/testioncss.css index 56c2e36c0..8c9597ed0 100644 --- a/public/react/src/modules/testpaper/testioncss/testioncss.css +++ b/public/react/src/modules/testpaper/testioncss/testioncss.css @@ -400,13 +400,13 @@ color: #4CACFF; } .xiaoshou{ - cursor:pointer; + cursor:pointer !important; } .xiaoshout{ - cursor:default; + cursor:default !important; } .shubiao{ - cursor:default; + cursor:default !important; } .mt40{ margin-top: 40px; From bf3a8fb7af37a1f62e2526ed4ae38d64d1905245 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 Mar 2020 22:44:47 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/modals/Bottomsubmit.js | 10 +++++++--- public/react/src/modules/question/Paperreview.js | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/modals/Bottomsubmit.js b/public/react/src/modules/modals/Bottomsubmit.js index 187910cb9..22fb7c8fd 100644 --- a/public/react/src/modules/modals/Bottomsubmit.js +++ b/public/react/src/modules/modals/Bottomsubmit.js @@ -12,9 +12,13 @@ class Bottomsubmit extends Component { cannelfun = () => { // window.location.href= - if(this.props.Cohetepaperbool===true){ - this.props.setCohetepaperbool(false); - }else { + try { + if(this.props.Cohetepaperbool===true){ + this.props.setCohetepaperbool(false); + }else { + this.props.history.replace(this.props.url); + } + }catch (e) { this.props.history.replace(this.props.url); } diff --git a/public/react/src/modules/question/Paperreview.js b/public/react/src/modules/question/Paperreview.js index f40ad9519..fadba71ca 100644 --- a/public/react/src/modules/question/Paperreview.js +++ b/public/react/src/modules/question/Paperreview.js @@ -463,6 +463,7 @@ class Paperreview extends Component { this.setCohetepaperbool(bool)} + Cohetepaperbool={this.state.Cohetepaperbool} onSubmits={() => this.preservation()} url={ artificialtype==="artificial"?'/problemset':'/paperlibrary'}>
) From cdfd060d39b420f52736ff1103e59c9aa93aade6 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 Mar 2020 22:52:33 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/Question.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index b7553311d..81d70bdb3 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -940,6 +940,15 @@ class Question extends Component { return (
+ { mydisplay===true? @@ -966,11 +975,7 @@ class Question extends Component { :"" } - { - visible===true? +
- :""} { modalsTypes===true? this.modalCancels()} From 926339043d447d36f21694dd27fadae94bfb3fda 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 Mar 2020 22:57:25 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E9=A2=98=E5=BA=93=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/developer/newOrEditTask/index.js | 38 +++++++++---------- .../modules/developer/studentStudy/index.js | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/public/react/src/modules/developer/newOrEditTask/index.js b/public/react/src/modules/developer/newOrEditTask/index.js index 565d6af30..b95668413 100644 --- a/public/react/src/modules/developer/newOrEditTask/index.js +++ b/public/react/src/modules/developer/newOrEditTask/index.js @@ -1,7 +1,7 @@ /* * @Description: 新建或编辑任务 - * @Author: tangjiang - * @Date: 2019-11-15 16:38:34 + * @Author: tangjiang + * @Date: 2019-11-15 16:38:34 * @Last Modified by: tangjiang * @Last Modified time: 2019-11-19 23:23:41 */ @@ -20,7 +20,7 @@ import actions from '../../../redux/actions'; // import {ModalConfirm} from '../../../common/components/ModalConfirm'; const NewOrEditTask = (props) => { - const { + const { publishLoading, handlePublish, // testCases = [], @@ -41,7 +41,7 @@ const NewOrEditTask = (props) => { courseQuestions // updateTestAndValidate, } = props; - + // 表单提交 const handleSubmitForm = () => { // 改变loading状态 @@ -53,7 +53,7 @@ const NewOrEditTask = (props) => { props.handleFormSubmit(props); // 提交表单 } }; - + useEffect(() => { // 获取用户信息 getUserInfoForNew(); @@ -121,7 +121,7 @@ const NewOrEditTask = (props) => { // 清空描述信息 toStore('oj_description', ''); // props.history.push('/problems'); - props.history.push(`/question?${props.searchParams}`); + props.history.push(`/problemset?${props.searchParams}`); } // 发布 @@ -163,8 +163,8 @@ const NewOrEditTask = (props) => { onClick={handleClickCancel} style={{ background: '#666666', color: '#fff', border: 'none' }} >取消 - @@ -174,14 +174,14 @@ const NewOrEditTask = (props) => { // 发布/模拟挑战 const renderPubOrFight = () => { const pubButton = isPublish - ? () - : (); @@ -191,13 +191,13 @@ const NewOrEditTask = (props) => { ) : ( ); - + if (isPublish) { return ( {pubButton} - @@ -207,8 +207,8 @@ const NewOrEditTask = (props) => { } else { return ( - @@ -217,7 +217,7 @@ const NewOrEditTask = (props) => { ); } - + } // 渲染退出 @@ -296,7 +296,7 @@ const mapDispatchToProps = (dispatch) => ({ clearOJFormStore: () => dispatch(actions.clearOJFormStore()), // 按钮状态 changeSubmitLoadingStatus: (flag) => dispatch(actions.changeSubmitLoadingStatus(flag)), - // 发布按钮状态 + // 发布按钮状态 changePublishLoadingStatus: (flag) => dispatch(actions.changePublishLoadingStatus(flag)), // 测试用例及验证 updateTestAndValidate: (obj) => dispatch(actions.updateTestAndValidate(obj)), diff --git a/public/react/src/modules/developer/studentStudy/index.js b/public/react/src/modules/developer/studentStudy/index.js index 2af70efdf..e6a11482c 100644 --- a/public/react/src/modules/developer/studentStudy/index.js +++ b/public/react/src/modules/developer/studentStudy/index.js @@ -129,7 +129,7 @@ function StudentStudy (props) { changeShowOrHideControl(false); props.saveEditorCodeForDetail(''); // props.history.push('/problems'); - props.history.push(`/question?${searchParams}`); + props.history.push(`/problemset?${searchParams}`); } return ( From 05c22c1615fc3a2173530ab84636165c6d79b228 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 Mar 2020 23:21:36 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E9=A2=98=E5=BA=93=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/redux/actions/ojForUser.js | 32 ++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/public/react/src/redux/actions/ojForUser.js b/public/react/src/redux/actions/ojForUser.js index 87c877fa5..934d12e49 100644 --- a/public/react/src/redux/actions/ojForUser.js +++ b/public/react/src/redux/actions/ojForUser.js @@ -1,17 +1,17 @@ /* - * @Description: + * @Description: * @Author: tangjiang - * @Github: + * @Github: * @Date: 2019-11-27 13:42:11 * @LastEditors : tangjiang * @LastEditTime : 2020-02-10 18:17:00 */ import types from "./actionTypes"; import { Base64 } from 'js-base64'; -import { +import { fetchStartProgram, fetchUserProgramDetail, - fetchDebuggerCode, + fetchDebuggerCode, fetchCodeSubmit, fetchUserCommitRecord, fetchUserCommitRecordDetail, @@ -50,7 +50,7 @@ export const startProgramQuestion = (id, props) => { // console.log(path); // props.history.push(`/myproblems/${identifier}`); props.history.push({ - pathname: `/myproblems/${identifier}?${searchParams}`, + pathname: `/myproblems/${identifier}.json?${searchParams}`, }); } } @@ -90,7 +90,7 @@ export const getUserProgramDetail = (identifier, type) => { type: types.SAVE_USE_TEST_CASE_VALUE, payload: data.test_case || {} }); - // 代码是否更新 + // 代码是否更新 let _modify_code = false; if (data.hack) { _modify_code = data.hack.modify_code; @@ -145,7 +145,7 @@ export const saveUserCodeForInterval = (identifier, code) => { /** * @description 保存或更新之前先更新代码 - * @param {*} identifier + * @param {*} identifier * @param {*} inputValue 输入值: 自定义 | 系统返回的 * @param {*} type 测评类型 debug | submit */ @@ -157,7 +157,7 @@ export const updateCode = (identifier, inputValue, type) => { fetchUpdateCode(identifier, { code: Base64.encode(userCode) }).then(res => { - // 是否更新了代码, 目的是当代码没有更新时不调用更新代码接口,目录没有实现 + // 是否更新了代码, 目的是当代码没有更新时不调用更新代码接口,目录没有实现 // TODO 需要优化 if (res.data.status === 401) { dispatch({ // 改变 loading 值 @@ -187,7 +187,7 @@ export const codeEvaluate = (dispatch, identifier, type, time_limit, hackStatus, let count = 1; /** * @param {*} excuteTime 执行时间 - * @param {*} finalTime 总时间 + * @param {*} finalTime 总时间 * @param {*} count 执行次数 * @param {*} timer 定时器 */ @@ -199,7 +199,7 @@ export const codeEvaluate = (dispatch, identifier, type, time_limit, hackStatus, if (+status === 0 || (excuteTime / 1000) > (finalTime + 1)) { clearInterval(timer); // 清除定时器 timer = null; - let returnData = null; + let returnData = null; if (status === 1) { // 结果没有返回 returnData = { error_line: -1, @@ -221,7 +221,7 @@ export const codeEvaluate = (dispatch, identifier, type, time_limit, hackStatus, payload: { type, data: returnData - } + } }); if (!type || type === 'debug') { dispatch({ // 改变 loading 值 @@ -287,13 +287,13 @@ export const codeEvaluate = (dispatch, identifier, type, time_limit, hackStatus, /** * @description 调试代码 - * @param {*} identifier + * @param {*} identifier * @param {*} inputValue 输入值: 自定义 | 系统返回的 * @param {*} type 测评类型 debug | submit */ export const debuggerCode = (identifier,value, type) => { return (dispatch, getState) => { - // 调用之前 先保存 code + // 调用之前 先保存 code // TODO // console.log(identifier, value); const { hack } = getState().ojForUserReducer; @@ -398,7 +398,7 @@ export const changeUserCodeTab = (key) => { /** * @description 用户提交代码, 先调用保存代码接口,再调提交接口,成功后调用调试接口 - * @param {*} identifier + * @param {*} identifier */ export const submitUserCode = (identifier, inputValue, type) => { return (dispatch, getState) => { @@ -430,7 +430,7 @@ export const submitUserCode = (identifier, inputValue, type) => { fetchUpdateCode(identifier, { code: userCode }).then(res => { - // 是否更新了代码, 目的是当代码没有更新时不调用更新代码接口,目录没有实现 + // 是否更新了代码, 目的是当代码没有更新时不调用更新代码接口,目录没有实现 // TODO 需要优化 if (res.data.status === 401) { dispatch({ @@ -495,7 +495,7 @@ export const saveOpacityType = (type) => { type: types.CLICK_OPERATE_TYPE, payload: type } -} +} export const clearOjForUserReducer = () => { From 1c6f1c412379693c6abb4dea4173d472af6bc6d8 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 Mar 2020 23:25:17 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/scripts/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/scripts/build.js b/public/react/scripts/build.js index aafa2e765..f8cec6702 100644 --- a/public/react/scripts/build.js +++ b/public/react/scripts/build.js @@ -221,7 +221,7 @@ function generateNewIndexJsp() { // var result = data .replace(jsMinAllRegex, code) - .replace(flvMinAllRegex) + .replace(flvMinAllRegex,'') // .replace('/js/js_min_all.js', `${cdnHost}/react/build/js/js_min_all.js?v=${newVersion}`) // .replace('/js/js_min_all_2.js', `${cdnHost}/react/build/js/js_min_all_2.js?v=${newVersion}`) From d0dd909c992acd966ed7bbf790476437d5957705 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 6 Mar 2020 23:43:10 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/hack_set.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/hack_set.rb b/app/models/hack_set.rb index 2c21c3c22..fb37f398c 100644 --- a/app/models/hack_set.rb +++ b/app/models/hack_set.rb @@ -1,7 +1,7 @@ class HackSet < ApplicationRecord validates_length_of :input, maximum: 1000, message: "不能超过1000个字符" validates_length_of :output, maximum: 1000, message: "不能超过1000个字符" - validates :input, presence: { message: "测试集输入不能为空" } + #validates :input, presence: { message: "测试集输入不能为空" } validates :output, presence: { message: "测试集输出不能为空" } validates_uniqueness_of :input, scope: [:hack_id, :input], message: "多个测试集的输入不能相同" # 编程题测试集