Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-charge
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 271c13b0
authored
Mar 05, 2024
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
e594304e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
18 deletions
src/components/preview/index.vue
src/views/parkingPlace/index.vue
src/components/preview/index.vue
View file @
271c13b
...
@@ -81,25 +81,31 @@ export default {
...
@@ -81,25 +81,31 @@ export default {
this
.
$message
.
error
(
'最多上传9张图片'
)
this
.
$message
.
error
(
'最多上传9张图片'
)
return
return
}
}
this
.
$emit
(
'beforeUpload'
)
reader
.
readAsDataURL
(
file
)
reader
.
readAsDataURL
(
file
)
reader
.
onload
=
e
=>
{
reader
.
onload
=
e
=>
{
const
imgFile
=
e
.
target
.
result
const
imgFile
=
e
.
target
.
result
const
arrBase64
=
imgFile
.
split
(
','
)
const
arrBase64
=
imgFile
.
split
(
','
)
const
splitStr
=
file
.
name
.
split
(
'.'
)
const
splitStr
=
file
.
name
.
split
(
'.'
)
const
fileUrl
=
splitStr
[
splitStr
.
length
-
1
]
+
'@'
+
arrBase64
[
1
]
const
fileUrl
=
splitStr
[
splitStr
.
length
-
1
]
+
'@'
+
arrBase64
[
1
]
this
.
$apis
.
common
.
pictureUpload
({
file
:
fileUrl
,
compress
:
this
.
picOptions
.
compress
||
0
}).
then
(
res
=>
{
this
.
$apis
.
common
if
(
res
)
{
.
pictureUpload
({
file
:
fileUrl
,
compress
:
this
.
picOptions
.
compress
||
0
})
this
.
$notify
({
.
then
(
res
=>
{
title
:
'提示'
,
if
(
res
)
{
message
:
'图片上传成功'
,
this
.
$notify
({
type
:
'success'
title
:
'提示'
,
})
message
:
'图片上传成功'
,
this
.
imageUrlArr
.
push
(
res
)
type
:
'success'
this
.
$emit
(
'change'
,
{
arr
:
this
.
imageUrlArr
,
key
:
this
.
picOptions
.
key
,
index
:
this
.
index
})
})
}
this
.
imageUrlArr
.
push
(
res
)
e
.
target
.
value
=
''
this
.
$emit
(
'change'
,
{
arr
:
this
.
imageUrlArr
,
key
:
this
.
picOptions
.
key
,
index
:
this
.
index
})
this
.
$refs
.
uploadImg
.
value
=
''
}
})
e
.
target
.
value
=
''
this
.
$refs
.
uploadImg
.
value
=
''
})
.
finally
(
end
=>
{
this
.
$emit
(
'afterUpload'
,
end
)
})
}
}
},
},
// 预览图文
// 预览图文
...
...
src/views/parkingPlace/index.vue
View file @
271c13b
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<div
class=
"upload-wrap"
>
<div
class=
"upload-wrap"
>
<div
class=
"upload-item"
v-for=
"(item, index) in uploadList"
:key=
"index"
>
<div
class=
"upload-item"
v-for=
"(item, index) in uploadList"
:key=
"index"
>
<span
class=
"label"
>
{{
item
.
label
}}
</span>
<span
class=
"label"
>
{{
item
.
label
}}
</span>
<glsx-preview
:imageUrlArr=
"item.url"
@
change=
"changeChannelImg
"
></glsx-preview>
<glsx-preview
:imageUrlArr=
"item.url"
@
beforeUpload=
"beforeUpload"
@
afterUpload=
"afterUpload
"
></glsx-preview>
</div>
</div>
</div>
</div>
</GLDialog>
</GLDialog>
...
@@ -139,6 +139,7 @@ export default {
...
@@ -139,6 +139,7 @@ export default {
isBatch
:
false
,
isBatch
:
false
,
batchForm
:
{
batchForm
:
{
isUpload
:
false
,
isUpload
:
false
,
isUploding
:
false
,
successCount
:
0
,
successCount
:
0
,
failCount
:
0
,
failCount
:
0
,
exportUrl
:
''
,
exportUrl
:
''
,
...
@@ -177,7 +178,7 @@ export default {
...
@@ -177,7 +178,7 @@ export default {
{
{
type
:
'el-button'
,
type
:
'el-button'
,
name
:
row
=>
{
name
:
row
=>
{
return
'
图
片上传'
return
'
照
片上传'
},
},
attrs
:
{
attrs
:
{
type
:
'text'
type
:
'text'
...
@@ -528,6 +529,7 @@ export default {
...
@@ -528,6 +529,7 @@ export default {
}
}
this
.
batchForm
=
{
this
.
batchForm
=
{
isUpload
:
false
,
isUpload
:
false
,
isUploding
:
false
,
successCount
:
0
,
successCount
:
0
,
failCount
:
0
,
failCount
:
0
,
exportUrl
:
''
,
exportUrl
:
''
,
...
@@ -558,6 +560,13 @@ export default {
...
@@ -558,6 +560,13 @@ export default {
this
.
uploadVisible
=
true
this
.
uploadVisible
=
true
},
},
uploadOk
()
{
uploadOk
()
{
if
(
this
.
basicForm
.
isUploding
)
{
return
this
.
$message
({
message
:
'文件正在上传中,请稍后再提交'
,
type
:
'error'
,
customClass
:
'message-class'
})
}
let
picList
=
[]
let
picList
=
[]
this
.
uploadList
.
forEach
(
item
=>
{
this
.
uploadList
.
forEach
(
item
=>
{
if
(
item
.
url
[
0
])
{
if
(
item
.
url
[
0
])
{
...
@@ -607,8 +616,11 @@ export default {
...
@@ -607,8 +616,11 @@ export default {
}
}
})
})
},
},
changeChannelImg
(
e
)
{
beforeUpload
(
e
)
{
console
.
log
(
e
,
'conpl'
)
this
.
basicForm
.
isUploding
=
true
},
afterUpload
()
{
this
.
basicForm
.
isUploding
=
false
},
},
delParkingSpace
(
row
)
{
delParkingSpace
(
row
)
{
this
.
$confirm
(
'请再次确认是否要执行删除操作'
,
'提示'
,
{
this
.
$confirm
(
'请再次确认是否要执行删除操作'
,
'提示'
,
{
...
@@ -628,7 +640,6 @@ export default {
...
@@ -628,7 +640,6 @@ export default {
})
})
},
},
getRadarList
(
radarId
)
{
getRadarList
(
radarId
)
{
console
.
log
(
1111
)
let
params
=
{
pageNum
:
'1'
,
pageSize
:
'1000'
,
bindingStatus
:
0
}
let
params
=
{
pageNum
:
'1'
,
pageSize
:
'1000'
,
bindingStatus
:
0
}
if
(
radarId
)
params
.
radarId
=
radarId
if
(
radarId
)
params
.
radarId
=
radarId
this
.
$apis
.
parkingSpace
.
getRadarListApi
(
params
).
then
(
res
=>
{
this
.
$apis
.
parkingSpace
.
getRadarListApi
(
params
).
then
(
res
=>
{
...
...
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