Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GaoQuYingJiH5-ASD
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
xinzhedeai
GaoQuYingJiH5-ASD
Commits
082d498a
Commit
082d498a
authored
Jul 30, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better:图片选取+拍照功能处理
parent
4f229f15
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
220 additions
and
30 deletions
+220
-30
_peixun_yanlian_detail-anquan.html
src/_peixun_yanlian_detail-anquan.html
+3
-2
_peixun_yanlian_detail-anquan.js
src/_peixun_yanlian_detail-anquan.js
+60
-0
_peixun_yanlian_detail-yingji.html
src/_peixun_yanlian_detail-yingji.html
+3
-2
_peixun_yanlian_detail-yingji.js
src/_peixun_yanlian_detail-yingji.js
+60
-0
_tezhongzuoye_detail.html
src/_tezhongzuoye_detail.html
+7
-2
_tezhongzuoye_detail.js
src/_tezhongzuoye_detail.js
+87
-24
No files found.
src/_peixun_yanlian_detail-anquan.html
View file @
082d498a
...
...
@@ -74,11 +74,12 @@
class=
"van-icon van-icon-cross van-uploader__preview-delete-icon"
></i></div>
</div>
<div
v-if=
"formData.images.length<6 && flag=='ADD' "
>
<van-uploader
:before-read=
"beforeRead"
:after-read=
"(file) => afterRead(file, 'floorPlan')"
<
!-- <
van-uploader :before-read="beforeRead" :after-read="(file) => afterRead(file, 'floorPlan')"
class="uploader-wrapper" :deletable="false" :preview-image="false">
<img src="../image/code/upload.png" style="width:1.6rem;height: 1.6rem;" alt=""
srcset="">
</van-uploader>
</van-uploader> -->
<img
src=
"../image/code/upload.png"
style=
"width:1.6rem;height: 1.6rem;"
alt=
""
srcset=
""
@
click=
"paizhao()"
>
</div>
</div>
...
...
src/_peixun_yanlian_detail-anquan.js
View file @
082d498a
...
...
@@ -135,6 +135,66 @@ window.addEventListener("load", function() {
// console.error('There has been a problem with your fetch operation:', error);
});
},
paizhao
()
{
var
data
=
[
"
相册
"
,
"
相机
"
];
var
maxSelectNum
=
6
;
lightAppJssdk
.
notification
.
showMediaAlert
({
arg0
:
data
,
success
:
function
(
data
)
{
console
.
log
(
'
选择菜单的数据
'
,
data
)
// formData.append('file', file.file); // 通过FormData构建要上传的文件数据
// alert(data);
var
pam1
=
{
"
url
"
:
BASE_URL
+
'
/common/uploads
'
,
// url:'sdfsdfsd',
"
fileKey
"
:
"
files
"
,
// "fileKey": "files",
"
params
"
:
{
},
"
header
"
:
{
'
Authorization
'
:
gemhoUtil
.
getCookie
(
'
token
'
),
},
"
chooseType
"
:
"
chooseFileUpload
"
,
"
transmissionType
"
:
0
,
//1-base64 0-图片地址"maxSize": 10, "maxSelectNum": 9,
"
maxSize
"
:
10
,
"
maxSelectNum
"
:
maxSelectNum
,
}
if
(
data
.
index
==
0
)
{
pam1
.
chooseType
=
"
chooseImageUpload
"
// pam1.fileKey = "file"
}
else
if
(
data
.
index
==
1
)
{
pam1
.
chooseType
=
"
takingPicturesUpload
"
// pam1.fileKey = "picfile"
}
console
.
log
(
'
请求接口i偶路径
'
,
pam1
)
chooseFileUploadTest
(
pam1
)
// setTimeout('onHidePreloaders()', 2000);
},
fail
:
function
(
data
)
{
console
.
log
(
data
);
}
});
function
chooseFileUploadTest
(
pam
)
{
lightAppJssdk
.
uploadFile
.
chooseFileUpload
({
arg0
:
pam
,
success
:
function
(
value
)
{
console
.
log
(
'
chooseFileUpload方法
'
,
value
)
if
(
value
){
VUE
.
formData
.
images
.
push
(...
JSON
.
parse
(
value
).
fileNames
)
if
(
VUE
.
formData
.
images
.
length
>
maxSelectNum
){
const
result
=
VUE
.
formData
.
images
.
slice
(
0
,
maxSelectNum
)
VUE
.
formData
.
images
=
result
}
}
},
fail
:
function
(
data1
)
{
console
.
log
(
data1
);
}
});
};
},
showDatePickerModal
()
{
if
(
this
.
flag
==
'
XQ
'
)
{
return
...
...
src/_peixun_yanlian_detail-yingji.html
View file @
082d498a
...
...
@@ -65,11 +65,12 @@
class=
"van-icon van-icon-cross van-uploader__preview-delete-icon"
></i></div>
</div>
<div
v-if=
"formData.images.length<6 && flag=='ADD' "
>
<van-uploader
:before-read=
"beforeRead"
:after-read=
"(file) => afterRead(file, 'floorPlan')"
<
!-- <
van-uploader :before-read="beforeRead" :after-read="(file) => afterRead(file, 'floorPlan')"
class="uploader-wrapper" :deletable="false" :preview-image="false">
<img src="../image/code/upload.png" style="width:1.6rem;height: 1.6rem;" alt=""
srcset="">
</van-uploader>
</van-uploader> -->
<img
src=
"../image/code/upload.png"
style=
"width:1.6rem;height: 1.6rem;"
alt=
""
srcset=
""
@
click=
"paizhao()"
>
</div>
</div>
...
...
src/_peixun_yanlian_detail-yingji.js
View file @
082d498a
...
...
@@ -102,6 +102,66 @@ window.addEventListener("load", function() {
// console.error('There has been a problem with your fetch operation:', error);
});
},
paizhao
()
{
var
data
=
[
"
相册
"
,
"
相机
"
];
var
maxSelectNum
=
6
;
lightAppJssdk
.
notification
.
showMediaAlert
({
arg0
:
data
,
success
:
function
(
data
)
{
console
.
log
(
'
选择菜单的数据
'
,
data
)
// formData.append('file', file.file); // 通过FormData构建要上传的文件数据
// alert(data);
var
pam1
=
{
"
url
"
:
BASE_URL
+
'
/common/uploads
'
,
// url:'sdfsdfsd',
"
fileKey
"
:
"
files
"
,
// "fileKey": "files",
"
params
"
:
{
},
"
header
"
:
{
'
Authorization
'
:
gemhoUtil
.
getCookie
(
'
token
'
),
},
"
chooseType
"
:
"
chooseFileUpload
"
,
"
transmissionType
"
:
0
,
//1-base64 0-图片地址"maxSize": 10, "maxSelectNum": 9,
"
maxSize
"
:
10
,
"
maxSelectNum
"
:
maxSelectNum
,
}
if
(
data
.
index
==
0
)
{
pam1
.
chooseType
=
"
chooseImageUpload
"
// pam1.fileKey = "file"
}
else
if
(
data
.
index
==
1
)
{
pam1
.
chooseType
=
"
takingPicturesUpload
"
// pam1.fileKey = "picfile"
}
console
.
log
(
'
请求接口i偶路径
'
,
pam1
)
chooseFileUploadTest
(
pam1
)
// setTimeout('onHidePreloaders()', 2000);
},
fail
:
function
(
data
)
{
console
.
log
(
data
);
}
});
function
chooseFileUploadTest
(
pam
)
{
lightAppJssdk
.
uploadFile
.
chooseFileUpload
({
arg0
:
pam
,
success
:
function
(
value
)
{
console
.
log
(
'
chooseFileUpload方法
'
,
value
)
if
(
value
){
VUE
.
formData
.
images
.
push
(...
JSON
.
parse
(
value
).
fileNames
)
if
(
VUE
.
formData
.
images
.
length
>
maxSelectNum
){
const
result
=
VUE
.
formData
.
images
.
slice
(
0
,
maxSelectNum
)
VUE
.
formData
.
images
=
result
}
}
},
fail
:
function
(
data1
)
{
console
.
log
(
data1
);
}
});
};
},
showDatePickerModal
()
{
if
(
this
.
flag
==
'
XQ
'
)
{
return
...
...
src/_tezhongzuoye_detail.html
View file @
082d498a
...
...
@@ -77,13 +77,18 @@
class=
"van-icon van-icon-cross van-uploader__preview-delete-icon"
></i></div>
</div>
<div
v-if=
"formData.attachmentFile.length<6 && flag=='ADD' "
>
<van-uploader
:before-read=
"beforeRead"
:after-read=
"(file) => afterRead(file, 'floorPlan')"
<
!-- <
van-uploader :before-read="beforeRead" :after-read="(file) => afterRead(file, 'floorPlan')"
class="uploader-wrapper" :deletable="false" :preview-image="false">
<img src="../image/code/upload.png" style="width:1.6rem;height: 1.6rem;" alt="" srcset="">
</van-uploader>
</van-uploader> -->
<img
src=
"../image/code/upload.png"
style=
"width:1.6rem;height: 1.6rem;"
alt=
""
srcset=
""
@
click=
"paizhao()"
>
</div>
</div>
<div>
</div>
<!-- 原作业时间部分替换为 -->
<div
class=
"form-item date-wrapper"
>
<span
class=
"form-label title_require"
style=
"width: 2rem;"
>
作业时间(起始)
</span>
...
...
src/_tezhongzuoye_detail.js
View file @
082d498a
...
...
@@ -26,12 +26,12 @@ window.addEventListener("load", function() {
// 新增以下数据
formData
:
{
merchantName
:
''
,
merchantPhone
:
''
,
merchantPhone
:
''
,
merName
:
''
,
attachmentFile
:
[],
workType
:
''
,
companyName
:
''
,
workerName
:
''
,
companyName
:
''
,
workerName
:
''
,
startTime
:
''
,
// 开始时间字段
endTime
:
''
// 结束时间字段
},
...
...
@@ -53,6 +53,7 @@ window.addEventListener("load", function() {
this
.
getDict4tab1
()
},
methods
:
{
getShopInfo
()
{
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
...
...
@@ -60,8 +61,7 @@ window.addEventListener("load", function() {
loadingType
:
'
spinner
'
,
})
setTimeout
(()
=>
{
http2
.
post
(
{
http2
.
post
({
serviceId
:
API_KEY_MAP
[
'
no-page
'
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
no-page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
no-page
'
][
'
privateKey
'
],
...
...
@@ -74,7 +74,7 @@ window.addEventListener("load", function() {
if
(
res
)
{
var
result
=
JSON
.
parse
(
res
)
console
.
log
(
'
商户信息
'
,
result
)
if
(
result
.
data
)
{
if
(
result
.
data
)
{
this
.
formData
.
merName
=
result
.
data
.
merName
this
.
formData
.
merchantPhone
=
result
.
data
.
merchantPhone
this
.
formData
.
merchantName
=
result
.
data
.
merchantName
...
...
@@ -84,7 +84,7 @@ window.addEventListener("load", function() {
)
},
0
)
},
showTipPage
(){
showTipPage
()
{
this
.
showTipPopup
=
true
this
.
detail
()
...
...
@@ -124,7 +124,9 @@ window.addEventListener("load", function() {
this
.
detailInfo
=
JSON
.
parse
(
res
).
data
// 初始化编辑器
quill
=
new
Quill
(
'
#editor-container
'
,
{
theme
:
'
snow
'
,
readOnly
:
true
,
modules
:
{
theme
:
'
snow
'
,
readOnly
:
true
,
modules
:
{
toolbar
:
false
// 关键配置:禁用工具栏
},
});
...
...
@@ -161,7 +163,7 @@ window.addEventListener("load", function() {
},
0
);
var
result
=
JSON
.
parse
(
res
)
this
.
tabList4lv2
=
result
.
rows
if
(
this
.
flag
==
'
ADD
'
)
{
if
(
this
.
flag
==
'
ADD
'
)
{
this
.
formData
.
workType
=
this
.
tabList4lv2
[
0
].
dictValue
}
}
...
...
@@ -229,6 +231,66 @@ window.addEventListener("load", function() {
// console.error('There has been a problem with your fetch operation:', error);
});
},
paizhao
()
{
var
data
=
[
"
相册
"
,
"
相机
"
];
var
maxSelectNum
=
6
;
lightAppJssdk
.
notification
.
showMediaAlert
({
arg0
:
data
,
success
:
function
(
data
)
{
console
.
log
(
'
选择菜单的数据
'
,
data
)
// formData.append('file', file.file); // 通过FormData构建要上传的文件数据
// alert(data);
var
pam1
=
{
"
url
"
:
BASE_URL
+
'
/common/uploads
'
,
// url:'sdfsdfsd',
"
fileKey
"
:
"
files
"
,
// "fileKey": "files",
"
params
"
:
{
},
"
header
"
:
{
'
Authorization
'
:
gemhoUtil
.
getCookie
(
'
token
'
),
},
"
chooseType
"
:
"
chooseFileUpload
"
,
"
transmissionType
"
:
0
,
//1-base64 0-图片地址"maxSize": 10, "maxSelectNum": 9,
"
maxSize
"
:
10
,
"
maxSelectNum
"
:
maxSelectNum
,
}
if
(
data
.
index
==
0
)
{
pam1
.
chooseType
=
"
chooseImageUpload
"
// pam1.fileKey = "file"
}
else
if
(
data
.
index
==
1
)
{
pam1
.
chooseType
=
"
takingPicturesUpload
"
// pam1.fileKey = "picfile"
}
console
.
log
(
'
请求接口i偶路径
'
,
pam1
)
chooseFileUploadTest
(
pam1
)
// setTimeout('onHidePreloaders()', 2000);
},
fail
:
function
(
data
)
{
console
.
log
(
data
);
}
});
function
chooseFileUploadTest
(
pam
)
{
lightAppJssdk
.
uploadFile
.
chooseFileUpload
({
arg0
:
pam
,
success
:
function
(
value
)
{
console
.
log
(
'
chooseFileUpload方法
'
,
value
)
if
(
value
){
VUE
.
formData
.
attachmentFile
.
push
(...
JSON
.
parse
(
value
).
fileNames
)
if
(
VUE
.
formData
.
attachmentFile
.
length
>
maxSelectNum
){
const
result
=
VUE
.
formData
.
attachmentFile
.
slice
(
0
,
maxSelectNum
)
VUE
.
formData
.
attachmentFile
=
result
}
}
},
fail
:
function
(
data1
)
{
console
.
log
(
data1
);
}
});
};
},
showDatePickerModal
()
{
if
(
this
.
flag
==
'
XQ
'
)
{
return
...
...
@@ -333,15 +395,15 @@ window.addEventListener("load", function() {
http3
.
post
(
'
/gq/special
'
,
reqParam
).
then
((
res
)
=>
{
console
.
log
(
'
添加结果
'
,
res
)
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
vant
.
Toast
({
message
:
'
操作成功
'
,
})
setTimeout
(
function
(){
setTimeout
(
function
()
{
history
.
back
()
},
300
)
}
else
{
}
else
{
vant
.
Toast
({
message
:
'
操作失败
'
,
})
...
...
@@ -381,7 +443,8 @@ window.addEventListener("load", function() {
// 图片数据结构处理
let
tempData
=
result
.
data
if
(
tempData
[
'
attachmentFile
'
])
{
tempData
[
'
attachmentFile
'
]
=
tempData
[
'
attachmentFile
'
]
?
tempData
[
tempData
[
'
attachmentFile
'
]
=
tempData
[
'
attachmentFile
'
]
?
tempData
[
'
attachmentFile
'
].
split
(
'
,
'
)
:
[]
}
...
...
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