diff --git a/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue b/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue index df0ce8e3aa..d697538ec6 100644 --- a/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue +++ b/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue @@ -200,6 +200,7 @@ import MsTableOperator from "../../common/components/MsTableOperator"; import MsTableOperatorButton from "../../common/components/MsTableOperatorButton"; import MsDialogFooter from "../../common/components/MsDialogFooter"; import { + getCurrentOrganizationId, getCurrentUser, getCurrentWorkspaceId, listenGoBack, @@ -348,7 +349,7 @@ export default { this.result = this.$get('/user/list/', response => { this.userList = response.data; }); - this.result = this.$post('/user/group/list', {type: GROUP_WORKSPACE, resourceId: this.wsId}, response => { + this.result = this.$post('/user/group/list', {type: GROUP_WORKSPACE, resourceId: getCurrentOrganizationId()}, response => { this.$set(this.memberForm, "groups", response.data); }); listenGoBack(this.close); @@ -433,7 +434,7 @@ export default { this.dialogWsMemberUpdateVisible = true; this.memberForm = Object.assign({}, row); let groupIds = this.memberForm.groups.map(r => r.id); - this.result = this.$post('/user/group/list', {type: GROUP_WORKSPACE, resourceId: this.wsId}, response => { + this.result = this.$post('/user/group/list', {type: GROUP_WORKSPACE, resourceId: getCurrentOrganizationId()}, response => { this.$set(this.memberForm, "allgroups", response.data); }); // 编辑时填充角色信息 diff --git a/frontend/src/business/components/settings/project/EditMember.vue b/frontend/src/business/components/settings/project/EditMember.vue index 5afad4f747..fa486e75e5 100644 --- a/frontend/src/business/components/settings/project/EditMember.vue +++ b/frontend/src/business/components/settings/project/EditMember.vue @@ -43,7 +43,7 @@ <script> import {GROUP_PROJECT} from "@/common/js/constants"; -import {getCurrentProjectID} from "@/common/js/utils"; +import {getCurrentOrganizationId, getCurrentProjectID} from "@/common/js/utils"; export default { name: "EditMember", @@ -100,7 +100,7 @@ export default { this.dialogVisible = true; this.userList = response.data; }) - this.result = this.$post('/user/group/list', {type: GROUP_PROJECT, resourceId: this.projectId}, response => { + this.result = this.$post('/user/group/list', {type: GROUP_PROJECT, resourceId: getCurrentOrganizationId()}, response => { this.$set(this.form, "groups", response.data); }) }, diff --git a/frontend/src/business/components/settings/project/Member.vue b/frontend/src/business/components/settings/project/Member.vue index 8a8080a134..4cb8378c93 100644 --- a/frontend/src/business/components/settings/project/Member.vue +++ b/frontend/src/business/components/settings/project/Member.vue @@ -84,7 +84,7 @@ import MsTableHeaderSelectPopover from "@/business/components/common/components/ import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn"; import EditMember from "@/business/components/settings/project/EditMember"; import {GROUP_PROJECT, GROUP_WORKSPACE} from "@/common/js/constants"; -import {getCurrentProjectID} from "@/common/js/utils"; +import {getCurrentOrganizationId, getCurrentProjectID} from "@/common/js/utils"; export default { name: "Member", @@ -143,7 +143,7 @@ export default { this.updateVisible = true; this.form = Object.assign({}, row); let groupIds = this.form.groups.map(r => r.id); - this.result = this.$post('/user/group/list', {type: GROUP_PROJECT, resourceId: this.projectId}, response => { + this.result = this.$post('/user/group/list', {type: GROUP_PROJECT, resourceId: getCurrentOrganizationId()}, response => { this.$set(this.form, "allgroups", response.data); }) // 编辑使填充角色信息 diff --git a/frontend/src/business/components/settings/system/SystemWorkspace.vue b/frontend/src/business/components/settings/system/SystemWorkspace.vue index 1c9f63180d..70cb49aadc 100644 --- a/frontend/src/business/components/settings/system/SystemWorkspace.vue +++ b/frontend/src/business/components/settings/system/SystemWorkspace.vue @@ -285,7 +285,7 @@ export default { this.$set(this.memberForm, "userList", response.data); this.$set(this.memberForm, "copyUserList", response.data); }); - this.result = this.$post('/user/group/list', {type: GROUP_WORKSPACE, resourceId: this.wsId}, response => { + this.result = this.$post('/user/group/list', {type: GROUP_WORKSPACE, resourceId: this.orgId}, response => { this.$set(this.memberForm, "groups", response.data); }); @@ -299,7 +299,7 @@ export default { name: '', workspaceId: row.id }; - this.wsId = row.id; + this.orgId = row.organizationId; let path = "/user/special/ws/member/list"; this.result = this.$post(path + "/" + this.dialogCurrentPage + "/" + this.dialogPageSize, param, res => { let data = res.data; @@ -416,7 +416,7 @@ export default { this.memberForm = Object.assign({}, row); // console.log(this.memberForm) let groupIds = this.memberForm.groups.map(r => r.id); - this.result = this.$post('/user/group/list', {type: GROUP_WORKSPACE, resourceId: this.wsId}, response => { + this.result = this.$post('/user/group/list', {type: GROUP_WORKSPACE, resourceId: this.orgId}, response => { this.$set(this.memberForm, "allgroups", response.data); }); // console.log(this.memberForm) @@ -547,7 +547,7 @@ export default { ] }, currentWorkspaceRow: {}, - wsId: "" + orgId: "" }; } }; diff --git a/frontend/src/business/components/settings/workspace/MsProject.vue b/frontend/src/business/components/settings/workspace/MsProject.vue index f1d290cf1f..4162d5d61f 100644 --- a/frontend/src/business/components/settings/workspace/MsProject.vue +++ b/frontend/src/business/components/settings/workspace/MsProject.vue @@ -262,6 +262,7 @@ import MsTableHeader from "../../common/components/MsTableHeader"; import MsTableOperator from "../../common/components/MsTableOperator"; import MsDialogFooter from "../../common/components/MsDialogFooter"; import { + getCurrentOrganizationId, getCurrentProjectID, getCurrentUser, getCurrentWorkspaceId, @@ -565,7 +566,7 @@ export default { this.updateVisible = true; this.form = Object.assign({}, row); let groupIds = this.form.groups.map(r => r.id); - this.result = this.$post('/user/group/list', {type: GROUP_PROJECT, resourceId: this.projectId}, response => { + this.result = this.$post('/user/group/list', {type: GROUP_PROJECT, resourceId: getCurrentOrganizationId()}, response => { this.$set(this.form, "allgroups", response.data); }); // 编辑使填充角色信息 @@ -643,7 +644,7 @@ export default { }); this.result = this.$post('/user/group/list', { type: GROUP_PROJECT, - resourceId: this.currentProjectId + resourceId: getCurrentOrganizationId() }, response => { this.$set(this.memberForm, "groups", response.data); }); diff --git a/frontend/src/business/components/settings/workspace/WorkspaceMember.vue b/frontend/src/business/components/settings/workspace/WorkspaceMember.vue index 898c91a2f3..84e4aeeaf9 100644 --- a/frontend/src/business/components/settings/workspace/WorkspaceMember.vue +++ b/frontend/src/business/components/settings/workspace/WorkspaceMember.vue @@ -271,7 +271,7 @@ this.updateVisible = true; this.form = Object.assign({}, row); let groupIds = this.form.groups.map(r => r.id); - this.result = this.$post('/user/group/list', {type: GROUP_WORKSPACE, resourceId: this.currentUser().lastWorkspaceId}, response => { + this.result = this.$post('/user/group/list', {type: GROUP_WORKSPACE, resourceId: getCurrentOrganizationId()}, response => { this.$set(this.form, "allgroups", response.data); }) // 编辑使填充角色信息 @@ -316,7 +316,7 @@ this.createVisible = true; this.userList = response.data; }) - this.result = this.$post('/user/group/list', {type: GROUP_WORKSPACE, resourceId: this.currentUser().lastWorkspaceId}, response => { + this.result = this.$post('/user/group/list', {type: GROUP_WORKSPACE, resourceId: getCurrentOrganizationId()}, response => { this.$set(this.form, "groups", response.data); }) listenGoBack(this.handleClose);