Ver código fonte

fix:修改附件图标

luzhixia 1 semana atrás
pai
commit
adc81a5782

+ 1 - 1
src/components/costAudit/UploadComponent.vue

@@ -533,7 +533,7 @@
   // 删除按钮
   .file-item .delete-btn {
     margin-left: 10px;
-    color: #909399;
+    color: #f56c6c;
     cursor: pointer;
     font-size: 16px;
     padding: 4px;

+ 1 - 1
src/components/task/components/auditOpinion.vue

@@ -72,7 +72,7 @@
         </el-form-item>
         <el-form-item label="被审核单位反馈附件:">
           <div v-if="feedbackForm.feedbackMaterial" class="file-item">
-            <i class="el-icon-document"></i>
+            <i class="iconfont-5039297 icon-wenjian"></i>
             <span
               class="file-link"
               @click="handleFileView(feedbackForm.feedbackMaterial)"

+ 1 - 1
src/components/task/components/extractMaterial.vue

@@ -69,7 +69,7 @@
             v-if="scope.row.attachmentUrl"
             type="text"
             size="small"
-            icon="el-icon-document"
+            icon="iconfont-5039297 icon-wenjian"
             @click="handlePreviewAttachment(scope.row)"
           >
             查看

+ 1 - 0
src/components/task/components/workDraft.vue

@@ -78,6 +78,7 @@
             v-if="scope.row.attachmentUrl"
             type="text"
             size="small"
+            icon="iconfont-5039297 icon-wenjian"
             @click="handlePreviewWorkingPaperAttachment(scope.row)"
           >
             查看

+ 1 - 1
src/components/task/taskInfo.vue

@@ -765,7 +765,7 @@
                       :key="index"
                       class="file-item"
                     >
-                      <i class="el-icon-document"></i>
+                      <i class="iconfont-5039297 icon-wenjian"></i>
                       <span>{{ file.name }}</span>
                     </div>
                     <div

+ 4 - 0
src/styles/costAudit.scss

@@ -58,3 +58,7 @@
   border-bottom: 1px solid #eee;
 }
 
+.el-tooltip__popper {
+  max-width: 600px; // 可根据需要调整宽度
+  white-space: normal; // 允许内容换行
+}

+ 1 - 1
src/views/EntDeclaration/auditTaskManagement/components/AuditOpinionTab.vue

@@ -71,7 +71,7 @@
             :key="index"
             class="file-item"
           >
-            <i class="el-icon-document"></i>
+            <i class="iconfont-5039297 icon-wenjian"></i>
             <span>{{ file.name || file }}</span>
           </div>
           <div

+ 1 - 1
src/views/costAudit/auditInfo/auditManage/auditOpinion.vue

@@ -84,7 +84,7 @@
         </el-form-item>
         <el-form-item label="被监审单位反馈资料:">
           <div v-if="feedbackForm.feedbackMaterial" class="file-item">
-            <i class="el-icon-document"></i>
+            <i class="iconfont-5039297 icon-wenjian"></i>
             <span
               class="file-link"
               @click="handleFileView(feedbackForm.feedbackMaterial)"

+ 1 - 1
src/views/costAudit/auditInfo/auditManage/collectiveMain.vue

@@ -76,7 +76,7 @@
               placement="top"
             >
               <el-button type="text" @click="handleViewAttachment(scope.row)">
-                <i class="el-icon-document"></i>
+                <i class="iconfont-5039297 icon-wenjian"></i>
               </el-button>
             </el-tooltip>
           </template>

+ 1 - 1
src/views/costAudit/auditInfo/auditManage/extractMaterial.vue

@@ -73,7 +73,7 @@
             v-if="scope.row.attachmentUrl"
             type="text"
             size="small"
-            icon="el-icon-document"
+            icon="iconfont-5039297 icon-wenjian"
             @click="handlePreviewAttachment(scope.row)"
           >
             查看

+ 32 - 4
src/views/costAudit/auditInfo/auditManage/workDraft.vue

@@ -29,7 +29,13 @@
       border
     >
       <!-- <el-table-column type="selection" width="55"></el-table-column> -->
-      <el-table-column prop="id" label="序号" width="80">
+      <el-table-column
+        prop="id"
+        label="序号"
+        width="80 "
+        header-align="center"
+        align="center"
+      >
         <template slot-scope="scope">
           {{ scope.$index + 1 }}
         </template>
@@ -38,31 +44,53 @@
         prop="auditSubject"
         label="核增核减科目"
         width="180"
+        header-align="center"
+        align="left"
       ></el-table-column>
       <el-table-column
         prop="basicInfo"
         label="基本情况"
         width="200"
+        header-align="center"
+        align="left"
+      ></el-table-column>
+      <el-table-column
+        prop="auditDesc"
+        label="核增核减说明"
+        header-align="center"
+        align="center"
       ></el-table-column>
-      <el-table-column prop="auditDesc" label="核增核减说明"></el-table-column>
       <el-table-column
         prop="auditTime"
         label="时间"
         width="180"
+        header-align="center"
+        align="center"
       ></el-table-column>
-      <el-table-column label="附件" width="120">
+      <el-table-column
+        label="附件"
+        width="120"
+        header-align="center"
+        align="center"
+      >
         <template slot-scope="scope">
           <el-button
             v-if="scope.row.attachmentUrl"
             type="text"
             size="small"
+            icon="iconfont-5039297 icon-wenjian"
             @click="handlePreviewWorkingPaperAttachment(scope.row)"
           >
             查看
           </el-button>
         </template>
       </el-table-column>
