diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java index 3ecc063ea..9528cf673 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java @@ -1263,6 +1263,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl configIdList = Arrays.asList(paramsReportDetailVO.getConfigIds().split(",")); // 需要导出的配置列 List> dataList = paramsReportDetailEOMapper.listInfoForExport(idList, paramsReportDetailVO); // 查询需要导出的数据 + dataList = dataList.stream().collect(Collectors.collectingAndThen( + Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(p -> (String) p.get("id")))), + ArrayList::new)); // 去重 List paramsConfigEOList = paramsReportConfigEOService.queryList(paramsReportDetailVO.getParamsManifestId()); // 查询所有配置列 diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/entity/SarFileCompareResultVO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/entity/SarFileCompareResultVO.java index 9236eebf8..c517ef2bc 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/entity/SarFileCompareResultVO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/entity/SarFileCompareResultVO.java @@ -8,8 +8,10 @@ public class SarFileCompareResultVO { private String infoId; private String serialNumberLeft; private String fileNameLeft; + private String fileIdLeft; private String serialNumberRight; private String fileNameRight; + private String fileIdRight; private List resList; private String comments; @@ -78,4 +80,20 @@ public class SarFileCompareResultVO { public void setComments(String comments) { this.comments = comments; } + + public String getFileIdLeft() { + return fileIdLeft; + } + + public void setFileIdLeft(String fileIdLeft) { + this.fileIdLeft = fileIdLeft; + } + + public String getFileIdRight() { + return fileIdRight; + } + + public void setFileIdRight(String fileIdRight) { + this.fileIdRight = fileIdRight; + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/enums/AssessConsistencyEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/enums/AssessConsistencyEnum.java new file mode 100644 index 000000000..8e5eeeab6 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/compare/enums/AssessConsistencyEnum.java @@ -0,0 +1,21 @@ +package com.jero.modules.compare.enums; + +public enum AssessConsistencyEnum { + + SAME("一致"), + DIFFERENT("差异"); + + private String value; + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + AssessConsistencyEnum(String value) { + this.value = value; + } +} 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 a635115b7..c833e10cd 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 @@ -7,6 +7,7 @@ import com.jero.common.constant.enums.CutEnum; import com.jero.common.exception.JeroBootException; import com.jero.common.util.oss.CosBootUtil; import com.jero.modules.compare.entity.*; +import com.jero.modules.compare.enums.AssessConsistencyEnum; import com.jero.modules.compare.mapper.SarFileCompareItemCommentMapper; import com.jero.modules.compare.service.ISarFileCompareInfoService; import com.jero.modules.compare.service.ISarFileCompareItemCommentService; @@ -143,8 +144,10 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl list = queryListByInfoId(infoId,comment); @@ -180,7 +183,11 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl queryListByInfoId(String infoId,String comment) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); if (ObjectUtils.isNotEmpty(comment)) { - queryWrapper.eq(SarFileCompareItemComment::getComment, comment); + if (AssessConsistencyEnum.SAME.getValue().equals(comment)) { + queryWrapper.eq(SarFileCompareItemComment::getComment, comment); + } else if (AssessConsistencyEnum.DIFFERENT.getValue().equals(comment)) { + queryWrapper.ne(SarFileCompareItemComment::getComment, AssessConsistencyEnum.SAME.getValue()); + } } queryWrapper.eq(SarFileCompareItemComment::getInfoId, infoId); queryWrapper.orderBy(true, true, SarFileCompareItemComment::getCreateTime); @@ -201,7 +208,11 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl") < 0) { @@ -487,7 +498,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl", "").replace("

