Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
frontend-h5
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songrui
frontend-h5
Commits
6adade03
Commit
6adade03
authored
Sep 20, 2024
by
gengchunlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
慢综 图片上传数量限制
parent
0a98fb01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
GeneralFUForm.vue
src/doctor/followUp/generalFU/form/GeneralFUForm.vue
+14
-4
No files found.
src/doctor/followUp/generalFU/form/GeneralFUForm.vue
View file @
6adade03
...
...
@@ -48,7 +48,7 @@
</div>
<div
class=
'img-btn mt-2'
@
click=
"toUpload('imgId')"
>
<input
type=
'file'
id=
'imgId'
multiple
@
change=
'choiceImg'
style=
'display: none'
:key=
'new Date().getTime()'
accept=
"image/*"
>
:key=
'new Date().getTime()'
accept=
"image/*
,.pdf
"
>
<div
class=
'flex items-center justify-center'
>
<div>
<doc-icon
type=
'doc-upload'
class=
'doc-up'
/>
...
...
@@ -88,6 +88,8 @@
</div>
</div>
</div>
<div
v-if=
'imgList.length > 6'
class=
'warn mt-2'
>
最多允许上传6张!
</div>
</div>
<div
v-if=
'showOne && firstForm.visitSituation == 1'
>
...
...
@@ -97,7 +99,7 @@
</div>
<div
class=
'img-btn mt-2'
@
click=
"toUpload('imgId2')"
>
<input
type=
'file'
id=
'imgId2'
multiple
@
change=
'choiceImg2'
style=
'display: none'
:key=
'new Date().getTime()-10000'
accept=
"image/*"
>
:key=
'new Date().getTime()-10000'
accept=
"image/*
,.pdf
"
>
<div
class=
'flex items-center justify-center'
>
<div>
<doc-icon
type=
'doc-upload'
class=
'doc-up'
/>
...
...
@@ -137,6 +139,7 @@
</div>
</div>
</div>
<div
v-if=
'imgList2.length > 8'
class=
'warn mt-2'
>
最多允许上传8张!
</div>
</div>
<!-- 图片预览-->
...
...
@@ -342,11 +345,11 @@ export default {
return
form
.
visitHealthGuideList
},
toUpload
(
id
)
{
if
(
id
===
'imgId'
&&
this
.
imgList
.
length
>
=
6
)
{
if
(
id
===
'imgId'
&&
this
.
imgList
.
length
>
6
)
{
showToast
(
'最多允许上传6张'
)
return
}
if
(
id
===
'imgId2'
&&
this
.
imgList2
.
length
>
=
8
)
{
if
(
id
===
'imgId2'
&&
this
.
imgList2
.
length
>
8
)
{
showToast
(
'最多允许上传8张'
)
return
}
...
...
@@ -422,6 +425,9 @@ export default {
onSubmit
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
if
(
this
.
imgList
.
length
>
6
||
this
.
imgList2
.
length
>
8
)
{
return
}
let
par
=
{
img1
:
this
.
imgList
||
[],
img2
:
this
.
imgList2
||
[],
...
...
@@ -567,6 +573,10 @@ export default {
border-bottom: 0px;
}
.warn {
color: #ee0a24;
text-align: left;
}
</
style
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment