diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java index 881d10a4d..b247c544d 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java @@ -1434,8 +1434,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImplthe link,"; String content = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter the link to handle it."; - String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " please enter " + href + " to handle it."; - String msgTitle = "You have a homo parameter task to complete"; + String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter " + href + " and fill in the relevant information."; + String msgTitle = projectInfo.getProjectName() + ": You have a homo parameter task to complete"; // 发送系统消息 SysAnnouncement sysAnnouncement = new SysAnnouncement(); @@ -1563,7 +1563,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImplthe link,"; String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter " + href + " and fill in the relevant information."; - String msgTitle = "You have a homo parameter task to complete"; + String msgTitle = projectInfo.getProjectName() + ": You have a homo parameter task to complete"; // 发送系统消息 SysAnnouncement sysAnnouncement = new SysAnnouncement(); @@ -1697,7 +1697,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImplthe link,"; String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter " + href + " and fill in the relevant information."; - String msgTitle = "You have a homo parameter task to complete"; + String msgTitle = projectInfo.getProjectName() + ": You have a homo parameter task to complete"; // 发送系统消息 SysAnnouncement sysAnnouncement = new SysAnnouncement(); diff --git a/jero-boot/jero-boot-module-system/pom.xml b/jero-boot/jero-boot-module-system/pom.xml index e197885db..8b23d23fd 100644 --- a/jero-boot/jero-boot-module-system/pom.xml +++ b/jero-boot/jero-boot-module-system/pom.xml @@ -70,6 +70,11 @@ org.springframework.cloud spring-cloud-openfeign-core + + com.itextpdf + itext-asian + 5.2.0 + com.lowagie itext diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/util/PDFUtils.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/util/PDFUtils.java index ce9b378c3..c83b6776c 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/util/PDFUtils.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/util/PDFUtils.java @@ -1,26 +1,24 @@ package com.jero.modules.system.util; +import com.itextpdf.text.BaseColor; +import com.itextpdf.text.DocumentException; +import com.itextpdf.text.Element; +import com.itextpdf.text.pdf.*; import com.spire.pdf.PdfDocument; import com.spire.pdf.PdfPageBase; -import com.spire.pdf.graphics.PdfBrushes; import com.spire.pdf.graphics.PdfFont; -import com.spire.pdf.graphics.PdfFontFamily; -import com.spire.pdf.graphics.PdfStringFormat; -import com.spire.pdf.graphics.PdfTextAlignment; -import com.spire.pdf.graphics.PdfTilingBrush; +import com.spire.pdf.graphics.*; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import javax.swing.*; import java.awt.*; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; +import java.io.*; +@Slf4j public class PDFUtils { public static void main(String[] args) throws IOException { File file = new File("E:\\DeskTop\\动态资料\\加入IEEE会员 - 副本 - 副本.pdf"); @@ -84,7 +82,7 @@ public class PDFUtils { page.getCanvas().drawRectangle(brush, loRect); } - public static File PDFWatermark(InputStream in,String uploadpath, String fileName,String waterMark) throws FileNotFoundException { + public static File PDFWatermarkInvalid(InputStream in,String uploadpath, String fileName,String waterMark) throws FileNotFoundException { //创建PdfDocument类的对象 PdfDocument pdf = new PdfDocument(); //加载测试文档 @@ -203,4 +201,109 @@ public class PDFUtils { // } // return buffer; // } + + public static File PDFWatermark(InputStream in,String uploadpath, String fileName,String waterMark) { + + String newFilePath = ""; + // 待加水印的文件 + PdfReader reader = null; + PdfStamper stamper = null; + FileOutputStream os = null; + + try { + byte[] byes = IOUtils.toByteArray(in); + + //生成临时文件 , 读取完删除 + String path = uploadpath + File.separator + fileName; + newFilePath = path.replace(fileName, "transformation" + fileName); + reader = new PdfReader(byes); + + // 加完水印的文件 + os = new FileOutputStream(newFilePath); + stamper = new PdfStamper(reader, os); + + int total = reader.getNumberOfPages() + 1; + BaseFont basefont = BaseFont.createFont("/static/times.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); + // 方法二:这里的字体设置比较关键,这个设置是支持中文的写法 +// BaseFont basefont = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);// 使用系统字体 + + PdfContentByte under; + com.itextpdf.text.Rectangle pageRect = null; + + //水印倾斜角度(0-360) + int angle = 45; + //数值越大每页竖向水印越少 + int heightDensity = 10; + //数值越大每页横向水印越少 + int widthDensity = 1; + int textH = 0; + int textW = 0; + JLabel label = new JLabel(); + FontMetrics metrics; + label.setText(waterMark); + metrics = label.getFontMetrics(label.getFont()); + //字符串的高, 只和字体有关 + textH = metrics.getHeight(); + //字符串的宽 + textW = metrics.stringWidth(label.getText()); + + // 循环对每页插入水印 + for (int i = 1; i < total; i++) { + pageRect = stamper.getReader().getPageSizeWithRotation(i); + + // 获得PDF最顶层 + under = stamper.getOverContent(i); + under.saveState(); + // set Transparency + PdfGState gs = new PdfGState(); + // 设置透明度 + gs.setFillOpacity(0.5f); + under.setGState(gs); + under.restoreState(); + under.beginText(); + under.setFontAndSize(basefont, pageRect.getHeight() / 100); + under.setColorFill(BaseColor.PINK); + + // 水印文字成45度角倾斜 + for (int height = textH; height < pageRect.getHeight() * 3; height = height + textH * heightDensity) { + for (int width = textW; width < pageRect.getWidth() * 1.5 + textW; width = width + textW * widthDensity) { + // rotation:倾斜角度 + under.showTextAligned(Element.ALIGN_CENTER, waterMark, width - textW, height - textH, angle); + } + } + + // 添加水印文字 + under.endText(); + under.setLineWidth(1f); + under.stroke(); + } + + } catch (IOException e) { + e.printStackTrace(); + log.error(e.getMessage()); + + } catch (DocumentException e) { + e.printStackTrace(); + log.error(e.getMessage()); + + } finally { + try { + stamper.close(); + if (os != null) { + os.close(); + } + if (reader != null) { + reader.close(); + } + } catch (DocumentException e) { + e.printStackTrace(); + log.error(e.getMessage()); + + } catch (IOException e) { + e.printStackTrace(); + log.error(e.getMessage()); + } + } + return new File(newFilePath); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/entity/SarFileCompareMenuVo.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/entity/SarFileCompareMenuVo.java index 989d8c554..5bf7d4dde 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/entity/SarFileCompareMenuVo.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/entity/SarFileCompareMenuVo.java @@ -1,5 +1,7 @@ package com.jero.modules.compare.entity; +import com.jero.modules.system.util.StringUtils; + import java.util.ArrayList; import java.util.List; @@ -25,7 +27,10 @@ public class SarFileCompareMenuVo extends SarFileCompareMenu { this.setLeftOrRight(menu.getLeftOrRight()); this.setItemName(menu.getItemName()); this.setKey(menu.getId()); - this.setTitle(menu.getName() + menu.getItemName()); + this.setTitle(menu.getName()); + if(StringUtils.isNoneBlank(menu.getItemName())){ + this.setTitle(menu.getName() + menu.getItemName()); + } this.setRemarks(menu.getRemarks()); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoDataServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoDataServiceImpl.java index f4a81a94b..f33331d00 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoDataServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoDataServiceImpl.java @@ -81,6 +81,7 @@ public class ExtRepoDataServiceImpl extends ServiceImpl { if(item.db_field_name === 'serialNumber') { this.queryParam[item.db_field_name] = this.searchalonesplit + this.queryParam = {...this.queryParam} } }) } @@ -209,6 +211,7 @@ export default { // }, dateChange(item) { this.queryParam[item] = moment(this.queryParam[item]).format('YYYY-MM-DD') + }, onChange(item) { if (this.queryParam[item] && this.queryParam[item].length > 0) { diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index c71311f19..b2974fbfc 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -856,7 +856,37 @@ .table .ant-table-column-title { font-weight: bold; } + + - + - \ No newline at end of file diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/optionMaintenance.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/optionMaintenance.vue index efb36c7bd..959d1be1a 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/optionMaintenance.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/optionMaintenance.vue @@ -41,9 +41,9 @@ -
- {{$t('cancel')}} -
+ + + diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseView.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseView.vue index 4252096b5..1c26d2f4b 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseView.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseView.vue @@ -2,7 +2,7 @@
-
+
@@ -15,76 +15,99 @@
-
-
-
- - {{$t('issuedBy')}}:{{this.queryForm.createBy}} - - - {{$t('releaseDate')}}:{{this.queryForm.createTime?this.queryForm.createTime.slice(0,11):''}} - -
-
-
- {{item.title}} - {{ $t('viewFile') }} +
+
+
+ + + + + + + + +
+
+ {{item.title}} + {{ $t('viewFile') }} - + {{queryForm[item.value]}} +
-
-
-
+
+
+
{{this.queryForm.browsingHistoryCount}} - + {{this.queryForm.praiseCount}} - + {{this.queryForm.collectCount}} -
-
-
- {{$t('comment')}}
-
- - - -
- - - -
-
-
-
-
- {{$t('release')}} - -
-
-
+
+
- {{item.createBy}} - {{item.createTime}} + {{$t('comment')}}
-
- {{item.commentContent}} + + + +
+ + + +
+
+
+
+
+ {{$t('release')}} + +
+
+
+
+ {{item.createBy}} + {{item.createTime}} + + + +
+
+
+ {{item.commentContent}} +
+
+
+
+ {{val.createBy}} + {{val.createTime}} + + + +
+
+
+ {{val.commentContent}} +
+
@@ -92,6 +115,34 @@
+ + + + +
+
+ * + {{$t('replyToComments')}} +
+ + + +
+
+
+
+
@@ -100,6 +151,10 @@ import SelectedBy from '@/components/SelectedBy/index' import { getAction, postAction, downloadFile, putAction } from '@/api/manage' import { mapGetters } from 'vuex' + import 'quill/dist/quill.core.css' + import 'quill/dist/quill.snow.css' + import 'quill/dist/quill.bubble.css' + import { quillEditor } from 'vue-quill-editor' export default { name: 'problemKnowledgeBaseView', @@ -109,6 +164,10 @@ }, data() { return { + visibleComment: false, + confirmLoading: false, + CommentQuery: {}, + formInlineComment: {}, standardContentList: [ { title: this.$t('problemClassification'), @@ -122,9 +181,17 @@ title: this.$t('standardNo'), value: 'standNumber' }, + // { + // title: this.$t('title'), + // value: 'title' + // }, { - title: this.$t('title'), - value: 'title' + title:this.$t('issuedBy'), + value: 'createBy' + }, + { + title:this.$t('releaseDate'), + value: 'createTime' }, { title: this.$t('enclosure'), @@ -134,6 +201,20 @@ ], queryForm: {}, formInline: {}, + rulesComment: { + replyContent: [ + { + required: true, + message: this.$t('replyToComments') + this.$t('cannotEmpty'), + trigger: 'blur' + }, + { + max: 300, + message: this.$t('replyToComments') + this.$t('cannotExceed') + 300 + this.$t('Characters'), + trigger: 'blur' + } + ] + }, rules: { commentContent: [ { @@ -156,6 +237,39 @@ }, methods: { ...mapGetters(['userInfo']), + messageClick(val) { + this.CommentQuery = val + this.visibleComment = true + this.formInlineComment = {} + this.$nextTick(() => { + this.$refs.ruleFormComment.clearValidate() + }) + }, + handleOkComment() { + this.$refs.ruleFormComment.validate(valid => { + if (valid) { + let query = { + commentId: this.CommentQuery.id, + replyContent: this.formInlineComment.replyContent + } + this.confirmLoading = true + postAction('/project/problemKnowledgeBaseReplyEO/add', query).then((res) => { + if (res.success) { + this.$message.success(this.$t('OperationSuccessful')) + this.visibleComment = false + this.confirmLoading = false + this.releaseData() + } else { + this.confirmLoading = false + this.$message.success(this.$t('operationFailed')) + } + }) + } + }) + }, + handleCancelComment() { + this.visibleComment = false + }, SelectedByForm(userIds) { let query = { userIds: userIds, @@ -311,7 +425,6 @@ .doc-detail { background: #fff; height: 100%; - .doc-detail-wrap { .doc-detail-header { width: 100%; @@ -415,7 +528,7 @@ .text-field-right-url { color: #00B3BE !important; cursor: pointer; - margin-top: 10px; + /*margin-top: 10px;*/ } } } @@ -425,6 +538,9 @@ color: #040B29; font-weight: 400; word-break: break-word; + padding: 24px 0; + box-sizing: border-box; + margin-top: 32px; } .content-icon { @@ -449,12 +565,12 @@ } .content-icon-text .icon { - font-size: 24px; + font-size: 20px; color: #3b4249 !important; } .content-icon-text .icon-active { - font-size: 24px; + font-size: 20px; color: #00B3BE !important; } @@ -532,10 +648,80 @@ .content-text-top { width: 100%; text-align: right; - color: #040B29; + color: #6F7385; font-weight: 400; - font-size: 16px; + font-size: 14px; margin-bottom: 20px; } + .doc-detail-box { + width: 100%; + background: #f2f2f2; + } + + .doc-detail-box-text { + width: 75%; + margin: 0 auto; + background: #fff; + /*position: absolute;*/ + min-height: 100vh; + /*left: 50%;*/ + /*transform: translateX(-50%);*/ + } + + .division { + height: 20px; + position: absolute; + left: 0; + width: 100%; + background: #f2f2f2; + margin-top: 20px; + } + + .content-index { + font-size: 14px; + color: #000F16; + font-weight: 400; + word-break: break-word; + padding: 12px 0; + box-sizing: border-box; + } + + .header-text-index { + font-size: 16px; + font-weight: 400; + margin-top: 10px; + height: 35px; + color: #000F16; + line-height: 40px; + } + + .box-icon { + margin-right: 10px; + float: right; + cursor: pointer; + } + + .box-comment { + width: calc(100% - 80px); + margin-left: 80px; + background: #f2f2f2; + padding: 6px 24px; + box-sizing: border-box; + } + + .Required { + color: red; + margin-right: 4px; + } + + .header-text-index-left { + font-size: 16px; + font-weight: 700; + } + + .header-text-index-text { + font-size: 14px; + color: #848684; + } \ No newline at end of file diff --git a/jero-web/src/views/businessSupport/technologyAssessment/components/TermInformation.vue b/jero-web/src/views/businessSupport/technologyAssessment/components/TermInformation.vue index 1ea9fa210..bb0933465 100644 --- a/jero-web/src/views/businessSupport/technologyAssessment/components/TermInformation.vue +++ b/jero-web/src/views/businessSupport/technologyAssessment/components/TermInformation.vue @@ -75,7 +75,8 @@ title: this.$t('clauseNo'), dataIndex: 'itemNum', align: 'center', - ellipsis: true + ellipsis: true, + width: 120 }, { title: this.$t('clauseName'), diff --git a/jero-web/src/views/dashboard/components/myList.vue b/jero-web/src/views/dashboard/components/myList.vue index 48c345398..0779fe942 100644 --- a/jero-web/src/views/dashboard/components/myList.vue +++ b/jero-web/src/views/dashboard/components/myList.vue @@ -11,7 +11,7 @@
{{item.prcName}} - {{prcTypeName[item.prcType]}} +
{{item.creatTime}} @@ -161,25 +161,24 @@ font-family: Blue Sky Noto; font-weight: 400; color: #040B29; - max-width: 50%; + max-width: calc(100% - 72px); display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } - - .top-admin { - font-size: 16px; - font-family: Blue Sky Noto; - display: inline-block; - font-weight: 400; - color: #040B29; - margin-left: 4px; - max-width: calc(50% - 72px); - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } + /*.top-admin {*/ + /* font-size: 16px;*/ + /* font-family: Blue Sky Noto;*/ + /* display: inline-block;*/ + /* font-weight: 400;*/ + /* color: #040B29;*/ + /* margin-left: 4px;*/ + /* max-width: calc(50% - 72px);*/ + /* overflow: hidden;*/ + /* text-overflow: ellipsis;*/ + /* white-space: nowrap;*/ + /*}*/ } .button { diff --git a/jero-web/src/views/documentTools/documentComparison/components/documentDataComparison.vue b/jero-web/src/views/documentTools/documentComparison/components/documentDataComparison.vue index 7eb1bf38e..51876de9c 100644 --- a/jero-web/src/views/documentTools/documentComparison/components/documentDataComparison.vue +++ b/jero-web/src/views/documentTools/documentComparison/components/documentDataComparison.vue @@ -377,7 +377,7 @@ return } for (let i = 0; i < this.resultData.textLeft.length; i++) { - if (node.parentId && node.itemName == this.resultData.textLeft[i].itemsName) { + if (node.parentId && node.menuId == this.resultData.textLeft[i].menuId) { detailContent[0].scrollTop = detailLeft[i].offsetTop - 150 return } @@ -392,7 +392,7 @@ return } for (let i = 0; i < this.resultData.textRight.length; i++) { - if (node.parentId && node.itemName == this.resultData.textRight[i].itemsName) { + if (node.parentId && node.menuId == this.resultData.textRight[i].menuId) { detailContent[0].scrollTop = detailRight[i].offsetTop - 150 return } diff --git a/jero-web/src/views/externalReports/index.vue b/jero-web/src/views/externalReports/index.vue index 9fb7eaed8..7bf1cd665 100644 --- a/jero-web/src/views/externalReports/index.vue +++ b/jero-web/src/views/externalReports/index.vue @@ -131,7 +131,7 @@ :columns="columns" > - {{ text && text.length > 15 ? text.slice(0, 14) + '...' : text }} + {{ text && text.length > 20 ? text.slice(0, 18) + '...' : text }} {{ text && text.length > 15 ? text.slice(0, 14) + '...' : text }} @@ -366,7 +366,7 @@ export default { align: 'center', dataIndex: 'fileDescription', scopedSlots: { customRender: 'projectName' }, - width: 150 + width: 300 }, { title: this.$t('uploadedBy'), diff --git a/jero-web/src/views/parameter/managementdetails/index.vue b/jero-web/src/views/parameter/managementdetails/index.vue index 92c247e1b..320bc0c8f 100644 --- a/jero-web/src/views/parameter/managementdetails/index.vue +++ b/jero-web/src/views/parameter/managementdetails/index.vue @@ -434,7 +434,9 @@ export default {