Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
Project
Project
Details
Activity
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
耿迪迪
gassafety
Commits
3fd30c67
Commit
3fd30c67
authored
Jul 15, 2021
by
yaqizhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
样式优化
parent
b442c2a6
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
96 additions
and
62 deletions
+96
-62
item-background.png
gassafety-web/src/assets/logo/item-background.png
+0
-0
top-left-logo.png
gassafety-web/src/assets/logo/top-left-logo.png
+0
-0
sidebar.scss
gassafety-web/src/assets/styles/sidebar.scss
+1
-1
font.css
gassafety-web/src/common/font/font.css
+9
-0
pingfang.ttf
gassafety-web/src/common/font/pingfang.ttf
+0
-0
pingfang1.ttf
gassafety-web/src/common/font/pingfang1.ttf
+0
-0
index.vue
gassafety-web/src/components/TopNav/index.vue
+23
-12
Navbar.vue
gassafety-web/src/layout/components/Navbar.vue
+39
-36
SidebarItem.vue
gassafety-web/src/layout/components/Sidebar/SidebarItem.vue
+7
-3
login.vue
gassafety-web/src/views/login.vue
+17
-10
No files found.
gassafety-web/src/assets/logo/item-background.png
0 → 100644
View file @
3fd30c67
16.6 KB
gassafety-web/src/assets/logo/top-left-logo.png
0 → 100644
View file @
3fd30c67
7.94 KB
gassafety-web/src/assets/styles/sidebar.scss
View file @
3fd30c67
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
height
:
100%
;
height
:
100%
;
position
:
fixed
;
position
:
fixed
;
font-size
:
0px
;
font-size
:
0px
;
top
:
8
5
px
;
top
:
8
0
px
;
bottom
:
0
;
bottom
:
0
;
left
:
0
;
left
:
0
;
z-index
:
1001
;
z-index
:
1001
;
...
...
gassafety-web/src/common/font/font.css
0 → 100644
View file @
3fd30c67
@font-face
{
font-family
:
'pingfang'
;
/* src: url('/assets/fonts/PingFang.ttc'); */
src
:
url('pingfang1.ttf')
;
font-weight
:
normal
;
font-style
:
normal
;
}
html
,
body
{
font-family
:
pingfang
,
sans-serif
;
}
\ No newline at end of file
gassafety-web/src/common/font/pingfang.ttf
0 → 100644
View file @
3fd30c67
File added
gassafety-web/src/common/font/pingfang1.ttf
0 → 100644
View file @
3fd30c67
File added
gassafety-web/src/components/TopNav/index.vue
View file @
3fd30c67
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
<!-- 导航栏左侧图标 -->
<!-- 导航栏左侧图标 -->
<!--
<svg-icon
:icon-class=
"item.meta.icon"
/>
-->
<!--
<svg-icon
:icon-class=
"item.meta.icon"
/>
-->
{{
item
.
meta
.
title
}}
</el-menu-item>
{{
item
.
meta
.
title
}}
</el-menu-item>
<div
class=
"menu-item-div"
></div>
</
template
>
</
template
>
<!-- 顶部菜单超出数量折叠 -->
<!-- 顶部菜单超出数量折叠 -->
...
@@ -31,7 +32,7 @@
...
@@ -31,7 +32,7 @@
<
script
>
<
script
>
import
{
constantRoutes
}
from
"@/router"
;
import
{
constantRoutes
}
from
"@/router"
;
import
'../../common/font/font.css'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -162,24 +163,21 @@ export default {
...
@@ -162,24 +163,21 @@ export default {
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.el-menu--horizontal
>
.el-menu-item
{
.el-menu--horizontal
>
.el-menu-item
{
float
:
left
;
float
:
left
;
width
:
150px
;
height
:
80px
;
height
:
80px
;
text-align
:
center
;
text-align
:
center
;
line-height
:
80px
;
line-height
:
80px
;
margin
:
0
;
margin
:
0
20px
;
font-size
:
18px
;
font-weight
:
600
;
color
:
#fff
;
color
:
#fff
;
/* background-color: #053B6A; */
font-size
:
22px
;
/* border-bottom: 3px solid transparent; */
font-family
:
"pingfang"
;
/* color: #999093; */
font-weight
:
600
;
text-shadow
:
0px
2px
3px
rgba
(
0
,
0
,
0
,
0
.2
);
padding
:
0
5px
;
padding
:
0
5px
;
margin
:
0
20px
;
}
}
.el-menu--horizontal
>
.el-menu-item.is-active
{
.el-menu--horizontal
>
.el-menu-item.is-active
{
border-bottom
:
3px
solid
#{
'var(--theme)'
}
;
border-bottom
:
3px
solid
#{
'var(--theme)'
}
;
box-shadow
:
inset
2px
2px
20px
#5CD9D4
;
/* box-shadow: inset 2px 2px 20px #5CD9D4; */
color
:
#5CD9D4
;
color
:
#5CD9D4
;
}
}
...
@@ -191,7 +189,20 @@ export default {
...
@@ -191,7 +189,20 @@ export default {
.el-menu--horizontal
>
.el-menu-item
:not
(
.is-disabled
)
:hover
,
.el-menu--horizontal
>
.el-menu-item
:not
(
.is-disabled
)
:focus
{
.el-menu--horizontal
>
.el-menu-item
:not
(
.is-disabled
)
:hover
,
.el-menu--horizontal
>
.el-menu-item
:not
(
.is-disabled
)
:focus
{
background-color
:
rgba
(
0
,
0
,
0
,
0
);
background-color
:
rgba
(
0
,
0
,
0
,
0
);
/* opacity: 0; */
/* opacity: 0; */
box-shadow
:
inset
2px
2px
20px
#5CD9D4
;
/* box-shadow: inset 2px 2px 20px #5CD9D4; */
color
:
#5CD9D4
;
color
:
#fff
;
}
.menu-item-div
{
width
:
2px
;
height
:
30px
;
margin-top
:
25px
;
background-color
:
rgb
(
190
,
189
,
189
);
float
:
left
;
background
:
linear-gradient
(
130deg
,
rgba
(
0
,
0
,
0
,
0
)
0%
,
rgba
(
255
,
255
,
255
,
0
.7
)
50%
,
rgba
(
0
,
0
,
0
,
0
)
100%
);
&
:last-child
{
width
:
0px
;
height
:
0px
;
}
}
}
</
style
>
</
style
>
gassafety-web/src/layout/components/Navbar.vue
View file @
3fd30c67
<
template
>
<
template
>
<div
class=
"navbar"
>
<div
class=
"navbar"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"18"
>
<div
style=
"float: left;padding: 5px;"
>
<div
style=
"float: left;padding: 5px;"
>
<span
style=
"width: 288px;
<img
src=
"@/assets/logo/top-left-logo.png"
alt=
""
style=
"margin-top: 15px;"
>
height: 43px;
</div>
font-size: 30px;
font-family: eryaxindahei;
font-weight: 600;
line-height: 43px;
color: #0FC7C0;
opacity: 1;"
>
燃气综合管理平台
</span></div>
<!-- 点击左侧二级菜单滑开 -->
<hamburger
id=
"hamburger-container"
:is-active=
"sidebar.opened"
class=
"hamburger-container"
@
toggleClick=
"toggleSideBar"
/>
<hamburger
id=
"hamburger-container"
:is-active=
"sidebar.opened"
class=
"hamburger-container"
@
toggleClick=
"toggleSideBar"
/>
<breadcrumb
id=
"breadcrumb-container"
class=
"breadcrumb-container"
v-if=
"!topNav"
/>
<breadcrumb
id=
"breadcrumb-container"
class=
"breadcrumb-container"
v-if=
"!topNav"
/>
...
@@ -17,7 +16,8 @@
...
@@ -17,7 +16,8 @@
<!-- 顶部导航 -->
<!-- 顶部导航 -->
<top-nav
id=
"topmenu-container"
class=
"topmenu-container"
v-if=
"topNav"
/>
<top-nav
id=
"topmenu-container"
class=
"topmenu-container"
v-if=
"topNav"
/>
</el-col>
<el-col
:span=
"6"
style=
"float: right;"
>
<div
class=
"right-menu"
>
<div
class=
"right-menu"
>
<!--
<template
v-if=
"device!=='mobile'"
>
<!--
<template
v-if=
"device!=='mobile'"
>
<search
id=
"header-search"
class=
"right-menu-item"
/>
<search
id=
"header-search"
class=
"right-menu-item"
/>
...
@@ -39,10 +39,11 @@
...
@@ -39,10 +39,11 @@
</
template
>
-->
</
template
>
-->
<div
class=
"formatDate"
>
<div
class=
"formatDate"
>
<img
src=
"@/assets/logo/formleft.png"
alt=
""
>
<span>
{{ nowDate }}
</span>
<span>
{{ nowDate }}
</span>
</div>
</div>
<div
class=
"yhm"
>
用户名
</div>
<div
class=
"yhm"
>
{{showUserName}}
</div>
<el-dropdown
class=
"avatar-container right-menu-item hover-effect"
trigger=
"click"
>
<el-dropdown
class=
"avatar-container right-menu-item hover-effect"
trigger=
"click"
>
<div
class=
"avatar-wrapper"
>
<div
class=
"avatar-wrapper"
>
<img
:src=
"avatar"
class=
"user-avatar"
>
<img
:src=
"avatar"
class=
"user-avatar"
>
...
@@ -60,7 +61,10 @@
...
@@ -60,7 +61,10 @@
</el-dropdown-item>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
</div>
</div>
</el-col>
</el-row>
</div>
</div>
</template>
</template>
...
@@ -72,7 +76,7 @@ import Hamburger from '@/components/Hamburger'
...
@@ -72,7 +76,7 @@ import Hamburger from '@/components/Hamburger'
import
Screenfull
from
'@/components/Screenfull'
import
Screenfull
from
'@/components/Screenfull'
import
SizeSelect
from
'@/components/SizeSelect'
import
SizeSelect
from
'@/components/SizeSelect'
import
Search
from
'@/components/HeaderSearch'
import
Search
from
'@/components/HeaderSearch'
import
Cookie
from
'js-cookie'
export
default
{
export
default
{
components
:
{
components
:
{
Breadcrumb
,
Breadcrumb
,
...
@@ -88,6 +92,9 @@ export default {
...
@@ -88,6 +92,9 @@ export default {
};
};
},
},
computed
:
{
computed
:
{
showUserName
(){
return
Cookie
.
get
(
'username'
)
},
...
mapGetters
([
...
mapGetters
([
'sidebar'
,
'sidebar'
,
'avatar'
,
'avatar'
,
...
@@ -109,6 +116,7 @@ export default {
...
@@ -109,6 +116,7 @@ export default {
return
this
.
$store
.
state
.
settings
.
topNav
return
this
.
$store
.
state
.
settings
.
topNav
}
}
}
}
},
},
methods
:
{
methods
:
{
toggleSideBar
()
{
toggleSideBar
()
{
...
@@ -184,7 +192,6 @@ export default {
...
@@ -184,7 +192,6 @@ export default {
}
}
.topmenu-container
{
.topmenu-container
{
width
:
1100px
;
background-color
:
red
;
background-color
:
red
;
position
:
absolute
;
position
:
absolute
;
left
:
350px
;
left
:
350px
;
...
@@ -196,7 +203,6 @@ export default {
...
@@ -196,7 +203,6 @@ export default {
vertical-align
:
top
;
vertical-align
:
top
;
}
}
.right-menu
{
.right-menu
{
width
:
366px
;
float
:
right
;
float
:
right
;
height
:
100%
;
height
:
100%
;
line-height
:
80px
;
line-height
:
80px
;
...
@@ -207,23 +213,20 @@ export default {
...
@@ -207,23 +213,20 @@ export default {
outline
:
none
;
outline
:
none
;
}
}
.formatDate
{
.formatDate
{
width
:
200px
;
float
:
left
;
float
:
left
;
font-size
:
24px
;
font-size
:
20px
;
font-family
:
PingFang
SC
;
font-weight
:
400
;
color
:
#fff
;
color
:
#fff
;
img
{
margin-right
:
30px
;
height
:
100%
;
float
:
left
;
}
}
}
.yhm
{
.yhm
{
font-size
:
24px
;
font-size
:
20px
;
font-family
:
PingFang
SC
;
font-weight
:
400
;
color
:
#fff
;
color
:
#fff
;
float
:
left
;
float
:
left
;
text-overflow
:ellipsis
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-align
:
center
;
margin-right
:
20px
;
}
}
.right-menu-item
{
.right-menu-item
{
display
:
inline-block
;
display
:
inline-block
;
...
@@ -246,7 +249,7 @@ export default {
...
@@ -246,7 +249,7 @@ export default {
}
}
.avatar-container
{
.avatar-container
{
margin-right
:
30
px
;
margin-right
:
15
px
;
.avatar-wrapper
{
.avatar-wrapper
{
margin-top
:
5px
;
margin-top
:
5px
;
...
...
gassafety-web/src/layout/components/Sidebar/SidebarItem.vue
View file @
3fd30c67
...
@@ -97,7 +97,8 @@ export default {
...
@@ -97,7 +97,8 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
#app
.sidebar-container
.submenu-title-noDropdown
:hover
,
#app
.sidebar-container
.el-submenu__title
:hover
{
#app
.sidebar-container
.submenu-title-noDropdown
:hover
,
#app
.sidebar-container
.el-submenu__title
:hover
{
box-shadow
:
inset
2px
2px
20px
#5CD9D4
;
/* box-shadow: inset 2px 2px 20px #5CD9D4; */
background
:
rgba
(
0
,
0
,
0
,
0
);
}
}
#app
.sidebar-container
.el-menu-item
,
#app
.sidebar-container
.el-submenu__title
{
#app
.sidebar-container
.el-menu-item
,
#app
.sidebar-container
.el-submenu__title
{
overflow
:
hidden
!
important
;
overflow
:
hidden
!
important
;
...
@@ -106,7 +107,10 @@ export default {
...
@@ -106,7 +107,10 @@ export default {
}
}
.el-menu-item
:hover
,
.el-menu-item
:focus
,
.is-active
{
.el-menu-item
:hover
,
.el-menu-item
:focus
,
.is-active
{
outline
:
none
;
outline
:
none
;
box-shadow
:
inset
2px
2px
20px
#5CD9D4
;
background-image
:
url("../../../assets/logo/item-background.png")
;
color
:
#5CD9D4
!
important
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
/* background: rgba(0, 0, 0, 0); */
color
:
#fff
!
important
;
}
}
</
style
>
</
style
>
\ No newline at end of file
gassafety-web/src/views/login.vue
View file @
3fd30c67
...
@@ -106,7 +106,7 @@ export default {
...
@@ -106,7 +106,7 @@ export default {
getCookie
()
{
getCookie
()
{
const
username
=
Cookies
.
get
(
"username"
);
const
username
=
Cookies
.
get
(
"username"
);
const
password
=
Cookies
.
get
(
"password"
);
const
password
=
Cookies
.
get
(
"password"
);
const
rememberMe
=
Cookies
.
get
(
'rememberMe'
)
const
rememberMe
=
Cookies
.
get
(
'rememberMe'
)
;
this
.
loginForm
=
{
this
.
loginForm
=
{
username
:
username
===
undefined
?
this
.
loginForm
.
username
:
username
,
username
:
username
===
undefined
?
this
.
loginForm
.
username
:
username
,
password
:
password
===
undefined
?
this
.
loginForm
.
password
:
decrypt
(
password
),
password
:
password
===
undefined
?
this
.
loginForm
.
password
:
decrypt
(
password
),
...
@@ -117,15 +117,22 @@ export default {
...
@@ -117,15 +117,22 @@ export default {
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
loading
=
true
;
this
.
loading
=
true
;
if
(
this
.
loginForm
.
rememberMe
)
{
// if (this.loginForm.rememberMe) {
Cookies
.
set
(
"username"
,
this
.
loginForm
.
username
,
{
expires
:
30
});
// Cookies.set("username", this.loginForm.username, { expires: 30 });
Cookies
.
set
(
"password"
,
encrypt
(
this
.
loginForm
.
password
),
{
expires
:
30
});
// Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
Cookies
.
set
(
'rememberMe'
,
this
.
loginForm
.
rememberMe
,
{
expires
:
30
});
// Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
}
else
{
// } else {
// Cookies.remove("username");
// Cookies.remove("password");
// Cookies.remove('rememberMe');
// }
Cookies
.
remove
(
"username"
);
Cookies
.
remove
(
"username"
);
Cookies
.
remove
(
"password"
);
Cookies
.
remove
(
"password"
);
Cookies
.
remove
(
'rememberMe'
);
Cookies
.
remove
(
'rememberMe'
);
}
Cookies
.
set
(
"username"
,
this
.
loginForm
.
username
,
{
expires
:
30
});
Cookies
.
set
(
"password"
,
encrypt
(
this
.
loginForm
.
password
),
{
expires
:
30
});
Cookies
.
set
(
'rememberMe'
,
this
.
loginForm
.
rememberMe
,
{
expires
:
30
});
this
.
$store
.
dispatch
(
"Login"
,
this
.
loginForm
).
then
(()
=>
{
this
.
$store
.
dispatch
(
"Login"
,
this
.
loginForm
).
then
(()
=>
{
this
.
$router
.
push
({
path
:
this
.
redirect
||
"/"
}).
catch
(()
=>
{});
this
.
$router
.
push
({
path
:
this
.
redirect
||
"/"
}).
catch
(()
=>
{});
}).
catch
(()
=>
{
}).
catch
(()
=>
{
...
...
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