From 964faa1077a89713910063c39ebe08fac4e4c56e Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期四, 24 七月 2025 17:44:18 +0800
Subject: [PATCH] 企业维修适配修改

---
 pages/device/deviceWebDeils/deviceWebDeils.vue |  850 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 423 insertions(+), 427 deletions(-)

diff --git a/pages/device/deviceWebDeils/deviceWebDeils.vue b/pages/device/deviceWebDeils/deviceWebDeils.vue
index dceca9c..8b19167 100644
--- a/pages/device/deviceWebDeils/deviceWebDeils.vue
+++ b/pages/device/deviceWebDeils/deviceWebDeils.vue
@@ -1,467 +1,463 @@
 <template>
-	<view class="container">
-		<cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask">
-			<block slot="backText">杩斿洖</block>
-			<block slot="content">璁惧璇︽儏</block>
-			<block slot="right">
-				<view @click="goHome">
-					<image class="search" src="/static/icon/icon_home.png" style="width: 25px; height: 25px;" alt="" />
-				</view>
-			</block>
-		</cu-custom>
-		<view class="container">
+  <view class="container">
+    <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask">
+      <block slot="backText">杩斿洖</block>
+      <block slot="content">璁惧璇︽儏</block>
+      <!-- 			<block slot="right">
+              <view @click="goHome">
+                <image class="search" src="/static/icon/icon_home.png" style="width: 25px; height: 25px;" alt="" />
+              </view>
+            </block> -->
+    </cu-custom>
+    <view class="container">
+      <uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext">
+        <uni-group top="1">
+          <uni-forms-item :label-width="100" required name="num" label="璁惧缂栧彿:">
+            <uni-easyinput v-model="formData.equipmentCode" :disabled="true"/>
+          </uni-forms-item>
 
+          <uni-forms-item :label-width="100" name="remark" label="璁惧鍚嶇О:">
+            <uni-easyinput v-model="formData.equipmentName" :disabled="true"/>
+          </uni-forms-item>
+          <view class="text-gray margin-bottom-lg">鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�� 鍩烘湰淇℃伅 鈥斺�斺�斺�斺�斺�斺�斺�斺�斺��</view>
+          <uni-forms-item :label-width="100" name="taskCode" label="缁翠慨鐘舵��:">
+            <uni-easyinput :disabled="true" v-model="formData.repairStatus_dictText"/>
+          </uni-forms-item>
+          <uni-forms-item :label-width="100" name="endLocation" label="淇濆吇鐘舵��:">
+            <uni-easyinput :disabled="true" v-model="formData.maintenanceStatus_dictText"/>
 
-			<uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext">
-				<uni-group top="1">
+          </uni-forms-item>
+          <uni-forms-item :label-width="100" name="endLocation" label="浣跨敤杞﹂棿:">
+            <uni-easyinput :disabled="true" v-model="formData.orgId_dictText"/>
 
-					<uni-forms-item :label-width="100" required name="num" label="璁惧缂栧彿:">
-						<uni-easyinput v-model="formData.equipmentCode" :disabled="true" />
-					</uni-forms-item>
+          </uni-forms-item>
 
