From b30367bb84985e7db740c0b9d7d188ad59e8e800 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, 6 Jan 2020 16:20:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=98=E5=BA=93=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/Question.js | 49 ++++++++++++++-- .../modules/question/component/Contentpart.js | 56 ++++++++++++------- .../question/component/Headplugselections.js | 4 +- .../modules/question/component/Listjihe.js | 52 ++++++++++++++--- .../question/questioncss/questioncom.css | 27 +++++++++ .../modules/testpaper/component/Listjihe.js | 12 ++-- .../testpaper/testioncss/testioncss.css | 13 +++++ 7 files changed, 174 insertions(+), 39 deletions(-) diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index d017e3187..73b7eb00d 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -62,6 +62,7 @@ class Question extends Component { disciplinesdatakc:0, disciplinesdatazsd:0, selectallquestionsonthispages:false, + oj_status:null, } } @@ -73,6 +74,7 @@ class Question extends Component { keywords:"", page:1, per_page:10, + oj_status:null }) var data = { discipline_id:discipline_id, @@ -84,6 +86,7 @@ class Question extends Component { keywords: null, page: this.state.page, per_page:10, + oj_status:null }; this.getdata(data); @@ -96,6 +99,7 @@ class Question extends Component { keywords:"", page:1, per_page:10, + oj_status:null }) var data = { discipline_id:this.state.discipline_id, @@ -107,6 +111,7 @@ class Question extends Component { keywords:null, page: 1, per_page:10, + oj_status:null }; this.getdata(data); } @@ -117,6 +122,7 @@ class Question extends Component { keywords:"", page:1, per_page:10, + oj_status:null }) var data = { discipline_id:this.state.discipline_id, @@ -128,6 +134,7 @@ class Question extends Component { keywords: null, page: 1, per_page:10, + oj_status:null }; this.getdata(data); } @@ -175,13 +182,14 @@ class Question extends Component { } }); } - + //公共和我的 callback = (key) => { this.setState({ defaultActiveKey: key, selectallquestionsonthispages:false, difficulty:null, - page:1 + page:1, + oj_status:null }) var data = { discipline_id:this.state.discipline_id, @@ -192,6 +200,7 @@ class Question extends Component { difficulty: null, page: 1, per_page:10, + oj_status:null }; this.getdata(data); @@ -245,6 +254,7 @@ class Question extends Component { keywords: this.state.keywords, page: pageNumber, per_page:10, + oj_status:this.state.oj_status }; this.getdata(data); } @@ -340,7 +350,8 @@ class Question extends Component { visiblemys: false, page: 1, per_page:10, - keywords:"" + keywords:"", + oj_status:null }) var data = { @@ -353,6 +364,7 @@ class Question extends Component { keywords:null, page:1, per_page:10, + oj_status:null }; this.getdata(data); @@ -364,7 +376,8 @@ class Question extends Component { visiblemyss: false, page: 1, per_page:10, - keywords:"" + keywords:"", + oj_status:null }) var data = { @@ -376,7 +389,8 @@ class Question extends Component { item_type: item_type, page: 1, per_page:10, - keywords:null + keywords:null, + oj_status:null }; this.getdata(data); @@ -443,6 +457,7 @@ class Question extends Component { keywords: value, page: this.state.page, per_page:10, + oj_status:this.state.oj_status }; this.getdata(data); @@ -646,6 +661,27 @@ class Question extends Component { } + setoj_status=(oj_status)=>{ + //编程题发布未发布 + this.setState({ + selectallquestionsonthispages:false, + difficulty:null, + oj_status:oj_status + }) + var data = { + discipline_id:this.state.discipline_id, + sub_discipline_id:this.state.sub_discipline_id, + tag_discipline_id:this.state.tag_discipline_id, + public: this.state.defaultActiveKey, + difficulty: this.state.difficulty, + item_type: this.state.item_type, + keywords: this.state.keywords, + page: this.state.page, + per_page:10, + oj_status:oj_status + }; + this.getdata(data); + } render() { let { page, per_page, items_count, Headertop, visible, placement, modalsType, modalsTypes,basket_list, @@ -735,7 +771,8 @@ class Question extends Component { handleVisibleChange={(e) => this.handleVisibleChange(e)} showmodels={(e) => this.showmodels(e)} showmodelysl={(e) => this.showmodelysl(e)} - callback={(e) => this.callback(e)}> + callback={(e) => this.callback(e)} + setoj_status={(e)=>this.setoj_status(e)}> { items_count&&items_count>10? diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index 0fd38e4e3..7d18f4c11 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -72,13 +72,11 @@ class Contentpart extends Component { width:'93px', height:'161px', }}> -

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

