|
|
|
@ -60,6 +60,7 @@ class Listofworks extends Component {
|
|
|
|
|
this.state = {
|
|
|
|
|
props: props,
|
|
|
|
|
data: [],
|
|
|
|
|
b_order: "desc",
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
loadingstate: true,
|
|
|
|
@ -385,8 +386,8 @@ class Listofworks extends Component {
|
|
|
|
|
// course_group:分班情况 [232, 231], []:不限(空数组)
|
|
|
|
|
var data = {
|
|
|
|
|
search: "",
|
|
|
|
|
order: "desc",
|
|
|
|
|
b_order: "asc",
|
|
|
|
|
order: "update_time",
|
|
|
|
|
b_order: "desc",
|
|
|
|
|
work_status: "",
|
|
|
|
|
course_group: "",
|
|
|
|
|
page:1,
|
|
|
|
@ -427,19 +428,26 @@ class Listofworks extends Component {
|
|
|
|
|
//order 排序时间
|
|
|
|
|
//debug=t 是老师的意思
|
|
|
|
|
// console.log(ordervlue)7009
|
|
|
|
|
let{b_order,order}=this.state;
|
|
|
|
|
var homeworkid = this.props.match.params.homeworkid;
|
|
|
|
|
let urll = `/homework_commons/${homeworkid}/works_list.json?`;
|
|
|
|
|
var order = "asc";
|
|
|
|
|
if (ordervlue === "updated_at") {
|
|
|
|
|
order = "desc";
|
|
|
|
|
var b_orders
|
|
|
|
|
// = "asc";
|
|
|
|
|
// if (ordervlue === "updated_at") {
|
|
|
|
|
// b_orders = "desc";
|
|
|
|
|
// }
|
|
|
|
|
if(b_order==="asc"){
|
|
|
|
|
b_orders = "desc";
|
|
|
|
|
}else{
|
|
|
|
|
b_orders = "asc";
|
|
|
|
|
}
|
|
|
|
|
var checkedValuesines = checkedValuesine;
|
|
|
|
|
var checkedValuesineinfos = checkedValuesineinfo;
|
|
|
|
|
var searchtexts = searchtext
|
|
|
|
|
var data = {
|
|
|
|
|
search: searchtexts,
|
|
|
|
|
order: ordervlue,
|
|
|
|
|
b_order: order,
|
|
|
|
|
order: order,
|
|
|
|
|
b_order: b_orders,
|
|
|
|
|
work_status: checkedValuesines,
|
|
|
|
|
course_group: checkedValuesineinfos,
|
|
|
|
|
page: page,
|
|
|
|
@ -1274,14 +1282,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") {
|
|
|
|
@ -1738,8 +1746,8 @@ class Listofworks extends Component {
|
|
|
|
|
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
|
|
|
|
|
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
|
|
|
|
|
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
|
|
|
|
|
<li><a href={`/api/student_works/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/export_shixun_work_report.pdf`} calssName="color-dark">实训报告</a></li>
|
|
|
|
|
<li><a href={`/api/homework_commons/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/works_list.xlsx`} calssName="color-dark">学生成绩</a></li>
|
|
|
|
|
<li><a href={`/api/student_works/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/export_shixun_work_report.pdf`} className="color-dark">实训报告</a></li>
|
|
|
|
|
<li><a href={`/api/homework_commons/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/works_list.xlsx`} className="color-dark">学生成绩</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>:""}
|
|
|
|
|
{this.props.isAdmin() ?
|
|
|
|
@ -1840,10 +1848,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>
|
|
|
|
|