删除无用代码

This commit is contained in:
shiziyuan9527 2020-05-12 11:01:56 +08:00
parent 290df82611
commit 5ad9d37bda
1 changed files with 7 additions and 4 deletions

View File

@ -62,10 +62,10 @@
data() {
return {
organizationList: [
{index: '7-1', name: this.$t('organization.none')},
{name: this.$t('organization.none')},
],
workspaceList: [
{index: '2-1', name: this.$t('workspace.none')},
{name: this.$t('workspace.none')},
],
currentUserInfo: {},
currentUserId: getCurrentUser().id,
@ -113,7 +113,7 @@
this.$get("/workspace/list/orgworkspace/", response => {
let data = response.data;
if (data.length === 0) {
this.workspaceList = [{index: '1-1', name: this.$t('workspace.none')}]
this.workspaceList = [{name: this.$t('workspace.none')}]
} else {
this.workspaceList = data;
let workspace = data.filter(r => r.id === this.currentUser.lastWorkspaceId);
@ -132,11 +132,14 @@
},
changeOrg(data) {
let orgId = data.id;
if (!orgId) {
return false;
}
this.$post("/user/switch/source/org/" + orgId, {}, response => {
saveLocalStorage(response);
this.$router.push('/');
window.location.reload();
})
});
},
changeWs(data) {
let workspaceId = data.id;