调整参数

dev_auth
杨树林 5 years ago
parent d8938438b1
commit 9f6651463e

@ -877,6 +877,7 @@ class Studentshavecompletedthelist extends Component {
key: 'stduynumber',
align: 'center',
className: "edu-txt-center font-14",
sorter: true,
render: (text, record) => (
<span>
{record.stduynumber === "--" ?
@ -930,6 +931,7 @@ class Studentshavecompletedthelist extends Component {
key: 'updatetime',
align: 'center',
className: "edu-txt-center font-14",
sorter: true,
render: (text, record) => (
<span>
{record.updatetime==="--"?
@ -978,6 +980,7 @@ class Studentshavecompletedthelist extends Component {
key: 'efficiencyscore',
align: 'center',
className: "edu-txt-center font-14",
sorter: true,
render: (text, record) => (
<span>
{record.efficiencyscore === "--" ?
@ -1221,6 +1224,7 @@ class Studentshavecompletedthelist extends Component {
},
],
exercise_status:0,
order_type: "desc",
}
// console.log("Studentshavecompletedthelist");
// console.log(props.current_status);
@ -1244,7 +1248,7 @@ class Studentshavecompletedthelist extends Component {
})
}
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, pageNumber, 20);
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, pageNumber, 20, this.state.order_type);
}
paginationonChanges = (pageNumber) => {
@ -1459,9 +1463,9 @@ class Studentshavecompletedthelist extends Component {
thiss.Generatenewdatasy(response.data.exercise_users, response);
}
}).catch((error) => {
console.log(error);
console.log("其实数据加载失败了");
console.log("1111");
// console.log(error);
// console.log("其实数据加载失败了");
// console.log("1111");
});
@ -2050,7 +2054,7 @@ class Studentshavecompletedthelist extends Component {
})
}
Searchdatasys = (order, commit_status, review, exercise_group_id, search, page, limit) => {
Searchdatasys = (order, commit_status, review, exercise_group_id, search, page, limit, order_type) => {
var exercise_id = this.props.match.params.Id;
var url = `/exercises/${exercise_id}/exercise_lists.json`;
axios.get((url), {
@ -2062,6 +2066,7 @@ class Studentshavecompletedthelist extends Component {
search: search,
page: page,
limit: limit,
order_type: order_type
}
}).then((response) => {
// console.log("528");
@ -2098,7 +2103,7 @@ class Studentshavecompletedthelist extends Component {
page:1,
})
}
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, null, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, null, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type);
}
// notlimiteds = () => {
// this.setState({
@ -2125,7 +2130,7 @@ class Studentshavecompletedthelist extends Component {
})
}
this.Searchdatasys(this.state.order, undefined, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
this.Searchdatasys(this.state.order, undefined, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type);
}
checkeboxstwo = (checkedValues, data) => {
// console.log(checkedValues)
@ -2146,7 +2151,7 @@ class Studentshavecompletedthelist extends Component {
})
}
this.Searchdatasys(this.state.order, checkedValues, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
this.Searchdatasys(this.state.order, checkedValues, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type);
} else if (checkedValues.length === data.length) {
if (this.state.loadingstate === false) {
this.setState({
@ -2163,10 +2168,10 @@ class Studentshavecompletedthelist extends Component {
})
}
this.Searchdatasys(this.state.order, checkedValues, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
this.Searchdatasys(this.state.order, checkedValues, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type);
} else {
// console.log(checkedValues);
this.Searchdatasys(this.state.order, checkedValues, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
this.Searchdatasys(this.state.order, checkedValues, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type);
if (this.state.loadingstate === false) {
this.setState({
loadingstate: true,
@ -2196,7 +2201,7 @@ class Studentshavecompletedthelist extends Component {
course_groups: null,
unlimitedtwo: 0
})
this.Searchdatasys(this.state.order, this.state.commit_status, this.state.review, undefined, this.state.searchtext, null, null)
this.Searchdatasys(this.state.order, this.state.commit_status, this.state.review, undefined, this.state.searchtext, null, null, this.state.order_type)
}
checkeboxs = (checkedValues, data) => {
@ -2225,7 +2230,7 @@ class Studentshavecompletedthelist extends Component {
})
}
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type);
} else if (checkedValues.length === data.length) {
if (this.state.loadingstate === false) {
this.setState({
@ -2242,7 +2247,7 @@ class Studentshavecompletedthelist extends Component {
})
}
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type);
} else {
// console.log(checkedValues);
if (this.state.loadingstate === false) {
@ -2260,7 +2265,7 @@ class Studentshavecompletedthelist extends Component {
})
}
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type);
}
}
@ -2283,7 +2288,7 @@ class Studentshavecompletedthelist extends Component {
})
}
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, undefined, this.state.searchtext, 1, this.state.limit)
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, undefined, this.state.searchtext, 1, this.state.limit, this.state.order_type)
}
funtaskstatustwo = (checkedValues, data) => {
@ -2305,7 +2310,7 @@ class Studentshavecompletedthelist extends Component {
})
}
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, checkedValues, this.state.searchtext, 1, this.state.limit)
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, checkedValues, this.state.searchtext, 1, this.state.limit, this.state.order_type)
} else if (checkedValues.length === data.length) {
if (this.state.loadingstate === false) {
this.setState({
@ -2322,7 +2327,7 @@ class Studentshavecompletedthelist extends Component {
})
}
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, checkedValues, this.state.searchtext, 1, this.state.limit)
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, checkedValues, this.state.searchtext, 1, this.state.limit, this.state.order_type)
} else {
// console.log(checkedValues);
if (this.state.loadingstate === false) {
@ -2343,7 +2348,7 @@ class Studentshavecompletedthelist extends Component {
}
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, checkedValues, this.state.searchtext, 1, this.state.limit)
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, checkedValues, this.state.searchtext, 1, this.state.limit, this.state.order_type)
this.props.setcourse_groupysls(checkedValues)
}
@ -2364,7 +2369,7 @@ class Studentshavecompletedthelist extends Component {
})
}
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type);
}
};
//搜索学生按钮输入 老师
@ -2381,7 +2386,7 @@ class Studentshavecompletedthelist extends Component {
})
}
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, value, 1, this.state.limit);
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, value, 1, this.state.limit, this.state.order_type);
// this.Startsorting(this.state.order,this.state.checkedValuesine,this.state.checkedValuesineinfo,value);
// console.log(value)
@ -2416,59 +2421,92 @@ class Studentshavecompletedthelist extends Component {
};
//排序
funordersy = (e) => {
console.log(this.state.course_groupyslstwo);
if (e === "end_at") {
// 时间
// 时间排序是从小到大
if (this.state.loadingstate === false) {
this.setState({
order: "end_at",
loadingstate: true,
})
} else {
this.setState({
order: "end_at",
})
//试卷tbale 列表塞选数据
table1handleChange = (pagination, filters, sorter) => {
//"ascend" 升序
//"descend" 降序
if (JSON.stringify(sorter) === "{}") {
//没有选择
} else {
try {
//时间排序
if (sorter.columnKey === "updatetime") {
if (sorter.order === "ascend") {
//升序
this.setState({
order: "end_at",
loadingstate: true,
order_type: "asc"
})
this.Searchdatasys("end_at", this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit, "asc");
} else if (sorter.order === "descend") {
//降序
this.setState({
order: "end_at",
loadingstate: true,
order_type: "desc"
})
this.Searchdatasys("end_at", this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit, "desc");
}
}
} catch (e) {
}
this.Searchdatasys(e, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page,this.state.limit);
}
try {
//学生学号排序
if (sorter.columnKey === "stduynumber") {
if (sorter.order === "ascend") {
//升序
this.setState({
order: "student_id",
loadingstate: true,
order_type: "asc"
})
this.Searchdatasys("student_id", this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit, "asc");
} else if (sorter.order === "descend") {
//降序
this.setState({
order: "student_id",
loadingstate: true,
order_type: "desc"
})
this.Searchdatasys("student_id", this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit, "desc");
if (e === "score") {
// 成绩
//成绩排序是从大到小
if (this.state.loadingstate === false) {
this.setState({
order: "score",
loadingstate: true,
})
} else {
this.setState({
order: "score",
})
}
}
} catch (e) {
}
this.Searchdatasys(e, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page,this.state.limit);
}
try {
//成绩排序排序
if (sorter.columnKey === "efficiencyscore") {
if (sorter.order === "ascend") {
//升序
this.setState({
order: "score",
loadingstate: true,
order_type: "asc"
})
this.Searchdatasys("score", this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit, "asc");
} else if (sorter.order === "descend") {
//降序
this.setState({
order: "score",
loadingstate: true,
order_type: "desc"
})
this.Searchdatasys("score", this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit, "desc");
}
}
} catch (e) {
if (e === "student_id") {
//学号
//学号排序是从大到小
if (this.state.loadingstate === false) {
this.setState({
order: "student_id",
loadingstate: true,
})
} else {
this.setState({
order: "student_id",
})
}
this.Searchdatasys(e, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page,this.state.limit);
}
}
setExerciseReviewAndAnswer = () => {
@ -2634,23 +2672,6 @@ class Studentshavecompletedthelist extends Component {
style={{color: '#FF6800'}}>{Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.total_users}</span><span
className="color-orange-tip"></span>{Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.exercise_all_users} </span>
<div className="fr color-grey-6 edu-menu-panel">
<ul>
<li className="edu-position edu-position-hidebox">
<a className="font-12">
{order === "end_at" ? "时间" : order === "score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a>
<i className="iconfont icon-xiajiantou ml5 font-12"></i>
<ul className="edu-position-hide undis mt10">
<li><a onClick={(e) => this.funordersy("end_at")} data-remote="true"
className=" font-12" style={{textAlign: "center "}}>提交时间</a></li>
<li><a onClick={(e) => this.funordersy("score")} data-remote="true"
className=" font-12" style={{textAlign: "center "}}>最终成绩</a></li>
<li><a onClick={(e) => this.funordersy("student_id")} data-remote="true"
className=" font-12" style={{textAlign: "center "}}>学生学号</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
@ -2675,6 +2696,7 @@ class Studentshavecompletedthelist extends Component {
columns={columnsys}
className="mysjysltable1"
pagination={false}
onChange={this.table1handleChange}
loading={loadingstate}
// onChange={this.TablePaginationsy}
/>}

Loading…
Cancel
Save