From 57c8150a5d365a90a581e1f080b047090af68878 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Mon, 25 May 2020 19:13:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=84=E7=BB=87=E6=88=90?= =?UTF-8?q?=E5=91=98=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/components/MsTableOperator.vue | 11 +++++++- .../settings/system/Organization.vue | 26 +++++++++++++++---- .../settings/system/SystemWorkspace.vue | 21 +++++++++++---- frontend/src/i18n/en-US.js | 4 +++ frontend/src/i18n/zh-CN.js | 4 +++ 5 files changed, 55 insertions(+), 11 deletions(-) diff --git a/frontend/src/business/components/common/components/MsTableOperator.vue b/frontend/src/business/components/common/components/MsTableOperator.vue index 7c871f30b8..ac95e046d2 100644 --- a/frontend/src/business/components/common/components/MsTableOperator.vue +++ b/frontend/src/business/components/common/components/MsTableOperator.vue @@ -5,6 +5,9 @@ + @@ -26,7 +29,13 @@ }, deleteClickStop() { this.$emit('deleteClickStop'); - } + }, + /* removeClick(){ + this.$emit('removeClick'); + }, + removeClickStop(){ + this.$emit('removeClickStop') + }*/ } } diff --git a/frontend/src/business/components/settings/system/Organization.vue b/frontend/src/business/components/settings/system/Organization.vue index 0a9ee0a582..4b7c9aeace 100644 --- a/frontend/src/business/components/settings/system/Organization.vue +++ b/frontend/src/business/components/settings/system/Organization.vue @@ -42,7 +42,14 @@ @@ -173,13 +180,22 @@ import MsTableHeader from "../../common/components/MsTableHeader"; import MsRolesTag from "../../common/components/MsRolesTag"; import MsTableOperator from "../../common/components/MsTableOperator"; + import MsTableOperatorButton from "../../common/components/MsTableOperatorButton"; import MsDialogFooter from "../../common/components/MsDialogFooter"; import {getCurrentOrganizationId, getCurrentUser, refreshSessionAndCookies} from "../../../../common/js/utils"; import {DEFAULT, ORGANIZATION} from "../../../../common/js/constants"; export default { name: "MsOrganization", - components: {MsCreateBox, MsTablePagination, MsTableHeader, MsRolesTag, MsTableOperator, MsDialogFooter}, + components: { + MsCreateBox, + MsTablePagination, + MsTableHeader, + MsRolesTag, + MsTableOperator, + MsDialogFooter, + MsTableOperatorButton + }, data() { return { queryPath: '/organization/list', @@ -324,7 +340,7 @@ }); }, delMember(row) { - this.$confirm(this.$t('member.delete_confirm'), '', { + this.$confirm(this.$t('member.remove_member'), '', { confirmButtonText: this.$t('commons.confirm'), cancelButtonText: this.$t('commons.cancel'), type: 'warning' @@ -337,11 +353,11 @@ let sign = ORGANIZATION; refreshSessionAndCookies(sign, sourceId); } - this.$success(this.$t('commons.delete_success')) + this.$success(this.$t('commons.remove_success')) this.cellClick(this.currentRow); }); }).catch(() => { - this.$info(this.$t('commons.delete_cancel')); + this.$info(this.$t('commons.remove_cancel')); }); }, createOrganization(createOrganizationForm) { diff --git a/frontend/src/business/components/settings/system/SystemWorkspace.vue b/frontend/src/business/components/settings/system/SystemWorkspace.vue index e0cd212b72..4299ad1aba 100644 --- a/frontend/src/business/components/settings/system/SystemWorkspace.vue +++ b/frontend/src/business/components/settings/system/SystemWorkspace.vue @@ -100,7 +100,9 @@ @@ -194,13 +196,22 @@ import MsTableHeader from "../../common/components/MsTableHeader"; import MsRolesTag from "../../common/components/MsRolesTag"; import MsTableOperator from "../../common/components/MsTableOperator"; + import MsTableOperatorButton from "../../common/components/MsTableOperatorButton"; import MsDialogFooter from "../../common/components/MsDialogFooter"; import {getCurrentUser, getCurrentWorkspaceId, refreshSessionAndCookies} from "../../../../common/js/utils"; import {DEFAULT, WORKSPACE} from "../../../../common/js/constants"; export default { name: "MsSystemWorkspace", - components: {MsCreateBox, MsTablePagination, MsTableHeader, MsRolesTag, MsTableOperator, MsDialogFooter}, + components: { + MsCreateBox, + MsTablePagination, + MsTableHeader, + MsRolesTag, + MsTableOperator, + MsDialogFooter, + MsTableOperatorButton + }, activated() { this.list(); }, @@ -376,7 +387,7 @@ this.$set(this.memberForm, 'roleIds', roleIds); }, delMember(row) { - this.$confirm(this.$t('member.delete_confirm'), '', { + this.$confirm(this.$t('member.remove_member'), '', { confirmButtonText: this.$t('commons.confirm'), cancelButtonText: this.$t('commons.cancel'), type: 'warning' @@ -389,11 +400,11 @@ let sign = WORKSPACE; refreshSessionAndCookies(sign, sourceId); } - this.$success(this.$t('commons.delete_success')); + this.$success(this.$t('commons.remove_success')); this.cellClick(this.currentWorkspaceRow); }); }).catch(() => { - this.$info(this.$t('commons.delete_cancel')); + this.$info(this.$t('commons.remove_cancel')); }); }, updateWorkspaceMember() { diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 2acd9b6790..452983ad7a 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -88,6 +88,9 @@ export default { 'weeks_5': 'Fri', 'weeks_6': 'Sat', 'test_unit': 'tests', + 'remove': 'Remove', + 'remove_cancel': 'Remove Failed', + 'remove_success': 'Remove Success' }, workspace: { 'create': 'Create Workspace', @@ -143,6 +146,7 @@ export default { 'password_format_is_incorrect': 'Password format is incorrect (At least 8-16 characters, at least 1 uppercase letter, 1 lowercase letter and 1 number)', 'old_password': 'Old Password', 'new_password': 'New Password', + 'remove_member': 'Are you sure you want to remove this member' }, user: { 'create': 'Create', diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 9380409342..981619b165 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -87,6 +87,9 @@ export default { 'host_cannot_be_empty': '主机不能为空', 'port_cannot_be_empty': '端口号不能为空', 'account_cannot_be_empty': '帐户不能为空', + 'remove': '移除', + 'remove_cancel': '移除失败', + 'remove_success': '移除成功' }, workspace: { 'create': '创建工作空间', @@ -141,6 +144,7 @@ export default { 'password_format_is_incorrect': '密码格式不正确(至少8-16个字符,至少1个大写字母,1个小写字母和1个数字)', 'old_password': '旧密码', 'new_password': '新密码', + 'remove_member': '确定要移除该成员吗' }, user: { 'create': '创建用户',