From b697c97076c56bb8f4ccb81ed09514c2ac188c3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 31 Dec 2019 13:40:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=B7=A5=E7=BB=84=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/question/Paperreview.js | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/public/react/src/modules/question/Paperreview.js b/public/react/src/modules/question/Paperreview.js index e66cdbe67..0edb59677 100644 --- a/public/react/src/modules/question/Paperreview.js +++ b/public/react/src/modules/question/Paperreview.js @@ -198,31 +198,31 @@ class Paperreview extends Component { } console.log("this.contentMdRef.Getdatas()"); console.log(this.contentMdRef.Getdatas()); - // var Getdatasdata = this.contentMdRef.Getdatas() - // var myrbkc=[]; - // var Getdatasdatas=Getdatasdata[2].rbzsd; - // for(let myda of Getdatasdatas) { - // myrbkc.push(myda.id); - // } - - // + + var myrbkc=[]; + var Getdatasdatas=this.contentMdRef.Getdatas()[2].rbzsd; + for(let myda of Getdatasdatas) { + myrbkc.push(myda.id); + } const url = `/examination_banks.json`; - // var data={ - // difficulty:this.contentMdRef.Getdatas()[0].rbnd, - // name:this.contentMdRef.Getdatas()[4].classroom, - // duration:this.contentMdRef.Getdatas()[5].kssc, - // duration:this.contentMdRef.Getdatas()[5].kssc, - // - // } - // axios.post(url, data) - // .then((result) => { - // if (result.data.status == 0) { - // this.props.showNotification(`组卷成功`); - // this.props.history.replace('./paperlibrary'); - // } - // }).catch((error) => { - // console.log(error); - // }) + var data={ + difficulty:this.contentMdRef.Getdatas()[0].rbnd, + name:this.contentMdRef.Getdatas()[4].classroom, + duration:this.contentMdRef.Getdatas()[5].kssc, + discipline_id: this.contentMdRef.Getdatas()[3].rbkc[0], + sub_discipline_id: this.contentMdRef.Getdatas()[3].rbkc[1], + tag_discipline_id: myrbkc, + + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`组卷成功`); + this.props.history.replace('./paperlibrary'); + } + }).catch((error) => { + console.log(error); + }) }else{ this.setCohetepaperbool(true);