|
|
|
@ -818,6 +818,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
b_order: "desc",
|
|
|
|
|
myorders: "desc",
|
|
|
|
|
allow_late: false,
|
|
|
|
|
checkedValuesine: undefined,
|
|
|
|
|
checkedValuesineinfo: [],
|
|
|
|
@ -872,6 +873,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
key: 'stduynumber',
|
|
|
|
|
align: "center",
|
|
|
|
|
className: 'font-14 maxnamewidth110',
|
|
|
|
|
sorter: true,
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span className="maxnamewidth110">
|
|
|
|
|
{record.stduynumber === undefined ?
|
|
|
|
@ -1091,6 +1093,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
key: 'finalscore',
|
|
|
|
|
align: 'center',
|
|
|
|
|
className: 'font-14',
|
|
|
|
|
sorter: true,
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
{
|
|
|
|
@ -1530,6 +1533,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
// console.log("componentDidMount ");
|
|
|
|
|
// console.log("调用子组件 ");
|
|
|
|
@ -1548,6 +1552,68 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
// this.Gettitleinformation(homeworkid);
|
|
|
|
|
this.Getalistofworks(homeworkid, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//tbale 列表塞选数据
|
|
|
|
|
table1handleChange = (pagination, filters, sorter) => {
|
|
|
|
|
//"ascend" 升序
|
|
|
|
|
//"descend" 降序
|
|
|
|
|
if (JSON.stringify(sorter) === "{}") {
|
|
|
|
|
//没有选择
|
|
|
|
|
} else {
|
|
|
|
|
console.log(sorter);
|
|
|
|
|
try {
|
|
|
|
|
//学生学号排序
|
|
|
|
|
if (sorter.columnKey === "stduynumber") {
|
|
|
|
|
if (sorter.order === "ascend") {
|
|
|
|
|
//升序
|
|
|
|
|
this.setState({
|
|
|
|
|
myorders: "asc",
|
|
|
|
|
orders: "student_id",
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
});
|
|
|
|
|
this.Startsortingt("student_id", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit, "asc");
|
|
|
|
|
} else if (sorter.order === "descend") {
|
|
|
|
|
//降序
|
|
|
|
|
this.setState({
|
|
|
|
|
myorders: "desc",
|
|
|
|
|
orders: "student_id",
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt("student_id", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit, "desc");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
//学生学号排序
|
|
|
|
|
if (sorter.columnKey === "finalscore") {
|
|
|
|
|
if (sorter.order === "ascend") {
|
|
|
|
|
//升序
|
|
|
|
|
this.setState({
|
|
|
|
|
myorders: "asc",
|
|
|
|
|
orders: "work_score",
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt("work_score", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit, "asc");
|
|
|
|
|
} else if (sorter.order === "descend") {
|
|
|
|
|
//降序
|
|
|
|
|
this.setState({
|
|
|
|
|
myorders: "desc",
|
|
|
|
|
orders: "work_score",
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt("work_score", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit, "desc");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/////////老师操作
|
|
|
|
|
// tearchar=()=>{
|
|
|
|
|
// var homeworkid = this.props.match.params.homeworkid;
|
|
|
|
@ -2275,7 +2341,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//开始排序操作
|
|
|
|
|
Startsortingt = (ordervlue, checkedValuesine, checkedValuesineinfo, searchtext, page, limit) => {
|
|
|
|
|
Startsortingt = (ordervlue, checkedValuesine, checkedValuesineinfo, searchtext, page, limit, myorders) => {
|
|
|
|
|
//要提交的作品状态checkedValuesine
|
|
|
|
|
//要提交的分班状态checkedValuesineinfo
|
|
|
|
|
//searchtext 输入的姓名和学号
|
|
|
|
@ -2285,10 +2351,18 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
|
|
|
|
|
var homeworkid = this.props.match.params.homeworkid;
|
|
|
|
|
let urll = `/homework_commons/${homeworkid}/works_list.json?`;
|
|
|
|
|
var order = "asc";
|
|
|
|
|
if (ordervlue === "update_time") {
|
|
|
|
|
order = "desc";
|
|
|
|
|
var order = this.state.order;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
if (myorders === null || myorders === undefined) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
order = myorders;
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var checkedValuesines = checkedValuesine;
|
|
|
|
|
var checkedValuesineinfos = checkedValuesineinfo;
|
|
|
|
|
var searchtexts = searchtext
|
|
|
|
@ -2591,7 +2665,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
page: 1,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt(this.state.orders, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
|
|
|
|
|
this.Startsortingt(this.state.orders, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.myorders);
|
|
|
|
|
} else if (checkedValues.length === data.length) {
|
|
|
|
|
this.setState({
|
|
|
|
|
unlimited: 0,
|
|
|
|
@ -2599,7 +2673,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
page: 1,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt(this.state.orders, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
|
|
|
|
|
this.Startsortingt(this.state.orders, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.myorders);
|
|
|
|
|
} else {
|
|
|
|
|
// console.log(checkedValues);
|
|
|
|
|
this.setState({
|
|
|
|
@ -2608,7 +2682,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
page: 1,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt(this.state.orders, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
|
|
|
|
|
this.Startsortingt(this.state.orders, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.myorders);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -2625,7 +2699,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
page: 1,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, checkedValues, this.state.searchtext, 1, this.state.limit);
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, checkedValues, this.state.searchtext, 1, this.state.limit, this.state.myorders);
|
|
|
|
|
} else if (checkedValues.length === data.length) {
|
|
|
|
|
this.setState({
|
|
|
|
|
unlimitedtwo: 1,
|
|
|
|
@ -2634,7 +2708,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
page: 1,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.checcourse_groupyslstwokedValuesine, checkedValues, this.state.searchtext, 1, this.state.limit);
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.checcourse_groupyslstwokedValuesine, checkedValues, this.state.searchtext, 1, this.state.limit, this.state.myorders);
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
checkedValuesineinfo: checkedValues,
|
|
|
|
@ -2643,7 +2717,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
page: 1,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, checkedValues, this.state.searchtext, 1, this.state.limit);
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, checkedValues, this.state.searchtext, 1, this.state.limit, this.state.myorders);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -2676,7 +2750,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, value, 1, 20);
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, value, 1, 20, this.state.myorders);
|
|
|
|
|
// console.log(value)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2692,7 +2766,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, 20);
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, 20, this.state.myorders);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//排序
|
|
|
|
@ -2704,7 +2778,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
orders: "update_time",
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt("update_time", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
|
|
|
|
|
this.Startsortingt("update_time", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit, this.state.myorders);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (e === "work_score") {
|
|
|
|
@ -2714,7 +2788,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
orders: "work_score",
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt("work_score", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
|
|
|
|
|
this.Startsortingt("work_score", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit, this.state.myorders);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (e === "student_id") {
|
|
|
|
@ -2724,7 +2798,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
orders: "student_id",
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt("student_id", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
|
|
|
|
|
this.Startsortingt("student_id", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit, this.state.myorders);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2771,7 +2845,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.data.status == '0') {
|
|
|
|
|
this.setState({visible: false});
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit, this.state.myorders);
|
|
|
|
|
this.props.showNotification(`调分成功`);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -2958,7 +3032,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
page: 1,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt(this.state.orders, [], this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
|
|
|
|
|
this.Startsortingt(this.state.orders, [], this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.myorders);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
notlimitedst = () => {
|
|
|
|
@ -2969,7 +3043,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
course_groupysls: undefined,
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, [], this.state.searchtext, 1, this.state.limit);
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, [], this.state.searchtext, 1, this.state.limit, this.state.myorders);
|
|
|
|
|
}
|
|
|
|
|
//立即截止确定按钮
|
|
|
|
|
coursetaskend = () => {
|
|
|
|
@ -3050,8 +3124,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
page: pageNumber,
|
|
|
|
|
loadingstate: true,
|
|
|
|
|
})
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, pageNumber, this.state.limit);
|
|
|
|
|
|
|
|
|
|
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, pageNumber, this.state.limit, this.state.myorders);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setComputeTimet = () => {
|
|
|
|
@ -3454,23 +3527,24 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<div className="fr edu-menu-panel">
|
|
|
|
|
<ul>
|
|
|
|
|
<li className="edu-position edu-position-hidebox">
|
|
|
|
|
<a className="font-12">
|
|
|
|
|
{orders === "update_time" ? "时间" : orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序</a>
|
|
|
|
|
<i className="iconfont icon-xiajiantou ml5 font-12 "></i>
|
|
|
|
|
<ul className="edu-position-hide undis mt10">
|
|
|
|
|
<li><a onClick={(e) => this.funordert("update_time")} data-remote="true"
|
|
|
|
|
className=" font-12" style={{textAlign: "center"}}>更新时间</a></li>
|
|
|
|
|
<li><a onClick={(e) => this.funordert("work_score")} data-remote="true"
|
|
|
|
|
className=" font-12" style={{textAlign: "center"}}>当前成绩</a></li>
|
|
|
|
|
<li><a onClick={(e) => this.funordert("student_id")} data-remote="true"
|
|
|
|
|
className=" font-12" style={{textAlign: "center"}}>学生学号</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/*<div className="fr edu-menu-panel">*/}
|
|
|
|
|
{/* <ul>*/}
|
|
|
|
|
{/* <li className="edu-position edu-position-hidebox">*/}
|
|
|
|
|
{/* <a className="font-12">*/}
|
|
|
|
|
{/* {orders === "update_time" ? "时间" : orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序</a>*/}
|
|
|
|
|
{/* <i className="iconfont icon-xiajiantou ml5 font-12 "></i>*/}
|
|
|
|
|
{/* <ul className="edu-position-hide undis mt10">*/}
|
|
|
|
|
{/* <li><a onClick={(e) => this.funordert("update_time")} data-remote="true"*/}
|
|
|
|
|
{/* className=" font-12" style={{textAlign: "center"}}>更新时间</a></li>*/}
|
|
|
|
|
{/* <li><a onClick={(e) => this.funordert("work_score")} data-remote="true"*/}
|
|
|
|
|
{/* className=" font-12" style={{textAlign: "center"}}>当前成绩</a></li>*/}
|
|
|
|
|
{/* <li><a onClick={(e) => this.funordert("student_id")} data-remote="true"*/}
|
|
|
|
|
{/* className=" font-12" style={{textAlign: "center"}}>学生学号</a></li>*/}
|
|
|
|
|
{/* </ul>*/}
|
|
|
|
|
{/* </li>*/}
|
|
|
|
|
{/* </ul>*/}
|
|
|
|
|
{/*</div>*/}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
@ -3514,6 +3588,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
dataSource={datajs}
|
|
|
|
|
columns={columns}
|
|
|
|
|
pagination={false}
|
|
|
|
|
onChange={this.table1handleChange}
|
|
|
|
|
loading={loadingstate}
|
|
|
|
|
/>}
|
|
|
|
|
</div>
|
|
|
|
|