From a2299a6d4a6f99e9c11132138f5d3e9ec68f03ea Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 06 六月 2025 19:19:34 +0800
Subject: [PATCH] 开发更新

---
 h5/pages/polling/detail.vue |   82 +++++++++++++++++++++++++++++++----------
 1 files changed, 62 insertions(+), 20 deletions(-)

diff --git a/h5/pages/polling/detail.vue b/h5/pages/polling/detail.vue
index 383395d..228733e 100644
--- a/h5/pages/polling/detail.vue
+++ b/h5/pages/polling/detail.vue
@@ -34,16 +34,22 @@
 				<view class="content">
 					<view class="head">
 						<view>{{item.pointName}}</view>
-						<view class="status" :class="{ gray: item.status == 1 }">{{ item.status == 1 ? '宸插贰妫�' : '寰呭贰妫�' }}</view>
+						<view class="status" :class="{ gray: item.status == 1 }">
+							<image v-if="item.status == 1" src="@/static/plan_ic_finish@2x.png" class="icon" mode=""></image>
+							<text>{{ item.status == 1 ? '宸插贰妫�' : '寰呭贰妫�' }}</text>
+						</view>
 					</view>
 					<template v-if="item.status == 1">
 						<view class="line">
 							<view class="la">宸℃缁撴灉锛�</view>
-							<view class="val" :class="{ red: item.dealStatus == 1 }">{{ item.dealStatus == 0 ? '姝e父' : '寮傚父' }}</view>
+							<view class="val" :class="{ red: item.dealStatus == 1 }">{{ item.dealStatus == 0 ? '姝e父' : item.dealStatus == 1 ? '寮傚父' : '-' }}</view>
 						</view>
 						<view class="line">
 							<view class="la">宸℃鏃堕棿锛�</view>
-							<view class="val">{{item.dealDate}}</view>
+							<view class="val">
+								<text>{{item.dealDate}}</text>
+								<text @click="detailClick(item)" v-if="item.status == 1" class="detail">鏌ョ湅璇︽儏</text>
+							</view>
 						</view>
 					</template>
 					<view class="desc" v-else>{{item.content}}</view>
@@ -54,6 +60,7 @@
 			<view class="sub_btn">鎵爜宸℃</view>
 		</view>
 		<!--  -->
+	
 		<view class="reader-box" @click="stopScan" v-if="isScaning">
 			<view class="reader" id="reader"></view>
 		</view>
@@ -76,7 +83,8 @@
 				id: '',
 				info: {},
 				list: [],
-				flag: false,
+				flag: false,
+				userInfo: uni.getStorageSync('userInfo') || {},
 				statusM: [{
 						color: '#4593f7',
 						name: '寰呭紑濮�'
@@ -95,16 +103,18 @@
 					},
 				],
 				html5Qrcode: null,
-				isScaning: false,
+				isScaning: false,
+				
+				
 			};
 		},
 		onLoad(option) {
 			this.id = option.id
+			// this.getDetail()
+		},
+		onShow() {
 			this.getDetail()
 		},
-		// onShow() {
-		// 	this.getDetail()
-		// },
 		methods: {
 			openSc() {
 				this.isScaning = true;
@@ -120,10 +130,12 @@
 							},
 							(decodeText, decodeResult) => {
 								if (decodeText) { //杩欓噷decodeText灏辨槸閫氳繃鎵弿浜岀淮鐮佸緱鍒扮殑鍐呭
-									this.stopScan(); //鍏抽棴鎵爜鍔熻兘
+									this.stopScan(); //鍏抽棴鎵爜鍔熻兘
+									const index = decodeText.indexOf('ywid')
+									let pointCode = decodeText.slice(index + 5)
 									getPointRecordByCode({
 										taskId: this.id,
-										pointCode: decodeText
+										pointCode
 									}).then(ress => {
 										if (ress.data) {
 											uni.navigateTo({
@@ -149,12 +161,18 @@
 				if (this.html5Qrcode) {
 					this.html5Qrcode.stop();
 				}
-			},
+			},
+			
 			itemClick(item) {
 				if (!this.flag) return
 				uni.navigateTo({
 					url: '/pages/polling/point?id=' + item.id
 				})
+			},
+			detailClick(item) {
+				uni.navigateTo({
+					url: '/pages/polling/point?id=' + item.id
+				})
 			},
 			getDetail() {
 				const {
@@ -163,8 +181,10 @@
 				ywPatrolDetail(id).then(res => {
 					this.info = res.data
 					let time = new Date(res.data.startDate).getTime()
-					console.log('res.data.startDate', new Date().getTime());
-					this.flag = new Date().getTime() > time
+					console.log('res.data.startDate', new Date().getTime());
+					if(res.data.userIds.indexOf(this.userInfo.id) > -1){
+						this.flag = new Date().getTime() > time && (this.info.status == 0 || this.info.status == 1 || this.info.status == 2)
+					}
 				})
 				ywPatrolTaskRecord({
 					capacity: 999,
@@ -268,14 +288,15 @@
 			margin-bottom: 20rpx;
 
 			.la {
-				color: #666666;
+				color: #666666;
+				
 			}
 		}
 
 		.list {
-			height: calc(100vh - 720rpx);
-			overflow: auto;
-
+			height: calc(100vh - 490rpx);
+			overflow: auto;
+			padding-bottom: 160rpx;
 			.item {
 				width: 690rpx;
 				height: 188rpx;
@@ -288,7 +309,18 @@
 				margin-bottom: 20rpx;
 
 				.line {
-					margin-bottom: 10rpx;
+					margin-bottom: 10rpx;
+					width: 100%;
+					.val{
+						display: flex;
+						justify-content: space-between;
+						align-items: center;
+						flex: 1;
+						.detail{
+							color: $primaryColor;
+							font-size: 26rpx;
+						}
+					}
 				}
 
 				.icon {
@@ -311,9 +343,19 @@
 						margin-bottom: 16rpx;
 
 						.status {
-							offset-anchor: 28rpx;
+							font-size: 28rpx;
 							color: $primaryColor;
-							font-weight: 400;
+							font-weight: 400;
+							display: flex;
+							align-items: center;
+							.icon{
+								width: 40rpx;
+								height: 40rpx;
+								// border-radius: 50%;
+								// overflow: hidden;
+								background: none;
+							}
+							
 						}
 
 						.gray {

--
Gitblit v1.9.3