删除组织提示

This commit is contained in:
chenjianxing 2020-06-08 13:22:46 +08:00
parent bd320ff002
commit f247cab1f1
4 changed files with 21 additions and 19 deletions

View File

@ -18,7 +18,7 @@
</el-table-column>
<el-table-column :label="$t('commons.operating')">
<template v-slot:default="scope">
<ms-table-operator @editClick="edit(scope.row)" @deleteClick="del(scope.row)"/>
<ms-table-operator @editClick="edit(scope.row)" @deleteClick="handleDelete(scope.row)"/>
</template>
</el-table-column>
</el-table>
@ -164,6 +164,8 @@
</template>
</el-dialog>
<ms-delete-confirm :title="$t('organization.delete')" @delete="_handleDelete" ref="deleteConfirm"/>
</div>
</template>
@ -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,15 +316,13 @@
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, () => {
handleDelete(organization) {
this.$refs.deleteConfirm.open(organization);
},
_handleDelete(organization) {
this.result = this.$get(this.deletePath + organization.id, () => {
let lastOrganizationId = getCurrentOrganizationId();
let sourceId = row.id;
let sourceId = organization.id;
if (lastOrganizationId === sourceId) {
let sign = DEFAULT;
refreshSessionAndCookies(sign, sourceId);
@ -328,9 +330,6 @@
this.$success(this.$t('commons.delete_success'));
this.initTableData();
});
}).catch(() => {
this.$info(this.$t('commons.delete_cancel'));
});
},
delMember(row) {
this.$confirm(this.$t('member.remove_member'), '', {

View File

@ -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',

View File

@ -116,6 +116,7 @@ export default {
organization: {
'create': '创建组织',
'modify': '修改组织',
'delete': '删除组织',
'delete_confirm': '删除组织会关联删除该组织下的资源,确定要删除吗?',
'input_name': '请输入组织名称',
'select_organization': '请选择组织',

View File

@ -116,6 +116,7 @@ export default {
organization: {
'create': '創建組織',
'modify': '修改組織',
'delete': '刪除組織',
'delete_confirm': '刪除組織會關聯刪除該組織下的資源,確定要刪除嗎?',
'input_name': '請輸入組織名稱',
'select_organization': '請選擇組織',