Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 523a85c2
authored
Oct 03, 2025
by
cen
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:多图片
1 parent
9b71faa4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletions
pages/evaluationForm/evaluationFormDetails.vue
pages/evaluationForm/evaluationFormDetails.vue
View file @
523a85c
...
@@ -109,9 +109,17 @@
...
@@ -109,9 +109,17 @@
{{ field.label }}
{{ field.label }}
</view>
</view>
<view
class=
"upload-images-wrapper"
v-if=
"getImageBySubtype(field.key)"
>
<view
class=
"upload-images-wrapper"
v-if=
"getImageBySubtype(field.key)"
>
<
template
v-if=
"field.key === 41 && Array.isArray(getImageBySubtype(field.key))"
>
<view
class=
"uploaded-media-container"
v-for=
"(img, index) in getImageBySubtype(field.key)"
:key=
"index"
>
<image
:src=
"img.fileUrl"
@
click
.
stop=
"previewMedia(img.fileUrl, 1)"
mode=
"aspectFill"
class=
"uploaded-media"
></image>
</view>
</
template
>
<!-- 对于其他类型的图片,保持原有显示方式 -->
<
template
v-else-if=
"!Array.isArray(getImageBySubtype(field.key))"
>
<view
class=
"uploaded-media-container"
>
<view
class=
"uploaded-media-container"
>
<image
:src=
"getImageBySubtype(field.key).fileUrl"
@
click
.
stop=
"previewMedia(getImageBySubtype(field.key).fileUrl, 1)"
mode=
"aspectFill"
class=
"uploaded-media"
></image>
<image
:src=
"getImageBySubtype(field.key).fileUrl"
@
click
.
stop=
"previewMedia(getImageBySubtype(field.key).fileUrl, 1)"
mode=
"aspectFill"
class=
"uploaded-media"
></image>
</view>
</view>
</
template
>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -655,7 +663,12 @@ export default {
...
@@ -655,7 +663,12 @@ export default {
},
},
// 根据fileSubtype获取图片
// 根据fileSubtype获取图片
getImageBySubtype
(
subtype
)
{
getImageBySubtype
(
subtype
)
{
if
(
!
this
.
detailsInfo
.
images
)
return
null
if
(
!
this
.
detailsInfo
.
images
)
return
[]
// 对于fileSubtype=41,返回所有匹配的图片数组
if
(
subtype
===
41
)
{
return
this
.
detailsInfo
.
images
.
filter
(
img
=>
img
.
fileSubtype
===
subtype
)
}
// 对于其他subtype,保持原有行为返回第一个匹配的图片
const
obj
=
this
.
detailsInfo
.
images
.
find
(
img
=>
img
.
fileSubtype
===
subtype
)
||
null
const
obj
=
this
.
detailsInfo
.
images
.
find
(
img
=>
img
.
fileSubtype
===
subtype
)
||
null
return
obj
return
obj
},
},
...
...
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