From 5195326ecc033a33088cf9cda98c1f9916b31fe7 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, 2 Jan 2020 13:39:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/testpaper/Testpaperlibrary.js | 22 +++++++++++++++ .../testpaper/component/Contentpart.js | 27 ++++++++++++------- .../component/Contentquestionbank.js | 6 ++--- .../modules/testpaper/component/Listjihe.js | 6 ++--- .../testpaper/testioncss/testioncss.css | 10 +++++++ 5 files changed, 56 insertions(+), 15 deletions(-) diff --git a/public/react/src/modules/testpaper/Testpaperlibrary.js b/public/react/src/modules/testpaper/Testpaperlibrary.js index 1d9ee01b8..4d062efd9 100644 --- a/public/react/src/modules/testpaper/Testpaperlibrary.js +++ b/public/react/src/modules/testpaper/Testpaperlibrary.js @@ -320,6 +320,27 @@ class Testpaperlibrary extends Component { }) }; + setdifficulty=(difficulty)=>{ + this.setState({ + difficulty: difficulty, + visiblemys: false, + }) + + 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: difficulty, + keywords: this.state.keywords, + page: this.state.page, + per_page:10, + }; + + this.getdata(data); + + } + render() { let{Headertop,items_count,page,per_page,modalsTypes,modalsType}=this.state; return ( @@ -353,6 +374,7 @@ class Testpaperlibrary extends Component { this.setdifficulty(e)} showmodels={(e)=>this.showmodels(e)} showmodelysl={(e)=>this.showmodelysl(e)} setdatafuns={(key)=>this.setdatafuns(key)} diff --git a/public/react/src/modules/testpaper/component/Contentpart.js b/public/react/src/modules/testpaper/component/Contentpart.js index 84ea7c17e..82f06e3f8 100644 --- a/public/react/src/modules/testpaper/component/Contentpart.js +++ b/public/react/src/modules/testpaper/component/Contentpart.js @@ -46,14 +46,18 @@ class Contentpart extends Component { width:'93px', height:'120px', }}> -

简单

+

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

-

适中

+

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

-

困难

+

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

); + + const difs=this.props.difficulty; + console.log("difs"); + console.log(difs); return (
@@ -124,8 +128,8 @@ class Contentpart extends Component {
-
- 难度 +
+ 难度 {this.props.difficulty===1?"(简单)":this.props.difficulty===1?"(适中)":this.props.difficulty===1?"(困难)":""}
@@ -159,18 +163,23 @@ class Contentpart extends Component {
{/*内容*/} { - this.props.Contentdata.items === undefined ||this.props.Contentdata.items === null||this.props.Contentdata.items.length===0 ? + this.props.Contentdata.exams === undefined ||this.props.Contentdata.exams === null||this.props.Contentdata.exams.length===0 ?
: -
+
{ defaultActiveKey===1||defaultActiveKey==="1"? - this.props.selectallquestionsonthispage()} > + :"" } { defaultActiveKey===0||defaultActiveKey==="0"? - this.props.selectallquestionsonthispage()}> + :"" }
diff --git a/public/react/src/modules/testpaper/component/Contentquestionbank.js b/public/react/src/modules/testpaper/component/Contentquestionbank.js index ceef1fd87..1e036f858 100644 --- a/public/react/src/modules/testpaper/component/Contentquestionbank.js +++ b/public/react/src/modules/testpaper/component/Contentquestionbank.js @@ -42,14 +42,14 @@ class Contentquestionbank extends Component { return ( -
-
+
+
- 共{this.props.items_count?this.props.items_count:0}个试题 + 共{this.props.items_count?this.props.items_count:0}个试卷
diff --git a/public/react/src/modules/testpaper/component/Listjihe.js b/public/react/src/modules/testpaper/component/Listjihe.js index 3aef5da9b..724a5def7 100644 --- a/public/react/src/modules/testpaper/component/Listjihe.js +++ b/public/react/src/modules/testpaper/component/Listjihe.js @@ -74,10 +74,10 @@ class Listjihe extends Component { return (
-
- +
+
-
+

{names}

试题数:{question_counts}

diff --git a/public/react/src/modules/testpaper/testioncss/testioncss.css b/public/react/src/modules/testpaper/testioncss/testioncss.css index 5bd523488..181334981 100644 --- a/public/react/src/modules/testpaper/testioncss/testioncss.css +++ b/public/react/src/modules/testpaper/testioncss/testioncss.css @@ -143,6 +143,7 @@ width: 1020px !important; background: #FFFFFF; border: 1px solid #DDDDDD; + margin-left: 20px; min-height:150px; } .borderwdswuh{ @@ -199,6 +200,15 @@ line-height: 42px; cursor:pointer; +} + +.subjecttitys{ + height:19px; + font-size:14px; + color:rgba(51,51,51,1); + line-height: 42px; + cursor:pointer; + } .ml55{ margin-right: 55px;