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 23b0a527
authored
Mar 31, 2023
by
ext.wangyuman1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
上传代码
1 parent
8a951649
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
362 additions
and
166 deletions
linkwe-pc/src/router/index.js
linkwe-pc/src/views/contentCenter/components/MaPage.vue
linkwe-pc/src/views/customerManage/customer/MaterialCard.vue
linkwe-pc/src/views/customerManage/customer/record.vue
linkwe-pc/src/router/index.js
View file @
23b0a52
...
...
@@ -81,6 +81,11 @@ export const constantRoutes = [
isNoLogin
:
true
,
},
},
{
path
:
'/preview'
,
component
:
(
resolve
)
=>
require
([
'@/views/contentCenter/components/preview'
],
resolve
),
hidden
:
true
,
},
// {
// path: '',
// component: Layout,
...
...
linkwe-pc/src/views/contentCenter/components/MaPage.vue
View file @
23b0a52
...
...
@@ -591,7 +591,7 @@ export default {
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
<el-button
class=
"ml10
"
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
<el-button
style=
"margin-left:10px
"
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
<el-button
@
click=
"resetQuery"
>
重置
</el-button>
</div>
<div
class=
"mt20 g-card pad20"
>
...
...
@@ -612,7 +612,7 @@ export default {
<el-button
size=
"mini"
@
click=
"groupDialogVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"moveGroup"
>
确定
</el-button>
</div>
<el-button
slot=
"reference"
class=
"mr10
"
:disabled=
"selected.length === 0"
type=
"primary"
>
<el-button
slot=
"reference"
style=
"margin-right:10px
"
:disabled=
"selected.length === 0"
type=
"primary"
>
批量分组
</el-button>
</el-popover>
...
...
linkwe-pc/src/views/customerManage/customer/MaterialCard.vue
0 → 100644
View file @
23b0a52
<
template
>
<div
class=
"itemList"
>
<div
class=
"content bfc-o"
>
<div
class=
"title"
>
{{
weMaterialVo
.
materialName
}}
</div>
<!-- 文章 -->
<div
class=
"centerStyle"
v-if=
"weMaterialVo.mediaType == 12"
>
<el-image
class=
"img-style"
fit=
"contain"
:src=
"weMaterialVo.coverUrl"
v-if=
"weMaterialVo.coverUrl"
/>
<svg-icon
class=
"icon-style"
iconClass=
"article"
v-else
></svg-icon>
<div
class=
"contentStyle"
>
{{
weMaterialVo
.
digest
}}
</div>
</div>
<!-- 视频 -->
<div
class=
"centerStyle"
v-if=
"weMaterialVo.mediaType == 2"
>
<el-image
class=
"img-style"
:src=
"weMaterialVo.coverUrl"
/>
<div
class=
"contentStyle"
>
{{
weMaterialVo
.
digest
}}
</div>
</div>
<!-- 海报 -->
<div
class=
"centerStyle"
v-if=
"weMaterialVo.mediaType == 5"
>
<el-image
class=
"img-style"
fit=
"contain"
:src=
"weMaterialVo.materialUrl"
v-if=
"weMaterialVo.materialUrl"
/>
<svg-icon
class=
"icon-style"
iconClass=
"pic"
v-else
></svg-icon>
<div
class=
"contentStyle"
>
{{
weMaterialVo
.
digest
}}
</div>
</div>
<!-- 文件 -->
<div
v-if=
"weMaterialVo.mediaType === '3'"
style=
"display: flex"
>
<svg-icon
class=
"icon-style"
:iconClass=
"weMaterialVo.materialUrl ? filType(weMaterialVo.materialUrl) : ''"
v-if=
"weMaterialVo.materialUrl"
></svg-icon>
<span
class=
"contentStyle"
>
{{
weMaterialVo
.
digest
}}
</span>
</div>
</div>
<div
class=
"info"
>
<div
class=
"flex fr"
>
<div
v-if=
"['2', '5', '9'].includes(weMaterialVo.mediaType)"
class=
"preview"
>
<a
:href=
"weMaterialVo.materialUrl"
target=
"_blank"
>
预览
</a>
</div>
<div
v-if=
"weMaterialVo.mediaType === '12'"
class=
"preview"
@
click=
"preview(weMaterialVo)"
>
预览
</div>
<a
target=
"_blank"
:href=
"dealUrl(weMaterialVo.materialUrl)"
class=
"preview"
v-if=
"weMaterialVo.mediaType == '3'"
>
预览
</a
>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{}
},
methods
:
{
// preview(obj) {
// if (obj.id !== '0' && obj.id !== '4') {
// this.$router.push({
// name: 'previewDetail',
// query: {
// obj: obj,
// },
// })
// }
// },
dealUrl
(
url
)
{
return
window
.
lwConfig
.
PRIVIEW_URL
+
encodeURIComponent
(
this
.
base64Encode
(
url
))
},
base64Encode
(
str
)
{
if
(
str
===
undefined
||
str
===
''
||
str
===
null
)
{
return
str
}
return
btoa
(
encodeURIComponent
(
str
).
replace
(
/%
([
0-9A-F
]{2})
/g
,
function
toSolidBytes
(
match
,
p1
)
{
return
String
.
fromCharCode
(
'0x'
+
p1
)
})
)
},
preview
(
row
)
{
let
routeData
=
this
.
$router
.
resolve
({
path
:
'/preview'
,
query
:
{
obj
:
encodeURIComponent
(
JSON
.
stringify
(
row
))
},
})
window
.
open
(
routeData
.
href
,
'_blank'
)
},
// 处理文件类型
filType
(
file
)
{
let
filecontent
=
JSON
.
parse
(
JSON
.
stringify
(
file
))
filecontent
=
filecontent
.
split
(
'.'
)
let
type
=
filecontent
[
filecontent
.
length
-
1
]
if
(
type
===
'pdf'
)
{
return
'pdf'
}
else
if
(
type
===
'doc'
||
type
===
'docx'
)
{
return
'word'
}
else
if
(
type
===
'ppt'
||
type
===
'pptx'
||
type
===
'pps'
||
type
===
'pptsx'
)
{
return
'ppt'
}
else
{
return
''
}
},
},
props
:
{
weMaterialVo
:
{
type
:
Object
,
default
:
{},
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.preview
{
width
:
50px
;
height
:
20px
;
font-size
:
12px
;
background-color
:
#fff
;
border
:
1px
solid
#0079de
;
border-radius
:
10px
;
color
:
#0079de
;
line-height
:
20px
;
text-align
:
center
;
margin-right
:
6px
;
}
.title
{
font-weight
:
700
;
font-size
:
12px
;
color
:
#333
;
line-height
:
18px
;
width
:
100%
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
margin-bottom
:
6px
;
}
.icon-style
{
width
:
40px
;
height
:
40px
;
}
.itemList
{
width
:
60%
;
margin
:
10px
;
background-color
:
#eaeaea
;
padding
:
10px
;
border-radius
:
4px
;
}
.info
{
height
:
20px
;
.fr
{
cursor
:
pointer
;
}
}
.centerStyle
{
display
:
flex
;
width
:
100%
;
justify-content
:
space-between
;
.contentStyle
{
font-size
:
12px
;
color
:
#aaaaaa
;
width
:
calc
(
100%
-
60px
);
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
height
:
28px
;
margin-top
:
20px
;
}
.img-style
{
width
:
60px
;
height
:
60px
;
}
}
</
style
>
linkwe-pc/src/views/customerManage/customer/record.vue
View file @
23b0a52
<
script
>
import
{
getFollowUpRecord
,
syncTrack
}
from
'@/api/customer'
import
{
dictTrackState
}
from
'@/utils/dictionary'
import
{
dateFormat
}
from
'@/utils'
import
{
getList
}
from
'@/api/salesCenter/businessConver.js'
import
{
getFollowUpRecord
,
syncTrack
}
from
'@/api/customer'
import
{
dictTrackState
}
from
'@/utils/dictionary'
import
{
dateFormat
}
from
'@/utils'
import
{
getList
}
from
'@/api/salesCenter/businessConver.js'
import
MaterialCard
from
'./MaterialCard.vue'
export
default
{
name
:
''
,
props
:
{
// 当前跟进人id
userId
:
{
type
:
String
,
default
:
null
},
// 所有跟进人id(用于客户画像汇总的同步)
userIdAll
:
{
type
:
String
,
default
:
null
},
// 1:客户动态;2:员工动态;3:互动动态;4:跟进动态
trajectoryType
:
{
type
:
String
,
default
:
null
},
// 视图展示类型 1:表格展示,2:轨迹时间线展示
viewType
:
{
type
:
String
,
default
:
''
},
lastSyncTime
:
String
export
default
{
name
:
''
,
props
:
{
// 当前跟进人id
userId
:
{
type
:
String
,
default
:
null
,
},
components
:
{},
data
()
{
return
{
stageList
:
[],
query
:
{
pageNum
:
0
,
pageSize
:
10
,
externalUserid
:
''
,
// 是 当前客户id
userId
:
null
,
// 当前跟进人id,
trajectoryType
:
null
// 1:客户动态;2:员工动态;3:互动动态;4:跟进动态
},
loading
:
false
,
total
:
0
,
list
:
[],
// 列表
dictTrackState
,
dateFormat
,
goto
:
true
}
// 所有跟进人id(用于客户画像汇总的同步)
userIdAll
:
{
type
:
String
,
default
:
null
,
},
computed
:
{},
watch
:
{},
created
()
{
this
.
viewType
&&
this
.
getList
(
1
)
this
.
getStage
()
// 1:客户动态;2:员工动态;3:互动动态;4:跟进动态
trajectoryType
:
{
type
:
String
,
default
:
null
,
},
mounted
()
{},
methods
:
{
getStage
()
{
getList
().
then
((
res
)
=>
{
this
.
stageList
=
res
.
data
})
},
setValue
(
data
)
{
let
str
=
''
this
.
stageList
.
forEach
((
dd
)
=>
{
if
(
dd
.
stageVal
==
data
)
{
str
=
dd
.
stageKey
}
})
return
str
// 视图展示类型 1:表格展示,2:轨迹时间线展示
viewType
:
{
type
:
String
,
default
:
''
,
},
lastSyncTime
:
String
,
},
components
:
{
MaterialCard
},
data
()
{
return
{
stageList
:
[],
query
:
{
pageNum
:
0
,
pageSize
:
10
,
externalUserid
:
''
,
// 是 当前客户id
userId
:
null
,
// 当前跟进人id,
trajectoryType
:
null
,
// 1:客户动态;2:员工动态;3:互动动态;4:跟进动态
},
/** 查询 */
getList
(
page
)
{
Object
.
assign
(
this
.
query
,
{
externalUserid
:
this
.
$route
.
query
.
externalUserid
,
weUserId
:
this
.
userId
,
trajectoryType
:
this
.
trajectoryType
})
if
(
this
.
viewType
)
{
page
&&
(
this
.
query
.
pageNum
=
page
)
}
else
{
this
.
query
.
pageNum
++
if
(
this
.
query
.
pageNum
>
1
&&
this
.
goto
)
{
return
}
loading
:
false
,
total
:
0
,
list
:
[],
// 列表
dictTrackState
,
dateFormat
,
goto
:
true
,
}
},
computed
:
{},
watch
:
{},
created
()
{
this
.
viewType
&&
this
.
getList
(
1
)
this
.
getStage
()
},
mounted
()
{},
methods
:
{
getStage
()
{
getList
().
then
((
res
)
=>
{
this
.
stageList
=
res
.
data
})
},
setValue
(
data
)
{
let
str
=
''
this
.
stageList
.
forEach
((
dd
)
=>
{
if
(
dd
.
stageVal
==
data
)
{
str
=
dd
.
stageKey
}
})
return
str
},
/** 查询 */
getList
(
page
)
{
Object
.
assign
(
this
.
query
,
{
externalUserid
:
this
.
$route
.
query
.
externalUserid
,
weUserId
:
this
.
userId
,
trajectoryType
:
this
.
trajectoryType
,
})
if
(
this
.
viewType
)
{
page
&&
(
this
.
query
.
pageNum
=
page
)
}
else
{
this
.
query
.
pageNum
++
if
(
this
.
query
.
pageNum
>
1
&&
this
.
goto
)
{
return
}
this
.
loading
=
true
getFollowUpRecord
(
this
.
query
)
.
then
(({
rows
,
total
,
lastSyncTime
})
=>
{
if
(
this
.
viewType
)
{
this
.
list
=
rows
}
this
.
loading
=
true
getFollowUpRecord
(
this
.
query
)
.
then
(({
rows
,
total
,
lastSyncTime
})
=>
{
if
(
this
.
viewType
)
{
this
.
list
=
rows
}
else
{
if
(
rows
.
length
===
this
.
total
)
{
this
.
goto
=
false
}
else
{
if
(
rows
.
length
===
this
.
total
)
{
this
.
goto
=
false
}
else
{
this
.
goto
=
true
}
let
list
=
[]
let
dayList
=
[]
this
.
goto
=
true
}
let
list
=
[]
let
dayList
=
[]
// 提取天
rows
.
forEach
((
ele
)
=>
{
let
date
=
this
.
dateFormat
(
ele
.
createTime
,
'yyyyMMdd'
)
dayList
.
includes
(
date
)
||
dayList
.
push
(
date
)
})
dayList
.
sort
((
a
,
b
)
=>
b
-
a
)
// 提取天
rows
.
forEach
((
ele
)
=>
{
let
date
=
this
.
dateFormat
(
ele
.
createTime
,
'yyyyMMdd'
)
dayList
.
includes
(
date
)
||
dayList
.
push
(
date
)
})
dayList
.
sort
((
a
,
b
)
=>
b
-
a
)
// 提取每天的时间点
for
(
let
i
=
0
;
i
<
dayList
.
length
;
i
++
)
{
let
timeList
=
[]
for
(
let
j
=
0
;
j
<
rows
.
length
;
j
++
)
{
// console.log(rows[j].createTime);
if
(
dayList
[
i
]
==
this
.
dateFormat
(
rows
[
j
].
createTime
,
'yyyyMMdd'
))
{
timeList
.
push
(
rows
[
j
])
}
// 提取每天的时间点
for
(
let
i
=
0
;
i
<
dayList
.
length
;
i
++
)
{
let
timeList
=
[]
for
(
let
j
=
0
;
j
<
rows
.
length
;
j
++
)
{
// console.log(rows[j].createTime);
if
(
dayList
[
i
]
==
this
.
dateFormat
(
rows
[
j
].
createTime
,
'yyyyMMdd'
))
{
timeList
.
push
(
rows
[
j
])
}
list
.
push
(
timeList
)
}
this
.
list
=
this
.
list
.
concat
(
list
)
list
.
push
(
timeList
)
}
this
.
total
=
+
total
this
.
$emit
(
'update:lastSyncTime'
,
lastSyncTime
)
this
.
loading
=
false
})
.
catch
(()
=>
{
this
.
loading
=
false
})
},
sync
()
{
this
.
loading
=
true
syncTrack
(
this
.
userId
||
this
.
userIdAll
)
.
then
(()
=>
{
this
.
getList
(
1
)
this
.
msgSuccess
(
'后台开始同步数据,请稍后关注进度'
)
this
.
loading
=
false
})
.
catch
((
fail
)
=>
{
this
.
loading
=
false
console
.
error
(
fail
)
})
}
}
}
this
.
list
=
this
.
list
.
concat
(
list
)
}
this
.
total
=
+
total
this
.
$emit
(
'update:lastSyncTime'
,
lastSyncTime
)
this
.
loading
=
false
})
.
catch
(()
=>
{
this
.
loading
=
false
})
},
sync
()
{
this
.
loading
=
true
syncTrack
(
this
.
userId
||
this
.
userIdAll
)
.
then
(()
=>
{
this
.
getList
(
1
)
this
.
msgSuccess
(
'后台开始同步数据,请稍后关注进度'
)
this
.
loading
=
false
})
.
catch
((
fail
)
=>
{
this
.
loading
=
false
console
.
error
(
fail
)
})
},
},
}
</
script
>
<
template
>
...
...
@@ -179,7 +180,7 @@
</template>
<div
v-else
class=
"timeline-time-wrap"
>
<ul
class=
"infinite-list"
v-infinite-scroll=
"getList"
style=
"overflow: auto
;
"
>
<ul
class=
"infinite-list"
v-infinite-scroll=
"getList"
style=
"overflow: auto"
>
<!-- -->
<
template
v-if=
"list.length"
>
<li
v-for=
"(unit, i) in list"
class=
"infinite-list-item"
:key=
"i"
>
...
...
@@ -195,6 +196,7 @@
>
<p
class=
"timeline-box-item-title"
>
{{
item
.
title
||
'无标题'
}}
</p>
<p>
{{
item
.
content
||
'无内容'
}}
</p>
<MaterialCard
v-if=
"item.weMaterialVo"
:weMaterialVo=
"item.weMaterialVo"
/>
</el-timeline-item>
</el-timeline>
</li>
...
...
@@ -206,40 +208,40 @@
</template>
<
style
lang=
"scss"
scoped
>
//
.timeline-time-wrap
{
//
}
.infinite-list-item
{
border-bottom
:
1px
solid
#eee
;
&:last-child
{
border
:
0
;
}
}
.timeline-time
{
font-size
:
14px
;
color
:
#999999
;
line-height
:
48px
;
}
.el-timeline
>
.timeline-box-item
:first-child
::v-deep
.el-timeline-item__node
{
border-radius
:
0
!important
;
//
.timeline-time-wrap
{
//
}
.infinite-list-item
{
border-bottom
:
1px
solid
#eee
;
&:last-child
{
border
:
0
;
}
.timeline-box
{
padding-left
:
70px
;
&-item
{
::v-deep
.el-timeline-item__timestamp
{
position
:
absolute
;
top
:
4px
;
left
:
-45px
;
margin
:
0
;
}
}
.timeline-time
{
font-size
:
14px
;
color
:
#999999
;
line-height
:
48px
;
}
.el-timeline
>
.timeline-box-item
:first-child
::v-deep
.el-timeline-item__node
{
border-radius
:
0
!important
;
}
.timeline-box
{
padding-left
:
70px
;
&-item
{
::v-deep
.el-timeline-item__timestamp
{
position
:
absolute
;
top
:
4px
;
left
:
-45px
;
margin
:
0
;
}
&
-title
{
font-weight
:
700
;
line-height
:
25px
;
}
&
-title
{
font-weight
:
700
;
line-height
:
25px
;
}
}
}
::v-deep
.el-timeline-item__tail
{
border-left-color
:
var
(
--color
);
}
::v-deep
.el-timeline-item__tail
{
border-left-color
:
var
(
--color
);
}
</
style
>
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