From 03787d12c8b2d92f56a6016dbfda42d06d9d49ea Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Thu, 4 Jun 2020 15:27:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=88=90=E5=91=98=E6=97=B6?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E9=A1=B9=E4=B8=BA=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/OrganizationMember.vue | 18 +++++++++++------- .../organization/OrganizationWorkspace.vue | 18 +++++++++++------- .../settings/system/Organization.vue | 16 ++++++++++------ .../settings/system/SystemWorkspace.vue | 16 ++++++++++------ .../settings/workspace/WorkspaceMember.vue | 16 ++++++++++------ 5 files changed, 52 insertions(+), 32 deletions(-) diff --git a/frontend/src/business/components/settings/organization/OrganizationMember.vue b/frontend/src/business/components/settings/organization/OrganizationMember.vue index 90477b4f43..e2578064d7 100644 --- a/frontend/src/business/components/settings/organization/OrganizationMember.vue +++ b/frontend/src/business/components/settings/organization/OrganizationMember.vue @@ -78,7 +78,7 @@ - + { - this.$success(this.$t('commons.modify_success')); - this.updateVisible = false; - this.initTableData(); - }); + this.$refs[formName].validate((valid) => { + if (valid) { + this.result = this.$post("/organization/member/update", param, () => { + this.$success(this.$t('commons.modify_success')); + this.updateVisible = false; + this.initTableData(); + }); + } + }) }, del(row) { this.$confirm(this.$t('member.remove_member'), '', { diff --git a/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue b/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue index db46c97168..fab60134bc 100644 --- a/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue +++ b/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue @@ -125,7 +125,7 @@ - + { - this.$success(this.$t('commons.modify_success')); - this.dialogWsMemberUpdateVisible = false; - this.cellClick(this.currentWorkspaceRow); - }); + this.$refs[formName].validate((valid) => { + if (valid) { + this.result = this.$post("/workspace/member/update", param, () => { + this.$success(this.$t('commons.modify_success')); + this.dialogWsMemberUpdateVisible = false; + this.cellClick(this.currentWorkspaceRow); + }); + } + }) }, buildPagePath(path) { return path + "/" + this.dialogCurrentPage + "/" + this.dialogPageSize; diff --git a/frontend/src/business/components/settings/system/Organization.vue b/frontend/src/business/components/settings/system/Organization.vue index c64a579a1e..9e9a8dbd83 100644 --- a/frontend/src/business/components/settings/system/Organization.vue +++ b/frontend/src/business/components/settings/system/Organization.vue @@ -145,7 +145,7 @@ - + { - this.$success(this.$t('commons.modify_success')); - this.dialogOrgMemberUpdateVisible = false; - this.cellClick(this.currentRow); + this.$refs[formName].validate((valid) => { + if (valid) { + this.result = this.$post("/organization/member/update", param, () => { + this.$success(this.$t('commons.modify_success')); + this.dialogOrgMemberUpdateVisible = false; + this.cellClick(this.currentRow); + }); + } }); }, } diff --git a/frontend/src/business/components/settings/system/SystemWorkspace.vue b/frontend/src/business/components/settings/system/SystemWorkspace.vue index dfb8091e9f..8c8c6a4fbf 100644 --- a/frontend/src/business/components/settings/system/SystemWorkspace.vue +++ b/frontend/src/business/components/settings/system/SystemWorkspace.vue @@ -164,7 +164,7 @@ - + { - this.$success(this.$t('commons.modify_success')); - this.dialogWsMemberUpdateVisible = false; - this.cellClick(this.currentWorkspaceRow); + this.$refs[formName].validate((valid) => { + if (valid) { + this.result = this.$post("/workspace/member/update", param, () => { + this.$success(this.$t('commons.modify_success')); + this.dialogWsMemberUpdateVisible = false; + this.cellClick(this.currentWorkspaceRow); + }); + } }); }, }, diff --git a/frontend/src/business/components/settings/workspace/WorkspaceMember.vue b/frontend/src/business/components/settings/workspace/WorkspaceMember.vue index e332d6becb..f767a6361e 100644 --- a/frontend/src/business/components/settings/workspace/WorkspaceMember.vue +++ b/frontend/src/business/components/settings/workspace/WorkspaceMember.vue @@ -79,7 +79,7 @@ - + { - this.$success(this.$t('commons.modify_success')); - this.updateVisible = false; - this.initTableData(); + this.$refs[formName].validate((valid) => { + if (valid) { + this.result = this.$post("/workspace/member/update", param, () => { + this.$success(this.$t('commons.modify_success')); + this.updateVisible = false; + this.initTableData(); + }); + } }); }, create() {