-					<uni-forms-item :label-width="100" name="remark" label="璁惧鍚嶇О:">
-						<uni-easyinput v-model="formData.equipmentName" :disabled="true" />
-					</uni-forms-item>
-					<!-- <uni-forms-item :label-width="100" name="outNum" label="鍏抽敭璁惧鏍囪瘑:">
-					<uni-easyinput v-model="formData.equipmentImportance" :disabled="true" />
-				</uni-forms-item> -->
-					<view class="text-gray margin-bottom-lg">鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�� 鍩烘湰淇℃伅 鈥斺�斺�斺�斺�斺�斺�斺�斺�斺��</view>
-					<uni-forms-item :label-width="100" name="taskCode" label="缁翠慨鐘舵��:">
-						<uni-easyinput :disabled="true" v-model="formData.repairStatus_dictText" />
-					</uni-forms-item>
-					<uni-forms-item :label-width="100" name="endLocation" label="淇濆吇鐘舵��:">
-						<uni-easyinput :disabled="true" v-model="formData.maintenanceStatus_dictText" />
+          <uni-forms-item :label-width="100" name="endLocation" label="瀹夎浣嶇疆:">
+            <uni-easyinput :disabled="true" v-model="formData.installationPosition"/>
+          </uni-forms-item>
+          <uni-forms-item :label-width="100" name="endLocation" label="鎶�鏈姸鎬�:">
+            <uni-easyinput :disabled="true" v-model="formData.technologyStatus_dictText"/>
+          </uni-forms-item>
+          <uni-forms-item :label-width="100" name="endLocation" label="璁惧绠$悊鍛�:">
+            <uni-easyinput :disabled="true" v-model="formData.equipmentManager_dictText"/>
+          </uni-forms-item>
+          <uni-forms-item :label-width="100" name="endLocation" label="鍑哄巶鏃ユ湡:">
+            <uni-easyinput :disabled="true" v-model="formData.leaveFactoryDate"/>
+          </uni-forms-item>
+          <uni-forms-item :label-width="100" name="outNum" label="璁惧鏂囨。:">
+            <uni-file-picker v-model="fileLists" :extension="['.pdf']" @fail="uploadFail"
+                             :list-styles="listStyles" :delIcon="del" :max-count="5" file-mediatype="all"
+                             @downloadFile="downloadFile" @select="onFileSelect" @delete="onFileDelete">
+              <button size="mini" type="primary">鐐瑰嚮涓婁紶</button>
+            </uni-file-picker>
+          </uni-forms-item>
+        </uni-group>
+      </uni-forms>
+      <view class="file-list margin-sm">
+        <view class="file-item" v-for="(file, index) in this.selectedFiles" :key="index">
+          <view class="file-icon">
+            <!-- 鏂囦欢鍥炬爣 -->
+            <image src="/static/icon_file.png" style="height: 25px;  width: 25px; margin-right: 10px;"
+                   mode='aspectFit' class="zai-logo "></image>
 
-					</uni-forms-item>
-					<uni-forms-item :label-width="100" name="endLocation" label="浣跨敤杞﹂棿:">
-						<uni-easyinput :disabled="true" v-model="formData.orgId_dictText" />
-
-					</uni-forms-item>
-
-					<uni-forms-item :label-width="100" name="endLocation" label="瀹夎浣嶇疆:">
-						<uni-easyinput :disabled="true" v-model="formData.installationPosition" />
-					</uni-forms-item>
-					<uni-forms-item :label-width="100" name="endLocation" label="鎶�鏈姸鎬�:">
-						<uni-easyinput :disabled="true" v-model="formData.technologyStatus_dictText" />
-					</uni-forms-item>
-					<uni-forms-item :label-width="100" name="endLocation" label="璁惧绠$悊鍛�:">
-						<uni-easyinput :disabled="true" v-model="formData.equipmentManager_dictText" />
-					</uni-forms-item>
-					<uni-forms-item :label-width="100" name="endLocation" label="鍑哄巶鏃ユ湡:">
-						<uni-easyinput :disabled="true" v-model="formData.leaveFactoryDate" />
-					</uni-forms-item>
-				</uni-group>
-			</uni-forms>
-			<view class="file-list margin-sm">
-				<view class="file-item" v-for="(file, index) in this.selectedFiles" :key="index">
-					<view class="file-icon">
-						<!-- 鏂囦欢鍥炬爣 -->
-						<image src="/static/icon_file.png" style="height: 25px;  width: 25px; margin-right: 10px;"
-							mode='aspectFit' class="zai-logo "></image>
-
-					</view>
-					<view class="file-name">
-						<!-- 鏂囦欢鍚� -->
-						{{file.fileName}}
-					</view>
-					<view class="file-actions">
-						<!-- 涓嬭浇鎸夐挳 -->
-						<image v-show="showBtn" src="/static/icon_down.png" @click="downloadFile(file)"
-							style="height: 25px;  width: 25px; margin-right: 10px;"></image>
-					</view>
-				</view>
-			</view>
-			<view class="flex  margin-bottom-xs">
-				<button v-if="authIncludes('eam:reportRepair:add')"  class="flex-sub  cu-btn bg-blue margin-sm   lg" hover-class="is-hover"
-					@click="goReportRepair()">鎶ヤ慨</button>
-				<button class="flex-sub  cu-btn bg-blue margin-sm   lg" hover-class="is-hover"
-					@click="goCheck()">鐐规</button>
-				<button class="flex-sub  cu-btn bg-blue margin-sm   lg" hover-class="is-hover"
-					@click="goBaoZhou()">鍛ㄤ繚</button>
-				<button class="flex-sub  cu-btn bg-blue margin-sm   lg" hover-class="is-hover"
-					@click="goMaintenance()">缁翠慨</button>
-			</view>
-		</view>
-	</view>
+          </view>
+          <view class="file-name">
+            <!-- 鏂囦欢鍚� -->
+            {{ file.fileName }}
+          </view>
+          <view class="file-actions">
+            <!-- 涓嬭浇鎸夐挳 -->
+            <image v-show="showBtn" src="/static/icon_down.png" @click="downloadFile(file)"
+                   style="height: 25px;  width: 25px; margin-right: 10px;"></image>
+          </view>
+        </view>
+      </view>
+      <view class="flex  margin-bottom-xs">
+        <button v-if="authIncludes('eam:reportRepair:add')" class="flex-sub  cu-btn bg-blue margin-sm   lg"
+                hover-class="is-hover"
+                @click="goReportRepair()">鎶ヤ慨
+        </button>
+        <button class="flex-sub  cu-btn bg-blue margin-sm   lg" hover-class="is-hover"
+                @click="goCheck()">鐐规
+        </button>
+        <button class="flex-sub  cu-btn bg-blue margin-sm   lg" hover-class="is-hover"
+                @click="goBaoZhou()">鍛ㄤ繚
+        </button>
+        <button class="flex-sub  cu-btn bg-blue margin-sm   lg" hover-class="is-hover"
+                @click="goMaintenance()">缁翠慨
+        </button>
+      </view>
+    </view>
+  </view>
 </template>
 
 <script>
