删除工作空间提示
This commit is contained in:
parent
ad2f41f07a
commit
bd320ff002
|
@ -181,21 +181,6 @@
|
||||||
this.list();
|
this.list();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
del(row) {
|
|
||||||
this.getRelatedResource(row.id).then(tip => {
|
|
||||||
this.$confirm(tip + this.$t('project.delete_confirm'), this.$t('commons.prompt'), {
|
|
||||||
confirmButtonText: this.$t('commons.confirm'),
|
|
||||||
cancelButtonText: this.$t('commons.cancel'),
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.$get('/project/delete/' + row.id, () => {
|
|
||||||
Message.success(this.$t('commons.delete_success'));
|
|
||||||
this.list();
|
|
||||||
});
|
|
||||||
}).catch(() => {
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
search() {
|
search() {
|
||||||
this.list();
|
this.list();
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column>
|
<el-table-column>
|
||||||
<template v-slot:default="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -144,6 +144,8 @@
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<ms-delete-confirm :title="$t('workspace.delete')" @delete="_handleDelete" ref="deleteConfirm"/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -158,10 +160,12 @@
|
||||||
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
||||||
import MsDialogFooter from "../../common/components/MsDialogFooter";
|
import MsDialogFooter from "../../common/components/MsDialogFooter";
|
||||||
import {getCurrentUser, getCurrentWorkspaceId, refreshSessionAndCookies} from "../../../../common/js/utils";
|
import {getCurrentUser, getCurrentWorkspaceId, refreshSessionAndCookies} from "../../../../common/js/utils";
|
||||||
|
import MsDeleteConfirm from "../../common/components/MsDeleteConfirm";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsOrganizationWorkspace",
|
name: "MsOrganizationWorkspace",
|
||||||
components: {
|
components: {
|
||||||
|
MsDeleteConfirm,
|
||||||
MsCreateBox,
|
MsCreateBox,
|
||||||
MsTablePagination,
|
MsTablePagination,
|
||||||
MsTableHeader,
|
MsTableHeader,
|
||||||
|
@ -204,24 +208,19 @@
|
||||||
this.dialogWsAddVisible = true;
|
this.dialogWsAddVisible = true;
|
||||||
this.form = Object.assign({}, row);
|
this.form = Object.assign({}, row);
|
||||||
},
|
},
|
||||||
del(row) {
|
handleDelete(workspace) {
|
||||||
this.$confirm(this.$t('workspace.delete_confirm'), '', {
|
this.$refs.deleteConfirm.open(workspace);
|
||||||
confirmButtonText: this.$t('commons.confirm'),
|
},
|
||||||
cancelButtonText: this.$t('commons.cancel'),
|
_handleDelete(workspace) {
|
||||||
type: 'warning'
|
this.$get('/workspace/delete/' + workspace.id, () => {
|
||||||
}).then(() => {
|
let lastWorkspaceId = getCurrentWorkspaceId();
|
||||||
this.$get('/workspace/delete/' + row.id, () => {
|
let sourceId = workspace.id;
|
||||||
let lastWorkspaceId = getCurrentWorkspaceId();
|
if (lastWorkspaceId === sourceId) {
|
||||||
let sourceId = row.id;
|
let sign = DEFAULT;
|
||||||
if (lastWorkspaceId === sourceId) {
|
refreshSessionAndCookies(sign, sourceId);
|
||||||
let sign = DEFAULT;
|
}
|
||||||
refreshSessionAndCookies(sign, sourceId);
|
this.$success(this.$t('commons.delete_success'));
|
||||||
}
|
this.list();
|
||||||
this.$success(this.$t('commons.delete_success'));
|
|
||||||
this.list();
|
|
||||||
});
|
|
||||||
}).catch(() => {
|
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
list() {
|
list() {
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column>
|
<el-table-column>
|
||||||
<template v-slot:default="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -184,6 +184,8 @@
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<ms-delete-confirm :title="$t('workspace.delete')" @delete="_handleDelete" ref="deleteConfirm"/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -198,10 +200,12 @@
|
||||||
import MsDialogFooter from "../../common/components/MsDialogFooter";
|
import MsDialogFooter from "../../common/components/MsDialogFooter";
|
||||||
import {getCurrentUser, getCurrentWorkspaceId, refreshSessionAndCookies} from "../../../../common/js/utils";
|
import {getCurrentUser, getCurrentWorkspaceId, refreshSessionAndCookies} from "../../../../common/js/utils";
|
||||||
import {DEFAULT, WORKSPACE} from "../../../../common/js/constants";
|
import {DEFAULT, WORKSPACE} from "../../../../common/js/constants";
|
||||||
|
import MsDeleteConfirm from "../../common/components/MsDeleteConfirm";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsSystemWorkspace",
|
name: "MsSystemWorkspace",
|
||||||
components: {
|
components: {
|
||||||
|
MsDeleteConfirm,
|
||||||
MsCreateBox,
|
MsCreateBox,
|
||||||
MsTablePagination,
|
MsTablePagination,
|
||||||
MsTableHeader,
|
MsTableHeader,
|
||||||
|
@ -311,26 +315,6 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
del(row) {
|
|
||||||
this.$confirm(this.$t('workspace.delete_confirm'), this.$t('commons.prompt'), {
|
|
||||||
confirmButtonText: this.$t('commons.confirm'),
|
|
||||||
cancelButtonText: this.$t('commons.cancel'),
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.$get('/workspace/special/delete/' + row.id, () => {
|
|
||||||
let lastWorkspaceId = getCurrentWorkspaceId();
|
|
||||||
let sourceId = row.id;
|
|
||||||
if (lastWorkspaceId === sourceId) {
|
|
||||||
let sign = DEFAULT;
|
|
||||||
refreshSessionAndCookies(sign, sourceId);
|
|
||||||
}
|
|
||||||
Message.success(this.$t('commons.delete_success'));
|
|
||||||
this.list();
|
|
||||||
});
|
|
||||||
}).catch(() => {
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.memberForm = {};
|
this.memberForm = {};
|
||||||
},
|
},
|
||||||
|
@ -384,6 +368,21 @@
|
||||||
// 编辑时填充角色信息
|
// 编辑时填充角色信息
|
||||||
this.$set(this.memberForm, 'roleIds', roleIds);
|
this.$set(this.memberForm, 'roleIds', roleIds);
|
||||||
},
|
},
|
||||||
|
handleDelete(workspace) {
|
||||||
|
this.$refs.deleteConfirm.open(workspace);
|
||||||
|
},
|
||||||
|
_handleDelete(workspace) {
|
||||||
|
this.$get('/workspace/special/delete/' + workspace.id, () => {
|
||||||
|
let lastWorkspaceId = getCurrentWorkspaceId();
|
||||||
|
let sourceId = workspace.id;
|
||||||
|
if (lastWorkspaceId === sourceId) {
|
||||||
|
let sign = DEFAULT;
|
||||||
|
refreshSessionAndCookies(sign, sourceId);
|
||||||
|
}
|
||||||
|
Message.success(this.$t('commons.delete_success'));
|
||||||
|
this.list();
|
||||||
|
});
|
||||||
|
},
|
||||||
delMember(row) {
|
delMember(row) {
|
||||||
this.$confirm(this.$t('member.remove_member'), '', {
|
this.$confirm(this.$t('member.remove_member'), '', {
|
||||||
confirmButtonText: this.$t('commons.confirm'),
|
confirmButtonText: this.$t('commons.confirm'),
|
||||||
|
|
|
@ -102,6 +102,7 @@ export default {
|
||||||
workspace: {
|
workspace: {
|
||||||
'create': 'Create Workspace',
|
'create': 'Create Workspace',
|
||||||
'update': 'Update Workspace',
|
'update': 'Update Workspace',
|
||||||
|
'delete': 'Delete Workspace',
|
||||||
'delete_confirm': 'Are you sure you want to delete this workspace?',
|
'delete_confirm': 'Are you sure you want to delete this workspace?',
|
||||||
'add': 'Add Workspace',
|
'add': 'Add Workspace',
|
||||||
'input_name': 'Please enter a workspace name',
|
'input_name': 'Please enter a workspace name',
|
||||||
|
|
|
@ -101,6 +101,7 @@ export default {
|
||||||
workspace: {
|
workspace: {
|
||||||
'create': '创建工作空间',
|
'create': '创建工作空间',
|
||||||
'update': '修改工作空间',
|
'update': '修改工作空间',
|
||||||
|
'delete': '删除工作空间',
|
||||||
'delete_confirm': '删除工作空间会关联删除该工作空间下的资源,确定要删除吗?',
|
'delete_confirm': '删除工作空间会关联删除该工作空间下的资源,确定要删除吗?',
|
||||||
'add': '添加工作空间',
|
'add': '添加工作空间',
|
||||||
'input_name': '请输入工作空间名称',
|
'input_name': '请输入工作空间名称',
|
||||||
|
|
|
@ -101,6 +101,7 @@ export default {
|
||||||
workspace: {
|
workspace: {
|
||||||
'create': '創建工作空間',
|
'create': '創建工作空間',
|
||||||
'update': '修改工作空間',
|
'update': '修改工作空間',
|
||||||
|
'delete': '刪除工作空間',
|
||||||
'delete_confirm': '刪除工作空間會關聯刪除該工作空間下的資源,確定要刪除嗎?',
|
'delete_confirm': '刪除工作空間會關聯刪除該工作空間下的資源,確定要刪除嗎?',
|
||||||
'add': '添加工作空間',
|
'add': '添加工作空間',
|
||||||
'input_name': '請輸入工作空間名稱',
|
'input_name': '請輸入工作空間名稱',
|
||||||
|
|
Loading…
Reference in New Issue