فهرست منبع

fix:修改企业端、审核端监审文书预览实际的文书,修改任务制定-成本调查表查看模板问题

luzhixia 1 ماه پیش
والد
کامیت
fac7177367

+ 16 - 10
src/components/task/mounTaskComponents/auditNoticeTab.vue

@@ -680,18 +680,19 @@
           id: row.id,
         }).then((res) => {
           if (res.state) {
-            this.fileUrl = res.value || ''
+            // this.fileUrl = res.value || ''
+            this.handleViewScan(res.value || '')
           } else {
             this.$message.error('获取文件URL失败')
           }
         })
         // this.handleTemplateChange()
-        this.documentDialogVisible = true
-        getCostProjectDocumentFile({
-          id: row.id,
-        }).then((res) => {
-          this.costDocumentTemplateFiles = res.value || []
-        })
+        // this.documentDialogVisible = true
+        // getCostProjectDocumentFile({
+        //   id: row.id,
+        // }).then((res) => {
+        //   this.costDocumentTemplateFiles = res.value || []
+        // })
       },
       handleDocumentTypeClick(data) {
         this.activeDocumentTypeId = data.id
@@ -1140,9 +1141,14 @@
           this.$message.error('暂无文件!')
           return
         }
-        const encodedUrl = encodeURIComponent(
-          Base64.encode(window.context.form + fileUrl)
-        )
+        let _fileUrl = ''
+        if (fileUrl.startsWith('http')) {
+          _fileUrl = fileUrl
+        } else {
+          fileUrl = window.context.form + fileUrl
+        }
+        // 对文件URL进行Base64编码
+        const encodedUrl = encodeURIComponent(Base64.encode(_fileUrl))
         window.open(`${host}:8012/onlinePreview?url=${encodedUrl}`)
       },
       handleUploadClick(row) {

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

@@ -512,18 +512,19 @@
           id: row.id,
         }).then((res) => {
           if (res.state) {
-            this.fileUrl = res.value || ''
+            // this.fileUrl = res.value || ''
+            this.handleViewScan(res.value || '')
           } else {
             this.$message.error('获取文件URL失败')
           }
         })
         // this.handleTemplateChange()
-        this.documentDialogVisible = true
-        getCostProjectDocumentFile({
-          id: row.id,
-        }).then((res) => {
-          this.costDocumentTemplateFiles = res.value || []
-        })
+        // this.documentDialogVisible = true
+        // getCostProjectDocumentFile({
+        //   id: row.id,
+        // }).then((res) => {
+        //   this.costDocumentTemplateFiles = res.value || []
+        // })
       },
       handleDocumentTypeClick(data) {
         this.activeDocumentTypeId = data.id
@@ -826,10 +827,14 @@
           this.$message.error('暂无文件!')
           return
         }
+        let _fileUrl = ''
+        if (fileUrl.startsWith('http')) {
+          _fileUrl = fileUrl
+        } else {
+          fileUrl = window.context.form + fileUrl
+        }
         // 对文件URL进行Base64编码
-        const encodedUrl = encodeURIComponent(
-          Base64.encode(window.context.form + fileUrl)
-        )
+        const encodedUrl = encodeURIComponent(Base64.encode(_fileUrl))
 
         // 构建 kkFileView 预览URL
         // onlinePreview - 在线预览

+ 15 - 10
src/components/task/taskInfo.vue

@@ -1936,18 +1936,19 @@
           id: row.id,
         }).then((res) => {
           if (res.state) {
-            this.fileUrl = res.value || ''
+            // this.fileUrl = res.value || ''
+            this.handleViewScan(res.value || '')
           } else {
             this.$message.error('获取文件URL失败')
           }
         })
         // this.handleTemplateChange()
-        this.documentDialogVisible = true
-        getCostProjectDocumentFile({
-          id: row.id,
-        }).then((res) => {
-          this.costDocumentTemplateFiles = res.value || []
-        })
+        // this.documentDialogVisible = true
+        // getCostProjectDocumentFile({
+        //   id: row.id,
+        // }).then((res) => {
+        //   this.costDocumentTemplateFiles = res.value || []
+        // })
       },
       // 关闭监审文书查看弹窗
       handleDocCancel() {
@@ -1963,10 +1964,14 @@
           this.$message.error('暂无文件!')
           return
         }
+        let _fileUrl = ''
+        if (fileUrl.startsWith('http')) {
+          _fileUrl = fileUrl
+        } else {
+          fileUrl = window.context.form + fileUrl
+        }
         // 对文件URL进行Base64编码
