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
6d3a213c
Commit
6d3a213c
authored
Jun 07, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:隐患检查列表 分页功能 重置
parent
615dbc43
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
85 deletions
+56
-85
home.html
home.html
+1
-1
_yh_check.html
src/_yh_check.html
+3
-3
_yh_check.js
src/_yh_check.js
+52
-81
No files found.
home.html
View file @
6d3a213c
...
@@ -296,7 +296,7 @@
...
@@ -296,7 +296,7 @@
>
>
<p>
{{item.title}}
<van-icon
name=
"arrow"
/></p>
<p>
{{item.title}}
<van-icon
name=
"arrow"
/></p>
<p
class=
"module-intro"
>
{{item.remark}}
</p>
<p
class=
"module-intro"
>
{{item.remark}}
</p>
<div
class=
"new-badge"
>
新
</div>
<div
class=
"new-badge"
v-if=
"item.msgFlag"
>
新
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/_yh_check.html
View file @
6d3a213c
...
@@ -18,11 +18,11 @@
...
@@ -18,11 +18,11 @@
v-model=
"shanghuName"
v-model=
"shanghuName"
show-action
show-action
placeholder=
"请输入商家关键词"
placeholder=
"请输入商家关键词"
@
search=
"
onSearch
"
@
search=
"
getList()
"
v-show=
"showSearch"
v-show=
"showSearch"
>
>
<template
#action
>
<template
#action
>
<div
@
click=
"
onSearch
"
></div>
<div
@
click=
"
getList()
"
></div>
</template>
</template>
</van-search>
</van-search>
</div>
</div>
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
</van-tabs>
</van-tabs>
<!-- 隐患列表 -->
<!-- 隐患列表 -->
<van-list>
<van-list
v-model:loading=
"loading"
:offset=
"10"
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"getList"
:immediate-check=
"false"
>
<van-cell
v-for=
"item in hazardList"
:key=
"item.id"
class=
"list-item"
>
<van-cell
v-for=
"item in hazardList"
:key=
"item.id"
class=
"list-item"
>
<div
style=
"width: 100%;"
>
<div
style=
"width: 100%;"
>
<!-- 第一行:隐患描述 -->
<!-- 第一行:隐患描述 -->
...
...
src/_yh_check.js
View file @
6d3a213c
...
@@ -22,30 +22,14 @@ window.addEventListener('load', function () {
...
@@ -22,30 +22,14 @@ window.addEventListener('load', function () {
{
name
:
'
1
'
,
title
:
'
已整改
'
,
msgNum
:
6
,},
{
name
:
'
1
'
,
title
:
'
已整改
'
,
msgNum
:
6
,},
{
name
:
'
3
'
,
title
:
'
整改逾期
'
,
msgNum
:
7
,},
{
name
:
'
3
'
,
title
:
'
整改逾期
'
,
msgNum
:
7
,},
],
],
loading
:
false
,
finished
:
false
,
page
:
0
,
size
:
6
,
total
:
0
}
}
},
},
computed
:
{
computed
:
{
yhstatus
(){
// tab值对应的隐患状态码装欢
if
(
this
.
activeTab
===
0
){
return
''
}
else
if
(
this
.
activeTab
===
1
){
return
~~
'
2
'
}
else
if
(
this
.
activeTab
===
2
){
return
~~
'
0
'
}
else
if
(
this
.
activeTab
===
3
){
return
~~
'
1
'
}
else
if
(
this
.
activeTab
===
4
){
return
~~
'
3
'
}
}
// filteredHazards() {
// const statusMap = ['全部', '待审核', '待整改', '已整改', '整改逾期']
// return this.hazardList.filter((item) =>
// this.activeTab === ''
// ? true
// : item.rectificationStatusName === statusMap[this.activeTab]
// )
// },
},
},
created
()
{
created
()
{
let
merId
=
gemhoUtil
.
getParameter
(
'
merId
'
)
let
merId
=
gemhoUtil
.
getParameter
(
'
merId
'
)
...
@@ -57,7 +41,7 @@ window.addEventListener('load', function () {
...
@@ -57,7 +41,7 @@ window.addEventListener('load', function () {
// 2025年6月7日 新增首页(信息统计跳转)类别区分逻辑。
// 2025年6月7日 新增首页(信息统计跳转)类别区分逻辑。
let
type
=
gemhoUtil
.
getParameter
(
'
type
'
)
let
type
=
gemhoUtil
.
getParameter
(
'
type
'
)
if
(
type
===
'
nopass
'
){
if
(
type
===
'
nopass
'
){
this
.
activeTab
=
1
this
.
activeTab
=
2
}
else
if
(
type
===
'
willExpire
'
){
// 即将超期待整改
}
else
if
(
type
===
'
willExpire
'
){
// 即将超期待整改
this
.
activeTab
=
2
this
.
activeTab
=
2
}
else
if
(
type
===
'
expired
'
){
// 超期 整改逾期
}
else
if
(
type
===
'
expired
'
){
// 超期 整改逾期
...
@@ -69,55 +53,34 @@ window.addEventListener('load', function () {
...
@@ -69,55 +53,34 @@ window.addEventListener('load', function () {
this
.
init
()
this
.
init
()
},
},
methods
:
{
methods
:
{
reset
(){
this
.
page
=
0
this
.
size
=
6
this
.
hazardList
=
[]
},
yhstatus
(){
// tab值对应的隐患状态码装欢
if
(
this
.
activeTab
===
0
){
return
''
}
else
if
(
this
.
activeTab
===
1
){
return
~~
'
2
'
}
else
if
(
this
.
activeTab
===
2
){
return
~~
'
0
'
}
else
if
(
this
.
activeTab
===
3
){
return
~~
'
1
'
}
else
if
(
this
.
activeTab
===
4
){
return
~~
'
3
'
}
},
tabChange
(
title
){
tabChange
(
title
){
console
.
log
(
'
tab 切换
'
,
title
)
console
.
log
(
'
tab 切换
'
,
title
)
this
.
onSearch
()
this
.
reset
()
this
.
getList
()
},
},
init
()
{
init
()
{
this
.
get
Hazard
List
()
this
.
getList
()
},
},
onSearch
()
{
onSearch
()
{
// 这里添加搜索逻辑
this
.
getList
()
// 这里添加获取数据的逻辑
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
})
setTimeout
(()
=>
{
http2
.
post
(
{
serviceId
:
API_KEY_MAP
[
'
page
'
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
page
'
][
'
privateKey
'
],
reqParams
:
{
sign
:
3
,
// merId: this.merId ? this.merId : '',
merName
:
this
.
shanghuName
,
pageNum
:
this
.
page
++
,
// 每次请求增加下一页
pageSize
:
this
.
size
,
sort
:
'
lawId,desc
'
,
status
:
this
.
yhstatus
},
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
setTimeout
(()
=>
{
// this.getList()
},
0
)
return
}
if
(
res
)
{
var
result
=
JSON
.
parse
(
res
)
this
.
hazardList
=
result
.
rows
console
.
log
(
result
)
}
}
)
},
0
)
},
},
// 新增选择确认方法
// 新增选择确认方法
onConfirmType
(
value
)
{
onConfirmType
(
value
)
{
...
@@ -146,13 +109,7 @@ window.addEventListener('load', function () {
...
@@ -146,13 +109,7 @@ window.addEventListener('load', function () {
// 这里添加跳转逻辑
// 这里添加跳转逻辑
},
},
//获取隐患列表数据
//获取隐患列表数据
getHazardList
()
{
getList
()
{
// http
// .get('/gq/hiddenDanger/list?merId=1&status=' + this.activeTab)
// .then((res) => {
// console.log(res)
// })
// 这里添加获取数据的逻辑
// 这里添加获取数据的逻辑
vant
.
Toast
.
loading
({
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
message
:
'
正在加载...
'
,
...
@@ -166,12 +123,13 @@ window.addEventListener('load', function () {
...
@@ -166,12 +123,13 @@ 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
,
sign
:
3
,
// merId: this.merId ? this.merId : '',
// merId: this.merId ? this.merId : '',
status
:
this
.
activeTab
,
merName
:
this
.
shanghuName
,
pageNum
:
this
.
page
++
,
// 每次请求增加下一页
pageNum
:
this
.
page
++
,
// 每次请求增加下一页
pageSize
:
this
.
size
,
pageSize
:
this
.
size
,
sort
:
'
lawId,desc
'
,
sort
:
'
lawId,desc
'
,
status
:
this
.
yhstatus
()
},
},
},
},
(
res
)
=>
{
(
res
)
=>
{
...
@@ -185,10 +143,23 @@ window.addEventListener('load', function () {
...
@@ -185,10 +143,23 @@ window.addEventListener('load', function () {
return
return
}
}
if
(
res
)
{
if
(
res
)
{
var
result
=
JSON
.
parse
(
res
)
var
result
=
JSON
.
parse
(
res
)
this
.
hazardList
=
result
.
rows
console
.
log
(
result
,
'
result
'
)
console
.
log
(
result
)
this
.
loading
=
false
;
// 加载状态结束
this
.
hazardList
.
push
(...
result
.
rows
);
this
.
total
=
result
.
total
if
(
this
.
page
*
this
.
size
>=
this
.
total
)
{
this
.
finished
=
true
;
// 下滑不在刷新数据
}
}
}
this
.
loading
=
false
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
vant
.
Toast
.
clear
()
})
},
0
);
}
}
)
)
},
0
)
},
0
)
...
...
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