Commit afdd37f1 authored by xinzhedeai's avatar xinzhedeai

add:隐患列表 全部已读UI

parent 7164cd96
......@@ -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
......@@ -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
......@@ -16,18 +16,18 @@ window.addEventListener('load', function () {
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,},
{ 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:[]
remindStatistic: []
}
},
computed: {
......@@ -41,11 +41,11 @@ window.addEventListener('load', function () {
}
// 2025年6月7日 新增首页(信息统计跳转)类别区分逻辑。
let type = gemhoUtil.getParameter('type')
if(type === 'nopass'){
if (type === 'nopass') {
this.activeTab = 2
}else if(type === 'willExpire'){ // 即将超期待整改
} else if (type === 'willExpire') { // 即将超期待整改
this.activeTab = 2
}else if(type === 'expired'){ // 超期 整改逾期
} else if (type === 'expired') { // 超期 整改逾期
this.activeTab = 4
}
if (gemhoUtil.getCookie('userType') !== 'shop') {
......@@ -55,7 +55,32 @@ window.addEventListener('load', function () {
this.getRemindStatistic()
},
methods: {
getRemindStatistic(){
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'],
......@@ -80,25 +105,25 @@ window.addEventListener('load', function () {
}
)
},
reset(){
reset() {
this.page = 0
this.size = 6
this.hazardList = []
},
yhstatus(){ // tab值对应的隐患状态码装欢
if(this.activeTab === 0){
yhstatus() { // tab值对应的隐患状态码装欢
if (this.activeTab === 0) {
return ''
}else if(this.activeTab === 1){
} else if (this.activeTab === 1) {
return ~~'2'
}else if(this.activeTab === 2){
} else if (this.activeTab === 2) {
return ~~'0'
}else if(this.activeTab === 3){
} else if (this.activeTab === 3) {
return ~~'1'
}else if(this.activeTab === 4){
} else if (this.activeTab === 4) {
return ~~'3'
}
},
tabChange(title){
tabChange(title) {
console.log('tab 切换', title)
this.reset()
this.getList()
......@@ -183,7 +208,7 @@ window.addEventListener('load', function () {
}
this.loading = false
setTimeout(() => {
this.$nextTick(()=>{
this.$nextTick(() => {
vant.Toast.clear()
})
}, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment