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 1f29c043
authored
Jun 27, 2023
by
ext.wangyuman1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
朋友圈模块
1 parent
bbeb6fe6
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
150 additions
and
54 deletions
vue3-lw-pc/src/components/ContentCenter/MaterialCenter/MaPage.vue
vue3-lw-pc/src/components/ContentCenter/MaterialCenter/index.vue
vue3-lw-pc/src/components/ContentCenter/ScriptMaterial.vue
vue3-lw-pc/src/components/DragTable.vue
vue3-lw-pc/src/config.js
vue3-lw-pc/src/views/application/shortLinkPopularize/components/DragTable.vue
vue3-lw-pc/src/views/contentCenter/components/TalkList.vue
vue3-lw-pc/src/views/customerManage/customer/MaterialCard.vue
vue3-lw-pc/src/components/ContentCenter/MaterialCenter/MaPage.vue
View file @
1f29c04
...
@@ -20,6 +20,11 @@ export default {
...
@@ -20,6 +20,11 @@ export default {
type
:
[
Array
,
String
],
type
:
[
Array
,
String
],
default
:
''
,
default
:
''
,
},
},
// 朋友圈
isFriends
:
{
type
:
Boolean
,
default
:
false
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -168,6 +173,10 @@ export default {
...
@@ -168,6 +173,10 @@ export default {
getList
(
page
)
{
getList
(
page
)
{
page
&&
(
this
.
query
.
pageNum
=
page
)
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
loading
=
true
this
.
loading
=
true
// 如果是朋友圈模块使用isFirends为true
if
(
this
.
isFriends
)
{
this
.
query
.
scene
=
1
}
getList
(
this
.
query
)
getList
(
this
.
query
)
.
then
(({
rows
,
total
})
=>
{
.
then
(({
rows
,
total
})
=>
{
this
.
list
=
rows
.
sort
((
a
,
b
)
=>
+
new
Date
(
b
.
updateTime
)
-
+
new
Date
(
a
.
updateTime
))
this
.
list
=
rows
.
sort
((
a
,
b
)
=>
+
new
Date
(
b
.
updateTime
)
-
+
new
Date
(
a
.
updateTime
))
...
@@ -187,7 +196,11 @@ export default {
...
@@ -187,7 +196,11 @@ export default {
<div
class=
"page"
>
<div
class=
"page"
>
<div
style=
"margin-top: 16px"
>
<div
style=
"margin-top: 16px"
>
<el-row
type=
"flex"
justify=
"space-between"
>
<el-row
type=
"flex"
justify=
"space-between"
>
<el-col
:span=
"5"
class=
"left pad20"
style=
"border-radius: 4px; background: var(--bg-white)"
>
<el-col
:span=
"5"
class=
"left pad20"
style=
"border-radius: 4px; background: var(--bg-white)"
>
<div
class=
"title"
>
<div
class=
"title"
>
<div
class=
"title-name"
>
{{
typeTitle
[
type
]
}}
分组
</div>
<div
class=
"title-name"
>
{{
typeTitle
[
type
]
}}
分组
</div>
</div>
</div>
...
@@ -197,7 +210,8 @@ export default {
...
@@ -197,7 +210,8 @@ export default {
:class=
"
{ active: groupIndex == key }"
:class=
"
{ active: groupIndex == key }"
v-for="(group, key) in groupList"
v-for="(group, key) in groupList"
:key="group.id"
:key="group.id"
@click="switchGroup(key, group)">
@click="switchGroup(key, group)"
>
<div
class=
"name"
>
{{
group
.
name
+
' ('
+
group
.
number
+
')'
}}
</div>
<div
class=
"name"
>
{{
group
.
name
+
' ('
+
group
.
number
+
')'
}}
</div>
</div>
</div>
</div>
</div>
...
@@ -211,7 +225,8 @@ export default {
...
@@ -211,7 +225,8 @@ export default {
clearable
clearable
prefix-icon=
"el-icon-search"
prefix-icon=
"el-icon-search"
style=
"width: 300px"
style=
"width: 300px"
@
keyup
.
enter=
"search()"
/>
@
keyup
.
enter=
"search()"
/>
<el-button
class=
"ml10"
@
click=
"getList(1)"
type=
"primary"
>
查询
</el-button>
<el-button
class=
"ml10"
@
click=
"getList(1)"
type=
"primary"
>
查询
</el-button>
<!-- v-hasPermi="['wecom:material:list']" -->
<!-- v-hasPermi="['wecom:material:list']" -->
<el-button
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
@
click=
"resetQuery"
>
重置
</el-button>
...
@@ -225,7 +240,8 @@ export default {
...
@@ -225,7 +240,8 @@ export default {
:total=
"total"
:total=
"total"
v-model:page=
"query.pageNum"
v-model:page=
"query.pageNum"
v-model:limit=
"query.pageSize"
v-model:limit=
"query.pageSize"
@
pagination=
"getList()"
/>
@
pagination=
"getList()"
/>
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
...
...
vue3-lw-pc/src/components/ContentCenter/MaterialCenter/index.vue
View file @
1f29c04
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
:label=
"item.label + '(' + item.list.length + ')'"
:label=
"item.label + '(' + item.list.length + ')'"
:name=
"item.name"
:name=
"item.name"
>
>
<MaPage
ref=
"page"
:type=
"item.type"
v-slot=
"
{ list }" @listChange="listChange">
<MaPage
ref=
"page"
:type=
"item.type"
:isFriends =
'isFriends'
v-slot=
"
{ list }" @listChange="listChange">
<div
v-if=
"item.type === '0'"
>
<div
v-if=
"item.type === '0'"
>
<div
v-if=
"list && list.length"
>
<div
v-if=
"list && list.length"
>
<el-checkbox-group
v-model=
"paneList[picindex].list"
class=
"imgStyle"
>
<el-checkbox-group
v-model=
"paneList[picindex].list"
class=
"imgStyle"
>
...
...
vue3-lw-pc/src/components/ContentCenter/ScriptMaterial.vue
View file @
1f29c04
...
@@ -7,7 +7,8 @@
...
@@ -7,7 +7,8 @@
width=
"60%"
width=
"60%"
append-to-body
append-to-body
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
@
close=
"dialogClose"
>
@
close=
"dialogClose"
>
<el-table
:data=
"tableData"
ref=
"singleTable"
v-loading=
"loading"
>
<el-table
:data=
"tableData"
ref=
"singleTable"
v-loading=
"loading"
>
<!--
<el-table-column
type=
"index"
width=
"50"
label=
"序号"
align=
"center"
></el-table-column>
-->
<!--
<el-table-column
type=
"index"
width=
"50"
label=
"序号"
align=
"center"
></el-table-column>
-->
<el-table-column
prop=
"name"
align=
"center"
label=
"素材"
width=
"260"
>
<el-table-column
prop=
"name"
align=
"center"
label=
"素材"
width=
"260"
>
...
@@ -22,17 +23,32 @@
...
@@ -22,17 +23,32 @@
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"发送总次数"
align=
"center"
prop=
"sendTotalNum"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"发送总次数"
align=
"center"
prop=
"sendTotalNum"
:show-overflow-tooltip=
"true"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
sendTotalNum
||
'-'
}}
{{
scope
.
row
.
sendTotalNum
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"查看总次数"
align=
"center"
prop=
"viewTotalNum"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"查看总次数"
align=
"center"
prop=
"viewTotalNum"
:show-overflow-tooltip=
"true"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
viewTotalNum
||
'-'
}}
{{
scope
.
row
.
viewTotalNum
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"查看总人数"
align=
"center"
prop=
"viewByTotalNum"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"查看总人数"
align=
"center"
prop=
"viewByTotalNum"
:show-overflow-tooltip=
"true"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
viewByTotalNum
||
'-'
}}
{{
scope
.
row
.
viewByTotalNum
||
'-'
}}
</
template
>
</
template
>
...
@@ -131,15 +147,16 @@ export default {
...
@@ -131,15 +147,16 @@ export default {
return
btoa
(
return
btoa
(
encodeURIComponent
(
str
).
replace
(
/%
([
0-9A-F
]{2})
/g
,
function
toSolidBytes
(
match
,
p1
)
{
encodeURIComponent
(
str
).
replace
(
/%
([
0-9A-F
]{2})
/g
,
function
toSolidBytes
(
match
,
p1
)
{
return
String
.
fromCharCode
(
'0x'
+
p1
)
return
String
.
fromCharCode
(
'0x'
+
p1
)
})
,
})
)
)
},
},
preview
(
row
)
{
preview
(
row
)
{
let
routeData
=
this
.
$router
.
resolve
({
// let routeData = this.$router.resolve({
path
:
'/preview'
,
// path: '/preview',
query
:
{
obj
:
encodeURIComponent
(
JSON
.
stringify
(
row
))
},
// query: { obj: encodeURIComponent(JSON.stringify(row)) },
})
// })
window
.
open
(
routeData
.
href
,
'_blank'
)
// window.open(routeData.href, '_blank')
window
.
open
(
window
.
lwConfig
.
PRIVIEW_PATH
+
row
.
id
+
'&otherModle='
+
true
,
'_blank'
)
},
},
deltype
(
type
)
{
deltype
(
type
)
{
switch
(
type
)
{
switch
(
type
)
{
...
...
vue3-lw-pc/src/components/DragTable.vue
View file @
1f29c04
...
@@ -217,11 +217,12 @@ export default {
...
@@ -217,11 +217,12 @@ export default {
)
)
},
},
preview
(
row
)
{
preview
(
row
)
{
let
routeData
=
this
.
$router
.
resolve
({
// let routeData = this.$router.resolve({
path
:
'/preview'
,
// path: '/preview',
query
:
{
obj
:
encodeURIComponent
(
JSON
.
stringify
(
row
))
},
// query: { obj: encodeURIComponent(JSON.stringify(row)) },
})
// })
window
.
open
(
routeData
.
href
,
'_blank'
)
// window.open(routeData.href, '_blank')
window
.
open
(
window
.
lwConfig
.
PRIVIEW_PATH
+
row
.
id
+
'&otherModle='
+
true
,
'_blank'
)
},
},
// 处理文件类型
// 处理文件类型
filType
(
file
)
{
filType
(
file
)
{
...
...
vue3-lw-pc/src/config.js
View file @
1f29c04
...
@@ -29,6 +29,7 @@ const common = {
...
@@ -29,6 +29,7 @@ const common = {
DEFAULT_H5_WORDE
:
env
.
DOMAIN
+
'/static/WORD.png'
,
DEFAULT_H5_WORDE
:
env
.
DOMAIN
+
'/static/WORD.png'
,
DEFAULT_H5_PPT
:
env
.
DOMAIN
+
'/static/PPT.png'
,
DEFAULT_H5_PPT
:
env
.
DOMAIN
+
'/static/PPT.png'
,
PRIVIEW_URL
:
env
.
VIEW_URL
,
PRIVIEW_URL
:
env
.
VIEW_URL
,
PRIVIEW_PATH
:
env
.
DOMAIN
+
'/mobile/#/metrialDetail?materiaId='
,
BAIDU_MAP_KEY
:
'GeDsF2XGs01U0bUSpFIUCmvyNoYuGC3P'
,
// 百度地图key
BAIDU_MAP_KEY
:
'GeDsF2XGs01U0bUSpFIUCmvyNoYuGC3P'
,
// 百度地图key
MICRO_APPS
:
{
MICRO_APPS
:
{
...
...
vue3-lw-pc/src/views/application/shortLinkPopularize/components/DragTable.vue
View file @
1f29c04
<
template
>
<
template
>
<div>
<div>
<!-- 表格拖拽组件 -->
<!-- 表格拖拽组件 -->
<el-table
:data=
"tableData"
ref=
"singleTable"
highlight-current-row
row-key=
"id"
class=
"load_table"
>
<el-table
:data=
"tableData"
ref=
"singleTable"
highlight-current-row
row-key=
"id"
class=
"load_table"
>
<!--
<el-table-column
type=
"index"
width=
"50"
label=
"序号"
align=
"center"
></el-table-column>
-->
<!--
<el-table-column
type=
"index"
width=
"50"
label=
"序号"
align=
"center"
></el-table-column>
-->
<el-table-column
label=
""
width=
"50"
align=
"left"
v-if=
"dargAble"
>
<el-table-column
label=
""
width=
"50"
align=
"left"
v-if=
"dargAble"
>
<svg-icon
icon=
"dragIcon"
/>
<svg-icon
icon=
"dragIcon"
/>
...
@@ -12,13 +18,16 @@
...
@@ -12,13 +18,16 @@
<el-tooltip
<el-tooltip
:content=
"row.materialName"
:content=
"row.materialName"
placement=
"top"
placement=
"top"
:disabled=
"row.materialName ? row.materialName.length
< 12
:
true
"
>
:disabled=
"row.materialName ? row.materialName.length
< 12
:
true
"
>
<span
class=
"title"
>
{{
coverContent
(
row
.
materialName
,
12
)
}}
</span>
<span
class=
"title"
>
{{
coverContent
(
row
.
materialName
,
12
)
}}
</span>
</el-tooltip>
</el-tooltip>
<!-- 文本 -->
<!-- 文本 -->
<div
v-if=
"row.mediaType === '4'"
>
<div
v-if=
"row.mediaType === '4'"
>
<el-tooltip
placement=
"top"
:disabled=
"row.content ? row.content.length
< 50
:
true
"
>
<el-tooltip
placement=
"top"
:disabled=
"row.content ? row.content.length
< 50
:
true
"
>
<template
#
content
><p
style=
"white-space: pre-line"
v-html=
"row.content"
></p></
template
>
<template
#
content
><p
style=
"white-space: pre-line"
v-html=
"row.content"
></p
></
template
>
<span
class=
"twosplice"
>
{{ coverContent(row.content, 50) }}
</span>
<span
class=
"twosplice"
>
{{ coverContent(row.content, 50) }}
</span>
</el-tooltip>
</el-tooltip>
</div>
</div>
...
@@ -28,11 +37,20 @@
...
@@ -28,11 +37,20 @@
</div>
</div>
<!-- 图文 -->
<!-- 图文 -->
<div
v-if=
"row.mediaType === '9'"
style=
"display: flex"
>
<div
v-if=
"row.mediaType === '9'"
style=
"display: flex"
>
<el-image
:src=
"row.coverUrl"
fit=
"contain"
class=
"imgsize"
v-if=
"row.coverUrl"
></el-image>
<el-image
:src=
"row.coverUrl"
fit=
"contain"
class=
"imgsize"
v-if=
"row.coverUrl"
></el-image>
<div
class=
"icon-style"
v-else
>
<div
class=
"icon-style"
v-else
>
<svg-icon
class=
"icon-style"
icon=
"imgText"
></svg-icon>
<svg-icon
class=
"icon-style"
icon=
"imgText"
></svg-icon>
</div>
</div>
<el-tooltip
:content=
"row.content"
placement=
"top"
:disabled=
"row.content ? row.content.length < 50 : true"
>
<el-tooltip
:content=
"row.content"
placement=
"top"
:disabled=
"row.content ? row.content.length < 50 : true"
>
<span
class=
"twosplice distStyle"
>
{{ coverContent(row.content, 50) }}
</span>
<span
class=
"twosplice distStyle"
>
{{ coverContent(row.content, 50) }}
</span>
</el-tooltip>
</el-tooltip>
</div>
</div>
...
@@ -42,18 +60,31 @@
...
@@ -42,18 +60,31 @@
</div>
</div>
<!-- 文章 -->
<!-- 文章 -->
<div
v-if=
"row.mediaType === '12'"
style=
"display: flex"
>
<div
v-if=
"row.mediaType === '12'"
style=
"display: flex"
>
<el-image
:src=
"row.coverUrl"
fit=
"contain"
class=
"imgsize"
v-if=
"row.coverUrl"
></el-image>
<el-image
:src=
"row.coverUrl"
fit=
"contain"
class=
"imgsize"
v-if=
"row.coverUrl"
></el-image>
<div
class=
"icon-style"
v-else
>
<div
class=
"icon-style"
v-else
>
<svg-icon
class=
"icon-style"
icon=
"article"
></svg-icon>
<svg-icon
class=
"icon-style"
icon=
"article"
></svg-icon>
</div>
</div>
<el-tooltip
:content=
"row.digest"
placement=
"top"
:disabled=
"row.digest ? row.digest.length < 50 : true"
>
<el-tooltip
:content=
"row.digest"
placement=
"top"
:disabled=
"row.digest ? row.digest.length < 50 : true"
>
<span
class=
"twosplice distStyle"
>
{{ coverContent(row.digest, 50) }}
</span>
<span
class=
"twosplice distStyle"
>
{{ coverContent(row.digest, 50) }}
</span>
</el-tooltip>
</el-tooltip>
</div>
</div>
<!-- 视频 -->
<!-- 视频 -->
<div
v-if=
"row.mediaType === '2'"
style=
"display: flex"
>
<div
v-if=
"row.mediaType === '2'"
style=
"display: flex"
>
<el-image
:src=
"row.coverUrl"
fit=
"contain"
class=
"imgsize"
></el-image>
<el-image
:src=
"row.coverUrl"
fit=
"contain"
class=
"imgsize"
></el-image>
<el-tooltip
:content=
"row.digest"
placement=
"top"
:disabled=
"row.digest ? row.digest.length < 50 : true"
>
<el-tooltip
:content=
"row.digest"
placement=
"top"
:disabled=
"row.digest ? row.digest.length < 50 : true"
>
<span
class=
"twosplice distStyle"
>
{{ coverContent(row.digest, 50) }}
</span>
<span
class=
"twosplice distStyle"
>
{{ coverContent(row.digest, 50) }}
</span>
</el-tooltip>
</el-tooltip>
</div>
</div>
...
@@ -61,16 +92,27 @@
...
@@ -61,16 +92,27 @@
<div
v-if=
"row.mediaType === '3'"
style=
"display: flex"
>
<div
v-if=
"row.mediaType === '3'"
style=
"display: flex"
>
<!-- <el-image :src="row.coverUrl" fit="contain" class="imgsize"></el-image> -->
<!-- <el-image :src="row.coverUrl" fit="contain" class="imgsize"></el-image> -->
<div
class=
"icon-style"
v-if=
"row.materialUrl"
>
<div
class=
"icon-style"
v-if=
"row.materialUrl"
>
<svg-icon
class=
"icon-style"
:icon=
"row.materialUrl ? filType(row.materialUrl) : ''"
></svg-icon>
<svg-icon
class=
"icon-style"
:icon=
"row.materialUrl ? filType(row.materialUrl) : ''"
></svg-icon>
</div>
</div>
<el-tooltip
:content=
"row.digest"
placement=
"top"
:disabled=
"row.digest ? row.digest.length < 50 : true"
>
<el-tooltip
:content=
"row.digest"
placement=
"top"
:disabled=
"row.digest ? row.digest.length < 50 : true"
>
<span
class=
"twosplice distStyle"
>
{{ coverContent(row.digest, 50) }}
</span>
<span
class=
"twosplice distStyle"
>
{{ coverContent(row.digest, 50) }}
</span>
</el-tooltip>
</el-tooltip>
</div>
</div>
<!-- 海报 -->
<!-- 海报 -->
<div
v-if=
"row.mediaType === '5'"
style=
"display: flex"
>
<div
v-if=
"row.mediaType === '5'"
style=
"display: flex"
>
<el-image
:src=
"row.materialUrl"
fit=
"contain"
class=
"imgsize"
></el-image>
<el-image
:src=
"row.materialUrl"
fit=
"contain"
class=
"imgsize"
></el-image>
<el-tooltip
:content=
"row.digest"
placement=
"top"
:disabled=
"row.digest ? row.digest.length < 50 : true"
>
<el-tooltip
:content=
"row.digest"
placement=
"top"
:disabled=
"row.digest ? row.digest.length < 50 : true"
>
<span
class=
"twosplice distStyle"
>
{{ coverContent(row.digest, 50) }}
</span>
<span
class=
"twosplice distStyle"
>
{{ coverContent(row.digest, 50) }}
</span>
</el-tooltip>
</el-tooltip>
</div>
</div>
...
@@ -167,15 +209,16 @@ export default {
...
@@ -167,15 +209,16 @@ export default {
return
btoa
(
return
btoa
(
encodeURIComponent
(
str
).
replace
(
/%
([
0-9A-F
]{2})
/g
,
function
toSolidBytes
(
match
,
p1
)
{
encodeURIComponent
(
str
).
replace
(
/%
([
0-9A-F
]{2})
/g
,
function
toSolidBytes
(
match
,
p1
)
{
return
String
.
fromCharCode
(
'0x'
+
p1
)
return
String
.
fromCharCode
(
'0x'
+
p1
)
})
,
})
)
)
},
},
preview
(
row
)
{
preview
(
row
)
{
let
routeData
=
this
.
$router
.
resolve
({
// let routeData = this.$router.resolve({
path
:
'/preview'
,
// path: '/preview',
query
:
{
obj
:
encodeURIComponent
(
JSON
.
stringify
(
row
))
},
// query: { obj: encodeURIComponent(JSON.stringify(row)) },
})
// })
window
.
open
(
routeData
.
href
,
'_blank'
)
// window.open(routeData.href, '_blank')
window
.
open
(
window
.
lwConfig
.
PRIVIEW_PATH
+
row
.
id
+
'&otherModle='
+
true
,
'_blank'
)
},
},
// 处理文件类型
// 处理文件类型
filType
(
file
)
{
filType
(
file
)
{
...
@@ -246,7 +289,9 @@ export default {
...
@@ -246,7 +289,9 @@ export default {
},
},
//表格拖动排序
//表格拖动排序
dragSort
()
{
dragSort
()
{
const
el
=
this
.
$refs
.
singleTable
.
$el
.
querySelectorAll
(
'.el-table__body-wrapper table > tbody'
)[
0
]
const
el
=
this
.
$refs
.
singleTable
.
$el
.
querySelectorAll
(
'.el-table__body-wrapper table > tbody'
)[
0
]
this
.
sortable
=
Sortable
.
create
(
el
,
{
this
.
sortable
=
Sortable
.
create
(
el
,
{
ghostClass
:
'sortable-ghost'
,
ghostClass
:
'sortable-ghost'
,
...
...
vue3-lw-pc/src/views/contentCenter/components/TalkList.vue
View file @
1f29c04
...
@@ -125,11 +125,12 @@ export default {
...
@@ -125,11 +125,12 @@ export default {
)
)
},
},
preview
(
row
)
{
preview
(
row
)
{
let
routeData
=
this
.
$router
.
resolve
({
// let routeData = this.$router.resolve({
path
:
'/preview'
,
// path: '/preview',
query
:
{
obj
:
encodeURIComponent
(
JSON
.
stringify
(
row
))
},
// query: { obj: encodeURIComponent(JSON.stringify(row)) },
})
// })
window
.
open
(
routeData
.
href
,
'_blank'
)
// window.open(routeData.href, '_blank')
window
.
open
(
window
.
lwConfig
.
PRIVIEW_PATH
+
row
.
id
+
'&otherModle='
+
true
,
'_blank'
)
},
},
// 超过num个。。。展示
// 超过num个。。。展示
coverContent
(
str
,
num
)
{
coverContent
(
str
,
num
)
{
...
...
vue3-lw-pc/src/views/customerManage/customer/MaterialCard.vue
View file @
1f29c04
...
@@ -4,7 +4,12 @@
...
@@ -4,7 +4,12 @@
<div
class=
"title"
>
{{
weMaterialVo
.
materialName
}}
</div>
<div
class=
"title"
>
{{
weMaterialVo
.
materialName
}}
</div>
<!-- 文章 -->
<!-- 文章 -->
<div
class=
"centerStyle"
v-if=
"weMaterialVo.mediaType == 12"
>
<div
class=
"centerStyle"
v-if=
"weMaterialVo.mediaType == 12"
>
<el-image
class=
"img-style"
fit=
"contain"
:src=
"weMaterialVo.coverUrl"
v-if=
"weMaterialVo.coverUrl"
/>
<el-image
class=
"img-style"
fit=
"contain"
:src=
"weMaterialVo.coverUrl"
v-if=
"weMaterialVo.coverUrl"
/>
<svg-icon
class=
"icon-style"
icon=
"article"
v-else
></svg-icon>
<svg-icon
class=
"icon-style"
icon=
"article"
v-else
></svg-icon>
<div
class=
"contentStyle"
>
{{
weMaterialVo
.
digest
}}
</div>
<div
class=
"contentStyle"
>
{{
weMaterialVo
.
digest
}}
</div>
</div>
</div>
...
@@ -15,7 +20,12 @@
...
@@ -15,7 +20,12 @@
</div>
</div>
<!-- 海报 -->
<!-- 海报 -->
<div
class=
"centerStyle"
v-if=
"weMaterialVo.mediaType == 5"
>
<div
class=
"centerStyle"
v-if=
"weMaterialVo.mediaType == 5"
>
<el-image
class=
"img-style"
fit=
"contain"
:src=
"weMaterialVo.materialUrl"
v-if=
"weMaterialVo.materialUrl"
/>
<el-image
class=
"img-style"
fit=
"contain"
:src=
"weMaterialVo.materialUrl"
v-if=
"weMaterialVo.materialUrl"
/>
<svg-icon
class=
"icon-style"
icon=
"pic"
v-else
></svg-icon>
<svg-icon
class=
"icon-style"
icon=
"pic"
v-else
></svg-icon>
<div
class=
"contentStyle"
>
{{
weMaterialVo
.
digest
}}
</div>
<div
class=
"contentStyle"
>
{{
weMaterialVo
.
digest
}}
</div>
</div>
</div>
...
@@ -24,7 +34,8 @@
...
@@ -24,7 +34,8 @@
<svg-icon
<svg-icon
class=
"icon-style"
class=
"icon-style"
:icon=
"weMaterialVo.materialUrl ? filType(weMaterialVo.materialUrl) : ''"
:icon=
"weMaterialVo.materialUrl ? filType(weMaterialVo.materialUrl) : ''"
v-if=
"weMaterialVo.materialUrl"
></svg-icon>
v-if=
"weMaterialVo.materialUrl"
></svg-icon>
<span
class=
"contentStyle"
>
{{
weMaterialVo
.
digest
}}
</span>
<span
class=
"contentStyle"
>
{{
weMaterialVo
.
digest
}}
</span>
</div>
</div>
</div>
</div>
...
@@ -34,12 +45,15 @@
...
@@ -34,12 +45,15 @@
<a
:href=
"weMaterialVo.materialUrl"
target=
"_blank"
>
预览
</a>
<a
:href=
"weMaterialVo.materialUrl"
target=
"_blank"
>
预览
</a>
</div>
</div>
<div
v-if=
"weMaterialVo.mediaType === '12'"
class=
"preview"
@
click=
"preview(weMaterialVo)"
>
预览
</div>
<div
v-if=
"weMaterialVo.mediaType === '12'"
class=
"preview"
@
click=
"preview(weMaterialVo)"
>
预览
</div>
<a
<a
target=
"_blank"
target=
"_blank"
:href=
"dealUrl(weMaterialVo.materialUrl)"
:href=
"dealUrl(weMaterialVo.materialUrl)"
class=
"preview"
class=
"preview"
v-if=
"weMaterialVo.mediaType == '3'"
>
v-if=
"weMaterialVo.mediaType == '3'"
>
预览
预览
</a>
</a>
</div>
</div>
...
@@ -73,15 +87,16 @@ export default {
...
@@ -73,15 +87,16 @@ export default {
return
btoa
(
return
btoa
(
encodeURIComponent
(
str
).
replace
(
/%
([
0-9A-F
]{2})
/g
,
function
toSolidBytes
(
match
,
p1
)
{
encodeURIComponent
(
str
).
replace
(
/%
([
0-9A-F
]{2})
/g
,
function
toSolidBytes
(
match
,
p1
)
{
return
String
.
fromCharCode
(
'0x'
+
p1
)
return
String
.
fromCharCode
(
'0x'
+
p1
)
})
,
})
)
)
},
},
preview
(
row
)
{
preview
(
row
)
{
let
routeData
=
this
.
$router
.
resolve
({
// let routeData = this.$router.resolve({
path
:
'/preview'
,
// path: '/preview',
query
:
{
obj
:
encodeURIComponent
(
JSON
.
stringify
(
row
))
},
// query: { obj: encodeURIComponent(JSON.stringify(row)) },
})
// })
window
.
open
(
routeData
.
href
,
'_blank'
)
// window.open(routeData.href, '_blank')
window
.
open
(
window
.
lwConfig
.
PRIVIEW_PATH
+
row
.
id
+
'&otherModle='
+
true
,
'_blank'
)
},
},
// 处理文件类型
// 处理文件类型
filType
(
file
)
{
filType
(
file
)
{
...
...
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