From bbddbdf9c384b0c34cda34947b358e6aa95ca35c Mon Sep 17 00:00:00 2001
From: GULIMMO <2820890765@qq.com>
Date: Sat, 11 Nov 2023 18:05:49 +0800
Subject: [PATCH] 场所维护修改

---
 subPackage/workbench/views/editExamine.vue |   17 ++++++++++-------
 pages.json                                 |    2 +-
 subPackage/workbench/views/cshw.vue        |   15 +++++++++++----
 3 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/pages.json b/pages.json
index 1df850e..710dc46 100644
--- a/pages.json
+++ b/pages.json
@@ -237,7 +237,7 @@
 				{
 					"path": "views/editExamine",
 					"style": {
-						"navigationBarTitleText": "场合维护",
+						"navigationBarTitleText": "场所维护",
 						"enablePullDownRefresh": false,
 						"navigationBarBackgroundColor": "#fff",
 						"navigationBarTextStyle": "black"
diff --git a/subPackage/workbench/views/cshw.vue b/subPackage/workbench/views/cshw.vue
index e7db3b2..36c834c 100644
--- a/subPackage/workbench/views/cshw.vue
+++ b/subPackage/workbench/views/cshw.vue
@@ -66,12 +66,14 @@
 				tabStatus: 1,
 				keyWord: '',
 				loadingStatus: 'nomore',
-				clickInfo: {}
+				clickInfo: {},
+				currentRole: {}
 			}
 		},
 		onShow() {
 			this.resetParams()
-			this.getSiteList()
+			this.getSiteList()
+			this.currentRole = uni.getStorageSync("activeRole")
 		},
 		onReachBottom() {
 			this.pagingParams.current++
@@ -129,7 +131,11 @@
 				})
 				return res
 			},
-			pushPage(placeId, id) {
+			pushPage(placeId, id) {
+				const { roleAlias } = this.currentRole
+				if (roleAlias === "inhabitant") {
+					return
+				}
 				this.$u.func.globalNavigator(`/subPackage/workbench/views/examine?id=${id}&placeId=${placeId}`)
 			}
 		}
@@ -166,7 +172,8 @@
 			padding: 10rpx 0;
 
 			.address {
-				width: 65%;
+				width: 65%;
+				text-align: right;
 			}
 		}
 	}
diff --git a/subPackage/workbench/views/editExamine.vue b/subPackage/workbench/views/editExamine.vue
index 07a0ba3..d7edc75 100644
--- a/subPackage/workbench/views/editExamine.vue
+++ b/subPackage/workbench/views/editExamine.vue
@@ -45,7 +45,7 @@
 		<u-button type="success" plain class="add-person" @click="addPerson">在加一人</u-button>
 		<view class="btn-group">
 			<u-button class="btn-item" type="primary" @click="submit">提交</u-button>
-			<u-button class="btn-item">我上报的事件</u-button>
+			<u-button class="btn-item" @click="pushPage">我上报的事件</u-button>
 		</view>
 	</div>
 </template>
@@ -66,7 +66,8 @@
 		data() {
 			return {
 				form: {
-					id: '',
+					id: '',
+					placeId: '',
 					localtion: '',
 					placeName: '',
 					legalPerson: '',
@@ -92,8 +93,7 @@
 					}
 				},
 				personNum: 1,
-				curSelectSite: {},
-				placeId: '',
+				curSelectSite: {},
 			}
 		},
 		onShow() {
@@ -113,7 +113,6 @@
 						})
 						return
 					}
-					this.placeId = data.placeId
 					const placePractitioner = data?.placePractitioner || []
 					Object.keys(this.form).forEach(key => {
 						this.form[key] = data[key]
@@ -124,8 +123,9 @@
 					})
 					this.personNum = placePractitioner.length
 					this.$nextTick(() => {
+						console.log(placePractitioner);
 						this.$refs.formItemRef.forEach((item, index) => {
-							item.form = this.$refs.formItemRef[index].form
+							item.form = placePractitioner[index]
 						})
 					})
 				})
@@ -159,11 +159,14 @@
 			submit() {
 				const placePractitioner = []
 				this.$refs.formItemRef.forEach(item => {
-					item.form.placeId = this.placeId
+					item.form.placeId = this.form.placeId
 					placePractitioner.push(item.form)
 				})
 				this.form.placePractitioner = placePractitioner
 				this.updatePlaceExt(this.form)
+			},
+			pushPage() {
+				this.$u.func.globalNavigator('/subPackage/workbench/views/cshw')
 			}
 		}
 	}

--
Gitblit v1.9.3