fix(系统设置): 工作空间页面批量添加至项目展示的角色有误
--bug=1044952 --user=宋昌昌 【系统设置】批量添加到项目可以看到所有项目角色 https://www.tapd.cn/55049933/s/1566661
This commit is contained in:
parent
655bc5c7da
commit
18f47640c3
|
@ -83,7 +83,7 @@ export default {
|
|||
label: 'name',
|
||||
lazyLoad(node, resolve) {
|
||||
const {level, value} = node;
|
||||
if (self.cascaderLevel === 1) {
|
||||
if (self.cascaderLevel === 1 || self.cascaderLevel === 3) {
|
||||
if (level === 0) {
|
||||
self.getProject(getCurrentWorkspaceId(), resolve);
|
||||
} else {
|
||||
|
@ -186,6 +186,14 @@ export default {
|
|||
}).then(res => {
|
||||
this.projectUserGroups = res.data ? res.data : [];
|
||||
})
|
||||
} else if (this.cascaderLevel === 3) {
|
||||
// 过滤项目级别全局用户组 || 当前工作空间下的项目级别用户组
|
||||
this.loading = getAllUserGroupByType({
|
||||
type: GROUP_PROJECT,
|
||||
resourceId: getCurrentWorkspaceId()
|
||||
}).then(res => {
|
||||
this.projectUserGroups = res.data ? res.data.filter(group => group.scopeId === 'global' || group.scopeId === getCurrentWorkspaceId()) : [];
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
<user-cascader :lable="batchAddLable" :title="batchAddTitle" @confirm="cascaderConfirm"
|
||||
ref="cascaderDialog"></user-cascader>
|
||||
<batch-to-project-group-cascader :title="$t('user.add_project_batch')" @confirm="cascaderConfirm"
|
||||
:cascader-level="1" ref="cascaderDialog"/>
|
||||
:cascader-level="3" ref="cascaderDialog"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -96,14 +96,25 @@ import {listenGoBack, removeGoBackListener} from "metersphere-frontend/src/utils
|
|||
import {getCurrentProjectID, getCurrentUser, getCurrentWorkspaceId} from "metersphere-frontend/src/utils/token";
|
||||
import {hasPermission} from "metersphere-frontend/src/utils/permission";
|
||||
import MsTableHeaderSelectPopover from "metersphere-frontend/src/components/table/MsTableHeaderSelectPopover";
|
||||
import {_handleSelect, _handleSelectAll, getSelectDataCounts, setUnSelectIds, toggleAllSelection} from "metersphere-frontend/src/utils/tableUtils";
|
||||
import {
|
||||
_handleSelect,
|
||||
_handleSelectAll,
|
||||
getSelectDataCounts,
|
||||
setUnSelectIds,
|
||||
toggleAllSelection
|
||||
} from "metersphere-frontend/src/utils/tableUtils";
|
||||
import UserCascader from "../../system/components/UserCascader";
|
||||
import ShowMoreBtn from "metersphere-frontend/src/components/table/ShowMoreBtn";
|
||||
import {GROUP_WORKSPACE} from "metersphere-frontend/src/utils/constants";
|
||||
import AddMember from "../../common/AddMember";
|
||||
import BatchToProjectGroupCascader from "../../system/components/BatchToProjectGroupCascader";
|
||||
import GroupCascader from "../../system/components/GroupCascader";
|
||||
import {addWorkspaceMember, specialBatchProcessUser, delWorkspaceMemberById, getWorkspaceMemberPages} from "../../../api/user";
|
||||
import {
|
||||
addWorkspaceMember,
|
||||
delWorkspaceMemberById,
|
||||
getWorkspaceMemberPages,
|
||||
specialBatchProcessUser
|
||||
} from "../../../api/user";
|
||||
import {getUserGroupList, getWorkspaceMemberGroup} from "../../../api/user-group";
|
||||
import {updateWorkspaceMember as _updateWorkspaceMember} from "@/api/workspace";
|
||||
|
||||
|
|
Loading…
Reference in New Issue