From 8a82fc82bc024bf9be8304ab2da0df4eb905e8a6 Mon Sep 17 00:00:00 2001 From: deartibers <947466799@qq.com> Date: Thu, 15 Sep 2022 20:07:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=8F=90=E7=A4=BA=E8=AF=AD?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/client/src/sections/install/actions/roles.js | 12 +++++++++--- .../src/sections/install/components/adminModal.jsx | 2 +- web/client/src/sections/install/containers/roles.jsx | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/web/client/src/sections/install/actions/roles.js b/web/client/src/sections/install/actions/roles.js index 3ff9be4..6081910 100644 --- a/web/client/src/sections/install/actions/roles.js +++ b/web/client/src/sections/install/actions/roles.js @@ -60,14 +60,20 @@ export function postOrganizationUser (data) {//添加/编辑成员 reducer: { name: "" }, }); } -export function deteleOrganizationAdmin(orgId) { +export function deteleOrganizationAdmin(data) { + let pomsUserId = '' + let msg = '' + if (data) { + pomsUserId = data.id + msg=data.msg + } return (dispatch) => basicAction({ type: "del", dispatch: dispatch, actionType: "DEL_ORGANIZATION_ADMIN", - url: `${ApiTable.deteleOrganizationAdmin.replace("{pomsUserId}", orgId)}`, - msg: { option: "删除管理员" }, //删除管理员 + url: `${ApiTable.deteleOrganizationAdmin.replace("{pomsUserId}", pomsUserId)}`, + msg: { option: msg }, //删除管理员 reducer: {}, }); } \ No newline at end of file diff --git a/web/client/src/sections/install/components/adminModal.jsx b/web/client/src/sections/install/components/adminModal.jsx index a6a8729..6a03bf5 100644 --- a/web/client/src/sections/install/components/adminModal.jsx +++ b/web/client/src/sections/install/components/adminModal.jsx @@ -42,7 +42,7 @@ function adminModal (props) { .validate() .then((values) => { if (adminEdit) { - dispatch(install.deteleOrganizationAdmin(editObj.id)).then( + dispatch(install.deteleOrganizationAdmin({id:editObj.id,msg:''})).then( dispatch(install.postOrganizationUser({ role: ['admin'], pepUserId: values.pepUserId, msg: '修改管理员' })).then((res) => {//获取项企(PEP)全部部门及其下用户 if (res.success) { close(); diff --git a/web/client/src/sections/install/containers/roles.jsx b/web/client/src/sections/install/containers/roles.jsx index 070b1f2..81fdcbc 100644 --- a/web/client/src/sections/install/containers/roles.jsx +++ b/web/client/src/sections/install/containers/roles.jsx @@ -400,7 +400,7 @@ const Roles = (props) => { showArrow={true} position="topRight" onConfirm={() => { - dispatch(install.deteleOrganizationAdmin(item?.id)).then(() => getUserList()) + dispatch(install.deteleOrganizationAdmin({id:item.id,msg:'删除管理员'})).then(() => getUserList()) }} >