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 57eaa83f
authored
Nov 03, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客户画像标签接口修改过
1 parent
e40e7e41
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
39 deletions
linkwe-mobile/src/views/portrait/index.vue
linkwe-ui/src/views/customerManage/customer.vue
linkwe-mobile/src/views/portrait/index.vue
View file @
57eaa83
...
...
@@ -61,12 +61,10 @@
<div>
客户标签
</div>
<div
class=
"data"
is-link
@
click=
"labelEdit"
>
编辑
</div>
</div>
<div
v-if=
"form.weTagGroupList"
class=
"labelstyle mt10"
>
<template
v-for=
"item in form.weTagGroupList"
>
<div
class=
"label"
v-for=
"(unit, unique) in item.weTags"
:key=
"unique"
>
{{
unit
.
name
}}
</div>
</
template
>
<div
v-if=
"form.tags"
class=
"labelstyle mt10"
>
<div
class=
"label"
v-for=
"(unit, unique) in form.tags"
:key=
"unique"
>
{{
unit
.
name
}}
</div>
</div>
</div>
<div
class=
"divider"
></div>
...
...
@@ -258,7 +256,7 @@ export default {
// 接口开始
externalUserid
:
''
,
// externalUserid: 'wmiGuBCgAAoCBD1frD3hRplbsXoBLx6g', // 客户IdwmiGuBCgAAoCBD1frD3hRplbsXoBLx6g
//
externalUserid: 'wmiGuBCgAA617zOzAIg-0sZG3Vok7BUA',
externalUserid
:
'wmiGuBCgAA617zOzAIg-0sZG3Vok7BUA'
,
form
:
{
name
:
''
,
// 昵称
remarkMobiles
:
''
,
// 手机号
...
...
@@ -307,8 +305,7 @@ export default {
},
computed
:
{
userId
()
{
return
this
.
$store
.
state
.
userId
// || 'FengJuZhuDeJieDao'
return
this
.
$store
.
state
.
userId
||
'FengJuZhuDeJieDao'
},
// activeLabel : () => {
// this.addTag.forEach((value) => {
...
...
@@ -328,24 +325,16 @@ export default {
forbidClick
:
true
})
// 获取agentId
let
query
=
param2Obj
(
window
.
location
.
search
)
let
hash
=
param2Obj
(
window
.
location
.
hash
)
query
=
Object
.
assign
(
query
,
hash
)
this
.
agentId
=
query
.
agentId
console
.
log
(
agentId
)
// this.findAddaddEmployes()
// this.findAddGroupNum()
// this.getCustomerInfo()
// this.findTrajectory()
// let query = param2Obj(window.location.search)
// let hash = param2Obj(window.location.hash)
// query = Object.assign(query, hash)
// this.agentId = query.agentId
// getAllTags()
// .then(({ data }) => {
// this.alllabel = data
// })
// .catch((err) => {
// console.log(err)
// })
this
.
findAddaddEmployes
()
this
.
findAddGroupNum
()
this
.
getCustomerInfo
()
this
.
findTrajectory
()
this
.
getAllTags
()
},
methods
:
{
...
...
@@ -376,13 +365,7 @@ export default {
_this
.
findAddGroupNum
()
_this
.
getCustomerInfo
()
_this
.
findTrajectory
()
getAllTags
()
.
then
(({
data
})
=>
{
_this
.
alllabel
=
data
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
_this
.
getAllTags
()
}
else
{
//错误处理
_this
.
$dialog
({
message
:
'进入失败:'
+
JSON
.
stringify
(
res
)
})
...
...
@@ -396,6 +379,22 @@ export default {
}
})
},
getAllTags
()
{
getAllTags
()
.
then
(({
data
})
=>
{
this
.
alllabel
=
data
this
.
listTagOneArray
=
[]
data
.
forEach
((
element
)
=>
{
element
.
weTags
.
forEach
((
d
)
=>
{
this
.
listTagOneArray
.
push
(
d
)
})
})
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
// 客户待办点击保存事件
saveInfo2
()
{},
// 添加或编辑轨迹
...
...
@@ -548,12 +547,31 @@ export default {
},
// 点击编辑按钮
labelEdit
()
{
this
.
show
=
true
if
(
this
.
form
.
weTagGroupList
)
{
this
.
form
.
weTagGroupList
.
forEach
((
ele
)
=>
{
this
.
addTag
.
push
(...
ele
.
weTags
)
let
tags
=
this
.
form
.
tags
let
hasErrorTag
=
[]
// 异常活已经删除的标签
let
repeat
=
[]
// 重复的标签
tags
.
forEach
((
unit
)
=>
{
// 判断是否有重复标签
let
isRepeat
=
this
.
addTag
.
some
((
d
)
=>
{
return
d
.
tagId
===
unit
.
tagId
})
}
// 去重
if
(
isRepeat
)
{
repeat
.
push
(
unit
.
name
)
return
}
let
filter
=
this
.
listTagOneArray
.
find
((
d
)
=>
{
return
d
.
tagId
===
unit
.
tagId
})
// 如果没有匹配到,则说明该便签处于异常状态,可能已被删除或破坏
if
(
!
filter
)
{
hasErrorTag
.
push
(
unit
.
name
)
return
}
this
.
addTag
.
push
(
filter
)
})
this
.
show
=
true
// 获取用户当前的lable,将当前用户的lable与所有lable进行对比,相同的弹框内蓝色展示
// 弹框内的标签组选中时蓝色展示
// 弹框内的子标签与选中时蓝色展示,点击时
...
...
@@ -597,6 +615,17 @@ export default {
})
.
then
(({
data
})
=>
{
// console.log(data);
if
(
data
.
tagIds
&&
data
.
tagNames
)
{
data
.
tagIds
=
data
.
tagIds
.
split
(
','
)
data
.
tagNames
=
data
.
tagNames
.
split
(
','
)
data
.
tags
=
[]
data
.
tagIds
.
forEach
((
unit
,
index
)
=>
{
data
.
tags
.
push
({
tagId
:
unit
,
name
:
data
.
tagNames
[
index
]
})
})
}
this
.
form
=
data
// console.log(this.form);
})
...
...
linkwe-ui/src/views/customerManage/customer.vue
View file @
57eaa83
...
...
@@ -85,7 +85,7 @@ export default {
element
.
tagIds
.
forEach
((
unit
,
index
)
=>
{
element
.
tags
.
push
({
tagId
:
unit
,
tagName
s
:
element
.
tagNames
[
index
]
tagName
:
element
.
tagNames
[
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