From b7d59880975d3aa75760e764c20c2c4217039c78 Mon Sep 17 00:00:00 2001
From: zhouwenxuan <1175765986@qq.com>
Date: 星期五, 04 八月 2023 09:17:25 +0800
Subject: [PATCH] 叫应率修改

---
 pages/tabBar/notice/measures.vue                 |    2 +
 pages/tabBar/notice/detail.vue                   |   32 ++++++++++------
 pages/tabBar/firstPage/firstPage.vue             |   39 +++++++++++++++++++
 pages/tabBar/notice/notice.vue                   |    2 
 pages/tabBar/responsivity/countyResponsivity.vue |   15 ++++---
 5 files changed, 69 insertions(+), 21 deletions(-)

diff --git a/pages/tabBar/firstPage/firstPage.vue b/pages/tabBar/firstPage/firstPage.vue
index 0e42cb6..8bc7e1a 100644
--- a/pages/tabBar/firstPage/firstPage.vue
+++ b/pages/tabBar/firstPage/firstPage.vue
@@ -11,6 +11,10 @@
 		</view>
 		<view  class="list">
 			<view class="first" @click="goExamine" v-if="role == '审核领导'">
+				<view class="badge">
+					<u-badge type="error" :absolute="true" :offset="[90 + statusBarHeight ,65]" max="99" :value="examineNum" style="line-height: 40px;font-size: 14px;width: 30px;height: 40px;">
+					</u-badge>
+				</view>
 				<view class="icon">
 					<image src="../../../static/examine.png" class="img"></image>预警审核
 				</view>
@@ -47,6 +51,7 @@
 
 <script>
 	import tabBar from '../tabBarIndex.vue'
+	import {getExamine} from '../../../api/examine.js'
 	export default {
 		components:{
 			tabBar
@@ -55,7 +60,17 @@
 			return {
 				page: 'pages/tabBar/firstPage/firstPage',
 				statusBarHeight: '',
-				leaderType: 'da'
+				leaderType: 'da',
+				examineNum: 0,
+				data: {
+					pageIndex: 1,
+					pageSize: 9999,
+					searchParams: {
+						emergType: null,//1-紧急;2-常规
+						warningLevel: null,//1-红色预警;2-橙色预警;3-黄色预警;4-蓝色预警
+						reviewStatus: null//1:未审核,2:已审核,3:审核已驳回	
+					}
+				},
 			}
 			
 		},
@@ -65,8 +80,26 @@
 			uni.hideTabBar();
 			this.role = uni.getStorageSync('roleName');
 			console.log("role",this.role)
+			
+		},
+		onShow(){
+			this.getNum();
 		},
 		methods: {
+			getNum(){
+				this.data.searchParams.reviewStatus = 1;
+				getExamine(this.data).then(res => {
+					if(res.code == 100) {
+						if(res.data && res.data.length > 0){
+							this.examineNum = res.data.length;
+						}else {
+							this.examineNum = 0;
+						}
+					}else{
+						uni.$u.toast(res.msg)
+					}
+				})
+			},
 			goExamine() {
 				uni.switchTab({
 				  url: '/pages/tabBar/examine/examine'
@@ -156,4 +189,8 @@
 	height: 20px;
 	margin-right: 6px;
 }
+.badge span{
+	text-align: center;
+	width: 100%;
+}
 </style>
\ No newline at end of file
diff --git a/pages/tabBar/notice/detail.vue b/pages/tabBar/notice/detail.vue
index bb956c7..88939ec 100644
--- a/pages/tabBar/notice/detail.vue
+++ b/pages/tabBar/notice/detail.vue
@@ -109,7 +109,7 @@
 		<!-- 	//村级显示 -->
 		</view>
 		<view class="measures" v-if="unitType == 4">
-			<u-button class="resBtn" type="primary" @click="goMeasures" v-if="role == '工作人员'">响应措施反馈</u-button>
+			<u-button class="resBtn" type="primary" @click="goMeasures" v-if="role == '工作人员'">{{cityMessage}}</u-button>
 		</view>
 	</view>
 </template>
@@ -143,7 +143,9 @@
 				},
 				role: '',
 				unitType: '',
-				directViewUrl: ''
+				directViewUrl: '',
+				cityMessage: '响应措施反馈',
+				measureData: {}
 			}
 		},
 		 onLoad:function(options){
@@ -180,6 +182,7 @@
 			console.log("this.isAllImg",this.isAllImg)
 			console.log("detailData",this.detailData)
 			this.detailData.disaster = test.disasterType == 1 ? '地震': test.disasterType == 2 ? '洪涝' : test.disasterType == 3 ? '气象' : test.disasterType == 4 ? '地质灾害': test.disasterType == 5 ? '水旱': '森林草原火灾';
+			this.getMeasures();
 		},
 		methods: {
 			goBack() {
@@ -187,24 +190,29 @@
 				    url:'./notice/notice'
 				});
 			},
