{
+ this.$get('/user/group/source/' + row.id + "/" + this.group.id, res => {
let data = res.data;
- let userIds = [];
- userIds.push(row.id);
+ let userIds = [row.id];
let sourceIds = data.map(d => d.id);
this.$set(this.form, 'userIds', userIds);
this.$set(this.form, 'sourceIds', sourceIds);
@@ -222,7 +219,7 @@ export default {
})
},
removeMember(row) {
- this.$confirm(this.$t('member.remove_member'), '', {
+ this.$confirm(this.$t('member.remove_member').toString(), '', {
confirmButtonText: this.$t('commons.confirm'),
cancelButtonText: this.$t('commons.cancel'),
type: 'warning'
@@ -237,9 +234,7 @@ export default {
},
getGroupSource(row) {
this.groupSource = [];
- let userId = row.id;
- let groupId = this.group.id;
- this.source = this.$get('/user/group/source/' + userId + "/" + groupId, res => {
+ this.sourceResult = this.$get('/user/group/source/' + row.id + "/" + this.group.id, res => {
this.groupSource = res.data;
})
},
@@ -265,12 +260,10 @@ export default {
})
},
getResource() {
- let id = this.group.id;
- let type = this.group.type;
- this.memberResult = this.$get('/organization/list/resource/' + id + "/" + type, res => {
+ this.memberResult = this.$get('/organization/list/resource/' + this.group.id + "/" + this.group.type, res => {
let data = res.data;
if (data) {
- this._setResource(type, data);
+ this._setResource(this.group.type, data);
}
})
},
@@ -289,9 +282,9 @@ export default {
}
},
memberDialogClose() {
+ this.form = {};
this.memberVisible = false;
this.userSelectDisable = false;
- this.form = {};
}
}
}
@@ -301,6 +294,7 @@ export default {
.group-member >>> .el-dialog__header {
padding: 0;
}
+
.user-select-left {
float: left;
}
diff --git a/frontend/src/business/components/settings/system/group/UserGroup.vue b/frontend/src/business/components/settings/system/group/UserGroup.vue
index 95c537e4a7..fd77375317 100644
--- a/frontend/src/business/components/settings/system/group/UserGroup.vue
+++ b/frontend/src/business/components/settings/system/group/UserGroup.vue
@@ -2,7 +2,8 @@
-
@@ -111,8 +112,9 @@ export default {
this.result = this.$post("/user/group/get/" + this.currentPage + "/" + this.pageSize, this.condition, res => {
let data = res.data;
if (data) {
- this.total = data.itemCount;
- this.groups = data.listObject;
+ let {itemCount, listObject} = data;
+ this.total = itemCount;
+ this.groups = listObject;
}
});
},
@@ -122,7 +124,7 @@ export default {
edit(row) {
if (row.id === "admin") {
this.$warning(this.$t('group.admin_not_allow_edit'));
- return ;
+ return;
}
this.$refs.editUserGroup.open(row, 'edit', this.$t('group.edit'));
},
@@ -135,7 +137,7 @@ export default {
del(row) {
if (row.system) {
this.$warning(this.$t('group.admin_not_allow_delete'));
- return ;
+ return;
}
this.$refs.deleteConfirm.open(row);
},