明树Git Lab

Commit 850d0bed authored by zhanghan's avatar zhanghan

1

parent abad7c3d
...@@ -4,29 +4,43 @@ ...@@ -4,29 +4,43 @@
<el-header class="city-header"> <el-header class="city-header">
<div class="header-left"> <div class="header-left">
<img src="@/assets/images/logo.png" alt="" /> <img src="@/assets/images/logo.png" alt="" />
<div class="Split"></div>
<div class="header_subtitle">投资决策分析系统</div>
<!-- <span class="city-name">123123</span> --> <!-- <span class="city-name">123123</span> -->
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="message-wrap" @click="toMessagePage"> <div class="message-wrap" @click="toMessagePage">
<el-icon size="20"> <el-badge
<ChatDotSquare /> :hidden="messageCount <= 0"
</el-icon> :value="messageCount"
<div v-if="messageCount" class="count">{{ messageCount }}</div> :max="999"
</div> class="badge"
<div> >
<el-dropdown> <el-icon size="20"> <Bell /> </el-icon>
<span class="username"> </el-badge>
{{ userInfo.name }} <span> 消息中心 </span>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="handleLogout"
>退出登录</el-dropdown-item
>
</el-dropdown-menu>
</template>
</el-dropdown>
</div> </div>
<div class="Split"></div>
<span class="avatar">
<el-icon size="20"><Avatar /></el-icon
></span>
<el-dropdown @visible-change="changeVisible">
<span class="username">
{{ userInfo.name }}
<el-icon size="14">
<ArrowUp v-if="isIcon" />
<ArrowDown v-else />
</el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="handleLogout"
>退出登录</el-dropdown-item
>
</el-dropdown-menu>
</template>
</el-dropdown>
</div> </div>
</el-header> </el-header>
...@@ -77,6 +91,10 @@ const proxyRef = ref(null); ...@@ -77,6 +91,10 @@ const proxyRef = ref(null);
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const excludeTabs = ["/homePage"]; const excludeTabs = ["/homePage"];
const isIcon = ref(false);
const changeVisible = (bool) => {
isIcon.value = Boolean(bool);
};
// 2. 判断是否包含目标路由的核心方法 // 2. 判断是否包含目标路由的核心方法
const isExcludeRoute = (path) => { const isExcludeRoute = (path) => {
return !excludeTabs.includes(path); return !excludeTabs.includes(path);
...@@ -209,14 +227,23 @@ const handleLogout = () => { ...@@ -209,14 +227,23 @@ const handleLogout = () => {
} }
/* 选中菜单项样式 */ /* 选中菜单项样式 */
.el-menu-item { ::v-deep .el-menu-item {
color: #666;
font-size: 14px;
background-color: #fff;
}
::v-deep .el-sub-menu {
color: #666; color: #666;
font-size: 14px;
background-color: #fff; background-color: #fff;
.el-sub-menu__title {
height: 100%;
}
} }
.el-menu-item.is-active { :deep(.el-menu-item.is-active) {
background-color: #ecf3fd; color: #0084ff;
color: #3d84ee;
border-right: 4px solid #3d84ee; border-right: 4px solid #3d84ee;
background-color: #f1f7ff;
} }
/* 完全去掉系统管理子菜单的背景色 */ /* 完全去掉系统管理子菜单的背景色 */
...@@ -227,15 +254,37 @@ const handleLogout = () => { ...@@ -227,15 +254,37 @@ const handleLogout = () => {
.city-header { .city-header {
width: 100%; width: 100%;
height: 64px; height: 48px;
background: #3db8c5 url("@/assets/images/header-bg.png") no-repeat fixed top background-color: #1890ff;
left / 100% 64px;
color: #fff; color: #fff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 0 24px;
.Split {
margin: 4px 10px;
width: 1px;
height: 16px;
opacity: 1;
background: #ffffff;
}
.header-left { .header-left {
padding-left: 25px; display: flex;
height: 24px;
.header_subtitle {
font-size: 15px;
font-weight: 700;
letter-spacing: 0px;
line-height: 24px;
color: #ffffff;
text-align: right;
vertical-align: top;
}
img {
height: 24px;
}
} }
} }
...@@ -250,10 +299,18 @@ const handleLogout = () => { ...@@ -250,10 +299,18 @@ const handleLogout = () => {
cursor: pointer; cursor: pointer;
} }
.avatar {
display: flex;
margin-right: 4px;
}
.username { .username {
margin-left: 10px; display: flex;
color: #fff; color: #fff;
cursor: pointer; cursor: pointer;
align-items: center;
i {
margin-left: 8px;
}
} }
.city-aside { .city-aside {
...@@ -341,23 +398,15 @@ const handleLogout = () => { ...@@ -341,23 +398,15 @@ const handleLogout = () => {
.header-right { .header-right {
display: flex; display: flex;
align-items: center; align-items: center;
.badge {
display: flex;
margin-right: 6px;
}
.message-wrap { .message-wrap {
position: relative; display: flex;
margin-right: 10px; align-items: center;
cursor: pointer; cursor: pointer;
.count { font-size: 14px;
position: absolute;
top: -5px;
right: -5px;
min-width: 14px;
height: 14px;
border-radius: 50%;
background-color: red;
color: #fff;
font-size: 10px;
text-align: center;
line-height: 14px;
}
} }
} }
</style> </style>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<el-input <el-input
:prefix-icon="User" :prefix-icon="User"
v-model="loginForm.account" v-model="loginForm.account"
placeholder="号" placeholder="手机号"
size="large" size="large"
></el-input> ></el-input>
</el-form-item> </el-form-item>
...@@ -87,7 +87,7 @@ const loginForm = ref({ ...@@ -87,7 +87,7 @@ const loginForm = ref({
// 表单验证规则 // 表单验证规则
const loginRules = ref({ const loginRules = ref({
account: [{ required: true, message: "请输入号", trigger: "blur" }], account: [{ required: true, message: "请输入手机号", trigger: "blur" }],
password: [{ required: true, message: "请输入密码", trigger: "blur" }], password: [{ required: true, message: "请输入密码", trigger: "blur" }],
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment