Bläddra i källkod

feat:修改企业端、审核端监审文书预览实际的文书

luzhixia 1 månad sedan
förälder
incheckning
ffff3c89d7

+ 7 - 3
src/components/costAudit/FilePreview.vue

@@ -19,10 +19,14 @@
         }
 
         try {
+          let fileUrl = ''
+          if (this.fileUrl.startsWith('http')) {
+            fileUrl = this.fileUrl
+          } else {
+            fileUrl = window.context.form + this.fileUrl
+          }
           // 对文件URL进行Base64编码
-          const encodedUrl = encodeURIComponent(
-            Base64.encode(window.context.form + this.fileUrl)
-          )
+          const encodedUrl = encodeURIComponent(Base64.encode(fileUrl))
 
           // 构建 kkFileView 预览URL
           // onlinePreview - 在线预览

+ 11 - 2
src/components/task/mounTaskComponents/auditNoticeTab.vue

@@ -558,7 +558,7 @@
         dialogVisible: false,
         dialogTitle: '选择文号',
         documentDialogVisible: false,
-        documentDialogTitle: '添加监审通知书',
+        documentDialogTitle: '查看监审通知书',
         dialogWidth: '80%',
         fileUrl: '',
         selectDocumentWhData: [],
@@ -675,7 +675,16 @@
         this.document = {
           ...row,
         }
-        this.fileUrl = row.electronicDocumentUrl
+        // 从API中获取文件URL
+        downDocument({
+          id: row.id,
+        }).then((res) => {
+          if (res.state) {
+            this.fileUrl = res.value || ''
+          } else {
+            this.$message.error('获取文件URL失败')
+          }
+        })
         // this.handleTemplateChange()
         this.documentDialogVisible = true
         getCostProjectDocumentFile({

+ 10 - 1
src/components/task/taskComponents/auditNoticeTab.vue

@@ -507,7 +507,16 @@
         this.document = {
           ...row,
         }
-        this.fileUrl = row.electronicDocumentUrl
+        // 从API中获取文件URL
+        downDocument({
+          id: row.id,
+        }).then((res) => {
+          if (res.state) {
+            this.fileUrl = res.value || ''
+          } else {
+            this.$message.error('获取文件URL失败')
+          }
+        })
         // this.handleTemplateChange()
         this.documentDialogVisible = true
         getCostProjectDocumentFile({

+ 12 - 3
src/components/task/taskInfo.vue

@@ -309,7 +309,7 @@
           </div>
         </el-tab-pane>
 
-        <!-- 监审文书 -->
+        <!-- 企业-详情 监审文书 -->
         <el-tab-pane label="监审文书" name="auditDocument">
           <div v-loading="loading" element-loading-text="加载中...">
             <div style="font-size: 14px; margin-bottom: 15px; color: #606266">
@@ -840,7 +840,7 @@
       :visible="documentDialogVisible"
       width="82%"
       :close-on-click-modal="false"
-      :z-index="9300"
+      :z-index="9400"
       :show-confirm-btn="false"
       cancel-text="关闭"
       @cancel="handleDocCancel"
@@ -1931,8 +1931,17 @@
         this.document = {
           ...row,
         }
+        // 从API中获取文件URL
+        downDocument({
+          id: row.id,
+        }).then((res) => {
+          if (res.state) {
+            this.fileUrl = res.value || ''
+          } else {
+            this.$message.error('获取文件URL失败')
+          }
+        })
         // this.handleTemplateChange()
-        this.fileUrl = row.electronicDocumentUrl
         this.documentDialogVisible = true
         getCostProjectDocumentFile({
           id: row.id,

+ 10 - 1
src/views/EntDeclaration/auditTaskManagement/components/AuditDocumentTab.vue

@@ -321,7 +321,16 @@
         this.document = {
           ...row,
         }
-        this.fileUrl = row.electronicDocumentUrl
+        // 从API中获取文件URL
+        downDocument({
+          id: row.id,
+        }).then((res) => {
+          if (res.state) {
+            this.fileUrl = res.value || ''
+          } else {
+            this.$message.error('获取文件URL失败')
+          }
+        })
         // this.handleTemplateChange()
         this.documentDialogVisible = true
         getCostProjectDocumentFile({

+ 12 - 3
src/views/costAudit/auditInfo/auditManage/auditDocumentsMain.vue

@@ -137,7 +137,7 @@
       :visible="documentDialogVisible"
       width="82%"
       :close-on-click-modal="false"
-      :z-index="9200"
+      :z-index="9400"
       @cancel="handleCancel"
       @confirm="handleConfirm"
     >
@@ -312,7 +312,7 @@
       :visible="dialogVisible"
       :width="dialogWidth"
       :close-on-click-modal="false"
-      :z-index="9300"
+      :z-index="9500"
       @cancel="handleCancel"
       @confirm="handleConfirm"
     >
@@ -1076,7 +1076,16 @@
           // 确保isPushed有值,如果row中没有,设置默认值'1'
           isPushed: row.isPushed !== undefined ? row.isPushed : '1',
         }
-        this.fileUrl = this.document.electronicDocumentUrl
+        // 从API中获取文件URL
+        downDocument({
+          id: row.id,
+        }).then((res) => {
+          if (res.state) {
+            this.fileUrl = res.value || ''
+          } else {
+            this.$message.error('获取文件URL失败')
+          }
+        })
         this.getDocumentData()
       },