Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
ed7aeb10e5
|
@ -85,6 +85,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
|
window.addEventListener("resize", this.listenScreenChange,false);
|
||||||
// todo 其他方向待优化
|
// todo 其他方向待优化
|
||||||
switch (this.direction) {
|
switch (this.direction) {
|
||||||
case 'left':
|
case 'left':
|
||||||
|
@ -138,7 +139,24 @@
|
||||||
this.h = this.originalH;
|
this.h = this.originalH;
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.$emit('close')
|
this.$emit('close');
|
||||||
|
window.removeEventListener("resize", this.listenScreenChange);
|
||||||
|
},
|
||||||
|
listenScreenChange() {
|
||||||
|
switch (this.direction) {
|
||||||
|
case 'left':
|
||||||
|
this.h = document.documentElement.clientHeight;
|
||||||
|
break;
|
||||||
|
case 'right':
|
||||||
|
this.h = document.documentElement.clientHeight;
|
||||||
|
break;
|
||||||
|
case 'top':
|
||||||
|
this.w = document.documentElement.clientWidth;
|
||||||
|
break;
|
||||||
|
case 'bottom':
|
||||||
|
this.w = document.documentElement.clientWidth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
:import-json="importJson"
|
:import-json="importJson"
|
||||||
:progress-enable="false"
|
:progress-enable="false"
|
||||||
:tags="tags"
|
:tags="tags"
|
||||||
|
:height="height"
|
||||||
:distinct-tags="distinctTags"
|
:distinct-tags="distinctTags"
|
||||||
@save="save"
|
@save="save"
|
||||||
/>
|
/>
|
||||||
|
@ -60,10 +61,12 @@ export default {
|
||||||
"template":"default"
|
"template":"default"
|
||||||
},
|
},
|
||||||
isActive: true,
|
isActive: true,
|
||||||
isFullScreen: false
|
isFullScreen: false,
|
||||||
|
height: ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.height = document.body.clientHeight - 340;
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
dataMap() {
|
dataMap() {
|
||||||
|
|
|
@ -8,7 +8,11 @@
|
||||||
<el-menu-item index="1" v-show="false">Placeholder</el-menu-item>
|
<el-menu-item index="1" v-show="false">Placeholder</el-menu-item>
|
||||||
<el-submenu index="1" popper-class="org-ws-submenu"
|
<el-submenu index="1" popper-class="org-ws-submenu"
|
||||||
v-roles="['org_admin', 'test_manager', 'test_user', 'test_viewer']">
|
v-roles="['org_admin', 'test_manager', 'test_user', 'test_viewer']">
|
||||||
<template v-slot:title>{{ $t('commons.organization') }}: {{ currentOrganizationName }}</template>
|
<template v-slot:title>{{ $t('commons.organization') }}:
|
||||||
|
<span class="org-ws-name" :title="currentOrganizationName">
|
||||||
|
{{ currentOrganizationName }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
<el-input :placeholder="$t('project.search_by_name')"
|
<el-input :placeholder="$t('project.search_by_name')"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search"
|
||||||
v-model="searchOrg"
|
v-model="searchOrg"
|
||||||
|
@ -17,14 +21,20 @@
|
||||||
size="small"/>
|
size="small"/>
|
||||||
<div class="org-ws-menu">
|
<div class="org-ws-menu">
|
||||||
<el-menu-item @click="changeOrg(item)" v-for="(item,index) in organizationList" :key="index">
|
<el-menu-item @click="changeOrg(item)" v-for="(item,index) in organizationList" :key="index">
|
||||||
{{ item.name }}
|
<span class="title">
|
||||||
|
{{ item.name }}
|
||||||
|
</span>
|
||||||
<i class="el-icon-check"
|
<i class="el-icon-check"
|
||||||
v-if="item.id === currentUserInfo.lastOrganizationId"></i>
|
v-if="item.id === currentUserInfo.lastOrganizationId"></i>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</div>
|
</div>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
<el-submenu index="2" popper-class="submenu" v-roles="['test_manager', 'test_user', 'test_viewer']">
|
<el-submenu index="2" popper-class="submenu" v-roles="['test_manager', 'test_user', 'test_viewer']">
|
||||||
<template v-slot:title>{{ $t('commons.workspace') }}: {{ currentWorkspaceName }}</template>
|
<template v-slot:title>{{ $t('commons.workspace') }}:
|
||||||
|
<span class="org-ws-name" :title="currentWorkspaceName">
|
||||||
|
{{ currentWorkspaceName }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
<el-input :placeholder="$t('project.search_by_name')"
|
<el-input :placeholder="$t('project.search_by_name')"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search"
|
||||||
v-model="searchWs"
|
v-model="searchWs"
|
||||||
|
@ -33,7 +43,9 @@
|
||||||
size="small"/>
|
size="small"/>
|
||||||
<div class="org-ws-menu">
|
<div class="org-ws-menu">
|
||||||
<el-menu-item @click="changeWs(item)" v-for="(item,index) in workspaceList" :key="index">
|
<el-menu-item @click="changeWs(item)" v-for="(item,index) in workspaceList" :key="index">
|
||||||
{{ item.name }}
|
<span class="title">
|
||||||
|
{{ item.name }}
|
||||||
|
</span>
|
||||||
<i class="el-icon-check" v-if="item.id === currentUserInfo.lastWorkspaceId"></i>
|
<i class="el-icon-check" v-if="item.id === currentUserInfo.lastWorkspaceId"></i>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</div>
|
</div>
|
||||||
|
@ -219,4 +231,23 @@ export default {
|
||||||
color: #d2ced8;
|
color: #d2ced8;
|
||||||
border-color: #b4aebe;
|
border-color: #b4aebe;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
display: inline-block;
|
||||||
|
padding-left: 15px;
|
||||||
|
max-width: 150px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.org-ws-name {
|
||||||
|
display: inline-block;
|
||||||
|
padding-left: 15px;
|
||||||
|
max-width: 110px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue