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 e870aa5b
authored
Dec 19, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
--no commit message
1 parent
58e60025
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
123 additions
and
30 deletions
linkwe-mobile/src/api/portrait.js
linkwe-mobile/src/views/portrait/index.vue
linkwe-ui/src/views/customerManage/group.vue
linkwe-ui/src/views/friendCircle/index.vue
linkwe-mobile/src/api/portrait.js
View file @
e870aa5
...
...
@@ -28,14 +28,36 @@ export function getWeCustomerInfo(data) {
}
})
}
// 获取当前系统所有可用标签
//
/**
* 获取当前系统所有可用标签
* @param {*} params
* groupTagType 是 1:企业客户标签;3:个人标签
userId 员工的id 当groupTagType为3的时候需要传该字段
* @returns
*/
export
function
getAllTags
(
params
)
{
return
request
({
url
:
service
+
'/findAllTags'
,
params
})
}
// 更新客户画像标签
//
/**
* 更新客户画像标签
* @param {*} data
* {
"externalUserid": "wmiGuBCgAApTcSW-3caqljFmKhm0r-bQ",//客户id
"userId": "ShengXiYong",//当前员工id
"isCompanyTag": false,//是否是企业标签true是;false:不是
"addTag": [
{
"tagId": "1471332704915922947"//标签id
}
]
}
* @returns
*/
export
function
updateWeCustomerPorTraitTag
(
data
)
{
return
request
({
url
:
service
+
'/updateWeCustomerPorTraitTag'
,
...
...
@@ -58,8 +80,8 @@ export function findAddGroupNum(params) {
}
// 获取轨迹信息
/**
*
* @param {*}
*
* @param {*}
{
pageNum:
pageSize:
...
...
@@ -67,7 +89,7 @@ trajectoryType: 轨迹类型(1:信息动态;2:社交动态;3:活动规则;4:待
userId: 员工的id
externalUserid: 客户id
}
* @returns
* @returns
*/
export
function
findTrajectory
(
params
)
{
return
request
({
...
...
@@ -97,3 +119,39 @@ export function handleWait(params) {
method
:
'delete'
})
}
/**
* 客户画像个人标签新增或更新
* @param {*} params
* {
"gourpName": "个人标签分组", //标签组名
"groupId": "1471327408994738177",//标签组id,新增的时候没有则传 null
"weTags": [
{
"groupId": "1471327408994738177",//标签组id,新增的时候没有则传 null
"name": "个人标签3",//标签名
"tagId": "1471327409208647681"//标签id,新增的时候没有则传 null
}
]
}
* @returns
*/
export
function
addOrUpdatePersonTags
(
data
)
{
return
request
({
url
:
service
+
'/addOrUpdatePersonTags/'
,
method
:
'post'
,
data
})
}
/**
* 删除个人标签
* @ids {*} ids 标签id,多个用逗号隔开
* @returns
*/
export
function
deletePersonTag
(
ids
)
{
return
request
({
url
:
service
+
'/deletePersonTag/'
+
ids
,
method
:
'delete'
})
}
linkwe-mobile/src/views/portrait/index.vue
View file @
e870aa5
...
...
@@ -72,7 +72,7 @@
<div
class=
"userlabel"
>
<div
class=
"detail"
>
<div>
企业标签
</div>
<div
class=
"data"
is-link
@
click=
"labelEdit"
>
编辑
</div>
<div
class=
"data"
is-link
@
click=
"labelEdit
()
"
>
编辑
</div>
</div>
<div
v-if=
"form.tags"
class=
"labelstyle mt10"
>
<div
class=
"label"
v-for=
"(unit, unique) in form.tags"
:key=
"unique"
>
...
...
@@ -87,7 +87,7 @@
<div
class=
"userlabel"
>
<div
class=
"detail"
>
<div>
个人标签
</div>
<div
class=
"data"
is-link
@
click=
"labelEdit"
>
编辑
</div>
<div
class=
"data"
is-link
@
click=
"labelEdit
('person')
"
>
编辑
</div>
</div>
<div
v-if=
"form.tags"
class=
"labelstyle mt10"
>
<div
class=
"label"
v-for=
"(unit, unique) in form.personTags"
:key=
"unique"
>
...
...
@@ -154,15 +154,33 @@
:key=
"unique"
class=
"label"
:style=
"addTag.some((e) => e.tagId == unit.tagId) ? isActive : ''"
@
click=
"
user
Label(unit)"
@
click=
"
click
Label(unit)"
>
{{
unit
.
name
}}
</div>
</div>
</div>
</div>
<van-button
type=
"info"
class=
"saveinfo"
round
@
click=
"saveInfo"
>
保存
</van-button>
<div
v-if=
"editLabelType === 'person'"
class=
"ac"
@
click=
"showAddTag = true"
>
添加标签
</div>
<van-button
type=
"info"
class=
"saveinfo"
round
@
click=
"saveCustomerTag"
>
保存
</van-button>
</van-action-sheet>
<van-dialog
v-model=
"showAddTag"
title=
"添加标签"
show-cancel-button
@
confirm=
"submitNewPersonTag"
>
<van-field
v-model=
"newPersonTag"
placeholder=
"请输入标签(不超过15字)"
required
:rules=
"[
{ required: true, message: '请输入标签(不超过15字)' }]"
class="conagency"
/>
</van-dialog>
<!-- 点击客户标签里的编辑触发弹出框结束 -->
<!-- 点击添加待办触发弹出框开始 -->
...
...
@@ -248,9 +266,7 @@
</van-action-sheet> -->
<!-- 保存 -->
<div
style=
"margin: 30px"
>
<van-button
round
block
type=
"info"
native-type=
"submit"
@
click=
"saveInfo2"
>
保存
</van-button
>
<van-button
round
block
type=
"info"
native-type=
"submit"
>
保存
</van-button>
</div>
</van-form>
</van-action-sheet>
...
...
@@ -318,7 +334,8 @@ export default {
position
:
''
,
// 职业
remarkCorpName
:
''
,
// 公司
description
:
''
,
// 其他描述
weTagGroupList
:
[]
// 客户标签合集
tags
:
[],
// 企业标签合集
personTags
:
[]
// 个人标签合集
},
alllabel
:
[],
// 标签组
// 点击测试组标签获取的变量
...
...
@@ -352,7 +369,10 @@ export default {
3
:
{
name
:
'已成交'
,
color
:
'primary'
},
4
:
{
name
:
'无意向'
,
color
:
'warning'
},
5
:
{
name
:
'已流失'
,
color
:
'danger'
}
})
}),
editLabelType
:
''
,
// 编辑标签类型
showAddTag
:
false
,
newPersonTag
:
''
}
},
watch
:
{
...
...
@@ -423,7 +443,6 @@ export default {
_this
.
findAddGroupNum
()
_this
.
getCustomerInfo
()
_this
.
findTrajectory
()
_this
.
getAllTags
()
}
else
{
//错误处理
_this
.
$dialog
({
message
:
'进入失败:'
+
JSON
.
stringify
(
res
)
})
...
...
@@ -437,8 +456,17 @@ export default {
}
})
},
getAllTags
()
{
getAllTags
()
getAllTags
(
type
)
{
let
params
=
{
groupTagType
:
1
}
if
(
type
===
'person'
)
{
params
=
{
groupTagType
:
3
,
userId
:
this
.
userId
}
}
getAllTags
(
params
)
.
then
(({
data
})
=>
{
this
.
alllabel
=
data
...
...
@@ -453,8 +481,6 @@ export default {
console
.
log
(
err
)
})
},
// 客户待办点击保存事件
saveInfo2
()
{},
// 添加或编辑轨迹
addOrEditWaitHandle
(
form
)
{
addOrEditWaitHandle
(
form
)
...
...
@@ -498,7 +524,7 @@ export default {
this
.
findTrajectory
()
},
// 添加代办
//
表单提交
//
客户待办点击保存事件
onSubmit
()
{
let
form
=
{
trajectoryType
:
4
,
...
...
@@ -564,8 +590,8 @@ export default {
}
})
},
//
第一层
标签
user
Label
(
item
)
{
//
点击选择
标签
click
Label
(
item
)
{
let
index
=
this
.
addTag
.
findIndex
((
e
)
=>
{
return
item
.
tagId
==
e
.
tagId
})
...
...
@@ -581,12 +607,13 @@ export default {
this
.
addTag
.
splice
(
index
,
1
)
}
},
save
Info
()
{
save
CustomerTag
()
{
// 更新客户画像标签 [{ groupId: this.groupId, name: this.name, tagId: this.tagId }]
updateWeCustomerPorTraitTag
({
externalUserid
:
this
.
externalUserid
,
userId
:
this
.
userId
,
addTag
:
this
.
addTag
isCompanyTag
:
this
.
editLabelType
!==
'person'
,
//是否是企业标签true是;false:不是
addTag
:
this
.
addTag
.
map
((
e
)
=>
({
tagId
:
e
.
tagId
}))
})
.
then
((
res
)
=>
{
// console.log(res);
...
...
@@ -604,13 +631,17 @@ export default {
})
},
// 点击编辑按钮
labelEdit
()
{
let
tags
=
this
.
form
.
tags
async
labelEdit
(
type
)
{
this
.
editLabelType
=
type
await
this
.
getAllTags
(
type
)
this
.
addTag
=
[]
let
tags
=
this
.
form
[
type
===
'person'
?
'personTags'
:
'tags'
]
let
hasErrorTag
=
[]
// 异常活已经删除的标签
let
repeat
=
[]
// 重复的标签
tags
.
forEach
((
unit
)
=>
{
// 判断是否有重复标签
let
isRepeat
=
this
.
addTag
.
some
((
d
)
=>
{
let
isRepeat
=
this
.
listTagOneArray
.
some
((
d
)
=>
{
return
d
.
tagId
===
unit
.
tagId
})
// 去重
...
...
@@ -696,7 +727,10 @@ export default {
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}
},
// 添加个人标签
submitNewPersonTag
()
{}
}
}
</
script
>
...
...
linkwe-ui/src/views/customerManage/group.vue
View file @
e870aa5
...
...
@@ -147,6 +147,7 @@ export default {
})
api
.
sync
().
then
((
r
)
=>
{
loading
.
close
()
this
.
getList
(
1
)
this
.
msgSuccess
(
'后台开始同步数据,请稍后关注进度'
)
})
},
...
...
linkwe-ui/src/views/friendCircle/index.vue
View file @
e870aa5
...
...
@@ -195,7 +195,7 @@ export default {
syncHMoments
({
filterType
:
1
}).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
msgSuccess
(
res
.
msg
)
this
.
getList
()
this
.
getList
(
1
)
}
})
},
...
...
@@ -224,7 +224,7 @@ export default {
}),
(
this
.
userArray
=
[])
this
.
value1
=
[]
this
.
getList
()
this
.
getList
(
1
)
},
getList
(
type
)
{
type
&&
(
this
.
query
.
pageNum
=
type
)
...
...
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