+

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

-

this.props.setdifficulty(1)}>简单

+

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

-

this.props.setdifficulty(2)}>适中

-

-

this.props.setdifficulty(3)}>困难

+

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

); @@ -158,15 +156,22 @@ class Contentpart extends Component { :"" } - {/* trigger.parentNode} placement="bottom" trigger="hover" content={contents} onVisibleChange={()=>this.props.handleVisibleChange(true)}>*/} - {/*
*/} + { + defaultActiveKey===0||defaultActiveKey==="0"? + trigger.parentNode} placement="bottom" trigger="hover" content={contents} onVisibleChange={()=>this.props.handleVisibleChange(true)}> +
+ +
+ 全部 +
+ +
+
+ : + "" + } + - {/*
*/} - {/* 难度*/} - {/*
*/} - {/* */} - {/*
*/} - {/*
*/} @@ -179,14 +184,25 @@ class Contentpart extends Component { {/**/} {/**/} + { + defaultActiveKey===0||defaultActiveKey==="0"? + this.props.setdatafunsval(e)} + onSearch={ (value)=>this.props.setdatafuns(value)} /> + : + this.props.setdatafunsval(e)} + onSearch={ (value)=>this.props.setdatafuns(value)} /> + } - this.props.setdatafunsval(e)} - onSearch={ (value)=>this.props.setdatafuns(value)} /> diff --git a/public/react/src/modules/question/component/Headplugselections.js b/public/react/src/modules/question/component/Headplugselections.js index 1c5fe878f..8d2cd6d01 100644 --- a/public/react/src/modules/question/component/Headplugselections.js +++ b/public/react/src/modules/question/component/Headplugselections.js @@ -33,14 +33,14 @@ class Headplugselections extends Component { titlesttings:null, titlesttingss:null, status: undefined, - diff: 0, + diff: null, InputValue: undefined, shixunhoverData: [], shixunchildValues:'', shixunsearchAllvalue:"a", openStatus:false, openLevel:false, - tixing:0, + tixing:null, } } diff --git a/public/react/src/modules/question/component/Listjihe.js b/public/react/src/modules/question/component/Listjihe.js index 1ec52e1dd..f1a20378e 100644 --- a/public/react/src/modules/question/component/Listjihe.js +++ b/public/react/src/modules/question/component/Listjihe.js @@ -77,7 +77,7 @@ class Listjihe extends Component { return ( -
+
{/*顶部*/}
@@ -149,7 +149,13 @@ class Listjihe extends Component {

编程语言:{items.program_attr.language}

:"" } - + { + items.item_type==="PROGRAM"? + items.program_attr.status===0? +

未发布

+ :"" + :"" + }
{ @@ -158,9 +164,22 @@ class Listjihe extends Component { 撤销

: + items.item_type==="PROGRAM"? + items.program_attr.status===0? +

+ + 选用 +

+ : +

this.Selectingpracticaltraining(items.id)}> + + 选用 +

+ :

this.Selectingpracticaltraining(items.id)}> - 选用

+ 选用 +

} { defaultActiveKey===0||defaultActiveKey==="0"? @@ -185,11 +204,25 @@ class Listjihe extends Component {

} + { + items.public===false? + items.item_type==="PROGRAM"? + items.program_attr.status===0? + "" + : +

this.props.showmodels(items.id)}> + + 公开 +

+ : +

this.props.showmodels(items.id)}> + + 公开 +

+ : + "" + } -

this.props.showmodels(items.id)}> - - 公开 -

:"" } @@ -217,6 +250,11 @@ class Listjihe extends Component { >

+ { + items&&items.analysis? + "" + :"" + }

编辑

-

this.props.showmodels(items.id)} > - - 公开 -

+ { + items.public === false ? +

this.props.showmodels(items.id)}> + + 公开 +

+ :"" + }
:""} diff --git a/public/react/src/modules/testpaper/testioncss/testioncss.css b/public/react/src/modules/testpaper/testioncss/testioncss.css index d21f07cb7..fa87531b0 100644 --- a/public/react/src/modules/testpaper/testioncss/testioncss.css +++ b/public/react/src/modules/testpaper/testioncss/testioncss.css @@ -871,3 +871,16 @@ position:absolute; z-index: 700; } + +.sjtitle:hover{ + color: #4CACFF; +} +.nofabu{ + width:46px; + height:20px; + background:rgba(255,102,1,1); + border-radius:10px; + color: #ffffff; + text-align: center; + line-height: 20px; +}