From 419ad623db22db5fa34e88ab771d2161fe12e920 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期二, 01 八月 2023 16:08:25 +0800
Subject: [PATCH] 提交上拉加载

---
 pages/tabBar/notice/detail.vue |   55 ++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 46 insertions(+), 9 deletions(-)

diff --git a/pages/tabBar/notice/detail.vue b/pages/tabBar/notice/detail.vue
index b08bcb3..28aee18 100644
--- a/pages/tabBar/notice/detail.vue
+++ b/pages/tabBar/notice/detail.vue
@@ -25,14 +25,22 @@
 					border-color="white">
 				</u-tag>
 			</view>
-			<text class="textTop"><b>发布单位:</b>{{detailData.publishingUnit}}</text>
+			<text class="textTop" v-if="detailData.forwardPath" style="display: flex;"><b>发布单位:</b>
+				<text v-for="(item,index) in detailData.forwardPath">
+					<text v-if="index !=detailData.forwardPath.length-1">
+						{{item}}>
+					</text>
+					<text v-else>{{item}}</text>
+				</text>
+			</text>
+			<text class="textTop" v-else><b>发布单位:</b>{{detailData.publishingUnit}}</text>
 			<text class="textTop"><b>短信内容:</b><i style="background-color: rgb(240, 248, 255);">{{detailData.content}}发布单位:{{detailData.publishingUnit}}</i></text>
 			<view style="display: flex;">
 				<text class="textTop" style="width: 76px;" ><b>附件内容:</b></text>
 				<view class="attache" v-if="isAllImg == 'no'">
 					<view v-for="(item, index) in detailData.attachments" :key="index" >
 							<view  style="display: flex;margin-top: 10px;" v-if="item.suffix == 'jpg'|| item.suffix =='jpeg' || item.suffix =='png'"> 
-								<image  @click="previewSqs(item)" :src="item.attachment" style="width: 100rpx; height: 100rpx;margin-left: 5rpx;border: 3px solid #ccc;margin-right: 3px;"></image>
+								<image  @click="previewSqs(item,index)" :src="item.attachment" style="width: 100rpx; height: 100rpx;margin-left: 5rpx;border: 3px solid #ccc;margin-right: 3px;"></image>
 							</view>
 							<view style="display: flex;margin-top: 10px;" @click="openFile(item)" v-else>
 								<u-icon name="attach" color="#2979ff" size="20"></u-icon> {{item.attachementName}}
@@ -52,7 +60,7 @@
 				</view>
 				
 <!-- 				<view style="width: 100%; height: 100px;">
-					<web-view src="http://192.168.0.38:8086/uploadtest/2023/naturalDisaster/Warninginfo/0619/79e33942cb9548788f1f3196a2058c37.doc"></web-view>
+					<iframe :src="" width="100%" height="100%"> </iframe>
 				</view> -->
 				
 			</view>
@@ -102,8 +110,8 @@
 			</view>
 		<!-- 	//村级显示 -->
 		</view>
-		<view class="measures">
-			<u-button class="resBtn" type="primary" @click="goMeasures">响应措施反馈</u-button>
+		<view class="measures" v-if="unitType == 4">
+			<u-button class="resBtn" type="primary" @click="goMeasures" v-if="role == '工作人员'">响应措施反馈</u-button>
 		</view>
 	</view>
 </template>
@@ -112,6 +120,7 @@
 	import VUE_APP_BASE_URL from '../../../common/constant.js'
 	import { submit } from '../../../api/examine.js'
 	import { publishInfo } from '../../../api/information.js'
+	import { getMeasureDetail } from '../../../api/notice.js'
 	export default {
 		data() {
 			return {
@@ -133,15 +142,29 @@
 				submitData: {
 					id: null,
 					reviewStatus: null
-				}
+				},
+				role: '',
+				unitType: ''
 			}
 		},
 		 onLoad:function(options){
+			this.role = uni.getStorageSync('roleName');
 			 //获取手机状态栏高度
 			this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight'];
 		    let test = options.data && JSON.parse(decodeURIComponent(options.data));
 			this.detailData = test;
-			
+			// if(this.detailData.forwardPath){
+			// 	this.detailData.publishingUnit = this.detailData.forwardPath.map((item,index) => {
+			// 		if(index ==  this.detailData.forwardPath.length){
+			// 			return item 
+			// 		}else {
+			// 			return item + '>'
+			// 		}
+					
+			// 	})
+			// }
+			this.unitType = uni.getStorageSync('unittype');
+			console.log("this.unitType",this.unitType);
 			if(this.detailData.role == 'leader' || this.detailData.role == 'infoPeople' ) {
 				this.detailData.attachments = this.detailData.attachment;
 				if (this.detailData.attachments){
@@ -176,9 +199,23 @@
 				});
 			},
 			goMeasures() {
-				uni.navigateTo({
-				  url: `/pages/tabBar/notice/measures?data=` + encodeURIComponent("2")
+				getMeasureDetail({id: this.detailData.id}).then(res => {
+					if(res.code == 100){
+						if(res.data.id){
+							console.log('111111')
+							uni.navigateTo({
+							  url: `/pages/tabBar/responsivity/showMeasures?data=` + encodeURIComponent(JSON.stringify(res.data))
+							})
+						}else {
+							uni.navigateTo({
+							  url: `/pages/tabBar/notice/measures?data=` + encodeURIComponent(JSON.stringify(this.detailData))
+							})
+						}
+					}
 				})
+				
+				
+
 			},
 			//审核通过
 			approved() {

--
Gitblit v1.9.2