Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
ferry_web
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jianan
ferry_web
Commits
888b6bfc
Commit
888b6bfc
authored
Mar 14, 2021
by
Mr. Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加日期选择筛选。
parent
bda74861
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
2 deletions
+53
-2
src/views/dashboard/admin/index.vue
+53
-2
No files found.
src/views/dashboard/admin/index.vue
View file @
888b6bfc
...
@@ -31,6 +31,20 @@
...
@@ -31,6 +31,20 @@
</el-col>
</el-col>
</el-row>
</el-row>
<el-card
:bordered=
"false"
:body-style=
"
{padding: '5'}" :style="{ marginBottom: '12px', textAlign: 'center' }">
<el-date-picker
v-model=
"querys"
type=
"daterange"
align=
"right"
unlink-panels
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:picker-options=
"pickerOptions"
@
change=
"timeScreening"
/>
</el-card>
<el-card
:bordered=
"false"
:body-style=
"
{padding: '0'}" :style="{ marginBottom: '12px' }">
<el-card
:bordered=
"false"
:body-style=
"
{padding: '0'}" :style="{ marginBottom: '12px' }">
<div
class=
"salesCard"
>
<div
class=
"salesCard"
>
<div>
<div>
...
@@ -90,7 +104,36 @@ export default {
...
@@ -90,7 +104,36 @@ export default {
count
:
{}
count
:
{}
},
},
rankList
:
[],
rankList
:
[],
submitData
:
[]
submitData
:
[],
querys
:
''
,
queryList
:
{},
pickerOptions
:
{
shortcuts
:
[{
text
:
'最近一周'
,
onClick
(
picker
)
{
const
end
=
new
Date
()
const
start
=
new
Date
()
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
7
)
picker
.
$emit
(
'pick'
,
[
start
,
end
])
}
},
{
text
:
'最近一个月'
,
onClick
(
picker
)
{
const
end
=
new
Date
()
const
start
=
new
Date
()
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
30
)
picker
.
$emit
(
'pick'
,
[
start
,
end
])
}
},
{
text
:
'最近三个月'
,
onClick
(
picker
)
{
const
end
=
new
Date
()
const
start
=
new
Date
()
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
90
)
picker
.
$emit
(
'pick'
,
[
start
,
end
])
}
}]
}
}
}
},
},
created
()
{
created
()
{
...
@@ -98,9 +141,17 @@ export default {
...
@@ -98,9 +141,17 @@ export default {
},
},
methods
:
{
methods
:
{
getInitData
()
{
getInitData
()
{
initData
().
then
(
response
=>
{
initData
(
this
.
queryList
).
then
(
response
=>
{
this
.
dashboardValue
=
response
.
data
this
.
dashboardValue
=
response
.
data
})
})
},
timeScreening
()
{
console
.
log
(
this
.
querys
)
if
(
this
.
querys
.
length
>
1
)
{
this
.
queryList
.
start_time
=
this
.
querys
[
0
]
this
.
queryList
.
end_time
=
this
.
querys
[
1
]
this
.
getInitData
()
}
}
}
}
}
}
}
...
...
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