From ef51ae09decb4e016a849d8a5d96be7f44dafc4f Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Wed, 17 Jan 2024 19:28:20 +0800
Subject: [PATCH] 修复问题

---
 subPackage/workbench/views/hotelReportDetail.vue |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/subPackage/workbench/views/hotelReportDetail.vue b/subPackage/workbench/views/hotelReportDetail.vue
index 0ae43ee..45d1e3b 100644
--- a/subPackage/workbench/views/hotelReportDetail.vue
+++ b/subPackage/workbench/views/hotelReportDetail.vue
@@ -209,7 +209,6 @@
 		},
 		onLoad(option) {
 			this.taskId = option.id;
-
 			let roleName = uni.getStorageSync("activeRole").roleName
 			if (roleName == "居民") {
 				this.roleType = 2;
@@ -222,7 +221,7 @@
 		},
 
 		onShow() {
-			this.getDetailInfo(this.taskId);
+			this.getDetailInfo();
 		},
 
 		methods: {
@@ -241,15 +240,15 @@
 				}
 			},
 
-			getDetailInfo(id) {
+			getDetailInfo() {
 				getHotelReportingDetail({
-					taskId: id
+					taskId: this.taskId
 				}).then(res => {
 					console.log(res);
 					let data = res.data;
 					this.id = data.id;
 					this.basicData.forEach(item => {
-						item.value = data[item.name]
+						item.value = data[item.name] || "未完善"
 					})
 					this.status = data.confirmFlag;
 					this.remark = data.confirmNotion;
@@ -279,7 +278,7 @@
 					id: this.id,
 					taskId: this.taskId,
 					status: val.type,
-					remark: val.remark
+					confirmNotion: val.remark
 				}
 
 				setHotelReporting(data).then(res => {
@@ -311,7 +310,7 @@
 
 			navToEdit() {
 				uni.navigateTo({
-					url: `/subPackage/label/hotel?id=${this.id}`
+					url: `/subPackage/label/hotel?id=${this.taskId}`
 				})
 			}
 

--
Gitblit v1.9.3