dev_ec
杨树明 6 years ago
parent c08eaf8012
commit 9594cd31e8

@ -56,17 +56,28 @@ class EcCompletionCalculation extends Component {
// const url =`/ec_major_schools/get_navigation_data?ec_course_id=`+ec_course_id; // const url =`/ec_major_schools/get_navigation_data?ec_course_id=`+ec_course_id;
const ec_course_id=706; 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) axios.get(url)
.then((response) => { .then((response) => {
if(response.status===200){ if(response.status===200){
// if(response.data.allow_visit===false){ // if(response.data.allow_visit===false){
// window.location.href="/403" // window.location.href="/403"
// } // }
this.setState({
schooldata:response.data, this.setState({
ec_course_id:ec_course_id 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) { .catch(function (error) {
@ -103,10 +114,11 @@ class EcCompletionCalculation extends Component {
} }
UpdateClassData=(key)=>{ UpdateClassData=(key)=>{
let {calculatetype} =this.state; 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({ this.setState({
ec_course_id:ec_course_id ec_course_id:ec_course_id
}) })
const ec_course_id=706;
const Arl =`/ec_courses/`+ec_course_id+`/calculation_info_data`; const Arl =`/ec_courses/`+ec_course_id+`/calculation_info_data`;
axios.get(Arl, { axios.get(Arl, {
withCredentials: true, withCredentials: true,
@ -140,16 +152,16 @@ class EcCompletionCalculation extends Component {
} }
this.setState({ this.setState({
evaluate_result:response.data.evaluate_result, // evaluate_result:response.data.evaluate_result,
course_total_score:response.data.course_total_score[response.data.course_total_score.length-1].total_rate, // 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, // total_rate_data:response.data.course_total_score[response.data.course_total_score.length-1].total_rate.length,
graduation_list:response.data.graduation_list, // graduation_list:response.data.graduation_list,
target_list:response.data.target_list, target_list:response.data.course_targets,
target_score:response.data.target_score, // target_score:response.data.target_score,
ec_course_targets_count:response.data.ec_course_targets_count, ec_course_targets_count:response.data.graduation_subitem_evaluations,
morelisttype:newmorelisttype, // morelisttype:newmorelisttype,
course_total_scoreaverage:course_total_scoreaverage, // course_total_scoreaverage:course_total_scoreaverage,
ismanager:response.data.is_manager // ismanager:response.data.is_manager
}) })
@ -513,10 +525,10 @@ class EcCompletionCalculation extends Component {
<li className={key+1===target_list.length?"clearfix newtarget_target lipadding10im":"clearfix newtarget_scoreclass lipadding10im"} key={key}> <li className={key+1===target_list.length?"clearfix newtarget_target lipadding10im":"clearfix newtarget_scoreclass lipadding10im"} key={key}>
<span className="column-1 color-05101A">{key+1}</span> <span className="column-1 color-05101A">{key+1}</span>
<span className="column-575 color-05101A">{item.content}</span> <span className="column-575 color-05101A">{item.content}</span>
<span className={item.result==="未达成"?"column-1 operationright Systemnum":"column-1 operationright color-green"}>{item.result}</span> <span className={item.status==="not_achieved"?"column-1 operationright Systemnum":"column-1 operationright color-green"}>{item.status==="not_achieved"?"未达成":"已达成"}</span>
<span className="column-1 operationright color-05101A">{item.standard_grade}</span> <span className="column-1 operationright color-05101A">{item.standard_grade}</span>
<span className="column-1 operationright">{item.real_grade}</span> <span className="column-1 operationright">{item.actually_grade}</span>
<span className="column-1 op erationright">{item.weigths}</span> <span className="column-1 operationright">{item.weight}</span>
</li> </li>
) )

@ -117,8 +117,9 @@ class EcCourseEvaluationsbottom extends Component {
componentDidMount(){ componentDidMount(){
let ec_course_id=this.props.match.params.ec_course_id; let ec_course_id=this.props.match.params.ec_course_id;
const course_id = 706 const course_id = 706
const url =`/ec_courses/${course_id}/course_targets/course_achievement_methods.json`; const url =`/ec_courses/${course_id}/course_targets/with_achievement_methods.json`;
// const url = `/ec_course_achievement_methods?ec_course_id=`+course_id; // /ec_courses//course_targets/course_achievement_methods.json
// const url = `/ec_course_achievement_methods?ec_course_id=`+course_id;
axios.get(url, { axios.get(url, {
withCredentials: true, withCredentials: true,
}) })
@ -432,7 +433,8 @@ class EcCourseEvaluationsbottom extends Component {
EvaluationsSaveonloadgetdata=(id)=>{ 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, { axios.get(url, {
withCredentials: true, withCredentials: true,
}) })
@ -775,7 +777,7 @@ class EcCourseEvaluationsbottom extends Component {
{ {
item.target_evaluate_data.length===0? item.target_evaluate_data.length===0?
<li key={key} className="clearfix" style={{width:"1140px"}}> <li key={key} className="clearfix" style={{width:"1140px"}}>
<div style={{ width:'99.8%'}} style={{display:parseInt(target_id)===item.target_id?"none":"block"}}> <div style={{ width:'99.8%'}} style={{display:parseInt(target_id)===item.id?"none":"block"}}>
<span className="column-1 mt4 textaligncenter"><span>{key+1}</span></span> <span className="column-1 mt4 textaligncenter"><span>{key+1}</span></span>
<span> <span>
<span className="column-1 ml80 mt4"> <span className="column-1 ml80 mt4">
@ -787,7 +789,7 @@ class EcCourseEvaluationsbottom extends Component {
<span className="column-1 operationright mt4"> <span className="column-1 operationright mt4">
<div className="operationColumn"> <div className="operationColumn">
<div className="right operationalter nulleditSubentry" style={{display:ismanager===false?'none':'block'}}> <div className="right operationalter nulleditSubentry" style={{display:ismanager===false?'none':'block'}}>
<a className="mr16 editSubentry" data-tip-down="编辑" ><i target_id={item.target_id} name={key} onClick={this.editecCourseEvaluationslist.bind(this)} className="iconfont icon-bianjidaibeijing color-green" ></i></a> <a className="mr16 editSubentry" data-tip-down="编辑" ><i target_id={item.id} name={key} onClick={this.editecCourseEvaluationslist.bind(this)} className="iconfont icon-bianjidaibeijing color-green" ></i></a>
</div> </div>
</div> </div>
</span> </span>
@ -806,9 +808,9 @@ class EcCourseEvaluationsbottom extends Component {
{/* 修改start*/} {/* 修改start*/}
<div className="ListTableLine newSystem" id="EvaluationsList"> <div className="ListTableLine newSystem" id="EvaluationsList">
<div style={{display:parseInt(target_id)===item.target_id?"block":"none"}} > <div style={{display:parseInt(target_id)===item.id?"block":"none"}} >
{/* <div className="edu-back-white eacourse" id="SystemParametersbottom" style={{display:parseInt(sequenceid)===key?"block":"none"}}> */} {/* <div className="edu-back-white eacourse" id="SystemParametersbottom" style={{display:parseInt(sequenceid)===key?"block":"none"}}> */}
<div className="edu-back-white eacourse" id="SystemParametersbottom" style={{display:parseInt(target_id)===item.target_id?"block":"none"}}> <div className="edu-back-white eacourse" id="SystemParametersbottom" style={{display:parseInt(target_id)===item.id?"block":"none"}}>
<div className="padding20-30" id="SystemParameters" style={{paddingLeft:'0px'}}> <div className="padding20-30" id="SystemParameters" style={{paddingLeft:'0px'}}>
{/* <span className="fl SystemParameters">课程目标{sequenceid}{ec_course_target_name}</span> */} {/* <span className="fl SystemParameters">课程目标{sequenceid}{ec_course_target_name}</span> */}
<span className="fl SystemParameters">课程目标{key+1}{ec_course_target_name}</span> <span className="fl SystemParameters">课程目标{key+1}{ec_course_target_name}</span>

Loading…
Cancel
Save