|
|
|
@ -108,7 +108,7 @@ class CourseSupports extends Component {
|
|
|
|
|
id=parseInt(id);
|
|
|
|
|
|
|
|
|
|
let subindex =e.target.getAttribute("subindex");
|
|
|
|
|
|
|
|
|
|
debugger
|
|
|
|
|
// const url = `/ec_course_supports/edit_require_vs_course?subitem_id=`+id
|
|
|
|
|
// axios.get(url)
|
|
|
|
|
// .then((response) => {
|
|
|
|
@ -169,6 +169,27 @@ class CourseSupports extends Component {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let newnum=0;
|
|
|
|
|
|
|
|
|
|
data.graduation_subitems.map((item,key)=>{
|
|
|
|
|
if(keys===key){
|
|
|
|
|
item.course_supports.map((items,keys)=>{
|
|
|
|
|
if(items.weights===undefined){
|
|
|
|
|
newnum=0
|
|
|
|
|
}else{
|
|
|
|
|
newnum=newnum+items.weights;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
newnum= Math.round(newnum*100)/100;
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
editnum:newnum
|
|
|
|
|
})
|
|
|
|
|
console.log(newnum)
|
|
|
|
|
|
|
|
|
|
// $("#school_ListTableLine").show();
|
|
|
|
|
// let offsettop=$("#school_ListTableLine").position().top||$("#school_ListTableLine").scrollTop || $("#school_ListTableLine").pageYOffset;
|
|
|
|
|
// window.scrollTo(0, offsettop)
|
|
|
|
@ -231,6 +252,10 @@ class CourseSupports extends Component {
|
|
|
|
|
Supportssum:true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
Supportssum:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -266,6 +291,10 @@ class CourseSupports extends Component {
|
|
|
|
|
Supportslist:'权重之和不能大于1',
|
|
|
|
|
Supportssum:true
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
Supportssum:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -541,7 +570,7 @@ class CourseSupports extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
<div className="left operationalter">
|
|
|
|
|
{data.is_manager===false?"":<a className="editSubentry" data-tip-down="编辑">
|
|
|
|
|
<i className="iconfont icon-bianjidaibeijing color-green" id={item.ec_graduation_subitem_id} subindex={item.sequence_num} onClick={this.EditSupportCourse.bind(this,key)}></i>
|
|
|
|
|
<i className="iconfont icon-bianjidaibeijing color-green" id={item.ec_graduation_subitem_id} subindex={item.graduation_requirement_position+"-"+item.position} onClick={this.EditSupportCourse.bind(this,key)}></i>
|
|
|
|
|
</a>}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|