From 242945e6e4708a2ae6ac896ba62241fffe456dac Mon Sep 17 00:00:00 2001
From: zhouwenxuan <1175765986@qq.com>
Date: 星期二, 01 八月 2023 15:23:02 +0800
Subject: [PATCH] 响应反馈

---
 pages/tabBar/current/current.vue |   55 +++++++++++++++++++++++++++----------------------------
 1 files changed, 27 insertions(+), 28 deletions(-)

diff --git a/pages/tabBar/current/current.vue b/pages/tabBar/current/current.vue
index e0f559d..9ad74a3 100644
--- a/pages/tabBar/current/current.vue
+++ b/pages/tabBar/current/current.vue
@@ -74,7 +74,7 @@
 
 <script>
 	import tabBar from '../tabBarIndex.vue'
-	import {getExamine} from '../../../api/examine.js'
+	import { getPublished } from '../../../api/notice.js'
 	import tebBar from '../tabBarIndex.vue'
 	export default {
 		components:{
@@ -84,11 +84,10 @@
 			return {
 				data: {
 					pageIndex: 1,
-					pageSize: 10,
+					pageSize: 10000000,
 					searchParams: {
 						emergType: null,//1-紧急;2-常规
 						warningLevel: null,//1-红色预警;2-橙色预警;3-黄色预警;4-蓝色预警
-						reviewStatus: null//1:未审核,2:已审核,3:审核已驳回	
 					}
 				},
 				page: 'pages/tabBar/current/current',
@@ -115,9 +114,12 @@
 				],
 				selectedSaleAnalysis: 'all',
 				InfoList: [],
+				unitType: '',
 			}
 		},
 		onLoad() {
+			this.unitType = uni.getStorageSync('unittype');
+			console.log("11",this.unitType)
 			//获取手机状态栏高度
 			this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight'];
 			uni.hideTabBar();
@@ -135,30 +137,17 @@
 			getInfoList() {
 				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;
-				// getExamine(this.data).then(res => {
-				// 	if(res.code == 100) {
-						this.InfoList = [
-							{
-								attachment: null,
-								disasterType: 1,
-								gmtReviewSubmit: "2023-07-21 14:36:16",
-								id: 111,
-								infoSubmitter: "1-1",
-								infoSubmitterReal: "省级工作人员",
-								publishingUnit: "自治区自然灾害综合检测预警中心",
-								reviewStatus: 1,
-								title: "【20230721】预警信息标题",
-								warningLevel: 1,
-							}
-						];
-						if(this.InfoList.length > 0) {
+				getPublished(this.data).then(res => {
+					if(res.code == 100) {
+						this.InfoList = res.data
+						if(this.InfoList && this.InfoList.length > 0) {
 							this.InfoList.forEach((item, index) => {
 								this.InfoList[index].colorContent = item.warningLevel == 1 ? '红色预警': item.warningLevel == 2 ? '橙色预警': item.warningLevel == 3 ? '黄色预警':'蓝色预警'; 
 								this.InfoList[index].warningLevel = item.warningLevel;
 							});
 						}
-				// 	}
-				// })
+					}
+				})
 			},
 			handleButtonClick(button) {
 				this.selectedSaleAnalysis = button.label;
@@ -171,12 +160,22 @@
 				})
 			},
 			toResponsivity(item) {
-				//县
-				uni.navigateTo({
-				  url: `/pages/tabBar/responsivity/countyResponsivity?data=` + encodeURIComponent(JSON.stringify(item))
-				})
-				//市
-				//村
+				console.log("item",item)
+				
+				// if(this.unitType == 2 || this.unitType == 1 ){
+				// 	uni.navigateTo({
+				// 	  url: `/pages/tabBar/responsivity/countyResponsivity?data=` + encodeURIComponent(JSON.stringify(item))
+				// 	})
+				// }else if(this.unitType == 3){
+				// 	uni.navigateTo({
+				// 	  url: `/pages/tabBar/responsivity/cityResponsivity?data=` + encodeURIComponent(JSON.stringify(item))
+				// 	})
+				// }else if(this.unitType == 4){
+				// 	uni.navigateTo({
+				// 	  url: `/pages/tabBar/responsivity/villageResponsivity?data=` + encodeURIComponent(JSON.stringify(item))
+				// 	})
+				// }
+
 			},
 			//下拉刷新
 			onPullDownRefresh() {

--
Gitblit v1.9.2