Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b8917a94
authored
2023-07-31 15:45:44 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:上传
1 parent
e4ec2bfe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
src/views/components/imagePreview.vue
src/views/workflow/components/dialog/clxxDetailDialog.vue
src/views/components/imagePreview.vue
View file @
b8917a9
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-31 15:
12:08
* @LastEditTime: 2023-07-31 15:
43:30
-->
<
template
>
<div
class=
"rlPopup"
>
...
...
@@ -23,7 +23,7 @@
<div
class=
"thumb-wrap"
>
<div
class=
"thumb-wrap-button"
>
<el-button
type=
"primary"
@
click=
"clickImage"
v-if=
"previewImg.imgList.length>0"
>
(放大) 显示(缩小)
</el-button>
<el-upload
class=
"fileUpdate"
ref=
"upload"
action=
""
:show-file-list=
"false"
:multiple=
"true"
:auto-upload=
"false"
<el-upload
class=
"fileUpdate"
ref=
"upload"
:key=
"key"
action=
""
:show-file-list=
"false"
:multiple=
"true"
:auto-upload=
"false"
:on-change=
"handleChange"
accept=
".JPG, .PNG, .JPEG,.jpg, .png, .jpeg"
:before-upload=
"beforeUpload"
>
<el-button
icon=
"el-icon-upload"
type=
"primary"
v-if=
"ableOperation"
>
上传
</el-button>
...
...
@@ -70,6 +70,7 @@
},
data
()
{
return
{
key
:
0
,
isScan
:
false
,
// 打开高拍仪
scanTitle
:
'打开高拍仪'
,
...
...
@@ -249,20 +250,23 @@
let
length
=
fileList
.
length
;
this
.
maxFileLength
=
Math
.
max
(
length
,
this
.
maxFileLength
)
var
formData
=
new
FormData
();
let
num
=
0
setTimeout
(()
=>
{
if
(
this
.
maxFileLength
!==
length
)
{
return
}
let
num
=
0
fileList
.
forEach
(
item
=>
{
if
(
!
[
'image/jpeg'
,
'image/png'
,
'image/jpg'
,
'image/gif'
].
includes
(
item
.
raw
.
type
))
{
num
++
}
else
{
formData
.
append
(
'file'
,
item
.
raw
)
}
formData
.
append
(
'file'
,
item
.
raw
)
})
if
(
num
>=
1
)
{
this
.
$message
.
error
(
"请选择jpeg/png/jpg/bmp/gif格式的图片后重试"
)
return
// 移除不支持的文件类型
this
.
key
++
return
;
}
formData
.
append
(
"bsmSj"
,
this
.
previewImg
.
bsmSj
);
formData
.
append
(
"bsmSlsq"
,
this
.
previewImg
.
bsmSlsq
);
...
...
src/views/workflow/components/dialog/clxxDetailDialog.vue
View file @
b8917a9
...
...
@@ -161,7 +161,7 @@
watch
:
{
'formData.data'
:
{
handler
:
function
(
val
,
oldVal
)
{
this
.
tableData
=
val
this
.
tableData
=
_
.
cloneDeep
(
val
)
},
immediate
:
true
,
deep
:
true
...
...
Please
register
or
sign in
to post a comment