Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
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
new-sing
admin-base
Commits
fd64af22
Commit
fd64af22
authored
Oct 25, 2018
by
王
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关注统计
parent
3012460f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
5 deletions
+89
-5
index.vue
src/components/lesson/index.vue
+0
-1
index.vue
src/components/watchCount/index.vue
+83
-4
api.js
src/service/api.js
+6
-0
No files found.
src/components/lesson/index.vue
View file @
fd64af22
...
...
@@ -52,7 +52,6 @@
label=
"实体包数量"
>
</el-table-column>
<el-table-column
v-if=
"!$store.state.readonly"
width=
"250"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
...
...
src/components/watchCount/index.vue
View file @
fd64af22
<
template
>
<div>
关注统计
</div>
<div
class=
"index"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"时间"
>
<el-date-picker
v-model=
"searchFrom.watchTime"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
value-format=
"yyyy-MM-dd"
end-placeholder=
"结束日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"6"
:offset=
"6"
>
<el-form-item
style=
"float: right"
>
<el-button
type=
"primary"
plain
@
click=
"getList"
>
搜索
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:data=
"tableData"
border
style=
"width: 100%"
>
<el-table-column
v-for=
"(data, index) in tableHead"
:key=
"data"
:label=
"data"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
[
index
]
}}
</
template
>
</el-table-column>
</el-table>
</div>
</template>
<
script
>
export
default
{
name
:
"index"
import
{
getWatchListApi
}
from
"../../service/api"
;
export
default
{
name
:
"index"
,
data
(){
return
{
searchFrom
:
{
watchTime
:
[]
},
tableData
:
[],
tableHead
:[]
}
},
methods
:
{
defaultTime
(){
let
date
=
new
Date
();
let
year
=
date
.
getFullYear
();
let
Month
=
date
.
getMonth
()
+
1
;
if
(
Month
<
10
){
Month
=
`0
${
Month
}
`
}
let
Day
=
date
.
getDate
();
if
(
Day
<
10
)
Day
=
`0
${
Day
}
`
let
star
=
`
${
year
}
-
${
Month
}
-01`
;
let
end
=
`
${
year
}
-
${
Month
}
-
${
Day
}
`
this
.
searchFrom
.
watchTime
=
[
star
,
end
]
},
getList
(){
let
json
=
{
};
if
(
this
.
searchFrom
.
watchTime
&&
this
.
searchFrom
.
watchTime
.
length
>
0
){
json
.
start_at
=
this
.
searchFrom
.
watchTime
[
0
]
json
.
end_at
=
this
.
searchFrom
.
watchTime
[
1
]
}
getWatchListApi
(
json
).
then
((
res
)
=>
{
this
.
tableHead
=
res
[
0
]
this
.
tableData
=
res
.
slice
(
1
);
})
},
},
mounted
(){
this
.
defaultTime
();
this
.
getList
();
}
}
</
script
>
<
style
scoped
>
.index
{
padding
:
20px
0
;
}
</
style
>
src/service/api.js
View file @
fd64af22
...
...
@@ -549,3 +549,9 @@ const getQrCodeListUrl = '/api/admin/wechat/qrcode/list';
export
const
getQrCodeListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
getQrCodeListUrl
,
json
)
};
// 每日关注取关统计
const
getWatchListUrl
=
'/api/admin/open/subscribe/statistics'
;
export
const
getWatchListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
getWatchListUrl
,
json
)
};
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