diff --git a/frontend/src/business/components/settings/system/Organization.vue b/frontend/src/business/components/settings/system/Organization.vue index 9e9a8dbd83..951a5e9de3 100644 --- a/frontend/src/business/components/settings/system/Organization.vue +++ b/frontend/src/business/components/settings/system/Organization.vue @@ -18,7 +18,7 @@ @@ -164,6 +164,8 @@ + + @@ -177,10 +179,12 @@ import MsDialogFooter from "../../common/components/MsDialogFooter"; import {getCurrentOrganizationId, getCurrentUser, refreshSessionAndCookies} from "../../../../common/js/utils"; import {DEFAULT, ORGANIZATION} from "../../../../common/js/constants"; + import MsDeleteConfirm from "../../common/components/MsDeleteConfirm"; export default { name: "MsOrganization", components: { + MsDeleteConfirm, MsCreateBox, MsTablePagination, MsTableHeader, @@ -312,24 +316,19 @@ this.dialogTotal = data.itemCount; }); }, - del(row) { - this.$confirm(this.$t('organization.delete_confirm'), '', { - confirmButtonText: this.$t('commons.confirm'), - cancelButtonText: this.$t('commons.cancel'), - type: 'warning' - }).then(() => { - this.result = this.$get(this.deletePath + row.id, () => { - let lastOrganizationId = getCurrentOrganizationId(); - let sourceId = row.id; - if (lastOrganizationId === sourceId) { - let sign = DEFAULT; - refreshSessionAndCookies(sign, sourceId); - } - this.$success(this.$t('commons.delete_success')); - this.initTableData(); - }); - }).catch(() => { - this.$info(this.$t('commons.delete_cancel')); + handleDelete(organization) { + this.$refs.deleteConfirm.open(organization); + }, + _handleDelete(organization) { + this.result = this.$get(this.deletePath + organization.id, () => { + let lastOrganizationId = getCurrentOrganizationId(); + let sourceId = organization.id; + if (lastOrganizationId === sourceId) { + let sign = DEFAULT; + refreshSessionAndCookies(sign, sourceId); + } + this.$success(this.$t('commons.delete_success')); + this.initTableData(); }); }, delMember(row) { diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index c306085553..b6ffcbd4ae 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -117,6 +117,7 @@ export default { organization: { 'create': 'Create Organization', 'modify': 'Modify', + 'delete': 'Delete Organization', 'delete_confirm': 'Are you sure you want to delete this workspace?', 'input_name': 'Please enter a organization name', 'select_organization': 'Please select organization', diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 37092a6a43..165c1021c3 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -116,6 +116,7 @@ export default { organization: { 'create': '创建组织', 'modify': '修改组织', + 'delete': '删除组织', 'delete_confirm': '删除组织会关联删除该组织下的资源,确定要删除吗?', 'input_name': '请输入组织名称', 'select_organization': '请选择组织', diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index be9ed94923..c74ae9a377 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -116,6 +116,7 @@ export default { organization: { 'create': '創建組織', 'modify': '修改組織', + 'delete': '刪除組織', 'delete_confirm': '刪除組織會關聯刪除該組織下的資源,確定要刪除嗎?', 'input_name': '請輸入組織名稱', 'select_organization': '請選擇組織',