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 5163a1e3
authored
Mar 06, 2024
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'yc_v1.0.0' of
http://192.168.3.233:8090/saas/scrm-micro-charge
into yc_v1.0.0
2 parents
fab05077
97102229
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
21 deletions
src/components/preview/index.vue
src/views/parkingPlace/index.vue
src/components/preview/index.vue
View file @
5163a1e
...
...
@@ -24,7 +24,7 @@
<input
type=
"file"
ref=
"uploadImg"
class=
"upload-img"
style=
"opacity: 0"
accept=
".jpg, .jpeg, .png"
@
change=
"e => handleImgChange(e)"
/>
</div>
</
template
>
<el-dialog
class=
"image-dialog"
:visible
.
sync=
"dialogVisibleImg"
width=
"50%"
>
<el-dialog
class=
"image-dialog"
:visible
.
sync=
"dialogVisibleImg"
:append-to-body=
"true"
width=
"50%"
>
<img
:src=
"dialogSrc"
width=
"100%"
v-if=
"dialogType == 'img'"
/>
<!-- <video width="100%" autoplay controls :src="dialogSrc" v-else></video> -->
</el-dialog>
...
...
@@ -81,25 +81,31 @@ export default {
this
.
$message
.
error
(
'最多上传9张图片'
)
return
}
this
.
$emit
(
'beforeUpload'
)
reader
.
readAsDataURL
(
file
)
reader
.
onload
=
e
=>
{
const
imgFile
=
e
.
target
.
result
const
arrBase64
=
imgFile
.
split
(
','
)
const
splitStr
=
file
.
name
.
split
(
'.'
)
const
fileUrl
=
splitStr
[
splitStr
.
length
-
1
]
+
'@'
+
arrBase64
[
1
]
this
.
$apis
.
common
.
pictureUpload
({
file
:
fileUrl
,
compress
:
this
.
picOptions
.
compress
||
0
}).
then
(
res
=>
{
if
(
res
)
{
this
.
$notify
({
title
:
'提示'
,
message
:
'图片上传成功'
,
type
:
'success'
})
this
.
imageUrlArr
.
push
(
res
)
this
.
$emit
(
'change'
,
{
arr
:
this
.
imageUrlArr
,
key
:
this
.
picOptions
.
key
,
index
:
this
.
index
})
}
e
.
target
.
value
=
''
this
.
$refs
.
uploadImg
.
value
=
''
})
this
.
$apis
.
common
.
pictureUpload
({
file
:
fileUrl
,
compress
:
this
.
picOptions
.
compress
||
0
})
.
then
(
res
=>
{
if
(
res
)
{
this
.
$notify
({
title
:
'提示'
,
message
:
'图片上传成功'
,
type
:
'success'
})
this
.
imageUrlArr
.
push
(
res
)
this
.
$emit
(
'change'
,
{
arr
:
this
.
imageUrlArr
,
key
:
this
.
picOptions
.
key
,
index
:
this
.
index
})
}
e
.
target
.
value
=
''
this
.
$refs
.
uploadImg
.
value
=
''
})
.
finally
(
end
=>
{
this
.
$emit
(
'afterUpload'
,
end
)
})
}
},
// 预览图文
...
...
src/views/parkingPlace/index.vue
View file @
5163a1e
...
...
@@ -45,7 +45,7 @@
<div
class=
"upload-wrap"
>
<div
class=
"upload-item"
v-for=
"(item, index) in uploadList"
:key=
"index"
>
<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>
</GLDialog>
...
...
@@ -139,6 +139,7 @@ export default {
isBatch
:
false
,
batchForm
:
{
isUpload
:
false
,
isUploding
:
false
,
successCount
:
0
,
failCount
:
0
,
exportUrl
:
''
,
...
...
@@ -177,7 +178,7 @@ export default {
{
type
:
'el-button'
,
name
:
row
=>
{
return
'
图
片上传'
return
'
照
片上传'
},
attrs
:
{
type
:
'text'
...
...
@@ -528,6 +529,7 @@ export default {
}
this
.
batchForm
=
{
isUpload
:
false
,
isUploding
:
false
,
successCount
:
0
,
failCount
:
0
,
exportUrl
:
''
,
...
...
@@ -558,6 +560,13 @@ export default {
this
.
uploadVisible
=
true
},
uploadOk
()
{
if
(
this
.
basicForm
.
isUploding
)
{
return
this
.
$message
({
message
:
'文件正在上传中,请稍后再提交'
,
type
:
'error'
,
customClass
:
'message-class'
})
}
let
picList
=
[]
this
.
uploadList
.
forEach
(
item
=>
{
if
(
item
.
url
[
0
])
{
...
...
@@ -607,8 +616,11 @@ export default {
}
})
},
changeChannelImg
(
e
)
{
console
.
log
(
e
,
'conpl'
)
beforeUpload
(
e
)
{
this
.
basicForm
.
isUploding
=
true
},
afterUpload
()
{
this
.
basicForm
.
isUploding
=
false
},
delParkingSpace
(
row
)
{
this
.
$confirm
(
'请再次确认是否要执行删除操作'
,
'提示'
,
{
...
...
@@ -628,7 +640,6 @@ export default {
})
},
getRadarList
(
radarId
)
{
console
.
log
(
1111
)
let
params
=
{
pageNum
:
'1'
,
pageSize
:
'1000'
,
bindingStatus
:
0
}
if
(
radarId
)
params
.
radarId
=
radarId
this
.
$apis
.
parkingSpace
.
getRadarListApi
(
params
).
then
(
res
=>
{
...
...
@@ -640,7 +651,7 @@ export default {
},
async
addParkingPlaceFn
()
{
await
this
.
getRadarList
()
this
.
parkingPlaceVisible
=
true
this
.
openParkingDialog
()
},
async
updateParkingPlaceFn
(
row
)
{
await
this
.
getRadarList
(
row
.
radarId
)
...
...
@@ -648,6 +659,10 @@ export default {
this
.
basicForm
[
key
]
=
row
[
key
]
}
this
.
basicForm
.
merchantId
=
this
.
basicForm
.
merchantId
?
this
.
basicForm
.
merchantId
+
''
:
''
this
.
openParkingDialog
()
},
openParkingDialog
()
{
this
.
$refs
.
parkingPlaceRef
?.
$refs
?.
formRef
?.
clearValidate
()
this
.
parkingPlaceVisible
=
true
},
handleOk
()
{
...
...
@@ -680,7 +695,6 @@ export default {
parkingRemark
:
''
}
this
.
parkingPlaceVisible
=
false
this
.
$refs
.
parkingPlaceRef
?.
$refs
?.
formRef
?.
clearValidate
()
},
setTableFinishFun
()
{
this
.
$refs
.
infoTableRef
.
data
.
length
?
(
this
.
$refs
.
infoTableRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
infoTableRef
.
setTableHeightFun
()
...
...
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