From 30f6c31896cb748dbad10770a008505c124a35f1 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 26 Jun 2019 18:14:03 +0800 Subject: [PATCH 1/6] =?UTF-8?q?index.html=E6=9C=89=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMIndexHOC.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 10e4e4641..9a1de2846 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -33,8 +33,10 @@ if (!window['indexHOCLoaded']) { $('head').append($('') .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?1525440977`)); - $('head').append($('') - .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1525440977`)); + // index.html有加载 + // $('head').append($('') + // .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1525440977`)); + // $('head').append($('') // .attr('href', `${_url_origin}/stylesheets/educoder/css_min_all.css?1525440977`)); From d65f6b67e0108466b89983f31a1bd51e6d6e4ba8 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, 26 Jun 2019 18:25:45 +0800 Subject: [PATCH 2/6] =?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/courses/poll/PollNew.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index a39ae5bf7..3f7a4a7b6 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -2489,7 +2489,7 @@ class PollNew extends Component { }
-{item.question.question_title}
+{item.question.question_title}
{/*{item.question.question_title}*/} {item.question.question_type === 1 ? (
{items.answer_text}*/} {/*
{items.answer_text}*/} - {items.answer_text} + {items.answer_text} ) @@ -2512,7 +2512,7 @@ class PollNew extends Component { return (
Date: Wed, 26 Jun 2019 23:09:53 +0800 Subject: [PATCH 3/6] =?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/courses/poll/PollNew.js | 12 +++--- .../TraineetraininginformationModal.js | 43 +++++++++---------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index 3f7a4a7b6..fa2ed08b4 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -779,13 +779,13 @@ class PollNew extends Component { } } - if (maxtie < 2) { + if (maxtie < 3) { if (object.question.question_type === 1) { - this.props.showNotification(`选项不能少于2个!`); + this.props.showNotification(`选项不能少于3个!`); return } else if (object.question.question_type === 2) { - this.props.showNotification(`选项不能少于2个!`); + this.props.showNotification(`选项不能少于3个!`); return } @@ -1259,12 +1259,12 @@ class PollNew extends Component { } } - if (maxtie < 2) { + if (maxtie < 3) { if (object.question.question_type === 1) { - this.props.showNotification('选项不能少于2个!'); + this.props.showNotification('选项不能少于3个!'); return } else if (object.question.question_type === 2) { - this.props.showNotification('选项不能少于2个!'); + this.props.showNotification('选项不能少于3个!'); return } diff --git a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js index 7d34eb9a1..10db61e1b 100644 --- a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js +++ b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js @@ -36,7 +36,6 @@ class TraineetraininginformationModal extends Component { props: this.props, userids: this.props.userids, game_list:this.props.game_list, - boolgalist:this.props.boolgalist, experience:this.props.experience, }) @@ -52,26 +51,26 @@ class TraineetraininginformationModal extends Component { // this.seacthdata(); } - componentWillReceiveProps(nextProps) { - // console.log("46"); - // console.log(nextProps); - // console.log(this.props); - if (nextProps.boolgalist != this.props.boolgalist) { - // console.log("50"); - // console.log(nextProps.user); - if (nextProps.boolgalist !== undefined) { - // console.log("53"); - // console.log(nextProps.user); - this.setState({ - boolgalist: nextProps.boolgalist, - }) - } - - - } - - - } + // componentWillReceiveProps(nextProps) { + // // console.log("46"); + // // console.log(nextProps); + // // console.log(this.props); + // if (nextProps.boolgalist != this.props.boolgalist) { + // // console.log("50"); + // // console.log(nextProps.user); + // if (nextProps.boolgalist !== undefined) { + // // console.log("53"); + // // console.log(nextProps.user); + // this.setState({ + // boolgalist: nextProps.boolgalist, + // }) + // } + // + // + // } + // + // + // } LimitNumber=(txt)=> { var str = txt; if(str.length>25){ @@ -81,7 +80,7 @@ class TraineetraininginformationModal extends Component { } render() { var columns; - if(this.state.boolgalist&&this.state.boolgalist === true) { + if(this.props.boolgalist&&this.props.boolgalist === true) { columns = [ { title: '关卡', From 6d927716e8493452696cb1af70203ee1eb80a436 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 27 Jun 2019 09:50:10 +0800 Subject: [PATCH 4/6] css --- .../src/modules/courses/boards/BoardsNew.js | 14 +++++- .../courses/busyWork/CommonWorkSetting.js | 46 +++++++++++-------- .../react/src/modules/courses/css/Courses.css | 8 ++++ .../modules/tpm/challengesnew/TPMMDEditor.js | 4 +- 4 files changed, 50 insertions(+), 22 deletions(-) diff --git a/public/react/src/modules/courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js index 718b6de42..303d683ce 100644 --- a/public/react/src/modules/courses/boards/BoardsNew.js +++ b/public/react/src/modules/courses/boards/BoardsNew.js @@ -78,6 +78,7 @@ class BoardsNew extends Component{ if (data) { this.editTopic = data; this.props.form.setFieldsValue({ + sticky: !!data.sticky, content: data.content, subject: data.subject, select_board_id: data.board_id // TODO 没返回给前端 @@ -309,6 +310,14 @@ class BoardsNew extends Component{ label="标题" className="topicTitle " > + {getFieldDecorator('sticky', { + valuePropName: 'checked', + })( +置顶 + )} {getFieldDecorator('subject', { rules: [{ required: true, message: '请输入标题', @@ -347,7 +356,7 @@ class BoardsNew extends Component{ )} - { isAdmin &&
- { - unit_p_tip && unit_p_tip != "" ? { unit_p_tip }:"" - } -
-+ { + unit_p_tip && unit_p_tip != "" ? { unit_p_tip }:"" + } +
+{ unit_e_tip && unit_e_tip != "" ? { unit_e_tip }:"" diff --git a/public/react/src/modules/courses/poll/PollDetailTabForthRules.js b/public/react/src/modules/courses/poll/PollDetailTabForthRules.js index 4193cdc62..2f3621844 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabForthRules.js +++ b/public/react/src/modules/courses/poll/PollDetailTabForthRules.js @@ -390,20 +390,24 @@ class PollDetailTabForthRules extends Component{
{ rule.publish_flag && rule.publish_flag!=""?{rule.publish_flag}:"" @@ -411,20 +415,24 @@ class PollDetailTabForthRules extends Component{
{ rule.end_flag && rule.end_flag!=""?{rule.end_flag}:"" diff --git a/public/react/src/modules/courses/poll/PollDetailTabThird.js b/public/react/src/modules/courses/poll/PollDetailTabThird.js index 5d9a01fb8..c3994c7c0 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabThird.js +++ b/public/react/src/modules/courses/poll/PollDetailTabThird.js @@ -70,9 +70,9 @@ class PollDetailTabThird extends Component{
{item.question.question_number}、{map[item.question.question_type]}
- { item.question.is_necessary==1 ? 必答:"" }
+ { item.question.is_necessary==1 ? 必答:选答 }
{ item.question.question_type == 2 ?
-
+
{
item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" :
"可选"+item.question.min_choices+"-"+item.question.max_choices+"项"
diff --git a/public/react/src/modules/courses/poll/PollInfo.js b/public/react/src/modules/courses/poll/PollInfo.js
index 7177cb6b9..8256e3710 100644
--- a/public/react/src/modules/courses/poll/PollInfo.js
+++ b/public/react/src/modules/courses/poll/PollInfo.js
@@ -185,9 +185,11 @@ class PollInfo extends Component{
flag=answers.indexOf(a_id) > -1?true:false;
answers= type == 1 ? answers[0] : answers;
}else{
- flag=answers==a_id?true:false;
+ flag = answers==a_id?true:false;
+ }
+ if(answers && (answers.length>0 || answers !="")){
+ this.postAnswer(q_id,answers,flag ? inputs.text : "",key);
}
- this.postAnswer(q_id,answers,flag ? inputs.text : "",key);
}
//提交主观题
@@ -379,13 +381,21 @@ class PollInfo extends Component{
{