From 7be953025f9c4a1a8e682659aef801a0bc8baa4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 25 Jun 2019 18:18:51 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/shixunHomework/CommitSummary.js | 62 +- .../courses/shixunHomework/Listofworks.js | 825 +++++++++++++++--- .../shixunHomework/Listofworksstudentone.js | 139 ++- .../TraineetraininginformationModal.js | 5 +- .../shixunHomework/Trainingjobsetting.js | 34 +- 5 files changed, 826 insertions(+), 239 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/CommitSummary.js b/public/react/src/modules/courses/shixunHomework/CommitSummary.js index d8d84608c..3e12e2bb6 100644 --- a/public/react/src/modules/courses/shixunHomework/CommitSummary.js +++ b/public/react/src/modules/courses/shixunHomework/CommitSummary.js @@ -26,17 +26,11 @@ class CommitSummary extends Component{ data:undefined, cancels:false, } - // console.log("CommitSummary"); - // console.log(this.props); + } componentDidMount() { this.Getsubmissionsummaryinterface(); - // this.props.form.setFieldsValue({ - // description:"result.data.selected_data.tea_id", - // - // }); - this.getTrainingjobsetting(); let query = this.props.location.pathname; const type = query.split('/'); this.setState({ @@ -44,36 +38,6 @@ class CommitSummary extends Component{ }) } - // saveFormData = () => { - // form.validateFields((err, values) => { - // if (err) { - // return; - // } - // var worksid=this.state.data.homeworkid; - // // console.log(values); - // // console.log(homeworkid); - // console.log(worksid); - // // 在这里执行保存到服务器的操作使用axios - // // message.success('保存成功!') - // var url = `/student_works/${worksid}/update_des.json`; - // axios.post(url,{ - // description:values, - // }).then((result) => { - // if (result.status === 200) { - // // console.log(url) - // // console.log("提交总结接口") - // // console.log(JSON.stringify(result)) - // // message.success(result.data.message); - // } - // if(result.status === 403){ - // - // } - // }).catch((error) => { - // console.log(error) - // }) - // }); - // } - //获取提交总结接口 Getsubmissionsummaryinterface=()=>{ @@ -183,20 +147,6 @@ class CommitSummary extends Component{ * 内容 - {/**/} - {/* {getFieldDecorator('description', {*/} - {/* rules: [{*/} - {/* required: true, message: '请输入帖子内容',*/} - {/* }, {*/} - {/* max: 5000, message: '最大限制为5000个字符',*/} - {/* }],*/} - {/* })(*/} - {/* */} - {/* )}*/} - {/**/} - {/**/}
- {/**/} - {/*
*/} - {/* */} - {/* /!*提交*!/*/} - {/* 取消*/} - {/*
*/} - {/*
*/} -
{/**/} diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 2200c8e77..6d19b13ef 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -92,6 +92,7 @@ class Listofworks extends Component { unlimitedtwo: 1, code_review: false, boolgalist:true, + challenges_count:0, columns: [ { title: '序号', @@ -179,7 +180,13 @@ class Listofworks extends Component { align: 'center', render: (text, record) => ( - {record.completion} + + +
已通过{record.completion}关,共{this.state.challenges_count}关
+ }> + {record.completion+"/"+this.state.challenges_count} +
+
) }, @@ -210,16 +217,43 @@ class Listofworks extends Component { align: 'center', render: (text, record) => ( - = 90 ? { - "color": '#DD1717', - "text-align": "center" - } : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore} + { + record.efficiencyscore&& record.efficiencyscore=== "--"?( + record.submitstate==="按时提交"? + +
作业截止时,系统根据学生在课堂成员中的效率表现自动评分
+ }> + + -- + +
+ : + record.submitstate==="延时提交"? + +
补交结束时,系统根据学生在课堂成员中的效率表现自动评分
+ }> + + -- + +
+ : + + -- + + ) + : + = 90 ? { + "color": '#DD1717', + "text-align": "center" + } : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore} + } +
) }, @@ -230,17 +264,63 @@ class Listofworks extends Component { align: 'center', render: (text, record) => ( - = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" - }}>{record.finalscore} - + { + record.ultimate_score=== true? + +
{record.user_name}{record.user_login}
+
{record.finalscore === "--"?最终调整成绩:0分 :最终调整成绩:{record.finalscore}分}
+ }> + { + record.finalscore&&record.finalscore==="--"? + {record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } +
+ : + +
{record.user_name}{record.user_login}
+
{record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
+
{record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
+
{record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
+
{record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
+ }> + { + record.finalscore&&record.finalscore==="--"? + {record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } +
+ + } + ) }, { @@ -251,10 +331,15 @@ class Listofworks extends Component { align: 'center', width:'93px', render: (text, record) => ( - record.submitstate === "未提交" ? "--" : + record.submitstate === "未提交" ? -- : + +
直接调整最终成绩的分数
+
其它评分全部作废
+ }> this.Viewstudenttraininginformations(record)}>调分 +
this.Viewstudenttraininginformation(record)}>{record.operating}
@@ -320,7 +405,8 @@ class Listofworks extends Component { publish_immediately: result.data.publish_immediately, work_efficiency: result.data.work_efficiency, end_immediately: result.data.end_immediately, - code_review: result.data.code_review + code_review: result.data.code_review, + challenges_count:result.data.challenges_count, }) this.seacthdata(); } @@ -371,6 +457,7 @@ class Listofworks extends Component { task_status: result.data.task_status, course_group_info: result.data.course_group_info, loadingstate: false, + challenges_count:result.data.challenges_count, }) this.seacthdata(); @@ -420,11 +507,15 @@ class Listofworks extends Component { // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, - completion: this.state.teacherdata.student_works[i].complete_count === 4 ? "4/4" : this.state.teacherdata.student_works[i].complete_count === 3 ? "3/4" : this.state.teacherdata.student_works[i].complete_count === 2 ? "2/4" : this.state.teacherdata.student_works[i].complete_count === 1 ? "1/4" : this.state.teacherdata.student_works[i].complete_count === 0 ? "0/0" :this.state.teacherdata.student_works[i].complete_count == null ? "0/0" :this.state.teacherdata.student_works[i].complete_count == undefined ? "0/0": 0, + completion: this.state.teacherdata.student_works[i].complete_count === null ? "0" :this.state.teacherdata.student_works[i].complete_count === undefined ? "0": this.state.teacherdata.student_works[i].complete_count, levelscore: this.state.teacherdata.student_works[i].final_score, efficiencyscore: this.state.teacherdata.student_works[i].eff_score, finalscore: this.state.teacherdata.student_works[i].work_score, operating: "查看", + late_penalty: this.state.teacherdata.student_works[i].late_penalty=== null?"0":this.state.teacherdata.student_works[i].late_penalty === undefined?"0":this.state.teacherdata.student_works[i].late_penalty, + ultimate_score:this.state.teacherdata.student_works[i].ultimate_score, + user_name: this.state.teacherdata.student_works[i].user_name, + user_login: this.state.teacherdata.student_works[i].user_login, }) } @@ -435,64 +526,54 @@ class Listofworks extends Component { current: this.state.page, } if (this.state.work_efficiency === false) { - columns = [ - { - title: '序号', - dataIndex: 'number', - key: 'number', - align: 'center', - width:'96px', - render: (text, record) => ( - + if(JSON.stringify(this.state.course_group_info) === "[]" ? "" : this.state.course_group_info === undefined ? "" :this.state.course_group_info === null){ + columns = [ + { + title: '序号', + dataIndex: 'number', + key: 'number', + align: 'center', + width:'96px', + render: (text, record) => ( + {record.number} - ) - }, - { - title: '姓名', - dataIndex: 'name', - key: 'name', - align: 'center', - width:'147px', - render: (text, record) => ( - + ) + }, + { + title: '姓名', + dataIndex: 'name', + key: 'name', + align: 'center', + width:'147px', + render: (text, record) => ( + {record.name} - ) - }, - { - title: '学号', - dataIndex: 'stduynumber', - key: 'stduynumber', - align: 'center', - width:'200px', - render: (text, record) => ( - + ) + }, + { + title: '学号', + dataIndex: 'stduynumber', + key: 'stduynumber', + align: 'center', + width:'200px', + render: (text, record) => ( + {record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber} - ), - }, - { - title: '分班', - key: 'classroom', - dataIndex: 'classroom', - align: 'center', - render: (text, record) => ( - - {record.classroom} - - ) - }, - { - title: '提交状态', - dataIndex: 'submitstate', - key: 'submitstate', - align: 'center', - render: (text, record) => ( - + ), + }, + { + title: '提交状态', + dataIndex: 'submitstate', + key: 'submitstate', + align: 'center', + render: (text, record) => ( + {record.submitstate} - ) + ) - }, - { - title: '更新时间', - dataIndex: 'updatetime', - key: 'updatetime', - align: 'center', - render: (text, record) => ( - - {record.updatetime} + }, + { + title: '更新时间', + dataIndex: 'updatetime', + key: 'updatetime', + align: 'center', + render: (text, record) => ( + + {record.updatetime} - ), - }, - { - title: '完成情况', - dataIndex: 'completion', - key: 'completion', - align: 'center', + ), + }, + { + title: '完成情况', + dataIndex: 'completion', + key: 'completion', + align: 'center', + + render: (text, record) => ( + + + +
已通过{record.completion}关,共{this.state.challenges_count}关
+ }> + {record.completion+"/"+this.state.challenges_count} +
- render: (text, record) => ( - - {record.completion} - ) - }, - { - title: '最终成绩', - dataIndex: 'finalscore', - key: 'finalscore', - align: 'center', - render: (text, record) => ( - - ( + + { + record.ultimate_score=== true? + +
{record.user_name}{record.user_login}
+
{record.finalscore === "--"?最终调整成绩:0分 :最终调整成绩:{record.finalscore}分}
+ }> + { + record.finalscore&&record.finalscore==="--"? +
{record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } + + : + +
{record.user_name}{record.user_login}
+
{record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
+
{record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
+
{record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
+
{record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
+ }> + { + record.finalscore&&record.finalscore==="--"? + {record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } +
+ + } +
+ ) + }, + { + title: '操作', + dataIndex: 'operating', + key: 'operating', + display: 'block', + align: 'center', + width:'96px', + render: (text, record) => ( + record.submitstate === "未提交" ? --: + + +
直接调整最终成绩的分数
+
其它评分全部作废
+ }> + this.Viewstudenttraininginformations(record)}>调分 +
+ this.Viewstudenttraininginformation(record)}>{record.operating} +
+ ) + }, + ] + + }else{ + columns = [ + { + title: '序号', + dataIndex: 'number', + key: 'number', + align: 'center', + width:'96px', + render: (text, record) => ( + + {record.number} + + ) + }, + { + title: '姓名', + dataIndex: 'name', + key: 'name', + align: 'center', + width:'147px', + render: (text, record) => ( + + {record.name} + + ) + }, + { + title: '学号', + dataIndex: 'stduynumber', + key: 'stduynumber', + align: 'center', + width:'200px', + render: (text, record) => ( + + {record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber} + + ), + }, + { + title: '分班', + key: 'classroom', + dataIndex: 'classroom', + align: 'center', + render: (text, record) => ( + + { + record.classroom&&record.classroom==="--"? + + : + + } + + ) + }, + { + title: '提交状态', + dataIndex: 'submitstate', + key: 'submitstate', + align: 'center', + render: (text, record) => ( + + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + } : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : { "color": '#747A7F', "text-align": "center" - }}>{record.finalscore} + }}>{record.submitstate} + + ) + + }, + { + title: '更新时间', + dataIndex: 'updatetime', + key: 'updatetime', + align: 'center', + render: (text, record) => ( + + {record.updatetime} + + ), + }, + { + title: '完成情况', + dataIndex: 'completion', + key: 'completion', + align: 'center', + + render: (text, record) => ( + + + +
已通过{record.completion}关,共{this.state.challenges_count}关
+ }> + {record.completion+"/"+this.state.challenges_count} +
- ) - }, - { - title: '操作', - dataIndex: 'operating', - key: 'operating', - display: 'block', - align: 'center', - width:'96px', - render: (text, record) => ( - record.submitstate === "未提交" ? --: + ) + }, + { + title: '最终成绩', + dataIndex: 'finalscore', + key: 'finalscore', + align: 'center', + render: (text, record) => ( + { + record.ultimate_score=== true? + +
{record.user_name}{record.user_login}
+
{record.finalscore === "--"?最终调整成绩:0分 :最终调整成绩:{record.finalscore}分}
+ }> + { + record.finalscore&&record.finalscore==="--"? + {record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } +
+ : + +
{record.user_name}{record.user_login}
+
{record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
+
{record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
+
{record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
+
{record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
+ }> + { + record.finalscore&&record.finalscore==="--"? + {record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } +
+ + } +
+ ) + }, + { + title: '操作', + dataIndex: 'operating', + key: 'operating', + display: 'block', + align: 'center', + width:'96px', + render: (text, record) => ( + record.submitstate === "未提交" ? --: + + +
直接调整最终成绩的分数
+
其它评分全部作废
+ }> this.Viewstudenttraininginformations(record)}>调分 +
this.Viewstudenttraininginformation(record)}>{record.operating} +
+ ) + }, + ] + + } + }else { + if(JSON.stringify(this.state.course_group_info) === "[]" ? "" : this.state.course_group_info === undefined ? "" : this.state.course_group_info === null){ + columns=[ + { + title: '序号', + dataIndex: 'number', + key: 'number', + align: 'center', + width:'96px', + render: (text, record) => ( + + {record.number} + + ) + }, + { + title: '姓名', + dataIndex: 'name', + key: 'name', + align: 'center', + Width:'147px', + render: (text, record) => ( + + {record.name} - ) - }, - ] + ) + }, + { + title: '学号', + dataIndex: 'stduynumber', + key: 'stduynumber', + align: 'center', + width:'200px', + render: (text, record) => ( + + {record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber} + + ), + }, + { + title: '提交状态', + dataIndex: 'submitstate', + key: 'submitstate', + align: 'center', + render: (text, record) => ( + + {record.submitstate} + + ) + + }, + { + title: '更新时间', + dataIndex: 'updatetime', + key: 'updatetime', + align: 'center', + render: (text, record) => ( + + {record.updatetime} + + ), + }, + { + title: '完成情况', + dataIndex: 'completion', + key: 'completion', + align: 'center', + render: (text, record) => ( + + + +
已通过{record.completion}关,共{this.state.challenges_count}关
+ }> + {record.completion+"/"+this.state.challenges_count} +
+ +
+ ) + }, + { + title: '关卡得分', + dataIndex: 'levelscore', + key: 'levelscore', + align: 'center', + render: (text, record) => ( + + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.levelscore} + + ) + }, + { + title: '效率分', + dataIndex: 'efficiencyscore', + key: 'efficiencyscore', + align: 'center', + render: (text, record) => ( + + { + record.efficiencyscore&& record.efficiencyscore=== "--"?( + record.submitstate==="按时提交"? + +
作业截止时,系统根据学生在课堂成员中的效率表现自动评分
+ }> + + -- + +
+ : + record.submitstate==="延时提交"? + +
补交结束时,系统根据学生在课堂成员中的效率表现自动评分
+ }> + + -- + +
+ : + + -- + + ) + : + = 90 ? { + "color": '#DD1717', + "text-align": "center" + } : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore} + } + +
+ + ) + }, + { + title: '最终成绩', + dataIndex: 'finalscore', + key: 'finalscore', + align: 'center', + render: (text, record) => ( + + { + record.ultimate_score=== true? + +
{record.user_name}{record.user_login}
+
{record.finalscore === "--"?最终调整成绩:0分 :最终调整成绩:{record.finalscore}分}
+ }> + { + record.finalscore&&record.finalscore==="--"? + {record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } +
+ : + +
{record.user_name}{record.user_login}
+
{record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
+
{record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
+
{record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
+
{record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
+ }> + { + record.finalscore&&record.finalscore==="--"? + {record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } +
+ + } +
+ ) + }, + { + title: '操作', + dataIndex: 'operating', + key: 'operating', + display: 'block', + align: 'center', + width:'93px', + render: (text, record) => ( + record.submitstate === "未提交" ? -- : + + +
直接调整最终成绩的分数
+
其它评分全部作废
+ }> + this.Viewstudenttraininginformations(record)}>调分 +
+ this.Viewstudenttraininginformation(record)}>{record.operating} +
+ ) + }, + ] + } } } else { diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index af698386f..d5dbaf06d 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -91,8 +91,8 @@ class Listofworksstudentone extends Component { search: "", order: "", b_order: "asc", - page:1, - limit:20, + page: 1, + limit: 20, work_status: "", course_group: "", } @@ -165,7 +165,7 @@ class Listofworksstudentone extends Component { }).catch((error) => { console.log(error) this.setState({ - loadingstate:false + loadingstate: false }) }) } @@ -450,7 +450,7 @@ class Listofworksstudentone extends Component { } axios.post(urll, data).then((result) => { - if(result !== undefined){ + if (result !== undefined) { // console.log("学生公开的作品列表") // console.log(JSON.stringify(result)) this.setState({ @@ -495,20 +495,38 @@ class Listofworksstudentone extends Component { } render() { - let {visibles, game_list, limit, viewtrainingdata, teacherdata,page, data, jobsettingsdata,styletable, datas, order, loadingstate} = this.state; + let {visibles, game_list, limit, viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state; let columns = [ { title: '序号', dataIndex: 'number', key: 'number', align: "center", - width:'96px', + width: '96px', render: (text, record) => ( - {record.number === undefined ? "--" : record.number === "" ? "--" : record.number} + {record.number === undefined ? + -- + : record.number === "" ? + -- + : record.number === "--" ? + -- + : + {record.number} + } + ), }, @@ -517,13 +535,39 @@ class Listofworksstudentone extends Component { dataIndex: 'name', key: 'name', align: "center", - width:'147px', + width: '147px', render: (text, record) => ( - {record.name === undefined ? "--" : record.name === "" ? "--" : record.name === null ? "--" : record.name} + {record.name === undefined ? + -- + : + record.name === "" ? + -- + : + record.name === null ? + -- + : + record.name === "--" ? + -- + : + {record.name} + } + ), }, @@ -532,7 +576,7 @@ class Listofworksstudentone extends Component { dataIndex: 'stduynumber', key: 'stduynumber', align: "center", - width:'200px', + width: '200px', render: (text, record) => ( ( - 90 ? { - "color": '#DD1717', - "text-align": "center" - } : parseInt(record.levelscore) <= 90 ? { - "color": '#FF6800', - "text-align": "center", - "margin-left": "20px" - } : parseInt(record.levelscore) <= 60 ? { - "color": '#747A7F', - "text-align": "center" - } : {"color": '#747A7F', "text-align": "center"}}>{record.levelscore} + { + record.levelscore && record.levelscore === "--"? + {record.levelscore} + : + 90 ? { + "color": '#DD1717', + "text-align": "center" + } : parseInt(record.levelscore) <= 90 ? { + "color": '#FF6800', + "text-align": "center", + "margin-left": "20px" + } : parseInt(record.levelscore) <= 60 ? { + "color": '#747A7F', + "text-align": "center" + } : {"color": '#747A7F', "text-align": "center"}}>{record.levelscore} + } + ), }, @@ -628,11 +678,11 @@ class Listofworksstudentone extends Component { dataIndex: 'operating', key: 'operating', align: "center", - width:'96px', + width: '96px', render: (text, record) => ( { - record.submitstate === "未提交" ? "--" + record.submitstate === "未提交" ?-- : this.cancelModulationModels()} /> - : "" + : "" }
@@ -683,12 +733,12 @@ class Listofworksstudentone extends Component { > {jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name} + to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name} > 作业详情

-
+

{teacherdata === undefined ? "" : teacherdata.homework_name}

@@ -696,11 +746,11 @@ class Listofworksstudentone extends Component { typelist={teacherdata === undefined ? [""] : teacherdata.homework_status} />
返回 + href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>返回

-
+
{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}已交{teacherdata === undefined ? "" : teacherdata.uncommit_count}未交 - {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" :teacherdata.left_time === null ? "" : + {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : {teacherdata.left_time.status} } {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : - {teacherdata.left_time.time} + {teacherdata.left_time.time} } @@ -888,8 +939,11 @@ class Listofworksstudentone extends Component { {teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}已交{teacherdata === undefined ? "" : teacherdata.uncommit_count}未交 - {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :{teacherdata.left_time.status}} - {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" :teacherdata.left_time === null ? "0" :{teacherdata.left_time.time} } + {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : + {teacherdata.left_time.status}} + {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : + {teacherdata.left_time.time}}
@@ -899,9 +953,12 @@ class Listofworksstudentone extends Component { {order === "updated_at" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序 diff --git a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js index 8c7ad059e..9f82abcfe 100644 --- a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js +++ b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js @@ -136,6 +136,7 @@ class TraineetraininginformationModal extends Component { dataIndex: 'number', key: 'number', align: "center", + width: "117px", render: (text, record) => ( {record.number} @@ -146,7 +147,7 @@ class TraineetraininginformationModal extends Component { title: '完成时间', dataIndex: 'name', key: 'name', - width: 178, + width: "203px", align: "center", render: (text, record) => ( @@ -159,6 +160,7 @@ class TraineetraininginformationModal extends Component { dataIndex: 'stduynumber', key: 'stduynumber', align: "center", + width: "117px", render: (text, record) => ( {record.stduynumber} @@ -170,6 +172,7 @@ class TraineetraininginformationModal extends Component { key: 'classroom', dataIndex: 'classroom', align: "center", + width: "117px", render: (text, record) => ( {record.classroom} diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 18d970b1f..6a3379222 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -305,6 +305,10 @@ class Trainingjobsetting extends Component { }) return }else { + + if(!this.state.flagPageEditsthrees === false){ + + if (moment(this.state.end_time, "YYYY-MM-DD HH:mm") <= moment()) { //截止时间小于当前时间 this.scrollToAnchor("publishtimeid"); @@ -325,6 +329,7 @@ class Trainingjobsetting extends Component { }) return } + } } if (this.state.allowreplenishment === "允许补交") { @@ -489,19 +494,22 @@ class Trainingjobsetting extends Component { if (this.state.completionefficiencyscore === true) { latedeductiontwos = this.state.latedeductiontwo; } - var len = 0; - for (var k = 0; k < challenge_scoredata.length; k++) { - len = len + challenge_scoredata[k]; - } - var max = latedeductiontwos + len; - if (max > 100) { - this.props.showNotification(`总分值+效率占比分之和要等于100,现在分值为` + max); - return; - } - if(max<100){ - this.props.showNotification(`总分值+效率占比分之和要等于100,现在分值为` + max); - return; + if(challenge_scoredata.length>0){ + var len = 0; + for (var k = 0; k < challenge_scoredata.length; k++) { + len = len + challenge_scoredata[k]; + } + var max = latedeductiontwos + len; + if (max > 100) { + this.props.showNotification(`总分值+效率占比分之和要等于100,现在分值为` + max); + return; + } + if(max<100){ + this.props.showNotification(`总分值+效率占比分之和要等于100,现在分值为` + max); + return; + } } + var url = `/homework_commons/${homeworkid}/update_settings.json`; var data = undefined; // console.log("this.state.unified_setting") @@ -1939,7 +1947,7 @@ class Trainingjobsetting extends Component {
公开作品 + checked={this.state.publicwork} style={{"color":"#666666"}}>公开成绩 (选中,则在作业截止/补交结束时间之后,已提交作品的学生可以查看其它学生的成绩,否则只能查看自己的成绩)
From 59bbb18b376dd25f5dfc4473bb8cfdb076f3f075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 25 Jun 2019 18:39:39 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesPublic/AccessoryModal.js | 8 ++--- .../graduation/tasks/GraduateTaskItem.js | 32 +++++++++++++++-- .../tasks/GraduationTasksappraise.js | 2 +- .../tasks/GraduationTaskssettinglist.js | 34 +++++++++++++++---- 4 files changed, 62 insertions(+), 14 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/AccessoryModal.js b/public/react/src/modules/courses/coursesPublic/AccessoryModal.js index acd583e43..df59cb4ae 100644 --- a/public/react/src/modules/courses/coursesPublic/AccessoryModal.js +++ b/public/react/src/modules/courses/coursesPublic/AccessoryModal.js @@ -115,10 +115,10 @@ class AccessoryModal extends Component{ newfileList.push(list.response.id) } - if (newfileList.length == 0) { - this.props.showNotification('请先上传附件') - return; - } + // if (newfileList.length == 0) { + // this.props.showNotification('请先上传附件') + // return; + // } let url= this.props.reviseAttachmentUrl || "/graduation_works/"+id+"/revise_attachment.json" axios.post(url,{ diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 419f26315..519850271 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -6,6 +6,8 @@ import {Link} from 'react-router-dom'; import axios from 'axios'; import Modals from '../../../modals/Modals'; import Associationmodel from '../../coursesPublic/Associationmodel'; +import AccessoryModal from "../../coursesPublic/AccessoryModal"; + class GraduateTaskItem extends Component{ constructor(props){ @@ -111,12 +113,26 @@ class GraduateTaskItem extends Component{ } + addAccessory=()=>{ + this.setState({ + visibles:true + }) + } + Cancel=()=>{ this.setState({ visible:false }) } - + Cancelvisible=()=>{ + this.setState({ + visibles:false + }) + } + + setupdate=()=>{ + this.props.funlist + } render(){ let { Modalstype, @@ -161,6 +177,15 @@ class GraduateTaskItem extends Component{ taskid={taskid} funlist={this.props.funlist} />:""} + {this.state.visibles===true?:""}