in src/routes/System/Resource/index.js [336:437]
render() {
const { resource: { menuTree }, loading } = this.props;
const { selectedRowKeys, buttons, popup } = this.state;
const buttonColumns = [
{
align: "center",
title: getIntlContent("SHENYU.SYSTEM.BUTTON"),
dataIndex: "title",
key: "title",
ellipsis:true,
width: 100,
render: text => {
return getIntlContent(text) || text;
}
},
{
align: "center",
title: getIntlContent("SHENYU.SYSTEM.ICON"),
dataIndex: "icon",
key: "icon",
width: 60,
render: text => {
return <Icon type={text} /> || text;
}
},
{
align: "center",
title: getIntlContent("SHENYU.SYSTEM.RESOURCE.PERMS"),
dataIndex: "perms",
key: "perms",
ellipsis:true,
width: 140,
},
{
align: "center",
title: getIntlContent("SHENYU.SYSTEM.CREATETIME"),
dataIndex: "dateCreated",
key: "dateCreated",
ellipsis:true,
width: 140,
sorter: (a,b) => a.dateCreated > b.dateCreated ? 1 : -1,
},
{
align: "center",
title: getIntlContent("SHENYU.SYSTEM.UPDATETIME"),
dataIndex: "dateUpdated",
key: "dateUpdated",
ellipsis:true,
width: 140,
sorter: (a,b) => a.dateUpdated > b.dateUpdated ? 1 : -1,
},
{
align: "center",
title: getIntlContent("SHENYU.COMMON.OPERAT"),
dataIndex: "operate",
key: "operate",
ellipsis:true,
width: 60,
render: (text, record) => {
return (
<AuthButton perms="system:resource:editButton">
<div
className="edit"
onClick={() => {
this.editClick(record);
}}
>
{getIntlContent("SHENYU.SYSTEM.EDITOR")}
</div>
</AuthButton>
);
}
}
];
const rowSelection = {
selectedRowKeys,
onChange: this.onSelectChange
};
return (
<div className="plug-content-wrap">
<Row gutter={20}>
<Col span={6} style={{minWidth:280}}>
<div className="table-header">
<h3>{getIntlContent("SHENYU.SYSTEM.RESOURCE.MENULIST.TITLE")}</h3>
<div className={styles.headerSearch}>
<AuthButton perms="system:resource:list">
<Search
className={styles.search}
style={{ width: "130px" }}
placeholder={getIntlContent(
"SHENYU.SYSTEM.RESOURCE.MENU.INPUT.NAME"
)}
enterButton={getIntlContent("SHENYU.SYSTEM.SEARCH")}
size="default"
onSearch={this.searchMenu}
/>
</AuthButton>
</div>
<AuthButton perms="system:resource:addMenu">
<Button type="primary" onClick={() => this.addClick(1)}>