From fc38d1c92f01a224e8373c4425481bb1d85e2bf3 Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期五, 21 七月 2023 15:36:01 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- pages/tabBar/notice/notice.vue | 35 ++++++++++++++++++++++++++++------- 1 files changed, 28 insertions(+), 7 deletions(-) diff --git a/pages/tabBar/notice/notice.vue b/pages/tabBar/notice/notice.vue index 4bcb792..8c41842 100644 --- a/pages/tabBar/notice/notice.vue +++ b/pages/tabBar/notice/notice.vue @@ -12,7 +12,8 @@ </view> </view> <!-- 页面内容 --> - <view style="display: flex;flex-direction: column;"> + <scroll-view scroll-y :style="{height: 900 + 'px'}"> + <view style="display: flex;flex-direction: column;margin-bottom: 10px;"> <view class="buttonGroup"> <view style="display: flex;"> <view class="buttonAll all" @@ -44,11 +45,11 @@ <view class="listContent" v-if="noticeList.length > 0" > <view v-for="(item, index) in noticeList" :key="index" class="itemContent" > <view class="content" v-if="item.isRead" > - <text style="color:rgb(17, 204, 33);" @click="toDetail(item)">[已读]</text> + <text style="color:rgb(17, 204, 33);" @click="toDetail(item)">[已叫应]</text> <text @click="toDetail(item)">[{{item.colorContent}}]</text> <text @click="toDetail(item)">{{item.title}},{{item.content}}</text> <view v-if="item.isRead" style="float: right; width: 80px;margin-top: 3px;"> - <u-button @click="toDetail(item)"v-if="item.buttonContent == '已叫应'" size="mini" style="margin-bottom: 10px;background-color:rgb(17, 204, 33);color: white;"> + <!-- <u-button @click="toDetail(item)"v-if="item.buttonContent == '已叫应'" size="mini" style="margin-bottom: 10px;background-color:rgb(17, 204, 33);color: white;"> {{item.buttonContent}} </u-button> <u-button v-else-if="item.buttonContent == '待叫应'" type="error" size="mini" style="margin-bottom: 10px;" @click="openDialog(item)"> @@ -56,16 +57,16 @@ </u-button> <u-button @click="toDetail(item)" v-else type="error" size="mini" style="margin-bottom: 10px;"> {{item.buttonContent}} - </u-button> + </u-button> --> </view> </view> <view class="contentNoRead" v-else> <u-badge :is-dot="true" type="error" style="position: absolute;"></u-badge> - <text style="color: red;margin-left:10px;" @click="toDetail(item)">[未读]</text> + <text style="color: red;margin-left:10px;" @click="toDetail(item)">[未叫应]</text> <text @click="toDetail(item)">[{{item.colorContent}}]</text> <text @click="toDetail(item)">{{item.title}},{{item.content}}</text> <view style="float: right; width: 80px;margin-top: 3px;"> - <u-button @click="toDetail(item)" v-if="item.buttonContent == '已叫应'" size="mini" style="margin-bottom: 10px;background-color:rgb(17, 204, 33);color: white;"> + <!-- <u-button @click="toDetail(item)" v-if="item.buttonContent == '已叫应'" size="mini" style="margin-bottom: 10px;background-color:rgb(17, 204, 33);color: white;"> {{item.buttonContent}} </u-button> <u-button v-else-if="item.buttonContent == '未叫应'" type="error" size="mini" style="margin-bottom: 10px;" @click="openDialog(item)"> @@ -73,7 +74,7 @@ </u-button> <u-button @click="toDetail(item)" v-else type="error" size="mini" style="margin-bottom: 10px;"> {{item.buttonContent}} - </u-button> + </u-button> --> </view> </view> </view> @@ -87,6 +88,8 @@ </view> </view> </view> + </scroll-view> + <view class="lastbottom">共<span style="font-weight: 600;"> {{noticeList.length}} </span>条 未叫应<span style="font-weight: 600;">{{noSpeak}}</span> 条</view> <dia ref="showDialog" @close="close"></dia> <tabBar :currentPagePath="page" :tabBarList="tabBarLists"></tabBar> </view> @@ -103,6 +106,7 @@ }, data() { return { + noSpeak: 0, tabBarLists: [], // 状态栏高度 statusBarHeight: 0, @@ -171,6 +175,9 @@ this.noticeListCopy = this.noticeList; if (this.noticeList.length > 0) { this.noticeList.forEach((item, index) => { + if(item.readStatus == 0){ + this.noSpeak++; + } this.noticeList[index].isRead = item.readStatus == 1 ? true : false; this.noticeList[index].colorContent = item.warningLevel == 1 ? '红色预警': item.warningLevel == 2 ? '橙色预警': item.warningLevel == 3 ? '黄色预警':'蓝色预警'; this.noticeList[index].buttonContent = item.responseStatus == 1 ? '待叫应': item.responseStatus == 2 ? '已叫应' : '超时未叫应'; @@ -194,6 +201,7 @@ }, toDetail(item) { console.log("item",item) + //改为修改叫应状态 if (item.readStatus === 0) { this.updateReadStatus(item); } @@ -350,8 +358,21 @@ text-overflow: ellipsis; overflow: hidden; white-space: nowrap; + margin-bottom: 10px; } .contentNoRead{ font-size: 14px; + margin-bottom: 10px; +} +.lastbottom{ + width: 100%; + height: 100px; + background-color: white; + text-align: center; + line-height: 50px; + position: fixed; + bottom: var(--window-bottom, 0); + z-index: 99; + font-size: 16px; } </style> -- Gitblit v1.9.2