From 2fda34643bc22e25f6c569415da5f955c81536bf Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期二, 03 六月 2025 09:37:08 +0800
Subject: [PATCH] 设备详情通过ID过滤/设备详情增加上传附件

---
 pages/maintenanceReport/maintenanceReport.vue |   30 +++++++++++++++++++++++++-----
 1 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/pages/maintenanceReport/maintenanceReport.vue b/pages/maintenanceReport/maintenanceReport.vue
index dc80751..28d3333 100644
--- a/pages/maintenanceReport/maintenanceReport.vue
+++ b/pages/maintenanceReport/maintenanceReport.vue
@@ -63,7 +63,8 @@
 
 						<view class="flex">
 							<view class="flex-sub text-light bg-white  padding-xs margin-xs radius">鎿嶄綔:</view>
-							<view class="flex-sub bg-blue padding-xs margin-xs radius text-sm text-center"
+							<view v-if="authIncludes('eam:repair:collect')"
+								class="flex-sub bg-blue padding-xs margin-xs radius text-sm text-center"
 								@click.stop="handleStartWork(item)" hover-class="is-hover">棰嗗彇</view>
 
 						</view>
@@ -116,10 +117,17 @@
 				announcement1: [],
 				msg1Count: 0,
 				msg2Count: 0,
-				msg1Title: ""
+				msg1Title: "",
+				equipmentId: ''
 			}
 		},
+		mounted() {
+			console.log('浠� store 鑾峰彇鐨� auth:', this.$store.getters.getAuth)
+		},
 		computed: {
+			authList() {
+				return this.$store.getters.getAuth || []
+			},
 			top() {
 				return this.CustomBar * 2 + 50
 			},
@@ -132,15 +140,26 @@
 		},
 
 
+
+
 		onShow() {
 			if (this.mescroll) {
 				this.mescroll.resetUpScroll()
 			}
 		},
-
+		onLoad: function(options) {
+			this.equipmentId = options.equipmentId ?
+				decodeURIComponent(options.equipmentId) :
+				'';
+		},
 		created() {},
 		methods: {
-
+			/**
+			 * @param {Object} code鎸夐挳鏉冮檺
+			 */
+			authIncludes(code) {
+				return this.authList.some(auth => auth.action === code)
+			},
 			/**
 			 * 棰嗗彇
 			 */
@@ -204,7 +223,8 @@
 						pageSize: page.size,
 						order: 'desc',
 						column: 'createTime',
-						reportStatus: 'WAIT_REPAIR'
+						reportStatus: 'WAIT_REPAIR',
+						equipmentId: this.equipmentId || ''
 					},
 
 				}).then(res => {

--
Gitblit v1.9.3