|
|
@ -162,28 +162,33 @@ class Trainingjobsetting extends Component {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
for(var i=0;i<result.data.group_settings.length;i++) {
|
|
|
|
for(var i=0;i<result.data.group_settings.length;i++) {
|
|
|
|
array.push({
|
|
|
|
if(result.data.group_settings[i].publish_time === null &&result.data.group_settings[i].end_time === null){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
array.push({
|
|
|
|
|
|
|
|
course_group_id: result.data.group_settings[i].group_id,
|
|
|
|
|
|
|
|
course_group_name: result.data.group_settings[i].group_name,
|
|
|
|
|
|
|
|
publish_time: result.data.group_settings[i].publish_time,
|
|
|
|
|
|
|
|
end_time: result.data.group_settings[i].end_time,
|
|
|
|
|
|
|
|
publish_flag: "",
|
|
|
|
|
|
|
|
end_flag: "",
|
|
|
|
|
|
|
|
class_flag: "",
|
|
|
|
|
|
|
|
course_search: "",
|
|
|
|
|
|
|
|
open: false
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(var i=0;i<result.data.group_settings.length;i++){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
arrays.push({
|
|
|
|
course_group_id:result.data.group_settings[i].group_id,
|
|
|
|
course_group_id:result.data.group_settings[i].group_id,
|
|
|
|
course_group_name:result.data.group_settings[i].group_name,
|
|
|
|
course_group_name:result.data.group_settings[i].group_name,
|
|
|
|
publish_time:result.data.group_settings[i].publish_time,
|
|
|
|
publish_time:result.data.group_settings[i].publish_time,
|
|
|
|
end_time:result.data.group_settings[i].end_time,
|
|
|
|
end_time:result.data.group_settings[i].end_time,
|
|
|
|
publish_flag:"",
|
|
|
|
course_choosed:0,
|
|
|
|
end_flag:"",
|
|
|
|
|
|
|
|
class_flag:"",
|
|
|
|
|
|
|
|
course_search:"",
|
|
|
|
|
|
|
|
open:false
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(var i=0;i<result.data.group_settings.length;i++){
|
|
|
|
|
|
|
|
arrays.push({
|
|
|
|
|
|
|
|
course_group_id:result.data.group_settings[i].group_id,
|
|
|
|
|
|
|
|
course_group_name:result.data.group_settings[i].group_name,
|
|
|
|
|
|
|
|
publish_time:result.data.group_settings[i].publish_time,
|
|
|
|
|
|
|
|
end_time:result.data.group_settings[i].end_time,
|
|
|
|
|
|
|
|
course_choosed:0,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(result.data.group_settings[i].group_id instanceof Array ) {
|
|
|
|
if(result.data.group_settings[i].group_id instanceof Array ) {
|
|
|
|
rulesdatas.push({
|
|
|
|
rulesdatas.push({
|
|
|
@ -741,8 +746,10 @@ class Trainingjobsetting extends Component {
|
|
|
|
//占比分
|
|
|
|
//占比分
|
|
|
|
if(challenge_settingsdata.length>0){
|
|
|
|
if(challenge_settingsdata.length>0){
|
|
|
|
var Proportion=100;
|
|
|
|
var Proportion=100;
|
|
|
|
|
|
|
|
var oushution=0;
|
|
|
|
//获取占用分后的值
|
|
|
|
//获取占用分后的值
|
|
|
|
Proportion=Proportion-latedeductiontwos;
|
|
|
|
Proportion=Proportion-latedeductiontwos;
|
|
|
|
|
|
|
|
oushution=Proportion;
|
|
|
|
var srorelength=0;
|
|
|
|
var srorelength=0;
|
|
|
|
//计算选中用户
|
|
|
|
//计算选中用户
|
|
|
|
for (var k=0;k<challenge_settingsdata.length;k++){
|
|
|
|
for (var k=0;k<challenge_settingsdata.length;k++){
|
|
|
@ -762,10 +769,17 @@ class Trainingjobsetting extends Component {
|
|
|
|
//计算平均值
|
|
|
|
//计算平均值
|
|
|
|
Proportion= Proportion/srorelength;
|
|
|
|
Proportion= Proportion/srorelength;
|
|
|
|
var intkk=0;
|
|
|
|
var intkk=0;
|
|
|
|
if(srbool==true){
|
|
|
|
var intkks=0;
|
|
|
|
|
|
|
|
if(srbool==true){
|
|
|
|
|
|
|
|
// 奇数
|
|
|
|
var exams = Math.round(Proportion)
|
|
|
|
var exams = Math.round(Proportion)
|
|
|
|
var intk = srorelength*exams;
|
|
|
|
var intk = srorelength*exams;
|
|
|
|
intkk=100 - intk;
|
|
|
|
intkk=oushution - intk;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
// 偶数
|
|
|
|
|
|
|
|
var examsy = Math.round(Proportion)
|
|
|
|
|
|
|
|
intkks=oushution - (examsy*srorelength);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var mact=0;
|
|
|
|
var mact=0;
|
|
|
@ -774,8 +788,13 @@ class Trainingjobsetting extends Component {
|
|
|
|
for (var i=0;i<challenge_settingsdata.length;i++){
|
|
|
|
for (var i=0;i<challenge_settingsdata.length;i++){
|
|
|
|
if(challenge_settingsdata[i].checked === true) {
|
|
|
|
if(challenge_settingsdata[i].checked === true) {
|
|
|
|
if(srbool===false){
|
|
|
|
if(srbool===false){
|
|
|
|
challenge_settingsdata[i].challenge_score = Math.round(Proportion);
|
|
|
|
mact=mact+1;
|
|
|
|
|
|
|
|
if(mact===srorelength){
|
|
|
|
|
|
|
|
challenge_settingsdata[i].challenge_score = Math.round(Proportion)+intkks;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
challenge_settingsdata[i].challenge_score = Math.round(Proportion);
|
|
|
|
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
mact=mact+1;
|
|
|
|
mact=mact+1;
|
|
|
|
if(mact===srorelength){
|
|
|
|
if(mact===srorelength){
|
|
|
@ -1468,6 +1487,13 @@ class Trainingjobsetting extends Component {
|
|
|
|
starttimes:undefined,
|
|
|
|
starttimes:undefined,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cancelBox=()=>{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
modalsType: false,
|
|
|
|
|
|
|
|
modalsTopval: "",
|
|
|
|
|
|
|
|
loadtype: false,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
//编辑
|
|
|
|
//编辑
|
|
|
|
editSetting = () => {
|
|
|
|
editSetting = () => {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -1540,7 +1566,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
handclass: undefined,
|
|
|
|
handclass: undefined,
|
|
|
|
unit_e_tip: "",
|
|
|
|
unit_e_tip: "",
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.refs.targetElementTrainingjobsetting.scrollIntoView()
|
|
|
|
this.refs.targetElementTrainingjobsetting.scrollIntoView();
|
|
|
|
|
|
|
|
this.getTrainingjobsetting();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
rulesCheckInfo=(rules)=>{
|
|
|
|
rulesCheckInfo=(rules)=>{
|
|
|
@ -1580,6 +1607,38 @@ class Trainingjobsetting extends Component {
|
|
|
|
showmodel:false
|
|
|
|
showmodel:false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 导出实习报告批量
|
|
|
|
|
|
|
|
internshipreport = () => {
|
|
|
|
|
|
|
|
console.log("internshipreport");
|
|
|
|
|
|
|
|
var homeworkid = this.props.match.params.homeworkid;
|
|
|
|
|
|
|
|
let url = "/zip/shixun_report";
|
|
|
|
|
|
|
|
axios.get((url),{
|
|
|
|
|
|
|
|
params: {
|
|
|
|
|
|
|
|
homework_common_id: homeworkid,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
|
|
|
console.log("1593");
|
|
|
|
|
|
|
|
console.log(response);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
console.log(error)
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 课堂学生成绩的导出下载
|
|
|
|
|
|
|
|
Classstudentachievement = () => {
|
|
|
|
|
|
|
|
console.log("Classstudentachievement");
|
|
|
|
|
|
|
|
const course_id = this.props.match.params.coursesId;
|
|
|
|
|
|
|
|
let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx";
|
|
|
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
|
|
|
console.log("1607");
|
|
|
|
|
|
|
|
console.log(response);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
console.log(error)
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
@ -1656,7 +1715,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className="educontent mb30">
|
|
|
|
<div className="educontent mb30">
|
|
|
|
<p className=" fl color-black summaryname mt5">
|
|
|
|
<p className=" fl color-black summaryname mt5" style={{heigth:"33px"}}>
|
|
|
|
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
|
|
|
|
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
|
|
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
@ -1698,10 +1757,35 @@ class Trainingjobsetting extends Component {
|
|
|
|
{/*<Link className="ml30" to={`/courses/${this.state.props.match.params.coursesId}/shixun_homeworks/${this.state.props.match.params.homeworkid}/shixun_work_report`}>*/}
|
|
|
|
{/*<Link className="ml30" to={`/courses/${this.state.props.match.params.coursesId}/shixun_homeworks/${this.state.props.match.params.homeworkid}/shixun_work_report`}>*/}
|
|
|
|
{/*<a className="color-blue">查看实训报告</a>*/}
|
|
|
|
{/*<a className="color-blue">查看实训报告</a>*/}
|
|
|
|
{/*</Link>*/}
|
|
|
|
{/*</Link>*/}
|
|
|
|
{this.props.isAdmin() ? <a
|
|
|
|
<style>{`
|
|
|
|
className="fr color-blue font-16"
|
|
|
|
.drop_down_menu li a {
|
|
|
|
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
|
|
|
|
padding: 0px;
|
|
|
|
>导出</a> : ""}
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.drop_down_menu {
|
|
|
|
|
|
|
|
width: 93px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.drop_down_menu li {
|
|
|
|
|
|
|
|
overflow: visible;
|
|
|
|
|
|
|
|
width: 93px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.drop_down_menu, .drop_down_normal {
|
|
|
|
|
|
|
|
padding-top: 10px;
|
|
|
|
|
|
|
|
padding-bottom: 8px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
a:hover {
|
|
|
|
|
|
|
|
color:#1A0B00 !important;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
`}</style>
|
|
|
|
|
|
|
|
{this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
|
|
|
|
|
|
|
|
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
|
|
|
|
|
|
|
|
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
|
|
|
|
|
|
|
|
<li><a onClick={()=>this.internshipreport()}>实训报告</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li><a onClick={()=>this.Classstudentachievement()}>学生成绩</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
</li>: ""}
|
|
|
|
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
|
|
|
|
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
|
|
|
|
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "": ""}
|
|
|
|
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "": ""}
|
|
|
|
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true?
|
|
|
|
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true?
|
|
|
@ -1997,7 +2081,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
提交
|
|
|
|
提交
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
{/*<a className="defalutSubmitbtn fl mr20">提交</a>*/}
|
|
|
|
{/*<a className="defalutSubmitbtn fl mr20">提交</a>*/}
|
|
|
|
<a className="defalutCancelbtn fl" onClick={this.cancelEdit}>取消</a>
|
|
|
|
<a className="defalutCancelbtn fl" onClick={()=>this.cancelEdit()}>取消</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
: ""
|
|
|
|
: ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|