fix(用户组和权限): 用户组待选列表查询问题
This commit is contained in:
parent
adcb705b06
commit
c800f4d836
|
@ -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);
|
||||
});
|
||||
// 编辑时填充角色信息
|
||||
|
|
|
@ -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);
|
||||
})
|
||||
},
|
||||
|
|
|
@ -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);
|
||||
})
|
||||
// 编辑使填充角色信息
|
||||
|
|
|
@ -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: ""
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue