feature/2.15.1.2407.01-权限

This commit is contained in:
黎永顺 2024-09-26 17:59:14 +08:00
parent f1183af3e2
commit e09fbb332f
1 changed files with 5 additions and 3 deletions

View File

@ -31,7 +31,7 @@ class Index extends Component {
dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 },
loading: false, selectedRowKeys: [], addRoleDialog: { taxAgentId: "", visible: false },
roleSetDialog: { visible: false, roleId: "", name: "", selectedKey: "" },
logDialogVisible: false, filterConditions: "", showSearchAd: false
logDialogVisible: false, filterConditions: "", showSearchAd: false, syncLoading: false
};
}
@ -40,7 +40,9 @@ class Index extends Component {
}
syncAuth = () => {
this.setState({ syncLoading: true });
API.syncAuth().then(({ status, errormsg }) => {
this.setState({ syncLoading: false });
if (status) {
message.success(getLabel(111, "操作成功!"));
this.getRoleList();
@ -143,7 +145,7 @@ class Index extends Component {
render() {
const {
dataSource, columns, pageInfo, loading, selectedRowKeys, addRoleDialog, roleSetDialog,
logDialogVisible, filterConditions, showSearchAd
logDialogVisible, filterConditions, showSearchAd, syncLoading
} = this.state;
const { taxAgentStore: { PageAndOptAuth } } = this.props;
const admin = PageAndOptAuth.opts.includes("admin");
@ -155,7 +157,7 @@ class Index extends Component {
<Button type="primary" onClick={() => this.setState({
addRoleDialog: { taxAgentId: "", visible: true }
})}>{getLabel(111, "新建")}</Button>,
<Button type="ghost" onClick={this.syncAuth}>{getLabel(111, "同步")}</Button>,
<Button type="ghost" loading={syncLoading} onClick={this.syncAuth}>{getLabel(111, "同步")}</Button>,
<Button type="ghost" disabled={_.isEmpty(selectedRowKeys)}
onClick={() => this.deleteAuthRole(selectedRowKeys)}>{getLabel(111, "批量删除")}</Button>,
<AdvanceInputBtn onOpenAdvanceSearch={() => this.setState({ showSearchAd: true })}