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 dc08bbef
authored
Feb 13, 2022
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
会话存档分析,升级echart至最新v5.3.0
1 parent
5a0982b5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
189 additions
and
113 deletions
linkwe-ui/package.json
linkwe-ui/src/api/operateCenter/conversationAnalysis.js
linkwe-ui/src/components/ChartPie.vue
linkwe-ui/src/views/operateCenter/operateAnalysis/conversationAnalysis/Archive.vue
linkwe-ui/src/views/operateCenter/operateAnalysis/conversationAnalysis/Conversation.vue
linkwe-ui/src/views/operateCenter/operateAnalysis/conversationAnalysis/index.vue
linkwe-ui/package.json
View file @
dc08bbe
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
"benz-amr-recorder"
:
"^1.1.3"
,
"benz-amr-recorder"
:
"^1.1.3"
,
"clipboard"
:
"2.0.4"
,
"clipboard"
:
"2.0.4"
,
"core-js"
:
"^3.20.2"
,
"core-js"
:
"^3.20.2"
,
"echarts"
:
"
4.2.1
"
,
"echarts"
:
"
^5.3.0
"
,
"element-ui"
:
"^2.15.6"
,
"element-ui"
:
"^2.15.6"
,
"fabric"
:
"^4.6.0"
,
"fabric"
:
"^4.6.0"
,
"file-saver"
:
"2.0.1"
,
"file-saver"
:
"2.0.1"
,
...
...
linkwe-ui/src/api/operateCenter/conversationAnalysis.js
View file @
dc08bbe
...
@@ -109,3 +109,28 @@ export function realDataExportGroup(params) {
...
@@ -109,3 +109,28 @@ export function realDataExportGroup(params) {
params
params
})
})
}
}
/**
* 会话存档同意明细
* @param {*} params
* deptIds 否[]部门
userIds 否[]员工
beginTime 是 开始时间
endTime 是 结束时间
*/
export
function
getArchiveList
(
params
)
{
return
request
({
url
:
service
+
'/archive/details'
,
params
})
}
/**
* 会话存档数据分析
* @param {*} params
*/
export
function
getAnalysisArchive
()
{
return
request
({
url
:
service
+
'/archive/getAnalysis'
})
}
linkwe-ui/src/components/ChartPie.vue
View file @
dc08bbe
...
@@ -14,13 +14,6 @@ export default {
...
@@ -14,13 +14,6 @@ export default {
default
:
()
=>
[
'新增客户'
]
default
:
()
=>
[
'新增客户'
]
},
},
// 展示数据集
// 展示数据集
// [
// { value: 1048, name: 'Search Engine' },
// { value: 735, name: 'Direct' },
// { value: 580, name: 'Email' },
// { value: 484, name: 'Union Ads' },
// { value: 300, name: 'Video Ads' }
// ]
series
:
{
series
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[
default
:
()
=>
[
...
@@ -80,7 +73,7 @@ export default {
...
@@ -80,7 +73,7 @@ export default {
legend
:
{
legend
:
{
x
:
'center'
,
x
:
'center'
,
y
:
'88%'
,
y
:
'88%'
,
selectedMode
:
false
,
//
selectedMode: false,
type
:
'scroll'
,
// 分页类型
type
:
'scroll'
,
// 分页类型
icon
:
'circle'
,
icon
:
'circle'
,
itemWidth
:
8
,
itemWidth
:
8
,
...
@@ -101,20 +94,18 @@ export default {
...
@@ -101,20 +94,18 @@ export default {
top
:
'30px'
,
top
:
'30px'
,
containLabel
:
true
containLabel
:
true
},
},
series
:
[
series
:
{
{
type
:
'pie'
,
type
:
'pie'
,
radius
:
'50%'
,
radius
:
'50%'
,
data
:
this
.
series
,
data
:
this
.
series
,
emphasis
:
{
emphasis
:
{
itemStyle
:
{
itemStyle
:
{
shadowBlur
:
10
,
shadowBlur
:
10
,
shadowOffsetX
:
0
,
shadowOffsetX
:
0
,
shadowColor
:
'rgba(0, 0, 0, 0.5)'
shadowColor
:
'rgba(0, 0, 0, 0.5)'
}
}
}
}
}
]
}
}
}
this
.
option
&&
merge
(
option
,
this
.
option
)
this
.
option
&&
merge
(
option
,
this
.
option
)
option
&&
this
.
myChart
.
setOption
(
option
)
option
&&
this
.
myChart
.
setOption
(
option
)
...
...
linkwe-ui/src/views/operateCenter/operateAnalysis/conversationAnalysis/Archive.vue
0 → 100644
View file @
dc08bbe
<
script
>
import
ChartPie
from
'@/components/ChartPie'
import
CardGroupIndex
from
'@/components/CardGroupIndex'
import
TabContent
from
'../components/TabContent'
import
{
getAnalysisArchive
,
getArchiveList
}
from
'@/api/operateCenter/conversationAnalysis'
export
default
{
name
:
''
,
components
:
{
TabContent
,
CardGroupIndex
,
ChartPie
},
data
()
{
return
{
loading
:
false
,
// 查询参数
query
:
{
pageNum
:
undefined
,
pageSize
:
undefined
},
cardData
:
[],
pieData
:
{},
total
:
0
,
// 表格数据
list
:
[]
}
},
computed
:
{},
watch
:
{},
created
()
{
this
.
getAnalysisArchive
()
this
.
getList
()
},
mounted
()
{},
methods
:
{
getAnalysisArchive
()
{
this
.
loading
=
true
getAnalysisArchive
()
.
then
(({
data
})
=>
{
data
||
(
data
=
{})
this
.
cardData
=
[
{
title
:
'开启会话存档员工'
,
value
:
data
.
openUserCnt
},
{
title
:
'未开启会话存档员工'
,
value
:
data
.
notOpenUserCnt
},
{
title
:
'已同意会话存档客户'
,
value
:
data
.
openCustomerCnt
},
{
title
:
'未同意会话存档客户'
,
value
:
data
.
notOpenCustomerCnt
}
]
this
.
pieData
.
staff
=
[
{
name
:
'开启'
,
value
:
(
data
.
openUserCnt
/
(
data
.
openUserCnt
+
data
.
notOpenUserCnt
||
1
))
*
100
},
{
name
:
'未开启'
,
value
:
(
data
.
notOpenUserCnt
/
(
data
.
openUserCnt
+
data
.
notOpenUserCnt
||
1
))
*
100
}
]
this
.
pieData
.
customer
=
[
{
name
:
'已同意'
,
value
:
(
data
.
openCustomerCnt
/
(
data
.
openCustomerCnt
+
data
.
notopenCustomerCnt
||
1
))
*
100
},
{
name
:
'未同意'
,
value
:
(
data
.
notOpenCustomerCnt
/
(
data
.
openCustomerCnt
+
data
.
notOpenCustomerCnt
||
1
))
*
100
}
]
})
.
catch
((
e
)
=>
{
console
.
log
(
e
)
})
.
finally
(()
=>
{
this
.
loading
=
false
})
},
getList
()
{
this
.
loading
=
true
getArchiveList
(
this
.
query
)
.
then
(({
rows
,
total
})
=>
{
this
.
list
=
rows
this
.
total
=
Number
(
total
)
})
.
catch
((
e
)
=>
{
console
.
log
(
e
)
})
.
finally
(()
=>
{
this
.
loading
=
false
})
}
}
}
</
script
>
<
template
>
<div>
<CardGroupIndex
:data=
"cardData"
></CardGroupIndex>
<div>
<div>
数据占比
</div>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<ChartPie
:series=
"pieData.staff"
:option=
"
{ series: { tooltip: { valueFormatter: (value) => value + '%' } } }"
>
</ChartPie>
<div
class=
"ac"
>
会话存档员工开启情况统计
</div>
</el-col>
<el-col
:span=
"12"
>
<ChartPie
:series=
"pieData.customer"
:option=
"
{ series: { tooltip: { valueFormatter: (value) => value + '%' } } }"
>
</ChartPie>
<div
class=
"ac"
>
会话存档客户同意情况统计
</div>
</el-col>
</el-row>
</div>
<div>
<div>
会话存档同意明细
</div>
<el-table
:data=
"list"
style=
"width: 100%"
>
<el-table-column
align=
"center"
prop=
"userName"
label=
"存档员工"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"customerName"
label=
"客户"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"openChatTime"
label=
"同意时间"
>
</el-table-column>
</el-table>
<pagination
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
</div>
</div>
</
template
>
<
style
lang=
"scss"
scoped
>
.chart-pie
{
height
:
400px
;
}
</
style
>
linkwe-ui/src/views/operateCenter/operateAnalysis/conversationAnalysis/Conversation.vue
deleted
100644 → 0
View file @
5a0982b
<
script
>
import
ChartPie
from
'@/components/ChartPie'
import
CardGroupIndex
from
'@/components/CardGroupIndex'
import
TabContent
from
'../components/TabContent'
export
default
{
name
:
''
,
components
:
{
TabContent
,
CardGroupIndex
,
ChartPie
},
data
()
{
return
{
cardData
:
[
{
title
:
'开启会话存档员工'
,
value
:
1222453
},
{
title
:
'未开启会话存档员工'
,
value
:
1222453
},
{
title
:
'今日流失客户'
,
value
:
1222453
},
{
title
:
'未同意会话存档客户'
,
value
:
1222453
}
],
active
:
0
}
},
computed
:
{},
watch
:
{},
created
()
{
// this.getList()
},
mounted
()
{},
methods
:
{
getList
()
{
this
.
loading
=
true
getList
(
this
.
query
)
.
then
(({
rows
,
total
})
=>
{
this
.
list
=
rows
this
.
total
=
Number
(
total
)
this
.
loading
=
false
this
.
ids
=
[]
})
.
catch
(()
=>
{
this
.
loading
=
false
})
}
}
}
</
script
>
<
template
>
<div>
<CardGroupIndex
:data=
"cardData"
></CardGroupIndex>
<div>
<div>
数据占比
</div>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<ChartPie></ChartPie>
<div
class=
"ac"
>
会话存档员工开启情况统计
</div>
</el-col>
<el-col
:span=
"12"
>
<ChartPie></ChartPie>
<div
class=
"ac"
>
会话存档客户同意情况统计
</div>
</el-col>
</el-row>
</div>
<div>
<div>
会话存档同意明细
</div>
<el-table
:data=
"data"
style=
"width: 100%"
>
<el-table-column
align=
"center"
prop=
"prop"
label=
"存档员工"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"prop"
label=
"客户"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"prop"
label=
"同意时间"
>
</el-table-column>
</el-table>
<el-pagination
layout=
"prev, pager, next"
:total=
"50"
>
</el-pagination>
</div>
</div>
</
template
>
<
style
lang=
"scss"
scoped
>
.chart-pie
{
height
:
400px
;
}
</
style
>
linkwe-ui/src/views/operateCenter/operateAnalysis/conversationAnalysis/index.vue
View file @
dc08bbe
<
script
>
<
script
>
import
CustomerContact
from
'./CustomerContact'
import
CustomerContact
from
'./CustomerContact'
import
CustomerGroupContact
from
'./CustomerGroupContact'
import
CustomerGroupContact
from
'./CustomerGroupContact'
import
Conversation
from
'./Conversation
'
import
Archive
from
'./Archive
'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
components
:
{
CustomerContact
,
CustomerGroupContact
,
Conversation
},
components
:
{
CustomerContact
,
CustomerGroupContact
,
Archive
},
data
()
{
data
()
{
return
{
return
{
active
:
0
active
:
0
...
@@ -35,7 +35,7 @@ export default {
...
@@ -35,7 +35,7 @@ export default {
<CustomerGroupContact></CustomerGroupContact>
<CustomerGroupContact></CustomerGroupContact>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"会话存档"
>
<el-tab-pane
label=
"会话存档"
>
<
Conversation></Conversation
>
<
Archive></Archive
>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
</
template
>
</
template
>
...
...
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