fix warn
This commit is contained in:
parent
bbd28d0ef9
commit
ff0e26f1c1
|
@ -7,7 +7,7 @@
|
||||||
background-color="rgb(44, 42, 72)"
|
background-color="rgb(44, 42, 72)"
|
||||||
text-color="#fff">
|
text-color="#fff">
|
||||||
<el-submenu index="1" popper-class="submenu" v-permission="['org_admin']">
|
<el-submenu index="1" popper-class="submenu" v-permission="['org_admin']">
|
||||||
<template slot="title">【组织】{{currrentOrganizationName}}</template>
|
<template slot="title">【组织】{{currentOrganizationName}}</template>
|
||||||
<label v-for="(item,index) in organizationList" :key="index">
|
<label v-for="(item,index) in organizationList" :key="index">
|
||||||
<el-menu-item @click="changeOrg(item)">{{item.name}}
|
<el-menu-item @click="changeOrg(item)">{{item.name}}
|
||||||
<i class="el-icon-check"
|
<i class="el-icon-check"
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
</label>
|
</label>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
<el-submenu index="2" popper-class="submenu" v-permission="['test_manager', 'test_user', 'test_viewer']">
|
<el-submenu index="2" popper-class="submenu" v-permission="['test_manager', 'test_user', 'test_viewer']">
|
||||||
<template slot="title">【工作空间】{{currrentWorkspaceName}}</template>
|
<template slot="title">【工作空间】{{currentWorkspaceName}}</template>
|
||||||
<label v-for="(item,index) in workspaceList" :key="index">
|
<label v-for="(item,index) in workspaceList" :key="index">
|
||||||
<el-menu-item @click="changeWs(item)">
|
<el-menu-item @click="changeWs(item)">
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
|
@ -62,8 +62,8 @@
|
||||||
currentUserInfo: {},
|
currentUserInfo: {},
|
||||||
currentUserId: JSON.parse(Cookies.get(TokenKey)).id,
|
currentUserId: JSON.parse(Cookies.get(TokenKey)).id,
|
||||||
workspaceIds: [],
|
workspaceIds: [],
|
||||||
currrentOrganizationName: '选择组织',
|
currentOrganizationName: '选择组织',
|
||||||
currrentWorkspaceName: '选择工作空间'
|
currentWorkspaceName: '选择工作空间'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
this.organizationList = data;
|
this.organizationList = data;
|
||||||
let org = data.filter(r => r.id === this.currentUser.lastOrganizationId);
|
let org = data.filter(r => r.id === this.currentUser.lastOrganizationId);
|
||||||
if (org.length > 0) {
|
if (org.length > 0) {
|
||||||
this.currrentOrganizationName = org[0].name;
|
this.currentOrganizationName = org[0].name;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -107,13 +107,13 @@
|
||||||
}
|
}
|
||||||
this.$get("/workspace/list/orgworkspace/", response => {
|
this.$get("/workspace/list/orgworkspace/", response => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
if (data.length == 0) {
|
if (data.length === 0) {
|
||||||
this.workspaceList = [{index:'1-1', name: '无工作区间'}]
|
this.workspaceList = [{index:'1-1', name: '无工作区间'}]
|
||||||
} else {
|
} else {
|
||||||
this.workspaceList = data;
|
this.workspaceList = data;
|
||||||
let workspace = data.filter(r => r.id === this.currentUser.lastWorkspaceId);
|
let workspace = data.filter(r => r.id === this.currentUser.lastWorkspaceId);
|
||||||
if (workspace.length > 0) {
|
if (workspace.length > 0) {
|
||||||
this.currrentWorkspaceName = workspace[0].name;
|
this.currentWorkspaceName = workspace[0].name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// this.workspaceIds = response.data.map(r = r.id);
|
// this.workspaceIds = response.data.map(r = r.id);
|
||||||
|
|
Loading…
Reference in New Issue