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 23958416
authored
Jun 01, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交群发联调
1 parent
81e85a1f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
164 additions
and
95 deletions
src/api/modules/customerTransform.js
src/views/customerTransform/addCustomer.vue
src/views/customerTransform/components/basicInfo.vue
src/views/customerTransform/components/selectCrowd.vue
src/api/modules/customerTransform.js
View file @
2395841
...
...
@@ -25,7 +25,7 @@ const customerGroupList = params => {
const
insert
=
params
=>
{
params
.
method
=
`
${
path
}
insert`
return
http
({
return
http
_xiaolong
({
url
:
URL
,
method
:
'POST'
,
data
:
params
,
...
...
@@ -98,7 +98,7 @@ const customerCount = params => {
// 客户群发、客户群群发基本信息详情
const
customerDetail
=
params
=>
{
params
.
method
=
`
${
path
}
detail`
return
http
({
return
http
_xiaolong
({
url
:
URL
,
method
:
'GET'
,
data
:
params
,
...
...
src/views/customerTransform/addCustomer.vue
View file @
2395841
...
...
@@ -9,7 +9,7 @@
<el-form
class=
"basic-form"
:model=
"basicForm"
:rules=
"basicRules"
ref=
"basicForm"
label-width=
"120px"
>
<el-form-item
prop=
"userList"
>
<label
slot=
"label"
class=
"required"
>
选择群发账号
</label>
<el-button
size=
"small"
@
click=
"openMembers"
>
<el-button
size=
"small"
:disabled=
"isSelectCrowd"
@
click=
"openMembers"
>
<i
class=
"el-icon-plus"
></i>
选择成员
</el-button>
...
...
@@ -17,6 +17,7 @@
已选人数:
<span>
{{
basicForm
.
userList
?
basicForm
.
userList
.
length
:
0
}}
</span>
</span>
<span
v-show=
"isSelectCrowd"
class=
"tips-text"
>
锁定人群无法添加其他账号。
</span>
<div
class=
"sale-select"
v-show=
"basicForm.userList && basicForm.userList.length != 0"
>
<div
:key=
"key"
class=
"el-input-tag input-tag-wrapper"
>
<el-tag
effect=
"plain"
type=
"info"
v-for=
"(tag, idx) in basicForm.userList"
:key=
"idx"
closable
:disable-transitions=
"false"
@
close=
"remove(tag, idx)"
>
...
...
@@ -83,11 +84,10 @@
</div>
</div>
<div
v-show=
"basicForm.selectType == 3"
style=
"line-height: 32px; padding-bottom: 10px"
>
<el-button
:size=
"size"
icon=
"el-icon-plus"
@
click=
"selectCrowd"
>
选择人群
</el-button>
<el-button
:size=
"size"
icon=
"el-icon-plus"
@
click=
"selectCrowd"
>
{{
isSelectCrowd
?
'继续选择'
:
'选择人群'
}}
</el-button>
<div
class=
"sale-select"
v-show=
"basicForm.crowdList && basicForm.crowdList.length != 0"
>
<div
:key=
"key"
class=
"el-input-tag input-tag-wrapper"
>
<el-tag
effect=
"plain"
type=
"info"
v-for=
"(t, i) in basicForm.crowdList"
:key=
"i"
closable
:disable-transitions=
"false"
@
close=
"removeCrowd(t, i)"
>
<i
class=
"el-icon-user-solid"
></i>
{{
t
.
crowdName
}}
</el-tag>
</div>
...
...
@@ -148,7 +148,7 @@
<el-button
@
click=
"handleCancel"
>
取消
</el-button>
</div>
<SelectLabel
ref=
"selectLabel"
@
tagSelected=
"handleSelect"
:dialogVisible=
"dialogVisible"
></SelectLabel>
<SelectCrowd
ref=
"selectCrowd"
@
crowdData=
"getCrowdData"
></SelectCrowd>
<SelectCrowd
ref=
"selectCrowd"
@
crowdData=
"getCrowdData"
:selectCrowdData=
"basicForm.crowdList"
></SelectCrowd>
</div>
</
template
>
...
...
@@ -296,7 +296,8 @@ export default {
firstFlag
:
true
,
footerLeft
:
40
,
footerWidth
:
500
,
viewLoading
:
false
viewLoading
:
false
,
isSelectCrowd
:
false
}
},
watch
:
{
...
...
@@ -309,6 +310,13 @@ export default {
}
},
deep
:
true
},
'basicForm.selectType'
(
newVal
,
oldVal
)
{
if
(
oldVal
==
3
||
newVal
==
3
)
{
this
.
basicForm
.
userList
=
[]
this
.
selectData
=
[]
this
.
basicForm
.
crowdList
=
[]
}
}
},
mounted
()
{
...
...
@@ -544,22 +552,41 @@ export default {
params
.
condition
.
sTime
=
dayjs
(
this
.
basicForm
.
condition
.
date
[
0
]).
format
(
'YYYY-MM-DD'
)
params
.
condition
.
eTime
=
dayjs
(
endTime
).
format
(
'YYYY-MM-DD'
)
}
}
else
if
(
params
.
selectType
==
3
)
{
params
.
crowdCondition
=
this
.
basicForm
.
crowdList
params
.
combineType
=
1
}
if
(
this
.
basicForm
.
userList
&&
this
.
basicForm
.
userList
.
length
)
{
params
.
userList
=
this
.
basicForm
.
userList
.
map
(
item
=>
{
return
{
staffId
:
item
.
staffId
,
// staffName: item.staffName
}
})
}
params
.
userList
=
this
.
basicForm
.
userList
.
map
(
item
=>
{
return
{
staffId
:
item
.
staffId
,
staffName
:
item
.
staffName
}
})
return
params
},
// 查看群发人数
viewMembers
()
{
if
(
!
this
.
basicForm
.
userList
||
this
.
basicForm
.
userList
.
length
==
0
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请选择群发账号'
})
if
(
this
.
basicForm
.
selectType
==
3
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请选择人群'
})
}
else
{
if
(
this
.
basicForm
.
crowdList
&&
this
.
basicForm
.
userList
.
length
==
0
)
{
this
.
$message
({
type
:
'error'
,
message
:
'群发账号人数为0'
})
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
'请选择群发账号'
})
}
}
return
}
const
params
=
this
.
getSiftMembers
()
...
...
@@ -568,19 +595,21 @@ export default {
this
.
$apis
.
customerTransform
.
customerCount
(
params
)
.
then
(
res
=>
{
// if (res) {
console
.
log
(
res
)
this
.
viewLoading
=
false
this
.
isUpdate
=
!
res
this
.
groupNumber
=
res
// }
this
.
isUpdate
=
false
})
.
catch
(
err
=>
{
console
.
log
(
2222
)
this
.
viewLoading
=
false
this
.
groupNumber
=
0
this
.
isUpdate
=
false
})
},
// 选择客户change事件
radioChange
(
val
)
{
this
.
isSelectCrowd
=
false
this
.
isUpdate
=
true
this
.
basicForm
.
condition
=
{
sex
:
''
...
...
@@ -614,20 +643,22 @@ export default {
},
// 获取人群数据
getCrowdData
(
val
)
{
console
.
log
(
val
)
this
.
basicForm
.
crowdList
=
val
const
params
=
{
combineType
:
1
,
crowdCondition
:
val
if
(
val
.
length
)
{
this
.
isSelectCrowd
=
true
this
.
basicForm
.
crowdList
=
val
const
params
=
{
combineType
:
1
,
crowdCondition
:
val
}
this
.
$apis
.
customerTransform
.
followerEcho
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
$set
(
this
.
basicForm
,
'userList'
,
res
)
this
.
selectData
=
this
.
basicForm
.
userList
this
.
key
=
new
Date
()
this
.
isUpdate
=
true
this
.
editStatus
=
true
})
}
this
.
$apis
.
customerTransform
.
followerEcho
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
// this.basicForm.userList = res
this
.
$set
(
this
.
basicForm
,
'userList'
,
res
)
this
.
selectData
=
this
.
basicForm
.
userList
this
.
isUpdate
=
true
this
.
editStatus
=
true
})
}
}
}
...
...
@@ -799,4 +830,9 @@ export default {
.group-content
{
padding
:
22px
0
20px
20px
;
}
.tips-text
{
color
:
12px
;
color
:
#f56c6c
;
margin-left
:
20px
;
}
</
style
>
src/views/customerTransform/components/basicInfo.vue
View file @
2395841
...
...
@@ -104,6 +104,22 @@
</span>
</div>
</div>
<div
class=
"detail-condition"
v-if=
"form == 'customer' && basicInfo.selectType == 3"
>
<div
class=
"detail-condition-item"
style=
"width: 100%;"
>
<span
class=
"name"
>
人群
</span>
<span
v-for=
"(ite, index) in basicInfo.conditionResponses"
class=
"el-tag-item"
:key=
"index"
>
<el-tag
v-if=
"index
< 2
"
type=
"info"
>
{{
ite
.
crowdName
}}
</el-tag>
<el-tag
type=
"info"
v-if=
"basicInfo.conditionResponses.length > 2 && index == 2"
>
<el-popover
placement=
"top"
width=
"300"
trigger=
"hover"
>
<span
slot=
"reference"
>
...(
{{
basicInfo
.
conditionResponses
.
length
}}
)
</span>
<div
class=
"entmicro-hover"
>
<el-tag
type=
"info"
v-for=
"(ins, index) in basicInfo.conditionResponses"
:key=
"index"
:disable-transitions=
"false"
>
{{
ins
.
crowdName
}}
</el-tag>
</div>
</el-popover>
</el-tag>
</span>
</div>
</div>
</div>
<div
class=
"title"
>
数据统计
</div>
<div
class=
"statistics-info"
>
...
...
@@ -241,7 +257,7 @@ export default {
}
}
</
script
>
<
style
lang=
"scss"
scope
>
<
style
lang=
"scss"
>
.container
{
margin-bottom
:
20px
;
background-color
:
#ffffff
;
...
...
src/views/customerTransform/components/selectCrowd.vue
View file @
2395841
...
...
@@ -3,75 +3,70 @@
* @Author: huyue
* @Date: 2022-05-24 18:18:53
* @LastEditors: huyue
* @LastEditTime: 2022-05-3
0 14:57:17
* @LastEditTime: 2022-05-3
1 15:09:10
-->
<
template
>
<div>
<glsx-dialog
:title=
"'人群筛选'"
:isVisible=
"crowdVisible"
:width=
"'1080px'"
@
confirmDialog=
"handleConfirm"
@
closeDialog=
"crowdVisible = !crowdVisible"
>
<div
class=
"member-wrapper"
>
<div
class=
"member-left"
>
<div
class=
"member-title"
>
人群列表
</div>
<div
class=
"member-content"
>
<el-form
:inline=
"true"
class=
"member-form"
:model=
"searchForm"
@
submit
.
native
.
prevent
>
<el-form-item
label=
"人群名称"
style=
"margin-bottom: 0"
>
<el-input
:size=
"size"
v-model
.
trim=
"searchForm.keyword"
@
keyup
.
enter
.
native=
"search"
clearable
placeholder=
"请输入关键字搜索"
></el-input>
</el-form-item>
<el-form-item
label
style=
"margin-bottom: 0;"
>
<el-button
type=
"primary"
:size=
"size"
@
click=
"search"
>
搜索
</el-button>
</el-form-item>
</el-form>
<div
class=
"table-content"
style=
"max-height: 456px"
>
<GLTable
v-loading=
"loading"
ref=
"crowdTable"
:getListApi=
"getCrowdList"
:tableParams=
"crowdTableParams"
:searchForm=
"searchForm"
:hasPage=
"false"
:noDataImg=
"url"
:beforeSearchFn=
"beforeSearchFn"
@
selectionTable=
"selectionTable"
@
row-click=
"rowClick"
>
<!--
<div
slot=
"staffName"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
staffName
}}
</span>
<span
class=
"staff-title"
v-show=
"scope.scope.staffTitle"
>
{{
scope
.
scope
.
staffTitle
}}
</span>
</div>
-->
</GLTable>
<div>
<el-dialog
:title=
"'人群筛选'"
:width=
"'1080px'"
:visible
.
sync=
"crowdVisible"
>
<div
class=
"member-wrapper"
>
<div
class=
"member-left"
>
<div
class=
"member-title"
>
人群列表
</div>
<div
class=
"member-content"
>
<el-form
:inline=
"true"
class=
"member-form"
:model=
"searchForm"
@
submit
.
native
.
prevent
>
<el-form-item
label=
"人群名称"
style=
"margin-bottom: 0"
size=
"small"
>
<el-input
:size=
"size"
v-model
.
trim=
"searchForm.req.keyword"
@
keyup
.
enter
.
native=
"search"
clearable
placeholder=
"请输入关键字搜索"
></el-input>
</el-form-item>
<el-form-item
label
style=
"margin-bottom: 0;margin-left:10px"
size=
"small"
>
<el-button
type=
"primary"
:size=
"size"
@
click=
"search"
>
搜索
</el-button>
</el-form-item>
</el-form>
<div
class=
"table-content"
>
<GLTable
v-loading=
"loading"
ref=
"crowdTable"
:getListApi=
"getCrowdList"
:tableParams=
"crowdTableParams"
:hasNum=
"true"
:searchForm=
"searchForm"
:pageConf=
"pageConf"
:noDataImg=
"url"
:beforeSearchFn=
"beforeSearchFn"
@
selectionTable=
"selectionTable"
@
row-click=
"rowClick"
></GLTable>
</div>
</div>
</div>
</div>
</div>
<div
class=
"member-right"
>
<div
class=
"member-title"
>
已选
</div>
<div
class=
"member-name"
>
人群(
{{
innerTags
.
length
}}
项)
</div>
<div
class=
"input-tag-wrapper"
>
<div
class=
"tag-box"
>
<el-tag
v-for=
"(tag, idx) in innerTags"
:key=
"idx"
type=
"info"
closable
:disable-transitions=
"false"
@
close=
"remove(tag)"
>
<i
class=
"el-icon-user-solid"
></i>
{{
tag
.
crowdName
}}
</el-tag>
<div
class=
"member-right"
>
<div
class=
"member-title"
>
已选
</div>
<div
class=
"member-name"
>
人群(
{{
innerTags
.
length
}}
项)
</div>
<div
class=
"input-tag-wrapper"
>
<div
class=
"tag-box"
>
<el-tag
v-for=
"(tag, idx) in innerTags"
:key=
"idx"
type=
"info"
closable
:disable-transitions=
"false"
@
close=
"remove(tag)"
>
{{
tag
.
crowdName
}}
</el-tag>
</div>
</div>
</div>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"crowdVisible = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click
.
native=
"handleConfirm"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</glsx-dialog>
</div>
</
template
>
<
script
>
import
url
from
'@/assets/empty.png'
export
default
{
name
:
'SelectCrowd'
,
data
()
{
return
{
name
:
'SelectCrowd'
,
props
:
[
'selectCrowdData'
],
data
()
{
return
{
url
,
crowdVisible
:
false
,
searchForm
:
{
req
:{}},
innerTags
:
[],
tableCrowdData
:
[
{
name
:
'asda'
}
],
crowdVisible
:
false
,
searchForm
:
{
req
:
{}
},
innerTags
:
[],
getCrowdList
:
this
.
$apis
.
customerTransform
.
queryCrowdtree
,
pageConf
:
{
pageSize
:
'req.pageSize'
,
pageNum
:
'req.pageNum'
,
totalCount
:
'total'
},
crowdTableParams
:
{
checkSelectKey
:
'id'
,
checkSelectVal
:
[],
hasNum
:
false
,
listName
:
'crowdUnitList'
,
// 行数据的key
mutiSelectUniqueKey
:
'
i
d'
,
mutiSelectUniqueKey
:
'
crowdI
d'
,
// 多选ref的名称
mutiSelectName
:
'crowdlist'
,
tableColumns
:
[
...
...
@@ -89,14 +84,27 @@ export default {
}
]
}
}
},
}
},
watch
:
{
selectCrowdData
(
val
)
{
this
.
$emit
(
'crowdData'
,
val
)
if
(
val
.
length
)
{
this
.
$refs
.
crowdTable
.
$refs
.
crowdlistMutiTable
.
clearSelection
()
val
.
forEach
(
item
=>
{
this
.
rowClick
(
item
)
})
}
}
},
methods
:
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
searchForm
.
req
.
merchantId
=
this
.
$globalState
.
session
.
merchantId
this
.
searchForm
.
req
.
crowdType
=
3
this
.
searchForm
.
req
.
filterType
=
2
Object
.
assign
(
this
.
searchForm
.
req
,
{
merchantId
:
this
.
$globalState
.
session
.
merchantId
,
crowdType
:
3
,
filterType
:
2
})
resolve
()
})
},
...
...
@@ -116,6 +124,7 @@ export default {
handleConfirm
()
{
this
.
$emit
(
'crowdData'
,
this
.
innerTags
)
this
.
crowdVisible
=
false
this
.
searchForm
=
{
req
:
{}
}
}
}
}
...
...
@@ -126,7 +135,7 @@ export default {
display
:
flex
;
.member-title
{
font-size
:
16px
;
color
:
#333
;
color
:
#333
;
font-weight
:
600
;
line-height
:
22px
;
margin-bottom
:
6px
;
...
...
@@ -139,11 +148,17 @@ export default {
}
}
.member-left
{
width
:
80
0px
;
width
:
78
0px
;
.member-content
{
border
:
1px
solid
#eee
;
border-bottom
:
none
;
padding-bottom
:
20px
;
/deep/
{
.el-table
{
height
:
40vh
;
overflow-y
:
auto
;
}
}
.member-form
{
padding
:
10px
20px
;
}
...
...
@@ -159,7 +174,7 @@ export default {
}
}
.member-right
{
width
:
2
86
px
;
width
:
2
48
px
;
margin-left
:
14px
;
.member-name
{
font-size
:
14px
;
...
...
@@ -172,6 +187,7 @@ export default {
}
.tag-box
{
height
:
100%
;
width
:
100%
;
}
.input-tag-wrapper
{
position
:
relative
;
...
...
@@ -213,8 +229,9 @@ export default {
line-height
:
22px
;
margin-bottom
:
5px
;
height
:
24px
;
background
:
#FAFBFE
!important
;
}
/
deep
/
.el-dialog__title
{
font-weight
:
600
;
font-weight
:
600
;
}
</
style
>
\ No newline at end of file
</
style
>
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