From 8690e8f223d07cc4aedc3f7c1a38316f223b20cc Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期一, 19 十月 2026 17:11:42 +0800
Subject: [PATCH] feat(quality-monitor): 重构质量监控计划模块并集成检验任务流程

---
 src/views/CNAS/process/method/methodVerification/component/calibrationsFileDia.vue |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/src/views/CNAS/process/method/methodVerification/component/calibrationsFileDia.vue b/src/views/CNAS/process/method/methodVerification/component/calibrationsFileDia.vue
index cccee81..04ca9c0 100644
--- a/src/views/CNAS/process/method/methodVerification/component/calibrationsFileDia.vue
+++ b/src/views/CNAS/process/method/methodVerification/component/calibrationsFileDia.vue
@@ -2,6 +2,8 @@
   <div>
     <el-dialog v-model="filesDialogVisible" title="鏌ョ湅鏍″噯璇佷功" width="80%" @closed="closeFilesLook">
       <div>
+        <el-alert v-if="!tableLoading && tableData.length === 0" type="info" :closable="false"
+                  title="鎵�閫夎澶囨殏鏃犳牎鍑嗚瘉涔�"/>
         <limsTable
           ref="yearTable"
           :column="columnData"
@@ -18,7 +20,7 @@
       fullscreen
       title="鏌ョ湅闄勪欢" top="5vh" width="800px">
       <filePreview v-if="lookDialogVisible" :currentFile="{}"
-                   :fileUrl="javaApi+'/img/'+currentInfo.fileUrl" style="max-height: 90vh;overflow-y: auto;"/>
+                   :fileUrl="fileUrl(currentInfo)" style="max-height: 90vh;overflow-y: auto;"/>
     </el-dialog>
   </div>
 </template>
@@ -27,6 +29,7 @@
 import filePreview from '@/components/Preview/filePreview.vue';
 import limsTable from '@/components/Table/lims-table.vue'
 import file from '@/utils/file';
+import { getCurrentCalibrationFiles } from '@/api/cnas/process/method/methodVerification'
 
 export default {
   name: 'calibrationsFileDia',
@@ -88,10 +91,24 @@
   },
   // 鏂规硶闆嗗悎
   methods: {
-    openDia(row) {
+    fileUrl(row) {
+      const image = /\.(png|jpe?g|gif|bmp|webp)$/i.test(row.fileUrl || '')
+      return this.javaApi + (image ? '/img/' : '/word/') + row.fileUrl
+    },
+    openDia(row = {}) {
       this.filesDialogVisible = true
       this.info = row
-      this.tableData = this.info.calibrationsFileList
+      this.tableData = row.calibrationsFileList || []
+      if (row.useCurrentDevices) {
+        const deviceIds = [...new Set((row.machineAttachmentList || []).map(device => device.deviceId).filter(Boolean))]
+        if (!deviceIds.length) return
+        this.tableLoading = true
+        getCurrentCalibrationFiles({deviceIds: deviceIds.join(',')}).then(res => {
+          if (res.code === 200) this.tableData = res.data || []
+        }).finally(() => {
+          this.tableLoading = false
+        })
+      }
     },
     closeFilesLook () {
       this.filesDialogVisible = false
@@ -104,7 +121,7 @@
     // 涓嬭浇
     upload (row) {
       let url = '';
-      if(row.type==1){
+      if (/\.(png|jpe?g|gif|bmp|webp)$/i.test(row.fileUrl || '')) {
         url = this.javaApi+'/img/'+row.fileUrl
         file.downloadIamge(url,row.fileName)
       }else{

--
Gitblit v1.9.3