From 7a46ca6b407285af671fcea0f06abd589a52dfaf Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 27 Jun 2019 10:35:07 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/page/main/LeftView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/main/LeftView.js b/public/react/src/modules/page/main/LeftView.js index c198f488b..64f4d836b 100644 --- a/public/react/src/modules/page/main/LeftView.js +++ b/public/react/src/modules/page/main/LeftView.js @@ -300,7 +300,7 @@ class LeftView extends Component { { lockedAnswers && lockedAnswers.map((item, index) => { return
-
级别{index + 1}:
+
级别{index + 1 + (unlockedAnswers ? unlockedAnswers.length : 0)}:
{item.name}
{ this.props.showUnlockAnswerDialog(item) } } From 33dec0ccdb7d23604a3b1ef584dc802fe2e5dfa1 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 27 Jun 2019 10:35:19 +0800 Subject: [PATCH 2/6] css --- public/react/src/modules/page/tpiPage.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/tpiPage.css b/public/react/src/modules/page/tpiPage.css index 4fc4e3062..1fe06de63 100644 --- a/public/react/src/modules/page/tpiPage.css +++ b/public/react/src/modules/page/tpiPage.css @@ -130,7 +130,7 @@ button.buttonHoverColor:hover a { right: inherit; margin-left: 24px; display: inline-block; - top: 10px; + top: 12px; height: 32px; padding: 3px 15px } From a5b14fc4a24d4af55c61fd72e5e49e9491a18b30 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 Jun 2019 11:05:09 +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 --- .../TraineetraininginformationModal.js | 123 +++++++++++++----- .../src/modules/tpm/newshixuns/Newshixuns.js | 2 +- 2 files changed, 92 insertions(+), 33 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js index ace1ebe7b..bc51a273d 100644 --- a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js +++ b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js @@ -79,11 +79,9 @@ class TraineetraininginformationModal extends Component { return str; } render() { - var columns; console.log(83); console.log(this.props.boolgalist); - if(this.props.boolgalist&&this.props.boolgalist === false) { - columns = [ + const columns = [ { title: '关卡', dataIndex: 'number', @@ -150,9 +148,8 @@ class TraineetraininginformationModal extends Component { ), } ] - } - else { - columns = [ + + const columnss = [ { title: '关卡', dataIndex: 'number', @@ -202,7 +199,7 @@ class TraineetraininginformationModal extends Component { ), } ] - } + return (
- { - this.props.game_list === undefined?"" : this.props.game_list.length<4? -
- +
+ {this.props.game_list === undefined ? "" : } + + : +
+
+ {this.props.game_list === undefined ? "" :
} + + } + + + + + + + : + + +
+ { + this.props.game_list === undefined?"" : this.props.game_list.length<4? +
+ -
- {this.props.game_list === undefined ? "" :
+
+ {this.props.game_list === undefined ? "" :
} - - : -
-
- {this.props.game_list === undefined ? "" :
} + + : +
+
+ {this.props.game_list === undefined ? "" :
} - - } + />} + + } + + + + + + + + } + + diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js index 3dca1ad2b..8d38ac24d 100644 --- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js +++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js @@ -948,7 +948,7 @@ class Newshixuns extends Component { : - + 上传附件 (单个文件50M以内) From ddaa4b91d4f43ed4f1780a63e23dd68f9f3778a8 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 27 Jun 2019 11:17:02 +0800 Subject: [PATCH 4/6] css tea --- .../react/src/context/TPIContextProvider.js | 4 +- .../modules/page/main/CodeEvaluateView.css | 4 +- .../src/modules/page/main/CodeEvaluateView.js | 4 +- .../react/src/modules/page/main/LeftView.js | 37 ++++++++++--------- .../modules/page/main/LeftViewContainer.js | 15 -------- public/react/src/modules/page/tpiPage.css | 3 ++ 6 files changed, 28 insertions(+), 39 deletions(-) diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index 0b764202f..b332c50a8 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -478,10 +478,10 @@ pop_box_new(htmlvalue, 480, 182); resData.myshixun_manager = true } else if (resData.user.identity === EDU_CERTIFICATION_TEACHER) { resData.power = 1 - resData.is_teacher = true + // resData.is_teacher = true } else if (resData.user.identity === EDU_TEACHER) { - resData.is_teacher = true + // resData.is_teacher = true } else if (resData.user.identity === EDU_NORMAL) { } diff --git a/public/react/src/modules/page/main/CodeEvaluateView.css b/public/react/src/modules/page/main/CodeEvaluateView.css index 14f1ac3db..5319ade17 100644 --- a/public/react/src/modules/page/main/CodeEvaluateView.css +++ b/public/react/src/modules/page/main/CodeEvaluateView.css @@ -91,7 +91,7 @@ } /* icon */ .fa-check-circle, .fa-exclamation-circle { - margin-top: 6px!important; + margin-top: 2px!important; } .fa-unlock-alt, .fa-lock { margin-right: 3px; @@ -110,7 +110,7 @@ padding-top: 6px; } #evaluating_contents .-text-danger{ - padding-bottom: 6px; + /* padding-bottom: 6px; */ } #evaluating_contents p.evaluateResult { margin-bottom: 10px; diff --git a/public/react/src/modules/page/main/CodeEvaluateView.js b/public/react/src/modules/page/main/CodeEvaluateView.js index 8f28a8c63..cb5a40793 100644 --- a/public/react/src/modules/page/main/CodeEvaluateView.js +++ b/public/react/src/modules/page/main/CodeEvaluateView.js @@ -180,8 +180,8 @@ class CodeEvaluateView extends Component { 测试集 {index + 1} - { headIconClass && } - { _headLockIconClass && } + { headIconClass && } + { _headLockIconClass && }

diff --git a/public/react/src/modules/page/main/LeftView.js b/public/react/src/modules/page/main/LeftView.js index 64f4d836b..b2469ec44 100644 --- a/public/react/src/modules/page/main/LeftView.js +++ b/public/react/src/modules/page/main/LeftView.js @@ -73,7 +73,7 @@ class LeftView extends Component { // /shixuns/mnf6b7z3/shixun_discuss?challenge_id=88 render() { let { challenge, shixun, tabIndex, tabIndexChange, loading, discusses_count - , dialogOpen, handleDialogClose, handleDialogReadAnswer, gameAnswer, loadingComments, st, is_teacher, + , dialogOpen, handleDialogClose, handleDialogReadAnswer, gameAnswer, loadingComments, st, user, classes, onDrawerButtonClick, lockedAnswers, unlockedAnswers, isMultiLevelAnswer } = this.props let propaedeutics = shixun ? shixun.propaedeutics : null; @@ -95,7 +95,7 @@ class LeftView extends Component { // TODO TEST // isMultiLevelAnswer = true - // is_teacher = true; + const is_teacher = user.is_teacher let contentText = is_teacher ? @@ -113,24 +113,25 @@ class LeftView extends Component { if (isMultiLevelAnswer) { // power === 0 && contentText = ( is_teacher ) ? -            -            

{`已经过职业认证的教师可以免金币查看答案哟~`}

this.goToCertification()}>立即认证

- - -           
+            +             

{`已经过职业认证的教师可以免金币查看答案哟~`}

+

this.goToCertification()} + style={{ color: '#1890ff', 'margin-top': '6px', display: 'inline-block'}}>立即认证

+ + +           
              :              -

{`先查看参考答案,再通过评测的学生,实训作业将被扣分`}

- {/* { MultiLevelUnlockTable } */} - - +

{`先查看参考答案,再通过评测的学生,实训作业将被扣分`}

+ {/* { MultiLevelUnlockTable } */} + +             
; } diff --git a/public/react/src/modules/page/main/LeftViewContainer.js b/public/react/src/modules/page/main/LeftViewContainer.js index f96c8e55b..2462872f2 100644 --- a/public/react/src/modules/page/main/LeftViewContainer.js +++ b/public/react/src/modules/page/main/LeftViewContainer.js @@ -46,7 +46,6 @@ class LeftViewContainer extends Component { dialogOpen: false, gameAnswer: '', - is_teacher: false, // 评论 // comments: [], @@ -316,10 +315,8 @@ class LeftViewContainer extends Component { lockedAnswers.push(item) } }) - const is_teacher = this.props.user.identity === EDU_TEACHER this.setState({ - is_teacher, tabIndex: 2, lockedAnswers, unlockedAnswers, @@ -360,9 +357,6 @@ class LeftViewContainer extends Component { 继续查看 立即认证(新开页) */ - const is_teacher = response.data.is_teacher - // this.props.user.identity === EDU_TEACHER - // response.data.is_teacher; // 答案测试 TODO // if (false && response.data.view_answer === true) { @@ -370,15 +364,6 @@ class LeftViewContainer extends Component { this.showAnswer(response.data.answer) } else { // 三个角色 普通用户、未认证教师、已认证教师,这里要区分普通用户和未认证教师用户 - if (is_teacher) { - this.setState({ - is_teacher: true - }) - } else { - this.setState({ - is_teacher: false - }) - } this.setState({ dialogOpen: true, }) diff --git a/public/react/src/modules/page/tpiPage.css b/public/react/src/modules/page/tpiPage.css index 1fe06de63..55e75059d 100644 --- a/public/react/src/modules/page/tpiPage.css +++ b/public/react/src/modules/page/tpiPage.css @@ -229,6 +229,9 @@ body>div[role=dialog]>div { /* padding-bottom: 10px; */ } /* tpi 窗口宽度*/ +body>div[role=dialog]>div[role=document] { + border-radius: 10px; +} #tpi-dialog>div[role=document] { border-radius: 10px; } From 8658c5cc9944b907218d2e261e4229725168e663 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 27 Jun 2019 11:17:36 +0800 Subject: [PATCH 5/6] 8 --- public/react/src/modules/page/main/CodeEvaluateView.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/main/CodeEvaluateView.css b/public/react/src/modules/page/main/CodeEvaluateView.css index 5319ade17..9deee0fb2 100644 --- a/public/react/src/modules/page/main/CodeEvaluateView.css +++ b/public/react/src/modules/page/main/CodeEvaluateView.css @@ -107,7 +107,7 @@ #evaluating_contents { - padding-top: 6px; + padding-top: 8px; } #evaluating_contents .-text-danger{ /* padding-bottom: 6px; */ From 909f4fadd50eb7e26433352a98fddb34bd77fad0 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 27 Jun 2019 11:25:54 +0800 Subject: [PATCH 6/6] marginTop 4 --- public/react/src/modules/courses/busyWork/UseBank.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js index a6ea333c6..7bddb9979 100644 --- a/public/react/src/modules/courses/busyWork/UseBank.js +++ b/public/react/src/modules/courses/busyWork/UseBank.js @@ -121,9 +121,7 @@ class UseBank extends Component{ }) } onSave = () => { - this.setState({ - hometypepvisible:true - }) + const { checkBoxValues } = this.state; const { object_type } = this.props if(checkBoxValues.length==0){ @@ -132,6 +130,9 @@ class UseBank extends Component{ }) return; } + this.setState({ + hometypepvisible:true + }) const courseId = this.props.match.params.coursesId let url = `/question_banks/save_banks.json` this.setState({ loading: true }) @@ -290,7 +291,7 @@ class UseBank extends Component{ } -

+

{ isChecked !="" ? {isChecked}:"" }