Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
gh
/
renewal-interest-data-board
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit dcb5157f
authored
Jul 10, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加登录鉴权,修改样式
1 parent
808ef0b6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
100 additions
and
15 deletions
src/components/StaticRank.vue
src/components/ViewContentBottom.vue
src/components/ViewContentRight.vue
src/components/ViewTabs.vue
src/router/index.js
src/router/routes.js
src/utils/util.js
src/views/login/index.vue
src/components/StaticRank.vue
View file @
dcb5157
...
...
@@ -42,7 +42,7 @@ export default {
margin
:
0
3px
;
.rank-wrap
{
height
:
9%
;
height
:
8.
9%
;
display
:
grid
;
grid-template-columns
:
8%
77%
15%
;
color
:
#FFFFFF
;
...
...
src/components/ViewContentBottom.vue
View file @
dcb5157
...
...
@@ -21,6 +21,8 @@
<el-form-item
label=
'品牌'
size=
'mini'
>
<el-select
size=
'mini'
class=
'gl-select'
:popper-append-to-body=
'false'
v-model=
'renewalSearchForm.brandName'
placeholder=
'请选择品牌'
...
...
@@ -35,6 +37,7 @@
</el-form-item>
<el-form-item
label=
'查询时间'
size=
'mini'
>
<el-date-picker
class=
"top-date"
size=
'mini'
value-format=
'yyyy-MM-dd'
v-model=
'renewalSearchForm.withdrawalTime'
...
...
@@ -365,9 +368,62 @@ export default {
}
</
script
>
<
style
lang=
'scss'
>
/* 日历样式 */
.el-picker-panel
{
background
:
#333
!important
;
color
:
#ffffff
;
//
border
:
1px
solid
#93bee7
!important
;
}
//
.el-picker-panel
.el-date-range-picker__time-header
{
//
border-bottom
:
1px
solid
#93bee7
!important
;
//
}
.el-picker-panel__icon-btn
{
width
:
8px
;
height
:
10px
;
color
:
#EB6001
!important
;
}
.el-picker-panel
.el-input__inner
{
background-color
:
#333
;
//
border
:
#75ebf2
;
color
:
#fff
;
}
.el-picker-panel
.el-date-range-picker__header
{
color
:
#fff
;
}
.el-picker-panel
.el-date-table
th
{
color
:
#fff
;
}
.el-picker-panel
.el-date-table
td
.available
{
//
width
:
14px
;
//
height
:
14px
;
//
font-size
:
16px
;
//
font-family
:
Source
Han
Sans
CN
;
font-weight
:
bold
;
color
:
#fff
;
}
.el-picker-panel
.el-date-table
td
.available
:hover
{
color
:
#ffffff
;
}
.el-date-table
td
.end-date
span
,
.el-date-table
td
.start-date
span
{
background-color
:
#EB6001
!important
;
}
.el-date-table
td
.today
span
{
color
:
#EB6001
!important
;
}
.el-picker-panel
.el-date-table
td
.available
{
color
:
#c5c5c5
;
}
.el-select-dropdown__list
{
background
:
#333
;
}
</
style
>
<
style
lang=
'scss'
scoped
>
.high-light-num
{
color
:
#EB6001
;
color
:
#FFF
;
//
font-weight
:
700
;
}
.activity-Name
{
//
width
:
100%
;
...
...
@@ -398,6 +454,12 @@ export default {
height
:
76px
;
display
:
flex
;
align-items
:
center
;
/deep/.el-select-dropdown__item.selected{
color
:
#EB6001
;
}
/
deep
/
.el-date-table
td
.available
today
span
{
color
:
red
!important
;
}
/
deep
/
.el-form-item__label
{
color
:
#E8E8E8
;
...
...
@@ -465,7 +527,7 @@ export default {
/
deep
/
.el-table
tr
{
background-color
:
#353535
;
color
:
#
FFFFFF
;
color
:
#
C2C2C2
;
}
/
deep
/
.el-table
.cell
{
...
...
src/components/ViewContentRight.vue
View file @
dcb5157
...
...
@@ -32,9 +32,7 @@ export default {
getRank
(){
this
.
api
.
renewal
.
getRanking
().
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
console
.
log
(
res
)
this
.
totalRank
=
res
.
data
.
dataList
console
.
log
(
this
.
totalRank
)
}
})
}
...
...
@@ -44,7 +42,7 @@ export default {
<
style
scoped
lang=
'scss'
>
.right
{
width
:
98%
;
display
:
grid
;
grid-template-columns
:
25%
25%
25%
25%
;
}
...
...
src/components/ViewTabs.vue
View file @
dcb5157
This diff is collapsed.
Click to expand it.
src/router/index.js
View file @
dcb5157
...
...
@@ -8,5 +8,17 @@
*/
import
router
from
'./router'
import
{
keeps
}
from
'./routes'
export
const
keepAlives
=
keeps
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
// 如果用户访问的登录页,直接放行
if
(
to
.
path
===
'/login'
)
return
next
()
// 从sessionStorage中获取到保存的token值
const
tokenStr
=
window
.
sessionStorage
.
getItem
(
'token'
)
// 没有token,强制跳转到登录页
if
(
!
tokenStr
)
return
next
(
'/login'
)
next
()
})
export
default
router
src/router/routes.js
View file @
dcb5157
...
...
@@ -63,7 +63,7 @@ const getPages = _ => {
if
(
e
.
meta
&&
e
.
meta
.
keepAlive
)
keepAlives
.
push
(
name
)
return
route
})
console
.
log
(
router
)
return
[...
router
]
}
...
...
src/utils/util.js
View file @
dcb5157
...
...
@@ -5,7 +5,7 @@ import { Toast, Dialog } from 'vant'
* 日期格式化
* let time = new Date().format('yyyy-MM-dd hh:mm:ss')
*/
Date
.
prototype
.
format
=
function
(
fmt
)
{
Date
.
prototype
.
format
=
function
(
fmt
)
{
let
o
=
{
'M+'
:
this
.
getMonth
()
+
1
,
//月份
'd+'
:
this
.
getDate
(),
//日
...
...
@@ -31,7 +31,7 @@ const throttle = (fn, gapTime) => {
gapTime
=
1500
}
let
_lastTime
=
null
return
function
()
{
return
function
()
{
let
_nowTime
=
+
new
Date
()
if
(
_nowTime
-
_lastTime
>
gapTime
||
!
_lastTime
)
{
fn
.
apply
(
this
,
arguments
)
...
...
@@ -45,7 +45,6 @@ const decimal = (num, fixed) => {
return
Math
.
round
(
num
*
pow
)
/
pow
}
const
toTop
=
()
=>
{
let
bodySrcollTop
=
document
.
body
.
scrollTop
if
(
bodySrcollTop
!==
0
)
{
...
...
@@ -98,9 +97,9 @@ const getNMonth = (n, fmt = 'yyyy-MM-dd') => {
return
new
Date
(
new
Date
().
setMonth
(
new
Date
().
getMonth
()
+
n
)).
format
(
fmt
)
}
const
debounce
=
function
(
func
,
wait
=
200
)
{
const
debounce
=
function
(
func
,
wait
=
200
)
{
let
timeout
return
function
(
event
)
{
return
function
(
event
)
{
clearTimeout
(
timeout
)
timeout
=
setTimeout
(()
=>
{
func
.
call
(
this
,
event
)
...
...
@@ -112,6 +111,14 @@ const setChartFontSize = fontSize => {
if
(
!
clientWidth
)
return
fontSize
return
fontSize
*
clientWidth
/
1440
}
const
toThousands
=
n
=>
{
return
n
&&
n
.
toString
().
replace
(
/
\d
+/
,
function
(
m
)
{
return
m
.
replace
(
/
(\d)(?=(\d{3})
+$
)
/g
,
function
(
y
)
{
return
y
+
','
})
})
}
const
utils
=
{
getParams
,
getQuery
,
...
...
@@ -123,7 +130,8 @@ const utils = {
getNDate
,
getNMonth
,
debounce
,
setChartFontSize
setChartFontSize
,
toThousands
}
Object
.
keys
(
utils
).
map
(
key
=>
{
...
...
src/views/login/index.vue
View file @
dcb5157
...
...
@@ -51,6 +51,7 @@ export default {
}
else
{
if
(
Object
.
keys
(
this
.
accountPassword
).
includes
(
user
))
{
if
(
pwd
==
this
.
accountPassword
[
user
])
{
window
.
sessionStorage
.
setItem
(
'token'
,
'xixixihhhhhxixixi12345sfascasf'
)
this
.
$router
.
push
(
'./home'
)
}
else
{
this
.
$message
.
error
(
'密码错误'
)
...
...
@@ -118,18 +119,22 @@ export default {
justify-content
:
center
;
//
align-items
:
center
;
position
:
relative
;
.authorization-wrap
{
margin-bottom
:
10%
;
.password-wrap{
.password-wrap
{
margin-top
:
20px
;
}
.user-input
{
.user-input
{
/deep/
.el-input__inner
{
background
:
linear-gradient
(
269deg
,
#ff660000
0%
,
#fb6900
c7
51%
,
#FA6A00
98%
);
border
:
none
;
//
opacity
:
0.67
;
color
:
#FFFFFF
;
}
/
deep
/
.el-input__inner
::placeholder
{
color
:
#FFFFFF
;
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment