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 d69de018
authored
Feb 21, 2022
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v1.2.0' of
http://192.168.3.233:8090/saas/scrm-micro-custom
into v1.2.0
2 parents
b59e8291
9ac43841
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
17 deletions
src/views/tagsManage/viewCustomers.vue
src/views/tagsManage/viewCustomers.vue
View file @
d69de01
...
@@ -40,6 +40,9 @@
...
@@ -40,6 +40,9 @@
<div
class=
"export"
@
click=
"handleExport"
>
导出
</div>
<div
class=
"export"
@
click=
"handleExport"
>
导出
</div>
</div>
</div>
<GLTable
@
setTableFinishFun=
"setTableFinishFun"
v-if=
"isReload"
ref=
"viewCustomers"
:hasNum=
"true"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:noDataImg=
"url"
:pageConf=
"pageConf"
:searchForm=
"searchFormTable"
:tableParams=
"tableParams"
>
<GLTable
@
setTableFinishFun=
"setTableFinishFun"
v-if=
"isReload"
ref=
"viewCustomers"
:hasNum=
"true"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:noDataImg=
"url"
:pageConf=
"pageConf"
:searchForm=
"searchFormTable"
:tableParams=
"tableParams"
>
<span
slot=
"carVin"
slot-scope=
"scope"
>
<span>
{{
myStandNo
(
scope
.
scope
.
carVin
)
}}
</span>
</span>
<span
slot=
"status"
slot-scope=
"scope"
>
<span
slot=
"status"
slot-scope=
"scope"
>
<span
class=
"statusText"
:class=
"scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[1] : ''"
>
{{
scope
.
scope
.
status
?
CLIENTSTATUS
[
scope
.
scope
.
status
].
split
(
','
)[
0
]
:
'--'
}}
</span>
<span
class=
"statusText"
:class=
"scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[1] : ''"
>
{{
scope
.
scope
.
status
?
CLIENTSTATUS
[
scope
.
scope
.
status
].
split
(
','
)[
0
]
:
'--'
}}
</span>
</span>
</span>
...
@@ -55,7 +58,7 @@
...
@@ -55,7 +58,7 @@
</div>
</div>
<el-dialog
title=
"选择标签"
width=
"20%"
:visible=
"dialogVisible"
class=
"labelDialog"
:before-close=
"handleDialogClose"
>
<el-dialog
title=
"选择标签"
width=
"20%"
:visible=
"dialogVisible"
class=
"labelDialog"
:before-close=
"handleDialogClose"
>
<el-input
placeholder=
"请输入搜索关键字"
v-model=
"searchLabel"
>
<el-input
placeholder=
"请输入搜索关键字"
v-model=
"searchLabel"
fixed
>
<i
slot=
"suffix"
class=
"el-input__icon el-icon-search"
></i>
<i
slot=
"suffix"
class=
"el-input__icon el-icon-search"
></i>
</el-input>
</el-input>
<div
class=
"labelCombination"
>
<div
class=
"labelCombination"
>
...
@@ -63,14 +66,16 @@
...
@@ -63,14 +66,16 @@
<img
src=
"@/assets/tagsManage/doc.png"
alt=
""
/>
<img
src=
"@/assets/tagsManage/doc.png"
alt=
""
/>
<span
class=
"iconLabelstext"
>
{{ labelGroupName }}
</span>
<span
class=
"iconLabelstext"
>
{{ labelGroupName }}
</span>
</div>
</div>
<div
class=
"label-panle"
:style=
"{height: boxHeight+'px'}"
>
<
template
v-for=
"(item, index) in items"
>
<
template
v-for=
"(item, index) in items"
>
<div
class=
"iconLabelsName"
:class=
"
{ active: checkedTag.indexOf(index) > -1 }" v-if="item.isHidden" :key="index" @click="seletLabelActive(item.labelId, index, item.labelName)">
<div
class=
"iconLabelsName"
:class=
"
{ active: checkedTag.indexOf(index) > -1 }" v-if="item.isHidden" :key="index" @click="seletLabelActive(item.labelId, index, item.labelName)">
<img
src=
"@/assets/tagsManage/label.png"
alt=
""
/>
<img
src=
"@/assets/tagsManage/label.png"
alt=
""
/>
<span
class=
"LabelsNameTxt"
>
{{
item
.
labelName
}}
</span>
<span
:title=
"item.labelName.length > 10 ? 'item.labelName' : '' "
class=
"LabelsNameTxt"
>
{{
item
.
labelName
}}
</span>
<img
v-if=
"checkedTag.indexOf(index) > -1"
class=
"labelChecked"
src=
"@/assets/tagsManage/checked.png"
alt=
""
/>
<img
v-if=
"checkedTag.indexOf(index) > -1"
class=
"labelChecked"
src=
"@/assets/tagsManage/checked.png"
alt=
""
/>
</div>
</div>
</
template
>
</
template
>
</div>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"resetSearch"
>
重置
</el-button>
<el-button
@
click=
"resetSearch"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchClientData"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"searchClientData"
>
确定
</el-button>
...
@@ -102,7 +107,9 @@ export default {
...
@@ -102,7 +107,9 @@ export default {
url
:
url
,
url
:
url
,
sloading
:
false
,
sloading
:
false
,
searchForm
:
{},
searchForm
:
{},
searchForm3
:{},
searchFormTable
:
{},
searchFormTable
:
{},
boxHeight
:
200
,
clientGroupFormList
:
[
clientGroupFormList
:
[
{
{
type
:
'input'
,
type
:
'input'
,
...
@@ -212,6 +219,7 @@ export default {
...
@@ -212,6 +219,7 @@ export default {
{
{
label
:
'车架号(后6位)'
,
label
:
'车架号(后6位)'
,
prop
:
'carVin'
,
prop
:
'carVin'
,
addHtml
:
'carVin'
,
minWidth
:
120
minWidth
:
120
},
},
{
{
...
@@ -260,6 +268,8 @@ export default {
...
@@ -260,6 +268,8 @@ export default {
},
},
mounted
()
{
mounted
()
{
// this.wxTips()
// this.wxTips()
let
clientHeight
=
document
.
documentElement
.
clientHeight
this
.
boxHeight
=
clientHeight
-
250
},
},
watch
:
{
watch
:
{
labelType
(
val
)
{
labelType
(
val
)
{
...
@@ -279,15 +289,18 @@ export default {
...
@@ -279,15 +289,18 @@ export default {
computed
:
{
computed
:
{
items
:
function
()
{
items
:
function
()
{
var
_search
=
this
.
searchLabel
var
_search
=
this
.
searchLabel
// if (_search) {
// console.log()
// return this.labelList.filter(item => item.labelName.indexOf(_search) > -1)
// }
this
.
labelList
.
forEach
(
item
=>
(
item
.
labelName
.
indexOf
(
_search
)
>
-
1
?
(
item
.
isHidden
=
true
)
:
(
item
.
isHidden
=
false
)))
this
.
labelList
.
forEach
(
item
=>
(
item
.
labelName
.
indexOf
(
_search
)
>
-
1
?
(
item
.
isHidden
=
true
)
:
(
item
.
isHidden
=
false
)))
return
this
.
labelList
return
this
.
labelList
}
}
},
},
methods
:
{
methods
:
{
myStandNo
(
carVin
)
{
if
(
!
carVin
)
{
return
''
}
return
carVin
.
substring
(
carVin
.
length
-
6
)
},
//获取标签组
//获取标签组
getLabelList
()
{
getLabelList
()
{
let
params
=
{
let
params
=
{
...
@@ -303,7 +316,19 @@ export default {
...
@@ -303,7 +316,19 @@ export default {
this
.
groupId
=
res
.
groupId
this
.
groupId
=
res
.
groupId
this
.
labelList
.
forEach
(
item
=>
{
this
.
labelList
.
forEach
(
item
=>
{
item
.
isHidden
=
true
item
.
isHidden
=
true
let
res
=
this
.
getListParams
(
item
.
labelId
,
item
.
labelName
)
this
.
tagLists
.
push
(
res
)
})
})
console
.
log
(
this
.
tagLists
)
this
.
searchForm
=
{
tagLists
:
this
.
tagLists
}
this
.
searchForm3
=
{
...
this
.
searchForm
,
pageSize
:
10
,
pageNum
:
1
}
this
.
getAllClientList
(
this
.
searchForm3
)
})
})
},
},
seletLabelActive
(
id
,
index
,
name
)
{
seletLabelActive
(
id
,
index
,
name
)
{
...
@@ -320,9 +345,22 @@ export default {
...
@@ -320,9 +345,22 @@ export default {
}
}
console
.
log
(
this
.
checkedTag
)
console
.
log
(
this
.
checkedTag
)
},
},
// 首次加载页面显示所有客户数据
getAllClientList
(
params
)
{
var
listParams
=
JSON
.
parse
(
JSON
.
stringify
(
params
))
if
(
listParams
.
method
)
delete
params
.
method
getCustomersList
(
listParams
).
then
(
res
=>
{
this
.
customerListsNum
=
res
.
count
})
this
.
searchTable
()
this
.
tagLists
=
[]
},
// 根据标签获取客户列表
// 根据标签获取客户列表
searchClientData
()
{
searchClientData
()
{
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
if
(
!
this
.
tagLists
.
length
){
this
.
getAllClientList
(
this
.
searchForm3
)
}
else
{
this
.
searchForm
=
{
this
.
searchForm
=
{
tagLists
:
this
.
tagLists
tagLists
:
this
.
tagLists
}
}
...
@@ -331,10 +369,9 @@ export default {
...
@@ -331,10 +369,9 @@ export default {
pageSize
:
10
,
pageSize
:
10
,
pageNum
:
1
pageNum
:
1
}
}
getCustomersList
(
this
.
searchForm2
).
then
(
res
=>
{
this
.
customerListsNum
=
res
.
count
})
this
.
searchTable
()
this
.
searchTable
()
}
},
},
getListParams
(
id
,
name
)
{
getListParams
(
id
,
name
)
{
const
params
=
{}
const
params
=
{}
...
@@ -343,7 +380,6 @@ export default {
...
@@ -343,7 +380,6 @@ export default {
params
.
groupType
=
this
.
labelType
params
.
groupType
=
this
.
labelType
params
.
labelId
=
id
params
.
labelId
=
id
params
.
labelName
=
name
params
.
labelName
=
name
// console.log(params)
return
params
return
params
},
},
...
@@ -400,6 +436,7 @@ export default {
...
@@ -400,6 +436,7 @@ export default {
},
},
setTableFinishFun
(
content
)
{
setTableFinishFun
(
content
)
{
console
.
log
(
content
,
this
.
$refs
.
viewCustomers
.
data
.
length
,
'获取数据'
)
console
.
log
(
content
,
this
.
$refs
.
viewCustomers
.
data
.
length
,
'获取数据'
)
this
.
customerListsNum
=
this
.
$refs
.
viewCustomers
.
total
this
.
$refs
.
viewCustomers
.
data
.
length
?
(
this
.
$refs
.
viewCustomers
.
tableHeightValues
=
''
)
:
this
.
$refs
.
viewCustomers
.
setTableHeightFun
()
this
.
$refs
.
viewCustomers
.
data
.
length
?
(
this
.
$refs
.
viewCustomers
.
tableHeightValues
=
''
)
:
this
.
$refs
.
viewCustomers
.
setTableHeightFun
()
},
},
//导出
//导出
...
@@ -421,7 +458,6 @@ export default {
...
@@ -421,7 +458,6 @@ export default {
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
this
.
getParams
()
this
.
searchFormTable
=
this
.
getParams
()
resolve
()
resolve
()
})
})
}
}
...
@@ -481,6 +517,7 @@ export default {
...
@@ -481,6 +517,7 @@ export default {
bottom
:
0px
;
bottom
:
0px
;
width
:
100%
;
width
:
100%
;
}
}
.scrm-sub-client-container
{
.scrm-sub-client-container
{
.pageTitle
{
.pageTitle
{
position
:
relative
;
position
:
relative
;
...
@@ -592,6 +629,10 @@ export default {
...
@@ -592,6 +629,10 @@ export default {
color
:
#333333
;
color
:
#333333
;
}
}
}
}
.label-panle
{
height
:
calc
(
100%
-
200px
);
overflow-y
:
auto
;
}
.iconLabelsName
{
.iconLabelsName
{
position
:
relative
;
position
:
relative
;
margin-left
:
10px
;
margin-left
:
10px
;
...
@@ -611,17 +652,12 @@ export default {
...
@@ -611,17 +652,12 @@ export default {
height
:
16px
;
height
:
16px
;
}
}
.LabelsNameTxt
{
.LabelsNameTxt
{
max-width
:
1
55px
;
max-width
:
1
00%
;
margin-left
:
5px
;
margin-left
:
5px
;
font-weight
:
400
;
font-weight
:
400
;
font-size
:
14px
;
font-size
:
14px
;
color
:
#666666
;
color
:
#666666
;
text-align
:
right
;
text-align
:
right
;
display
:
block
;
/*内联对象需加*/
word-break
:
keep-all
;
/* 不换行 */
white-space
:
nowrap
;
/* 不换行 */
overflow
:
hidden
;
/* 内容超出宽度时隐藏超出部分的内容 */
text-overflow
:
ellipsis
;
/* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
}
}
}
}
}
}
...
...
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