diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js index 3a7e25fcd..1ca35d630 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js @@ -15,7 +15,7 @@ import WorkDetailPageHeader from './common/WorkDetailPageHeader' import CommonWorkAppraiseReply from './reply/CommonWorkAppraiseReply' import Example from './TestHooks' import CommonWorkAppraiseReviseAttachments from './CommonWorkAppraiseReviseAttachments' - +import LeaderIcon from './common/LeaderIcon' const { Option} = Select; const CheckboxGroup = Checkbox.Group; const confirm = Modal.confirm; @@ -88,6 +88,14 @@ class CommonWorkAppraise extends Component{ console.log(error) }) } + componentDidUpdate(prevProps, prevState) { + if (this.props.match.params.studentWorkId != prevProps.match.params.studentWorkId) { + this.getWork(); + this.getReviseAttachments() + this.commonWorkAppraiseReply && this.commonWorkAppraiseReply.fetchAllComments() + } + } + componentDidMount() { this.getWork(); this.getReviseAttachments() @@ -156,12 +164,13 @@ class CommonWorkAppraise extends Component{ attachments, homework_id, project_info, work_members, is_evaluation, description, update_user_name, update_time, commit_time, author_name, revise_attachments, revise_reason, atta_update_user, atta_update_time, atta_update_user_login, - Modalstype,Modalstopval,ModalCancel,ModalSave,loadtype + Modalstype,Modalstopval,ModalCancel,ModalSave,loadtype, is_leader_work } =this.state; let courseId=this.props.match.params.coursesId; let category_id=this.props.match.params.category_id; let studentWorkId=this.props.match.params.studentWorkId; + const isAdmin = this.props.isAdmin() return(
- 其他组员 + 全部组员
-
- {work_members.map((item, index) => { - return item.user_name + ' ' - })} +
+
+ 当前组员:{author_name} {is_leader_work && } +
+
+ 其他组员: + {work_members.map((item, index) => { + return + isAdmin ? + this.props.toWorkDetailPage(this.props.match.params, null, item.work_id)} + > + {item.user_name} + : {item.user_name} + {item.is_leader && } + + })} +
+
} @@ -266,6 +290,7 @@ class CommonWorkAppraise extends Component{ {/* task_type={datalist&&datalist.task_type} */} {this.commonWorkAppraiseReply = ref}} > diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 528aa1d9e..28e54fff3 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -15,7 +15,7 @@ import WorkDetailPageHeader from './common/WorkDetailPageHeader' import PublishRightnow from './PublishRightnow' import ModulationModal from "../coursesPublic/ModulationModal"; import AccessoryModal from "../coursesPublic/AccessoryModal"; - +import LeaderIcon from './common/LeaderIcon' const { Option} = Select; const CheckboxGroup = Checkbox.Group; const confirm = Modal.confirm; @@ -97,7 +97,12 @@ function buildColumns(that, student_works, studentData) { }} title={text && text.length > 5 ? text : ''}> {/* */} - {text} + {record.is_leader ? +
+
{text}
+ +
+ : {text}} ), }] diff --git a/public/react/src/modules/courses/busyWork/common/LeaderIcon.js b/public/react/src/modules/courses/busyWork/common/LeaderIcon.js new file mode 100644 index 000000000..526e165c5 --- /dev/null +++ b/public/react/src/modules/courses/busyWork/common/LeaderIcon.js @@ -0,0 +1,19 @@ +import React,{Component} from "React"; + +export default function LeaderIcon(props = {}) { + let icon = null; + if (props.small) { + icon =
组长
+ } else { + icon =
组长
+ + } + return icon +} \ No newline at end of file diff --git a/public/react/src/modules/page/layers/ImageLayerOfCommentHOC.js b/public/react/src/modules/page/layers/ImageLayerOfCommentHOC.js index 50072c627..d19aa03ec 100644 --- a/public/react/src/modules/page/layers/ImageLayerOfCommentHOC.js +++ b/public/react/src/modules/page/layers/ImageLayerOfCommentHOC.js @@ -37,6 +37,8 @@ export function ImageLayerOfCommentHOC(options = {}) { } // jQuery._data( $('.newMain')[0], "events" ) componentDidMount() { + this.props.wrappedComponentRef && this.props.wrappedComponentRef(this.refs['wrappedComponentRef']) + // commentsDelegateParent #game_left_contents #tab_con_4 setTimeout(() => { $(options.parentSelector || ".commentsDelegateParent") @@ -60,7 +62,7 @@ export function ImageLayerOfCommentHOC(options = {}) { - + )