From f4193a6edfb9b197073f491a39edff692d381da2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Fri, 21 Jun 2019 17:22:41 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../tasks/GraduationTaskssettinglist.js | 141 ++++++++++++------
.../modules/courses/graduation/tasks/index.js | 2 +-
2 files changed, 96 insertions(+), 47 deletions(-)
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js
index 517629479..c4275c902 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js
@@ -92,7 +92,7 @@ class GraduationTaskssettinglist extends Component{
if (worklists.length != 0) {
for (var i = 0; i < worklists.length; i++) {
-
+debugger
datalist.push({
name: worklists[i].name,
number: (parseInt(page)-1)*parseInt(limit)+(i+1),
@@ -101,7 +101,7 @@ class GraduationTaskssettinglist extends Component{
grouping: result.data.have_grouping === true ? worklists[i].grouping_name : null,
submitstate: worklists[i].status === 0 ? "未提交" : worklists[i].status === 1 ? "按时提交" : worklists[i].status === 2 ? "延时提交" : "",
turnovertime:worklists[i].update_time,
- associationitems: worklists[i].project_info === undefined ?"--": worklists[i].project_info.name ,
+ associationitems: {name:worklists[i].project_info === undefined ?"--": worklists[i].project_info.name,id:worklists[i].project_info.id},
teacherrating: worklists[i].teacher_comment_score,
crossrating: worklists[i].cross_comment_score,
finalscore: worklists[i].final_score.work_score === null ? "--" : worklists[i].final_score.work_score,
@@ -611,7 +611,7 @@ class GraduationTaskssettinglist extends Component{
course_groups
} =this.state;
- let columns;
+ let columns;
// console.log("taskslistdata.course_group_count");
// console.log(taskslistdata);
@@ -662,9 +662,11 @@ class GraduationTaskssettinglist extends Component{
key: 'associationitems',
render: (text, record) => (
-
- {record.associationitems}
-
+
),
},{
title: '提交状态',
@@ -694,9 +696,11 @@ class GraduationTaskssettinglist extends Component{
dataIndex: 'teacherrating',
render: (text, record) => (
-
- 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.teacherrating==="--"||record.crossrating==="未批阅"?0:record.teacherrating)}
-
+
+
+ 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)}
+
+
),
}, {
title: '交叉评分',
@@ -705,8 +709,10 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => (
- 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.crossrating==="--"||record.crossrating==="未批阅"?0:record.crossrating)}
-
+
+ 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)}
+
+
),
}, {
title: '最终成绩',
@@ -715,8 +721,10 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => (
- 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{parseInt(record.finalscore==="--"?0:record.finalscore)}
-
+
+ 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)}
+
+
),
}, {
title: '操作',
@@ -794,9 +802,11 @@ class GraduationTaskssettinglist extends Component{
key: 'associationitems',
render: (text, record) => (
-
- {record.associationitems}
-
+
),
},{
title: '提交状态',
@@ -827,8 +837,10 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => (
- 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.teacherrating==="--"||record.crossrating==="未批阅"?0:record.teacherrating)}
-
+
+ 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)}
+
+
),
}, {
title: '交叉评分',
@@ -837,8 +849,10 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => (
- 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.crossrating==="--"||record.crossrating==="未批阅"?0:record.crossrating)}
-
+
+ 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)}
+
+
),
}, {
title: '最终成绩',
@@ -847,8 +861,10 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => (
- 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{parseInt(record.finalscore==="--"?0:record.finalscore)}
-
+
+ 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)}
+
+
),
}, {
title: '操作',
@@ -944,9 +960,12 @@ class GraduationTaskssettinglist extends Component{
key: 'associationitems',
render: (text, record) => (
-
- {record.associationitems}
-
+
),
},{
title: '提交状态',
@@ -977,8 +996,10 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => (
- 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.teacherrating==="--"||record.crossrating==="未批阅"?0:record.teacherrating)}
-
+
+ 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)}
+
+
),
}, {
title: '交叉评分',
@@ -987,8 +1008,10 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => (
- 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.crossrating==="--"||record.crossrating==="未批阅"?0:record.crossrating)}
-
+
+ 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)}
+
+
),
}, {
title: '最终成绩',
@@ -997,8 +1020,10 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => (
- 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{parseInt(record.finalscore==="--"?0:record.finalscore)}
-
+
+ 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)}
+
+
),
}, {
title: '操作',
@@ -1078,9 +1103,13 @@ class GraduationTaskssettinglist extends Component{
key: 'associationitems',
render: (text, record) => (
-
- {record.associationitems}
-
+
),
},{
title: '提交状态',
@@ -1111,8 +1140,10 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => (
- 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.teacherrating==="--"||record.crossrating==="未批阅"?0:record.teacherrating)}
-
+
+ 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)}
+
+
),
}, {
title: '交叉评分',
@@ -1121,8 +1152,10 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => (
- 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.crossrating==="--"||record.crossrating==="未批阅"?0:record.crossrating)}
-
+
+ 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)}
+
+
),
}, {
title: '最终成绩',
@@ -1131,8 +1164,10 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => (
- 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{parseInt(record.finalscore==="--"?0:record.finalscore)}
-
+
+ 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)}
+
+
),
}, {
title: '操作',
@@ -1190,6 +1225,19 @@ class GraduationTaskssettinglist extends Component{
+
+
{/*提示*/}
-
{taskslistdata&&taskslistdata.work_count}个检索结果({taskslistdata&&taskslistdata.work_count} 学生)
-
:""}
diff --git a/public/react/src/modules/courses/graduation/tasks/index.js b/public/react/src/modules/courses/graduation/tasks/index.js
index d28b8f697..99784c453 100644
--- a/public/react/src/modules/courses/graduation/tasks/index.js
+++ b/public/react/src/modules/courses/graduation/tasks/index.js
@@ -6,7 +6,7 @@ import Titlesearchsection from '../../common/titleSearch/TitleSearchSection';
import HomeworkModal from "../../coursesPublic/HomeworkModal";
import { WordsBtn } from 'educoder';
import axios from 'axios';
-import _ from 'lodash'
+import moment from 'moment';
import GraduateTaskItem from './GraduateTaskItem';
import TaskPublishModal from "./TaskPublishModal";
import Modals from '../../../modals/Modals';