Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 c226e8c7
authored
Mar 30, 2023
by
姜鹏凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
裂变详情
1 parent
206c3c39
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
144 additions
and
7 deletions
linkwe-pc/src/views/application/common/Statistics.vue
linkwe-pc/src/views/application/taskGroup/api.js
linkwe-pc/src/views/application/taskGroup/detail.vue
linkwe-pc/src/views/drainageCode/pullNews/collectionStatistics.vue
linkwe-pc/src/views/application/common/Statistics.vue
View file @
c226e8c
...
@@ -6,13 +6,57 @@
...
@@ -6,13 +6,57 @@
<search-title
:showMore=
"true"
@
search=
"getLineData"
></search-title>
<search-title
:showMore=
"true"
@
search=
"getLineData"
></search-title>
<chart-line
style=
"height: 300px;"
:legend=
"legend"
:xData=
"xdata"
:series=
"series"
></chart-line>
<chart-line
style=
"height: 300px;"
:legend=
"legend"
:xData=
"xdata"
:series=
"series"
></chart-line>
</div>
</div>
<div
class=
"g-card"
>
<div
class=
"g-card-title"
>
数据报表
</div>
<div
style=
"display: flex; justify-content: space-between;"
>
<search-title
:showMore=
"true"
@
search=
"getTableFn"
></search-title>
<el-button
type=
"primary"
size=
"mini"
@
click=
"exportFn"
v-loading=
"exportLoading"
>
导出Excel
</el-button>
</div>
<el-table
v-loading=
"loading"
:data=
"tableList"
style=
"width: 100%;"
>
<el-table-column
label=
"日期"
align=
"center"
min-width=
"100"
prop=
"dateTime"
show-overflow-tooltip
/>
<el-table-column
label=
"完成任务老客总数"
align=
"center"
prop=
"completeTaskOldCustomerNum"
min-width=
"100"
show-overflow-tooltip
></el-table-column>
<el-table-column
label=
"裂变新客总数"
align=
"center"
prop=
"fissionCustomerNum"
min-width=
"100"
show-overflow-tooltip
></el-table-column>
<el-table-column
label=
"今日完成任务老客数"
align=
"center"
prop=
"tdCompleteTaskOldCustomerNum"
min-width=
"120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label=
"今日裂变新客数"
align=
"center"
prop=
"tdFissionCustomerNum"
min-width=
"120"
show-overflow-tooltip
></el-table-column>
</el-table>
<pagination
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getTableChangeSize()"
/>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
dateFormat
}
from
'@/utils/index'
import
{
dateFormat
}
from
'@/utils/index'
import
ChartLine
from
'@/components/ChartLine.vue'
import
ChartLine
from
'@/components/ChartLine.vue'
import
SearchTitle
from
'@/components/SearchTitle.vue'
import
SearchTitle
from
'@/components/SearchTitle.vue'
import
{
getTotal
,
getLineData
}
from
'../taskGroup/api'
import
{
getTotal
,
getLineData
,
getTableData
,
getTableExport
}
from
'../taskGroup/api'
export
default
{
export
default
{
name
:
'fission-statistics'
,
name
:
'fission-statistics'
,
components
:
{
components
:
{
...
@@ -27,12 +71,17 @@
...
@@ -27,12 +71,17 @@
},
},
watch
:
{
watch
:
{
fissionType
(
val
)
{
fissionType
(
val
)
{
if
(
val
==
1
)
{
this
.
legend
=
[
'完成任务老客数'
,
'裂变新客数'
]
}
else
{
this
.
legend
=
[
'完成任务客户数'
,
'裂变新客数'
]
}
this
.
$forceUpdate
()
this
.
$forceUpdate
()
}
}
},
},
data
()
{
data
()
{
return
{
return
{
legend
:
[
'
访问总数(pv)'
,
'访问总人数(uv)'
,
'小程序打开
数'
],
legend
:
[
'
完成任务老客数'
,
'裂变新客
数'
],
xdata
:
[],
xdata
:
[],
series
:
[],
series
:
[],
cardData
:
[
cardData
:
[
...
@@ -69,7 +118,18 @@
...
@@ -69,7 +118,18 @@
}
}
],
],
value
:
[],
value
:
[],
id
:
''
id
:
''
,
exportLoading
:
false
,
tableList
:
[],
loading
:
false
,
total
:
0
,
query
:
{
pageSize
:
10
,
pageNum
:
1
,
beginTime
:
''
,
endTime
:
''
},
tableSearch
:
{}
}
}
},
},
methods
:
{
methods
:
{
...
@@ -87,12 +147,64 @@
...
@@ -87,12 +147,64 @@
},
},
getLineData
(
data
)
{
getLineData
(
data
)
{
this
.
$forceUpdate
()
this
.
$forceUpdate
()
data
.
promotionI
d
=
this
.
id
data
.
i
d
=
this
.
id
getLineData
(
data
).
then
(({
data
})
=>
{
getLineData
(
data
).
then
(({
data
})
=>
{
this
.
xdata
=
data
.
xAxis
let
arr1
=
[]
this
.
series
=
[
data
.
yAxis
.
pv
,
data
.
yAxis
.
uv
,
data
.
yAxis
.
open
]
let
arr2
=
[]
let
arr3
=
[]
data
.
forEach
((
dd
)
=>
{
arr1
.
push
(
dd
.
date
)
arr2
.
push
(
dd
.
completeTaskOldCustomerNum
)
arr3
.
push
(
dd
.
fissionCustomerNum
)
})
this
.
xdata
=
arr1
this
.
series
=
[
arr2
,
arr3
]
this
.
$forceUpdate
()
this
.
$forceUpdate
()
})
})
},
exportFn
()
{
this
.
$confirm
(
'确认导出吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
this
.
exportLoading
=
true
return
getTableExport
(
Object
.
assign
({},
this
.
tableSearch
))
})
.
then
((
res
)
=>
{
if
(
res
)
{
let
blob
=
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel'
})
let
url
=
window
.
URL
.
createObjectURL
(
blob
)
const
link
=
document
.
createElement
(
'a'
)
// 创建a标签
link
.
href
=
url
link
.
download
=
'数据明细-'
+
dateFormat
(
new
Date
())
+
'.xlsx'
// 重命名文件
link
.
click
()
URL
.
revokeObjectURL
(
url
)
}
})
.
catch
((
error
)
=>
{
console
.
error
(
error
)
})
.
finally
(()
=>
{
this
.
exportLoading
=
false
})
},
getTableChangeSize
()
{
this
.
loading
=
true
getTableData
(
Object
.
assign
({},
this
.
query
)).
then
((
res
)
=>
{
this
.
tableList
=
res
.
rows
this
.
total
=
Number
(
res
.
total
)
this
.
loading
=
false
})
},
getTableFn
(
data
)
{
this
.
tableSearch
=
data
this
.
loading
=
true
this
.
query
.
id
=
this
.
id
this
.
query
.
beginTime
=
data
.
beginTime
this
.
query
.
endTime
=
data
.
endTime
this
.
getTableChangeSize
()
}
}
},
},
created
()
{
created
()
{
...
...
linkwe-pc/src/views/application/taskGroup/api.js
View file @
c226e8c
...
@@ -58,3 +58,28 @@ export function getTotal(id) {
...
@@ -58,3 +58,28 @@ export function getTotal(id) {
url
:
wecom
+
'/findWeFissionTab/'
+
id
url
:
wecom
+
'/findWeFissionTab/'
+
id
})
})
}
}
// 统计 折线图
export
function
getLineData
(
data
)
{
return
request
({
url
:
wecom
+
'/findWeFissionTrend'
,
params
:
data
})
}
// 统计 表格
export
function
getTableData
(
data
)
{
return
request
({
url
:
wecom
+
'/findWeFissionDataReport'
,
params
:
data
})
}
// 统计 导出
export
function
getTableExport
(
data
)
{
return
request
({
url
:
wecom
+
'/exportWeFissionDataReport'
,
params
:
data
,
responseType
:
'blob'
})
}
linkwe-pc/src/views/application/taskGroup/detail.vue
View file @
c226e8c
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<el-button
<el-button
v-if=
"form.fassionState == 1"
v-if=
"form.fassionState == 1"
type=
"primary"
type=
"primary"
@
click=
"$router.push(
{ path: './add', query: { id: id } })"
@
click=
"$router.push(
{ path: './add', query: { id:
$route.query.
id } })"
>
>
编辑
编辑
</el-button>
</el-button>
...
...
linkwe-pc/src/views/drainageCode/pullNews/collectionStatistics.vue
View file @
c226e8c
This diff is collapsed.
Click to expand it.
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