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 27ba44ed
authored
Dec 29, 2021
by
李长胜
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化调整图像
1 parent
6d4432c0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
827 additions
and
182 deletions
src/components/echarts/multipleEchart.vue
src/components/noData/noData.vue
src/views/clientDataOverview/index.vue
src/views/clientGroupManage/clientGroupDetail1.vue → src/views/clientGroupManage/clientGroupDetailNext.vue
src/views/clientGroupManage/components/client.vue
src/views/clientGroupManage/components/followEmployee.vue
src/views/clientGroupManage/components/leaveGroupClient.vue
src/views/clientGroupManage/components/potentialClient.vue
src/components/echarts/multipleEchart.vue
View file @
27ba44e
...
...
@@ -15,6 +15,10 @@ export default {
type
:
String
,
default
:
''
},
isCloseShowNumTag
:{
type
:
Boolean
,
default
:
false
},
totalData
:
{
type
:
Array
,
// default: () => []
...
...
@@ -210,7 +214,7 @@ export default {
type
:
'bar'
,
data
:
this
.
customerCount
,
//[33600, 18000, 17500, 20000, 17000, 480, 1000, 800, 520, 650, 920, 600],
label
:
{
show
:
true
,
show
:
t
his
.
isCloseShowNumTag
?
false
:
t
rue
,
// formatter: '{b}: {c}',
color
:
'#666666'
,
position
:
'top'
...
...
@@ -236,7 +240,7 @@ export default {
color
:
'#FE9C1C'
},
label
:
{
show
:
true
,
show
:
t
his
.
isCloseShowNumTag
?
false
:
t
rue
,
color
:
'#666666'
,
position
:
'top'
}
...
...
src/components/noData/noData.vue
View file @
27ba44e
...
...
@@ -27,6 +27,7 @@ export default {
.scrm-sub-client-container
{
.nodata
{
position
:
absolute
;
text-align
:
center
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
...
...
src/views/clientDataOverview/index.vue
View file @
27ba44e
...
...
@@ -179,7 +179,7 @@
</div>
</div>
<!-- v-if="isShowBarMap" width="100%" -->
<multiple-echart
v-if=
"isReload"
width=
"100%"
height=
"420px"
:totalData=
"allMapList"
></multiple-echart>
<multiple-echart
v-if=
"isReload"
width=
"100%"
height=
"420px"
:totalData=
"allMapList"
:isCloseShowNumTag=
"isCloseShowNumTag"
></multiple-echart>
</
template
>
</div>
<el-dialog
title=
"提示"
:visible
.
sync=
"dialogVisible"
top=
"15vh"
width=
"30%"
:before-close=
"handleClose"
>
...
...
@@ -211,6 +211,7 @@ export default {
},
data
()
{
return
{
isCloseShowNumTag
:
false
,
isReload
:
true
,
isShowModal
:
false
,
isHasCustomerCountBanner
:
false
,
...
...
@@ -485,6 +486,7 @@ export default {
},
clickThirty
()
{
this
.
timeGap
=
30
this
.
isCloseShowNumTag
=
true
if
(
Object
.
keys
(
this
.
thirtyDayStorage
).
length
==
0
)
{
this
.
getDataOverviewBarMapFun
(
30
)
//第一次点击30天,获取数据
}
else
{
...
...
@@ -494,6 +496,7 @@ export default {
},
clickSeven
()
{
this
.
timeGap
=
7
this
.
isCloseShowNumTag
=
false
if
(
Object
.
keys
(
this
.
sevenDayStorage
).
length
==
0
)
{
this
.
getDataOverviewBarMapFun
()
//重新掉一遍接口
}
else
{
...
...
src/views/clientGroupManage/clientGroupDetail
1
.vue
→
src/views/clientGroupManage/clientGroupDetail
Next
.vue
View file @
27ba44e
...
...
@@ -43,43 +43,25 @@
</p>
</div>
<div
class=
"rightWrap"
>
<!--
<p>
<span>
客户列表
</span>
<span>
{{
clientTableDataNum
||
0
}}
个
</span>
</p>
-->
<div
class=
"choseRow"
>
<div
class=
"choseItem"
:class=
"
{ activeItem: currentIndex == index }" v-for="(item, index) in titles" :key="index" @click="tabClick(index)">
<!--
<span>
{{
item
}}
</span>
<span>
{{
clientTableDataNum
||
0
}}
个
</span>
-->
<span>
{{
item
}}
(
{{
clientTableDataNum
||
0
}}
)个
</span>
<span>
{{
item
.
name
}}
<template
v-if=
"currentIndex == index"
>
(
{{
item
.
personNum
||
0
}}
)个
</
template
>
</span>
</div>
</div>
<
template
v-if=
"currentIndex == 0"
>
<client
ref=
"childComp"
:url=
"url"
@
goDetail=
"goDetail"
@
getTotal=
"getTotal"
></client>
</
template
>
<
template
v-if=
"currentIndex == 1"
>
<follow-employee
ref=
"childComp"
:url=
"url"
@
getTotal=
"getTotal"
></follow-employee>
</
template
>
<
template
v-if=
"currentIndex == 2"
>
<leave-group-client
ref=
"childComp"
:url=
"url"
@
goDetail=
"goDetail"
></leave-group-client>
</
template
>
<
template
v-if=
"currentIndex == 3"
></
template
>
<search-form
class=
"searchTop border-shadow"
:isNeedThreeBtns=
"false"
:showDefaultTime=
"false"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
</span>
</search-form>
<!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 -->
<GLTable
ref=
"clientGroupDetail"
@
setTableFinishFun=
"setTableFinishFun"
:hasNum=
"true"
:pageConf=
"pageConf"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchFormTable"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span
slot=
"customerName"
class=
"flex-center"
slot-scope=
"scope"
>
<el-tooltip
effect=
"dark"
:content=
"scope.scope.customerName"
placement=
"top"
>
<span
class=
"ellipsis-1"
style=
"display: inline-block; max-width: 70px; text-align: left"
>
{{
scope
.
scope
.
customerName
}}
</span>
</el-tooltip>
<span
class=
"pure-blue-text"
>
{{
scope
.
scope
.
type
==
1
?
'@微信'
:
scope
.
scope
.
type
==
2
?
'@企微'
:
''
}}
</span>
</span>
<span
slot=
"customerSex"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
customerSex
==
2
?
'女'
:
scope
.
scope
.
customerSex
==
1
?
'男'
:
'未知'
}}
</span>
</span>
<span
slot=
"joinScene"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
joinScene
==
1
?
'直接邀请入群'
:
scope
.
scope
.
joinScene
==
2
?
'通过邀请链接入群'
:
scope
.
scope
.
joinScene
==
3
?
'通过扫描群二维码入群'
:
''
}}
</span>
</span>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<span
@
click=
"goDetail(scope.scope.id)"
class=
"blue-text"
>
详情
</span>
</
template
>
</GLTable>
<basic-dialog
title=
""
width=
"547px"
:isVisible=
"dialogVisible"
btnOkLabel=
"我知道了"
:isHasCancelBtn=
"false"
@
confirmDialog=
"handleConfirm"
@
closeDialog=
"handleClose"
>
<div
class=
"content-body"
>
<p>
该客户暂无员工跟进,无法查看该客户详情,
</p>
...
...
@@ -92,134 +74,53 @@
</template>
<
script
>
import
{
getTableDetail
,
getDetailTableList
,
getClientTableDetail
}
from
'@/api/modules/clientGroupManage'
import
{
getTableDetail
,
getClientTableDetail
}
from
'@/api/modules/clientGroupManage'
import
client
from
'@/views/clientGroupManage/components/client.vue'
import
followEmployee
from
'@/views/clientGroupManage/components/followEmployee.vue'
import
leaveGroupClient
from
'@/views/clientGroupManage/components/leaveGroupClient.vue'
import
url
from
'@/assets/clientDataOverview/nodata.png'
export
default
{
name
:
'clientGroupDetail'
,
components
:
{
client
,
followEmployee
,
leaveGroupClient
},
data
()
{
return
{
dialogVisible
:
false
,
titles
:
[
'全部客户'
,
'跟进员工'
,
'潜在客户'
,
'退群客户'
],
currentIndex
:
0
,
groupName
:
this
.
$route
.
query
.
groupName
,
url
:
url
,
leftPanelList
:
{},
searchForm
:
{},
searchFormTable
:
{},
clientGroupFormList
:
[
// ['全部客户', '跟进员工', '退群客户', '潜在客户']
titles
:
[
{
type
:
'daterange'
,
prop
:
'daterange'
,
label
:
'入群时间'
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
}
}
name
:
'全部客户'
,
personNum
:
0
},
{
type
:
'select'
,
prop
:
'customerSex'
,
label
:
'性别'
,
placeholder
:
'请选择性别'
,
options
:
[
{
label
:
'全部'
,
value
:
null
},
{
label
:
'男'
,
value
:
1
},
{
label
:
'女'
,
value
:
2
},
{
label
:
'未知'
,
value
:
0
}
]
name
:
'跟进员工'
,
personNum
:
0
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'groupNickName'
,
label
:
'本群昵称'
,
placeholder
:
'请输入本群昵称'
name
:
'退群客户'
,
personNum
:
0
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'customerName'
,
label
:
'客户名称'
,
placeholder
:
'请输入客户名称'
name
:
'潜在客户'
,
personNum
:
0
}
],
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
tableParams
:
{
// btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName
:
'data'
,
tableColumns
:
[
{
label
:
'本群昵称'
,
prop
:
'groupNickName'
},
{
label
:
'客户名称'
,
prop
:
'customerName'
,
addHtml
:
'customerName'
},
{
label
:
'手机号码'
,
prop
:
'customerPhone'
},
{
label
:
'性别'
,
prop
:
'customerSex'
,
addHtml
:
'customerSex'
},
{
label
:
'入群方式'
,
prop
:
'joinScene'
,
addHtml
:
'joinScene'
},
{
label
:
'邀请人'
,
prop
:
'invitorName'
},
{
label
:
'入群时间'
,
prop
:
'joinTime'
,
width
:
95
}
],
tableOption
:
{
width
:
80
,
btnList
:
[
{
name
:
'详情'
,
pType
:
'detail'
}
]
}
},
getListApi
:
getDetailTableList
,
clientTableDataNum
:
0
,
currentIndex
:
0
,
groupName
:
this
.
$route
.
query
.
groupName
,
url
:
url
,
leftPanelList
:
{},
flushTime
:
false
}
},
created
()
{
this
.
getTableDetail
()
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
},
mounted
()
{
// this.$nextTick(() => {
// this.searchTable()
// })
},
// watch: {
// 'searchForm.daterange':{
// deep: true,
...
...
@@ -235,6 +136,12 @@ export default {
// },
methods
:
{
getTotal
(
num
)
{
if
(
this
.
currentIndex
==
0
){
this
.
$set
(
this
.
titles
[
0
],
'personNum'
,
num
)
}
},
tabClick
(
index
)
{
this
.
currentIndex
=
index
},
...
...
@@ -246,47 +153,14 @@ export default {
}
this
.
leftPanelList
=
res
},
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchFormTable
.
daterange
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
resolve
()
})
},
setTableHeightEvent
()
{
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
setTableFinishFun
(
content
)
{
//content是第一页的数据
console
.
log
(
content
)
this
.
clientTableDataNum
=
this
.
$refs
.
clientGroupDetail
.
total
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this
.
$refs
.
clientGroupDetail
.
data
.
length
?
(
this
.
$refs
.
clientGroupDetail
.
tableHeightValues
=
''
)
:
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
goBack
()
{
this
.
$router
.
push
({
path
:
'/clientGroupManage/index'
})
},
//搜索表格
searchTable
()
{
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
},
//重置表格
resetTable
()
{
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
},
goDetail
(
id
)
{
// 接口通过了跳转
getClientTableDetail
({
oneId
:
id
}).
then
(
res
=>
{
getClientTableDetail
({
oneId
:
id
}).
then
(
res
=>
{
if
(
res
.
code
==
'0'
)
{
if
(
!
res
.
data
)
{
this
.
dialogVisible
=
true
...
...
src/views/clientGroupManage/components/client.vue
View file @
27ba44e
<
template
>
<div
class=
"scrm-sub-client-container"
>
<div
class=
"sub-container"
>
<search-form
class=
"searchTop border-shadow"
:isNeedThreeBtns=
"false"
:showDefaultTime=
"false"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
</span>
</search-form>
<!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 -->
<GLTable
ref=
"clientGroupDetail"
@
setTableFinishFun=
"setTableFinishFun"
:hasNum=
"true"
:pageConf=
"pageConf"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchFormTable"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span
slot=
"customerName"
class=
"flex-center"
slot-scope=
"scope"
>
<el-tooltip
effect=
"dark"
:content=
"scope.scope.customerName"
placement=
"top"
>
<span
class=
"ellipsis-1"
style=
"display: inline-block; max-width: 70px; text-align: left"
>
{{
scope
.
scope
.
customerName
}}
</span>
</el-tooltip>
<span
class=
"pure-blue-text"
>
{{
scope
.
scope
.
type
==
1
?
'@微信'
:
scope
.
scope
.
type
==
2
?
'@企微'
:
''
}}
</span>
</span>
<span
slot=
"customerSex"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
customerSex
==
2
?
'女'
:
scope
.
scope
.
customerSex
==
1
?
'男'
:
'未知'
}}
</span>
</span>
<span
slot=
"joinScene"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
joinScene
==
1
?
'直接邀请入群'
:
scope
.
scope
.
joinScene
==
2
?
'通过邀请链接入群'
:
scope
.
scope
.
joinScene
==
3
?
'通过扫描群二维码入群'
:
''
}}
</span>
</span>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<span
@
click=
"goDetail(scope.scope.id)"
class=
"blue-text"
>
详情
</span>
</
template
>
</GLTable>
</div>
</template>
<
script
>
import
{
getDetailTableList
}
from
'@/api/modules/clientGroupManage'
export
default
{
props
:
{
url
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
searchForm
:
{},
searchFormTable
:
{},
clientGroupFormList
:
[
{
type
:
'daterange'
,
prop
:
'daterange'
,
label
:
'入群时间'
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
}
}
},
{
type
:
'select'
,
prop
:
'customerSex'
,
label
:
'性别'
,
placeholder
:
'请选择性别'
,
options
:
[
{
label
:
'全部'
,
value
:
null
},
{
label
:
'男'
,
value
:
1
},
{
label
:
'女'
,
value
:
2
},
{
label
:
'未知'
,
value
:
0
}
]
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'groupNickName'
,
label
:
'本群昵称'
,
placeholder
:
'请输入本群昵称'
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'customerName'
,
label
:
'客户名称'
,
placeholder
:
'请输入客户名称'
}
],
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
tableParams
:
{
// btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName
:
'data'
,
tableColumns
:
[
{
label
:
'本群昵称'
,
prop
:
'groupNickName'
},
{
label
:
'客户名称'
,
prop
:
'customerName'
,
addHtml
:
'customerName'
},
{
label
:
'手机号码'
,
prop
:
'customerPhone'
},
{
label
:
'性别'
,
prop
:
'customerSex'
,
addHtml
:
'customerSex'
},
{
label
:
'入群方式'
,
prop
:
'joinScene'
,
addHtml
:
'joinScene'
},
{
label
:
'邀请人'
,
prop
:
'invitorName'
},
{
label
:
'入群时间'
,
prop
:
'joinTime'
,
width
:
95
}
],
tableOption
:
{
width
:
80
,
btnList
:
[
{
name
:
'详情'
,
pType
:
'detail'
}
]
}
},
getListApi
:
getDetailTableList
,
clientTableDataNum
:
0
}
},
created
()
{
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
},
methods
:
{
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchFormTable
.
daterange
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
resolve
()
})
},
setTableHeightEvent
()
{
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
setTableFinishFun
(
content
)
{
//content是第一页的数据
console
.
log
(
content
)
this
.
clientTableDataNum
=
this
.
$refs
.
clientGroupDetail
.
total
this
.
$emit
(
'getTotal'
,
this
.
clientTableDataNum
)
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this
.
$refs
.
clientGroupDetail
.
data
.
length
?
(
this
.
$refs
.
clientGroupDetail
.
tableHeightValues
=
''
)
:
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
//搜索表格
searchTable
()
{
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
},
//重置表格
resetTable
()
{
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
},
goDetail
(
msg
)
{
this
.
$emit
(
'goDetail'
,
msg
)
}
}
}
</
script
>
<
style
lang=
"scss"
scope
>
.s
crm-sub-client-container
{
.s
ub-container
{
@import
'@/styles/variables.scss';
@import
'@/styles/resetelement.scss';
}
</
style
>
\ No newline at end of file
src/views/clientGroupManage/components/followEmployee.vue
View file @
27ba44e
<
template
>
<div
class=
"sub-container"
>
<search-form
class=
"searchTop border-shadow"
:isNeedThreeBtns=
"false"
:showDefaultTime=
"false"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
</span>
</search-form>
<GLTable
ref=
"clientGroupDetail"
@
setTableFinishFun=
"setTableFinishFun"
:hasNum=
"true"
:pageConf=
"pageConf"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchFormTable"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span
slot=
"customerSex"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
customerSex
==
2
?
'女'
:
scope
.
scope
.
customerSex
==
1
?
'男'
:
'未知'
}}
</span>
</span>
<span
slot=
"joinScene"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
joinScene
==
1
?
'直接邀请入群'
:
scope
.
scope
.
joinScene
==
2
?
'通过邀请链接入群'
:
scope
.
scope
.
joinScene
==
3
?
'通过扫描群二维码入群'
:
''
}}
</span>
</span>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<span
@
click=
"goDetail(scope.scope.id)"
class=
"blue-text"
>
详情
</span>
</
template
>
</GLTable>
</div>
</template>
<
script
>
// import { getDetailTableList } from '@/api/modules/clientGroupManage'
export
default
{
props
:
{
url
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
searchForm
:
{},
searchFormTable
:
{},
clientGroupFormList
:
[
{
type
:
'daterange'
,
prop
:
'daterange'
,
label
:
'入群时间'
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
}
}
},
{
type
:
'select'
,
prop
:
'customerSex'
,
label
:
'性别'
,
placeholder
:
'请选择性别'
,
options
:
[
{
label
:
'全部'
,
value
:
null
},
{
label
:
'男'
,
value
:
1
},
{
label
:
'女'
,
value
:
2
},
{
label
:
'未知'
,
value
:
0
}
]
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'groupNickName'
,
label
:
'本群昵称'
,
placeholder
:
'请输入本群昵称'
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'customerName'
,
label
:
'客户名称'
,
placeholder
:
'请输入客户名称'
}
],
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
tableParams
:
{
// btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName
:
'data'
,
tableOption
:
false
,
tableColumns
:
[
{
label
:
'本群昵称'
,
prop
:
'groupNickName'
},
{
label
:
'员工名称'
,
prop
:
'customerName'
,
},
{
label
:
'手机号码'
,
prop
:
'customerPhone'
},
{
label
:
'性别'
,
prop
:
'customerSex'
,
addHtml
:
'customerSex'
},
{
label
:
'入群方式'
,
prop
:
'joinScene'
,
addHtml
:
'joinScene'
},
{
label
:
'邀请人'
,
prop
:
'invitorName'
},
{
label
:
'入群时间'
,
prop
:
'joinTime'
,
width
:
95
}
]
},
getListApi
:
''
,
clientTableDataNum
:
0
}
},
created
()
{
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
},
methods
:
{
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchFormTable
.
daterange
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
resolve
()
})
},
setTableHeightEvent
()
{
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
setTableFinishFun
(
content
)
{
//content是第一页的数据
console
.
log
(
content
)
this
.
clientTableDataNum
=
this
.
$refs
.
clientGroupDetail
.
total
this
.
$emit
(
'getTotal'
,
this
.
clientTableDataNum
)
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this
.
$refs
.
clientGroupDetail
.
data
.
length
?
(
this
.
$refs
.
clientGroupDetail
.
tableHeightValues
=
''
)
:
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
//搜索表格
searchTable
()
{
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
},
//重置表格
resetTable
()
{
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
},
goDetail
(
msg
)
{
this
.
$emit
(
'goDetail'
,
msg
)
}
}
}
</
script
>
<
style
lang=
"scss"
scope
>
.sub-container
{
@import
'@/styles/variables.scss';
@import
'@/styles/resetelement.scss';
}
</
style
>
\ No newline at end of file
src/views/clientGroupManage/components/leaveGroupClient.vue
View file @
27ba44e
<
template
>
<div
class=
"sub-container"
>
<search-form
class=
"searchTop border-shadow"
:isNeedThreeBtns=
"false"
:showDefaultTime=
"false"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
</span>
</search-form>
<GLTable
ref=
"clientGroupDetail"
@
setTableFinishFun=
"setTableFinishFun"
:hasNum=
"true"
:pageConf=
"pageConf"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchFormTable"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span
slot=
"customerName"
class=
"flex-center"
slot-scope=
"scope"
>
<el-tooltip
effect=
"dark"
:content=
"scope.scope.customerName"
placement=
"top"
>
<span
class=
"ellipsis-1"
style=
"display: inline-block; max-width: 70px; text-align: left"
>
{{
scope
.
scope
.
customerName
}}
</span>
</el-tooltip>
<span
class=
"pure-blue-text"
>
{{
scope
.
scope
.
type
==
1
?
'@微信'
:
scope
.
scope
.
type
==
2
?
'@企微'
:
''
}}
</span>
</span>
<span
slot=
"customerSex"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
customerSex
==
2
?
'女'
:
scope
.
scope
.
customerSex
==
1
?
'男'
:
'未知'
}}
</span>
</span>
<span
slot=
"joinScene"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
joinScene
==
1
?
'直接邀请入群'
:
scope
.
scope
.
joinScene
==
2
?
'通过邀请链接入群'
:
scope
.
scope
.
joinScene
==
3
?
'通过扫描群二维码入群'
:
''
}}
</span>
</span>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<span
@
click=
"goDetail(scope.scope.id)"
class=
"blue-text"
>
详情
</span>
</
template
>
</GLTable>
</div>
</template>
<
script
>
// import { getDetailTableList } from '@/api/modules/clientGroupManage'
export
default
{
props
:
{
url
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
searchForm
:
{},
searchFormTable
:
{},
clientGroupFormList
:
[
{
type
:
'daterange'
,
prop
:
'daterange'
,
label
:
'入群时间'
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
}
}
},
{
type
:
'select'
,
prop
:
'customerSex'
,
label
:
'性别'
,
placeholder
:
'请选择性别'
,
options
:
[
{
label
:
'全部'
,
value
:
null
},
{
label
:
'男'
,
value
:
1
},
{
label
:
'女'
,
value
:
2
},
{
label
:
'未知'
,
value
:
0
}
]
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'groupNickName'
,
label
:
'本群昵称'
,
placeholder
:
'请输入本群昵称'
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'customerName'
,
label
:
'客户名称'
,
placeholder
:
'请输入客户名称'
}
],
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
tableParams
:
{
listName
:
'data'
,
tableColumns
:
[
{
label
:
'本群昵称'
,
prop
:
'groupNickName'
},
{
label
:
'客户名称'
,
prop
:
'customerName'
,
addHtml
:
'customerName'
},
{
label
:
'手机号码'
,
prop
:
'customerPhone'
},
{
label
:
'性别'
,
prop
:
'customerSex'
,
addHtml
:
'customerSex'
},
{
label
:
'入群方式'
,
prop
:
'joinScene'
,
addHtml
:
'joinScene'
},
{
label
:
'邀请人'
,
prop
:
'invitorName'
},
{
label
:
'入群时间'
,
prop
:
'joinTime'
,
width
:
95
}
],
tableOption
:
{
width
:
80
,
btnList
:
[
{
name
:
'详情'
,
pType
:
'detail'
}
]
}
},
getListApi
:
''
,
clientTableDataNum
:
0
}
},
created
()
{
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
},
methods
:
{
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchFormTable
.
daterange
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
resolve
()
})
},
setTableHeightEvent
()
{
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
setTableFinishFun
(
content
)
{
//content是第一页的数据
console
.
log
(
content
)
this
.
clientTableDataNum
=
this
.
$refs
.
clientGroupDetail
.
total
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this
.
$refs
.
clientGroupDetail
.
data
.
length
?
(
this
.
$refs
.
clientGroupDetail
.
tableHeightValues
=
''
)
:
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
//搜索表格
searchTable
()
{
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
},
//重置表格
resetTable
()
{
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
},
goDetail
(
msg
)
{
this
.
$emit
(
'goDetail'
,
msg
)
}
}
}
</
script
>
<
style
lang=
"scss"
scope
>
.sub-container
{
@import
'@/styles/variables.scss';
@import
'@/styles/resetelement.scss';
}
</
style
>
\ No newline at end of file
src/views/clientGroupManage/components/potentialClient.vue
View file @
27ba44e
<
template
>
<div
class=
"sub-container"
>
<search-form
class=
"searchTop border-shadow"
:isNeedThreeBtns=
"false"
:showDefaultTime=
"false"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
</span>
</search-form>
<!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 -->
<GLTable
ref=
"clientGroupDetail"
@
setTableFinishFun=
"setTableFinishFun"
:hasNum=
"true"
:pageConf=
"pageConf"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchFormTable"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span
slot=
"customerName"
class=
"flex-center"
slot-scope=
"scope"
>
<el-tooltip
effect=
"dark"
:content=
"scope.scope.customerName"
placement=
"top"
>
<span
class=
"ellipsis-1"
style=
"display: inline-block; max-width: 70px; text-align: left"
>
{{
scope
.
scope
.
customerName
}}
</span>
</el-tooltip>
<span
class=
"pure-blue-text"
>
{{
scope
.
scope
.
type
==
1
?
'@微信'
:
scope
.
scope
.
type
==
2
?
'@企微'
:
''
}}
</span>
</span>
<span
slot=
"customerSex"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
customerSex
==
2
?
'女'
:
scope
.
scope
.
customerSex
==
1
?
'男'
:
'未知'
}}
</span>
</span>
<span
slot=
"joinScene"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
joinScene
==
1
?
'直接邀请入群'
:
scope
.
scope
.
joinScene
==
2
?
'通过邀请链接入群'
:
scope
.
scope
.
joinScene
==
3
?
'通过扫描群二维码入群'
:
''
}}
</span>
</span>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<span
@
click=
"goDetail(scope.scope.id)"
class=
"blue-text"
>
详情
</span>
</
template
>
</GLTable>
</div>
</template>
<
script
>
import
{
getDetailTableList
}
from
'@/api/modules/clientGroupManage'
export
default
{
props
:
{
url
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
searchForm
:
{},
searchFormTable
:
{},
clientGroupFormList
:
[
{
type
:
'daterange'
,
prop
:
'daterange'
,
label
:
'入群时间'
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
}
}
},
{
type
:
'select'
,
prop
:
'customerSex'
,
label
:
'性别'
,
placeholder
:
'请选择性别'
,
options
:
[
{
label
:
'全部'
,
value
:
null
},
{
label
:
'男'
,
value
:
1
},
{
label
:
'女'
,
value
:
2
},
{
label
:
'未知'
,
value
:
0
}
]
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'groupNickName'
,
label
:
'本群昵称'
,
placeholder
:
'请输入本群昵称'
},
{
type
:
'input'
,
inputType
:
'text'
,
prop
:
'customerName'
,
label
:
'客户名称'
,
placeholder
:
'请输入客户名称'
}
],
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
tableParams
:
{
// btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName
:
'data'
,
tableColumns
:
[
{
label
:
'本群昵称'
,
prop
:
'groupNickName'
},
{
label
:
'客户名称'
,
prop
:
'customerName'
,
addHtml
:
'customerName'
},
{
label
:
'手机号码'
,
prop
:
'customerPhone'
},
{
label
:
'性别'
,
prop
:
'customerSex'
,
addHtml
:
'customerSex'
},
{
label
:
'入群方式'
,
prop
:
'joinScene'
,
addHtml
:
'joinScene'
},
{
label
:
'邀请人'
,
prop
:
'invitorName'
},
{
label
:
'入群时间'
,
prop
:
'joinTime'
,
width
:
95
}
],
tableOption
:
{
width
:
80
,
btnList
:
[
{
name
:
'详情'
,
pType
:
'detail'
}
]
}
},
getListApi
:
getDetailTableList
,
clientTableDataNum
:
0
}
},
created
()
{
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
},
methods
:
{
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchFormTable
.
daterange
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
resolve
()
})
},
setTableHeightEvent
()
{
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
setTableFinishFun
(
content
)
{
//content是第一页的数据
console
.
log
(
content
)
this
.
clientTableDataNum
=
this
.
$refs
.
clientGroupDetail
.
total
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this
.
$refs
.
clientGroupDetail
.
data
.
length
?
(
this
.
$refs
.
clientGroupDetail
.
tableHeightValues
=
''
)
:
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
},
//搜索表格
searchTable
()
{
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
},
//重置表格
resetTable
()
{
this
.
searchForm
=
{
id
:
this
.
$route
.
query
.
id
}
this
.
$refs
.
clientGroupDetail
.
refreshTable
()
},
goDetail
(
msg
)
{
this
.
$emit
(
'goDetail'
,
msg
)
}
}
}
</
script
>
<
style
lang=
"scss"
scope
>
.sub-container
{
@import
'@/styles/variables.scss';
@import
'@/styles/resetelement.scss';
}
</
style
>
\ No newline at end of file
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