From c45deb32740a82f822a878d9f8039fe6720ae78d Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Mon, 9 Mar 2020 14:30:28 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E6=8E=89=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E6=88=B7=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 8f74f0474..54eb19474 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -182,7 +182,7 @@ class ShixunsController < ApplicationController select m.user_id, u.login, u.lastname, m.updated_at, (select sum(cost_time) from games g where g.myshixun_id = m.id) as time, (select sum(final_score) from games g where g.myshixun_id = m.id) as score - from (users u left join myshixuns m on m.user_id = u.id) where m.shixun_id = #{@shixun.id} and m.status = 1 + from (users u left join myshixuns m on m.user_id = u.id) where u.is_test =0 and m.shixun_id = #{@shixun.id} and m.status = 1 order by score desc, time asc limit 10 " @myshixuns = Myshixun.find_by_sql(sql) From b22a4f826684a8ec7b491b7fbf779e24aa202df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 9 Mar 2020 14:37:37 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E8=80=83=E8=AF=95=E6=8F=90=E7=A4=BA=E6=AD=A3=E5=9C=A8=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/Question.js | 3 -- .../question/component/QuestionModal.js | 16 +++++++-- .../modules/testpaper/Paperlibraryseeid.js | 36 ++++++++++++++++--- 3 files changed, 45 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index 772a75fb1..87d05f71a 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -742,9 +742,6 @@ class Question extends Component { } // 撤销 getitem_basketss=(id)=>{ - this.setState({ - - }) if(Undoclickable===true){ Undoclickable=false; //选用题型可以上传单个 或者多个题型 diff --git a/public/react/src/modules/question/component/QuestionModal.js b/public/react/src/modules/question/component/QuestionModal.js index de7614f37..87338faa7 100644 --- a/public/react/src/modules/question/component/QuestionModal.js +++ b/public/react/src/modules/question/component/QuestionModal.js @@ -28,11 +28,21 @@ class QuestionModal extends Component { width="442px" >
-

{this.props.titilesm}

-

{this.props.titiless}

+ {this.props.titilesm? +

{this.props.titilesm}

+ + : + "" + } + { + this.props.titiless? +

{this.props.titiless}

+ : + "" + }
this.props.modalCancel()}>取消 - this.props.setDownload()}>确定 + this.props.setDownload()}>{this.props.boolok?this.props.boolok:"确定"}
diff --git a/public/react/src/modules/testpaper/Paperlibraryseeid.js b/public/react/src/modules/testpaper/Paperlibraryseeid.js index d81a0afa7..ce529c05e 100644 --- a/public/react/src/modules/testpaper/Paperlibraryseeid.js +++ b/public/react/src/modules/testpaper/Paperlibraryseeid.js @@ -19,6 +19,7 @@ import '../tpm/newshixuns/css/Newshixuns.css'; import Bottomsubmit from "../../modules/modals/Bottomsubmit"; import Seeoagertit from "./component/Seeoagertit"; import Paperlibraryseeid_item from './component/Paperlibraryseeid_item'; +import QuestionModal from "../question/component/QuestionModal"; //人工组卷预览 class Paperlibraryseeid extends Component { constructor(props) { @@ -27,8 +28,10 @@ class Paperlibraryseeid extends Component { this.state = { paperlibrartdata:[], defaultActiveKey:"0", - - + modalsType:false, + titilesm:"", + titiless:"", + boolok:"知道了" } @@ -91,7 +94,11 @@ class Paperlibraryseeid extends Component { } preservation = () => { //保存试卷 - + this.setState({ + modalsType: true, + titilesm: "功能正在内测中,敬请期待", + titiless: "", + }) @@ -109,13 +116,34 @@ class Paperlibraryseeid extends Component { getcontentMdRef = (Ref) => { this.contentMdRef = Ref; } + + modalCancel =()=>{ + this.setState({ + modalsType: false, + }) + + } + + setDownload =()=>{ + this.setState({ + modalsType: false, + }) + + } + render() { - let {paperlibrartdata,defaultActiveKey} = this.state; + let {paperlibrartdata,defaultActiveKey,titilesm,titiless,boolok,modalsType} = this.state; const params = this.props && this.props.match && this.props.match.params; // ////console.log(params); let urlsysl=`/paperlibrary?defaultActiveKey=${defaultActiveKey}`; return (
+ { + modalsType===true? + this.modalCancel()} + setDownload={() => this.setDownload()}> + :"" + }
From 606d05b391574f5aff7d0b7eb87f1ac4a8a5eda3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 9 Mar 2020 14:51:25 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/question/component/Contentpart.js | 50 +------------------ .../modules/question/component/Listjihe.js | 14 ++++-- 2 files changed, 12 insertions(+), 52 deletions(-) diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index f4fba7d5f..e3f5259e5 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -232,39 +232,6 @@ class Contentpart extends Component { } - const content = ( -
-

this.props.setitem_types(null)}>全部

-

-

this.props.setitem_types("SINGLE")}>单选题

-

-

this.props.setitem_types("MULTIPLE")}>多选题

-

-

this.props.setitem_types("JUDGMENT")}>判断题

-

-

this.props.setitem_types("PROGRAM")}>编程题

-

- -
- ); - const contents = ( -
-

this.props.setoj_status(null)}>全部

-

-

this.props.setoj_status(0)}>未发布

-

-

this.props.setoj_status(1)}>已发布

-

-
- ); - - // console.log("Contentpart.js"); // console.log(this.props.current_user.professional_certification); @@ -381,22 +348,6 @@ class Contentpart extends Component { :"" } - {item_type==="PROGRAM"? - defaultActiveKey===0||defaultActiveKey==="0"? - trigger.parentNode} placement="bottom" trigger="hover" content={contents} onVisibleChange={()=>this.props.handleVisibleChange(true)}> -
- -
- 全部 -
- -
-
- : - "":"" - } - - { this.props.Isitapopup&&this.props.Isitapopup==="true"? { return ( { items.item_type==="PROGRAM"? - this.seturls(`/problems/${items.program_attr.identifier}/edit`)} className="ml10 flex1 mt2"> -
-
+ ( + this.props.defaultActiveKeys&&this.props.defaultActiveKeys==="0"? + this.seturls(`/problems/${items.program_attr.identifier}/edit`)} className="ml10 flex1 mt2 xiaoshou"> +
+
+ : +

+

+

+ ) + :