明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jt_front
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
jt_front
Commits
850d0bed
Commit
850d0bed
authored
Mar 18, 2026
by
zhanghan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
abad7c3d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
44 deletions
+93
-44
MainLayout.vue
src/layouts/MainLayout.vue
+91
-42
index.vue
src/views/login/index.vue
+2
-2
No files found.
src/layouts/MainLayout.vue
View file @
850d0bed
...
@@ -4,20 +4,35 @@
...
@@ -4,20 +4,35 @@
<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"
class=
"badge"
>
<el-icon
size=
"20"
>
<Bell
/>
</el-icon>
</el-badge>
<span>
消息中心
</span>
</div>
</div>
<div>
<div
class=
"Split"
></div>
<el-dropdown>
<span
class=
"avatar"
>
<el-icon
size=
"20"
><Avatar
/></el-icon
></span>
<el-dropdown
@
visible-change=
"changeVisible"
>
<span
class=
"username"
>
<span
class=
"username"
>
{{
userInfo
.
name
}}
{{
userInfo
.
name
}}
<el-icon
size=
"14"
>
<ArrowUp
v-if=
"isIcon"
/>
<ArrowDown
v-else
/>
</el-icon>
</span>
</span>
<template
#
dropdown
>
<template
#
dropdown
>
<el-dropdown-menu>
<el-dropdown-menu>
<el-dropdown-item
@
click=
"handleLogout"
<el-dropdown-item
@
click=
"handleLogout"
...
@@ -27,7 +42,6 @@
...
@@ -27,7 +42,6 @@
</
template
>
</
template
>
</el-dropdown>
</el-dropdown>
</div>
</div>
</div>
</el-header>
</el-header>
<el-container
class=
"container-main"
>
<el-container
class=
"container-main"
>
...
@@ -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;
color: #666;
font-size: 14px;
background-color: #fff;
background-color: #fff;
}
}
.el-menu-item.is-active {
::v-deep .el-sub-menu {
background-color: #ecf3fd;
color: #666;
color: #3d84ee;
font-size: 14px;
background-color: #fff;
.el-sub-menu__title {
height: 100%;
}
}
:deep(.el-menu-item.is-active) {
color: #0084ff;
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: 10p
x;
display: fle
x;
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
>
src/views/login/index.vue
View file @
850d0bed
...
@@ -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"
}],
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment