From b6e36fd02ef40f0b609fbefa361e325a8bb45e53 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 22 Jun 2019 15:05:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=EF=BC=9Afi?= =?UTF-8?q?x=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/ExerciseReviewAndAnswer.js | 28 +++++++++++++----- public/react/src/modules/courses/poll/Poll.js | 1 + .../courses/poll/PollDetailTabFirst.js | 7 ++++- .../react/src/modules/user/usersInfo/Infos.js | 29 ++++++++++++------- 4 files changed, 47 insertions(+), 18 deletions(-) diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js index 0893a5e23..ce9c00a21 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -240,11 +240,15 @@ class ExerciseReviewAndAnswer extends Component{ ) } // 调分 - showSetScore=(key,flag)=>{ + showSetScore=(key,flag,setId)=>{ this.setState( (prevState) => ({ exercise_questions : update(prevState.exercise_questions, {[key]: { setScore: {$set: flag == undefined || flag==false ? true : false}}}) - }) + }),()=>{ + if (setId && (flag == undefined || flag==false)) { + $("html").animate({ scrollTop: $("#Anchor_"+setId).offset().top - 150 }) + } + } ) this.setState({ score:undefined @@ -502,6 +506,18 @@ class ExerciseReviewAndAnswer extends Component{ console.log(data&&data.exercise.user_name) return(
+

this.showSetScore(key,item.setScore)}>调分:"" + this.showSetScore(key,item.setScore,item.q_position+"_"+item.question_type)}>调分:"" } { // 简答题,未评分的显示未批 @@ -767,11 +783,10 @@ class ExerciseReviewAndAnswer extends Component{
} - { // 调分输入部分 isAdmin && ((item.setScore && item.question_type == 3) || ((item.setScore || parseInt(item.answer_status) == 0) && item.question_type == 4))? -
+
*调分:
  • @@ -783,8 +798,7 @@ class ExerciseReviewAndAnswer extends Component{ value={score} step={0.1} precision={1} - className={ setTip !="" ? "edu-txt-center winput-115-40 fl mt3 noticeTip" : "edu-txt-center winput-115-40 fl mt3"} - style={{height:"30px",width:"115px"}} + className={ setTip !="" ? "edu-txt-center winput-115-40 fl mt3 noticeTip inputNumber30" : "edu-txt-center winput-115-40 fl mt3 inputNumber30"} onChange={this.inputScore} > diff --git a/public/react/src/modules/courses/poll/Poll.js b/public/react/src/modules/courses/poll/Poll.js index 9f9291b61..3a7cd6aec 100644 --- a/public/react/src/modules/courses/poll/Poll.js +++ b/public/react/src/modules/courses/poll/Poll.js @@ -13,6 +13,7 @@ import '../css/members.css'; import '../css/busyWork.css'; import Modals from '../../modals/Modals'; import axios from 'axios'; +import moment from 'moment'; const Search = Input.Search; diff --git a/public/react/src/modules/courses/poll/PollDetailTabFirst.js b/public/react/src/modules/courses/poll/PollDetailTabFirst.js index 6a5be2e8d..ceca9b291 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabFirst.js +++ b/public/react/src/modules/courses/poll/PollDetailTabFirst.js @@ -181,7 +181,12 @@ class PollDetailTabFirst extends Component{ title: '学号', dataIndex: 'StudentNo', key: 'StudentNo', - className:"edu-txt-center" + className:"edu-txt-center", + render:(StudentNo,item,index)=>{ + return( + item.StudentNo ? {item.StudentNo} : "--" + ) + } }, { title: '分班', key: 'classes', diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index 81198b45c..941217750 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -130,14 +130,15 @@ class Infos extends Component{ let url=`/users/attendance.json` axios.post(url).then((result)=>{ if(result){ - this.setState( - (prevState) => ({ - data : update(prevState.data, {attendance_signed: {$set: true} }) - }) - ) - this.setState({ - next_gold:result.data.next_gold - }) + // this.setState( + // (prevState) => ({ + // data : update(prevState.data, {attendance_signed: {$set: true} }) + // }) + // ) + // this.setState({ + // next_gold:result.data.next_gold + // }) + this.getInfo(this.props.match.params.username); } }).catch((error)=>{ console.log(error); @@ -245,6 +246,9 @@ class Infos extends Component{
  • + { + data && is_current == false && data.identity =="学生" ?"" : {data && data.identity} + } {data && data.identity} @@ -314,7 +318,7 @@ class Infos extends Component{
    -
  • +
  • this.setState({moduleName: 'courses'})} to={`/users/${username}/courses`}>课堂 @@ -348,7 +352,7 @@ class Infos extends Component{ {/* 课堂 */} {/* http://localhost:3007/courses/1309/homework/9300/setting */} - () } @@ -374,6 +378,11 @@ class Infos extends Component{ (props) => () } > + () + } + >