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 d342e223
authored
Jan 12, 2022
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
会话分析UI
1 parent
e253ac8b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
177 additions
and
15 deletions
linkwe-ui/src/components/ChartBar.vue
linkwe-ui/src/components/ChartLine.vue
linkwe-ui/src/components/ChartPie.vue
linkwe-ui/src/views/operateCenter/operateAnalysis/conversationAnalysis/Conversation.vue
linkwe-ui/src/views/operateCenter/operateAnalysis/conversationAnalysis/TabContentstaffContact.vue
linkwe-ui/src/components/ChartBar.vue
View file @
d342e22
...
@@ -4,7 +4,7 @@ import { echartColors } from '@/utils/index'
...
@@ -4,7 +4,7 @@ import { echartColors } from '@/utils/index'
import
merge
from
'lodash.merge'
import
merge
from
'lodash.merge'
export
default
{
export
default
{
// 柱状图
// 柱状图
name
:
'C
c
hartBar'
,
name
:
'ChartBar'
,
components
:
{},
components
:
{},
props
:
{
props
:
{
// X轴坐标数据
// X轴坐标数据
...
@@ -122,7 +122,6 @@ export default {
...
@@ -122,7 +122,6 @@ export default {
{
{
type
:
'category'
,
type
:
'category'
,
data
:
this
.
xData
,
data
:
this
.
xData
,
boundaryGap
:
true
,
axisLine
:
{
axisLine
:
{
lineStyle
:
{
lineStyle
:
{
color
:
'#ccc'
color
:
'#ccc'
...
@@ -135,7 +134,8 @@ export default {
...
@@ -135,7 +134,8 @@ export default {
},
},
axisTick
:
{
axisTick
:
{
// 横坐标刻度
// 横坐标刻度
show
:
false
alignWithLabel
:
true
,
show
:
true
}
}
}
}
],
],
...
@@ -146,6 +146,11 @@ export default {
...
@@ -146,6 +146,11 @@ export default {
lineStyle
:
{
lineStyle
:
{
color
:
'#ccc'
color
:
'#ccc'
}
}
},
axisTick
:
{
// 横坐标刻度
alignWithLabel
:
true
,
show
:
true
}
}
}
}
],
],
...
@@ -164,13 +169,13 @@ export default {
...
@@ -164,13 +169,13 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<div
ref=
"chart"
class=
"c
-c
hart-bar chart"
></div>
<div
ref=
"chart"
class=
"chart-bar chart"
></div>
</
template
>
</
template
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.chart
{
.chart
{
height
:
100%
;
height
:
100%
;
min-width
:
2
00px
;
min-width
:
4
00px
;
min-height
:
2
00px
;
min-height
:
4
00px
;
}
}
</
style
>
</
style
>
linkwe-ui/src/components/ChartLine.vue
View file @
d342e22
...
@@ -169,7 +169,6 @@ export default {
...
@@ -169,7 +169,6 @@ export default {
{
{
type
:
'category'
,
type
:
'category'
,
data
:
this
.
xData
,
data
:
this
.
xData
,
boundaryGap
:
false
,
offset
:
5
,
offset
:
5
,
axisLine
:
{
axisLine
:
{
lineStyle
:
{
lineStyle
:
{
...
@@ -183,6 +182,7 @@ export default {
...
@@ -183,6 +182,7 @@ export default {
},
},
axisTick
:
{
axisTick
:
{
// 横坐标刻度
// 横坐标刻度
alignWithLabel
:
true
,
show
:
true
show
:
true
}
}
}
}
...
...
linkwe-ui/src/components/ChartPie.vue
0 → 100644
View file @
d342e22
<
script
>
import
*
as
echarts
from
'echarts'
import
{
echartColors
}
from
'@/utils/index'
import
merge
from
'lodash.merge'
export
default
{
// 折线图
name
:
'ChartPie'
,
components
:
{},
props
:
{
// 图例
legend
:
{
type
:
Array
,
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
:
{
type
:
Array
,
default
:
()
=>
[
{
value
:
1048
,
name
:
'Search Engine'
},
{
value
:
735
,
name
:
'Direct'
},
{
value
:
580
,
name
:
'Email'
},
{
value
:
484
,
name
:
'Union Ads'
},
{
value
:
300
,
name
:
'Video Ads'
}
]
},
// 自定义图表配置项,使用loadsh.merge(origin, option)和原有的配置进行覆盖合并
// loadsh.merge: https://www.html.cn/doc/lodash/#_mergeobject-sources
option
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{}
},
computed
:
{},
watch
:
{
series
()
{
this
.
drawChart
()
}
},
created
()
{},
mounted
()
{
this
.
drawChart
()
},
methods
:
{
drawChart
()
{
// eslint-disable-next-line
this
.
myChart
=
echarts
.
init
(
this
.
$refs
.
chart
)
let
option
=
{
color
:
echartColors
,
// title: {
// text: 'Stacked Area Chart',
// left: 'center',
// top: 'bottom'
// },
tooltip
:
{
textStyle
:
{
color
:
'#FFF'
,
// 设置文字颜色
fontSize
:
12
},
trigger
:
'item'
,
backgroundColor
:
'#505050'
,
borderWidth
:
0
,
axisPointer
:
{
type
:
'cross'
,
label
:
{
backgroundColor
:
'#6a7985'
}
}
},
legend
:
{
x
:
'center'
,
y
:
'88%'
,
selectedMode
:
false
,
type
:
'scroll'
,
// 分页类型
icon
:
'circle'
,
itemWidth
:
8
,
itemHeight
:
8
,
tooltip
:
{
show
:
true
},
textStyle
:
{
color
:
'#36363A'
,
fontSize
:
12
,
lineHeight
:
14
}
},
grid
:
{
left
:
'3%'
,
right
:
'3%'
,
bottom
:
'20px'
,
top
:
'30px'
,
containLabel
:
true
},
series
:
[
{
type
:
'pie'
,
radius
:
'50%'
,
data
:
this
.
series
,
emphasis
:
{
itemStyle
:
{
shadowBlur
:
10
,
shadowOffsetX
:
0
,
shadowColor
:
'rgba(0, 0, 0, 0.5)'
}
}
}
]
}
this
.
option
&&
merge
(
option
,
this
.
option
)
option
&&
this
.
myChart
.
setOption
(
option
)
new
ResizeObserver
((
entries
)
=>
{
this
.
myChart
.
resize
()
}).
observe
(
this
.
$refs
.
chart
)
}
}
}
</
script
>
<
template
>
<div
ref=
"chart"
class=
"chart-pie chart"
></div>
</
template
>
<
style
lang=
"scss"
scoped
>
.chart
{
height
:
100%
;
min-width
:
200px
;
min-height
:
200px
;
}
</
style
>
linkwe-ui/src/views/operateCenter/operateAnalysis/conversationAnalysis/Conversation.vue
View file @
d342e22
<
script
>
<
script
>
import
ChartPie
from
'@/components/ChartPie'
import
TabContent
from
'../components/TabContent'
import
TabContent
from
'../components/TabContent'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
components
:
{
TabContent
},
components
:
{
TabContent
,
ChartPie
},
data
()
{
data
()
{
return
{
return
{
cardData
:
[
cardData
:
[
...
@@ -56,6 +57,16 @@ export default {
...
@@ -56,6 +57,16 @@ export default {
<div>
<div>
<div>
数据占比
</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>
...
@@ -70,4 +81,8 @@ export default {
...
@@ -70,4 +81,8 @@ export default {
</div>
</div>
</
template
>
</
template
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
>
.chart-pie
{
height
:
400px
;
}
</
style
>
linkwe-ui/src/views/operateCenter/operateAnalysis/conversationAnalysis/TabContentstaffContact.vue
View file @
d342e22
<
script
>
<
script
>
import
ChartBar
from
'@/components/ChartBar'
import
ChartBar
from
'@/components/ChartBar'
import
ChartLine
from
'@/components/ChartLine'
import
SelectUser
from
'@/components/SelectUser'
import
SelectUser
from
'@/components/SelectUser'
import
{
getList
}
from
'@/api/drainageCode/staff'
import
{
getList
}
from
'@/api/drainageCode/staff'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
components
:
{
Chart
Line
,
Chart
Bar
,
SelectUser
},
components
:
{
ChartBar
,
SelectUser
},
props
:
{
props
:
{
type
:
{
type
:
{
type
:
String
,
type
:
String
,
...
@@ -200,14 +199,17 @@ export default {
...
@@ -200,14 +199,17 @@ export default {
</div>
</div>
<el-row
:gutter=
"10"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<Chart
Line
:xData=
"xData"
:legend=
"legend['customerGroup']"
:series=
"series"
></ChartLine
>
<Chart
Bar
:xData=
"xData"
:legend=
"legend['customerGroup']"
:series=
"series"
></ChartBar
>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<ChartLine
<ChartBar
:xData=
"xData"
:legend=
"legend['customerGroupMember']"
:legend=
"legend['customerGroupMember']"
:series=
"series"
:series=
"series"
></ChartLine>
:option=
"
{
xAxis: [{ type: 'value' }],
yAxis: [{ type: 'category', data: [1, 2, 3, 4, 5] }]
}"
>
</ChartBar>
</el-col>
</el-col>
</el-row>
</el-row>
</div>
</div>
...
...
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