-			goMeasures() {
+			getMeasures(){
 				getMeasureDetail({id: this.detailData.id}).then(res => {
 					if(res.code == 100){
 						if(res.data.baseMeasures && res.data.baseMeasures.length>0 ){
 							console.log('111111')
-							uni.navigateTo({
-							  url: `/pages/tabBar/responsivity/showMeasures?data=` + encodeURIComponent(JSON.stringify(res.data))
-							})
+							this.cityMessage = '查看措施反馈';
+							this.measureData = res.data;
 						}else {
-							uni.navigateTo({
-							  url: `/pages/tabBar/notice/measures?data=` + encodeURIComponent(JSON.stringify(this.detailData))
-							})
+							this.cityMessage = '响应措施反馈';
 						}
 					}
 				})
-				
-				
-
+			},
+			goMeasures() {
+				if(this.cityMessage == '查看措施反馈' ){
+					uni.navigateTo({
+					  url: `/pages/tabBar/responsivity/showMeasures?data=` + encodeURIComponent(JSON.stringify(this.measureData))
+					})
+				}else {
+					uni.navigateTo({
+					  url: `/pages/tabBar/notice/measures?data=` + encodeURIComponent(JSON.stringify(this.detailData))
+					})
+				}
 			},
 			//审核通过
 			approved() {
diff --git a/pages/tabBar/notice/measures.vue b/pages/tabBar/notice/measures.vue
index 6aa6d4b..dedf4ce 100644
--- a/pages/tabBar/notice/measures.vue
+++ b/pages/tabBar/notice/measures.vue
@@ -133,6 +133,8 @@
 							title: '提交成功'
 						});
 						this.goBack();
+					}else{
+						 uni.$u.toast(res.msg)
 					}
 				})
 				
diff --git a/pages/tabBar/notice/notice.vue b/pages/tabBar/notice/notice.vue
index 211adbd..e2111ae 100644
--- a/pages/tabBar/notice/notice.vue
+++ b/pages/tabBar/notice/notice.vue
@@ -172,7 +172,7 @@
 		},
 		methods: {
 			getNoticeList() {
-        this.loading = true
+				this.loading = true
 				this.noSpeak = 0;
 				// this.data.searchParams.readStatus = this.isReadOnly ? 0 : null;
 				this.data.searchParams.readStatus = null;
diff --git a/pages/tabBar/responsivity/countyResponsivity.vue b/pages/tabBar/responsivity/countyResponsivity.vue
index b5ab7cc..735e428 100644
--- a/pages/tabBar/responsivity/countyResponsivity.vue
+++ b/pages/tabBar/responsivity/countyResponsivity.vue
@@ -20,7 +20,7 @@
 			      <th></th>
 			      <th>处理情况</th>
 				  <th v-if="unittype == 4">叫应时间</th>
-			      <th v-else>叫应率</th>
+			      <th v-else>转发叫应率</th>
 				  <th v-if="unittype == 4">反馈</th>
 				  <th v-else>详情</th>
 			    </tr>
@@ -74,7 +74,8 @@
 			console.log("data",test)
 			this.title = test.title;
 			this.tableData = test.appPageResponseByIdRespDTOS;
-			this.unittype = test.unittype;
+			this.unittype = this.tableData[0].unittype;
+			console.log("unittype",this.tableData)
 			this.tableData.forEach((item,index) => {
 				this.tableData[index].response = item.responseStatus ==1 ? '待叫应' :item.responseStatus == 2 ? '已叫应' :'超时未叫应'
 				this.tableData[index].responsivity = item.forwardRate ? item.forwardRate :'--';
@@ -109,11 +110,11 @@
 						}
 					})
 				}else {
-					// uni.showToast({
-					// 	icon: 'none',
-					// 	title: '无转发',
-					// 	duration: 3000
-					// })
+					uni.showToast({
+						icon: 'none',
+						title: '暂无下级转发数据',
+						duration: 3000
+					})
 				}
 			},
 			toDetail(item){

--
Gitblit v1.9.2