Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
cloudSystem
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
80c27c51
authored
May 11, 2021
by
liangjianmin
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
db4449d6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
571 additions
and
492 deletions
src/ajax/index.js
src/components/menu.vue
src/main.js
src/tool/index.js
src/views/Index/index.vue
src/views/User/login.vue
src/ajax/index.js
View file @
80c27c51
import
axios
from
'axios'
;
import
qs
from
'qs'
;
import
Util
from
"../tool"
;
/**
...
...
@@ -25,14 +26,20 @@ switch (envs) {
NODE_ENVS
=
'/'
;
break
;
}
export
const
http
=
(
method
,
url
,
param
)
=>
{
param
=
param
&&
typeof
param
===
'object'
?
param
:
{};
let
token
=
Util
.
getCookie
(
'token'
)
||
''
;
const
config
=
{
url
:
`
${
NODE_ENVS
}${
url
}
`
,
method
:
method
,
transformRequest
:
[
function
(
param
)
{
return
qs
.
stringify
(
param
);
}]
}],
headers
:
{
'Authorization'
:
'Bearer '
+
token
}
};
// post请求时需要设定Content-Type
...
...
src/components/menu.vue
View file @
80c27c51
<
template
>
<div
class=
"nav-box"
>
<div
class=
"nav-top"
>
<div
class=
"con-box clr"
>
<div
class=
"logo fl"
>
云芯系统
</div>
<div
class=
"tab-box fl"
>
<a
class=
"item fl first"
href=
"/#/"
:class=
"
{'act':$route.path=='/'}">
<font
class=
"fl"
>
概况
</font>
</a>
<a
class=
"item fl"
:class=
"
{'act':item.path==$route.path}" :href="'/#'+item.path" v-for="item in tabs">
<font
class=
"fl"
>
{{
item
.
title
}}
</font>
<span
class=
"icon iconfont fl"
@
click
.
prevent=
"closetab(item.path)"
>
</span>
</a>
</div>
<div
class=
"user-box fr"
>
<div
class=
"line"
></div>
<a
class=
"msgh fl"
href=
"#"
>
<span
class=
"icon iconfont"
>
</span>
<font>
55
</font>
</a>
<div
class=
"line"
></div>
<a
href=
"#"
class=
"fl"
><span
class=
"icon iconfont fl"
>
</span></a>
<div
class=
"line"
></div>
<div
class=
"login-v fl"
>
<img
class=
"fl"
src=
"http://img.ichunt.com/test/images/ichunt/9f/34/9f349b1400f659e5ad270412d4dbe160.jpg"
alt=
""
>
<div
class=
"fl namex"
>
460053411@qq.com
</div>
<div
class=
"fl lo-box-drop"
>
<span
class=
"icon iconfont"
>
</span>
<div
class=
"drop-box"
>
<a
href=
"#"
>
修改密码
</a>
<a
href=
"#"
>
退出登录
</a>
</div>
<div
class=
"nav-box"
>
<div
class=
"nav-top"
>
<div
class=
"con-box clr"
>
<div
class=
"logo fl"
>
云芯系统
</div>
<div
class=
"tab-box fl"
>
<a
class=
"item fl first"
href=
"/#/"
:class=
"
{'act':$route.path=='/'}">
<font
class=
"fl"
>
概况
</font>
</a>
<a
class=
"item fl"
:class=
"
{'act':item.path==$route.path}" :href="'/#'+item.path" v-for="item in tabs">
<font
class=
"fl"
>
{{
item
.
title
}}
</font>
<span
class=
"icon iconfont fl"
@
click
.
prevent=
"closetab(item.path)"
>
</span>
</a>
</div>
<div
class=
"user-box fr"
>
<div
class=
"line"
></div>
<a
class=
"msgh fl"
href=
"#"
>
<span
class=
"icon iconfont"
>
</span>
<font>
55
</font>
</a>
<div
class=
"line"
></div>
<a
href=
"#"
class=
"fl"
><span
class=
"icon iconfont fl"
>
</span></a>
<div
class=
"line"
></div>
<div
class=
"login-v fl"
>
<img
class=
"fl"
src=
"http://img.ichunt.com/test/images/ichunt/9f/34/9f349b1400f659e5ad270412d4dbe160.jpg"
alt=
""
>
<div
class=
"fl namex"
>
460053411@qq.com
</div>
<div
class=
"fl lo-box-drop"
>
<span
class=
"icon iconfont"
>
</span>
<div
class=
"drop-box"
>
<a
href=
"#"
>
修改密码
</a>
<a
href=
"javascript:;"
@
click=
"logout"
>
退出登录
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"nav-left"
v-show=
"!collapse"
>
<div
class=
"nav-left"
v-show=
"!collapse"
>
<div
class=
"meau-con"
>
<div
class=
"zankai"
>
<span
class=
"icon iconfont fr"
@
click=
"zk"
>
</span>
</div>
<el-menu
class=
"el-menu-vertical-demo"
@
open=
"handleOpen"
active-text-color=
"#1969F9"
router
:default-active=
"$route.path"
:router=
"true"
:unique-opened=
"true"
@
close=
"handleClose"
@
select=
"handleSelect"
>
<el-menu-item
:index=
"'/'"
:class=
"
{'indextab':isIndexTab}">
<template
slot=
"title"
>
<span
class=
"icon iconfont"
>
</span>
<span>
概况
</span>
</
template
>
</el-menu-item>
<el-submenu
index=
"2"
>
<
template
slot=
"title"
>
<span
class=
"icon iconfont"
>
</span>
<span
slot=
"title"
>
报价管理
</span>
</
template
>
<el-menu-item-group>
<el-menu-item
:index=
"'/inquire'"
>
询价管理
</el-menu-item>
<el-menu-item
:index=
"'/quote'"
>
报价管理
</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-submenu
index=
"3"
>
<
template
slot=
"title"
>
<span
class=
"icon iconfont"
>
</span>
<span
slot=
"title"
>
库存管理
</span>
</
template
>
<el-menu-item-group>
<el-menu-item
:index=
"'/list'"
>
库存列表
</el-menu-item>
<el-menu-item
:index=
"'/enter'"
>
库存导入
</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-submenu
index=
"4"
>
<
template
slot=
"title"
>
<span
class=
"icon iconfont"
>
</span>
<span
slot=
"title"
>
商品管理
</span>
</
template
>
<el-menu-item-group>
<el-menu-item
:index=
"'/goods'"
>
商品列表
</el-menu-item>
<el-menu-item
:index=
"'/brand'"
>
品牌列表
</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-submenu
index=
"5"
>
<
template
slot=
"title"
>
<span
class=
"icon iconfont"
>
</span>
<span
slot=
"title"
>
用户中心
</span>
</
template
>
<el-menu-item-group>
<el-menu-item
:index=
"'/message'"
>
基本信息
</el-menu-item>
</el-menu-item-group>
</el-submenu>
</el-menu>
</div>
<div
class=
"meau-con"
>
<div
class=
"zankai"
>
<span
class=
"icon iconfont fr"
@
click=
"zk"
>
</span>
</div>
<el-menu
class=
"el-menu-vertical-demo"
@
open=
"handleOpen"
active-text-color=
"#1969F9"
router
:default-active=
"$route.path"
:router=
"true"
:unique-opened=
"true"
@
close=
"handleClose"
@
select=
"handleSelect"
>
<el-menu-item
:index=
"'/'"
:class=
"
{'indextab':isIndexTab}">
<template
slot=
"title"
>
<span
class=
"icon iconfont"
>
</span>
<span>
概况
</span>
</
template
>
</el-menu-item>
<el-submenu
index=
"2"
>
<
template
slot=
"title"
>
<span
class=
"icon iconfont"
>
</span>
<span
slot=
"title"
>
报价管理
</span>
</
template
>
<el-menu-item-group>
<el-menu-item
:index=
"'/inquire'"
>
询价管理
</el-menu-item>
<el-menu-item
:index=
"'/quote'"
>
报价管理
</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-submenu
index=
"3"
>
<
template
slot=
"title"
>
<span
class=
"icon iconfont"
>
</span>
<span
slot=
"title"
>
库存管理
</span>
</
template
>
<el-menu-item-group>
<el-menu-item
:index=
"'/list'"
>
库存列表
</el-menu-item>
<el-menu-item
:index=
"'/enter'"
>
库存导入
</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-submenu
index=
"4"
>
<
template
slot=
"title"
>
<span
class=
"icon iconfont"
>
</span>
<span
slot=
"title"
>
商品管理
</span>
</
template
>
<el-menu-item-group>
<el-menu-item
:index=
"'/goods'"
>
商品列表
</el-menu-item>
<el-menu-item
:index=
"'/brand'"
>
品牌列表
</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-submenu
index=
"5"
>
<
template
slot=
"title"
>
<span
class=
"icon iconfont"
>
</span>
<span
slot=
"title"
>
用户中心
</span>
</
template
>
<el-menu-item-group>
<el-menu-item
:index=
"'/message'"
>
基本信息
</el-menu-item>
</el-menu-item-group>
</el-submenu>
</el-menu>
</div>
</div>
<div
class=
"nav-left2"
v-show=
"collapse"
>
<div
class=
"zankai"
>
<span
class=
"icon iconfont fr"
@
click=
"zk"
>
</span>
</div>
<div
class=
"item "
:class=
"{'act':tabSure==1}"
>
<span
class=
"icon iconfont"
>
</span>
</div>
<div
class=
"item"
:class=
"{'act':tabSure==2}"
>
<span
class=
"icon iconfont"
>
</span>
</div>
<div
class=
"item"
:class=
"{'act':tabSure==3}"
>
<span
class=
"icon iconfont"
>
</span>
</div>
<div
class=
"item"
:class=
"{'act':tabSure==4}"
>
<span
class=
"icon iconfont"
>
</span>
</div>
<div
class=
"item"
:class=
"{'act':tabSure==5}"
>
<span
class=
"icon iconfont"
>
</span>
</div>
<div
class=
"nav-left2"
v-show=
"collapse"
>
<div
class=
"zankai"
>
<span
class=
"icon iconfont fr"
@
click=
"zk"
>
</span>
</div>
<div
class=
"item "
:class=
"{'act':tabSure==1}"
>
<span
class=
"icon iconfont"
>
</span>
</div>
<div
class=
"item"
:class=
"{'act':tabSure==2}"
>
<span
class=
"icon iconfont"
>
</span>
</div>
<div
class=
"item"
:class=
"{'act':tabSure==3}"
>
<span
class=
"icon iconfont"
>
</span>
</div>
<div
class=
"item"
:class=
"{'act':tabSure==4}"
>
<span
class=
"icon iconfont"
>
</span>
</div>
<div
class=
"item"
:class=
"{'act':tabSure==5}"
>
<span
class=
"icon iconfont"
>
</span>
</div>
</div>
</div>
</div>
</template>
...
...
@@ -132,33 +132,35 @@
MenuItemGroup
,
Message
}
from
'element-ui'
Vue
.
use
(
Menu
).
use
(
MenuItem
).
use
(
MenuItemGroup
).
use
(
Submenu
)
export
default
{
name
:
'menus'
,
props
:
{
},
props
:
{},
created
()
{
/* this.$http('get', "/api/user/getuserinfo").then(res => {
}).catch(err => {
console.log(err.message);
})*/
},
data
()
{
return
{
collapse
:
false
,
isIndexTab
:
true
,
tabSure
:
""
,
tabs
:
""
tabs
:
""
}
},
watch
:{
$route
(
to
,
from
)
{
let
tab_arr
=
sessionStorage
.
getItem
(
'tabs'
)
if
(
tab_arr
)
{
this
.
tabs
=
JSON
.
parse
(
tab_arr
);
watch
:
{
$route
(
to
,
from
)
{
let
tab_arr
=
sessionStorage
.
getItem
(
'tabs'
)
if
(
tab_arr
)
{
this
.
tabs
=
JSON
.
parse
(
tab_arr
);
}
let
app_
=
document
.
getElementById
(
'app'
);
this
.
collapse
=
false
this
.
collapse
=
false
if
(
this
.
collapse
)
{
app_
.
setAttribute
(
'style'
,
'padding-left:62px'
);
}
else
{
...
...
@@ -167,7 +169,7 @@
}
},
mounted
()
{
this
.
tabss
(
this
.
$route
.
path
)
this
.
tabss
(
this
.
$route
.
path
)
},
methods
:
{
tabss
(
lk
)
{
...
...
@@ -186,31 +188,31 @@
if
(
lk
==
"/message"
)
{
this
.
tabSure
=
5
}
let
tab_arr
=
sessionStorage
.
getItem
(
'tabs'
)
if
(
tab_arr
)
{
this
.
tabs
=
JSON
.
parse
(
tab_arr
);
let
tab_arr
=
sessionStorage
.
getItem
(
'tabs'
)
if
(
tab_arr
)
{
this
.
tabs
=
JSON
.
parse
(
tab_arr
);
}
},
closetab
(
path
){
let
tab_arr
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'tabs'
))
for
(
var
i
=
0
;
i
<
tab_arr
.
length
;
i
++
)
{
if
(
tab_arr
[
i
].
path
==
path
)
{
tab_arr
.
splice
(
i
,
1
);
closetab
(
path
)
{
let
tab_arr
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'tabs'
))
for
(
var
i
=
0
;
i
<
tab_arr
.
length
;
i
++
)
{
if
(
tab_arr
[
i
].
path
==
path
)
{
tab_arr
.
splice
(
i
,
1
);
sessionStorage
.
setItem
(
'tabs'
,
JSON
.
stringify
(
tab_arr
));
this
.
tabs
=
tab_arr
;
if
(
path
==
this
.
$route
.
path
)
{
if
(
i
==
0
)
{
this
.
$router
.
push
({
path
:
"/"
,
})
}
else
{
this
.
$router
.
push
({
path
:
tab_arr
[
i
-
1
].
path
,
})
}
this
.
tabs
=
tab_arr
;
if
(
path
==
this
.
$route
.
path
)
{
if
(
i
==
0
)
{
this
.
$router
.
push
({
path
:
"/"
,
})
}
else
{
this
.
$router
.
push
({
path
:
tab_arr
[
i
-
1
].
path
,
})
}
}
break
;
break
;
}
}
...
...
@@ -237,386 +239,405 @@
},
handleSelect
(
key
,
keyPath
)
{
this
.
tabss
(
key
)
},
logout
()
{
this
.
$http
(
'get'
,
"/auth/logout"
).
then
(
res
=>
{
}).
catch
(
err
=>
{
console
.
log
(
err
.
message
);
})
}
}
}
</
script
>
<
style
lang=
"less"
>
#app
{
padding-left
:
226px
;
padding-top
:
56px
;
}
<
style
lang=
"less"
>
#app
{
padding-left
:
226px
;
padding-top
:
56px
;
}
.nav-top
{
position
:
fixed
;
left
:
0px
;
top
:
0px
;
right
:
0px
;
height
:
56px
;
z-index
:
99
;
.con-box
{
height
:
56px
;
background
:
#fff
;
box-shadow
:
0px
2px
42px
-8px
rgba
(
206
,
214
,
219
,
0.5
);
.logo
{
.nav-top
{
position
:
fixed
;
left
:
0px
;
top
:
0px
;
right
:
0px
;
height
:
56px
;
width
:
226px
;
line-height
:
56px
;
font-weight
:
bold
;
color
:
#fff
;
text-align
:
center
;
background
:
#1969F9
;
box-shadow
:
0px
2px
42px
-8px
rgba
(
206
,
214
,
219
,
0.5
);
}
.tab-box
{
padding
:
8px
0px
;
.item{
color
:
#646B78
;
font-size
:
14px
;
margin-left
:
20px
;
height
:
40px
;
line-height
:
40px
;
cursor
:
pointer
;
&.act{
position
:
relative
;
font{
color
:
#333
;
z-index
:
99
;
.con-box
{
height
:
56px
;
background
:
#fff
;
box-shadow
:
0px
2px
42px
-8px
rgba
(
206
,
214
,
219
,
0.5
);
.logo
{
height
:
56px
;
width
:
226px
;
line-height
:
56px
;
font-weight
:
bold
;
color
:
#fff
;
text-align
:
center
;
background
:
#1969F9
;
box-shadow
:
0px
2px
42px
-8px
rgba
(
206
,
214
,
219
,
0.5
);
}
.tab-box
{
padding
:
8px
0px
;
.item
{
color
:
#646B78
;
font-size
:
14px
;
margin-left
:
20px
;
height
:
40px
;
line-height
:
40px
;
cursor
:
pointer
;
&.act
{
position
:
relative
;
font
{
color
:
#333
;
}
&
::after
{
content
:
""
;
position
:
absolute
;
bottom
:
-8px
;
width
:
32px
;
height
:
5px
;
background
:
#1969F9
;
left
:
50%
;
margin-left
:
-22px
;
}
&
.first
{
&::after
{
margin-left
:
-15px
;
}
}
}
.icon
{
font-size
:
14px
;
margin-left
:
5px
;
}
}
&
::after
{
content
:
""
;
position
:
absolute
;
bottom
:
-8px
;
width
:
32px
;
height
:
5px
;
background
:
#1969F9
;
left
:
50%
;
margin-left
:
-22px
;
}
.user-box
{
height
:
40px
;
padding
:
8px
0
;
line-height
:
40px
;
padding-right
:
36px
;
color
:
#A1ACC1
;
a
{
color
:
#A1ACC1
;
&:hover
{
.icon
{
color
:
#1969F9
;
}
}
}
&
.first
{
&::after
{
margin-left
:
-15px
;
.icon
{
font-size
:
24px
;
transition
:
all
0.5s
;
}
.line
{
width
:
1px
;
height
:
40px
;
background
:
#E5EBF6
;
float
:
left
;
margin-left
:
16px
;
margin-right
:
16px
;
}
}
.icon
{
font-size
:
14px
;
margin-left
:
5px
;
}
}
}
.user-box
{
height
:
40px
;
padding
:
8px
0
;
line-height
:
40px
;
padding-right
:
36px
;
color
:
#A1ACC1
;
a
{
color
:
#A1ACC1
;
.msgh
{
position
:
relative
;
font
{
position
:
absolute
;
width
:
19px
;
height
:
14px
;
background
:
#1969F9
;
border-radius
:
7px
;
text-align
:
center
;
line-height
:
14px
;
font-size
:
10px
;
color
:
#fff
;
left
:
15px
;
}
}
&:hover
{
.icon
{
color
:
#1969F9
;
.login-v
{
img
{
width
:
35px
;
height
:
35px
;
border-radius
:
35px
;
}
.namex
{
margin-left
:
10px
;
margin-right
:
10px
;
font-size
:
12px
;
}
.lo-box-drop
{
position
:
relative
;
cursor
:
pointer
;
.drop-box
{
display
:
none
;
position
:
absolute
;
width
:
94px
;
height
:
55px
;
padding
:
12px
0
;
left
:
-66px
;
background
:
#FFFFFF
;
box-shadow
:
1px
2px
10px
0px
rgba
(
119
,
135
,
145
,
0.5
);
&::after
{
content
:
""
;
border-style
:
solid
;
border-color
:
transparent
transparent
#fff
transparent
;
border-width
:
7px
;
position
:
absolute
;
top
:
-13px
;
left
:
72px
;
}
a
{
display
:
block
;
width
:
94px
;
height
:
28px
;
line-height
:
28px
;
text-align
:
center
;
font-size
:
14px
;
color
:
#646B78
;
&:hover
{
background
:
#E7F3FF
;
}
}
}
&
:hover
{
.icon
{
color
:
#1969F9
;
}
.drop-box
{
display
:
block
;
}
}
}
}
}
}
}
.icon
{
font-size
:
24px
;
transition
:
all
0.5s
;
}
}
.line
{
width
:
1px
;
height
:
40px
;
background
:
#E5EBF6
;
float
:
left
;
margin-left
:
16px
;
margin-right
:
16px
;
}
.nav-left2
{
width
:
62px
;
background
:
#fff
;
position
:
fixed
;
left
:
0px
;
top
:
56px
;
bottom
:
0px
;
.msgh
{
position
:
relative
;
.zankai
{
height
:
26px
;
font-size
:
18px
;
color
:
#646B78
;
line-height
:
26px
;
padding-right
:
5px
;
font
{
position
:
absolute
;
width
:
19px
;
height
:
14px
;
background
:
#1969F9
;
border-radius
:
7px
;
text-align
:
center
;
line-height
:
14px
;
font-size
:
10px
;
color
:
#fff
;
left
:
15px
;
}
}
span
{
cursor
:
pointer
;
.login-v
{
img
{
width
:
35px
;
height
:
35px
;
border-radius
:
35px
;
}
&:hover
{
color
:
#1969F9
;
}
}
.namex
{
margin-left
:
10px
;
margin-right
:
10px
;
font-size
:
12px
;
}
}
.lo-box-drop
{
position
:
relative
;
.item
{
height
:
46px
;
line-height
:
46px
;
text-align
:
center
;
cursor
:
pointer
;
.drop-box
{
display
:
none
;
position
:
absolute
;
width
:
94px
;
height
:
55px
;
padding
:
12px
0
;
left
:
-66px
;
background
:
#FFFFFF
;
box-shadow
:
1px
2px
10px
0px
rgba
(
119
,
135
,
145
,
0.5
);
&::after
{
content
:
""
;
border-style
:
solid
;
border-color
:
transparent
transparent
#fff
transparent
;
border-width
:
7px
;
position
:
absolute
;
top
:
-13px
;
left
:
72px
;
}
a
{
display
:
block
;
width
:
94px
;
height
:
28px
;
line-height
:
28px
;
text-align
:
center
;
font-size
:
14px
;
color
:
#646B78
;
&:hover
{
background
:
#E7F3FF
;
&.act
{
background
:
#F1F4FA
;
position
:
relative
;
&::after
{
content
:
""
;
position
:
absolute
;
left
:
0px
;
top
:
7px
;
width
:
5px
;
height
:
30px
;
background
:
#1969F9
;
}
}
span
{
color
:
#1969F9
;
}
}
&
:hover
{
.icon
{
color
:
#1969F9
;
}
background
:
#F1F4FA
;
}
.drop-box
{
display
:
block
;
}
.icon
{
font-size
:
20px
;
color
:
#646B78
;
}
}
}
}
}
}
.nav-left
{
width
:
226px
;
background
:
#fff
;
position
:
fixed
;
left
:
0px
;
top
:
56px
;
bottom
:
0px
;
.nav-left2
{
width
:
62px
;
background
:
#fff
;
position
:
fixed
;
left
:
0px
;
top
:
56px
;
bottom
:
0px
;
.zankai
{
height
:
26px
;
font-size
:
18px
;
color
:
#646B78
;
line-height
:
26px
;
padding-right
:
5px
;
span
{
cursor
:
pointer
;
&:hover
{
color
:
#1969F9
;
}
}
}
.meau-con
{
width
:
100%
;
overflow
:
auto
;
height
:
100%
;
background
:
#fff
;
.item
{
height
:
46px
;
line-height
:
46px
;
text-align
:
center
;
cursor
:
pointer
;
&.act{
background
:
#F1F4FA
;
position
:
relative
;
&::after
{
content
:
""
;
position
:
absolute
;
left
:
0px
;
top
:
7px
;
width
:
5px
;
height
:
30px
;
background
:
#1969F9
;
}
span
{
color
:
#1969F9
;
}
}
&
:hover
{
background
:
#F1F4FA
;
}
.
el-icon-arrow-down
:
before
{
content
:
"\e790"
;
}
.icon
{
font-size
:
20
px
;
color
:
#646B78
;
}
}
}
.zankai
{
height
:
26
px
;
font-size
:
18px
;
color
:
#646B78
;
line-height
:
26px
;
padding-right
:
17px
;
.nav-left
{
width
:
226px
;
background
:
#fff
;
position
:
fixed
;
left
:
0px
;
top
:
56px
;
bottom
:
0px
;
.meau-con
{
width
:
100%
;
overflow
:
auto
;
height
:
100%
;
background
:
#fff
;
.
el-icon-arrow-down
:
before
{
content
:
"\e790"
;
}
.zankai
{
height
:
26px
;
font-size
:
18px
;
color
:
#646B78
;
line-height
:
26px
;
padding-right
:
17px
;
span
{
cursor
:
pointer
;
transition
:
all
0.5s
;
&:hover
{
color
:
#1969F9
;
}
}
}
span
{
cursor
:
pointer
;
transition
:
all
0.5s
;
.el-menu-item
:focus
,
.el-menu-item
:hover
,
.el-submenu__title
:hover
{
background
:
#F1F4FA
;
}
&:hover
{
color
:
#1969F9
;
}
}
}
.el-submenu.is-opened
,
.indextab.is-active
{
position
:
relative
;
background
:
#F1F4FA
;
.el-menu-item
:focus
,
.el-menu-item
:hover
,
.el-submenu__title
:hover
{
background
:
#F1F4FA
;
}
span
,
.iconfont
{
color
:
#1969F9
;
}
.el-submenu.is-opened
,
.indextab.is-active
{
position
:
relative
;
background
:
#F1F4FA
;
&
::after
{
content
:
""
;
position
:
absolute
;
left
:
0px
;
top
:
7px
;
width
:
5px
;
height
:
30px
;
background
:
#1969F9
;
}
}
span,
.iconfont
{
color
:
#1969F9
;
}
&
::after
{
content
:
""
;
position
:
absolute
;
left
:
0px
;
top
:
7px
;
width
:
5px
;
height
:
30px
;
background
:
#1969F9
;
}
}
.el-menu-item
{
padding-left
:
37px
!important
;
height
:
46px
;
line-height
:
42px
;
.el-menu-item
{
padding-left
:
37px
!important
;
height
:
46px
;
line-height
:
42px
;
.iconfont
{
font-size
:
20px
;
color
:
#646B78
;
margin-right
:
14px
;
}
.iconfont
{
font-size
:
20px
;
color
:
#646B78
;
margin-right
:
14px
;
}
a
{
color
:
#646B78
;
}
a
{
color
:
#646B78
;
}
}
}
.el-submenu__title
{
height
:
46px
;
line-height
:
42px
;
padding-left
:
37px
!important
;
.el-submenu__title
{
height
:
46px
;
line-height
:
42px
;
padding-left
:
37px
!important
;
.iconfont
{
font-size
:
20px
;
color
:
#646B78
;
margin-right
:
14px
;
}
.iconfont
{
font-size
:
20px
;
color
:
#646B78
;
margin-right
:
14px
;
}
a
{
color
:
#646B78
;
}
}
a
{
color
:
#646B78
;
}
}
.el-menu-item-group
{
.el-menu-item-group__title
{
display
:
none
;
}
.el-menu-item-group
{
.el-menu-item-group__title
{
display
:
none
;
}
.el-menu-item
{
font-size
:
14px
!important
;
padding-left
:
80px
!important
;
line-height
:
46px
!important
;
height
:
46px
!important
;
}
}
.el-menu-item
{
font-size
:
14px
!important
;
padding-left
:
80px
!important
;
line-height
:
46px
!important
;
height
:
46px
!important
;
}
}
.el-menu
{
border
:
0px
;
.el-menu
{
border
:
0px
;
.el-menu-item,
.el-submenu__title
{
font-size
:
16px
;
color
:
#646B78
;
}
.el-menu-item,
.el-submenu__title
{
font-size
:
16px
;
color
:
#646B78
;
}
}
}
&
::-webkit-scrollbar
{
width
:
10px
;
}
&
::-webkit-scrollbar
{
width
:
10px
;
}
&
::-webkit-scrollbar-thumb
{
border-radius
:
8px
;
background
:
#fff
;
width
:
10px
;
-webkit-box-shadow
:
inset
0
0
8px
rgba
(
0
,
0
,
0
,
0.2
);
}
&
::-webkit-scrollbar-thumb
{
border-radius
:
8px
;
background
:
#fff
;
width
:
10px
;
-webkit-box-shadow
:
inset
0
0
8px
rgba
(
0
,
0
,
0
,
0.2
);
}
&
::-webkit-scrollbar-track
{
border-radius
:
0
;
background
:
#D2D9E7
;
}
&
::-webkit-scrollbar-track
{
border-radius
:
0
;
background
:
#D2D9E7
;
}
}
}
}
</
style
>
\ No newline at end of file
src/main.js
View file @
80c27c51
...
...
@@ -6,6 +6,7 @@ import directive from './directive'
import
{
http
}
from
'./ajax/index.js'
;
import
axios
from
'axios'
import
{
Message
}
from
'element-ui'
;
import
Util
from
"./tool"
;
//本地环境开启提示信息
Vue
.
config
.
productionTip
=
false
;
...
...
@@ -14,6 +15,7 @@ Vue.config.productionTip = false;
import
'@/assets/css/public/common.min.css'
import
'@/assets/css/font/iconfont.css'
//加载过滤器
Object
.
keys
(
filters
).
forEach
(
key
=>
Vue
.
filter
(
key
,
filters
[
key
]));
...
...
@@ -57,7 +59,6 @@ router.afterEach((to, from, next) => {
}
});
axios
.
interceptors
.
response
.
use
(
res
=>
{
return
res
;
},
error
=>
{
...
...
@@ -65,10 +66,25 @@ axios.interceptors.response.use(res => {
return
Promise
.
reject
(
new
Error
(
error
))
})
//挂载到VUE原型上封装后的http请求
Vue
.
prototype
.
$http
=
http
;
//路由页面回跳处理 mate里面参数 back:true 开启登录态回跳
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
http
(
'get'
,
"/api/user/getuserinfo"
,
{
}).
then
(
data
=>
{
let
res
=
data
.
data
;
if
(
res
.
err_code
===
101
)
{
window
.
location
.
href
=
'/#/login'
}
}).
catch
(
err
=>
{
console
.
log
(
err
.
message
);
})
next
();
});
new
Vue
({
router
,
render
:
(
h
)
=>
h
(
App
),
...
...
src/tool/index.js
View file @
80c27c51
export
default
{
sayHellow
(){
alert
(
"hello"
)
return
true
;
/**
* 设置cookie
* @param name
* @param value
* @param iDay
*/
setCookie
:
function
(
name
,
value
,
time
,
domain
)
{
domain
=
domain
?
";domain="
+
domain
:
""
;
var
Days
=
time
;
var
exp
=
new
Date
();
exp
.
setTime
(
exp
.
getTime
()
+
Days
*
24
*
60
*
60
*
1000
);
document
.
cookie
=
name
+
"="
+
encodeURIComponent
(
value
)
+
";expires="
+
exp
.
toGMTString
()
+
";path=/"
+
domain
;
return
true
;
},
/**
* 获取cookie
* @param name
* @returns {*}
*/
getCookie
:
function
(
name
)
{
var
strCookie
=
document
.
cookie
;
var
arrCookie
=
strCookie
.
split
(
"; "
);
for
(
var
i
=
0
;
i
<
arrCookie
.
length
;
i
++
)
{
var
arr
=
arrCookie
[
i
].
split
(
"="
);
if
(
name
==
arr
[
0
])
{
return
arr
[
1
];
}
}
return
null
;
},
/**
* 删除cookie
* @param name
*/
delCookie
:
function
(
name
)
{
var
exp
=
new
Date
();
exp
.
setTime
(
exp
.
getTime
()
-
1
);
var
cval
=
this
.
getCookie
(
name
);
if
(
cval
!=
null
)
document
.
cookie
=
name
+
"="
+
cval
+
";expires="
+
exp
.
toGMTString
();
}
}
src/views/Index/index.vue
View file @
80c27c51
...
...
@@ -180,12 +180,11 @@
<li
class=
"row rowCenter verCenter"
>
本月
</li>
<li
class=
"row rowCenter verCenter"
>
全年
</li>
</ul>
<el-form-item
label=
"更新日期"
>
<el-date-picker
v-model=
"date"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</el-form-item>
<el-form>
<el-form-item
label=
"更新日期"
>
<el-date-picker
v-model=
"date"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
</el-form-item>
</el-form>
</div>
</div>
<div
class=
"wrap row"
>
...
...
@@ -207,12 +206,13 @@
import
*
as
echarts
from
'echarts'
;
import
{
Button
,
Form
,
FormItem
,
Message
,
DatePicker
}
from
'element-ui'
;
Vue
.
use
(
Button
).
use
(
DatePicker
);
Vue
.
use
(
Form
).
use
(
FormItem
).
use
(
DatePicker
);
export
default
{
name
:
"index"
,
...
...
@@ -223,7 +223,6 @@
},
watch
:
{},
created
()
{
},
mounted
()
{
var
myChart
=
echarts
.
init
(
document
.
getElementById
(
'echarts_box'
));
...
...
src/views/User/login.vue
View file @
80c27c51
...
...
@@ -51,6 +51,7 @@
<
script
>
import
Vue
from
'vue'
;
import
{
Loading
,
Message
}
from
'element-ui'
;
import
Util
from
"../../tool"
;
export
default
{
name
:
"index"
,
...
...
@@ -90,7 +91,6 @@
},
created
()
{
this
.
updateCp
();
Message
(
'2121'
);
},
computed
:
{},
methods
:
{
...
...
@@ -129,7 +129,7 @@
background
:
'rgba(0, 0, 0, 0)'
});
this
.
$http
(
'post'
,
"/auth/login
1
"
,
{
this
.
$http
(
'post'
,
"/auth/login"
,
{
mobile
:
this
.
form
.
mobile
,
password
:
this
.
form
.
password
,
captcha
:
this
.
form
.
captcha
,
...
...
@@ -138,9 +138,11 @@
loadingInstance
.
close
();
let
res
=
data
.
data
;
if
(
res
.
err_code
===
0
)
{
Util
.
setCookie
(
"token"
,
res
.
data
.
api_token
,
1
);
window
.
location
.
href
=
'/'
;
}
else
{
Message
(
res
.
err_msg
);
this
.
updateCp
();
}
}).
catch
(
err
=>
{
loadingInstance
.
close
();
...
...
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