Merge branch 'dev_hjm_groupwork_leader_@' into dev_aliyun_beta

dev_aliyun_beta
hjm 5 years ago
commit b2cfdfde65

@ -430,7 +430,7 @@ class CommonWorkList extends Component{
}
_getRequestParams() {
const { search, arg_work_status, arg_teacher_comment, arg_course_group, order, page } = this.state
const { search, arg_work_status, arg_teacher_comment, arg_course_group, order, page, arg_member_work } = this.state
return {
page,
search,
@ -441,6 +441,7 @@ class CommonWorkList extends Component{
limit: PAGE_SIZE,
b_order: orderMap[order],
group_id:arg_course_group,
member_work: arg_member_work
}
}
fetchData = () => {
@ -488,6 +489,11 @@ class CommonWorkList extends Component{
this.fetchList()
})
}
memberWorkChange = (values, isAllChecked) => {
this.setState({arg_member_work: isAllChecked ? '' : values[0], page: 1}, () => {
this.fetchList()
})
}
funorder = (order) => {
this.setState({ order }, () => {
this.fetchList()
@ -581,10 +587,21 @@ class CommonWorkList extends Component{
return { label: `${item.name}(${item.count})`, value: item.id }
})
// 1:组长, 0:组员,“” 不限
const member_works = [{
name: '组长', id: 1
}, {
name: '组员', id: 0
}]
const options_member_work = member_works.map((item) => {
return { label: `${item.name}`, value: item.id }
})
const isAdmin = this.props.isAdmin()
const isStudent = this.props.isStudent()
const isAdminOrStudent = this.props.isAdminOrStudent()
const isGroup = this.props.isGroup();
// work_group
let StudentData;
@ -679,6 +696,7 @@ class CommonWorkList extends Component{
<CheckAllGroup options={options_teacher_comment} label={'你的评阅:'} onChange={this.teacherCommentOptionChange}></CheckAllGroup>
<CheckAllGroup options={options_status} label={'作品状态:'} onChange={this.statusOptionChange}></CheckAllGroup>
{options_course_group.length > 1 && <CheckAllGroup options={options_course_group} label={'分班情况:'} onChange={this.courseGroupOptionChange} checkboxGroupStyle={{width: '980px'}}></CheckAllGroup>}
{isGroup && <CheckAllGroup options={options_member_work} label={'组内角色:'} onChange={this.memberWorkChange}></CheckAllGroup>}
{/* value={search} */}

@ -1,12 +1,14 @@
import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Tooltip} from "antd";
import {Link} from 'react-router-dom';
import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor';
import { WordsBtn, getUploadActionUrl, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll } from 'educoder';
import axios from 'axios';
import Modals from '../../modals/Modals';
import _ from 'lodash'
import { WordsBtn, getUploadActionUrl, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll } from 'educoder';
import Modals from '../../modals/Modals';
import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor';
import LeaderIcon from './common/LeaderIcon'
const Search = Input.Search;
const CheckboxGroup = Checkbox.Group;
@ -753,6 +755,8 @@ render(){
text-overflow:ellipsis;
white-space:nowrap
}
.members .leaderIcon {
}
`}</style>
<div className={"members fl"}>
@ -764,11 +768,14 @@ render(){
display:item.user_name===undefined?"none":""
}}>
<Tooltip placement="bottom" title={item.user_nam}>
<div className={"fl ml5 fonthidden"} style={{width: '50px'}}>{item.user_name}</div>
<div className={"fl ml5 fonthidden"} style={{width: '68px'}}>{item.user_name}{item.is_leader && <LeaderIcon className="leaderIcon" small={true}></LeaderIcon>}</div>
</Tooltip>
<div className={"fl ml40 color-grey-9"}>{item.group_name}</div>
<div className={"fl ml40 color-grey-9"}>{item.student_id}</div>
{item.user_id != this.props.current_user.user_id ?<div className={"fr"}><i className={"iconfont icon-shanchudiao fl "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""}
{item.user_id != this.props.current_user.user_id ?
<div className={"fr"}><i className={"iconfont icon-shanchudiao fl "}
style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""}
</div>
)
})}

@ -2,8 +2,10 @@ import React,{Component} from "React";
export default function LeaderIcon(props = {}) {
let icon = null;
const { className, style } = props;
const _className = `font-8 blueFull Actionbtn ${className}`
if (props.small) {
icon = <div className="font-8 blueFull Actionbtn" style={{
icon = <div className={_className} style={{
height: '14px',
'line-height': '14px',
width: '24px',
@ -12,7 +14,7 @@ export default function LeaderIcon(props = {}) {
'margin-left': '2px',
'vertical-align': 'middle', }}>组长</div>
} else {
icon = <div className="font-8 blueFull Actionbtn" style={{ height: '16px', 'line-height': '16px', width: '30px'}}>组长</div>
icon = <div className={_className} style={{ height: '16px', 'line-height': '16px', width: '30px'}}>组长</div>
}
return icon

Loading…
Cancel
Save