Commit 6bc3dbbd by cwq0219

整体样式;侧边菜单;bug修复

1 parent 68893bca
// 主题名称
$theme-name: 'classic';
// $private-left-side-color:#2A58AD;
$private-left-side-color:#2E4051;
// $private-left-side-color:#2e4051;
$private-left-side-color:#000000;
// $private-menu-active-background-color:#154190;
$private-menu-active-background-color:#4B6278;
$private-menu-active-background-color:#2A58AD;
$private-item-hover:rgba(#000,.05);
$private-menu-text-color:rgba(#FFFFFF,.5);
$private-menu-text-color:rgba(#FFFFFF,.8);
$active-i-color:#A7B1C2;
// 主题背景颜色
......@@ -71,7 +71,7 @@ $theme-aside-item-color-focus: #FFF;
$theme-aside-item-background-color-focus: rgba($private-menu-active-background-color, .15);
// 侧边栏上的项目在 active 时
$theme-aside-item-color-active: #FFF;
$theme-aside-item-background-color-active: rgba($private-menu-active-background-color, .15);
$theme-aside-item-background-color-active: rgba($private-menu-active-background-color, 1);
// 侧边栏菜单为空的时候显示的元素
$theme-aside-menu-empty-icon-color: #1F3147;
......
......@@ -27,8 +27,7 @@
.d2-layout-header-aside-content {
@extend %full;
.d2-theme-header {
// height: 58px;
height: 54px;
height: 60px;
.d2-theme-header-menu {
overflow: hidden;
&.is-scrollable {
......@@ -77,10 +76,10 @@
.d2-theme-container-aside {
transition: width .3s;
position: relative;
margin-top: 24px;
.d2-layout-header-aside-menu-side {
@extend %full;
overflow: hidden;
top: -41px;
}
}
.d2-theme-container-main {
......@@ -125,11 +124,12 @@
// logo区域
.logo-group {
transition: width .3s;
float: left;
text-align: center;
height: 80px;
line-height: 63px;
height: 60px;
line-height: 52px;
border-bottom: 1px solid rgba(225, 225, 225, .2);
margin-top: -10px;
padding-bottom: 10px;
// img {
// height: 65px;
// transform: translateX(-16px);
......@@ -152,6 +152,7 @@
}
}
.el-menu-item {
height: 60px;
transition: .1s ease;
@extend %header-menu-item;
border-bottom: none;
......@@ -175,7 +176,11 @@
margin: 0px !important;
// limin
font-size:13px;
cursor:pointer;
}
.out-txt {
color: #2A58AD;
font-weight: bold;
cursor: pointer;
}
.el-dropdown {
@extend %unable-select;
......
......@@ -10,6 +10,10 @@
}
}
.d2-layout-header-aside-menu-side {
background-color: $theme-bg-color;
}
// 背景图片和遮罩
.d2-layout-header-aside-group {
background-color: $theme-bg-color;
......
......@@ -42,7 +42,7 @@ export default {
transform-origin: 50% 50%;
i{
line-height: 50px;
font-size: 28px;
font-size: 14px;
}
}
.hamburger.is-active {
......
......@@ -11,26 +11,27 @@
</el-dropdown-menu>
</el-dropdown>-->
<div v-popover:popover-personal class="d2-mr personal-wrap">
<span v-if="show" class="btn-text">{{info && info.userType ? (info.userType == 1 ? `${info.detail.name}` : `${info.detail.merchantName}`) : '未登录'}} <d2-el-icon name="caret-bottom"/></span>
<el-popover ref="popover-personal" placement="bottom-end" trigger="hover">
<span v-if="show" class="btn-text">{{info && info.userType ? (info.userType == 1 ? `${info.detail.name}` : `${info.detail.merchantName}`) : '未登录'}}</span>
<span class="btn-text out-txt" @click="logOut">退出</span>
<!-- <el-popover ref="popover-personal" placement="bottom-end" trigger="hover">
<personal-panel :user="info"></personal-panel>
</el-popover>
</el-popover> -->
</div>
</div>
</template>
<script>
import { mapActions } from 'vuex'
import PersonalPanel from '../personal-panel'
// import PersonalPanel from '../personal-panel'
export default {
data() {
return {
show: true
}
},
components: {
PersonalPanel
},
// components: {
// PersonalPanel
// },
mounted() {
this.show = false
this.$event.$on('e-password-dialog', res => (this.passVisible = res))
......@@ -38,6 +39,21 @@ export default {
},
methods: {
...mapActions('d2admin/user', ['load']),
...mapActions('d2admin/account', ['logout']),
/**
* @description 登出
*/
async logOut() {
this.$confirm('确认退出?', '退出', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async() => {
await this.logout()
await this.$StoreReset.call(this.$store) // 重置 store
this.$router.push('/login')
})
},
async getInfo() {
this.info = await this.load()
this.$nextTick(() => {
......
......@@ -45,9 +45,9 @@ export default {
}, 500)
},
// 监听路由 控制侧边栏激活状态
'$route.fullPath': {
handler(value) {
this.active = value
'$route.matched': {
handler(val) {
this.active = val[val.length - 1].meta.hasOwnProperty('activePath') ? val[val.length - 1].meta.activePath : val[val.length - 1].path
},
immediate: true
}
......
......@@ -16,26 +16,38 @@
flex-box="0"
flex>
<div class="logo-group d2-theme-header-logo" :class="asideCollapse ? 'logo-only' : 'logo-all'" flex-box="0">
<img v-if="asideCollapse" src="../../assets/icon-only.png">
<img v-else src="../../assets/all.png">
<!-- <img v-if="asideCollapse" src="../../assets/icon-only.png">
<img v-else src="../../assets/all.png"> -->
<img style="width: 32px; height: 32px;" src="../../assets/icon-only.png">
</div>
<hamburger :onClick="handleToggleAside" :isActive="asideCollapse" flex-box="0" class="toggle-aside-btn"></hamburger>
<span class="header-title">{{headerTitle}}</span>
<p class="d2-header-name">广联赛讯股份有限公司</p>
<!-- <hamburger :onClick="handleToggleAside" :isActive="asideCollapse" flex-box="0" class="toggle-aside-btn"></hamburger>
<span class="header-title">{{headerTitle}}</span> -->
<d2-menu-header flex-box="1"/>
<!-- 顶栏右侧 -->
<div class="d2-header-right" flex-box="0">
<d2-header-datetime />
<!-- <d2-header-datetime /> -->
<!-- 如果你只想在开发环境显示这个按钮请添加 v-if="$env === 'development'" -->
<!-- <d2-header-search @click="handleSearchClick"/> -->
<!-- <d2-header-log v-if="$env === 'development'"/> -->
<!-- <d2-header-size/> -->
<d2-header-fullscreen/>
<!-- <d2-header-fullscreen/> -->
<!-- <d2-header-locales v-if="$env === 'development'"/> -->
<!-- <d2-header-theme/> -->
<!-- <d2-header-color/> -->
<d2-header-user/>
</div>
</div>
<div
class="d2-theme-header"
style="height: 40px; font-size: 14px; border-top: 1px solid #F0F2F5;"
flex-box="0"
flex>
<div class="logo-group d2-theme-header-logo" style="height: 1px; margin-top: -1px;" :class="asideCollapse ? 'logo-only' : 'logo-all'" flex-box="0">
</div>
<hamburger :onClick="handleToggleAside" :isActive="asideCollapse" flex-box="0" class="toggle-aside-btn"></hamburger>
<span class="header-title">{{headerTitle}}</span>
</div>
<!-- 下面 主体 -->
<div class="d2-theme-container" flex-box="1" flex>
<!-- 主体 侧边栏 -->
......@@ -214,6 +226,14 @@ export default {
transform: translate3d(0,16px,0) !important;
}
}
.d2-header-name {
height: 60px;
line-height: 60px;
font-size: 20px;
font-weight: bold;
color: #2A58AD;
margin: 0 0 0 21px;
}
.header-title {
line-height: 50px;
color: #606266;
......
......@@ -130,7 +130,8 @@ export const resources = {
authId: '901',
parentId: '90202',
cache: false,
sideHidden: true
sideHidden: false,
activePath: '/recordList'
},
component: _import('customer/editCustomer')
},
......@@ -194,7 +195,8 @@ export const resources = {
authId: '90304',
parentId: '90301',
cache: false,
sideHidden: true
sideHidden: true,
activePath: '/product'
},
component: _import('goods/editProduct')
},
......@@ -260,7 +262,8 @@ export const resources = {
authId: '90305',
parentId: '90302',
// cache: false,
sideHidden: true
sideHidden: true,
activePath: '/commodity'
},
component: _import('goods/editCommodity')
},
......@@ -308,7 +311,8 @@ export const resources = {
title: '订单详情',
authId: '90402',
parentId: '90401',
cache: false
cache: false,
activePath: '/orderList'
},
component: _import('orderManage/orderDetail')
},
......@@ -356,7 +360,8 @@ export const resources = {
title: '对账详情',
authId: '90502',
parentId: '90501',
cache: false
cache: false,
activePath: '/financeList'
},
component: _import('financeManage/financeDetail')
},
......@@ -410,7 +415,8 @@ export const resources = {
title: '财务详情',
authId: '90604',
parentId: '90603',
cache: false
cache: false,
activePath: '/merchantManage'
},
component: _import('systemConfig/merchantDetail')
},
......
......@@ -62,7 +62,7 @@
slot-scope="scope"
>
<p
v-for="(item, index) in scope.scope.baseGoodsStr.split(',')"
v-for="(item, index) in scope.scope.baseGoodsStr ? scope.scope.baseGoodsStr.split(',') : []"
:key="index"
>{{item}}</p>
</span>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!