", "\r\n"); //分割图片 - addImgdata(text, request.getSession()); + splitImg(text, request.getSession()); //分割表格 String txtAndImg = (String) request.getSession().getAttribute("txtAndImg"); txtAndImg = txtAndImg.replaceAll("table", "replaceTable"); @@ -514,18 +525,19 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl标签内容中的图片路径,并重新按顺序拼接 + * 分割图片 * @param text + * @param session * @return */ - private void addImgdata(String text,HttpSession session) { + 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/extRepo/controller/ExtRepoDataController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoDataController.java index 4c6513783..b71be6192 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoDataController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoDataController.java @@ -25,6 +25,7 @@ import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Date; @@ -92,7 +93,11 @@ public class ExtRepoDataController extends JeroController pageList = extRepoDataService.page(page, queryWrapper); - ExtRepoDataPage res = new ExtRepoDataPage(extRepoFolderService.haveManageAuth(extRepoData.getSupFolder()), pageList); + //判断当前文件夹或者上级文件夹是否有权限 + HttpSession session = req.getSession(); + session.setAttribute("haveSuperiorManageAuth", false); + extRepoFolderService.haveSuperiorManageAuth(extRepoData.getSupFolder(),session); + ExtRepoDataPage res = new ExtRepoDataPage((Boolean)session.getAttribute("haveSuperiorManageAuth"), pageList); return Result.OK(res); } @@ -118,9 +123,12 @@ public class ExtRepoDataController extends JeroController add(@Validated @RequestBody ExtRepoData extRepoData) { + public Result add(@Validated @RequestBody ExtRepoData extRepoData,HttpSession session) { Result result = new Result(); - if (extRepoFolderService.haveManageAuth(extRepoData.getSupFolder())) { + //判断当前文件夹或者上级文件夹是否有权限 + session.setAttribute("haveSuperiorManageAuth", false); + extRepoFolderService.haveSuperiorManageAuth(extRepoData.getSupFolder(),session); + if ((Boolean)session.getAttribute("haveSuperiorManageAuth")) { log.info("对外报告数据表收到文件添加请求,开始处理文件:【" + sdf.format(new Date()) + "】"); int res = extRepoDataService.add(extRepoData); if (CutEnum.CN.getValue().equals(extRepoData.getCut())) { @@ -148,11 +156,14 @@ public class ExtRepoDataController extends JeroController edit(@Validated @RequestBody ExtRepoData extRepoData) { + public Result edit(@Validated @RequestBody ExtRepoData extRepoData,HttpSession session) { Result result = new Result(); ExtRepoData erd = extRepoDataService.queryById(extRepoData.getId()); - LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); - if (extRepoFolderService.isManager() || sysUser.getUsername().equals(erd.getCreateBy())) { + //LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + //判断当前文件夹或者上级文件夹是否有权限 + session.setAttribute("haveSuperiorManageAuth", false); + extRepoFolderService.haveSuperiorManageAuth(erd.getSupFolder(),session); + if (extRepoFolderService.isManager() || (Boolean)session.getAttribute("haveSuperiorManageAuth")) { extRepoData.setSupFolder(erd.getSupFolder()); extRepoDataService.editById(extRepoData); if (CutEnum.CN.getValue().equals(extRepoData.getCut())) { @@ -180,12 +191,15 @@ public class ExtRepoDataController extends JeroController delete(@RequestParam("id") String id, - @RequestParam(name = "cut", defaultValue = "cn") String cut) { + @RequestParam(name = "cut", defaultValue = "cn") String cut,HttpSession session) { Result result = new Result(); ExtRepoData erd = extRepoDataService.queryById(id); if (null != erd) { - LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); - if (extRepoFolderService.isManager() || sysUser.getUsername().equals(erd.getCreateBy())) { + //LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + //判断当前文件夹或者上级文件夹是否有权限 + session.setAttribute("haveSuperiorManageAuth", false); + extRepoFolderService.haveSuperiorManageAuth(erd.getSupFolder(),session); + if (extRepoFolderService.isManager() || (Boolean)session.getAttribute("haveSuperiorManageAuth")) { extRepoDataService.deleteById(id); CosBootUtil.delete(erd.getFileKey()); if (CutEnum.CN.getValue().equals(cut)) { 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..7ad386fa8 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); @@ -89,6 +99,41 @@ public class ExtRepoFolderController extends JeroController isAllowSiblingFolder(@Validated @RequestBody ExtRepoFolder extRepoFolder, + HttpSession session) { + Result result = new Result(); + session.setAttribute("haveSuperiorManageAuth", false); + ExtRepoFolder folder = extRepoFolderService.queryById(extRepoFolder.getId()); + extRepoFolderService.haveSuperiorManageAuth(folder.getSupFolder(),session); + //上层是否有权限 + boolean boo = (Boolean)session.getAttribute("haveSuperiorManageAuth"); + if (boo || extRepoFolderService.haveManageAuth(extRepoFolder.getId())) { + if (!boo) { + if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) { + return result.error500("无法创建同级文件夹!请联系管理员!"); + } else { + return result.error500("Unable to create a sibling folder ! Please Contact your administrator !"); + } + } + } else { + if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) { + return result.error500("没有权限!"); + } else { + return result.error500("You do not have permission !"); + } + } + return result.success(""); + } + /** * 编辑 * @@ -101,7 +146,7 @@ public class ExtRepoFolderController extends JeroController edit(@Validated @RequestBody ExtRepoFolder extRepoFolder, HttpSession session) { Result result = new Result(); session.setAttribute("haveSuperiorManageAuth", false); - extRepoFolderService.haveSuperiorManageAuth(extRepoFolder.getSupFolder(),session); + extRepoFolderService.haveSuperiorManageAuth(extRepoFolder.getId(),session); if (ObjectUtils.isNotEmpty(session.getAttribute("haveSuperiorManageAuth"))&&(Boolean) session.getAttribute("haveSuperiorManageAuth")) { extRepoFolderService.editById(extRepoFolder); if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) { diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoFolderServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoFolderServiceImpl.java index 6acafb9e0..429a8d72f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoFolderServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoFolderServiceImpl.java @@ -241,7 +241,7 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl resList = new ArrayList<>(); for (ExtRepoFolder erf : list) { if (supId.equals(erf.getSupFolder())) { - int childLevel = level + 1; + //int childLevel = level + 1; if (haveViewAuth(erf.getId())) { ERFTreeData date = new ERFTreeData(erf.getFolderName(), erf.getId(), level, erf.getOrderId()); boolean parentRightClick = haveManageAuth(erf.getId()); @@ -252,11 +252,11 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl(),childLevel,parentRightClick)); + date.setChildren(subFolderTree(erf.getId(),new ArrayList(),level,parentRightClick)); date.sortChildren(); resList.add(date); } else { - resList.addAll(getSubFolder(erf.getId(), list, childLevel)); + resList.addAll(getSubFolder(erf.getId(), list, level)); } } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/WordUtil.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/WordUtil.java index b492d8057..e21195135 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/WordUtil.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/WordUtil.java @@ -189,7 +189,7 @@ public class WordUtil { Drawing drawing = factory.createDrawing(); drawing.getAnchorOrInline().add(inline); run.getContent().add(drawing); - replaceTextToImage(bm, text, wordMLPackage, bytes); + replaceTextToImage(bm, "\\$\\{" + key + "\\}", text, wordMLPackage, bytes); } } } catch (Exception var17) { @@ -218,7 +218,7 @@ public class WordUtil { byte[] bytes = (byte[]) picMap.get("bytes"); for(Text bm : textList) { - if (bm.getValue().equals("${" + key + "}")) { + if (bm.getValue().contains("${" + key + "}")) { BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes); Inline inline = imagePart.createImageInline("", "", 0, 1, true); ObjectFactory factory = new ObjectFactory(); @@ -226,7 +226,7 @@ public class WordUtil { Drawing drawing = factory.createDrawing(); drawing.getAnchorOrInline().add(inline); run.getContent().add(drawing); - replaceTextToImage(bm, text, wordMLPackage, bytes); + replaceTextToImage(bm, "\\$\\{" + key + "\\}", text, wordMLPackage, bytes); } } } @@ -387,7 +387,7 @@ public class WordUtil { * @throws Exception * @author liyawei */ - public static void replaceTextToImage(Text bm, Object object, WordprocessingMLPackage wordMLPackage , byte[] bytes) throws Exception { + public static void replaceTextToImage(Text bm, String key, Object object, WordprocessingMLPackage wordMLPackage , byte[] bytes) throws Exception { if (wordMLPackage == null) { return; } @@ -423,16 +423,49 @@ public class WordUtil { BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes); Inline inline = imagePart.createImageInline("", "", 0, 1, true); ObjectFactory factory = Context.getWmlObjectFactory(); - R run = factory.createR(); +// R run = factory.createR(); Drawing drawing = factory.createDrawing(); - if(text != null){ - Text txt = factory.createText(); - txt.setValue(text); - run.getContent().add(txt); + + for(int j=0;j0 && !valueStr[k-1].equals("#")) { + Text txt = factory.createText(); + txt.setValue(values.substring(index, k)); + r.getContent().add(txt); + } + + if (text != null) { + Text txtp = factory.createText(); + txtp.setValue(text); + r.getContent().add(txtp); + } + r.getContent().add(drawing); + drawing.getAnchorOrInline().add(inline); + index = k + 1; + } + + } + + if(!values.endsWith("#")) { + Text txt = factory.createText(); + txt.setValue(values.substring(index)); + r.getContent().add(txt); + } + + theList.add(rangeStart, r); // 添加图片到原占位符位置 } else { return; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java index de51fcadf..c4c4dd28f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java @@ -3754,7 +3754,26 @@ public class FileSplitItemsEOServiceImpl 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..641254c9d 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1312,9 +1312,12 @@ module.exports = { firstLevelDirectory:'First level directory', deselectAll:'Deselect All', classification:'Classification', - consistentAssessment:'Consistent assessment', - viewConsistentAssessment:'View Consistent Assessment', + consistentAssessment:'Consistent', + viewConsistentAssessment:'View Consistent', + viewVarianceAssessment:'View Variance', 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..ee36dd5cd 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1413,9 +1413,12 @@ module.exports = { firstLevelDirectory:'一级目录', deselectAll:'取消全选', classification:'分类', - consistentAssessment:'一致评估', - viewConsistentAssessment:'查看一致评估', + consistentAssessment:'一致', + viewConsistentAssessment:'查看一致项', + viewVarianceAssessment:'查看差异项', 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..5edbc5c27 100644 --- a/jero-web/src/components/PersonnelSelection/index.vue +++ b/jero-web/src/components/PersonnelSelection/index.vue @@ -32,39 +32,39 @@ v-model="searchModel" @search="onSearch"/>
{{$t('dataLoading')}} - - - - {{ data.title }} - - - - - + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +
{{$t('cancel')}} @@ -114,137 +114,137 @@ }, methods: { - checkChange(val, checked, indeterminate) { - if (!checked && this.searchData) { - this.userName = this.userName.filter(res => { - return res != val.title - }) - this.userIds = this.userIds.filter(res => { - return res != val.id - }) - for (let i = 0; i < this.userIds.length; i++) { - if (this.userIds[i] == val.parentId) { - this.userIds.splice(i, 1) - this.userName.splice(i, 1) - i-- - } - } - } else if (checked && this.searchData) { - this.userName.push(val.title) - this.userIds.push(val.id) - } - }, - handleCheckChange(val, data, checked) { - if (!this.searchData) { - this.userName = [] - this.userIds = [] - if (data.checkedNodes && data.checkedNodes.length > 0) { - data.checkedNodes.forEach(res => { - this.userName.push(res.title) - this.userIds.push(res.id) - }) - } - } - }, + // checkChange(val, checked, indeterminate) { + // if (!checked && this.searchData) { + // this.userName = this.userName.filter(res => { + // return res != val.title + // }) + // this.userIds = this.userIds.filter(res => { + // return res != val.id + // }) + // for (let i = 0; i < this.userIds.length; i++) { + // if (this.userIds[i] == val.parentId) { + // this.userIds.splice(i, 1) + // this.userName.splice(i, 1) + // i-- + // } + // } + // } else if (checked && this.searchData) { + // this.userName.push(val.title) + // this.userIds.push(val.id) + // } + // }, + // handleCheckChange(val, data, checked) { + // if (!this.searchData) { + // this.userName = [] + // this.userIds = [] + // if (data.checkedNodes && data.checkedNodes.length > 0) { + // data.checkedNodes.forEach(res => { + // this.userName.push(res.title) + // this.userIds.push(res.id) + // }) + // } + // } + // }, standardClick() { this.treeVisible = false - // this.departId = '' + this.departId = '' this.searchModel = '' this.searchData = '' - // this.userIds = [] - // this.userName = [] - // this.queryDepartUserTreeList(1) + this.userIds = [] + this.userName = [] + this.queryDepartUserTreeList(1) this.visible = true - let gData = localStorage.getItem('gData') - if (gData) { - let dataList = JSON.parse(gData) - if (!this.selectDepartment) { - dataList.forEach(res => { - if (res.type == 'Depart') { - res.disabled = true - } - }) - } - this.dataList = this.toTree(dataList) - } - setTimeout(() => { - if (gData) { - this.gData = this.dataList - this.gData = [...this.gData] - // this.treeVisible = true - if (this.personneQuery[this.query.db_field_name + 'Name']) { - this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',') - } else if (this.personneQuery[this.query.db_field_name]) { - this.userName = this.personneQuery[this.query.db_field_name].split(',') - } else { - this.userName = [] - } - if (this.personneQuery[this.query.db_field_name + '_id']) { - this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',') - } else if (this.personneQuery[this.query.db_field_name]) { - this.userIds = this.personneQuery[this.query.db_field_name].split(',') - } else { - this.userIds = [] - } - this.defaultCheckedKeys = this.userIds - this.defaultCheckedKeys = [...this.defaultCheckedKeys] - this.defaultExpandAll = false - this.treeVisible = true - } else { - this.queryDepartUserTreeList(1) - } - }, 200) - }, - deleteChildren(value, arr) { - let newarr = [] - arr.forEach(element => { - if (element.title.indexOf(value) > -1) { // 判断条件 - newarr.push(element) - } else { - if (element.children && element.children.length > 0) { - let redata = this.deleteChildren(value, element.children) - if (redata && redata.length > 0) { - let obj = { - ...element, - children: redata - } - newarr.push(obj) - } - } - } - }) - return newarr + // let gData = localStorage.getItem('gData') + // if (gData) { + // let dataList = JSON.parse(gData) + // if (!this.selectDepartment) { + // dataList.forEach(res => { + // if (res.type == 'Depart') { + // res.disabled = true + // } + // }) + // } + // this.dataList = this.toTree(dataList) + // } + // setTimeout(() => { + // if (gData) { + // this.gData = this.dataList + // this.gData = [...this.gData] + // // this.treeVisible = true + // if (this.personneQuery[this.query.db_field_name + 'Name']) { + // this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',') + // } else if (this.personneQuery[this.query.db_field_name]) { + // this.userName = this.personneQuery[this.query.db_field_name].split(',') + // } else { + // this.userName = [] + // } + // if (this.personneQuery[this.query.db_field_name + '_id']) { + // this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',') + // } else if (this.personneQuery[this.query.db_field_name]) { + // this.userIds = this.personneQuery[this.query.db_field_name].split(',') + // } else { + // this.userIds = [] + // } + // this.defaultCheckedKeys = this.userIds + // this.defaultCheckedKeys = [...this.defaultCheckedKeys] + // this.defaultExpandAll = false + // this.treeVisible = true + // } else { + // this.queryDepartUserTreeList(1) + // } + // }, 200) }, + // deleteChildren(value, arr) { + // let newarr = [] + // arr.forEach(element => { + // if (element.title.indexOf(value) > -1) { // 判断条件 + // newarr.push(element) + // } else { + // if (element.children && element.children.length > 0) { + // let redata = this.deleteChildren(value, element.children) + // if (redata && redata.length > 0) { + // let obj = { + // ...element, + // children: redata + // } + // newarr.push(obj) + // } + // } + // } + // }) + // return newarr + // }, //将数据拼成树形结构 - toTree(config, num) { - // 删除 所有 children,以防止多次调用 - config.forEach(function(item) { - delete item.children - }) - // 将数据存储为 以 id 为 KEY 的 map 索引数据列 - let map = {} - config.forEach((item) => { - item.label = item.name - item.key = item.id - - item.title = item.name + (item.itemName ? ' ' + item.itemName : '') - map[item.id] = item - }) - let val = [] - config.forEach((item) => { - // 以当前遍历项,的pid,去map对象中找到索引的id - let parent = map[item.parentId] - - // 如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中 - if (parent) { - (parent.children || (parent.children = [])).push(item) - } else { - //如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级 - val.push(item) - } - }) - return val - }, + // toTree(config, num) { + // // 删除 所有 children,以防止多次调用 + // config.forEach(function(item) { + // delete item.children + // }) + // // 将数据存储为 以 id 为 KEY 的 map 索引数据列 + // let map = {} + // config.forEach((item) => { + // item.label = item.name + // item.key = item.id + // + // item.title = item.name + (item.itemName ? ' ' + item.itemName : '') + // map[item.id] = item + // }) + // let val = [] + // config.forEach((item) => { + // // 以当前遍历项,的pid,去map对象中找到索引的id + // let parent = map[item.parentId] + // + // // 如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中 + // if (parent) { + // (parent.children || (parent.children = [])).push(item) + // } else { + // //如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级 + // val.push(item) + // } + // }) + // return val + // }, standardDelete() { this.$emit('input', null) this.$forceUpdate() @@ -255,61 +255,61 @@ // this.selectedKey = selectedKeys // }, - // onCheck(checkedKeys, info) { - // this.userIds = checkedKeys.checked - // this.userName = [] - // if (this.userIds.length > 0) { - // for (let i = 0; i < this.userIds.length; i++) { - // for (let j = 0; j < this.defaultCheckedKeysName.length; j++) { - // if (this.userIds[i] == this.defaultCheckedKeysName[j].id) { - // this.userName.push(this.defaultCheckedKeysName[j].name) - // } - // } - // } - // } - // if (info.checkedNodes && info.checkedNodes.length > 0) { - // info.checkedNodes.forEach(res => { - // if (res.data.props.dataRef.key) { - // this.content.push({ - // id: res.data.props.dataRef.key, - // title: res.data.props.dataRef.title - // }) - // } else { - // this.content.push({ - // id: res.data.props.id, - // title: res.data.props.title - // }) - // } - // }) - // } - // if (this.content && this.content.length > 0) { - // for (let i = 0; i < this.content.length; i++) { - // for (let j = i + 1; j < this.content.length; j++) { - // if (this.content[i].id == this.content[j].id) { - // this.content.splice(j, 1) - // j-- - // } - // } - // } - // this.userIds.forEach(res => { - // this.content.forEach(val => { - // if (res == val.id) { - // this.userName.push(val.title) - // } - // }) - // }) - // } - // if (this.userName.length > 0) { - // for (let i = 0; i < this.userName.length; i++) { - // for (let j = i + 1; j < this.userName.length; j++) { - // if (this.userName[i] == this.userName[j]) { - // this.userName.splice(j, 1) - // j-- - // } - // } - // } - // } - // }, + onCheck(checkedKeys, info) { + this.userIds = checkedKeys.checked + this.userName = [] + if (this.userIds.length > 0) { + for (let i = 0; i < this.userIds.length; i++) { + for (let j = 0; j < this.defaultCheckedKeysName.length; j++) { + if (this.userIds[i] == this.defaultCheckedKeysName[j].id) { + this.userName.push(this.defaultCheckedKeysName[j].name) + } + } + } + } + if (info.checkedNodes && info.checkedNodes.length > 0) { + info.checkedNodes.forEach(res => { + if (res.data.props.dataRef.key) { + this.content.push({ + id: res.data.props.dataRef.key, + title: res.data.props.dataRef.title + }) + } else { + this.content.push({ + id: res.data.props.id, + title: res.data.props.title + }) + } + }) + } + if (this.content && this.content.length > 0) { + for (let i = 0; i < this.content.length; i++) { + for (let j = i + 1; j < this.content.length; j++) { + if (this.content[i].id == this.content[j].id) { + this.content.splice(j, 1) + j-- + } + } + } + this.userIds.forEach(res => { + this.content.forEach(val => { + if (res == val.id) { + this.userName.push(val.title) + } + }) + }) + } + if (this.userName.length > 0) { + for (let i = 0; i < this.userName.length; i++) { + for (let j = i + 1; j < this.userName.length; j++) { + if (this.userName[i] == this.userName[j]) { + this.userName.splice(j, 1) + j-- + } + } + } + } + }, handleCancel() { this.visible = false this.treeVisible = false @@ -324,12 +324,12 @@ } let userIds = JSON.parse(JSON.stringify(this.userIds)) let userName = JSON.parse(JSON.stringify(this.userName)) - userName = userName.filter(function(item, index) { - return userName.indexOf(item) === index // 因为indexOf 只能查找到第一个 - }) - userIds = userIds.filter(function(item, index) { - return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个 - }) + // userName = userName.filter(function(item, index) { + // return userName.indexOf(item) === index // 因为indexOf 只能查找到第一个 + // }) + // userIds = userIds.filter(function(item, index) { + // return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个 + // }) this.$emit('input', userName.join(',')) this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript) this.visible = false @@ -347,119 +347,119 @@ this.defaultCheckedKeys = [] }, onSearch(e) { - this.treeVisible = false - let p = new Promise((resolve, reject) => { - resolve() + // this.treeVisible = false + // let p = new Promise((resolve, reject) => { + // resolve() + // }) + // p.then(() => { + // this.searchData = e + // let gData = localStorage.getItem('gData') + // let content = [] + // if (gData) { + // if (e) { + // JSON.parse(gData).forEach(res => { + // if (res.type == 'User') { + // if (res.name.includes(e)) { + // res.color = true + // content.push(res) + // } + // } + // // else if(res.type == 'Depart'){ + // // content.push(res) + // // } + // }) + // let gDataAdmin = this.toTree(content) + // this.gData = this.deleteChildren(e, gDataAdmin) + // this.defaultExpandAll = true + // this.treeVisible = true + // this.defaultCheckedKeys = this.userIds + // this.defaultCheckedKeys = [...this.defaultCheckedKeys] + // this.loading = false + // } else { + // let content = JSON.parse(gData) + // if (!this.selectDepartment) { + // content.forEach(res => { + // if (res.type == 'Depart') { + // res.disabled = true + // } + // }) + // } + // this.gData = this.toTree(content) + // this.defaultExpandAll = false + // this.defaultCheckedKeys = this.userIds + // this.defaultCheckedKeys = [...this.defaultCheckedKeys] + // this.treeVisible = true + // this.loading = false + // } + // } + // }) + this.gData = [] + this.departId = '' + this.visibleTree = false + if (e) { + this.getUserAndDepart() + } else { + this.treeVisible = false + this.queryDepartUserTreeList(2) + } + }, + getUserAndDepart() { + getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => { + if (res) { + this.gData = res.filter(ele => ele.flag === 'DEPART') + } else { + this.gData = [] + } + this.visibleTree = true }) - p.then(() => { - this.searchData = e - let gData = localStorage.getItem('gData') - let content = [] - if (gData) { - if (e) { - JSON.parse(gData).forEach(res => { - if (res.type == 'User') { - if (res.name.includes(e)) { - res.color = true - content.push(res) - } - } - // else if(res.type == 'Depart'){ - // content.push(res) - // } - }) - let gDataAdmin = this.toTree(content) - this.gData = this.deleteChildren(e, gDataAdmin) - this.defaultExpandAll = true - this.treeVisible = true - this.defaultCheckedKeys = this.userIds - this.defaultCheckedKeys = [...this.defaultCheckedKeys] - this.loading = false + }, + onExpand(selectedKeys, val) { + if (this.searchModel == '' || !this.searchModel) { + if (val.expanded) { + if (this.departId == val.node.value) { } else { - let content = JSON.parse(gData) - if (!this.selectDepartment) { - content.forEach(res => { - if (res.type == 'Depart') { - res.disabled = true - } - }) - } - this.gData = this.toTree(content) - this.defaultExpandAll = false - this.defaultCheckedKeys = this.userIds - this.defaultCheckedKeys = [...this.defaultCheckedKeys] - this.treeVisible = true - this.loading = false + this.departId = val.node.value + this.queryDepartUserTreeList(2) } } - }) - // this.gData = [] - // this.departId = '' - // this.visibleTree = false - // if (e) { - // this.getUserAndDepart() - // } else { - // this.treeVisible = false - // this.queryDepartUserTreeList(2) - // } + } }, - // getUserAndDepart() { - // getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => { - // if (res) { - // this.gData = res.filter(ele => ele.flag === 'DEPART') - // } else { - // this.gData = [] - // } - // this.visibleTree = true - // }) - // }, - // onExpand(selectedKeys, val) { - // if (this.searchModel == '' || !this.searchModel) { - // if (val.expanded) { - // if (this.departId == val.node.value) { - // } else { - // this.departId = val.node.value - // this.queryDepartUserTreeList(2) - // } - // } - // } - // }, queryDepartUserTreeList(num) { - // let gData = JSON.parse(JSON.stringify(this.gData)) - // if (gData && gData.length > 0) { - // gData = JSON.stringify(gData) - // } else { - // gData = '' - // } + let gData = JSON.parse(JSON.stringify(this.gData)) + if (gData && gData.length > 0) { + gData = JSON.stringify(gData) + } else { + gData = '' + } this.confirmLoading = true this.loading = true //queryDepartUserTreeList //queryUserTreeList - postAction('sys/user/queryUserTreeList', { - // departId: this.departId, - // json: gData, - // flag: '1' + postAction('sys/user/queryDepartUserTreeList', { + departId: this.departId, + json: gData, + flag: '1' }).then((res) => { this.confirmLoading = false if (res.success) { this.loading = false // localStorage.setItem('gData', JSON.stringify(res.result)) // this.toTree(dataList) - let content = JSON.parse(JSON.stringify(res.result)) - if (!this.selectDepartment) { - res.result.forEach(res => { - if (res.type == 'Depart') { - res.disabled = true - } - }) - } - localStorage.removeItem('gData') - localStorage.setItem('gData', JSON.stringify(content)) - this.gData = this.toTree(res.result) - // this.gData = res.result + // let content = JSON.parse(JSON.stringify(res.result)) + // if (!this.selectDepartment) { + // res.result.forEach(res => { + // if (res.type == 'Depart') { + // res.disabled = true + // } + // }) + // } + // localStorage.removeItem('gData') + // localStorage.setItem('gData', JSON.stringify(content)) + // this.gData = this.toTree(res.result) + this.gData = res.result this.gData = [...this.gData] // this.gData[0].isLeaf = false - // this.defaultExpandedKeys = [this.departId] + this.defaultExpandedKeys = [this.departId] if (num == 1) { if (this.userName && this.userName.length == 0) { if (this.personneQuery[this.query.db_field_name + 'Name']) { @@ -482,14 +482,14 @@ this.defaultCheckedKeys = this.userIds this.defaultCheckedKeys = [...this.defaultCheckedKeys] this.defaultCheckedKeysName = [] - // if (this.defaultCheckedKeys.length > 0) { - // for (let i = 0; i < this.defaultCheckedKeys.length; i++) { - // this.defaultCheckedKeysName.push({ - // id: this.defaultCheckedKeys[i], - // name: this.userName[i] - // }) - // } - // } + if (this.defaultCheckedKeys.length > 0) { + for (let i = 0; i < this.defaultCheckedKeys.length; i++) { + this.defaultCheckedKeysName.push({ + id: this.defaultCheckedKeys[i], + name: this.userName[i] + }) + } + } } this.defaultExpandAll = false this.treeVisible = true diff --git a/jero-web/src/components/setCreator/index.vue b/jero-web/src/components/setCreator/index.vue index 12c38aa43..db2ff57d5 100644 --- a/jero-web/src/components/setCreator/index.vue +++ b/jero-web/src/components/setCreator/index.vue @@ -15,6 +15,26 @@ allowClear :placeholder="$t('NodeQuickLookup')"/>
+ + + + + + + + + + + + + + + + + + + + import { getAction, postAction } from '@/api/manage' import eventBUs from '../../common/event' + import virtualNodeTree from '@/components/virtualNodeTree/tree' export default { name: 'index', + components: { + virtualNodeTree + }, data() { return { gData: [], searchModel: '', autoExpandParent: true, expandedKeys: [], + checkboxList: [], visible: false, confirmLoading: false, selectedKey: [], @@ -56,28 +81,135 @@ userIds: [], departId: '', defaultExpandedKeys: [], + defaultExpandAll: false, + defaultCheckedKeys: [], content: [], userName: [], submitLoading: false, - visibleTree: false + visibleTree: false, + treeVisible: false } }, mounted() { }, methods: { + // checkChange(val, checked, indeterminate) { + // if (!checked && this.searchData) { + // this.userName = this.userName.filter(res => { + // return res != val.title + // }) + // this.userIds = this.userIds.filter(res => { + // return res != val.id + // }) + // for (let i = 0; i < this.userIds.length; i++) { + // if (this.userIds[i] == val.parentId) { + // this.userIds.splice(i, 1) + // this.userName.splice(i, 1) + // i-- + // } + // } + // } else if (checked && this.searchData) { + // this.userName.push(val.title) + // this.userIds.push(val.id) + // } + // }, + // handleCheckChange(val, data, checked) { + // if (!this.searchData) { + // this.userName = [] + // this.userIds = [] + // if (data.checkedNodes && data.checkedNodes.length > 0) { + // data.checkedNodes.forEach(res => { + // this.userName.push(res.title) + // this.userIds.push(res.id) + // }) + // } + // } + // }, getPush(data) { this.tableKey = data this.userName = [] + this.userIds = [] this.content = [] + this.defaultCheckedKeys = [] this.searchModel = '' this.visible = true this.visibleTree = false + this.treeVisible = false this.$nextTick(() => { this.departId = '' this.queryDepartUserTreeList() }) + // let gData = localStorage.getItem('gData') + // if (gData) { + // let dataList = JSON.parse(gData) + // dataList.forEach(res => { + // if (res.type == 'Depart') { + // res.disabled = true + // } + // }) + // this.dataList = this.toTree(dataList) + // } + // setTimeout(() => { + // if (gData) { + // this.gData = this.dataList + // this.gData = [...this.gData] + // this.treeVisible = true + // } else { + // this.queryDepartUserTreeList(1) + // } + // }, 200) }, + // deleteChildren(value, arr) { + // let newarr = [] + // arr.forEach(element => { + // if (element.title.indexOf(value) > -1) { // 判断条件 + // newarr.push(element) + // } else { + // if (element.children && element.children.length > 0) { + // let redata = this.deleteChildren(value, element.children) + // if (redata && redata.length > 0) { + // let obj = { + // ...element, + // children: redata + // } + // newarr.push(obj) + // } + // } + // } + // }) + // return newarr + // }, + // // 将数据拼成树形结构 + // toTree(config, num) { + // // 删除 所有 children,以防止多次调用 + // config.forEach(function(item) { + // delete item.children + // }) + // // 将数据存储为 以 id 为 KEY 的 map 索引数据列 + // let map = {} + // config.forEach((item) => { + // item.label = item.name + // item.key = item.id + // + // item.title = item.name + (item.itemName ? ' ' + item.itemName : '') + // map[item.id] = item + // }) + // let val = [] + // config.forEach((item) => { + // // 以当前遍历项,的pid,去map对象中找到索引的id + // let parent = map[item.parentId] + // + // // 如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中 + // if (parent) { + // (parent.children || (parent.children = [])).push(item) + // } else { + // //如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级 + // val.push(item) + // } + // }) + // return val + // }, onSelect(selectedKeys) { this.selectedKey = selectedKeys }, @@ -125,6 +257,47 @@ }) }, onSearch(e) { + // this.treeVisible = false + // let p = new Promise((resolve, reject) => { + // resolve() + // }) + // p.then(() => { + // this.searchData = e + // let gData = localStorage.getItem('gData') + // let content = [] + // if (gData) { + // if (e) { + // JSON.parse(gData).forEach(res => { + // if (res.type == 'User') { + // if (res.name.includes(e)) { + // res.color = true + // content.push(res) + // } + // } + // }) + // let gDataAdmin = this.toTree(content) + // this.gData = this.deleteChildren(e, gDataAdmin) + // this.defaultExpandAll = true + // this.treeVisible = true + // this.defaultCheckedKeys = this.userIds + // this.defaultCheckedKeys = [...this.defaultCheckedKeys] + // this.loading = false + // } else { + // let content = JSON.parse(gData) + // content.forEach(res => { + // if (res.type == 'Depart') { + // res.disabled = true + // } + // }) + // this.gData = this.toTree(content) + // this.defaultExpandAll = false + // this.defaultCheckedKeys = this.userIds + // this.defaultCheckedKeys = [...this.defaultCheckedKeys] + // this.treeVisible = true + // this.loading = false + // } + // } + // }) this.gData = [] this.departId = '' this.visibleTree = false @@ -136,8 +309,8 @@ }, getUserAndDepart() { getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => { - if (res){ - this.gData = res.filter(ele => ele.flag === 'DEPART'); + if (res) { + this.gData = res.filter(ele => ele.flag === 'DEPART') } else { this.gData = [] } @@ -159,8 +332,20 @@ }).then((res) => { this.confirmLoading = false if (res.success) { + // let content = JSON.parse(JSON.stringify(res.result)) + // res.result.forEach(res => { + // if (res.type == 'Depart') { + // res.disabled = true + // } + // }) + // localStorage.removeItem('gData') + // localStorage.setItem('gData', JSON.stringify(content)) + // this.gData = this.toTree(res.result) this.gData = res.result - this.defaultExpandedKeys = [this.departId] + this.gData = [...this.gData] + // this.defaultExpandedKeys = [this.departId] + this.defaultExpandAll = false + this.treeVisible = true this.visibleTree = true } else { this.gData = [] @@ -243,4 +428,13 @@ 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/store/modules/user.js b/jero-web/src/store/modules/user.js index c59903a89..2b9b58549 100644 --- a/jero-web/src/store/modules/user.js +++ b/jero-web/src/store/modules/user.js @@ -142,14 +142,14 @@ const user = { //Vue.ls.set(USER_AUTH,authData); sessionStorage.setItem(USER_AUTH, JSON.stringify(authData)) sessionStorage.setItem(SYS_BUTTON_AUTH, JSON.stringify(allAuthData)) - let gData = localStorage.getItem('gData') - if (!gData) { - getAction('sys/user/queryUserTreeList', {}).then((res) => { - if (res.success) { - localStorage.setItem('gData', JSON.stringify(res.result)) - } - }) - } + // let gData = localStorage.getItem('gData') + // if (!gData) { + // getAction('sys/user/queryUserTreeList', {}).then((res) => { + // if (res.success) { + // localStorage.setItem('gData', JSON.stringify(res.result)) + // } + // }) + // } if (menuData && menuData.length > 0) { //update--begin--autor:qinfeng-----date:20200109------for:JEECG-63 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------ menuData.forEach((item, index) => { diff --git a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue index 5ea7211b3..4f9789fa2 100644 --- a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue +++ b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue @@ -41,10 +41,10 @@