Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-custom
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 990effd6
authored
Mar 11, 2022
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
6e4dd2a6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
398 additions
and
9 deletions
src/api/modules/crowdManage.js
src/views/crowdManage/crowdDetail.vue
src/views/crowdManage/index.vue
src/api/modules/crowdManage.js
View file @
990effd
...
@@ -12,7 +12,8 @@ import { http3 } from '@/main'
...
@@ -12,7 +12,8 @@ import { http3 } from '@/main'
export
function
getCrowdList
(
params
)
{
export
function
getCrowdList
(
params
)
{
params
.
method
=
'scrm.api.datahub.user.queryCrowdTree'
params
.
method
=
'scrm.api.datahub.user.queryCrowdTree'
return
http3
({
return
http3
({
url
:
'/rop-scrm-datahub/router'
,
// url: '/rop-scrm-datahub/router',
url
:
'http://192.168.3.181:9636/rop-scrm-datahub/router'
,
method
:
'POST'
,
method
:
'POST'
,
data
:
params
,
data
:
params
,
sign
:
true
,
sign
:
true
,
...
...
src/views/crowdManage/crowdDetail.vue
View file @
990effd
<
template
>
<div
class=
"scrm-sub-client-container"
>
<div
class=
"container"
>
<div>
<div
class=
"title"
>
创建人群
</div>
<div
class=
"info-box"
>
<el-form
class=
"create-form"
:model=
"groupForm"
:rules=
"groupRules"
ref=
"groupForm"
label-width=
"118px"
>
<div
class=
"el-form-line"
>
<el-form-item
label=
"人群名称:"
prop=
"groupName"
class=
"label-word"
>
<div
class=
"color-3"
>
年龄为2—40岁,奥迪3系、奔驰4系,2
</div>
</el-form-item>
</div>
<div
class=
"el-form-line"
>
<el-form-item
label=
"人群描述:"
prop=
"groupNameRule"
class=
"label-word"
>
<div
class=
"color-3"
>
人群描述
</div>
</el-form-item>
</div>
<div
class=
"el-form-line"
>
<el-form-item
label=
"标签筛选:"
prop=
"groupNameRule"
class=
"label-word"
>
<div
class=
"flex"
>
<div
class=
"font-14 color-58 mr2 hand"
@
click=
"open('dialogRuleVisible')"
>
人群规则说明
</div>
<div
class=
"font-14 color-58 hand"
@
click=
"open('dialogLogicVisible')"
>
人群规则逻辑
</div>
</div>
</el-form-item>
</div>
<div
class=
"el-form-line"
>
<el-form-item
label=
"已选标签:"
prop=
"groupNameRule"
class=
"label-word"
>
<div
class=
"pageContent"
>
<GLTable
:tableTotal=
"tableTotal"
:tableData=
"tableData"
:hasNum=
"hasNum"
:hasPage=
"hasPage"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span
slot=
"labelGroup"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
labelGroup
.
name
}}
</span>
</span>
<span
slot=
"labelList"
slot-scope=
"scope"
>
<div
class=
"allTagsWrap flex"
>
<template
v-for=
"(item, index) in scope.scope.labelList"
>
<span
:class=
"['label', 'color-6', 'white-hide', 'mt10']"
:key=
"index"
>
{{
item
.
name
}}
</span>
</
template
>
</div>
</span>
</GLTable>
</div>
</el-form-item>
</div>
</el-form>
</div>
</div>
</div>
<el-dialog
title=
"人群规则说明"
class=
"crowd-dialog"
width=
"720px"
:before-close=
"handleClose"
:visible
.
sync=
"dialogRuleVisible"
:show-close=
"isShowCloseBtn"
>
<div
class=
"crowd-dialog-wrap color-3"
>
<div
class=
"condition font-14"
>
<b>
说明:
</b>
<br
/>
<span>
标签组内已选标签取
<b>
并集(或)
</b>
,即满足一个条件即可、标签组之间取
<b>
交集(且)
</b>
,即同时满足标签组条件。
</span>
</div>
<div
class=
"flex-between"
>
<div
class=
"static-image"
>
<img
src=
"@/assets/crowdManage/sum.png"
alt=
""
/>
</div>
<div
class=
"static-image"
>
<img
src=
"@/assets/crowdManage/intersection.png"
alt=
""
/>
</div>
</div>
</div>
</el-dialog>
<el-dialog
title=
"人群规则逻辑"
class=
"crowd-logic-dialog"
width=
"720px"
:before-close=
"handleClose"
:visible
.
sync=
"dialogLogicVisible"
:show-close=
"isShowCloseBtn"
>
<div
class=
"crowd-logic-dialog-wrap"
>
<div
:class=
"{ 'crowd-flex': true }"
v-if=
"this.selectedArray.length > 1"
>
<div
class=
"crowd-line"
id=
"lineHeight"
></div>
<div
class=
"moreover"
>
且
</div>
<div
class=
"crowd-line"
id=
"lineHeight2"
></div>
</div>
<div
class=
"crowd-logic-wrap"
id=
"crowd-logic-wrap"
:style=
"{ 'margin-left': this.selectedArray.length > 1 ? '20px' : '55px' }"
>
<div
class=
"crowd-logic-labels"
v-for=
"(logicTag, index) in this.selectedArray"
:key=
"index"
>
<div
class=
"crowd-logic-label-group-name font-14 color-3"
>
{{ logicTag.labelGroupName.name }}:
</div>
<div
class=
"flex"
>
<
template
v-for=
"(tag, id) in logicTag.children"
>
<div
class=
"crowd-logic-tag color-6 font-14"
:key=
"id"
>
{{
tag
.
name
}}
</div>
<template
v-if=
"id
< logicTag
.
children
.
length
-
1
"
>
<div
class=
"color-3 perhaps"
:key=
"id"
>
或
</div>
</
template
>
</template>
</div>
</div>
</div>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
getTableList
}
from
'@/api/modules/tagsManage'
export
default
{
name
:
'crowdDetail'
,
data
()
{
return
{
groupForm
:
{
groupName
:
''
},
pageConf
:
{
pageSize
:
'labelTreeReq.pageSize'
,
pageNum
:
'labelTreeReq.pageNum'
,
totalCount
:
'labelGroupCount'
},
tableTotal
:
''
,
isShowCloseBtn
:
true
,
tableData
:
[],
hasPage
:
false
,
hasNum
:
false
,
page
:
{},
tableParams
:
{
listName
:
'labelTreeRets'
,
tableColumns
:
[
{
label
:
'标签组'
,
prop
:
'labelGroup'
,
addHtml
:
'labelGroup'
,
width
:
180
},
{
label
:
'标签组类型'
,
prop
:
'labelType'
,
width
:
180
},
{
label
:
'标签'
,
prop
:
'labelList'
,
addHtml
:
'labelList'
,
align
:
'center'
}
]
},
selectedArray
:
[]
}
},
created
()
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
//运行在qiankun容器中
this
.
merchantId
=
this
.
$globalState
.
session
.
merchantId
this
.
merchantModel
=
this
.
$globalState
.
session
.
merchantModel
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
this
.
userType
=
this
.
$globalState
.
session
.
userType
}
this
.
searchForm
=
{
'labelTreeReq.shopId'
:
this
.
merchantId
,
'labelTreeReq.edition'
:
2
}
this
.
page
[
this
.
pageConf
.
pageNum
]
=
1
this
.
page
[
this
.
pageConf
.
pageSize
]
=
10
//获取标签数据
this
.
getLabelData
()
console
.
log
(
4444444444444444444444
)
},
mounted
()
{},
methods
:
{
//获取标签数据
getLabelData
()
{
console
.
log
(
333333333333
)
let
params
=
{
...
this
.
searchForm
,
...
this
.
page
}
getTableList
(
params
).
then
(
res
=>
{
res
.
labelTreeRets
.
forEach
(
item
=>
{
item
.
labelList
.
forEach
(
label
=>
{
label
.
checked
=
false
})
})
this
.
tableData
=
res
.
labelTreeRets
})
},
handleClose
()
{
this
.
dialogRuleVisible
=
false
this
.
dialogLogicVisible
=
false
},
open
(
value
)
{
this
[
value
]
=
true
if
(
this
.
dialogLogicVisible
==
true
&&
this
.
selectedArray
.
length
>
1
)
{
this
.
$nextTick
(()
=>
{
let
height
=
document
.
getElementById
(
'crowd-logic-wrap'
).
offsetHeight
if
(
height
>=
650
)
{
document
.
getElementById
(
'lineHeight'
).
style
.
height
=
308
+
'px'
document
.
getElementById
(
'lineHeight2'
).
style
.
height
=
308
+
'px'
this
.
logicFix
=
true
}
else
{
let
lineHeight
=
(
height
-
35
)
/
2
document
.
getElementById
(
'lineHeight'
).
style
.
height
=
lineHeight
+
'px'
document
.
getElementById
(
'lineHeight2'
).
style
.
height
=
lineHeight
+
'px'
}
})
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'@/styles/variables.scss'
;
.container
{
background
:
#ffffff
;
box-shadow
:
0
10px
20px
0
rgba
(
88
,
80
,
255
,
0.1
);
height
:
calc
(
100vh
-
80px
);
overflow-y
:
auto
;
//
padding
:
20px
;
.title
{
padding
:
20px
0
17px
20px
;
font-size
:
16px
;
color
:
#333
;
font-weight
:
600
;
border-bottom
:
1px
solid
#d8d8d8
;
&::after
{
content
:
''
;
}
}
.info-box
{
width
:
100%
;
padding
:
30px
0
;
box-sizing
:
border-box
;
.create-form
{
width
:
100%
;
box-sizing
:
border-box
;
padding
:
0
30px
;
}
.el-form-line
{
margin-bottom
:
20px
;
.label-word
{
/deep/
.el-form-item__content
{
line-height
:
20px
;
}
/
deep
/
.el-form-item__label
{
line-height
:
20px
;
margin-right
:
0
;
}
}
}
.mr2
{
margin-right
:
20px
;
}
.allTagsWrap
{
.label
{
background
:
#f4f6fc
;
border-radius
:
4px
;
border
:
1px
solid
#e8e8ea
;
text-align
:
center
;
margin-right
:
4px
;
margin-top
:
4px
;
position
:
relative
;
padding
:
0
8px
;
height
:
26px
;
line-height
:
26px
;
box-sizing
:
border-box
;
display
:
inline-block
;
}
.isChecked
{
border
:
1px
solid
#5850ff
!important
;
color
:
#5850ff
;
.select-icon
{
width
:
16px
;
height
:
16px
;
position
:
absolute
;
top
:
0
;
right
:
0
;
}
}
}
}
}
.crowd-dialog
{
/deep/.el-dialog__header
{
padding
:
15px
20px
;
}
/
deep
/
.el-dialog__body
{
padding
:
20px
;
}
}
.crowd-logic-dialog
{
/deep/.el-dialog__header
{
padding
:
15px
20px
;
}
/
deep
/
.el-dialog__body
{
padding
:
20px
;
min-height
:
260px
;
max-height
:
690px
;
overflow
:
auto
;
}
}
.crowd-dialog-wrap
{
.condition
{
margin-bottom
:
16px
;
line-height
:
21px
;
b
{
color
:
#666666
;
}
}
.static-image
{
width
:
335px
;
height
:
325px
;
img
{
width
:
100%
;
}
}
}
.crowd-logic-dialog-wrap
{
display
:
flex
;
.crowd-flex
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.crowd-line
{
width
:
1px
;
background
:
#5850ff
;
}
.moreover
{
text-align
:
center
;
font-size
:
16px
;
font-weight
:
500
;
color
:
#5850ff
;
line-height
:
35px
;
width
:
35px
;
height
:
35px
;
background
:
#efeeff
;
border-radius
:
4px
;
border
:
1px
solid
#5850ff
;
}
.crowd-logic-wrap
{
width
:
100%
;
height
:
auto
;
.crowd-logic-labels
{
width
:
625px
;
background
:
#ffffff
;
border-radius
:
4px
;
border
:
1px
solid
#e5e5e5
;
padding
:
10px
;
box-sizing
:
border-box
;
margin-top
:
10px
;
.crowd-logic-label-group-name
{
line-height
:
21px
;
}
.crowd-logic-tag
{
padding
:
1px
8px
;
line-height
:
24px
;
height
:
26px
;
background
:
#f4f6fc
;
border-radius
:
4px
;
border
:
1px
solid
#e8e8ea
;
margin-top
:
8px
;
margin-right
:
8px
;
}
.perhaps
{
margin-top
:
8px
;
margin-right
:
8px
;
font-weight
:
400
;
}
}
}
.crowd-logic-wrap
:nth-child
(
1
)
{
margin-top
:
0
;
}
}
</
style
>
src/views/crowdManage/index.vue
View file @
990effd
<
template
>
<
template
>
<div
class=
"scrm-sub-client-container"
v-loading=
loading
>
<div
class=
"scrm-sub-client-container"
v-loading=
"loading"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick()"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick()"
>
<el-tab-pane
label=
"推荐人群"
name=
"first"
></el-tab-pane>
<el-tab-pane
label=
"推荐人群"
name=
"first"
></el-tab-pane>
<el-tab-pane
label=
"自定义人群"
name=
"second"
>
<el-tab-pane
label=
"自定义人群"
name=
"second"
>
<
el-button
type=
"primary"
>
+ 新建人群
</el-b
utton>
<
GLButton
class=
"addBtn"
fn=
"新建人群"
@
click=
"addClick"
>
+ 新建人群
</GLB
utton>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
<div
class=
"pageContent"
>
<div
class=
"pageContent"
>
<search-form
class=
"searchTop border-shadow"
:formModel=
"searchForm"
:formList=
"tagsPartFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<search-form
class=
"searchTop border-shadow"
:formModel=
"searchForm"
:formList=
"tagsPartFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<!--
<el-button
@
click=
"resetTable"
plain
>
重置
</el-button>
-->
<!--
<el-button
@
click=
"resetTable"
plain
>
重置
</el-button>
-->
<el-button
class=
"searchBtn"
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
<el-button
class=
"searchBtn"
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
</span>
</span>
</search-form>
</search-form>
<GLTable
@
setTableFinishFun=
"setTableFinishFun"
v-if=
"isReload"
ref=
"crowdManage"
:hasNum=
"false"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchForm"
:pageConf=
"pageConf"
:noDataImg=
"url"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<GLTable
@
setTableFinishFun=
"setTableFinishFun"
v-if=
"isReload"
ref=
"crowdManage"
:hasNum=
"false"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchForm"
:pageConf=
"pageConf"
:noDataImg=
"url"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<template
slot=
"xxx"
slot-scope=
"scope"
>
<template
slot=
"xxx"
slot-scope=
"scope"
>
<span
@
click=
"btnClick('
edit
', scope.scope)"
class=
"blue-text"
>
查看详情
</span>
<span
@
click=
"btnClick('
detail
', scope.scope)"
class=
"blue-text"
>
查看详情
</span>
<span
style=
"margin-left: 20px"
@
click=
"btnClick('
edit
', scope.scope)"
class=
"blue-text"
>
查看客户
</span>
<span
style=
"margin-left: 20px"
@
click=
"btnClick('
view
', scope.scope)"
class=
"blue-text"
>
查看客户
</span>
<!--
<GLButton
class=
"blue-text leftDistance"
type=
"text"
fn=
"查看客户"
v-if=
"userType !== 2"
@
click=
"toViewCustomer(scope.scope)"
>
查看客户
</GLButton>
-->
<!--
<GLButton
class=
"blue-text leftDistance"
type=
"text"
fn=
"查看客户"
v-if=
"userType !== 2"
@
click=
"toViewCustomer(scope.scope)"
>
查看客户
</GLButton>
-->
</
template
>
</
template
>
</GLTable>
</GLTable>
...
@@ -108,7 +108,20 @@ export default {
...
@@ -108,7 +108,20 @@ export default {
},
200
)
},
200
)
},
},
methods
:
{
methods
:
{
setTableHeightEvent
()
{
btnClick
(
type
,
data
)
{
console
.
log
(
data
)
if
(
type
==
'detail'
)
{
console
.
log
(
`/crowdManage/crowdDetail/
${
data
.
crowdId
}
`
)
this
.
$router
.
push
(
`/crowdManage/crowdDetail/
${
data
.
crowdId
}
`
)
}
if
(
type
==
'view'
)
{
this
.
$router
.
push
(
`/clientDataOverview/group/
${
data
.
crowdId
}
`
)
}
},
addClick
()
{
this
.
$router
.
push
(
'/crowdManage/crowdAdd'
)
},
setTableHeightEvent
()
{
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
},
handleClick
()
{
handleClick
()
{
...
@@ -126,7 +139,6 @@ export default {
...
@@ -126,7 +139,6 @@ export default {
this
.
searchForm
=
Object
.
assign
(
this
.
searchForm
,
{
'req.merchantId'
:
this
.
merchantId
,
'req.crowdType'
:
crowdType
})
this
.
searchForm
=
Object
.
assign
(
this
.
searchForm
,
{
'req.merchantId'
:
this
.
merchantId
,
'req.crowdType'
:
crowdType
})
resolve
()
resolve
()
})
})
},
},
//搜索表格
//搜索表格
searchTable
()
{
searchTable
()
{
...
@@ -145,6 +157,17 @@ export default {
...
@@ -145,6 +157,17 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
'@/styles/variables.scss'
;
@import
'@/styles/variables.scss'
;
@import
'@/styles/resetelement.scss'
;
@import
'@/styles/resetelement.scss'
;
.addBtn
{
height
:
32px
;
background
:
$
btnBlue
;
border-radius
:
3px
;
padding
:
5px
16px
;
color
:
#fff
;
font-size
:
16px
;
&:hover
{
background-color
:
$
lightBtnBlue
;
}
}
/
deep
/
.el-tabs__nav-wrap
::after
{
/
deep
/
.el-tabs__nav-wrap
::after
{
content
:
none
;
content
:
none
;
}
}
...
...
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