Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
wangzhijiang
2022-10-11 09:55:59 +08:00
45 changed files with 1191 additions and 511 deletions
@@ -1263,6 +1263,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
} }
List<String> configIdList = Arrays.asList(paramsReportDetailVO.getConfigIds().split(",")); // 需要导出的配置列 List<String> configIdList = Arrays.asList(paramsReportDetailVO.getConfigIds().split(",")); // 需要导出的配置列
List<Map<String, Object>> dataList = paramsReportDetailEOMapper.listInfoForExport(idList, paramsReportDetailVO); // 查询需要导出的数据 List<Map<String, Object>> 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<ParamsReportConfigEO> paramsConfigEOList = paramsReportConfigEOService.queryList(paramsReportDetailVO.getParamsManifestId()); // 查询所有配置列 List<ParamsReportConfigEO> paramsConfigEOList = paramsReportConfigEOService.queryList(paramsReportDetailVO.getParamsManifestId()); // 查询所有配置列
@@ -8,8 +8,10 @@ public class SarFileCompareResultVO {
private String infoId; private String infoId;
private String serialNumberLeft; private String serialNumberLeft;
private String fileNameLeft; private String fileNameLeft;
private String fileIdLeft;
private String serialNumberRight; private String serialNumberRight;
private String fileNameRight; private String fileNameRight;
private String fileIdRight;
private List<SarFileCompareItemComVO> resList; private List<SarFileCompareItemComVO> resList;
private String comments; private String comments;
@@ -78,4 +80,20 @@ public class SarFileCompareResultVO {
public void setComments(String comments) { public void setComments(String comments) {
this.comments = 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;
}
} }
@@ -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;
}
}
@@ -7,6 +7,7 @@ import com.jero.common.constant.enums.CutEnum;
import com.jero.common.exception.JeroBootException; import com.jero.common.exception.JeroBootException;
import com.jero.common.util.oss.CosBootUtil; import com.jero.common.util.oss.CosBootUtil;
import com.jero.modules.compare.entity.*; 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.mapper.SarFileCompareItemCommentMapper;
import com.jero.modules.compare.service.ISarFileCompareInfoService; import com.jero.modules.compare.service.ISarFileCompareInfoService;
import com.jero.modules.compare.service.ISarFileCompareItemCommentService; import com.jero.modules.compare.service.ISarFileCompareItemCommentService;
@@ -143,8 +144,10 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
resultVO.setInfoId(infoId); resultVO.setInfoId(infoId);
resultVO.setSerialNumberLeft(sfcInfo.getSerialNumberLeft()); resultVO.setSerialNumberLeft(sfcInfo.getSerialNumberLeft());
resultVO.setFileNameLeft(sfcInfo.getFileNameLeft()); resultVO.setFileNameLeft(sfcInfo.getFileNameLeft());
resultVO.setFileIdLeft(sfcInfo.getFileIdLeft());
resultVO.setSerialNumberRight(sfcInfo.getSerialNumberRight()); resultVO.setSerialNumberRight(sfcInfo.getSerialNumberRight());
resultVO.setFileNameRight(sfcInfo.getFileNameRight()); resultVO.setFileNameRight(sfcInfo.getFileNameRight());
resultVO.setFileIdRight(sfcInfo.getFileIdRight());
resultVO.setComments(sfcInfo.getComments()); resultVO.setComments(sfcInfo.getComments());
List<SarFileCompareItemComment> list = queryListByInfoId(infoId,comment); List<SarFileCompareItemComment> list = queryListByInfoId(infoId,comment);
@@ -180,7 +183,11 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
public List<SarFileCompareItemComment> queryListByInfoId(String infoId,String comment) { public List<SarFileCompareItemComment> queryListByInfoId(String infoId,String comment) {
LambdaQueryWrapper<SarFileCompareItemComment> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SarFileCompareItemComment> queryWrapper = new LambdaQueryWrapper<>();
if (ObjectUtils.isNotEmpty(comment)) { 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.eq(SarFileCompareItemComment::getInfoId, infoId);
queryWrapper.orderBy(true, true, SarFileCompareItemComment::getCreateTime); queryWrapper.orderBy(true, true, SarFileCompareItemComment::getCreateTime);
@@ -201,7 +208,11 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
queryWrapper.in(SarFileCompareItemComment::getId, Arrays.asList(selectIds.split(","))); queryWrapper.in(SarFileCompareItemComment::getId, Arrays.asList(selectIds.split(",")));
} }
if (ObjectUtils.isNotEmpty(comment)) { 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.orderBy(true, true, SarFileCompareItemComment::getCreateTime); queryWrapper.orderBy(true, true, SarFileCompareItemComment::getCreateTime);
list = this.list(queryWrapper); list = this.list(queryWrapper);
@@ -288,9 +299,9 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
if (ObjectUtils.isEmpty(row2)) { if (ObjectUtils.isEmpty(row2)) {
row2 = sheet.createRow(j + i); row2 = sheet.createRow(j + i);
} }
imgToExcel(workbook, dir, patriarch, cellStyleLink, byteArrayOut, row2, i, j, leftSplit[j], 3); handleSpecificData(workbook, dir, patriarch, cellStyleLink, byteArrayOut, row2, i, j, leftSplit[j], 3);
} else { } else {
imgToExcel(workbook, dir, patriarch, cellStyleLink, byteArrayOut, row, i, j, leftSplit[j], 3); handleSpecificData(workbook, dir, patriarch, cellStyleLink, byteArrayOut, row, i, j, leftSplit[j], 3);
} }
} }
} }
@@ -322,9 +333,9 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
if (ObjectUtils.isEmpty(row2)) { if (ObjectUtils.isEmpty(row2)) {
row2 = sheet.createRow(j + i); row2 = sheet.createRow(j + i);
} }
imgToExcel(workbook, dir, patriarch, cellStyleLink, byteArrayOut, row2, i, j, rightSplit[j], 7); handleSpecificData(workbook, dir, patriarch, cellStyleLink, byteArrayOut, row2, i, j, rightSplit[j], 7);
} else { } else {
imgToExcel(workbook, dir, patriarch, cellStyleLink, byteArrayOut, row, i, j, rightSplit[j], 7); handleSpecificData(workbook, dir, patriarch, cellStyleLink, byteArrayOut, row, i, j, rightSplit[j], 7);
} }
} }
} }
@@ -401,7 +412,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
} }
/** /**
* 将图片添加到excel指定单元格中 * 处理图片跟表格类型的数据
* @param workbook * @param workbook
* @param dir * @param dir
* @param patriarch * @param patriarch
@@ -414,7 +425,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
* @param cellNum * @param cellNum
* @throws IOException * @throws IOException
*/ */
private void imgToExcel(Workbook workbook, String dir, HSSFPatriarch patriarch, CellStyle cellStyleLink, ByteArrayOutputStream byteArrayOut, Row row, int i, int j, String text, int 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")) { if (text.contains("/upFiles")) {
row.setHeight((short) 3000); //设置行高 row.setHeight((short) 3000); //设置行高
//先将图片下载到本地 //先将图片下载到本地
@@ -439,7 +450,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
} else { } else {
Cell cell = row.createCell(cellNum); Cell cell = row.createCell(cellNum);
if (text.contains("<table")) { if (text.contains("<table")) {
tableAssociations(workbook, cellStyleLink, cell, text); tableAssociate(workbook, cellStyleLink, cell, text);
} else { } else {
cell.setCellValue(text); cell.setCellValue(text);
} }
@@ -453,7 +464,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
* @param cell * @param cell
* @param tableHtml * @param tableHtml
*/ */
private void tableAssociations(Workbook workbook, CellStyle cellStyleLink, Cell cell, String tableHtml) { private void tableAssociate(Workbook workbook, CellStyle cellStyleLink, Cell cell, String tableHtml) {
cell.setCellValue("点击查看详情"); cell.setCellValue("点击查看详情");
//新开sheet生成表格 //新开sheet生成表格
if (org.apache.commons.lang.StringUtils.isNotEmpty(tableHtml) && tableHtml.indexOf("<tbody>") < 0) { if (org.apache.commons.lang.StringUtils.isNotEmpty(tableHtml) && tableHtml.indexOf("<tbody>") < 0) {
@@ -487,7 +498,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
private String getSplitContent(HttpServletRequest request, String text) { private String getSplitContent(HttpServletRequest request, String text) {
text = text.replace("<p>", "").replace("</p>", "\r\n"); text = text.replace("<p>", "").replace("</p>", "\r\n");
//分割图片 //分割图片
addImgdata(text, request.getSession()); splitImg(text, request.getSession());
//分割表格 //分割表格
String txtAndImg = (String) request.getSession().getAttribute("txtAndImg"); String txtAndImg = (String) request.getSession().getAttribute("txtAndImg");
txtAndImg = txtAndImg.replaceAll("table", "replaceTable"); txtAndImg = txtAndImg.replaceAll("table", "replaceTable");
@@ -514,18 +525,19 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
} }
/** /**
* 提取字符串中<img>标签内容中的图片路径,并重新按顺序拼接 * 分割图片
* @param text * @param text
* @param session
* @return * @return
*/ */
private void addImgdata(String text,HttpSession session) { private void splitImg(String text,HttpSession session) {
if (text.contains("<img")) { if (text.contains("<img")) {
String txtLeft = text.substring(0, text.indexOf("<img")); String txtLeft = text.substring(0, text.indexOf("<img"));
String txtRight = text.substring(text.indexOf("g\">") + 3); String txtRight = text.substring(text.indexOf("g\">") + 3);
String img = text.substring(text.indexOf("<img"), text.indexOf("g\">")); String img = text.substring(text.indexOf("<img"), text.indexOf("g\">"));
String path = img.substring(img.lastIndexOf("=") + 1)+"g"; String path = img.substring(img.lastIndexOf("=") + 1)+"g";
text = txtLeft + "---" + path + "---" + txtRight; text = txtLeft + "---" + path + "---" + txtRight;
addImgdata(text, session); splitImg(text, session);
} else { } else {
session.setAttribute("txtAndImg", text); session.setAttribute("txtAndImg", text);
} }
@@ -25,6 +25,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
@@ -92,7 +93,11 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
queryWrapper.eq(ExtRepoData::getSupFolder, extRepoData.getSupFolder()); queryWrapper.eq(ExtRepoData::getSupFolder, extRepoData.getSupFolder());
queryWrapper.orderBy(true, false, ExtRepoData::getCreateTime); queryWrapper.orderBy(true, false, ExtRepoData::getCreateTime);
IPage<ExtRepoData> pageList = extRepoDataService.page(page, queryWrapper); IPage<ExtRepoData> 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); return Result.OK(res);
} }
@@ -118,9 +123,12 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
@AutoLog(value = "对外报告数据表-添加") @AutoLog(value = "对外报告数据表-添加")
@ApiOperation(value = "对外报告数据表-添加", notes = "对外报告数据表-添加") @ApiOperation(value = "对外报告数据表-添加", notes = "对外报告数据表-添加")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody ExtRepoData extRepoData) { public Result<?> add(@Validated @RequestBody ExtRepoData extRepoData,HttpSession session) {
Result<ExtRepoData> result = new Result(); Result<ExtRepoData> 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()) + "】"); log.info("对外报告数据表收到文件添加请求,开始处理文件:【" + sdf.format(new Date()) + "】");
int res = extRepoDataService.add(extRepoData); int res = extRepoDataService.add(extRepoData);
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) { if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
@@ -148,11 +156,14 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
@AutoLog(value = "对外报告数据表-编辑") @AutoLog(value = "对外报告数据表-编辑")
@ApiOperation(value = "对外报告数据表-编辑", notes = "对外报告数据表-编辑") @ApiOperation(value = "对外报告数据表-编辑", notes = "对外报告数据表-编辑")
@PutMapping(value = "/edit") @PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody ExtRepoData extRepoData) { public Result<?> edit(@Validated @RequestBody ExtRepoData extRepoData,HttpSession session) {
Result<ExtRepoData> result = new Result(); Result<ExtRepoData> result = new Result();
ExtRepoData erd = extRepoDataService.queryById(extRepoData.getId()); ExtRepoData erd = extRepoDataService.queryById(extRepoData.getId());
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); //LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if (extRepoFolderService.isManager() || sysUser.getUsername().equals(erd.getCreateBy())) { //判断当前文件夹或者上级文件夹是否有权限
session.setAttribute("haveSuperiorManageAuth", false);
extRepoFolderService.haveSuperiorManageAuth(erd.getSupFolder(),session);
if (extRepoFolderService.isManager() || (Boolean)session.getAttribute("haveSuperiorManageAuth")) {
extRepoData.setSupFolder(erd.getSupFolder()); extRepoData.setSupFolder(erd.getSupFolder());
extRepoDataService.editById(extRepoData); extRepoDataService.editById(extRepoData);
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) { if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
@@ -180,12 +191,15 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
@ApiOperation(value = "对外报告数据表-通过id删除", notes = "对外报告数据表-通过id删除") @ApiOperation(value = "对外报告数据表-通过id删除", notes = "对外报告数据表-通过id删除")
@DeleteMapping(value = "/delete") @DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam("id") String id, public Result<?> delete(@RequestParam("id") String id,
@RequestParam(name = "cut", defaultValue = "cn") String cut) { @RequestParam(name = "cut", defaultValue = "cn") String cut,HttpSession session) {
Result<ExtRepoData> result = new Result(); Result<ExtRepoData> result = new Result();
ExtRepoData erd = extRepoDataService.queryById(id); ExtRepoData erd = extRepoDataService.queryById(id);
if (null != erd) { if (null != erd) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); //LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if (extRepoFolderService.isManager() || sysUser.getUsername().equals(erd.getCreateBy())) { //判断当前文件夹或者上级文件夹是否有权限
session.setAttribute("haveSuperiorManageAuth", false);
extRepoFolderService.haveSuperiorManageAuth(erd.getSupFolder(),session);
if (extRepoFolderService.isManager() || (Boolean)session.getAttribute("haveSuperiorManageAuth")) {
extRepoDataService.deleteById(id); extRepoDataService.deleteById(id);
CosBootUtil.delete(erd.getFileKey()); CosBootUtil.delete(erd.getFileKey());
if (CutEnum.CN.getValue().equals(cut)) { if (CutEnum.CN.getValue().equals(cut)) {
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog; import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.CutEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.base.controller.JeroController; import com.jero.common.system.base.controller.JeroController;
import com.jero.modules.extRepo.entity.ERFTreeDataVO; import com.jero.modules.extRepo.entity.ERFTreeDataVO;
import com.jero.modules.extRepo.entity.ExtRepoData; import com.jero.modules.extRepo.entity.ExtRepoData;
@@ -66,11 +67,20 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
public Result<?> add(@Validated @RequestBody ExtRepoFolder extRepoFolder, HttpSession session) { public Result<?> add(@Validated @RequestBody ExtRepoFolder extRepoFolder, HttpSession session) {
Result<ExtRepoFolder> result = new Result(); Result<ExtRepoFolder> result = new Result();
session.setAttribute("haveSuperiorManageAuth", false); session.setAttribute("haveSuperiorManageAuth", false);
extRepoFolderService.haveSuperiorManageAuth(extRepoFolder.getSupFolder(),session); ExtRepoFolder folder = extRepoFolderService.queryById(extRepoFolder.getSupFolder());
if (ObjectUtils.isNotEmpty(session.getAttribute("haveSuperiorManageAuth"))&&(Boolean) session.getAttribute("haveSuperiorManageAuth")) { extRepoFolderService.haveSuperiorManageAuth(folder.getSupFolder(),session);
//上层是否有权限
boolean boo = (Boolean)session.getAttribute("haveSuperiorManageAuth");
if (boo||extRepoFolderService.haveManageAuth(extRepoFolder.getSupFolder())) {
if (!extRepoFolder.isAddSub()) { 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()); extRepoFolder.setSupFolder(folder.getSupFolder());
} }
extRepoFolderService.add(extRepoFolder); extRepoFolderService.add(extRepoFolder);
@@ -89,6 +99,41 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
return result; return result;
} }
/**
* 是否允许增加同级文件夹
* @param extRepoFolder
* @return
*/
@AutoLog(value = "是否允许增加同级文件夹")
@ApiOperation(value = "是否允许增加同级文件夹", notes = "是否允许增加同级文件夹")
@PostMapping(value = "/isAllowSiblingFolder")
public Result<?> isAllowSiblingFolder(@Validated @RequestBody ExtRepoFolder extRepoFolder,
HttpSession session) {
Result<ExtRepoFolder> 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<ExtRepoFolder, IExtR
public Result<?> edit(@Validated @RequestBody ExtRepoFolder extRepoFolder, HttpSession session) { public Result<?> edit(@Validated @RequestBody ExtRepoFolder extRepoFolder, HttpSession session) {
Result<ExtRepoFolder> result = new Result(); Result<ExtRepoFolder> result = new Result();
session.setAttribute("haveSuperiorManageAuth", false); session.setAttribute("haveSuperiorManageAuth", false);
extRepoFolderService.haveSuperiorManageAuth(extRepoFolder.getSupFolder(),session); extRepoFolderService.haveSuperiorManageAuth(extRepoFolder.getId(),session);
if (ObjectUtils.isNotEmpty(session.getAttribute("haveSuperiorManageAuth"))&&(Boolean) session.getAttribute("haveSuperiorManageAuth")) { if (ObjectUtils.isNotEmpty(session.getAttribute("haveSuperiorManageAuth"))&&(Boolean) session.getAttribute("haveSuperiorManageAuth")) {
extRepoFolderService.editById(extRepoFolder); extRepoFolderService.editById(extRepoFolder);
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) { if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
@@ -241,7 +241,7 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl<ExtRepoFolderMapper, E
List<ERFTreeData> resList = new ArrayList<>(); List<ERFTreeData> resList = new ArrayList<>();
for (ExtRepoFolder erf : list) { for (ExtRepoFolder erf : list) {
if (supId.equals(erf.getSupFolder())) { if (supId.equals(erf.getSupFolder())) {
int childLevel = level + 1; //int childLevel = level + 1;
if (haveViewAuth(erf.getId())) { if (haveViewAuth(erf.getId())) {
ERFTreeData date = new ERFTreeData(erf.getFolderName(), erf.getId(), level, erf.getOrderId()); ERFTreeData date = new ERFTreeData(erf.getFolderName(), erf.getId(), level, erf.getOrderId());
boolean parentRightClick = haveManageAuth(erf.getId()); boolean parentRightClick = haveManageAuth(erf.getId());
@@ -252,11 +252,11 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl<ExtRepoFolderMapper, E
date.setAuthManageIds(erf.getAuthManageIds()); date.setAuthManageIds(erf.getAuthManageIds());
date.setAuthViewIdsName(erf.getAuthViewIdsName()); date.setAuthViewIdsName(erf.getAuthViewIdsName());
date.setAuthViewIds(erf.getAuthViewIds()); date.setAuthViewIds(erf.getAuthViewIds());
date.setChildren(subFolderTree(erf.getId(),new ArrayList<ERFTreeData>(),childLevel,parentRightClick)); date.setChildren(subFolderTree(erf.getId(),new ArrayList<ERFTreeData>(),level,parentRightClick));
date.sortChildren(); date.sortChildren();
resList.add(date); resList.add(date);
} else { } else {
resList.addAll(getSubFolder(erf.getId(), list, childLevel)); resList.addAll(getSubFolder(erf.getId(), list, level));
} }
} }
} }
@@ -189,7 +189,7 @@ public class WordUtil {
Drawing drawing = factory.createDrawing(); Drawing drawing = factory.createDrawing();
drawing.getAnchorOrInline().add(inline); drawing.getAnchorOrInline().add(inline);
run.getContent().add(drawing); run.getContent().add(drawing);
replaceTextToImage(bm, text, wordMLPackage, bytes); replaceTextToImage(bm, "\\$\\{" + key + "\\}", text, wordMLPackage, bytes);
} }
} }
} catch (Exception var17) { } catch (Exception var17) {
@@ -218,7 +218,7 @@ public class WordUtil {
byte[] bytes = (byte[]) picMap.get("bytes"); byte[] bytes = (byte[]) picMap.get("bytes");
for(Text bm : textList) { for(Text bm : textList) {
if (bm.getValue().equals("${" + key + "}")) { if (bm.getValue().contains("${" + key + "}")) {
BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes); BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes);
Inline inline = imagePart.createImageInline("", "", 0, 1, true); Inline inline = imagePart.createImageInline("", "", 0, 1, true);
ObjectFactory factory = new ObjectFactory(); ObjectFactory factory = new ObjectFactory();
@@ -226,7 +226,7 @@ public class WordUtil {
Drawing drawing = factory.createDrawing(); Drawing drawing = factory.createDrawing();
drawing.getAnchorOrInline().add(inline); drawing.getAnchorOrInline().add(inline);
run.getContent().add(drawing); run.getContent().add(drawing);
replaceTextToImage(bm, text, wordMLPackage, bytes); replaceTextToImage(bm, "\\$\\{" + key + "\\}", text, wordMLPackage, bytes);
} }
} }
} }
@@ -387,7 +387,7 @@ public class WordUtil {
* @throws Exception * @throws Exception
* @author liyawei * @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) { if (wordMLPackage == null) {
return; return;
} }
@@ -423,16 +423,49 @@ public class WordUtil {
BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes); BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes);
Inline inline = imagePart.createImageInline("", "", 0, 1, true); Inline inline = imagePart.createImageInline("", "", 0, 1, true);
ObjectFactory factory = Context.getWmlObjectFactory(); ObjectFactory factory = Context.getWmlObjectFactory();
R run = factory.createR(); // R run = factory.createR();
Drawing drawing = factory.createDrawing(); Drawing drawing = factory.createDrawing();
if(text != null){
Text txt = factory.createText(); for(int j=0;j<r.getContent().size();j++) {
txt.setValue(text); r.getContent().remove(j);
run.getContent().add(txt);
} }
run.getContent().add(drawing);
drawing.getAnchorOrInline().add(inline); String values = bm.getValue().replaceAll(key,"#");
theList.add(rangeStart, run); // 添加图片到原占位符位置 int length = values.length();
String[] valueStr = new String[length];
for(int v=0; v<length; v++) {
valueStr[v] = values.charAt(v) + "";
}
int index = 0;
for(int k=0;k<valueStr.length;k++){
if(valueStr[k].equals("#")){
if(k>0 && !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 { } else {
return; return;
@@ -3754,7 +3754,26 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
@Override @Override
public int insertForeach(List<SarFileSplitItemsEO> messageList) { public int insertForeach(List<SarFileSplitItemsEO> 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<SarFileSplitItemsEO> 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;
} }
/** /**
@@ -1784,7 +1784,7 @@ public class FileSplitPdfService {
if(StringUtils.isNotBlank(preName)) { if(StringUtils.isNotBlank(preName)) {
List<String> nowStartList = fileSpiltService.getNewNowStart(preName); List<String> nowStartList = fileSpiltService.getNewNowStart(preName);
List<String> subList1 = startDigitList.subList(preNameNum, startDigitList.size()-1); List<String> subList1 = startDigitList.subList(preNameNum, startDigitList.size());
// 后文有一级以下的标题 // 后文有一级以下的标题
for (int i = nowStartList.size() - 1; i >= 1; i--) { for (int i = nowStartList.size() - 1; i >= 1; i--) {
int index1 = subList1.indexOf(nowStartList.get(i)); int index1 = subList1.indexOf(nowStartList.get(i));
@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -79,8 +80,26 @@ public class SarFileSplitItemsValEOServiceImpl extends ServiceImpl<SarFileSplitI
@Override @Override
public int insertForeach(List<SarFileSplitItemsValEO> itemValList) { public int insertForeach(List<SarFileSplitItemsValEO> itemValList) {
// 解决一次批量插入太多 PacketTooBigException 异常
return dao.insertForeach(itemValList); int total = itemValList.size();
int count = 0;
int pageSum = 1;
if(total > 100) {
pageSum = total / 100; // 总页数
if ((total % 100) > 0) {
pageSum += 1;
}
}
List<SarFileSplitItemsValEO> 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;
} }
} }
+5 -2
View File
@@ -1312,9 +1312,12 @@ module.exports = {
firstLevelDirectory:'First level directory', firstLevelDirectory:'First level directory',
deselectAll:'Deselect All', deselectAll:'Deselect All',
classification:'Classification', classification:'Classification',
consistentAssessment:'Consistent assessment', consistentAssessment:'Consistent',
viewConsistentAssessment:'View Consistent Assessment', viewConsistentAssessment:'View Consistent',
viewVarianceAssessment:'View Variance',
viewAll:'View All', viewAll:'View All',
endProcess:'End Process', endProcess:'End Process',
thereForTheCurrentlySelectedData:'There is no standard breakdown for the currently selected data', 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',
} }
+5 -2
View File
@@ -1413,9 +1413,12 @@ module.exports = {
firstLevelDirectory:'一级目录', firstLevelDirectory:'一级目录',
deselectAll:'取消全选', deselectAll:'取消全选',
classification:'分类', classification:'分类',
consistentAssessment:'一致评估', consistentAssessment:'一致',
viewConsistentAssessment:'查看一致评估', viewConsistentAssessment:'查看一致项',
viewVarianceAssessment:'查看差异项',
viewAll:'查看全部', viewAll:'查看全部',
endProcess:'结束流程', endProcess:'结束流程',
thereForTheCurrentlySelectedData:'当前所选数据暂无标准分解单', thereForTheCurrentlySelectedData:'当前所选数据暂无标准分解单',
secondaryDirectory:'二级目录',
OnlyPersonsCanBeSelected:'超出最大上限;最多只能选择100个人员',
} }
@@ -32,39 +32,39 @@
v-model="searchModel" @search="onSearch"/> v-model="searchModel" @search="onSearch"/>
<div class="drawer-content"> <div class="drawer-content">
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading> <JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
<virtualNodeTree <!-- <virtualNodeTree-->
v-if="treeVisible"
ref="virtualNodeTreeRef"
:keeps="40"
show-checkbox
v-model="checkboxList"
class="treeWrap"
:defaultCheckedKeys="defaultCheckedKeys"
:defaultExpandAll="defaultExpandAll"
:check-strictly="false"
node-key="id"
@check="handleCheckChange"
@check-change="checkChange"
:data.sync="gData">
<span slot-scope="{ data }">
<span :class="{'active':data.color ? true:false}">
{{ data.title }}
</span>
</span>
</virtualNodeTree>
<!-- <a-tree-->
<!-- style="margin-bottom: 60px;height: 600px"-->
<!-- v-if="treeVisible"--> <!-- v-if="treeVisible"-->
<!-- checkable--> <!-- ref="virtualNodeTreeRef"-->
<!-- checkStrictly--> <!-- :keeps="40"-->
<!-- :loading="loading"--> <!-- show-checkbox-->
<!-- :tree-data="gData"--> <!-- v-model="checkboxList"-->
<!-- @check="onCheck"--> <!-- class="treeWrap"-->
<!-- @expand="onExpand"--> <!-- :defaultCheckedKeys="defaultCheckedKeys"-->
<!-- v-model:checkedKeys="defaultCheckedKeys"--> <!-- :defaultExpandAll="defaultExpandAll"-->
<!-- :defaultExpandedKeys="defaultExpandedKeys"--> <!-- :check-strictly="false"-->
<!-- >--> <!-- node-key="id"-->
<!-- </a-tree>--> <!-- @check="handleCheckChange"-->
<!-- @check-change="checkChange"-->
<!-- :data.sync="gData">-->
<!-- <span slot-scope="{ data }">-->
<!-- <span :class="{'active':data.color ? true:false}">-->
<!-- {{ data.title }}-->
<!-- </span>-->
<!-- </span>-->
<!-- </virtualNodeTree>-->
<a-tree
style="margin-bottom: 60px;height: 600px"
v-if="treeVisible"
checkable
checkStrictly
:loading="loading"
:tree-data="gData"
@check="onCheck"
@expand="onExpand"
v-model:checkedKeys="defaultCheckedKeys"
:defaultExpandedKeys="defaultExpandedKeys"
>
</a-tree>
</div> </div>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button> <a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
@@ -114,137 +114,137 @@
}, },
methods: { methods: {
checkChange(val, checked, indeterminate) { // checkChange(val, checked, indeterminate) {
if (!checked && this.searchData) { // if (!checked && this.searchData) {
this.userName = this.userName.filter(res => { // this.userName = this.userName.filter(res => {
return res != val.title // return res != val.title
}) // })
this.userIds = this.userIds.filter(res => { // this.userIds = this.userIds.filter(res => {
return res != val.id // return res != val.id
}) // })
for (let i = 0; i < this.userIds.length; i++) { // for (let i = 0; i < this.userIds.length; i++) {
if (this.userIds[i] == val.parentId) { // if (this.userIds[i] == val.parentId) {
this.userIds.splice(i, 1) // this.userIds.splice(i, 1)
this.userName.splice(i, 1) // this.userName.splice(i, 1)
i-- // i--
} // }
} // }
} else if (checked && this.searchData) { // } else if (checked && this.searchData) {
this.userName.push(val.title) // this.userName.push(val.title)
this.userIds.push(val.id) // this.userIds.push(val.id)
} // }
}, // },
handleCheckChange(val, data, checked) { // handleCheckChange(val, data, checked) {
if (!this.searchData) { // if (!this.searchData) {
this.userName = [] // this.userName = []
this.userIds = [] // this.userIds = []
if (data.checkedNodes && data.checkedNodes.length > 0) { // if (data.checkedNodes && data.checkedNodes.length > 0) {
data.checkedNodes.forEach(res => { // data.checkedNodes.forEach(res => {
this.userName.push(res.title) // this.userName.push(res.title)
this.userIds.push(res.id) // this.userIds.push(res.id)
}) // })
} // }
} // }
}, // },
standardClick() { standardClick() {
this.treeVisible = false this.treeVisible = false
// this.departId = '' this.departId = ''
this.searchModel = '' this.searchModel = ''
this.searchData = '' this.searchData = ''
// this.userIds = [] this.userIds = []
// this.userName = [] this.userName = []
// this.queryDepartUserTreeList(1) this.queryDepartUserTreeList(1)
this.visible = true this.visible = true
let gData = localStorage.getItem('gData') // let gData = localStorage.getItem('gData')
if (gData) { // if (gData) {
let dataList = JSON.parse(gData) // let dataList = JSON.parse(gData)
if (!this.selectDepartment) { // if (!this.selectDepartment) {
dataList.forEach(res => { // dataList.forEach(res => {
if (res.type == 'Depart') { // if (res.type == 'Depart') {
res.disabled = true // res.disabled = true
} // }
}) // })
} // }
this.dataList = this.toTree(dataList) // this.dataList = this.toTree(dataList)
} // }
setTimeout(() => { // setTimeout(() => {
if (gData) { // if (gData) {
this.gData = this.dataList // this.gData = this.dataList
this.gData = [...this.gData] // this.gData = [...this.gData]
// this.treeVisible = true // // this.treeVisible = true
if (this.personneQuery[this.query.db_field_name + 'Name']) { // if (this.personneQuery[this.query.db_field_name + 'Name']) {
this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',') // this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',')
} else if (this.personneQuery[this.query.db_field_name]) { // } else if (this.personneQuery[this.query.db_field_name]) {
this.userName = this.personneQuery[this.query.db_field_name].split(',') // this.userName = this.personneQuery[this.query.db_field_name].split(',')
} else { // } else {
this.userName = [] // this.userName = []
} // }
if (this.personneQuery[this.query.db_field_name + '_id']) { // if (this.personneQuery[this.query.db_field_name + '_id']) {
this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',') // this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',')
} else if (this.personneQuery[this.query.db_field_name]) { // } else if (this.personneQuery[this.query.db_field_name]) {
this.userIds = this.personneQuery[this.query.db_field_name].split(',') // this.userIds = this.personneQuery[this.query.db_field_name].split(',')
} else { // } else {
this.userIds = [] // this.userIds = []
} // }
this.defaultCheckedKeys = this.userIds // this.defaultCheckedKeys = this.userIds
this.defaultCheckedKeys = [...this.defaultCheckedKeys] // this.defaultCheckedKeys = [...this.defaultCheckedKeys]
this.defaultExpandAll = false // this.defaultExpandAll = false
this.treeVisible = true // this.treeVisible = true
} else { // } else {
this.queryDepartUserTreeList(1) // this.queryDepartUserTreeList(1)
} // }
}, 200) // }, 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
}, },
// 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) { // toTree(config, num) {
// 删除 所有 children,以防止多次调用 // // 删除 所有 children,以防止多次调用
config.forEach(function(item) { // config.forEach(function(item) {
delete item.children // delete item.children
}) // })
// 将数据存储为 以 id 为 KEY 的 map 索引数据列 // // 将数据存储为 以 id 为 KEY 的 map 索引数据列
let map = {} // let map = {}
config.forEach((item) => { // config.forEach((item) => {
item.label = item.name // item.label = item.name
item.key = item.id // item.key = item.id
//
item.title = item.name + (item.itemName ? ' ' + item.itemName : '') // item.title = item.name + (item.itemName ? ' ' + item.itemName : '')
map[item.id] = item // map[item.id] = item
}) // })
let val = [] // let val = []
config.forEach((item) => { // config.forEach((item) => {
// 以当前遍历项,的pid,去map对象中找到索引的id // // 以当前遍历项,的pid,去map对象中找到索引的id
let parent = map[item.parentId] // let parent = map[item.parentId]
//
// 如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中 // // 如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中
if (parent) { // if (parent) {
(parent.children || (parent.children = [])).push(item) // (parent.children || (parent.children = [])).push(item)
} else { // } else {
//如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级 // //如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级
val.push(item) // val.push(item)
} // }
}) // })
return val // return val
}, // },
standardDelete() { standardDelete() {
this.$emit('input', null) this.$emit('input', null)
this.$forceUpdate() this.$forceUpdate()
@@ -255,61 +255,61 @@
// this.selectedKey = selectedKeys // this.selectedKey = selectedKeys
// }, // },
// onCheck(checkedKeys, info) { onCheck(checkedKeys, info) {
// this.userIds = checkedKeys.checked this.userIds = checkedKeys.checked
// this.userName = [] this.userName = []
// if (this.userIds.length > 0) { if (this.userIds.length > 0) {
// for (let i = 0; i < this.userIds.length; i++) { for (let i = 0; i < this.userIds.length; i++) {
// for (let j = 0; j < this.defaultCheckedKeysName.length; j++) { for (let j = 0; j < this.defaultCheckedKeysName.length; j++) {
// if (this.userIds[i] == this.defaultCheckedKeysName[j].id) { if (this.userIds[i] == this.defaultCheckedKeysName[j].id) {
// this.userName.push(this.defaultCheckedKeysName[j].name) this.userName.push(this.defaultCheckedKeysName[j].name)
// } }
// } }
// } }
// } }
// if (info.checkedNodes && info.checkedNodes.length > 0) { if (info.checkedNodes && info.checkedNodes.length > 0) {
// info.checkedNodes.forEach(res => { info.checkedNodes.forEach(res => {
// if (res.data.props.dataRef.key) { if (res.data.props.dataRef.key) {
// this.content.push({ this.content.push({
// id: res.data.props.dataRef.key, id: res.data.props.dataRef.key,
// title: res.data.props.dataRef.title title: res.data.props.dataRef.title
// }) })
// } else { } else {
// this.content.push({ this.content.push({
// id: res.data.props.id, id: res.data.props.id,
// title: res.data.props.title title: res.data.props.title
// }) })
// } }
// }) })
// } }
// if (this.content && this.content.length > 0) { if (this.content && this.content.length > 0) {
// for (let i = 0; i < this.content.length; i++) { for (let i = 0; i < this.content.length; i++) {
// for (let j = i + 1; j < this.content.length; j++) { for (let j = i + 1; j < this.content.length; j++) {
// if (this.content[i].id == this.content[j].id) { if (this.content[i].id == this.content[j].id) {
// this.content.splice(j, 1) this.content.splice(j, 1)
// j-- j--
// } }
// } }
// } }
// this.userIds.forEach(res => { this.userIds.forEach(res => {
// this.content.forEach(val => { this.content.forEach(val => {
// if (res == val.id) { if (res == val.id) {
// this.userName.push(val.title) this.userName.push(val.title)
// } }
// }) })
// }) })
// } }
// if (this.userName.length > 0) { if (this.userName.length > 0) {
// for (let i = 0; i < this.userName.length; i++) { for (let i = 0; i < this.userName.length; i++) {
// for (let j = i + 1; j < this.userName.length; j++) { for (let j = i + 1; j < this.userName.length; j++) {
// if (this.userName[i] == this.userName[j]) { if (this.userName[i] == this.userName[j]) {
// this.userName.splice(j, 1) this.userName.splice(j, 1)
// j-- j--
// } }
// } }
// } }
// } }
// }, },
handleCancel() { handleCancel() {
this.visible = false this.visible = false
this.treeVisible = false this.treeVisible = false
@@ -324,12 +324,12 @@
} }
let userIds = JSON.parse(JSON.stringify(this.userIds)) let userIds = JSON.parse(JSON.stringify(this.userIds))
let userName = JSON.parse(JSON.stringify(this.userName)) let userName = JSON.parse(JSON.stringify(this.userName))
userName = userName.filter(function(item, index) { // userName = userName.filter(function(item, index) {
return userName.indexOf(item) === index // 因为indexOf 只能查找到第一个 // return userName.indexOf(item) === index // 因为indexOf 只能查找到第一个
}) // })
userIds = userIds.filter(function(item, index) { // userIds = userIds.filter(function(item, index) {
return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个 // return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个
}) // })
this.$emit('input', userName.join(',')) this.$emit('input', userName.join(','))
this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript) this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript)
this.visible = false this.visible = false
@@ -347,119 +347,119 @@
this.defaultCheckedKeys = [] this.defaultCheckedKeys = []
}, },
onSearch(e) { onSearch(e) {
this.treeVisible = false // this.treeVisible = false
let p = new Promise((resolve, reject) => { // let p = new Promise((resolve, reject) => {
resolve() // 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 onExpand(selectedKeys, val) {
let gData = localStorage.getItem('gData') if (this.searchModel == '' || !this.searchModel) {
let content = [] if (val.expanded) {
if (gData) { if (this.departId == val.node.value) {
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 { } else {
let content = JSON.parse(gData) this.departId = val.node.value
if (!this.selectDepartment) { this.queryDepartUserTreeList(2)
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
// })
// },
// 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) { queryDepartUserTreeList(num) {
// let gData = JSON.parse(JSON.stringify(this.gData)) let gData = JSON.parse(JSON.stringify(this.gData))
// if (gData && gData.length > 0) { if (gData && gData.length > 0) {
// gData = JSON.stringify(gData) gData = JSON.stringify(gData)
// } else { } else {
// gData = '' gData = ''
// } }
this.confirmLoading = true this.confirmLoading = true
this.loading = true this.loading = true
//queryDepartUserTreeList //queryDepartUserTreeList
//queryUserTreeList //queryUserTreeList
postAction('sys/user/queryUserTreeList', { postAction('sys/user/queryDepartUserTreeList', {
// departId: this.departId, departId: this.departId,
// json: gData, json: gData,
// flag: '1' flag: '1'
}).then((res) => { }).then((res) => {
this.confirmLoading = false this.confirmLoading = false
if (res.success) { if (res.success) {
this.loading = false this.loading = false
// localStorage.setItem('gData', JSON.stringify(res.result)) // localStorage.setItem('gData', JSON.stringify(res.result))
// this.toTree(dataList) // this.toTree(dataList)
let content = JSON.parse(JSON.stringify(res.result)) // let content = JSON.parse(JSON.stringify(res.result))
if (!this.selectDepartment) { // if (!this.selectDepartment) {
res.result.forEach(res => { // res.result.forEach(res => {
if (res.type == 'Depart') { // if (res.type == 'Depart') {
res.disabled = true // res.disabled = true
} // }
}) // })
} // }
localStorage.removeItem('gData') // localStorage.removeItem('gData')
localStorage.setItem('gData', JSON.stringify(content)) // localStorage.setItem('gData', JSON.stringify(content))
this.gData = this.toTree(res.result) // this.gData = this.toTree(res.result)
// this.gData = res.result this.gData = res.result
this.gData = [...this.gData] this.gData = [...this.gData]
// this.gData[0].isLeaf = false // this.gData[0].isLeaf = false
// this.defaultExpandedKeys = [this.departId] this.defaultExpandedKeys = [this.departId]
if (num == 1) { if (num == 1) {
if (this.userName && this.userName.length == 0) { if (this.userName && this.userName.length == 0) {
if (this.personneQuery[this.query.db_field_name + 'Name']) { if (this.personneQuery[this.query.db_field_name + 'Name']) {
@@ -482,14 +482,14 @@
this.defaultCheckedKeys = this.userIds this.defaultCheckedKeys = this.userIds
this.defaultCheckedKeys = [...this.defaultCheckedKeys] this.defaultCheckedKeys = [...this.defaultCheckedKeys]
this.defaultCheckedKeysName = [] this.defaultCheckedKeysName = []
// if (this.defaultCheckedKeys.length > 0) { if (this.defaultCheckedKeys.length > 0) {
// for (let i = 0; i < this.defaultCheckedKeys.length; i++) { for (let i = 0; i < this.defaultCheckedKeys.length; i++) {
// this.defaultCheckedKeysName.push({ this.defaultCheckedKeysName.push({
// id: this.defaultCheckedKeys[i], id: this.defaultCheckedKeys[i],
// name: this.userName[i] name: this.userName[i]
// }) })
// } }
// } }
} }
this.defaultExpandAll = false this.defaultExpandAll = false
this.treeVisible = true this.treeVisible = true
+198 -4
View File
@@ -15,6 +15,26 @@
allowClear allowClear
:placeholder="$t('NodeQuickLookup')"/> :placeholder="$t('NodeQuickLookup')"/>
<div class="drawer-content"> <div class="drawer-content">
<!-- <virtualNodeTree-->
<!-- v-if="treeVisible"-->
<!-- ref="virtualNodeTreeRef"-->
<!-- :keeps="40"-->
<!-- show-checkbox-->
<!-- v-model="checkboxList"-->
<!-- class="treeWrap"-->
<!-- :defaultCheckedKeys="defaultCheckedKeys"-->
<!-- :defaultExpandAll="defaultExpandAll"-->
<!-- :check-strictly="false"-->
<!-- node-key="id"-->
<!-- @check="handleCheckChange"-->
<!-- @check-change="checkChange"-->
<!-- :data.sync="gData">-->
<!-- <span slot-scope="{ data }">-->
<!-- <span :class="{'active':data.color ? true:false}">-->
<!-- {{ data.title }}-->
<!-- </span>-->
<!-- </span>-->
<!-- </virtualNodeTree>-->
<a-tree <a-tree
v-if="visibleTree" v-if="visibleTree"
style="margin-bottom: 60px;height: 600px" style="margin-bottom: 60px;height: 600px"
@@ -40,15 +60,20 @@
<script> <script>
import { getAction, postAction } from '@/api/manage' import { getAction, postAction } from '@/api/manage'
import eventBUs from '../../common/event' import eventBUs from '../../common/event'
import virtualNodeTree from '@/components/virtualNodeTree/tree'
export default { export default {
name: 'index', name: 'index',
components: {
virtualNodeTree
},
data() { data() {
return { return {
gData: [], gData: [],
searchModel: '', searchModel: '',
autoExpandParent: true, autoExpandParent: true,
expandedKeys: [], expandedKeys: [],
checkboxList: [],
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
selectedKey: [], selectedKey: [],
@@ -56,28 +81,135 @@
userIds: [], userIds: [],
departId: '', departId: '',
defaultExpandedKeys: [], defaultExpandedKeys: [],
defaultExpandAll: false,
defaultCheckedKeys: [],
content: [], content: [],
userName: [], userName: [],
submitLoading: false, submitLoading: false,
visibleTree: false visibleTree: false,
treeVisible: false
} }
}, },
mounted() { mounted() {
}, },
methods: { 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) { getPush(data) {
this.tableKey = data this.tableKey = data
this.userName = [] this.userName = []
this.userIds = []
this.content = [] this.content = []
this.defaultCheckedKeys = []
this.searchModel = '' this.searchModel = ''
this.visible = true this.visible = true
this.visibleTree = false this.visibleTree = false
this.treeVisible = false
this.$nextTick(() => { this.$nextTick(() => {
this.departId = '' this.departId = ''
this.queryDepartUserTreeList() 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) { onSelect(selectedKeys) {
this.selectedKey = selectedKeys this.selectedKey = selectedKeys
}, },
@@ -125,6 +257,47 @@
}) })
}, },
onSearch(e) { 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.gData = []
this.departId = '' this.departId = ''
this.visibleTree = false this.visibleTree = false
@@ -136,8 +309,8 @@
}, },
getUserAndDepart() { getUserAndDepart() {
getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => { getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => {
if (res){ if (res) {
this.gData = res.filter(ele => ele.flag === 'DEPART'); this.gData = res.filter(ele => ele.flag === 'DEPART')
} else { } else {
this.gData = [] this.gData = []
} }
@@ -159,8 +332,20 @@
}).then((res) => { }).then((res) => {
this.confirmLoading = false this.confirmLoading = false
if (res.success) { 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.gData = res.result
this.defaultExpandedKeys = [this.departId] this.gData = [...this.gData]
// this.defaultExpandedKeys = [this.departId]
this.defaultExpandAll = false
this.treeVisible = true
this.visibleTree = true this.visibleTree = true
} else { } else {
this.gData = [] this.gData = []
@@ -243,4 +428,13 @@
height: calc(100% - 60px); height: calc(100% - 60px);
overflow: auto; overflow: auto;
} }
.treeWrap {
height: calc(100vh - 240px);
}
.active {
color: #21c9cc;
display: inline-block;
}
</style> </style>
@@ -49,6 +49,7 @@
loading: false, loading: false,
visibleFile:false, visibleFile:false,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
columnsFile: [ columnsFile: [
{ {
title: this.$t('fileName'), title: this.$t('fileName'),
@@ -78,10 +79,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
} }
@@ -759,8 +759,8 @@
} }
.el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner:before { .el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner:before {
background-color: #c0c4cc; background-color: #fff;
border-color: #c0c4cc border-color: #fff;
} }
.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner { .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 { .el-checkbox-button.is-checked:first-child .el-checkbox-button__inner {
border-left-color: #409eff border-left-color: #409eff
} }
.el-checkbox-button.is-disabled .el-checkbox-button__inner { .el-checkbox-button.is-disabled .el-checkbox-button__inner {
color: #c0c4cc; color: #c0c4cc;
cursor: not-allowed; cursor: not-allowed;
+8 -8
View File
@@ -142,14 +142,14 @@ const user = {
//Vue.ls.set(USER_AUTH,authData); //Vue.ls.set(USER_AUTH,authData);
sessionStorage.setItem(USER_AUTH, JSON.stringify(authData)) sessionStorage.setItem(USER_AUTH, JSON.stringify(authData))
sessionStorage.setItem(SYS_BUTTON_AUTH, JSON.stringify(allAuthData)) sessionStorage.setItem(SYS_BUTTON_AUTH, JSON.stringify(allAuthData))
let gData = localStorage.getItem('gData') // let gData = localStorage.getItem('gData')
if (!gData) { // if (!gData) {
getAction('sys/user/queryUserTreeList', {}).then((res) => { // getAction('sys/user/queryUserTreeList', {}).then((res) => {
if (res.success) { // if (res.success) {
localStorage.setItem('gData', JSON.stringify(res.result)) // localStorage.setItem('gData', JSON.stringify(res.result))
} // }
}) // })
} // }
if (menuData && menuData.length > 0) { if (menuData && menuData.length > 0) {
//update--begin--autor:qinfeng-----date:20200109------for:JEECG-63 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------ //update--begin--autor:qinfeng-----date:20200109------for:JEECG-63 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------
menuData.forEach((item, index) => { menuData.forEach((item, index) => {
@@ -41,10 +41,10 @@
<template v-if="toggleSearchStatus"> <template v-if="toggleSearchStatus">
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text" :title="$t('collectResults')"> <div class="title-text" :title="$t('ProcessStatus')">
<span>{{$t('collectResults')}}</span> <span>{{$t('ProcessStatus')}}</span>
</div> </div>
<a-select :placeholder="$t('PleaseSelect')+$t('collectResults')" <a-select :placeholder="$t('PleaseSelect')+$t('ProcessStatus')"
class="box-input" class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear allowClear
@@ -187,7 +187,7 @@
dataIndex: 'technologyTerritoryName' dataIndex: 'technologyTerritoryName'
}, },
{ {
title: this.$t('collectResults'), title: this.$t('ProcessStatus'),
align: 'center', align: 'center',
width: 140, width: 140,
ellipsis: true, ellipsis: true,
@@ -127,6 +127,7 @@
applyMarkets: '', applyMarkets: '',
header_text: '', header_text: '',
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
url: { url: {
list: '/problemKnowledgeBase/countryCardTempEO/list', list: '/problemKnowledgeBase/countryCardTempEO/list',
deleteOne: '' deleteOne: ''
@@ -153,10 +154,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', fileQuery.contentFileName, { id: fileQuery.id }) downloadFile('/sys/common/downLoadFile', fileQuery.contentFileName, { id: fileQuery.id })
} }
@@ -662,12 +662,12 @@
margin-top: 10px; margin-top: 10px;
.content-box-content-botton-text { .content-box-content-botton-text {
width: 118px; max-width: 198px;
height: 32px; height: 32px;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
line-height: 32px; line-height: 32px;
padding: 0 6px; padding: 0 10px;
background: #EFF1F3; background: #EFF1F3;
border-radius: 4px; border-radius: 4px;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -200,6 +200,7 @@
queryForm: {}, queryForm: {},
isPraise: false, isPraise: false,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
isCollect: false isCollect: false
} }
}, },
@@ -218,10 +219,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
} }
@@ -491,12 +494,13 @@
margin-top: 10px; margin-top: 10px;
.content-box-content-botton-text { .content-box-content-botton-text {
width: 140px; max-width: 200px;
/*min-width: 120px;*/
height: 32px; height: 32px;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
line-height: 32px; line-height: 32px;
padding: 0 6px; padding: 0 10px;
background: #EFF1F3; background: #EFF1F3;
border-radius: 4px; border-radius: 4px;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -509,7 +513,7 @@
cursor: pointer; cursor: pointer;
.file-text { .file-text {
width: 90px; width: calc(100% - 30px);
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
@@ -519,6 +523,7 @@
} }
.icon-text { .icon-text {
width: 24px;
font-size: 16px; font-size: 16px;
overflow: hidden; overflow: hidden;
margin-bottom: 9px; margin-bottom: 9px;
@@ -144,7 +144,7 @@
width: 170 width: 170
}, },
{ {
title: this.$t('chapterContents'), title: this.$t('secondaryDirectory'),
align: 'center', align: 'center',
dataIndex: 'memoriesChapterName', dataIndex: 'memoriesChapterName',
ellipsis: true, ellipsis: true,
@@ -108,6 +108,7 @@
pageNo: 1, pageNo: 1,
queryParam: {}, queryParam: {},
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
userData: {}, userData: {},
columns: [ columns: [
{ {
@@ -216,10 +217,12 @@
} else if (fileSuffix === '.docx' || fileSuffix === '.doc') { } else if (fileSuffix === '.docx' || fileSuffix === '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls' } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
window.open(url, '_blank') 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 { } else {
if (item.createBy == this.userInfo().username) { if (item.createBy == this.userInfo().username) {
downloadFile('/sys/common/downLoadFile', item.name, { id: item.fileId, userName: this.userInfo().username }) downloadFile('/sys/common/downLoadFile', item.name, { id: item.fileId, userName: this.userInfo().username })
@@ -4,8 +4,9 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" <span class="Required" v-if="!disabled">*</span>
:title="$t('title')">{{$t('title')}}</span> <span class="title-text-text"
:title="$t('title')">{{$t('title')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="titleCn"> <a-form-model-item class="itemModel" prop="titleCn">
<a-input class="box-input" <a-input class="box-input"
@@ -18,8 +19,9 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" <span class="Required" v-if="!disabled">*</span>
:title="$t('englishTitle')">{{$t('englishTitle')}}</span> <span class="title-text-text"
:title="$t('englishTitle')">{{$t('englishTitle')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="titleEn"> <a-form-model-item class="itemModel" prop="titleEn">
<a-input class="box-input" <a-input class="box-input"
@@ -34,10 +36,11 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" <span class="Required" v-if="!disabled">*</span>
:title="$t('technicalField')">{{$t('technicalField')}}</span> <span class="title-text-text"
:title="$t('technicalField')">{{$t('technicalField')}}</span>
</div> </div>
<a-form-model-item class="itemModel-multi" prop="technologyTerritory"> <a-form-model-item class="itemModel" prop="technologyTerritory">
<a-tree-select <a-tree-select
tree-node-filter-prop="title" tree-node-filter-prop="title"
v-model="formInline.technologyTerritory" v-model="formInline.technologyTerritory"
@@ -53,20 +56,20 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="12"> <!-- <a-col :span="12">-->
<div class="box-title-text"> <!-- <div class="box-title-text">-->
<div class="title-text"> <!-- <div class="title-text">-->
<span class="title-text-text" <!-- <span class="title-text-text"-->
:title="$t('implementationModel')">{{$t('implementationModel')}}</span> <!-- :title="$t('implementationModel')">{{$t('implementationModel')}}</span>-->
</div> <!-- </div>-->
<a-form-model-item class="itemModel" prop="implementCar"> <!-- <a-form-model-item class="itemModel" prop="implementCar">-->
<a-input class="box-input" <!-- <a-input class="box-input"-->
:disabled="disabled" <!-- :disabled="disabled"-->
v-model.trim="formInline.implementCar" <!-- v-model.trim="formInline.implementCar"-->
:placeholder="$t('PleaseEnter')+$t('implementationModel')"/> <!-- :placeholder="$t('PleaseEnter')+$t('implementationModel')"/>-->
</a-form-model-item> <!-- </a-form-model-item>-->
</div> <!-- </div>-->
</a-col> <!-- </a-col>-->
<!-- <a-col :span="12">--> <!-- <a-col :span="12">-->
<!-- <div class="box-title-text">--> <!-- <div class="box-title-text">-->
<!-- <div class="title-text">--> <!-- <div class="title-text">-->
@@ -108,10 +111,10 @@
:title="$t('status')">{{$t('status')}}</span> :title="$t('status')">{{$t('status')}}</span>
</div> </div>
<a-form-model-item class="itemModel-multi itemModel-multi-one"> <a-form-model-item class="itemModel-multi itemModel-multi-one">
<j-multi-select-tag class="box-input" v-model="formInline.state" <j-dict-select-tag class="box-input" v-model="formInline.state"
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('status')" :placeholder="$t('PleaseSelect')+$t('status')"
:type="'checkbox'" :type="'radio'"
:triggerChange="false" :dictCode="'state'"/> :triggerChange="false" :dictCode="'state'"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -125,9 +128,9 @@
:title="$t('usage')">{{$t('usage')}}</span> :title="$t('usage')">{{$t('usage')}}</span>
</div> </div>
<a-form-model-item class="itemModel-multi itemModel-multi-one"> <a-form-model-item class="itemModel-multi itemModel-multi-one">
<j-multi-select-tag class="box-input" v-model="formInline.useMethod" <j-dict-select-tag class="box-input" v-model="formInline.useMethod"
:placeholder="$t('PleaseSelect')+$t('usage')" :placeholder="$t('PleaseSelect')+$t('usage')"
:type="'checkbox'" :type="'radio'"
:disabled="disabled" :disabled="disabled"
:triggerChange="false" :dictCode="'yong4_fa3'"/> :triggerChange="false" :dictCode="'yong4_fa3'"/>
</a-form-model-item> </a-form-model-item>
@@ -156,10 +159,11 @@
:title="$t('ImplementationDate')">{{$t('ImplementationDate')}}</span> :title="$t('ImplementationDate')">{{$t('ImplementationDate')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="newCarImplementTime"> <a-form-model-item class="itemModel" prop="newCarImplementTime">
<!-- :placeholder="$t('PleaseEnter')+$t('ImplementationDate')"-->
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model.trim="formInline.newCarImplementTime" v-model.trim="formInline.newCarImplementTime"
:placeholder="$t('PleaseEnter')+$t('ImplementationDate')"/> :placeholder="'202X.X.X'"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -170,10 +174,11 @@
:title="$t('vehicleInProductionDate')">{{$t('vehicleInProductionDate')}}</span> :title="$t('vehicleInProductionDate')">{{$t('vehicleInProductionDate')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="productionCarImplementTime"> <a-form-model-item class="itemModel" prop="productionCarImplementTime">
<!-- $t('PleaseEnter')+$t('vehicleInProductionDate')-->
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model.trim="formInline.productionCarImplementTime" v-model.trim="formInline.productionCarImplementTime"
:placeholder="$t('PleaseEnter')+$t('vehicleInProductionDate')"/> :placeholder="'202X.X.X'"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -185,6 +190,7 @@
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" :title="$t('primaryCoverageCn')">{{$t('primaryCoverageCn')}}</span> <span class="title-text-text" :title="$t('primaryCoverageCn')">{{$t('primaryCoverageCn')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="contentCn"> <a-form-model-item class="itemModel" prop="contentCn">
@@ -200,6 +206,7 @@
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" :title="$t('primaryCoverageEn')">{{$t('primaryCoverageEn')}}</span> <span class="title-text-text" :title="$t('primaryCoverageEn')">{{$t('primaryCoverageEn')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="contentEn"> <a-form-model-item class="itemModel" prop="contentEn">
@@ -245,9 +252,10 @@
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" :title="$t('regulatoryContact')">{{$t('regulatoryContact')}}</span> <span class="title-text-text" :title="$t('regulatoryContact')">{{$t('regulatoryContact')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel" prop="lawsContactName">
<PersonnelSelection <PersonnelSelection
:query="{db_field_name:'lawsContact',db_field_txt:$t('regulatoryContact')}" :query="{db_field_name:'lawsContact',db_field_txt:$t('regulatoryContact')}"
:personneQuery="formInline" :personneQuery="formInline"
@@ -290,7 +298,19 @@
data() { data() {
return { return {
rules: { rules: {
lawsContactName:[
{
required: true,
message: this.$t('regulatoryContact') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
titleCn: [ titleCn: [
{
required: true,
message: this.$t('title') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{ {
max: 500, max: 500,
message: this.$t('title') + this.$t('cannotExceed') + 500 + this.$t('Characters'), message: this.$t('title') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
@@ -298,6 +318,11 @@
} }
], ],
titleEn: [ titleEn: [
{
required: true,
message: this.$t('englishTitle') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{ {
max: 500, max: 500,
message: this.$t('englishTitle') + this.$t('cannotExceed') + 500 + this.$t('Characters'), message: this.$t('englishTitle') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
@@ -354,6 +379,11 @@
} }
], ],
contentEn: [ contentEn: [
{
required: true,
message: this.$t('primaryCoverageEn') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{ {
max: 300, max: 300,
message: this.$t('primaryCoverageEn') + this.$t('cannotExceed') + 300 + this.$t('Characters'), message: this.$t('primaryCoverageEn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
@@ -361,11 +391,23 @@
} }
], ],
contentCn: [ contentCn: [
{
required: true,
message: this.$t('primaryCoverageCn') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{ {
max: 300, max: 300,
message: this.$t('primaryCoverageCn') + this.$t('cannotExceed') + 300 + this.$t('Characters'), message: this.$t('primaryCoverageCn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur' trigger: 'blur'
} }
],
technologyTerritory: [
{
required: true,
message: this.$t('technicalField') + this.$t('cannotEmpty'),
trigger: 'change'
}
] ]
}, },
formInline: {}, formInline: {},
@@ -4,6 +4,7 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('title')">{{$t('title')}}</span> :title="$t('title')">{{$t('title')}}</span>
</div> </div>
@@ -18,6 +19,7 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('englishTitle')">{{$t('englishTitle')}}</span> :title="$t('englishTitle')">{{$t('englishTitle')}}</span>
</div> </div>
@@ -110,6 +112,7 @@
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" :title="$t('primaryCoverageCn')">{{$t('primaryCoverageCn')}}</span> <span class="title-text-text" :title="$t('primaryCoverageCn')">{{$t('primaryCoverageCn')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="contentCn"> <a-form-model-item class="itemModel" prop="contentCn">
@@ -125,6 +128,7 @@
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" :title="$t('primaryCoverageEn')">{{$t('primaryCoverageEn')}}</span> <span class="title-text-text" :title="$t('primaryCoverageEn')">{{$t('primaryCoverageEn')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="contentEn"> <a-form-model-item class="itemModel" prop="contentEn">
@@ -165,6 +169,11 @@
return { return {
rules: { rules: {
titleCn: [ titleCn: [
{
required: true,
message: this.$t('title') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{ {
max: 500, max: 500,
message: this.$t('title') + this.$t('cannotExceed') + 500 + this.$t('Characters'), message: this.$t('title') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
@@ -172,6 +181,11 @@
} }
], ],
titleEn: [ titleEn: [
{
required: true,
message: this.$t('englishTitle') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{ {
max: 500, max: 500,
message: this.$t('englishTitle') + this.$t('cannotExceed') + 500 + this.$t('Characters'), message: this.$t('englishTitle') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
@@ -221,6 +235,11 @@
} }
], ],
contentEn: [ contentEn: [
{
required: true,
message: this.$t('primaryCoverageEn') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{ {
max: 300, max: 300,
message: this.$t('primaryCoverageEn') + this.$t('cannotExceed') + 300 + this.$t('Characters'), message: this.$t('primaryCoverageEn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
@@ -228,6 +247,11 @@
} }
], ],
contentCn: [ contentCn: [
{
required: true,
message: this.$t('primaryCoverageCn') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{ {
max: 300, max: 300,
message: this.$t('primaryCoverageCn') + this.$t('cannotExceed') + 300 + this.$t('Characters'), message: this.$t('primaryCoverageCn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
@@ -6,13 +6,14 @@
:visible="visible" :visible="visible"
:confirm-loading="confirmLoading" :confirm-loading="confirmLoading"
:maskClosable="false" :maskClosable="false"
:footer="null"
@cancel="visible = false" @cancel="visible = false"
> >
<template slot="footer"> <!-- <template slot="footer">-->
<a-button key="back" @click="visible = false"> <!-- <a-button key="back" @click="visible = false">-->
{{$t('cancel')}} <!-- {{$t('cancel')}}-->
</a-button> <!-- </a-button>-->
</template> <!-- </template>-->
<div style="margin-bottom: 10px;text-align: center"> <div style="margin-bottom: 10px;text-align: center">
<div @click="handleModule" class="operator-text"> <div @click="handleModule" class="operator-text">
<a-icon type="download"/> <a-icon type="download"/>
@@ -39,22 +39,22 @@
<!-- </div>--> <!-- </div>-->
<a-card :bordered="false" class="box-clause" style="margin-top: 20px" <a-card :bordered="false" class="box-clause" style="margin-top: 20px"
v-for="(item,index) in dataSource"> v-for="(item,index) in dataSource">
<div class="table-operator-admin"> <!-- <div class="table-operator-admin">-->
<div class="operator-text" v-if="item.id" :class="{'operator-text-feed':index == 0 ? true:false}" <!-- <div class="operator-text" v-if="item.id" :class="{'operator-text-feed':index == 0 ? true:false}"-->
style="font-size: 16px"> <!-- style="font-size: 16px">-->
{{$t('engineer')+item.createBy+$t('feedbackResults')}} <!-- {{$t('engineer')+item.createBy+$t('feedbackResults')}}-->
</div> <!-- </div>-->
<div class="text-results" v-if="item.id"> <!-- <div class="text-results" v-if="item.id">-->
{{$t('complianceResults')}}:{{item.complianceResultName}} <!-- {{$t('complianceResults')}}:{{item.complianceResultName}}-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="table-operator-admin-right"> <div class="table-operator-admin-right">
<div @click="fileExportClick" v-if="index == 0" class="operator-text-index"> <div @click="fileExportClick" v-if="index == 0" class="operator-text-index">
<a-icon type="export" :rotate="-90"/> <a-icon type="export" :rotate="-90"/>
{{$t('fileExport')}} {{$t('fileExport')}}
</div> </div>
<!-- style="margin-left: 18px"-->
<a-table <a-table
style="margin-left: 18px"
ref="table" ref="table"
size="middle" size="middle"
:loading="loading" :loading="loading"
@@ -96,8 +96,8 @@
return { return {
queryParam: {}, queryParam: {},
dataSource: [], dataSource: [],
userInfoQuery:{}, userInfoQuery: {},
administrators:false, administrators: false,
url: { url: {
list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/list', list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/list',
exportData: 'lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/exportZip' exportData: 'lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/exportZip'
@@ -106,6 +106,44 @@
loading: false, loading: false,
columns: [ columns: [
{
title: this.$t('engineer'),
dataIndex: 'createBy',
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('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'), title: this.$t('relevantSections'),
dataIndex: 'relatedSection', dataIndex: 'relatedSection',
@@ -190,6 +228,18 @@
getAction(this.url.list, query).then((res) => { getAction(this.url.list, query).then((res) => {
if (res.success) { if (res.success) {
this.dataSource = res.result || [] 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) { if (this.dataSource.length == 0) {
this.dataSource.push({ this.dataSource.push({
name: '' name: ''
@@ -353,9 +403,10 @@
.table-operator-admin-right { .table-operator-admin-right {
float: left; float: left;
width: calc(100% - 240px); width: 100%;
text-align: right; text-align: right;
border-left: 1px solid #e8e8e8; margin-bottom: 20px;
/*border-left: 1px solid #e8e8e8;*/
} }
.operator-text-index { .operator-text-index {
@@ -262,6 +262,13 @@
ellipsis: true, ellipsis: true,
dataIndex: 'flowStatusName' dataIndex: 'flowStatusName'
}, },
{
title: this.$t('Sponsor'),
align: 'center',
width: 140,
ellipsis: true,
dataIndex: 'createBy'
},
{ {
title: this.$t('dateOfInitiation'), title: this.$t('dateOfInitiation'),
align: 'center', align: 'center',
@@ -464,8 +471,8 @@
lawsTechnologyEvaluationId: row.id, lawsTechnologyEvaluationId: row.id,
standId: row.standId, standId: row.standId,
remark: row.remark, remark: row.remark,
createBy:row.createBy, createBy: row.createBy,
flowStatus:row.flowStatus flowStatus: row.flowStatus
} }
}) })
window.open(newUrl.href, '_blank') window.open(newUrl.href, '_blank')
@@ -479,8 +486,8 @@
lawsTechnologyEvaluationId: row.id, lawsTechnologyEvaluationId: row.id,
standId: row.standId, standId: row.standId,
remark: row.remark, remark: row.remark,
createBy:row.createBy, createBy: row.createBy,
flowStatus:row.flowStatus flowStatus: row.flowStatus
} }
}) })
window.open(newUrl.href, '_blank') window.open(newUrl.href, '_blank')
@@ -33,6 +33,7 @@
monthlyReportRegulationsList: [], monthlyReportRegulationsList: [],
loading: false, loading: false,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
url: { url: {
list: '/report/lawsMonthlyReportManageEO/page' list: '/report/lawsMonthlyReportManageEO/page'
} }
@@ -74,10 +75,12 @@
} else if (fileSuffix === '.docx' || fileSuffix === '.doc') { } else if (fileSuffix === '.docx' || fileSuffix === '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls' } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
window.open(url, '_blank') 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 { } else {
if (item.createBy == this.userInfo().username){ if (item.createBy == this.userInfo().username){
downloadFile('/sys/common/downLoadFile', item.name, { id: item.fileId, userName: this.userInfo().username }) downloadFile('/sys/common/downLoadFile', item.name, { id: item.fileId, userName: this.userInfo().username })
@@ -319,6 +319,7 @@
serial_number: '', serial_number: '',
confirmLoading: false, confirmLoading: false,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
loading: false, loading: false,
dataSource: [], dataSource: [],
pageNo: 1, pageNo: 1,
@@ -462,10 +463,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
} }
@@ -9,12 +9,21 @@
<span> {{$t('comparisonResults')}}</span> <span> {{$t('comparisonResults')}}</span>
</div> </div>
<div class="doc-detail-right"> <div class="doc-detail-right">
<div @click="viewVarianceAssessmentClick"
class="operator-text-text"
:class="{'operator-text-text-text':isVarianceOne?true:false}"
:title="$t('viewVarianceAssessment')">
<a-icon type="eye"/>
{{$t('viewVarianceAssessment')}}
</div>
<div @click="viewConsistentAssessmentClick" class="operator-text-text" <div @click="viewConsistentAssessmentClick" class="operator-text-text"
:class="{'operator-text-text-text':isVarianceTwo?true:false}"
:title="$t('viewConsistentAssessment')"> :title="$t('viewConsistentAssessment')">
<a-icon type="eye"/> <a-icon type="eye"/>
{{$t('viewConsistentAssessment')}} {{$t('viewConsistentAssessment')}}
</div> </div>
<div @click="viewAllClick" class="operator-text-text" <div @click="viewAllClick" class="operator-text-text"
:class="{'operator-text-text-text':isVarianceThe?true:false}"
:title="$t('viewAll')"> :title="$t('viewAll')">
<a-icon type="eye"/> <a-icon type="eye"/>
{{$t('viewAll')}} {{$t('viewAll')}}
@@ -40,12 +49,19 @@
<div class="detail-content-header-content-left" <div class="detail-content-header-content-left"
:title="resultData.serialNumberLeft + resultData.fileNameLeft" :title="resultData.serialNumberLeft + resultData.fileNameLeft"
:class="{'detail-content-header-content-left-active':isDisplay}"> :class="{'detail-content-header-content-left-active':isDisplay}">
{{$t('selectedStandard')}}:{{resultData.serialNumberLeft}} {{resultData.fileNameLeft}} {{$t('selectedStandard')}}:{{resultData.serialNumberLeft}}
<span style="cursor: pointer"
@click="fileClick(resultData.fileNameLeft,resultData.fileIdLeft)">{{resultData.fileNameLeft}}</span>
</div> </div>
<div class="detail-content-header-content-content" <div class="detail-content-header-content-content"
:title="resultData.serialNumberRight + resultData.fileNameRight" :title="resultData.serialNumberRight + resultData.fileNameRight"
:class="{'detail-content-header-content-left-active':isDisplay}"> :class="{'detail-content-header-content-left-active':isDisplay}">
{{$t('selectedStandard')}}:{{resultData.serialNumberRight}} {{resultData.fileNameRight}} {{$t('selectedStandard')}}:{{resultData.serialNumberRight}}
<span style="cursor: pointer"
@click="fileClick(resultData.fileNameRight,resultData.fileIdRight)">{{resultData.fileNameRight}}</span>
</div>
<div class="detail-content-header-content-rightOne">
{{$t('comparisonDifferenceComment')}}
</div> </div>
<div class="detail-content-header-content-right" v-if="!isDisplay"> <div class="detail-content-header-content-right" v-if="!isDisplay">
{{$t('operation')}} {{$t('operation')}}
@@ -75,19 +91,24 @@
</div> </div>
<div class="detail-content-left-button" v-html="item.itemsTextRight"></div> <div class="detail-content-left-button" v-html="item.itemsTextRight"></div>
</div> </div>
<div class="detail-content-bottom" <div class="detail-content-right-one">
:class="{'detail-content-bottom-color':checkboxList.join(',').includes(item.id)}"> <div class="detail-content-left-button">
<div class="detail-content-bottom-left"
:class="{'detail-content-bottom-left-text':language == 'en-us' ? true:false}"
:title="$t('comparisonDifferenceComment')">
<a-icon type="message"/>
{{$t('comparisonDifferenceComment')}}:
</div>
<div class="detail-content-bottom-right"
:class="{'detail-content-bottom-right-text':language == 'en-us' ? true:false}">
{{item.comment}} {{item.comment}}
</div> </div>
</div> </div>
<!-- <div class="detail-content-bottom"-->
<!-- :class="{'detail-content-bottom-color':checkboxList.join(',').includes(item.id)}">-->
<!-- <div class="detail-content-bottom-left"-->
<!-- :class="{'detail-content-bottom-left-text':language == 'en-us' ? true:false}"-->
<!-- :title="$t('comparisonDifferenceComment')">-->
<!-- <a-icon type="message"/>-->
<!-- {{$t('comparisonDifferenceComment')}}:-->
<!-- </div>-->
<!-- <div class="detail-content-bottom-right"-->
<!-- :class="{'detail-content-bottom-right-text':language == 'en-us' ? true:false}">-->
<!-- {{item.comment}}-->
<!-- </div>-->
<!-- </div>-->
</div> </div>
<div class="detail-content-content-text-right" v-if="!isDisplay"> <div class="detail-content-content-text-right" v-if="!isDisplay">
<span class="text-button-one"> <span class="text-button-one">
@@ -167,6 +188,8 @@
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage' import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import commentList from './commentList' import commentList from './commentList'
import { putAction } from '../../../../api/manage' import { putAction } from '../../../../api/manage'
import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default { export default {
name: 'comparisonResults', name: 'comparisonResults',
@@ -177,7 +200,12 @@
return { return {
loading: false, loading: false,
checkboxList: [], checkboxList: [],
isVarianceOne: false,
isVarianceTwo: false,
isVarianceThe: false,
confirmLoading: false, confirmLoading: false,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
visible: false, visible: false,
formInlineText: {}, formInlineText: {},
rulesText: {}, rulesText: {},
@@ -205,6 +233,7 @@
this.getData() this.getData()
}, },
methods: { methods: {
...mapGetters(['userInfo']),
Fallback() { Fallback() {
this.$router.push({ this.$router.push({
path: '/documentComparison' path: '/documentComparison'
@@ -232,12 +261,45 @@
}, },
viewConsistentAssessmentClick() { viewConsistentAssessmentClick() {
this.comment = '一致' this.comment = '一致'
this.isVarianceTwo = true
this.isVarianceOne = false
this.isVarianceThe = false
this.getData()
},
viewVarianceAssessmentClick() {
this.isVarianceOne = true
this.isVarianceTwo = false
this.isVarianceThe = false
this.comment = '差异'
this.getData() this.getData()
}, },
viewAllClick() { viewAllClick() {
this.comment = '' this.comment = ''
this.isVarianceThe = true
this.isVarianceOne = false
this.isVarianceTwo = false
this.getData() this.getData()
}, },
fileClick(name, id) {
let fileName = name
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + id + '&userName=' + this.userInfo().username))
} 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') {
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 })
}
},
getData() { getData() {
let query = { let query = {
id: this.$route.query.id, id: this.$route.query.id,
@@ -466,7 +528,7 @@
color: #040B29; color: #040B29;
.detail-content-header-content-left { .detail-content-header-content-left {
width: calc(50% - 64px); width: calc(50% - 194px);
height: 56px; height: 56px;
display: inline-block; display: inline-block;
background: rgba(4, 11, 41, 0.0300); background: rgba(4, 11, 41, 0.0300);
@@ -479,7 +541,7 @@
} }
.detail-content-header-content-content { .detail-content-header-content-content {
width: calc(50% - 64px); width: calc(50% - 194px);
display: inline-block; display: inline-block;
height: 56px; height: 56px;
background: rgba(4, 11, 41, 0.0300); background: rgba(4, 11, 41, 0.0300);
@@ -491,6 +553,19 @@
white-space: nowrap; white-space: nowrap;
} }
.detail-content-header-content-rightOne {
width: 260px;
display: inline-block;
height: 56px;
background: rgba(4, 11, 41, 0.0300);
border-radius: 4px 0px 0px 4px;
padding-left: 24px;
border-right: 1px #EFF1F3 solid;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.detail-content-header-content-right { .detail-content-header-content-right {
width: 128px; width: 128px;
display: inline-block; display: inline-block;
@@ -562,7 +637,7 @@
} }
.detail-content-left { .detail-content-left {
width: 50%; width: calc(50% - 130px);
display: inline-block; display: inline-block;
float: left; float: left;
padding-right: 24px; padding-right: 24px;
@@ -570,10 +645,20 @@
} }
.detail-content-right { .detail-content-right {
width: 50%; width: calc(50% - 104px);
display: inline-block; display: inline-block;
float: left; float: left;
padding-left: 24px; padding-left: 24px;
padding-right: 24px;
border-right: 1px #EFF1F3 solid;
}
.detail-content-right-one {
width: 234px;
display: inline-block;
float: left;
padding-left: 24px;
/*border-right: 1px #EFF1F3 solid;*/
} }
.detail-content-left-top { .detail-content-left-top {
@@ -675,4 +760,7 @@
.detail-content-bottom-right-text { .detail-content-bottom-right-text {
width: calc(50% - 256px); width: calc(50% - 256px);
} }
.operator-text-text-text{
color: #00B3BE!important;
}
</style> </style>
@@ -196,6 +196,7 @@
pageNoRight: 1, pageNoRight: 1,
formInline: {}, formInline: {},
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
rules: { rules: {
remark: [ remark: [
{ {
@@ -388,10 +389,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.fileId + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.fileId + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.fileId + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.fileId + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.fileId }) downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.fileId })
} }
@@ -126,6 +126,7 @@
dataSource: [], dataSource: [],
selectedRowKeys: [], selectedRowKeys: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
total: 0, total: 0,
pageSize: 10, pageSize: 10,
pageNo: 1, pageNo: 1,
@@ -422,10 +423,12 @@
} else if (fileSuffix === '.docx' || fileSuffix === '.doc') { } else if (fileSuffix === '.docx' || fileSuffix === '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdLeft + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdLeft + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls' } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdLeft + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdLeft + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', row.fileNameLeft, { id: row.fileIdLeft }) downloadFile('/sys/common/downLoadFile', row.fileNameLeft, { id: row.fileIdLeft })
} }
@@ -440,10 +443,12 @@
} else if (fileSuffix === '.docx' || fileSuffix === '.doc') { } else if (fileSuffix === '.docx' || fileSuffix === '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdRight + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdRight + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls' } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdRight + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdRight + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', row.fileNameRight, { id: row.fileIdRight }) downloadFile('/sys/common/downLoadFile', row.fileNameRight, { id: row.fileIdRight })
} }
@@ -352,6 +352,7 @@
selectModel: '', selectModel: '',
fileList: [], fileList: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
queryParamSeach: '', queryParamSeach: '',
mapOne: {}, mapOne: {},
mapTwo: {}, mapTwo: {},
@@ -696,10 +697,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName || fileQuery.file_name, { id: fileQuery.id }) downloadFile('/sys/common/downLoadFile', fileQuery.fileName || fileQuery.file_name, { id: fileQuery.id })
} }
@@ -92,6 +92,7 @@
total: 0, total: 0,
pageSize: 10, pageSize: 10,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
pageNo: 1, pageNo: 1,
queryParam: {} queryParam: {}
} }
@@ -129,10 +130,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.file_id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.file_id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.file_id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.file_id + fileSuffix)
window.open(url, '_blank') 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() { ResetSearch() {
@@ -151,10 +154,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', fileQuery.file_name, { id: fileQuery.id.slice(0, 32) }) downloadFile('/sys/common/downLoadFile', fileQuery.file_name, { id: fileQuery.id.slice(0, 32) })
} }
@@ -132,6 +132,7 @@
loading: false, loading: false,
fileList: [], fileList: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
mapOne: {}, mapOne: {},
mapTwo: {}, mapTwo: {},
queryParamOne: {}, queryParamOne: {},
@@ -267,10 +268,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName || fileQuery.file_name, { id: fileQuery.id }) downloadFile('/sys/common/downLoadFile', fileQuery.fileName || fileQuery.file_name, { id: fileQuery.id })
} }
@@ -116,6 +116,7 @@
total: 0, total: 0,
pageSize: 10, pageSize: 10,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
pageNo: 1, pageNo: 1,
queryParam: {} queryParam: {}
} }
@@ -170,10 +171,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id.slice(0, 32) + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', fileQuery.file_name, { id: fileQuery.id.slice(0, 32) }) downloadFile('/sys/common/downLoadFile', fileQuery.file_name, { id: fileQuery.id.slice(0, 32) })
} }
@@ -239,10 +242,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.file_id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.file_id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.file_id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.file_id + fileSuffix)
window.open(url, '_blank') 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) { titleClick(item) {
@@ -279,6 +279,7 @@
components: {}, components: {},
visibleFile: false, visibleFile: false,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
dataSourceFile: [], dataSourceFile: [],
columnsFile: [ columnsFile: [
{ {
@@ -830,10 +831,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
} }
@@ -848,10 +851,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', name, { id: id }) downloadFile('/sys/common/downLoadFile', name, { id: id })
} }
+17 -1
View File
@@ -619,7 +619,23 @@ export default {
let supFolder = '' let supFolder = ''
this.supFolder = this.nodeItem.key this.supFolder = this.nodeItem.key
this.addSub = false this.addSub = false
this.menuRightVisible = true let params = {}
let long = localStorage.getItem('language')
let cut = ''
if (long && long == 'zh-cn') {
this.cut = 'cn'
} else if (long && long == 'en-us') {
this.cut = 'en'
}
params.id = this.supFolder
params.cut = this.cut
postAction(`extRepo/extRepoFolder/isAllowSiblingFolder`, params).then(res => {
if (res.success) {
this.menuRightVisible = true
} else {
this.$message.warning(res.message)
}
})
}, },
orgAdds(){ orgAdds(){
@@ -71,6 +71,7 @@
return { return {
dataSource: [], dataSource: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
columns: [ columns: [
{ {
title: this.$t('ProcessType'), title: this.$t('ProcessType'),
@@ -187,10 +188,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
} }
@@ -205,10 +208,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', name, { id: id }) downloadFile('/sys/common/downLoadFile', name, { id: id })
} }
@@ -112,6 +112,7 @@
<PersonnelSelection <PersonnelSelection
:query="{db_field_name:'certificationEngineer',db_field_txt:$t('certifiedEngineer')}" :query="{db_field_name:'certificationEngineer',db_field_txt:$t('certifiedEngineer')}"
:personneQuery="formInline" :personneQuery="formInline"
:selectDepartment="true"
@change="PersonnelSelectionChange" @change="PersonnelSelectionChange"
:disabled="disabled" :disabled="disabled"
v-model="formInline.certificationEngineerName"/> v-model="formInline.certificationEngineerName"/>
@@ -848,6 +848,7 @@
AndUserIdEdit: '/project/projectLibraryRoleRelEO/edit' AndUserIdEdit: '/project/projectLibraryRoleRelEO/edit'
}, },
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
loading: false, loading: false,
dataSource: [], dataSource: [],
isResultReported: false, isResultReported: false,
@@ -2126,10 +2127,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
} }
@@ -2145,10 +2148,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', name, { id: id, userName: this.userInfo().username }) downloadFile('/sys/common/downLoadFile', name, { id: id, userName: this.userInfo().username })
} }
@@ -49,6 +49,7 @@
myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl, myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl,
upDataList: [], upDataList: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
fileList: [], fileList: [],
myfileList: [], myfileList: [],
isLoding: false, isLoding: false,
@@ -214,10 +215,12 @@
} else if (fileSuffix === '.docx' || fileSuffix === '.doc') { } else if (fileSuffix === '.docx' || fileSuffix === '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls' } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id,userName:this.userInfo().username }) downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id,userName:this.userInfo().username })
} }
@@ -363,6 +363,7 @@
list: '/project/projectVersionInfoEO/list' list: '/project/projectVersionInfoEO/list'
}, },
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
loading: false, loading: false,
dataSource: [], dataSource: [],
// fieldList | array |✔| 需要查询的列集合示例如下,type类型有:date/datetime/string/int/number // fieldList | array |✔| 需要查询的列集合示例如下,type类型有:date/datetime/string/int/number
@@ -468,10 +469,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
} }
@@ -486,10 +489,12 @@
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') { } else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank') window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls' } else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix) let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
window.open(url, '_blank') 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 { } else {
downloadFile('/sys/common/downLoadFile', name, { id: id }) downloadFile('/sys/common/downLoadFile', name, { id: id })
} }