From 4ca375b2e3dae98d6ececc1b7b421a12f3fa8a26 Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期二, 01 七月 2025 09:00:38 +0800
Subject: [PATCH] 修改bug,验收通过

---
 laboratory/src/views/reportLibrary/projectProposalLibrary/components/approval/index.vue |   48 ++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/laboratory/src/views/reportLibrary/projectProposalLibrary/components/approval/index.vue b/laboratory/src/views/reportLibrary/projectProposalLibrary/components/approval/index.vue
index 85868ae..ae1bf80 100644
--- a/laboratory/src/views/reportLibrary/projectProposalLibrary/components/approval/index.vue
+++ b/laboratory/src/views/reportLibrary/projectProposalLibrary/components/approval/index.vue
@@ -57,6 +57,17 @@
                                     placeholder="请输入报告正文" />
                             </el-form-item>
 
+                            <div class="header-title" style="width: 100%">
+                <div class="header-title-left">
+                  <img src="@/assets/public/headercard.png" />
+                  <div>附件</div>
+                </div>
+              </div>
+              <el-form-item prop="name" style="margin-top: -18px">
+                <el-upload action="#" :file-list="fileList" :on-preview="handlePreview" disabled>
+                </el-upload>
+              </el-form-item>
+
                         </el-form>
                     </template>
                     <!-- <SelectMember ref="selectMember" /> -->
@@ -78,7 +89,7 @@
                             <div class="resolve" :class="status == '2' && 'activeStatus'" @click.stop="status = 2">
                                 通过
                             </div>
-                            <div class="reject" :class="status == '3' && 'activeStatus'" @click.stop="status = 3">
+                            <div class="reject" :class="status == '4' && 'activeStatus'" @click.stop="status = 4">
                                 驳回
                             </div>
                         </div>
@@ -96,7 +107,7 @@
         </div>
         <div slot="footer" class="dialog-footer">
             <el-button @click="handleClose">{{obj.isDetail ? '关闭' : '取 消'}}</el-button>
-            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">通过</el-button>
+            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">确定</el-button>
         </div>
     </el-dialog>
 </template>
@@ -105,6 +116,8 @@
 import ApprovalProcess from '@/components/approvalProcess'
 import AiEditor from '@/components/AiEditor'
 import { getDetail } from '../../service';
+import { customUploadRequest, getFullUrl } from "@/utils/utils";
+import apiConfig from '@/utils/baseurl';
 
 
 export default {
@@ -144,8 +157,10 @@
                 updateBy: "",
                 auditRemark: "",
                 auditPersonName: "",
+                feasibilityReportFiles: [],
                 auditTime: ""
             },
+            fileList: [],
             tableData: [],
             rules: {},
             status: "2",
@@ -158,6 +173,18 @@
         },
     },
     methods: {
+        getFullUrl,
+        handlePreview(file) {
+            console.log('url', file)
+            if (file && file.url) {
+                if (file.url && file.url.startsWith(apiConfig.showImgUrl)) {
+                    window.open(file.url, '_blank');
+                }else{
+                    let newUrl=apiConfig.showImgUrl+file.url;
+                    window.open(newUrl, '_blank');
+                }
+            }
+        },
         open() {
             if (!this.obj.id) {
                 this.$message.error('缺少必要参数');
@@ -171,6 +198,23 @@
                     ...data,
                     processData: []
                 };
+                if (
+            data.feasibilityReportFiles &&
+            data.feasibilityReportFiles.length > 0
+          ) {
+            this.fileList =
+              data.feasibilityReportFiles.map((file) => {
+                return {
+                  name: file.fileName,
+                  url: getFullUrl(file.fileUrl),
+                  uid: file.id,
+                };
+              });
+            this.form.feasibilityReportFiles =data.feasibilityReportFiles;
+          } else {
+            this.fileList = [];
+            this.form.feasibilityReportFiles = [];
+          }
 
                 this.tableData = data.projectTeam ?
                     [{ ...data.projectTeam, staffName: data.staffNames || '' }] :

--
Gitblit v1.7.1