-        const encodedUrl = encodeURIComponent(
-          Base64.encode(window.context.form + fileUrl)
-        )
+        const encodedUrl = encodeURIComponent(Base64.encode(_fileUrl))
 
         // 构建 kkFileView 预览URL
         // onlinePreview - 在线预览

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

@@ -326,18 +326,19 @@
           id: row.id,
         }).then((res) => {
           if (res.state) {
-            this.fileUrl = res.value || ''
+            // this.fileUrl = res.value || ''
+            this.handleViewScan(res.value || '')
           } else {
             this.$message.error('获取文件URL失败')
           }
         })
         // this.handleTemplateChange()
-        this.documentDialogVisible = true
-        getCostProjectDocumentFile({
-          id: row.id,
-        }).then((res) => {
-          this.costDocumentTemplateFiles = res.value || []
-        })
+        // this.documentDialogVisible = true
+        // getCostProjectDocumentFile({
+        //   id: row.id,
+        // }).then((res) => {
+        //   this.costDocumentTemplateFiles = res.value || []
+        // })
       },
       // 查看文件
       handleViewScan(fileUrl) {
@@ -345,10 +346,14 @@
           this.$message.error('暂无文件!')
           return
         }
+        let _fileUrl = ''
+        if (fileUrl.startsWith('http')) {
+          _fileUrl = fileUrl
+        } else {
+          fileUrl = window.context.form + fileUrl
+        }
         // 对文件URL进行Base64编码
-        const encodedUrl = encodeURIComponent(
-          Base64.encode(window.context.form + fileUrl)
-        )
+        const encodedUrl = encodeURIComponent(Base64.encode(_fileUrl))
 
         // 构建 kkFileView 预览URL
         // onlinePreview - 在线预览

+ 1 - 0
src/views/costAudit/auditInfo/auditManage/auditDocumentsMain.vue

@@ -61,6 +61,7 @@
               上传附件
             </el-button>
             <el-button
+              v-if="getDocumenType(scope.row).includes('送达回证')"
               type="text"
               size="mini"
               @click="handleViewScan(scope.row.scanDocumentUrl)"

+ 18 - 0
src/views/costAudit/baseInfo/catalogManage/surveyDialog.vue

@@ -862,6 +862,24 @@
         this.contentEditForm.dynamicTable.dynamicTables =
           this.flattenHierarchy(allRows)
       },
+      flattenHierarchy(rows) {
+        const sortedRows = []
+        const parentMap = {}
+        rows.forEach((row) => {
+          parentMap[row.parentid] = parentMap[row.parentid] || []
+          parentMap[row.parentid].push(row)
+        })
+        function addRows(parentId) {
+          if (parentMap[parentId]) {
+            parentMap[parentId].forEach((row) => {
+              sortedRows.push(row)
+              addRows(row.rowid)
+            })
+          }
+        }
+        addRows(-1)
+        return sortedRows
+      },
       // 字符串转对象数组
       stringToObjects(str) {
         if (!str || typeof str !== 'string') return []

+ 9 - 4
src/views/costAudit/projectInfo/auditTaskManage/taskCustomizedRelease/auditNoticeTab.vue

@@ -53,7 +53,7 @@
           </template>
           <template #scanDocumentUrl="scope">
             <el-button
-              v-if="!isView"
+              v-if="!isView && getDocumenType(scope.row).includes('送达回证')"
               type="text"
               size="mini"
               @click="handleUploadScan(scope.row, 'scanDocumentUrl')"
@@ -61,6 +61,7 @@
               上传附件
             </el-button>
             <el-button
+              v-if="getDocumenType(scope.row).includes('送达回证')"
               type="text"
               size="mini"
               @click="handleViewScan(scope.row.scanDocumentUrl)"
@@ -951,10 +952,14 @@
           this.$message.error('暂无文件!')
           return
         }
+        let _fileUrl = ''
+        if (fileUrl.startsWith('http')) {
+          _fileUrl = fileUrl
+        } else {
+          fileUrl = window.context.form + fileUrl
+        }
         // 对文件URL进行Base64编码
-        const encodedUrl = encodeURIComponent(
-          Base64.encode(window.context.form + fileUrl)
-        )
+        const encodedUrl = encodeURIComponent(Base64.encode(_fileUrl))
 
         // 构建 kkFileView 预览URL
         // onlinePreview - 在线预览