-      <el-table-column label="操作" width="150">
+      <el-table-column
+        label="操作"
+        width="150"
+        header-align="center"
+        align="center"
+      >
         <template slot-scope="scope">
           <el-button
             type="text"

+ 1 - 1
src/views/costAudit/baseInfo/statistics/components/auditOpinion.vue

@@ -72,7 +72,7 @@
         </el-form-item>
         <el-form-item label="被审核单位反馈附件:">
           <div v-if="feedbackForm.feedbackMaterial" class="file-item">
-            <i class="el-icon-document"></i>
+            <i class="iconfont-5039297 icon-wenjian"></i>
             <span
               class="file-link"
               @click="handleFileView(feedbackForm.feedbackMaterial)"

+ 47 - 0
src/views/costAudit/baseInfo/statistics/components/extractMaterial.vue

@@ -52,6 +52,26 @@
         show-overflow-tooltip
       ></el-table-column>
       <el-table-column
+        prop="attachmentUrl"
+        label="附件"
+        width="100"
+        header-align="center"
+        align="center"
+      >
+        <template slot-scope="scope">
+          <el-button
+            v-if="scope.row.attachmentUrl"
+            type="text"
+            size="small"
+            icon="iconfont-5039297 icon-wenjian"
+            @click="handlePreviewAttachment(scope.row)"
+          >
+            查看
+          </el-button>
+          <span v-else style="color: #909399">-</span>
+        </template>
+      </el-table-column>
+      <el-table-column
         prop="createTime"
         label="提取时间"
         width="100"
@@ -637,6 +657,33 @@
         this.extractForm.attachmentUrl = ''
         this.$message.info(`${file.name} 已移除`)
       },
+      // 预览附件
+      handlePreviewAttachment(row) {
+        if (!row || !row.attachmentUrl) {
+          this.$message.warning('该记录没有附件')
+          return
+        }
+
+        try {
+          // 处理文件URL
+          let _fileUrl = ''
+          if (row.attachmentUrl.startsWith('http')) {
+            _fileUrl = row.attachmentUrl
+          } else {
+            _fileUrl =
+              (window.context && window.context.form) + row.attachmentUrl
+          }
+
+          // 对文件URL进行Base64编码
+          const encodedUrl = encodeURIComponent(Base64.encode(_fileUrl))
+
+          // 构建 kkFileView 预览URL
+          window.open(`${host}:8012/onlinePreview?url=${encodedUrl}`)
+        } catch (e) {
+          console.error('文件预览失败: ', e)
+          this.$message.error('文件预览失败')
+        }
+      },
 
       // 格式化日期
       formatDate(row, column, cellValue) {

+ 38 - 11
src/views/costAudit/baseInfo/statistics/components/workDraft.vue

@@ -75,9 +75,10 @@
       >
         <template slot-scope="scope">
           <el-button
-            v-if="scope.row.attachments && scope.row.attachments.length > 0"
+            v-if="scope.row.attachmentUrl"
             type="text"
             size="small"
+            icon="iconfont-5039297 icon-wenjian"
             @click="handlePreviewWorkingPaperAttachment(scope.row)"
           >
             查看
@@ -567,18 +568,44 @@
       },
 
       handlePreviewWorkingPaperAttachment(row) {
-        const attachments =
-          row.attachments && Array.isArray(row.attachments)
-            ? row.attachments
-            : []
-        if (attachments.length === 0) {
-          this.$message.info('暂无附件')
+        if (!row || !row.attachmentUrl) {
+          this.$message.warning('该记录没有附件')
           return
         }
-        this.$message({
-          type: 'info',
-          message: `预览附件:${attachments.join(', ')}`,
-        })
+
+        // 获取附件URL,如果是逗号分隔的字符串,取第一个
+        let attachmentUrl = ''
+        if (typeof row.attachmentUrl === 'string') {
+          attachmentUrl = row.attachmentUrl.split(',')[0].trim()
+        } else if (Array.isArray(row.attachmentUrl)) {
+          attachmentUrl = row.attachmentUrl[0]
+        } else {
+          attachmentUrl = row.attachmentUrl
+        }
+
+        if (!attachmentUrl) {
+          this.$message.warning('该记录没有附件')
+          return
+        }
+
+        try {
+          // 处理文件URL
+          let _fileUrl = ''
+          if (attachmentUrl.startsWith('http')) {
+            _fileUrl = attachmentUrl
+          } else {
+            _fileUrl = (window.context && window.context.form) + attachmentUrl
+          }
+
+          // 对文件URL进行Base64编码
+          const encodedUrl = encodeURIComponent(Base64.encode(_fileUrl))
+
+          // 构建 kkFileView 预览URL
+          window.open(`${host}:8012/onlinePreview?url=${encodedUrl}`)
+        } catch (e) {
+          console.error('文件预览失败: ', e)
+          this.$message.error('文件预览失败')
+        }
       },
 
       // 文件上传前验证

+ 0 - 1
src/views/costAudit/projectInfo/auditProjectManage/memoManage/index.vue

@@ -248,7 +248,6 @@
       :title="formTitle"
       :visible.sync="isEditDialogOpen"
       width="650px"
-      center
       :close-on-click-modal="false"
     >
       <el-form

+ 1 - 1
src/views/costAudit/projectInfo/auditProjectManage/memoManage/memoManageMixin.js

@@ -592,7 +592,7 @@ export const memoManageMixin = {
     },
 
     handleEdit(row) {
-      this.formTitle = '编辑备忘录'
+      this.formTitle = '修改备忘录'
       this.formDisabled = false
       this.getMemoDetail(row)
     },