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 4cc546f7
authored
Jun 23, 2022
by
xuyl
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
解决分群针对不同屏幕尺寸展示个数
1 parent
bc8f87b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
93 additions
and
53 deletions
src/views/clientDataOverview/index.vue
src/views/clientDataOverview/index.vue
View file @
4cc546f
...
@@ -283,7 +283,7 @@
...
@@ -283,7 +283,7 @@
</span>
</span>
<span
class=
"setting"
v-if=
"(userType == 2 && isMerchantStaffAdmin == true) || (userType == 1 && accountLevel == 4)"
@
click=
"goToGrouping()"
>
设置
</span>
<span
class=
"setting"
v-if=
"(userType == 2 && isMerchantStaffAdmin == true) || (userType == 1 && accountLevel == 4)"
@
click=
"goToGrouping()"
>
设置
</span>
</div>
</div>
<div
class=
"itembox
"
>
<div
:class=
"{ fourItemBox: isFourDisplay, fiveItemBox: isFiveDisplay }
"
>
<
template
v-for=
"(item, index) in customerSegmentation"
>
<
template
v-for=
"(item, index) in customerSegmentation"
>
<!-- fn="人群客户列表" mode="div" -->
<!-- fn="人群客户列表" mode="div" -->
<div
class=
"item"
@
click=
"goToGroupOperating(item)"
:key=
"index"
v-if=
"index
< displayNum
"
>
<div
class=
"item"
@
click=
"goToGroupOperating(item)"
:key=
"index"
v-if=
"index
< displayNum
"
>
...
@@ -397,6 +397,9 @@ export default {
...
@@ -397,6 +397,9 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
isFourDisplay
:
''
,
isFiveDisplay
:
''
,
screenWidth
:
null
,
displayNum
:
4
,
//展示的数目
displayNum
:
4
,
//展示的数目
closeFlag
:
false
,
//展开收起
closeFlag
:
false
,
//展开收起
isAddScrm
:
true
,
isAddScrm
:
true
,
...
@@ -421,56 +424,6 @@ export default {
...
@@ -421,56 +424,6 @@ export default {
silenceCustomerCount
:
0
silenceCustomerCount
:
0
},
},
customerSegmentation
:
[],
//客户分群展示列表
customerSegmentation
:
[],
//客户分群展示列表
// titles: [
// {
// name: '新车客户数',
// subName: '购车时间3个月的客户',
// num: 0,
// add: obj => {
// return obj.newCarCustomerAddCount
// },
// noAdd: obj => {
// return obj.newCarCustomerNAddCount
// },
// id: 7
// },
// {
// name: '车险待续保客户数',
// subName: '近一个月内车险即将到期的客户',
// num: 0,
// add: obj => {
// return obj.needRenewalCustomerAddCount
// },
// noAdd: obj => {
// return obj.needRenewalCustomerNAddCount
// },
// id: 8
// },
// {
// name: '新车待首保客户数',
// subName: '购车时间5~7个月内,且无保养记录的客户',
// num: 0,
// add: obj => {
// return obj.burseholderCustomerAddCount
// },
// noAdd: obj => {
// return obj.burseholderCustomerNAddCount
// },
// id: 9
// },
// {
// name: '沉默客户数',
// subName: '超过180天未到店的客户',
// num: 0,
// add: obj => {
// return obj.silenceCustomerAddCount
// },
// noAdd: obj => {
// return obj.silenceCustomerNAddCount
// },
// id: 10
// }
// ],
isNoBuyUp
:
0
,
//默认环比为增
isNoBuyUp
:
0
,
//默认环比为增
isBuyUp
:
0
,
isBuyUp
:
0
,
bottomDataObj
:
{},
bottomDataObj
:
{},
...
@@ -489,8 +442,10 @@ export default {
...
@@ -489,8 +442,10 @@ export default {
mounted
()
{
mounted
()
{
document
.
body
.
style
.
overflow
=
'hidden'
document
.
body
.
style
.
overflow
=
'hidden'
this
.
screenWidth
=
document
.
body
.
clientWidth
var
that
=
this
var
that
=
this
window
.
addEventListener
(
'resize'
,
()
=>
{
window
.
addEventListener
(
'resize'
,
()
=>
{
that
.
screenWidth
=
document
.
body
.
clientWidth
that
.
isReload
=
false
that
.
isReload
=
false
that
.
$nextTick
(()
=>
{
that
.
$nextTick
(()
=>
{
that
.
isReload
=
true
that
.
isReload
=
true
...
@@ -503,6 +458,23 @@ export default {
...
@@ -503,6 +458,23 @@ export default {
return
0
return
0
}
}
},
},
watch
:
{
screenWidth
:
{
handler
:
function
(
val
)
{
if
(
val
>=
1440
)
{
this
.
backupNum
=
this
.
displayNum
=
5
this
.
isFourDisplay
=
false
this
.
isFiveDisplay
=
true
}
else
{
this
.
backupNum
=
this
.
displayNum
=
4
this
.
isFourDisplay
=
true
this
.
isFiveDisplay
=
false
}
},
deep
:
true
}
},
computed
:
{
computed
:
{
isEmptyObj
()
{
isEmptyObj
()
{
if
(
Object
.
keys
(
this
.
topDataObj
).
length
==
0
)
{
if
(
Object
.
keys
(
this
.
topDataObj
).
length
==
0
)
{
...
@@ -549,7 +521,7 @@ export default {
...
@@ -549,7 +521,7 @@ export default {
this
.
displayNum
=
this
.
customerSegmentation
.
length
||
''
this
.
displayNum
=
this
.
customerSegmentation
.
length
||
''
}
else
{
}
else
{
this
.
closeFlag
=
false
this
.
closeFlag
=
false
this
.
displayNum
=
4
this
.
displayNum
=
this
.
backupNum
}
}
},
},
goToGrouping
()
{
goToGrouping
()
{
...
@@ -1222,7 +1194,7 @@ export default {
...
@@ -1222,7 +1194,7 @@ export default {
color
:
#5850ff
;
color
:
#5850ff
;
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
.
itemb
ox
{
.
fourItemB
ox
{
margin
:
20px
20px
0
20px
;
margin
:
20px
20px
0
20px
;
//
display
:
flex
;
//
display
:
flex
;
//
justify-content
:
space-between
;
//
justify-content
:
space-between
;
...
@@ -1290,6 +1262,74 @@ export default {
...
@@ -1290,6 +1262,74 @@ export default {
}
}
}
}
}
}
.fiveItemBox
{
margin
:
20px
20px
0
20px
;
//
display
:
flex
;
//
justify-content
:
space-between
;
display
:
grid
;
grid-template-columns
:
20%
20%
20%
20%
20%
;
.item
{
cursor
:
pointer
;
margin-right
:
16px
;
margin-bottom
:
16px
;
//
width
:
25%
;
&:nth-child(5n)
{
margin-right
:
0
;
}
.itemTitle
{
height
:
54px
;
background
:
#f4f6fc
;
display
:
flex
;
align-items
:
center
;
.itemName
{
font-size
:
16px
;
font-weight
:
600
;
padding-left
:
16px
;
}
}
.itemBottom
{
padding-bottom
:
20px
;
border-left
:
1px
solid
#e5e5e5
;
border-right
:
1px
solid
#e5e5e5
;
border-bottom
:
1px
solid
#e5e5e5
;
.totalNum
{
font-size
:
26px
;
color
:
#333333
;
line-height
:
26px
;
font-weight
:
700
;
padding
:
24px
0
32px
16px
;
.enum
{
font-size
:
18px
;
font-weight
:
400
;
color
:
#333333
;
vertical-align
:
middle
;
}
}
.middlemsg-qiwei-total
{
display
:
flex
;
justify-content
:
space-between
;
.qiwei-describe
{
padding
:
0px
16px
;
.inWechat
{
color
:
#666666
;
font-size
:
14px
;
}
.num
{
margin-top
:
4px
;
font-size
:
16px
;
color
:
#333333
;
font-weight
:
600
;
.person-text
{
font-size
:
14px
;
color
:
#333333
;
font-weight
:
400
;
}
}
}
}
}
}
}
}
}
.bottommsg
{
.bottommsg
{
position
:
relative
;
position
:
relative
;
...
...
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