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 b187602a
authored
Jun 09, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复人群弹窗
1 parent
d398ada1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
36 deletions
src/views/customerTransform/addCustomer.vue
src/views/customerTransform/components/selectCrowd.vue
src/views/customerTransform/addCustomer.vue
View file @
b187602
...
@@ -532,6 +532,8 @@ export default {
...
@@ -532,6 +532,8 @@ export default {
// 删除人群
// 删除人群
removeCrowd
(
item
,
index
)
{
removeCrowd
(
item
,
index
)
{
this
.
basicForm
.
crowdList
.
splice
(
index
,
1
)
this
.
basicForm
.
crowdList
.
splice
(
index
,
1
)
this
.
$refs
.
selectCrowd
.
remove
(
item
)
this
.
getCrowdData
(
this
.
basicForm
.
crowdList
)
if
(
!
this
.
basicForm
.
crowdList
.
length
)
{
if
(
!
this
.
basicForm
.
crowdList
.
length
)
{
this
.
basicForm
.
userList
=
[]
this
.
basicForm
.
userList
=
[]
this
.
selectData
=
this
.
basicForm
.
userList
this
.
selectData
=
this
.
basicForm
.
userList
...
@@ -666,7 +668,7 @@ export default {
...
@@ -666,7 +668,7 @@ export default {
},
},
// 人群筛选弹窗
// 人群筛选弹窗
selectCrowd
()
{
selectCrowd
()
{
this
.
$refs
.
selectCrowd
.
crowdVisible
=
true
this
.
$refs
.
selectCrowd
.
init
(
this
.
basicForm
.
crowdList
)
},
},
// 获取人群数据
// 获取人群数据
getCrowdData
(
val
)
{
getCrowdData
(
val
)
{
...
...
src/views/customerTransform/components/selectCrowd.vue
View file @
b187602
...
@@ -3,11 +3,11 @@
...
@@ -3,11 +3,11 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-05-24 18:18:53
* @Date: 2022-05-24 18:18:53
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2022-06-0
8 18:47:26
* @LastEditTime: 2022-06-0
9 17:55:40
-->
-->
<
template
>
<
template
>
<div>
<div>
<el-dialog
:title=
"'人群筛选'"
:
width=
"'1080px'"
:
visible
.
sync=
"crowdVisible"
>
<el-dialog
:title=
"'人群筛选'"
:visible
.
sync=
"crowdVisible"
>
<div
class=
"member-wrapper"
>
<div
class=
"member-wrapper"
>
<div
class=
"member-left"
>
<div
class=
"member-left"
>
<div
class=
"member-title"
>
<div
class=
"member-title"
>
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<div
class=
"member-content"
>
<div
class=
"member-content"
>
<el-form
:inline=
"true"
class=
"member-form"
:model=
"searchForm"
@
submit
.
native
.
prevent
>
<el-form
:inline=
"true"
class=
"member-form"
:model=
"searchForm"
@
submit
.
native
.
prevent
>
<el-form-item
label=
"人群名称"
style=
"margin-bottom: 0"
size=
"small"
>
<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
<el-input
:size=
"size"
v-model
.
trim=
"searchForm.keyword"
@
keyup
.
enter
.
native=
"search"
clearable
placeholder=
"请输入关键字搜索"
></el-input>
placeholder=
"请输入关键字搜索"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label
style=
"margin-bottom: 0;margin-left:10px"
size=
"small"
>
<el-form-item
label
style=
"margin-bottom: 0;margin-left:10px"
size=
"small"
>
...
@@ -24,9 +24,9 @@
...
@@ -24,9 +24,9 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"table-content"
>
<div
class=
"table-content"
>
<GLTable
v-loading=
"loading"
ref=
"crowdTable"
:
getListApi=
"getCrowdList"
:tableParams=
"crowdTableParams
"
<GLTable
v-loading=
"loading"
ref=
"crowdTable"
:
tableData=
"tableData"
@
refreshTable=
"search
"
:
hasNum=
"true"
:searchForm=
"searchForm"
:pageConf=
"pageConf"
:noDataImg=
"url
"
:
tableTotal=
"tableTotal"
:layout=
"layout"
:tableParams=
"crowdTableParams"
:hasNum=
"true
"
:
beforeSearchFn=
"beforeSearchFn
"
@
selectionTable=
"selectionTable"
@
row-click=
"rowClick"
></GLTable>
:
pageConf=
"pageConf"
:noDataImg=
"url
"
@
selectionTable=
"selectionTable"
@
row-click=
"rowClick"
></GLTable>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
</div>
</div>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"
handleClo
se"
>
取 消
</el-button>
<el-button
size=
"small"
@
click=
"
crowdVisible = fal
se"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click
.
native=
"handleConfirm"
>
确 定
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click
.
native=
"handleConfirm"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
...
@@ -52,18 +52,25 @@
...
@@ -52,18 +52,25 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
url
from
'@/assets/empty.png'
//
import url from '@/assets/empty.png'
export
default
{
export
default
{
name
:
'SelectCrowd'
,
name
:
'SelectCrowd'
,
props
:
[
'selectCrowdData'
],
data
()
{
data
()
{
return
{
return
{
url
,
url
:
0
,
crowdVisible
:
false
,
crowdVisible
:
false
,
searchForm
:
{
req
:
{}
},
searchForm
:
{
keyword
:
''
},
innerTags
:
[],
innerTags
:
[],
getCrowdList
:
this
.
$apis
.
customerTransform
.
queryCrowdtree
,
inner
:
[],
pageConf
:
{
pageSize
:
'req.pageSize'
,
pageNum
:
'req.pageNum'
,
totalCount
:
'total'
},
tableCrowdData
:
[
{
name
:
'asda'
}
],
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
layout
:
'sizes, prev, pager, next, jumper, ->, total'
,
tableData
:
[],
tableTotal
:
0
,
crowdTableParams
:
{
crowdTableParams
:
{
checkSelectKey
:
'id'
,
checkSelectKey
:
'id'
,
checkSelectVal
:
[],
checkSelectVal
:
[],
...
@@ -90,30 +97,59 @@ export default {
...
@@ -90,30 +97,59 @@ export default {
}
}
}
}
},
},
watch
:
{
methods
:
{
selectCrowdData
(
val
)
{
init
(
val
)
{
this
.
$emit
(
'crowdData'
,
val
)
console
.
log
(
val
)
this
.
inner
=
this
.
$common
.
utils
.
deepClone
(
val
)
this
.
innerTags
=
this
.
$common
.
utils
.
deepClone
(
val
)
this
.
crowdVisible
=
true
this
.
searchForm
.
keyword
=
''
this
.
$nextTick
(()
=>
{
this
.
$refs
.
crowdTable
.
$refs
.
crowdlistMutiTable
.
clearSelection
()
this
.
$refs
.
crowdTable
.
$refs
.
crowdlistMutiTable
.
clearSelection
()
if
(
val
.
length
)
{
this
.
$refs
.
crowdTable
.
page
.
pageNum
=
1
val
.
forEach
(
item
=>
{
this
.
getCrowdList
()
this
.
rowClick
(
item
)
})
})
},
getCrowdList
()
{
var
params
=
{
req
:
{
keyword
:
this
.
searchForm
.
keyword
,
merchantId
:
this
.
$globalState
.
session
.
merchantId
,
crowdType
:
3
,
filterType
:
2
,
pageSize
:
this
.
$refs
.
crowdTable
.
page
.
pageSize
,
pageNum
:
this
.
$refs
.
crowdTable
.
page
.
pageNum
}
}
}
this
.
$apis
.
customerTransform
.
queryCrowdtree
(
params
).
then
(
res
=>
{
this
.
tableData
=
res
.
crowdUnitList
this
.
tableTotal
=
res
.
total
console
.
log
(
this
.
inner
)
console
.
log
(
this
.
tableData
)
this
.
tableData
.
forEach
(
item
=>
{
this
.
inner
.
forEach
((
itm
,
index
)
=>
{
if
(
itm
.
crowdId
==
item
.
crowdId
)
{
this
.
rowClick
(
item
)
}
}
})
})
})
},
},
methods
:
{
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
Object
.
assign
(
this
.
searchForm
.
req
,
{
Object
.
assign
(
this
.
searchForm
.
req
,
{})
merchantId
:
this
.
$globalState
.
session
.
merchantId
,
crowdType
:
3
,
filterType
:
2
})
resolve
()
resolve
()
})
})
},
},
selectionTable
(
val
)
{
selectionTable
(
val
)
{
this
.
innerTags
=
val
this
.
innerTags
=
[]
for
(
let
i
=
0
;
i
<
val
.
length
;
i
++
)
{
console
.
log
(
i
)
const
tagArr
=
this
.
innerTags
.
map
(
item
=>
item
.
crowdId
)
if
(
!
tagArr
.
includes
(
val
[
i
].
crowdId
))
{
this
.
innerTags
.
push
(
val
[
i
])
}
}
},
},
remove
(
item
)
{
remove
(
item
)
{
this
.
$refs
.
crowdTable
.
$refs
.
crowdlistMutiTable
.
toggleRowSelection
(
item
)
this
.
$refs
.
crowdTable
.
$refs
.
crowdlistMutiTable
.
toggleRowSelection
(
item
)
...
@@ -123,17 +159,12 @@ export default {
...
@@ -123,17 +159,12 @@ export default {
this
.
$refs
.
crowdTable
.
$refs
.
crowdlistMutiTable
.
toggleRowSelection
(
row
)
this
.
$refs
.
crowdTable
.
$refs
.
crowdlistMutiTable
.
toggleRowSelection
(
row
)
},
},
search
()
{
search
()
{
this
.
$refs
.
crowdTable
.
refreshTable
()
this
.
getCrowdList
()
},
},
handleConfirm
()
{
handleConfirm
()
{
this
.
$emit
(
'crowdData'
,
this
.
innerTags
)
this
.
$emit
(
'crowdData'
,
this
.
innerTags
)
this
.
crowdVisible
=
false
this
.
crowdVisible
=
false
this
.
searchForm
=
{
req
:
{}
}
this
.
searchForm
=
{
req
:
{}
}
},
handleClose
()
{
this
.
crowdVisible
=
false
this
.
innerTags
=
[]
this
.
$refs
.
crowdTable
.
$refs
.
crowdlistMutiTable
.
clearSelection
()
}
}
}
}
}
}
...
@@ -160,7 +191,7 @@ export default {
...
@@ -160,7 +191,7 @@ export default {
}
}
.member-left
{
.member-left
{
width
:
78
0px
;
width
:
80
0px
;
.member-content
{
.member-content
{
border
:
1px
solid
#eee
;
border
:
1px
solid
#eee
;
...
@@ -191,7 +222,7 @@ export default {
...
@@ -191,7 +222,7 @@ export default {
}
}
.member-right
{
.member-right
{
width
:
2
48
px
;
width
:
2
86
px
;
margin-left
:
14px
;
margin-left
:
14px
;
.member-name
{
.member-name
{
...
@@ -253,7 +284,7 @@ export default {
...
@@ -253,7 +284,7 @@ export default {
line-height
:
22px
;
line-height
:
22px
;
margin-bottom
:
5px
;
margin-bottom
:
5px
;
height
:
24px
;
height
:
24px
;
background
:
#
FAFBFE
!important
;
background
:
#
fafbfe
!important
;
}
}
/
deep
/
.el-dialog__title
{
/
deep
/
.el-dialog__title
{
...
...
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