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
fa817ad2
Commit
fa817ad2
authored
Jul 23, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:作业详情接口对接
parent
58975c71
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
43 deletions
+50
-43
_tezhongzuoye.html
src/_tezhongzuoye.html
+9
-9
_tezhongzuoye.js
src/_tezhongzuoye.js
+3
-2
_tezhongzuoye_detail-text.js
src/_tezhongzuoye_detail-text.js
+3
-3
_tezhongzuoye_detail.html
src/_tezhongzuoye_detail.html
+14
-14
_tezhongzuoye_detail.js
src/_tezhongzuoye_detail.js
+21
-15
No files found.
src/_tezhongzuoye.html
View file @
fa817ad2
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<div
class=
"wrapper"
v-cloak
>
<div
class=
"wrapper"
v-cloak
>
<!-- 商户头部信息 -->
<!-- 商户头部信息 -->
<div
class=
"header"
v-if=
"userType=='shop'"
>
<div
class=
"header"
v-if=
"userType=='shop'"
>
<van-search
v-model=
"
titl
e"
show-action
placeholder=
"请输入特种作业类型"
@
search=
"onSearch"
>
<van-search
v-model=
"
workTypeNam
e"
show-action
placeholder=
"请输入特种作业类型"
@
search=
"onSearch"
>
<template
#action
>
<template
#action
>
<div
@
click=
"onSearch"
></div>
<div
@
click=
"onSearch"
></div>
</template>
</template>
...
@@ -34,24 +34,24 @@
...
@@ -34,24 +34,24 @@
<van-cell
v-for=
"item in hazardList"
:key=
"item.id"
@
click=
"viewDetail(item)"
>
<van-cell
v-for=
"item in hazardList"
:key=
"item.id"
@
click=
"viewDetail(item)"
>
<div
style=
"width: 100%;position: relative;"
>
<div
style=
"width: 100%;position: relative;"
>
<div
class=
"reminder-badge"
v-if=
"item.msgFlag"
>
新
</div>
<div
class=
"reminder-badge"
v-if=
"item.msgFlag"
>
新
</div>
<div
class=
"tab1-row1"
v-if=
"userType
=='wgy'||userType=='safety
'"
>
<div
class=
"tab1-row1"
v-if=
"userType
!=='shop
'"
>
<span>
商家名称:{{ item.
exerciseDat
e }}
</span>
<span>
商家名称:{{ item.
merNam
e }}
</span>
</div>
</div>
<div
class=
"tab1-row1"
v-if=
"userType=='shop'"
>
<div
class=
"tab1-row1"
v-if=
"userType=='shop'"
>
<span>
特种作业类型:{{ item.
exerciseDat
e }}
</span>
<span>
特种作业类型:{{ item.
workTypeNam
e }}
</span>
</div>
</div>
<div
class=
"tab1-row1"
>
<div
class=
"tab1-row1"
>
<span>
作业时间
起始:{{ item.exerciseDat
e }}
</span>
<span>
作业时间
开始:{{ item.startTim
e }}
</span>
</div>
</div>
<div
class=
"tab1-row1"
>
<div
class=
"tab1-row1"
>
<span>
作业时间结束:{{ item.exerciseDat
e }}
</span>
<span>
作业时间结束:{{ item.endTim
e }}
</span>
</div>
</div>
<div
class=
"tab1-row1"
>
<div
class=
"tab1-row1"
>
<span>
作业公司:{{ item.
exerciseDat
e }}
</span>
<span>
作业公司:{{ item.
companyNam
e }}
</span>
</div>
</div>
<div
class=
"tab1-row1"
>
<div
class=
"tab1-row1"
>
<span>
作业人员姓名:{{ item.
exerciseDat
e }}
</span>
<span>
作业人员姓名:{{ item.
workerNam
e }}
</span>
</div>
</div>
</div>
</div>
</van-cell>
</van-cell>
...
...
src/_tezhongzuoye.js
View file @
fa817ad2
...
@@ -15,6 +15,7 @@ window.addEventListener("load", function() {
...
@@ -15,6 +15,7 @@ window.addEventListener("load", function() {
hazardList
:
[
// 更多示例数据...
hazardList
:
[
// 更多示例数据...
],
],
workTypeName
:
''
,
merId
:
''
,
merId
:
''
,
merName
:
''
,
merName
:
''
,
loading
:
false
,
loading
:
false
,
...
@@ -65,8 +66,8 @@ window.addEventListener("load", function() {
...
@@ -65,8 +66,8 @@ window.addEventListener("load", function() {
interfacePublicKey
:
API_KEY_MAP
[
'
page
'
][
'
publicKey
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
page
'
][
'
privateKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
page
'
][
'
privateKey
'
],
reqParams
:
{
reqParams
:
{
sign
:
3
0
,
sign
:
3
2
,
title
:
this
.
titl
e
,
workTypeName
:
this
.
workTypeNam
e
,
merName
:
this
.
merName
,
merName
:
this
.
merName
,
pageNum
:
this
.
page
++
,
// 每次请求增加下一页
pageNum
:
this
.
page
++
,
// 每次请求增加下一页
pageSize
:
this
.
size
,
pageSize
:
this
.
size
,
...
...
src/_tezhongzuoye_detail-text.js
View file @
fa817ad2
...
@@ -30,8 +30,8 @@ window.addEventListener("load", function () {
...
@@ -30,8 +30,8 @@ window.addEventListener("load", function () {
interfacePublicKey
:
API_KEY_MAP
[
"
no-page
"
][
"
publicKey
"
],
interfacePublicKey
:
API_KEY_MAP
[
"
no-page
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
no-page
"
][
"
privateKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
no-page
"
][
"
privateKey
"
],
reqParams
:
{
reqParams
:
{
sign
:
17
,
// 隐患详情
sign
:
34
,
// 隐患详情
t
ype
:
gemhoUtil
.
getParameter
(
'
type
'
),
workT
ype
:
gemhoUtil
.
getParameter
(
'
type
'
),
}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
if
(
res
)
{
if
(
res
)
{
...
@@ -48,7 +48,7 @@ window.addEventListener("load", function () {
...
@@ -48,7 +48,7 @@ window.addEventListener("load", function () {
toolbar
:
false
// 关键配置:禁用工具栏
toolbar
:
false
// 关键配置:禁用工具栏
},
},
});
});
quill
.
root
.
innerHTML
=
this
.
detailInfo
.
content
||
''
quill
.
root
.
innerHTML
=
this
.
detailInfo
||
''
}
}
})
})
...
...
src/_tezhongzuoye_detail.html
View file @
fa817ad2
...
@@ -20,29 +20,29 @@
...
@@ -20,29 +20,29 @@
<div
class=
"form-item"
>
<div
class=
"form-item"
>
<span
class=
"form-label title_require"
>
单位名称
</span>
<span
class=
"form-label title_require"
>
单位名称
</span>
<div
class=
"form-input-wrap"
style=
"font-size: 15px;color: #
666
;"
>
<div
class=
"form-input-wrap"
style=
"font-size: 15px;color: #
9b9fab
;"
>
{{ formData.
xxx || '养大酸奶有限公司'
}}
{{ formData.
merchantName
}}
</div>
</div>
</div>
</div>
<div
class=
"form-item"
>
<div
class=
"form-item"
>
<span
class=
"form-label title_require"
>
联系人
</span>
<span
class=
"form-label title_require"
>
联系人
</span>
<div
class=
"form-input-wrap"
style=
"font-size: 15px;color: #
666
;"
>
<div
class=
"form-input-wrap"
style=
"font-size: 15px;color: #
9b9fab
;"
>
{{ formData.
xxx || '养大酸奶有限公司'
}}
{{ formData.
merchantName
}}
</div>
</div>
</div>
</div>
<div
class=
"form-item"
>
<div
class=
"form-item"
>
<span
class=
"form-label title_require"
>
电话
</span>
<span
class=
"form-label title_require"
>
电话
</span>
<div
class=
"form-input-wrap"
style=
"font-size: 15px;color: #
666
;"
>
<div
class=
"form-input-wrap"
style=
"font-size: 15px;color: #
9b9fab
;"
>
{{ formData.
xxx || '养大酸奶有限公司'
}}
{{ formData.
merchantPhone
}}
</div>
</div>
</div>
</div>
<div
class=
"form-item"
>
<div
class=
"form-item"
>
<span
class=
"form-label title_require"
>
特种作业类别
</span>
<span
class=
"form-label title_require"
>
特种作业类别
</span>
<div
class=
"form-input-wrap"
>
<div
class=
"form-input-wrap"
>
<select
class=
"selector"
v-model=
"formData.
safetyTraining
Type"
:disabled=
"flag=='XQ'"
>
<select
class=
"selector"
v-model=
"formData.
work
Type"
:disabled=
"flag=='XQ'"
>
<option
v-for=
"(item, i) in tabList4lv2"
v-if=
"item.dictValue!='0'"
:key=
"i"
<option
v-for=
"(item, i) in tabList4lv2"
:key=
"i"
:label=
"item.dictLabel"
:value=
"item.dictValue"
>
:label=
"item.dictLabel"
:value=
"item.dictValue"
>
</option>
</option>
</select>
</select>
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<div
class=
"form-item"
>
<div
class=
"form-item"
>
<span
class=
"form-label title_require"
>
作业公司
</span>
<span
class=
"form-label title_require"
>
作业公司
</span>
<div
class=
"form-input-wrap"
>
<div
class=
"form-input-wrap"
>
<input
type=
"text"
v-model=
"formData.
titl
e"
:disabled=
"flag=='XQ'"
class=
"form-input"
<input
type=
"text"
v-model=
"formData.
companyNam
e"
:disabled=
"flag=='XQ'"
class=
"form-input"
placeholder=
""
>
placeholder=
""
>
</div>
</div>
</div>
</div>
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
<div
class=
"form-item"
>
<div
class=
"form-item"
>
<span
class=
"form-label title_require"
>
作业人员姓名
</span>
<span
class=
"form-label title_require"
>
作业人员姓名
</span>
<div
class=
"form-input-wrap"
>
<div
class=
"form-input-wrap"
>
<input
type=
"text"
v-model=
"formData.
participantsNum
"
:disabled=
"flag=='XQ'"
class=
"form-input"
<input
type=
"text"
v-model=
"formData.
workerName
"
:disabled=
"flag=='XQ'"
class=
"form-input"
placeholder=
""
>
placeholder=
""
>
</div>
</div>
</div>
</div>
...
@@ -67,14 +67,14 @@
...
@@ -67,14 +67,14 @@
<!-- 详情模式 -->
<!-- 详情模式 -->
<div
class=
"form-label form-label-div"
style=
"width: 4rem;"
>
上传作业证件(最多6张)
</div>
<div
class=
"form-label form-label-div"
style=
"width: 4rem;"
>
上传作业证件(最多6张)
</div>
<div
class=
"img-wrapper"
>
<div
class=
"img-wrapper"
>
<div
style=
"position: relative;"
v-for=
"(imgItem, index) in formData.
images
"
>
<div
style=
"position: relative;"
v-for=
"(imgItem, index) in formData.
attachmentFile
"
>
<img
:src=
"previewUrl + imgItem"
style=
"width: 1.6rem; height: 1.6rem;"
<img
:src=
"previewUrl + imgItem"
style=
"width: 1.6rem; height: 1.6rem;"
@
click=
"showImage(formData.
images
, index)"
/>
@
click=
"showImage(formData.
attachmentFile
, index)"
/>
<div
v-if=
"flag=='XG'"
class=
"van-uploader__preview-delete"
<div
v-if=
"flag=='XG'"
class=
"van-uploader__preview-delete"
@
click=
"handleDeleteFloorPlan(index, 'floorPlan')"
><i
@
click=
"handleDeleteFloorPlan(index, 'floorPlan')"
><i
class=
"van-icon van-icon-cross van-uploader__preview-delete-icon"
></i></div>
class=
"van-icon van-icon-cross van-uploader__preview-delete-icon"
></i></div>
</div>
</div>
<div
v-if=
"formData.
images
.length<6 && flag=='ADD' "
>
<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"
>
class=
"uploader-wrapper"
:deletable=
"false"
:preview-image=
"false"
>
<img
src=
"../image/code/upload.png"
style=
"width:1.6rem;height: 1.6rem;"
alt=
""
srcset=
""
>
<img
src=
"../image/code/upload.png"
style=
"width:1.6rem;height: 1.6rem;"
alt=
""
srcset=
""
>
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
</van-popup>
</van-popup>
<div
style=
"margin-top: .1rem;"
><van-checkbox
v-model=
"formData.check"
icon-size=
"16px"
style=
"color:blue; font-size:.2rem;"
>
<div
style=
"margin-top: .1rem;"
><van-checkbox
v-model=
"formData.check"
icon-size=
"16px"
style=
"color:blue; font-size:.2rem;"
>
我已阅读
我已阅读
<span
style=
"color:blue;
"
>
《提醒事项》
</span>
<span
style=
"color:blue;
"
@
click=
"showTipPage
"
>
《提醒事项》
</span>
</van-checkbox>
</van-checkbox>
<!-- form结束 -->
<!-- form结束 -->
<button
class=
"save-btn"
style=
"margin-top: .1rem;margin-left: 50%; transform: translateX(-50%);"
v-if=
"!formData.id"
<button
class=
"save-btn"
style=
"margin-top: .1rem;margin-left: 50%; transform: translateX(-50%);"
v-if=
"!formData.id"
...
...
src/_tezhongzuoye_detail.js
View file @
fa817ad2
...
@@ -22,10 +22,15 @@ window.addEventListener("load", function() {
...
@@ -22,10 +22,15 @@ window.addEventListener("load", function() {
// maxDate: new Date(new Date().getFullYear() + 10, 11),
// maxDate: new Date(new Date().getFullYear() + 10, 11),
// 新增以下数据
// 新增以下数据
formData
:
{
formData
:
{
images
:
[],
attachmentFile
:
[],
exerciseDate
:
gemhoUtil
.
getTargetDateYMD
(),
exerciseDate
:
gemhoUtil
.
getTargetDateYMD
(),
workTypeName
:
''
,
workType
:
''
,
companyName
:
''
,
workerName
:
''
,
startTime
:
''
,
// 开始时间字段
startTime
:
''
,
// 开始时间字段
endTime
:
''
// 结束时间字段
endTime
:
''
// 结束时间字段
},
},
id
:
''
id
:
''
}
}
...
@@ -41,11 +46,12 @@ window.addEventListener("load", function() {
...
@@ -41,11 +46,12 @@ window.addEventListener("load", function() {
}
else
{
}
else
{
this
.
flag
=
'
ADD
'
this
.
flag
=
'
ADD
'
}
}
this
.
getDict4tab1
()
},
},
methods
:
{
methods
:
{
showTipPage
(){
showTipPage
(){
let
param
=
{
let
param
=
{
type
:
this
.
formData
.
t
ype
,
type
:
this
.
formData
.
workT
ype
,
pageName
:
'
_tezhongzuoye_detail
'
,
pageName
:
'
_tezhongzuoye_detail
'
,
}
}
let
url
=
gemhoUtil
.
setParameter
(
'
_tezhongzuoye_detail-text.html
'
,
param
)
let
url
=
gemhoUtil
.
setParameter
(
'
_tezhongzuoye_detail-text.html
'
,
param
)
...
@@ -62,7 +68,7 @@ window.addEventListener("load", function() {
...
@@ -62,7 +68,7 @@ window.addEventListener("load", function() {
page
:
1
,
page
:
1
,
size
:
9999
,
size
:
9999
,
sign
:
15
,
sign
:
15
,
dictType
:
'
training_exercise
_type
'
dictType
:
'
special_work
_type
'
}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
if
(
!
res
)
{
// 中台返回为undefined 重新请求
...
@@ -87,7 +93,7 @@ window.addEventListener("load", function() {
...
@@ -87,7 +93,7 @@ window.addEventListener("load", function() {
},
},
// 处理平面图删除
// 处理平面图删除
handleDeleteFloorPlan
(
index
,
type
)
{
handleDeleteFloorPlan
(
index
,
type
)
{
this
.
formData
.
images
.
splice
(
index
,
1
);
this
.
formData
.
attachmentFile
.
splice
(
index
,
1
);
},
},
beforeRead
(
file
)
{
beforeRead
(
file
)
{
if
(
!
[
'
image/png
'
,
'
image/jpeg
'
,
'
image/jpg
'
].
includes
(
file
.
type
))
{
if
(
!
[
'
image/png
'
,
'
image/jpeg
'
,
'
image/jpg
'
].
includes
(
file
.
type
))
{
...
@@ -134,7 +140,7 @@ window.addEventListener("load", function() {
...
@@ -134,7 +140,7 @@ window.addEventListener("load", function() {
.
then
(
value
=>
{
.
then
(
value
=>
{
console
.
log
(
value
,
'
value图片上********
'
);
// 处理后端返回的数据
console
.
log
(
value
,
'
value图片上********
'
);
// 处理后端返回的数据
if
(
value
)
{
// 返回信息不为空,则进行解密操作
if
(
value
)
{
// 返回信息不为空,则进行解密操作
this
.
formData
.
images
.
push
(
value
.
fileName
)
this
.
formData
.
attachmentFile
.
push
(
value
.
fileName
)
// 可根据后端返回的数据做进一步处理,如显示上传成功信息等
// 可根据后端返回的数据做进一步处理,如显示上传成功信息等
setTimeout
(()
=>
{
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
vant
.
Toast
.
clear
()
...
@@ -184,12 +190,12 @@ window.addEventListener("load", function() {
...
@@ -184,12 +190,12 @@ window.addEventListener("load", function() {
},
},
showImage
(
list
,
index
)
{
showImage
(
list
,
index
)
{
const
images
=
list
.
map
((
item
)
=>
{
const
attachmentFile
=
list
.
map
((
item
)
=>
{
return
this
.
previewUrl
+
item
return
this
.
previewUrl
+
item
})
})
console
.
log
(
images
,
'
images
'
)
console
.
log
(
attachmentFile
,
'
attachmentFile
'
)
vant
.
ImagePreview
({
vant
.
ImagePreview
({
images
,
attachmentFile
,
startPosition
:
index
,
startPosition
:
index
,
closeable
:
true
,
closeable
:
true
,
});
});
...
@@ -223,7 +229,7 @@ window.addEventListener("load", function() {
...
@@ -223,7 +229,7 @@ window.addEventListener("load", function() {
})
})
return
;
return
;
}
}
if
(
!
this
.
formData
.
images
.
length
)
{
if
(
!
this
.
formData
.
attachmentFile
.
length
)
{
vant
.
Dialog
.
alert
({
vant
.
Dialog
.
alert
({
message
:
'
作业证件不可为空
'
,
message
:
'
作业证件不可为空
'
,
...
@@ -241,7 +247,7 @@ window.addEventListener("load", function() {
...
@@ -241,7 +247,7 @@ window.addEventListener("load", function() {
exerciseType
:
'
2
'
,
// 应急演练
exerciseType
:
'
2
'
,
// 应急演练
...
this
.
formData
,
...
this
.
formData
,
}
}
reqParam
.
images
=
this
.
formData
.
images
.
join
(
'
,
'
)
reqParam
.
attachmentFile
=
this
.
formData
.
attachmentFile
.
join
(
'
,
'
)
http3
.
post
(
'
/gaoqu/exercise
'
,
reqParam
).
then
((
res
)
=>
{
http3
.
post
(
'
/gaoqu/exercise
'
,
reqParam
).
then
((
res
)
=>
{
console
.
log
(
'
添加结果
'
,
res
)
console
.
log
(
'
添加结果
'
,
res
)
...
@@ -264,8 +270,8 @@ window.addEventListener("load", function() {
...
@@ -264,8 +270,8 @@ window.addEventListener("load", function() {
interfacePublicKey
:
API_KEY_MAP
[
'
no-page
'
][
'
publicKey
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
no-page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
no-page
'
][
'
privateKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
no-page
'
][
'
privateKey
'
],
reqParams
:
{
reqParams
:
{
sign
:
3
1
,
sign
:
3
3
,
exercise
Id
:
this
.
id
,
specialWork
Id
:
this
.
id
,
sort
:
'
lawId,desc
'
,
sort
:
'
lawId,desc
'
,
},
},
},
},
...
@@ -283,9 +289,9 @@ window.addEventListener("load", function() {
...
@@ -283,9 +289,9 @@ window.addEventListener("load", function() {
var
result
=
JSON
.
parse
(
res
)
var
result
=
JSON
.
parse
(
res
)
// 图片数据结构处理
// 图片数据结构处理
let
tempData
=
result
.
data
let
tempData
=
result
.
data
if
(
tempData
[
'
images
'
])
{
if
(
tempData
[
'
attachmentFile
'
])
{
tempData
[
'
images
'
]
=
tempData
[
'
images
'
]
?
tempData
[
tempData
[
'
attachmentFile
'
]
=
tempData
[
'
attachmentFile
'
]
?
tempData
[
'
images
'
].
split
(
'
,
'
)
:
[]
'
attachmentFile
'
].
split
(
'
,
'
)
:
[]
}
}
this
.
formData
=
tempData
this
.
formData
=
tempData
...
...
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