fix(项目设置): 用户组添加成员时显示了所有项目

This commit is contained in:
shiziyuan9527 2022-05-12 13:44:49 +08:00 committed by shiziyuan9527
parent 878404c1c5
commit 261ab1f6c0
1 changed files with 17 additions and 1 deletions

View File

@ -100,6 +100,7 @@ import MsTablePagination from "@/business/components/common/pagination/TablePagi
import {GROUP_PROJECT, GROUP_SYSTEM, GROUP_WORKSPACE} from "@/common/js/constants";
import MsTableOperator from "@/business/components/common/components/MsTableOperator";
import UserOptionItem from "@/business/components/settings/common/UserOptionItem";
import {getCurrentProjectID} from "@/common/js/utils";
export default {
name: "GroupMember",
@ -125,6 +126,10 @@ export default {
groupSource: [],
sourceData: [],
users: [],
currentProject: {
id: "",
name: ""
},
form: {},
title: '',
submitType: '',
@ -163,6 +168,9 @@ export default {
this.memberData = listObject;
}
})
this.$get("/project/get/" + getCurrentProjectID(), res => {
this.currentProject = res.data;
});
},
open(group, initUserGroupUrl, initUserUrl) {
this.initUserGroupUrl = initUserGroupUrl ? initUserGroupUrl : "/user/group/user/";
@ -274,7 +282,15 @@ export default {
this.sourceData = data.workspaces;
break;
case GROUP_PROJECT:
this.sourceData = data.projects;
if (this.initUserUrl === 'user/ws/current/member/list') {
if (!this.currentProject.id) {
this.currentProject.id = sessionStorage.getItem("project_id");
this.currentProject.name = sessionStorage.getItem("project_name");
}
this.sourceData = [this.currentProject];
} else {
this.sourceData = data.projects;
}
break;
default:
}