From 5e4f53570fcbc01e73f0949d56e4990c45c43502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 10 Jan 2020 19:15:57 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=B8=85=E7=90=86conslog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/question/NewMyShixunModel.js | 40 +++++++------- .../react/src/modules/question/Paperreview.js | 18 +++---- .../src/modules/question/Paperreview_item.js | 22 ++++---- .../src/modules/question/Paperreview_items.js | 6 +-- .../modules/question/Paperreview_judgment.js | 2 +- .../modules/question/Paperreview_multlple.js | 2 +- .../modules/question/Paperreview_program.js | 2 +- public/react/src/modules/question/Question.js | 36 ++++++------- .../modules/question/Questionitem_banks.js | 42 +++++++-------- .../question/component/ChoquesEditor.js | 24 ++++----- .../modules/question/component/Contentpart.js | 4 +- .../question/component/Contentquestionbank.js | 10 ++-- .../question/component/Headplugselection.js | 4 +- .../question/component/Headplugselections.js | 17 +++--- .../question/component/IntelligentModel.js | 2 +- .../question/component/Itembankstop.js | 54 +++++++++---------- .../question/component/JudquestionEditor.js | 34 ++++++------ .../question/component/Newknledpots.js | 10 ++-- .../component/Paperreview_itemModel.js | 4 +- .../component/Paperreview_itemModels.js | 4 +- .../modules/question/component/SiderBars.js | 6 +-- .../question/component/SingleEditor.js | 48 ++++++++++------- .../comthetestpaper/Comthetestpaperst.js | 38 ++++++------- .../comthetestpaper/Intelligentcomponents.js | 30 +++++------ .../src/modules/testpaper/Intecomponents.js | 32 +++++------ .../modules/testpaper/Paperlibraryeditid.js | 10 ++-- .../modules/testpaper/Paperlibraryseeid.js | 4 +- .../src/modules/testpaper/Testpaperlibrary.js | 20 +++---- .../component/Contentquestionbank.js | 10 ++-- .../component/Paperlibraryseeid_item.js | 36 ++++++------- .../component/Paperlibraryseeid_itemss.js | 22 ++++---- 31 files changed, 299 insertions(+), 294 deletions(-) diff --git a/public/react/src/modules/question/NewMyShixunModel.js b/public/react/src/modules/question/NewMyShixunModel.js index 8922abd76..232ba9d72 100644 --- a/public/react/src/modules/question/NewMyShixunModel.js +++ b/public/react/src/modules/question/NewMyShixunModel.js @@ -97,7 +97,7 @@ class NewMyShixunModel extends Component { } - setsub_discipline_id=(sub_discipline_id)=>{ + setsub_discipline_id=(discipline_id,sub_discipline_id)=>{ this.setState({ sub_discipline_id:sub_discipline_id, tag_discipline_id:null, @@ -107,7 +107,7 @@ class NewMyShixunModel extends Component { oj_status:null }) var data = { - discipline_id:this.state.discipline_id, + discipline_id:discipline_id, sub_discipline_id:sub_discipline_id, tag_discipline_id:null, public: this.state.defaultActiveKey, @@ -161,8 +161,8 @@ class NewMyShixunModel extends Component { this.callback(defaultActiveKeys); let url = `/users/get_navigation_info.json`; axios.get(url, {}).then((response) => { - // ////console.log("开始请求/get_navigation_info.json"); - // ////console.log(response); + // //////console.log("开始请求/get_navigation_info.json"); + // //////console.log(response); if (response != undefined) { if (response.status === 200) { this.setState({ @@ -180,8 +180,8 @@ class NewMyShixunModel extends Component { axios.get(urls, {params: { source:"question" }}).then((response) => { - console.log("Questiondisciplines"); - console.log(response.data); + //console.log("Questiondisciplines"); + //console.log(response.data); if (response) { this.setState({ disciplinesdata: response.data.disciplines, @@ -254,15 +254,15 @@ class NewMyShixunModel extends Component { } else { } - ////console.log("item_banks"); - ////console.log(response); + //////console.log("item_banks"); + //////console.log(response); this.setState({ Contentdata: response.data, items_count: response.data.items_count, }) this.getdataslen(response.data.items); }).catch((error) => { - ////console.log(error) + //////console.log(error) this.setState({ booljupyterurls:false, }) @@ -288,8 +288,8 @@ class NewMyShixunModel extends Component { } else { } - ////console.log("item_banks"); - ////console.log(response); + //////console.log("item_banks"); + //////console.log(response); this.setState({ Contentdata: response.data, items_count: response.data.items_count, @@ -590,7 +590,7 @@ class NewMyShixunModel extends Component { } }) .catch(function (error) { - //console.log(error); + ////console.log(error); }); } publicopentimu = (id) => { @@ -616,7 +616,7 @@ class NewMyShixunModel extends Component { this.getdata(data); } }).catch((error) => { - //console.log(error); + ////console.log(error); }) } @@ -625,8 +625,8 @@ class NewMyShixunModel extends Component { // const url = "/item_baskets/basket_list.json"; // axios.get(url) // .then((result) => { - // // //console.log("getbasket_listdata"); - // // //console.log(result.data); + // // ////console.log("getbasket_listdata"); + // // ////console.log(result.data); // this.setState({ // completion_questions_count: result.data.completion_questions_count, // judgement_questions_count: result.data.judgement_questions_count, @@ -638,7 +638,7 @@ class NewMyShixunModel extends Component { // }) // // }).catch((error) => { - // // //console.log(error); + // // ////console.log(error); // this.setState({ // completion_questions_count: 0, // judgement_questions_count: 0, @@ -687,7 +687,7 @@ class NewMyShixunModel extends Component { // }) } }).catch((error) => { - //console.log(error); + ////console.log(error); }) } // 撤销 @@ -715,7 +715,7 @@ class NewMyShixunModel extends Component { this.getbasket_listdata(); } }).catch((error) => { - //console.log(error); + ////console.log(error); }) }else{ url=`/examination_banks/${this.props.exam_id}/revoke_item.json`; @@ -741,7 +741,7 @@ class NewMyShixunModel extends Component { this.getbasket_listdata(); } }).catch((error) => { - //console.log(error); + ////console.log(error); }) } @@ -815,7 +815,7 @@ class NewMyShixunModel extends Component { } }) .catch(function (error) { - //console.log(error); + ////console.log(error); }); } diff --git a/public/react/src/modules/question/Paperreview.js b/public/react/src/modules/question/Paperreview.js index b321a40a2..2adc77c03 100644 --- a/public/react/src/modules/question/Paperreview.js +++ b/public/react/src/modules/question/Paperreview.js @@ -67,8 +67,8 @@ class Paperreview extends Component { //初始化 componentDidMount() { - console.log("Paperreview.js"); - console.log(this.props.match.params); + //console.log("Paperreview.js"); + //console.log(this.props.match.params); this.setState({ artificialtype:this.props.match.params.type }) @@ -185,7 +185,7 @@ class Paperreview extends Component { } }).catch((error) => { - ////console.log(error) + //////console.log(error) this.setState({ booljupyterurls: false, }) @@ -238,7 +238,7 @@ class Paperreview extends Component { this.props.history.replace('/paperlibrary'); } }).catch((error) => { - console.log(error); + //console.log(error); }) }else{ @@ -321,12 +321,12 @@ class Paperreview extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - console.log(result); + //console.log(result); var data = {} this.getdata(data); } }).catch((error) => { - console.log(error); + //console.log(error); }) } //换题 @@ -338,12 +338,12 @@ class Paperreview extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - console.log(result); + //console.log(result); var data = {} this.getdata(data); } }).catch((error) => { - console.log(error); + //console.log(error); }) } @@ -361,7 +361,7 @@ class Paperreview extends Component { render() { let {page, limit, count, Headertop, visible, placement, modalsType, item_type,artificialtype,Cohetepaperbool,newmyshixunmodelbool,Intelligentformation} = this.state; const params = this.props && this.props.match && this.props.match.params; - // //console.log(params); + // ////console.log(params); return (
{ - console.log(error); + //console.log(error); }) } @@ -114,7 +114,7 @@ class Paperreview_item extends Component { this.props.getdata({}); } }).catch((error) => { - console.log(error); + //console.log(error); }) @@ -135,7 +135,7 @@ class Paperreview_item extends Component { this.props.getdata({}); } }).catch((error) => { - console.log(error); + //console.log(error); }) } @@ -155,7 +155,7 @@ class Paperreview_item extends Component { this.props.getdata({}); } }).catch((error) => { - console.log(error); + //console.log(error); }) } @@ -190,7 +190,7 @@ class Paperreview_item extends Component { this.Singlemagazine("", false); } }).catch((error) => { - console.log(error); + //console.log(error); }) } @@ -207,7 +207,7 @@ class Paperreview_item extends Component { this.Singlemagazines(false); } }).catch((error) => { - console.log(error); + //console.log(error); }) } @@ -255,7 +255,7 @@ class Paperreview_item extends Component { } }) .catch(function (error) { - //console.log(error); + ////console.log(error); }); @@ -299,7 +299,7 @@ class Paperreview_item extends Component { } hideparagraph = (name) => { - console.log("hideparagraph"); + //console.log("hideparagraph"); } @@ -312,7 +312,7 @@ class Paperreview_item extends Component { }) } showparagraph = (name) => { - console.log("showparagraph"); + //console.log("showparagraph"); if (name === "SINGLE") { this.setState({ singlebool: true, @@ -364,8 +364,8 @@ class Paperreview_item extends Component { } showparagraphs = (e,name) => { - // console.log("showparagraphs"); - // console.log(e); + // //console.log("showparagraphs"); + // //console.log(e); this.setState({ paperreviewsingleindex: e, paperreviewsinglename:name, diff --git a/public/react/src/modules/question/Paperreview_items.js b/public/react/src/modules/question/Paperreview_items.js index fde883105..75ed4a248 100644 --- a/public/react/src/modules/question/Paperreview_items.js +++ b/public/react/src/modules/question/Paperreview_items.js @@ -58,9 +58,9 @@ class Paperreview_items extends Component { render() { let {paperreviewsingleindex,paperreviewsinglename,typenames,indexs,object,typenamesn}=this.props; - // console.log(object); - // console.log("Paperreview_items"); - // console.log(object.item_id); + // //console.log(object); + // //console.log("Paperreview_items"); + // //console.log(object.item_id); return (
{ diff --git a/public/react/src/modules/question/Paperreview_judgment.js b/public/react/src/modules/question/Paperreview_judgment.js index 7e5b884be..c2736356d 100644 --- a/public/react/src/modules/question/Paperreview_judgment.js +++ b/public/react/src/modules/question/Paperreview_judgment.js @@ -59,7 +59,7 @@ class Paperreview_judgment extends Component { render() { let {questions,totalscore,total,items} = this.state; - // //console.log(params); + // ////console.log(params); return (
{ + setsub_discipline_id=(discipline_id,sub_discipline_id)=>{ this.setState({ sub_discipline_id:sub_discipline_id, tag_discipline_id:null, @@ -123,7 +123,7 @@ class Question extends Component { oj_status:null }) var data = { - discipline_id:this.state.discipline_id, + discipline_id:discipline_id, sub_discipline_id:sub_discipline_id, tag_discipline_id:null, public: this.state.defaultActiveKey, @@ -179,8 +179,8 @@ class Question extends Component { axios.get(urls, {params: { source:"question" }}).then((response) => { - console.log("Questiondisciplines"); - console.log(response.data); + //console.log("Questiondisciplines"); + //console.log(response.data); if (response) { this.setState({ disciplinesdata: response.data.disciplines, @@ -234,15 +234,15 @@ class Question extends Component { } else { } - ////console.log("item_banks"); - ////console.log(response); + //////console.log("item_banks"); + //////console.log(response); this.setState({ Contentdata: response.data, items_count: response.data.items_count, }) this.getdataslen(response.data.items); }).catch((error) => { - ////console.log(error) + //////console.log(error) this.setState({ booljupyterurls:false, }) @@ -268,8 +268,8 @@ class Question extends Component { } else { } - ////console.log("item_banks"); - ////console.log(response); + //////console.log("item_banks"); + //////console.log(response); this.setState({ Contentdata: response.data, items_count: response.data.items_count, @@ -566,7 +566,7 @@ class Question extends Component { } }) .catch(function (error) { - //console.log(error); + ////console.log(error); }); } publicopentimu = (id) => { @@ -590,7 +590,7 @@ class Question extends Component { this.getdata(data); } }).catch((error) => { - //console.log(error); + ////console.log(error); }) } @@ -599,8 +599,8 @@ class Question extends Component { const url = "/item_baskets/basket_list.json"; axios.get(url) .then((result) => { - // //console.log("getbasket_listdata"); - // //console.log(result.data); + // ////console.log("getbasket_listdata"); + // ////console.log(result.data); this.setState({ completion_questions_count: result.data.completion_questions_count, judgement_questions_count: result.data.judgement_questions_count, @@ -612,7 +612,7 @@ class Question extends Component { }) }).catch((error) => { - // //console.log(error); + // ////console.log(error); this.setState({ completion_questions_count: 0, judgement_questions_count: 0, @@ -654,7 +654,7 @@ class Question extends Component { // }) } }).catch((error) => { - //console.log(error); + ////console.log(error); }) } // 撤销 @@ -681,7 +681,7 @@ class Question extends Component { this.getbasket_listdata(); } }).catch((error) => { - //console.log(error); + ////console.log(error); }) } //全选试题库 @@ -750,7 +750,7 @@ class Question extends Component { } }) .catch(function (error) { - //console.log(error); + ////console.log(error); }); } @@ -902,7 +902,7 @@ class Question extends Component { setdifficulty={(e) => this.setdifficulty(e)} setitem_types={(e) => this.setitem_types(e)} setdiscipline_id={(e)=>this.setdiscipline_id(e)} - setsub_discipline_id={(e)=>this.setsub_discipline_id(e)} + setsub_discipline_id={(e,id)=>this.setsub_discipline_id(e,id)} settag_discipline_id={(e)=>this.settag_discipline_id(e)} /> {/*头部*/} diff --git a/public/react/src/modules/question/Questionitem_banks.js b/public/react/src/modules/question/Questionitem_banks.js index 0c27dc0fa..549bcc5ae 100644 --- a/public/react/src/modules/question/Questionitem_banks.js +++ b/public/react/src/modules/question/Questionitem_banks.js @@ -52,8 +52,8 @@ class Questionitem_banks extends Component { // axios.get(url, { // // }).then((response) => { - // // //////console.log("开始请求/get_navigation_info.json"); - // // //////console.log(response); + // // ////////console.log("开始请求/get_navigation_info.json"); + // // ////////console.log(response); // if(response!=undefined){ // if(response.status===200){ // this.setState({ @@ -80,15 +80,15 @@ class Questionitem_banks extends Component { } else { } - //////console.log("item_banks"); - //console.log("Questionitem_banks"); - //console.log(response.data); + ////////console.log("item_banks"); + ////console.log("Questionitem_banks"); + ////console.log(response.data); this.setState({ item_banksedit: response.data, }) }).catch((error) => { - //////console.log(error) + ////////console.log(error) }); @@ -173,10 +173,10 @@ class Questionitem_banks extends Component { // }else{ // // } - // //////console.log("item_banks"); - // //////console.log(response); + // ////////console.log("item_banks"); + // ////////console.log(response); // }).catch((error) => { - // //////console.log(error) + // ////////console.log(error) // // }); } @@ -239,7 +239,7 @@ class Questionitem_banks extends Component { if (this.state.item_type === "SINGLE") { if (this.answerMdRef != null) { //单选题 - // //console.log(this.answerMdRef.onSave()); + // ////console.log(this.answerMdRef.onSave()); if (this.answerMdRef.onSave().length === 0) { return; @@ -287,7 +287,7 @@ class Questionitem_banks extends Component { } }).catch((error) => { - //console.log(error); + ////console.log(error); }) } else { axios.put(url, data) @@ -299,7 +299,7 @@ class Questionitem_banks extends Component { } }).catch((error) => { - //console.log(error); + ////console.log(error); }) } @@ -311,7 +311,7 @@ class Questionitem_banks extends Component { if (this.state.item_type === "MULTIPLE") { if (this.Choques != null) { //多选题 - // //console.log(this.Choques.onSave()); + // ////console.log(this.Choques.onSave()); if (this.Choques.onSave().length === 0) { return; } @@ -319,8 +319,8 @@ class Questionitem_banks extends Component { const choices = []; // 1: [3] // 2: (4) ["1", "2", "3", "4"] - //console.log("MULTIPLE"); - //console.log(anserdata); + ////console.log("MULTIPLE"); + ////console.log(anserdata); for (var k = 0; k < anserdata[2].length; k++) { var bool = false @@ -366,7 +366,7 @@ class Questionitem_banks extends Component { } }).catch((error) => { - //console.log(error); + ////console.log(error); }) } else { @@ -379,7 +379,7 @@ class Questionitem_banks extends Component { } }).catch((error) => { - //console.log(error); + ////console.log(error); }) } @@ -390,7 +390,7 @@ class Questionitem_banks extends Component { if (this.state.item_type === "JUDGMENT") { if (this.Judquestio != null) { //判断题 - // //console.log(this.Judquestio.onSave()); + // ////console.log(this.Judquestio.onSave()); if (this.Judquestio.onSave().length === 0) { return; } @@ -432,7 +432,7 @@ class Questionitem_banks extends Component { } }).catch((error) => { - //console.log(error); + ////console.log(error); }) } else { @@ -444,7 +444,7 @@ class Questionitem_banks extends Component { } }).catch((error) => { - //console.log(error); + ////console.log(error); }) } @@ -482,7 +482,7 @@ class Questionitem_banks extends Component { render() { let {page, limit, count, Headertop, visible, placement, modalsType, item_type} = this.state; const params = this.props && this.props.match && this.props.match.params; - // //console.log(params); + // ////console.log(params); return (
{ const { question_choices, standard_answers } = this.state; - // ////console.log("addOption"); - // ////console.log(question_choices); - // ////console.log(standard_answers); + // //////console.log("addOption"); + // //////console.log(question_choices); + // //////console.log(standard_answers); question_choices.push('') @@ -95,8 +95,8 @@ class ChoquesEditor extends Component{ deleteOption = (index) => { let {question_choices}=this.state; - // ////console.log("deleteOption"); - // ////console.log(question_choices); + // //////console.log("deleteOption"); + // //////console.log(question_choices); if(question_choices[index]===""){ // repeat code @@ -199,9 +199,9 @@ class ChoquesEditor extends Component{ } } componentDidUpdate(prevProps) { - //console.log("componentDidUpdate"); - // //console.log(prevProps); - // //console.log(this.props.item_banksedit); + ////console.log("componentDidUpdate"); + // ////console.log(prevProps); + // ////console.log(this.props.item_banksedit); if(prevProps.item_banksedit !== this.props.item_banksedit) { this.setState({ @@ -244,7 +244,7 @@ class ChoquesEditor extends Component{ } let question_choices = this.state.question_choices.slice(0); question_choices[index] = texts; - console.log(question_choices); + //console.log(question_choices); this.setState({ question_choices }); } @@ -333,9 +333,9 @@ class ChoquesEditor extends Component{ // [true, false, true] -> [0, 2] const answerTagArray = standard_answers.map((item, index) => { return item == true ? tagArray[index] : -1 }).filter(item => item != -1); - // ////console.log("xuanzheshijuan"); - // ////console.log(answerTagArray); - // ////console.log(!exerciseIsPublish); + // //////console.log("xuanzheshijuan"); + // //////console.log(answerTagArray); + // //////console.log(!exerciseIsPublish); return(
diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index 11305f3eb..96ac64153 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -135,8 +135,8 @@ class Contentpart extends Component { ); - console.log("Contentpart.js"); - console.log(this.props.defaultActiveKey); + //console.log("Contentpart.js"); + //console.log(this.props.defaultActiveKey); return (
diff --git a/public/react/src/modules/question/component/Contentquestionbank.js b/public/react/src/modules/question/component/Contentquestionbank.js index 8ec8cf955..79e8bbb88 100644 --- a/public/react/src/modules/question/component/Contentquestionbank.js +++ b/public/react/src/modules/question/component/Contentquestionbank.js @@ -20,9 +20,9 @@ class Contentquestionbank extends Component { } //初始化 componentDidMount(){ - ////console.log("componentDidMount"); - ////console.log(this.state); - ////console.log(this.props); + //////console.log("componentDidMount"); + //////console.log(this.state); + //////console.log(this.props); // let homeworkid = this.props.match.params.homeworkid; // let url = "/homework_commons/" + homeworkid + "/end_groups.json"; // axios.get(url).then((response) => { @@ -30,12 +30,12 @@ class Contentquestionbank extends Component { // this.setState({}) // } // }).catch((error) => { - // ////console.log(error) + // //////console.log(error) // }); } onChange=(e)=> { - ////console.log(`checked = ${e.target.checked}`); + //////console.log(`checked = ${e.target.checked}`); } render() { diff --git a/public/react/src/modules/question/component/Headplugselection.js b/public/react/src/modules/question/component/Headplugselection.js index 142a316cb..26495fdf8 100644 --- a/public/react/src/modules/question/component/Headplugselection.js +++ b/public/react/src/modules/question/component/Headplugselection.js @@ -77,8 +77,8 @@ class Headplugselection extends Component { } render() { let {page,titlestting,titlesttings,titlesttingss}=this.state; - // console.log("Headplugselection"); - // console.log(this.props.disciplinesdata); + // //console.log("Headplugselection"); + // //console.log(this.props.disciplinesdata); // disciplinesdatakc:kc, // disciplinesdatazsd:zsd, var kc=0; diff --git a/public/react/src/modules/question/component/Headplugselections.js b/public/react/src/modules/question/component/Headplugselections.js index 206b556e9..643729ec1 100644 --- a/public/react/src/modules/question/component/Headplugselections.js +++ b/public/react/src/modules/question/component/Headplugselections.js @@ -48,10 +48,7 @@ class Headplugselections extends Component { componentDidMount(){ } -// -// setdiscipline_id={(e)=>this.setdiscipline_id(e)} -// setsub_discipline_id={(e)=>this.setsub_discipline_id(e)} -// settag_discipline_id={(e)=>this.settag_discipline_id(e)} + settitlestting=(name,id)=>{ //如果全部其他的选项重置 this.setState({ @@ -87,8 +84,8 @@ class Headplugselections extends Component { //获取方向 shixunsearchAll = (id) => { - console.log("获取方向"); - console.log(id); + //console.log("获取方向"); + //console.log(id); if(id!=undefined){ this.setState({ shixunsearchAllvalue:id, @@ -130,16 +127,16 @@ class Headplugselections extends Component { } getshixunchildValue = (id,ids) => { - console.log("getshixunchildValue"); - console.log(id); - debugger + // //console.log("getshixunchildValue"); + // //console.log(id); + // debugger if(id!=undefined ||ids!=undefined){ this.setState({ shixunsearchAllvalue:ids }) try { - this.props.setsub_discipline_id(id); + this.props.setsub_discipline_id(ids,id); }catch (e) { } diff --git a/public/react/src/modules/question/component/IntelligentModel.js b/public/react/src/modules/question/component/IntelligentModel.js index fecef37d0..016c00d2c 100644 --- a/public/react/src/modules/question/component/IntelligentModel.js +++ b/public/react/src/modules/question/component/IntelligentModel.js @@ -60,7 +60,7 @@ class IntelligentModel extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - console.log(result); + //console.log(result); this.props.history.push(`/paperlibrary`); } diff --git a/public/react/src/modules/question/component/Itembankstop.js b/public/react/src/modules/question/component/Itembankstop.js index d931286b5..b7143f6a1 100644 --- a/public/react/src/modules/question/component/Itembankstop.js +++ b/public/react/src/modules/question/component/Itembankstop.js @@ -99,10 +99,10 @@ class Itembankstop extends Component { options: this.props.disciplmy, }) - console.log("数据"); - console.log(this.props); + //console.log("数据"); + //console.log(this.props); const parsed = queryString.parse(this.props.location.search); - console.log(parsed); + //console.log(parsed); try { if(JSON.stringify(parsed)==={}||JSON.stringify(parsed)==="{}"){ @@ -156,7 +156,7 @@ class Itembankstop extends Component { }) } if(prevProps.disciplinesdata!== this.props.disciplinesdata){ - console.log("新增开始加载了") + //console.log("新增开始加载了") try { if(this.props.item_banksedit.discipline &&this.props.item_banksedit.sub_discipline){ const didata = this.props.disciplinesdata; @@ -351,8 +351,8 @@ class Itembankstop extends Component { this.props.form.validateFields((err, values) => { data = [] if (!err) { - // ////console.log("获取的form 数据"); - // ////console.log(values); + // //////console.log("获取的form 数据"); + // //////console.log(values); data.push({ rbnd: parseInt(values.rbnd) }) @@ -376,8 +376,8 @@ class Itembankstop extends Component { e.preventDefault(); this.props.form.validateFields((err, values) => { if (!err) { - ////console.log("获取的form 数据"); - ////console.log(values); + //////console.log("获取的form 数据"); + //////console.log(values); } @@ -386,8 +386,8 @@ class Itembankstop extends Component { } handleFormLayoutChangeysl = (value) => { //难度塞选 - ////console.log("难度塞选"); - ////console.log(value); + //////console.log("难度塞选"); + //////console.log(value); this.props.form.setFieldsValue({ rbnd: value+ "", }); @@ -398,8 +398,8 @@ class Itembankstop extends Component { } handleFormLayoutChange = (e) => { //难度塞选 - ////console.log("难度塞选"); - ////console.log(value); + //////console.log("难度塞选"); + //////console.log(value); this.props.form.setFieldsValue({ rbnd: e.target.value + "", }); @@ -410,8 +410,8 @@ class Itembankstop extends Component { } handleFormkechen = (value) => { //课程 - ////console.log("课程"); - ////console.log(value); + //////console.log("课程"); + //////console.log(value); if(this.state.Knowpoints.length>4){ this.props.showNotification(`知识点最多选择5个`); return @@ -432,8 +432,8 @@ class Itembankstop extends Component { const _result =[]; this.state.knowledgepoints.filter(item => { if (this.state.Knowpoints.findIndex(t => t.id === item.id) === -1) { - // console.log("guonue"); - // console.log(item); + // //console.log("guonue"); + // //console.log(item); _result.push(item); } }); @@ -448,8 +448,8 @@ class Itembankstop extends Component { } handleFormzhishidian = (value) => { - console.log("handleFormzhishidian 课程"); - console.log(value); + //console.log("handleFormzhishidian 课程"); + //console.log(value); //课程 this.props.form.setFieldsValue({ @@ -458,8 +458,8 @@ class Itembankstop extends Component { this.setState({ rbkc:value, }) - // console.log("handleFormzhishidian"); - // console.log(this.props.disciplinesdata); + // //console.log("handleFormzhishidian"); + // //console.log(this.props.disciplinesdata); const didata = this.props.disciplinesdata; const knowledgepointsdata = []; @@ -503,8 +503,8 @@ class Itembankstop extends Component { handleFormtixing = (value) => { //题型 - //console.log("题型"); - //console.log(value); + ////console.log("题型"); + ////console.log(value); this.setState({ rbtx: value + "", }) @@ -515,7 +515,7 @@ class Itembankstop extends Component { } preventDefault = (e) => { e.preventDefault(); - ////console.log('Clicked! But prevent default.'); + //////console.log('Clicked! But prevent default.'); } deletesobject = (item, index) => { @@ -644,7 +644,7 @@ class Itembankstop extends Component { } }).catch((error) => { - //console.log(error); + ////console.log(error); }) this.setState({ @@ -657,9 +657,9 @@ class Itembankstop extends Component { let {page, options,NewknTypedel,knowledgepoints,knowledgepoints2,Knowpoints} = this.state; const {getFieldDecorator} = this.props.form; - // console.log("this.state.rbkc"); - // console.log(this.state.rbkc); - // console.log(options); + // //console.log("this.state.rbkc"); + // //console.log(this.state.rbkc); + // //console.log(options); return ( diff --git a/public/react/src/modules/question/component/JudquestionEditor.js b/public/react/src/modules/question/component/JudquestionEditor.js index 5888efeb0..0ab6176b2 100644 --- a/public/react/src/modules/question/component/JudquestionEditor.js +++ b/public/react/src/modules/question/component/JudquestionEditor.js @@ -62,9 +62,9 @@ class JudquestionEditor extends Component{ addOption = () => { const { question_choices, standard_answers } = this.state; - // //////console.log("addOption"); - // //////console.log(question_choices); - // //////console.log(standard_answers); + // ////////console.log("addOption"); + // ////////console.log(question_choices); + // ////////console.log(standard_answers); question_choices.push('') @@ -74,8 +74,8 @@ class JudquestionEditor extends Component{ deleteOption = (index) => { let {question_choices}=this.state; - // //////console.log("deleteOption"); - // //////console.log(question_choices); + // ////////console.log("deleteOption"); + // ////////console.log(question_choices); if(question_choices[index]===""){ // repeat code @@ -190,9 +190,9 @@ class JudquestionEditor extends Component{ } componentDidUpdate(prevProps) { - //console.log("componentDidUpdate"); - //console.log(prevProps); - //console.log(this.props.item_banksedit); + ////console.log("componentDidUpdate"); + ////console.log(prevProps); + ////console.log(this.props.item_banksedit); if(prevProps.item_banksedit !== this.props.item_banksedit){ this.setState({ @@ -230,10 +230,10 @@ class JudquestionEditor extends Component{ onOptionClick = (index) => { let standard_answers = this.state.standard_answers.slice(0); - // //////console.log("onOptionClick"); - // //////console.log(standard_answers); - // //////console.log(standard_answers[index]); - // //////console.log(!standard_answers[index]); + // ////////console.log("onOptionClick"); + // ////////console.log(standard_answers); + // ////////console.log(standard_answers[index]); + // ////////console.log(!standard_answers[index]); for (var i=0;i{ - //////console.log("难度塞选"); - //////console.log(value); + ////////console.log("难度塞选"); + ////////console.log(value); this.setState({ zqda:e.target.value, @@ -348,9 +348,9 @@ class JudquestionEditor extends Component{ // [true, false, true] -> [0, 2] const answerTagArray = standard_answers.map((item, index) => { return item == true ? tagArray[index] : -1 }).filter(item => item != -1); - // //////console.log("xuanzheshijuan"); - // //////console.log(answerTagArray); - // //////console.log(!exerciseIsPublish); + // ////////console.log("xuanzheshijuan"); + // ////////console.log(answerTagArray); + // ////////console.log(!exerciseIsPublish); const params= this.props&&this.props.match&&this.props.match.params; return(
diff --git a/public/react/src/modules/question/component/Newknledpots.js b/public/react/src/modules/question/component/Newknledpots.js index 4668c5e5a..36dd88e10 100644 --- a/public/react/src/modules/question/component/Newknledpots.js +++ b/public/react/src/modules/question/component/Newknledpots.js @@ -18,15 +18,15 @@ class PaperDeletModel extends Component { // this.setState({ // newkntypeinput: e.target.value // }) - // console.log(e.target.value); - // console.log(e.target.value.length); + // //console.log(e.target.value); + // //console.log(e.target.value.length); this.setState({ newkntypeinput: e.target.value }) this.props.setboolred(false); // // debugger - // console.log(e); + // //console.log(e); // // if(e.target.value.length>0){ // if(e.target.value.length>=16){ @@ -38,11 +38,11 @@ class PaperDeletModel extends Component { // } } mysinputOnBlur=(e)=>{ - console.log("失去焦点了"); + //console.log("失去焦点了"); } inputOnFocus=(e)=>{ - console.log("获取焦点"); + //console.log("获取焦点"); } render() { diff --git a/public/react/src/modules/question/component/Paperreview_itemModel.js b/public/react/src/modules/question/component/Paperreview_itemModel.js index 0759bb677..b4ceacc02 100644 --- a/public/react/src/modules/question/component/Paperreview_itemModel.js +++ b/public/react/src/modules/question/component/Paperreview_itemModel.js @@ -13,8 +13,8 @@ class Paperreview_itemModel extends Component { } onChange=(value)=>{ - console.log("设置批量得分"); - console.log(value); + //console.log("设置批量得分"); + //console.log(value); this.setState({ value:value, }) diff --git a/public/react/src/modules/question/component/Paperreview_itemModels.js b/public/react/src/modules/question/component/Paperreview_itemModels.js index 167769313..ba7978aff 100644 --- a/public/react/src/modules/question/component/Paperreview_itemModels.js +++ b/public/react/src/modules/question/component/Paperreview_itemModels.js @@ -14,8 +14,8 @@ class Paperreview_itemModels extends Component { } onChange=(value)=>{ - console.log("Paperreview_itemModels"); - console.log(value); + //console.log("Paperreview_itemModels"); + //console.log(value); this.setState({ value:value, }) diff --git a/public/react/src/modules/question/component/SiderBars.js b/public/react/src/modules/question/component/SiderBars.js index 66ccb77dc..23934ea32 100644 --- a/public/react/src/modules/question/component/SiderBars.js +++ b/public/react/src/modules/question/component/SiderBars.js @@ -25,7 +25,7 @@ $(window).scroll(function(){ function rightSlider(){ var poi=parseInt((parseInt($(window).width())- 1200 )/2)-81; - // console.log(parseInt($(window).width())+" "+poi); + // //console.log(parseInt($(window).width())+" "+poi); if(poi>0){ $(".-task-sidebar").css("right",poi); }else{ @@ -89,8 +89,8 @@ class SiderBars extends Component { render() { - // console.log("SiderBar"); - // console.log(this.props); + // //console.log("SiderBar"); + // //console.log(this.props); var mypath= this.props&&this.props.match&&this.props.match.path; let{myvisible,Datacount,animateStyle}=this.props; diff --git a/public/react/src/modules/question/component/SingleEditor.js b/public/react/src/modules/question/component/SingleEditor.js index 876cb4354..dffbf620c 100644 --- a/public/react/src/modules/question/component/SingleEditor.js +++ b/public/react/src/modules/question/component/SingleEditor.js @@ -52,8 +52,8 @@ class SingleEditor extends Component{ if(this.props.item_banksedit.choices){ this.props.item_banksedit.choices.forEach((item, index) => { - //console.log("SingleEditor"); - //console.log(item); + ////console.log("SingleEditor"); + ////console.log(item); choicescomy.push({ choice_text:item.choice_text, standard_boolean:item.is_answer, @@ -87,9 +87,9 @@ class SingleEditor extends Component{ addOption = () => { const { question_choices, standard_answers } = this.state; - // ////console.log("addOption"); - // ////console.log(question_choices); - // ////console.log(standard_answers); + // //////console.log("addOption"); + // //////console.log(question_choices); + // //////console.log(standard_answers); question_choices.push('') @@ -99,8 +99,8 @@ class SingleEditor extends Component{ deleteOption = (index) => { let {question_choices}=this.state; - // ////console.log("deleteOption"); - // ////console.log(question_choices); + // //////console.log("deleteOption"); + // //////console.log(question_choices); if(question_choices[index]===""){ // repeat code @@ -209,9 +209,9 @@ class SingleEditor extends Component{ } } componentDidUpdate(prevProps) { - //console.log("componentDidUpdate"); - // //console.log(prevProps); - // //console.log(this.props.item_banksedit); + ////console.log("componentDidUpdate"); + // ////console.log(prevProps); + // ////console.log(this.props.item_banksedit); if(prevProps.item_banksedit !== this.props.item_banksedit) { this.setState({ @@ -228,10 +228,10 @@ class SingleEditor extends Component{ onOptionClick = (index) => { let standard_answers = this.state.standard_answers.slice(0); - // ////console.log("onOptionClick"); - // ////console.log(standard_answers); - // ////console.log(standard_answers[index]); - // ////console.log(!standard_answers[index]); + // //////console.log("onOptionClick"); + // //////console.log(standard_answers); + // //////console.log(standard_answers[index]); + // //////console.log(!standard_answers[index]); for (var i=0;i{ - const _text = quill.getText(); + var _text = quill.getText(); + const reg = /^[\s\S]*.*[^\s][\s\S]*$/; if (!reg.test(_text)) { // 处理编辑器内容为空 @@ -295,6 +296,7 @@ class SingleEditor extends Component{ }) } else { // 提交到后台的内容需要处理一下; + var texts=""; if(_text.length>=1001){ var result = _text.substring(0,1000); @@ -307,6 +309,12 @@ class SingleEditor extends Component{ this.setState({ question_titleysl:texts }) + try { + //console.log("onContentChange"); + //console.log(quill.getText().length); + }catch (e) { + + } } } onContentChanges=(value,quill)=>{ @@ -333,8 +341,8 @@ class SingleEditor extends Component{ } } handleShowImage = (url) => { - console.log("点击了图片放大"); - console.log(url); + //console.log("点击了图片放大"); + //console.log(url); alert(url); } @@ -357,9 +365,9 @@ class SingleEditor extends Component{ // [true, false, true] -> [0, 2] const answerTagArray = standard_answers.map((item, index) => { return item == true ? tagArray[index] : -1 }).filter(item => item != -1); - // ////console.log("xuanzheshijuan"); - // ////console.log(answerTagArray); - // ////console.log(!exerciseIsPublish); + // //////console.log("xuanzheshijuan"); + // //////console.log(answerTagArray); + // //////console.log(!exerciseIsPublish); return(
diff --git a/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js b/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js index 959840c96..bc1e8cd00 100644 --- a/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js +++ b/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js @@ -239,7 +239,7 @@ class Comthetestpaperst extends Component { }; handleChange=(e)=>{ - console.log(e); + //console.log(e); this.props.form.setFieldsValue({ // course:value, classroom:e.target.value, @@ -324,8 +324,8 @@ class Comthetestpaperst extends Component { e.preventDefault(); this.props.form.validateFields((err, values) => { if (!err) { - ////console.log("获取的form 数据"); - ////console.log(values); + //////console.log("获取的form 数据"); + //////console.log(values); } @@ -334,8 +334,8 @@ class Comthetestpaperst extends Component { } handleFormLayoutChangeysl = (value) => { //难度塞选 - ////console.log("难度塞选"); - ////console.log(value); + //////console.log("难度塞选"); + //////console.log(value); this.props.form.setFieldsValue({ rbnd: value + "", @@ -347,8 +347,8 @@ class Comthetestpaperst extends Component { } handleFormLayoutChange = (e) => { //难度塞选 - ////console.log("难度塞选"); - ////console.log(value); + //////console.log("难度塞选"); + //////console.log(value); this.props.form.setFieldsValue({ rbnd: e.target.value + "", @@ -360,8 +360,8 @@ class Comthetestpaperst extends Component { } handleFormkechen = (value) => { //课程 - ////console.log("课程"); - ////console.log(value); + //////console.log("课程"); + //////console.log(value); if(this.state.Knowpoints.length>4){ this.props.showNotification(`知识点最多选择5个`); return @@ -382,8 +382,8 @@ class Comthetestpaperst extends Component { const _result =[]; this.state.knowledgepoints.filter(item => { if (this.state.Knowpoints.findIndex(t => t.id === item.id) === -1) { - console.log("guonue"); - console.log(item); + //console.log("guonue"); + //console.log(item); _result.push(item); } }); @@ -398,8 +398,8 @@ class Comthetestpaperst extends Component { } handleFormzhishidian = (value) => { - console.log("handleFormzhishidian 课程"); - console.log(value); + //console.log("handleFormzhishidian 课程"); + //console.log(value); //课程 this.props.form.setFieldsValue({ @@ -408,8 +408,8 @@ class Comthetestpaperst extends Component { this.setState({ rbkc:value, }) - // console.log("handleFormzhishidian"); - // console.log(this.props.disciplinesdata); + // //console.log("handleFormzhishidian"); + // //console.log(this.props.disciplinesdata); const didata = this.props.disciplinesdata; const knowledgepointsdata = []; @@ -453,8 +453,8 @@ class Comthetestpaperst extends Component { handleFormtixing = (value) => { //题型 - //console.log("题型"); - //console.log(value); + ////console.log("题型"); + ////console.log(value); this.setState({ rbtx: value + "", }) @@ -465,7 +465,7 @@ class Comthetestpaperst extends Component { } preventDefault = (e) => { e.preventDefault(); - ////console.log('Clicked! But prevent default.'); + //////console.log('Clicked! But prevent default.'); } deletesobject = (item, index) => { debugger @@ -589,7 +589,7 @@ class Comthetestpaperst extends Component { } } }).catch((error) => { - //console.log(error); + ////console.log(error); }) this.setState({ diff --git a/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js b/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js index 63beaf28c..64d57e452 100644 --- a/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js +++ b/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js @@ -94,7 +94,7 @@ class Intelligentcomponents extends Component { }; handleChange=(e)=>{ - console.log(e); + //console.log(e); if(e.target.value){ if(e.target.value.length>60){ @@ -209,8 +209,8 @@ class Intelligentcomponents extends Component { e.preventDefault(); this.props.form.validateFields((err, values) => { if (!err) { - ////console.log("获取的form 数据"); - ////console.log(values); + //////console.log("获取的form 数据"); + //////console.log(values); } @@ -218,8 +218,8 @@ class Intelligentcomponents extends Component { }); } handleFormLayoutChanges = (e) => { - // console.log("handleFormLayoutChanges"); - // console.log(value); + // //console.log("handleFormLayoutChanges"); + // //console.log(value); // debugger //来源 this.props.form.setFieldsValue({ @@ -237,8 +237,8 @@ class Intelligentcomponents extends Component { } handleFormLayoutChange = (e) => { - // console.log("handleFormLayoutChange"); - // console.log(value); + // //console.log("handleFormLayoutChange"); + // //console.log(value); // debugger //难度塞选 this.props.form.setFieldsValue({ @@ -295,8 +295,8 @@ class Intelligentcomponents extends Component { } handleFormzhishidian = (value) => { - console.log("handleFormzhishidian 课程"); - console.log(value); + //console.log("handleFormzhishidian 课程"); + //console.log(value); //课程 this.props.form.setFieldsValue({ @@ -305,8 +305,8 @@ class Intelligentcomponents extends Component { this.setState({ rbkc:value, }) - // console.log("handleFormzhishidian"); - // console.log(this.props.disciplinesdata); + // //console.log("handleFormzhishidian"); + // //console.log(this.props.disciplinesdata); const didata = this.props.disciplinesdata; const knowledgepointsdata = []; @@ -356,8 +356,8 @@ class Intelligentcomponents extends Component { handleFormtixing = (value) => { //题型 - //console.log("题型"); - //console.log(value); + ////console.log("题型"); + ////console.log(value); this.setState({ rbtx: value + "", }) @@ -368,7 +368,7 @@ class Intelligentcomponents extends Component { } preventDefault = (e) => { e.preventDefault(); - ////console.log('Clicked! But prevent default.'); + //////console.log('Clicked! But prevent default.'); } deletesobject = (item, index) => { @@ -498,7 +498,7 @@ class Intelligentcomponents extends Component { } } }).catch((error) => { - //console.log(error); + ////console.log(error); }) //新增知识点 try { diff --git a/public/react/src/modules/testpaper/Intecomponents.js b/public/react/src/modules/testpaper/Intecomponents.js index a69d7185b..8776b6a9e 100644 --- a/public/react/src/modules/testpaper/Intecomponents.js +++ b/public/react/src/modules/testpaper/Intecomponents.js @@ -40,8 +40,8 @@ class Intecomponents extends Component { } getJudquestio = (Ref) => { - console.log("子组件对象"); - console.log(Ref); + //console.log("子组件对象"); + //console.log(Ref); this.Judquestio = Ref; } @@ -116,7 +116,7 @@ class Intecomponents extends Component { this.scrollToAnchor("Itembankstopid"); return false; } - console.log(this.Judquestio.Getdatas()); + //console.log(this.Judquestio.Getdatas()); var myrbkc=[]; var Getdatasdatas=this.Judquestio.Getdatas()[1].rbzsd; for(let myda of Getdatasdatas) { @@ -139,7 +139,7 @@ class Intecomponents extends Component { this.scrollToAnchor("Itembankstopid"); return false; } - console.log(this.Judquestio.Getdatas()); + //console.log(this.Judquestio.Getdatas()); var myrbkc=[]; var Getdatasdatas=this.Judquestio.Getdatas()[1].rbzsd; for(let myda of Getdatasdatas) { @@ -162,7 +162,7 @@ class Intecomponents extends Component { this.scrollToAnchor("Itembankstopid"); return false; } - console.log(this.Judquestio.Getdatas()); + //console.log(this.Judquestio.Getdatas()); var myrbkc=[]; var Getdatasdatas=zhishidian; for(let myda of Getdatasdatas) { @@ -184,7 +184,7 @@ class Intecomponents extends Component { this.scrollToAnchor("Itembankstopid"); return false; } - console.log(this.Judquestio.Getdatas()); + //console.log(this.Judquestio.Getdatas()); var myrbkc=[]; var Getdatasdatas=this.Judquestio.Getdatas()[1].rbzsd; for(let myda of Getdatasdatas) { @@ -204,8 +204,8 @@ class Intecomponents extends Component { getwangluodata=(url,data)=>{ axios.post(url,data).then((response) => { if (response) { - console.log("智能组卷"); - console.log(response); + //console.log("智能组卷"); + //console.log(response); if(response.data){ this.setState({ single_question_count:response.data.single_question_count, @@ -225,7 +225,7 @@ class Intecomponents extends Component { this.scrollToAnchor("Itembankstopid"); return false; } - console.log(this.Judquestio.Getdatas()); + //console.log(this.Judquestio.Getdatas()); var myrbkc=[]; var Getdatasdatas=this.Judquestio.Getdatas()[1].rbzsd; for(let myda of Getdatasdatas) { @@ -241,8 +241,8 @@ class Intecomponents extends Component { axios.post(url,data).then((response) => { if (response) { - console.log("智能组卷"); - console.log(response); + //console.log("智能组卷"); + //console.log(response); if(response.data){ this.setState({ single_question_count:response.data.single_question_count, @@ -291,9 +291,9 @@ class Intecomponents extends Component { for(let myda of Getdatasdatas) { myrbkc.push(myda.id); } - // console.log(myrbkc); - // console.log("preservation"); - // console.log(this.Judquestio.Getdatas()); + // //console.log(myrbkc); + // //console.log("preservation"); + // //console.log(this.Judquestio.Getdatas()); var question_settings =[ @@ -328,11 +328,11 @@ class Intecomponents extends Component { axios.post(url, data) .then((result) => { if (result.data.status == 0) { - console.log("组卷成功"); + //console.log("组卷成功"); this.props.history.push(`/Integeneration/Intelligence/${result.data.exam_setting_id}`); } }).catch((error) => { - console.log(error); + //console.log(error); }) } diff --git a/public/react/src/modules/testpaper/Paperlibraryeditid.js b/public/react/src/modules/testpaper/Paperlibraryeditid.js index 449de0219..c65191e96 100644 --- a/public/react/src/modules/testpaper/Paperlibraryeditid.js +++ b/public/react/src/modules/testpaper/Paperlibraryeditid.js @@ -43,8 +43,8 @@ class Paperlibraryeditid extends Component { } getJudquestio = (Ref) => { - console.log("子组件对象"); - console.log(Ref); + //console.log("子组件对象"); + //console.log(Ref); this.Judquestio = Ref; } @@ -170,7 +170,7 @@ class Paperlibraryeditid extends Component { this.props.history.push('/paperlibrary'); } }).catch((error) => { - console.log(error); + //console.log(error); }) } @@ -208,8 +208,8 @@ class Paperlibraryeditid extends Component { render() { let {paperlibrartdata,newmyshixunmodelbool} = this.state; const params = this.props && this.props.match && this.props.match.params; - // console.log("newmyshixunmodelbool"); - // console.log(newmyshixunmodelbool); + // //console.log("newmyshixunmodelbool"); + // //console.log(newmyshixunmodelbool); return (
{ - // ////console.log("开始请求/get_navigation_info.json"); - // ////console.log(response); + // //////console.log("开始请求/get_navigation_info.json"); + // //////console.log(response); if (response != undefined) { if (response.status === 200) { this.setState({ @@ -158,14 +158,14 @@ class Testpaperlibrary extends Component { } else { } - ////console.log("item_banks"); - ////console.log(response); + //////console.log("item_banks"); + //////console.log(response); this.setState({ Contentdata: response.data, items_count: response.data.exam_count, }) }).catch((error) => { - ////console.log(error) + //////console.log(error) this.setState({ booljupyterurls:false, }) @@ -194,7 +194,7 @@ class Testpaperlibrary extends Component { this.getdata(data); } - setsub_discipline_id=(sub_discipline_id)=>{ + setsub_discipline_id=(discipline_id,sub_discipline_id)=>{ this.setState({ sub_discipline_id:sub_discipline_id, tag_discipline_id:null, @@ -203,7 +203,7 @@ class Testpaperlibrary extends Component { per_page:10, }) var data = { - discipline_id:this.state.discipline_id, + discipline_id:discipline_id, sub_discipline_id:sub_discipline_id, tag_discipline_id:null, public: this.state.defaultActiveKey, @@ -291,7 +291,7 @@ class Testpaperlibrary extends Component { this.getdata(data); } }).catch((error) => { - //console.log(error); + ////console.log(error); }) } @@ -318,7 +318,7 @@ class Testpaperlibrary extends Component { } }) .catch(function (error) { - //console.log(error); + ////console.log(error); }); } @@ -434,7 +434,7 @@ class Testpaperlibrary extends Component { this.setdiscipline_id(e)} - setsub_discipline_id={(e)=>this.setsub_discipline_id(e)} + setsub_discipline_id={(e,id)=>this.setsub_discipline_id(e,id)} settag_discipline_id={(e)=>this.settag_discipline_id(e)} setitem_types={(e) => this.setitem_types(e)} setdifficulty={(e) => this.setdifficulty(e)} diff --git a/public/react/src/modules/testpaper/component/Contentquestionbank.js b/public/react/src/modules/testpaper/component/Contentquestionbank.js index 1e036f858..2ed246023 100644 --- a/public/react/src/modules/testpaper/component/Contentquestionbank.js +++ b/public/react/src/modules/testpaper/component/Contentquestionbank.js @@ -20,9 +20,9 @@ class Contentquestionbank extends Component { } //初始化 componentDidMount(){ - ////console.log("componentDidMount"); - ////console.log(this.state); - ////console.log(this.props); + //////console.log("componentDidMount"); + //////console.log(this.state); + //////console.log(this.props); // let homeworkid = this.props.match.params.homeworkid; // let url = "/homework_commons/" + homeworkid + "/end_groups.json"; // axios.get(url).then((response) => { @@ -30,12 +30,12 @@ class Contentquestionbank extends Component { // this.setState({}) // } // }).catch((error) => { - // ////console.log(error) + // //////console.log(error) // }); } onChange=(e)=> { - ////console.log(`checked = ${e.target.checked}`); + //////console.log(`checked = ${e.target.checked}`); } render() { diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js index f85ab67d0..06298299f 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js @@ -69,8 +69,8 @@ class Paperreview_item extends Component { } onDragEnd = (result) => { - console.log("单选题"); - console.log(result); + //console.log("单选题"); + //console.log(result); const ids = this.props.single_questions.questions[result.source.index].id; const positions = this.props.single_questions.questions[result.destination.index].position; @@ -85,13 +85,13 @@ class Paperreview_item extends Component { this.props.getdata(); } }).catch((error) => { - console.log(error); + //console.log(error); }) } onDragEnds = (result) => { - console.log("多选题"); - console.log(result); + //console.log("多选题"); + //console.log(result); const ids = this.props.multiple_questions.questions[result.source.index].id; const positions = this.props.multiple_questions.questions[result.destination.index].position; const url = `/examination_items/${ids}/adjust_position.json`; @@ -105,7 +105,7 @@ class Paperreview_item extends Component { this.props.getdata(); } }).catch((error) => { - console.log(error); + //console.log(error); }) @@ -113,8 +113,8 @@ class Paperreview_item extends Component { onDragEndss = (result) => { - console.log("判断题"); - console.log(result); + //console.log("判断题"); + //console.log(result); const ids = this.props.judgement_questions.questions[result.source.index].id; const positions = this.props.judgement_questions.questions[result.destination.index].position; const url = `/examination_items/${ids}/adjust_position.json`; @@ -129,14 +129,14 @@ class Paperreview_item extends Component { this.props.getdata(); } }).catch((error) => { - console.log(error); + //console.log(error); }) } onDragEndsss = (result) => { - console.log("编程题"); - console.log(result); + //console.log("编程题"); + //console.log(result); const ids = this.props.program_questions.questions[result.source.index].id; const positions = this.props.program_questions.questions[result.destination.index].position; @@ -151,7 +151,7 @@ class Paperreview_item extends Component { this.props.getdata(); } }).catch((error) => { - console.log(error); + //console.log(error); }) } @@ -186,7 +186,7 @@ class Paperreview_item extends Component { this.Singlemagazine("", false); } }).catch((error) => { - console.log(error); + //console.log(error); }) } @@ -203,7 +203,7 @@ class Paperreview_item extends Component { this.Singlemagazines(false); } }).catch((error) => { - console.log(error); + //console.log(error); }) } @@ -225,7 +225,7 @@ class Paperreview_item extends Component { } hideparagraph = (name) => { - console.log("hideparagraph"); + //console.log("hideparagraph"); } @@ -238,7 +238,7 @@ class Paperreview_item extends Component { }) } showparagraph = (name) => { - console.log("showparagraph"); + //console.log("showparagraph"); if (name === "SINGLE") { this.setState({ singlebool: true, @@ -290,8 +290,8 @@ class Paperreview_item extends Component { } showparagraphs = (e,name) => { - // console.log("showparagraphs"); - // console.log(e); + // //console.log("showparagraphs"); + // //console.log(e); this.setState({ paperreviewsingleindex: e, paperreviewsinglename:name, diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js index 066b0e4ef..b725b4e5e 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js @@ -93,7 +93,7 @@ class Paperlibraryseeid_itemss extends Component { this.props.getdata({}); } }).catch((error) => { - console.log(error); + //console.log(error); }) } @@ -112,7 +112,7 @@ class Paperlibraryseeid_itemss extends Component { this.props.getdata({}); } }).catch((error) => { - console.log(error); + //console.log(error); }) @@ -133,7 +133,7 @@ class Paperlibraryseeid_itemss extends Component { this.props.getdata({}); } }).catch((error) => { - console.log(error); + //console.log(error); }) } @@ -153,7 +153,7 @@ class Paperlibraryseeid_itemss extends Component { this.props.getdata({}); } }).catch((error) => { - console.log(error); + //console.log(error); }) } @@ -189,7 +189,7 @@ class Paperlibraryseeid_itemss extends Component { this.Singlemagazine("", false); } }).catch((error) => { - console.log(error); + //console.log(error); }) } @@ -206,7 +206,7 @@ class Paperlibraryseeid_itemss extends Component { this.Singlemagazines(false); } }).catch((error) => { - console.log(error); + //console.log(error); }) } @@ -255,7 +255,7 @@ class Paperlibraryseeid_itemss extends Component { } }) .catch(function (error) { - //console.log(error); + ////console.log(error); }); @@ -299,7 +299,7 @@ class Paperlibraryseeid_itemss extends Component { } hideparagraph = (name) => { - console.log("hideparagraph"); + //console.log("hideparagraph"); } @@ -312,7 +312,7 @@ class Paperlibraryseeid_itemss extends Component { }) } showparagraph = (name) => { - console.log("showparagraph"); + //console.log("showparagraph"); if (name === "SINGLE") { this.setState({ singlebool: true, @@ -364,8 +364,8 @@ class Paperlibraryseeid_itemss extends Component { } showparagraphs = (e,name) => { - // console.log("showparagraphs"); - // console.log(e); + // //console.log("showparagraphs"); + // //console.log(e); this.setState({ paperreviewsingleindex: e, paperreviewsinglename:name, From 868d2bc43c8db43dc8868823a0de934abc38dae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 10 Jan 2020 20:43:40 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E9=A2=98=E5=BA=93=20=E6=A0=B7=E5=BC=8F?= =?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/Paperreview_single.js | 6 ++++-- .../modules/question/component/ChoquesEditor.js | 2 +- .../src/modules/question/component/Listjihe.js | 16 +++++----------- .../component/Paperlibraryseeid_items.js | 6 ++++-- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/question/Paperreview_single.js b/public/react/src/modules/question/Paperreview_single.js index 71c641847..a030048f3 100644 --- a/public/react/src/modules/question/Paperreview_single.js +++ b/public/react/src/modules/question/Paperreview_single.js @@ -99,7 +99,8 @@ class Paperreview_single extends Component { diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js index 7747574dd..d4212c3f1 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js @@ -95,7 +95,8 @@ class Paperlibraryseeid_items extends Component {