From 21dc6e9b203ea15fd8837e88c080a4339ceb5271 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 07 五月 2025 16:32:24 +0800
Subject: [PATCH] 1.质量监督计划-完成报告可以上传pdf

---
 src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
index efd399a..85207e1 100644
--- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
+++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
@@ -85,7 +85,7 @@
     </el-dialog>
     <!--棰勮鎶ュ憡-->
     <el-dialog :visible.sync="lookDialogVisible" fullscreen title="鏌ョ湅闄勪欢" top="5vh" width="800px">
-      <filePreview v-if="lookDialogVisible" :currentFile="{}"
+      <filePreview v-if="lookDialogVisible" :currentFile="{}" :option="option"
         :fileUrl="javaApi + '/word/' + currentInfo.finishReportUrl" style="height: 70vh;overflow-y: auto;" />
       <div>
         鎵瑰噯鐘舵�侊細
@@ -153,7 +153,7 @@
       <div style="margin: 0 auto;">
         <el-upload ref="upload1" :action="action1" :auto-upload="false"
           :data="{ qualityMonitorDetailsId: qualityMonitorDetailsId }" :file-list="fileList1" :headers="uploadHeader"
-          :limit="1" :on-change="beforeUpload1" :on-error="onError1" :on-success="onSuccess1" accept='.doc,.docx' drag
+          :limit="1" :on-change="beforeUpload1" :on-error="onError1" :on-success="onSuccess1" accept='.doc,.docx,application/pdf,' drag
           name="file">
           <i class="el-icon-upload"></i>
           <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
@@ -569,7 +569,8 @@
       ratifyRemark: '',
       downloadDialog: false,
       download: {},
-      planYear: ''
+      planYear: '',
+      option: {}
     };
   },
   mounted() {
@@ -802,6 +803,23 @@
       if (row.finishReportUrl) {
         this.currentInfo = row
         this.ratifyStatus = row.ratifyStatus
+        const userName = this.nickName
+        const isPdf = /\.pdf$/i.test(row.finishReportUrl)
+        if (isPdf) {
+          this.option = {
+            url: this.javaApi + "/word/" + row.finishReportUrl,
+            isEdit: false,
+            fileType: 'pdf',
+            title: '鎶ュ憡',
+            lang: 'zh-CN',
+            isPrint: false,
+            user_id: 1,
+            user_name: userName,
+            editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + row.finishReportUrl
+          }
+        } else {
+          this.option = {}
+        }
         this.lookDialogVisible = true
       } else {
         this.uploadDia1 = true

--
Gitblit v1.9.3