Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 6e29729e
authored
Dec 17, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客户详情多tab并发请求优化
1 parent
25a371ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
128 deletions
linkwe-ui/src/views/customerManage/customer/infoTab.vue
linkwe-ui/src/views/customerManage/customerDetail.vue
linkwe-ui/src/views/customerManage/customer/infoTab.vue
View file @
6e29729
...
...
@@ -25,6 +25,7 @@ export default {
},
recod
:
[],
active
:
'0'
,
openedTabs
:
[
'0'
],
openTrack
:
[
'0'
],
lastSyncTime
:
0
}
...
...
@@ -77,6 +78,9 @@ export default {
this
.
portrayalSum
=
data
})
},
changeTab
(
tab
)
{
this
.
openedTabs
.
includes
(
tab
.
index
)
||
this
.
openedTabs
.
push
(
tab
.
index
)
},
changeTrack
(
type
)
{
this
.
openTrack
.
includes
(
type
)
||
this
.
openTrack
.
push
(
type
)
this
.
active
=
type
...
...
@@ -97,85 +101,108 @@ export default {
<div
class=
"left"
>
<el-card
class=
"mb10"
shadow=
"never"
>
<div
slot=
"header"
class=
"card-title"
>
企业标签
</div>
<div
v-for=
"(item, index) of portrayalSum.companyTags"
:key=
"index"
:class=
"['flex', index && 'mt20']"
>
<div
class=
"name oe"
>
{{
item
.
userName
}}
</div>
:
<template
v-if=
"item.tagNames"
>
<el-tag
type=
"info"
v-for=
"(unit, unique) in item.tagNames.split(',')"
:key=
"unique"
>
{{
unit
}}
</el-tag
>
</
template
>
<div
v-else
class=
"sub-text-color"
>
暂无标签
<template
v-if=
"portrayalSum.companyTags && portrayalSum.companyTags.length"
>
<div
v-for=
"(item, index) of portrayalSum.companyTags"
:key=
"index"
:class=
"['flex', index && 'mt20']"
>
<div
class=
"name oe"
>
{{
item
.
userName
}}
</div>
:
<template
v-if=
"item.tagNames"
>
<el-tag
type=
"info"
v-for=
"(unit, unique) in item.tagNames.split(',')"
:key=
"unique"
>
{{
unit
}}
</el-tag
>
</
template
>
<div
v-else
class=
"sub-text-color ac"
>
暂无标签
</div>
</div>
</template>
<div
v-else
class=
"sub-text-color ac"
>
暂无标签
</div>
</el-card>
<el-card
class=
"mb10"
shadow=
"never"
>
<div
slot=
"header"
class=
"card-title"
>
个人标签
</div>
<div
v-for=
"(item, index) of portrayalSum.personTags"
:key=
"index"
:class=
"['flex', index && 'mt20']"
>
<div
class=
"name oe"
>
{{ item.userName }}
</div>
:
<
template
v-if=
"item.tagNames"
>
<el-tag
type=
"info"
v-for=
"(unit, unique) in item.tagNames.split(',')"
:key=
"unique"
>
{{
unit
}}
</el-tag
>
</
template
>
<div
v-else
class=
"sub-text-color"
>
暂无标签
<
template
v-if=
"portrayalSum.personTags && portrayalSum.personTags.length"
>
<div
v-for=
"(item, index) of portrayalSum.personTags"
:key=
"index"
:class=
"['flex', index && 'mt20']"
>
<div
class=
"name oe"
>
{{
item
.
userName
}}
</div>
:
<template
v-if=
"item.tagNames"
>
<el-tag
type=
"info"
v-for=
"(unit, unique) in item.tagNames.split(',')"
:key=
"unique"
>
{{
unit
}}
</el-tag
>
</
template
>
<div
v-else
class=
"sub-text-color ac"
>
暂无标签
</div>
</div>
</template>
<div
v-else
class=
"sub-text-color ac"
>
暂无标签
</div>
</el-card>
<el-card
class=
"mb10"
shadow=
"never"
>
<div
slot=
"header"
class=
"card-title"
>
跟进状态
</div>
<
template
v-if=
"portrayalSum.trackStates && portrayalSum.trackStates.length"
>
<div
class=
"f
xbw
mb20"
v-for=
"(item, index) of portrayalSum.trackStates"
:key=
"index"
>
<div
class=
"f
lex
mb20"
v-for=
"(item, index) of portrayalSum.trackStates"
:key=
"index"
>
<div
class=
"name oe"
>
{{
item
.
userName
}}
</div>
:
<el-steps
style=
"flex:auto;"
:active=
"item.trackStateList.length"
finish-status=
"success"
>
<el-step
v-for=
"(unit, unique) of item.trackStateList"
:key=
"unique"
:title=
"dictTrackState[~~unit.trackState + ''].name"
:description=
"unit.trackTime"
></el-step>
</el-steps>
<template
v-if=
"item.trackStateList.length"
>
<el-steps
style=
"flex:auto;"
:active=
"item.trackStateList.length"
finish-status=
"success"
>
<el-step
v-for=
"(unit, unique) of item.trackStateList"
:key=
"unique"
:title=
"dictTrackState[~~unit.trackState + ''].name"
:description=
"unit.trackTime"
></el-step>
</el-steps>
</
template
>
<div
v-else
class=
"sub-text-color ac"
>
暂无数据
</div>
</div>
</template>
<div
v-else
class=
"
ac sub-text-color
"
>
暂无数据
</div>
<div
v-else
class=
"
sub-text-color ac
"
>
暂无数据
</div>
</el-card>
<el-card
shadow=
"never"
>
<div
slot=
"header"
class=
"card-title"
>
跟进记录
</div>
<el-tabs
v-if=
"portrayalSum.trackStates && portrayalSum.trackStates.length"
value=
"0"
>
<el-tabs
v-if=
"portrayalSum.trackStates && portrayalSum.trackStates.length"
value=
"0"
@
tab-click=
"changeTab"
>
<el-tab-pane
v-for=
"(item, index) in portrayalSum.trackStates"
:key=
"index"
:label=
"item.userName"
>
<record
:userId=
"item.userId"
viewType=
"1"
></record>
<record
v-if=
"openedTabs.includes(index + '')"
:userId=
"item.userId"
viewType=
"1"
></record>
</el-tab-pane>
</el-tabs>
<div
v-else
class=
"
ac sub-text-color
"
>
暂无数据
</div>
<div
v-else
class=
"
sub-text-color ac
"
>
暂无数据
</div>
</el-card>
</div>
</el-col>
...
...
linkwe-ui/src/views/customerManage/customerDetail.vue
View file @
6e29729
...
...
@@ -28,7 +28,8 @@ export default {
dictJoinGroupType
,
dictTrackState
,
active
:
0
active
:
0
,
openedTabs
:
[
'0'
]
}
},
created
()
{
...
...
@@ -63,6 +64,9 @@ export default {
this
.
customer
=
data
this
.
birthday
=
data
.
birthday
})
},
changeTab
(
tab
)
{
this
.
openedTabs
.
includes
(
tab
.
id
)
||
this
.
openedTabs
.
push
(
tab
.
id
)
}
// remark(item) {
...
...
@@ -136,90 +140,26 @@ export default {
<
/el-tabs
>
<
/el-card
>
<
el
-
tabs
value
=
"0"
>
<
el
-
tabs
value
=
"0"
@
tab
-
click
=
"changeTab"
>
<
el
-
tab
-
pane
v
-
if
=
"customer.trackUsers && customer.trackUsers.length > 1"
label
=
"客户画像汇总"
id
=
"0"
>
<
info
-
tab
><
/info-tab
>
<
/el-tab-pane
>
<
el
-
tab
-
pane
v
-
for
=
"(item, index) of customer.trackUsers"
:
key
=
"index"
:
label
=
"item.userName"
>
<
info
-
tab
:
userId
=
"item.trackUserId"
><
/info-tab
>
<
el
-
tab
-
pane
v
-
for
=
"(item, index) of customer.trackUsers"
:
key
=
"index"
:
label
=
"item.userName"
:
id
=
"item.trackUserId"
>
<
info
-
tab
v
-
if
=
"openedTabs.includes(item.trackUserId)"
:
userId
=
"item.trackUserId"
><
/info-tab
>
<
/el-tab-pane
>
<
/el-tabs
>
<!--
<
el
-
card
shadow
=
"never"
:
body
-
style
=
"
{
width
:
'410px'
,
lineHeight
:
'30px'
}
">
<div class="
flex
aic
mt20
">
<el-avatar style="
flex
:
none
;
" :size="
50
" :src="
customer
.
avatar
"></el-avatar>
<div class="
info
-
wrap
">
<div class="
mb10
"
>
{{
customer
.
name
}}
<
span
:
style
=
"
{
color
:
customer
.
type
==
1
?
'#4bde03'
:
'#f9a90b'
}"
>
{{
{
1
:
'@微信'
,
2
:
'@企业微信'
}
[
customer
.
type
]
}}
<
/span
>
<
i
:
class
=
"
[
'el-icon-s-custom'
,
{
1
:
'man'
,
2
:
'woman'
}
[
customer
.
gender
]]
"></i>
</div>
<div class="
info
"
>
出生日期:
{{
customer
.
birthday
}}
<
div
class
=
"bfc-d"
>
<
el
-
date
-
picker
v
-
if
=
"datePickerVisible"
v
-
model
=
"birthday"
type
=
"date"
:
picker
-
options
=
"pickerOptions"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"选择日期便于以后客情维护"
@
blur
=
"datePickerVisible = false"
@
change
=
"updateBirthday"
><
/el-date-picker
>
<
i
v
-
else
v
-
hasPermi
=
"['customerManage:customer:edit']"
class
=
"el-icon-edit"
@
click
=
"datePickerVisible = true"
><
/i
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
el
-
divider
><
/el-divider
>
<
el
-
button
v
-
if
=
"customer.status == 1"
class
=
"fr"
type
=
"danger"
plain
size
=
"mini"
>
该员工已被客户删除
<
/el-button
>
<
el
-
row
:
gutter
=
"10"
>
<
el
-
col
:
span
=
"10"
>
备注名:
<
/el-col
>
<
el
-
col
:
span
=
"10"
>
<
el
-
tooltip
class
=
"item"
effect
=
"dark"
:
content
=
"remark(customer)"
placement
=
"top-start"
>
<
div
class
=
"toe al"
>
{{
remark
(
customer
)
}}
<
/div
>
<
/el-tooltip
>
<
/el-col
>
<
/el-row
>
<
el
-
row
:
gutter
=
"10"
>
<
el
-
col
:
span
=
"10"
>
标签:
<
/el-col
>
<
el
-
col
:
span
=
"14"
>
<
el
-
tag
type
=
"info"
v
-
for
=
"(unit, unique) in customer.tagNames"
:
key
=
"unique"
>
{{
unit
}}
<
/el-tag
>
<
/el-col
>
<
/el-row
>
<
el
-
row
:
gutter
=
"10"
>
<
el
-
col
:
span
=
"10"
>
个人标签:
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
{{
'--'
}}
<
/el-col
>
<
/el-row
>
<
el
-
divider
><
/el-divider
>
<
el
-
row
:
gutter
=
"10"
>
<
el
-
col
:
span
=
"10"
>
添加人:
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
{{
customer
.
userName
}}
<
/el-col
>
<
/el-row
>
<
el
-
row
:
gutter
=
"10"
>
<
el
-
col
:
span
=
"10"
>
所在部门:
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
{{
customer
.
department
}}
<
/el-col
>
<
/el-row
>
<
el
-
row
:
gutter
=
"10"
>
<
el
-
col
:
span
=
"10"
>
添加时间:
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
{{
customer
.
firstAddTime
}}
<
/el-col
>
<
/el-row
>
<
/el-card> --
>
<
/div
>
<
/template
>
...
...
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