From 32c3078f79f942afad6728b843885b3bd1a655bc 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:10:52 +0800 Subject: [PATCH 01/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/testpaper/Testpaperlibrary.js | 4 ++-- public/react/src/modules/testpaper/component/Contentpart.js | 2 +- public/react/src/modules/testpaper/component/Listjihe.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/testpaper/Testpaperlibrary.js b/public/react/src/modules/testpaper/Testpaperlibrary.js index 0fb34200e..76b30d2ba 100644 --- a/public/react/src/modules/testpaper/Testpaperlibrary.js +++ b/public/react/src/modules/testpaper/Testpaperlibrary.js @@ -304,7 +304,7 @@ class Testpaperlibrary extends Component { tag_discipline_id:this.state.tag_discipline_id, public: this.state.defaultActiveKey, difficulty: this.state.difficulty, - keyword: this.state.keywords, + keyword: this.state.keyword, page: this.state.page, per_page:10, }; @@ -330,7 +330,7 @@ class Testpaperlibrary extends Component { tag_discipline_id:this.state.tag_discipline_id, public: this.state.defaultActiveKey, difficulty: this.state.difficulty, - keyword: this.state.keywords, + keyword: this.state.keyword, page: this.state.page, per_page:10, }; diff --git a/public/react/src/modules/testpaper/component/Contentpart.js b/public/react/src/modules/testpaper/component/Contentpart.js index 8a3d57414..b73da225f 100644 --- a/public/react/src/modules/testpaper/component/Contentpart.js +++ b/public/react/src/modules/testpaper/component/Contentpart.js @@ -194,7 +194,7 @@ class Contentpart extends Component { size="large" onInput={(e)=>this.props.setdatafunsval(e)} onSearch={ (value)=>this.props.setdatafuns(value)} - value={this.props.keywords} + value={this.props.keyword} /> { diff --git a/public/react/src/modules/testpaper/component/Listjihe.js b/public/react/src/modules/testpaper/component/Listjihe.js index b2f358b96..1b39bfee3 100644 --- a/public/react/src/modules/testpaper/component/Listjihe.js +++ b/public/react/src/modules/testpaper/component/Listjihe.js @@ -82,7 +82,7 @@ class Listjihe extends Component {
-
this.gotoseesj(items.id)}>

{names}

+
this.gotoseesj(items.id)}>

{names}

试题数:{question_counts}

总分:{total_scores}

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 02/52] =?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 } > From 964d3717a7e710bd46c489263a7ee38a53098867 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:34:51 +0800 Subject: [PATCH 03/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/Paperreview_items.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/question/Paperreview_items.js b/public/react/src/modules/question/Paperreview_items.js index 75ed4a248..32d657cfd 100644 --- a/public/react/src/modules/question/Paperreview_items.js +++ b/public/react/src/modules/question/Paperreview_items.js @@ -61,12 +61,15 @@ class Paperreview_items extends Component { // //console.log(object); // //console.log("Paperreview_items"); // //console.log(object.item_id); + //这里换题修改过 + //这里删除修改过 + // /Integeneration/Intelligence/ 换题item_id 删除id return (
{ paperreviewsingleindex===indexs&&paperreviewsinglename===typenames?
-
this.props.showsetmodalsTypedels(object.item_id,true,1)}>删除
+
this.props.showsetmodalsTypedels(object.id,true,1)}>删除
{ this.props.match.params.type==="Intelligence"?
this.props.Changingtopics(object.item_id)}>换题
From f1d4f07c75dbd873871c65a582fab9faf918fd16 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:42:43 +0800 Subject: [PATCH 04/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/Paperreview_items.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/question/Paperreview_items.js b/public/react/src/modules/question/Paperreview_items.js index 32d657cfd..ba377f35f 100644 --- a/public/react/src/modules/question/Paperreview_items.js +++ b/public/react/src/modules/question/Paperreview_items.js @@ -63,13 +63,13 @@ class Paperreview_items extends Component { // //console.log(object.item_id); //这里换题修改过 //这里删除修改过 - // /Integeneration/Intelligence/ 换题item_id 删除id + // /Integeneration/Intelligence/ 换题item_id 删除item_id return (
{ paperreviewsingleindex===indexs&&paperreviewsinglename===typenames?
-
this.props.showsetmodalsTypedels(object.id,true,1)}>删除
+
this.props.showsetmodalsTypedels(object.item_id,true,1)}>删除
{ this.props.match.params.type==="Intelligence"?
this.props.Changingtopics(object.item_id)}>换题
From 5c611fb61bd8f0a32cc3e102113ace4ac81de221 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:57:24 +0800 Subject: [PATCH 05/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/Paperreview.js | 3 ++- public/react/src/modules/question/Paperreview_item.js | 9 +++++++-- .../testpaper/component/Paperlibraryseeid_itemss.js | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/question/Paperreview.js b/public/react/src/modules/question/Paperreview.js index 8fbe146b4..c05645b54 100644 --- a/public/react/src/modules/question/Paperreview.js +++ b/public/react/src/modules/question/Paperreview.js @@ -427,11 +427,12 @@ class Paperreview extends Component { { Cohetepaperbool===false? - this.Changingtopics(e)} Replacementtype={(e)=>this.Replacementtype(e)} getdata={(data)=>this.getdata(data)} setnewmyshixunmodelbool={(e)=>this.setnewmyshixunmodelbool(e)}> + this.Changingtopics(e)} Replacementtype={(e)=>this.Replacementtype(e)} getdata={(data)=>this.getdata(data)} setnewmyshixunmodelbool={(e)=>this.setnewmyshixunmodelbool(e)}> : this.getcontentMdRef(ref)} setitem_type={(item) => this.setitem_type(item)} diff --git a/public/react/src/modules/question/Paperreview_item.js b/public/react/src/modules/question/Paperreview_item.js index 0156b3211..fa68ce34e 100644 --- a/public/react/src/modules/question/Paperreview_item.js +++ b/public/react/src/modules/question/Paperreview_item.js @@ -272,7 +272,9 @@ class Paperreview_item extends Component { }else { //确定 const url = `/item_baskets/${this.state.item_bank_id}.json`; - axios.delete((url)) + axios.delete(url, { data: { + exam_setting_id: this.props.match.params.id, + }}) .then((response) => { if (response.data.status == 0) { // this.props.showNotification('试题删除成功'); @@ -291,7 +293,8 @@ class Paperreview_item extends Component { } showsetmodalsTypedels=(id,bool,type)=>{ - debugger + console.log("Paperreview_item"); + this.setState({ item_bank_id:id, }) @@ -394,6 +397,8 @@ class Paperreview_item extends Component { modalsTypeys } = this.state; let {single_questions, multiple_questions, judgement_questions, program_questions, all_score} = this.props; + console.log("this.props"); + console.log(this.props); return (
{ diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js index b725b4e5e..754a45560 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js @@ -291,7 +291,8 @@ class Paperlibraryseeid_itemss extends Component { } showsetmodalsTypedels=(id,bool,type)=>{ - debugger + console.log("Paperlibraryseeid_itemss"); + this.setState({ item_bank_id:id, }) From af26a97137c82b98d1d2cba672f02d4fd873f916 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 17:10:01 +0800 Subject: [PATCH 06/52] =?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_item.js | 152 ++++++++++++------ 1 file changed, 107 insertions(+), 45 deletions(-) diff --git a/public/react/src/modules/question/Paperreview_item.js b/public/react/src/modules/question/Paperreview_item.js index fa68ce34e..09dddcfb6 100644 --- a/public/react/src/modules/question/Paperreview_item.js +++ b/public/react/src/modules/question/Paperreview_item.js @@ -176,22 +176,43 @@ class Paperreview_item extends Component { } setDownloady = (fenshu) => { - const url = "/item_baskets/batch_set_score.json"; - var data = { - score: fenshu, - item_type: this.state.titilesm === "单选题" ? "SINGLE" : this.state.titilesm === "多选题" ? "MULTIPLE" : this.state.titilesm === "判断题" ? "JUDGMENT" : this.state.titilesm === "编程题" ? "PROGRAM" : '', - + if(this.props.match.params.type==="Intelligence") { + //智能选题 + const url = "/item_baskets/batch_set_score.json"; + var data = { + score: fenshu, + item_type: this.state.titilesm === "单选题" ? "SINGLE" : this.state.titilesm === "多选题" ? "MULTIPLE" : this.state.titilesm === "判断题" ? "JUDGMENT" : this.state.titilesm === "编程题" ? "PROGRAM" : '', + exam_setting_id:this.props.match.params.id, + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + // this.props.showNotification(`调分成功`); + this.props.getdata({}); + this.Singlemagazine("", false); + } + }).catch((error) => { + //console.log(error); + }) + }else{ + const url = "/item_baskets/batch_set_score.json"; + var data = { + score: fenshu, + item_type: this.state.titilesm === "单选题" ? "SINGLE" : this.state.titilesm === "多选题" ? "MULTIPLE" : this.state.titilesm === "判断题" ? "JUDGMENT" : this.state.titilesm === "编程题" ? "PROGRAM" : '', + + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + // this.props.showNotification(`调分成功`); + this.props.getdata({}); + this.Singlemagazine("", false); + } + }).catch((error) => { + //console.log(error); + }) } - axios.post(url, data) - .then((result) => { - if (result.data.status == 0) { - // this.props.showNotification(`调分成功`); - this.props.getdata({}); - this.Singlemagazine("", false); - } - }).catch((error) => { - //console.log(error); - }) + } setDownloadys=(value)=>{ @@ -239,24 +260,49 @@ class Paperreview_item extends Component { modalsTypedel: bool, titilesms: names }) - const url = `/item_baskets/delete_item_type.json`; - axios.delete((url), { - data: { - item_type: names - } - }) - .then((response) => { - if (response.data.status == 0) { - // this.props.showNotification('大题删除成功'); - this.props.getdata({}); - this.setState({ - titilesms: "" - }) - } - }) - .catch(function (error) { - ////console.log(error); - }); + if(this.props.match.params.type==="Intelligence") { + //智能组卷 + const url = `/item_baskets/delete_item_type.json`; + axios.delete((url), { + data: { + item_type: names, + exam_setting_id:this.props.match.params.id, + } + }) + .then((response) => { + if (response.data.status == 0) { + // this.props.showNotification('大题删除成功'); + this.props.getdata({}); + this.setState({ + titilesms: "" + }) + } + }) + .catch(function (error) { + ////console.log(error); + }); + + }else{ + const url = `/item_baskets/delete_item_type.json`; + axios.delete((url), { + data: { + item_type: names + } + }) + .then((response) => { + if (response.data.status == 0) { + // this.props.showNotification('大题删除成功'); + this.props.getdata({}); + this.setState({ + titilesms: "" + }) + } + }) + .catch(function (error) { + ////console.log(error); + }); + } + @@ -271,19 +317,35 @@ class Paperreview_item extends Component { }) }else { //确定 - const url = `/item_baskets/${this.state.item_bank_id}.json`; - axios.delete(url, { data: { - exam_setting_id: this.props.match.params.id, - }}) - .then((response) => { - if (response.data.status == 0) { - // this.props.showNotification('试题删除成功'); - this.props.getdata({}); - } - }) - .catch(function (error) { + if(this.props.match.params.type==="Intelligence"){ + //智能组卷 + const url = `/item_baskets/${this.state.item_bank_id}.json`; + axios.delete(url, { data: { + exam_setting_id: this.props.match.params.id, + }}) + .then((response) => { + if (response.data.status == 0) { + // this.props.showNotification('试题删除成功'); + this.props.getdata({}); + } + }) + .catch(function (error) { + + }); + }else{ + const url = `/item_baskets/${this.state.item_bank_id}.json`; + axios.delete(url) + .then((response) => { + if (response.data.status == 0) { + // this.props.showNotification('试题删除成功'); + this.props.getdata({}); + } + }) + .catch(function (error) { + + }); + } - }); this.setState({ modalsTypedels: bool, From d98cda09f7cc461d26481d62288493e4f8b001bd 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 17:44:10 +0800 Subject: [PATCH 07/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 10 +-- public/react/src/modules/question/Question.js | 72 +++++++++++++------ .../modules/question/Questionitem_banks.js | 2 +- 3 files changed, 53 insertions(+), 31 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index e321b4d2e..a5e51a81c 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -258,16 +258,10 @@ export function initAxiosInterceptors(props) { } // // console.log(config); - if (config.method === "post") { - if (requestMap[config.url] === true) { // 避免重复的请求 导致页面f5刷新 也会被阻止 显示这个方法会影响到定制信息 - // console.log(config); - // console.log(JSON.parse(config)); - // console.log(config.url); - // console.log("被阻止了是重复请求================================="); + if (requestMap[config.url] === true) { return false; } - } - // 非file_update请求 + // // 非file_update请求 if (config.url.indexOf('update_file') === -1) { requestMap[config.url] = true; diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index e4a618f19..1ff4babd1 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -22,6 +22,7 @@ import './questioncss/questioncom.css'; import SiderBars from "../question/component/SiderBars"; import QuestionModalys from "./component/QuestionModalys"; +var Undoclickable=true; class Question extends Component { constructor(props) { super(props); @@ -69,6 +70,9 @@ class Question extends Component { isVisible: false, selectionbools:false, chakanjiexiboolindex:"无", + + + } } @@ -287,7 +291,10 @@ class Question extends Component { }) this.getdataslen(response.data.items); + // Undoclickable=true; + }).catch((error) => { + // Undoclickable=true; }); } @@ -634,6 +641,7 @@ class Question extends Component { single_questions_count: result.data.single_questions_count, subjective_questions_count: result.data.subjective_questions_count, }) + // Undoclickable=true; }).catch((error) => { // ////console.log(error); @@ -646,6 +654,7 @@ class Question extends Component { single_questions_count: 0, subjective_questions_count: 0, }) + // Undoclickable=true; }) } @@ -683,30 +692,49 @@ class Question extends Component { } // 撤销 getitem_basketss=(id)=>{ - //选用题型可以上传单个 或者多个题型 - let url=`/item_baskets/${id}.json`; + this.setState({ - axios.delete(url) - .then((result) => { - if (result.data.status == 0) { - // this.props.showNotification(`撤销成功`); - 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: this.state.difficulty, - item_type: this.state.item_type, - keyword: this.state.keywords, - page: this.state.page, - per_page:10, - }; - this.getdatasy(data); - this.getbasket_listdata(); - } - }).catch((error) => { - ////console.log(error); }) + if(Undoclickable===true){ + Undoclickable=false; + //选用题型可以上传单个 或者多个题型 + let url=`/item_baskets/${id}.json`; + + axios.delete(url) + .then((result) => { + if (result.data.status == 0) { + // this.props.showNotification(`撤销成功`); + 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: this.state.difficulty, + item_type: this.state.item_type, + keyword: this.state.keywords, + page: this.state.page, + per_page:10, + }; + this.getdatasy(data); + this.getbasket_listdata(); + setTimeout(()=>{ + Undoclickable=true; + },1000); + } + }).catch((error) => { + ////console.log(error); + setTimeout(()=>{ + Undoclickable=true; + },1000); + + }) + + }else{ + + return + } + + } //全选试题库 selectallquestionsonthispage=()=>{ diff --git a/public/react/src/modules/question/Questionitem_banks.js b/public/react/src/modules/question/Questionitem_banks.js index 11605ec6d..349615ddc 100644 --- a/public/react/src/modules/question/Questionitem_banks.js +++ b/public/react/src/modules/question/Questionitem_banks.js @@ -588,7 +588,7 @@ class Questionitem_banks extends Component { "" : this.preservation()} url={item_type === "PROGRAM" ?'/problems':'/question'}> + onSubmits={() => this.preservation()} url={'/question'}> }
) From ffec573b338ba961d13b111ea03662b76e7b34d4 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 17:48:14 +0800 Subject: [PATCH 08/52] =?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 | 118 +++++++++++------- public/react/src/modules/question/Question.js | 6 +- 2 files changed, 73 insertions(+), 51 deletions(-) diff --git a/public/react/src/modules/question/NewMyShixunModel.js b/public/react/src/modules/question/NewMyShixunModel.js index 301a51614..f20f9ab1a 100644 --- a/public/react/src/modules/question/NewMyShixunModel.js +++ b/public/react/src/modules/question/NewMyShixunModel.js @@ -23,6 +23,7 @@ import Bottomsubmit from "../modals/Bottomsubmit"; import QuestionModalys from "./component/QuestionModalys"; //exam_id 试卷的id +var Undoclickable=true; class NewMyShixunModel extends Component { constructor(props) { super(props); @@ -725,57 +726,78 @@ class NewMyShixunModel extends Component { } // 撤销 getitem_basketss=(id)=>{ + let url=""; if(this.props.exam_id===undefined){ - url=`/item_baskets/${id}.json`; - axios.delete(url) - .then((result) => { - if (result.data.status == 0) { - // this.props.showNotification(`撤销成功`); - 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: this.state.difficulty, - item_type: this.state.item_type, - keyword: this.state.keywords, - page: this.state.page, - per_page:10, - exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id), - }; - this.getdatasy(data); - this.getbasket_listdata(); - } - }).catch((error) => { - ////console.log(error); - }) + if(Undoclickable===true) { + Undoclickable = false; + url = `/item_baskets/${id}.json`; + axios.delete(url) + .then((result) => { + if (result.data.status == 0) { + // this.props.showNotification(`撤销成功`); + 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: this.state.difficulty, + item_type: this.state.item_type, + keyword: this.state.keywords, + page: this.state.page, + per_page: 10, + exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id), + }; + this.getdatasy(data); + this.getbasket_listdata(); + } + setTimeout(()=>{ + Undoclickable=true; + },1000); + + }).catch((error) => { + setTimeout(()=>{ + Undoclickable=true; + },1000); + + }) + } }else{ - url=`/examination_banks/${this.props.exam_id}/revoke_item.json`; - axios.delete(url,{ data: { - item_id:id===undefined?"":parseInt(id), - }}) - .then((result) => { - if (result.data.status == 0) { - // this.props.showNotification(`撤销成功`); - 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: this.state.difficulty, - item_type: this.state.item_type, - keyword: this.state.keywords, - page: this.state.page, - per_page:10, - exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id), - }; - this.getdatasy(data); - this.getbasket_listdata(); - } - }).catch((error) => { - ////console.log(error); - }) + if(Undoclickable===true) { + Undoclickable = false; + url = `/examination_banks/${this.props.exam_id}/revoke_item.json`; + axios.delete(url, { + data: { + item_id: id === undefined ? "" : parseInt(id), + } + }) + .then((result) => { + if (result.data.status == 0) { + // this.props.showNotification(`撤销成功`); + 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: this.state.difficulty, + item_type: this.state.item_type, + keyword: this.state.keywords, + page: this.state.page, + per_page: 10, + exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id), + }; + this.getdatasy(data); + this.getbasket_listdata(); + } + setTimeout(()=>{ + Undoclickable=true; + },1000); + }).catch((error) => { + setTimeout(()=>{ + Undoclickable=true; + },1000); + }) + } } diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index 1ff4babd1..9881bdc0e 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -717,10 +717,10 @@ class Question extends Component { }; this.getdatasy(data); this.getbasket_listdata(); - setTimeout(()=>{ - Undoclickable=true; - },1000); } + setTimeout(()=>{ + Undoclickable=true; + },1000); }).catch((error) => { ////console.log(error); setTimeout(()=>{ From 5cc7fdb66bd48356e5363afa36f92fad2ee7f3fa 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 18:02:32 +0800 Subject: [PATCH 09/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../question/component/ChoquesEditor.js | 19 +++++++++++++++++-- .../question/component/SingleEditor.js | 19 +++++++++++++++++-- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/question/component/ChoquesEditor.js b/public/react/src/modules/question/component/ChoquesEditor.js index 25aab75a1..36ef4c61f 100644 --- a/public/react/src/modules/question/component/ChoquesEditor.js +++ b/public/react/src/modules/question/component/ChoquesEditor.js @@ -236,8 +236,23 @@ class ChoquesEditor extends Component{ texts=""; } } else { - value = JSON.stringify(value); - texts=value; + if(_text.length>=500){ + var result = _text.substring(0,450); + texts={"ops":[{"insert":result}]}; + texts=JSON.stringify(texts); + }else { + // 提交到后台的内容需要处理一下; + value = JSON.stringify(value); + if(value.length>=500){ + let a=value.length-500; + let b=_text.length-a; + var result = _text.substring(0,b); + texts={"ops":[{"insert":result}]}; + texts=JSON.stringify(texts); + }else{ + texts=value; + } + } } let question_choices = this.state.question_choices.slice(0); question_choices[index] = texts; diff --git a/public/react/src/modules/question/component/SingleEditor.js b/public/react/src/modules/question/component/SingleEditor.js index 39c2e447e..c1255c83a 100644 --- a/public/react/src/modules/question/component/SingleEditor.js +++ b/public/react/src/modules/question/component/SingleEditor.js @@ -258,8 +258,23 @@ class SingleEditor extends Component{ texts=""; } } else { - value = JSON.stringify(value); - texts=value; + if(_text.length>=500){ + var result = _text.substring(0,450); + texts={"ops":[{"insert":result}]}; + texts=JSON.stringify(texts); + }else { + // 提交到后台的内容需要处理一下; + value = JSON.stringify(value); + if(value.length>=500){ + let a=value.length-500; + let b=_text.length-a; + var result = _text.substring(0,b); + texts={"ops":[{"insert":result}]}; + texts=JSON.stringify(texts); + }else{ + texts=value; + } + } } let question_choices = this.state.question_choices.slice(0); question_choices[index] = texts; From 6bd1b62ac9b24a2285510e37a7eb99e51a4d789c 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 18:11:17 +0800 Subject: [PATCH 10/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/component/ChoquesEditor.js | 1 + public/react/src/modules/question/component/JudquestionEditor.js | 1 + public/react/src/modules/question/component/SingleEditor.js | 1 + 3 files changed, 3 insertions(+) diff --git a/public/react/src/modules/question/component/ChoquesEditor.js b/public/react/src/modules/question/component/ChoquesEditor.js index 36ef4c61f..803adbdff 100644 --- a/public/react/src/modules/question/component/ChoquesEditor.js +++ b/public/react/src/modules/question/component/ChoquesEditor.js @@ -377,6 +377,7 @@ class ChoquesEditor extends Component{ } .signleEditor .quill_editor_for_react_area .ql-toolbar .ql-formats .ql-font { line-height: 20px; + min-width: 150px; } `}

diff --git a/public/react/src/modules/question/component/JudquestionEditor.js b/public/react/src/modules/question/component/JudquestionEditor.js index 09cf1094f..e5134dafb 100644 --- a/public/react/src/modules/question/component/JudquestionEditor.js +++ b/public/react/src/modules/question/component/JudquestionEditor.js @@ -397,6 +397,7 @@ class JudquestionEditor extends Component{ } .signleEditor .quill_editor_for_react_area .ql-toolbar .ql-formats .ql-font { line-height: 20px; + min-width: 150px; } `}

diff --git a/public/react/src/modules/question/component/SingleEditor.js b/public/react/src/modules/question/component/SingleEditor.js index c1255c83a..fd3840727 100644 --- a/public/react/src/modules/question/component/SingleEditor.js +++ b/public/react/src/modules/question/component/SingleEditor.js @@ -399,6 +399,7 @@ class SingleEditor extends Component{ } .signleEditor .quill_editor_for_react_area .ql-toolbar .ql-formats .ql-font { line-height: 20px; + min-width: 150px; } `}

From 5d3f267cc39d2509eb660718cef40415a7984abc 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 20:07:26 +0800 Subject: [PATCH 11/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/common/quillForEditor/font.css | 65 +++++++++++++++++++ .../react/src/common/quillForEditor/index.js | 1 + .../src/common/quillForEditor/quill.core.css | 18 +++++ .../src/common/quillForEditor/quill.snow.css | 28 ++++++++ .../question/component/ChoquesEditor.js | 1 + .../question/component/JudquestionEditor.js | 1 + .../question/component/SingleEditor.js | 1 + .../src/modules/question/questioncss/font.css | 65 +++++++++++++++++++ .../question/questioncss/quill.core.css | 18 +++++ .../question/questioncss/quill.snow.css | 28 ++++++++ 10 files changed, 226 insertions(+) create mode 100644 public/react/src/common/quillForEditor/font.css create mode 100644 public/react/src/common/quillForEditor/quill.core.css create mode 100644 public/react/src/common/quillForEditor/quill.snow.css create mode 100644 public/react/src/modules/question/questioncss/font.css create mode 100644 public/react/src/modules/question/questioncss/quill.core.css create mode 100644 public/react/src/modules/question/questioncss/quill.snow.css diff --git a/public/react/src/common/quillForEditor/font.css b/public/react/src/common/quillForEditor/font.css new file mode 100644 index 000000000..8537e9f23 --- /dev/null +++ b/public/react/src/common/quillForEditor/font.css @@ -0,0 +1,65 @@ +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before { + content: "宋体"; + font-family: "SimSun"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before { + content: "黑体"; + font-family: "SimHei"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before { + content: "微软雅黑"; + font-family: "Microsoft YaHei"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before { + content: "楷体"; + font-family: "KaiTi"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]::before { + content: "仿宋"; + font-family: "FangSong"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before { + content: "Arial"; + font-family: "Arial"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before { + content: "Times New Roman"; + font-family: "Times New Roman"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]::before { + content: "sans-serif"; + font-family: "sans-serif"; +} + +.ql-font-SimSun { + font-family: "SimSun"; +} +.ql-font-SimHei { + font-family: "SimHei"; +} +.ql-font-Microsoft-YaHei { + font-family: "Microsoft YaHei"; +} +.ql-font-KaiTi { + font-family: "KaiTi"; +} +.ql-font-FangSong { + font-family: "FangSong"; +} +.ql-font-Arial { + font-family: "Arial"; +} +.ql-font-Times-New-Roman { + font-family: "Times New Roman"; +} +.ql-font-sans-serif { + font-family: "sans-serif"; +} diff --git a/public/react/src/common/quillForEditor/index.js b/public/react/src/common/quillForEditor/index.js index 89a4f6224..6b41885e7 100644 --- a/public/react/src/common/quillForEditor/index.js +++ b/public/react/src/common/quillForEditor/index.js @@ -11,6 +11,7 @@ import 'quill/dist/quill.core.css'; // 核心样式 import 'quill/dist/quill.snow.css'; // 有工具栏 import 'quill/dist/quill.bubble.css'; // 无工具栏 import 'katex/dist/katex.min.css'; // katex 表达式样式 +import './font.css' import React, { useState, useRef, useEffect } from 'react'; import Quill from 'quill'; import katex from 'katex'; diff --git a/public/react/src/common/quillForEditor/quill.core.css b/public/react/src/common/quillForEditor/quill.core.css new file mode 100644 index 000000000..516e388b6 --- /dev/null +++ b/public/react/src/common/quillForEditor/quill.core.css @@ -0,0 +1,18 @@ +.ql-editor .ql-font-Microsoft-YaHei { + font-family: "Microsoft YaHei"; +} +.ql-editor .ql-font-SimSun { + font-family: "SimSun"; +} +.ql-editor .ql-font-SimHei { + font-family: "SimHei"; +} +.ql-editor .ql-font-KaiTi { + font-family: "KaiTi"; +} +.ql-editor .ql-font-Arial { + font-family: "Arial"; +} +.ql-editor .Times-New-Roman { + font-family: "Times New Roman"; +} diff --git a/public/react/src/common/quillForEditor/quill.snow.css b/public/react/src/common/quillForEditor/quill.snow.css new file mode 100644 index 000000000..962b40f99 --- /dev/null +++ b/public/react/src/common/quillForEditor/quill.snow.css @@ -0,0 +1,28 @@ +.ql-snow .ql-picker.ql-font .ql-picker-label::before, +.ql-snow .ql-picker.ql-font .ql-picker-item::before { + content: '微软雅黑'; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before { + content: "微软雅黑"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before { + content: "宋体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before { + content: "黑体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before { + content: "楷体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before { + content: "Arial"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before { + content: "Times New Roman"; +} diff --git a/public/react/src/modules/question/component/ChoquesEditor.js b/public/react/src/modules/question/component/ChoquesEditor.js index 803adbdff..d274a6573 100644 --- a/public/react/src/modules/question/component/ChoquesEditor.js +++ b/public/react/src/modules/question/component/ChoquesEditor.js @@ -9,6 +9,7 @@ import TPMMDEditor from '../../../modules/tpm/challengesnew/TPMMDEditor'; import axios from 'axios' import update from 'immutability-helper' import './../questioncss/questioncom.css'; +import '../questioncss/font.css'; import {getUrl, ActionBtn, DMDEditor, ConditionToolTip} from 'educoder'; import QuillForEditor from '../../../common/quillForEditor'; const { TextArea } = Input; diff --git a/public/react/src/modules/question/component/JudquestionEditor.js b/public/react/src/modules/question/component/JudquestionEditor.js index e5134dafb..d2aa7a7f0 100644 --- a/public/react/src/modules/question/component/JudquestionEditor.js +++ b/public/react/src/modules/question/component/JudquestionEditor.js @@ -9,6 +9,7 @@ import TPMMDEditor from '../../../modules/tpm/challengesnew/TPMMDEditor'; import axios from 'axios' import update from 'immutability-helper' import './../questioncss/questioncom.css'; +import '../questioncss/font.css'; import {getUrl, ActionBtn, DMDEditor, ConditionToolTip} from 'educoder'; import QuillForEditor from '../../../common/quillForEditor'; diff --git a/public/react/src/modules/question/component/SingleEditor.js b/public/react/src/modules/question/component/SingleEditor.js index fd3840727..3a4950f24 100644 --- a/public/react/src/modules/question/component/SingleEditor.js +++ b/public/react/src/modules/question/component/SingleEditor.js @@ -10,6 +10,7 @@ import TPMMDEditor from '../../../modules/tpm/challengesnew/TPMMDEditor'; import axios from 'axios' import update from 'immutability-helper' import './../questioncss/questioncom.css'; +import '../questioncss/font.css'; import {getUrl, ActionBtn, DMDEditor, ConditionToolTip} from 'educoder'; const { TextArea } = Input; const confirm = Modal.confirm; diff --git a/public/react/src/modules/question/questioncss/font.css b/public/react/src/modules/question/questioncss/font.css new file mode 100644 index 000000000..8537e9f23 --- /dev/null +++ b/public/react/src/modules/question/questioncss/font.css @@ -0,0 +1,65 @@ +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before { + content: "宋体"; + font-family: "SimSun"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before { + content: "黑体"; + font-family: "SimHei"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before { + content: "微软雅黑"; + font-family: "Microsoft YaHei"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before { + content: "楷体"; + font-family: "KaiTi"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]::before { + content: "仿宋"; + font-family: "FangSong"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before { + content: "Arial"; + font-family: "Arial"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before { + content: "Times New Roman"; + font-family: "Times New Roman"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]::before { + content: "sans-serif"; + font-family: "sans-serif"; +} + +.ql-font-SimSun { + font-family: "SimSun"; +} +.ql-font-SimHei { + font-family: "SimHei"; +} +.ql-font-Microsoft-YaHei { + font-family: "Microsoft YaHei"; +} +.ql-font-KaiTi { + font-family: "KaiTi"; +} +.ql-font-FangSong { + font-family: "FangSong"; +} +.ql-font-Arial { + font-family: "Arial"; +} +.ql-font-Times-New-Roman { + font-family: "Times New Roman"; +} +.ql-font-sans-serif { + font-family: "sans-serif"; +} diff --git a/public/react/src/modules/question/questioncss/quill.core.css b/public/react/src/modules/question/questioncss/quill.core.css new file mode 100644 index 000000000..516e388b6 --- /dev/null +++ b/public/react/src/modules/question/questioncss/quill.core.css @@ -0,0 +1,18 @@ +.ql-editor .ql-font-Microsoft-YaHei { + font-family: "Microsoft YaHei"; +} +.ql-editor .ql-font-SimSun { + font-family: "SimSun"; +} +.ql-editor .ql-font-SimHei { + font-family: "SimHei"; +} +.ql-editor .ql-font-KaiTi { + font-family: "KaiTi"; +} +.ql-editor .ql-font-Arial { + font-family: "Arial"; +} +.ql-editor .Times-New-Roman { + font-family: "Times New Roman"; +} diff --git a/public/react/src/modules/question/questioncss/quill.snow.css b/public/react/src/modules/question/questioncss/quill.snow.css new file mode 100644 index 000000000..962b40f99 --- /dev/null +++ b/public/react/src/modules/question/questioncss/quill.snow.css @@ -0,0 +1,28 @@ +.ql-snow .ql-picker.ql-font .ql-picker-label::before, +.ql-snow .ql-picker.ql-font .ql-picker-item::before { + content: '微软雅黑'; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before { + content: "微软雅黑"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before { + content: "宋体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before { + content: "黑体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before { + content: "楷体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before { + content: "Arial"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before { + content: "Times New Roman"; +} From e64d002f42918c55d39557affe345c51fac76c8c 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 22:01:41 +0800 Subject: [PATCH 12/52] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=AD=97=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/common/quillForEditor/font.css | 33 +++++++++--------- .../react/src/common/quillForEditor/index.js | 10 +++--- .../question/component/ChoquesEditor.js | 9 +++-- .../question/component/JudquestionEditor.js | 10 ++++-- .../question/component/SingleEditor.js | 10 ++++-- .../src/modules/question/questioncss/font.css | 34 ++++++++++--------- 6 files changed, 60 insertions(+), 46 deletions(-) diff --git a/public/react/src/common/quillForEditor/font.css b/public/react/src/common/quillForEditor/font.css index 8537e9f23..08e78a5a2 100644 --- a/public/react/src/common/quillForEditor/font.css +++ b/public/react/src/common/quillForEditor/font.css @@ -1,65 +1,66 @@ +@charset "utf-8"; .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before { content: "宋体"; - font-family: "SimSun"; + font-family:SimSun !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before { content: "黑体"; - font-family: "SimHei"; + font-family:SimHei !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before { content: "微软雅黑"; - font-family: "Microsoft YaHei"; + font-family:Microsoft YaHei !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before { content: "楷体"; - font-family: "KaiTi"; + font-family:KaiTi !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]::before { content: "仿宋"; - font-family: "FangSong"; + font-family:FangSong !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before { content: "Arial"; - font-family: "Arial"; + font-family:Arial !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before { content: "Times New Roman"; - font-family: "Times New Roman"; + font-family:Times New Roman !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]::before { content: "sans-serif"; - font-family: "sans-serif"; + font-family:sans-serif !important; } .ql-font-SimSun { - font-family: "SimSun"; + font-family:SimSun !important; } .ql-font-SimHei { - font-family: "SimHei"; + font-family:SimHei !important; } .ql-font-Microsoft-YaHei { - font-family: "Microsoft YaHei"; + font-family:Microsoft YaHei !important; } .ql-font-KaiTi { - font-family: "KaiTi"; + font-family:KaiTi !important; } .ql-font-FangSong { - font-family: "FangSong"; + font-family:FangSong !important; } .ql-font-Arial { - font-family: "Arial"; + font-family:Arial !important; } .ql-font-Times-New-Roman { - font-family: "Times New Roman"; + font-family:Times New Roman !important; } .ql-font-sans-serif { - font-family: "sans-serif"; + font-family:sans-serif !important; } diff --git a/public/react/src/common/quillForEditor/index.js b/public/react/src/common/quillForEditor/index.js index 6b41885e7..ba37059ba 100644 --- a/public/react/src/common/quillForEditor/index.js +++ b/public/react/src/common/quillForEditor/index.js @@ -20,12 +20,12 @@ import { fetchUploadImage } from '../../services/ojService.js'; import { getImageUrl } from 'educoder' import ImageBlot from './ImageBlot'; import FillBlot from './FillBlot'; -const Size = Quill.import('attributors/style/size'); -const Font = Quill.import('formats/font'); +var Size = Quill.import('attributors/style/size'); // const Color = Quill.import('attributes/style/color'); Size.whitelist = ['14px', '16px', '18px', '20px', false]; -Font.whitelist = ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']; - +var fonts = ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong']; +var Font = Quill.import('formats/font'); +Font.whitelist = fonts; //将字体加入到白名单 window.Quill = Quill; window.katex = katex; Quill.register(ImageBlot); @@ -60,7 +60,7 @@ function QuillForEditor ({ {align: []}, {list: 'ordered'}, {list: 'bullet'}, // 列表 {script: 'sub'}, {script: 'super'}, { 'color': [] }, { 'background': [] }, - { 'font': ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']}, + { 'font': []}, {header: [1,2,3,4,5,false]}, 'blockquote', 'code-block', 'link', 'image', 'video', diff --git a/public/react/src/modules/question/component/ChoquesEditor.js b/public/react/src/modules/question/component/ChoquesEditor.js index d274a6573..be660b386 100644 --- a/public/react/src/modules/question/component/ChoquesEditor.js +++ b/public/react/src/modules/question/component/ChoquesEditor.js @@ -349,9 +349,9 @@ class ChoquesEditor extends Component{ // //////console.log("xuanzheshijuan"); // //////console.log(answerTagArray); // //////console.log(!exerciseIsPublish); - const options=['code-block', 'image', 'formula',{size: ['14px', '16px', '18px', '20px']}, - { 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']}, - { 'font': ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']} + const options=['code-block', 'image', 'formula', + 'bold', 'italic', 'underline', 'strike',{size: ['14px', '16px', '18px', '20px']}, + { 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']} ] return(

@@ -380,6 +380,9 @@ class ChoquesEditor extends Component{ line-height: 20px; min-width: 150px; } + .signleEditor .quill_editor_for_react_area .ql-container .ql-editor p{ + font-family: MicrosoftYaHei; + } `}

{/* {!question_id ? '新建' : '编辑'} */} diff --git a/public/react/src/modules/question/component/JudquestionEditor.js b/public/react/src/modules/question/component/JudquestionEditor.js index d2aa7a7f0..58954dd85 100644 --- a/public/react/src/modules/question/component/JudquestionEditor.js +++ b/public/react/src/modules/question/component/JudquestionEditor.js @@ -369,9 +369,10 @@ class JudquestionEditor extends Component{ // ////////console.log(answerTagArray); // ////////console.log(!exerciseIsPublish); const params= this.props&&this.props.match&&this.props.match.params; - const options=['code-block', 'image', 'formula',{size: ['14px', '16px', '18px', '20px']}, - { 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']}, - { 'font': ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']} + const options=['code-block', 'image', 'formula', + 'bold', 'italic', 'underline', 'strike', + {size: ['14px', '16px', '18px', '20px']}, + { 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']} ] return(

@@ -400,6 +401,9 @@ class JudquestionEditor extends Component{ line-height: 20px; min-width: 150px; } + .signleEditor .quill_editor_for_react_area .ql-container .ql-editor p{ + font-family: MicrosoftYaHei; + } `}

{/* {!question_id ? '新建' : '编辑'} */} diff --git a/public/react/src/modules/question/component/SingleEditor.js b/public/react/src/modules/question/component/SingleEditor.js index 3a4950f24..665785240 100644 --- a/public/react/src/modules/question/component/SingleEditor.js +++ b/public/react/src/modules/question/component/SingleEditor.js @@ -370,9 +370,10 @@ class SingleEditor extends Component{ // //////console.log("xuanzheshijuan"); // //////console.log(answerTagArray); // //////console.log(!exerciseIsPublish); - const options=['code-block', 'image', 'formula',{size: ['14px', '16px', '18px', '20px']}, - { 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']}, - { 'font': ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']} + const options=['code-block', 'image', 'formula', + 'bold', 'italic', 'underline', 'strike', + ,{size: ['14px', '16px', '18px', '20px']}, + { 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']} ] return(

@@ -402,6 +403,9 @@ class SingleEditor extends Component{ line-height: 20px; min-width: 150px; } + .signleEditor .quill_editor_for_react_area .ql-container .ql-editor p{ + font-family: MicrosoftYaHei; + } `}

{/* {!question_id ? '新建' : '编辑'} */} diff --git a/public/react/src/modules/question/questioncss/font.css b/public/react/src/modules/question/questioncss/font.css index 8537e9f23..1f2cd8386 100644 --- a/public/react/src/modules/question/questioncss/font.css +++ b/public/react/src/modules/question/questioncss/font.css @@ -1,65 +1,67 @@ +@charset "utf-8"; .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before { content: "宋体"; - font-family: "SimSun"; + font-family:SimSun !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before { content: "黑体"; - font-family: "SimHei"; + font-family:SimHei !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before { content: "微软雅黑"; - font-family: "Microsoft YaHei"; + font-family:Microsoft YaHei !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before { content: "楷体"; - font-family: "KaiTi"; + font-family:KaiTi !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]::before { content: "仿宋"; - font-family: "FangSong"; + font-family:FangSong !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before { content: "Arial"; - font-family: "Arial"; + font-family:Arial !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before { content: "Times New Roman"; - font-family: "Times New Roman"; + font-family:Times New Roman !important; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]::before { content: "sans-serif"; - font-family: "sans-serif"; + font-family:sans-serif !important; } + .ql-font-SimSun { - font-family: "SimSun"; + font-family:SimSun !important; } .ql-font-SimHei { - font-family: "SimHei"; + font-family:SimHei !important; } .ql-font-Microsoft-YaHei { - font-family: "Microsoft YaHei"; + font-family:Microsoft YaHei !important; } .ql-font-KaiTi { - font-family: "KaiTi"; + font-family:KaiTi !important; } .ql-font-FangSong { - font-family: "FangSong"; + font-family:FangSong !important; } .ql-font-Arial { - font-family: "Arial"; + font-family:Arial !important; } .ql-font-Times-New-Roman { - font-family: "Times New Roman"; + font-family:Times New Roman !important; } .ql-font-sans-serif { - font-family: "sans-serif"; + font-family:sans-serif !important; } From 27109c1c5f8b46dc441bea401540c786dbd4ffb0 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 22:33:52 +0800 Subject: [PATCH 13/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/question/component/Headplugselections.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/question/component/Headplugselections.js b/public/react/src/modules/question/component/Headplugselections.js index 4da7a57e3..d683ad43e 100644 --- a/public/react/src/modules/question/component/Headplugselections.js +++ b/public/react/src/modules/question/component/Headplugselections.js @@ -260,7 +260,7 @@ class Headplugselections extends Component { disciplinesdata&&disciplinesdata.map((item,key)=>{ return( item.sub_disciplines.length>0? - trigger.parentNode} overlay={ overlaymenu(item.sub_disciplines,item.id)} key={key} placement={"bottomRight"}> + trigger.parentNode} overlay={ overlaymenu(item.sub_disciplines,item.id)} key={key} placement="bottomLeft">

  • this.shixunserdchAlls(item.sub_disciplines,item.id)}> {item.name}
  • From afd54d61c1eefc9c2b90b2befbad4a0530225887 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, 20 Feb 2020 14:37:19 +0800 Subject: [PATCH 14/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/question/component/ChoquesEditor.js | 5 +---- .../src/modules/question/component/JudquestionEditor.js | 6 +----- public/react/src/modules/question/component/SingleEditor.js | 5 +---- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/public/react/src/modules/question/component/ChoquesEditor.js b/public/react/src/modules/question/component/ChoquesEditor.js index be660b386..233c5237d 100644 --- a/public/react/src/modules/question/component/ChoquesEditor.js +++ b/public/react/src/modules/question/component/ChoquesEditor.js @@ -349,10 +349,7 @@ class ChoquesEditor extends Component{ // //////console.log("xuanzheshijuan"); // //////console.log(answerTagArray); // //////console.log(!exerciseIsPublish); - const options=['code-block', 'image', 'formula', - 'bold', 'italic', 'underline', 'strike',{size: ['14px', '16px', '18px', '20px']}, - { 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']} - ] + const options=['code-block', 'image', 'formula'] return(
    + + :"" + }
    diff --git a/public/react/src/modules/testpaper/component/Contentpart.js b/public/react/src/modules/testpaper/component/Contentpart.js index b73da225f..9aa4cf2ea 100644 --- a/public/react/src/modules/testpaper/component/Contentpart.js +++ b/public/react/src/modules/testpaper/component/Contentpart.js @@ -17,6 +17,7 @@ import NoneDatas from '../component/NoneDatas'; import Contentquestionbank from "./Contentquestionbank"; import LoadingSpin from '../../../common/LoadingSpin'; import Listjihe from "./Listjihe"; +import Certifiedprofessional from "../../modals/Certifiedprofessional"; const { TabPane } = Tabs; const Search = Input.Search; class Contentpart extends Component { @@ -25,6 +26,8 @@ class Contentpart extends Component { this.state = { page:1, defaultActiveKeyss:"0", + mydisplay:false, + occupation:2, } } @@ -86,9 +89,31 @@ class Contentpart extends Component { this.props.callback(defaultActiveKeys,false); } } + HideAddcoursestypess=(i)=>{ + console.log("调用了"); + this.setState({ + mydisplay:true, + occupation:i, + }) + } + + mydisplayHidedel=()=>{ + this.setState({ + mydisplay:false, + }) + } + xinzenw=(url)=>{ + //只限制了教师 + if(this.props.current_user.professional_certification===false){ + this.HideAddcoursestypess(2); + return + } + + this.props.history.push(url); + } render() { - let {page,defaultActiveKeyss}=this.state; + let {page,defaultActiveKeyss,mydisplay}=this.state; let {defaultActiveKey,defaultActiveKeybool}=this.props; let defaultActiveKeys=defaultActiveKey+''; @@ -125,6 +150,27 @@ class Contentpart extends Component { return (
    + { + mydisplay===true? + + + :"" + } + { + mydisplay===true? + + + :"" + }
    @@ -203,13 +249,13 @@ class Contentpart extends Component { width:"50%" }}> - + this.xinzenw('/Integeneration')}>

    智能组卷

    - + this.xinzenw('/question')}>

    人工组卷

    diff --git a/public/react/src/modules/testpaper/component/Listjihe.js b/public/react/src/modules/testpaper/component/Listjihe.js index c6b83eafa..8dc398e4e 100644 --- a/public/react/src/modules/testpaper/component/Listjihe.js +++ b/public/react/src/modules/testpaper/component/Listjihe.js @@ -135,21 +135,22 @@ class Listjihe extends Component { } { - items.apply===false? -

    this.props.showmodels(items.id)}> - - 公开 -

    - : - ( items.public==true? - "" - : -

    this.props.showmodelsInaudit(e)}> - - 公开审核中 +

    + + 已公开

    - ) + : + items.apply===false? +

    this.props.showmodels(items.id)}> + + 公开 +

    + : +

    this.props.showmodelsInaudit(e)}> + + 公开审核中 +

    }
    :""} From a904ff0acff5ad6ef3ab2f4b0ab4bd58314b7e65 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, 21 Feb 2020 16:11:24 +0800 Subject: [PATCH 18/52] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/question/NewMyShixunModel.js | 27 ++++++++++++++-- public/react/src/modules/question/Question.js | 32 +++++++------------ .../modules/question/component/Contentpart.js | 26 +++++++++++++-- .../modules/question/component/SiderBars.js | 20 ++++++++++-- .../testpaper/component/Contentpart.js | 24 ++++++++++++-- 5 files changed, 99 insertions(+), 30 deletions(-) diff --git a/public/react/src/modules/question/NewMyShixunModel.js b/public/react/src/modules/question/NewMyShixunModel.js index f20f9ab1a..4e3132ab9 100644 --- a/public/react/src/modules/question/NewMyShixunModel.js +++ b/public/react/src/modules/question/NewMyShixunModel.js @@ -163,11 +163,22 @@ class NewMyShixunModel extends Component { //初始化 componentDidMount() { - const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false; + let isysladmins=false; const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false; const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false; let {defaultActiveKey} = this.props; var defaultActiveKeys=defaultActiveKey; + if(this.props){ + if(this.props.current_user){ + if(this.props.current_user.admin){ + isysladmins=true; + } + else if(this.props.current_user.business){ + isysladmins=true; + } + } + } + if(isysladmins===true||(is_teacher===true&&professional_certification===true)){ defaultActiveKeys="0" }else{ @@ -207,12 +218,22 @@ class NewMyShixunModel extends Component { componentDidUpdate(prevProps) { if(prevProps.current_user !== this.props.current_user) { - debugger - const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false; + let isysladmins=false; const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false; const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false; let {defaultActiveKey} = this.props; var defaultActiveKeys=defaultActiveKey; + if(this.props){ + if(this.props.current_user){ + if(this.props.current_user.admin){ + isysladmins=true; + } + else if(this.props.current_user.business){ + isysladmins=true; + } + } + } + if(isysladmins===true||(is_teacher===true&&professional_certification===true)){ defaultActiveKeys="0" }else{ diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index 9881bdc0e..b7a96d956 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -853,10 +853,19 @@ class Question extends Component { + program_questions_count + single_questions_count + subjective_questions_count; - const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false; + let isysladmins=false; const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false; const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false; - + if(this.props){ + if(this.props.current_user){ + if(this.props.current_user.admin){ + isysladmins=true; + } + else if(this.props.current_user.business){ + isysladmins=true; + } + } + } return (
    @@ -923,19 +932,7 @@ class Question extends Component { ` } - { - isysladmins===true? - this.showDrawer()} - Headertop={Headertop} - - /> - : - is_teacher===true&&professional_certification===true? + - : - - "" - } - {/*顶部*/} diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index 4ccab5e14..142e34ccc 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -42,11 +42,22 @@ class Contentpart extends Component { componentDidUpdate(prevProps) { if(prevProps.current_user !== this.props.current_user) { - const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false; + let isysladmins=false; const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false; const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false; let {defaultActiveKey} = this.props; var defaultActiveKeys=defaultActiveKey; + if(this.props){ + if(this.props.current_user){ + if(this.props.current_user.admin){ + isysladmins=true; + } + else if(this.props.current_user.business){ + isysladmins=true; + } + } + } + if(isysladmins===true||(is_teacher===true&&professional_certification===true)){ defaultActiveKeys="0" }else{ @@ -120,10 +131,19 @@ class Contentpart extends Component { let {page,mydisplay}=this.state; let {defaultActiveKey,item_type,booljupyterurls}=this.props; const defaultActiveKeys=defaultActiveKey+''; - const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false; + let isysladmins=false; const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false; const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false; - + if(this.props){ + if(this.props.current_user){ + if(this.props.current_user.admin){ + isysladmins=true; + } + else if(this.props.current_user.business){ + isysladmins=true; + } + } + } const content = (
    0?"-task-sidebar mystask-sidebars":"-task-sidebar mystask-sidebarss"} > @@ -101,7 +117,7 @@ class SiderBars extends Component { {this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?
    { - mypath&&mypath==="/question"? + mypath&&mypath==="/question"&&swsilan===true? :"" diff --git a/public/react/src/modules/testpaper/component/Contentpart.js b/public/react/src/modules/testpaper/component/Contentpart.js index 9aa4cf2ea..eac80dad4 100644 --- a/public/react/src/modules/testpaper/component/Contentpart.js +++ b/public/react/src/modules/testpaper/component/Contentpart.js @@ -63,11 +63,21 @@ class Contentpart extends Component { componentDidUpdate(prevProps) { if(prevProps.current_user !== this.props.current_user) { - const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false; + let isysladmins=false; const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false; const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false; let {defaultActiveKey} = this.props; let defaultActiveKeys=defaultActiveKey; + if(this.props){ + if(this.props.current_user){ + if(this.props.current_user.admin){ + isysladmins=true; + } + else if(this.props.current_user.business){ + isysladmins=true; + } + } + } if(isysladmins===true||(is_teacher===true&&professional_certification===true)){ defaultActiveKeys="0" }else{ @@ -117,9 +127,19 @@ class Contentpart extends Component { let {defaultActiveKey,defaultActiveKeybool}=this.props; let defaultActiveKeys=defaultActiveKey+''; - const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false; + let isysladmins=false; const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false; const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false; + if(this.props){ + if(this.props.current_user){ + if(this.props.current_user.admin){ + isysladmins=true; + } + else if(this.props.current_user.business){ + isysladmins=true; + } + } + } const contents = (
    Date: Fri, 21 Feb 2020 17:16:46 +0800 Subject: [PATCH 19/52] =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/question/component/Contentpart.js | 24 +++++++++- .../modules/question/component/Listjihe.js | 43 ++++++++++++++++-- .../component/QuestionModalPicture.js | 44 +++++++++++++++++++ 3 files changed, 107 insertions(+), 4 deletions(-) create mode 100644 public/react/src/modules/question/component/QuestionModalPicture.js diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index 142e34ccc..c26994147 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -18,6 +18,7 @@ import LoadingSpin from '../../../common/LoadingSpin'; import Contentquestionbank from "./Contentquestionbank"; import Listjihe from "./Listjihe"; import Certifiedprofessional from "../../modals/Certifiedprofessional"; +import QuestionModalys from '../component/QuestionModalPicture.js' const { TabPane } = Tabs; const Search = Input.Search; class Contentpart extends Component { @@ -28,12 +29,25 @@ class Contentpart extends Component { chakanjiexibool:false, mydisplay:false, occupation:2, + url: "" } } //初始化 componentDidMount(){ + } + handleShowUploadImage = (url) => { + // console.log('==============>>>>>>>>>>>>',url); + // setUrl(url); + this.setState({ + url:url + }) + } + handleClose=()=>{ + this.setState({ + url:'', + }) } chakanjiexibool=(index)=>{ @@ -128,7 +142,7 @@ class Contentpart extends Component { } render() { - let {page,mydisplay}=this.state; + let {page,mydisplay,url}=this.state; let {defaultActiveKey,item_type,booljupyterurls}=this.props; const defaultActiveKeys=defaultActiveKey+''; let isysladmins=false; @@ -184,6 +198,11 @@ class Contentpart extends Component { return (
    + {url? + this.handleClose()}> + : + "" + } { mydisplay===true? @@ -386,6 +405,9 @@ class Contentpart extends Component { showmodels={(e)=>this.props.showmodels(e)} showmodelysl={(e)=>this.props.showmodelysl(e)} showmodelsInaudit={(e)=>this.props.showmodelsInaudit(e)} + handleShowUploadImage={(e)=>this.handleShowUploadImage(e)} + handleClose={()=>this.handleClose()} + > diff --git a/public/react/src/modules/question/component/Listjihe.js b/public/react/src/modules/question/component/Listjihe.js index fe7d079ef..a31b74636 100644 --- a/public/react/src/modules/question/component/Listjihe.js +++ b/public/react/src/modules/question/component/Listjihe.js @@ -8,7 +8,8 @@ import { Table, Pagination, Radio, - Tooltip + Tooltip, + Icon } from "antd"; import './../questioncss/questioncom.css'; import QuillForEditor from "../../../common/quillForEditor"; @@ -31,6 +32,7 @@ class Listjihe extends Component { page: 1, name: "单选题", nd: "简单", + url: "" } } @@ -39,7 +41,21 @@ class Listjihe extends Component { } + handleShowUploadImage = (url) => { + try { + this.props.handleShowUploadImage(url); + }catch (e) { + + } + } + handleClose=()=>{ + try { + this.props.handleClose(); + }catch (e) { + + } + } //选用 Selectingpracticaltraining = (id) => { let data = {} @@ -63,8 +79,10 @@ class Listjihe extends Component { } + + render() { - let {page, name, nd} = this.state; + let {page, name, nd,url} = this.state; let {defaultActiveKey, items, listjihe, chakanjiexiboolindex, keindex} = this.props; // 编程答案 @@ -173,11 +191,26 @@ class Listjihe extends Component { } - return (
    {/*顶部*/} + + + {/* 显示上传的图片信息 */} + {/*
    */} + {/* this.handleClose()}/>*/} + {/*
    */} + {/* */} + {/*
    */} + {/*
    */} +
    + {/**/} +
    @@ -40,4 +53,4 @@ class QuestionModalys extends Component { } } -export default QuestionModalys; +export default QuestionModalPicture; diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js index 0064b83cf..76b715519 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js @@ -16,6 +16,7 @@ import { import '../testioncss/testioncss.css'; import '../../tpm/newshixuns/css/Newshixuns.css'; import QuillForEditor from "../../../common/quillForEditor"; +import QuestionModalPicture from "../../question/component/QuestionModalPicture"; const tagArray = [ 'A.', 'B.', 'C.', 'D.', 'E.', 'F.', 'G.', 'H.', 'I.', @@ -33,6 +34,7 @@ class Paperlibraryseeid_items extends Component { questions: 0, totalscore: 0, total: 0, + url: "" } } @@ -65,9 +67,20 @@ class Paperlibraryseeid_items extends Component { Singlemagaziness = () => { } - + handleShowUploadImage = (url) => { + // console.log('==============>>>>>>>>>>>>',url); + // setUrl(url); + this.setState({ + url:url + }) + } + handleClose=()=>{ + this.setState({ + url:'', + }) + } render() { - let {questions, totalscore, total, items} = this.state; + let {questions, totalscore, total, items,url} = this.state; let {objectsingle, indexx, paperreviewsingleindex, indexxy,name} = this.props; @@ -109,6 +122,11 @@ class Paperlibraryseeid_items extends Component { style={{ minHeight: "114px", }}> + {url? + this.handleClose()}> + : + "" + } + + :"" + } + + :"" + } { visible===true? { - isysladmins===true||(is_teacher===true&&professional_certification===true)? + isysladmins===true||is_teacher===true? this.props.callback(e,true)}> @@ -252,7 +352,7 @@ class Contentpart extends Component { ` } -
    +
    { - isysladmins===true||(is_teacher===true&&professional_certification===true)? + isysladmins===true||is_teacher===true?
    @@ -326,9 +426,9 @@ class Contentpart extends Component { : this.props.Contentdata.exams.map((object, index) => { return ( this.props.Testpapereditor(e)} - showmodels={(e)=>this.props.showmodels(e)} - showmodelysl={(e)=>this.props.showmodelysl(e)} + Testpapereditor={(e)=>this.Testpapereditor(e)} + showmodels={(e)=>this.showmodels(e)} + showmodelysl={(e)=>this.showmodelysl(e)} Isitapopup={this.props.Isitapopup} showmodelsInaudit={(e)=>this.props.showmodelsInaudit(e)} > diff --git a/public/react/src/modules/testpaper/component/Listjihe.js b/public/react/src/modules/testpaper/component/Listjihe.js index 8dc398e4e..569ab3008 100644 --- a/public/react/src/modules/testpaper/component/Listjihe.js +++ b/public/react/src/modules/testpaper/component/Listjihe.js @@ -10,6 +10,7 @@ import { Radio } from "antd"; import './../testioncss/testioncss.css'; +import Certifiedprofessional from "../../modals/Certifiedprofessional"; const tagArray = [ 'A.', 'B.', 'C.', 'D.', 'E.', 'F.', 'G.', 'H.', 'I.', 'J.', 'K.', 'L.', 'M.', 'N.', 'O.', 'P.', 'Q.', 'R.', @@ -23,12 +24,27 @@ class Listjihe extends Component { name:"单选题", nd:"简单", chakanjiexibool:false, + mydisplay:false, + occupation:2, + isysladmins:false, } } //初始化 componentDidMount(){ - - + let isysladmins=false; + if(this.props){ + if(this.props.current_user){ + if(this.props.current_user.admin){ + isysladmins=true; + } + else if(this.props.current_user.business){ + isysladmins=true; + } + } + } + this.setState({ + isysladmins:isysladmins + }) } chakanjiexibool=()=>{ @@ -55,15 +71,31 @@ class Listjihe extends Component { this.props.getitem_basketss(id); } + HideAddcoursestypess=(i)=>{ + console.log("调用了"); + this.setState({ + mydisplay:true, + occupation:i, + }) + } + mydisplayHidedel=()=>{ + this.setState({ + mydisplay:false, + }) + } gotoseesj=(id)=>{ + if(this.props.current_user.professional_certification===false&&this.state.isysladmins===false){ + this.HideAddcoursestypess(2); + return + } this.props.history.push(`/paperlibrary/see/${id}?defaultActiveKey=${this.props.defaultActiveKey}`); } render() { - let {page,name,nd,chakanjiexibool}=this.state; + let {page,name,nd,chakanjiexibool,mydisplay}=this.state; let {defaultActiveKey,items}=this.props; const names= items&&items.name&&items.name; @@ -77,6 +109,27 @@ class Listjihe extends Component { return (
    + { + mydisplay===true? + + + :"" + } + { + mydisplay===true? + + + :"" + }
    From c10833a3eb1548a3f14033988d41f208e9117c6c 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, 21 Feb 2020 20:03:12 +0800 Subject: [PATCH 27/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 4 ++-- .../src/modules/question/component/QuestionModalPicture.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 5b5942f22..a5e51a81c 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -42,9 +42,9 @@ if (isDev) { window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' } // 超管 -// debugType="admin"; +debugType="admin"; // 老师 -debugType="teacher"; +// debugType="teacher"; // 学生 // debugType="student"; diff --git a/public/react/src/modules/question/component/QuestionModalPicture.js b/public/react/src/modules/question/component/QuestionModalPicture.js index f54576d61..bf49253ea 100644 --- a/public/react/src/modules/question/component/QuestionModalPicture.js +++ b/public/react/src/modules/question/component/QuestionModalPicture.js @@ -45,7 +45,9 @@ class QuestionModalPicture extends Component {
    {/**/}
    - +
    From 8c3fea2f14f254c1dd2cec6e7e642e030b6c1da9 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, 21 Feb 2020 20:19:32 +0800 Subject: [PATCH 28/52] =?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/component/QuestionModalPicture.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/question/component/QuestionModalPicture.js b/public/react/src/modules/question/component/QuestionModalPicture.js index bf49253ea..bd556e338 100644 --- a/public/react/src/modules/question/component/QuestionModalPicture.js +++ b/public/react/src/modules/question/component/QuestionModalPicture.js @@ -46,7 +46,7 @@ class QuestionModalPicture extends Component { {/**/}
    From 0b6416d64e54061e875377b9af7a494438b74b55 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, 21 Feb 2020 21:05:15 +0800 Subject: [PATCH 29/52] =?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_item.js | 54 ++++++++++++++++--- 1 file changed, 46 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/question/Paperreview_item.js b/public/react/src/modules/question/Paperreview_item.js index 09dddcfb6..8f3ca4f28 100644 --- a/public/react/src/modules/question/Paperreview_item.js +++ b/public/react/src/modules/question/Paperreview_item.js @@ -85,9 +85,17 @@ class Paperreview_item extends Component { const positions = this.props.single_questions.questions[result.destination.index].position; const url = `/item_baskets/${ids}/adjust_position.json` - var data = { - position: positions + if(this.props.match.params.type==="Intelligence") { + var data = { + position: positions, + exam_setting_id:this.props.match.params.id, + } + }else { + var data = { + position: positions + } } + axios.post(url, data) .then((result) => { if (result.data.status == 0) { @@ -104,8 +112,18 @@ class Paperreview_item extends Component { const ids = this.props.multiple_questions.questions[result.source.index].id; const positions = this.props.multiple_questions.questions[result.destination.index].position; const url = `/item_baskets/${ids}/adjust_position.json` - var data = { - position: positions + + if(this.props.match.params.type==="Intelligence") { + var data = { + position: positions, + exam_setting_id:this.props.match.params.id, + } + + }else { + var data = { + position: positions + } + } axios.post(url, data) .then((result) => { @@ -125,8 +143,18 @@ class Paperreview_item extends Component { const ids = this.props.judgement_questions.questions[result.source.index].id; const positions = this.props.judgement_questions.questions[result.destination.index].position; const url = `/item_baskets/${ids}/adjust_position.json` - var data = { - position: positions + + + if(this.props.match.params.type==="Intelligence") { + var data = { + position: positions, + exam_setting_id:this.props.match.params.id, + } + + }else { + var data = { + position: positions + } } axios.post(url, data) .then((result) => { @@ -145,8 +173,18 @@ class Paperreview_item extends Component { const ids = this.props.program_questions.questions[result.source.index].id; const positions = this.props.program_questions.questions[result.destination.index].position; const url = `/item_baskets/${ids}/adjust_position.json` - var data = { - position: positions + + + + if(this.props.match.params.type==="Intelligence") { + var data = { + position: positions, + exam_setting_id:this.props.match.params.id, + } + }else { + var data = { + position: positions + } } axios.post(url, data) .then((result) => { From 5e8df535cd1bb1e8cf83b34e64615bbd1cb1ea0a 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, 27 Feb 2020 16:21:51 +0800 Subject: [PATCH 30/52] =?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/developer/studentStudy/index.js | 27 +++++++++++++------ public/react/src/services/ojService.js | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/developer/studentStudy/index.js b/public/react/src/modules/developer/studentStudy/index.js index 184ce0af5..2af70efdf 100644 --- a/public/react/src/modules/developer/studentStudy/index.js +++ b/public/react/src/modules/developer/studentStudy/index.js @@ -1,7 +1,7 @@ /* * @Description: 学员学习 * @Author: tangjiang - * @Github: + * @Github: * @Date: 2019-11-23 10:53:19 * @LastEditors : tangjiang * @LastEditTime : 2020-02-10 18:24:01 @@ -37,7 +37,7 @@ function StudentStudy (props) { } = props; const { - match: { params }, + match: { params }, getUserProgramDetail, saveUserProgramIdentifier } = props; @@ -48,7 +48,18 @@ function StudentStudy (props) { // 保存当前的id saveUserProgramIdentifier(id); // startProgramQuestion(id); - getUserProgramDetail(id); + // console.log("getUserProgramDetail(id)"); + // console.log(id); + // console.log(id.charAt(id.length-1)); + try { + if(id.charAt(id.length-1)==="?"){ + id = id.substring(0, id.length - 1); + } + }catch (e) { + + } + + getUserProgramDetail(id); const $searchs = window.location.search && window.location.search.substring(1); if ($searchs) { const $params = $searchs.split('&') || []; @@ -110,7 +121,7 @@ function StudentStudy (props) { props.clearOjForUserReducer(); props.history.push(`/problems/${identifier}/edit?{searchParams}`); } - // 处理退出 + // 处理退出 const handleClickQuit = () => { // 退出时,清空内容 props.clearOjForUserReducer(); @@ -136,9 +147,9 @@ function StudentStudy (props) {
    {/* to={`/problems/${_hack_id}/edit`} */} - handleClickEditor(hack.identifier)} + onClick={() => handleClickEditor(hack.identifier)} className={`quit-btn`} > 编辑 @@ -161,7 +172,7 @@ function StudentStudy (props) {
    -
    @@ -182,7 +193,7 @@ const mapStateToProps = (state) => { user_program_identifier, hack_identifier, searchParams - }; + }; }; const mapDispatchToProps = (dispatch) => ({ diff --git a/public/react/src/services/ojService.js b/public/react/src/services/ojService.js index d0d0ae0ae..806364ef4 100644 --- a/public/react/src/services/ojService.js +++ b/public/react/src/services/ojService.js @@ -154,4 +154,4 @@ export async function fetchQuestion (params) { export async function fetchTagDisciplines (params) { const url = `/tag_disciplines.json`; return axios.post(url, params); -} \ No newline at end of file +} From 338e4e2902dd5b97806f2aabd1dc1086dbb84869 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, 27 Feb 2020 16:28:05 +0800 Subject: [PATCH 31/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/component/Contentpart.js | 2 +- public/react/src/modules/testpaper/component/Contentpart.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index 799875876..955a9d9b8 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -347,7 +347,7 @@ class Contentpart extends Component { ` .xaxisreverseorder .ant-input-group-addon{ - width: 60px !important; + width: 48px !important; } diff --git a/public/react/src/modules/testpaper/component/Contentpart.js b/public/react/src/modules/testpaper/component/Contentpart.js index cce165b91..5148e00ca 100644 --- a/public/react/src/modules/testpaper/component/Contentpart.js +++ b/public/react/src/modules/testpaper/component/Contentpart.js @@ -338,7 +338,7 @@ class Contentpart extends Component { { ` .sortinxdirection .ant-input-group-addon{ - width: 60px !important; + width: 48px !important; } From 8c608562c2f690665e714be95ab842aae67a9cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 2 Mar 2020 15:08:58 +0800 Subject: [PATCH 32/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/NewHeader.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 7ad929ffe..9b832f344 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -1065,7 +1065,7 @@ submittojoinclass=(value)=>{ color:#010101 !important; } .queyppors { - top: 63px !important; + top: 42px !important; } .questionbanks .ant-popover-inner-content { @@ -1076,8 +1076,8 @@ submittojoinclass=(value)=>{ { Periofters===true? -
  • - +
  • +
    Date: Tue, 3 Mar 2020 18:41:33 +0800 Subject: [PATCH 33/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/Question.js | 2 +- public/react/src/modules/testpaper/Testpaperlibrary.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index bdb808047..c99957132 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -241,7 +241,7 @@ class Question extends Component { this.setState({ booljupyterurls:false, }) - },1000); + },500); if (response === null || response === undefined) { return diff --git a/public/react/src/modules/testpaper/Testpaperlibrary.js b/public/react/src/modules/testpaper/Testpaperlibrary.js index 76b30d2ba..054f0aced 100644 --- a/public/react/src/modules/testpaper/Testpaperlibrary.js +++ b/public/react/src/modules/testpaper/Testpaperlibrary.js @@ -168,7 +168,7 @@ class Testpaperlibrary extends Component { this.setState({ booljupyterurls:false, }) - },1000); + },500); if (response === null || response === undefined) { return From f83c4bc685f4113434b243df48f2b8f3f1ad4214 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, 3 Mar 2020 18:45:52 +0800 Subject: [PATCH 34/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/Question.js | 2 -- public/react/src/modules/testpaper/Testpaperlibrary.js | 2 -- 2 files changed, 4 deletions(-) diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index c99957132..5afb988ba 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -237,11 +237,9 @@ class Question extends Component { } axios.get((url), {params: data}).then((response) => { - setTimeout(()=>{ this.setState({ booljupyterurls:false, }) - },500); if (response === null || response === undefined) { return diff --git a/public/react/src/modules/testpaper/Testpaperlibrary.js b/public/react/src/modules/testpaper/Testpaperlibrary.js index 054f0aced..ca4bd8594 100644 --- a/public/react/src/modules/testpaper/Testpaperlibrary.js +++ b/public/react/src/modules/testpaper/Testpaperlibrary.js @@ -164,11 +164,9 @@ class Testpaperlibrary extends Component { } axios.get((url), {params: data}).then((response) => { - setTimeout(()=>{ this.setState({ booljupyterurls:false, }) - },500); if (response === null || response === undefined) { return From 76fe1e7cf66ab81d915014f256829751803fb63e 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, 3 Mar 2020 18:47:54 +0800 Subject: [PATCH 35/52] =?UTF-8?q?=E9=A2=98=E5=BA=93=E4=BA=8C=E7=BA=A7?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=EF=BC=88=E7=AD=9B=E9=80=89=E3=80=81=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=EF=BC=89=E6=80=A7=E8=83=BD=E9=97=AE=E9=A2=98=EF=BC=9A?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=A4=AA=E6=85=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/testpaper/Testpaperlibrary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/testpaper/Testpaperlibrary.js b/public/react/src/modules/testpaper/Testpaperlibrary.js index ca4bd8594..f86fcee81 100644 --- a/public/react/src/modules/testpaper/Testpaperlibrary.js +++ b/public/react/src/modules/testpaper/Testpaperlibrary.js @@ -162,7 +162,7 @@ class Testpaperlibrary extends Component { booljupyterurls:true, }) } - + axios.get((url), {params: data}).then((response) => { this.setState({ booljupyterurls:false, From 73d11fdd6e6cda1a950f790ab4a0eaf3c8ee648f 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, 3 Mar 2020 21:12:18 +0800 Subject: [PATCH 36/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/component/ChoquesEditor.js | 4 ++-- public/react/src/modules/question/component/SingleEditor.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/question/component/ChoquesEditor.js b/public/react/src/modules/question/component/ChoquesEditor.js index 233c5237d..652a90258 100644 --- a/public/react/src/modules/question/component/ChoquesEditor.js +++ b/public/react/src/modules/question/component/ChoquesEditor.js @@ -425,7 +425,7 @@ class ChoquesEditor extends Component{ autoFocus={false} imgAttrs={{width: '146px', height: '136px'}} style={{ height: '166px'}} - placeholder="请您输入题干" + placeholder="请您输入选项" options={options} value={item} onContentChange={(value,quill) => this.onOptionContentChange(value,quill,index)} @@ -435,7 +435,7 @@ class ChoquesEditor extends Component{ autoFocus={false} imgAttrs={{width: '146px', height: '136px'}} style={{ height: '166px'}} - placeholder="请您输入题干" + placeholder="请您输入选项" options={options} value={JSON.parse(item)} onContentChange={(value,quill) => this.onOptionContentChange(value,quill,index)} diff --git a/public/react/src/modules/question/component/SingleEditor.js b/public/react/src/modules/question/component/SingleEditor.js index 03f280ced..5bfda9f7a 100644 --- a/public/react/src/modules/question/component/SingleEditor.js +++ b/public/react/src/modules/question/component/SingleEditor.js @@ -446,7 +446,7 @@ class SingleEditor extends Component{ autoFocus={false} imgAttrs={{width: '146px', height: '136px'}} style={{ height: '166px'}} - placeholder="请您输入题干" + placeholder="请您输入选项" options={options} value={item} onContentChange={(value,quill) => this.onOptionContentChange(value,quill,index)} @@ -456,7 +456,7 @@ class SingleEditor extends Component{ autoFocus={false} imgAttrs={{width: '146px', height: '136px'}} style={{ height: '166px'}} - placeholder="请您输入题干" + placeholder="请您输入选项" options={options} value={JSON.parse(item)} onContentChange={(value,quill) => this.onOptionContentChange(value,quill,index)} From 18b13802f063812200d947027c58987dc52f5ad0 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, 3 Mar 2020 21:34:37 +0800 Subject: [PATCH 37/52] =?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 | 20 ++++++++++++++++++- public/react/src/modules/tpm/NewHeader.js | 7 +++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/question/Questionitem_banks.js b/public/react/src/modules/question/Questionitem_banks.js index d07d593a0..0b8f0213e 100644 --- a/public/react/src/modules/question/Questionitem_banks.js +++ b/public/react/src/modules/question/Questionitem_banks.js @@ -1,5 +1,5 @@ import React, {Component} from "react"; -import {Link, NavLink} from 'react-router-dom'; +import {Link, NavLink,Prompt} from 'react-router-dom'; import {WordsBtn, ActionBtn, SnackbarHOC, getImageUrl,queryString} from 'educoder'; import axios from 'axios'; import { @@ -172,6 +172,20 @@ class Questionitem_banks extends Component { } + componentWillMount () { + // 拦截判断是否离开当前页面 + window.addEventListener('beforeunload', this.beforeunload); + } + componentWillUnmount () { + // 销毁拦截判断是否离开当前页面 + window.removeEventListener('beforeunload', this.beforeunload); + } + beforeunload (e) { + let confirmationMessage = '你确定离开此页面吗?'; + (e || window.event).returnValue = confirmationMessage; + return confirmationMessage; + } + getdata = (data) => { // const url=`/item_banks.json`; @@ -510,6 +524,10 @@ class Questionitem_banks extends Component {
    + '你确定离开此页面吗?'} + />