dev_hjm_a
hjm 5 years ago
parent 31d5e0ccc2
commit e67b8e3404

@ -8,15 +8,21 @@ class WordsBtn extends Component {
}
render() {
let{to, href,targets}=this.props
let{to, href,targets, style2 }=this.props
return(
<React.Fragment>
{
to==undefined&&targets==undefined ?
<a href={href || "javascript:void(0)"} onClick={this.props.onClick} className={"btn "+`${map[this.props.style]} ${this.props.className}`}>{this.props.children}</a>:
targets!=undefined? <a href={to} target="_blank" className={"btn "+`${map[this.props.style]} ${this.props.className}`}>{this.props.children}</a>
<a href={href || "javascript:void(0)"} onClick={this.props.onClick} className={"btn "+`${map[this.props.style]} ${this.props.className}`}
style={style2}
>{this.props.children}</a>:
targets!=undefined? <a href={to} target="_blank" className={"btn "+`${map[this.props.style]} ${this.props.className}`}
style={style2}
>{this.props.children}</a>
:
<Link to={to} className={"btn "+`${map[this.props.style]} ${this.props.className}`}>{this.props.children}</Link>
<Link to={to} className={"btn "+`${map[this.props.style]} ${this.props.className}`}
style={style2}
>{this.props.children}</Link>
}
</React.Fragment>
)

@ -117,7 +117,7 @@ function buildColumns(that) {
const hasGraduationModule = that.hasGraduationModule()
if (hasGraduationModule && showSorter) {
columns.push({
title: '答辩组',
title: '所在答辩组',
// width: 90,
sorter: showSorter,
sortDirections: sortDirections,
@ -141,6 +141,9 @@ function buildColumns(that) {
width: 150,
align:'center',
render: (text, record) => {
const isAdmin = record.role == ROLE_ADMIN
const isTeacher = record.role == ROLE_TEACHER
const isAssitant = record.role == ROLE_TEACHER_ASSISTANT
if (record.application_id) {
return (
<span>
@ -151,19 +154,19 @@ function buildColumns(that) {
} else {
return (
<React.Fragment>
<WordsBtn>删除</WordsBtn>
<WordsBtn style2={{ marginRight: '12px' }} onClick={() => that.onDelete(record)} style={'grey'}>删除</WordsBtn>
<Popconfirm
placement="right"
placement="bottom"
icon={null}
title={
<React.Fragment>
<Checkbox >管理员</Checkbox>
<Checkbox >助教</Checkbox>
<Checkbox disable={isAdmin}>管理员</Checkbox>
<Checkbox disable={isAdmin}>助教</Checkbox>
<Checkbox >学生</Checkbox>
</React.Fragment>
}
>
<WordsBtn>修改角色</WordsBtn>
<WordsBtn style={'blue'}>修改角色</WordsBtn>
</Popconfirm>
</React.Fragment>

Loading…
Cancel
Save