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] 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; }