From 65c58d25d7b6b316d2c81adddeaa0470839658ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Wed, 19 Feb 2020 16:30:09 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/question/NewMyShixunModel.js | 11 +++++++-
.../react/src/modules/question/Paperreview.js | 2 +-
.../modules/testpaper/Paperlibraryeditid.js | 28 +++++++++----------
3 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/public/react/src/modules/question/NewMyShixunModel.js b/public/react/src/modules/question/NewMyShixunModel.js
index d50f41484..301a51614 100644
--- a/public/react/src/modules/question/NewMyShixunModel.js
+++ b/public/react/src/modules/question/NewMyShixunModel.js
@@ -219,6 +219,12 @@ class NewMyShixunModel extends Component {
}
this.callback(defaultActiveKeys);
}
+ if(prevProps.Contentdata !== this.props.Contentdata){
+ this.setState({
+ Contentdata:this.props.Contentdata,
+ })
+
+ }
}
//公共和我的
@@ -884,7 +890,7 @@ class NewMyShixunModel extends Component {
page, per_page, items_count, Headertop, visible, placement, modalsType, modalsTypes,basket_list,
completion_questions_count, judgement_questions_count, multiple_questions_count, practical_questions_count,
program_questions_count, single_questions_count, subjective_questions_count,selectionbools,
- modalsTypeInaudit
+ modalsTypeInaudit,Contentdata
} = this.state;
const Datacount = completion_questions_count + judgement_questions_count
@@ -893,6 +899,8 @@ class NewMyShixunModel extends Component {
+ single_questions_count
+ subjective_questions_count;
+ // console.log("弹出框");
+ // console.log(Contentdata)
return (
@@ -962,6 +970,7 @@ class NewMyShixunModel extends Component {
/>
{/*头部*/}
- this.setnewmyshixunmodelbool(e)}>
+ this.setnewmyshixunmodelbool(e)}>
:
""
diff --git a/public/react/src/modules/testpaper/Paperlibraryeditid.js b/public/react/src/modules/testpaper/Paperlibraryeditid.js
index 8700a216f..5843a4709 100644
--- a/public/react/src/modules/testpaper/Paperlibraryeditid.js
+++ b/public/react/src/modules/testpaper/Paperlibraryeditid.js
@@ -31,7 +31,7 @@ class Paperlibraryeditid extends Component {
super(props);
this.Judquestio = React.createRef();
this.state = {
- paperlibrartdata: [],
+ Contentdata: [],
disciplinesdata: [],
knowledgepoints: [],
disciplmy: [],
@@ -139,7 +139,7 @@ class Paperlibraryeditid extends Component {
axios.get(urls).then((response) => {
if (response) {
this.setState({
- paperlibrartdata: response.data,
+ Contentdata: response.data,
item_banksedit: response.data.exam,
})
}
@@ -227,7 +227,7 @@ class Paperlibraryeditid extends Component {
}
render() {
- let {paperlibrartdata,newmyshixunmodelbool,defaultActiveKey} = this.state;
+ let {Contentdata,newmyshixunmodelbool,defaultActiveKey} = this.state;
const params = this.props && this.props.match && this.props.match.params;
let urlsysl=`/paperlibrary?defaultActiveKey=${defaultActiveKey}`;
@@ -248,7 +248,7 @@ class Paperlibraryeditid extends Component {
{
newmyshixunmodelbool===true?
- this.setnewmyshixunmodelbool(e)}>
+ this.setnewmyshixunmodelbool(e)}>
:
""
@@ -291,9 +291,9 @@ class Paperlibraryeditid extends Component {
this.setnewmyshixunmodelbool(e)}
- all_score={paperlibrartdata && paperlibrartdata.exam && paperlibrartdata.exam.all_questions_count}
- all_questions_count={paperlibrartdata && paperlibrartdata.exam && paperlibrartdata.exam.all_score}
- difficulty={paperlibrartdata && paperlibrartdata.exam && paperlibrartdata.exam.difficulty}
+ all_score={Contentdata && Contentdata.exam && Contentdata.exam.all_questions_count}
+ all_questions_count={Contentdata && Contentdata.exam && Contentdata.exam.all_score}
+ difficulty={Contentdata && Contentdata.exam && Contentdata.exam.difficulty}
>
@@ -301,15 +301,15 @@ class Paperlibraryeditid extends Component {
{...this.state}
{...this.props}
getdata={() => this.getdata()}
- single_questions={paperlibrartdata && paperlibrartdata.single_questions && paperlibrartdata.single_questions.questions.length > 0 ? paperlibrartdata.single_questions : null}
- multiple_questions={paperlibrartdata && paperlibrartdata.multiple_questions
- && paperlibrartdata.multiple_questions.questions.length > 0 ? paperlibrartdata.multiple_questions : null
+ single_questions={Contentdata && Contentdata.single_questions && Contentdata.single_questions.questions.length > 0 ? Contentdata.single_questions : null}
+ multiple_questions={Contentdata && Contentdata.multiple_questions
+ && Contentdata.multiple_questions.questions.length > 0 ? Contentdata.multiple_questions : null
}
- judgement_questions={paperlibrartdata && paperlibrartdata.judgement_questions
- && paperlibrartdata.judgement_questions.questions.length > 0 ? paperlibrartdata.judgement_questions : null
+ judgement_questions={Contentdata && Contentdata.judgement_questions
+ && Contentdata.judgement_questions.questions.length > 0 ? Contentdata.judgement_questions : null
}
- program_questions={paperlibrartdata && paperlibrartdata.program_questions
- && paperlibrartdata.program_questions.questions.length > 0 ? paperlibrartdata.program_questions : null
+ program_questions={Contentdata && Contentdata.program_questions
+ && Contentdata.program_questions.questions.length > 0 ? Contentdata.program_questions : null
}
>