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 5a0982b5
authored
Feb 13, 2022
by
姜鹏凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客服功能
1 parent
ba5b726c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
962 additions
and
117 deletions
linkwe-ui/src/api/drainageCode/customerService.js
linkwe-ui/src/views/customerService/components/ShowCustomerSevice.vue
linkwe-ui/src/views/customerService/components/ShowInPhonePre.vue
linkwe-ui/src/views/customerService/components/WelcomeInPhonePre.vue
linkwe-ui/src/views/customerService/customerServiceManage/add.vue
linkwe-ui/src/views/customerService/customerServiceManage/index.vue
linkwe-ui/src/views/customerService/customerServiceManage/part1.vue
linkwe-ui/src/views/customerService/customerServiceManage/part2.vue
linkwe-ui/src/views/customerService/customerServiceManage/part3.vue
linkwe-ui/src/views/customerService/sceneManage/index.vue
linkwe-ui/src/views/customerService/searchRecord/index.vue
linkwe-ui/src/api/drainageCode/customerService.js
View file @
5a0982b
...
@@ -17,11 +17,38 @@ export function addService (data) {
...
@@ -17,11 +17,38 @@ export function addService (data) {
})
})
}
}
// 客服编辑
export
function
editService
(
data
)
{
return
request
({
url
:
service
+
'/wecom/kf/edit/account'
,
method
:
'post'
,
data
:
data
})
}
// 删除客服
// 删除客服
export
function
remove
(
id
)
{
export
function
remove
(
id
)
{
return
request
({
return
request
({
url
:
service
+
'/wecom/kf/delete/'
+
id
,
url
:
service
+
'/wecom/kf/delete/'
+
id
,
params
method
:
'delete'
})
}
// 客服详情
export
function
getDetail
(
id
)
{
return
request
({
url
:
service
+
'/wecom/kf/get/'
+
id
})
}
// 批量下载场景二维码
export
function
downloadBatch
(
ids
)
{
return
request
({
url
:
service
+
"/wecom/kf/scenes/batch/download"
,
params
:
{
ids
:
ids
},
responseType
:
'blob'
})
})
}
}
...
@@ -53,7 +80,25 @@ export function editScene (data) {
...
@@ -53,7 +80,25 @@ export function editScene (data) {
// 删除场景
// 删除场景
export
function
deleteScene
(
ids
)
{
export
function
deleteScene
(
ids
)
{
console
.
log
(
33333
)
return
request
({
url
:
service
+
'/wecom/kf/scenes/delete/'
+
ids
,
method
:
'delete'
})
}
// 咨询记录列表
export
function
getResultList
(
params
)
{
return
request
({
url
:
service
+
'/wecom/kf/record/list'
,
params
})
}
// 咨询记录导出
export
function
exportResult
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/wecom/kf/scenes/delete/'
+
ids
url
:
service
+
'/wecom/kf/record/export'
,
params
:
params
})
})
}
}
\ No newline at end of file
\ No newline at end of file
linkwe-ui/src/views/customerService/components/ShowCustomerSevice.vue
View file @
5a0982b
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
props
:
{
props
:
{
url
:
{
url
:
{
type
:
String
,
type
:
String
,
default
:
'
测试
'
default
:
''
},
},
name
:
{
name
:
{
type
:
String
,
type
:
String
,
default
:
'
测试
'
default
:
''
},
},
showicon
:
{
showicon
:
{
type
:
Boolean
,
type
:
Boolean
,
...
...
linkwe-ui/src/views/customerService/components/ShowInPhonePre.vue
0 → 100644
View file @
5a0982b
<
template
>
<div
class=
"preview"
>
<div
class=
"title"
>
{{
name
}}
</div>
<div
class=
"content"
>
<div
v-if=
"def ==='info'"
>
<div
class=
"show"
>
<div
class=
"show_img"
>
<img
:src=
"avator"
style=
"width: 40px; height: 40px"
></img>
</div>
<div
class=
"show_name"
>
<div
class=
"length-limit"
>
{{
call
}}
@
{{
companyName
}}
</div>
<div
class=
"sub"
>
{{
call
}}
为你服务
</div>
</div>
</div>
</div>
<div
v-else
>
<div
class=
"show"
>
<div
class=
"show_img"
>
<img
:src=
"avator"
style=
"width: 40px; height: 40px"
></img>
</div>
<div
class=
"show_name"
>
<div
class=
"length-limit"
>
{{
call
}}
</div>
<div
class=
"company"
>
@
{{
companyName
}}
</div>
</div>
</div>
<div
class=
"comp"
>
企业信息
</div>
<div
class=
"company-info"
>
<span>
企业
</span>
<span
style=
"color: #999;"
>
{{
companyName
}}
</span>
<span
style=
"color: #999;"
>
>
</span>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
Cookies
from
'js-cookie'
import
ShowCustomerService
from
"../components/ShowCustomerSevice.vue"
import
hearder
from
'@/assets/drainageCode/header.png'
import
*
as
api
from
'@/api/enterpriseId'
export
default
{
name
:
'preview-client'
,
components
:
{
ShowCustomerService
},
props
:
{
name
:
{
type
:
String
,
default
:
"客服"
},
def
:
{
type
:
String
,
default
:
'info'
},
avator
:
{
type
:
String
,
default
:
''
},
call
:
{
type
:
String
,
defalut
:
''
}
},
data
()
{
return
{
hearder
:
hearder
,
companyName
:
''
}
},
computed
:
{},
created
()
{
},
methods
:
{
getDetail
()
{
this
.
loading
=
true
api
.
getDetail
()
.
then
(({
data
})
=>
{
this
.
companyName
=
data
.
companyName
Cookies
.
set
(
'companyName'
,
data
.
companyName
)
})
.
catch
(()
=>
{
this
.
loading
=
false
})
},
},
created
()
{
if
(
!
Cookies
.
get
(
'companyName'
))
{
this
.
getDetail
()
}
else
{
this
.
companyName
=
Cookies
.
get
(
'companyName'
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.preview
{
margin
:
0
auto
;
position
:
relative
;
width
:
300px
;
height
:
640px
;
background
:
url(../../../assets/drainageCode/preview-bg.png)
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
.title
{
position
:
absolute
;
top
:
37px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
font-size
:
14px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
}
.content
{
position
:
absolute
;
height
:
545px
;
width
:
280px
;
overflow-y
:
auto
;
top
:
70px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
border-bottom-left-radius
:
20px
;
border-bottom-right-radius
:
20px
;
.comp
{
//
line-height
:
40px
;
font-size
:
12px
;
color
:
#333
;
//
height
:
40px
;
padding
:
10px
;
background-color
:
#f5f5f5
;
//
margin
:
10px
-20px
;
}
.company-info
{
background-color
:
#fff
;
padding
:
10px
;
font-size
:
14px
;
display
:
flex
;
justify-content
:
space-between
;
}
.show
{
padding
:
10px
;
//
height
:
40px
;
background-color
:
#fff
;
display
:
flex
;
align-items
:
center
;
.show_img
{
margin-right
:
7px
;
height
:
40px
;
width
:
40px
;
}
.show_name
{
height
:
40px
;
line-height
:
normal
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
flex-start
;
justify-content
:
space-between
;
font-size
:
12px
;
.company
{
color
:
#ffcf0e
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.sub
{
font-size
:
12px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
//
color
:
#999999
;
}
.length-limit
{
width
:
200px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
}
}
}
}
</
style
>
linkwe-ui/src/views/customerService/components/WelcomeInPhonePre.vue
0 → 100644
View file @
5a0982b
<
template
>
<div
class=
"preview"
>
<div
class=
"title"
>
{{
name
}}
</div>
<div
class=
"content"
>
<div
class=
"none"
v-if=
"def === 'welcome'"
>
<div
class=
"none"
v-if=
"data.receptionType === 1"
>
<div
class=
"time"
>
{{
time
}}
</div>
<div
class=
"item"
v-if=
"data.splitTime === 1"
>
<div
class=
"avatar"
><img
class=
"img-st"
:src=
"avatar"
></div>
<div
class=
"msg"
>
<div
class=
"word"
>
{{
data
.
welcome
[
0
].
content
}}
</div>
</div>
</div>
<div
class=
"none"
v-else
>
<div
class=
"item"
v-for=
"(unit, key) in data.welcome"
>
<div
class=
"avatar"
><img
class=
"img-st"
:src=
"avatar"
></div>
<div
class=
"msg"
>
<div
class=
"word"
>
{{
unit
.
content
}}
</div>
</div>
</div>
</div>
</div>
<div
v-else
>
<div
class=
"time"
>
{{
time
}}
</div>
<div
class=
"item"
>
<div
class=
"avatar"
><img
class=
"img-st"
:src=
"avatar"
></div>
<div
class=
"msg"
>
<div
class=
"word"
>
{{
data
.
welcome
[
0
].
content
}}
</div>
<div
class=
"menu-list"
>
<div
class=
"menu"
v-for=
"(item, key) in data.welcome[0].menuList"
@
click=
"setClick(item)"
>
{{
item
.
name
}}
</div>
</div>
</div>
</div>
<div
v-if=
"list.length"
>
<template
v-for=
"(unit,key) in list"
>
<div
class=
"item right"
>
<div
class=
"right-msg"
>
<div
class=
"word"
>
{{
unit
.
name
}}
</div>
</div>
<div
class=
"avatar"
><img
class=
"img-st"
src=
"../../../assets/drainageCode/header.png"
></div>
</div>
<div
v-if=
"key === 0"
class=
"text-sub"
>
已接入智能助手
</div>
<div
class=
"item"
>
<div
class=
"avatar"
><img
class=
"img-st"
:src=
"avatar"
></div>
<div
class=
"msg"
v-if=
"unit.type === 'click'"
>
<div
class=
"word"
>
{{
unit
.
content
}}
</div>
</div>
<div
class=
"msg"
v-else-if=
"unit.type === 'view'"
>
<div
class=
"word-and-image"
>
<div
class=
"sub-content"
>
<div>
<!--
{{
data
.
materialUrl
}}
-->
</div>
<div>
<img
src=
"../../../assets/drainageCode/default_icon.png"
/>
</div>
</div>
</div>
</div>
<div
class=
"msg"
v-else
>
<div
class=
"miniprogram"
>
<div
class=
"mini-header"
>
<img
src=
"../../../assets/drainageCode/miniprogram-icon.png"
alt=
""
>
</div>
<img
class=
"mini-img"
src=
"../../../assets/drainageCode/miniprogram-img.png"
>
<div
class=
"mini-footer"
>
<img
src=
"../../../assets/drainageCode/miniprogram-link.png"
/>
小程序
</div>
</div>
</div>
</div>
</
template
>
</div>
</div>
</div>
<div
v-else
>
<div
class=
"time"
>
{{time}}
</div>
<div
class=
"item"
>
<div
class=
"avatar"
><img
class=
"img-st"
:src=
"avatar"
></div>
<div
class=
"msg"
>
<div
class=
"word"
>
{{data.queueNoticeContent}}
</div>
</div>
</div>
<div
class=
"time"
style=
"margin-top: 20px;"
>
{{time}}
</div>
<div
class=
"item"
>
<div
class=
"avatar"
><img
class=
"img-st"
:src=
"avatar"
></div>
<div
class=
"msg"
>
<div
class=
"word"
>
{{data.timeOutContent}}
</div>
</div>
</div>
<div
class=
"time"
style=
"margin-top: 20px;"
>
{{time}}
</div>
<div
class=
"item"
>
<div
class=
"avatar"
><img
class=
"img-st"
:src=
"avatar"
></div>
<div
class=
"msg"
>
<div
class=
"word"
>
{{data.endContent}}
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<
script
>
import
moment
from
'moment'
export
default
{
name
:
'customer-preview-client-welcome'
,
components
:
{},
props
:
{
def
:
{
type
:
String
,
default
:
'welcome'
},
name
:
{
type
:
String
,
default
:
""
},
avatar
:
{
type
:
String
,
default
:
""
},
data
:
{
type
:
Object
,
default
:
{}
},
show
:
{
type
:
Boolean
,
default
:
false
}
},
watch
:
{
show
:
'setList'
,
},
data
()
{
return
{
list
:
[],
time
:
moment
().
format
(
'HH:mm'
)
}
},
computed
:
{},
created
()
{
},
mounted
()
{
},
methods
:
{
setClick
(
item
)
{
this
.
list
.
push
(
item
)
},
setList
()
{
this
.
list
=
[]
}
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.menu-list
{
margin
:
10px
;
.menu
{
margin
:
10px
0
;
color
:
#2c8cf0
;
cursor
:
pointer
;
}
}
.none
{
display
:
inline-block
;
}
.text-sub
{
margin
:
10px
0
;
text-align
:
center
;
font-size
:
12px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#999999
;
}
.img-st
{
height
:
24px
;
width
:
24px
;
}
.preview
{
margin
:
0
auto
;
position
:
relative
;
width
:
300px
;
height
:
640px
;
background
:
url(../../../assets/drainageCode/preview-bg.png)
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
.title
{
position
:
absolute
;
top
:
37px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
font-size
:
14px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
}
.content
{
position
:
absolute
;
height
:
545px
;
width
:
280px
;
overflow-y
:
auto
;
top
:
70px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
border-bottom-left-radius
:
20px
;
border-bottom-right-radius
:
20px
;
padding
:
20px
;
.time
{
width
:
100%
;
text-align
:
center
;
//
margin-bottom
:
10px
;
}
.item
{
font-size
:
12px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#666666
;
display
:
flex
;
margin-top
:
20px
;
}
.right
{
display
:
flex
;
justify-content
:
flex-end
;
}
.avatar
{
margin-right
:
5px
;
}
.msg
{
position
:
relative
;
min-height
:
26px
;
background
:
#ffffff
;
box-shadow
:
0px
2px
6px
0px
rgba
(
60
,
136
,
240
,
0.1
);
border
:
1px
solid
#e1edfc
;
display
:
inline-block
;
border-radius
:
4px
;
box-sizing
:
border-box
;
word-break
:
break-all
;
margin-left
:
5px
;
&:before
{
content
:
" "
;
display
:
block
;
position
:
absolute
;
left
:
-5px
;
box-shadow
:
0px
2px
6px
0px
rgba
(
60
,
136
,
240
,
0.1
);
border-width
:
5px
;
border-left
:
0
;
width
:
0
;
border-style
:
solid
;
border-color
:
transparent
;
border-right-color
:
#fff
;
top
:
8px
;
z-index
:
888
;
}
}
.right-msg
{
position
:
relative
;
min-height
:
26px
;
background
:
#ffffff
;
box-shadow
:
0px
2px
6px
0px
rgba
(
60
,
136
,
240
,
0.1
);
border
:
1px
solid
#e1edfc
;
display
:
inline-block
;
border-radius
:
4px
;
box-sizing
:
border-box
;
word-break
:
break-all
;
margin-right
:
5px
;
&:before
{
content
:
" "
;
display
:
block
;
position
:
absolute
;
right
:
-5px
;
box-shadow
:
0px
2px
6px
0px
rgba
(
60
,
136
,
240
,
0.1
);
border-width
:
5px
;
border-right
:
0
;
width
:
0
;
border-style
:
solid
;
border-color
:
transparent
;
border-left-color
:
#fff
;
top
:
8px
;
z-index
:
888
;
}
}
.word
{
padding
:
5px
12px
;
}
.image
{
padding
:
12px
;
img
{
width
:
94px
;
height
:
90px
;
}
}
.word-and-image
{
padding
:
12px
;
.sub-content
{
margin-top
:
10px
;
display
:
flex
;
justify-content
:
space-between
;
font-size
:
12px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#999999
;
img
{
height
:
40px
;
width
:
40px
;
}
}
}
.miniprogram
{
padding
:
12px
;
.mini-header
{
display
:
flex
;
align-items
:
center
;
img
{
height
:
18px
;
width
:
18px
;
margin-right
:
5px
;
}
}
.mini-img
{
margin
:
10px
0
;
width
:
143px
;
height
:
120px
;
}
.mini-footer
{
display
:
flex
;
align-items
:
center
;
img
{
height
:
14px
;
width
:
14px
;
margin-right
:
5px
;
}
}
}
}
}
</
style
>
linkwe-ui/src/views/customerService/customerServiceManage/add.vue
View file @
5a0982b
...
@@ -6,13 +6,13 @@
...
@@ -6,13 +6,13 @@
<el-step
title=
"接待规则"
></el-step>
<el-step
title=
"接待规则"
></el-step>
</el-steps>
</el-steps>
<div
v-show=
"currentActive === 1"
>
<div
v-show=
"currentActive === 1"
>
<part1
@
next=
"getBase"
></part1>
<part1
:isEdit=
"isEdit"
:editData=
"form"
@
next=
"getBase"
></part1>
</div>
</div>
<div
v-show=
"currentActive === 2"
>
<div
v-show=
"currentActive === 2"
>
<part2
@
update=
"getWecome"
></part2>
<part2
:isEdit=
"isEdit"
:name=
'form.name'
:avatar=
"form.avatar"
:editData=
"form"
@
update=
"getWecome"
></part2>
</div>
</div>
<div
v-show=
"currentActive === 3"
>
<div
v-show=
"currentActive === 3"
>
<part3></part3>
<part3
:isEdit=
"isEdit"
:editData=
"form"
:name=
'form.name'
:avatar=
"form.avatar"
@
submit=
"setSubmit"
></part3>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -20,12 +20,15 @@
...
@@ -20,12 +20,15 @@
import
Part1
from
'./part1.vue'
import
Part1
from
'./part1.vue'
import
Part2
from
'./part2.vue'
import
Part2
from
'./part2.vue'
import
Part3
from
'./part3.vue'
import
Part3
from
'./part3.vue'
import
{
addService
}
from
'@/api/drainageCode/customerService.js'
import
{
addService
,
getDetail
,
editService
}
from
'@/api/drainageCode/customerService.js'
export
default
{
export
default
{
name
:
'customer-service-manage-add'
,
name
:
'customer-service-manage-add'
,
data
()
{
data
()
{
return
{
return
{
currentActive
:
1
currentActive
:
1
,
form
:
{},
isEdit
:
false
,
id
:
''
}
}
},
},
components
:
{
components
:
{
...
@@ -35,19 +38,67 @@
...
@@ -35,19 +38,67 @@
},
},
methods
:
{
methods
:
{
getBase
(
data
)
{
getBase
(
data
)
{
console
.
log
(
data
)
this
.
form
.
name
=
data
.
name
this
.
form
.
avatar
=
data
.
avatar
this
.
currentActive
=
2
this
.
currentActive
=
2
},
},
getWecome
(
type
,
data
)
{
getWecome
(
type
,
data
)
{
console
.
log
(
data
)
if
(
type
===
3
)
{
this
.
form
.
receptionType
=
data
.
receptionType
this
.
form
.
splitTime
=
data
.
splitTime
this
.
form
.
welcome
=
data
.
welcome
}
this
.
currentActive
=
type
},
getDetailFn
()
{
getDetail
(
this
.
id
).
then
(
res
=>
{
this
.
form
=
res
.
data
this
.
isEdit
=
true
})
},
setSubmit
(
type
,
data
)
{
if
(
type
===
2
)
{
this
.
currentActive
=
type
this
.
currentActive
=
type
}
else
{
this
.
form
.
userIdList
=
data
.
userIdList
this
.
form
.
allocationWay
=
data
.
allocationWay
this
.
form
.
isPriority
=
data
.
isPriority
this
.
form
.
receiveLimit
=
data
.
receiveLimit
this
.
form
.
queueNotice
=
data
.
queueNotice
this
.
form
.
queueNoticeContent
=
data
.
queueNoticeContent
this
.
form
.
timeOutNotice
=
data
.
timeOutNotice
this
.
form
.
timeOut
=
data
.
timeOut
this
.
form
.
timeOutType
=
data
.
timeOutType
this
.
form
.
timeOutContent
=
data
.
timeOutContent
this
.
form
.
endNotice
=
data
.
endNotice
this
.
form
.
endNoticeTime
=
data
.
endNoticeTime
this
.
form
.
endTimeType
=
data
.
endTimeType
this
.
form
.
endContent
=
data
.
endContent
this
.
form
.
welcome
.
forEach
(
dd
=>
{
dd
.
workCycle
=
dd
.
workCycle
.
join
(
','
)
})
if
(
this
.
form
.
id
)
{
editService
(
this
.
form
).
then
(
res
=>
{
this
.
$message
.
success
(
'操作成功!'
)
this
.
$router
.
go
(
-
1
)
})
}
else
{
addService
(
this
.
form
).
then
(
res
=>
{
this
.
$message
.
success
(
'操作成功!'
)
this
.
$router
.
go
(
-
1
)
})
}
}
}
}
},
},
mounted
()
{
mounted
()
{
},
},
created
()
{
created
()
{
this
.
id
=
this
.
$route
.
query
.
id
if
(
this
.
id
)
{
this
.
getDetailFn
()
}
}
}
}
}
</
script
>
</
script
>
...
...
linkwe-ui/src/views/customerService/customerServiceManage/index.vue
View file @
5a0982b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"g-card g-pad20"
>
<div
class=
"g-card g-pad20"
>
<div
class=
"operation"
>
<div
class=
"operation"
>
<div
class=
"item"
>
<div
class=
"item"
>
<el-button
type=
"primary"
size=
"mini"
:disabled=
"list.length === 10"
@
click=
"addFn"
>
新建客服
</el-button>
<el-button
type=
"primary"
size=
"mini"
:disabled=
"list.length === 10"
@
click=
"addFn
()
"
>
新建客服
</el-button>
<span
class=
"sub"
v-if=
"list.length
< 11
"
>
还可以添加
{{
10
-
list
.
length
}}
个客服
</span>
<span
class=
"sub"
v-if=
"list.length
< 11
"
>
还可以添加
{{
10
-
list
.
length
}}
个客服
</span>
</div>
</div>
<div
class=
"item"
>
<div
class=
"item"
>
...
@@ -17,32 +17,32 @@
...
@@ -17,32 +17,32 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"接待方式"
align=
"center"
min-width=
"100"
prop=
"name"
show-overflow-tooltip
>
<el-table-column
label=
"接待方式"
align=
"center"
min-width=
"100"
prop=
"name"
show-overflow-tooltip
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<div>
{{
row
.
receptionType
===
1
?
'人工客服'
:
receptionType
===
2
?
'智能助手'
:
''
}}
</div>
<div>
{{
row
.
receptionType
===
1
?
'人工客服'
:
r
ow
.
r
eceptionType
===
2
?
'智能助手'
:
''
}}
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"接待员工"
align=
"center"
min-width=
"140"
prop=
"
l
ist"
>
<el-table-column
label=
"接待员工"
align=
"center"
min-width=
"140"
prop=
"
userIdL
ist"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
v-if=
"row.userIdList"
>
<template
v-if=
"row.userList.length
< 2
"
>
<template
v-if=
"row.user
Id
List.length
< 2
"
>
<el-tag
v-for=
"(data, key) in row.userList"
:key=
"key"
size=
"mini"
>
{{
data
.
userName
}}
</el-tag>
<el-tag
v-for=
"(data, key) in row.user
Id
List"
:key=
"key"
size=
"mini"
>
{{
data
.
userName
}}
</el-tag>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<template
v-for=
"(data, key) in row.userList"
>
<template
v-for=
"(data, key) in row.user
Id
List"
>
<el-tag
v-if=
"key
< 2
&&
data
"
:key=
"key"
size=
"mini"
>
{{
data
.
userName
}}
</el-tag>
<el-tag
v-if=
"key
< 2
&&
data
"
:key=
"key"
size=
"mini"
>
{{
data
.
userName
}}
</el-tag>
</
template
>
</
template
>
<el-tag
style=
"cursor:pointer;"
size=
"mini"
@
click=
"moreMemberFn(row)"
>
等{{row.
l
ist.length}}人
</el-tag>
<el-tag
style=
"cursor:pointer;"
size=
"mini"
@
click=
"moreMemberFn(row)"
>
等{{row.
userIdL
ist.length}}人
</el-tag>
</template>
</template>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
label=
"接待场景"
align=
"center"
min-width=
"140"
prop=
"list2"
>
<el-table-column
label=
"接待场景"
align=
"center"
min-width=
"140"
prop=
"list2"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
v-if=
"row.scenesList"
>
<template
v-if=
"row.
kfScenes
.length
< 2
"
>
<template
v-if=
"row.
scenesList
.length
< 2
"
>
<el-tag
v-for=
"(data, key) in row.
kfScenes"
:key=
"key"
size=
"mini"
>
{{
data
.
n
ame
}}
</el-tag>
<el-tag
v-for=
"(data, key) in row.
scenesList"
:key=
"key"
size=
"mini"
>
{{
data
.
scenesN
ame
}}
</el-tag>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<template
v-for=
"(data, key) in row.
kfScenes
"
>
<template
v-for=
"(data, key) in row.
scenesList
"
>
<el-tag
v-if=
"key
< 2
&&
data
"
:key=
"key"
size=
"mini"
>
{{
data
.
n
ame
}}
</el-tag>
<el-tag
v-if=
"key
< 2
&&
data
"
:key=
"key"
size=
"mini"
>
{{
data
.
scenesN
ame
}}
</el-tag>
</
template
>
</
template
>
<el-tag
style=
"cursor:pointer;"
size=
"mini"
@
click=
"gotoScene(row)"
>
等{{row.
kfScenes
.length}}个
</el-tag>
<el-tag
style=
"cursor:pointer;"
size=
"mini"
@
click=
"gotoScene(row)"
>
等{{row.
scenesList
.length}}个
</el-tag>
</template>
</template>
</template>
</template>
</el-table-column>
</el-table-column>
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<el-button
type=
"text"
>
详情
</el-button>
<el-button
type=
"text"
>
详情
</el-button>
<el-divider
direction=
"vertical"
></el-divider>
<el-divider
direction=
"vertical"
></el-divider>
<el-button
type=
"text"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"addFn(row.id)"
>
编辑
</el-button>
<el-divider
direction=
"vertical"
></el-divider>
<el-divider
direction=
"vertical"
></el-divider>
<el-button
type=
"text"
@
click=
"deleteFn(row)"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"deleteFn(row)"
>
删除
</el-button>
</
template
>
</
template
>
...
@@ -131,7 +131,7 @@
...
@@ -131,7 +131,7 @@
},
},
getData
()
{
getData
()
{
getList
().
then
(
res
=>
{
getList
().
then
(
res
=>
{
this
.
list
=
res
.
data
this
.
list
=
res
.
rows
})
})
// this.list[0] = {
// this.list[0] = {
// name: '测试客服',
// name: '测试客服',
...
@@ -158,7 +158,7 @@
...
@@ -158,7 +158,7 @@
})
})
},
},
deleteFn
(
data
)
{
deleteFn
(
data
)
{
if
(
data
.
kfScenes
.
length
)
{
if
(
data
.
scenesList
&&
data
.
scenesList
.
length
)
{
this
.
$confirm
(
'请删除当前客服下所有关联场景后,再删除当前客服。'
,
'提示'
,
{
this
.
$confirm
(
'请删除当前客服下所有关联场景后,再删除当前客服。'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
...
@@ -174,15 +174,16 @@
...
@@ -174,15 +174,16 @@
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
})
}).
then
(()
=>
{
.
then
(()
=>
{
return
remove
(
data
.
id
)
return
remove
(
data
.
id
)
}).
then
(()
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
})
})
.
then
(()
=>
{
this
.
getData
()
this
.
getData
()
this
.
msgSuccess
(
'删除成功'
)
}).
catch
((
res
)
=>
{
})
})
.
catch
(
function
()
{
})
}
}
}
}
},
},
...
...
linkwe-ui/src/views/customerService/customerServiceManage/part1.vue
View file @
5a0982b
...
@@ -22,20 +22,25 @@
...
@@ -22,20 +22,25 @@
</el-col>
</el-col>
<el-col
:span=
"14"
>
<el-col
:span=
"14"
>
<div
class=
"g-card g-pad20"
style=
"height: 100%"
>
<div
class=
"g-card g-pad20"
style=
"height: 100%"
>
yulan
形象预览
<div
class=
"show-content"
>
<show-in-phone
name=
"客服消息"
def=
"info"
:avator=
"base.avatar"
:call=
"base.name"
></show-in-phone>
<show-in-phone
name=
"客服详情"
def=
"detail"
:avator=
"base.avatar"
:call=
"base.name"
></show-in-phone>
</div>
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
ShowInPhone
from
'../components/ShowInPhonePre.vue'
export
default
{
export
default
{
name
:
'customer-service-part1'
,
name
:
'customer-service-part1'
,
data
()
{
data
()
{
return
{
return
{
base
:
{
base
:
{
name
:
''
,
name
:
''
,
avatar
:
'
2222
'
avatar
:
''
},
},
baseRules
:
{
baseRules
:
{
name
:
[{
required
:
true
,
message
:
'请输入客服名称!'
,
trigger
:
'blur'
}],
name
:
[{
required
:
true
,
message
:
'请输入客服名称!'
,
trigger
:
'blur'
}],
...
@@ -43,9 +48,12 @@
...
@@ -43,9 +48,12 @@
}
}
}
}
},
},
components
:
{
ShowInPhone
},
props
:
{
props
:
{
isEdit
:{
isEdit
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
},
},
editData
:
{
editData
:
{
...
@@ -58,6 +66,9 @@
...
@@ -58,6 +66,9 @@
}
}
}
}
},
},
watch
:
{
isEdit
:
'setEdit'
,
},
methods
:
{
methods
:
{
cancelFn
()
{
cancelFn
()
{
this
.
$router
.
go
(
-
1
)
this
.
$router
.
go
(
-
1
)
...
@@ -68,19 +79,27 @@
...
@@ -68,19 +79,27 @@
this
.
$emit
(
'next'
,
this
.
base
)
this
.
$emit
(
'next'
,
this
.
base
)
}
}
})
})
}
},
},
mounted
()
{
setEdit
()
{
if
(
this
.
isEdit
)
{
if
(
this
.
isEdit
)
{
console
.
log
(
this
.
editData
)
this
.
base
.
name
=
this
.
editData
.
name
this
.
base
.
name
=
this
.
editData
.
name
this
.
base
.
avatar
=
this
.
editData
.
avatar
this
.
base
.
avatar
=
this
.
editData
.
avatar
}
}
}
},
mounted
()
{
console
.
log
(
this
.
isEdit
)
},
},
created
()
{
created
()
{
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.show-content
{
margin-top
:
20px
;
display
:
flex
;
}
.sub-des
{
.sub-des
{
font-size
:
12px
;
font-size
:
12px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
...
...
linkwe-ui/src/views/customerService/customerServiceManage/part2.vue
View file @
5a0982b
...
@@ -26,16 +26,16 @@
...
@@ -26,16 +26,16 @@
</el-form-item>
</el-form-item>
<div
v-if=
"form.receptionType === 1"
>
<div
v-if=
"form.receptionType === 1"
>
<el-form-item
label=
"分时段:"
>
<el-form-item
label=
"分时段:"
>
<el-switch
v-model=
"form.splitTime"
:active-value=
2
:inactive-value=
1
></el-switch>
<el-switch
v-model=
"form.splitTime"
@
change=
"setChange"
:active-value=
2
:inactive-value=
1
></el-switch>
<div
class=
"sub-des"
>
<div
class=
"sub-des"
>
开启后,根据咨询时间发送当前时段欢迎语
开启后,根据咨询时间发送当前时段欢迎语
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"form.splitTime == 1"
required
label=
"欢迎语:"
style=
"width: 50%; margin-bottom: 0;"
>
<el-form-item
v-if=
"form.splitTime == 1"
required
label=
"欢迎语:"
style=
"width: 50%; margin-bottom: 0;"
>
<el-input
type=
"textarea"
v-model=
"form.wecome[0].content"
maxlength=
"200"
show-word-limit
placeholder=
"请输入"
:autosize=
"
{ minRows: 5, maxRows: 20 }" clearable />
<el-input
type=
"textarea"
v-model=
"form.we
l
come[0].content"
maxlength=
"200"
show-word-limit
placeholder=
"请输入"
:autosize=
"
{ minRows: 5, maxRows: 20 }" clearable />
</el-form-item>
</el-form-item>
<el-form-item
required
v-if=
"form.splitTime == 2"
label=
"欢迎语:"
>
<el-form-item
required
v-if=
"form.splitTime == 2"
label=
"欢迎语:"
>
<template
v-for=
"(item, index) in form.wecome"
>
<template
v-for=
"(item, index) in form.we
l
come"
>
<el-card
class=
"box-card roster-card"
:key=
"index"
>
<el-card
class=
"box-card roster-card"
:key=
"index"
>
<el-form-item
label=
"工作周期"
>
<el-form-item
label=
"工作周期"
>
<el-checkbox-group
v-model=
"item.workCycle"
@
change=
"checkStartEnd($event, index)"
>
<el-checkbox-group
v-model=
"item.workCycle"
@
change=
"checkStartEnd($event, index)"
>
...
@@ -78,10 +78,10 @@
...
@@ -78,10 +78,10 @@
</div>
</div>
<div
v-if=
"form.receptionType === 2"
>
<div
v-if=
"form.receptionType === 2"
>
<el-form-item
required
label=
"引导语:"
style=
"width: 50%; margin-bottom: 0;"
>
<el-form-item
required
label=
"引导语:"
style=
"width: 50%; margin-bottom: 0;"
>
<el-input
type=
"textarea"
v-model=
"form.wecome[0].content"
maxlength=
"200"
show-word-limit
placeholder=
"请输入"
:autosize=
"{ minRows: 5, maxRows: 20 }"
clearable
/>
<el-input
type=
"textarea"
v-model=
"form.we
l
come[0].content"
maxlength=
"200"
show-word-limit
placeholder=
"请输入"
:autosize=
"{ minRows: 5, maxRows: 20 }"
clearable
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"导航菜单:"
>
<el-form-item
label=
"导航菜单:"
>
<
template
v-for=
"(item, index) in form.wecome[0].menuList"
>
<
template
v-for=
"(item, index) in form.we
l
come[0].menuList"
>
<el-card
class=
"box-card roster-card"
:key=
"index"
>
<el-card
class=
"box-card roster-card"
:key=
"index"
>
<el-form
ref=
"subform"
label-position=
"right"
label-width=
"100px"
>
<el-form
ref=
"subform"
label-position=
"right"
label-width=
"100px"
>
<el-form-item
required
label=
"菜单名称:"
>
<el-form-item
required
label=
"菜单名称:"
>
...
@@ -89,31 +89,31 @@
...
@@ -89,31 +89,31 @@
</el-form-item>
</el-form-item>
<el-form-item
required
label=
"菜单类型:"
>
<el-form-item
required
label=
"菜单类型:"
>
<el-radio-group
v-model=
"item.type"
>
<el-radio-group
v-model=
"item.type"
>
<el-radio
label=
"
1
"
>
文本回复
</el-radio>
<el-radio
label=
"
click
"
>
文本回复
</el-radio>
<el-radio
label=
"view"
>
跳转链接
</el-radio>
<el-radio
label=
"view"
>
跳转链接
</el-radio>
<el-radio
label=
"miniprogram"
>
跳转小程序
</el-radio>
<el-radio
label=
"miniprogram"
>
跳转小程序
</el-radio>
<el-radio
label=
"
2
"
>
转接人工
</el-radio>
<el-radio
label=
"
manual
"
>
转接人工
</el-radio>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-form-item
required
label=
"内容:"
>
<el-form-item
v-if=
"item.type === 'click'"
required
label=
"内容:"
>
<el-input
type=
"textarea"
v-model=
"item.content"
maxlength=
"200"
show-word-limit
placeholder=
"请输入欢迎语"
:autosize=
"
{ minRows: 5, maxRows: 20 }" clearable />
<el-input
type=
"textarea"
v-model=
"item.content"
maxlength=
"200"
show-word-limit
placeholder=
"请输入欢迎语"
:autosize=
"
{ minRows: 5, maxRows: 20 }" clearable />
</el-form-item>
</el-form-item>
<el-form-item
required
label=
"跳转链接:"
>
<el-form-item
v-if=
"item.type === 'view'"
required
label=
"跳转链接:"
>
<el-input
type=
"text"
v-model=
"item.url"
placeholder=
"请输入跳转链接"
/>
<el-input
type=
"text"
v-model=
"item.url"
placeholder=
"请输入跳转链接"
/>
</el-form-item>
</el-form-item>
<el-form-item
required
label=
"小程序ID:"
>
<el-form-item
v-if=
"item.type === 'miniprogram'"
required
label=
"小程序ID:"
>
<el-input
type=
"text"
v-model=
"item.
url"
placeholder=
"请输入小程序ID:"
/>
<el-input
type=
"text"
v-model=
"item.
appId"
placeholder=
"请输入小程序ID:"
/>
</el-form-item>
</el-form-item>
<el-form-item
required
label=
"小程序页面:"
>
<el-form-item
v-if=
"item.type === 'miniprogram'"
required
label=
"小程序页面:"
>
<el-input
type=
"text"
v-model=
"item.url"
placeholder=
"请输入小程序页面路径"
/>
<el-input
type=
"text"
v-model=
"item.url"
placeholder=
"请输入小程序页面路径"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</el-card>
</el-card>
<div
class=
"delete_btn"
>
<div
class=
"delete_btn"
>
<el-button
v-if=
"index !== 0"
type=
"text"
icon=
"el-icon-delete"
@
click=
"onRemoveMenu(index)"
>
删除
</el-button>
<el-button
type=
"text"
icon=
"el-icon-delete"
@
click=
"onRemoveMenu(index)"
>
删除
</el-button>
</div>
</div>
</
template
>
</
template
>
<div
class=
"mt20"
v-if=
"form.we
come[0].menuList.length < 9"
>
<div
v-if=
"form.wel
come[0].menuList.length < 9"
>
<el-button
size=
"mini"
type=
"primary"
plain
@
click=
"onAddMenu"
>
+添加菜单
</el-button>
<el-button
size=
"mini"
type=
"primary"
plain
@
click=
"onAddMenu"
>
+添加菜单
</el-button>
<div
class=
"sub-des"
>
<div
class=
"sub-des"
>
客户点击菜单,客服自动回复
客户点击菜单,客服自动回复
...
@@ -130,13 +130,14 @@
...
@@ -130,13 +130,14 @@
</el-col>
</el-col>
<el-col
style=
"width: 350px"
>
<el-col
style=
"width: 350px"
>
<div
class=
"g-card g-pad20"
style=
"height: 100%"
>
<div
class=
"g-card g-pad20"
style=
"height: 100%"
>
预览
<show-in-phone
:name=
"name"
:avatar=
"avatar"
:data=
"form"
:show=
"show"
></show-in-phone>
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
ShowInPhone
from
'../components/WelcomeInPhonePre.vue'
export
default
{
export
default
{
name
:
'customer-service-part2'
,
name
:
'customer-service-part2'
,
data
()
{
data
()
{
...
@@ -144,19 +145,32 @@
...
@@ -144,19 +145,32 @@
form
:
{
form
:
{
receptionType
:
1
,
receptionType
:
1
,
splitTime
:
1
,
splitTime
:
1
,
wecome
:
[{
we
l
come
:
[{
start
Time
:
''
,
begin
Time
:
''
,
endTime
:
''
,
endTime
:
''
,
workCycle
:
[],
workCycle
:
[],
menuList
:
[],
type
:
1
,
type
:
1
,
content
:
'您好,很高兴为您服务,请问有什么可以帮您?'
content
:
'您好,很高兴为您服务,请问有什么可以帮您?'
}]
}]
,
},
},
show
:
false
}
}
},
},
components
:
{
ShowInPhone
},
props
:
{
props
:
{
isEdit
:{
name
:
{
type
:
Boolean
,
type
:
String
,
default
:
''
},
avatar
:
{
type
:
String
,
default
:
''
},
isEdit
:
{
type
:
Boolean
,
default
:
false
default
:
false
},
},
editData
:
{
editData
:
{
...
@@ -166,7 +180,29 @@
...
@@ -166,7 +180,29 @@
}
}
}
}
},
},
watch
:
{
isEdit
:
'setEdit'
,
},
methods
:
{
methods
:
{
setChange
(
e
)
{
this
.
form
.
welcome
=
[{
beginTime
:
''
,
endTime
:
''
,
workCycle
:
[],
type
:
1
,
content
:
'您好,很高兴为您服务,请问有什么可以帮您?'
,
menuList
:
[]
}]
},
setEdit
()
{
if
(
this
.
idEdit
)
{
this
.
form
=
{
receptionType
:
this
.
editData
.
receptionType
,
splitTime
:
this
.
editData
.
splitTime
,
welcome
:
this
.
editData
.
welcome
}
}
},
nextStep
(
type
)
{
nextStep
(
type
)
{
this
.
$emit
(
'update'
,
type
,
this
.
form
)
this
.
$emit
(
'update'
,
type
,
this
.
form
)
},
},
...
@@ -177,8 +213,8 @@
...
@@ -177,8 +213,8 @@
this
.
form
=
{
this
.
form
=
{
receptionType
:
1
,
receptionType
:
1
,
splitTime
:
1
,
splitTime
:
1
,
wecome
:
[{
we
l
come
:
[{
start
Time
:
''
,
begin
Time
:
''
,
endTime
:
''
,
endTime
:
''
,
workCycle
:
[],
workCycle
:
[],
type
:
1
,
type
:
1
,
...
@@ -190,8 +226,8 @@
...
@@ -190,8 +226,8 @@
this
.
form
=
{
this
.
form
=
{
receptionType
:
2
,
receptionType
:
2
,
splitTime
:
1
,
splitTime
:
1
,
wecome
:
[{
we
l
come
:
[{
start
Time
:
''
,
begin
Time
:
''
,
endTime
:
''
,
endTime
:
''
,
workCycle
:
[],
workCycle
:
[],
type
:
1
,
type
:
1
,
...
@@ -202,8 +238,8 @@
...
@@ -202,8 +238,8 @@
}
}
},
},
onAddRoster
()
{
onAddRoster
()
{
this
.
form
.
wecome
.
push
({
this
.
form
.
we
l
come
.
push
({
start
Time
:
''
,
begin
Time
:
''
,
endTime
:
''
,
endTime
:
''
,
workCycle
:
[],
workCycle
:
[],
type
:
1
,
type
:
1
,
...
@@ -211,19 +247,20 @@
...
@@ -211,19 +247,20 @@
})
})
},
},
onRemoveRoster
(
index
)
{
onRemoveRoster
(
index
)
{
this
.
form
.
wecome
.
splice
(
index
,
1
)
this
.
form
.
we
l
come
.
splice
(
index
,
1
)
},
},
onAddMenu
()
{
onAddMenu
()
{
this
.
form
.
wecome
[
0
].
menuList
.
push
({
this
.
form
.
we
l
come
[
0
].
menuList
.
push
({
name
:
''
,
name
:
''
,
type
:
''
,
type
:
'
click
'
,
content
:
''
,
content
:
''
,
url
:
''
,
url
:
''
,
appId
:
''
appId
:
''
})
})
},
},
onRemoveMenu
(
index
)
{
onRemoveMenu
(
index
)
{
this
.
form
.
wecome
[
0
].
menuList
.
splice
(
index
,
1
)
this
.
form
.
welcome
[
0
].
menuList
.
splice
(
index
,
1
)
this
.
show
=
!
this
.
show
}
}
},
},
mounted
()
{
mounted
()
{
...
...
linkwe-ui/src/views/customerService/customerServiceManage/part3.vue
View file @
5a0982b
...
@@ -34,7 +34,8 @@
...
@@ -34,7 +34,8 @@
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"接待上限:"
>
<el-form-item
label=
"接待上限:"
>
一个接待员工最多同时接待
<el-input-number
v-model=
"form.receiveLimit"
:min=
"2"
:max=
"50"
:controls=
"false"
></el-input-number>
人
一个接待员工最多同时接待
<el-input-number
v-model=
"form.receiveLimit"
:min=
"2"
:max=
"50"
:controls=
"false"
></el-input-number>
人
<div
class=
"sub-des"
>
<div
class=
"sub-des"
>
请输入2~50的正整数,最多支持同时接待50人
请输入2~50的正整数,最多支持同时接待50人
</div>
</div>
...
@@ -51,7 +52,12 @@
...
@@ -51,7 +52,12 @@
<div
class=
"sub-des"
>
<div
class=
"sub-des"
>
开启后,当客户超过指定时间未回复时,将自动发送提示语
开启后,当客户超过指定时间未回复时,将自动发送提示语
</div>
</div>
超过
<el-input
:disabled=
"form.timeOutNotice === 2"
style=
" width:60px;"
:controls=
"false"
v-model=
"form.timeOut"
></el-input>
<el-select
:disabled=
"form.timeOutNotice === 2"
style=
"width:80px;"
v-model=
"form.timeOutType"
>
<el-option
label=
"分钟"
:value=
"1"
></el-option><el-option
label=
"小时"
:value=
"2"
></el-option>
</el-select>
客户未回复时,自动发送提示语
超过
<el-input
:disabled=
"form.timeOutNotice === 2"
style=
" width:60px;"
:controls=
"false"
v-model=
"form.timeOut"
></el-input>
<el-select
:disabled=
"form.timeOutNotice === 2"
style=
"width:80px;"
v-model=
"form.timeOutType"
>
<el-option
label=
"分钟"
:value=
"1"
></el-option>
<el-option
label=
"小时"
:value=
"2"
></el-option>
</el-select>
客户未回复时,自动发送提示语
<el-input
:disabled=
"form.timeOutNotice === 2"
style=
"margin-top: 10px;"
type=
"textarea"
v-model=
"form.timeOutContent"
maxlength=
"200"
show-word-limit
placeholder=
"请输入"
:autosize=
"
{ minRows: 5, maxRows: 20 }" clearable />
<el-input
:disabled=
"form.timeOutNotice === 2"
style=
"margin-top: 10px;"
type=
"textarea"
v-model=
"form.timeOutContent"
maxlength=
"200"
show-word-limit
placeholder=
"请输入"
:autosize=
"
{ minRows: 5, maxRows: 20 }" clearable />
</el-form-item>
</el-form-item>
<el-form-item
label=
"自动结束提醒:"
>
<el-form-item
label=
"自动结束提醒:"
>
...
@@ -59,19 +65,24 @@
...
@@ -59,19 +65,24 @@
<div
class=
"sub-des"
>
<div
class=
"sub-des"
>
开启后,当客户超过指定时间未回复时,将自动结束当前会话
开启后,当客户超过指定时间未回复时,将自动结束当前会话
</div>
</div>
超过
<el-input
:disabled=
"form.endNotice === 2"
style=
" width:60px;"
:controls=
"false"
v-model=
"form.endNoticeTime"
></el-input>
<el-select
:disabled=
"form.endNotice === 2"
style=
"width:80px;"
v-model=
"form.endTimeType"
>
<el-option
label=
"分钟"
:value=
"1"
></el-option><el-option
label=
"小时"
:value=
"2"
></el-option>
</el-select>
客户未回复时,自动发送结束语
超过
<el-input
:disabled=
"form.endNotice === 2"
style=
" width:60px;"
:controls=
"false"
v-model=
"form.endNoticeTime"
></el-input>
<el-select
:disabled=
"form.endNotice === 2"
style=
"width:80px;"
v-model=
"form.endTimeType"
>
<el-option
label=
"分钟"
:value=
"1"
></el-option>
<el-option
label=
"小时"
:value=
"2"
></el-option>
</el-select>
客户未回复时,自动发送结束语
<el-input
:disabled=
"form.endNotice === 2"
style=
"margin-top: 10px;"
type=
"textarea"
v-model=
"form.endContent"
maxlength=
"200"
show-word-limit
placeholder=
"请输入"
:autosize=
"
{ minRows: 5, maxRows: 20 }" clearable />
<el-input
:disabled=
"form.endNotice === 2"
style=
"margin-top: 10px;"
type=
"textarea"
v-model=
"form.endContent"
maxlength=
"200"
show-word-limit
placeholder=
"请输入"
:autosize=
"
{ minRows: 5, maxRows: 20 }" clearable />
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
plain
@
click=
"nextStep(1
)"
>
上一步
</el-button>
<el-button
plain
@
click=
"nextStep(2
)"
>
上一步
</el-button>
<el-button
type=
"primary"
@
click=
"nextStep(3)
"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"nextStep
"
>
确定
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
</el-col>
</el-col>
<el-col
style=
"width: 350px"
>
<el-col
style=
"width: 350px"
>
<div
class=
"g-card g-pad20"
style=
"height: 100%"
>
<div
class=
"g-card g-pad20"
style=
"height: 100%"
>
预览
<show-in-phone
:name=
"name"
:avatar=
"avatar"
:data=
"form"
def=
"rule"
></show-in-phone>
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -79,6 +90,7 @@
...
@@ -79,6 +90,7 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
ShowInPhone
from
'../components/WelcomeInPhonePre.vue'
import
SelectUser
from
'@/components/SelectUser'
import
SelectUser
from
'@/components/SelectUser'
export
default
{
export
default
{
name
:
'customer-service-part3'
,
name
:
'customer-service-part3'
,
...
@@ -91,9 +103,9 @@
...
@@ -91,9 +103,9 @@
receiveLimit
:
50
,
receiveLimit
:
50
,
queueNotice
:
1
,
queueNotice
:
1
,
queueNoticeContent
:
'抱歉,当前所有客服都在接待中,请耐心等待,谢谢。'
,
queueNoticeContent
:
'抱歉,当前所有客服都在接待中,请耐心等待,谢谢。'
,
timeOutNotice
:
1
,
timeOutNotice
:
1
,
timeOut
:
null
,
timeOut
:
null
,
timeOutType
:
1
,
timeOutType
:
1
,
timeOutContent
:
'客服当前仍在等待您的回复哦~'
,
timeOutContent
:
'客服当前仍在等待您的回复哦~'
,
endNotice
:
1
,
endNotice
:
1
,
endNoticeTime
:
null
,
endNoticeTime
:
null
,
...
@@ -106,13 +118,59 @@
...
@@ -106,13 +118,59 @@
}
}
},
},
components
:
{
components
:
{
SelectUser
SelectUser
,
ShowInPhone
},
props
:
{
name
:
{
type
:
String
,
default
:
''
},
avatar
:
{
type
:
String
,
default
:
''
},
isEdit
:
{
type
:
Boolean
,
default
:
false
},
editData
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
}
},
watch
:
{
isEdit
:
'setEdit'
,
},
},
methods
:
{
methods
:
{
setEdit
()
{
if
(
this
.
isEdit
)
{
this
.
form
=
this
.
editData
let
arr
=
[]
if
(
this
.
editData
.
userIdList
&&
this
.
editData
.
userIdList
.
length
)
{
this
.
editData
.
userIdList
.
forEach
(
dd
=>
{
arr
.
push
({
userId
:
dd
.
userId
,
name
:
dd
.
userName
})
})
}
this
.
userList
=
arr
}
},
nextStep
(
type
)
{
console
.
log
(
type
)
let
arr
=
[]
this
.
userList
.
forEach
(
dd
=>
{
arr
.
push
({
userId
:
dd
.
userId
})
})
this
.
form
.
userIdList
=
arr
this
.
$emit
(
'submit'
,
type
,
this
.
form
)
},
onSelectUser
()
{
onSelectUser
()
{
this
.
dialogVisibleSelectUser
=
true
this
.
dialogVisibleSelectUser
=
true
},
},
selectedUser
(
users
)
{
selectedUser
(
users
)
{
console
.
log
(
users
)
this
.
userList
=
users
this
.
userList
=
users
this
.
dialogVisibleSelectUser
=
false
this
.
dialogVisibleSelectUser
=
false
}
}
...
...
linkwe-ui/src/views/customerService/sceneManage/index.vue
View file @
5a0982b
This diff is collapsed.
Click to expand it.
linkwe-ui/src/views/customerService/searchRecord/index.vue
View file @
5a0982b
...
@@ -2,24 +2,22 @@
...
@@ -2,24 +2,22 @@
<div
class=
"g-card g-pad20"
>
<div
class=
"g-card g-pad20"
>
<el-form
:inline=
"true"
label-width=
"80px"
label-position=
"left"
>
<el-form
:inline=
"true"
label-width=
"80px"
label-position=
"left"
>
<el-form-item
label=
"所属客服"
prop=
""
>
<el-form-item
label=
"所属客服"
prop=
""
>
<el-select>
<el-select
v-model=
"search.openKfId"
>
<el-option
value=
""
label=
"全部状态"
></el-option>
<el-option
value=
""
label=
"全部客服"
></el-option>
<el-option
value=
"0"
label=
"接待中"
></el-option>
<el-option
v-for=
"(data, key) in customerList"
:key=
"key"
:value=
"data.openKfId"
:label=
"data.name"
></el-option>
<el-option
value=
"0"
label=
"停止接待"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"咨询场景"
prop=
""
>
<el-form-item
label=
"咨询场景"
>
<el-select>
<el-select
v-model=
"search.scene"
>
<el-option
value=
""
label=
"全部场景"
></el-option>
<el-option
value=
""
label=
"全部场景"
></el-option>
<el-option
value=
"0"
label=
"场景1"
></el-option>
<el-option
v-for=
"(data, index) in sceneList"
:key=
"index"
:value=
"data.id"
:label=
"data.name"
></el-option>
<el-option
value=
"0"
label=
"场景2"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否企业客户"
prop=
""
label-width=
"100px"
>
<el-form-item
label=
"是否企业客户"
label-width=
"100px"
>
<el-select>
<el-select
v-model=
"search.isQyCustomer"
>
<el-option
value=
""
label=
"全部"
></el-option>
<el-option
value=
""
label=
"全部"
></el-option>
<el-option
value=
"0"
label=
"是"
></el-option>
<el-option
:value=
0
label=
"是"
></el-option>
<el-option
value=
"0"
label=
"否"
></el-option>
<el-option
:value=
1
label=
"否"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"选择员工"
prop=
"name"
>
<el-form-item
label=
"选择员工"
prop=
"name"
>
...
@@ -27,7 +25,7 @@
...
@@ -27,7 +25,7 @@
</el-form-item>
</el-form-item>
<el-form-item
label-width=
"0"
>
<el-form-item
label-width=
"0"
>
<!--
<el-button
v-hasPermi=
"['wecom:code:list']"
type=
"cyan"
@
click=
"getList(1)"
>
查询
</el-button>
-->
<!--
<el-button
v-hasPermi=
"['wecom:code:list']"
type=
"cyan"
@
click=
"getList(1)"
>
查询
</el-button>
-->
<el-button
type=
"primary"
@
click=
"search()"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"search
Fn
()"
>
查询
</el-button>
<el-button
@
click=
"resetQuery"
type=
"info"
plain
>
清空
</el-button>
<el-button
@
click=
"resetQuery"
type=
"info"
plain
>
清空
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -35,41 +33,63 @@
...
@@ -35,41 +33,63 @@
<div
class=
"item"
>
<div
class=
"item"
>
</div>
</div>
<div
class=
"item"
>
<div
class=
"item"
>
<el-button
type=
"primary"
plain
size=
"mini"
>
导出Excel
</el-button>
<el-button
type=
"primary"
plain
size=
"mini"
@
click=
"exportFn"
v-loading=
"exportLoading"
>
导出Excel
</el-button>
</div>
</div>
</div>
</div>
<el-table
v-loading=
"loading"
:data=
"list"
style=
"margin-top:20px;width: 100%"
>
<el-table
v-loading=
"loading"
:data=
"list"
style=
"margin-top:20px;width: 100%"
>
<el-table-column
label=
"咨询客户"
align=
"center"
prop=
""
min-width=
"1
4
0"
>
<el-table-column
label=
"咨询客户"
align=
"center"
prop=
""
min-width=
"1
2
0"
>
<template
slot-scope=
"
{ row }">
<template
slot-scope=
"
{ row }">
<show-customer-service
:url=
'row.
url'
:name=
'row.test
'
></show-customer-service>
<show-customer-service
:url=
'row.
customerAvatar'
:name=
'row.customerName
'
></show-customer-service>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"是否是企业客户"
align=
"center"
min-width=
"100"
prop=
"name"
show-overflow-tooltip
/>
<el-table-column
label=
"是否企业客户"
align=
"center"
min-width=
"100"
prop=
"isQyCustomer"
show-overflow-tooltip
>
<el-table-column
label=
"咨询场景"
align=
"center"
min-width=
"100"
prop=
"name"
show-overflow-tooltip
/>
<
template
slot-scope=
"{ row }"
>
{{
row
.
isQyCustomer
===
0
?
'是'
:
'否'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"咨询场景"
align=
"center"
min-width=
"100"
prop=
"sceneName"
show-overflow-tooltip
/>
<el-table-column
label=
"所属客服"
align=
"center"
min-width=
"160"
prop=
"list"
>
<el-table-column
label=
"所属客服"
align=
"center"
min-width=
"160"
prop=
"list"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<show-customer-service
:url=
'row.url'
:name=
'row.test'
showicon
></show-customer-service>
<show-customer-service
:url=
'row.kfAvatar'
:name=
'row.kfName'
showicon
></show-customer-service>
</
template
>
</el-table-column>
<el-table-column
label=
"接待方式"
align=
"center"
min-width=
"100"
prop=
"receptionType"
>
<
template
slot-scope=
"{ row }"
>
{{
row
.
receptionType
===
1
?
'人工客服'
:
'智能助手'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"接待员工"
align=
"center"
min-width=
"100"
prop=
"userName"
>
<
template
slot-scope=
"{ row }"
>
{{
row
.
receptionType
===
1
?
userName
:
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"接待方式"
align=
"center"
min-width=
"140"
prop=
""
></el-table-column>
<el-table-column
label=
"咨询开始时间"
align=
"center"
prop=
"sessionStartTime"
width=
"180"
></el-table-column>
<el-table-column
label=
"接待员工"
align=
"center"
min-width=
"140"
prop=
""
></el-table-column>
<el-table-column
label=
"咨询结束时间"
align=
"center"
prop=
"sessionEndTime"
width=
"180"
></el-table-column>
<el-table-column
label=
"接待客户数"
align=
"center"
min-width=
"140"
prop=
""
></el-table-column>
<el-table-column
label=
"咨询时长"
align=
"center"
prop=
"duration"
width=
"140"
></el-table-column>
<el-table-column
label=
"咨询开始时间"
align=
"center"
prop=
"updateTime"
width=
"180"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"100"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"咨询结束时间"
align=
"center"
prop=
"updateTime"
width=
"180"
></el-table-column>
<el-table-column
label=
"咨询时长"
align=
"center"
prop=
"updateTime"
width=
"100"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"230"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<el-button
type=
"text"
>
咨询记录
</el-button>
<el-button
type=
"text"
@
click=
"showResultList(row)"
>
咨询记录
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<pagination
:total=
"total"
:page
.
sync=
"search.pageNum"
:limit
.
sync=
"search.pageSize"
@
pagination=
"getList()"
/>
<pagination
:total=
"total"
:page
.
sync=
"search.pageNum"
:limit
.
sync=
"search.pageSize"
@
pagination=
"getList()"
/>
<SelectUser
:visible
.
sync=
"dialogVisible"
title=
"组织架构"
:defaultValues=
"userArray"
@
success=
"getSelectUser"
></SelectUser>
<SelectUser
:visible
.
sync=
"dialogVisible"
title=
"组织架构"
:defaultValues=
"userArray"
@
success=
"getSelectUser"
></SelectUser>
<el-dialog
title=
"咨询记录"
:visible
.
sync=
"showPreviewDialog"
width=
"50%"
>
<div>
<!-- <preview-client :list="previewData"></preview-client> -->
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"showPreviewDialog = false"
>
关闭
</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
SelectUser
from
'@/components/SelectUser'
import
SelectUser
from
'@/components/SelectUser'
import
ShowCustomerService
from
"../components/ShowCustomerSevice.vue"
import
ShowCustomerService
from
"../components/ShowCustomerSevice.vue"
import
{
getResultList
,
getList
,
getSceneList
,
exportResult
}
from
'@/api/drainageCode/customerService.js'
import
{
download
}
from
'@/utils/common'
export
default
{
export
default
{
name
:
'search-record'
,
name
:
'search-record'
,
components
:
{
components
:
{
...
@@ -79,34 +99,83 @@
...
@@ -79,34 +99,83 @@
data
()
{
data
()
{
return
{
return
{
loading
:
false
,
loading
:
false
,
list
:
[{
url
:
'123'
,
test
:
'测试新建客服'
,
name
:
'DDD'
,
list
:
[
'姜鹏凯'
,
'姜鹏凯'
,
'姜鹏凯'
,
'姜鹏凯'
],
list2
:
[
'场景一'
,
'场景23'
,
'场景3'
]
}],
exportLoading
:
false
,
list
:
[],
search
:
{
search
:
{
pageSize
:
10
,
pageSize
:
10
,
pageNum
:
1
,
pageNum
:
1
,
name
:
''
isQyCustomer
:
''
,
//0-是 1-否,
openKfId
:
''
,
scene
:
''
,
userId
:
''
},
},
total
:
0
,
total
:
0
,
form
:
{},
form
:
{},
formRules
:
{},
formRules
:
{},
dialogVisible
:
false
,
dialogVisible
:
false
,
userArray
:
[]
userArray
:
[],
customerList
:
[],
sceneList
:
[],
showPreviewDialog
:
false
}
}
},
},
methods
:
{
methods
:
{
showResultList
(
data
)
{
this
.
showPreviewDialog
=
true
},
exportFn
()
{
this
.
$confirm
(
'确认导出吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
this
.
exportLoading
=
true
return
exportResult
({
isQyCustomer
:
this
.
search
.
isQyCustomer
,
openKfId
:
this
.
search
.
openKfId
,
scene
:
this
.
search
.
scene
,
userId
:
this
.
search
.
userId
})
})
.
then
((
res
)
=>
{
console
.
log
(
res
)
download
(
res
.
msg
)
})
.
catch
((
error
)
=>
{
console
.
error
(
error
)
})
.
finally
(()
=>
{
this
.
exportLoading
=
false
})
},
getSelectUser
(
data
)
{
getSelectUser
(
data
)
{
this
.
userArray
=
data
this
.
userArray
=
data
this
.
search
.
name
=
this
.
userArray
.
map
(
function
(
obj
,
index
)
{
this
.
search
.
userId
=
this
.
userArray
.
map
(
function
(
obj
,
index
)
{
return
obj
.
name
return
obj
.
userId
}).
join
(
","
)
}).
join
(
","
)
},
},
search
()
{
searchFn
()
{
this
.
search
.
pageNum
=
1
this
.
getList
()
},
},
resetQuery
()
{
resetQuery
()
{
this
.
search
=
{
pageSize
:
10
,
pageNum
:
1
,
isQyCustomer
:
''
,
//0-是 1-否,
openKfId
:
''
,
scene
:
''
,
userId
:
''
}
this
.
getList
()
},
},
getList
()
{
getList
()
{
console
.
log
(
this
.
search
)
getResultList
(
this
.
search
).
then
(
res
=>
{
this
.
list
=
res
.
rows
this
.
total
=
Number
(
res
.
total
)
})
},
},
deleteFn
(
data
)
{
deleteFn
(
data
)
{
this
.
$confirm
(
'是否确定删除当前场景?该操作不可恢复,请谨慎操作'
,
'提示'
,
{
this
.
$confirm
(
'是否确定删除当前场景?该操作不可恢复,请谨慎操作'
,
'提示'
,
{
...
@@ -124,6 +193,15 @@
...
@@ -124,6 +193,15 @@
.
catch
(
function
()
{
})
.
catch
(
function
()
{
})
}
}
},
},
mounted
()
{
this
.
getList
()
getList
().
then
(
res
=>
{
this
.
customerList
=
res
.
rows
})
getSceneList
({
pageSize
:
1000
}).
then
(
dd
=>
{
this
.
sceneList
=
dd
.
rows
})
},
created
()
{
created
()
{
this
.
$store
.
dispatch
(
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
'app/setBusininessDesc'
,
...
...
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