From 276caa91a78bcee7ca3fc2ae0259dd08dd2b3d46 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, 26 Dec 2019 19:02:52 +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
---
.../modules/question/Questionitem_banks.js | 73 +++++++++++--------
1 file changed, 41 insertions(+), 32 deletions(-)
diff --git a/public/react/src/modules/question/Questionitem_banks.js b/public/react/src/modules/question/Questionitem_banks.js
index e874944ed..2bd7fd77a 100644
--- a/public/react/src/modules/question/Questionitem_banks.js
+++ b/public/react/src/modules/question/Questionitem_banks.js
@@ -238,8 +238,9 @@ class Questionitem_banks extends Component {
}
- console.log("preservation");
- console.log(this.contentMdRef.Getdatas());
+ // console.log("preservation");
+ // console.log(this.contentMdRef.Getdatas());
+ var Getdatasdata=this.contentMdRef.Getdatas();
if (this.state.item_type === null) {
@@ -269,13 +270,19 @@ class Questionitem_banks extends Component {
// repertoire_id:1,
// sub_repertoire_id:1,
// tag_repertoire_id:[1,3],
+
+ var myrbkc=[];
+ var Getdatasdatas=Getdatasdata.rbkc[1]
+ for(let myda of Getdatasdatas) {
+ myrbkc.push(myda.id);
+ }
var data = {
- discipline_id: 1,
- sub_discipline_id: 1,
- tag_discipline_id: [1, 3],
+ discipline_id: Getdatasdata.rbkc[0],
+ sub_discipline_id: myrbkc,
+ tag_discipline_id: Getdatasdata.rbzsd,
name: anserdata[0],
- item_type: "SINGLE",
- difficulty: 2,
+ item_type: Getdatasdata.rbtx,
+ difficulty:Getdatasdata.rbnd,
analysis: anserdata[3],
choices: choices,
@@ -341,16 +348,25 @@ class Questionitem_banks extends Component {
choices.push(choicesdata);
}
+
+ var myrbkc=[];
+ var Getdatasdatas=Getdatasdata.rbkc[1]
+ for(let myda of Getdatasdatas) {
+ myrbkc.push(myda.id);
+ }
var data = {
- discipline_id: 1,
- sub_discipline_id: 1,
- tag_discipline_id: [1, 3],
+ discipline_id: Getdatasdata.rbkc[0],
+ sub_discipline_id: myrbkc,
+ tag_discipline_id: Getdatasdata.rbzsd,
name: anserdata[0],
- item_type: "MULTIPLE",
- difficulty: 2,
+ item_type: Getdatasdata.rbtx,
+ difficulty:Getdatasdata.rbnd,
analysis: anserdata[3],
choices: choices,
- }
+
+ };
+
+
if (boolnew === true) {
axios.post(url, data)
.then((result) => {
@@ -402,17 +418,22 @@ class Questionitem_banks extends Component {
is_answer: anserdata[1] === "1" ? 1 : 0,
}
choices.push(choicesdatas);
+ var myrbkc=[];
+ var Getdatasdatas=Getdatasdata.rbkc[1]
+ for(let myda of Getdatasdatas) {
+ myrbkc.push(myda.id);
+ }
var data = {
- discipline_id: 1,
- sub_discipline_id: 1,
- tag_discipline_id: [1, 3],
+ discipline_id: Getdatasdata.rbkc[0],
+ sub_discipline_id: myrbkc,
+ tag_discipline_id: Getdatasdata.rbzsd,
name: anserdata[0],
- item_type: "JUDGMENT",
- difficulty: 2,
- analysis: anserdata[2],
+ item_type: Getdatasdata.rbtx,
+ difficulty:Getdatasdata.rbnd,
+ analysis: anserdata[3],
choices: choices,
- }
+ };
if (boolnew === true) {
axios.post(url, data)
.then((result) => {
@@ -461,18 +482,6 @@ class Questionitem_banks extends Component {
render() {
let {page, limit, count, Headertop, visible, placement, modalsType, item_type} = this.state;
-
- {/**/
- }
- {/**/
- }
- {/**/
- }
- {/**/
- }
-
- //////console.log("塞选的数据");
- //////console.log(item_type);
const params = this.props && this.props.match && this.props.match.params;
// //console.log(params);
return (