mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 12:09:13 +08:00
成员管理 0.99
This commit is contained in:
parent
7773eda15a
commit
825d213221
@ -93,6 +93,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initTableData() {
|
initTableData() {
|
||||||
|
this.loading = true;
|
||||||
let param = {
|
let param = {
|
||||||
name: this.condition,
|
name: this.condition,
|
||||||
workspaceId: this.currentWorkspaceId
|
workspaceId: this.currentWorkspaceId
|
||||||
@ -106,7 +107,9 @@
|
|||||||
} else {
|
} else {
|
||||||
this.$message.error(response.message);
|
this.$message.error(response.message);
|
||||||
}
|
}
|
||||||
|
this.loading = false;
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
buildPagePath(path) {
|
buildPagePath(path) {
|
||||||
return path + "/" + this.currentPage + "/" + this.pageSize;
|
return path + "/" + this.currentPage + "/" + this.pageSize;
|
||||||
@ -126,14 +129,17 @@
|
|||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
this.loading = true;
|
||||||
this.$get('/user/member/delete/' + this.currentWorkspaceId + '/' + row.id).then(() => {
|
this.$get('/user/member/delete/' + this.currentWorkspaceId + '/' + row.id).then(() => {
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
|
this.loading = false;
|
||||||
});
|
});
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: '已取消删除'
|
message: '已取消删除'
|
||||||
@ -141,6 +147,7 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
|
this.loading = true;
|
||||||
this.$get('/user/list').then(response => {
|
this.$get('/user/list').then(response => {
|
||||||
if (response.data.success) {
|
if (response.data.success) {
|
||||||
this.createVisible = true;
|
this.createVisible = true;
|
||||||
@ -148,7 +155,9 @@
|
|||||||
} else {
|
} else {
|
||||||
this.$message.error(response.message);
|
this.$message.error(response.message);
|
||||||
}
|
}
|
||||||
|
this.loading = false;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: '获取用户列表失败'
|
message: '获取用户列表失败'
|
||||||
@ -156,14 +165,19 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
submitForm(formName) {
|
submitForm(formName) {
|
||||||
|
this.loading = true;
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let param = {
|
let param = {
|
||||||
userIds: this.form.userIds,
|
userIds: this.form.userIds,
|
||||||
workspaceId: this.currentWorkspaceId
|
workspaceId: this.currentWorkspaceId
|
||||||
};
|
};
|
||||||
this.$post("user/member/add", param, function () {
|
this.$post("user/member/add", param).then(() => {
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
|
this.createVisible = false;
|
||||||
|
this.loading = false;
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user