From f1183af3e2f9f3b531dd2068f2212f2aa88ae60c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 26 Sep 2024 17:56:41 +0800
Subject: [PATCH 1/2] =?UTF-8?q?feature/2.15.1.2407.01-=E6=9D=83=E9=99=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/apis/taxAgent.js | 4 ++++
pc4mobx/hrmSalary/pages/roleManagement/index.js | 16 +++++++++++++---
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/pc4mobx/hrmSalary/apis/taxAgent.js b/pc4mobx/hrmSalary/apis/taxAgent.js
index 4b3647ab..20997a2b 100644
--- a/pc4mobx/hrmSalary/apis/taxAgent.js
+++ b/pc4mobx/hrmSalary/apis/taxAgent.js
@@ -100,6 +100,10 @@ export const hasIconInTax = (params) => {
};
/**权限-角色相关*/
+//同步业务线
+export const syncAuth = (params) => {
+ return postFetch("/api/bs/hrmsalary/auth/sync", params);
+};
//角色列表
export const getRoleList = (params) => {
return postFetch("/api/bs/hrmsalary/auth/role/list", params);
diff --git a/pc4mobx/hrmSalary/pages/roleManagement/index.js b/pc4mobx/hrmSalary/pages/roleManagement/index.js
index f379e1de..453c7229 100644
--- a/pc4mobx/hrmSalary/pages/roleManagement/index.js
+++ b/pc4mobx/hrmSalary/pages/roleManagement/index.js
@@ -39,6 +39,16 @@ class Index extends Component {
this.getRoleList();
}
+ syncAuth = () => {
+ API.syncAuth().then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(111, "操作成功!"));
+ this.getRoleList();
+ } else {
+ message.error(errormsg);
+ }
+ });
+ };
getRoleList = () => {
const { taxAgentStore: { advanceForm } } = this.props, { pageInfo } = this.state;
const paylaod = {
@@ -141,10 +151,11 @@ class Index extends Component {
key: "log", icon: ,
content: getLabel(545781, "操作日志")
}];
- const buttons = [
+ let buttons = [
,
+ ,
,
this.setState({ showSearchAd: true })}
@@ -167,8 +178,7 @@ class Index extends Component {
const rowSelection = {
selectedRowKeys, onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
};
- !admin && buttons.shift();
- !admin && buttons.shift();
+ !admin && (buttons = buttons.slice(-1));
return (
} iconBgcolor="#F14A2D"
buttons={buttons} className="rolemanagement-index" showDropIcon dropMenuDatas={dropMenuDatas}
From e09fbb332f94c5cc126b8f24c3f7602bf82e0b35 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 26 Sep 2024 17:59:14 +0800
Subject: [PATCH 2/2] =?UTF-8?q?feature/2.15.1.2407.01-=E6=9D=83=E9=99=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/pages/roleManagement/index.js | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/roleManagement/index.js b/pc4mobx/hrmSalary/pages/roleManagement/index.js
index 453c7229..89f47949 100644
--- a/pc4mobx/hrmSalary/pages/roleManagement/index.js
+++ b/pc4mobx/hrmSalary/pages/roleManagement/index.js
@@ -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 {
,
- ,
+ ,
,
this.setState({ showSearchAd: true })}