-	import {
-		stringify
-	} from "querystring";
-	import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
-	import {
-		saveAs
-	} from 'file-saver'; // 寮曞叆 file-saver 搴�
-	export default {
-		mixins: [MescrollMixin], // 浣跨敤mixin
-		data() {
-			return {
+import {
+  stringify
+} from "querystring";
+import {
+  saveAs
+} from 'file-saver'; // 寮曞叆 file-saver 搴�
+export default {
+  data() {
+    return {
+      listStyles: {
+        "borderStyle": {
+          "width": "0", // 杈规瀹藉害
+        },
+        "border": false, // 鏄惁鏄剧ず杈规
+        "dividline": false
+      },
+      formData: {
+        equipmentCode: '',
+        equipmentName: '',
+        repairStatus_dictText: '',
+        maintenanceStatus_dictText: '',
+        orgId_dictText: '',
+        installationPosition: '',
+        technologyStatus_dictText: '',
+        equipmentManager_dictText: '',
+        leaveFactoryDate: ''
+      },
+      fileLists: [],
+      NavBarColor: this.NavBarColor,
+      url: {
+        stallList: "/eam/equipment/queryById",
+        add: 'eam/equipmentAttachment/add',
+        upload: "/eam/sysFiles/batch_upload",
+        downloadFile: 'eam/equipmentAttachment/downloadFile'
+      },
+      id: '',
+      styles: {
+        color: '#2979FF',
+        borderColor: '#2979FF'
+      },
+      msg1Count: 0,
+      msg2Count: 0,
+      msg1Title: ""
+    }
+  },
 
-				formData: {
-					fileLists: []
-				},
-				fileLists: [],
-				NavBarColor: this.NavBarColor,
-				url: {
-					stallList: "/eam/equipment/queryById",
-					add: 'eam/equipmentAttachment/add',
-					upload: "/eam/sysFiles/batch_upload",
-					downloadFile: 'eam/equipmentAttachment/downloadFile'
-				},
-				id: '',
-				upOption: {
-					page: {
-						num: 0, // 褰撳墠椤电爜,榛樿0,鍥炶皟涔嬪墠浼氬姞1,鍗砪allback(page)浼氫粠1寮�濮�
-						size: 10 // 姣忛〉鏁版嵁鐨勬暟閲�
-					},
-					noMoreSize: 4, //濡傛灉鍒楄〃宸叉棤鏁版嵁,鍙缃垪琛ㄧ殑鎬绘暟閲忚澶т簬鍗婇〉鎵嶆樉绀烘棤鏇村鏁版嵁;閬垮厤鍒楄〃鏁版嵁杩囧皯(姣斿鍙湁涓�鏉℃暟鎹�),鏄剧ず鏃犳洿澶氭暟鎹細涓嶅ソ鐪�; 榛樿5
-					empty: {
-						tip: '~ 鏆傛棤鏁版嵁 ~', // 鎻愮ず
-					},
-					loading: '',
-					text: '鍏ㄩ儴',
-					isShowNoMore: false,
-					textNoMore: '鎴戞槸鏈夊簳绾跨殑 >_<'
-				},
-				styles: {
-					color: '#2979FF',
-					borderColor: '#2979FF'
-				},
-				msg1Count: 0,
-				msg2Count: 0,
-				msg1Title: ""
-			}
-		},
-		
-		computed: {
-			authList() {
-				return this.$store.getters.getAuth || []
-			},
-			top() {
-				return this.CustomBar * 2 + 160
-			},
-			style() {
-				var StatusBar = this.StatusBar;
-				var CustomBar = this.CustomBar;
-				var CustomBar = this.CustomBar;
-				var style = `height:${CustomBar}px;padding-top:${StatusBar}px;`;
-				return style
-			},
-		},
-		onLoad(options) {
-			const decodedEquipmentId = decodeURIComponent(options.equipmentId);
-			this.id = decodedEquipmentId;
-			console.log(this.id)
-			if (!this.id) {
-				uni.showModal({
-					title: '鎻愮ず',
-					content: "閿欒涓嶅瓨鍦�",
-					showCancel: false
-				});
-			} else {
-				this.upCallback();
-			}
+  computed: {
+    authList() {
+      return this.$store.getters.getAuth || []
+    },
+    top() {
+      return this.CustomBar * 2 + 160
+    },
+    style() {
+      var StatusBar = this.StatusBar;
+      var CustomBar = this.CustomBar;
+      var CustomBar = this.CustomBar;
+      var style = `height:${CustomBar}px;padding-top:${StatusBar}px;`;
+      return style
+    },
+  },
+  // onLoad(options) {
+  //   const decodedEquipmentId = decodeURIComponent(options.equipmentId);
+  //   this.id = decodedEquipmentId;
+  //   console.log(this.id)
+  //   if (!this.id) {
+  //     uni.showModal({
+  //       title: '鎻愮ず',
+  //       content: "閿欒涓嶅瓨鍦�",
+  //       showCancel: false
+  //     });
+  //   }
+  //
+  // },
+  onUnload() {
+    this.id = null;
+    this.formData = {}; // 娓呯┖鏁版嵁
+    this.fileLists = [];
+  },
+  onLoad(options) {
+    const decodedEquipmentId = decodeURIComponent(options.equipmentId);
+    this.id = decodedEquipmentId;
+    console.log(this.id)
+    if (!this.id) {
+      uni.showModal({
+        title: '鎻愮ず',
+        content: "閿欒涓嶅瓨鍦�",
+        showCancel: false
+      });
+    } else {
+      this.getData(); // 鉁� 鍙墽琛屼竴娆�
+    }
+  },
 
-		},
-		onShow() {
-			// 浠庤矾鐢卞弬鏁颁腑鑾峰彇equipmentId
-			const equipmentIdFromRoute = this.$router.query.equipmentId;
-			if (equipmentIdFromRoute) {
-				// 濡傛灉瀛樺湪锛屾洿鏂皌his.id
-				this.id = equipmentIdFromRoute;
-				// 閲嶆柊鑾峰彇璁惧璇︽儏鏁版嵁
-				this.upCallback();
-			}
-		},
-		watch: {
-			// 鐩戝惉$route鍙樺寲
-			$route(to, from) {
-				// 鏇存柊equipmentId鍙傛暟
-				this.id = to.query.equipmentId;
-				console.log('鏇存柊鍚庣殑equipmentId:', this.equipmentId);
-			}
-		},
-		created() {},
-		methods: {
-			authIncludes(code) {
-				return this.authList.some(auth => auth.action === code)
-			},
-			downloadFile(item) {
-				uni.showModal({
-					title: '鎻愮ず',
-					content: '纭瑕佷笅杞藉悧',
-					cancelText: '鍙栨秷',
-					confirmText: '纭',
-					success: res => {
-						if (res.confirm) {
-							this.downFile(item)
-						}
-					}
-				})
+  created() {
 
-			},
+    this.getFileList();
+  },
+  methods: {
+    getData() {
+      this.$http.get(this.url.stallList, {
+        params: {
+          pageNo: 999,
+          pageSize: 1,
+          order: 'asc',
+          column: 'createTime',
+          id: this.id
+        },
+
+      }).then(res => {
+        this.announcement1 = res.data.result
+        console.log("url", res)
+        //璁剧疆鍒楄〃鏁版嵁
+        if (res.data.success) {
+          console.log("res", res.data.result.equipmentCode)
+          this.formData = this.announcement1
+        }
+      }).catch(() => {
+        //鑱旂綉澶辫触, 缁撴潫鍔犺浇
+      })
+    },
+    authIncludes(code) {
+      return this.authList.some(auth => auth.action === code)
+    },
+    downloadFile(item) {
+      uni.showModal({
+        title: '鎻愮ず',
+        content: '纭瑕佷笅杞藉悧',
+        cancelText: '鍙栨秷',
+        confirmText: '纭',
+        success: res => {
+          if (res.confirm) {
+            this.downFile(item)
+          }
+        }
+      })
+
+    },
 
 
-			downFile(item) {
-				this.$http.download(this.url.downloadFile, {
-					params: {
-						id: item.id
-					},
-					responseType: 'blob' // 纭繚鍝嶅簲绫诲瀷涓� blob
-				}).then(response => {
-					console.log('Response:', response); // 鏌ョ湅瀹屾暣鍝嶅簲缁撴瀯
+    downFile(item) {
+      this.$http.download(this.url.downloadFile, {
+        params: {
+          id: item.id
+        },
+        responseType: 'blob' // 纭繚鍝嶅簲绫诲瀷涓� blob
+      }).then(response => {
+        console.log('Response:', response); // 鏌ョ湅瀹屾暣鍝嶅簲缁撴瀯
 
-					// 鑾峰彇 tempFilePath锛圔lob URL锛�
-					const tempFilePath = response.tempFilePath;
+        // 鑾峰彇 tempFilePath锛圔lob URL锛�
+        const tempFilePath = response.tempFilePath;
 
-					if (!tempFilePath) {
-						uni.showToast({
-							title: '鏂囦欢涓嬭浇澶辫触',
-							icon: 'none'
-						});
-						return;
-					}
+        if (!tempFilePath) {
+          uni.showToast({
+            title: '鏂囦欢涓嬭浇澶辫触',
+            icon: 'none'
+          });
+          return;
+        }
 
-					let fileName = item.fileName;
+        let fileName = item.fileName;
 
-					// 鍒涘缓 <a> 鏍囩骞惰Е鍙戜笅杞�
-					const link = document.createElement('a');
-					link.href = tempFilePath;
-					link.setAttribute('download', fileName);
-					link.style.display = 'none';
+        // 鍒涘缓 <a> 鏍囩骞惰Е鍙戜笅杞�
+        const link = document.createElement('a');
+        link.href = tempFilePath;
+        link.setAttribute('download', fileName);
+        link.style.display = 'none';
 
-					document.body.appendChild(link);
-					link.click();
+        document.body.appendChild(link);
+        link.click();
 
-					// 娓呯悊璧勬簮
-					document.body.removeChild(link);
+        // 娓呯悊璧勬簮
+        document.body.removeChild(link);
 
-				}).catch(err => {
-					console.error('Download error:', err);
-					uni.showToast({
-						title: '鏂囦欢涓嬭浇澶辫触',
-						icon: 'none'
-					});
-				});
-			},
-			getFileList() {
-				this.$http.get(this.url.fileList, {
-					params: {
-						equipmentId: this.id,
-						pageNo: 1,
-						pageSize: 999,
-						column: 'createTime',
-						order: 'desc'
-					},
-				}).then(res => {
-					if (res.data.success) {
-						this.selectedFiles = res.data.result.records || [];
+      }).catch(err => {
+        console.error('Download error:', err);
+        uni.showToast({
+          title: '鏂囦欢涓嬭浇澶辫触',
+          icon: 'none'
+        });
+      });
+    },
+    getFileList() {
+      this.$http.get(this.url.fileList, {
+        params: {
+          equipmentId: this.id,
+          pageNo: 1,
+          pageSize: 999,
+          column: 'createTime',
+          order: 'desc'
+        },
+      }).then(res => {
+        if (res.data.success) {
+          this.selectedFiles = res.data.result.records || [];
 
-					}
-				}).catch(() => {
-					uni.showToast({
-						title: '鑾峰彇鏂囦欢鍒楄〃澶辫触',
-						icon: 'none'
-					});
-				});
-			},
-			uploadFail(e) {
-				console.log('涓婁紶澶辫触锛�', e)
-			},
+        }
+      }).catch(() => {
+        uni.showToast({
+          title: '鑾峰彇鏂囦欢鍒楄〃澶辫触',
+          icon: 'none'
+        });
+      });
+    },
+    uploadFail(e) {
+      console.log('涓婁紶澶辫触锛�', e)
+    },
 
 
+    onFileSelect(e) {
+      const tempFilePaths = e.tempFilePaths;
 
-			onFileSelect(e) {
-				const tempFilePaths = e.tempFilePaths;
+      uni.showLoading({
+        title: '涓婁紶涓�...'
+      });
 
-				uni.showLoading({
-					title: '涓婁紶涓�...'
-				});
+      const uploadPromises = tempFilePaths.map((filePath, index) => {
+        return new Promise((resolve, reject) => {
+          this.$http.upload(this.url.upload, {
+            filePath: filePath,
+            name: 'file'
+          })
+              .then(uploadRes => {
+                const serverFile = uploadRes.data.result[0];
+                console.log(serverFile);
+                // 鎻愬彇fileSuffix骞舵嫾鎺�
+                if (serverFile.fileSuffix && serverFile.fileName && !serverFile
+                    .fileName.includes('.')) {
+                  serverFile.fileName += '.' + serverFile.fileSuffix;
+                }
+                this.fileLists = [];
+                // 闃叉閲嶅娣诲姞锛堟牴鎹� id 鎴� fileName 鍒ゆ柇锛�
+                if (!this.fileLists.some(file => file.id === serverFile.id)) {
+                  this.fileLists.push(serverFile);
+                }
+                resolve();
+              })
+              .catch(err => {
+                console.error(`鏂囦欢 ${index + 1} 涓婁紶澶辫触`, err);
+                uni.showToast({
+                  title: `绗� ${index + 1} 涓枃浠朵笂浼犲け璐,
+                  icon: 'none'
+                });
+                reject(err);
+              });
+        });
+      });
 
-				const uploadPromises = tempFilePaths.map((filePath, index) => {
-					return new Promise((resolve, reject) => {
-						this.$http.upload(this.url.upload, {
-								filePath: filePath,
-								name: 'file'
-							})
-							.then(uploadRes => {
-								const serverFile = uploadRes.data.result[0];
-								console.log(serverFile);
-								// 鎻愬彇fileSuffix骞舵嫾鎺�
-								if (serverFile.fileSuffix && serverFile.fileName && !serverFile
-									.fileName.includes('.')) {
-									serverFile.fileName += '.' + serverFile.fileSuffix;
-								}
-								this.fileLists = [];
-								// 闃叉閲嶅娣诲姞锛堟牴鎹� id 鎴� fileName 鍒ゆ柇锛�
-								if (!this.fileLists.some(file => file.id === serverFile.id)) {
-									this.fileLists.push(serverFile);
-								}
-								resolve();
-							})
-							.catch(err => {
-								console.error(`鏂囦欢 ${index + 1} 涓婁紶澶辫触`, err);
-								uni.showToast({
-									title: `绗� ${index + 1} 涓枃浠朵笂浼犲け璐,
-									icon: 'none'
-								});
-								reject(err);
-							});
-					});
-				});
+      Promise.all(uploadPromises)
+          .then(() => {
+            uni.hideLoading();
+            uni.showToast({
+              title: '鍏ㄩ儴涓婁紶鎴愬姛锛屾鍦ㄦ彁浜�...'
+            });
+            this.submitFileList(); // 鑷姩鎻愪氦鎵�鏈夋枃浠�
+          })
+          .catch(() => {
+            uni.hideLoading();
+            uni.showToast({
+              title: '閮ㄥ垎涓婁紶澶辫触',
+              icon: 'none'
+            });
+          });
+    },
+    // 鏂囦欢鍒犻櫎鍥炶皟
+    onFileDelete(e) {
+      console.log('鍒犻櫎鏂囦欢:', e.index);
+    },
 
-				Promise.all(uploadPromises)
-					.then(() => {
-						uni.hideLoading();
-						uni.showToast({
-							title: '鍏ㄩ儴涓婁紶鎴愬姛锛屾鍦ㄦ彁浜�...'
-						});
-						this.submitFileList(); // 鑷姩鎻愪氦鎵�鏈夋枃浠�
-					})
-					.catch(() => {
-						uni.hideLoading();
-						uni.showToast({
-							title: '閮ㄥ垎涓婁紶澶辫触',
-							icon: 'none'
-						});
-					});
-			},
-			// 鏂囦欢鍒犻櫎鍥炶皟
-			onFileDelete(e) {
-				console.log('鍒犻櫎鏂囦欢:', e.index);
-			},
-
-			// 鍒犻櫎鍗曚釜鏂囦欢
-			deleteFile(index) {
-				this.fileLists.splice(index, 1);
-			},
+    // 鍒犻櫎鍗曚釜鏂囦欢
+    deleteFile(index) {
+      this.fileLists.splice(index, 1);
+    },
 
 
-			submitFileList() {
-				if (!this.fileLists.length) {
-					uni.showToast({
-						title: '娌℃湁鍙彁浜ょ殑鏂囦欢',
-						icon: 'none'
-					});
-					return;
-				}
-				console.log(this.fileLists)
-				this.$http.post(this.url.add, {
-					equipmentId: this.id,
-					fileList: this.fileLists
-				}).then(res => {
-					if (res.data.success) {
-						uni.showToast({
-							title: '鎻愪氦鎴愬姛'
-						});
-						this.getFileList();
-					} else {
-						uni.showToast({
-							title: '鎻愪氦澶辫触',
-							icon: 'none'
-						});
-					}
-				}).catch(err => {
-					uni.showToast({
-						title: '鎻愪氦寮傚父',
-						icon: 'none'
-					});
-					console.error('鎻愪氦澶辫触:', err);
-				});
-			},
-			goHome() {
-				uni.reLaunch({
-					url: '/pages/index/index'
-				})
-			},
-			/**
-			 * 鎶ヤ慨
-			 */
-			goReportRepair() {
-				uni.redirectTo({
-					url: `/pages/reportRepair/reportRepair?equipmentId=${encodeURIComponent(this.id)}`
-				});
-			},
-			/**
-			 * 鐐规
-			 */
-			goCheck() {
-				uni.redirectTo({
-					// url: '/pages/checkList/checkList',
-					url: `/pages/checkList/checkList?equipmentId=${encodeURIComponent(this.id)}`
-				});
-			},
-			/**
-			 * 鍛ㄤ繚
-			 */
-			goBaoZhou() {
-				uni.redirectTo({
-					// url: '/pages/baoZhou/baoZhou',
-					url: `/pages/baoZhou/baoZhou?equipmentId=${encodeURIComponent(this.id)}`
-				});
-			},
-			/**
-			 * 鍛ㄤ繚
-			 */
-			goMaintenance() {
-				uni.redirectTo({
-					// url: '/pages/maintenanceReport/maintenanceReport',
-					url: `/pages/maintenanceReport/maintenanceReport?equipmentId=${encodeURIComponent(this.id)}`
-				});
-			},
-			upCallback() {
-				console.log("id", this.id)
-				this.$http.get(this.url.stallList, {
-					params: {
-						pageNo: 999,
-						pageSize: 1,
-						order: 'asc',
-						column: 'createTime',
-						id: this.id
-					},
+    submitFileList() {
+      if (!this.fileLists.length) {
+        uni.showToast({
+          title: '娌℃湁鍙彁浜ょ殑鏂囦欢',
+          icon: 'none'
+        });
+        return;
+      }
+      console.log(this.fileLists)
+      this.$http.post(this.url.add, {
+        equipmentId: this.id,
+        fileList: this.fileLists
+      }).then(res => {
+        if (res.data.success) {
+          uni.showToast({
+            title: '鎻愪氦鎴愬姛'
+          });
+          this.getFileList();
+        } else {
+          uni.showToast({
+            title: '鎻愪氦澶辫触',
+            icon: 'none'
+          });
+        }
+      }).catch(err => {
+        uni.showToast({
+          title: '鎻愪氦寮傚父',
+          icon: 'none'
+        });
+        console.error('鎻愪氦澶辫触:', err);
+      });
+    },
 
-				}).then(res => {
-					this.announcement1 = res.data.result
-					console.log("url", res)
-					//璁剧疆鍒楄〃鏁版嵁
-					if (res.data.success) {
-						console.log("res", res.data.result.equipmentCode)
-						this.formData = this.announcement1
-					}
-				}).catch(() => {
-					//鑱旂綉澶辫触, 缁撴潫鍔犺浇
-				})
-			},
+    /**
+     * 鎶ヤ慨
+     */
+    goReportRepair() {
+      uni.redirectTo({
+        url: `/pages/reportRepair/reportRepair?equipmentId=${encodeURIComponent(this.id)}`
+      });
+    },
+    /**
+     * 鐐规
+     */
+    goCheck() {
+      uni.redirectTo({
+        // url: '/pages/checkList/checkList',
+        url: `/pages/checkList/checkList?equipmentId=${encodeURIComponent(this.id)}`
+      });
+    },
+    /**
+     * 鍛ㄤ繚
+     */
+    goBaoZhou() {
+      uni.redirectTo({
+        // url: '/pages/baoZhou/baoZhou',
+        url: `/pages/baoZhou/baoZhou?equipmentId=${encodeURIComponent(this.id)}`
+      });
+    },
+    /**
+     * 鍛ㄤ繚
+     */
+    goMaintenance() {
+      uni.redirectTo({
+        // url: '/pages/maintenanceReport/maintenanceReport',
+        url: `/pages/maintenanceReport/maintenanceReport?equipmentId=${encodeURIComponent(this.id)}`
+      });
+    },
 
-			mescrollInit(mescroll) {
-				console.log('mescrollInit')
-				this.mescroll = mescroll;
-			},
-		},
+  },
 
-	}
+}
 </script>
 
 <style>
-	.is-hover {
-		color: rgba(255, 255, 255, 0.6);
-		background-color: #55aaff;
-		border-color: #55aaff;
-	}
+.is-hover {
+  color: rgba(255, 255, 255, 0.6);
+  background-color: #55aaff;
+  border-color: #55aaff;
+}
 
 
+.content {
+  margin-top: 5px;
+}
 
-	.content {
-		margin-top: 5px;
-	}
+.content scroll-view {
+  scrollIndicator: "none"
+}
 
-	.content scroll-view {
-		scrollIndicator: "none"
-	}
-
-	.popupView {
-		margin-top: 85px;
-		height: auto;
-	}
-</style>
\ No newline at end of file
+.popupView {
+  margin-top: 45px;
+  height: auto;
+}
+</style>

--
Gitblit v1.9.3