From 8bc80f741b05c7ee1828633dd2be241fb18b8498 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 1 Jul 2019 15:55:16 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E4=BD=9C=E4=B8=9A=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E5=88=97=E8=A1=A8=E8=80=81=E5=B8=88=EF=BC=8C=E5=AD=A6?=
=?UTF-8?q?=E7=94=9F=E8=BA=AB=E4=BB=BD=E5=A2=9E=E5=8A=A0=E8=AE=A1=E7=AE=97?=
=?UTF-8?q?=E6=88=90=E7=BB=A9=E6=9D=83=E9=99=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/shixunHomework/Listofworks.js | 109 ++++++++--
.../shixunHomework/Listofworksstudentone.js | 195 +++++++++++++-----
2 files changed, 238 insertions(+), 66 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js
index 636214885..30a0af582 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworks.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js
@@ -61,6 +61,7 @@ class Listofworks extends Component {
props: props,
data: [],
page: 1,
+ computeTimetype:true,
limit: 20,
loadingstate: true,
order: "update_time",
@@ -1182,8 +1183,6 @@ class Listofworks extends Component {
}).catch((error) => {
console.log(error)
});
-
-
}
// 立即发布
homeworkstartend = (ds,endtime) => {
@@ -1313,10 +1312,24 @@ class Listofworks extends Component {
}
+ setComputeTime=()=>{
+ this.setState({
+ computeTimetype:false
+ })
+ let homeworkid = this.props.match.params.homeworkid;
+ let url = "/homework_commons/"+homeworkid+"/update_score.json";
+
+ axios.get(url).then((response) => {
+ this.props.showNotification(`${response.data.message}`);
+ }).catch((error) => {
+ console.log(error)
+ });
+
+ }
render() {
// console.log("Listofworks.js000")
- let {columns, page, boolgalist,limit,experience,course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state;
+ let {columns,computeTimetype, page, boolgalist,limit,experience,course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state;
//
// console.log(teacherdata&&teacherdata.shixun_identifier)
// console.log(course_group_info)
@@ -1345,8 +1358,8 @@ class Listofworks extends Component {
{
`
body {
- overflow: hidden !important;
- }
+ overflow: hidden !important;
+ }
`
}
@@ -1418,6 +1431,7 @@ class Listofworks extends Component {
+
@@ -1481,10 +1495,83 @@ class Listofworks extends Component {
+
+ {computeTimetype===false?
+
+ 正在执行成绩计算,请稍后刷新页面查看结果
+ 温馨提示:执行时间因作品数量而异
+
+ :""}
{/*作品状态GraduationTaskssettinglist*/}
-
+ 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}
+
+ {computeTimetype===true?
+ 计算成绩
+
:
+ 计算成绩
+
}
+
+
+
+ this.onSearchKeywordKeyUp(e)}
+ onInput={this.inputSearchValues}
+ onSearch={this.searchValues}
+ >
+
+
+
+ -
作品状态:
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
index 7636db4e3..2974bf6ac 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
@@ -41,6 +41,7 @@ class Listofworksstudentone extends Component {
data: [],
datas: [],
view_report:false,
+ computeTimetype:true,
page: 1,
pages: 1,
limit: 20,
@@ -746,21 +747,77 @@ class Listofworksstudentone extends Component {
this.Getalistofworkstwo(this.state.order, "", "", "", pageNumber, this.state.limit);
}
+ setComputeTime=()=>{
+ this.setState({
+ computeTimetype:false
+ })
+ let homeworkid = this.props.match.params.homeworkid;
+ let url = "/homework_commons/"+homeworkid+"/update_student_score.json";
+
+ axios.get(url).then((response) => {
+ this.props.showNotification(`${response.data.message}`);
+ }).catch((error) => {
+ console.log(error)
+ });
+
+ }
render() {
- let {visibles, game_list,columns, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state;
+ let {visibles, game_list,columns, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state;
return (
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
// 学生不能查看别人的
+
{visibles === true ?
@@ -833,6 +890,14 @@ class Listofworksstudentone extends Component {
+ {computeTimetype===false?
-
+
+ 正在执行成绩计算,请稍后刷新页面查看结果
+ 温馨提示:执行时间因作品数量而异
+
+
:""}
+
+
{JSON.stringify(data) !== "[]" ?
-
{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.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&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}
+
+ {computeTimetype===true?
+ 计算成绩
+
:
+ 计算成绩
+
}
+
+
+
@@ -962,17 +1042,14 @@ class Listofworksstudentone extends Component {
+ {computeTimetype===false?
-
+
+ 正在执行成绩计算,请稍后刷新页面查看结果
+ 温馨提示:执行时间因作品数量而异
+
+
:""}
- {/*
*/}
- {/*
*/}
- {/* 89已交9000未交 剩余提交时间:{this.state.day}天 {this.state.hour}:{this.state.minute}:{this.state.second}*/}
-
- {/*
*/}
-
- {/*
*/}
{data === undefined ? "" :
-
{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.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&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}
+
+ {computeTimetype===true?
+ 计算成绩
+
:
+ 计算成绩
+
}
+
+
+
+
+
+
+ {/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/}
+ {/*
*/}