diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/service/impl/SarFileCompareItemCommentServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/service/impl/SarFileCompareItemCommentServiceImpl.java index 965435538..f0e09dab7 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/service/impl/SarFileCompareItemCommentServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/service/impl/SarFileCompareItemCommentServiceImpl.java @@ -11,11 +11,12 @@ import com.jero.modules.compare.mapper.SarFileCompareItemCommentMapper; import com.jero.modules.compare.service.ISarFileCompareInfoService; import com.jero.modules.compare.service.ISarFileCompareItemCommentService; import com.jero.modules.compare.service.ISarFileCompareItemService; +import com.jero.modules.compare.utils.ConvertHtml2Excel; import com.jero.modules.system.util.StringUtils; import org.apache.commons.lang3.ObjectUtils; -import org.apache.poi.hssf.usermodel.HSSFClientAnchor; -import org.apache.poi.hssf.usermodel.HSSFPatriarch; -import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.common.usermodel.HyperlinkType; +import org.apache.poi.hssf.usermodel.*; +import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.xssf.usermodel.XSSFWorkbook; @@ -255,6 +256,12 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl mergeCells = new ArrayList<>(); @@ -272,69 +279,20 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl", "").replace("

", "\r\n"); - addImgdata(text,request.getSession()); - String rowDataAndPath = (String) request.getSession().getAttribute("txtAndImg"); + String rowDataAndPath = getSplitContent(request, text); leftSplit = rowDataAndPath.split("---"); if (leftSplit.length > 1) { for (int j = 0; j < leftSplit.length; j++) { if (ObjectUtils.isNotEmpty(leftSplit[j])) { ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream(); - BufferedImage bufferImg = null; if (j > 0) { Row row2 = sheet.getRow(j + i); if (ObjectUtils.isEmpty(row2)) { row2 = sheet.createRow(j + i); } - if (leftSplit[j].contains("/upFiles")) { - row2.setHeight((short) 3000); //设置行高 - //先将图片下载到本地 - String fileLastName = leftSplit[j].substring(leftSplit[j].lastIndexOf("/") + 1); - if (CosBootUtil.doesObjectExist(leftSplit[j])) { - try (InputStream in = CosBootUtil.download(leftSplit[j])) { - copyFile2(in, dir + File.separator + fileLastName); - } catch (IOException e) { - e.printStackTrace(); - log.error(e.getMessage(), e); - } - } - File file = new File(dir + File.separator + fileLastName); - if (file.exists()) { - bufferImg = ImageIO.read(file); - ImageIO.write(bufferImg, "jpg", byteArrayOut); - //anchor主要用于设置图片的属性 - HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 600, 200, (short) 3, j + i, (short) 3, j + i); - patriarch.createPicture(anchor, workbook.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG)); - - } - } else { - row2.createCell(3).setCellValue(leftSplit[j]); - } + handleSpecificData(workbook, dir, patriarch, cellStyleLink, byteArrayOut, row2, i, j, leftSplit[j], 3); } else { - if (leftSplit[j].contains("/upFiles")) { - row.setHeight((short) 3000); //设置行高 - //先将图片下载到本地 - String fileLastName = leftSplit[j].substring(leftSplit[j].lastIndexOf("/") + 1); - if (CosBootUtil.doesObjectExist(leftSplit[j])) { - try (InputStream in = CosBootUtil.download(leftSplit[j])) { - copyFile2(in, dir + File.separator + fileLastName); - } catch (IOException e) { - e.printStackTrace(); - log.error(e.getMessage(), e); - } - } - File file = new File(dir + File.separator + fileLastName); - if (file.exists()) { - bufferImg = ImageIO.read(file); - ImageIO.write(bufferImg, "jpg", byteArrayOut); - //anchor主要用于设置图片的属性 - HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 600, 200, (short) 3, j + i, (short) 3, j + i); - patriarch.createPicture(anchor, workbook.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG)); - - } - } else { - row.createCell(3).setCellValue(leftSplit[j]); - } + handleSpecificData(workbook, dir, patriarch, cellStyleLink, byteArrayOut, row, i, j, leftSplit[j], 3); } } } @@ -346,7 +304,6 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl", "").replace("

", "\r\n"); - addImgdata(text,request.getSession()); - String rowDataAndPath = (String) request.getSession().getAttribute("txtAndImg"); + String rowDataAndPath = getSplitContent(request, text); rightSplit = rowDataAndPath.split("---"); if (rightSplit.length > 1) { for (int j = 0; j < rightSplit.length; j++) { if (ObjectUtils.isNotEmpty(rightSplit[j])) { ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream(); - BufferedImage bufferImg = null; if (j > 0) { Row row2 = sheet.getRow(j + i); if (ObjectUtils.isEmpty(row2)) { row2 = sheet.createRow(j + i); } - if (rightSplit[j].contains("/upFiles")) { - row2.setHeight((short) 3000); //设置行高 - //先将图片下载到本地 - String fileLastName = rightSplit[j].substring(rightSplit[j].lastIndexOf("/") + 1); - if (CosBootUtil.doesObjectExist(rightSplit[j])) { - try (InputStream in = CosBootUtil.download(rightSplit[j])) { - copyFile2(in, dir + File.separator + fileLastName); - } catch (IOException e) { - e.printStackTrace(); - log.error(e.getMessage(), e); - } - } - File file = new File(dir + File.separator + fileLastName); - if (file.exists()) { - bufferImg = ImageIO.read(file); - ImageIO.write(bufferImg, "jpg", byteArrayOut); - //anchor主要用于设置图片的属性 - HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 600, 200, (short) 7, j + i, (short) 7, j + i); - patriarch.createPicture(anchor, workbook.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG)); - - } - } else { - row2.createCell(7).setCellValue(rightSplit[j]); - } + handleSpecificData(workbook, dir, patriarch, cellStyleLink, byteArrayOut, row2, i, j, rightSplit[j], 7); } else { - if (rightSplit[j].contains("/upFiles")) { - row.setHeight((short) 3000); //设置行高 - //先将图片下载到本地 - String fileLastName = rightSplit[j].substring(rightSplit[j].lastIndexOf("/") + 1); - if (CosBootUtil.doesObjectExist(rightSplit[j])) { - try (InputStream in = CosBootUtil.download(rightSplit[j])) { - copyFile2(in, dir + File.separator + fileLastName); - } catch (IOException e) { - e.printStackTrace(); - log.error(e.getMessage(), e); - } - } - File file = new File(dir + File.separator + fileLastName); - if (file.exists()) { - bufferImg = ImageIO.read(file); - ImageIO.write(bufferImg, "jpg", byteArrayOut); - //anchor主要用于设置图片的属性 - HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 600, 200, (short) 7, j + i, (short) 7, j + i); - patriarch.createPicture(anchor, workbook.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG)); - - } - } else { - row.createCell(7).setCellValue(rightSplit[j]); - } + handleSpecificData(workbook, dir, patriarch, cellStyleLink, byteArrayOut, row, i, j, rightSplit[j], 7); } } } @@ -428,11 +336,11 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl标签内容中的图片路径,并重新按顺序拼接 + * 处理图片跟表格类型的数据 + * @param workbook + * @param dir + * @param patriarch + * @param cellStyleLink + * @param byteArrayOut + * @param row + * @param i + * @param j + * @param text + * @param cellNum + * @throws IOException + */ + private void handleSpecificData(Workbook workbook, String dir, HSSFPatriarch patriarch, CellStyle cellStyleLink, ByteArrayOutputStream byteArrayOut, Row row, int i, int j, String text, int cellNum) throws IOException { + if (text.contains("/upFiles")) { + row.setHeight((short) 3000); //设置行高 + //先将图片下载到本地 + String fileLastName = text.substring(text.lastIndexOf("/") + 1); + if (CosBootUtil.doesObjectExist(text)) { + try (InputStream in = CosBootUtil.download(text)) { + copyFile2(in, dir + File.separator + fileLastName); + } catch (IOException e) { + e.printStackTrace(); + log.error(e.getMessage(), e); + } + } + File file = new File(dir + File.separator + fileLastName); + if (file.exists()) { + BufferedImage bufferImg = ImageIO.read(file); + ImageIO.write(bufferImg, "jpg", byteArrayOut); + //anchor主要用于设置图片的属性 + HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 600, 200, (short) cellNum, j + i, (short) cellNum, j + i); + patriarch.createPicture(anchor, workbook.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG)); + + } + } else { + Cell cell = row.createCell(cellNum); + if (text.contains("") < 0) { + if (tableHtml.indexOf("") < 0) { + tableHtml = tableHtml.replaceFirst("", ""); + tableHtml = tableHtml.replaceFirst("", ""); + } else { + tableHtml = tableHtml.replaceFirst("", ""); + tableHtml = tableHtml.replaceFirst("", ""); + } + } + String cnt = "\n"; + tableHtml = tableHtml.replaceAll("<[\\s]*?br[^>]*?>|<[\\s]*?\\/[\\s]*?br[\\s]*?>", cnt); + String tableSheetName = "表格" + System.currentTimeMillis(); + ConvertHtml2Excel.table2Excel(tableHtml, (HSSFWorkbook) workbook, tableSheetName); + //添加超链接 + CreationHelper createHelper = workbook.getCreationHelper(); + Hyperlink hyperlink1 = createHelper.createHyperlink(HyperlinkType.DOCUMENT); + String tableName = "#\'" + tableSheetName + "\'!A1"; + hyperlink1.setAddress(tableName); + cell.setHyperlink(hyperlink1);// 链接 + cell.setCellStyle(cellStyleLink); + } + + /** + * 获取文字、图片、表格分割后的内容 + * @param request * @param text * @return */ - private void addImgdata(String text,HttpSession session) { + private String getSplitContent(HttpServletRequest request, String text) { + text = text.replace("

", "").replace("

", "\r\n"); + //分割图片 + splitImg(text, request.getSession()); + //分割表格 + String txtAndImg = (String) request.getSession().getAttribute("txtAndImg"); + txtAndImg = txtAndImg.replaceAll("table", "replaceTable"); + splitTable(txtAndImg, request.getSession()); + return (String) request.getSession().getAttribute("textAndTableAndImg"); + } + + /** + * 分割表格 + * @param textAndImg + * @param session + */ + private void splitTable(String textAndImg,HttpSession session) { + if (textAndImg.contains("") + 14); + String table = textAndImg.substring(textAndImg.indexOf("")+14); + table = table.replaceAll("replaceTable", "table"); + textAndImg = left + "---" + table + "---" + right; + splitTable(textAndImg, session); + } else { + session.setAttribute("textAndTableAndImg", textAndImg); + } + } + + /** + * 分割图片 + * @param text + * @param session + * @return + */ + private void splitImg(String text,HttpSession session) { if (text.contains("") + 3); String img = text.substring(text.indexOf("")); String path = img.substring(img.lastIndexOf("=") + 1)+"g"; text = txtLeft + "---" + path + "---" + txtRight; - addImgdata(text, session); + splitImg(text, session); } else { session.setAttribute("txtAndImg", text); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/utils/ConvertHtml2Excel.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/utils/ConvertHtml2Excel.java new file mode 100644 index 000000000..db29bbb5c --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/utils/ConvertHtml2Excel.java @@ -0,0 +1,231 @@ +package com.jero.modules.compare.utils; +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.math.NumberUtils; +import org.apache.poi.hssf.usermodel.HSSFCell; +import org.apache.poi.hssf.usermodel.HSSFCellStyle; +import org.apache.poi.hssf.usermodel.HSSFFont; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.hssf.util.HSSFCellUtil; +import org.apache.poi.hssf.util.HSSFColor; +import org.apache.poi.ss.util.CellRangeAddress; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.DocumentHelper; +import org.dom4j.Element; + + +/**** + * html转excel + * @author user + * + */ +public class ConvertHtml2Excel { + /** + * html表格转excel + * + * @param tableHtml 如 + * + * .. + *
+ * @return + */ + public static void table2Excel(String tableHtml, HSSFWorkbook wb,String tableSheetName) { + HSSFSheet sheet = wb.createSheet(tableSheetName); + List crossRowEleMetaLs = new ArrayList(); + int rowIndex = 0; + try { + Document data = DocumentHelper.parseText(tableHtml); + // 生成表头 + Element thead = data.getRootElement().element("thead"); + HSSFCellStyle titleStyle = getTitleStyle(wb); + int ls=0;//列数 + if (thead != null) { + List trLs = thead.elements("tr"); + for (Element trEle : trLs) { + HSSFRow row = sheet.createRow(rowIndex); + List thLs = trEle.elements("th"); + ls=thLs.size(); + makeRowCell(thLs, rowIndex, row, 0, titleStyle, crossRowEleMetaLs); + rowIndex++; + } + } + // 生成表体 + Element tbody = data.getRootElement().element("tbody"); + HSSFCellStyle contentStyle = getContentStyle(wb); + if (tbody != null) { + List trLs = tbody.elements("tr"); + for (Element trEle : trLs) { + HSSFRow row = sheet.createRow(rowIndex); + List thLs = trEle.elements("th"); + int cellIndex = makeRowCell(thLs, rowIndex, row, 0, titleStyle, crossRowEleMetaLs); + List tdLs = trEle.elements("td"); + makeRowCell(tdLs, rowIndex, row, cellIndex, contentStyle, crossRowEleMetaLs); + rowIndex++; + } + } + // 合并表头 + for (CrossRangeCellMeta crcm : crossRowEleMetaLs) { + sheet.addMergedRegion(new CellRangeAddress(crcm.getFirstRow(), crcm.getLastRow(), crcm.getFirstCol(), crcm.getLastCol())); + setRegionStyle(sheet, new CellRangeAddress(crcm.getFirstRow(), crcm.getLastRow(), crcm.getFirstCol(), crcm.getLastCol()),contentStyle); + } + for(int i=0;i tdLs, int rowIndex, HSSFRow row, int startCellIndex, HSSFCellStyle cellStyle, + List crossRowEleMetaLs) { + int i = startCellIndex; + for (int eleIndex = 0; eleIndex < tdLs.size(); i++, eleIndex++) { + int captureCellSize = getCaptureCellSize(rowIndex, i, crossRowEleMetaLs); + while (captureCellSize > 0) { + for (int j = 0; j < captureCellSize; j++) {// 当前行跨列处理(补单元格) + row.createCell(i); + i++; + } + captureCellSize = getCaptureCellSize(rowIndex, i, crossRowEleMetaLs); + } + Element thEle = tdLs.get(eleIndex); + String val = thEle.getTextTrim(); + if (StringUtils.isBlank(val)) { + Element e = thEle.element("a"); + if (e != null) { + val = e.getTextTrim(); + } + } + HSSFCell c = row.createCell(i); + if (NumberUtils.isNumber(val)) { + c.setCellValue(Double.parseDouble(val)); + c.setCellType(HSSFCell.CELL_TYPE_NUMERIC); + } else { + c.setCellValue(val); + } + int rowSpan = NumberUtils.toInt(thEle.attributeValue("rowspan"), 1); + int colSpan = NumberUtils.toInt(thEle.attributeValue("colspan"), 1); + c.setCellStyle(cellStyle); + if (rowSpan > 1 || colSpan > 1) { // 存在跨行或跨列 + crossRowEleMetaLs.add(new CrossRangeCellMeta(rowIndex, i, rowSpan, colSpan)); + } + if (colSpan > 1) {// 当前行跨列处理(补单元格) + for (int j = 1; j < colSpan; j++) { + i++; + row.createCell(i); + } + } + } + return i; + } + + /** + * 设置合并单元格的边框样式 + * + * @param sheet + * @param region + * @param cs + */ + public static void setRegionStyle(HSSFSheet sheet, CellRangeAddress region, HSSFCellStyle cs) { + for (int i = region.getFirstRow(); i <= region.getLastRow(); i++) { + HSSFRow row = HSSFCellUtil.getRow(i, sheet); + for (int j = region.getFirstColumn(); j <= region.getLastColumn(); j++) { + HSSFCell cell = HSSFCellUtil.getCell(row, (short) j); + cell.setCellStyle(cs); + } + } + } + + /** + * 获得因rowSpan占据的单元格 + * + * @param rowIndex 行号 + * @param colIndex 列号 + * @param crossRowEleMetaLs 跨行列元数据 + * @return 当前行在某列需要占据单元格 + */ + private static int getCaptureCellSize(int rowIndex, int colIndex, List crossRowEleMetaLs) { + int captureCellSize = 0; + for (CrossRangeCellMeta crossRangeCellMeta : crossRowEleMetaLs) { + if (crossRangeCellMeta.getFirstRow() < rowIndex && crossRangeCellMeta.getLastRow() >= rowIndex) { + if (crossRangeCellMeta.getFirstCol() <= colIndex && crossRangeCellMeta.getLastCol() >= colIndex) { + captureCellSize = crossRangeCellMeta.getLastCol() - colIndex + 1; + } + } + } + return captureCellSize; + } + + /** + * 获得标题样式 + * + * @param workbook + * @return + */ + private static HSSFCellStyle getTitleStyle(HSSFWorkbook workbook) { + short titlebackgroundcolor = HSSFColor.GREY_25_PERCENT.index; + short fontSize = 12; + String fontName = "宋体"; + HSSFCellStyle style = workbook.createCellStyle(); + style.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER); + style.setAlignment(HSSFCellStyle.ALIGN_CENTER); + style.setBorderBottom(HSSFCellStyle.BORDER_THIN); //下边框 + style.setBorderLeft(HSSFCellStyle.BORDER_THIN);//左边框 + style.setBorderTop(HSSFCellStyle.BORDER_THIN);//上边框 + style.setBorderRight(HSSFCellStyle.BORDER_THIN);//右边框 + style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); + style.setFillForegroundColor(titlebackgroundcolor);// 背景色 + + HSSFFont font = workbook.createFont(); + font.setFontName(fontName); + font.setFontHeightInPoints(fontSize); + font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD); + style.setFont(font); + return style; + } + + /** + * 获得内容样式 + * + * @param wb + * @return + */ + private static HSSFCellStyle getContentStyle(HSSFWorkbook wb) { + short fontSize = 12; + String fontName = "宋体"; + HSSFCellStyle style = wb.createCellStyle(); + style.setBorderBottom((short) 1); + style.setBorderTop((short) 1); + style.setBorderLeft((short) 1); + style.setBorderRight((short) 1); + HSSFFont font = wb.createFont(); + font.setFontName(fontName); + font.setFontHeightInPoints(fontSize); + style.setFont(font); + style.setAlignment(HSSFCellStyle.ALIGN_CENTER);//水平居中 + style.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);//垂直居中 + + return style; + } +} + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/utils/CrossRangeCellMeta.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/utils/CrossRangeCellMeta.java new file mode 100644 index 000000000..acee632aa --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/utils/CrossRangeCellMeta.java @@ -0,0 +1,37 @@ +package com.jero.modules.compare.utils; + +public class CrossRangeCellMeta { + + public CrossRangeCellMeta(int firstRowIndex, int firstColIndex, int rowSpan, int colSpan) { + super(); + this.firstRowIndex = firstRowIndex; + this.firstColIndex = firstColIndex; + this.rowSpan = rowSpan; + this.colSpan = colSpan; + } + + private int firstRowIndex; + private int firstColIndex; + private int rowSpan;// 跨越行数 + private int colSpan;// 跨越列数 + + public int getFirstRow() { + return firstRowIndex; + } + + public int getLastRow() { + return firstRowIndex + rowSpan - 1; + } + + public int getFirstCol() { + return firstColIndex; + } + + public int getLastCol() { + return firstColIndex + colSpan - 1; + } + + public int getColSpan(){ + return colSpan; + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoFolderController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoFolderController.java index 9e92f4c08..c59e9f272 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoFolderController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoFolderController.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.jero.common.api.vo.Result; import com.jero.common.aspect.annotation.AutoLog; import com.jero.common.constant.enums.CutEnum; +import com.jero.common.exception.JeroBootException; import com.jero.common.system.base.controller.JeroController; import com.jero.modules.extRepo.entity.ERFTreeDataVO; import com.jero.modules.extRepo.entity.ExtRepoData; @@ -66,11 +67,20 @@ public class ExtRepoFolderController extends JeroController add(@Validated @RequestBody ExtRepoFolder extRepoFolder, HttpSession session) { Result result = new Result(); session.setAttribute("haveSuperiorManageAuth", false); - extRepoFolderService.haveSuperiorManageAuth(extRepoFolder.getSupFolder(),session); - if (ObjectUtils.isNotEmpty(session.getAttribute("haveSuperiorManageAuth"))&&(Boolean) session.getAttribute("haveSuperiorManageAuth")) { + ExtRepoFolder folder = extRepoFolderService.queryById(extRepoFolder.getSupFolder()); + extRepoFolderService.haveSuperiorManageAuth(folder.getSupFolder(),session); + //上层是否有权限 + boolean boo = (Boolean)session.getAttribute("haveSuperiorManageAuth"); + if (boo||extRepoFolderService.haveManageAuth(extRepoFolder.getSupFolder())) { if (!extRepoFolder.isAddSub()) { //增加同级文件夹 - ExtRepoFolder folder = extRepoFolderService.queryById(extRepoFolder.getSupFolder()); + if (!boo) { + if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) { + throw new JeroBootException("无法创建同级文件夹!请联系管理员!"); + } else { + throw new JeroBootException("Unable to create a sibling folder ! Please Contact your administrator !"); + } + } extRepoFolder.setSupFolder(folder.getSupFolder()); } extRepoFolderService.add(extRepoFolder); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationEOServiceImpl.java index 567660c55..ac77d8994 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationEOServiceImpl.java @@ -752,20 +752,15 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl 100){ + if(StringUtils.equals(cut,CutEnum.CN.getValue())){ + errorMsg += "条款名称长度不能超过100;"; + }else if (StringUtils.equals(cut,CutEnum.EN.getValue())){ + errorMsg += "Item Name length of the cannot exceed 100;"; + } + countError++; } - countError++; - }else if(itemName.length() > 100){ - if(StringUtils.equals(cut,CutEnum.CN.getValue())){ - errorMsg += "条款名称长度不能超过100;"; - }else if (StringUtils.equals(cut,CutEnum.EN.getValue())){ - errorMsg += "Item Name length of the cannot exceed 100;"; - } - countError++; } if(StringUtils.isEmpty(itemContent)){ diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java index c309c19a3..a34563275 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java @@ -884,8 +884,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl messageList) { - return dao.insertForeach(messageList); + // 解决一次批量插入太多 PacketTooBigException 异常 + int total = messageList.size(); + int count = 0; + int pageSum = 1; + if(total > 100) { + pageSum = total / 100; // 总页数 + if ((total % 100) > 0) { + pageSum += 1; + } + } + List subList = new ArrayList<>(); + for(int i = 0; i < pageSum; i++) { + int j = i*100+100; + if (i == pageSum -1) { + j = total; + } + subList = messageList.subList(i*100, j); + count += dao.insertForeach(subList); + } + return count; } /** diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitPdfService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitPdfService.java index 1946515db..79ddc5648 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitPdfService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitPdfService.java @@ -1784,7 +1784,7 @@ public class FileSplitPdfService { if(StringUtils.isNotBlank(preName)) { List nowStartList = fileSpiltService.getNewNowStart(preName); - List subList1 = startDigitList.subList(preNameNum, startDigitList.size()-1); + List subList1 = startDigitList.subList(preNameNum, startDigitList.size()); // 后文有一级以下的标题 for (int i = nowStartList.size() - 1; i >= 1; i--) { int index1 = subList1.indexOf(nowStartList.get(i)); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/SarFileSplitItemsValEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/SarFileSplitItemsValEOServiceImpl.java index 87e8331e3..1ab1404f2 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/SarFileSplitItemsValEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/SarFileSplitItemsValEOServiceImpl.java @@ -12,6 +12,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.List; @@ -79,8 +80,26 @@ public class SarFileSplitItemsValEOServiceImpl extends ServiceImpl itemValList) { - - return dao.insertForeach(itemValList); + // 解决一次批量插入太多 PacketTooBigException 异常 + int total = itemValList.size(); + int count = 0; + int pageSum = 1; + if(total > 100) { + pageSum = total / 100; // 总页数 + if ((total % 100) > 0) { + pageSum += 1; + } + } + List subList = new ArrayList<>(); + for(int i = 0; i < pageSum; i++) { + int j = i*100+100; + if (i == pageSum -1) { + j = total; + } + subList = itemValList.subList(i*100, j); + count += dao.insertForeach(subList); + } + return count; } } diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index c1a20eec6..cb6a0ad64 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1317,4 +1317,6 @@ module.exports = { viewAll:'View All', endProcess:'End Process', thereForTheCurrentlySelectedData:'There is no standard breakdown for the currently selected data', + secondaryDirectory:'Secondary directory', + OnlyPersonsCanBeSelected:'The maximum upper limit is exceeded; Only 100 persons can be selected', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 6790de6e1..28ce6b3c9 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1418,4 +1418,6 @@ module.exports = { viewAll:'查看全部', endProcess:'结束流程', thereForTheCurrentlySelectedData:'当前所选数据暂无标准分解单', + secondaryDirectory:'二级目录', + OnlyPersonsCanBeSelected:'超出最大上限;只能选择100个人员', } \ No newline at end of file diff --git a/jero-web/src/components/PersonnelSelection/index.vue b/jero-web/src/components/PersonnelSelection/index.vue index 3d8bc49f8..b84f99147 100644 --- a/jero-web/src/components/PersonnelSelection/index.vue +++ b/jero-web/src/components/PersonnelSelection/index.vue @@ -215,7 +215,7 @@ }) return newarr }, - //将数据拼成树形结构 + // 将数据拼成树形结构 toTree(config, num) { // 删除 所有 children,以防止多次调用 config.forEach(function(item) { @@ -330,6 +330,10 @@ userIds = userIds.filter(function(item, index) { return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个 }) + if (userIds.length > 100 && this.selectDepartment) { + this.$message.warning(this.$t('OnlyPersonsCanBeSelected')) + return + } this.$emit('input', userName.join(',')) this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript) this.visible = false @@ -433,9 +437,10 @@ // } this.confirmLoading = true this.loading = true - //queryDepartUserTreeList - //queryUserTreeList - postAction('sys/user/queryUserTreeList', { + //queryDepartUserTreeList post + //queryUserTreeList get + //换接口需要改请求 + getAction('sys/user/queryUserTreeList', { // departId: this.departId, // json: gData, // flag: '1' @@ -481,7 +486,7 @@ } this.defaultCheckedKeys = this.userIds this.defaultCheckedKeys = [...this.defaultCheckedKeys] - this.defaultCheckedKeysName = [] + // this.defaultCheckedKeysName = [] // if (this.defaultCheckedKeys.length > 0) { // for (let i = 0; i < this.defaultCheckedKeys.length; i++) { // this.defaultCheckedKeysName.push({ diff --git a/jero-web/src/components/setCreator/index.vue b/jero-web/src/components/setCreator/index.vue index 12c38aa43..4d5537bb3 100644 --- a/jero-web/src/components/setCreator/index.vue +++ b/jero-web/src/components/setCreator/index.vue @@ -15,18 +15,38 @@ allowClear :placeholder="$t('NodeQuickLookup')"/>
- - + + + + {{ data.title }} + + + + + + + + + + + + + + +
@@ -40,15 +60,20 @@ @@ -243,4 +428,11 @@ height: calc(100% - 60px); overflow: auto; } + .treeWrap { + height: calc(100vh - 240px); + } + .active { + color: #21c9cc; + display: inline-block; + } diff --git a/jero-web/src/components/viewFileModel/index.vue b/jero-web/src/components/viewFileModel/index.vue index 882c93446..19a707125 100644 --- a/jero-web/src/components/viewFileModel/index.vue +++ b/jero-web/src/components/viewFileModel/index.vue @@ -49,6 +49,7 @@ loading: false, visibleFile:false, downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', columnsFile: [ { title: this.$t('fileName'), @@ -78,10 +79,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') + } else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) } diff --git a/jero-web/src/components/virtualNodeTree/tree.vue b/jero-web/src/components/virtualNodeTree/tree.vue index a98fea522..9d58be060 100644 --- a/jero-web/src/components/virtualNodeTree/tree.vue +++ b/jero-web/src/components/virtualNodeTree/tree.vue @@ -759,8 +759,8 @@ } .el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner:before { - background-color: #c0c4cc; - border-color: #c0c4cc + background-color: #fff; + border-color: #fff; } .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner { @@ -927,7 +927,6 @@ .el-checkbox-button.is-checked:first-child .el-checkbox-button__inner { border-left-color: #409eff } - .el-checkbox-button.is-disabled .el-checkbox-button__inner { color: #c0c4cc; cursor: not-allowed; diff --git a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/evaluationResultsList.vue b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/evaluationResultsList.vue index 1e8d605e3..85e38ad5a 100644 --- a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/evaluationResultsList.vue +++ b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/evaluationResultsList.vue @@ -209,7 +209,7 @@ actiProcInstId: this.actiProcInstId } downloadFile('/lawsOpinionGather/lawsOpinionAssessmentResultEO/exportXls', - this.$t('evaluationResults') + '.zip', query) + this.$route.query.serialNumber+ ' ' +this.$t('evaluationResults') + '.zip', query) }, getData() { this.formInline = JSON.parse(JSON.stringify(this.$route.query)) diff --git a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue index 42f004c5b..5ea7211b3 100644 --- a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue +++ b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue @@ -193,6 +193,13 @@ ellipsis: true, dataIndex: 'gatherResultShow' }, + { + title: this.$t('Sponsor'), + align: 'center', + width: 140, + ellipsis: true, + dataIndex: 'createBy' + }, { title: this.$t('dateOfInitiation'), align: 'center', diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardView.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardView.vue index dac938744..b851648ab 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardView.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/countryCardView.vue @@ -127,6 +127,7 @@ applyMarkets: '', header_text: '', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', url: { list: '/problemKnowledgeBase/countryCardTempEO/list', deleteOne: '' @@ -153,10 +154,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', fileQuery.contentFileName, { id: fileQuery.id }) } diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue index a73a4a075..1c1ef45bd 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue @@ -662,12 +662,12 @@ margin-top: 10px; .content-box-content-botton-text { - width: 118px; + max-width: 198px; height: 32px; display: inline-block; text-align: center; line-height: 32px; - padding: 0 6px; + padding: 0 10px; background: #EFF1F3; border-radius: 4px; text-overflow: ellipsis; diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseListView.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseListView.vue index 5c4fbfd08..78ad86e43 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseListView.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseListView.vue @@ -200,6 +200,7 @@ queryForm: {}, isPraise: false, downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', isCollect: false } }, @@ -218,10 +219,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') + } else if (fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) } @@ -491,12 +494,13 @@ margin-top: 10px; .content-box-content-botton-text { - width: 140px; + max-width: 200px; + /*min-width: 120px;*/ height: 32px; display: inline-block; text-align: center; line-height: 32px; - padding: 0 6px; + padding: 0 10px; background: #EFF1F3; border-radius: 4px; text-overflow: ellipsis; @@ -509,7 +513,7 @@ cursor: pointer; .file-text { - width: 90px; + width: calc(100% - 30px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -519,6 +523,7 @@ } .icon-text { + width: 24px; font-size: 16px; overflow: hidden; margin-bottom: 9px; diff --git a/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyFill.vue b/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyFill.vue index 5fcdfcf2e..0fa66b3aa 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyFill.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyFill.vue @@ -144,7 +144,7 @@ width: 170 }, { - title: this.$t('chapterContents'), + title: this.$t('secondaryDirectory'), align: 'center', dataIndex: 'memoriesChapterName', ellipsis: true, diff --git a/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue b/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue index 67a9a1ca8..09ff3b0f0 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue @@ -108,6 +108,7 @@ pageNo: 1, queryParam: {}, downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', userData: {}, columns: [ { @@ -216,10 +217,12 @@ } else if (fileSuffix === '.docx' || fileSuffix === '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + item.fileId + fileSuffix) + window.open(url, '_blank') } else { if (item.createBy == this.userInfo().username) { downloadFile('/sys/common/downLoadFile', item.name, { id: item.fileId, userName: this.userInfo().username }) diff --git a/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue b/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue index 9a91fe34f..b42ce13c7 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue @@ -4,8 +4,9 @@
- {{$t('title')}} + * + {{$t('title')}}
- {{$t('englishTitle')}} + * + {{$t('englishTitle')}}
- {{$t('technicalField')}} + * + {{$t('technicalField')}}
- +
- -
-
- {{$t('implementationModel')}} -
- - - -
-
+ + + + + + + + + + + + + + @@ -108,10 +111,10 @@ :title="$t('status')">{{$t('status')}}
-
@@ -125,9 +128,9 @@ :title="$t('usage')">{{$t('usage')}}
- @@ -156,10 +159,11 @@ :title="$t('ImplementationDate')">{{$t('ImplementationDate')}} + + :placeholder="'202X.X.X'"/> @@ -170,10 +174,11 @@ :title="$t('vehicleInProductionDate')">{{$t('vehicleInProductionDate')}} + + :placeholder="'202X.X.X'"/> @@ -185,6 +190,7 @@
+ * {{$t('primaryCoverageCn')}}
@@ -200,6 +206,7 @@
+ * {{$t('primaryCoverageEn')}}
@@ -245,9 +252,10 @@
+ * {{$t('regulatoryContact')}}
- +
+ * {{$t('title')}}
@@ -18,6 +19,7 @@
+ * {{$t('englishTitle')}}
@@ -110,6 +112,7 @@
+ * {{$t('primaryCoverageCn')}}
@@ -125,6 +128,7 @@
+ * {{$t('primaryCoverageEn')}}
@@ -165,6 +169,11 @@ return { rules: { titleCn: [ + { + required: true, + message: this.$t('title') + this.$t('cannotEmpty'), + trigger: 'blur' + }, { max: 500, message: this.$t('title') + this.$t('cannotExceed') + 500 + this.$t('Characters'), @@ -172,6 +181,11 @@ } ], titleEn: [ + { + required: true, + message: this.$t('englishTitle') + this.$t('cannotEmpty'), + trigger: 'blur' + }, { max: 500, message: this.$t('englishTitle') + this.$t('cannotExceed') + 500 + this.$t('Characters'), @@ -221,6 +235,11 @@ } ], contentEn: [ + { + required: true, + message: this.$t('primaryCoverageEn') + this.$t('cannotEmpty'), + trigger: 'blur' + }, { max: 300, message: this.$t('primaryCoverageEn') + this.$t('cannotExceed') + 300 + this.$t('Characters'), @@ -228,6 +247,11 @@ } ], contentCn: [ + { + required: true, + message: this.$t('primaryCoverageCn') + this.$t('cannotEmpty'), + trigger: 'blur' + }, { max: 300, message: this.$t('primaryCoverageCn') + this.$t('cannotExceed') + 300 + this.$t('Characters'), diff --git a/jero-web/src/views/businessSupport/technologyAssessment/components/TermInformation.vue b/jero-web/src/views/businessSupport/technologyAssessment/components/TermInformation.vue index 9e3374a4a..36d49be72 100644 --- a/jero-web/src/views/businessSupport/technologyAssessment/components/TermInformation.vue +++ b/jero-web/src/views/businessSupport/technologyAssessment/components/TermInformation.vue @@ -6,13 +6,14 @@ :visible="visible" :confirm-loading="confirmLoading" :maskClosable="false" + :footer="null" @cancel="visible = false" > - + + + + +
diff --git a/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsWhole.vue b/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsWhole.vue index cd25daf21..a57c1df23 100644 --- a/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsWhole.vue +++ b/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsWhole.vue @@ -39,22 +39,22 @@ -
-
- {{$t('engineer')+item.createBy+$t('feedbackResults')}} -
-
- {{$t('complianceResults')}}:{{item.complianceResultName}} -
-
+ + + + + + + + +
{{$t('fileExport')}}
+ { + const obj = { + children: value, + attrs: {} + } + if (index === 0) { + obj.attrs.rowSpan = row.indexData + } else { + obj.attrs.rowSpan = 0 + } + return obj + } + }, + { + title: this.$t('complianceResults'), + dataIndex: 'complianceResultName', + align: 'center', + width: 160, + ellipsis: true, + customRender: (value, row, index) => { + const obj = { + children: value, + attrs: {} + } + if (index === 0) { + obj.attrs.rowSpan = row.indexData + } else { + obj.attrs.rowSpan = 0 + } + return obj + } + }, { title: this.$t('relevantSections'), dataIndex: 'relatedSection', @@ -190,6 +228,18 @@ getAction(this.url.list, query).then((res) => { if (res.success) { this.dataSource = res.result || [] + if (this.dataSource && this.dataSource.length > 0) { + this.dataSource.forEach(val => { + if (val.lawsTechnologyEvaluationResultEOList && val.lawsTechnologyEvaluationResultEOList.length > 0) { + val.lawsTechnologyEvaluationResultEOList.forEach(ol => { + ol.indexData = val.lawsTechnologyEvaluationResultEOList.length + ol.complianceResultName = val.complianceResultName + ol.createBy = val.createBy + }) + } + }) + } + console.log(this.dataSource) if (this.dataSource.length == 0) { this.dataSource.push({ name: '' @@ -353,9 +403,10 @@ .table-operator-admin-right { float: left; - width: calc(100% - 240px); + width: 100%; text-align: right; - border-left: 1px solid #e8e8e8; + margin-bottom: 20px; + /*border-left: 1px solid #e8e8e8;*/ } .operator-text-index { diff --git a/jero-web/src/views/dashboard/components/monthlyReportRegulations.vue b/jero-web/src/views/dashboard/components/monthlyReportRegulations.vue index 96f62e53f..7955c1749 100644 --- a/jero-web/src/views/dashboard/components/monthlyReportRegulations.vue +++ b/jero-web/src/views/dashboard/components/monthlyReportRegulations.vue @@ -33,6 +33,7 @@ monthlyReportRegulationsList: [], loading: false, downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', url: { list: '/report/lawsMonthlyReportManageEO/page' } @@ -74,10 +75,12 @@ } else if (fileSuffix === '.docx' || fileSuffix === '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + item.fileId + fileSuffix) + window.open(url, '_blank') } else { if (item.createBy == this.userInfo().username){ downloadFile('/sys/common/downLoadFile', item.name, { id: item.fileId, userName: this.userInfo().username }) diff --git a/jero-web/src/views/documentManage/library/docDetail/index.vue b/jero-web/src/views/documentManage/library/docDetail/index.vue index 0fc6f949e..8f770354b 100644 --- a/jero-web/src/views/documentManage/library/docDetail/index.vue +++ b/jero-web/src/views/documentManage/library/docDetail/index.vue @@ -319,6 +319,7 @@ serial_number: '', confirmLoading: false, downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', loading: false, dataSource: [], pageNo: 1, @@ -462,10 +463,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) } diff --git a/jero-web/src/views/documentTools/documentComparison/components/initiateComparison.vue b/jero-web/src/views/documentTools/documentComparison/components/initiateComparison.vue index f110bf30f..7375c90ee 100644 --- a/jero-web/src/views/documentTools/documentComparison/components/initiateComparison.vue +++ b/jero-web/src/views/documentTools/documentComparison/components/initiateComparison.vue @@ -196,6 +196,7 @@ pageNoRight: 1, formInline: {}, downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', rules: { remark: [ { @@ -388,10 +389,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.fileId + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.fileId + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.fileId + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.fileId }) } diff --git a/jero-web/src/views/documentTools/documentComparison/index.vue b/jero-web/src/views/documentTools/documentComparison/index.vue index 0db7f9fde..39fe0ee88 100644 --- a/jero-web/src/views/documentTools/documentComparison/index.vue +++ b/jero-web/src/views/documentTools/documentComparison/index.vue @@ -126,6 +126,7 @@ dataSource: [], selectedRowKeys: [], downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', total: 0, pageSize: 10, pageNo: 1, @@ -422,10 +423,12 @@ } else if (fileSuffix === '.docx' || fileSuffix === '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdLeft + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdLeft + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + row.fileIdLeft + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', row.fileNameLeft, { id: row.fileIdLeft }) } @@ -440,10 +443,12 @@ } else if (fileSuffix === '.docx' || fileSuffix === '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdRight + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdRight + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + row.fileIdRight + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', row.fileNameRight, { id: row.fileIdRight }) } diff --git a/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue b/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue index 176ad2d8e..586d54b97 100644 --- a/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue +++ b/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue @@ -352,6 +352,7 @@ selectModel: '', fileList: [], downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', queryParamSeach: '', mapOne: {}, mapTwo: {}, @@ -696,10 +697,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', fileQuery.fileName || fileQuery.file_name, { id: fileQuery.id }) } diff --git a/jero-web/src/views/documentTools/searchCenter/components/monthlyReportRegulations.vue b/jero-web/src/views/documentTools/searchCenter/components/monthlyReportRegulations.vue index 4983ee2fc..a5ce3f338 100644 --- a/jero-web/src/views/documentTools/searchCenter/components/monthlyReportRegulations.vue +++ b/jero-web/src/views/documentTools/searchCenter/components/monthlyReportRegulations.vue @@ -92,6 +92,7 @@ total: 0, pageSize: 10, downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', pageNo: 1, queryParam: {} } @@ -129,10 +130,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.file_id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.file_id + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + item.file_id + fileSuffix) + window.open(url, '_blank') } }, ResetSearch() { @@ -151,10 +154,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', fileQuery.file_name, { id: fileQuery.id.slice(0, 32) }) } diff --git a/jero-web/src/views/documentTools/searchCenter/components/problemKnowledgeBase.vue b/jero-web/src/views/documentTools/searchCenter/components/problemKnowledgeBase.vue index 13b476153..ea2577782 100644 --- a/jero-web/src/views/documentTools/searchCenter/components/problemKnowledgeBase.vue +++ b/jero-web/src/views/documentTools/searchCenter/components/problemKnowledgeBase.vue @@ -132,6 +132,7 @@ loading: false, fileList: [], downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', mapOne: {}, mapTwo: {}, queryParamOne: {}, @@ -267,10 +268,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', fileQuery.fileName || fileQuery.file_name, { id: fileQuery.id }) } diff --git a/jero-web/src/views/documentTools/searchCenter/components/whole.vue b/jero-web/src/views/documentTools/searchCenter/components/whole.vue index b59a97b57..4b5525064 100644 --- a/jero-web/src/views/documentTools/searchCenter/components/whole.vue +++ b/jero-web/src/views/documentTools/searchCenter/components/whole.vue @@ -116,6 +116,7 @@ total: 0, pageSize: 10, downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', pageNo: 1, queryParam: {} } @@ -170,10 +171,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', fileQuery.file_name, { id: fileQuery.id.slice(0, 32) }) } @@ -239,10 +242,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.file_id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.file_id + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + item.file_id + fileSuffix) + window.open(url, '_blank') } }, titleClick(item) { diff --git a/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue b/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue index 115752b3a..ffad9f9d9 100644 --- a/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue +++ b/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue @@ -279,6 +279,7 @@ components: {}, visibleFile: false, downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', dataSourceFile: [], columnsFile: [ { @@ -830,10 +831,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) } @@ -848,10 +851,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + id + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', name, { id: id }) } diff --git a/jero-web/src/views/processCenter/components/feedbackInformation.vue b/jero-web/src/views/processCenter/components/feedbackInformation.vue index 3b9722099..c86a652cb 100644 --- a/jero-web/src/views/processCenter/components/feedbackInformation.vue +++ b/jero-web/src/views/processCenter/components/feedbackInformation.vue @@ -31,25 +31,29 @@ :rules="[{ required: true, message: $t('relevantSections') + $t('cannotEmpty'), trigger: 'blur'}, {max: 300,message: $t('relevantSections') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur' }]"> - + + + + +
- {{$t('enclosure')}} + {{$t('clauseContent')}}
- - - {{ (item.accessoryFile === 'null' || item.accessoryFile === '' || - item.accessoryFile == null) ? $t('clickUpload') : $t('viewUploadedFiles') - }} - + +
@@ -95,16 +99,15 @@
- {{$t('clauseContent')}} + {{$t('enclosure')}}
- - + + + {{ (item.accessoryFile === 'null' || item.accessoryFile === '' || + item.accessoryFile == null) ? $t('clickUpload') : $t('viewUploadedFiles') + }} +
diff --git a/jero-web/src/views/processCenter/components/standardContentList.vue b/jero-web/src/views/processCenter/components/standardContentList.vue index dcc984c20..32fd02fd5 100644 --- a/jero-web/src/views/processCenter/components/standardContentList.vue +++ b/jero-web/src/views/processCenter/components/standardContentList.vue @@ -71,6 +71,7 @@ return { dataSource: [], downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', columns: [ { title: this.$t('ProcessType'), @@ -187,10 +188,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) } @@ -205,10 +208,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + id + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', name, { id: id }) } diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index b2b6e72b1..ca9de26a5 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -848,6 +848,7 @@ AndUserIdEdit: '/project/projectLibraryRoleRelEO/edit' }, downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', loading: false, dataSource: [], isResultReported: false, @@ -2126,10 +2127,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) } @@ -2145,10 +2148,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + id + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', name, { id: id, userName: this.userInfo().username }) } diff --git a/jero-web/src/views/projectManagement/components/resultReportedUpload.vue b/jero-web/src/views/projectManagement/components/resultReportedUpload.vue index 034fd3e96..a45c9d3a3 100644 --- a/jero-web/src/views/projectManagement/components/resultReportedUpload.vue +++ b/jero-web/src/views/projectManagement/components/resultReportedUpload.vue @@ -49,6 +49,7 @@ myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl, upDataList: [], downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', fileList: [], myfileList: [], isLoding: false, @@ -214,10 +215,12 @@ } else if (fileSuffix === '.docx' || fileSuffix === '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id,userName:this.userInfo().username }) } diff --git a/jero-web/src/views/projectManagement/historicalVersion/index.vue b/jero-web/src/views/projectManagement/historicalVersion/index.vue index e6e932166..a2ce6ffa2 100644 --- a/jero-web/src/views/projectManagement/historicalVersion/index.vue +++ b/jero-web/src/views/projectManagement/historicalVersion/index.vue @@ -363,6 +363,7 @@ list: '/project/projectVersionInfoEO/list' }, downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', + downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', loading: false, dataSource: [], // fieldList | array |✔| 需要查询的列集合示例如下,type类型有:date/datetime/string/int/number @@ -468,10 +469,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) } @@ -486,10 +489,12 @@ } else if (fileSuffix == '.docx' || fileSuffix == '.doc') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) window.open(url, '_blank') - } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' - || fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { + } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) window.open(url, '_blank') + }else if(fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg'){ + let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + id + fileSuffix) + window.open(url, '_blank') } else { downloadFile('/sys/common/downLoadFile', name, { id: id }) }