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 dc35c1fb
authored
Feb 16, 2022
by
姜鹏凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
场景统计
1 parent
fe524ca1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
37 deletions
linkwe-ui/src/api/drainageCode/customerService.js
linkwe-ui/src/views/customerService/components/SearchTitle.vue
linkwe-ui/src/views/customerService/searchRecord/index.vue
linkwe-ui/src/views/customerService/statistics/scene.vue
linkwe-ui/src/api/drainageCode/customerService.js
View file @
dc35c1f
...
...
@@ -109,4 +109,43 @@ export function getResultDetail (params) {
url
:
service
+
'/wecom/kf/record/detail'
,
params
:
params
})
}
// 场景分析 抬头数据
export
function
getSceneTotal
()
{
return
request
({
url
:
service
+
'/wecom/kf/statistic/scene/getAnalysis'
})
}
// 场景分析 数据趋势 客户总数/实时数据
export
function
getLineChartTotal
(
params
)
{
return
request
({
url
:
service
+
'/wecom/kf/statistic/scene/getRealCnt'
,
params
})
}
// 场景分析 访问场景 top5
export
function
getBarTop5Total
(
params
)
{
return
request
({
url
:
service
+
'/wecom/kf/statistic/scene/getRankCnt'
,
params
})
}
// 场景分析 数据报表
export
function
getTableTotal
(
params
)
{
return
request
({
url
:
service
+
'/wecom/kf/statistic/scene/getRealPageCnt'
,
params
})
}
// 场景分析 数据报表 导出
export
function
getTableExport
(
params
)
{
return
request
({
url
:
service
+
'/wecom/kf/statistic/scene/real/export'
,
params
})
}
\ No newline at end of file
linkwe-ui/src/views/customerService/components/SearchTitle.vue
View file @
dc35c1f
...
...
@@ -8,19 +8,21 @@
</el-button-group>
</div>
<div
class=
"item"
v-if=
"active === 3"
>
<el-date-picker
style=
"width: 250px;"
size=
"mini"
v-model=
"value"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
<el-date-picker
style=
"width: 250px;"
@
change=
"setTime"
size=
"mini"
clearable
v-model=
"value"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</div>
<div
class=
"item"
v-if=
"showScene"
>
<el-select
size=
"mini"
v-model=
"value2"
placeholder=
"请选择场景"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
<!--
<el-select
size=
"mini"
v-model=
"data."
placeholder=
"请选择场景"
clearable
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
-->
<el-select
size=
"mini"
@
change=
"submit()"
v-model=
"data.scenes"
clearable
placeholder=
"请选择场景"
>
<el-option
value=
""
label=
"全部场景"
></el-option>
<el-option
v-for=
"(data, index) in sceneList"
:key=
"index"
:value=
"data.id"
:label=
"data.name"
></el-option>
</el-select>
</div>
<div
class=
"item"
v-if=
"showMember"
>
<el-select
size=
"mini"
v-model=
"value2"
placeholder=
"请选择客服"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</div>
<div
class=
"item"
v-if=
"showMember"
>
...
...
@@ -32,16 +34,18 @@
</div>
</
template
>
<
script
>
import
moment
from
'moment'
import
{
getSceneList
}
from
'@/api/drainageCode/customerService.js'
export
default
{
name
:
'search-title'
,
props
:
{
showScene
:{
showScene
:
{
type
:
Boolean
,
default
:
false
},
showMember
:
{
type
:
Boolean
,
default
:
false
default
:
false
}
},
data
()
{
...
...
@@ -49,13 +53,51 @@
active
:
1
,
value
:
[],
options
:
[{
value
:
10
,
label
:
'1123'
}],
value2
:
''
value2
:
''
,
data
:
{
scenes
:
''
,
userIds
:
''
,
beginTime
:
''
,
endTime
:
''
},
sceneList
:
[]
}
},
methods
:
{
submit
()
{
console
.
log
(
this
.
data
)
this
.
$emit
(
'search'
,
this
.
data
)
},
setTime
(
e
)
{
if
(
e
)
{
this
.
data
.
beginTime
=
moment
(
e
[
0
]).
format
(
'YYYY-MM-DD'
)
this
.
data
.
endTime
=
moment
(
e
[
1
]).
format
(
'YYYY-MM-DD'
)
}
else
{
this
.
data
.
beginTime
=
''
this
.
data
.
endTime
=
''
}
this
.
submit
()
},
setType
(
type
)
{
this
.
active
=
type
}
if
(
type
===
1
)
{
const
weekStart
=
moment
().
subtract
(
6
,
'days'
).
format
(
'YYYY-MM-DD'
)
const
weekEnd
=
moment
().
format
(
'YYYY-MM-DD'
)
this
.
data
.
beginTime
=
weekStart
this
.
data
.
endTime
=
weekEnd
this
.
submit
()
}
else
if
(
type
===
2
)
{
this
.
data
.
endTime
=
moment
().
format
(
"YYYY-MM-DD"
)
this
.
data
.
beginTime
=
moment
().
subtract
(
29
,
'days'
).
format
(
"YYYY-MM-DD"
)
this
.
submit
()
}
},
},
created
()
{
getSceneList
({
pageSize
:
1000
}).
then
(
dd
=>
{
this
.
sceneList
=
dd
.
rows
})
this
.
setType
(
1
)
}
}
</
script
>
...
...
linkwe-ui/src/views/customerService/searchRecord/index.vue
View file @
dc35c1f
...
...
@@ -60,7 +60,7 @@
</el-table-column>
<el-table-column
label=
"接待员工"
align=
"center"
min-width=
"100"
prop=
"userName"
>
<
template
slot-scope=
"{ row }"
>
{{
row
.
receptionType
===
1
?
userName
:
'-'
}}
{{
row
.
receptionType
===
1
?
row
.
userName
:
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"咨询开始时间"
align=
"center"
prop=
"sessionStartTime"
width=
"180"
></el-table-column>
...
...
@@ -124,33 +124,13 @@
},
methods
:
{
showResultList
(
data
)
{
//
getResultDetail({ openKfId: data.openKfId, externalUserId: data.externalUserId }).then(res => {
getResultDetail
({
openKfId
:
data
.
openKfId
,
externalUserId
:
data
.
externalUserId
}).
then
(
res
=>
{
this
.
showPreviewDialog
=
true
this
.
detail
=
[{
"content"
:
"string"
,
"customerAvatar"
:
"string"
,
"customerName"
:
"string"
,
"externalUserId"
:
"string"
,
"kfAvatar"
:
"string"
,
"kfName"
:
"string"
,
"msgId"
:
"string"
,
"msgType"
:
"string"
,
"openKfId"
:
"string"
,
"origin"
:
3
,
"sendTime"
:
"2022-02-14T15:40:11.085Z"
},
{
"content"
:
"string"
,
"customerAvatar"
:
"string"
,
"customerName"
:
"string"
,
"externalUserId"
:
"string"
,
"kfAvatar"
:
"string"
,
"kfName"
:
"string"
,
"msgId"
:
"string"
,
"msgType"
:
"string"
,
"openKfId"
:
"string"
,
"origin"
:
5
,
"sendTime"
:
"2022-02-14T15:40:11.085Z"
},]
// })
this
.
detail
=
res
.
rows
this
.
detail
.
forEach
(
dd
=>
{
dd
.
content
=
JSON
.
parse
(
dd
.
content
).
content
})
})
},
exportFn
()
{
this
.
$confirm
(
'确认导出吗?'
,
'提示'
,
{
...
...
linkwe-ui/src/views/customerService/statistics/scene.vue
View file @
dc35c1f
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