From 42feb0af0ae1d486d0474c76711fdb67c778bcf3 Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期六, 28 六月 2025 10:04:30 +0800
Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/leshan-laboratory

---
 culture/src/views/strainReportLibrary/reportLibraryOne/components/approval/index.vue |   31 +++++++++++++++++++++++++++----
 1 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/culture/src/views/strainReportLibrary/reportLibraryOne/components/approval/index.vue b/culture/src/views/strainReportLibrary/reportLibraryOne/components/approval/index.vue
index 386036d..8eff015 100644
--- a/culture/src/views/strainReportLibrary/reportLibraryOne/components/approval/index.vue
+++ b/culture/src/views/strainReportLibrary/reportLibraryOne/components/approval/index.vue
@@ -1,5 +1,5 @@
 <template>
-    <el-dialog  :title="dialogTitle" :visible.sync="visible" width="80%" @open="open" po :close-on-click-modal="false"
+    <el-dialog :title="dialogTitle" :visible.sync="visible" width="80%" @open="open" po :close-on-click-modal="false"
         @close="handleClose">
         <div class="approval-dialog" :style="{ height: obj?.isDetail ? '50vh' : '40vh' }">
             <!-- 左侧审批内容 -->
@@ -55,6 +55,19 @@
                             <el-form-item prop="reportContent" style="margin-top: 38px">
                                 <ai-editor :readOnly="true" :value="form.reportContent" style="width: 100%;"
                                     placeholder="请输入报告正文" />
+                            </el-form-item>
+
+                            <div class="header-title" style="width: 100%;">
+                                <div class="header-title-left">
+                                    <img src="@/assets/public/headercard.png" />
+                                    <span>附件</span>
+                                </div>
+                            </div>
+                            <el-form-item prop="name" style="margin-top: 38px">
+                                <el-upload action="#" :file-list="fileList" disabled list-type="text" :on-preview="handlePreview">
+                                    <el-button size="small" type="primary">点击上传</el-button>
+                                    <div slot="tip" class="el-upload__tip">支持任意格式文件上传</div>
+                                </el-upload>
                             </el-form-item>
 
                             <div class="header-title" style="width: 100%;">
@@ -190,6 +203,7 @@
                 auditPersonName: "",
                 auditTime: ""
             },
+            fileList:[],
             assessmentTable: [
                 {
                     category: '1.该分题的菌种专业知识',
@@ -236,7 +250,7 @@
     computed: {
         dialogTitle() {
 
-            return !this.obj.isDetail? "审批" : "详情";
+            return !this.obj.isDetail ? "审批" : "详情";
         },
         totalScore() {
             return this.assessmentTable.reduce((sum, item) => sum + (item.selectedScore || 0), 0);
@@ -244,7 +258,7 @@
     },
     methods: {
         open() {
-            
+
 
             if (!this.obj.id) {
                 this.$message.error('缺少必要参数');
@@ -260,6 +274,8 @@
                 };
 
                 let arr = data.evaluate.split(',')
+
+                this.fileList = (data.enclosureUrl ? JSON.parse(data.enclosureUrl) : [])
 
                 this.assessmentTable = this.assessmentTable.map((item, index) => {
                     item.selectedScore = Number(arr[index])
@@ -281,7 +297,7 @@
                     ]
                 });
 
-                if (data.status >=2) {
+                if (data.status >= 2) {
                     processData.push({
                         type: data.status >= 2 && data.status != 4 ? "primary" : "danger",
                         mode: "list",
@@ -375,6 +391,13 @@
             this.form.pageSize = size
             this.getList()
         },
+        handlePreview(file) {
+            if (file.url) {
+                window.open(file.url, '_blank');
+            } else {
+                this.$message.warning('无可预览地址');
+            }
+        },
     },
 };
 </script>

--
Gitblit v1.7.1