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
afdd37f1
Commit
afdd37f1
authored
Jun 10, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:隐患列表 全部已读UI
parent
7164cd96
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
153 additions
and
98 deletions
+153
-98
_yh_check.css
src/_yh_check.css
+24
-0
_yh_check.html
src/_yh_check.html
+6
-0
_yh_check.js
src/_yh_check.js
+123
-98
No files found.
src/_yh_check.css
View file @
afdd37f1
...
...
@@ -95,3 +95,27 @@ body {
position
:
absolute
;
right
:
0
;
}
/* 在现有样式中添加以下CSS */
.float-read-btn
{
position
:
fixed
;
/* 固定定位 */
right
:
0.3rem
;
/* 右侧距离 */
bottom
:
0.3rem
;
/* 底部距离 */
width
:
1.07rem
;
/* 宽度 */
height
:
1.07rem
;
/* 高度 */
background
:
#40A6FF
;
/* 背景色 */
border-radius
:
50%
;
/* 圆角 */
display
:
flex
;
/* 弹性布局 */
flex-direction
:
column
;
/* 垂直排列 */
justify-content
:
center
;
/* 垂直居中 */
align-items
:
center
;
/* 水平居中 */
z-index
:
999
;
/* 层级保证不被遮挡 */
cursor
:
pointer
;
/* 手型光标 */
}
.float-read-btn
.btn-text
{
font-size
:
0.28rem
;
/* 文字大小 */
color
:
#FFFFFF
;
/* 文字颜色 */
line-height
:
1.2
;
/* 行高 */
}
\ No newline at end of file
src/_yh_check.html
View file @
afdd37f1
...
...
@@ -74,6 +74,12 @@
</div>
</van-cell>
</van-list>
<!-- 新增悬浮按钮 -->
<div
class=
"float-read-btn"
@
click=
"markAllAsRead"
>
<span
class=
"btn-text"
>
全部
</span>
<span
class=
"btn-text"
>
已读
</span>
</div>
</div>
</body>
</html>
\ No newline at end of file
src/_yh_check.js
View file @
afdd37f1
...
...
@@ -11,104 +11,129 @@ window.addEventListener('load', function () {
// 更多示例数据...
],
activeTab
:
''
,
status
:
''
,
status
:
''
,
merId
:
''
,
showSearch
:
false
,
// 控制搜索框的显示和隐藏
// 整改状态 0:待整改 1:已整改 2:待审核 3:整改逾期
tabList
:
[
{
name
:
''
,
title
:
'
全部
'
,
msgNum
:
0
,
},
{
name
:
'
2
'
,
title
:
'
待审核
'
,
msgNum
:
0
,
},
{
name
:
'
0
'
,
title
:
'
待整改
'
,
msgNum
:
5
,
},
{
name
:
'
1
'
,
title
:
'
已整改
'
,
msgNum
:
6
,
},
{
name
:
'
3
'
,
title
:
'
整改逾期
'
,
msgNum
:
7
,
},
// 整改状态 0:待整改 1:已整改 2:待审核 3:整改逾期
tabList
:
[
{
name
:
''
,
title
:
'
全部
'
,
msgNum
:
0
,
},
{
name
:
'
2
'
,
title
:
'
待审核
'
,
msgNum
:
0
,
},
{
name
:
'
0
'
,
title
:
'
待整改
'
,
msgNum
:
0
,
},
{
name
:
'
1
'
,
title
:
'
已整改
'
,
msgNum
:
0
,
},
{
name
:
'
3
'
,
title
:
'
整改逾期
'
,
msgNum
:
0
,
},
],
loading
:
false
,
finished
:
false
,
page
:
0
,
size
:
6
,
total
:
0
,
remindStatistic
:
[]
loading
:
false
,
finished
:
false
,
page
:
0
,
size
:
6
,
total
:
0
,
remindStatistic
:
[]
}
},
computed
:
{
},
created
()
{
let
merId
=
gemhoUtil
.
getParameter
(
'
merId
'
)
let
merId
=
gemhoUtil
.
getParameter
(
'
merId
'
)
if
(
merId
!==
undefined
&&
merId
!==
null
)
{
this
.
merId
=
merId
}
else
{
this
.
merId
=
''
}
// 2025年6月7日 新增首页(信息统计跳转)类别区分逻辑。
let
type
=
gemhoUtil
.
getParameter
(
'
type
'
)
if
(
type
===
'
nopass
'
)
{
this
.
activeTab
=
2
}
else
if
(
type
===
'
willExpire
'
)
{
// 即将超期待整改
this
.
activeTab
=
2
}
else
if
(
type
===
'
expired
'
)
{
// 超期 整改逾期
this
.
activeTab
=
4
}
// 2025年6月7日 新增首页(信息统计跳转)类别区分逻辑。
let
type
=
gemhoUtil
.
getParameter
(
'
type
'
)
if
(
type
===
'
nopass
'
)
{
this
.
activeTab
=
2
}
else
if
(
type
===
'
willExpire
'
)
{
// 即将超期待整改
this
.
activeTab
=
2
}
else
if
(
type
===
'
expired
'
)
{
// 超期 整改逾期
this
.
activeTab
=
4
}
if
(
gemhoUtil
.
getCookie
(
'
userType
'
)
!==
'
shop
'
)
{
this
.
showSearch
=
true
}
this
.
init
()
this
.
getRemindStatistic
()
this
.
getRemindStatistic
()
},
methods
:
{
getRemindStatistic
(){
http2
.
post
(
{
serviceId
:
API_KEY_MAP
[
'
no-page
'
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
no-page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
no-page
'
][
'
privateKey
'
],
reqParams
:
{
sign
:
24
,
// 隐患tab
},
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
setTimeout
(()
=>
{
this
.
getRemindStatistic
()
},
0
)
return
}
if
(
res
)
{
var
result
=
JSON
.
parse
(
res
)
this
.
remindStatistic
=
result
.
data
}
}
)
},
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
){
console
.
log
(
'
tab 切换
'
,
title
)
this
.
reset
()
this
.
getList
()
},
markAllAsRead
()
{
// 全部标记为已读
http2
.
post
(
{
serviceId
:
API_KEY_MAP
[
'
no-page
'
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
no-page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
no-page
'
][
'
privateKey
'
],
reqParams
:
{
sign
:
24
,
// 隐患tab
},
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
setTimeout
(()
=>
{
this
.
markAllAsRead
()
},
0
)
return
}
if
(
res
)
{
var
result
=
JSON
.
parse
(
res
)
this
.
remindStatistic
=
result
.
data
}
}
)
},
getRemindStatistic
()
{
http2
.
post
(
{
serviceId
:
API_KEY_MAP
[
'
no-page
'
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
no-page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
no-page
'
][
'
privateKey
'
],
reqParams
:
{
sign
:
24
,
// 隐患tab
},
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
setTimeout
(()
=>
{
this
.
getRemindStatistic
()
},
0
)
return
}
if
(
res
)
{
var
result
=
JSON
.
parse
(
res
)
this
.
remindStatistic
=
result
.
data
}
}
)
},
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
)
{
console
.
log
(
'
tab 切换
'
,
title
)
this
.
reset
()
this
.
getList
()
},
init
()
{
this
.
getList
()
},
onSearch
()
{
this
.
reset
()
this
.
getList
()
this
.
reset
()
this
.
getList
()
},
// 新增选择确认方法
onConfirmType
(
value
)
{
...
...
@@ -151,13 +176,13 @@ window.addEventListener('load', function () {
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
()
sign
:
3
,
// merId: this.merId ? this.merId : '',
merName
:
this
.
shanghuName
,
pageNum
:
this
.
page
++
,
// 每次请求增加下一页
pageSize
:
this
.
size
,
sort
:
'
lawId,desc
'
,
status
:
this
.
yhstatus
()
},
},
(
res
)
=>
{
...
...
@@ -171,23 +196,23 @@ window.addEventListener('load', function () {
return
}
if
(
res
)
{
var
result
=
JSON
.
parse
(
res
)
console
.
log
(
result
,
'
result
'
)
this
.
loading
=
false
;
// 加载状态结束
this
.
hazardList
.
push
(...
result
.
rows
);
this
.
total
=
result
.
total
if
(
this
.
page
*
this
.
size
>=
this
.
total
)
{
this
.
finished
=
true
;
// 下滑不在刷新数据
}
var
result
=
JSON
.
parse
(
res
)
console
.
log
(
result
,
'
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
);
this
.
loading
=
false
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
vant
.
Toast
.
clear
()
})
},
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