Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 b2f9c235
authored
Mar 29, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改
1 parent
7e6f755d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
11 deletions
src/views/material/index.vue
src/views/material/index.vue
View file @
b2f9c23
...
@@ -442,7 +442,39 @@ export default {
...
@@ -442,7 +442,39 @@ export default {
return
params
return
params
},
},
// 获取素材列表
// 获取素材列表
getTableList
(
params
)
{
// getTableList(params) {
// this.$apis.material.materialList(params).then(res => {
// let data = res.data
// let tableData = []
// data.forEach(item => {
// if (item.materialType != 3) {
// item.materialContentRpcResponse.materialUrl = ''
// }
// if (item.materialType == 3) {
// let html = decodeURIComponent(item.materialContentRpcResponse.materialUrl)
// let imgHtml = html.match(/<img.*?(?:>|\/>)/g)
// if (imgHtml) {
// let imgSrc = imgHtml[0].match('<img[^<>]*? src="([^<>]*?)"')
// item.materialContentRpcResponse.materialUrl = imgSrc[1]
// } else {
// item.materialContentRpcResponse.materialUrl = ''
// }
// }
// tableData.push(item)
// })
// this.materialTableData = tableData
// this.tableTotal = res.count
// res.count ? (this.$refs.materialRef.tableHeightValues = '') : this.$refs.materialRef.setTableHeightFun()
// })
// },
getListApi
()
{
var
params
=
this
.
getParams
()
// params.pageSize = this.$refs.materialRef.page.pageSize
// params.pageNum = this.$refs.materialRef.page.pageNum
params
.
pageSize
=
1000000
params
.
pageNum
=
1
params
.
groupId
=
''
// this.getTableList(params)
this
.
$apis
.
material
.
materialList
(
params
).
then
(
res
=>
{
this
.
$apis
.
material
.
materialList
(
params
).
then
(
res
=>
{
let
data
=
res
.
data
let
data
=
res
.
data
let
tableData
=
[]
let
tableData
=
[]
...
@@ -466,22 +498,36 @@ export default {
...
@@ -466,22 +498,36 @@ export default {
this
.
tableTotal
=
res
.
count
this
.
tableTotal
=
res
.
count
res
.
count
?
(
this
.
$refs
.
materialRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
materialRef
.
setTableHeightFun
()
res
.
count
?
(
this
.
$refs
.
materialRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
materialRef
.
setTableHeightFun
()
})
})
},
getListApi
()
{
var
params
=
this
.
getParams
()
// params.pageSize = this.$refs.materialRef.page.pageSize
// params.pageNum = this.$refs.materialRef.page.pageNum
params
.
pageSize
=
1000000
params
.
pageNum
=
1
params
.
groupId
=
''
this
.
getTableList
(
params
)
this
.
materialGroupName
=
'全部素材'
this
.
materialGroupName
=
'全部素材'
// })
// })
},
},
// 点击素材组获取素材组素材
// 点击素材组获取素材组素材
getList
(
params
,
item
)
{
getList
(
params
,
item
)
{
this
.
materialGroupName
=
item
.
materialGroupName
this
.
materialGroupName
=
item
.
materialGroupName
this
.
getTableList
(
params
)
// this.getTableList(params)
this
.
$apis
.
material
.
materialList
(
params
).
then
(
res
=>
{
let
data
=
res
.
data
let
tableData
=
[]
data
.
forEach
(
item
=>
{
if
(
item
.
materialType
!=
3
)
{
item
.
materialContentRpcResponse
.
materialUrl
=
''
}
if
(
item
.
materialType
==
3
)
{
let
html
=
decodeURIComponent
(
item
.
materialContentRpcResponse
.
materialUrl
)
let
imgHtml
=
html
.
match
(
/<img.*
?(?:
>|
\/
>
)
/g
)
if
(
imgHtml
)
{
let
imgSrc
=
imgHtml
[
0
].
match
(
'<img[^<>]*? src="([^<>]*?)"'
)
item
.
materialContentRpcResponse
.
materialUrl
=
imgSrc
[
1
]
}
else
{
item
.
materialContentRpcResponse
.
materialUrl
=
''
}
}
tableData
.
push
(
item
)
})
this
.
materialTableData
=
tableData
this
.
tableTotal
=
res
.
count
res
.
count
?
(
this
.
$refs
.
materialRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
materialRef
.
setTableHeightFun
()
})
},
},
// 功能介绍弹框
// 功能介绍弹框
showIntroductionDialog
()
{
showIntroductionDialog
()
{
...
...
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