菜单样式
This commit is contained in:
parent
04fef5bec1
commit
cecebc6fb9
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<el-row>
|
<el-row type="flex" justify="end">
|
||||||
<el-col :span="14" :offset="6">
|
<el-col :span="21">
|
||||||
<el-menu :unique-opened="true" mode="horizontal" router
|
<el-menu :unique-opened="true" mode="horizontal" router
|
||||||
menu-trigger="click"
|
menu-trigger="click"
|
||||||
class="header-user-menu"
|
class="header-user-menu align-right"
|
||||||
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']">
|
||||||
|
@ -27,8 +27,8 @@
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="3">
|
||||||
<el-dropdown size="medium" @command="handleCommand">
|
<el-dropdown size="medium" @command="handleCommand" class="align-right">
|
||||||
<span class="dropdown-link">
|
<span class="dropdown-link">
|
||||||
{{currentUser.name}}<i class="el-icon-caret-bottom el-icon--right"/>
|
{{currentUser.name}}<i class="el-icon-caret-bottom el-icon--right"/>
|
||||||
</span>
|
</span>
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
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);
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
changeOrg(data) {
|
changeOrg(data) {
|
||||||
let orgId = data.id;
|
let orgId = data.id;
|
||||||
let sign = "organization";
|
let sign = "organization";
|
||||||
this.$post("/user/switch/source/" + sign + "/" + orgId, {}, response => {
|
this.$post("/user/switch/source/" + sign + "/" + orgId, {}, response => {
|
||||||
localStorage.setItem(TokenKey, JSON.stringify(response.data));
|
localStorage.setItem(TokenKey, JSON.stringify(response.data));
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
})
|
})
|
||||||
|
@ -136,7 +136,7 @@
|
||||||
let sign = "workspace";
|
let sign = "workspace";
|
||||||
let workspaceId = data.id;
|
let workspaceId = data.id;
|
||||||
// todo 工作空间为空判断
|
// todo 工作空间为空判断
|
||||||
if (typeof(workspaceId) == "undefined") {
|
if (typeof (workspaceId) == "undefined") {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.$post("/user/switch/source/" + sign + "/" + workspaceId, {}, response => {
|
this.$post("/user/switch/source/" + sign + "/" + workspaceId, {}, response => {
|
||||||
|
@ -166,6 +166,10 @@
|
||||||
color: #44b349;
|
color: #44b349;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.align-right {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue