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 19e4ac6d
authored
Oct 16, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改群sop和关键词拉群相关问题
1 parent
a61501a1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1015 additions
and
605 deletions
linkwe-mobile/src/views/communityOperating/SOP/panel.vue
linkwe-mobile/src/views/communityOperating/keywords/panel.vue
linkwe-mobile/src/views/portrait/index copy.vue
linkwe-ui/src/views/communityOperating/groupSOP/aev.vue
linkwe-ui/src/views/communityOperating/groupSOP/list.vue
linkwe-ui/src/views/communityOperating/newCustomer/list.vue
linkwe-ui/src/views/conversation/content/employee.vue
linkwe-mobile/src/views/communityOperating/SOP/panel.vue
View file @
19e4ac6
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
class=
"task-wrapper"
>
<div
class=
"task-wrapper"
>
<div
class=
"header"
>
<div
class=
"header"
>
<span>
群SOP
</span>
<span>
群SOP
</span>
<div>
{{
task
.
createTime
}}
</div>
<div>
{{
task
.
createTime
}}
</div>
</div>
</div>
<div
class=
"group"
>
<div
class=
"group"
>
...
@@ -32,7 +32,12 @@
...
@@ -32,7 +32,12 @@
<div
class=
"image-list"
>
<div
class=
"image-list"
>
<
template
v-for=
"material of task.materialList"
>
<
template
v-for=
"material of task.materialList"
>
<!-- mediaType: 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本 5 海报 6 海报字体 -->
<!-- mediaType: 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本 5 海报 6 海报字体 -->
<van-image
v-if=
"material.mediaType === 0"
width=
"80"
:key=
"material.id"
:src=
"material.materialUrl"
></van-image>
<van-image
v-if=
"material.mediaType === 0"
width=
"80"
:key=
"material.id"
:src=
"material.materialUrl"
></van-image>
</
template
>
</
template
>
<
template
v-for=
"pic of task.picList"
>
<
template
v-for=
"pic of task.picList"
>
<van-image
width=
"80"
:key=
"pic"
:src=
"pic"
></van-image>
<van-image
width=
"80"
:key=
"pic"
:src=
"pic"
></van-image>
...
@@ -46,7 +51,7 @@
...
@@ -46,7 +51,7 @@
</div>
</div>
<div
class=
"send-button"
v-if=
"!state"
>
<div
class=
"send-button"
v-if=
"!state"
>
<van-button
type=
"info"
size=
"mini"
@
click=
"send"
>
发送
</van-button>
<van-button
type=
"info"
size=
"mini"
@
click=
"send
()
"
>
发送
</van-button>
</div>
</div>
</div>
</div>
...
@@ -79,17 +84,17 @@ export default {
...
@@ -79,17 +84,17 @@ export default {
}
}
},
},
data
()
{
data
()
{
return
{
return
{
showCopy
:
false
,
// 展示复制按钮
showCopy
:
false
,
// 展示复制按钮
touchDelay
:
750
,
// 触发显示按钮的长按时常
touchDelay
:
750
,
// 触发显示按钮的长按时常
copyEvent
:
null
,
copyEvent
:
null
,
touch
:
false
,
touch
:
false
}
}
},
},
methods
:
{
methods
:
{
goState
(
active
)
{
goState
(
active
)
{
if
(
!
this
.
isAdmin
)
return
if
(
!
this
.
isAdmin
)
return
this
.
$router
.
push
({
this
.
$router
.
push
({
...
@@ -97,41 +102,63 @@ export default {
...
@@ -97,41 +102,63 @@ export default {
query
:
{
query
:
{
taskId
:
this
.
task
.
ruleId
,
taskId
:
this
.
task
.
ruleId
,
active
:
active
===
1
?
1
:
0
,
active
:
active
===
1
?
1
:
0
,
taskType
:
2
,
taskType
:
2
}
}
})
})
},
},
send
()
{
send
()
{
const
userId
=
this
.
$store
.
state
.
userId
const
userId
=
this
.
$store
.
state
.
userId
const
taskId
=
this
.
task
.
ruleId
const
taskId
=
this
.
task
.
ruleId
wx
.
invoke
(
"shareToExternalChat"
,
{
let
_this
=
this
title
:
''
,
this
.
$toast
.
loading
({
desc
:
''
,
message
:
'正在发送...'
,
link
:
''
,
duration
:
0
,
imgUrl
:
''
forbidClick
:
true
},
function
(
res
)
{
})
if
(
res
.
err_msg
==
"shareToExternalChat:ok"
)
{
let
mes
=
{
changeStatus
(
userId
,
taskId
,
1
).
then
((
res
)
=>
{
title
:
this
.
task
.
title
,
this
.
$emit
(
'refresh'
)
desc
:
this
.
task
.
content
}).
catch
(()
=>
{
// link: '', // 消息链接
this
.
$emit
(
'refresh'
)
// imgUrl: this.task.materialUrl && this.task.materialUrl[0] ? this.task.materialUrl[0].materialUrl : ''
})
}
// mes.link || delete mes.link
// mes.imgUrl || delete mes.imgUrl
wx
.
invoke
(
'shareToExternalChat'
,
mes
,
async
function
(
res
)
{
if
(
res
.
err_msg
==
'shareToExternalChat:ok'
)
{
try
{
await
changeStatus
(
userId
,
taskId
,
1
)
}
catch
(
error
)
{
_this
.
$toast
.
clear
()
_this
.
$dialog
({
message
:
'接口失败:'
+
JSON
.
stringify
(
error
)
})
return
}
// .then((res) => {
// }).catch(() => {
// this.$emit('refresh')
// })
_this
.
$toast
.
clear
()
this
.
$emit
(
'refresh'
)
}
else
{
if
(
res
.
err_code
==
1
)
{
// 用户取消发送
}
else
{
}
else
{
_this
.
$dialog
({
message
:
'shareToExternalChat失败:'
+
JSON
.
stringify
(
res
)
})
}
}
}
}
)
_this
.
$toast
.
clear
()
})
},
},
touchStart
()
{
touchStart
()
{
clearTimeout
(
this
.
copyEvent
)
clearTimeout
(
this
.
copyEvent
)
this
.
copyEvent
=
setTimeout
(()
=>
{
this
.
copyEvent
=
setTimeout
(()
=>
{
this
.
touch
=
true
this
.
touch
=
true
},
this
.
touchDelay
)
},
this
.
touchDelay
)
},
},
touchEnd
()
{
touchEnd
()
{
clearTimeout
(
this
.
copyEvent
)
clearTimeout
(
this
.
copyEvent
)
if
(
this
.
touch
)
this
.
showCopy
=
true
if
(
this
.
touch
)
this
.
showCopy
=
true
this
.
touch
=
false
this
.
touch
=
false
...
@@ -139,13 +166,13 @@ export default {
...
@@ -139,13 +166,13 @@ export default {
},
},
computed
:
{
computed
:
{
sendRange
()
{
sendRange
()
{
if
(
!
this
.
task
.
startExeTime
||
!
this
.
task
.
stopExeTime
)
return
''
if
(
!
this
.
task
.
startExeTime
||
!
this
.
task
.
stopExeTime
)
return
''
return
this
.
task
.
startExeTime
+
' - '
+
this
.
task
.
stopExeTime
return
this
.
task
.
startExeTime
+
' - '
+
this
.
task
.
stopExeTime
},
},
todoMembers
()
{
todoMembers
()
{
if
(
!
(
this
.
task
&&
this
.
task
.
scopeList
&&
this
.
task
.
scopeList
.
length
>
0
))
return
[]
if
(
!
(
this
.
task
&&
this
.
task
.
scopeList
&&
this
.
task
.
scopeList
.
length
>
0
))
return
[]
const
members
=
[]
const
members
=
[]
...
@@ -156,16 +183,16 @@ export default {
...
@@ -156,16 +183,16 @@ export default {
return
members
return
members
},
},
showTodo
()
{
showTodo
()
{
if
(
this
.
todoMembers
.
length
===
0
)
return
'无'
if
(
this
.
todoMembers
.
length
===
0
)
return
'无'
const
names
=
this
.
todoMembers
.
map
(
m
=>
m
.
name
)
const
names
=
this
.
todoMembers
.
map
(
(
m
)
=>
m
.
name
)
if
(
this
.
todoMembers
.
length
<=
2
)
return
names
.
join
(
'、'
)
if
(
this
.
todoMembers
.
length
<=
2
)
return
names
.
join
(
'、'
)
return
names
[
0
]
+
'、'
+
names
[
1
]
+
'等'
+
this
.
todoMembers
.
length
+
'人'
return
names
[
0
]
+
'、'
+
names
[
1
]
+
'等'
+
this
.
todoMembers
.
length
+
'人'
},
},
doneMembers
()
{
doneMembers
()
{
if
(
!
this
.
task
||
!
this
.
task
.
scopeList
||
this
.
task
.
scopeList
.
length
===
0
)
return
[]
if
(
!
this
.
task
||
!
this
.
task
.
scopeList
||
this
.
task
.
scopeList
.
length
===
0
)
return
[]
const
members
=
[]
const
members
=
[]
...
@@ -176,14 +203,14 @@ export default {
...
@@ -176,14 +203,14 @@ export default {
return
members
return
members
},
},
showDone
()
{
showDone
()
{
if
(
this
.
doneMembers
.
length
===
0
)
return
'无'
if
(
this
.
doneMembers
.
length
===
0
)
return
'无'
const
names
=
this
.
doneMembers
.
map
(
m
=>
m
.
name
)
const
names
=
this
.
doneMembers
.
map
(
(
m
)
=>
m
.
name
)
if
(
this
.
doneMembers
.
length
<=
2
)
return
names
.
join
(
'、'
)
if
(
this
.
doneMembers
.
length
<=
2
)
return
names
.
join
(
'、'
)
return
names
[
0
]
+
'、'
+
names
[
1
]
+
'等'
+
this
.
doneMembers
.
length
+
'人'
return
names
[
0
]
+
'、'
+
names
[
1
]
+
'等'
+
this
.
doneMembers
.
length
+
'人'
}
,
}
},
},
mounted
()
{
mounted
()
{
...
@@ -196,90 +223,89 @@ export default {
...
@@ -196,90 +223,89 @@ export default {
this
.
clipboard
.
on
(
'error'
,
(
e
)
=>
{
this
.
clipboard
.
on
(
'error'
,
(
e
)
=>
{
this
.
showCopy
=
false
this
.
showCopy
=
false
})
})
}
,
}
}
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.task-wrapper
{
.task-wrapper
{
padding
:
10px
8px
;
padding
:
10px
8px
;
.header
{
.header
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
margin
:
5px
0
12px
;
margin
:
5px
0
12px
;
span
{
span
{
font-size
:
18px
;
font-size
:
18px
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
}
}
.group
{
.group
{
.group-tags
{
.group-tags
{
:nth-child(n+2)
{
:nth-child(n
+
2)
{
margin-left
:
5px
;
margin-left
:
5px
;
}
.van-tag
{
background-color
:
#f2f2f2
;
color
:
black
;
padding
:
6px
10px
;
}
}
}
}
.content
{
.van-tag
{
padding
:
15px
;
background-color
:
#f2f2f2
;
background-color
:
#f2f2f2
;
color
:
black
;
font-size
:
16px
;
padding
:
6px
10px
;
line-height
:
20px
;
color
:
#999999
;
//
margin-bottom
:
15px
;
min-height
:
30px
;
position
:
relative
;
.copy-wrapper
{
position
:
absolute
;
width
:
100%
;
height
:
100%
;
left
:
0
;
top
:
0
;
background-color
:
rgba
(
0
,
0
,
0
,
0.4
);
display
:
flex
;
align-items
:
center
;
justify-content
:
space-around
;
}
}
}
}
}
.image-list
{
.content
{
.van-image
{
padding
:
15px
;
padding
:
10px
10px
0
0
;
background-color
:
#f2f2f2
;
}
font-size
:
16px
;
line-height
:
20px
;
color
:
#999999
;
//
margin-bottom
:
15px
;
min-height
:
30px
;
position
:
relative
;
.copy-wrapper
{
position
:
absolute
;
width
:
100%
;
height
:
100%
;
left
:
0
;
top
:
0
;
background-color
:
rgba
(
0
,
0
,
0
,
0.4
);
display
:
flex
;
align-items
:
center
;
justify-content
:
space-around
;
}
}
}
.van-cell
{
.image-list
{
padding
:
10px
6px
;
.van-image
{
padding
:
10px
10px
0
0
;
}
}
}
.send-button
{
.van-cell
{
padding
:
10px
5px
5px
;
padding
:
10px
6px
;
display
:
flex
;
}
flex-direction
:
row-reverse
;
.van-button
{
.send-button
{
padding
:
0
12px
;
padding
:
10px
5px
5px
;
margin-right
:
12px
;
display
:
flex
;
border-radius
:
4px
;
flex-direction
:
row-reverse
;
font-size
:
12px
;
}
.van-button
{
padding
:
0
12px
;
margin-right
:
12px
;
border-radius
:
4px
;
font-size
:
12px
;
}
}
}
}
}
.bottom-line
{
.bottom-line
{
background-color
:
#f2f2f2
;
background-color
:
#f2f2f2
;
height
:
15px
;
height
:
15px
;
}
}
</
style
>
</
style
>
linkwe-mobile/src/views/communityOperating/keywords/panel.vue
View file @
19e4ac6
...
@@ -16,10 +16,7 @@
...
@@ -16,10 +16,7 @@
{{ task.welcomeMsg }}
{{ task.welcomeMsg }}
</div>
</div>
<div
class=
"copy-wrapper"
v-show=
"showCopy"
>
<div
class=
"copy-wrapper"
v-show=
"showCopy"
>
<van-button
<van-button
:class=
"'copy-btn_' + task.taskId"
:data-clipboard-text=
"task.welcomeMsg"
>
:class=
"'copy-btn_' + task.taskId"
:data-clipboard-text=
"task.welcomeMsg"
>
复制
复制
</van-button>
</van-button>
</div>
</div>
...
@@ -67,21 +64,33 @@ export default {
...
@@ -67,21 +64,33 @@ export default {
},
},
methods
:
{
methods
:
{
send
()
{
send
()
{
let
_this
=
this
this
.
$toast
.
loading
({
message
:
'正在发送...'
,
duration
:
0
,
forbidClick
:
true
})
wx
.
invoke
(
wx
.
invoke
(
'sendChatMessage'
,
'sendChatMessage'
,
{
{
msgtype
:
'news'
,
msgtype
:
'news'
,
news
:
{
news
:
{
link
:
this
.
groupCodeUrl
,
link
:
this
.
groupCodeUrl
,
title
:
'客户群活码'
,
title
:
this
.
task
.
taskName
,
desc
:
'客户群活码'
,
desc
:
this
.
task
.
welcomeMsg
,
imgUrl
:
this
.
imgUrl
imgUrl
:
this
.
imgUrl
}
}
},
},
function
(
res
)
{
function
(
res
)
{
if
(
res
.
err_msg
==
'sendChatMessage:ok'
)
{
if
(
res
.
err_msg
==
'sendChatMessage:ok'
)
{
}
else
{
}
else
{
if
(
res
.
err_code
==
1
)
{
// 用户取消发送
}
else
{
_this
.
$dialog
({
message
:
'sendChatMessage失败:'
+
JSON
.
stringify
(
res
)
})
}
}
}
_this
.
$toast
.
clear
()
}
}
)
)
},
},
...
@@ -105,26 +114,18 @@ export default {
...
@@ -105,26 +114,18 @@ export default {
return
keywords
return
keywords
},
},
groupCodeUrl
()
{
groupCodeUrl
()
{
let
groupCodeInfo
=
this
.
task
.
groupCodeInfo
if
(
window
.
location
.
hash
[
0
]
===
'#'
)
{
if
(
window
.
location
.
hash
[
0
]
===
'#'
)
{
return
(
return
(
window
.
location
.
origin
+
window
.
location
.
origin
+
window
.
location
.
pathname
+
'#/groupCode?id='
+
(
groupCodeInfo
&&
groupCodeInfo
.
id
)
window
.
location
.
pathname
+
'#/groupCode?id='
+
this
.
task
.
groupCodeInfo
.
id
)
)
}
}
return
(
return
window
.
location
.
origin
+
window
.
location
.
pathname
+
'#/groupCode?id='
+
(
groupCodeInfo
&&
groupCodeInfo
.
id
)
window
.
location
.
origin
+
window
.
location
.
pathname
+
'groupCode?id='
+
this
.
task
.
groupCodeInfo
.
id
)
},
},
imgUrl
()
{
imgUrl
()
{
if
(
this
.
task
.
groupCodeInfo
&&
this
.
task
.
groupCodeInfo
.
codeUrl
)
let
groupCodeInfo
=
this
.
task
.
groupCodeInfo
return
this
.
task
.
groupCodeInfo
.
codeUrl
return
groupCodeInfo
&&
groupCodeInfo
.
codeUrl
?
groupCodeInfo
.
codeUrl
:
''
return
''
}
}
},
},
mounted
()
{
mounted
()
{
...
...
linkwe-mobile/src/views/portrait/index copy.vue
0 → 100644
View file @
19e4ac6
<
template
>
<div>
<!-- 头部 -->
<!--
<div
class=
"header"
>
<van-icon
name=
"cross"
color=
"#9c9c9c"
size=
"16"
@
click=
"$router.back()"
/>
<span
class=
"title"
>
客户画像
</span>
</div>
<van-divider
/>
-->
<!-- 详细资料 -->
<div
class=
"details"
>
<div
class=
"detail"
>
<div
class=
"left"
>
<div
class=
"img"
><img
:src=
"form.avatar"
alt=
""
/></div>
<div
class=
"right"
>
<div>
<span
>
{{
form
.
remark
?
form
.
remark
:
(
form
.
name
||
''
)
+
(
form
.
remarkCorpName
?
'-'
+
form
.
remarkCorpName
:
''
)
}}
</span
><span
class=
"icon iconfont icon-man"
v-if=
"form.gender == 1"
></span>
<span
class=
"icon iconfont icon-xingbie"
v-else-if=
"form.gender == 2"
></span>
<van-icon
name=
"manager"
color=
"#9c9c9c"
v-else
/>
</div>
<div
class=
"c9"
>
<span>
昵称:
</span><span>
{{
form
.
name
}}
</span>
</div>
</div>
</div>
<div
class=
"data"
@
click=
"goRoute('/customerDetail')"
>
详细资料>
</div>
</div>
<div
class=
"detail"
>
<div
class=
"c9"
>
手机号
</div>
<div>
{{
form
.
remarkMobiles
}}
</div>
</div>
<van-divider
/>
<div
class=
"detail"
>
<div
class=
"c9"
>
年龄
</div>
<div>
{{
form
.
age
}}
</div>
</div>
<van-divider
/>
<div
class=
"detail"
>
<div
class=
"c9"
>
生日
</div>
<div>
{{
form
.
birthday
?
form
.
birthday
.
substring
(
0
,
10
)
:
''
}}
</div>
</div>
<van-divider
/>
<div
class=
"detail"
>
<div
class=
"c9"
>
邮箱
</div>
<div>
{{
form
.
email
}}
</div>
</div>
</div>
<div
class=
"divider"
></div>
<!-- 客户标签 -->
<div
class=
"userlabel"
>
<div
class=
"detail"
>
<div>
客户标签
</div>
<div
class=
"data"
is-link
@
click=
"labelEdit"
>
编辑
</div>
</div>
<div
v-if=
"form.weTagGroupList"
class=
"labelstyle mt10"
>
<template
v-for=
"item in form.weTagGroupList"
>
<div
class=
"label"
v-for=
"(unit, unique) in item.weTags"
:key=
"unique"
>
{{
unit
.
name
}}
</div>
</
template
>
</div>
</div>
<div
class=
"divider"
></div>
<!-- 社交关系 -->
<div
class=
"realationship"
>
<div
class=
"detail"
>
<div>
社交关系
</div>
<div
class=
"data"
@
click=
"goRoute('/community')"
>
详情
</div>
</div>
<div
class=
"detail"
>
<div
class=
"boxnumber"
>
<p>
添加的员工
</p>
<div
class=
"number"
>
{{ staff.length }}
</div>
</div>
<div
class=
"boxnumber"
>
<p>
添加的群聊
</p>
<div
class=
"number"
>
{{ groupChat.length }}
</div>
</div>
<div
class=
"boxnumber"
>
<p>
共同的群聊
</p>
<div
class=
"number"
>
{{ commonGroup.length }}
</div>
</div>
</div>
</div>
<div
class=
"divider"
></div>
<!-- 客户轨迹 -->
<div
class=
"addwaiting"
>
<div
class=
"detail"
>
<div>
客户轨迹
</div>
<div
class=
"data"
is-link
@
click=
"usershow = true"
>
添加待办>
</div>
</div>
<van-tabs
v-model=
"query.trajectoryType"
@
change=
"changeInfo"
>
<van-tab
:name=
"1"
title=
"信息动态"
></van-tab>
<van-tab
:name=
"2"
title=
"社交动态"
></van-tab>
<van-tab
:name=
"3"
title=
"活动动态"
></van-tab>
<van-tab
:name=
"4"
title=
"待办动态"
></van-tab>
</van-tabs>
<!-- 步骤条 -->
<div
class=
"ac"
>
<van-loading
v-if=
"loadingStep"
type=
"spinner"
/>
</div>
<StepList
:stepList=
"list"
@
reload=
"changeInfo()"
></StepList>
</div>
<!-- 点击客户标签里的编辑触发弹出框开始 -->
<van-action-sheet
v-model=
"show"
>
<van-nav-bar
title=
"客户标签管理"
right-text=
"取消"
@
click-right=
"show = false"
/>
<div
class=
"content"
>
<div
v-for=
"(item, index) in alllabel"
:key=
"index"
>
<div
class=
"mb10 mt5"
>
{{ item.gourpName }}:
</div>
<div
class=
"labelstyle"
>
<div
v-for=
"(unit, unique) in item.weTags"
:key=
"unique"
class=
"label"
:style=
"addTag.some((e) => e.tagId == unit.tagId) ? isActive : ''"
@
click=
"userLabel(unit)"
>
{{ unit.name }}
</div>
</div>
</div>
</div>
<van-button
type=
"info"
class=
"saveinfo"
round
@
click=
"saveInfo"
>
保存
</van-button>
</van-action-sheet>
<!-- 点击客户标签里的编辑触发弹出框结束 -->
<!-- 点击添加待办触发弹出框开始 -->
<van-action-sheet
v-model=
"usershow"
>
<van-nav-bar
title=
"客户待办"
right-text=
"取消"
@
click-right=
"usershow = false"
/>
<!-- 表单 -->
<van-form
@
submit=
"onSubmit"
>
<!-- 待办内容 -->
<van-field
v-model=
"conagency"
name=
"待办内容"
label=
"待办内容"
placeholder=
"请输入待办内容"
type=
"textarea"
required
:rules=
"[{ required: true, message: '请输入待办内容' }]"
class=
"conagency"
/>
<!-- 待办日期 -->
<van-field
v-model=
"dateagency"
is-link
readonly
label=
"待办日期"
placeholder=
"请选择"
@
click=
"dateshow = true"
required
:rules=
"[{ required: true, message: '请输入待办日期' }]"
/>
<van-calendar
v-model=
"dateshow"
@
confirm=
"onConfirm"
color=
"#1989fa"
:min-date=
"minDate"
:max-date=
"maxDate"
/>
<!-- 待办时间 -->
<van-field
v-model=
"timeagency"
is-link
readonly
label=
"待办时间"
placeholder=
"请选择"
@
click=
"starttimeshow = true"
required
:rules=
"[{ required: true, message: '请输入待办时间' }]"
/>
<van-action-sheet
v-model=
"starttimeshow"
>
<van-datetime-picker
v-model=
"startTime"
type=
"time"
title=
"请选择开始时间"
:min-hour=
"0"
:max-hour=
"23"
@
cancel=
"timecancel"
@
confirm=
"starttimeconfirm"
/>
</van-action-sheet>
<van-action-sheet
v-model=
"endtimeshow"
>
<van-datetime-picker
v-model=
"endTime"
type=
"time"
title=
"请选择结束时间"
:min-hour=
"minHour"
:max-hour=
"23"
@
cancel=
"timecancel"
@
confirm=
"endtimeconfirm"
/>
</van-action-sheet>
<!-- 保存 -->
<div
style=
"margin: 30px"
>
<van-button
round
block
type=
"info"
native-type=
"submit"
@
click=
"saveInfo2"
>
保存
</van-button>
</div>
</van-form>
</van-action-sheet>
<!-- 点击添加待办触发弹出框结束 -->
<!-- <div class="divider"></div> -->
</div>
</template>
<
script
>
import
{
getCustomerInfo
,
getAllTags
,
updateWeCustomerPorTraitTag
,
findAddaddEmployes
,
findAddGroupNum
,
findTrajectory
,
addOrEditWaitHandle
}
from
'@/api/portrait'
// import { getUserInfo } from "@/api/common";
import
StepList
from
'@/components/StepList.vue'
import
{
param2Obj
}
from
'@/utils/index'
export
default
{
components
:
{
StepList
},
data
()
{
return
{
// 客户标签弹出框
show
:
false
,
// 客户待办的弹出框开始
usershow
:
false
,
conagency
:
''
,
// 待办内容
// 待办日期
dateagency
:
''
,
dateshow
:
false
,
minDate
:
new
Date
(),
maxDate
:
new
Date
(
2030
,
12
,
31
),
// 待办时间
timeagency
:
''
,
starttimeshow
:
false
,
endtimeshow
:
false
,
currentTime
:
'12:00'
,
startTime
:
''
,
endTime
:
''
,
// 客户待办的弹出框结束
actions
:
[{
name
:
'选项一'
},
{
name
:
'选项二'
},
{
name
:
'选项三'
}],
// active:false,
// 客户轨迹
// 待办动态
todonewsshow
:
false
,
// 接口开始
// externalUserid: 'IdwmiGuBCgAAoCBD1frD3hRplbsXoBLx6g', // 客户IdwmiGuBCgAAoCBD1frD3hRplbsXoBLx6g
externalUserid
:
'wmiGuBCgAAgeijfvvpJ62cBfwrB-c4kw'
,
form
:
{
name
:
''
,
// 昵称
remarkMobiles
:
''
,
// 手机号
age
:
''
,
// 年龄
birthday
:
''
,
// 客户生日
email
:
''
,
// 邮箱
address
:
''
,
// 地址
qq
:
''
,
// qq
position
:
''
,
// 职业
remarkCorpName
:
''
,
// 公司
description
:
''
,
// 其他描述
weTagGroupList
:
[]
// 客户标签合集
},
alllabel
:
[],
// 标签组
// 点击测试组标签获取的变量
groupId
:
''
,
name
:
''
,
tagId
:
''
,
addTag
:
[],
// 添加的参数
isActive
:
'background:#1989fa;color:#fff'
,
styleActive1
:
''
,
styleActive2
:
''
,
styleActive3
:
''
,
styleActive4
:
''
,
// activelabel:true
staff
:
[],
// 添加的员工
groupChat
:
[],
// 添加的群聊
commonGroup
:
[],
// 共同的群聊
// 客户轨迹
query
:
{
page
:
1
,
trajectoryType
:
1
},
loading
:
false
,
finished
:
false
,
list
:
[],
agentId
:
''
||
'1000012'
,
// 1000012,
loadingStep
:
false
}
},
watch
:
{
'$store.state.agentConfigStatus'
(
val
)
{
// val && this.init()
}
},
computed
:
{
userId
()
{
return
this
.
$store
.
state
.
userId
||
'FengJuZhuDeJieDao'
},
// activeLabel : () => {
// this.addTag.forEach((value) => {
// value.name == this.name
// })
// return this.activelabel
// }
minHour
()
{
let
date
=
new
Date
()
return
this
.
dateagency
==
this
.
getTime
()
?
date
.
getHours
()
:
0
}
},
created
()
{
// this.$toast.loading({
// message: 'loading...',
// duration: 0,
// forbidClick: true
// })
// // 获取agentId
// let query = param2Obj(window.location.search)
// let hash = param2Obj(window.location.hash)
// query = Object.assign(query, hash)
// this.agentId = query.agentId
// console.log(agentId)
this
.
findAddaddEmployes
()
this
.
findAddGroupNum
()
this
.
getCustomerInfo
()
this
.
findTrajectory
()
getAllTags
()
.
then
(({
data
})
=>
{
this
.
alllabel
=
data
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
methods
:
{
// 时间处理器
getTime
(
data
)
{
const
date
=
new
Date
()
// console.log(timer.getFullYear());
var
Y
=
date
.
getFullYear
()
+
'-'
var
M
=
(
date
.
getMonth
()
+
1
<
10
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'-'
var
D
=
date
.
getDate
()
<
10
?
'0'
+
date
.
getDate
()
:
date
.
getDate
()
+
''
return
Y
+
M
+
D
},
init
()
{
let
_this
=
this
wx
.
invoke
(
'getContext'
,
{},
function
(
res
)
{
if
(
res
.
err_msg
==
'getContext:ok'
)
{
let
entry
=
res
.
entry
//返回进入H5页面的入口类型,目前有normal、contact_profile、single_chat_tools、group_chat_tools
if
(
!
[
'single_chat_tools'
,
'group_chat_tools'
,
'contact_profile'
].
includes
(
entry
))
{
// _this.$toast.clear()
_this
.
$toast
(
'入口错误:'
+
entry
)
return
}
wx
.
invoke
(
'getCurExternalContact'
,
{},
(
res
)
=>
{
if
(
res
.
err_msg
==
'getCurExternalContact:ok'
)
{
_this
.
externalUserid
=
res
.
userId
//返回当前外部联系人userId
// 获取客户信息
_this
.
findAddaddEmployes
()
_this
.
findAddGroupNum
()
_this
.
getCustomerInfo
()
_this
.
findTrajectory
()
getAllTags
()
.
then
(({
data
})
=>
{
_this
.
alllabel
=
data
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}
else
{
//错误处理
_this
.
$dialog
({
message
:
'进入失败:'
+
JSON
.
stringify
(
res
)
})
}
_this
.
$toast
.
clear
()
})
}
else
{
//错误处理
_this
.
$toast
.
clear
()
_this
.
$dialog
({
message
:
'进入失败:'
+
JSON
.
stringify
(
res
)
})
}
})
},
// 客户待办点击保存事件
saveInfo2
()
{},
// 添加或编辑轨迹
addOrEditWaitHandle
(
form
)
{
addOrEditWaitHandle
(
form
)
.
then
((
data
)
=>
{
// 重新获取列表
this
.
findAddaddEmployes
()
this
.
findTrajectory
()
if
(
data
.
code
==
200
)
{
this
.
$toast
.
success
(
'保存成功'
)
this
.
usershow
=
false
}
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
// 获取轨迹信息
findTrajectory
(
page
)
{
this
.
loadingStep
=
true
let
query
=
{
pageNum
:
page
,
pageSize
:
10
,
userId
:
this
.
userId
,
externalUserid
:
this
.
externalUserid
}
Object
.
assign
(
query
,
this
.
query
)
findTrajectory
(
query
)
.
then
((
data
)
=>
{
// console.log(data.total);
this
.
list
=
data
.
rows
this
.
loadingStep
=
false
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
this
.
loadingStep
=
false
})
},
// 点击信息动态
changeInfo
()
{
this
.
findTrajectory
()
},
// 添加代办
// 表单提交
onSubmit
()
{
let
form
=
{
trajectoryType
:
4
,
userId
:
this
.
userId
,
externalUserid
:
this
.
externalUserid
,
content
:
this
.
conagency
,
createDate
:
this
.
dateagency
,
startTime
:
`
${
this
.
dateagency
}
${
this
.
startTime
}
:00`
,
endTime
:
`
${
this
.
dateagency
}
${
this
.
endTime
}
:00`
,
status
:
1
,
agentId
:
this
.
agentId
}
this
.
addOrEditWaitHandle
(
form
)
// 表单重置
this
.
conagency
=
''
this
.
dateagency
=
''
this
.
startTime
=
''
this
.
endTime
=
''
},
// 待办日期
formatDate
(
dateagency
)
{
return
`
${
dateagency
.
getFullYear
()}
-
${
dateagency
.
getMonth
()
+
1
}
-
${
dateagency
.
getDate
()}
`
},
onConfirm
(
dateagency
)
{
this
.
dateshow
=
false
this
.
dateagency
=
this
.
formatDate
(
dateagency
)
},
// 待办时间
timecancel
()
{
this
.
starttimeshow
=
false
},
starttimeconfirm
(
value
)
{
this
.
startTime
=
value
this
.
starttimeshow
=
false
this
.
endtimeshow
=
true
},
endtimeconfirm
(
value
)
{
this
.
endTime
=
value
this
.
endtimeshow
=
false
let
time
=
''
if
(
this
.
startTime
>
this
.
endTime
)
{
time
=
this
.
startTime
this
.
startTime
=
this
.
endTime
this
.
endTime
=
time
}
// console.log(this.startTime, this.endTime);
this
.
endtimeshow
=
false
this
.
timeagency
=
this
.
formatTime
()
},
formatTime
()
{
return
`
${
this
.
startTime
}
-
${
this
.
endTime
}
`
},
// 待办动态
// 点击删除按钮
deltodoshow
()
{},
goRoute
(
path
)
{
this
.
$router
.
push
({
path
,
query
:
{
customerId
:
this
.
externalUserid
// type
}
})
},
// 第一层标签
userLabel
(
item
)
{
let
index
=
this
.
addTag
.
findIndex
((
e
)
=>
{
return
item
.
tagId
==
e
.
tagId
})
// 数组里不存在该对象,则添加
if
(
index
==
-
1
)
{
this
.
addTag
.
push
({
groupId
:
item
.
groupId
,
name
:
item
.
name
,
tagId
:
item
.
tagId
})
}
else
{
// 数组里存在该对象,则删除
this
.
addTag
.
splice
(
index
,
1
)
}
},
saveInfo
()
{
// 更新客户画像标签 [{ groupId: this.groupId, name: this.name, tagId: this.tagId }]
updateWeCustomerPorTraitTag
({
externalUserid
:
this
.
externalUserid
,
userId
:
this
.
userId
,
addTag
:
this
.
addTag
})
.
then
((
res
)
=>
{
// console.log(res);
if
(
res
.
code
==
200
)
{
this
.
show
=
false
// 重新获取客户标签
this
.
getCustomerInfo
()
this
.
$toast
.
success
(
'保存成功'
)
}
// console.log(123);
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
// 点击编辑按钮
labelEdit
()
{
this
.
show
=
true
if
(
this
.
form
.
weTagGroupList
)
{
this
.
form
.
weTagGroupList
.
forEach
((
ele
)
=>
{
this
.
addTag
.
push
(...
ele
.
weTags
)
})
}
// 获取用户当前的lable,将当前用户的lable与所有lable进行对比,相同的弹框内蓝色展示
// 弹框内的标签组选中时蓝色展示
// 弹框内的子标签与选中时蓝色展示,点击时
},
findAddaddEmployes
()
{
findAddaddEmployes
(
this
.
externalUserid
)
.
then
(({
data
})
=>
{
// console.log(data);
this
.
staff
=
data
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
findAddGroupNum
()
{
// this.$toast('userId:' + this.userId)
findAddGroupNum
({
externalUserid
:
this
.
externalUserid
,
userId
:
this
.
userId
})
.
then
(({
data
})
=>
{
// console.log(data);
this
.
groupChat
=
data
// console.log(this.groupChat);
this
.
commonGroup
=
this
.
groupChat
.
filter
((
ele
)
=>
{
// debugger
return
ele
.
groupMemberNum
==
1
})
// console.log(this.commonGroup);
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
getCustomerInfo
()
{
// this.$toast('userId:' + this.userId)
getCustomerInfo
({
externalUserid
:
this
.
externalUserid
,
userId
:
this
.
userId
})
.
then
(({
data
})
=>
{
// console.log(data);
this
.
form
=
data
// console.log(this.form);
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.header
{
margin
:
20px
10px
10px
;
vertical-align
:
center
;
text-align
:
center
;
}
.van-icon-cross
{
position
:
absolute
;
left
:
10px
;
}
.title
{
text-align
:
center
;
}
//
详细资料
.details
,
.userlabel
,
.realationship
,
.addwaiting
{
margin
:
10px
;
}
.detail
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.c9
{
color
:
#9c9c9c
;
}
}
.left
{
display
:
flex
;
margin-bottom
:
20px
;
.img
{
width
:
40px
;
height
:
40px
;
background-color
:
#f2f2f2
;
margin-right
:
10px
;
}
.right
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
}
}
.data
{
font-size
:
12px
;
color
:
#2c8cf0
;
}
.divider
{
width
:
100%
;
height
:
10px
;
background-color
:
#f2f2f2
;
}
.content
{
max-height
:
60vh
;
position
:
relative
;
margin
:
16px
0
60px
;
padding
:
0
16px
;
overflow
:
auto
;
}
.van-action-sheet__header
{
.van-icon-cross
{
left
:
85%
;
font-size
:
16px
;
}
}
//
客户标签
.labelstyle
{
display
:
flex
;
flex-wrap
:
wrap
;
align-items
:
center
;
.label
{
display
:
inline-block
;
min-width
:
45px
;
font-size
:
12px
;
padding
:
4px
5px
3px
;
//
background-color
:
#f2f2f2
;
color
:
#2c8cf0
;
border
:
1px
solid
#2c8cf0
;
text-align
:
center
;
margin
:
0
0
10px
10px
;
line-height
:
16px
;
border-radius
:
4px
;
}
}
.branch
{
position
:
relative
;
}
.saveinfo
{
position
:
absolute
;
width
:
90%
;
height
:
30px
;
left
:
50%
;
bottom
:
0
;
transform
:
translate
(
-50%
,
-50%
);
}
//
社交关系
.boxnumber
{
height
:
60px
;
width
:
100%
;
margin
:
20px
;
p
{
font-size
:
12px
;
}
.number
{
text-align
:
center
;
margin-top
:
20px
;
font-size
:
24px
;
font-weight
:
700
;
}
}
.boxnumber
:first-child
{
border-right
:
1px
solid
#f2f2f2
;
padding-right
:
16px
;
}
.addwaiting
{
.labelstyle
{
.label1
{
width
:
80px
;
margin-bottom
:
20px
;
border-radius
:
40px
;
}
}
}
//
客户轨迹
.f12
{
color
:
#9c9c9c
;
font-size
:
12px
;
font-weight
:
600
;
}
.po
{
position
:
relative
;
}
.fs14
{
color
:
#333
;
font-size
:
14px
;
position
:
relative
;
left
:
20px
;
}
.con
{
left
:
51px
;
margin-top
:
20px
;
}
/
deep
/
.van-step__circle
{
width
:
8px
;
height
:
8px
;
margin-left
:
110px
;
}
/
deep
/
.van-step__line
{
left
:
39px
;
}
.finish
{
position
:
relative
;
color
:
#2c8cf0
;
font-size
:
12px
;
font-weight
:
600
;
right
:
-165px
;
}
.deldynamic
{
float
:
right
;
color
:
#9c9c9c
;
font-size
:
12px
;
font-weight
:
600
;
}
.van-step--vertical
:not
(
:last-child
)
::after
{
border-width
:
1px
;
}
/
deep
/
.conagency
{
line-height
:
40px
;
flex-direction
:
column
;
.van-field__control
{
//
background-color
:
#f2f2f2
;
background-color
:
#f6fbff
;
padding
:
0
10px
;
}
}
.iconfont
{
color
:
#2c8cf0
;
}
.icon-xingbie
{
color
:
pink
;
}
.van-divider
{
margin
:
10px
0
;
}
</
style
>
linkwe-ui/src/views/communityOperating/groupSOP/aev.vue
View file @
19e4ac6
...
@@ -2,22 +2,11 @@
...
@@ -2,22 +2,11 @@
<div
class=
"wrap"
v-loading=
"loading"
>
<div
class=
"wrap"
v-loading=
"loading"
>
<el-form
:model=
"form"
ref=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form
:model=
"form"
ref=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
label=
"规则名称"
prop=
"ruleName"
>
<el-form-item
label=
"规则名称"
prop=
"ruleName"
>
<el-input
<el-input
v-model=
"form.ruleName"
maxlength=
"30"
show-word-limit
placeholder=
"请输入"
clearable
/>
v-model=
"form.ruleName"
maxlength=
"30"
show-word-limit
placeholder=
"请输入"
clearable
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"执行群聊"
>
<el-form-item
label=
"执行群聊"
>
<el-tag
<el-tag
size=
"medium"
v-for=
"(group, index) in customerGroups"
:key=
"index"
>
{{
group
.
groupName
}}
</el-tag>
size=
"medium"
v-for=
"(group, index) in customerGroups"
:key=
"index"
>
{{
group
.
groupName
}}
</el-tag
>
<el-button
<el-button
type=
"primary"
type=
"primary"
plain
plain
...
@@ -70,23 +59,12 @@
...
@@ -70,23 +59,12 @@
class="mb8"
class="mb8"
>
</el-input>
>
</el-input>
<div
<div
v-for=
"text in textMaterialList"
:key=
"text.id"
class=
"text-wrapper"
>
v-for=
"text in textMaterialList"
<div
class=
"content overflow-ellipsis"
>
:key=
"text.id"
class=
"text-wrapper"
>
<div
class=
"content overflow-ellipsis"
>
{{
text
.
content
}}
{{
text
.
content
}}
</div>
</div>
<el-button
<el-button
icon=
"el-icon-close"
class=
"remove-btn"
size=
"mini"
@
click=
"removeTextMaterial(text)"
>
icon=
"el-icon-close"
class=
"remove-btn"
size=
"mini"
@
click=
"removeTextMaterial(text)"
>
</el-button>
</el-button>
</div>
</div>
</el-tab-pane>
</el-tab-pane>
...
@@ -94,60 +72,25 @@
...
@@ -94,60 +72,25 @@
<el-tab-pane
name=
"1"
>
<el-tab-pane
name=
"1"
>
<span
slot=
"label"
>
<i
class=
"el-icon-date"
></i>
图片
</span>
<span
slot=
"label"
>
<i
class=
"el-icon-date"
></i>
图片
</span>
<div
<div
v-for=
"image in imageMaterialList"
:key=
"image.id"
class=
"image-wrapper"
>
v-for=
"image in imageMaterialList"
<el-image
:src=
"image.materialUrl"
fit=
"fit"
>
</el-image>
:key=
"image.id"
class=
"image-wrapper"
<el-button
icon=
"el-icon-close"
class=
"remove-btn"
size=
"mini"
@
click=
"removeImageMaterial(image)"
>
>
<el-image
:src=
"image.materialUrl"
fit=
"fit"
>
</el-image>
<el-button
icon=
"el-icon-close"
class=
"remove-btn"
size=
"mini"
@
click=
"removeImageMaterial(image)"
>
</el-button>
</el-button>
</div>
</div>
<div
<div
v-for=
"url in form.picList"
:key=
"url"
class=
"image-wrapper"
>
v-for=
"url in form.picList"
<el-image
:src=
"url"
fit=
"fit"
>
</el-image>
:key=
"url"
class=
"image-wrapper"
<el-button
icon=
"el-icon-close"
class=
"remove-btn"
size=
"mini"
@
click=
"removeImage(url)"
>
</el-button>
>
<el-image
:src=
"url"
fit=
"fit"
>
</el-image>
<el-button
icon=
"el-icon-close"
class=
"remove-btn"
size=
"mini"
@
click=
"removeImage(url)"
>
</el-button>
</div>
</div>
<upload
<upload
:fileUrl
.
sync=
"uploadImageUrl"
class=
"image-uploader"
>
:fileUrl
.
sync=
"uploadImageUrl"
class=
"image-uploader"
>
<i
class=
"el-icon-plus uploader-icon"
></i>
<i
class=
"el-icon-plus uploader-icon"
></i>
</upload>
</upload>
</el-tab-pane>
</el-tab-pane>
<el-button
<el-button
type=
"primary"
class=
"mt20"
@
click=
"dialogVisibleSelectMaterial = true"
>
从素材库选择
</el-button>
type=
"primary"
class=
"mt20"
@
click=
"dialogVisibleSelectMaterial = true"
>
从素材库选择
</el-button
>
</el-tabs>
</el-tabs>
</div>
</div>
</el-form-item>
</el-form-item>
...
@@ -162,14 +105,9 @@
...
@@ -162,14 +105,9 @@
<!-- 预览 -->
<!-- 预览 -->
<div
class=
"tip"
>
欢迎语样式
</div>
<div
class=
"tip"
>
欢迎语样式
</div>
<PhoneDialog
<PhoneDialog
:message=
"form.content || '请输入加群引导语'"
:imageList=
"imageList"
:messageList=
"messageList"
>
:message=
"form.content || '请输入加群引导语'"
:imageList=
"imageList"
:messageList=
"messageList"
>
<template
#
image=
"
{ image }">
<template
#
image=
"
{ image }">
<el-image
style=
"border-radius: 6px; width: 100px;"
:src=
"image"
fit=
"fit"
>
<el-image
style=
"border-radius: 6px; width: 100px;"
:src=
"image"
fit=
"fit"
>
</el-image>
</el-image>
</
template
>
</
template
>
<
template
#
text=
"{ text }"
>
<
template
#
text=
"{ text }"
>
{{
text
}}
{{
text
}}
...
@@ -218,11 +156,7 @@ export default {
...
@@ -218,11 +156,7 @@ export default {
components
:
{
PhoneDialog
,
SelectMaterial
,
SelectCustomerGroup
},
components
:
{
PhoneDialog
,
SelectMaterial
,
SelectCustomerGroup
},
data
()
{
data
()
{
const
checkContent
=
(
rule
,
value
,
callback
)
=>
{
const
checkContent
=
(
rule
,
value
,
callback
)
=>
{
if
(
if
(
!
this
.
form
.
content
&&
this
.
form
.
picList
.
length
===
0
&&
this
.
form
.
materialIdList
.
length
===
0
)
{
!
this
.
form
.
content
&&
this
.
form
.
picList
.
length
===
0
&&
this
.
form
.
materialIdList
.
length
===
0
)
{
callback
(
new
Error
(
'该项为必填项'
))
callback
(
new
Error
(
'该项为必填项'
))
}
else
{
}
else
{
callback
()
callback
()
...
@@ -250,26 +184,17 @@ export default {
...
@@ -250,26 +184,17 @@ export default {
pickerOptions
:
{
pickerOptions
:
{
disabledDate
(
time
)
{
disabledDate
(
time
)
{
// return time.getTime() < Date.now()
// return time.getTime() < Date.now()
return
(
return
time
.
getTime
()
<
new
Date
(
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
())
time
.
getTime
()
<
new
Date
(
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
())
)
}
}
},
},
uploadImageUrl
:
''
,
uploadImageUrl
:
''
,
imageMaterialList
:
[],
imageMaterialList
:
[],
textMaterialList
:
[],
textMaterialList
:
[],
rules
:
Object
.
freeze
({
rules
:
Object
.
freeze
({
ruleName
:
[
ruleName
:
[{
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'blur'
}],
{
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'blur'
}
],
title
:
[{
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'blur'
}],
title
:
[{
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'blur'
}],
chatIdList
:
[
chatIdList
:
[{
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'change'
}],
{
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'change'
}
startExeTime
:
[{
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'change'
}],
],
startExeTime
:
[
{
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'change'
}
],
content
:
[
content
:
[
// { required: true, message: '该项为必填项', trigger: 'change' },
// { required: true, message: '该项为必填项', trigger: 'change' },
{
validator
:
checkContent
,
trigger
:
'change'
}
{
validator
:
checkContent
,
trigger
:
'change'
}
...
@@ -399,196 +324,16 @@ export default {
...
@@ -399,196 +324,16 @@ export default {
},
},
removeImageMaterial
(
image
)
{
removeImageMaterial
(
image
)
{
this
.
imageMaterialList
.
splice
(
this
.
imageMaterialList
.
indexOf
(
image
),
1
)
this
.
imageMaterialList
.
splice
(
this
.
imageMaterialList
.
indexOf
(
image
),
1
)
this
.
form
.
materialIdList
.
splice
(
this
.
form
.
materialIdList
.
splice
(
this
.
form
.
materialIdList
.
indexOf
(
image
.
id
),
1
)
this
.
form
.
materialIdList
.
indexOf
(
image
.
id
),
1
)
},
},
removeTextMaterial
(
text
)
{
removeTextMaterial
(
text
)
{
this
.
textMaterialList
.
splice
(
this
.
textMaterialList
.
indexOf
(
text
),
1
)
this
.
textMaterialList
.
splice
(
this
.
textMaterialList
.
indexOf
(
text
),
1
)
this
.
form
.
materialIdList
.
splice
(
this
.
form
.
materialIdList
.
splice
(
this
.
form
.
materialIdList
.
indexOf
(
text
.
id
),
1
)
this
.
form
.
materialIdList
.
indexOf
(
text
.
id
),
1
)
}
}
}
}
}
}
</
script
>
</
script
>
<
template
>
<div
class=
"wrap"
v-loading=
"loading"
>
<el-form
:model=
"form"
ref=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
label=
"规则名称"
prop=
"ruleName"
>
<el-input
v-model=
"form.ruleName"
maxlength=
"30"
show-word-limit
placeholder=
"请输入"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"执行群聊"
prop=
"chatIdList"
>
<el-tag
size=
"medium"
v-for=
"(group, index) in customerGroups"
:key=
"index"
>
{{
group
.
groupName
}}
</el-tag
>
<el-button
type=
"primary"
plain
:class=
"customerGroups.length > 0 ? 'ml10' : ''"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"dialogVisibleSelectCustomerGroup = true"
>
{{
customerGroups
.
length
?
'修改'
:
'添加'
}}
</el-button
>
</el-form-item>
<el-form-item
label=
"内容名称"
prop=
"title"
>
<el-input
v-model=
"form.title"
maxlength=
"220"
show-word-limit
:autosize=
"
{ minRows: 5, maxRows: 20 }"
placeholder="请输入"
clearable
>
</el-input>
</el-form-item>
<el-form-item
label=
"执行时间"
prop=
"startExeTime"
>
<el-date-picker
v-model=
"dateRange"
value-format=
"yyyy-MM-dd HH:mm:ss"
type=
"datetimerange"
:picker-options=
"pickerOptions"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
align=
"right"
></el-date-picker>
</el-form-item>
<el-form-item
label=
"消息内容"
prop=
"content"
>
<div
class=
"content-left"
>
<el-button
class=
"create"
@
click=
"goRoute"
>
新建素材
</el-button>
<el-tabs
v-model=
"activeName"
>
<el-tab-pane
name=
"0"
>
<span
slot=
"label"
>
<i
class=
"el-icon-date"
></i>
文本
</span>
<el-input
v-model=
"form.content"
type=
"textarea"
maxlength=
"220"
show-word-limit
:autosize=
"
{ minRows: 10, maxRows: 50 }"
placeholder="请输入"
class="mb8"
>
</el-input>
<div
v-for=
"text in textMaterialList"
:key=
"text.id"
class=
"text-wrapper"
>
<div
class=
"content overflow-ellipsis"
>
{{
text
.
content
}}
</div>
<el-button
icon=
"el-icon-close"
class=
"remove-btn"
size=
"mini"
@
click=
"removeTextMaterial(text)"
></el-button>
</div>
</el-tab-pane>
<el-tab-pane
name=
"1"
>
<span
slot=
"label"
>
<i
class=
"el-icon-date"
></i>
图片
</span>
<div
v-for=
"image in imageMaterialList"
:key=
"image.id"
class=
"image-wrapper"
>
<el-image
:src=
"image.materialUrl"
fit=
"fit"
></el-image>
<el-button
icon=
"el-icon-close"
class=
"remove-btn"
size=
"mini"
@
click=
"removeImageMaterial(image)"
></el-button>
</div>
<div
v-for=
"url in form.picList"
:key=
"url"
class=
"image-wrapper"
>
<el-image
:src=
"url"
fit=
"fit"
></el-image>
<el-button
icon=
"el-icon-close"
class=
"remove-btn"
size=
"mini"
@
click=
"removeImage(url)"
></el-button>
</div>
<upload
:fileUrl
.
sync=
"uploadImageUrl"
class=
"image-uploader"
>
<i
class=
"el-icon-plus uploader-icon"
></i>
</upload>
</el-tab-pane>
<el-button
type=
"primary"
class=
"mt20"
@
click=
"dialogVisibleSelectMaterial = true"
>
从素材库选择
</el-button
>
</el-tabs>
</div>
</el-form-item>
<el-form-item
label=
" "
>
<el-button
type=
"primary"
@
click=
"submit"
>
保存
</el-button>
<el-button
@
click=
"$router.back()"
>
取消
</el-button>
</el-form-item>
</el-form>
<div
class=
"preview-wrap"
>
<!-- 预览 -->
<div
class=
"tip"
>
欢迎语样式
</div>
<PhoneDialog
:message=
"form.content || '请输入加群引导语'"
:imageList=
"imageList"
:messageList=
"messageList"
>
<template
#
image=
"
{ image }">
<el-image
class=
"phone-dialog-image"
:src=
"image"
fit=
"fit"
>
</el-image>
</
template
>
<
template
#
text=
"{ text }"
>
{{
text
}}
</
template
>
</PhoneDialog>
</div>
<!-- 选择素材弹窗 -->
<SelectMaterial
v-if=
"activeName === '0'"
:key=
"0"
:visible
.
sync=
"dialogVisibleSelectMaterial"
type=
"0"
:showArr=
"[0]"
@
success=
"submitSelectMaterial"
></SelectMaterial>
<SelectMaterial
v-else
:key=
"1"
:visible
.
sync=
"dialogVisibleSelectMaterial"
type=
"1"
:showArr=
"[1]"
@
success=
"submitSelectMaterial"
></SelectMaterial>
<!-- 选择客户群聊 -->
<SelectCustomerGroup
:visible
.
sync=
"dialogVisibleSelectCustomerGroup"
@
success=
"submitSelectCustomerGroup"
:multiSelect=
"true"
></SelectCustomerGroup>
</div>
</template>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.wrap
{
.wrap
{
display
:
flex
;
display
:
flex
;
...
...
linkwe-ui/src/views/communityOperating/groupSOP/list.vue
View file @
19e4ac6
...
@@ -114,9 +114,10 @@ export default {
...
@@ -114,9 +114,10 @@ export default {
},
},
// 获取显示用实际群聊
// 获取显示用实际群聊
getDisplayGroups
(
row
)
{
getDisplayGroups
(
row
)
{
const
groups
=
row
.
groupList
.
map
((
g
)
=>
g
.
groupName
)
if
(
row
.
groupList
)
{
const
groups
=
row
.
groupList
.
map
((
g
)
=>
g
.
groupName
)
return
groups
.
join
(
' '
)
return
groups
.
join
(
','
)
}
}
}
}
}
}
}
...
@@ -125,13 +126,7 @@ export default {
...
@@ -125,13 +126,7 @@ export default {
<
template
>
<
template
>
<div>
<div>
<div
class=
"top-search"
>
<div
class=
"top-search"
>
<el-form
<el-form
inline
label-position=
"right"
:model=
"query"
label-width=
"100px"
ref=
"queryForm"
>
inline
label-position=
"right"
:model=
"query"
label-width=
"100px"
ref=
"queryForm"
>
<el-form-item
label=
"规则名称"
prop=
"ruleName"
>
<el-form-item
label=
"规则名称"
prop=
"ruleName"
>
<el-input
v-model=
"query.ruleName"
placeholder=
"请输入"
></el-input>
<el-input
v-model=
"query.ruleName"
placeholder=
"请输入"
></el-input>
</el-form-item>
</el-form-item>
...
@@ -151,16 +146,8 @@ export default {
...
@@ -151,16 +146,8 @@ export default {
></el-date-picker>
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
" "
>
<el-form-item
label=
" "
>
<el-button
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
v-hasPermi=
"['customerManage:customer:query']"
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"success"
@
click=
"resetQuery()"
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button
>
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"success"
@
click=
"resetQuery()"
>
重置
</el-button
>
重置
</el-button
>
>
</el-form-item>
</el-form-item>
...
@@ -182,30 +169,12 @@ export default {
...
@@ -182,30 +169,12 @@ export default {
</div>
</div>
</div>
</div>
<el-table
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
v-loading=
"loading"
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
></el-table-column>
:data=
"list"
<el-table-column
label=
"规则名称"
align=
"center"
prop=
"ruleName"
:show-overflow-tooltip=
"true"
></el-table-column>
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
></el-table-column>
<el-table-column
label=
"规则名称"
align=
"center"
prop=
"ruleName"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"执行群聊"
align=
"center"
width=
"120"
>
<el-table-column
label=
"执行群聊"
align=
"center"
width=
"120"
>
<template
#
default=
"
{ row }">
<template
#
default=
"
{ row }">
<el-popover
<el-popover
placement=
"bottom"
width=
"200"
trigger=
"hover"
:content=
"getDisplayGroups(row)"
>
placement=
"bottom"
width=
"200"
trigger=
"hover"
:content=
"getDisplayGroups(row)"
>
<div
slot=
"reference"
class=
"table-desc overflow-ellipsis"
>
<div
slot=
"reference"
class=
"table-desc overflow-ellipsis"
>
{{
getDisplayGroups
(
row
)
}}
{{
getDisplayGroups
(
row
)
}}
</div>
</div>
...
@@ -213,28 +182,12 @@ export default {
...
@@ -213,28 +182,12 @@ export default {
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
></el-table-column>
label=
"创建人"
align=
"center"
prop=
"createBy"
></el-table-column>
<el-table-column
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
></el-table-column>
label=
"创建人"
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
></el-table-column>
align=
"center"
prop=
"createBy"
></el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
></el-table-column>
<el-table-column
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
v-hasPermi=
"['enterpriseWechat:view']"
v-hasPermi=
"['enterpriseWechat:view']"
...
...
linkwe-ui/src/views/communityOperating/newCustomer/list.vue
View file @
19e4ac6
<
script
>
<
script
>
import
{
import
{
getList
,
remove
,
download
,
downloadBatch
}
from
'@/api/communityOperating/newCustomer'
getList
,
remove
,
download
,
downloadBatch
}
from
'@/api/communityOperating/newCustomer'
export
default
{
export
default
{
components
:
{},
components
:
{},
...
@@ -157,14 +152,7 @@ export default {
...
@@ -157,14 +152,7 @@ export default {
<
template
>
<
template
>
<div>
<div>
<el-form
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"100px"
class=
"top-search"
size=
"small"
>
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"100px"
class=
"top-search"
size=
"small"
>
<el-form-item
label=
"活码名称"
prop=
"emplCodeName"
>
<el-form-item
label=
"活码名称"
prop=
"emplCodeName"
>
<el-input
v-model=
"query.emplCodeName"
placeholder=
"请输入"
></el-input>
<el-input
v-model=
"query.emplCodeName"
placeholder=
"请输入"
></el-input>
</el-form-item>
</el-form-item>
...
@@ -184,18 +172,8 @@ export default {
...
@@ -184,18 +172,8 @@ export default {
></el-date-picker>
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
" "
>
<el-form-item
label=
" "
>
<el-button
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
v-hasPermi=
"['customerManage:customer:query']"
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"success"
@
click=
"resetQuery()"
>
重置
</el-button>
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button
>
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"success"
@
click=
"resetQuery()"
>
重置
</el-button
>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -204,50 +182,20 @@ export default {
...
@@ -204,50 +182,20 @@ export default {
<el-button
type=
"primary"
@
click=
"goRoute()"
>
新建自动拉群
</el-button>
<el-button
type=
"primary"
@
click=
"goRoute()"
>
新建自动拉群
</el-button>
</div>
</div>
<div>
<div>
<el-button
<el-button
type=
"primary"
:disabled=
"!ids.length"
@
click=
"downloadBatch()"
>
批量下载
</el-button>
type=
"primary"
<el-button
v-hasPermi=
"['customerManage:customer:export']"
:disabled=
"!ids.length"
type=
"cyan"
@
click=
"remove()"
:disabled=
"!ids.length"
@
click=
"downloadBatch()"
>
批量下载
</el-button
>
<el-button
v-hasPermi=
"['customerManage:customer:export']"
:disabled=
"!ids.length"
type=
"cyan"
@
click=
"remove()"
>
批量删除
</el-button
>
批量删除
</el-button
>
>
</div>
</div>
</div>
</div>
<el-table
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
v-loading=
"loading"
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
></el-table-column>
:data=
"list"
<el-table-column
prop=
"codeName"
label=
"活码名称"
align=
"center"
></el-table-column>
@
selection-change=
"handleSelectionChange"
<el-table-column
prop=
"emplList"
label=
"使用员工"
align=
"center"
width=
"130"
>
>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
></el-table-column>
<el-table-column
prop=
"codeName"
label=
"活码名称"
align=
"center"
></el-table-column>
<el-table-column
prop=
"emplList"
label=
"使用员工"
align=
"center"
width=
"130"
>
<template
#
default=
"
{ row }">
<template
#
default=
"
{ row }">
<el-popover
placement=
"bottom"
trigger=
"hover"
>
<el-popover
placement=
"bottom"
trigger=
"hover"
>
<el-image
<el-image
slot=
"reference"
:src=
"row.emplCodeUrl"
class=
"code-image--small"
></el-image>
slot=
"reference"
:src=
"row.emplCodeUrl"
class=
"code-image--small"
></el-image>
<el-image
:src=
"row.emplCodeUrl"
class=
"code-image"
></el-image>
<el-image
:src=
"row.emplCodeUrl"
class=
"code-image"
></el-image>
</el-popover>
</el-popover>
</
template
>
</
template
>
...
@@ -256,93 +204,35 @@ export default {
...
@@ -256,93 +204,35 @@ export default {
</el-image>
</el-image>
</template> -->
</template> -->
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"emplList"
label=
"使用员工"
align=
"center"
:show-overflow-tooltip=
"true"
>
prop=
"emplList"
label=
"使用员工"
align=
"center"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<el-tag
<el-tag
size=
"medium"
type=
"info"
v-for=
"(item, index) in row.emplList"
:key=
"index"
>
{{
size=
"medium"
item
.
businessName
type=
"info"
}}
</el-tag>
v-for=
"(item, index) in row.emplList"
:key=
"index"
>
{{
item
.
businessName
}}
</el-tag
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"客户标签"
align=
"center"
width=
"160"
:show-overflow-tooltip=
"true"
>
label=
"客户标签"
align=
"center"
width=
"160"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<el-tag
<el-tag
size=
"medium"
type=
"info"
v-for=
"(item, index) in row.tagList"
:key=
"index"
>
{{
size=
"medium"
item
.
tagName
type=
"info"
}}
</el-tag>
v-for=
"(item, index) in row.tagList"
:key=
"index"
>
{{
item
.
tagName
}}
</el-tag
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"实际群聊"
align=
"center"
:show-overflow-tooltip=
"true"
>
label=
"实际群聊"
align=
"center"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<el-tag
<el-tag
size=
"medium"
v-for=
"(item, index) in (row.actualGroupName || '').split(',')"
:key=
"index"
>
{{
size=
"medium"
item
v-for=
"(item, index) in row.groupList"
}}
</el-tag>
:key=
"index"
>
{{
item
.
groupName
}}
</el-tag
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"添加好友数"
align=
"center"
prop=
"cusNumber"
></el-table-column>
label=
"添加好友数"
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
></el-table-column>
align=
"center"
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"160"
></el-table-column>
prop=
"cusNumber"
<el-table-column
label=
"操作"
align=
"center"
width=
"180"
class-name=
"small-padding fixed-width"
>
></el-table-column>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
></el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"160"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
width=
"180"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<el-button
<el-button
v-hasPermi=
"['enterpriseWechat:edit']"
type=
"text"
@
click=
"goRoute(row.id)"
>
编辑
</el-button>
v-hasPermi=
"['enterpriseWechat:edit']"
<el-button
v-hasPermi=
"['enterpriseWechat:view']"
type=
"text"
@
click=
"download(row)"
>
下载
</el-button>
type=
"text"
<el-button
v-hasPermi=
"['enterpriseWechat:edit']"
type=
"text"
@
click=
"remove(row.id)"
>
删除
</el-button>
@
click=
"goRoute(row.id)"
>
编辑
</el-button
>
<el-button
v-hasPermi=
"['enterpriseWechat:view']"
type=
"text"
@
click=
"download(row)"
>
下载
</el-button
>
<el-button
v-hasPermi=
"['enterpriseWechat:edit']"
type=
"text"
@
click=
"remove(row.id)"
>
删除
</el-button
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
linkwe-ui/src/views/conversation/content/employee.vue
View file @
19e4ac6
...
@@ -205,7 +205,6 @@ export default {
...
@@ -205,7 +205,6 @@ export default {
}
}
},
},
handleNodeClick
(
data
,
add
)
{
handleNodeClick
(
data
,
add
)
{
debugger
if
(
!
data
.
userId
)
{
if
(
!
data
.
userId
)
{
}
else
{
}
else
{
this
.
talkName
=
data
.
name
this
.
talkName
=
data
.
name
...
...
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