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 c2484c0b
authored
May 24, 2022
by
xuyl
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
edd3a5ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
143 additions
and
64 deletions
src/views/clientDataOverview/GroupOperating/marketingPeople.vue
src/views/clientDataOverview/group.vue
src/views/clientDataOverview/GroupOperating/marketingPeople.vue
View file @
c2484c0
...
...
@@ -10,9 +10,7 @@
<el-tab-pane
label=
"营销人群"
name=
"first"
>
<div
class=
"pageContent"
v-if=
"activeName == 'first'"
>
<div
class=
"markPeople"
>
<span>
营销人群
</span>
<span>
营销人群
</span>
<span
v-if=
"itemArr.length > 4 && !closeFlag"
@
click=
"expandClick('expand')"
>
展开营销人群
<i
class=
"el-icon-arrow-down color-58"
></i>
...
...
@@ -25,7 +23,7 @@
<el-divider></el-divider>
<!-- 营销人群展示 -->
<div
class=
"bigMarketItem"
v-if=
"closeFlag"
>
<div
class=
"marketItem"
v-for=
"(item, idx) in itemArr"
:key=
"idx
"
>
<div
v-for=
"(item, idx) in itemArr"
:key=
"idx"
:class=
"[
{ active: isActive == idx }, 'marketItem']" @click="choickItem(idx)
">
<template
v-if=
"idx
< displayNum
"
>
<p
class=
"peopleName"
>
人群名称
</p>
<div
class=
"itemBox"
>
...
...
@@ -40,21 +38,40 @@
</div>
</div>
<!-- 滚动条展示 -->
<div
class=
"rollMarketItem"
v-else
>
<div
class=
"marketItem"
v-for=
"(item, idx) in itemArr"
:key=
"idx
"
>
<div
class=
"rollMarketItem"
v-else
v-dragscroll
>
<div
v-for=
"(item, idx) in itemArr"
:key=
"idx"
:class=
"[{ active: isActive == idx }, 'marketItem']"
@
click=
"choickItem(idx)
"
>
<div
class=
"marketItem-border"
>
<p
class=
"peopleName"
>
人群名称
</p>
<div
class=
"itemBox"
>
<p
class=
"peopleNum"
>
{{ item.num }}
<span>
人
</span>
</p>
<p
class=
"peopledesc"
>
{{ item.desc }}
</p>
<el-button
class=
"createSOP"
>
创建营销SOP
</el-button>
<p
class=
"peopleName"
>
人群名称
</p>
<div
class=
"itemBox"
>
<p
class=
"peopleNum"
>
{{ item.num }}
<span>
人
</span>
</p>
<p
class=
"peopledesc"
>
{{ item.desc }}
</p>
<el-button
class=
"createSOP"
>
创建营销SOP
</el-button>
</div>
</div>
</div>
</div>
<div
class=
"progressBar"
v-if=
"!closeFlag"
>
<!-- :style="{ width: showWidth + '%' }" -->
<div
class=
"progress"
></div>
</div>
<!-- <el-carousel :interval="5000" arrow="always" indicator-position="none">
<el-carousel-item v-for="(item, idx) in itemArr" :key="idx">
<div class="marketItem-border">
<p class="peopleName">人群名称</p>
<div class="itemBox">
<p class="peopleNum">
{{ item.num }}
<span>人</span>
</p>
<p class="peopledesc">{{ item.desc }}</p>
<el-button class="createSOP">创建营销SOP</el-button>
</div>
</div>
</el-carousel-item>
</el-carousel> -->
</div>
<div
class=
"otherPageContent"
>
<GLCombiForm
:formObj=
"searchForm"
:formData=
"marketPeopleFormList"
@
handleOk=
"searchTable"
@
handleRest=
"resetTable"
></GLCombiForm>
...
...
@@ -86,6 +103,7 @@ export default {
return
{
activeName
:
'first'
,
searchForm
:
{},
isActive
:
-
1
,
displayNum
:
4
,
//展示的数目
closeFlag
:
false
,
//展开收起
itemArr
:
[
...
...
@@ -95,6 +113,9 @@ export default {
{
num
:
43133
,
desc
:
'气球在我手上,牵着你瞎逛'
},
{
num
:
123213
,
desc
:
'城堡为爱守着秘密,而我为你守着爱情'
},
{
num
:
1233
,
desc
:
'美人鱼的眼泪'
},
{
num
:
43133
,
desc
:
'气球在我手上,牵着你瞎逛'
},
{
num
:
123213
,
desc
:
'城堡为爱守着秘密,而我为你守着爱情'
},
{
num
:
1233
,
desc
:
'美人鱼的眼泪'
},
{
num
:
1233
,
desc
:
'美人鱼的眼泪'
}
],
marketPeopleFormList
:
[
...
...
@@ -257,18 +278,9 @@ export default {
// getListApi: getDetailQuitTableList,
}
},
computed
:
{
// showItemList() {
// if (this.itemArr.length > 4 && this.closeFlag == false) {
// return this.itemArr.slice(0, 4)
// } else if (this.closeFlag == true) {
// return this.itemArr
// } else {
// return this.itemArr
// }
// }
},
// created() {
// this.showWidth = (4 / this.itemArr.length).toFixed(2) * 100
// },
methods
:
{
expandClick
(
val
)
{
if
(
val
==
'expand'
)
{
...
...
@@ -280,6 +292,10 @@ export default {
// document.getElementById('bigMarketItem').style.display = 'flex'
}
},
// 选择的人群
choickItem
(
idx
)
{
this
.
isActive
=
idx
},
setTableFinishFun
()
{
this
.
$refs
.
marketPeople
.
data
.
length
?
(
this
.
$refs
.
marketPeople
.
tableHeightValues
=
''
)
:
this
.
$refs
.
marketPeople
.
setTableHeightFun
()
},
...
...
@@ -289,11 +305,62 @@ export default {
handleClick
(
tab
)
{
console
.
log
(
tab
)
}
},
directives
:
{
dragscroll
:
{
bind
(
el
,
binding
)
{
el
.
onmousedown
=
function
(
ev
)
{
const
disX
=
ev
.
clientX
const
disY
=
ev
.
clientY
const
originalScrollLeft
=
el
.
scrollLeft
const
originalScrollTop
=
el
.
scrollTop
const
originalScrollBehavior
=
el
.
style
[
'scroll-behavior'
]
const
originalPointerEvents
=
el
.
style
[
'pointer-events'
]
let
changWidth
=
(
document
.
querySelector
(
'.rollMarketItem'
).
scrollLeft
/
(
document
.
querySelector
(
'.rollMarketItem'
).
scrollWidth
-
document
.
querySelector
(
'.rollMarketItem'
).
offsetWidth
))
*
100
// auto: 默认值,表示滚动框立即滚动到指定位置。
document
.
querySelector
(
'.progress'
).
style
.
width
=
changWidth
+
'%'
el
.
style
[
'scroll-behavior'
]
=
'auto'
el
.
style
[
'cursor'
]
=
'grabbing'
// 鼠标移动事件是监听的整个document,这样可以使鼠标能够在元素外部移动的时候也能实现拖动
document
.
onmousemove
=
function
(
ev
)
{
ev
.
preventDefault
()
// 计算拖拽的偏移距离
const
distanceX
=
ev
.
clientX
-
disX
const
distanceY
=
ev
.
clientY
-
disY
el
.
scrollTo
(
originalScrollLeft
-
distanceX
,
originalScrollTop
-
distanceY
)
// 在鼠标拖动的时候将点击事件屏蔽掉
el
.
style
[
'pointer-events'
]
=
'none'
document
.
body
.
style
[
'cursor'
]
=
'grabbing'
}
document
.
onmouseup
=
function
()
{
document
.
onmousemove
=
null
document
.
onmouseup
=
null
el
.
style
[
'scroll-behavior'
]
=
originalScrollBehavior
el
.
style
[
'pointer-events'
]
=
originalPointerEvents
el
.
style
[
'cursor'
]
=
'grab'
}
}
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.active
{
border
:
1px
solid
#5850ff
;
}
::-webkit-scrollbar
{
/*滚动条整体样式*/
width
:
0
;
height
:
0
;
}
::-webkit-scrollbar-thumb
{
/*滚动条里面小方块*/
border-radius
:
4px
;
//
background-color
:
rgba
(
144
,
147
,
153
,
0.3
);
}
.topTitle
{
.title
{
color
:
#333333
;
...
...
@@ -324,15 +391,13 @@ export default {
color
:
#333333
;
span
:
last-child
{
color
:
#5850ff
;
cursor
:
pointer
;
}
}
.bigMarketItem
{
padding
:
0
20px
;
display
:
grid
;
grid-template-columns
:
25%
25%
25%
25%
;
//
overflow-x
:
auto
;
//
white-space
:
nowrap
;
//
overflow
:
hidden
;
.marketItem
{
margin-right
:
16px
;
margin-bottom
:
16px
;
...
...
@@ -380,20 +445,22 @@ export default {
}
}
}
.rollMarketItem
{
.rollMarketItem
{
padding
:
0
20px
;
width
:
100%
;
display
:
flex
;
width
:
100%
;
display
:
flex
;
justify-content
:
space-between
;
overflow-x
:
auto
;
white-space
:
nowrap
;
//
white-space
:
nowrap
;
//
overflow
:
hidden
;
.marketItem
{
flex
:
0
0
25%
;
padding-right
:
16px
;
box-sizing
:
border-box
;
&-border
{
width
:
100%
;
}
//
flex
:
1
;
width
:
25%
;
//
padding-right
:
16px
;
margin-right
:
16px
;
&-border
{
width
:
274px
;
}
.peopleName
{
height
:
54px
;
...
...
@@ -435,6 +502,19 @@ export default {
}
}
}
.progressBar
{
width
:
40px
;
height
:
4px
;
background
:
#dddee0
;
border-radius
:
3px
;
margin
:
20px
auto
0px
;
.progress
{
background
:
#5850ff
;
height
:
4px
;
width
:
0
;
border-radius
:
3px
;
}
}
}
.otherPageContent
{
padding
:
20px
20px
30px
;
...
...
src/views/clientDataOverview/group.vue
View file @
c2484c0
...
...
@@ -2,8 +2,8 @@
<div
class=
"scrm-sub-client-container"
>
<div
class=
"head-container"
>
<template
v-if=
"crowdType == ''"
>
<div
class=
"head-container-title color-3 font-20"
>
{{
$Constants
.
DESCRIBEDATA
[
id
-
1
]
.
name
}}
</div>
<div
class=
"head-container-content color-6 font-14"
>
{{
$Constants
.
DESCRIBEDATA
[
id
-
1
]
.
info
}}
</div>
<div
class=
"head-container-title color-3 font-20"
>
{{
$Constants
.
DESCRIBEDATA
[
id
-
1
]
?
$Constants
.
DESCRIBEDATA
[
id
-
1
].
name
:
''
}}
</div>
<div
class=
"head-container-content color-6 font-14"
>
{{
$Constants
.
DESCRIBEDATA
[
id
-
1
]
?
$Constants
.
DESCRIBEDATA
[
id
-
1
].
info
:
''
}}
</div>
</
template
>
<
template
v-else
>
<div
class=
"head-container-title color-3 font-20"
>
{{
crowdForm
.
crowdName
}}
</div>
...
...
@@ -198,28 +198,27 @@ export default {
let
{
id
}
=
this
this
.
init
(
id
)
// 针对广汇替换字段
console
.
log
(
location
.
host
)
if
(
this
.
id
==
1
&&
location
.
host
==
'scrm.cgacar.com'
)
{
this
.
tableParams
.
tableColumns
.
splice
(
3
,
3
,
{
type
:
'input'
,
name
:
''
,
label
:
'线索时间'
},
{
type
:
'input'
,
name
:
''
,
label
:
'意向车型'
},
{
type
:
'input'
,
name
:
''
,
label
:
'线索来源'
}
)
}
// if (this.id == 1 && location.host == 'scrm.cgacar.com') {
// this.tableParams.tableColumns.splice(
// 3,
// 3,
// {
// type: 'input',
// name: '',
// label: '线索时间'
// },
// {
// type: 'input',
// name: '',
// label: '意向车型'
// },
// {
// type: 'input',
// name: '',
// label: '线索来源'
// }
// )
// }
},
mounted
()
{
this
.
getStaffList
()
...
...
@@ -298,7 +297,7 @@ export default {
this
.
$refs
.
groupRef
.
data
.
length
?
(
this
.
$refs
.
groupRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
groupRef
.
setTableHeightFun
()
},
goBack
()
{
this
.
$router
.
push
(
'/clientDataOverview/index'
)
this
.
$router
.
push
(
'/clientDataOverview/index'
)
}
}
}
...
...
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