From 6f90e7110190d146fde06cf1f5b2272fd49b53d6 Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期一, 19 十月 2026 17:24:09 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
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