Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
front-backend
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
framework
front-backend
Commits
e1d18217
Commit
e1d18217
authored
Dec 23, 2018
by
郑杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update dashboard
parent
a3c118e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
20 deletions
+13
-20
src/views/dashboard/admin/components/PanelGroup.vue
+12
-5
src/views/dashboard/admin/index.vue
+1
-15
No files found.
src/views/dashboard/admin/components/PanelGroup.vue
View file @
e1d18217
...
...
@@ -49,16 +49,23 @@
<
script
>
import
CountTo
from
'vue-count-to'
import
{
get
}
from
'@/api/visits'
export
default
{
components
:
{
CountTo
},
props
:
{
count
:
{
type
:
Object
,
required
:
true
data
()
{
return
{
count
:
{
newIp
:
0
,
newVisits
:
0
,
recentIp
:
0
,
recentVisits
:
0
}
}
},
mounted
()
{
get
().
then
(
res
=>
{
this
.
count
.
newIp
=
res
.
newIp
this
.
count
.
newVisits
=
res
.
newVisits
this
.
count
.
recentIp
=
res
.
recentIp
this
.
count
.
recentVisits
=
res
.
recentVisits
})
}
}
</
script
>
...
...
src/views/dashboard/admin/index.vue
View file @
e1d18217
...
...
@@ -3,7 +3,7 @@
<github-corner
style=
"position: absolute; top: 0px; border: 0; right: 0;"
/>
<panel-group
:count=
"count"
/>
<panel-group/>
<el-row
style=
"background:#fff;padding:16px 16px 0;margin-bottom:32px;"
>
<line-chart/>
...
...
@@ -36,7 +36,6 @@ import LineChart from './components/LineChart'
import
RaddarChart
from
'./components/RaddarChart'
import
PieChart
from
'./components/PieChart'
import
BarChart
from
'./components/BarChart'
import
{
get
}
from
'@/api/visits'
export
default
{
name
:
'DashboardAdmin'
,
components
:
{
...
...
@@ -46,19 +45,6 @@ export default {
RaddarChart
,
PieChart
,
BarChart
},
data
()
{
return
{
count
:
{
newIp
:
0
,
newVisits
:
0
,
recentIp
:
0
,
recentVisits
:
0
}
}
},
mounted
()
{
get
().
then
(
res
=>
{
this
.
count
.
newIp
=
res
.
newIp
this
.
count
.
newVisits
=
res
.
newVisits
this
.
count
.
recentIp
=
res
.
recentIp
this
.
count
.
recentVisits
=
res
.
recentVisits
})
}
}
</
script
>
...
...
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