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
615dbc43
Commit
615dbc43
authored
Jun 07, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 隐患列表 提醒tab切换动态处理
parent
1d75b2eb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
19 deletions
+66
-19
home.html
home.html
+3
-3
home.js
home.js
+8
-3
_yh_check.html
src/_yh_check.html
+10
-4
_yh_check.js
src/_yh_check.js
+45
-9
No files found.
home.html
View file @
615dbc43
...
...
@@ -253,21 +253,21 @@
<!-- 第三层统计信息之后新增提醒模块(商户专属) -->
<div
class=
"info-reminder"
>
<!-- 第一个提醒项:整改未通过 -->
<div
class=
"reminder-item"
>
<div
class=
"reminder-item"
@
click=
"navTo('nopass')"
>
<div
class=
"reminder-badge"
>
3
</div>
<img
src=
"./image/code/home/icon1.png"
class=
"reminder-img"
alt=
"整改未通过"
>
<p
class=
"reminder-text"
>
整改未通过
</p>
</div>
<!-- 第二个提醒项:即将超期 -->
<div
class=
"reminder-item"
>
<div
class=
"reminder-item"
@
click=
"navTo('willExpire')"
>
<div
class=
"reminder-badge orange-badge"
>
5
</div>
<img
src=
"./image/code/home/icon2.png"
class=
"reminder-img"
alt=
"整改未通过"
>
<p
class=
"reminder-text"
>
即将超期
</p>
</div>
<!-- 第三个提醒项:整改超期 -->
<div
class=
"reminder-item"
>
<div
class=
"reminder-item"
@
click=
"navTo('expired')"
>
<div
class=
"reminder-badge red-badge"
>
2
</div>
<img
src=
"./image/code/home/icon3.png"
class=
"reminder-img"
alt=
"整改未通过"
>
<p
class=
"reminder-text"
>
整改超期
</p>
...
...
home.js
View file @
615dbc43
...
...
@@ -80,7 +80,7 @@ window.onload = function () {
className
:
'
shangjia
'
,
title
:
'
商家信息
'
,
remark
:
''
,
navTo
:
'
shanghu_detail
'
,
navTo
:
'
shanghu_detail
-edit
'
,
},
{
className
:
'
zicha
'
,
...
...
@@ -167,8 +167,13 @@ window.onload = function () {
// gemhoUtil.navigatePage(`src/_${toData}.html`)
}
},
navTo
(
url
)
{
// gemhoUtil.nav2asd(url)
navTo
(
type
)
{
// 消息统计跳转
const
param
=
{
type
,
merId
:
this
.
userInfo
.
merId
};
let
url
=
gemhoUtil
.
setParameter
(
`./src/_yh_check.html`
,
param
)
gemhoUtil
.
navigatePage
(
url
,
'
跳转中...
'
)
},
gotoPage
(
stringifyUrl
)
{
let
url
=
gemhoUtil
.
setParameter
(
`src/_
${
stringifyUrl
}
.html`
)
...
...
src/_yh_check.html
View file @
615dbc43
...
...
@@ -27,18 +27,24 @@
</van-search>
</div>
<!-- Tab栏 -->
<van-tabs
v-model:active=
"activeTab"
title-active-color=
"#1989fa"
line-height=
"2px"
<van-tabs
v-model:active=
"activeTab"
title-active-color=
"#1989fa"
line-height=
"2px"
@
change=
"tabChange"
style=
"margin-bottom: 15px;"
>
<van-tab
title=
"全部"
name=
""
></van-tab>
<!-- <div v-for="item in tabList""> -->
<van-tab
:title=
"item.title"
:badge=
"item.msgNum||null"
v-for=
"item in tabList"
></van-tab>
<!-- </div> -->
<!-- <van-tab title="全部" name=""></van-tab>
<van-tab title="待审核" badge="5"></van-tab>
<van-tab title="待整改" ></van-tab>
<van-tab title="已整改" ></van-tab>
<van-tab
title=
"整改逾期"
></van-tab>
<van-tab title="整改逾期" ></van-tab>
-->
</van-tabs>
<!-- 隐患列表 -->
<van-list>
<van-cell
v-for=
"item in
filteredHazards
"
: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=
"
...
...
src/_yh_check.js
View file @
615dbc43
...
...
@@ -11,19 +11,41 @@ window.addEventListener('load', function () {
// 更多示例数据...
],
activeTab
:
''
,
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
,},
],
}
},
computed
:
{
filteredHazards
()
{
const
statusMap
=
[
'
全部
'
,
'
待审核
'
,
'
待整改
'
,
'
已整改
'
,
'
整改逾期
'
]
return
this
.
hazardList
.
filter
((
item
)
=>
this
.
activeTab
===
''
?
true
:
item
.
rectificationStatusName
===
statusMap
[
this
.
activeTab
]
)
},
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
()
{
let
merId
=
gemhoUtil
.
getParameter
(
'
merId
'
)
...
...
@@ -32,12 +54,25 @@ window.addEventListener('load', function () {
}
else
{
this
.
merId
=
''
}
// 2025年6月7日 新增首页(信息统计跳转)类别区分逻辑。
let
type
=
gemhoUtil
.
getParameter
(
'
type
'
)
if
(
type
===
'
nopass
'
){
this
.
activeTab
=
1
}
else
if
(
type
===
'
willExpire
'
){
// 即将超期待整改
this
.
activeTab
=
2
}
else
if
(
type
===
'
expired
'
){
// 超期 整改逾期
this
.
activeTab
=
4
}
if
(
gemhoUtil
.
getCookie
(
'
userType
'
)
!==
'
shop
'
)
{
this
.
showSearch
=
true
}
this
.
init
()
},
methods
:
{
tabChange
(
title
){
console
.
log
(
'
tab 切换
'
,
title
)
this
.
onSearch
()
},
init
()
{
this
.
getHazardList
()
},
...
...
@@ -62,6 +97,7 @@ window.addEventListener('load', function () {
pageNum
:
this
.
page
++
,
// 每次请求增加下一页
pageSize
:
this
.
size
,
sort
:
'
lawId,desc
'
,
status
:
this
.
yhstatus
},
},
(
res
)
=>
{
...
...
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