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
b8684593
Commit
b8684593
authored
Nov 12, 2018
by
wangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加微信统计菜单
parent
7c6a9161
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
103 additions
and
0 deletions
+103
-0
index.vue
src/components/weChatStatistics/index.vue
+92
-0
menuList.js
src/util/menuList.js
+11
-0
No files found.
src/components/weChatStatistics/index.vue
0 → 100644
View file @
b8684593
<
template
>
<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"
@
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
>
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/util/menuList.js
View file @
b8684593
...
...
@@ -298,6 +298,17 @@ export default [
component
:
e
=>
require
([
'@/components/watchCount'
],
e
),
}
},
{
value
:
'微信统计'
,
routerName
:
'weChatStatistics'
,
path
:
'/weChatStatistics'
,
cover
:
'7-10'
,
router
:{
path
:
'/weChatStatistics'
,
name
:
'weChatStatistics'
,
component
:
e
=>
require
([
'@/components/weChatStatistics'
],
e
),
}
},
{
value
:
'外部投放管理'
,
routerName
:
'externalLaunch'
,
...
...
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