From 3c797428bd595aac4195cf45f4ea7304daa8f029 Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期一, 19 十月 2026 15:20:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/CNAS/process/method/methodVerification/component/ViewTestRecord.vue | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/views/CNAS/process/method/methodVerification/component/ViewTestRecord.vue b/src/views/CNAS/process/method/methodVerification/component/ViewTestRecord.vue
index 309eba1..02b4ad2 100644
--- a/src/views/CNAS/process/method/methodVerification/component/ViewTestRecord.vue
+++ b/src/views/CNAS/process/method/methodVerification/component/ViewTestRecord.vue
@@ -1,7 +1,7 @@
<template>
<div>
- <el-dialog v-model="filesDialogVisible" title="闄勪欢涓婁紶" width="80%" @closed="closeFilesLook">
- <div style="display: flex;justify-content: space-between;">
+ <el-dialog v-model="filesDialogVisible" :title="readOnly ? '鏌ョ湅闄勪欢' : '闄勪欢涓婁紶'" width="80%" @closed="closeFilesLook">
+ <div v-if="!readOnly" style="display: flex;justify-content: space-between;">
<el-upload ref='upload'
:action="fileAction"
:auto-upload="true"
@@ -17,7 +17,7 @@
<div>
<lims-table
ref="yearTable"
- :column="columnData"
+ :column="readOnly ? readonlyColumnData : columnData"
:height="'calc(100vh - 47em)'"
:highlightCurrentRow="true"
:table-data="tableData"
@@ -36,8 +36,16 @@
export default {
name: 'ViewTestRecord',
+ props: { readOnly: { type: Boolean, default: false } },
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: { limsTable },
+ computed: {
+ readonlyColumnData() {
+ return this.columnData.map(column => column.dataType === 'action'
+ ? { ...column, operation: column.operation.filter(item => item.name !== '鍒犻櫎') }
+ : column)
+ }
+ },
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
@@ -122,6 +130,7 @@
},
// 鍒犻櫎
delete (row) {
+ if (this.readOnly) return
this.tableLoading = true
delVerifyMethodFileList({methodFileId:row.methodFileId}).then(res => {
this.tableLoading = false
@@ -137,6 +146,7 @@
},
// 涓婁紶楠岃瘉
fileBeforeUpload(file) {
+ if (this.readOnly) return false
let flag = true
if (file.size > 1024 * 1024 * 10) {
this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
--
Gitblit v1.9.3