diff --git a/src/main/java/com/budwk/app/base/utils/OfficePlusUtil.java b/src/main/java/com/budwk/app/base/utils/OfficePlusUtil.java index bc8dd8cd..30a93a2e 100644 --- a/src/main/java/com/budwk/app/base/utils/OfficePlusUtil.java +++ b/src/main/java/com/budwk/app/base/utils/OfficePlusUtil.java @@ -3,6 +3,7 @@ package com.budwk.app.base.utils; import cn.hutool.core.io.FileUtil; import com.aspose.cells.PdfSaveOptions; import com.aspose.cells.Workbook; +import com.aspose.slides.Presentation; import com.aspose.words.Document; import com.aspose.words.SaveFormat; import com.budwk.app.base.exception.BaseException; @@ -30,11 +31,34 @@ public class OfficePlusUtil { wordConvertPdf(sourcePath, targetPath); } else if (suffix.equals("xls") || suffix.equals("xlsx")) { excelConvertPdf(sourcePath, targetPath); + } else if (suffix.equals("ppt") || suffix.equals("pptx")) { + presentationConvertPdf(sourcePath, targetPath); } else { throw new BaseException("不支持的文档格式"); } } + /** + * PPT演示文稿转PDF + * + * @param sourcePath 源文件路径 + * @param targetPath 目标文件路径 + */ + public static void presentationConvertPdf(String sourcePath, String targetPath) { + Presentation presentation = null; + try { + presentation = new Presentation(sourcePath); + presentation.save(targetPath, com.aspose.slides.SaveFormat.Pdf); + } catch (Exception e) { + log.info("转换pdf报错", e); + throw new BaseException("PPT转换PDF失败"); + } finally { + if (presentation != null) { + presentation.dispose(); + } + } + } + /** * excel转pdf * diff --git a/src/main/resources/views/platform/zhghh5/democratic/congress/materials/list.html b/src/main/resources/views/platform/zhghh5/democratic/congress/materials/list.html index a3857deb..9d9734fc 100644 --- a/src/main/resources/views/platform/zhghh5/democratic/congress/materials/list.html +++ b/src/main/resources/views/platform/zhghh5/democratic/congress/materials/list.html @@ -136,9 +136,7 @@ layout("/layouts/platform_h5.html"){ {text: "PDF", value: "pdf"}, {text: "Word", value: "doc,docx"}, {text: "Excel", value: "xls,xlsx"}, - {text: "PPT", value: "ppt,pptx"}, - {text: "图片", value: "jpg,jpeg,png,gif,bmp,webp"}, - {text: "压缩包", value: "zip,rar"} + {text: "PPT", value: "ppt,pptx"} ] }, uploadTimeSortOptions() { @@ -1440,12 +1438,16 @@ layout("/layouts/platform_h5.html"){ .file-grid-mode .file-card__header .file-name { width: 100%; + height: 34px; + max-height: 34px; + flex: 0 0 34px; display: -webkit-box; overflow: hidden; color: #23344a; font-size: 12px; line-height: 17px; text-align: center; + word-break: break-all; -webkit-box-orient: vertical; -webkit-line-clamp: 2; } diff --git a/src/main/resources/views/platform/zhghh5/democratic/congress/voted.html b/src/main/resources/views/platform/zhghh5/democratic/congress/voted.html index 580bb088..01d43799 100644 --- a/src/main/resources/views/platform/zhghh5/democratic/congress/voted.html +++ b/src/main/resources/views/platform/zhghh5/democratic/congress/voted.html @@ -381,6 +381,32 @@ layout("/layouts/platform_h5.html"){ cursor: default; } + .readonly-option input[type="radio"] { + width: 16px; + height: 16px; + flex: 0 0 16px; + appearance: none; + -webkit-appearance: none; + border: 1px solid #c8d2df; + border-radius: 50%; + background: #fff; + box-sizing: border-box; + opacity: 1; + cursor: default; + } + + .readonly-option input[type="radio"]:checked { + border-color: #1989fa; + background: #1989fa; + box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px rgba(25, 137, 250, 0.14); + } + + .readonly-option input[type="radio"]:checked + .radio-text, + .readonly-option input[type="radio"]:checked + .option-text { + color: #1989fa; + font-weight: 600; + } + .vote-footer { position: fixed; bottom: 0;