Browse Source

接口提示语修改

dev
deartibers 2 years ago
parent
commit
a33a147572
  1. 10
      web/client/src/sections/install/actions/roles.js
  2. 8
      web/client/src/sections/install/components/adminModal.jsx
  3. 23
      web/client/src/sections/install/components/memberModal.jsx
  4. 7
      web/client/src/sections/install/containers/roles.jsx

10
web/client/src/sections/install/actions/roles.js

@ -27,8 +27,10 @@ export function getOrganizationUser (query) {//获取成员列表
}
export function putOrganizationUser (data) {//更新成员状态
let pomsUserId = ''
let msg = ''
if (data) {
pomsUserId = data.pomsUserId
msg=data.msg
}
return (dispatch) =>
basicAction({
@ -37,12 +39,16 @@ export function putOrganizationUser (data) {//更新成员状态
data,
actionType: "PUT_ORGANIZATIONUSER",
url: `${ApiTable.putOrganizationUser.replace("{pomsUserId}", pomsUserId)}`,
msg: { option: "更新成员状态" }, //更新成员状态
msg: { option: msg }, //更新成员状态
reducer: {},
});
}
export function postOrganizationUser (data) {//添加/编辑成员
let msg = ''
if (data) {
msg=data.msg
}
return (dispatch) =>
basicAction({
type: "post",
@ -50,7 +56,7 @@ export function postOrganizationUser (data) {//添加/编辑成员
data,
actionType: "POST_ORGANIZATION_USER",
url: `${ApiTable.postOrganizationUser}`,
msg: { option: "添加/编辑成员" }, //添加/编辑成员
msg: { option: msg }, //添加/编辑成员
reducer: { name: "" },
});
}

8
web/client/src/sections/install/components/adminModal.jsx

@ -43,16 +43,16 @@ function adminModal (props) {
.then((values) => {
if (adminEdit) {
dispatch(install.deteleOrganizationAdmin(editObj.id)).then(
dispatch(install.postOrganizationUser({ role: ['admin'], pepUserId: values.pepUserId })).then((res) => {//(PEP)
if(res.success){
dispatch(install.postOrganizationUser({ role: ['admin'], pepUserId: values.pepUserId, msg: '修改管理员' })).then((res) => {//(PEP)
if (res.success) {
close();
}
})
)
}
else {
dispatch(install.postOrganizationUser({ role: ['admin'], pepUserId: values.pepUserId })).then((res) => {//(PEP)
if(res.success){
dispatch(install.postOrganizationUser({ role: ['admin'], pepUserId: values.pepUserId, msg: '新增管理员' })).then((res) => {//(PEP)
if (res.success) {
close();
}
})

23
web/client/src/sections/install/components/memberModal.jsx

@ -57,15 +57,24 @@ function memberModal (props) {
form.current
.validate()
.then((values) => {
let roleArr=JSON.parse(JSON.stringify(values.role))
let roleArr = JSON.parse(JSON.stringify(values.role))
if (roleArr.indexOf('admin') != -1) {
roleArr.splice(roleArr.indexOf('admin'),1)
roleArr.splice(roleArr.indexOf('admin'), 1)
}
if (memberEdit) {
dispatch(install.postOrganizationUser({ role: roleArr, pepUserId: values.pepUserId, msg: '修改成员' })).then((res) => {//(PEP)
if (res.success) {
close();
}
})
}
else{
dispatch(install.postOrganizationUser({ role: roleArr, pepUserId: values.pepUserId, msg: '新增成员' })).then((res) => {//(PEP)
if (res.success) {
close();
}
})
}
dispatch(install.postOrganizationUser({ role: roleArr, pepUserId: values.pepUserId })).then((res) => {//(PEP)
if(res.success){
close();
}
})
})
}
function handleCancel () {

7
web/client/src/sections/install/containers/roles.jsx

@ -211,7 +211,7 @@ const Roles = (props) => {
theme="borderless"
style={{ color: '#F31C1C' }}
onClick={() => {
dispatch(install.putOrganizationUser({ pomsUserId: row?.id, disabled: !row?.disabled })).then(() => getUserList())
dispatch(install.putOrganizationUser({ pomsUserId: row?.id, disabled: !row?.disabled,msg:'更新成员状态' })).then(() => getUserList())
}}
>
已禁用
@ -223,7 +223,7 @@ const Roles = (props) => {
showArrow={true}
position="topRight"
onConfirm={() => {
dispatch(install.putOrganizationUser({ pomsUserId: row?.id, disabled: !row?.disabled })).then(() => {
dispatch(install.putOrganizationUser({ pomsUserId: row?.id, disabled: !row?.disabled,msg:'更新成员状态' })).then(() => {
getUserList();
})
}}
@ -247,7 +247,7 @@ const Roles = (props) => {
showArrow={true}
position="topRight"
onConfirm={() => {
dispatch(install.putOrganizationUser({ pomsUserId: row?.id, deleted: true })).then(() => {
dispatch(install.putOrganizationUser({ pomsUserId: row?.id, deleted: true,msg:'删除成员' })).then(() => {
if (page.current > 0 && mylimits.current < 2) {
setQuery({ limit: 10, page: page.current - 1 })
} else {
@ -276,7 +276,6 @@ const Roles = (props) => {
dispatch(install.getOrganizationDeps()).then((res) => {//(PEP)
setPepList(res.payload.data)
})
getUserList()
}, [])
function getUserList () {
let searchData = { ...query, role: roleChoose }

Loading…
Cancel
Save