Merge remote-tracking branch 'origin/master'

# Conflicts:
#	public/react/src/modules/courses/shixunHomework/Listofworks.js
dev_forum
杨树明 5 years ago
parent ac4864f89c
commit d7b586fe9e

@ -63,7 +63,8 @@ class Listofworks extends Component {
page: 1,
limit: 20,
loadingstate: true,
order: "updated_at",
order: "update_time",
b_order:"desc",
search: null,
task_status: [],
course_group_info: [],
@ -678,10 +679,11 @@ class Listofworks extends Component {
//order 排序时间
//debug=t 是老师的意思
// console.log(ordervlue)7009
var homeworkid = this.props.match.params.homeworkid;
let urll = `/homework_commons/${homeworkid}/works_list.json?`;
var order = "asc";
if (ordervlue === "updated_at") {
if (ordervlue === "update_time") {
order = "desc";
}
var checkedValuesines = checkedValuesine;
@ -2031,14 +2033,14 @@ class Listofworks extends Component {
}
//排序
funorder = (e) => {
if (e === "updated_at") {
if (e === "update_time") {
// 时间
// 时间排序是从小到大
this.setState({
order: "updated_at",
order: "update_time",
loadingstate: true,
})
this.Startsorting("updated_at", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
this.Startsorting("update_time", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
}
if (e === "work_score") {
@ -2597,10 +2599,10 @@ class Listofworks extends Component {
<ul>
<li className="edu-position edu-position-hidebox">
<a className="font-12 color-grey-6">
{order === "updated_at" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a>
{order === "update_time" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a>
<i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i>
<ul className="edu-position-hide undis mt10">
<li> <a onClick={(e) => this.funorder("updated_at")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li>
<li> <a onClick={(e) => this.funorder("update_time")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li>
<li> <a onClick={(e) => this.funorder("work_score")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>最终成绩</a></li>
<li> <a onClick={(e) => this.funorder("student_id")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>学生学号</a></li>
</ul>

Loading…
Cancel
Save