From 9594cd31e85759138044197bce56c04a826a0165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sun, 29 Sep 2019 14:27:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EcCompletionCalculation.js | 50 ++++++++++++------- .../EcCourseEvaluationsbottom.js | 16 +++--- 2 files changed, 40 insertions(+), 26 deletions(-) diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index 4525afe7e..65cac4540 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -56,17 +56,28 @@ class EcCompletionCalculation extends Component { // const url =`/ec_major_schools/get_navigation_data?ec_course_id=`+ec_course_id; const ec_course_id=706; - const url =`/ec_courses/${ec_course_id}/evaluation.json`; + const url =`/ec_courses/${ec_course_id}/evaluation.json`; axios.get(url) .then((response) => { if(response.status===200){ // if(response.data.allow_visit===false){ // window.location.href="/403" // } - this.setState({ - schooldata:response.data, - ec_course_id:ec_course_id - }) + + this.setState({ + schooldata:response.data, + ec_course_id:ec_course_id, + // evaluate_result:response.data.evaluate_result, + // course_total_score:response.data.course_total_score[response.data.course_total_score.length-1].total_rate, + // total_rate_data:response.data.course_total_score[response.data.course_total_score.length-1].total_rate.length, + // graduation_list:response.data.graduation_list, + target_list:response.data.course_targets, + // target_score:response.data.target_score, + ec_course_targets_count:response.data.graduation_subitem_evaluations, + // morelisttype:newmorelisttype, + // course_total_scoreaverage:course_total_scoreaverage, + // ismanager:response.data.is_manager + }) } }) .catch(function (error) { @@ -103,10 +114,11 @@ class EcCompletionCalculation extends Component { } UpdateClassData=(key)=>{ let {calculatetype} =this.state; - let ec_course_id =this.props.match.params.ec_course_id; + // let ec_course_id =this.props.match.params.ec_course_id; this.setState({ ec_course_id:ec_course_id }) + const ec_course_id=706; const Arl =`/ec_courses/`+ec_course_id+`/calculation_info_data`; axios.get(Arl, { withCredentials: true, @@ -140,16 +152,16 @@ class EcCompletionCalculation extends Component { } this.setState({ - evaluate_result:response.data.evaluate_result, - course_total_score:response.data.course_total_score[response.data.course_total_score.length-1].total_rate, - total_rate_data:response.data.course_total_score[response.data.course_total_score.length-1].total_rate.length, - graduation_list:response.data.graduation_list, - target_list:response.data.target_list, - target_score:response.data.target_score, - ec_course_targets_count:response.data.ec_course_targets_count, - morelisttype:newmorelisttype, - course_total_scoreaverage:course_total_scoreaverage, - ismanager:response.data.is_manager + // evaluate_result:response.data.evaluate_result, + // course_total_score:response.data.course_total_score[response.data.course_total_score.length-1].total_rate, + // total_rate_data:response.data.course_total_score[response.data.course_total_score.length-1].total_rate.length, + // graduation_list:response.data.graduation_list, + target_list:response.data.course_targets, + // target_score:response.data.target_score, + ec_course_targets_count:response.data.graduation_subitem_evaluations, + // morelisttype:newmorelisttype, + // course_total_scoreaverage:course_total_scoreaverage, + // ismanager:response.data.is_manager }) @@ -513,10 +525,10 @@ class EcCompletionCalculation extends Component {
  • {key+1} {item.content} - {item.result} + {item.status==="not_achieved"?"未达成":"已达成"} {item.standard_grade} - {item.real_grade} - {item.weigths} + {item.actually_grade} + {item.weight}
  • ) diff --git a/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js b/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js index afce608f8..ae09b7886 100644 --- a/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js +++ b/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js @@ -117,8 +117,9 @@ class EcCourseEvaluationsbottom extends Component { componentDidMount(){ let ec_course_id=this.props.match.params.ec_course_id; const course_id = 706 - const url =`/ec_courses/${course_id}/course_targets/course_achievement_methods.json`; - // const url = `/ec_course_achievement_methods?ec_course_id=`+course_id; + const url =`/ec_courses/${course_id}/course_targets/with_achievement_methods.json`; + // /ec_courses//course_targets/course_achievement_methods.json + // const url = `/ec_course_achievement_methods?ec_course_id=`+course_id; axios.get(url, { withCredentials: true, }) @@ -432,7 +433,8 @@ class EcCourseEvaluationsbottom extends Component { EvaluationsSaveonloadgetdata=(id)=>{ - const url = `/ec_course_achievement_methods?ec_course_id=`+id + const course_id = 706; + const url = `/ec_courses/${course_id}/course_targets/with_achievement_methods.json`; axios.get(url, { withCredentials: true, }) @@ -775,7 +777,7 @@ class EcCourseEvaluationsbottom extends Component { { item.target_evaluate_data.length===0?
  • -
    +
    {key+1} @@ -787,7 +789,7 @@ class EcCourseEvaluationsbottom extends Component {
    - +
    @@ -806,9 +808,9 @@ class EcCourseEvaluationsbottom extends Component { {/* 修改start*/}
    -
    +
    {/*
    */} -
    +
    {/* 课程目标{sequenceid}:{ec_course_target_name} */} 课程目标{key+1}:{ec_course_target_name}