- {this.props.isAdmin()===true?
-
-
- {taskslistdata&&taskslistdata.work_count}
- 个检索结果({taskslistdata&&taskslistdata.work_count} 学生)
-
-
-
- :""}
{this.props.isStudent()===true?
diff --git a/public/react/src/modules/courses/poll/PollDetailTabFirst.js b/public/react/src/modules/courses/poll/PollDetailTabFirst.js
index ad7b957b1..032e9e3b6 100644
--- a/public/react/src/modules/courses/poll/PollDetailTabFirst.js
+++ b/public/react/src/modules/courses/poll/PollDetailTabFirst.js
@@ -49,7 +49,8 @@ class PollDetailTabFirst extends Component{
poll_types:undefined,
course_groups:undefined,
options_Class:[],
- poll_end_at:""
+ poll_end_at: "",
+ order_type: "desc"
}
}
// 搜索框搜索
@@ -59,12 +60,12 @@ class PollDetailTabFirst extends Component{
})
}
searchInfo=()=>{
- let{order,search,commit_status,poll_group_id,page}=this.state
- this.getTableList(order,search,commit_status,poll_group_id,page);
+ let {order, search, commit_status, poll_group_id, page, order_type} = this.state
+ this.getTableList(order, search, commit_status, poll_group_id, page, order_type);
}
// 获取接口数据
- getTableList=(order,search,commit_status,poll_group_id,page)=>{
+ getTableList = (order, search, commit_status, poll_group_id, page, order_type) => {
let pollId=this.props.match.params.pollId;
let courseid=this.props.match.params.coursesId;
let url=`/polls/${pollId}/poll_lists.json`;
@@ -76,7 +77,8 @@ class PollDetailTabFirst extends Component{
search:search,
commit_status:commit_status,
poll_group_id:poll_group_id,
- page:page
+ page: page,
+ order_type: order_type
}
}).then((result)=>{
if(result){
@@ -128,8 +130,8 @@ class PollDetailTabFirst extends Component{
}
componentDidMount(){
- let {order,search,commit_status,poll_group_id,page}=this.state;
- this.getTableList(order,search,commit_status,poll_group_id,page);
+ let {order, search, commit_status, poll_group_id, page, order_type} = this.state;
+ this.getTableList(order, search, commit_status, poll_group_id, page, order_type);
}
// 翻页
@@ -137,17 +139,17 @@ class PollDetailTabFirst extends Component{
this.setState({
page:pageNumber
})
- let {order,search,commit_status,poll_group_id}=this.state;
- this.getTableList(order,search,commit_status,poll_group_id,pageNumber);
+ let {order, search, commit_status, poll_group_id, order_type} = this.state;
+ this.getTableList(order, search, commit_status, poll_group_id, pageNumber, order_type);
}
//排序
- changeOrder=(order)=>{
+ changeOrder = (order, order_type) => {
this.setState({
order:order
})
let {search,commit_status,poll_group_id,page}=this.state;
- this.getTableList(order,search,commit_status,poll_group_id,page);
+ this.getTableList(order, search, commit_status, poll_group_id, page, order_type);
}
//选择分班情况
classOptionsChange = (values,all) => {
@@ -155,8 +157,8 @@ class PollDetailTabFirst extends Component{
this.setState({
poll_group_id:status
})
- let {order,search,commit_status,page}=this.state;
- this.getTableList(order,search,commit_status,status,page);
+ let {order, search, commit_status, page, order_type} = this.state;
+ this.getTableList(order, search, commit_status, status, page, order_type);
}
//选择提交状态
statusOptionChange=(values,all)=>{
@@ -164,10 +166,69 @@ class PollDetailTabFirst extends Component{
this.setState({
commit_status:status
})
- let {order,search,poll_group_id,page}=this.state;
- this.getTableList(order,search,status,poll_group_id,page);
- }
+ let {order, search, poll_group_id, page, order_type} = this.state;
+ this.getTableList(order, search, status, poll_group_id, page, order_type);
+ }
+ //问卷table 列表塞选数据
+ table1handleChange = (pagination, filters, sorter) => {
+ //"ascend" 升序
+ //"descend" 降序
+ if (JSON.stringify(sorter) === "{}") {
+ //没有选择
+ } else {
+
+ try {
+ //学生学号排序
+ if (sorter.columnKey === "StudentNo") {
+ if (sorter.order === "ascend") {
+ //升序
+ this.setState({
+ order_type: "asc",
+ order: "student_id",
+ loadingstate: true,
+ });
+ this.changeOrder("student_id", "asc");
+ } else if (sorter.order === "descend") {
+ //降序
+ this.setState({
+ order_type: "desc",
+ order: "student_id",
+ loadingstate: true,
+ })
+ this.changeOrder("student_id", "desc");
+ }
+ }
+ } catch (e) {
+
+ }
+
+ try {
+ //提交时间排序
+ if (sorter.columnKey === "time") {
+ if (sorter.order === "ascend") {
+ //升序
+ this.setState({
+ order_type: "asc",
+ order: "end_at",
+ loadingstate: true,
+ })
+ this.changeOrder("end_at", "asc");
+ } else if (sorter.order === "descend") {
+ //降序
+ this.setState({
+ order_type: "desc",
+ order: "end_at",
+ loadingstate: true,
+ })
+ this.changeOrder("end_at", "desc");
+ }
+ }
+ } catch (e) {
+
+ }
+ }
+ }
render(){
let {order,search,data,page,limit,course_groups,poll_types,options_Class,dataInfo,poll_end_at}=this.state;
const isAdmin =this.props.isAdmin();
@@ -197,6 +258,7 @@ class PollDetailTabFirst extends Component{
dataIndex: 'StudentNo',
key: 'StudentNo',
className:"edu-txt-center",
+ sorter: true,
render:(StudentNo,item,index)=>{
return(
item.StudentNo ? {item.StudentNo} : "--"
@@ -230,6 +292,7 @@ class PollDetailTabFirst extends Component{
key: 'time',
className:"edu-txt-center",
width:160,
+ sorter: true,
render:(time,item,index)=>{
return(
item.time == null ? -- : moment(item.time).format('YYYY-MM-DD HH:mm')
@@ -316,22 +379,23 @@ class PollDetailTabFirst extends Component{
:""
}
- {
- isAdmin &&
-
-
- {order=="end_at"?"提交时间":"学生学号"}
-
- - this.changeOrder("end_at")}>提交时间
- - this.changeOrder("student_id")}>学生学号
-
-
-
- }
+ {/*{*/}
+ {/* isAdmin && */}
+ {/*
*/}
+ {/*
*/}
+ {/* {order=="end_at"?"提交时间":"学生学号"}*/}
+ {/* */}
+ {/* - this.changeOrder("end_at")}>提交时间
*/}
+ {/* - this.changeOrder("student_id")}>学生学号
*/}
+ {/*
*/}
+ {/* */}
+ {/*
*/}
+ {/*}*/}
}
{
- data && data.length>0 ?
:
+ data && data.length > 0 ?
:
}
{
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
index 2bf9035b2..3b19630bc 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
@@ -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) => (
{record.stduynumber === undefined ?
@@ -1091,6 +1093,7 @@ class Listofworksstudentone extends Component {
key: 'finalscore',
align: 'center',
className: 'font-14',
+ sorter: true,
render: (text, record) => (
{
@@ -1204,6 +1207,7 @@ class Listofworksstudentone extends Component {
key: 'stduynumber',
align: "center",
className: 'font-14 maxnamewidth110',
+ sorter: true,
render: (text, record) => (
{record.stduynumber === undefined ?
@@ -1416,6 +1420,7 @@ class Listofworksstudentone extends Component {
key: 'finalscore',
align: 'center',
className: 'font-14',
+ sorter: true,
render: (text, record) => (
{
@@ -1530,6 +1535,7 @@ class Listofworksstudentone extends Component {
// }
//
// }
+
componentDidMount() {
// console.log("componentDidMount ");
// console.log("调用子组件 ");
@@ -1548,6 +1554,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 +2343,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 +2353,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 +2667,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 +2675,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 +2684,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 +2701,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 +2710,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 +2719,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 +2752,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,43 +2768,10 @@ 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);
- }
- }
- //排序
- funordert = (e) => {
- if (e === "update_time") {
- // 时间
- // 时间排序是从小到大
- this.setState({
- 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);
- }
-
- if (e === "work_score") {
- // 成绩
- //成绩排序是从大到小
- this.setState({
- 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);
- }
-
- if (e === "student_id") {
- //学号
- //学号排序是从大到小
- this.setState({
- 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(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, 20, this.state.myorders);
}
}
-
// 调分
// 查看学员实训信息
@@ -2771,7 +2814,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 +3001,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 +3012,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 +3093,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,24 +3496,6 @@ class Listofworksstudentone extends Component {
`
}
-
-
@@ -3514,6 +3538,7 @@ class Listofworksstudentone extends Component {
dataSource={datajs}
columns={columns}
pagination={false}
+ onChange={this.table1handleChange}
loading={loadingstate}
/>}
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js
index 1fdc4303a..d5f1dd7cd 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js
@@ -43,7 +43,7 @@ const qs = require('qs');
//课堂作业设置
-//作品列表(教师)
+//代码查重
class ShixunStudentWork extends Component {
constructor(props) {
super(props);
@@ -341,48 +341,15 @@ class ShixunStudentWork extends Component {
this.getcode_review_results(order,b_order,page,limit,group_infolist,search)
}
- funorder=(value)=>{
+ funorder = (value, myyslorder) => {
let {order,b_order,page,limit,group_infolist,search} = this.state;
- let newb_order;
- if(order===value){
- if(b_order==="desc"){
-
- this.setState({
- order:value,
- b_order:"asc"
- })
- newb_order="asc";
- }else{
-
- this.setState({
- order:value,
- b_order:"desc"
- })
- newb_order="desc";
- }
- }else{
- if(b_order==="desc"){
-
- this.setState({
- order:value,
- b_order:"desc"
- })
- newb_order="desc";
- }else{
-
- this.setState({
- order:value,
- b_order:"asc"
- })
- newb_order="asc";
- }
- }
-
this.setState({
loadingstate:true,
+ order: value,
+ b_order: myyslorder
})
- this.getcode_review_results(value,newb_order,page,limit,group_infolist,search)
+ this.getcode_review_results(value, myyslorder, page, limit, group_infolist, search)
}
groupgroup=(checkedValues)=>{
@@ -668,7 +635,56 @@ class ShixunStudentWork extends Component {
DownloadType:false,
DownloadMessageval:undefined
})
+ };
+
+
+ //代码查重tbale 列表塞选数据
+ table1handleChange = (pagination, filters, sorter) => {
+ //"ascend" 升序
+ //"descend" 降序
+ if (JSON.stringify(sorter) === "{}") {
+ //没有选择
+ } else {
+ // console.log(sorter);
+ try {
+ //学生学号排序
+ if (sorter.columnKey === "stduynumber") {
+ var myyslorder = "";
+ if (sorter.order === "ascend") {
+ //升序
+ myyslorder = "asc";
+ } else if (sorter.order === "descend") {
+ //降序
+ myyslorder = "desc";
+ }
+ this.funorder("student_id", myyslorder);
+ }
+ } catch (e) {
+
+ }
+
+ try {
+ //相似度排序
+ if (sorter.columnKey === "classroom") {
+ var myyslorder = "";
+ if (sorter.order === "ascend") {
+ //升序
+ myyslorder = "asc";
+ } else if (sorter.order === "descend") {
+ //降序
+ myyslorder = "desc";
+ }
+ this.funorder("code_rate", myyslorder);
+ }
+ } catch (e) {
+
+ }
+
+ }
+
}
+
+
render() {
let {
data,
@@ -708,6 +724,7 @@ class ShixunStudentWork extends Component {
title: '学号',
dataIndex: 'stduynumber',
key: 'stduynumber',
+ sorter: true,
render: (text, record) => (