From 807b4ab1519e1ec49fac5626fe98f4be8802ecea Mon Sep 17 00:00:00 2001
From: zhouwenxuan <1175765986@qq.com>
Date: 星期三, 28 六月 2023 16:12:18 +0800
Subject: [PATCH] 文件预览

---
 pages/tabBar/notice/notice.vue |   49 ++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 36 insertions(+), 13 deletions(-)

diff --git a/pages/tabBar/notice/notice.vue b/pages/tabBar/notice/notice.vue
index 6686912..83c328a 100644
--- a/pages/tabBar/notice/notice.vue
+++ b/pages/tabBar/notice/notice.vue
@@ -7,6 +7,7 @@
 			<!-- 真正的导航栏内容 -->
 			<view class="navBar" >
 				<view class="barText">{{user.name}}收到的工作通知</view>
+				<!-- <view class="barText">{{registerID}}</view> -->
 				<!-- <view style="flex: 1;" @click="loginOut">退出</view> -->
 			</view>
 		</view>
@@ -14,6 +15,11 @@
 		<view style="display: flex;flex-direction: column;">
 			<view class="buttonGroup">
 				<view style="display: flex;">
+					<view  class="buttonAll all"
+						:class="{ 'active': selectedSaleAnalysis === 'all'}" 
+						@click="handleButtonClick({label: 'all',name: '全部'})">
+						全部
+					</view>
 					<view v-for="(button, index) in buttons" :key="index" class="buttonItem"
 						:class="{ 'active': selectedSaleAnalysis === button.label,
 						 'red': button.label === 'red',
@@ -25,7 +31,7 @@
 					</view>
 				</view>
 				<view class="switchBtn">
-					<text style="margin-right: 7px;">是否紧临</text>
+					<text style="margin-right: 7px;">仅紧临</text>
 					<u-switch v-model="checked" size="20" @change="clickSwitch"></u-switch>
 				</view>
 			</view>
@@ -100,15 +106,15 @@
 				tabBarLists: [],
 				// 状态栏高度
 				statusBarHeight: 0,
-				checked: true,
+				checked: false,
 				isReadOnly: false,
 				showDialog: false,
 				data: {
 					pageIndex: 1,
-					pageSize: 1000,
+					pageSize: 10000000,
 					searchParams: {
-						emergType: 1,//1-紧急;2-常规
-						warningLevel: 1,//1-红色预警;2-橙色预警;3-黄色预警;4-蓝色预警
+						emergType: null,//1-紧急;2-常规
+						warningLevel: null,//1-红色预警;2-橙色预警;3-黄色预警;4-蓝色预警
 						readStatus: null//0-未读,1-已读
 					}
 				},
@@ -129,21 +135,22 @@
 					name: '蓝'
 				},
 				],
-				selectedSaleAnalysis: 'red',
+				selectedSaleAnalysis: 'all',
 				noticeListCopy: [],
 				noticeListCopyRead:[],
 				noticeList: [],
 				user: {
 					name: ''
 				},
-				page: 'pages/tabBar/notice/notice'
+				page: 'pages/tabBar/notice/notice',
+				registerID: ''
 			}
 		},
 		onShow () {
 			this.tabBarLists = uni.getStorageSync('tabBarList');
-			this.user.name = uni.getStorageSync('user').realName + uni.getStorageSync('user').name;
-			// this.selectedSaleAnalysis = 'red',
+			this.user.name = uni.getStorageSync('user').name;
 			this.getNoticeList();
+			// this.registerID = uni.getStorageSync('registrationID');
 			// this.page = this.$route.meta.pagePath;
 		},
 		onLoad() {
@@ -155,10 +162,10 @@
 		methods: {
 			getNoticeList() {
 				this.data.searchParams.readStatus = this.isReadOnly ? 0 : null;
-				this.data.searchParams.emergType = this.checked ? 1 : 2;
-				this.data.searchParams.warningLevel = this.selectedSaleAnalysis =='red' ? 1 : this.selectedSaleAnalysis =='orange' ? 2: this.selectedSaleAnalysis =='yellow'? 3 : 4;
+				this.data.searchParams.emergType = this.checked ? 1 : null ;
+				this.data.searchParams.warningLevel =  this.selectedSaleAnalysis =='all' ? null : this.selectedSaleAnalysis =='red' ? 1 : this.selectedSaleAnalysis =='orange' ? 2: this.selectedSaleAnalysis =='yellow'? 3 : 4;
 				getNotice(this.data).then(res => {
-					console.log("res",res);
+					console.log("dddddr",res);
 					if (res.code == 100) {
 						this.noticeList = res.data ? res.data : [];
 						this.noticeListCopy = this.noticeList;
@@ -285,8 +292,24 @@
 	height: 30px;
 	border-radius: 5px;
 }
+.buttonAll{
+	margin-left:5px;
+	color: white;
+	display: flex;
+	flex-direction: row;
+	justify-content: center;
+	align-items: center;
+	width: 35px;
+	height: 30px;
+	border-radius: 5px;
+	font-size: 12px;
+	font-weight: 700;
+}
+.all {
+	background-color: rgb(17,204,33);
+}
 .active {
-	border: 1px solid gray;
+	border: 1.5px solid #8d8d8d;
 }
 .red {
 	background-color: red;

--
Gitblit v1.9.2