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 0cbd8e52
authored
Mar 24, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
素材弹窗
1 parent
c9263645
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
3 deletions
src/views/sop/editSop/components/materialModel.vue
src/views/sop/editSop/components/materialModel.vue
View file @
0cbd8e5
...
...
@@ -34,11 +34,16 @@
</el-tooltip>
-->
<!--
<el-popover
placement=
"top"
trigger=
"click"
>
<div>
<img
src=
"@/assets/material/car.png"
alt=
""
/>
<img
style=
"width: 72px; height: 72px;"
v-if=
"item.materialContentRpcResponse.materialUrl"
:src=
"item.materialContentRpcResponse.materialUrl"
alt=
""
/>
<img
class=
"img-material"
v-else
src=
"@/assets/material/car.png"
alt=
""
/>
</div>
<img
slot=
"reference"
class=
"img-material"
src=
"@/assets/material/car.png"
alt=
""
/>
<span
slot=
"reference"
>
<img
v-if=
"item.materialContentRpcResponse.materialUrl"
class=
"img-material"
:src=
"item.materialContentRpcResponse.materialUrl"
/>
<img
v-else
class=
"img-material"
src=
"@/assets/material/car.png"
alt=
""
/>
</span>
</el-popover>
-->
<img
class=
"img-material"
src=
"@/assets/material/car.png"
alt=
""
/>
<img
v-if=
"item.materialContentRpcResponse.materialUrl"
class=
"img-material"
:src=
"item.materialContentRpcResponse.materialUrl"
/>
<img
v-else
class=
"img-material"
src=
"@/assets/material/car.png"
alt=
""
/>
</span>
</div>
<!--
</div>
-->
...
...
@@ -180,6 +185,24 @@ export default {
this
.
$apis
.
sop
.
getMaterialListApi
(
params
).
then
(
res
=>
{
this
.
modelList
=
res
.
data
this
.
tableTotal
=
res
.
count
let
tableData
=
[]
this
.
modelList
.
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
)
})
console
.
log
(
this
.
modelList
)
})
},
handleReset
()
{
...
...
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