Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 e7d12a4b
authored
Feb 24, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
标签筛选修改
1 parent
8f39d1e9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
104 additions
and
90 deletions
src/views/customerTransform/addCustomer.vue
src/views/customerTransform/components/basicInfo.vue
src/views/customerTransform/components/selectLabel.vue
src/views/customerTransform/addCustomer.vue
View file @
e7d12a4
...
...
@@ -697,7 +697,7 @@ export default {
align-items
:
center
;
}
.input-tag-wrapper
{
max-height
:
68
px
;
max-height
:
75
px
;
overflow
:
auto
;
position
:
relative
;
font-size
:
14px
;
...
...
src/views/customerTransform/components/basicInfo.vue
View file @
e7d12a4
...
...
@@ -17,24 +17,22 @@
</div>
<div
class=
"detail-item"
>
<div
class=
"detail-label"
>
群发内容:
</div>
<div
class=
"detail-value"
>
[共
{{
basicInfo
.
attachmentList
?
basicInfo
.
attachmentList
.
length
:
'0'
}}
条]
</div>
<div
class=
"detail-value"
>
[共
{{
basicInfo
.
attachmentList
?
basicInfo
.
attachmentList
.
length
:
'0'
}}
条]
</div>
<div
class=
"detail-tips"
>
详见右侧视图
</div>
</div>
<div
class=
"detail-item"
v-show=
"form == 'customer'"
>
<div
class=
"detail-label"
>
群发类型:
</div>
<div
class=
"detail-value"
>
{{
basicInfo
.
sendType
==
1
?
'立即发送'
:
'定时发送'
}}
</div>
<div
class=
"detail-value"
>
{{
basicInfo
.
sendType
==
1
?
'立即发送'
:
'定时发送'
}}
</div>
</div>
<div
class=
"detail-item"
v-show=
"form == 'customer'"
>
<div
class=
"detail-label"
>
发送状态:
</div>
<div
class=
"detail-value"
>
{{
STATUS_TYPE
[
basicInfo
.
status
]
}}
</div>
<div
class=
"detail-value"
>
{{
STATUS_TYPE
[
basicInfo
.
status
]
}}
</div>
</div>
<div
class=
"detail-item"
>
<div
class=
"detail-label"
>
发送时间:
</div>
<div
class=
"detail-value"
>
{{
basicInfo
.
sendTime
?
basicInfo
.
sendTime
:
'-'
}}
</div>
<div
class=
"detail-value"
>
{{
basicInfo
.
sendTime
?
basicInfo
.
sendTime
:
'-'
}}
</div>
</div>
<div
class=
"detail-item"
style=
"margin-bottom: 0
;
"
>
<div
class=
"detail-item"
style=
"margin-bottom: 0"
>
<div
class=
"detail-label"
>
群发对象:
</div>
<div
class=
"detail-value"
>
在员工
...
...
@@ -45,19 +43,14 @@
</el-tag>
<el-tag
type=
"info"
v-if=
"basicInfo.userList.length > 3 && index == 3"
>
<el-popover
placement=
"top"
width=
"300"
trigger=
"hover"
>
<span
slot=
"reference"
>
...(
{{
basicInfo
.
userList
.
length
}}
)
</span>
<span
slot=
"reference"
>
...(
{{
basicInfo
.
userList
.
length
}}
)
</span>
<div
class=
"entmicro-hover"
>
<el-tag
type=
"info"
v-for=
"(i, index) in basicInfo.userList"
:key=
"index"
:disable-transitions=
"false"
>
{{
i
.
staffName
}}
</el-tag>
<el-tag
type=
"info"
v-for=
"(i, index) in basicInfo.userList"
:key=
"index"
:disable-transitions=
"false"
>
{{
i
.
staffName
}}
</el-tag>
</div>
</el-popover>
</el-tag>
</span>
中满足以下条件中的
{{
basicInfo
.
customerCount
?
basicInfo
.
customerCount
:
0
}}
个
{{
form
==
'customer'
?
'客户'
:
'群聊'
}}
中满足以下条件中的
{{
basicInfo
.
customerCount
?
basicInfo
.
customerCount
:
0
}}
个
{{
form
==
'customer'
?
'客户'
:
'群聊'
}}
<!-- v-if="selectType == 2"
<span
v-for=
"(item, index) in basicInfo.userList"
:key=
"item.id"
>
[
{{
item
.
staffName
}}
]
<span
v-show=
"basicInfo.userList.length -1 != index"
>
、
</span>
...
...
@@ -73,33 +66,21 @@
<div
class=
"detail-condition"
v-if=
"form == 'customer' && basicInfo.selectType == 2"
>
<div
class=
"detail-condition-item"
>
<span
class=
"name"
>
性别
</span>
<span>
{{
SEX_TYPE
[
basicInfo
.
condition
.
sex
]
}}
</span>
<span>
{{
SEX_TYPE
[
basicInfo
.
condition
.
sex
]
}}
</span>
</div>
<div
v-if=
"basicInfo.condition.startTime"
class=
"detail-condition-item"
>
<span
class=
"name"
>
添加时间
</span>
<span>
{{
basicInfo
.
condition
.
startTime
?
basicInfo
.
condition
.
startTime
.
split
(
' '
)[
0
]
:
'-'
}}
至
{{
basicInfo
.
condition
.
endTime
?
basicInfo
.
condition
.
endTime
.
split
(
' '
)[
0
]
:
'-'
}}
</span>
<span>
{{
basicInfo
.
condition
.
startTime
?
basicInfo
.
condition
.
startTime
.
split
(
' '
)[
0
]
:
'-'
}}
至
{{
basicInfo
.
condition
.
endTime
?
basicInfo
.
condition
.
endTime
.
split
(
' '
)[
0
]
:
'-'
}}
</span>
</div>
<div
class=
"detail-condition-item"
v-if=
"basicInfo.condition.chatName"
>
<span
class=
"name"
>
所在群聊
</span>
<span
v-for=
"(item, index) in basicInfo.condition.chatName.split(',')"
class=
"el-tag-item"
:key=
"index"
>
<span
v-for=
"(item, index) in basicInfo.condition.chatName.split(',')"
class=
"el-tag-item"
:key=
"index"
>
<el-tag
v-if=
"index
< 2
"
type=
"info"
class=
"hidden-tag"
>
{{
item
}}
</el-tag>
<el-tag
type=
"info"
v-if=
"basicInfo.condition.chatName.split(',').length > 2 && index == 2"
>
<el-tag
type=
"info"
v-if=
"basicInfo.condition.chatName.split(',').length > 2 && index == 2"
>
<el-popover
placement=
"top"
width=
"300"
trigger=
"hover"
>
<span
slot=
"reference"
>
...(
{{
basicInfo
.
condition
.
chatName
.
split
(
','
).
length
}}
)
</span>
<span
slot=
"reference"
>
...(
{{
basicInfo
.
condition
.
chatName
.
split
(
','
).
length
}}
)
</span>
<div
class=
"entmicro-hover"
>
<el-tag
type=
"info"
v-for=
"(i, index) in basicInfo.condition.chatName.split(',')"
:key=
"index"
:disable-transitions=
"false"
>
{{
i
}}
</el-tag>
<el-tag
type=
"info"
v-for=
"(i, index) in basicInfo.condition.chatName.split(',')"
:key=
"index"
:disable-transitions=
"false"
>
{{
i
}}
</el-tag>
</div>
</el-popover>
</el-tag>
...
...
@@ -107,25 +88,16 @@
</div>
<div
class=
"detail-condition-item"
v-if=
"basicInfo.condition.tagName"
>
<span
class=
"name"
>
标签筛选
</span>
<span
v-for=
"(itm, idx) in basicInfo.condition.tagName.split(',')"
class=
"el-tag-item"
:key=
"idx"
>
<el-tag
v-if=
"idx
< 2
"
type=
"info"
class=
"hidden-tag"
>
{{
itm
}}
</el-tag>
<el-tag
type=
"info"
v-if=
"basicInfo.condition.tagName.split(',').length > 2 && idx == 2"
>
<span
v-for=
"(itm, idx) in basicInfo.condition.tagName.split(',')"
class=
"el-tag-item"
:key=
"idx"
>
<!--
<el-tag
v-if=
"idx
< 2
"
type=
"info"
class=
"hidden-tag"
>
{{
itm
}}
</el-tag>
-->
<el-tooltip
class=
"toolTip"
effect=
"dark"
:content=
"itm"
placement=
"top"
:disabled=
"itm.length
< 4
||
basicInfo
.
condition
.
tagName
.
split
(',').
length
>
2">
<el-tag
v-if=
"idx
< 2
"
type=
"info"
class=
"hidden-tag"
>
{{
itm
}}
</el-tag>
</el-tooltip>
<el-tag
type=
"info"
v-if=
"basicInfo.condition.tagName.split(',').length > 2 && idx == 2"
>
<el-popover
placement=
"top"
width=
"300"
trigger=
"hover"
>
<span
slot=
"reference"
>
...(
{{
basicInfo
.
condition
.
tagName
.
split
(
','
).
length
}}
)
</span>
<span
slot=
"reference"
>
...(
{{
basicInfo
.
condition
.
tagName
.
split
(
','
).
length
}}
)
</span>
<div
class=
"entmicro-hover"
>
<el-tag
type=
"info"
v-for=
"(i, index) in basicInfo.condition.tagName.split(',')"
:key=
"index"
:disable-transitions=
"false"
>
{{
i
}}
</el-tag>
<el-tag
type=
"info"
v-for=
"(i, index) in basicInfo.condition.tagName.split(',')"
:key=
"index"
:disable-transitions=
"false"
>
{{
i
}}
</el-tag>
</div>
</el-popover>
</el-tag>
...
...
@@ -138,39 +110,39 @@
<div
class=
"statistics-ul"
>
<div
class=
"statistics-li statistics-border"
>
<div
class=
"statistics-number"
>
<span>
{{
form
==
'customer'
?
statistic
.
senderStaffCount
:
statistic
.
senderStaffCount
}}
</span>
<span>
{{
form
==
'customer'
?
statistic
.
senderStaffCount
:
statistic
.
senderStaffCount
}}
</span>
人
</div>
<div
class=
"statistics-text"
>
已发送
{{
form
==
'customer'
?
'成员'
:
'群主'
}}
</div>
<div
class=
"statistics-text"
>
已发送
{{
form
==
'customer'
?
'成员'
:
'群主'
}}
</div>
</div>
<div
class=
"statistics-li"
>
<div
class=
"statistics-number"
>
<span>
{{
form
==
'customer'
?
statistic
.
senderCustomerCount
:
statistic
.
senderGroupCount
}}
</span>
{{
form
==
'customer'
?
'人'
:
'个'
}}
<span>
{{
form
==
'customer'
?
statistic
.
senderCustomerCount
:
statistic
.
senderGroupCount
}}
</span>
{{
form
==
'customer'
?
'人'
:
'个'
}}
</div>
<div
class=
"statistics-text"
>
送达
{{
form
==
'customer'
?
'客户'
:
'群聊'
}}
</div>
<div
class=
"statistics-text"
>
送达
{{
form
==
'customer'
?
'客户'
:
'群聊'
}}
</div>
</div>
</div>
<div
class=
"statistics-ul"
>
<div
class=
"statistics-li statistics-border"
>
<div
class=
"statistics-number"
>
<span>
{{
form
==
'customer'
?
statistic
.
unSenderStaffCount
:
statistic
.
unSenderStaffCount
}}
</span>
<span>
{{
form
==
'customer'
?
statistic
.
unSenderStaffCount
:
statistic
.
unSenderStaffCount
}}
</span>
人
</div>
<div
class=
"statistics-text"
>
未发送
{{
form
==
'customer'
?
'成员'
:
'群主'
}}
</div>
<div
class=
"statistics-text"
>
未发送
{{
form
==
'customer'
?
'成员'
:
'群主'
}}
</div>
</div>
<div
class=
"statistics-li"
>
<div
class=
"statistics-number"
>
<span>
{{
form
==
'customer'
?
statistic
.
unSenderCustomerCount
:
statistic
.
unSenderGroupCount
}}
</span>
{{
form
==
'customer'
?
'人'
:
'个'
}}
<span>
{{
form
==
'customer'
?
statistic
.
unSenderCustomerCount
:
statistic
.
unSenderGroupCount
}}
</span>
{{
form
==
'customer'
?
'人'
:
'个'
}}
</div>
<div
class=
"statistics-text"
>
未送达
{{
form
==
'customer'
?
'客户'
:
'群聊'
}}
</div>
<div
class=
"statistics-text"
>
未送达
{{
form
==
'customer'
?
'客户'
:
'群聊'
}}
</div>
</div>
</div>
<div
v-if=
"form == 'customer'"
class=
"statistics-ul"
>
<div
class=
"statistics-li"
style=
"margin: 42px 28px
;
"
>
<div
class=
"statistics-li"
style=
"margin: 42px 28px"
>
<div
class=
"statistics-number"
>
<span>
{{
statistic
.
senderCustomerFailureCount
}}
</span>
<span>
{{
statistic
.
senderCustomerFailureCount
}}
</span>
人
</div>
<div>
客户送达失败
</div>
...
...
@@ -185,16 +157,16 @@
<
script
>
const
STATUS
=
{
'-1'
:
'创建失败'
,
'0'
:
'创建成功'
,
'1'
:
'发送成功'
,
'2'
:
'发送失败'
,
'3'
:
'待发送'
0
:
'创建成功'
,
1
:
'发送成功'
,
2
:
'发送失败'
,
3
:
'待发送'
}
const
SEX
=
{
null
:
'全部性别'
,
'1'
:
'男'
,
'2'
:
'女'
,
'0'
:
'未知性别'
1
:
'男'
,
2
:
'女'
,
0
:
'未知性别'
}
import
*
as
dayjs
from
'dayjs'
...
...
@@ -228,12 +200,21 @@ export default {
mounted
()
{
this
.
getCustomerDetail
(
this
.
id
)
this
.
getStatistic
()
// console.log(this.basicInfo)
// console.log(this.basicInfo.condition, '----')
},
computed
:
{
// tagWidth() {
// var jmz = {}
// jmz.GetLength = function (str) {
// return str.replace(/[\u0391-\uFFE5]/g, 'aa').length //先把中文替换成两个字节的英文,在计算长度
// }
// }
},
methods
:
{
getCustomerDetail
(
id
)
{
this
.
$apis
.
customerTransform
.
customerDetail
({
id
}).
then
(
res
=>
{
this
.
basicInfo
=
res
// console.log(this.basicInfo, '123');
// this.basicInfo.sendTime = dayjs(this.basicInfo.sendTime).format('YYYY-MM-DD HH:mm:ss')
const
previewList
=
res
.
attachmentList
.
map
(
item
=>
{
if
(
item
.
attType
==
7
&&
item
.
attContent
)
item
.
attContent
=
JSON
.
parse
(
item
.
attContent
)
...
...
src/views/customerTransform/components/selectLabel.vue
View file @
e7d12a4
<
template
>
<div
class=
"tag-main"
>
<el-dialog
title=
"选择标签"
:visible
.
sync=
"dialogVisible"
width=
"
7
0%"
:before-close=
"handleClose"
>
<el-dialog
title=
"选择标签"
:visible
.
sync=
"dialogVisible"
width=
"
5
0%"
:before-close=
"handleClose"
>
<div
class=
"tag-panel"
>
<div
class=
"tag-panel-select"
>
<div
class=
"tag-title"
>
预选标签
</div>
<div
class=
"tag-select-box"
>
<div
class=
"tag-box-header"
>
<el-input
size=
"small"
v-model=
"labelGroupName"
placeholder=
"请输入搜索内容"
></el-input>
<el-input
size=
"small"
v-model=
"labelGroupName"
placeholder=
"请输入搜索内容"
clearable
@
keydown
.
enter
.
native=
"handleSearch"
></el-input>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
size=
"small"
@
click=
"handleReset"
>
重置
</el-button>
</div>
<div
class=
"checkbox-group-box"
:style=
"
{ height: heightBox + 'px' }">
<div
style=
"margin-bottom: 8px"
v-for=
"(item, index) in labelTreeRets"
:key=
"index
"
>
<div
style=
"margin-bottom: 8px"
class=
"checkbox-box"
v-for=
"(item, index) in labelTreeRets"
:key=
"index"
@
click=
"item.checked = !item.checked
"
>
<span
class=
"el-tree-node__expand-icon el-icon-caret-right"
:class=
"
{ expanded: item.checked }" @click="item.checked = !item.checked">
</span>
{{
item
.
labelGroup
.
name
}}
<el-tag
:size=
"size"
>
{{
item
.
labelType
}}
</el-tag>
<div
style=
"margin: 15px 0"
></div>
<el-radio-group
class=
"tag-group"
v-model=
"item.tagChecked"
v-show=
"item.checked"
>
<el-radio
v-for=
"(itm, idx) in item.labelList"
:label=
"itm"
:key=
"idx"
>
{{
itm
.
name
}}
</el-radio>
<div
v-for=
"(itm, idx) in item.labelList"
:key=
"idx"
class=
"radio-tag"
>
<el-tooltip
effect=
"dark"
placement=
"top"
:disabled=
"itm.name.length
< 8
"
>
<el-radio
class=
"radio-text"
:label=
"itm"
>
{{
itm
.
name
}}
</el-radio>
<!--
<el-radio
:label=
"itm"
>
{{
itm
.
name
.
length
>
4
?
itm
.
name
.
slice
(
0
,
3
)
+
'...'
:
itm
.
name
}}
</el-radio>
-->
<div
slot=
"content"
>
{{
itm
.
name
}}
</div>
</el-tooltip>
</div>
</el-radio-group>
<!--
<el-radio-group
class=
"tag-group"
v-model=
"item.tagChecked"
@
change=
"handleCheckedChange(item.tagChecked, index)"
v-show=
"item.checked"
>
<el-radio
v-for=
"(itm, idx) in item.labelList"
:label=
"itm"
:key=
"idx"
>
{{
itm
.
name
}}
</el-radio>
</el-radio-group>
-->
</div>
</div>
</div>
...
...
@@ -149,7 +152,7 @@ export default {
this
.
labelTreeRets
.
forEach
(
tag
=>
{
if
(
item
.
labelGroup
.
id
==
tag
.
labelGroup
.
id
)
{
let
labelId
=
item
.
labelList
[
0
].
id
let
index
=
tag
.
labelList
.
findIndex
(
iem
=>
iem
.
id
==
labelId
)
let
index
=
tag
.
labelList
.
findIndex
(
iem
=>
iem
.
id
==
labelId
)
console
.
log
(
index
)
// tag.tagChecked = item.tagChecked
tag
.
tagChecked
=
tag
.
labelList
[
index
]
...
...
@@ -191,6 +194,10 @@ export default {
.
filter
(
item
=>
item
)
console
.
log
(
labelTreeRets
)
this
.
$emit
(
'tagSelected'
,
labelTreeRets
)
},
handleReset
()
{
this
.
labelGroupName
=
''
this
.
querylabeltree
()
}
},
mounted
()
{
...
...
@@ -201,6 +208,9 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
//
::v-deep
.el-tag
{
//
color
:
red
!important
;
//
}
.dialog-jump
{
color
:
#5850ff
;
float
:
left
;
...
...
@@ -277,24 +287,47 @@ export default {
font-size
:
16px
;
}
.tag-group
{
margin-left
:
40
px
;
margin-left
:
26
px
;
display
:
flex
;
flex-wrap
:
wrap
;
.el-checkbox
{
width
:
40%
;
margin-bottom
:
6px
;
display
:
flex
;
align-items
:
center
;
.radio-tag{
display
:
inline-block
;
width
:
50%
;
.el-radio
{
margin
:
8px
0
;
display
:
inline-flex
;
align-items
:
center
;
/deep/.el-radio__label
{
display
:
inline-block
;
max-width
:
120px
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
overflow
:
hidden
;
word-wrap
:
break-word
;
}
}
}
}
}
}
.checkbox-group-box
{
overflow
:
auto
;
.el-tag
{
font-size
:
12px
;
border
:
none
;
background
:
rgba
(
$
color
:
#5850ff
,
$
alpha
:
0.3
);
.checkbox-box
{
cursor
:
pointer
;
font-size
:
14px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
20px
;
/deep/
{
.el-tag
{
color
:
#aaa5fa
!important
;
font-size
:
12px
;
border
:
none
;
background
:
rgba
(
$
color
:
#5850ff
,
$
alpha
:
0.1
);
}
}
}
}
.tag-selected-box
{
...
...
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