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()) }} >