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
6a475d02
Commit
6a475d02
authored
Apr 12, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge
parent
2372d2b0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
368 additions
and
217 deletions
+368
-217
index.html
index.html
+4
-4
_check_info.js
src/_check_info.js
+321
-206
_shanghu_detail.js
src/_shanghu_detail.js
+43
-7
No files found.
index.html
View file @
6a475d02
...
...
@@ -29,10 +29,10 @@
<body>
<!-- 获取授权用户信息 本地token等操作 -->
<script
<
!-- <
script
type="text/javascript"
src="sdk/jssdk2/index.js"
></script>
></script>
-->
<script
type=
"text/javascript"
>
gemhoUtil
.
setCookie
(
'
token
'
,
...
...
@@ -47,7 +47,7 @@
<!-- 第二层:商户图标、名称、等级、场所类型和地址 -->
<div
class=
"second-layer second-layer-zf"
v-if=
"userInfo.userType!=='s
hop
'"
v-if=
"userInfo.userType!=='s
j
'"
>
<img
class=
"merchant-icon"
...
...
@@ -69,7 +69,7 @@
<!-- 第二层:商户图标、名称、等级、场所类型和地址 -->
<div
class=
"second-layer-sj"
v-if=
"userInfo.userType=='s
hop
'"
v-if=
"userInfo.userType=='s
j
'"
>
<div
class=
"header"
>
<span>
商家信息
</span>
...
...
src/_check_info.js
View file @
6a475d02
window
.
onload
=
function
()
{
window
.
onload
=
function
()
{
function
countSelectedNo
(
result
)
{
// 获取 checkList 中 selected 为 'no' 的对象个数
return
result
.
reduce
((
total
,
category
)
=>
{
...
...
@@ -52,38 +52,168 @@ window.onload = function () {
* pageName: 页面名称(用于记录页面来源,用于操作后返回上一页)
*
*/
// this.flag = gemhoUtil.getParameter('type')
// this.id = gemhoUtil.getParameter('id')
// this.pageName = gemhoUtil.getParameter('pageName')
// // 表单数据
// this.checkData = result.data
// if (type === 'YH_XQ') { // 隐患详情
// this.getDetail4YH_XQ()
// } else if (this.flag === 'ZG_XQ') { // 整改详情
// this.getDetail4YH_XQ()
// } else if (this.flag === 'JC_XQ') { // 检查详情
// this.getDetail4JC_XQ()
// } else if (this.flag === 'ADD') { // 新增,调用模板详情方法
this
.
getDetail4Template
()
// }
// }
// )
},
getDetail4JC_XQ
()
{
// 检查单详情
watch
:
{
checkData
:
{
handler
(
newVal
)
{
const
snapshot
=
JSON
.
parse
(
JSON
.
stringify
(
newVal
));
console
.
log
(
'
全量变化:
'
,
snapshot
);
this
.
noCount
=
countSelectedNo
(
newVal
);
// selected=no 的个数
// this.totalItems = getTotalCheckListItems(newVal); // checkList 子元素总数
this
.
notNullCount
=
countSelectedNotNull
(
newVal
);
// selected 不为 null 的个数
},
deep
:
true
}
},
methods
:
{
getOriginMatchedItemById
(
id
)
{
const
result
=
this
.
originCheckData
[
this
.
checkPageIndex
][
'
gqCheckItemVoList
'
].
find
(
item
=>
item
.
id
===
id
)
||
[]
return
JSON
.
parse
(
JSON
.
stringify
(
result
))
},
// 处理单选变化
handleSelectionChange
(
val
,
item
,
index
)
{
console
.
log
(
val
,
item
,
'
数据改变了前
'
)
const
newItem
=
this
.
getOriginMatchedItemById
(
item
.
id
)
console
.
log
(
val
,
newItem
,
'
数据改变了。。。。newItem
'
)
newItem
.
itemAnswer
=
val
// console.log(this.checkData[this.checkPageIndex]['gqCheckItemVoList'])
this
.
$set
(
this
.
checkData
[
this
.
checkPageIndex
][
'
gqCheckItemVoList
'
],
index
,
JSON
.
parse
(
JSON
.
stringify
()));
console
.
log
(
val
,
this
.
checkData
[
this
.
checkPageIndex
][
'
gqCheckItemVoList
'
][
index
],
'
数据改变了后
'
,
index
)
},
// 文件上传处理
handleFileUpload
(
file
)
{
console
.
log
(
'
上传文件:
'
,
file
);
// 此处可添加实际文件上传逻辑
},
// 整改天数确认
handleDeadlineConfirm
(
event
,
item
)
{
console
.
log
(
'
select选择
'
,
event
.
target
.
value
)
const
value
=
event
.
target
.
value
;
if
(
value
)
{
const
days
=
parseInt
(
value
);
item
.
deadlineDays
=
days
;
const
deadlineDate
=
new
Date
();
deadlineDate
.
setDate
(
deadlineDate
.
getDate
()
+
days
);
item
.
deadlineDate
=
this
.
formatDate
(
deadlineDate
);
}
// this.showDeadlinePicker = false;
},
// 日期格式化
formatDate
(
date
)
{
return
`
${
date
.
getFullYear
()}
-
${(
date
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
'
0
'
)}
-
${
date
.
getDate
().
toString
().
padStart
(
2
,
'
0
'
)}
`
;
},
getDetail4Template
()
{
// 安全检查模板初始化
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
no-page
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
no-page
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
no-page
"
][
"
privateKey
"
],
reqParams
:
{}
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
// this.getDetail4Template()
},
0
);
return
}
if
(
res
)
{
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
vant
.
Toast
.
clear
()
})
http2
.
post
(
{
serviceId
:
API_KEY_MAP
[
'
no-page
'
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
no-page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
no-page
'
][
'
privateKey
'
],
reqParams
:
{
recordId
:
'
1
'
,
},
0
);
var
result
=
JSON
.
parse
(
res
)
this
.
checkDate
=
result
.
checkDate
// 检查日期
this
.
checkPeopleName
=
result
.
checkPeopleName
// 检查人员
this
.
rectificationDeadline
=
result
.
rectificationDeadline
// 整改截止日期
this
.
reviewDate
=
result
.
reviewDate
// 隐患审核日期
this
.
reviewRecord
=
result
.
reviewRecord
this
.
totalItems
=
result
.
itemAllCount
,
// 表单数据
this
.
checkData
=
JSON
.
parse
(
JSON
.
stringify
(
result
.
data
))
this
.
originCheckData
=
JSON
.
parse
(
JSON
.
stringify
(
result
.
data
))
}
})
},
getDetail4YH_XQ
()
{
// 隐患详情
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
no-page
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
no-page
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
no-page
"
][
"
privateKey
"
],
reqParams
:
{
"
hdId
"
:
"
1
"
,
}
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
this
.
getDetail4YH_XQ
()
},
0
);
return
}
if
(
res
)
{
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
vant
.
Toast
.
clear
()
})
},
0
);
var
result
=
JSON
.
parse
(
res
)
this
.
checkDate
=
result
.
checkDate
// 检查日期
this
.
checkPeopleName
=
result
.
checkPeopleName
// 检查人员
this
.
rectificationDeadline
=
result
.
rectificationDeadline
// 整改截止日期
this
.
reviewDate
=
result
.
reviewDate
// 隐患审核日期
this
.
reviewRecord
=
result
.
reviewRecord
// 表单数据
this
.
checkData
=
result
.
data
}
})
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
getDetail4JC_XQ
()
{
// 检查单详情
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
no-page
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
no-page
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
no-page
"
][
"
privateKey
"
],
reqParams
:
{
"
recordId
"
:
"
1
"
,
}
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
this
.
getDetail4YH_XQ
()
},
0
)
},
0
);
return
}
if
(
res
)
{
...
...
@@ -92,7 +222,7 @@ window.onload = function () {
this
.
$nextTick
(()
=>
{
vant
.
Toast
.
clear
()
})
},
0
)
},
0
);
var
result
=
JSON
.
parse
(
res
)
this
.
checkDate
=
result
.
data
.
checkTime
// 检查日期
this
.
checkPeopleName
=
result
.
data
.
checkPeopleName
// 检查人员
...
...
@@ -101,38 +231,35 @@ window.onload = function () {
this
.
notNullCount
=
result
.
data
.
notRectifiedCount
this
.
totalItems
=
result
.
itemAllCount
}
}
)
})
},
add4ZG_XQ
()
{
if
(
!
this
.
checkData
.
photos
.
length
)
{
vant
.
Dialog
.
alert
({
message
:
'
请上传整改图片
'
,
})
return
return
;
}
vant
.
Toast
.
loading
({
message
:
'
正在处理...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
})
http2
.
post
(
{
serviceId
:
API_KEY_MAP
[
'
no-page
'
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
no-page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
no-page
'
][
'
privateKey
'
],
});
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
no-page
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
no-page
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
no-page
"
][
"
privateKey
"
],
reqParams
:
{
hdId
:
this
.
id
,
photos
:
this
.
checkData
,
},
},
(
res
,
type
)
=>
{
if
(
!
res
&&
!
type
)
{
// 如果是中台接口返回为undefined,则重新发起请求
"
hdId
"
:
this
.
id
,
"
photos
"
:
this
.
checkData
,
}
},
(
res
,
type
)
=>
{
if
(
!
res
&&
!
type
)
{
// 如果是中台接口返回为undefined,则重新发起请求
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
this
.
add4ZG_XQ
()
},
0
)
},
0
);
return
}
if
(
res
)
{
...
...
@@ -141,38 +268,30 @@ window.onload = function () {
message
:
'
操作成功
'
,
})
// history.back()
gemhoUtil
.
navigatePage
(
this
.
pageName
+
'
.html
'
,
'
操作完成,跳转中...
'
)
}
gemhoUtil
.
navigatePage
(
this
.
pageName
+
'
.html
'
,
'
操作完成,跳转中...
'
)
}
)
}
)
},
add4YH_XQ
(
auditStatus
)
{
// 隐患详情 审核通过或拒绝
add4YH_XQ
(
auditStatus
)
{
// 隐患详情 审核通过或拒绝
vant
.
Toast
.
loading
({
message
:
'
正在处理...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
})
http2
.
post
(
{
serviceId
:
API_KEY_MAP
[
'
no-page
'
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
no-page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
no-page
'
][
'
privateKey
'
],
});
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
no-page
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
no-page
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
no-page
"
][
"
privateKey
"
],
reqParams
:
{
hdId
:
this
.
id
,
auditStatus
,
},
},
(
res
,
type
)
=>
{
if
(
!
res
&&
!
type
)
{
// 如果是中台接口返回为undefined,则重新发起请求
"
hdId
"
:
this
.
id
,
auditStatus
}
},
(
res
,
type
)
=>
{
if
(
!
res
&&
!
type
)
{
// 如果是中台接口返回为undefined,则重新发起请求
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
this
.
add4YH_XQ
()
},
0
)
},
0
);
return
}
if
(
res
)
{
...
...
@@ -181,20 +300,16 @@ window.onload = function () {
message
:
'
操作成功
'
,
})
// history.back()
gemhoUtil
.
navigatePage
(
this
.
pageName
+
'
.html
'
,
'
操作完成,跳转中...
'
)
}
gemhoUtil
.
navigatePage
(
this
.
pageName
+
'
.html
'
,
'
操作完成,跳转中...
'
)
}
)
}
)
},
add4JC_XQ
()
{
var
reqParam
=
{
merId
:
'
1
'
,
gqCheckTypeVoList
:
this
.
checkData
,
"
merId
"
:
"
1
"
,
"
gqCheckTypeVoList
"
:
this
.
checkData
}
var
url
=
'
/gq/checkRecord/safeCheckRecord
'
var
url
=
"
/gq/checkRecord/safeCheckRecord
"
http
.
post
(
url
,
reqParam
).
then
((
res
)
=>
{
console
.
log
(
'
添加结果
'
,
res
)
...
...
@@ -203,7 +318,7 @@ window.onload = function () {
})
gemhoUtil
.
navigatePage
(
this
.
pageName
+
'
.html
'
,
'
操作完成,跳转中...
'
)
})
},
// },
})
}
}
});
}
\ No newline at end of file
src/_shanghu_detail.js
View file @
6a475d02
...
...
@@ -52,16 +52,52 @@ window.addEventListener('load', function () {
},
computed
:
{},
mounted
()
{
this
.
detail
()
},
methods
:
{
detail
(
id
)
{
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
no-page
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
no-page
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
no-page
"
][
"
privateKey
"
],
reqParams
:
{
"
merId
"
:
gemhoUtil
.
getParameter
(
'
id
'
),
}
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
this
.
detail
()
},
0
);
return
}
if
(
res
)
{
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
vant
.
Toast
.
clear
()
})
},
0
);
var
result
=
JSON
.
parse
(
res
)
this
.
formData
=
result
.
data
console
.
log
(
'
查看详情:
'
,
id
)
// this.formData = {} // 表单赋值
// 这里添加跳转逻辑
const
QR_IMAGE_URL
=
'
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsAQAAAABRBrPYAAAD70lEQVR42u2az0sUYRjHn8na6SCtVFRSOIqGHQILoRQ3f3TqYNgf0EHo4NVuLsi8YynWJbYWlgKbOQR16xJ0sjSEfsDmBEUkBI4o7lFlg9ZY5ul9n/edSc2gS9C+7DAsw8xnZ+F5n+f7/HgX8G+OdahiVayKVbEqpgMWgjhYyaJ7ASsBw8DAQNw19cLEdWCD5RA8xgEzsM2AqUc6YeI+t4NRsugax0rAMRv4p4YYNwh/SryFZBZdMe7Y3AgGcmtYkTPoh9FNUwYyjiE69K3dY6GiMRIum0J467mrvlU0Fh8h3eefTGjXH3NW5WL0NCCboANWKE5+8OjmQa0XJhZaRHFkFqFaBlfs35JRpWNSkBlVFBTOSsQo+WqGgaguTCFZIa2+E5lo69JrgEXCJeoKvuJCqEu8rOKeEOymbxWMIRVRSNnWoUqDLuL8qxGGUpZVF8Btwg+D6kbQCwtFAiJlJt+O6g3yBNQKQ3JsCcilR6qmhGVMvTAqFEmjZL8jREzlX72wkBpYamMt6fB2dIJ2mMg7FMg2kIgpKwXbYqHyMSHRVFQYUfYhE8kZhVYYVYmqejTkNEbEskpPOmFqEGGKC3FSqy7dgKFemCRLstMR7Q/NnWSdrBUWgqwV1VRNpt14yKYbhijrYabGTXH7oxdGq2zIbGvKb/2aDGuGidqJzCKNQ5NSiyZsumEO+XnsAHYU16AXFs9e5PjFBjV+CU0M9cJUww6qVZctnnRy0AwjTWaygqKIRgrt0Nw+LNUBk9s31KEDVVDUGsBO4dIGU9usEOUmOYrRECOXlk9D2m91tg9LtcDUBpzMtnLFaad1Z4FR8Vi0UUU7j6p6ZNGkQies+heXKlbF/gX2tIh+0ShjCt9hT7Eb6h8GxrR72POx56u5EWOPBy1/iUFNCt9KbCownESdwCYKmxHm1LRtzs8yPw/J9wEUz7sjcBLLuSuWX+h6sQrJCNvTe2y+j83Wwn4YhGfNHGscms5dLeeXOy9swZ7vm+pf4sKQKkG6kG11Wc+qeSIHtfmN9r0JFv2o9+SUe2sp7ZiN1mT5TbYFDkAh6STqO/I/mhdfjljR20xITiynvQJYNevGXC1hn9ze+nn76JdEjN27c9mbLKYzLYfcPo4l3dH7q+Y3d4BjlnGuN35brt9rLxrZlrOpSwX82Oamx1auZRJ1x+dT/sKRGMsc7K09s8QyrR3D+VYs9jRcv7nyfSpnLfrDcx8SA57CblxkmZEmli10dPlDWOzuHoUmfJCbtfxXwezn+G2nV8udYT/LjhtJ30fYY9v2INwdb2hIFjZvr8TYjFiwNfDcIQ/XEGpITB+5M8gNu/Da9/5zt/wJ5zVLxjs6WyMAAAAASUVORK5CYII=
'
this
.
generateQRCode
(
QR_IMAGE_URL
)
}
})
},
// 新增选择确认方法
onConfirmType
(
value
)
{
...
...
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