合并分支 'dev_third_stage' 到 'master'
Dev third stage 查看合并请求 laws-nio/laws-weilai!182
This commit is contained in:
@@ -1112,11 +1112,11 @@ INSERT INTO `laws_weilai`.`sys_permission` (`id`, `parent_id`, `name`, `url`, `c
|
||||
-- 上报库删除按钮 2022-09-14已同步生产环境
|
||||
INSERT INTO `laws_weilai`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`) VALUES ('1569609701240446977', '1539429224550457346', '删除', NULL, NULL, NULL, NULL, 2, 'params:report:delete', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'admin', '2022-09-13 16:51:29', NULL, NULL, 0, 0, '1', 0, 'Delete');
|
||||
|
||||
-- 上报库 添加项目目标市场 2022-09-19
|
||||
-- 上报库 添加项目目标市场 2022-09-19已同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`params_report`
|
||||
ADD COLUMN `target_market` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '目标市场' AFTER `title`;
|
||||
|
||||
-- 参数项清单 修改字段长度 2022-09-23
|
||||
-- 参数项清单 修改字段长度 2022-09-23已同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`params_info`
|
||||
MODIFY COLUMN `nio_number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'nio编号' AFTER `sys_org_code`,
|
||||
MODIFY COLUMN `params_name` varchar(350) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数名称' AFTER `is_must`;
|
||||
@@ -1152,10 +1152,31 @@ ALTER TABLE `laws_weilai`.`report_cert_category_params_info`
|
||||
MODIFY COLUMN `params_name` varchar(350) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数名称' AFTER `params_number`,
|
||||
MODIFY COLUMN `nio_number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'NIO编号' AFTER `description`;
|
||||
|
||||
-- 虚拟清单表修改备注字段长度由300改为1000 2022-09-23 未同步生产环境
|
||||
-- 虚拟清单表修改备注字段长度由300改为1000 2022-09-23 已同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`dummy_inventory_info`
|
||||
MODIFY COLUMN `remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注' AFTER `duty_territory`;
|
||||
|
||||
-- 法规清单表修改备注字段长度由300改为1000 2022-09-23 未同步生产环境
|
||||
-- 法规清单表修改备注字段长度由300改为1000 2022-09-23 已同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`project_laws_inventory`
|
||||
MODIFY COLUMN `remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注' AFTER `engineering_interface_person`;
|
||||
|
||||
-- 月报填写表 新增一级目录字段2022-09-25 未同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`laws_monthly_report_write`
|
||||
ADD COLUMN `memories_chapter_one` varchar(255) NULL COMMENT '章节目录对应的一级标题' AFTER `source_en`;
|
||||
|
||||
-- 法规意见收集-评估结果表 增加字段 条款内容 2022-09-27 未同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`laws_opinion_assessment_result`
|
||||
ADD COLUMN `clause_content` varchar(600) NULL COMMENT '条款内容' AFTER `acti_proc_inst_id`;
|
||||
-- 法规意见收集 增加字段 评估人id 2022-09-27 未同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`laws_opinion_gather`
|
||||
ADD COLUMN `evaluator_ids` varchar(4000) NULL COMMENT '评估人ids,多个之间使用英文逗号分隔' AFTER `opinion_archive_id`;
|
||||
|
||||
|
||||
-- 标签管理,文档拆分字段 处理查询 技术领域id:ccf68e6578a0a446a6ac34018f0a477d、信息类别id:09fa6530229280174071eae0514e0f63。 2022-09-27 未同步生产环境
|
||||
update onl_cgform_field set is_query = '1' where id = 'ccf68e6578a0a446a6ac34018f0a477d';
|
||||
update onl_cgform_field set is_query = '1', is_read_only = '1' where id = '09fa6530229280174071eae0514e0f63';
|
||||
|
||||
-- 配置表,增加问题知识库预览图片配置 2022-09-27 未同步生产环境
|
||||
INSERT INTO `laws_weilai`.`sys_config` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `config`, `config_name`) VALUES ('4', 'admin', '2022-09-28 14:35:30', NULL, NULL, 'A01', 'http://grp.nioint.com/', 'domianWebImgURL');
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -253,7 +253,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
String[] fileTypeArr = {".doc", ".DOC", ".txt", ".TXT", ".docx", ".DOCX",
|
||||
".xls", ".XLS", ".xlsx", ".XLSX", ".pdf", ".PDF", ".png", ".PNG",
|
||||
".jfif", ".JFIF", ".pjpeg", ".PJPEG", ".jpeg", ".JPEG", ".pjp", ".PJP",
|
||||
".jpg", ".JPG", ".swf", ".SWF", ".bmp", ".BMP", ".rar", ".RAR", ".zip", ".ZIP", ".ppt", ".PPT", ".pptx", ".PPTX", ".csv", ".CSV"};
|
||||
".jpg", ".JPG", ".swf", ".SWF", ".bmp", ".BMP", ".rar", ".RAR", ".zip", ".ZIP", ".ppt", ".PPT", ".pptx", ".PPTX", ".csv", ".CSV", ".gif", ".GIF"};
|
||||
boolean flag = true;
|
||||
for (String fileTypeTemp : fileTypeArr) {
|
||||
if (fileTypeTemp.equalsIgnoreCase(fileType)) {
|
||||
@@ -262,9 +262,9 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
}
|
||||
if (flag) {
|
||||
if (cut.equals(CutEnum.CN.getValue())) {
|
||||
throw new JeroBootException("只能够上传pdf/word/excel/csv/ppt/txt/zip/rar/静态图片类型的文件。请重新选择文件!");
|
||||
throw new JeroBootException("只能够上传pdf/word/excel/csv/ppt/txt/zip/rar/gif/静态图片类型的文件。请重新选择文件!");
|
||||
} else {
|
||||
throw new JeroBootException("Only upload pdf/word/excel/csv/ppt/txt/zip/rar/Static image type file. Please re select the file!");
|
||||
throw new JeroBootException("Only upload pdf/word/excel/csv/ppt/txt/zip/rar/gif/Static image type file. Please re select the file!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+48
@@ -21,6 +21,7 @@ import com.jero.common.system.util.JwtUtil;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.system.vo.SysDepartTreeModel;
|
||||
import com.jero.common.system.vo.SysDepartUserTreeModel;
|
||||
import com.jero.common.system.vo.SysUserTreeModel;
|
||||
import com.jero.common.util.ImportExcelUtil;
|
||||
import com.jero.common.util.PasswordUtil;
|
||||
import com.jero.common.util.RedisUtil;
|
||||
@@ -63,6 +64,7 @@ import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户表 前端控制器
|
||||
@@ -1533,7 +1535,53 @@ public class SysUserController {
|
||||
result.setSuccess(true);
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* 查询数据 查出所有部门及其用户
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "用户管理-查出所有部门及其用户")
|
||||
@RequestMapping(value = "/queryUserTreeList", method = RequestMethod.GET)
|
||||
public Result<List<DepartUserTree>> queryUserTreeList(String cut) {
|
||||
Result<List<DepartUserTree>> result = new Result<>();
|
||||
List<DepartUserTree> dutList = new ArrayList<>();
|
||||
List<SysDepartTreeModel> departTreeModelList = sysDepartService.queryTreeList(cut);
|
||||
for (SysDepartTreeModel sdtm: departTreeModelList) {
|
||||
dutList.addAll(findChildNode(sdtm));
|
||||
}
|
||||
result.setResult(dutList);
|
||||
result.setSuccess(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<DepartUserTree> findChildNode(SysDepartTreeModel sdtModel) {
|
||||
List<DepartUserTree> resList = new ArrayList<>();
|
||||
DepartUserTree dut = new DepartUserTree();
|
||||
dut.setId(sdtModel.getId());
|
||||
dut.setName(sdtModel.getDepartName());
|
||||
dut.setParentId(sdtModel.getParentId());
|
||||
dut.setType("Depart");
|
||||
resList.add(dut);
|
||||
|
||||
List<String> departIds = new ArrayList<>();
|
||||
departIds.add(sdtModel.getId());
|
||||
List<SysUser> sysUserList = sysUserService.getUserListByDepIds(departIds);
|
||||
for (SysUser user: sysUserList) {
|
||||
DepartUserTree dut1 = new DepartUserTree();
|
||||
dut1.setId(user.getId());
|
||||
dut1.setName(user.getUsername());
|
||||
dut1.setParentId(sdtModel.getId());
|
||||
dut1.setType("User");
|
||||
resList.add(dut1);
|
||||
}
|
||||
|
||||
if (sdtModel.getChildren() != null && sdtModel.getChildren().size() > 0) {
|
||||
for (SysDepartTreeModel sdtModel1 : sdtModel.getChildren()) {
|
||||
resList.addAll(findChildNode(sdtModel1));
|
||||
}
|
||||
}
|
||||
return resList;
|
||||
}
|
||||
|
||||
@AutoLog(value = "文档库推送部门和人员的模糊搜索")
|
||||
@ApiOperation(value="文档库推送部门和人员的模糊搜索", notes="文档库推送部门和人员的模糊搜索")
|
||||
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.jero.modules.system.entity;
|
||||
|
||||
public class DepartUserTree {
|
||||
private String id;
|
||||
private String parentId;
|
||||
private String name;
|
||||
private String type;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DepartUserTree{" +
|
||||
"id='" + id + '\'' +
|
||||
", parentId='" + parentId + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", type='" + type + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
+6
-1
@@ -773,7 +773,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String dbFieldName = onlCgformField.getDbFieldName();
|
||||
if ("nio_number".equals(dbFieldName) || "params_name".equals(dbFieldName)) {
|
||||
map.put("click3", true);
|
||||
map.put("click5", true);
|
||||
if("nio_number".equals(dbFieldName)) {
|
||||
map.put("click4", true);
|
||||
} else {
|
||||
map.put("click3", true);
|
||||
}
|
||||
}
|
||||
if ("description".equals(dbFieldName)) {
|
||||
indexOfDescription = i;
|
||||
|
||||
+19
-4
@@ -86,6 +86,19 @@ public class SarFileCompareItemCommentController extends JeroController<SarFileC
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 一致评估
|
||||
* @param sarFileCompareItemComment
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "一致评估")
|
||||
@ApiOperation(value = "一致评估", notes = "一致评估")
|
||||
@PostMapping(value = "/consensusAssessment")
|
||||
public Result<?> consensusAssessment(@Validated @RequestBody SarFileCompareItemComment sarFileCompareItemComment) {
|
||||
sarFileCompareItemCommentService.consensusAssessment(sarFileCompareItemComment);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
@@ -153,8 +166,9 @@ public class SarFileCompareItemCommentController extends JeroController<SarFileC
|
||||
@AutoLog(value = "文档对比信息条款评论表-查询对比结果")
|
||||
@ApiOperation(value = "文档对比信息条款评论表-查询对比结果", notes = "文档对比信息条款评论表-查询对比结果")
|
||||
@GetMapping(value = "/queryCompareResult")
|
||||
public Result<SarFileCompareResultVO> queryCompareResult(@RequestParam(name = "infoId", required = true) String infoId) {
|
||||
SarFileCompareResultVO res = sarFileCompareItemCommentService.queryCompareResult(infoId);
|
||||
public Result<SarFileCompareResultVO> queryCompareResult(@RequestParam(name = "infoId", required = true) String infoId,
|
||||
@RequestParam(name = "comment", required = false) String comment) {
|
||||
SarFileCompareResultVO res = sarFileCompareItemCommentService.queryCompareResult(infoId,comment);
|
||||
return Result.OK(res);
|
||||
}
|
||||
|
||||
@@ -165,8 +179,9 @@ public class SarFileCompareItemCommentController extends JeroController<SarFileC
|
||||
@RequestParam(name = "selectIds", required = true) String selectIds,
|
||||
@RequestParam(name = "includeComments", required = true) boolean includeComments,
|
||||
@RequestParam(name = "cut", required = true) String cut,
|
||||
HttpServletResponse response) {
|
||||
sarFileCompareItemCommentService.exportResXls(response, infoId, selectIds, includeComments, cut);
|
||||
HttpServletResponse response,HttpServletRequest request,
|
||||
@RequestParam(name = "comment", required = false) String comment) {
|
||||
sarFileCompareItemCommentService.exportResXls(request,response, infoId, selectIds, includeComments, cut,comment);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.jero.modules.compare.entity;
|
||||
|
||||
public class SarFileCompareExcelMergeCell {
|
||||
|
||||
Integer leftStart;
|
||||
Integer leftEnd;
|
||||
Integer rightStart;
|
||||
Integer rightEnd;
|
||||
|
||||
public Integer getLeftStart() {
|
||||
return leftStart;
|
||||
}
|
||||
|
||||
public void setLeftStart(Integer leftStart) {
|
||||
this.leftStart = leftStart;
|
||||
}
|
||||
|
||||
public Integer getLeftEnd() {
|
||||
return leftEnd;
|
||||
}
|
||||
|
||||
public void setLeftEnd(Integer leftEnd) {
|
||||
this.leftEnd = leftEnd;
|
||||
}
|
||||
|
||||
public Integer getRightStart() {
|
||||
return rightStart;
|
||||
}
|
||||
|
||||
public void setRightStart(Integer rightStart) {
|
||||
this.rightStart = rightStart;
|
||||
}
|
||||
|
||||
public Integer getRightEnd() {
|
||||
return rightEnd;
|
||||
}
|
||||
|
||||
public void setRightEnd(Integer rightEnd) {
|
||||
this.rightEnd = rightEnd;
|
||||
}
|
||||
|
||||
public SarFileCompareExcelMergeCell() {
|
||||
}
|
||||
|
||||
public SarFileCompareExcelMergeCell(Integer leftStart, Integer leftEnd, Integer rightStart, Integer rightEnd) {
|
||||
this.leftStart = leftStart;
|
||||
this.leftEnd = leftEnd;
|
||||
this.rightStart = rightStart;
|
||||
this.rightEnd = rightEnd;
|
||||
}
|
||||
}
|
||||
+4
-2
@@ -65,7 +65,9 @@ public interface ISarFileCompareItemCommentService extends IService<SarFileCompa
|
||||
*/
|
||||
List<SarFileCompareItemComment> queryList();
|
||||
|
||||
SarFileCompareResultVO queryCompareResult(String infoId);
|
||||
SarFileCompareResultVO queryCompareResult(String infoId,String comment);
|
||||
|
||||
void exportResXls(HttpServletResponse response, String infoId, String selectIds, boolean includeComments, String cut);
|
||||
void exportResXls(HttpServletRequest request,HttpServletResponse response, String infoId, String selectIds, boolean includeComments, String cut,String comment);
|
||||
|
||||
void consensusAssessment(SarFileCompareItemComment sarFileCompareItemComment);
|
||||
}
|
||||
|
||||
+278
-19
@@ -5,23 +5,37 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.util.oss.CosBootUtil;
|
||||
import com.jero.modules.compare.entity.*;
|
||||
import com.jero.modules.compare.mapper.SarFileCompareItemCommentMapper;
|
||||
import com.jero.modules.compare.service.ISarFileCompareInfoService;
|
||||
import com.jero.modules.compare.service.ISarFileCompareItemCommentService;
|
||||
import com.jero.modules.compare.service.ISarFileCompareItemService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFClientAnchor;
|
||||
import org.apache.poi.hssf.usermodel.HSSFPatriarch;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.*;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息条款评论表
|
||||
@@ -38,6 +52,13 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
|
||||
@Autowired
|
||||
private ISarFileCompareItemService SarFileCompareItemServiceImpl;
|
||||
|
||||
@Value("${jero.path.upload}")
|
||||
private String filePath;
|
||||
@Value("${jero.path.uploadCos}")
|
||||
private String filePathCos;
|
||||
@Value("${jero.splitUrl}")
|
||||
private String splitUrl;
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -115,7 +136,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
|
||||
}
|
||||
|
||||
@Override
|
||||
public SarFileCompareResultVO queryCompareResult(String infoId) {
|
||||
public SarFileCompareResultVO queryCompareResult(String infoId,String comment) {
|
||||
SarFileCompareResultVO resultVO = new SarFileCompareResultVO();
|
||||
SarFileCompareInfo sfcInfo = sarFileCompareInfoServiceImpl.queryById(infoId);
|
||||
resultVO.setInfoId(infoId);
|
||||
@@ -125,7 +146,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
|
||||
resultVO.setFileNameRight(sfcInfo.getFileNameRight());
|
||||
resultVO.setComments(sfcInfo.getComments());
|
||||
|
||||
List<SarFileCompareItemComment> list = queryListByInfoId(infoId);
|
||||
List<SarFileCompareItemComment> list = queryListByInfoId(infoId,comment);
|
||||
Map<String, SarFileCompareItem> sfcItemMap = SarFileCompareItemServiceImpl.queryMapByInfoId(infoId);
|
||||
for (SarFileCompareItemComment sfcItemCom : list) {
|
||||
SarFileCompareItemComVO itemComVO = new SarFileCompareItemComVO();
|
||||
@@ -155,8 +176,11 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
|
||||
|
||||
}
|
||||
|
||||
public List<SarFileCompareItemComment> queryListByInfoId(String infoId) {
|
||||
public List<SarFileCompareItemComment> queryListByInfoId(String infoId,String comment) {
|
||||
LambdaQueryWrapper<SarFileCompareItemComment> queryWrapper = new LambdaQueryWrapper<>();
|
||||
if (ObjectUtils.isNotEmpty(comment)) {
|
||||
queryWrapper.eq(SarFileCompareItemComment::getComment, comment);
|
||||
}
|
||||
queryWrapper.eq(SarFileCompareItemComment::getInfoId, infoId);
|
||||
queryWrapper.orderBy(true, true, SarFileCompareItemComment::getCreateTime);
|
||||
List<SarFileCompareItemComment> list = this.list(queryWrapper);
|
||||
@@ -164,7 +188,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportResXls(HttpServletResponse response, String infoId, String selectIds, boolean includeComments, String cut) {
|
||||
public void exportResXls(HttpServletRequest request,HttpServletResponse response, String infoId, String selectIds, boolean includeComments, String cut,String comment) {
|
||||
List<SarFileCompareItemComment> list = null;
|
||||
if (includeComments && StringUtils.isEmpty(selectIds)) {
|
||||
//只导出全文评论的情况
|
||||
@@ -175,13 +199,26 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
|
||||
if (!StringUtils.isEmpty(selectIds)) {
|
||||
queryWrapper.in(SarFileCompareItemComment::getId, Arrays.asList(selectIds.split(",")));
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(comment)) {
|
||||
queryWrapper.eq(SarFileCompareItemComment::getComment, comment);
|
||||
}
|
||||
queryWrapper.orderBy(true, true, SarFileCompareItemComment::getCreateTime);
|
||||
list = this.list(queryWrapper);
|
||||
}
|
||||
Map<String, SarFileCompareItem> sfcItemMap = SarFileCompareItemServiceImpl.queryMapByInfoId(infoId);
|
||||
|
||||
SarFileCompareInfo sarFileCompareInfo = sarFileCompareInfoServiceImpl.queryById(infoId);
|
||||
|
||||
OutputStream os = null;
|
||||
Workbook workbook = new XSSFWorkbook();
|
||||
Workbook workbook = new HSSFWorkbook();
|
||||
|
||||
//在本地创建图片文件夹
|
||||
String dir = filePath + File.separator + UUID.randomUUID().toString().replace("-", "");
|
||||
File dirFile = new File(dir);
|
||||
if (dirFile.exists()){
|
||||
dirFile.delete();
|
||||
}
|
||||
dirFile.mkdirs();
|
||||
try {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String fileName = "导出对比结果 " + sdf.format(new Date()) + ".xlsx";
|
||||
@@ -195,15 +232,15 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
|
||||
sheetName = "Comparing results";
|
||||
}
|
||||
Sheet sheet = workbook.createSheet(sheetName);
|
||||
|
||||
HSSFPatriarch patriarch = (HSSFPatriarch) sheet.createDrawingPatriarch();
|
||||
// 创建头部
|
||||
String header = "";
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
header = "条款号,条款名称,条款内容,条款号,条款名称,条款内容,评论";
|
||||
header = "所选标准,条款号,条款名称,条款内容,所选标准,条款号,条款名称,条款内容,评论";
|
||||
} else {
|
||||
header = "Number,Title,Content,Number,Title,Content,Comment";
|
||||
header = "Selected Standard,Number,Title,Content,Selected Standard,Number,Title,Content,Comment";
|
||||
}
|
||||
int[] columnWidth = {5000, 5000, 10000, 5000, 5000, 10000, 10000};
|
||||
int[] columnWidth = {5000,5000, 5000, 10000, 5000,5000, 5000, 10000, 10000};
|
||||
CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象
|
||||
cellStyle.setAlignment(HorizontalAlignment.LEFT);
|
||||
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
@@ -217,17 +254,91 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
|
||||
}
|
||||
}
|
||||
int i = 1;
|
||||
//记录需要合并的单元格
|
||||
List<SarFileCompareExcelMergeCell> mergeCells = new ArrayList<>();
|
||||
for (SarFileCompareItemComment itemComment : list) {
|
||||
SarFileCompareExcelMergeCell sarFileCompareExcelMergeCell = new SarFileCompareExcelMergeCell();
|
||||
String[] leftSplit = null;
|
||||
String[] rightSplit = null;
|
||||
Row row = sheet.createRow(i);
|
||||
row.createCell(0).setCellValue(sarFileCompareInfo == null ? "" : sarFileCompareInfo.getTitleLeft() + " " + sarFileCompareInfo.getFileNameLeft());
|
||||
row.createCell(4).setCellValue(sarFileCompareInfo == null ? "" : sarFileCompareInfo.getTitleRight() + " " + sarFileCompareInfo.getFileNameRight());
|
||||
String itemIdLeft = itemComment.getItemsIdLeft();
|
||||
if (!StringUtils.isEmpty(itemIdLeft)) {
|
||||
SarFileCompareItem itemLeft = sfcItemMap.get(itemIdLeft);
|
||||
if (null != itemLeft) {
|
||||
row.createCell(0).setCellValue(itemLeft.getItemsNum());
|
||||
row.createCell(1).setCellValue(itemLeft.getItemsName());
|
||||
row.createCell(1).setCellValue(itemLeft.getItemsNum());
|
||||
row.createCell(2).setCellValue(itemLeft.getItemsName());
|
||||
String text = itemLeft.getItemsText();
|
||||
text = text.replace("<p>", "").replace("</p>", "\r\n");
|
||||
row.createCell(2).setCellValue(text);
|
||||
BufferedImage bufferImg = null;
|
||||
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
|
||||
addImgdata(text,request.getSession());
|
||||
String rowDataAndPath = (String) request.getSession().getAttribute("txtAndImg");
|
||||
leftSplit = rowDataAndPath.split("---");
|
||||
if (leftSplit.length > 1) {
|
||||
for (int j = 0; j < leftSplit.length; j++) {
|
||||
if (j > 0) {
|
||||
Row row2 = sheet.createRow(j + i);
|
||||
if (leftSplit[j].contains(".jpg") || leftSplit[j].contains(".png")) {
|
||||
row2.setHeight((short) 5000); //设置行高
|
||||
//先将图片下载到本地
|
||||
String fileLastName = leftSplit[j].substring(leftSplit[j].lastIndexOf("/") + 1);
|
||||
if (CosBootUtil.doesObjectExist(leftSplit[j])) {
|
||||
try (InputStream in = CosBootUtil.download(leftSplit[j])) {
|
||||
copyFile2(in, dir + File.separator + fileLastName);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
File file = new File(dir + File.separator + fileLastName);
|
||||
if (file.exists()) {
|
||||
bufferImg = ImageIO.read(file);
|
||||
ImageIO.write(bufferImg, "jpg", byteArrayOut);
|
||||
//anchor主要用于设置图片的属性
|
||||
HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 600, 200, (short) 3, j + i, (short) 3, j + i);
|
||||
patriarch.createPicture(anchor, workbook.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG));
|
||||
|
||||
}
|
||||
} else {
|
||||
row2.createCell(3).setCellValue(leftSplit[j]);
|
||||
}
|
||||
} else {
|
||||
if (leftSplit[j].contains(".jpg") || leftSplit[j].contains(".png")) {
|
||||
row.setHeight((short) 5000); //设置行高
|
||||
//先将图片下载到本地
|
||||
String fileLastName = leftSplit[j].substring(leftSplit[j].lastIndexOf("/") + 1);
|
||||
if (CosBootUtil.doesObjectExist(leftSplit[j])) {
|
||||
try (InputStream in = CosBootUtil.download(leftSplit[j])) {
|
||||
copyFile2(in, dir + File.separator + fileLastName);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
File file = new File(dir + File.separator + fileLastName);
|
||||
if (file.exists()) {
|
||||
bufferImg = ImageIO.read(file);
|
||||
ImageIO.write(bufferImg, "jpg", byteArrayOut);
|
||||
//anchor主要用于设置图片的属性
|
||||
HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 600, 200, (short) 3, j + i, (short) 3, j + i);
|
||||
patriarch.createPicture(anchor, workbook.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG));
|
||||
|
||||
}
|
||||
} else {
|
||||
row.createCell(3).setCellValue(leftSplit[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
sarFileCompareExcelMergeCell.setLeftStart(i);
|
||||
sarFileCompareExcelMergeCell.setLeftEnd(i + leftSplit.length - 1);
|
||||
sarFileCompareExcelMergeCell.setRightStart(0);
|
||||
sarFileCompareExcelMergeCell.setRightEnd(0);
|
||||
mergeCells.add(sarFileCompareExcelMergeCell);
|
||||
} else {
|
||||
row.createCell(3).setCellValue(rowDataAndPath);
|
||||
}
|
||||
row.setRowStyle(cellStyle);
|
||||
}
|
||||
}
|
||||
@@ -235,22 +346,87 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
|
||||
if (!StringUtils.isEmpty(itemIdRight)) {
|
||||
SarFileCompareItem itemRight = sfcItemMap.get(itemIdRight);
|
||||
if (null != itemRight) {
|
||||
row.createCell(3).setCellValue(itemRight.getItemsNum());
|
||||
row.createCell(4).setCellValue(itemRight.getItemsName());
|
||||
row.createCell(5).setCellValue(itemRight.getItemsNum());
|
||||
row.createCell(6).setCellValue(itemRight.getItemsName());
|
||||
String text = itemRight.getItemsText();
|
||||
text = text.replace("<p>", "").replace("</p>", "\r\n");
|
||||
row.createCell(5).setCellValue(text);
|
||||
BufferedImage bufferImg = null;
|
||||
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
|
||||
addImgdata(text,request.getSession());
|
||||
String rowDataAndPath = (String) request.getSession().getAttribute("txtAndImg");
|
||||
rightSplit = rowDataAndPath.split("---");
|
||||
if (rightSplit.length > 1) {
|
||||
for (int j = 0; j < rightSplit.length; j++) {
|
||||
if (j > 0) {
|
||||
Row row2 = sheet.createRow(j + i);
|
||||
if (rightSplit[j].contains(".jpg") || rightSplit[j].contains(".png")) {
|
||||
row2.setHeight((short) 5000); //设置行高
|
||||
//先将图片下载到本地
|
||||
String fileLastName = rightSplit[j].substring(rightSplit[j].lastIndexOf("/") + 1);
|
||||
if (CosBootUtil.doesObjectExist(rightSplit[j])) {
|
||||
try (InputStream in = CosBootUtil.download(rightSplit[j])) {
|
||||
copyFile2(in, dir + File.separator + fileLastName);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
File file = new File(dir + File.separator + fileLastName);
|
||||
if (file.exists()) {
|
||||
bufferImg = ImageIO.read(file);
|
||||
ImageIO.write(bufferImg, "jpg", byteArrayOut);
|
||||
//anchor主要用于设置图片的属性
|
||||
HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 600, 200, (short) 3, j + i, (short) 3, j + i);
|
||||
patriarch.createPicture(anchor, workbook.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG));
|
||||
|
||||
}
|
||||
} else {
|
||||
row2.createCell(3).setCellValue(rightSplit[j]);
|
||||
}
|
||||
} else {
|
||||
if (rightSplit[j].contains(".jpg") || rightSplit[j].contains(".png")) {
|
||||
row.setHeight((short) 5000); //设置行高
|
||||
//先将图片下载到本地
|
||||
String fileLastName = rightSplit[j].substring(rightSplit[j].lastIndexOf("/") + 1);
|
||||
if (CosBootUtil.doesObjectExist(rightSplit[j])) {
|
||||
try (InputStream in = CosBootUtil.download(rightSplit[j])) {
|
||||
copyFile2(in, dir + File.separator + fileLastName);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
File file = new File(dir + File.separator + fileLastName);
|
||||
if (file.exists()) {
|
||||
bufferImg = ImageIO.read(file);
|
||||
ImageIO.write(bufferImg, "jpg", byteArrayOut);
|
||||
//anchor主要用于设置图片的属性
|
||||
HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 600, 200, (short) 3, j + i, (short) 3, j + i);
|
||||
patriarch.createPicture(anchor, workbook.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG));
|
||||
|
||||
}
|
||||
} else {
|
||||
row.createCell(7).setCellValue(rightSplit[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
sarFileCompareExcelMergeCell.setRightStart(i);
|
||||
sarFileCompareExcelMergeCell.setRightEnd(i + rightSplit.length - 1);
|
||||
mergeCells.add(sarFileCompareExcelMergeCell);
|
||||
} else {
|
||||
row.createCell(7).setCellValue(rowDataAndPath);
|
||||
}
|
||||
row.setRowStyle(cellStyle);
|
||||
}
|
||||
}
|
||||
row.createCell(6).setCellValue(itemComment.getComment());
|
||||
row.createCell(8).setCellValue(itemComment.getComment());
|
||||
for (int j = 0; j < 7; j++) {
|
||||
Cell cell = row.getCell(j);
|
||||
if (null != cell) {
|
||||
cell.setCellStyle(cellStyle);
|
||||
}
|
||||
}
|
||||
i++;
|
||||
i = i + leftSplit.length;
|
||||
}
|
||||
if (includeComments || StringUtils.isEmpty(selectIds)) {
|
||||
Row row = sheet.createRow(i);
|
||||
@@ -266,6 +442,30 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
|
||||
row.createCell(1).setCellValue(compareInfo.getComments());
|
||||
row.getCell(1).setCellStyle(cellStyle);
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(mergeCells)) {
|
||||
for (SarFileCompareExcelMergeCell mergeCell : mergeCells) {
|
||||
Integer leftCount = mergeCell.getLeftEnd() - mergeCell.getLeftStart() + 1;
|
||||
Integer rightCount = mergeCell.getRightEnd() - mergeCell.getRightStart() + 1;
|
||||
Integer start = leftCount - rightCount >= 0 ? mergeCell.getLeftStart() : mergeCell.getRightStart();
|
||||
Integer end = leftCount - rightCount >= 0 ? mergeCell.getLeftEnd() : mergeCell.getRightEnd();
|
||||
//合并
|
||||
CellRangeAddress region0 = new CellRangeAddress(start, end, 0, 0);
|
||||
sheet.addMergedRegion(region0);
|
||||
CellRangeAddress region1 = new CellRangeAddress(start, end, 1, 1);
|
||||
sheet.addMergedRegion(region1);
|
||||
CellRangeAddress region2 = new CellRangeAddress(start, end, 2, 2);
|
||||
sheet.addMergedRegion(region2);
|
||||
CellRangeAddress region4 = new CellRangeAddress(start, end, 4, 4);
|
||||
sheet.addMergedRegion(region4);
|
||||
CellRangeAddress region5 = new CellRangeAddress(start, end, 5, 5);
|
||||
sheet.addMergedRegion(region5);
|
||||
CellRangeAddress region6 = new CellRangeAddress(start, end, 6, 6);
|
||||
sheet.addMergedRegion(region6);
|
||||
CellRangeAddress region7 = new CellRangeAddress(start, end, 7, 7);
|
||||
sheet.addMergedRegion(region7);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
@@ -280,4 +480,63 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 提取字符串中<img>标签内容中的图片路径,并重新按顺序拼接
|
||||
* @param text
|
||||
* @return
|
||||
*/
|
||||
private void addImgdata(String text,HttpSession session) {
|
||||
if (text.contains("<") || text.contains(">")) {
|
||||
String txtLeft = text.substring(0, text.indexOf("<"));
|
||||
String txtRight = text.substring(text.indexOf(">") + 1);
|
||||
String img = text.substring(text.indexOf("<"), text.indexOf(">"));
|
||||
String path = img.substring(img.lastIndexOf("=") + 1, img.lastIndexOf("\""));
|
||||
text = txtLeft + "---" + path + "---" + txtRight;
|
||||
addImgdata(text, session);
|
||||
} else {
|
||||
session.setAttribute("txtAndImg", text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 一致评估
|
||||
* @param sarFileCompareItemComment
|
||||
*/
|
||||
@Override
|
||||
public void consensusAssessment(SarFileCompareItemComment sarFileCompareItemComment) {
|
||||
Date now = new Date();
|
||||
sarFileCompareItemComment.setCreateTime(now);
|
||||
sarFileCompareItemComment.setUpdateTime(now);
|
||||
sarFileCompareItemComment.setComment("一致");
|
||||
save(sarFileCompareItemComment);
|
||||
SarFileCompareItemServiceImpl.updateReviewedById(sarFileCompareItemComment.getItemsIdLeft());
|
||||
SarFileCompareItemServiceImpl.updateReviewedById(sarFileCompareItemComment.getItemsIdRight());
|
||||
}
|
||||
|
||||
public void copyFile2(InputStream in, String destPath) throws IOException {
|
||||
BufferedInputStream bis = new BufferedInputStream(in);
|
||||
BufferedOutputStream bos =
|
||||
new BufferedOutputStream(Files.newOutputStream(Paths.get(destPath),
|
||||
StandardOpenOption.CREATE,
|
||||
StandardOpenOption.TRUNCATE_EXISTING,
|
||||
StandardOpenOption.WRITE));
|
||||
// 打开输入流
|
||||
// FileInputStream fis = new FileInputStream(srcPath);
|
||||
// 打开输出流
|
||||
// FileOutputStream fos = new FileOutputStream(destPath);
|
||||
// 读取和写入信息
|
||||
byte[] bytes = new byte[1024 * 1024];
|
||||
int len;
|
||||
while ((len = bis.read(bytes)) > 0) {
|
||||
bos.write(bytes, 0, len);
|
||||
}
|
||||
// 关闭流 先开后关 后开先关
|
||||
// 先开后关,先开的输入流,再开的输出流,那么应该先关输出流,再关输入流
|
||||
// 先关外层,再关内层。如BufferedInputStream包装了一个FileInputStream,那么先关BufferedInputStream,再关FileInputStream。
|
||||
bos.close(); // 后开先关
|
||||
bis.close(); // 先开后关
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -127,4 +127,7 @@ public class DocTranslationEO implements Serializable {
|
||||
@ApiModelProperty(value = "目标文件id")
|
||||
private java.lang.String targetFileId;
|
||||
|
||||
/**翻译后文件名称*/
|
||||
@TableField(exist = false)
|
||||
private String targetFileName;
|
||||
}
|
||||
|
||||
+16
@@ -20,6 +20,7 @@ import com.jero.modules.docTranslation.service.IDocTranslationEOService;
|
||||
import com.jero.modules.docTranslation.utils.TranslationDocumentUtils;
|
||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import me.zhyd.oauth.utils.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
@@ -47,6 +48,8 @@ public class DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMap
|
||||
|
||||
@Autowired
|
||||
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -155,6 +158,8 @@ public class DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMap
|
||||
*/
|
||||
public void disposeData(List<DocTranslationEO> datas,String cut){
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
String targetFileIds = datas.stream().map(DocTranslationEO::getTargetFileId).distinct().collect(Collectors.joining(","));
|
||||
List<OSSFile> targetFileList = this.iOSSFileService.getFileInfos(targetFileIds);
|
||||
for (DocTranslationEO data : datas) {
|
||||
String textStatus_dictText = "";
|
||||
OnlCgformField fileTypeField = this.onlCgformFieldService.queryById(data.getTextStatus());
|
||||
@@ -166,6 +171,17 @@ public class DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMap
|
||||
}
|
||||
}
|
||||
data.setTextStatus_dictText(textStatus_dictText);
|
||||
|
||||
if(StringUtils.isNotEmpty(data.getTargetFileId())){
|
||||
String targetFileName = targetFileList.stream().filter(targetFile -> {
|
||||
boolean flag = false;
|
||||
if (org.apache.commons.lang3.StringUtils.equals(data.getTargetFileId(), targetFile.getId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||
data.setTargetFileName(targetFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -115,8 +115,9 @@ public class TranslationDocumentUtils {
|
||||
|
||||
//翻译后的文件路径
|
||||
String translateAfterFilePath = uploadpath + "/tempZip/translationTempFile";
|
||||
String translateAfterFileName = sourceOssFile.getFileName().substring(0, sourceOssFile.getFileName().lastIndexOf("."));
|
||||
try {
|
||||
translateAfterFile = createTranslateAfterFile(translateAfterFilePath, translateAfterSb.toString(),sourceOssFile.getFileName());
|
||||
translateAfterFile = createTranslateAfterFile(translateAfterFilePath, translateAfterSb.toString(),translateAfterFileName);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
logger.error("翻译文档-写入文档失败:" + ex.getMessage());
|
||||
@@ -137,7 +138,7 @@ public class TranslationDocumentUtils {
|
||||
if (!newFilePath.exists()) {
|
||||
newFilePath.mkdirs();
|
||||
}
|
||||
translateAfterFilePath = translateAfterFilePath + "/" + fileName;
|
||||
translateAfterFilePath = translateAfterFilePath + "/" + fileName + ".doc";
|
||||
File newFile = new File(translateAfterFilePath);
|
||||
if (!newFile.exists()) {
|
||||
newFile.createNewFile();
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.jero.modules.document.enums;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* 法规状态枚举
|
||||
* @date 2022/1/21 15:22
|
||||
* @auth zhn
|
||||
*/
|
||||
public enum LawsStateEnum {
|
||||
ACTIVE("现行","1"),
|
||||
ABOLISH("废止","2"),
|
||||
THE_UPCOMING("即将实施","3"),
|
||||
DRAFT("草稿","4"),
|
||||
BE_REPLACED("被代替","5");
|
||||
|
||||
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
private LawsStateEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
+19
-10
@@ -3806,17 +3806,26 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//处理列表表头排序
|
||||
if (StringUtils.isNotBlank((String) parameter.get("orderByField"))) {
|
||||
conditionSb.append(" order by " + (String) parameter.get("orderByField"));
|
||||
if ("1".equals((String) parameter.get("orderBy"))) {
|
||||
conditionSb.append(" asc");//正序
|
||||
} else if ("2".equals((String) parameter.get("orderBy"))) {
|
||||
conditionSb.append(" desc");//倒序
|
||||
//法规预警的排序与其他不同单独处理
|
||||
if(StringUtils.isNotBlank(warnTime)){
|
||||
//flag = 0(新车实施日期), flag = 1(在产车实施日期)
|
||||
if("0".equals(flag)){
|
||||
conditionSb.append(" order by xin1_che1_xing2_shi2_shi1_ri4_qi1 asc");
|
||||
}else{
|
||||
conditionSb.append(" order by implement_time asc");
|
||||
}
|
||||
}else{
|
||||
//处理列表表头排序
|
||||
if (StringUtils.isNotBlank((String) parameter.get("orderByField"))) {
|
||||
conditionSb.append(" order by " + (String) parameter.get("orderByField"));
|
||||
if ("1".equals((String) parameter.get("orderBy"))) {
|
||||
conditionSb.append(" asc");//正序
|
||||
} else if ("2".equals((String) parameter.get("orderBy"))) {
|
||||
conditionSb.append(" desc");//倒序
|
||||
}
|
||||
} else {
|
||||
conditionSb.append(" order by create_time desc");
|
||||
}
|
||||
} else {
|
||||
conditionSb.append(" order by create_time desc");
|
||||
}
|
||||
String condition = conditionSb.toString();
|
||||
return condition;
|
||||
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.jero.modules.document.service.impl;
|
||||
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.enums.LawsStateEnum;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @date 2022/9/25 10:03
|
||||
* @auth zhn
|
||||
*/
|
||||
public class TimedTaskLaws implements Job {
|
||||
@Autowired
|
||||
private BussDocumentLibraryEOServiceImpl bussDocumentLibraryEOService;
|
||||
|
||||
/**
|
||||
* 法规状态为即将实施的法规,根据新车型实施日期和在产车实施日期, 到期后自动更新状态为现行
|
||||
* @param jobExecutionContext
|
||||
* @throws JobExecutionException
|
||||
*/
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String currentTime = sdf.format(new Date());
|
||||
//获取所有的法规
|
||||
List<BussDocumentLibraryEO> bussDocumentLibraryEOList = bussDocumentLibraryEOService.list();
|
||||
if(bussDocumentLibraryEOList.size() != 0){
|
||||
for (BussDocumentLibraryEO bussDocumentLibraryEO : bussDocumentLibraryEOList) {
|
||||
String xin1Che1Xing2Shi2Shi1Ri4Qi1Str = "";
|
||||
String implementTimestr = "";
|
||||
|
||||
String state = bussDocumentLibraryEO.getState();//状态
|
||||
//新车型实施日期
|
||||
Date xin1Che1Xing2Shi2Shi1Ri4Qi1 = bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1();
|
||||
//在产车实施日期
|
||||
Date implementTime = bussDocumentLibraryEO.getImplementTime();
|
||||
if(ObjectUtils.isNotEmpty(xin1Che1Xing2Shi2Shi1Ri4Qi1)){
|
||||
xin1Che1Xing2Shi2Shi1Ri4Qi1Str = sdf.format(xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||
}
|
||||
if(ObjectUtils.isNotEmpty(implementTime)){
|
||||
implementTimestr = sdf.format(implementTime);
|
||||
}
|
||||
//法规状态为即将实施的法规,根据新车型实施日期和在产车实施日期, 到期后自动更新状态为现行
|
||||
if(StringUtils.isNotBlank(state) && LawsStateEnum.THE_UPCOMING.getValue().equals(state)
|
||||
&& (currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str) || currentTime.equals(implementTimestr))){
|
||||
BussDocumentLibraryEO bussDocumentLibraryEOTemp = new BussDocumentLibraryEO();
|
||||
bussDocumentLibraryEOTemp.setId(bussDocumentLibraryEO.getId());
|
||||
bussDocumentLibraryEOTemp.setState(LawsStateEnum.ACTIVE.getValue());
|
||||
bussDocumentLibraryEOService.updateById(bussDocumentLibraryEOTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
-7
@@ -13,10 +13,12 @@ import com.jero.modules.extRepo.service.IExtRepoFolderService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -47,7 +49,7 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
||||
@GetMapping(value = "/list")
|
||||
public Result<ERFTreeDataVO> queryList() {
|
||||
ERFTreeDataVO dataVO = new ERFTreeDataVO();
|
||||
dataVO.setManager(extRepoFolderService.isManager());
|
||||
dataVO.setManager(true);
|
||||
dataVO.setList(extRepoFolderService.queryTreeList());
|
||||
return Result.OK(dataVO);
|
||||
}
|
||||
@@ -61,9 +63,11 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
||||
@AutoLog(value = "对外报告文件夹表-添加")
|
||||
@ApiOperation(value = "对外报告文件夹表-添加", notes = "对外报告文件夹表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ExtRepoFolder extRepoFolder) {
|
||||
public Result<?> add(@Validated @RequestBody ExtRepoFolder extRepoFolder, HttpSession session) {
|
||||
Result<ExtRepoFolder> result = new Result();
|
||||
if (extRepoFolderService.haveManageAuth(extRepoFolder.getSupFolder())) {
|
||||
session.setAttribute("haveSuperiorManageAuth", false);
|
||||
extRepoFolderService.haveSuperiorManageAuth(extRepoFolder.getSupFolder(),session);
|
||||
if (ObjectUtils.isNotEmpty(session.getAttribute("haveSuperiorManageAuth"))&&(Boolean) session.getAttribute("haveSuperiorManageAuth")) {
|
||||
if (!extRepoFolder.isAddSub()) {
|
||||
//增加同级文件夹
|
||||
ExtRepoFolder folder = extRepoFolderService.queryById(extRepoFolder.getSupFolder());
|
||||
@@ -94,9 +98,11 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
||||
@AutoLog(value = "对外报告文件夹表-编辑")
|
||||
@ApiOperation(value = "对外报告文件夹表-编辑", notes = "对外报告文件夹表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ExtRepoFolder extRepoFolder) {
|
||||
public Result<?> edit(@Validated @RequestBody ExtRepoFolder extRepoFolder, HttpSession session) {
|
||||
Result<ExtRepoFolder> result = new Result();
|
||||
if (extRepoFolderService.haveManageAuth(extRepoFolder.getId())) {
|
||||
session.setAttribute("haveSuperiorManageAuth", false);
|
||||
extRepoFolderService.haveSuperiorManageAuth(extRepoFolder.getSupFolder(),session);
|
||||
if (ObjectUtils.isNotEmpty(session.getAttribute("haveSuperiorManageAuth"))&&(Boolean) session.getAttribute("haveSuperiorManageAuth")) {
|
||||
extRepoFolderService.editById(extRepoFolder);
|
||||
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||
result.success("编辑成功!");
|
||||
@@ -123,9 +129,11 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
||||
@ApiOperation(value = "对外报告文件夹表-通过id删除", notes = "对外报告文件夹表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id,
|
||||
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||
@RequestParam(name = "cut", defaultValue = "cn") String cut, HttpSession session) {
|
||||
Result<ExtRepoFolder> result = new Result();
|
||||
if (extRepoFolderService.haveManageAuth(id)) {
|
||||
session.setAttribute("haveSuperiorManageAuth", false);
|
||||
extRepoFolderService.haveSuperiorManageAuth(id,session);
|
||||
if (ObjectUtils.isNotEmpty(session.getAttribute("haveSuperiorManageAuth"))&&(Boolean) session.getAttribute("haveSuperiorManageAuth")) {
|
||||
List<ExtRepoFolder> resList = extRepoFolderService.getListBySupFolder(id);
|
||||
if (resList.isEmpty()) {
|
||||
ExtRepoFolder erf = extRepoFolderService.queryById(id);
|
||||
|
||||
+10
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.extRepo.entity.ERFTreeData;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoFolder;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -91,4 +92,13 @@ public interface IExtRepoFolderService extends IService<ExtRepoFolder> {
|
||||
* @return
|
||||
*/
|
||||
List<ExtRepoFolder> getListBySupFolder(String supFolder);
|
||||
|
||||
/**
|
||||
* 判断上级是否有权限
|
||||
* @param supFolder
|
||||
* @param session
|
||||
* @return
|
||||
*/
|
||||
void haveSuperiorManageAuth(String supFolder, HttpSession session);
|
||||
|
||||
}
|
||||
|
||||
+45
-1
@@ -14,10 +14,12 @@ import com.jero.modules.extRepo.service.IExtRepoFolderService;
|
||||
import com.jero.modules.system.entity.SysUserRole;
|
||||
import com.jero.modules.system.service.ISysUserRoleService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -246,7 +248,7 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl<ExtRepoFolderMapper, E
|
||||
date.setAuthManageIds(erf.getAuthManageIds());
|
||||
date.setAuthViewIdsName(erf.getAuthViewIdsName());
|
||||
date.setAuthViewIds(erf.getAuthViewIds());
|
||||
date.setChildren(getSubFolder(erf.getId(), list, childLevel));
|
||||
date.setChildren(subFolderTree(erf.getId(),new ArrayList<ERFTreeData>(),childLevel));
|
||||
date.sortChildren();
|
||||
resList.add(date);
|
||||
} else {
|
||||
@@ -257,6 +259,28 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl<ExtRepoFolderMapper, E
|
||||
return resList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 父文件夹有权限则获取其下全部子文件夹
|
||||
* @param folder
|
||||
* @param level
|
||||
* @return
|
||||
*/
|
||||
private List<ERFTreeData> subFolderTree(String folder,List<ERFTreeData> childTree,int level) {
|
||||
int childLevel = level + 1;
|
||||
List<ExtRepoFolder> listBySupFolder = getListBySupFolder(folder);
|
||||
for (ExtRepoFolder extRepoFolder : listBySupFolder) {
|
||||
ERFTreeData date = new ERFTreeData(extRepoFolder.getFolderName(), extRepoFolder.getId(), childLevel, extRepoFolder.getOrderId());
|
||||
date.setAuthManageIdsName(extRepoFolder.getAuthManageIdsName());
|
||||
date.setAuthManageIds(extRepoFolder.getAuthManageIds());
|
||||
date.setAuthViewIdsName(extRepoFolder.getAuthViewIdsName());
|
||||
date.setAuthViewIds(extRepoFolder.getAuthViewIds());
|
||||
date.setChildren(subFolderTree(extRepoFolder.getId(), new ArrayList<ERFTreeData>(),childLevel));
|
||||
date.sortChildren();
|
||||
childTree.add(date);
|
||||
}
|
||||
return childTree;
|
||||
}
|
||||
|
||||
private List<String> getStringList(String listStr) {
|
||||
List<String> res = new ArrayList<>();
|
||||
if (null != listStr) {
|
||||
@@ -324,4 +348,24 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl<ExtRepoFolderMapper, E
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 判断上级是否有权限
|
||||
* @param supFolder
|
||||
* @param session
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void haveSuperiorManageAuth(String supFolder, HttpSession session) {
|
||||
if (haveManageAuth(supFolder)) {
|
||||
session.setAttribute("haveSuperiorManageAuth", true);
|
||||
} else {
|
||||
ExtRepoFolder extRepoFolder = queryById(supFolder);
|
||||
if (ObjectUtils.isNotEmpty(extRepoFolder)) {
|
||||
haveSuperiorManageAuth(extRepoFolder.getSupFolder(),session);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+10
-1
@@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@@ -17,6 +18,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -54,10 +56,17 @@ public class LawsOpinionAssessmentResultEOController extends JeroController<Laws
|
||||
public Result<?> queryPageList(LawsOpinionAssessmentResultEO lawsOpinionAssessmentResultEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@RequestParam(name="cut") String cut,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsOpinionAssessmentResultEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsOpinionAssessmentResultEO, req.getParameterMap());
|
||||
Page<LawsOpinionAssessmentResultEO> page = new Page<LawsOpinionAssessmentResultEO>(pageNo, pageSize);
|
||||
IPage<LawsOpinionAssessmentResultEO> pageList = lawsOpinionAssessmentResultEOService.page(page, queryWrapper);
|
||||
IPage<LawsOpinionAssessmentResultEO> pageList = this.lawsOpinionAssessmentResultEOService.page(page, queryWrapper);
|
||||
List<LawsOpinionAssessmentResultEO> records = pageList.getRecords();
|
||||
if(CollectionUtils.isEmpty(records)){
|
||||
records = new ArrayList<>();
|
||||
}
|
||||
this.lawsOpinionAssessmentResultEOService.disposeData(records,lawsOpinionAssessmentResultEO,cut);
|
||||
pageList.setRecords(records);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
+8
-2
@@ -127,8 +127,8 @@ public class LawsOpinionGatherEOController extends JeroController<LawsOpinionGat
|
||||
@AutoLog(value = "法规意见收集表-批量删除")
|
||||
@ApiOperation(value="法规意见收集表-批量删除", notes="法规意见收集表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.lawsOpinionGatherEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="cut",required=true) String cut) {
|
||||
this.lawsOpinionGatherEOService.deleteByIds(Arrays.asList(ids.split(",")),cut);
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
@@ -184,4 +184,10 @@ public class LawsOpinionGatherEOController extends JeroController<LawsOpinionGat
|
||||
return this.lawsOpinionGatherEOService.processCall(jsonObject);
|
||||
}
|
||||
|
||||
@AutoLog(value = "法规意见收集表-批量完成任务")
|
||||
@ApiOperation(value="法规意见收集表-批量完成任务", notes="法规意见收集表-批量完成任务")
|
||||
@PostMapping(value = "/batchCompleteTask")
|
||||
public Result<?> batchCompleteTask(@RequestBody JSONObject jsonObject){
|
||||
return this.lawsOpinionGatherEOService.batchCompleteTask(jsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -98,4 +98,9 @@ public class LawsOpinionAssessmentResultEO implements Serializable {
|
||||
@ApiModelProperty(value = "流程实例id")
|
||||
private String actiProcInstId;
|
||||
|
||||
/**条款内容*/
|
||||
@Excel(name = "条款内容", width = 15)
|
||||
@ApiModelProperty(value = "条款内容")
|
||||
private String clauseContent;
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -119,4 +119,7 @@ public class LawsOpinionGatherEO implements Serializable {
|
||||
/**对外意见归档文件数组**/
|
||||
@TableField(exist = false)
|
||||
private List<OSSFile> opinionArchiveFileList;
|
||||
|
||||
@ApiModelProperty(value = "评估人ids,多个之间使用英文逗号分隔")
|
||||
private String evaluatorIds;
|
||||
}
|
||||
|
||||
+3
-2
@@ -34,7 +34,8 @@ public class LawsOpinionGatherJob implements Job {
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.info("法规意见收集流程,定时任务开启 =====================================================");
|
||||
QueryWrapper<LawsOpinionGatherEO> lawsOpinionGatherEOQueryWrapper = new QueryWrapper<>();
|
||||
//TODO 2022-09-29 该功能被手动按钮替代 对应禅道bug编号 59979
|
||||
/*QueryWrapper<LawsOpinionGatherEO> lawsOpinionGatherEOQueryWrapper = new QueryWrapper<>();
|
||||
lawsOpinionGatherEOQueryWrapper.lambda().eq(LawsOpinionGatherEO::getGatherResult, GatherResultEnum.UNDERWAY.getValue());
|
||||
List<LawsOpinionGatherEO> lawsOpinionGatherEOList = this.lawsOpinionGatherEOService.list(lawsOpinionGatherEOQueryWrapper);
|
||||
if (CollectionUtils.isNotEmpty(lawsOpinionGatherEOList)) {
|
||||
@@ -58,7 +59,7 @@ public class LawsOpinionGatherJob implements Job {
|
||||
this.lawsOpinionGatherEOService.updateBatchById(updateLawsOpinionGatherEOList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
log.info("法规意见收集流程,定时任务结束 =====================================================");
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -71,4 +71,10 @@ public interface ILawsOpinionAssessmentResultEOService extends IService<LawsOpin
|
||||
void insertBatch(JSONObject json);
|
||||
|
||||
void exportXls(HttpServletResponse response, HttpServletRequest request, LawsOpinionAssessmentResultEO lawsOpinionAssessmentResultEO, Map<String,Object> params);
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param lawsOpinionAssessmentResultEOList
|
||||
*/
|
||||
void disposeData(List<LawsOpinionAssessmentResultEO> lawsOpinionAssessmentResultEOList,LawsOpinionAssessmentResultEO lawsOpinionAssessmentResultEO,String cut);
|
||||
}
|
||||
|
||||
+3
-1
@@ -44,7 +44,7 @@ public interface ILawsOpinionGatherEOService extends IService<LawsOpinionGatherE
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
void deleteByIds(List<String> ids,String cut);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
@@ -75,4 +75,6 @@ public interface ILawsOpinionGatherEOService extends IService<LawsOpinionGatherE
|
||||
void disposeData(List<LawsOpinionGatherEO> lawsOpinionGatherEOList,String cut);
|
||||
|
||||
void workFlowSendMsg(JSONObject jsonObject);
|
||||
|
||||
Result<?> batchCompleteTask(JSONObject jsonObject);
|
||||
}
|
||||
|
||||
+66
-26
@@ -16,8 +16,11 @@ import com.jero.modules.lawsOpinionGather.entity.LawsOpinionAssessmentResultEO;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
|
||||
import com.jero.modules.lawsOpinionGather.mapper.LawsOpinionAssessmentResultEOMapper;
|
||||
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionAssessmentResultEOService;
|
||||
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.util.PDFUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -57,6 +60,10 @@ public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl<LawsOp
|
||||
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
@Autowired
|
||||
private ILawsOpinionGatherEOService lawsOpinionGatherEOService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -177,18 +184,21 @@ public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl<LawsOp
|
||||
Page<LawsOpinionAssessmentResultEO> page = new Page<LawsOpinionAssessmentResultEO>(pageNo, pageSize);
|
||||
IPage<LawsOpinionAssessmentResultEO> pageList = this.page(page, queryWrapper);
|
||||
exportData = pageList.getRecords();
|
||||
if(CollectionUtils.isEmpty(exportData)){
|
||||
exportData = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
this.disposeData(exportData,cut);
|
||||
this.disposeData(exportData,lawsOpinionAssessmentResultEO,cut);
|
||||
|
||||
String title = "";
|
||||
String fileName = "";
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
title = "相关章节,问题/建议,理由,附件,评估人,提出时间";
|
||||
fileName = "评估结果 " + ".xlsx";
|
||||
title = "相关章节,问题/建议,理由,条款内容,附件,评估人,提出时间";
|
||||
fileName = "评估结果" + ".xls";
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
title = "Related section,IssueOrSuggest,Reason,Accessory,Evaluator,Submit Date";
|
||||
fileName = "Evaluation results " + ".xlsx";
|
||||
title = "Related section,IssueOrSuggest,Reason,Item Content,Accessory,Evaluator,Submit Date";
|
||||
fileName = "Evaluation results" + ".xls";
|
||||
}
|
||||
|
||||
OutputStream os = null;
|
||||
@@ -212,7 +222,7 @@ public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl<LawsOp
|
||||
|
||||
//创建表头
|
||||
String[] titleArr = title.split(",");
|
||||
for (int i=0; i<=5; i++){
|
||||
for (int i=0; i<=6; i++){
|
||||
sheet.setColumnWidth(i,4000);
|
||||
Cell cell = firstRow.createCell(i);
|
||||
cell.setCellStyle(titleCellStyle);
|
||||
@@ -226,10 +236,11 @@ public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl<LawsOp
|
||||
dataRow.createCell(0).setCellValue(exportData.get(dataIndex).getRelatedSection());
|
||||
dataRow.createCell(1).setCellValue(exportData.get(dataIndex).getIssueOrSuggest());
|
||||
dataRow.createCell(2).setCellValue(exportData.get(dataIndex).getReason());
|
||||
dataRow.createCell(3).setCellValue(exportData.get(dataIndex).getAccessoryFileName());
|
||||
dataRow.createCell(4).setCellValue(exportData.get(dataIndex).getCreateBy());
|
||||
dataRow.createCell(3).setCellValue(exportData.get(dataIndex).getClauseContent());
|
||||
dataRow.createCell(4).setCellValue(exportData.get(dataIndex).getAccessoryFileName());
|
||||
dataRow.createCell(5).setCellValue(exportData.get(dataIndex).getCreateBy());
|
||||
String submitTimeStr = disposeDate(exportData.get(dataIndex).getSubmitTime());
|
||||
dataRow.createCell(5).setCellValue(submitTimeStr);
|
||||
dataRow.createCell(6).setCellValue(submitTimeStr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,6 +317,52 @@ public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl<LawsOp
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<LawsOpinionAssessmentResultEO> records,LawsOpinionAssessmentResultEO lawsOpinionAssessmentResultEO,String cut) {
|
||||
if(CollectionUtils.isNotEmpty(records)){
|
||||
for (LawsOpinionAssessmentResultEO data : records) {
|
||||
if(StringUtils.isNotEmpty(data.getAccessoryFile())){
|
||||
List<OSSFile> accessoryFileList = iOSSFileService.getFileInfos(data.getAccessoryFile());
|
||||
String accessoryFileName = accessoryFileList.stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||
data.setAccessoryFileName(accessoryFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LawsOpinionGatherEO lawsOpinionGatherEO = lawsOpinionGatherEOService.getById(lawsOpinionAssessmentResultEO.getLawsOpinionGatherId());
|
||||
List<String> evaluatorIdList = Arrays.asList(lawsOpinionGatherEO.getEvaluatorIds().split(","));
|
||||
List<SysUser> evaluatorUserList = this.sysUserService.querySysUserListByIdList(evaluatorIdList);
|
||||
|
||||
//处理评估人没有填写任何评估结果情况。
|
||||
if(CollectionUtils.isEmpty(records)){
|
||||
if(lawsOpinionGatherEO != null){
|
||||
for (SysUser evaluatorUser : evaluatorUserList) {
|
||||
LawsOpinionAssessmentResultEO lawsOpinionAssessmentResult = new LawsOpinionAssessmentResultEO();
|
||||
lawsOpinionAssessmentResult.setCreateBy(evaluatorUser.getUsername());
|
||||
records.add(lawsOpinionAssessmentResult);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
List<SysUser> evaluatorUsers = evaluatorUserList.stream().filter(evaluatorUser -> {
|
||||
boolean flag = true;
|
||||
for (LawsOpinionAssessmentResultEO record : records) {
|
||||
if(com.jero.modules.system.util.StringUtils.equals(evaluatorUser.getUsername(),record.getCreateBy())){
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if(CollectionUtils.isNotEmpty(evaluatorUsers)){
|
||||
for (SysUser evaluatorUser : evaluatorUsers) {
|
||||
LawsOpinionAssessmentResultEO lawsOpinionAssessmentResult = new LawsOpinionAssessmentResultEO();
|
||||
lawsOpinionAssessmentResult.setCreateBy(evaluatorUser.getUsername());
|
||||
records.add(lawsOpinionAssessmentResult);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void copyFile(InputStream in, String newFile) throws IOException {
|
||||
File file2 = new File(newFile);
|
||||
if (!file2.exists()) {
|
||||
@@ -326,23 +383,6 @@ public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl<LawsOp
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param datas
|
||||
* @param cut
|
||||
*/
|
||||
public void disposeData(List<LawsOpinionAssessmentResultEO> datas,String cut){
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
for (LawsOpinionAssessmentResultEO data : datas) {
|
||||
if(StringUtils.isNotEmpty(data.getAccessoryFile())){
|
||||
List<OSSFile> accessoryFileList = iOSSFileService.getFileInfos(data.getAccessoryFile());
|
||||
String accessoryFileName = accessoryFileList.stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||
data.setAccessoryFileName(accessoryFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String disposeDate(Date date){
|
||||
String result = "";
|
||||
try {
|
||||
|
||||
+56
-5
@@ -28,8 +28,10 @@ import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.modules.jmreport.common.constant.CommonConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -64,6 +66,9 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
|
||||
@Autowired
|
||||
private ILawsOpinionAssessmentResultEOService lawsOpinionAssessmentResultEOService;
|
||||
@Autowired
|
||||
private WorkFlowFeignClient workFlowFeignClient;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -109,12 +114,26 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
public void deleteByIds(List<String> ids,String cut) {
|
||||
QueryWrapper<LawsOpinionGatherEO> lawsOpinionGatherEOQueryWrapper = new QueryWrapper<>();
|
||||
lawsOpinionGatherEOQueryWrapper.lambda().in(LawsOpinionGatherEO::getId, ids);
|
||||
List<LawsOpinionGatherEO> lawsOpinionGatherEOList = this.list(lawsOpinionGatherEOQueryWrapper);
|
||||
|
||||
QueryWrapper deleteWrapper = new QueryWrapper();
|
||||
deleteWrapper.in("laws_opinion_gather_id",ids);
|
||||
this.lawsOpinionAssessmentResultEOService.remove(deleteWrapper);
|
||||
List<String> actiProcInstIdList = lawsOpinionGatherEOList.stream().map(LawsOpinionGatherEO::getActiProcInstId).distinct().collect(Collectors.toList());
|
||||
String prcIds = org.apache.commons.lang.StringUtils.join(actiProcInstIdList,",");
|
||||
Result<String> result = this.workFlowFeignClient.deleteProcessInstanceByPrcIds(prcIds);
|
||||
if(result.getCode().equals(CommonConstant.SC_OK_200)){
|
||||
removeByIds(ids);
|
||||
QueryWrapper deleteWrapper = new QueryWrapper();
|
||||
deleteWrapper.in("laws_opinion_gather_id",ids);
|
||||
this.lawsOpinionAssessmentResultEOService.remove(deleteWrapper);
|
||||
}else {
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
throw new JeroBootException("删除失败,请联系管理员!");
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
throw new JeroBootException("Delete failed, please contact the administrator!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -283,4 +302,36 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
|
||||
SendMessageUtils.sendMessage(msgTitle,msgContentEN,userIdList,lawsOpinionGatherId,sendMessageMap,null,MessageTypeEnum.COLLECTION_OF_LEGISLATIVE_COMMENTS,initiator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> batchCompleteTask(JSONObject jsonObject) {
|
||||
String ids = jsonObject.getString("ids");
|
||||
String cut = jsonObject.getString("cut");
|
||||
if(StringUtils.isEmpty(ids)){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
throw new JeroBootException("至少选择一条数据进行手动结束!");
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
throw new JeroBootException("Select at least one piece of data for manual termination!");
|
||||
}
|
||||
}
|
||||
|
||||
List<String> lawsOpinionGatherIdList = Arrays.asList(ids.split(","));
|
||||
QueryWrapper<LawsOpinionGatherEO> lawsOpinionGatherEOQueryWrapper = new QueryWrapper<>();
|
||||
lawsOpinionGatherEOQueryWrapper.lambda().eq(LawsOpinionGatherEO::getGatherResult, GatherResultEnum.UNDERWAY.getValue());
|
||||
lawsOpinionGatherEOQueryWrapper.lambda().in(LawsOpinionGatherEO::getId, lawsOpinionGatherIdList);
|
||||
List<LawsOpinionGatherEO> lawsOpinionGatherEOList = this.list(lawsOpinionGatherEOQueryWrapper);
|
||||
if (CollectionUtils.isNotEmpty(lawsOpinionGatherEOList)) {
|
||||
List<String> actiProcInstIdList = lawsOpinionGatherEOList.stream().map(LawsOpinionGatherEO::getActiProcInstId).distinct().collect(Collectors.toList());
|
||||
String actiProcInstIds = org.apache.commons.lang.StringUtils.join(actiProcInstIdList,",");
|
||||
//将这些流程实例下的待办任务提交
|
||||
Result<String> result = this.workFlowFeignClient.completeTaskByPids(actiProcInstIds);
|
||||
if(result.getCode().equals(CommonConstant.SC_OK_200)){
|
||||
lawsOpinionGatherEOList.forEach(lawsOpinionGatherEO -> {
|
||||
lawsOpinionGatherEO.setGatherResult(GatherResultEnum.COMPLETED.getValue());
|
||||
});
|
||||
this.updateBatchById(lawsOpinionGatherEOList);
|
||||
}
|
||||
}
|
||||
return new Result<>().success("手动结束成功!");
|
||||
}
|
||||
}
|
||||
|
||||
+11
-4
@@ -130,8 +130,8 @@ public class LawsTechnologyEvaluationEOController extends JeroController<LawsTec
|
||||
@AutoLog(value = "法规技术评估-批量删除")
|
||||
@ApiOperation(value="法规技术评估-批量删除", notes="法规技术评估-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.lawsTechnologyEvaluationEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="cut",required=true) String cut) {
|
||||
this.lawsTechnologyEvaluationEOService.deleteByIds(Arrays.asList(ids.split(",")),cut);
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
@@ -180,8 +180,8 @@ public class LawsTechnologyEvaluationEOController extends JeroController<LawsTec
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集表-流程调用")
|
||||
@ApiOperation(value="法规意见收集表-流程调用", notes="法规意见收集细表-流程调用")
|
||||
@AutoLog(value = "法规技术评估-流程调用")
|
||||
@ApiOperation(value="法规技术评估-流程调用", notes="法规技术评估-流程调用")
|
||||
@PostMapping(value = "/processCall")
|
||||
public Result<?> processCall(@RequestBody JSONObject jsonObject){
|
||||
return this.lawsTechnologyEvaluationEOService.processCall(jsonObject);
|
||||
@@ -218,4 +218,11 @@ public class LawsTechnologyEvaluationEOController extends JeroController<LawsTec
|
||||
List<Map<String, Object>> result = this.lawsTechnologyEvaluationEOService.queryPageDummyById(parameter);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
@AutoLog(value = "法规技术评估-批量完成任务")
|
||||
@ApiOperation(value="法规技术评估-批量完成任务", notes="法规技术评估-批量完成任务")
|
||||
@PostMapping(value = "/batchCompleteTask")
|
||||
public Result<?> batchCompleteTask(@RequestBody JSONObject jsonObject){
|
||||
return this.lawsTechnologyEvaluationEOService.batchCompleteTask(jsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -9,6 +9,7 @@ import com.jero.common.constant.enums.CutEnum;
|
||||
public enum LawsTechnologyEvaluationNodeEnum {
|
||||
|
||||
ENGINEER_INITIATED("fggcsfq","法规工程师发起","Engineer initiated"),
|
||||
ENGINEER_INITIATED_("fqgcsfq","法规工程师发起","Engineer initiated"),
|
||||
APPRAISERS_EVALUATION("pgrqr","评估人评估","Appraiser's evaluation"),
|
||||
SPONSOR_REVIEW("fqrsc","发起人审查","Sponsor review"),
|
||||
;
|
||||
|
||||
+3
-2
@@ -38,7 +38,8 @@ public class LawsTechnologyEvaluationJob implements Job {
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.info("法规技术评估流程,定时任务开启 =====================================================");
|
||||
|
||||
QueryWrapper<LawsTechnologyEvaluationEO> queryWrapper = new QueryWrapper<>();
|
||||
//TODO 2022-09-29 该功能被手动按钮替代 对应禅道bug编号 59979
|
||||
/*QueryWrapper<LawsTechnologyEvaluationEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(LawsTechnologyEvaluationEO::getFlowStatus, GatherResultEnum.UNDERWAY.getValue());
|
||||
List<LawsTechnologyEvaluationEO> lawsTechnologyEvaluationEOList = this.lawsTechnologyEvaluationEOService.list(queryWrapper);
|
||||
|
||||
@@ -73,7 +74,7 @@ public class LawsTechnologyEvaluationJob implements Job {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
log.info("法规技术评估流程,定时任务结束 =====================================================");
|
||||
}
|
||||
|
||||
+3
-1
@@ -50,7 +50,7 @@ public interface ILawsTechnologyEvaluationEOService extends IService<LawsTechnol
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
void deleteByIds(List<String> ids,String cut);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
@@ -90,4 +90,6 @@ public interface ILawsTechnologyEvaluationEOService extends IService<LawsTechnol
|
||||
List<Map<String, Object>> queryPageDummyById(Map<String, Object> parameter);
|
||||
|
||||
void workFlowSendMsg(JSONObject jsonObject);
|
||||
|
||||
Result<?> batchCompleteTask(JSONObject jsonObject);
|
||||
}
|
||||
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.lawsTechnologyEvaluation.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
||||
+68
-18
@@ -11,14 +11,17 @@ import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.FileUtils;
|
||||
import com.jero.common.util.oss.CosBootUtil;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationItemResultEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.enums.ComplianceResultEnum;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationComplianceResultEOMapper;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationComplianceResultEOService;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationFlowDetailEOService;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationResultEOService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.util.PDFUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
@@ -32,10 +35,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.*;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -60,6 +60,10 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi
|
||||
private ILawsTechnologyEvaluationResultEOService evaluationResultEOService;
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
@Autowired
|
||||
private ILawsTechnologyEvaluationFlowDetailEOService lawsTechnologyEvaluationFlowDetailEOService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -136,8 +140,8 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi
|
||||
}
|
||||
List<LawsTechnologyEvaluationComplianceResultEO> complianceResultEOList = this.baseMapper.selectList(queryWrapper);
|
||||
|
||||
this.disposeData(complianceResultEOList,cut,lawsTechnologyEvaluationComplianceResultEO);
|
||||
if(CollectionUtils.isNotEmpty(complianceResultEOList)){
|
||||
this.disposeData(complianceResultEOList,cut);
|
||||
List<String> complianceResultIdList = complianceResultEOList.stream().map(LawsTechnologyEvaluationComplianceResultEO::getId).distinct().collect(Collectors.toList());
|
||||
QueryWrapper<LawsTechnologyEvaluationResultEO> evaluationResultEOQueryWrapper = new QueryWrapper<>();
|
||||
evaluationResultEOQueryWrapper.lambda().in(LawsTechnologyEvaluationResultEO::getComplianceResultId,complianceResultIdList);
|
||||
@@ -174,7 +178,7 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi
|
||||
lawsTechnologyEvaluationComplianceResultEO.setIds(ids);
|
||||
}
|
||||
List<LawsTechnologyEvaluationComplianceResultEO> exportData = this.queryList(lawsTechnologyEvaluationComplianceResultEO, request, cut);
|
||||
this.disposeData(exportData,cut);
|
||||
this.disposeData(exportData,cut,lawsTechnologyEvaluationComplianceResultEO);
|
||||
|
||||
String title = "";
|
||||
String bottomTitle = "";
|
||||
@@ -183,12 +187,12 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi
|
||||
if(org.apache.commons.lang3.StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
title = "相关章节,问题说明,附件";
|
||||
bottomTitle = "符合性结果:";
|
||||
fileName = "评估结果 " + ".xlsx";
|
||||
fileName = "评估结果" + ".xls";
|
||||
sheetName = "反馈结果";
|
||||
}else if(org.apache.commons.lang3.StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
title = "Related section,Problem description,Accessory";
|
||||
bottomTitle = "Compliance results:";
|
||||
fileName = "Evaluation results " + ".xlsx";
|
||||
fileName = "Evaluation results" + ".xls";
|
||||
sheetName = "Feedback result";
|
||||
}
|
||||
|
||||
@@ -224,23 +228,28 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi
|
||||
cell.setCellValue(titleArr[j]);
|
||||
}
|
||||
|
||||
int complianceResultNameRow = 1;
|
||||
//获取这个评估人填写的评估结果
|
||||
List<LawsTechnologyEvaluationResultEO> lawsTechnologyEvaluationResultEOList = exportData.get(i).getLawsTechnologyEvaluationResultEOList();
|
||||
int evaluationResultListSize = lawsTechnologyEvaluationResultEOList.size();
|
||||
if(CollectionUtils.isNotEmpty(lawsTechnologyEvaluationResultEOList)){
|
||||
for (int dataIndex = 0; dataIndex < lawsTechnologyEvaluationResultEOList.size(); dataIndex++) {
|
||||
Row dataRow = sheet.createRow(dataIndex + 1);
|
||||
dataRow.createCell(0).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getRelatedSection());
|
||||
dataRow.createCell(1).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getIssueOrSuggest());
|
||||
dataRow.createCell(2).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getAccessoryFileName());
|
||||
int evaluationResultListSize = lawsTechnologyEvaluationResultEOList.size();
|
||||
if(CollectionUtils.isNotEmpty(lawsTechnologyEvaluationResultEOList)){
|
||||
for (int dataIndex = 0; dataIndex < lawsTechnologyEvaluationResultEOList.size(); dataIndex++) {
|
||||
Row dataRow = sheet.createRow(dataIndex + 1);
|
||||
dataRow.createCell(0).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getRelatedSection());
|
||||
dataRow.createCell(1).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getIssueOrSuggest());
|
||||
dataRow.createCell(2).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getAccessoryFileName());
|
||||
}
|
||||
}
|
||||
complianceResultNameRow += evaluationResultListSize;
|
||||
}
|
||||
|
||||
//把符合性结果设置进excel表格中。
|
||||
Row bottomRow = sheet.createRow(evaluationResultListSize + 1);
|
||||
Row bottomRow = sheet.createRow(complianceResultNameRow);
|
||||
Cell bottomRowFirstCell = bottomRow.createCell(0);
|
||||
bottomRowFirstCell.setCellStyle(titleCellStyle);
|
||||
bottomRowFirstCell.setCellValue(bottomTitle + " " + exportData.get(i).getComplianceResultName());
|
||||
String complianceResultName = org.apache.commons.lang3.StringUtils.isNotEmpty(exportData.get(i).getComplianceResultName()) ? exportData.get(i).getComplianceResultName() : "";
|
||||
bottomRowFirstCell.setCellValue(bottomTitle + " " + complianceResultName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,7 +325,7 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi
|
||||
}
|
||||
}
|
||||
|
||||
public void disposeData(List<LawsTechnologyEvaluationComplianceResultEO> datas,String cut){
|
||||
public void disposeData(List<LawsTechnologyEvaluationComplianceResultEO> datas,String cut,LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO){
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
for (LawsTechnologyEvaluationComplianceResultEO data : datas) {
|
||||
if(!StringUtils.isEmpty(data.getComplianceResult())){
|
||||
@@ -324,6 +333,47 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi
|
||||
}
|
||||
}
|
||||
}
|
||||
//获取当前法规技术评估下面的所有评估人
|
||||
QueryWrapper<LawsTechnologyEvaluationFlowDetailEO> flowDetailQueryWrap = new QueryWrapper<>();
|
||||
flowDetailQueryWrap.lambda().eq(LawsTechnologyEvaluationFlowDetailEO::getLawsTechnologyEvaluationId,lawsTechnologyEvaluationComplianceResultEO.getLawsTechnologyEvaluationId());
|
||||
List<LawsTechnologyEvaluationFlowDetailEO> flowDetailEOList = this.lawsTechnologyEvaluationFlowDetailEOService.list(flowDetailQueryWrap);
|
||||
|
||||
List<SysUser> evaluatorUserList = null;
|
||||
if(CollectionUtils.isNotEmpty(flowDetailEOList)){
|
||||
List<String> evaluatorIdList = flowDetailEOList.stream().map(LawsTechnologyEvaluationFlowDetailEO::getEvaluatorId).distinct().collect(Collectors.toList());
|
||||
evaluatorUserList = this.sysUserService.querySysUserListByIdList(evaluatorIdList);
|
||||
}
|
||||
//处理评估人没有填写任何评估结果的情况
|
||||
if(CollectionUtils.isEmpty(datas)){
|
||||
if (CollectionUtils.isNotEmpty(evaluatorUserList)) {
|
||||
for (SysUser evaluatorUser : evaluatorUserList) {
|
||||
LawsTechnologyEvaluationComplianceResultEO resultEO = new LawsTechnologyEvaluationComplianceResultEO();
|
||||
String uuid = UUID.randomUUID().toString().replace("-", "");
|
||||
resultEO.setId(uuid);
|
||||
resultEO.setCreateBy(evaluatorUser.getUsername());
|
||||
datas.add(resultEO);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
List<SysUser> evaluatorUsers = evaluatorUserList.stream().filter(evaluatorUser -> {
|
||||
boolean flag = true;
|
||||
for (LawsTechnologyEvaluationComplianceResultEO data : datas) {
|
||||
if(org.apache.commons.lang3.StringUtils.equals(evaluatorUser.getUsername(),data.getCreateBy())){
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if(CollectionUtils.isNotEmpty(evaluatorUsers)){
|
||||
for (SysUser evaluatorUser : evaluatorUsers) {
|
||||
LawsTechnologyEvaluationComplianceResultEO resultEO = new LawsTechnologyEvaluationComplianceResultEO();
|
||||
String uuid = UUID.randomUUID().toString().replace("-", "");
|
||||
resultEO.setId(uuid);
|
||||
resultEO.setCreateBy(evaluatorUser.getUsername());
|
||||
datas.add(resultEO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+75
-8
@@ -16,6 +16,7 @@ import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationEOMapper;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.*;
|
||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
||||
@@ -31,12 +32,14 @@ import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.jeecg.modules.jmreport.common.constant.CommonConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -90,6 +93,8 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
private ILawsTechnologyEvaluationItemResultEOService lawsTechnologyEvaluationItemResultEOService;
|
||||
@Autowired
|
||||
private ILawsTechnologyEvaluationComplianceResultEOService lawsTechnologyEvaluationComplianceResultEOService;
|
||||
@Autowired
|
||||
private WorkFlowFeignClient workFlowFeignClient;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -136,18 +141,41 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
public void deleteByIds(List<String> ids,String cut) {
|
||||
QueryWrapper<LawsTechnologyEvaluationEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().in(LawsTechnologyEvaluationEO::getId, ids);
|
||||
List<LawsTechnologyEvaluationEO> lawsTechnologyEvaluationEOList = this.list(queryWrapper);
|
||||
|
||||
QueryWrapper deleteWrapper = new QueryWrapper();
|
||||
deleteWrapper.in("laws_technology_evaluation_id",ids);
|
||||
this.lawsTechnologyEvaluationFlowDetailEOService.remove(deleteWrapper);
|
||||
List<String> lawsTechnologyEvaluationIdList = lawsTechnologyEvaluationEOList.stream().map(LawsTechnologyEvaluationEO::getId).distinct().collect(Collectors.toList());
|
||||
|
||||
this.lawsTechnologyEvaluationItemResultEOService.remove(deleteWrapper);
|
||||
//获取这些法规技术评估数据的下级流程明细数据。
|
||||
QueryWrapper<LawsTechnologyEvaluationFlowDetailEO> flowDetailEOQueryWrapper = new QueryWrapper<>();
|
||||
flowDetailEOQueryWrapper.lambda().in(LawsTechnologyEvaluationFlowDetailEO::getLawsTechnologyEvaluationId,lawsTechnologyEvaluationIdList);
|
||||
List<LawsTechnologyEvaluationFlowDetailEO> lawsTechnologyEvaluationFlowDetailEOList = lawsTechnologyEvaluationFlowDetailEOService.list(flowDetailEOQueryWrapper);
|
||||
|
||||
this.lawsTechnologyEvaluationResultEOService.remove(deleteWrapper);
|
||||
if(CollectionUtils.isNotEmpty(lawsTechnologyEvaluationFlowDetailEOList)){
|
||||
String prcIds = lawsTechnologyEvaluationFlowDetailEOList.stream().map(LawsTechnologyEvaluationFlowDetailEO::getActiProcInstId).distinct().collect(Collectors.joining(","));
|
||||
Result<String> result = this.workFlowFeignClient.deleteProcessInstanceByPrcIds(prcIds);
|
||||
if(result.getCode().equals(CommonConstant.SC_OK_200)){
|
||||
removeByIds(ids);
|
||||
|
||||
this.lawsTechnologyEvaluationComplianceResultEOService.remove(deleteWrapper);
|
||||
QueryWrapper deleteWrapper = new QueryWrapper();
|
||||
deleteWrapper.in("laws_technology_evaluation_id",ids);
|
||||
this.lawsTechnologyEvaluationFlowDetailEOService.remove(deleteWrapper);
|
||||
|
||||
this.lawsTechnologyEvaluationItemResultEOService.remove(deleteWrapper);
|
||||
|
||||
this.lawsTechnologyEvaluationResultEOService.remove(deleteWrapper);
|
||||
|
||||
this.lawsTechnologyEvaluationComplianceResultEOService.remove(deleteWrapper);
|
||||
}else {
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
throw new JeroBootException("删除失败,请联系管理员!");
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
throw new JeroBootException("Delete failed, please contact the administrator!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -629,6 +657,45 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
SendMessageUtils.sendMessage(msgTitle,msgContentEN,userIdList,lawsTechnologyEvaluationId,sendMessageMap,null, MessageTypeEnum.REGULATORY_AND_TECHNICAL_ASSESSMENT,initiator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> batchCompleteTask(JSONObject jsonObject) {
|
||||
String ids = jsonObject.getString("ids");
|
||||
String cut = jsonObject.getString("cut");
|
||||
if(StringUtils.isEmpty(ids)){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
throw new JeroBootException("至少选择一条数据进行手动结束!");
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
throw new JeroBootException("Select at least one piece of data for manual termination!");
|
||||
}
|
||||
}
|
||||
|
||||
QueryWrapper<LawsTechnologyEvaluationEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(LawsTechnologyEvaluationEO::getFlowStatus, GatherResultEnum.UNDERWAY.getValue());
|
||||
queryWrapper.lambda().in(LawsTechnologyEvaluationEO::getId, Arrays.asList(ids.split(",")));
|
||||
List<LawsTechnologyEvaluationEO> lawsTechnologyEvaluationEOList = this.list(queryWrapper);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(lawsTechnologyEvaluationEOList)) {
|
||||
List<String> lawsTechnologyEvaluationIdList = lawsTechnologyEvaluationEOList.stream().map(LawsTechnologyEvaluationEO::getId).distinct().collect(Collectors.toList());
|
||||
|
||||
//获取这些法规技术评估数据的下级流程明细数据。
|
||||
QueryWrapper<LawsTechnologyEvaluationFlowDetailEO> flowDetailEOQueryWrapper = new QueryWrapper<>();
|
||||
flowDetailEOQueryWrapper.lambda().in(LawsTechnologyEvaluationFlowDetailEO::getLawsTechnologyEvaluationId,lawsTechnologyEvaluationIdList);
|
||||
List<LawsTechnologyEvaluationFlowDetailEO> lawsTechnologyEvaluationFlowDetailEOList = lawsTechnologyEvaluationFlowDetailEOService.list(flowDetailEOQueryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(lawsTechnologyEvaluationFlowDetailEOList)){
|
||||
String actiProcInstIds = lawsTechnologyEvaluationFlowDetailEOList.stream().map(LawsTechnologyEvaluationFlowDetailEO::getActiProcInstId).distinct().collect(Collectors.joining(","));
|
||||
Result<String> result = this.workFlowFeignClient.completeLawsTechnologyEvaluationTaskByPids(actiProcInstIds);
|
||||
if(result.getCode().equals(CommonConstant.SC_OK_200)){
|
||||
lawsTechnologyEvaluationEOList.forEach(lawsTechnologyEvaluationEO -> {
|
||||
lawsTechnologyEvaluationEO.setFlowStatus(GatherResultEnum.COMPLETED.getValue());
|
||||
});
|
||||
this.updateBatchById(lawsTechnologyEvaluationEOList);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Result<>().success("手动结束成功!");
|
||||
}
|
||||
|
||||
private String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String technologyTerritory : technologyTerritoryList) {
|
||||
|
||||
+2
-2
@@ -267,10 +267,10 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl
|
||||
String fileName = "";
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
title = "条款号,条款名称,条款内容,评估人,评估方式,技术文件名称,章节,符合性结果,意见,附件,反馈时间";
|
||||
fileName = "条款评估结果 " + ".xlsx";
|
||||
fileName = "条款评估结果" + ".xls";
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
title = "Item No.,Item Name,Item Content,Assessor,Evaluation method,Name of technical document,Chapter,Compliance Results,Opinion,Enclosure,Feedback Time";
|
||||
fileName = "Item Evaluation results " + ".xlsx";
|
||||
fileName = "Item Evaluation results" + ".xls";
|
||||
}
|
||||
|
||||
OutputStream os = null;
|
||||
|
||||
+4
@@ -99,4 +99,8 @@ public class CountryCardManageReleaseDetailEO implements Serializable {
|
||||
/**Country Card模板维护-字典项实体*/
|
||||
@TableField(exist = false)
|
||||
private List<CountryCardTempItemEO> countryCardTempItemEOList;
|
||||
|
||||
@ApiModelProperty(value = "内容附件名称")
|
||||
@TableField(exist = false)
|
||||
private String contentFileName;
|
||||
}
|
||||
|
||||
+13
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
@@ -182,4 +183,16 @@ public class ProblemKnowledgeBaseEO implements Serializable {
|
||||
/**模糊搜索全部输入字段条件*/
|
||||
@TableField(exist = false)
|
||||
private String searchStr;
|
||||
|
||||
/**评论总数量*/
|
||||
@TableField(exist = false)
|
||||
private long commentCount;
|
||||
|
||||
/**问题分类展示名称数组*/
|
||||
@TableField(exist = false)
|
||||
private List<String> problemTypeNameList;
|
||||
|
||||
/**附件展示数组*/
|
||||
@TableField(exist = false)
|
||||
private List<OSSFile> accessoryFileNameList;
|
||||
}
|
||||
|
||||
+13
@@ -2,6 +2,8 @@ package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempItemEO;
|
||||
@@ -38,6 +40,8 @@ public class CountryCardManageReleaseDetailEOServiceImpl extends ServiceImpl<Cou
|
||||
private ICountryCardTempEOService countryCardTempEOService;
|
||||
@Autowired
|
||||
private ICountryCardTempItemEOService countryCardTempItemEOService;
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -162,6 +166,15 @@ public class CountryCardManageReleaseDetailEOServiceImpl extends ServiceImpl<Cou
|
||||
data.setContentDropDownValue(contentDropDownValue);
|
||||
}
|
||||
}
|
||||
|
||||
//如果该条数据的标签类型是文件
|
||||
if(CollectionUtils.isNotEmpty(countryCardTempItemEOList) && StringUtils.equals(data.getLableType(), LableTypeEnum.FILE.getValue())){
|
||||
//文件的id
|
||||
String fileIds = data.getContent();
|
||||
List<OSSFile> fileInfos = this.iOSSFileService.getFileInfos(fileIds);
|
||||
String contentFileName = fileInfos.stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||
data.setContentFileName(contentFileName);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
+53
-7
@@ -40,6 +40,8 @@ import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jsoup.Jsoup;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -117,10 +119,11 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
//如果该条问题知识库的展示权限为私密,则创建权限表数据
|
||||
if(StringUtils.equals(problemKnowledgeBaseEO.getShowPermissions(), ShowPermissionsEnum.PRIVACY.getValue())){
|
||||
this.batchInsertProblemKnowledgeBaseUserEO(problemKnowledgeBaseEO);
|
||||
}else {
|
||||
}
|
||||
/*else {
|
||||
//如果展示权限是公开,则把该数据插入到搜索中心中。
|
||||
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||
}
|
||||
}*/
|
||||
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||
}
|
||||
|
||||
@@ -300,8 +303,12 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
}*/
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){
|
||||
//处理内容,将富文本标签去掉,搜索中心的时候不要富文本标签样式
|
||||
String content = problemKnowledgeBaseEO.getContent();
|
||||
Document document = Jsoup.parse(content);
|
||||
content = document.text();
|
||||
sbCn.append("</br>");
|
||||
sbCn.append("正文" + ":" + problemKnowledgeBaseEO.getContent() + " ");
|
||||
sbCn.append("正文" + ":" + content + " ");
|
||||
}else {
|
||||
sbCn.append("</br>");
|
||||
sbCn.append("正文" + ":" + "-- ");
|
||||
@@ -363,8 +370,12 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
}*/
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){
|
||||
//处理内容,将富文本标签去掉,搜索中心的时候不要富文本标签样式
|
||||
String content = problemKnowledgeBaseEO.getContent();
|
||||
Document document = Jsoup.parse(content);
|
||||
content = document.text();
|
||||
sbEn.append("</br>");
|
||||
sbEn.append("Text" + ":" + problemKnowledgeBaseEO.getContent() + " ");
|
||||
sbEn.append("Text" + ":" + content + " ");
|
||||
}else {
|
||||
sbEn.append("</br>");
|
||||
sbEn.append("Text" + ":" + "-- ");
|
||||
@@ -544,8 +555,10 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
StringBuffer problemTypeSb = new StringBuffer();
|
||||
StringBuffer accessoryFileSb = new StringBuffer();
|
||||
for (ProblemKnowledgeBaseEO data : datas) {
|
||||
problemTypeSb.append(data.getProblemType() + ",");
|
||||
accessoryFileSb.append(data.getAccessoryFile() + ",");
|
||||
}
|
||||
|
||||
List<String> probleKnowledgeBaseIdList = datas.stream().map(ProblemKnowledgeBaseEO::getId).distinct().collect(Collectors.toList());
|
||||
@@ -570,6 +583,14 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
List<ProblemKnowledgeBaseUserEO> permissionUserEOList = this.problemKnowledgeBaseUserEOService.list(permissionUserQueryWrapper);
|
||||
this.problemKnowledgeBaseUserEOService.disposeData(permissionUserEOList,cut);
|
||||
|
||||
//查询出数据的所有的评论数量
|
||||
QueryWrapper<ProblemKnowledgeBaseCommentEO> commentQueryWrapper = new QueryWrapper<>();
|
||||
commentQueryWrapper.lambda().in(ProblemKnowledgeBaseCommentEO::getProblemKnowledgeBaseId,probleKnowledgeBaseIdList);
|
||||
List<ProblemKnowledgeBaseCommentEO> commentEOList = this.problemKnowledgeBaseCommentEOService.list(commentQueryWrapper);
|
||||
|
||||
//根据文件的ids查询文件信息
|
||||
List<OSSFile> accessoryFileList = this.iOSSFileService.getFileInfos(accessoryFileSb.toString());
|
||||
|
||||
List<ProblemKnowledgeBaseClassifyEO> problemKnowledgeBaseClassifyEOList = new ArrayList<>();
|
||||
if(StringUtils.isNotEmpty(problemTypeSb.toString())){
|
||||
List<String> problemTypeList = Arrays.asList(problemTypeSb.toString().substring(0, problemTypeSb.toString().length() - 1).split(",")).stream().distinct().collect(Collectors.toList());
|
||||
@@ -653,10 +674,19 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
data.setPermissionUserList(permissionUserEOS);
|
||||
}
|
||||
|
||||
long commentCount = commentEOList.stream().filter(commentEO -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(data.getId(), commentEO.getProblemKnowledgeBaseId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).count();
|
||||
data.setCommentCount(commentCount);
|
||||
|
||||
String problemType = data.getProblemType();
|
||||
if(StringUtils.isNotEmpty(problemType)){
|
||||
String[] problemTypeArr = problemType.split(",");
|
||||
String problemTypeName = finalProblemKnowledgeBaseClassifyEOList.stream().filter(problemKnowledgeBaseClassifyEO -> {
|
||||
List<String> problemTypeNameList = finalProblemKnowledgeBaseClassifyEOList.stream().filter(problemKnowledgeBaseClassifyEO -> {
|
||||
boolean flag = false;
|
||||
for (String type : problemTypeArr) {
|
||||
if (StringUtils.equals(type, problemKnowledgeBaseClassifyEO.getId())) {
|
||||
@@ -664,9 +694,10 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).map(ProblemKnowledgeBaseClassifyEO::getProblemLabel).collect(Collectors.joining(","));
|
||||
}).map(ProblemKnowledgeBaseClassifyEO::getProblemLabel).collect(Collectors.toList());
|
||||
|
||||
data.setProblemTypeName(problemTypeName);
|
||||
data.setProblemTypeName(problemTypeNameList.stream().collect(Collectors.joining(",")));
|
||||
data.setProblemTypeNameList(problemTypeNameList);
|
||||
}
|
||||
|
||||
String targetMarket = data.getTargetMarket();
|
||||
@@ -697,6 +728,21 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
|
||||
data.setTargetMarket_dicText(targetMarket_dicText);
|
||||
}
|
||||
String accessoryFile = data.getAccessoryFile();
|
||||
if(StringUtils.isNotEmpty(accessoryFile)){
|
||||
String[] accessoryFileArr = accessoryFile.split(",");
|
||||
List<OSSFile> accessoryFiles = accessoryFileList.stream().filter(file -> {
|
||||
boolean flag = false;
|
||||
for (String accessory : accessoryFileArr) {
|
||||
if (StringUtils.equals(file.getId(), accessory)) {
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
data.setAccessoryFileNameList(accessoryFiles);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -109,5 +109,4 @@ public class ProjectLibraryBase implements Serializable {
|
||||
/**目标市场展示名称*/
|
||||
@TableField(exist = false)
|
||||
private java.lang.String targetMarketName;
|
||||
|
||||
}
|
||||
|
||||
+8
-1
@@ -35,6 +35,7 @@
|
||||
pli.title as "title",
|
||||
pli.project_library_id as "projectLibraryId",
|
||||
pni.project_name as "projectName",
|
||||
pni.id as "projectNameId",
|
||||
pyni.year_name as "yearName",
|
||||
pti.design_status as "designStatus",
|
||||
pti.design_flow_task_status as "designFlowTaskStatus",
|
||||
@@ -45,7 +46,13 @@
|
||||
pti.verify_status as "verifyStatus",
|
||||
pti.verify_flow_task_status as "verifyFlowTaskStatus",
|
||||
pti.verify_p_id as "verifyPId",
|
||||
pli.duty_territory as "dutyTerritory"
|
||||
pli.duty_territory as "dutyTerritory",
|
||||
pti.design_person_charge_feedback as "designPersonChargeFeedback",
|
||||
pti.prehomo_person_charge_feedback as "prehomoPersonChargeFeedback",
|
||||
pti.verify_person_charge_feedback as "verifyPersonChargeFeedback",
|
||||
plb.studio_engineer as "studioEngineer",
|
||||
plb.target_market as "targetMarket",
|
||||
pti.id as "projectTaskInventoryId"
|
||||
FROM
|
||||
project_laws_inventory pli
|
||||
LEFT JOIN project_task_inventory pti ON ( pli.id = pti.project_laws_inventory_id )
|
||||
|
||||
+111
-1
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryRuleEnum;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.document.vo.QueryConditionVO;
|
||||
@@ -14,9 +15,12 @@ import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
|
||||
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationEOService;
|
||||
import com.jero.modules.project.entity.ProjectTaskInventoryDetailEO;
|
||||
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
||||
import com.jero.modules.project.enums.ReviewResultEnum;
|
||||
import com.jero.modules.project.enums.TaskStatusEnum;
|
||||
import com.jero.modules.project.mapper.LawsComplianceBoardMapper;
|
||||
import com.jero.modules.project.mapper.ProjectTaskInventoryDetailEOMapper;
|
||||
import com.jero.modules.project.service.ILawsComplianceBoardService;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
@@ -24,12 +28,14 @@ import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -60,6 +66,8 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
private SysCategoryServiceImpl sysCategoryService;
|
||||
@Autowired
|
||||
private ISysDictItemService sysDictItemService;
|
||||
@Autowired
|
||||
private ProjectTaskInventoryDetailEOMapper projectTaskInventoryDetailEOMapper;
|
||||
|
||||
@Override
|
||||
public IPage queryPageList(Map<String, Object> params) {
|
||||
@@ -138,7 +146,15 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
String id = (String) params.get("id");
|
||||
String cut = (String) params.get("cut");
|
||||
List<Map<String,Object>> complianceResultList = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
|
||||
this.disposeComplianceResult(complianceResultList,cut);
|
||||
if(CollectionUtils.isNotEmpty(complianceResultList)){
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<String> projectLawsInventoryIdList = complianceResultList.stream().map(map-> (String) map.get("id")).collect(Collectors.toList());
|
||||
QueryWrapper<ProjectTaskInventoryDetailEO> taskDetailQueryWrapper = new QueryWrapper<>();
|
||||
taskDetailQueryWrapper.lambda().in(ProjectTaskInventoryDetailEO::getProjectTaskInventoryId,projectLawsInventoryIdList);
|
||||
List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOList = this.projectTaskInventoryDetailEOMapper.selectList(taskDetailQueryWrapper);
|
||||
this.createTaskInventoryEOList(complianceResultList,projectTaskInventoryDetailEOList,currentUser);
|
||||
this.disposeComplianceResult(complianceResultList,cut);
|
||||
}
|
||||
result.put("complianceResultList",complianceResultList);
|
||||
|
||||
//查询当前数据是否有法规意见收集流程数据
|
||||
@@ -157,6 +173,100 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建任务清单列表数据
|
||||
* @param complianceResultList
|
||||
* @param projectTaskInventoryDetailEOList
|
||||
* @param currentUser
|
||||
*/
|
||||
private void createTaskInventoryEOList(List<Map<String, Object>> complianceResultList, List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOList, LoginUser currentUser) {
|
||||
if(CollectionUtils.isNotEmpty(complianceResultList) && CollectionUtils.isNotEmpty(projectTaskInventoryDetailEOList)){
|
||||
for (Map<String, Object> complianceResult : complianceResultList) {
|
||||
String designPid = "";
|
||||
String designTaskId = "";
|
||||
String designTaskStatus = "";
|
||||
String designTaskDefinitionKey = "";
|
||||
String designTaskDetailId = "";
|
||||
|
||||
String prehomoPid = "";
|
||||
String prehomoTaskId = "";
|
||||
String prehomoTaskStatus = "";
|
||||
String prehomoTaskDefinitionKey = "";
|
||||
String prehomoTaskDetailId = "";
|
||||
|
||||
String verifyPid = "";
|
||||
String verifyTaskId = "";
|
||||
String verifyTaskStatus = "";
|
||||
String verifyTaskDefinitionKey = "";
|
||||
String verifyTaskDetailId = "";
|
||||
|
||||
for (ProjectTaskInventoryDetailEO projectTaskInventoryDetail : projectTaskInventoryDetailEOList) {
|
||||
if(StringUtils.equals(complianceResult.get("id").toString(),projectTaskInventoryDetail.getProjectTaskInventoryId())){
|
||||
/**
|
||||
* 查询数据权限,所有用户都是,自己的待办,可以跳转到处理任务详情页进行处理。
|
||||
* 不是自己的待办,只能跳转到处理任务的详情页。
|
||||
*/
|
||||
if(StringUtils.equals(projectTaskInventoryDetail.getFlowType(), FlowTypeEnum.SJFHXSHLC.getValue())){
|
||||
designPid = projectTaskInventoryDetail.getActiProcInstId();
|
||||
designTaskId = projectTaskInventoryDetail.getTaskId();
|
||||
designTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
||||
designTaskDetailId = projectTaskInventoryDetail.getId();
|
||||
if(StringUtils.equals(currentUser.getId(),projectTaskInventoryDetail.getUserId())){
|
||||
designTaskStatus = projectTaskInventoryDetail.getStatus();
|
||||
}else {
|
||||
designTaskStatus = TaskStatusEnum.SHOW_FLAG.getValue();
|
||||
}
|
||||
}
|
||||
if(StringUtils.equals(projectTaskInventoryDetail.getFlowType(),FlowTypeEnum.PREHOMOQRLC.getValue())){
|
||||
prehomoPid = projectTaskInventoryDetail.getActiProcInstId();
|
||||
prehomoTaskId = projectTaskInventoryDetail.getTaskId();
|
||||
prehomoTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
||||
prehomoTaskDetailId = projectTaskInventoryDetail.getId();
|
||||
if(StringUtils.equals(currentUser.getId(),projectTaskInventoryDetail.getUserId())){
|
||||
prehomoTaskStatus = projectTaskInventoryDetail.getStatus();
|
||||
}else {
|
||||
prehomoTaskStatus = TaskStatusEnum.SHOW_FLAG.getValue();
|
||||
}
|
||||
}
|
||||
if(StringUtils.equals(projectTaskInventoryDetail.getFlowType(),FlowTypeEnum.YZFHXSCLC.getValue())){
|
||||
verifyPid = projectTaskInventoryDetail.getActiProcInstId();
|
||||
verifyTaskId = projectTaskInventoryDetail.getTaskId();
|
||||
verifyTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
||||
verifyTaskDetailId = projectTaskInventoryDetail.getId();
|
||||
if(StringUtils.equals(currentUser.getId(),projectTaskInventoryDetail.getUserId())){
|
||||
verifyTaskStatus = projectTaskInventoryDetail.getStatus();
|
||||
}else {
|
||||
verifyTaskStatus = TaskStatusEnum.SHOW_FLAG.getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//设计符合性流程数据
|
||||
complianceResult.put("designPid",designPid);
|
||||
complianceResult.put("designTaskId",designTaskId);
|
||||
complianceResult.put("designTaskStatus",designTaskStatus);
|
||||
complianceResult.put("designTaskDefinitionKey",designTaskDefinitionKey);
|
||||
complianceResult.put("designTaskDetailId",designTaskDetailId);
|
||||
|
||||
//prehomo确认流程数据
|
||||
complianceResult.put("prehomoPid",prehomoPid);
|
||||
complianceResult.put("prehomoTaskId",prehomoTaskId);
|
||||
complianceResult.put("prehomoTaskStatus",prehomoTaskStatus);
|
||||
complianceResult.put("prehomoTaskDefinitionKey",prehomoTaskDefinitionKey);
|
||||
complianceResult.put("prehomoTaskDetailId",prehomoTaskDetailId);
|
||||
|
||||
//验证符合性流程数据
|
||||
complianceResult.put("verifyPid",verifyPid);
|
||||
complianceResult.put("verifyTaskId",verifyTaskId);
|
||||
complianceResult.put("verifyTaskStatus",verifyTaskStatus);
|
||||
complianceResult.put("verifyTaskDefinitionKey",verifyTaskDefinitionKey);
|
||||
complianceResult.put("verifyTaskDetailId",verifyTaskDetailId);
|
||||
|
||||
complianceResult.put("projectLawsInventoryId",complianceResult.get("id"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void disposeComplianceResult(List<Map<String,Object>> complianceResultList,String cut){
|
||||
if(CollectionUtils.isNotEmpty(complianceResultList)){
|
||||
List<SysDictItem> dutyTerritoryDictItemList = sysDictItemService.selectItemsByDictCode("duty_territory");
|
||||
|
||||
+3
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import cn.hutool.core.lang.func.Func1;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -410,6 +411,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(disposeTargetMarketFlag){
|
||||
if(StringUtils.isNotEmpty(projectLibraryBase.getTargetMarket())){
|
||||
String targetMarketName = "";
|
||||
@@ -438,6 +440,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
projectLibraryBase.setTargetMarketName(targetMarketName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-1
@@ -71,10 +71,19 @@ public class LawsMonthlyReportWriteEO implements Serializable {
|
||||
@ApiModelProperty(value = "章节目录")
|
||||
private java.lang.String memoriesChapter;
|
||||
|
||||
//章节目录名称
|
||||
//章节目录名称
|
||||
@TableField(exist = false)
|
||||
private java.lang.String memoriesChapterName;
|
||||
|
||||
/**章节目录一级标题*/
|
||||
@ApiModelProperty(value = "章节目录一级标题")
|
||||
private java.lang.String memoriesChapterOne;
|
||||
|
||||
/**章节目录一级标题中文名称*/
|
||||
@ApiModelProperty(value = "章节目录一级标题中文名称")
|
||||
@TableField(exist = false)
|
||||
private java.lang.String memoriesChapterOneName;
|
||||
|
||||
/**内容模板*/
|
||||
@Excel(name = "内容模板", width = 15)
|
||||
@ApiModelProperty(value = "内容模板")
|
||||
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package com.jero.modules.report.enums;
|
||||
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @date 2022/1/21 15:22
|
||||
* @auth zhn
|
||||
*/
|
||||
public enum ScopeEnum {
|
||||
M("M","M","1"),
|
||||
N("N","N","2"),
|
||||
COMPANY("企业","","3"),
|
||||
WHOLE_CAR("整车","","4"),
|
||||
SYSTEM_PARTS("系统/零部件","","5"),
|
||||
NEW_CAR("新车型","","6"),
|
||||
PRODUCTION_CAR("在产车型","","7");
|
||||
|
||||
|
||||
|
||||
String nameCn;
|
||||
String nameEn;
|
||||
String value;
|
||||
|
||||
private ScopeEnum(String nameCn,String nameEn, String value) {
|
||||
this.nameCn = nameCn;
|
||||
this.nameEn = nameEn;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getNameCn() {
|
||||
return nameCn;
|
||||
}
|
||||
|
||||
public void setNameCn(String nameCn) {
|
||||
this.nameCn = nameCn;
|
||||
}
|
||||
|
||||
public String getNameEn() {
|
||||
return nameEn;
|
||||
}
|
||||
|
||||
public void setNameEn(String nameEn) {
|
||||
this.nameEn = nameEn;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.jero.modules.report.enums;
|
||||
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @date 2022/1/21 15:22
|
||||
* @auth zhn
|
||||
*/
|
||||
public enum StateEnum {
|
||||
DRAFT("草稿","1"),
|
||||
PUBLICITY("公示稿","2"),
|
||||
ISSUE("发布稿","3");
|
||||
|
||||
|
||||
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
private StateEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.jero.modules.report.enums;
|
||||
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @date 2022/1/21 15:22
|
||||
* @auth zhn
|
||||
*/
|
||||
public enum UsageEnum {
|
||||
FORCE("强制","1"),
|
||||
RECOMMEND("推荐","2"),
|
||||
INSTALLATION_REQUIREMENTS("安装需符合","3");
|
||||
|
||||
|
||||
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
private UsageEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
+77
-32
@@ -38,6 +38,7 @@ import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.HeaderFooter;
|
||||
import org.apache.poi.xwpf.usermodel.BreakType;
|
||||
import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
|
||||
import org.apache.poi.xwpf.usermodel.TOC;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
@@ -102,6 +103,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
*/
|
||||
@Override
|
||||
public void add(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO) {
|
||||
// lawsMonthlyReportWriteEO.setMemoriesChapterOne("2");
|
||||
Date now = new Date();
|
||||
lawsMonthlyReportWriteEO.setCreateTime(now);
|
||||
lawsMonthlyReportWriteEO.setUpdateTime(now);
|
||||
@@ -291,7 +293,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsMonthlyReportWriteEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsMonthlyReportWriteEOTemp, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
queryWrapper.orderByDesc("memories_chapter_one","memories_chapter","create_time");
|
||||
//管理员查看全部数据,其余人只能查看自己的数据
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<String> rolesList = sysBaseApi.getRolesByUsername(currentUser.getUsername());
|
||||
@@ -343,7 +345,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
|
||||
for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : pageInfo.getRecords()) {
|
||||
//处理法规联系人
|
||||
lawsContact(userList, lawsMonthlyReportWriteEO);
|
||||
lawsContact(userList, lawsMonthlyReportWriteEO,lawsMonthlyReportWriteEOTemp.getCut());
|
||||
//处理章节目录
|
||||
if(StringUtils.isNotBlank(lawsMonthlyReportWriteEO.getMemoriesChapter())){
|
||||
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS = lawsMonthlyReportTitleTemplateEOList.stream()
|
||||
@@ -354,6 +356,16 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
lawsMonthlyReportWriteEO.setMemoriesChapterName(lawsMonthlyReportTitleTemplateEOS.get(0).getTitleEn());
|
||||
}
|
||||
}
|
||||
//处理章节目录对应的一级目录
|
||||
if(StringUtils.isNotBlank(lawsMonthlyReportWriteEO.getMemoriesChapterOne())){
|
||||
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS = lawsMonthlyReportTitleTemplateEOList.stream()
|
||||
.filter(e -> lawsMonthlyReportWriteEO.getMemoriesChapterOne().equals(e.getId())).collect(Collectors.toList());
|
||||
if(CutEnum.CN.getValue().equals(lawsMonthlyReportWriteEOTemp.getCut()) && lawsMonthlyReportTitleTemplateEOS.size() != 0){
|
||||
lawsMonthlyReportWriteEO.setMemoriesChapterOneName(lawsMonthlyReportTitleTemplateEOS.get(0).getTitleCn());
|
||||
}else if(CutEnum.EN.getValue().equals(lawsMonthlyReportWriteEOTemp.getCut()) && lawsMonthlyReportTitleTemplateEOS.size() != 0){
|
||||
lawsMonthlyReportWriteEO.setMemoriesChapterOneName(lawsMonthlyReportTitleTemplateEOS.get(0).getTitleEn());
|
||||
}
|
||||
}
|
||||
|
||||
if(ContentTemplateEnum.NEW_REQUEST_LIST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
|
||||
//新征求意见清单模板
|
||||
@@ -389,7 +401,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
private void lawsContact(List<LoginUser> userList, LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO) {
|
||||
private void lawsContact(List<LoginUser> userList, LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO,String cut) {
|
||||
String lawsContact = lawsMonthlyReportWriteEO.getLawsContact();
|
||||
if(StringUtils.isNotBlank(lawsContact)){
|
||||
List<LoginUser> collect = userList.stream().filter(e -> lawsContact.contains(e.getId())).collect(Collectors.toList());
|
||||
@@ -397,7 +409,11 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
for (String s : lawsContact.split(",")) {
|
||||
List<LoginUser> loginUserList = collect.stream().filter(e -> e.getId().equals(s)).collect(Collectors.toList());
|
||||
if(loginUserList.size() != 0){
|
||||
sb.append(loginUserList.get(0).getUsername()+",");
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
sb.append(loginUserList.get(0).getRealname()+",");
|
||||
}else{
|
||||
sb.append(loginUserList.get(0).getUsername()+",");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(sb)){
|
||||
@@ -632,9 +648,9 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
XWPFDocument documentContentCn = new XWPFDocument();
|
||||
FileOutputStream outContentCn = new FileOutputStream(wordFileContentCn);
|
||||
//封面
|
||||
cover(lawsMonthlyReportWriteEOS, titleCN, documentContentCn);
|
||||
//目录
|
||||
catalogue(lawsMonthlyReportWriteEOS, lawsMonthlyReportTitleTemplateEOS, reportTitleOneList, "目录", documentContentCn,CutEnum.CN.getValue());
|
||||
coverCn(lawsMonthlyReportWriteEOS, titleCN, documentContentCn);
|
||||
// //目录
|
||||
// catalogue(lawsMonthlyReportWriteEOS, lawsMonthlyReportTitleTemplateEOS, reportTitleOneList, "目录", documentContentCn,CutEnum.CN.getValue());
|
||||
wordContent(lawsMonthlyReportWriteEOS, lawsMonthlyReportTitleTemplateEOS, reportTitleOneList, titleCN,
|
||||
documentContentCn,CutEnum.CN.getValue(),loginUserList);
|
||||
// documentContentCn.createTOC();
|
||||
@@ -646,9 +662,9 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
XWPFDocument documentContentEn = new XWPFDocument();
|
||||
FileOutputStream outContentEn = new FileOutputStream(wordFileContentEn);
|
||||
//封面
|
||||
cover(lawsMonthlyReportWriteEOS, titleEN, documentContentEn);
|
||||
//目录
|
||||
catalogue(lawsMonthlyReportWriteEOS, lawsMonthlyReportTitleTemplateEOS, reportTitleOneList, "catalogue", documentContentEn,CutEnum.EN.getValue());
|
||||
coverEn(lawsMonthlyReportWriteEOS, titleEN, documentContentEn);
|
||||
// //目录
|
||||
// catalogue(lawsMonthlyReportWriteEOS, lawsMonthlyReportTitleTemplateEOS, reportTitleOneList, "catalogue", documentContentEn,CutEnum.EN.getValue());
|
||||
wordContent(lawsMonthlyReportWriteEOS, lawsMonthlyReportTitleTemplateEOS, reportTitleOneList, titleEN,
|
||||
documentContentEn,CutEnum.EN.getValue(), loginUserList);
|
||||
documentContentEn.write(outContentEn);
|
||||
@@ -720,11 +736,12 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
content = "Content";
|
||||
}
|
||||
String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "年") + "月";
|
||||
//单独设置每页右侧的时间
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18,
|
||||
false, false, "Blue Sky Noto Regular",null);
|
||||
//标题
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 14,
|
||||
false, false, "Blue Sky Noto Regular",null,null,null);
|
||||
//主要内容
|
||||
WordUtil.exportWord(document, content, null, ParagraphAlignment.LEFT, 0, 12,
|
||||
false, true, "Blue Sky Noto Regular",null);
|
||||
false, true, "Blue Sky Noto Regular",null,null,null);
|
||||
//生成页脚
|
||||
WordUtil.exportHeardAndFootMain(document,moth);
|
||||
int oneCount = 1;
|
||||
@@ -741,7 +758,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}
|
||||
if(StringUtils.isNotBlank(oneTitle)){
|
||||
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT,
|
||||
0, 12, false, true, "Blue Sky Noto Regular",null);
|
||||
0, 12, false, true, "Blue Sky Noto Regular","0","一级标题",null);
|
||||
oneCount++;
|
||||
}
|
||||
|
||||
@@ -764,7 +781,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}
|
||||
if(StringUtils.isNotBlank(twoTitle)){
|
||||
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT,
|
||||
2, 12, false, true, "Blue Sky Noto Regular",null);
|
||||
2, 12, false, true, "Blue Sky Noto Regular","1","二级标题",null);
|
||||
twoCount++;
|
||||
}
|
||||
|
||||
@@ -778,7 +795,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(reportTitle)){
|
||||
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT,
|
||||
6, 12, false, false, "Blue Sky Noto Regular",null);
|
||||
4, 12, false, false, "Blue Sky Noto Regular","2","三级标题",null);
|
||||
reportCount++;
|
||||
}
|
||||
}
|
||||
@@ -795,7 +812,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "年") + "月";
|
||||
//单独设置每页右侧的时间
|
||||
WordUtil.exportWord(document, catalogue, null, ParagraphAlignment.LEFT, 0, 18,
|
||||
false, false, "Blue Sky Noto Regular",null);
|
||||
false, false, "Blue Sky Noto Regular",null,null,null);
|
||||
|
||||
int oneCount = 1;
|
||||
|
||||
@@ -811,7 +828,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}
|
||||
if(StringUtils.isNotBlank(oneTitle)){
|
||||
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT,
|
||||
0, 12, false, true, "Blue Sky Noto Regular",null);
|
||||
0, 12, false, true, "Blue Sky Noto Regular",null,null,null);
|
||||
oneCount++;
|
||||
}
|
||||
|
||||
@@ -834,7 +851,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}
|
||||
if(StringUtils.isNotBlank(twoTitle)){
|
||||
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT,
|
||||
2, 12, false, true, "Blue Sky Noto Regular",null);
|
||||
0, 12, false, true, "Blue Sky Noto Regular",null,null,null);
|
||||
twoCount++;
|
||||
}
|
||||
|
||||
@@ -848,7 +865,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(reportTitle)){
|
||||
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT,
|
||||
6, 12, false, false, "Blue Sky Noto Regular",null);
|
||||
0, 12, false, false, "Blue Sky Noto Regular",null,null,null);
|
||||
reportCount++;
|
||||
}
|
||||
}
|
||||
@@ -857,16 +874,36 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}
|
||||
|
||||
//封面
|
||||
private void cover(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
|
||||
private void coverCn(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
|
||||
String titleCN,
|
||||
XWPFDocument document) {
|
||||
//封面标识
|
||||
String flag = "cover";
|
||||
String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "年") + "月";
|
||||
|
||||
titleCN = "\r\n\r\n" + titleCN + "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n";
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18,
|
||||
false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
WordUtil.exportWord(document, moth+"\r\n", null, ParagraphAlignment.CENTER, 0, 12,
|
||||
false, true, "Blue Sky Noto Regular",null,null,flag);
|
||||
//添加下一页
|
||||
document.createParagraph().createRun().addBreak(BreakType.PAGE);
|
||||
}
|
||||
//封面
|
||||
private void coverEn(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
|
||||
String titleCN,
|
||||
XWPFDocument document) {
|
||||
//封面标识
|
||||
String flag = "cover";
|
||||
String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "年") + "月";
|
||||
|
||||
titleCN = "\r\n\r\n" + titleCN + "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n";
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18,
|
||||
false, false, "Blue Sky Noto Regular",null);
|
||||
WordUtil.exportWord(document, moth, null, ParagraphAlignment.CENTER, 0, 12,
|
||||
false, true, "Blue Sky Noto Regular",null);
|
||||
false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
WordUtil.exportWord(document, moth+"\r\n", null, ParagraphAlignment.CENTER, 0, 12,
|
||||
false, true, "Blue Sky Noto Regular",null,null,flag);
|
||||
//添加下一页
|
||||
document.createParagraph().createRun().addBreak(BreakType.PAGE);
|
||||
}
|
||||
private void wordContent(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
|
||||
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS,
|
||||
@@ -887,8 +924,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
//生成页眉页脚
|
||||
WordUtil.exportHeardAndFoot(document,moth);
|
||||
//生成标题
|
||||
WordUtil.exportWord(document, "\r\n\r\n\r\n", null, ParagraphAlignment.CENTER, 0, 18,
|
||||
false, true, "Blue Sky Noto Regular",null);
|
||||
// WordUtil.exportWord(document, "", null, ParagraphAlignment.CENTER, 0, 18,
|
||||
// false, true, "Blue Sky Noto Regular",null,null,null);
|
||||
int oneCount = 1;
|
||||
|
||||
for (LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO : reportTitleOneList) {
|
||||
@@ -901,9 +938,13 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}else{
|
||||
oneTitle = lawsMonthlyReportTitleTemplateEO.getTitleEn();
|
||||
}
|
||||
//每个一级目录单独占一页
|
||||
if(oneCount > 1){
|
||||
document.createParagraph().createRun().addBreak(BreakType.PAGE);
|
||||
}
|
||||
if(StringUtils.isNotBlank(oneTitle)){
|
||||
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT,
|
||||
0, 14, false, true, "Blue Sky Noto Regular","Heading1");
|
||||
0, 14, false, true, "Blue Sky Noto Regular","0","一级标题","oneTitle");
|
||||
oneCount++;
|
||||
}
|
||||
|
||||
@@ -924,9 +965,13 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}else{
|
||||
twoTitle = monthlyReportTitleTemplateEO.getTitleEn();
|
||||
}
|
||||
//每个二级目录单独占一页
|
||||
if(twoCount > 1){
|
||||
document.createParagraph().createRun().addBreak(BreakType.PAGE);
|
||||
}
|
||||
if(StringUtils.isNotBlank(twoTitle)){
|
||||
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT,
|
||||
2, 12, false, true, "Blue Sky Noto Regular","Heading2");
|
||||
0, 12, false, true, "Blue Sky Noto Regular","1","二级标题",null);
|
||||
twoCount++;
|
||||
}
|
||||
//二级目录下放--->新征求意见清单模板, 新发布标准清单模板
|
||||
@@ -935,13 +980,13 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : askList) {
|
||||
WordUtil.exportWordExcelAsk(document,lawsMonthlyReportWriteEO,cut);
|
||||
WordUtil.exportWord(document, null, null, null,
|
||||
0, 0, false, true, null,null);
|
||||
0, 0, false, true, null,null,null,null);
|
||||
}
|
||||
|
||||
for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : issueList) {
|
||||
WordUtil.exportWordExcelIssue(document,lawsMonthlyReportWriteEO,cut);
|
||||
WordUtil.exportWord(document, null, null, null, 0, 0,
|
||||
false, true, null,null);
|
||||
false, true, null,null,null,null);
|
||||
}
|
||||
|
||||
for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : lawsMonthlyReportWriteEOList) {
|
||||
@@ -954,7 +999,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}
|
||||
if(StringUtils.isNotBlank(reportTitle)){
|
||||
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT,
|
||||
6, 11, false, false, "Blue Sky Noto Regular","Heading3");
|
||||
0, 11, false, false, "Blue Sky Noto Regular","2","三级标题",null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+518
-105
@@ -21,19 +21,40 @@ import org.apache.poi.xwpf.usermodel.XWPFHeader;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFPicture;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFPictureData;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFRelation;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFRun;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFStyle;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFStyles;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTable;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTableCell;
|
||||
import org.apache.xmlbeans.impl.xb.xmlschema.SpaceAttribute;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTColor;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTDecimalNumber;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFldChar;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFonts;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHyperlink;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTJc;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTOnOff;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPr;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPageMar;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPageSz;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTR;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRPr;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSpacing;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTString;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTStyle;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblLayoutType;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTcMar;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTcPr;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STFldCharType;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STJc;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STStyleType;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblLayoutType;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblWidth;
|
||||
|
||||
@@ -61,6 +82,8 @@ public class WordUtil {
|
||||
* @param isBold 是否加粗,默认不加粗
|
||||
* @param fontFamily 字体,默认宋体
|
||||
* @param directoryLevel 目录级别
|
||||
* @param styleName 标题样式
|
||||
* @param flag 封面标识(不做行间距处理)
|
||||
*/
|
||||
public static void exportWord(XWPFDocument document,
|
||||
String text,
|
||||
@@ -70,14 +93,32 @@ public class WordUtil {
|
||||
Integer fontSize,
|
||||
Boolean isNewline,
|
||||
Boolean isBold,
|
||||
String fontFamily,String directoryLevel) {
|
||||
String fontFamily,
|
||||
String directoryLevel,
|
||||
String styleName,
|
||||
String flag) {
|
||||
|
||||
//添加标题
|
||||
XWPFParagraph titleParagraph = document.createParagraph();
|
||||
//设置标题级别
|
||||
if(StringUtils.isNotEmpty(directoryLevel)){
|
||||
titleParagraph.setStyle(directoryLevel);
|
||||
addCustomHeadingStyle(document,styleName,Integer.parseInt(directoryLevel));
|
||||
}
|
||||
|
||||
XWPFParagraph titleParagraph = document.createParagraph();
|
||||
titleParagraph.setStyle(styleName);
|
||||
|
||||
|
||||
//设置行间距
|
||||
if(!"cover".equals(flag) && !"oneTitle".equals(flag)){
|
||||
CTP ctp = titleParagraph.getCTP();
|
||||
CTPPr ppr = ctp.isSetPPr() ? ctp.getPPr() : ctp.addNewPPr();
|
||||
CTSpacing spacing = ppr.isSetSpacing()? ppr.getSpacing() : ppr.addNewSpacing();
|
||||
spacing.setAfter(BigInteger.valueOf(120));//行间距后段为6磅
|
||||
spacing.setBefore(BigInteger.valueOf(300));//行间距前段为15磅, 300是通过单位换算来的
|
||||
// //设置行距类型为 EXACT
|
||||
// spacing.setLineRule(STLineSpacingRule.EXACT);
|
||||
// //1磅数是20
|
||||
// spacing.setLine(BigInteger.valueOf(1*20));
|
||||
}
|
||||
|
||||
//设置段落左对齐
|
||||
if (align == null) {
|
||||
@@ -128,6 +169,39 @@ public class WordUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加自定义标题样式。这里用的是stackoverflow的源码
|
||||
*
|
||||
* @param docxDocument 目标文档
|
||||
* @param strStyleId 样式名称
|
||||
* @param headingLevel 样式级别
|
||||
*/
|
||||
private static void addCustomHeadingStyle(XWPFDocument docxDocument, String strStyleId, int headingLevel) {
|
||||
CTStyle ctStyle = CTStyle.Factory.newInstance();
|
||||
ctStyle.setStyleId(strStyleId);
|
||||
CTString styleName = CTString.Factory.newInstance();
|
||||
styleName.setVal(strStyleId);
|
||||
ctStyle.setName(styleName);
|
||||
CTDecimalNumber indentNumber = CTDecimalNumber.Factory.newInstance();
|
||||
indentNumber.setVal(BigInteger.valueOf(headingLevel));
|
||||
// lower number > style is more prominent in the formats bar
|
||||
ctStyle.setUiPriority(indentNumber);
|
||||
|
||||
CTOnOff onoffnull = CTOnOff.Factory.newInstance();
|
||||
ctStyle.setUnhideWhenUsed(onoffnull);
|
||||
// style shows up in the formats bar
|
||||
ctStyle.setQFormat(onoffnull);
|
||||
// style defines a heading of the given level
|
||||
CTPPr ppr = CTPPr.Factory.newInstance();
|
||||
ppr.setOutlineLvl(indentNumber);
|
||||
ctStyle.setPPr(ppr);
|
||||
XWPFStyle style = new XWPFStyle(ctStyle);
|
||||
// is a null op if already defined
|
||||
XWPFStyles styles = docxDocument.createStyles();
|
||||
style.setType(STStyleType.PARAGRAPH);
|
||||
styles.addStyle(style);
|
||||
}
|
||||
|
||||
// @SneakyThrows
|
||||
// public static void exportHeardAndFoot(XWPFDocument document){
|
||||
//// XWPFDocument document = new XWPFDocument();
|
||||
@@ -232,10 +306,14 @@ public class WordUtil {
|
||||
|
||||
CTSectPr sectPr = document.getDocument().getBody().getSectPr();
|
||||
if (sectPr == null) sectPr = document.getDocument().getBody().addNewSectPr();
|
||||
//设置页面大小
|
||||
CTPageSz pgSz = sectPr.addNewPgSz();
|
||||
pgSz.setW(BigInteger.valueOf(11907));
|
||||
pgSz.setH(BigInteger.valueOf(16840));
|
||||
CTPageMar pageMar = sectPr.getPgMar();
|
||||
if (pageMar == null) pageMar = sectPr.addNewPgMar();
|
||||
pageMar.setLeft(BigInteger.valueOf(1000)); //左边距
|
||||
pageMar.setRight(BigInteger.valueOf(1000));//右边距
|
||||
pageMar.setLeft(BigInteger.valueOf(1803)); //左边距
|
||||
pageMar.setRight(BigInteger.valueOf(1803));//右边距
|
||||
pageMar.setTop(BigInteger.valueOf(1440)); //页眉高度
|
||||
pageMar.setBottom(BigInteger.valueOf(1440));//页脚高度
|
||||
|
||||
@@ -269,10 +347,14 @@ public class WordUtil {
|
||||
|
||||
CTSectPr sectPr = document.getDocument().getBody().getSectPr();
|
||||
if (sectPr == null) sectPr = document.getDocument().getBody().addNewSectPr();
|
||||
//设置页面大小
|
||||
CTPageSz pgSz = sectPr.addNewPgSz();
|
||||
pgSz.setW(BigInteger.valueOf(11907));
|
||||
pgSz.setH(BigInteger.valueOf(16840));
|
||||
CTPageMar pageMar = sectPr.getPgMar();
|
||||
if (pageMar == null) pageMar = sectPr.addNewPgMar();
|
||||
pageMar.setLeft(BigInteger.valueOf(1000)); //左边距
|
||||
pageMar.setRight(BigInteger.valueOf(1000));//右边距
|
||||
pageMar.setLeft(BigInteger.valueOf(1803)); //左边距
|
||||
pageMar.setRight(BigInteger.valueOf(1803));//右边距
|
||||
pageMar.setTop(BigInteger.valueOf(1440)); //页眉高度
|
||||
pageMar.setBottom(BigInteger.valueOf(1440));//页脚高度
|
||||
|
||||
@@ -415,7 +497,7 @@ public class WordUtil {
|
||||
String stateName = dictItem(sysDictItems, state,cut, DictCodeReportEnum.STATE.getValue());
|
||||
String useMethodName = dictItem(sysDictItems, useMethod,cut, DictCodeReportEnum.USEMETHOD.getValue());
|
||||
|
||||
XWPFTable table = document.createTable(12, 2);
|
||||
XWPFTable table = document.createTable(11, 2);
|
||||
//表格属性
|
||||
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
||||
//固定列宽(英文和数字的时候自动换行)
|
||||
@@ -424,12 +506,12 @@ public class WordUtil {
|
||||
//表格宽度
|
||||
CTJc cTJc = tablePr.addNewJc();
|
||||
//居中
|
||||
cTJc.setVal(STJc.CENTER);
|
||||
cTJc.setVal(STJc.LEFT);
|
||||
//列宽自动分割
|
||||
CTTblWidth tableWidth = tablePr.addNewTblW();
|
||||
//设置表格宽度
|
||||
tableWidth.setType(STTblWidth.DXA);
|
||||
tableWidth.setW(BigInteger.valueOf(8000));
|
||||
tableWidth.setW(BigInteger.valueOf(8311));
|
||||
|
||||
|
||||
//第1行
|
||||
@@ -437,52 +519,52 @@ public class WordUtil {
|
||||
//第1行
|
||||
setCell(table, 0, "相关领域",technologyTerritoryName);
|
||||
//第2行
|
||||
setCell(table,1, "适用车型",applyCarName);
|
||||
// setCell(table,1, "适用车型",applyCarName);
|
||||
//第3行
|
||||
setCell(table,2, "适用范围",applyScopeName);
|
||||
setCellThree(table,1, "适用范围",applyScopeName,sysDictItems,DictCodeReportEnum.APPLYSCOPE.getValue());
|
||||
//第4行
|
||||
setCell(table,3, "状态",stateName);
|
||||
setCellThree(table,2, "状态",stateName,sysDictItems,DictCodeReportEnum.STATE.getValue());
|
||||
//第5行
|
||||
setCell(table,4, "用法",useMethodName);
|
||||
setCellThree(table,3, "用法",useMethodName,sysDictItems,DictCodeReportEnum.USEMETHOD.getValue());
|
||||
//第6行
|
||||
setCell(table,5, "实施车型",implementCar);
|
||||
setCell(table,4, "实施车型",implementCar);
|
||||
//第7行
|
||||
setCell(table,6, "新车型实施日期",newCarImplementTime);
|
||||
setCell(table,5, "新车型实施日期",newCarImplementTime);
|
||||
//第8行
|
||||
setCell(table,7, "在产车实施日期",productionCarImplementTime);
|
||||
setCell(table,6, "在产车实施日期",productionCarImplementTime);
|
||||
//第9行
|
||||
setCell(table,8, "主要内容",contentCn);
|
||||
setCell(table,7, "主要内容",contentCn);
|
||||
//第10行
|
||||
setCell(table,9, "NIO工作进展",workProgressCn);
|
||||
setCell(table,8, "NIO工作进展",workProgressCn);
|
||||
//第11行
|
||||
setCell(table,10, "法规联系人",lawsContact);
|
||||
setCell(table,9, "法规联系人",lawsContact);
|
||||
//第12行
|
||||
setCell(table,11, "链接",link);
|
||||
setCell(table,10, "链接",link);
|
||||
}else{
|
||||
//第1行
|
||||
setCell(table,0, "Related Areas",technologyTerritoryName);
|
||||
//第2行
|
||||
setCell(table,1,"Vehicle Type",applyCarName);
|
||||
// setCell(table,1,"Vehicle Type",applyCarName);
|
||||
//第3行
|
||||
setCell(table,2,"Scope",applyScopeName);
|
||||
setCellThree(table,1,"Scope",applyScopeName,sysDictItems,DictCodeReportEnum.APPLYSCOPE.getValue());
|
||||
//第4行
|
||||
setCell(table,3,"Status",stateName);
|
||||
setCellThree(table,2,"Status",stateName,sysDictItems,DictCodeReportEnum.APPLYSCOPE.getValue());
|
||||
//第5行
|
||||
setCell(table,4,"usage",useMethodName);
|
||||
setCellThree(table,3,"Usage",useMethodName,sysDictItems,DictCodeReportEnum.APPLYSCOPE.getValue());
|
||||
//第6行
|
||||
setCell(table,5,"Implementation Model",implementCar);
|
||||
setCell(table,4,"Implementation Model",implementCar);
|
||||
//第7行
|
||||
setCell(table,6,"New Type Execution Date",newCarImplementTime);
|
||||
setCell(table,5,"New Type Execution Date",newCarImplementTime);
|
||||
//第8行
|
||||
setCell(table,7,"New Vehicle Execution Date",productionCarImplementTime);
|
||||
setCell(table,6,"New Vehicle Execution Date",productionCarImplementTime);
|
||||
//第9行
|
||||
setCell(table,8,"Main Content",contentEn);
|
||||
setCell(table,7,"Main Content",contentEn);
|
||||
//第10行
|
||||
setCell(table,9,"NIO Work Progress",workProgressEn);
|
||||
setCell(table,8,"NIO Work Progress",workProgressEn);
|
||||
//第11行
|
||||
setCell(table, 10,"Regulatory Contact",lawsContact);
|
||||
setCell(table,9,"Regulatory Contact",lawsContact);
|
||||
//第12行
|
||||
setCell(table, 11,"Link",link);
|
||||
setCell(table, 10,"Link",link);
|
||||
}
|
||||
// ctTblLayoutType.setType(STTblLayoutType.FIXED);
|
||||
|
||||
@@ -570,12 +652,12 @@ public class WordUtil {
|
||||
//表格宽度
|
||||
CTJc cTJc = tablePr.addNewJc();
|
||||
//居中
|
||||
cTJc.setVal(STJc.CENTER);
|
||||
cTJc.setVal(STJc.LEFT);
|
||||
//列宽自动分割
|
||||
CTTblWidth tableWidth = tablePr.addNewTblW();
|
||||
//设置表格宽度
|
||||
tableWidth.setType(STTblWidth.DXA);
|
||||
tableWidth.setW(BigInteger.valueOf(8000));
|
||||
tableWidth.setW(BigInteger.valueOf(8311));
|
||||
|
||||
|
||||
//第1行
|
||||
@@ -617,12 +699,12 @@ public class WordUtil {
|
||||
//表格宽度
|
||||
CTJc cTJc = tablePr.addNewJc();
|
||||
//居中
|
||||
cTJc.setVal(STJc.CENTER);
|
||||
cTJc.setVal(STJc.LEFT);
|
||||
//列宽自动分割
|
||||
CTTblWidth tableWidth = tablePr.addNewTblW();
|
||||
//设置表格宽度
|
||||
tableWidth.setType(STTblWidth.DXA);
|
||||
tableWidth.setW(BigInteger.valueOf(8000));
|
||||
tableWidth.setW(BigInteger.valueOf(8311));
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
setCellAskOne(table,"序号","计划号","标准名称","征求意见截止日期");
|
||||
}else{
|
||||
@@ -655,12 +737,12 @@ public class WordUtil {
|
||||
//表格宽度
|
||||
CTJc cTJc = tablePr.addNewJc();
|
||||
//居中
|
||||
cTJc.setVal(STJc.CENTER);
|
||||
cTJc.setVal(STJc.LEFT);
|
||||
//列宽自动分割
|
||||
CTTblWidth tableWidth = tablePr.addNewTblW();
|
||||
//设置表格宽度
|
||||
tableWidth.setType(STTblWidth.DXA);
|
||||
tableWidth.setW(BigInteger.valueOf(8000));
|
||||
tableWidth.setW(BigInteger.valueOf(8311));
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
setCellIssueOne(table,"序号","标准编号","标准名称","发布日期","实施日期");
|
||||
}else{
|
||||
@@ -688,24 +770,36 @@ public class WordUtil {
|
||||
//设置每个单元格宽度
|
||||
CTTblWidth ctTblWidth0 = table.getRow(i).getCell(0).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth0.setType(STTblWidth.DXA);
|
||||
ctTblWidth0.setW(BigInteger.valueOf(1000));
|
||||
ctTblWidth0.setW(BigInteger.valueOf(703));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell0 = table.getRow(i).getCell(0);
|
||||
cellPadding(cell0,String.valueOf(i));
|
||||
|
||||
CTTblWidth ctTblWidth1 = table.getRow(i).getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth1.setType(STTblWidth.DXA);
|
||||
ctTblWidth1.setW(BigInteger.valueOf(2000));
|
||||
ctTblWidth1.setW(BigInteger.valueOf(1984));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell1 = table.getRow(i).getCell(1);
|
||||
cellPadding(cell1,planNumber);
|
||||
|
||||
CTTblWidth ctTblWidth2 = table.getRow(i).getCell(2).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth2.setType(STTblWidth.DXA);
|
||||
ctTblWidth2.setW(BigInteger.valueOf(2500));
|
||||
ctTblWidth2.setW(BigInteger.valueOf(3543));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell2 = table.getRow(i).getCell(2);
|
||||
cellPadding(cell2,standardName);
|
||||
|
||||
CTTblWidth ctTblWidth3 = table.getRow(i).getCell(3).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth3.setType(STTblWidth.DXA);
|
||||
ctTblWidth3.setW(BigInteger.valueOf(2500));
|
||||
ctTblWidth3.setW(BigInteger.valueOf(2081));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell3 = table.getRow(i).getCell(3);
|
||||
cellPadding(cell3,expirationDate);
|
||||
|
||||
table.getRow(i).getCell(0).setText(String.valueOf(i));
|
||||
table.getRow(i).getCell(1).setText(planNumber);
|
||||
table.getRow(i).getCell(2).setText(standardName);
|
||||
table.getRow(i).getCell(3).setText(expirationDate);
|
||||
// table.getRow(i).getCell(0).setText(String.valueOf(i));
|
||||
// table.getRow(i).getCell(1).setText(planNumber);
|
||||
// table.getRow(i).getCell(2).setText(standardName);
|
||||
// table.getRow(i).getCell(3).setText(expirationDate);
|
||||
}
|
||||
private static void setCellIssue(XWPFTable table, int i, String planNumber, String standardName, String expirationDate,String implementTime) {
|
||||
//设置单元格高度
|
||||
@@ -714,29 +808,44 @@ public class WordUtil {
|
||||
//设置每个单元格宽度
|
||||
CTTblWidth ctTblWidth0 = table.getRow(i).getCell(0).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth0.setType(STTblWidth.DXA);
|
||||
ctTblWidth0.setW(BigInteger.valueOf(1000));
|
||||
ctTblWidth0.setW(BigInteger.valueOf(708));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell0 = table.getRow(i).getCell(0);
|
||||
cellPadding(cell0,String.valueOf(i));
|
||||
|
||||
CTTblWidth ctTblWidth1 = table.getRow(i).getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth1.setType(STTblWidth.DXA);
|
||||
ctTblWidth1.setW(BigInteger.valueOf(2000));
|
||||
ctTblWidth1.setW(BigInteger.valueOf(1990));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell1 = table.getRow(i).getCell(1);
|
||||
cellPadding(cell1,planNumber);
|
||||
|
||||
CTTblWidth ctTblWidth2 = table.getRow(i).getCell(2).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth2.setType(STTblWidth.DXA);
|
||||
ctTblWidth2.setW(BigInteger.valueOf(2600));
|
||||
ctTblWidth2.setW(BigInteger.valueOf(3124));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell2 = table.getRow(i).getCell(2);
|
||||
cellPadding(cell2,standardName);
|
||||
|
||||
CTTblWidth ctTblWidth3 = table.getRow(i).getCell(3).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth3.setType(STTblWidth.DXA);
|
||||
ctTblWidth3.setW(BigInteger.valueOf(1200));
|
||||
ctTblWidth3.setW(BigInteger.valueOf(1247));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell3 = table.getRow(i).getCell(3);
|
||||
cellPadding(cell3,expirationDate);
|
||||
|
||||
CTTblWidth ctTblWidth4 = table.getRow(i).getCell(4).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth4.setType(STTblWidth.DXA);
|
||||
ctTblWidth4.setW(BigInteger.valueOf(1200));
|
||||
ctTblWidth4.setW(BigInteger.valueOf(1247));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell4 = table.getRow(i).getCell(4);
|
||||
cellPadding(cell4,implementTime);
|
||||
|
||||
table.getRow(i).getCell(0).setText(String.valueOf(i));
|
||||
table.getRow(i).getCell(1).setText(planNumber);
|
||||
table.getRow(i).getCell(2).setText(standardName);
|
||||
table.getRow(i).getCell(3).setText(expirationDate);
|
||||
table.getRow(i).getCell(4).setText(implementTime);
|
||||
// table.getRow(i).getCell(0).setText(String.valueOf(i));
|
||||
// table.getRow(i).getCell(1).setText(planNumber);
|
||||
// table.getRow(i).getCell(2).setText(standardName);
|
||||
// table.getRow(i).getCell(3).setText(expirationDate);
|
||||
// table.getRow(i).getCell(4).setText(implementTime);
|
||||
}
|
||||
private static void setCellIssueOne(XWPFTable table, String number,String planNumber, String standardName, String expirationDate,String implementTime) {
|
||||
//设置单元格高度
|
||||
@@ -745,29 +854,44 @@ public class WordUtil {
|
||||
//设置每个单元格宽度
|
||||
CTTblWidth ctTblWidth0 = table.getRow(0).getCell(0).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth0.setType(STTblWidth.DXA);
|
||||
ctTblWidth0.setW(BigInteger.valueOf(1000));
|
||||
ctTblWidth0.setW(BigInteger.valueOf(708));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell0 = table.getRow(0).getCell(0);
|
||||
cellPadding(cell0,number);
|
||||
|
||||
CTTblWidth ctTblWidth1 = table.getRow(0).getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth1.setType(STTblWidth.DXA);
|
||||
ctTblWidth1.setW(BigInteger.valueOf(2000));
|
||||
ctTblWidth1.setW(BigInteger.valueOf(1990));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell1 = table.getRow(0).getCell(1);
|
||||
cellPadding(cell1,planNumber);
|
||||
|
||||
CTTblWidth ctTblWidth2 = table.getRow(0).getCell(2).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth2.setType(STTblWidth.DXA);
|
||||
ctTblWidth2.setW(BigInteger.valueOf(2600));
|
||||
ctTblWidth2.setW(BigInteger.valueOf(3124));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell2 = table.getRow(0).getCell(2);
|
||||
cellPadding(cell2,standardName);
|
||||
|
||||
CTTblWidth ctTblWidth3 = table.getRow(0).getCell(3).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth3.setType(STTblWidth.DXA);
|
||||
ctTblWidth3.setW(BigInteger.valueOf(1200));
|
||||
ctTblWidth3.setW(BigInteger.valueOf(1247));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell3 = table.getRow(0).getCell(3);
|
||||
cellPadding(cell3,expirationDate);
|
||||
|
||||
CTTblWidth ctTblWidth4 = table.getRow(0).getCell(4).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth4.setType(STTblWidth.DXA);
|
||||
ctTblWidth4.setW(BigInteger.valueOf(1200));
|
||||
ctTblWidth4.setW(BigInteger.valueOf(1247));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell4 = table.getRow(0).getCell(4);
|
||||
cellPadding(cell4,implementTime);
|
||||
|
||||
table.getRow(0).getCell(0).setText(number);
|
||||
table.getRow(0).getCell(1).setText(planNumber);
|
||||
table.getRow(0).getCell(2).setText(standardName);
|
||||
table.getRow(0).getCell(3).setText(expirationDate);
|
||||
table.getRow(0).getCell(4).setText(implementTime);
|
||||
// table.getRow(0).getCell(0).setText(number);
|
||||
// table.getRow(0).getCell(1).setText(planNumber);
|
||||
// table.getRow(0).getCell(2).setText(standardName);
|
||||
// table.getRow(0).getCell(3).setText(expirationDate);
|
||||
// table.getRow(0).getCell(4).setText(implementTime);
|
||||
}
|
||||
private static void setCellAskOne(XWPFTable table, String number,String planNumber, String standardName, String expirationDate) {
|
||||
//设置单元格高度
|
||||
@@ -776,24 +900,36 @@ public class WordUtil {
|
||||
//设置每个单元格宽度
|
||||
CTTblWidth ctTblWidth0 = table.getRow(0).getCell(0).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth0.setType(STTblWidth.DXA);
|
||||
ctTblWidth0.setW(BigInteger.valueOf(1000));
|
||||
ctTblWidth0.setW(BigInteger.valueOf(703));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell0 = table.getRow(0).getCell(0);
|
||||
cellPadding(cell0,number);
|
||||
|
||||
CTTblWidth ctTblWidth1 = table.getRow(0).getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth1.setType(STTblWidth.DXA);
|
||||
ctTblWidth1.setW(BigInteger.valueOf(2000));
|
||||
ctTblWidth1.setW(BigInteger.valueOf(1984));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell1 = table.getRow(0).getCell(1);
|
||||
cellPadding(cell1,planNumber);
|
||||
|
||||
CTTblWidth ctTblWidth2 = table.getRow(0).getCell(2).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth2.setType(STTblWidth.DXA);
|
||||
ctTblWidth2.setW(BigInteger.valueOf(2500));
|
||||
ctTblWidth2.setW(BigInteger.valueOf(3543));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell2 = table.getRow(0).getCell(2);
|
||||
cellPadding(cell2,standardName);
|
||||
|
||||
CTTblWidth ctTblWidth3 = table.getRow(0).getCell(3).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth3.setType(STTblWidth.DXA);
|
||||
ctTblWidth3.setW(BigInteger.valueOf(2500));
|
||||
ctTblWidth3.setW(BigInteger.valueOf(2081));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell3 = table.getRow(0).getCell(3);
|
||||
cellPadding(cell3,expirationDate);
|
||||
|
||||
table.getRow(0).getCell(0).setText(number);
|
||||
table.getRow(0).getCell(1).setText(planNumber);
|
||||
table.getRow(0).getCell(2).setText(standardName);
|
||||
table.getRow(0).getCell(3).setText(expirationDate);
|
||||
// table.getRow(0).getCell(0).setText(number);
|
||||
// table.getRow(0).getCell(1).setText(planNumber);
|
||||
// table.getRow(0).getCell(2).setText(standardName);
|
||||
// table.getRow(0).getCell(3).setText(expirationDate);
|
||||
}
|
||||
|
||||
|
||||
@@ -822,49 +958,73 @@ public class WordUtil {
|
||||
}
|
||||
|
||||
private static void setCell(XWPFTable table, int number, String fieldName,String technologyTerritory) {
|
||||
|
||||
table.getRow(number).setHeight(500);
|
||||
CTTblWidth ctTblWidth0 = table.getRow(number).getCell(0).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth0.setType(STTblWidth.DXA);
|
||||
ctTblWidth0.setW(BigInteger.valueOf(2000));
|
||||
ctTblWidth0.setW(BigInteger.valueOf(2296));//宽度通过计算得来-->列表实际宽度除以2.54再乘以1440
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell0 = table.getRow(number).getCell(0);
|
||||
cellPadding(cell0,fieldName);
|
||||
|
||||
CTTblWidth ctTblWidth1 = table.getRow(number).getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth1.setType(STTblWidth.DXA);
|
||||
ctTblWidth1.setW(BigInteger.valueOf(6000));
|
||||
ctTblWidth1.setW(BigInteger.valueOf(6015));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell1 = table.getRow(number).getCell(1);
|
||||
if("链接".equals(fieldName) || "Link".equals(fieldName)){
|
||||
//设置超链接
|
||||
if(StringUtils.isNotEmpty(technologyTerritory)){
|
||||
cellLink(cell1,technologyTerritory);
|
||||
}
|
||||
}else{
|
||||
cellPadding(cell1,technologyTerritory);
|
||||
}
|
||||
|
||||
// XWPFParagraph para = table.getRow(number).getCell(1).getParagraphs().get(0);
|
||||
// XWPFRun run = para.createRun();//对某个段落设置格式
|
||||
// run.addBreak();//换行
|
||||
|
||||
table.getRow(number).getCell(0).setText(fieldName);
|
||||
table.getRow(number).getCell(1).setText(technologyTerritory);
|
||||
|
||||
}
|
||||
// private static void setCell(XWPFTable table, int number, String fieldName,String technologyTerritory) {
|
||||
//
|
||||
// table.getRow(number).setHeight(500);
|
||||
// CTTblWidth ctTblWidth0 = table.getRow(number).getCell(0).getCTTc().addNewTcPr().addNewTcW();
|
||||
// ctTblWidth0.setType(STTblWidth.DXA);
|
||||
// ctTblWidth0.setW(BigInteger.valueOf(2000));
|
||||
// CTTblWidth ctTblWidth1 = table.getRow(number).getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
||||
// ctTblWidth1.setType(STTblWidth.DXA);
|
||||
// ctTblWidth1.setW(BigInteger.valueOf(5000));
|
||||
//
|
||||
// table.getRow(number).getCell(0).setText(fieldName);
|
||||
// table.getRow(number).getCell(1).setText(technologyTerritory);
|
||||
// }
|
||||
// private static void setCell(XWPFTableRow tableRow, String fieldName,String technologyTerritory) {
|
||||
|
||||
}
|
||||
private static void setCellThree(XWPFTable table, int number, String fieldName,String technologyTerritory,
|
||||
List<SysDictItem> sysDictItems,String code) {
|
||||
table.getRow(number).setHeight(500);
|
||||
CTTblWidth ctTblWidth0 = table.getRow(number).getCell(0).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth0.setType(STTblWidth.DXA);
|
||||
ctTblWidth0.setW(BigInteger.valueOf(2296));//宽度通过计算得来-->列表实际宽度除以2.54再乘以1440
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell0 = table.getRow(number).getCell(0);
|
||||
cellPadding(cell0,fieldName);
|
||||
|
||||
CTTblWidth ctTblWidth1 = table.getRow(number).getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth1.setType(STTblWidth.DXA);
|
||||
ctTblWidth1.setW(BigInteger.valueOf(6015));
|
||||
//设置单元格边距
|
||||
XWPFTableCell cell1 = table.getRow(number).getCell(1);
|
||||
if("链接".equals(fieldName) || "Link".equals(fieldName)){
|
||||
//设置超链接
|
||||
if(StringUtils.isNotEmpty(technologyTerritory)){
|
||||
cellLink(cell1,technologyTerritory);
|
||||
}
|
||||
}else{
|
||||
if("适用范围".equals(fieldName) || "状态".equals(fieldName) || "用法".equals(fieldName)
|
||||
|| "Scope".equals(fieldName) || "Status".equals(fieldName) || "Usage".equals(fieldName)){
|
||||
threeSet(cell1,technologyTerritory,fieldName,sysDictItems,code);
|
||||
}else{
|
||||
cellPadding(cell1,technologyTerritory);
|
||||
}
|
||||
}
|
||||
|
||||
// XWPFParagraph para = table.getRow(number).getCell(1).getParagraphs().get(0);
|
||||
// XWPFRun run = para.createRun();//对某个段落设置格式
|
||||
// run.addBreak();//换行
|
||||
//
|
||||
// tableRow.setHeight(500);
|
||||
// CTTblWidth ctTblWidth0 = tableRow.getCell(0).getCTTc().addNewTcPr().addNewTcW();
|
||||
// ctTblWidth0.setType(STTblWidth.DXA);
|
||||
// ctTblWidth0.setW(BigInteger.valueOf(3000));
|
||||
// CTTblWidth ctTblWidth1 = tableRow.getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
||||
// ctTblWidth1.setType(STTblWidth.DXA);
|
||||
// ctTblWidth1.setW(BigInteger.valueOf(5000));
|
||||
//
|
||||
// tableRow.getCell(0).setText(fieldName);
|
||||
// tableRow.getCell(1).setText(technologyTerritory);
|
||||
// }
|
||||
// table.getRow(number).getCell(0).setText(fieldName);
|
||||
// table.getRow(number).getCell(1).setText(technologyTerritory);
|
||||
|
||||
}
|
||||
|
||||
private static String getLawsContact(List<LoginUser> userList, String lawsContact) {
|
||||
if(com.jero.modules.system.util.StringUtils.isNotBlank(lawsContact)){
|
||||
@@ -883,5 +1043,258 @@ public class WordUtil {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置单元格边距
|
||||
* @param cell
|
||||
*/
|
||||
public static void cellPadding(XWPFTableCell cell,String text){
|
||||
//1. 设置单元格页边距
|
||||
CTTc ctTc = cell.getCTTc();
|
||||
CTTcPr cttcpr =ctTc.isSetTcPr() ? ctTc.getTcPr() : ctTc.addNewTcPr();
|
||||
CTTcMar ctTcMar = cttcpr.isSetTcMar() ? cttcpr.getTcMar() : cttcpr.addNewTcMar();
|
||||
(ctTcMar.isSetLeft() ? ctTcMar.getLeft() : ctTcMar.addNewLeft()).setW(BigInteger.valueOf(119));//左边距
|
||||
(ctTcMar.isSetTop() ? ctTcMar.getTop() : ctTcMar.addNewTop()).setW(BigInteger.valueOf(63));//上边距
|
||||
// (ctTcMar.isSetRight() ? ctTcMar.getRight() : ctTcMar.addNewRight()).setW(BigInteger.valueOf(100));
|
||||
// (ctTcMar.isSetBottom() ? ctTcMar.getBottom() : ctTcMar.addNewBottom()).setW(BigInteger.valueOf(100));
|
||||
|
||||
//2. 设置文本及文本的字体
|
||||
//获取 CTP
|
||||
CTP ctP = (ctTc.sizeOfPArray() == 0) ?
|
||||
ctTc.addNewP() : ctTc.getPArray(0);
|
||||
//getParagraph(ctP) 获取 XWPFParagraph
|
||||
XWPFParagraph par = cell.getParagraph(ctP);
|
||||
//XWPFRun 设置格式
|
||||
XWPFRun run = par.createRun();
|
||||
//单元格内容换行
|
||||
if(StringUtils.isNotEmpty(text) && text.contains("\n")){
|
||||
String[] split = text.split("\n");
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
run.setText(split[i]);
|
||||
if(i<split.length-1){
|
||||
run.addBreak();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
run.setText(text);
|
||||
}
|
||||
//设置字体样式,大小
|
||||
run.setFontSize(11);
|
||||
run.setFontFamily("Blue Sky Noto Regular");
|
||||
|
||||
}
|
||||
|
||||
//适用范围,状态,用法三个字段单独处理
|
||||
public static void threeSet(XWPFTableCell cell,String text,String fieldName,List<SysDictItem> sysDictItems,String code){
|
||||
List<SysDictItem> sysDictItemList = sysDictItems.stream().filter(e -> code.equals(e.getDictCode())).collect(Collectors.toList());
|
||||
//1. 设置单元格页边距
|
||||
CTTc ctTc = cell.getCTTc();
|
||||
CTTcPr cttcpr =ctTc.isSetTcPr() ? ctTc.getTcPr() : ctTc.addNewTcPr();
|
||||
CTTcMar ctTcMar = cttcpr.isSetTcMar() ? cttcpr.getTcMar() : cttcpr.addNewTcMar();
|
||||
(ctTcMar.isSetLeft() ? ctTcMar.getLeft() : ctTcMar.addNewLeft()).setW(BigInteger.valueOf(119));//左边距
|
||||
(ctTcMar.isSetTop() ? ctTcMar.getTop() : ctTcMar.addNewTop()).setW(BigInteger.valueOf(63));//上边距
|
||||
|
||||
|
||||
//2. 设置文本及文本的字体
|
||||
//获取 CTP
|
||||
CTP ctP = (ctTc.sizeOfPArray() == 0) ?
|
||||
ctTc.addNewP() : ctTc.getPArray(0);
|
||||
//getParagraph(ctP) 获取 XWPFParagraph
|
||||
XWPFParagraph par = cell.getParagraph(ctP);
|
||||
//XWPFRun 设置格式
|
||||
XWPFRun run = par.createRun();
|
||||
//单元格内容换行 □ ■
|
||||
if(StringUtils.isNotEmpty(text)){
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if("适用范围".equals(fieldName)){
|
||||
String itemText = "M,N,企业,整车,系统/零部件,新车型,在产车型";
|
||||
setBlank(text, run, sb, itemText);
|
||||
}
|
||||
if("Scope".equals(fieldName)){
|
||||
String itemText = "M,N,Enterprise,Vehicle,System/Parts,New Car Model,Models In Production";
|
||||
setBlank(text, run, sb, itemText);
|
||||
|
||||
}
|
||||
if("状态".equals(fieldName)){
|
||||
String itemText = "草稿,公示稿,发布稿";
|
||||
setBlank(text, run, sb, itemText);
|
||||
}
|
||||
if("Status".equals(fieldName)){
|
||||
String itemText = "Draft,Public Notice,Release";
|
||||
setBlank(text, run, sb, itemText);
|
||||
}
|
||||
if("用法".equals(fieldName)){
|
||||
String itemText = "强制,推荐,安装需符合";
|
||||
setBlank(text, run, sb, itemText);
|
||||
}
|
||||
if("Usage".equals(fieldName)){
|
||||
String itemText = "Constraint,Recommend,Installation Is Compliant";
|
||||
setBlank(text, run, sb, itemText);
|
||||
}
|
||||
}
|
||||
|
||||
//设置字体样式,大小
|
||||
run.setFontSize(11);
|
||||
run.setFontFamily("Blue Sky Noto Regular");
|
||||
|
||||
}
|
||||
|
||||
private static void setBlank(String text, XWPFRun run, StringBuilder sb, String itemText) {
|
||||
for (String value : itemText.split(",")) {
|
||||
String blank = getBlank(value);
|
||||
if(text.contains(value)){
|
||||
sb.append("■"+value+blank);
|
||||
}else{
|
||||
sb.append("□"+value+blank);
|
||||
}
|
||||
}
|
||||
String[] split = sb.toString().split("\r\n");
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
run.setText(split[i]);
|
||||
if(i<split.length-1){
|
||||
run.addBreak();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String getBlank(String value){
|
||||
String blank = "";
|
||||
switch (value) {
|
||||
case "M":
|
||||
blank = " ";
|
||||
break;
|
||||
case "N":
|
||||
blank = "\r\n";
|
||||
break;
|
||||
case "企业":
|
||||
blank = " ";
|
||||
break;
|
||||
case "整车":
|
||||
blank = " ";
|
||||
break;
|
||||
case "系统/零部件":
|
||||
blank = "\r\n";
|
||||
break;
|
||||
case "新车型":
|
||||
blank = " ";
|
||||
break;
|
||||
case "在产车型`":
|
||||
blank = "";
|
||||
break;
|
||||
case "Enterprise":
|
||||
blank = " ";
|
||||
break;
|
||||
case "Vehicle":
|
||||
blank = " ";
|
||||
break;
|
||||
case "System/Parts":
|
||||
blank = "\r\n";
|
||||
break;
|
||||
case "New Car Model":
|
||||
blank = " ";
|
||||
break;
|
||||
case "Models In Production":
|
||||
blank = "";
|
||||
break;
|
||||
case "草稿":
|
||||
blank = " ";
|
||||
break;
|
||||
case "公示稿":
|
||||
blank = " ";
|
||||
break;
|
||||
case "发布稿":
|
||||
blank = "";
|
||||
break;
|
||||
case "Draft":
|
||||
blank = " ";
|
||||
break;
|
||||
case "Public Notice":
|
||||
blank = " ";
|
||||
break;
|
||||
case "Release":
|
||||
blank = "";
|
||||
break;
|
||||
case "强制":
|
||||
blank = " ";
|
||||
break;
|
||||
case "推荐":
|
||||
blank = " ";
|
||||
break;
|
||||
case "安装需符合":
|
||||
blank = "";
|
||||
break;
|
||||
case "Constraint":
|
||||
blank = " ";
|
||||
break;
|
||||
case "Recommend":
|
||||
blank = " ";
|
||||
break;
|
||||
case "Installation Is Compliant":
|
||||
blank = "";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return blank;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置页边距,字体样式,超链接
|
||||
* @param cell
|
||||
* @param text
|
||||
*/
|
||||
public static void cellLink(XWPFTableCell cell,String text){
|
||||
//1. 单元格页边距
|
||||
CTTc ctTc = cell.getCTTc();
|
||||
CTTcPr cttcpr =ctTc.isSetTcPr() ? ctTc.getTcPr() : ctTc.addNewTcPr();
|
||||
CTTcMar ctTcMar = cttcpr.isSetTcMar() ? cttcpr.getTcMar() : cttcpr.addNewTcMar();
|
||||
(ctTcMar.isSetLeft() ? ctTcMar.getLeft() : ctTcMar.addNewLeft()).setW(BigInteger.valueOf(119));//左边距
|
||||
(ctTcMar.isSetTop() ? ctTcMar.getTop() : ctTcMar.addNewTop()).setW(BigInteger.valueOf(63));//上边距
|
||||
// (ctTcMar.isSetRight() ? ctTcMar.getRight() : ctTcMar.addNewRight()).setW(BigInteger.valueOf(100));
|
||||
// (ctTcMar.isSetBottom() ? ctTcMar.getBottom() : ctTcMar.addNewBottom()).setW(BigInteger.valueOf(100));
|
||||
|
||||
//2. 设置文本及文本的字体
|
||||
CTP ctP = (ctTc.sizeOfPArray() == 0) ?
|
||||
ctTc.addNewP() : ctTc.getPArray(0);
|
||||
XWPFParagraph paragraph = cell.getParagraph(ctP);
|
||||
|
||||
|
||||
//3. 单元格内容超链接(只有带http的链接才能跳转,纯文本无法跳转)
|
||||
String id = paragraph
|
||||
.getDocument()
|
||||
.getPackagePart()
|
||||
.addExternalRelationship(text,
|
||||
XWPFRelation.HYPERLINK.getRelation()).getId();
|
||||
// Append the link and bind it to the relationship
|
||||
CTHyperlink cLink = paragraph.getCTP().addNewHyperlink();
|
||||
cLink.setId(id);
|
||||
|
||||
// Create the linked text
|
||||
CTText ctText = CTText.Factory.newInstance();
|
||||
ctText.setStringValue(text);
|
||||
// ctText.setStringValue(text);
|
||||
CTR ctr = CTR.Factory.newInstance();
|
||||
CTRPr rpr = ctr.addNewRPr();
|
||||
|
||||
//设置超链接样式
|
||||
CTColor color = CTColor.Factory.newInstance();
|
||||
color.setVal("0000FF");
|
||||
rpr.setColor(color);
|
||||
//下划线
|
||||
// rpr.addNewU().setVal(STUnderline.SINGLE);
|
||||
|
||||
//设置字体
|
||||
CTFonts fonts = rpr.isSetRFonts() ? rpr.getRFonts() : rpr.addNewRFonts();
|
||||
fonts.setAscii("Blue Sky Noto Regular");
|
||||
fonts.setEastAsia("Blue Sky Noto Regular");
|
||||
fonts.setHAnsi("Blue Sky Noto Regular");
|
||||
|
||||
|
||||
ctr.setTArray(new CTText[] { ctText });
|
||||
// Insert the linked text into the link
|
||||
cLink.setRArray(new CTR[] { ctr });
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+39
-13
@@ -338,7 +338,6 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
queryMap.put(key, queryMapTemp);
|
||||
map.put("match",queryMap);
|
||||
}
|
||||
|
||||
must.add(map);
|
||||
}
|
||||
}
|
||||
@@ -350,11 +349,18 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
String key = entry.getKey();
|
||||
String value = (String) entry.getValue();
|
||||
if("technology_territory".equals(key) && ObjectUtils.isNotEmpty(value)){
|
||||
Map<String, Object> queryMapNew = new HashMap<>();
|
||||
Map<String, Object> queryMapTempNew = new HashMap<>();
|
||||
queryMapTempNew.put(key, "*"+value.replaceAll(",","*")+"*");
|
||||
queryMapNew.put("wildcard", queryMapTempNew);
|
||||
must.add(queryMapNew);
|
||||
JSONArray should = new JSONArray();
|
||||
|
||||
List<Map<String,Object>> mapList = new ArrayList<>();
|
||||
for (String s : value.split(",")) {
|
||||
Map<String,Object> map = new HashMap();
|
||||
map.put(key,"*"+s+"*");
|
||||
Map<String,Object> map1 = new HashMap<>();
|
||||
map1.put("wildcard",map);
|
||||
should.add(map1);
|
||||
}
|
||||
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, should);
|
||||
must.add(jsonObject);
|
||||
}else{
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
Map<String, Object> queryMap = new HashMap<>();
|
||||
@@ -520,6 +526,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
}
|
||||
|
||||
JSONObject sort = new JSONObject();
|
||||
// JSONObject sort = new JSONObject(new LinkedHashMap<>());
|
||||
if(StringUtils.isEmpty(selectValue) || StringUtils.equals(selectValue,SEARCH_FLAG)){
|
||||
Map<String,Object> createTime = new HashMap<>();
|
||||
Map<String,Object> createTime1 = new HashMap<>();
|
||||
@@ -531,7 +538,12 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
Map<String,Object> score1 = new HashMap<>();
|
||||
score.put("order","desc");
|
||||
score1.put("_score",score);
|
||||
// Map<String,Object> score2 = new HashMap<>();
|
||||
// Map<String,Object> score3 = new HashMap<>();
|
||||
// score2.put("order","desc");
|
||||
// score3.put("_id",score2);
|
||||
sort.putAll(score1);
|
||||
// sort.putAll(score3);
|
||||
}
|
||||
log.info("搜索中心-全部索引,排序方式为:" + sort.toJSONString());
|
||||
|
||||
@@ -557,13 +569,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
if("serial_number".equals(field)){
|
||||
map31.put("boost",10);
|
||||
}else if("title".equals(field)){
|
||||
map31.put("boost",10);
|
||||
map31.put("boost",8);
|
||||
}else if("file_text".equals(field)){
|
||||
map31.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map31.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map31.put("boost",10);
|
||||
map31.put("boost",5);
|
||||
}
|
||||
map31.put("value", selectValue);
|
||||
map21.put(field + ".keyword", map31);
|
||||
@@ -577,13 +589,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
if("serial_number".equals(field)){
|
||||
map32.put("boost",10);
|
||||
}else if("title".equals(field)){
|
||||
map32.put("boost",10);
|
||||
map32.put("boost",8);
|
||||
}else if("file_text".equals(field)){
|
||||
map32.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map32.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map32.put("boost",10);
|
||||
map32.put("boost",5);
|
||||
}
|
||||
map32.put("query", selectValue);
|
||||
map22.put(field, map32);
|
||||
@@ -598,13 +610,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
if("serial_number".equals(field)){
|
||||
map33.put("boost",10);
|
||||
}else if("title".equals(field)){
|
||||
map33.put("boost",10);
|
||||
map33.put("boost",8);
|
||||
}else if("file_text".equals(field)){
|
||||
map33.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map33.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map33.put("boost",10);
|
||||
map33.put("boost",5);
|
||||
}
|
||||
map33.put("query", selectValue);
|
||||
map23.put(field, map33);
|
||||
@@ -615,7 +627,21 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
//情况举例:用户只记得中间那段字
|
||||
Map<String, Object> map24 = new HashMap<>();
|
||||
Map<String, Object> map44 = new HashMap<>();
|
||||
map24.put(field, "*" + selectValue + "*");
|
||||
Map<String, Object> map55 = new HashMap<>();
|
||||
map55.put("value","*" + selectValue + "*");
|
||||
if("serial_number".equals(field)){
|
||||
map55.put("boost",10);
|
||||
}else if("title".equals(field)){
|
||||
map55.put("boost",8);
|
||||
}else if("file_text".equals(field)){
|
||||
map55.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map55.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map55.put("boost",5);
|
||||
}
|
||||
|
||||
map24.put(field, map55);
|
||||
map44.put("wildcard",map24);
|
||||
queryMapJson.add(map44);
|
||||
}
|
||||
|
||||
+9
-1
@@ -500,7 +500,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
int pageNo = Integer.parseInt((String) parameter.get("pageNo"));
|
||||
int pageSize = Integer.parseInt((String) parameter.get("pageSize"));
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
IPage infoPage = dao.getInfoPage(page, " " + "sar_file_split_items.*", condition);
|
||||
IPage infoPage = dao.getInfoPage(page, " " + "sar_file_split_menu.display_seq,sar_file_split_items.*", condition);
|
||||
|
||||
//树形数据字典
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
@@ -575,6 +575,14 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
//如果value中包含英文单、双引号,替换成中文的。 英文的符号影响到法规技术评估流程了。
|
||||
if(entry.getValue() != null){
|
||||
if(StringUtils.contains(entry.getValue().toString(),"'") || StringUtils.contains(entry.getValue().toString(),"\"")){
|
||||
String key = entry.getKey();
|
||||
String value = entry.getValue().toString().replaceAll("'", "‘").replaceAll("\"", "”");
|
||||
record1.put(key,value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 拼接文件名
|
||||
|
||||
+11
-2
@@ -53,6 +53,13 @@ public class TimedTaskWarn implements Job {
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
/**
|
||||
* 法规预警定时任务
|
||||
* 新车型实施日期,在产车实施日期,提前6个月和提前12个月发消息
|
||||
* 新车型实施日期,在产车实施日期, 到期当天发消息
|
||||
* @param jobExecutionContext
|
||||
* @throws JobExecutionException
|
||||
*/
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
//获取所有的法规
|
||||
@@ -110,12 +117,13 @@ public class TimedTaskWarn implements Job {
|
||||
//The implementation date of the standard GB 7258 new model you subscribed to is 2022-01-01,
|
||||
// please pay attention to check
|
||||
if(ObjectUtils.isNotEmpty(xin1Che1Xing2Shi2Shi1Ri4Qi1)){
|
||||
String xin1Che1Xing2Shi2Shi1Ri4Qi1Str = sdf.format(xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||
//当前时间的前6个月
|
||||
String beforeTimeSix = beforeTime(6,xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||
//当前时间的前12个月
|
||||
String beforeTimeSixTen = beforeTime(12,xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||
|
||||
if(currentTime.equals(beforeTimeSix) || currentTime.equals(beforeTimeSixTen)){
|
||||
if(currentTime.equals(beforeTimeSix) || currentTime.equals(beforeTimeSixTen) || currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str)){
|
||||
//发送站内消息和飞书消息
|
||||
String format = sdf.format(xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||
String content = "The implementation date of the " + category +" "+ serialNumber
|
||||
@@ -131,11 +139,12 @@ public class TimedTaskWarn implements Job {
|
||||
//The implementation date of the standard GB 7258 in production vehicle you subscribed to is 2022-01-01,
|
||||
// please pay attention to check
|
||||
if(ObjectUtils.isNotEmpty(implementTime)){
|
||||
String implementTimeStr = sdf.format(implementTime);
|
||||
//当前时间的前6个月
|
||||
String beforeTimeSix = beforeTime(6,implementTime);
|
||||
//当前时间的前12个月
|
||||
String beforeTimeSixTen = beforeTime(12,implementTime);
|
||||
if(currentTime.equals(beforeTimeSix) || currentTime.equals(beforeTimeSixTen)){
|
||||
if(currentTime.equals(beforeTimeSix) || currentTime.equals(beforeTimeSixTen) || currentTime.equals(implementTimeStr)){
|
||||
//发送站内消息和飞书消息
|
||||
String format = sdf.format(implementTime);
|
||||
String content = "The implementation date of the " + category +" "+ serialNumber
|
||||
|
||||
-3
@@ -1,10 +1,8 @@
|
||||
package com.jero.modules.wkflow.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
@@ -110,7 +108,6 @@ public class TaskController {
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理任务确认流程回显数据
|
||||
* @param busProcessNames
|
||||
|
||||
+3
@@ -178,4 +178,7 @@ public interface WorkFlowFeignClient {
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/task/getTaskAssigneeListByPrcIds",method = RequestMethod.GET)
|
||||
List<String> getTaskAssigneeListByPrcIds(@RequestParam("actiProcInstIds") String actiProcInstIds);
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/deleteProcessInstanceByPrcIds",method = RequestMethod.GET)
|
||||
Result<String> deleteProcessInstanceByPrcIds(@RequestParam("prcIds") String prcIds);
|
||||
}
|
||||
|
||||
Generated
+377
-10
@@ -5,7 +5,6 @@
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "jero-web",
|
||||
"version": "2.4.2",
|
||||
"dependencies": {
|
||||
"@antv/data-set": "^0.11.4",
|
||||
@@ -19,6 +18,7 @@
|
||||
"dayjs": "^1.8.0",
|
||||
"dom-align": "1.12.0",
|
||||
"echarts": "^5.0.2",
|
||||
"element-ui": "^2.15.10",
|
||||
"enquire.js": "^2.1.6",
|
||||
"jquery": "^3.6.0",
|
||||
"js-base64": "^3.7.2",
|
||||
@@ -26,6 +26,7 @@
|
||||
"jsencrypt": "^3.0.0-rc.1",
|
||||
"lodash.get": "^4.4.2",
|
||||
"lodash.pick": "^4.4.0",
|
||||
"mammoth": "^1.4.21",
|
||||
"md5": "^2.2.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"tinymce": "^5.3.2",
|
||||
@@ -40,6 +41,7 @@
|
||||
"vue-ls": "^3.2.0",
|
||||
"vue-photo-preview": "^1.1.3",
|
||||
"vue-print-nb-jeecg": "^1.0.9",
|
||||
"vue-quill-editor": "^3.0.6",
|
||||
"vue-router": "^3.0.1",
|
||||
"vue-splitpane": "^1.0.4",
|
||||
"vuedraggable": "^2.20.0",
|
||||
@@ -7447,7 +7449,6 @@
|
||||
"version": "1.5.2",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
|
||||
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
@@ -7797,6 +7798,11 @@
|
||||
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
|
||||
"integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw=="
|
||||
},
|
||||
"node_modules/dingbat-to-unicode": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/dingbat-to-unicode/-/dingbat-to-unicode-1.0.1.tgz",
|
||||
"integrity": "sha512-98l0sW87ZT58pU4i61wa2OHwxbiYSbuxsCBozaVnYX2iCnr3bLM3fIes1/ej7h1YdOKuKt/MLs706TVnALA65w=="
|
||||
},
|
||||
"node_modules/dir-glob": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz",
|
||||
@@ -8019,6 +8025,14 @@
|
||||
"ignored": "bin/ignored"
|
||||
}
|
||||
},
|
||||
"node_modules/duck": {
|
||||
"version": "0.1.12",
|
||||
"resolved": "https://registry.npmjs.org/duck/-/duck-0.1.12.tgz",
|
||||
"integrity": "sha512-wkctla1O6VfP89gQ+J/yDesM0S7B7XLXjKGzXxMDVFg7uEn706niAtyYovKbyq1oT9YwDcly721/iUWoc8MVRg==",
|
||||
"dependencies": {
|
||||
"underscore": "^1.13.1"
|
||||
}
|
||||
},
|
||||
"node_modules/duplexer": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",
|
||||
@@ -8089,6 +8103,38 @@
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.644.tgz",
|
||||
"integrity": "sha512-N7FLvjDPADxad+OXXBuYfcvDvCBG0aW8ZZGr7G91sZMviYbnQJFxdSvUus4SJ0K7Q8dzMxE+Wx1d/CrJIIJ0sw=="
|
||||
},
|
||||
"node_modules/element-ui": {
|
||||
"version": "2.15.10",
|
||||
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.10.tgz",
|
||||
"integrity": "sha512-jmD++mU2wKXbisvx4fxOl2mHaU+HWHTAq/3Wf8x9Bwyu4GdDZPLABb+CGi3DWN6fPqdgRcd74aX39DO+YHObLw==",
|
||||
"dependencies": {
|
||||
"async-validator": "~1.8.1",
|
||||
"babel-helper-vue-jsx-merge-props": "^2.0.0",
|
||||
"deepmerge": "^1.2.0",
|
||||
"normalize-wheel": "^1.0.1",
|
||||
"resize-observer-polyfill": "^1.5.0",
|
||||
"throttle-debounce": "^1.0.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^2.5.17"
|
||||
}
|
||||
},
|
||||
"node_modules/element-ui/node_modules/async-validator": {
|
||||
"version": "1.8.5",
|
||||
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz",
|
||||
"integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
|
||||
"dependencies": {
|
||||
"babel-runtime": "6.x"
|
||||
}
|
||||
},
|
||||
"node_modules/element-ui/node_modules/throttle-debounce": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
|
||||
"integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg==",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/elliptic": {
|
||||
"version": "6.5.4",
|
||||
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
|
||||
@@ -9319,8 +9365,7 @@
|
||||
"node_modules/extend": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
|
||||
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
|
||||
"dev": true
|
||||
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
|
||||
},
|
||||
"node_modules/extend-shallow": {
|
||||
"version": "3.0.2",
|
||||
@@ -9506,6 +9551,11 @@
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
||||
},
|
||||
"node_modules/fast-diff": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz",
|
||||
"integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig=="
|
||||
},
|
||||
"node_modules/fast-glob": {
|
||||
"version": "2.2.7",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
|
||||
@@ -10692,6 +10742,11 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/immediate": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
|
||||
"integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ=="
|
||||
},
|
||||
"node_modules/import-cwd": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz",
|
||||
@@ -11517,6 +11572,17 @@
|
||||
"verror": "1.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/jszip": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz",
|
||||
"integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==",
|
||||
"dependencies": {
|
||||
"lie": "~3.3.0",
|
||||
"pako": "~1.0.2",
|
||||
"readable-stream": "~2.3.6",
|
||||
"setimmediate": "^1.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/killable": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz",
|
||||
@@ -11675,6 +11741,14 @@
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/lie": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
|
||||
"integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==",
|
||||
"dependencies": {
|
||||
"immediate": "~3.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/lines-and-columns": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
|
||||
@@ -11981,6 +12055,16 @@
|
||||
"loose-envify": "cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/lop": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lop/-/lop-0.4.1.tgz",
|
||||
"integrity": "sha512-9xyho9why2A2tzm5aIcMWKvzqKsnxrf9B5I+8O30olh6lQU8PH978LqZoI4++37RBgS1Em5i54v1TFs/3wnmXQ==",
|
||||
"dependencies": {
|
||||
"duck": "^0.1.12",
|
||||
"option": "~0.2.1",
|
||||
"underscore": "^1.13.1"
|
||||
}
|
||||
},
|
||||
"node_modules/loud-rejection": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
|
||||
@@ -12032,6 +12116,35 @@
|
||||
"semver": "bin/semver.js"
|
||||
}
|
||||
},
|
||||
"node_modules/mammoth": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/mammoth/-/mammoth-1.5.1.tgz",
|
||||
"integrity": "sha512-7ZioZBf/1HjYrm1qZJOO+DD+rYxLvwrHS+HVOwW89hwIp+r6ZqJ/Eq2rXSS+8ezZ3/DuW6FUUp2Dfz6e7B2pBQ==",
|
||||
"dependencies": {
|
||||
"argparse": "~1.0.3",
|
||||
"bluebird": "~3.4.0",
|
||||
"dingbat-to-unicode": "^1.0.1",
|
||||
"jszip": "^3.7.1",
|
||||
"lop": "^0.4.1",
|
||||
"path-is-absolute": "^1.0.0",
|
||||
"sax": "~1.1.1",
|
||||
"underscore": "^1.13.1",
|
||||
"xmlbuilder": "^10.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"mammoth": "bin/mammoth"
|
||||
}
|
||||
},
|
||||
"node_modules/mammoth/node_modules/bluebird": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz",
|
||||
"integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA=="
|
||||
},
|
||||
"node_modules/mammoth/node_modules/sax": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.1.6.tgz",
|
||||
"integrity": "sha512-8zci48uUQyfqynGDSkUMD7FCJB96hwLnlZOXlgs1l3TX+LW27t3psSWKUxC0fxVgA86i8tL4NwGcY1h/6t3ESg=="
|
||||
},
|
||||
"node_modules/map-cache": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
|
||||
@@ -12769,6 +12882,11 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-wheel": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
|
||||
"integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
|
||||
},
|
||||
"node_modules/npm-run-path": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
||||
@@ -13062,6 +13180,11 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/option": {
|
||||
"version": "0.2.4",
|
||||
"resolved": "https://registry.npmjs.org/option/-/option-0.2.4.tgz",
|
||||
"integrity": "sha512-pkEqbDyl8ou5cpq+VsnQbe/WlEy5qS7xPzMS1U55OCG9KPvwFD46zDbxQIj3egJSFc3D+XhYOPUzz49zQAVy7A=="
|
||||
},
|
||||
"node_modules/optionator": {
|
||||
"version": "0.8.3",
|
||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
|
||||
@@ -13259,6 +13382,11 @@
|
||||
"no-case": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/parchment": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/parchment/-/parchment-1.1.4.tgz",
|
||||
"integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg=="
|
||||
},
|
||||
"node_modules/parent-module": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
|
||||
@@ -16427,6 +16555,45 @@
|
||||
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
|
||||
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ=="
|
||||
},
|
||||
"node_modules/quill": {
|
||||
"version": "1.3.7",
|
||||
"resolved": "https://registry.npmjs.org/quill/-/quill-1.3.7.tgz",
|
||||
"integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==",
|
||||
"dependencies": {
|
||||
"clone": "^2.1.1",
|
||||
"deep-equal": "^1.0.1",
|
||||
"eventemitter3": "^2.0.3",
|
||||
"extend": "^3.0.2",
|
||||
"parchment": "^1.1.4",
|
||||
"quill-delta": "^3.6.2"
|
||||
}
|
||||
},
|
||||
"node_modules/quill-delta": {
|
||||
"version": "3.6.3",
|
||||
"resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-3.6.3.tgz",
|
||||
"integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==",
|
||||
"dependencies": {
|
||||
"deep-equal": "^1.0.1",
|
||||
"extend": "^3.0.2",
|
||||
"fast-diff": "1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/quill/node_modules/clone": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
|
||||
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/quill/node_modules/eventemitter3": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz",
|
||||
"integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg=="
|
||||
},
|
||||
"node_modules/raf": {
|
||||
"version": "3.4.1",
|
||||
"resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz",
|
||||
@@ -18953,6 +19120,11 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/underscore": {
|
||||
"version": "1.13.6",
|
||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz",
|
||||
"integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A=="
|
||||
},
|
||||
"node_modules/unicode-canonical-property-names-ecmascript": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz",
|
||||
@@ -20058,6 +20230,19 @@
|
||||
"babel-plugin-transform-runtime": "^6.23.0"
|
||||
}
|
||||
},
|
||||
"node_modules/vue-quill-editor": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/vue-quill-editor/-/vue-quill-editor-3.0.6.tgz",
|
||||
"integrity": "sha512-g20oSZNWg8Hbu41Kinjd55e235qVWPLfg4NvsLW6d+DhgBTFbEuMpcWlUdrD6qT3+Noim6DRu18VLM9lVShXOQ==",
|
||||
"dependencies": {
|
||||
"object-assign": "^4.1.1",
|
||||
"quill": "^1.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 4.0.0",
|
||||
"npm": ">= 3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/vue-ref": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-ref/-/vue-ref-2.0.0.tgz",
|
||||
@@ -21124,6 +21309,14 @@
|
||||
"resolved": "https://registry.npmjs.org/xe-utils/-/xe-utils-2.4.8.tgz",
|
||||
"integrity": "sha512-/95ZaQK9GJE/EYrpMv9lgKdkEMQwWv4a4TF4dddi4gSzZ33vp/rZvzJNNV9XknaOkMizK9IBSX8CB/nL+SAk0Q=="
|
||||
},
|
||||
"node_modules/xmlbuilder": {
|
||||
"version": "10.1.1",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-10.1.1.tgz",
|
||||
"integrity": "sha512-OyzrcFLL/nb6fMGHbiRDuPup9ljBycsdCypwuyg5AAHvyWzGfChJpCXMG88AGTIMFhGZ9RccFN1e6lhg3hkwKg==",
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/xtend": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||
@@ -27565,8 +27758,7 @@
|
||||
"deepmerge": {
|
||||
"version": "1.5.2",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
|
||||
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
|
||||
},
|
||||
"default-gateway": {
|
||||
"version": "5.0.5",
|
||||
@@ -27837,6 +28029,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dingbat-to-unicode": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/dingbat-to-unicode/-/dingbat-to-unicode-1.0.1.tgz",
|
||||
"integrity": "sha512-98l0sW87ZT58pU4i61wa2OHwxbiYSbuxsCBozaVnYX2iCnr3bLM3fIes1/ej7h1YdOKuKt/MLs706TVnALA65w=="
|
||||
},
|
||||
"dir-glob": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz",
|
||||
@@ -28034,6 +28231,14 @@
|
||||
"minimatch": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"duck": {
|
||||
"version": "0.1.12",
|
||||
"resolved": "https://registry.npmjs.org/duck/-/duck-0.1.12.tgz",
|
||||
"integrity": "sha512-wkctla1O6VfP89gQ+J/yDesM0S7B7XLXjKGzXxMDVFg7uEn706niAtyYovKbyq1oT9YwDcly721/iUWoc8MVRg==",
|
||||
"requires": {
|
||||
"underscore": "^1.13.1"
|
||||
}
|
||||
},
|
||||
"duplexer": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",
|
||||
@@ -28099,6 +28304,34 @@
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.644.tgz",
|
||||
"integrity": "sha512-N7FLvjDPADxad+OXXBuYfcvDvCBG0aW8ZZGr7G91sZMviYbnQJFxdSvUus4SJ0K7Q8dzMxE+Wx1d/CrJIIJ0sw=="
|
||||
},
|
||||
"element-ui": {
|
||||
"version": "2.15.10",
|
||||
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.10.tgz",
|
||||
"integrity": "sha512-jmD++mU2wKXbisvx4fxOl2mHaU+HWHTAq/3Wf8x9Bwyu4GdDZPLABb+CGi3DWN6fPqdgRcd74aX39DO+YHObLw==",
|
||||
"requires": {
|
||||
"async-validator": "~1.8.1",
|
||||
"babel-helper-vue-jsx-merge-props": "^2.0.0",
|
||||
"deepmerge": "^1.2.0",
|
||||
"normalize-wheel": "^1.0.1",
|
||||
"resize-observer-polyfill": "^1.5.0",
|
||||
"throttle-debounce": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"async-validator": {
|
||||
"version": "1.8.5",
|
||||
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz",
|
||||
"integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
|
||||
"requires": {
|
||||
"babel-runtime": "6.x"
|
||||
}
|
||||
},
|
||||
"throttle-debounce": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
|
||||
"integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"elliptic": {
|
||||
"version": "6.5.4",
|
||||
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
|
||||
@@ -29083,8 +29316,7 @@
|
||||
"extend": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
|
||||
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
|
||||
"dev": true
|
||||
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
|
||||
},
|
||||
"extend-shallow": {
|
||||
"version": "3.0.2",
|
||||
@@ -29233,6 +29465,11 @@
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
||||
},
|
||||
"fast-diff": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz",
|
||||
"integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig=="
|
||||
},
|
||||
"fast-glob": {
|
||||
"version": "2.2.7",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
|
||||
@@ -30202,6 +30439,11 @@
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"immediate": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
|
||||
"integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ=="
|
||||
},
|
||||
"import-cwd": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz",
|
||||
@@ -30829,6 +31071,17 @@
|
||||
"verror": "1.10.0"
|
||||
}
|
||||
},
|
||||
"jszip": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz",
|
||||
"integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==",
|
||||
"requires": {
|
||||
"lie": "~3.3.0",
|
||||
"pako": "~1.0.2",
|
||||
"readable-stream": "~2.3.6",
|
||||
"setimmediate": "^1.0.5"
|
||||
}
|
||||
},
|
||||
"killable": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz",
|
||||
@@ -30952,6 +31205,14 @@
|
||||
"type-check": "~0.3.2"
|
||||
}
|
||||
},
|
||||
"lie": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
|
||||
"integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==",
|
||||
"requires": {
|
||||
"immediate": "~3.0.5"
|
||||
}
|
||||
},
|
||||
"lines-and-columns": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
|
||||
@@ -31219,6 +31480,16 @@
|
||||
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||
}
|
||||
},
|
||||
"lop": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/lop/-/lop-0.4.1.tgz",
|
||||
"integrity": "sha512-9xyho9why2A2tzm5aIcMWKvzqKsnxrf9B5I+8O30olh6lQU8PH978LqZoI4++37RBgS1Em5i54v1TFs/3wnmXQ==",
|
||||
"requires": {
|
||||
"duck": "^0.1.12",
|
||||
"option": "~0.2.1",
|
||||
"underscore": "^1.13.1"
|
||||
}
|
||||
},
|
||||
"loud-rejection": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
|
||||
@@ -31260,6 +31531,34 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"mammoth": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/mammoth/-/mammoth-1.5.1.tgz",
|
||||
"integrity": "sha512-7ZioZBf/1HjYrm1qZJOO+DD+rYxLvwrHS+HVOwW89hwIp+r6ZqJ/Eq2rXSS+8ezZ3/DuW6FUUp2Dfz6e7B2pBQ==",
|
||||
"requires": {
|
||||
"argparse": "~1.0.3",
|
||||
"bluebird": "~3.4.0",
|
||||
"dingbat-to-unicode": "^1.0.1",
|
||||
"jszip": "^3.7.1",
|
||||
"lop": "^0.4.1",
|
||||
"path-is-absolute": "^1.0.0",
|
||||
"sax": "~1.1.1",
|
||||
"underscore": "^1.13.1",
|
||||
"xmlbuilder": "^10.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"bluebird": {
|
||||
"version": "3.4.7",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz",
|
||||
"integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA=="
|
||||
},
|
||||
"sax": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.1.6.tgz",
|
||||
"integrity": "sha512-8zci48uUQyfqynGDSkUMD7FCJB96hwLnlZOXlgs1l3TX+LW27t3psSWKUxC0fxVgA86i8tL4NwGcY1h/6t3ESg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"map-cache": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
|
||||
@@ -31878,6 +32177,11 @@
|
||||
"sort-keys": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"normalize-wheel": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
|
||||
"integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
|
||||
},
|
||||
"npm-run-path": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
||||
@@ -32092,6 +32396,11 @@
|
||||
"is-wsl": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"option": {
|
||||
"version": "0.2.4",
|
||||
"resolved": "https://registry.npmjs.org/option/-/option-0.2.4.tgz",
|
||||
"integrity": "sha512-pkEqbDyl8ou5cpq+VsnQbe/WlEy5qS7xPzMS1U55OCG9KPvwFD46zDbxQIj3egJSFc3D+XhYOPUzz49zQAVy7A=="
|
||||
},
|
||||
"optionator": {
|
||||
"version": "0.8.3",
|
||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
|
||||
@@ -32251,6 +32560,11 @@
|
||||
"no-case": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"parchment": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/parchment/-/parchment-1.1.4.tgz",
|
||||
"integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg=="
|
||||
},
|
||||
"parent-module": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
|
||||
@@ -34870,6 +35184,41 @@
|
||||
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
|
||||
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ=="
|
||||
},
|
||||
"quill": {
|
||||
"version": "1.3.7",
|
||||
"resolved": "https://registry.npmjs.org/quill/-/quill-1.3.7.tgz",
|
||||
"integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==",
|
||||
"requires": {
|
||||
"clone": "^2.1.1",
|
||||
"deep-equal": "^1.0.1",
|
||||
"eventemitter3": "^2.0.3",
|
||||
"extend": "^3.0.2",
|
||||
"parchment": "^1.1.4",
|
||||
"quill-delta": "^3.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"clone": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
|
||||
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w=="
|
||||
},
|
||||
"eventemitter3": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz",
|
||||
"integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"quill-delta": {
|
||||
"version": "3.6.3",
|
||||
"resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-3.6.3.tgz",
|
||||
"integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==",
|
||||
"requires": {
|
||||
"deep-equal": "^1.0.1",
|
||||
"extend": "^3.0.2",
|
||||
"fast-diff": "1.1.2"
|
||||
}
|
||||
},
|
||||
"raf": {
|
||||
"version": "3.4.1",
|
||||
"resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz",
|
||||
@@ -36915,6 +37264,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"underscore": {
|
||||
"version": "1.13.6",
|
||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz",
|
||||
"integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A=="
|
||||
},
|
||||
"unicode-canonical-property-names-ecmascript": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz",
|
||||
@@ -37268,8 +37622,7 @@
|
||||
"integrity": "sha512-ERAREN+6k/ywrwT+swcMo4CDIAq6dBjnB0+lhmsSfaip06BGHSBfNKg6yl7/4GJ9Nk2kioUw3llNhEboJuIKmQ==",
|
||||
"requires": {
|
||||
"@types/node": "*",
|
||||
"viser": "^2.0.0",
|
||||
"vue": "^2.5.3"
|
||||
"viser": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"vm-browserify": {
|
||||
@@ -37814,6 +38167,15 @@
|
||||
"babel-plugin-transform-runtime": "^6.23.0"
|
||||
}
|
||||
},
|
||||
"vue-quill-editor": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/vue-quill-editor/-/vue-quill-editor-3.0.6.tgz",
|
||||
"integrity": "sha512-g20oSZNWg8Hbu41Kinjd55e235qVWPLfg4NvsLW6d+DhgBTFbEuMpcWlUdrD6qT3+Noim6DRu18VLM9lVShXOQ==",
|
||||
"requires": {
|
||||
"object-assign": "^4.1.1",
|
||||
"quill": "^1.3.4"
|
||||
}
|
||||
},
|
||||
"vue-ref": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-ref/-/vue-ref-2.0.0.tgz",
|
||||
@@ -38665,6 +39027,11 @@
|
||||
"resolved": "https://registry.npmjs.org/xe-utils/-/xe-utils-2.4.8.tgz",
|
||||
"integrity": "sha512-/95ZaQK9GJE/EYrpMv9lgKdkEMQwWv4a4TF4dddi4gSzZ33vp/rZvzJNNV9XknaOkMizK9IBSX8CB/nL+SAk0Q=="
|
||||
},
|
||||
"xmlbuilder": {
|
||||
"version": "10.1.1",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-10.1.1.tgz",
|
||||
"integrity": "sha512-OyzrcFLL/nb6fMGHbiRDuPup9ljBycsdCypwuyg5AAHvyWzGfChJpCXMG88AGTIMFhGZ9RccFN1e6lhg3hkwKg=="
|
||||
},
|
||||
"xtend": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"dayjs": "^1.8.0",
|
||||
"dom-align": "1.12.0",
|
||||
"echarts": "^5.0.2",
|
||||
"element-ui": "^2.15.10",
|
||||
"enquire.js": "^2.1.6",
|
||||
"jquery": "^3.6.0",
|
||||
"js-base64": "^3.7.2",
|
||||
@@ -46,6 +47,7 @@
|
||||
"vue-quill-editor": "^3.0.6",
|
||||
"vue-router": "^3.0.1",
|
||||
"vue-splitpane": "^1.0.4",
|
||||
"vue-virtual-scroll-list": "^2.3.4",
|
||||
"vuedraggable": "^2.20.0",
|
||||
"vuex": "^3.1.0",
|
||||
"vxe-table": "2.9.13",
|
||||
|
||||
@@ -1309,4 +1309,12 @@ module.exports = {
|
||||
importLocalDisassemblyOrder:'Import local disassembly order',
|
||||
notExport:'Not export',
|
||||
hasBeenExport:'Has been export',
|
||||
firstLevelDirectory:'First level directory',
|
||||
deselectAll:'Deselect All',
|
||||
classification:'Classification',
|
||||
consistentAssessment:'Consistent assessment',
|
||||
viewConsistentAssessment:'View Consistent Assessment',
|
||||
viewAll:'View All',
|
||||
endProcess:'End Process',
|
||||
thereForTheCurrentlySelectedData:'There is no standard breakdown for the currently selected data',
|
||||
}
|
||||
@@ -1410,4 +1410,12 @@ module.exports = {
|
||||
importLocalDisassemblyOrder:'导入本地拆解单',
|
||||
notExport:'未导出',
|
||||
hasBeenExport:'已导出',
|
||||
firstLevelDirectory:'一级目录',
|
||||
deselectAll:'取消全选',
|
||||
classification:'分类',
|
||||
consistentAssessment:'一致评估',
|
||||
viewConsistentAssessment:'查看一致评估',
|
||||
viewAll:'查看全部',
|
||||
endProcess:'结束流程',
|
||||
thereForTheCurrentlySelectedData:'当前所选数据暂无标准分解单',
|
||||
}
|
||||
@@ -31,40 +31,66 @@
|
||||
<a-input-search style="margin-bottom: 8px" :placeholder="$t('NodeQuickLookup')"
|
||||
v-model="searchModel" @search="onSearch"/>
|
||||
<div class="drawer-content">
|
||||
<a-tree
|
||||
style="margin-bottom: 60px;height: 600px"
|
||||
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||
<virtualNodeTree
|
||||
v-if="treeVisible"
|
||||
checkable
|
||||
checkStrictly
|
||||
:loading="loading"
|
||||
:tree-data="gData"
|
||||
@check="onCheck"
|
||||
@expand="onExpand"
|
||||
v-model:checkedKeys="defaultCheckedKeys"
|
||||
:defaultExpandedKeys="defaultExpandedKeys"
|
||||
>
|
||||
</a-tree>
|
||||
:keeps="40"
|
||||
show-checkbox
|
||||
v-model="checkboxList"
|
||||
class="treeWrap"
|
||||
:props="{
|
||||
isLeaf: 'leaf'
|
||||
}"
|
||||
:defaultCheckedKeys="defaultCheckedKeys"
|
||||
:check-strictly="false"
|
||||
node-key="id"
|
||||
@check-change="handleCheckChange"
|
||||
:data.sync="gData">
|
||||
<span slot-scope="{ data }">
|
||||
<span>{{ 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 class="drawer-bootom-button">
|
||||
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit" type="primary">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import virtualNodeTree from '@/components/virtualNodeTree/tree'
|
||||
import XEUtils from 'xe-utils'
|
||||
import VXETable from 'vxe-table'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass', 'isDelete', 'disabled'],
|
||||
props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass', 'isDelete', 'disabled', 'selectDepartment'],
|
||||
components: {
|
||||
virtualNodeTree
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
loading: false,
|
||||
gData: [],
|
||||
autoExpandParent: true,
|
||||
checkboxList: [],
|
||||
expandedKeys: [],
|
||||
visible: false,
|
||||
treeVisible: false,
|
||||
@@ -76,21 +102,107 @@
|
||||
defaultExpandedKeys: [],
|
||||
defaultCheckedKeys: [],
|
||||
defaultCheckedKeysName: [],
|
||||
content: []
|
||||
content: [],
|
||||
dataList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleCheckChange(val, checked, indeterminate) {
|
||||
if (checked) {
|
||||
this.userName.push(val.title)
|
||||
this.userIds.push(val.id)
|
||||
} else {
|
||||
for (let i = 0; i < this.userName.length; i++) {
|
||||
if (this.userName[i] == val.title) {
|
||||
this.userName.splice(i, 1)
|
||||
i--
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < this.userIds.length; i++) {
|
||||
if (this.userIds[i] == val.id) {
|
||||
this.userIds.splice(i, 1)
|
||||
i--
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
standardClick() {
|
||||
this.visible = true
|
||||
this.treeVisible = false
|
||||
this.departId = ''
|
||||
this.searchModel = ''
|
||||
this.userIds = []
|
||||
this.userName = []
|
||||
this.queryDepartUserTreeList(1)
|
||||
this.visible = true
|
||||
this.userIds = []
|
||||
let gData = localStorage.getItem('gData')
|
||||
if (gData) {
|
||||
let dataList = JSON.parse(gData)
|
||||
if (!this.selectDepartment) {
|
||||
dataList.forEach(res => {
|
||||
if (res.type == 'Depart') {
|
||||
res.disabled = true
|
||||
}
|
||||
})
|
||||
}
|
||||
this.dataList = this.toTree(dataList)
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (gData) {
|
||||
this.gData = this.dataList
|
||||
this.gData = [...this.gData]
|
||||
// this.treeVisible = true
|
||||
if (this.personneQuery[this.query.db_field_name + 'Name']) {
|
||||
this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',')
|
||||
} else if (this.personneQuery[this.query.db_field_name]) {
|
||||
this.userName = this.personneQuery[this.query.db_field_name].split(',')
|
||||
} else {
|
||||
this.userName = []
|
||||
}
|
||||
if (this.personneQuery[this.query.db_field_name + '_id']) {
|
||||
this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',')
|
||||
} else if (this.personneQuery[this.query.db_field_name]) {
|
||||
this.userIds = this.personneQuery[this.query.db_field_name].split(',')
|
||||
} else {
|
||||
this.userIds = []
|
||||
}
|
||||
this.defaultCheckedKeys = this.userIds
|
||||
this.defaultCheckedKeys = [...this.defaultCheckedKeys]
|
||||
this.treeVisible = true
|
||||
} else {
|
||||
this.queryDepartUserTreeList(1)
|
||||
}
|
||||
}, 200)
|
||||
},
|
||||
//将数据拼成树形结构
|
||||
toTree(config) {
|
||||
// 删除 所有 children,以防止多次调用
|
||||
config.forEach(function(item) {
|
||||
delete item.children
|
||||
})
|
||||
// 将数据存储为 以 id 为 KEY 的 map 索引数据列
|
||||
let map = {}
|
||||
config.forEach((item) => {
|
||||
item.label = item.name
|
||||
item.key = item.id
|
||||
|
||||
item.title = item.name + (item.itemName ? ' ' + item.itemName : '')
|
||||
map[item.id] = item
|
||||
})
|
||||
let val = []
|
||||
config.forEach((item) => {
|
||||
// 以当前遍历项,的pid,去map对象中找到索引的id
|
||||
let parent = map[item.parentId]
|
||||
// 如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中
|
||||
if (parent) {
|
||||
(parent.children || (parent.children = [])).push(item)
|
||||
} else {
|
||||
//如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级
|
||||
val.push(item)
|
||||
}
|
||||
})
|
||||
return val
|
||||
},
|
||||
standardDelete() {
|
||||
this.$emit('input', null)
|
||||
@@ -171,6 +283,12 @@
|
||||
}
|
||||
let userIds = JSON.parse(JSON.stringify(this.userIds))
|
||||
let userName = JSON.parse(JSON.stringify(this.userName))
|
||||
userName = userName.filter(function(item, index) {
|
||||
return userName.indexOf(item) === index // 因为indexOf 只能查找到第一个
|
||||
})
|
||||
userIds = userIds.filter(function(item, index) {
|
||||
return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个
|
||||
})
|
||||
this.$emit('input', userName.join(','))
|
||||
this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript)
|
||||
this.visible = false
|
||||
@@ -188,83 +306,132 @@
|
||||
this.defaultCheckedKeys = []
|
||||
},
|
||||
onSearch(e) {
|
||||
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
|
||||
this.loading = true
|
||||
// this.treeVisible = false
|
||||
let p = new Promise((resolve, reject) => {
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
onExpand(selectedKeys, val) {
|
||||
if (this.searchModel == '' || !this.searchModel) {
|
||||
if (val.expanded) {
|
||||
if (this.departId == val.node.value) {
|
||||
p.then(() => {
|
||||
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)) {
|
||||
content.push(res)
|
||||
}
|
||||
} else if (res.type == 'Depart') {
|
||||
content.push(res)
|
||||
}
|
||||
})
|
||||
this.gData = this.toTree(content)
|
||||
} else {
|
||||
this.departId = val.node.value
|
||||
this.queryDepartUserTreeList(2)
|
||||
this.gData = this.toTree(JSON.parse(gData))
|
||||
}
|
||||
}
|
||||
}
|
||||
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) {
|
||||
let gData = JSON.parse(JSON.stringify(this.gData))
|
||||
if (gData && gData.length > 0) {
|
||||
gData = JSON.stringify(gData)
|
||||
} else {
|
||||
gData = ''
|
||||
}
|
||||
// let gData = JSON.parse(JSON.stringify(this.gData))
|
||||
// if (gData && gData.length > 0) {
|
||||
// gData = JSON.stringify(gData)
|
||||
// } else {
|
||||
// gData = ''
|
||||
// }
|
||||
this.confirmLoading = true
|
||||
postAction('sys/user/queryDepartUserTreeList', {
|
||||
departId: this.departId,
|
||||
json: gData,
|
||||
flag: '1'
|
||||
this.loading = true
|
||||
//queryDepartUserTreeList
|
||||
//queryUserTreeList
|
||||
getAction('sys/user/queryUserTreeList', {
|
||||
// departId: this.departId,
|
||||
// json: gData,
|
||||
// flag: '1'
|
||||
}).then((res) => {
|
||||
this.confirmLoading = false
|
||||
if (res.success) {
|
||||
this.gData = res.result
|
||||
this.defaultExpandedKeys = [this.departId]
|
||||
this.loading = false
|
||||
// localStorage.setItem('gData', JSON.stringify(res.result))
|
||||
// this.toTree(dataList)
|
||||
let content = JSON.parse(JSON.stringify(res.result))
|
||||
if (!this.selectDepartment) {
|
||||
res.result.forEach(res => {
|
||||
if (res.type == 'Depart') {
|
||||
res.disabled = true
|
||||
}
|
||||
})
|
||||
}
|
||||
localStorage.removeItem('gData')
|
||||
localStorage.setItem('gData', JSON.stringify(content))
|
||||
this.gData = this.toTree(res.result)
|
||||
console.log(this.gData)
|
||||
this.gData = [...this.gData]
|
||||
// this.gData[0].isLeaf = false
|
||||
// this.defaultExpandedKeys = [this.departId]
|
||||
if (num == 1) {
|
||||
if (this.userName && this.userName.length == 0) {
|
||||
if (this.personneQuery[this.query.db_field_name + 'Name']) {
|
||||
this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',')
|
||||
} else if (this.personneQuery[this.query.db_field_name]) {
|
||||
this.userName = this.personneQuery[this.query.db_field_name].split(',')
|
||||
} else {
|
||||
this.userName = []
|
||||
}
|
||||
// if (this.userName && this.userName.length == 0) {
|
||||
if (this.personneQuery[this.query.db_field_name + 'Name']) {
|
||||
this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',')
|
||||
} else if (this.personneQuery[this.query.db_field_name]) {
|
||||
this.userName = this.personneQuery[this.query.db_field_name].split(',')
|
||||
} else {
|
||||
this.userName = []
|
||||
}
|
||||
if (this.userIds && this.userIds.length == 0) {
|
||||
if (this.personneQuery[this.query.db_field_name + '_id']) {
|
||||
this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',')
|
||||
} else if (this.personneQuery[this.query.db_field_name]) {
|
||||
this.userIds = this.personneQuery[this.query.db_field_name].split(',')
|
||||
} else {
|
||||
this.userIds = []
|
||||
}
|
||||
// }
|
||||
// if (this.userIds && this.userIds.length == 0) {
|
||||
if (this.personneQuery[this.query.db_field_name + '_id']) {
|
||||
this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',')
|
||||
} else if (this.personneQuery[this.query.db_field_name]) {
|
||||
this.userIds = this.personneQuery[this.query.db_field_name].split(',')
|
||||
} else {
|
||||
this.userIds = []
|
||||
}
|
||||
// }
|
||||
this.defaultCheckedKeys = this.userIds
|
||||
this.defaultCheckedKeysName = []
|
||||
if (this.defaultCheckedKeys.length > 0) {
|
||||
for (let i = 0; i < this.defaultCheckedKeys.length; i++) {
|
||||
this.defaultCheckedKeysName.push({
|
||||
id: this.defaultCheckedKeys[i],
|
||||
name: this.userName[i]
|
||||
})
|
||||
}
|
||||
}
|
||||
this.defaultCheckedKeys = [...this.defaultCheckedKeys]
|
||||
// this.defaultCheckedKeysName = []
|
||||
// if (this.defaultCheckedKeys.length > 0) {
|
||||
// for (let i = 0; i < this.defaultCheckedKeys.length; i++) {
|
||||
// this.defaultCheckedKeysName.push({
|
||||
// id: this.defaultCheckedKeys[i],
|
||||
// name: this.userName[i]
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
}
|
||||
this.treeVisible = true
|
||||
} else {
|
||||
@@ -311,5 +478,52 @@
|
||||
.drawer-content {
|
||||
height: calc(100% - 60px);
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.my-tree {
|
||||
padding: 0 10px;
|
||||
/*border: 1px solid #e8eaec;*/
|
||||
}
|
||||
|
||||
.my-tree .my-tree-item {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.my-tree .my-tree-item.has-child .tree-icon {
|
||||
visibility: visible;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.my-tree .my-tree-item.is-expand .tree-icon {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.my-tree .tree-icon {
|
||||
cursor: pointer;
|
||||
width: 20px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
visibility: hidden;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.caret-right {
|
||||
margin-right: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
::v-deep .ant-checkbox-group {
|
||||
width: 100%;
|
||||
height: 600px;
|
||||
}
|
||||
|
||||
.treeWrap {
|
||||
height: 600px;
|
||||
}
|
||||
</style>
|
||||
@@ -44,10 +44,6 @@
|
||||
export default {
|
||||
name: 'index',
|
||||
props: {
|
||||
url: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
|
||||
<a-button @click='onClickTitle(record)'>{{$t('See')}}</a-button>
|
||||
</span>
|
||||
|
||||
<span slot="paramsNameDescription" slot-scope="text,record" :title="text">
|
||||
{{ text && text.length > 8 ? text.slice(0, 7) + '...' : text }}
|
||||
</span>
|
||||
<span slot="operationbtn" slot-scope="record">
|
||||
<span v-if='currentPersonRole === "homo"'>
|
||||
<!-- 认证工程师 -->
|
||||
@@ -656,7 +660,7 @@
|
||||
dataIndex: res.db_field_name,
|
||||
align: 'center',
|
||||
// ellipsis: true,
|
||||
fixed: res.click3?'left':'',
|
||||
fixed: res.click5?'left':'',
|
||||
sorter: res.sort,
|
||||
width: 160
|
||||
})
|
||||
@@ -674,6 +678,11 @@
|
||||
customRender: 'ParameterDescription'
|
||||
}
|
||||
}
|
||||
if(res.click3){
|
||||
this.columns[index].scopedSlots = {
|
||||
customRender: 'paramsNameDescription'
|
||||
}
|
||||
}
|
||||
if (res.click) {
|
||||
// 工程接口人列表修改
|
||||
this.columns[index].scopedSlots = {
|
||||
|
||||
@@ -24,7 +24,10 @@
|
||||
<span style='padding-right: 20px'>{{ item.db_field_txt }} </span>
|
||||
<a-button @click='onClickSee(item)'>{{$t('See')}}</a-button>
|
||||
</div>
|
||||
<span slot="ParameterDescription" slot-scope="text,record" :title="text">
|
||||
|
||||
<a-button @click='onClickTitle(record)'>{{$t('See')}}</a-button>
|
||||
</span>
|
||||
<!-- <span slot="operationbtn" slot-scope="record">-->
|
||||
<!-- <span v-if='currentPersonRole === "homo"'>-->
|
||||
<!--<!– 认证工程师 –>-->
|
||||
@@ -130,6 +133,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 参数说明--->
|
||||
<a-modal v-model="seeVisibleView" :title="$t('ParameterDescription')" width='550px' :footer="null">
|
||||
<div class="content-text">
|
||||
<div class="textfield">
|
||||
<span class="textfield-left" :title="$t('ParameterDescription')">{{$t('ParameterDescription')}}:</span>
|
||||
<span class="textfield-right"
|
||||
:title="this.description"
|
||||
>{{this.description}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -232,6 +246,7 @@
|
||||
sdt: 0, // 工程接口人
|
||||
dre: 0, // 填写人
|
||||
areaVisible: false,
|
||||
seeVisibleView:false,
|
||||
form: {},
|
||||
rules: {
|
||||
querySdt: [
|
||||
@@ -278,6 +293,12 @@
|
||||
return 'rowClassRed'
|
||||
}
|
||||
},
|
||||
onClickTitle(val){
|
||||
console.log(val)
|
||||
this.description = val.description
|
||||
this.seeVisibleView = true
|
||||
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
// this.$emit('handlePreservation')
|
||||
@@ -492,6 +513,11 @@
|
||||
customRender: 'operationbtn'
|
||||
}
|
||||
}
|
||||
if(res.click2){
|
||||
this.columns[index].scopedSlots = {
|
||||
customRender: 'ParameterDescription'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
this.columns = [...this.columns]
|
||||
@@ -705,6 +731,34 @@
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent!important;
|
||||
}
|
||||
.textfield {
|
||||
width: 100%;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
|
||||
.textfield-left {
|
||||
width: 80px;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
color: #040B29;
|
||||
font-weight: 400;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.textfield-right {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
//text-overflow: ellipsis;
|
||||
//white-space: nowrap;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
word-break: break-word;
|
||||
color: #040B29;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
.content-text {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
import { getNodeKey } from '../model/util';
|
||||
|
||||
export default {
|
||||
methods: {
|
||||
creator(parent, nodeTag) {
|
||||
const node = this[nodeTag];
|
||||
|
||||
if (parent.isTree) {
|
||||
this.tree = parent;
|
||||
} else {
|
||||
this.tree = parent.tree;
|
||||
}
|
||||
|
||||
const tree = this.tree;
|
||||
if (!tree) {
|
||||
console.warn('Can not find node\'s tree.');
|
||||
}
|
||||
|
||||
const props = tree.props || {};
|
||||
const childrenKey = props['children'] || 'children';
|
||||
|
||||
this.$watch(`${nodeTag}.data.${childrenKey}`, () => {
|
||||
node.updateChildren();
|
||||
});
|
||||
|
||||
if (node.expanded) {
|
||||
this.expanded = true;
|
||||
this.childNodeRendered = true;
|
||||
}
|
||||
|
||||
if (this.tree.accordion) {
|
||||
this.$on('tree-node-expand', currentNode => {
|
||||
if (node !== currentNode) {
|
||||
node.collapse();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
getNodeKey(node) {
|
||||
return getNodeKey(this.tree.nodeKey, node.data);
|
||||
},
|
||||
|
||||
handleSelectChange(checked, indeterminate) {
|
||||
const node = this.node || this.source;
|
||||
|
||||
if (this.oldChecked !== checked && this.oldIndeterminate !== indeterminate) {
|
||||
this.tree.$emit('check-change', node.data, checked, indeterminate);
|
||||
}
|
||||
this.oldChecked = checked;
|
||||
this.indeterminate = indeterminate;
|
||||
},
|
||||
|
||||
handleClick() {
|
||||
const node = this.node || this.source;
|
||||
const store = this.tree.store;
|
||||
|
||||
store.setCurrentNode(node);
|
||||
this.tree.$emit('current-change', store.currentNode ? store.currentNode.data : null, store.currentNode);
|
||||
this.tree.currentNode = this;
|
||||
if (this.tree.expandOnClickNode) {
|
||||
this.handleExpandIconClick();
|
||||
}
|
||||
if (this.tree.checkOnClickNode && !node.disabled) {
|
||||
this.handleCheckChange(null, {
|
||||
target: { checked: !node.checked }
|
||||
});
|
||||
}
|
||||
|
||||
this.tree.$emit('node-click', node.data, node, this);
|
||||
},
|
||||
|
||||
handleContextMenu(event) {
|
||||
const node = this.node || this.source;
|
||||
|
||||
if (this.tree._events['node-contextmenu'] && this.tree._events['node-contextmenu'].length > 0) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
}
|
||||
this.tree.$emit('node-contextmenu', event, node.data, node, this);
|
||||
},
|
||||
|
||||
handleExpandIconClick() {
|
||||
const node = this.node || this.source;
|
||||
|
||||
if (node.isLeaf) return;
|
||||
if (this.expanded) {
|
||||
this.tree.$emit('node-collapse', node.data, node, this);
|
||||
node.collapse();
|
||||
} else {
|
||||
node.expand();
|
||||
this.$emit('node-expand', node.data, node, this);
|
||||
}
|
||||
},
|
||||
|
||||
handleCheckChange(_, ev) {
|
||||
const node = this.node || this.source;
|
||||
|
||||
node.setChecked(ev.target.checked, !this.tree.checkStrictly);
|
||||
this.$nextTick(() => {
|
||||
const store = this.tree.store;
|
||||
this.tree.$emit('check', node.data, {
|
||||
checkedNodes: store.getCheckedNodes(),
|
||||
checkedKeys: store.getCheckedKeys(),
|
||||
halfCheckedNodes: store.getHalfCheckedNodes(),
|
||||
halfCheckedKeys: store.getHalfCheckedKeys()
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
handleChildNodeExpand(nodeData, node, instance) {
|
||||
this.broadcast('ElTreeNode', 'tree-node-expand', node);
|
||||
this.tree.$emit('node-expand', nodeData, node, instance);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,486 @@
|
||||
import objectAssign from 'element-ui/src/utils/merge';
|
||||
import { markNodeData, NODE_KEY } from './util';
|
||||
import { arrayFindIndex } from 'element-ui/src/utils/util';
|
||||
|
||||
export const getChildState = node => {
|
||||
let all = true;
|
||||
let none = true;
|
||||
let allWithoutDisable = true;
|
||||
for (let i = 0, j = node.length; i < j; i++) {
|
||||
const n = node[i];
|
||||
if (n.checked !== true || n.indeterminate) {
|
||||
all = false;
|
||||
if (!n.disabled) {
|
||||
allWithoutDisable = false;
|
||||
}
|
||||
}
|
||||
if (n.checked !== false || n.indeterminate) {
|
||||
none = false;
|
||||
}
|
||||
}
|
||||
|
||||
return { all, none, allWithoutDisable, half: !all && !none };
|
||||
};
|
||||
|
||||
const reInitChecked = function(node) {
|
||||
if (node.childNodes.length === 0) return;
|
||||
|
||||
const {all, none, half} = getChildState(node.childNodes);
|
||||
if (all) {
|
||||
node.checked = true;
|
||||
node.indeterminate = false;
|
||||
} else if (half) {
|
||||
node.checked = false;
|
||||
node.indeterminate = true;
|
||||
} else if (none) {
|
||||
node.checked = false;
|
||||
node.indeterminate = false;
|
||||
}
|
||||
|
||||
const parent = node.parent;
|
||||
if (!parent || parent.level === 0) return;
|
||||
|
||||
if (!node.store.checkStrictly) {
|
||||
reInitChecked(parent);
|
||||
}
|
||||
};
|
||||
|
||||
const getPropertyFromData = function(node, prop) {
|
||||
const props = node.store.props;
|
||||
const data = node.data || {};
|
||||
const config = props[prop];
|
||||
|
||||
if (typeof config === 'function') {
|
||||
return config(data, node);
|
||||
} else if (typeof config === 'string') {
|
||||
return data[config];
|
||||
} else if (typeof config === 'undefined') {
|
||||
const dataProp = data[prop];
|
||||
return dataProp === undefined ? '' : dataProp;
|
||||
}
|
||||
};
|
||||
|
||||
let nodeIdSeed = 0;
|
||||
|
||||
export default class Node {
|
||||
constructor(options) {
|
||||
this.id = nodeIdSeed++;
|
||||
this.text = null;
|
||||
this.checked = false;
|
||||
this.indeterminate = false;
|
||||
this.data = null;
|
||||
this.expanded = false;
|
||||
this.parent = null;
|
||||
this.visible = true;
|
||||
this.isCurrent = false;
|
||||
// console.log(22, Object.prototype.hasOwnProperty.call(options, name));
|
||||
for (let name in options) {
|
||||
if (Object.prototype.hasOwnProperty.call(options, name)) {
|
||||
// if (options.hasOwnProperty(name)) {
|
||||
this[name] = options[name];
|
||||
}
|
||||
}
|
||||
|
||||
// internal
|
||||
this.level = 0;
|
||||
this.loaded = false;
|
||||
this.childNodes = [];
|
||||
this.loading = false;
|
||||
|
||||
if (this.parent) {
|
||||
this.level = this.parent.level + 1;
|
||||
}
|
||||
|
||||
const store = this.store;
|
||||
if (!store) {
|
||||
throw new Error('[Node]store is required!');
|
||||
}
|
||||
store.registerNode(this);
|
||||
|
||||
const props = store.props;
|
||||
if (props && typeof props.isLeaf !== 'undefined') {
|
||||
const isLeaf = getPropertyFromData(this, 'isLeaf');
|
||||
if (typeof isLeaf === 'boolean') {
|
||||
this.isLeafByUser = isLeaf;
|
||||
}
|
||||
}
|
||||
|
||||
if (store.lazy !== true && this.data) {
|
||||
this.setData(this.data);
|
||||
|
||||
if (store.defaultExpandAll) {
|
||||
this.expanded = true;
|
||||
}
|
||||
} else if (this.level > 0 && store.lazy && store.defaultExpandAll) {
|
||||
this.expand();
|
||||
}
|
||||
if (!Array.isArray(this.data)) {
|
||||
markNodeData(this, this.data);
|
||||
}
|
||||
if (!this.data) return;
|
||||
const defaultExpandedKeys = store.defaultExpandedKeys;
|
||||
const key = store.key;
|
||||
if (key && defaultExpandedKeys && defaultExpandedKeys.indexOf(this.key) !== -1) {
|
||||
this.expand(null, store.autoExpandParent);
|
||||
}
|
||||
|
||||
if (key && store.currentNodeKey !== undefined && this.key === store.currentNodeKey) {
|
||||
store.currentNode = this;
|
||||
store.currentNode.isCurrent = true;
|
||||
}
|
||||
|
||||
if (store.lazy) {
|
||||
store._initDefaultCheckedNode(this);
|
||||
}
|
||||
|
||||
this.updateLeafState();
|
||||
}
|
||||
|
||||
setData(data) {
|
||||
if (!Array.isArray(data)) {
|
||||
markNodeData(this, data);
|
||||
}
|
||||
|
||||
this.data = data;
|
||||
this.childNodes = [];
|
||||
|
||||
let children;
|
||||
if (this.level === 0 && this.data instanceof Array) {
|
||||
children = this.data;
|
||||
} else {
|
||||
children = getPropertyFromData(this, 'children') || [];
|
||||
}
|
||||
|
||||
for (let i = 0, j = children.length; i < j; i++) {
|
||||
this.insertChild({ data: children[i] });
|
||||
}
|
||||
}
|
||||
|
||||
get label() {
|
||||
return getPropertyFromData(this, 'label');
|
||||
}
|
||||
|
||||
get key() {
|
||||
const nodeKey = this.store.key;
|
||||
if (this.data) return this.data[nodeKey];
|
||||
return null;
|
||||
}
|
||||
|
||||
get disabled() {
|
||||
return getPropertyFromData(this, 'disabled');
|
||||
}
|
||||
|
||||
get nextSibling() {
|
||||
const parent = this.parent;
|
||||
if (parent) {
|
||||
const index = parent.childNodes.indexOf(this);
|
||||
if (index > -1) {
|
||||
return parent.childNodes[index + 1];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
get previousSibling() {
|
||||
const parent = this.parent;
|
||||
if (parent) {
|
||||
const index = parent.childNodes.indexOf(this);
|
||||
if (index > -1) {
|
||||
return index > 0 ? parent.childNodes[index - 1] : null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
contains(target, deep = true) {
|
||||
const walk = function(parent) {
|
||||
const children = parent.childNodes || [];
|
||||
let result = false;
|
||||
for (let i = 0, j = children.length; i < j; i++) {
|
||||
const child = children[i];
|
||||
if (child === target || (deep && walk(child))) {
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
return walk(this);
|
||||
}
|
||||
|
||||
remove() {
|
||||
const parent = this.parent;
|
||||
if (parent) {
|
||||
parent.removeChild(this);
|
||||
}
|
||||
}
|
||||
|
||||
insertChild(child, index, batch) {
|
||||
if (!child) throw new Error('insertChild error: child is required.');
|
||||
|
||||
if (!(child instanceof Node)) {
|
||||
if (!batch) {
|
||||
const children = this.getChildren(true) || [];
|
||||
if (children.indexOf(child.data) === -1) {
|
||||
if (typeof index === 'undefined' || index < 0) {
|
||||
children.push(child.data);
|
||||
} else {
|
||||
children.splice(index, 0, child.data);
|
||||
}
|
||||
}
|
||||
}
|
||||
objectAssign(child, {
|
||||
parent: this,
|
||||
store: this.store
|
||||
});
|
||||
child = new Node(child);
|
||||
}
|
||||
|
||||
child.level = this.level + 1;
|
||||
|
||||
if (typeof index === 'undefined' || index < 0) {
|
||||
this.childNodes.push(child);
|
||||
} else {
|
||||
this.childNodes.splice(index, 0, child);
|
||||
}
|
||||
|
||||
this.updateLeafState();
|
||||
}
|
||||
|
||||
insertBefore(child, ref) {
|
||||
let index;
|
||||
if (ref) {
|
||||
index = this.childNodes.indexOf(ref);
|
||||
}
|
||||
this.insertChild(child, index);
|
||||
}
|
||||
|
||||
insertAfter(child, ref) {
|
||||
let index;
|
||||
if (ref) {
|
||||
index = this.childNodes.indexOf(ref);
|
||||
if (index !== -1) index += 1;
|
||||
}
|
||||
this.insertChild(child, index);
|
||||
}
|
||||
|
||||
removeChild(child) {
|
||||
const children = this.getChildren() || [];
|
||||
const dataIndex = children.indexOf(child.data);
|
||||
if (dataIndex > -1) {
|
||||
children.splice(dataIndex, 1);
|
||||
}
|
||||
|
||||
const index = this.childNodes.indexOf(child);
|
||||
|
||||
if (index > -1) {
|
||||
this.store && this.store.deregisterNode(child);
|
||||
child.parent = null;
|
||||
this.childNodes.splice(index, 1);
|
||||
}
|
||||
|
||||
this.updateLeafState();
|
||||
}
|
||||
|
||||
removeChildByData(data) {
|
||||
let targetNode = null;
|
||||
|
||||
for (let i = 0; i < this.childNodes.length; i++) {
|
||||
if (this.childNodes[i].data === data) {
|
||||
targetNode = this.childNodes[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (targetNode) {
|
||||
this.removeChild(targetNode);
|
||||
}
|
||||
}
|
||||
|
||||
expand(callback, expandParent) {
|
||||
const done = () => {
|
||||
if (expandParent) {
|
||||
let parent = this.parent;
|
||||
while (parent.level > 0) {
|
||||
parent.expanded = true;
|
||||
parent = parent.parent;
|
||||
}
|
||||
}
|
||||
this.expanded = true;
|
||||
if (callback) callback();
|
||||
};
|
||||
|
||||
if (this.shouldLoadData()) {
|
||||
this.loadData((data) => {
|
||||
if (data instanceof Array) {
|
||||
if (this.checked) {
|
||||
this.setChecked(true, true);
|
||||
} else if (!this.store.checkStrictly) {
|
||||
reInitChecked(this);
|
||||
}
|
||||
done();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
}
|
||||
|
||||
doCreateChildren(array, defaultProps = {}) {
|
||||
array.forEach((item) => {
|
||||
this.insertChild(objectAssign({ data: item }, defaultProps), undefined, true);
|
||||
});
|
||||
}
|
||||
|
||||
collapse() {
|
||||
this.expanded = false;
|
||||
}
|
||||
|
||||
shouldLoadData() {
|
||||
return this.store.lazy === true && this.store.load && !this.loaded;
|
||||
}
|
||||
|
||||
updateLeafState() {
|
||||
if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== 'undefined') {
|
||||
this.isLeaf = this.isLeafByUser;
|
||||
return;
|
||||
}
|
||||
const childNodes = this.childNodes;
|
||||
if (!this.store.lazy || (this.store.lazy === true && this.loaded === true)) {
|
||||
this.isLeaf = !childNodes || childNodes.length === 0;
|
||||
return;
|
||||
}
|
||||
this.isLeaf = false;
|
||||
}
|
||||
|
||||
setChecked(value, deep, recursion, passValue) {
|
||||
this.indeterminate = value === 'half';
|
||||
this.checked = value === true;
|
||||
|
||||
if (this.store.checkStrictly) return;
|
||||
|
||||
if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
|
||||
let { all, allWithoutDisable } = getChildState(this.childNodes);
|
||||
|
||||
if (!this.isLeaf && (!all && allWithoutDisable)) {
|
||||
this.checked = false;
|
||||
value = false;
|
||||
}
|
||||
|
||||
const handleDescendants = () => {
|
||||
if (deep) {
|
||||
const childNodes = this.childNodes;
|
||||
for (let i = 0, j = childNodes.length; i < j; i++) {
|
||||
const child = childNodes[i];
|
||||
passValue = passValue || value !== false;
|
||||
const isCheck = child.disabled ? child.checked : passValue;
|
||||
child.setChecked(isCheck, deep, true, passValue);
|
||||
}
|
||||
const { half, all } = getChildState(childNodes);
|
||||
if (!all) {
|
||||
this.checked = all;
|
||||
this.indeterminate = half;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (this.shouldLoadData()) {
|
||||
// Only work on lazy load data.
|
||||
this.loadData(() => {
|
||||
handleDescendants();
|
||||
reInitChecked(this);
|
||||
}, {
|
||||
checked: value !== false
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
handleDescendants();
|
||||
}
|
||||
}
|
||||
|
||||
const parent = this.parent;
|
||||
if (!parent || parent.level === 0) return;
|
||||
|
||||
if (!recursion) {
|
||||
reInitChecked(parent);
|
||||
}
|
||||
}
|
||||
|
||||
getChildren(forceInit = false) { // this is data
|
||||
if (this.level === 0) return this.data;
|
||||
const data = this.data;
|
||||
if (!data) return null;
|
||||
|
||||
const props = this.store.props;
|
||||
let children = 'children';
|
||||
if (props) {
|
||||
children = props.children || 'children';
|
||||
}
|
||||
|
||||
if (data[children] === undefined) {
|
||||
data[children] = null;
|
||||
}
|
||||
|
||||
if (forceInit && !data[children]) {
|
||||
data[children] = [];
|
||||
}
|
||||
|
||||
return data[children];
|
||||
}
|
||||
|
||||
updateChildren() {
|
||||
const newData = this.getChildren() || [];
|
||||
const oldData = this.childNodes.map((node) => node.data);
|
||||
|
||||
const newDataMap = {};
|
||||
const newNodes = [];
|
||||
|
||||
newData.forEach((item, index) => {
|
||||
const key = item[NODE_KEY];
|
||||
const isNodeExists = !!key && arrayFindIndex(oldData, data => data[NODE_KEY] === key) >= 0;
|
||||
if (isNodeExists) {
|
||||
newDataMap[key] = { index, data: item };
|
||||
} else {
|
||||
newNodes.push({ index, data: item });
|
||||
}
|
||||
});
|
||||
|
||||
if (!this.store.lazy) {
|
||||
oldData.forEach((item) => {
|
||||
if (!newDataMap[item[NODE_KEY]]) this.removeChildByData(item);
|
||||
});
|
||||
}
|
||||
|
||||
newNodes.forEach(({ index, data }) => {
|
||||
this.insertChild({ data }, index);
|
||||
});
|
||||
|
||||
this.updateLeafState();
|
||||
}
|
||||
|
||||
loadData(callback, defaultProps = {}) {
|
||||
if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) {
|
||||
this.loading = true;
|
||||
|
||||
const resolve = (children) => {
|
||||
this.loaded = true;
|
||||
this.loading = false;
|
||||
this.childNodes = [];
|
||||
|
||||
this.doCreateChildren(children, defaultProps);
|
||||
|
||||
this.updateLeafState();
|
||||
if (callback) {
|
||||
callback.call(this, children);
|
||||
}
|
||||
};
|
||||
|
||||
this.store.load(this, resolve);
|
||||
} else {
|
||||
if (callback) {
|
||||
callback.call(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,342 @@
|
||||
import Node from './node';
|
||||
import { getNodeKey } from './util';
|
||||
|
||||
export default class TreeStore {
|
||||
constructor(options) {
|
||||
this.currentNode = null;
|
||||
this.currentNodeKey = null;
|
||||
|
||||
for (let option in options) {
|
||||
if (Object.prototype.hasOwnProperty.call(options, option)) {
|
||||
// if (options.hasOwnProperty(option)) {
|
||||
this[option] = options[option];
|
||||
}
|
||||
}
|
||||
|
||||
this.nodesMap = {};
|
||||
|
||||
this.root = new Node({
|
||||
data: this.data,
|
||||
store: this
|
||||
});
|
||||
|
||||
if (this.lazy && this.load) {
|
||||
const loadFn = this.load;
|
||||
loadFn(this.root, (data) => {
|
||||
this.root.doCreateChildren(data);
|
||||
this._initDefaultCheckedNodes();
|
||||
});
|
||||
} else {
|
||||
this._initDefaultCheckedNodes();
|
||||
}
|
||||
}
|
||||
|
||||
filter(value) {
|
||||
const filterNodeMethod = this.filterNodeMethod;
|
||||
const lazy = this.lazy;
|
||||
const traverse = function(node) {
|
||||
const childNodes = node.root ? node.root.childNodes : node.childNodes;
|
||||
|
||||
childNodes.forEach((child) => {
|
||||
child.visible = filterNodeMethod.call(child, value, child.data, child);
|
||||
|
||||
traverse(child);
|
||||
});
|
||||
|
||||
if (!node.visible && childNodes.length) {
|
||||
let allHidden = true;
|
||||
allHidden = !childNodes.some(child => child.visible);
|
||||
|
||||
if (node.root) {
|
||||
node.root.visible = allHidden === false;
|
||||
} else {
|
||||
node.visible = allHidden === false;
|
||||
}
|
||||
}
|
||||
if (!value) return;
|
||||
|
||||
if (node.visible && !node.isLeaf && !lazy) node.expand();
|
||||
};
|
||||
|
||||
traverse(this);
|
||||
}
|
||||
|
||||
setData(newVal) {
|
||||
const instanceChanged = newVal !== this.root.data;
|
||||
if (instanceChanged) {
|
||||
this.root.setData(newVal);
|
||||
this._initDefaultCheckedNodes();
|
||||
} else {
|
||||
this.root.updateChildren();
|
||||
}
|
||||
}
|
||||
|
||||
getNode(data) {
|
||||
if (data instanceof Node) return data;
|
||||
const key = typeof data !== 'object' ? data : getNodeKey(this.key, data);
|
||||
return this.nodesMap[key] || null;
|
||||
}
|
||||
|
||||
insertBefore(data, refData) {
|
||||
const refNode = this.getNode(refData);
|
||||
refNode.parent.insertBefore({ data }, refNode);
|
||||
}
|
||||
|
||||
insertAfter(data, refData) {
|
||||
const refNode = this.getNode(refData);
|
||||
refNode.parent.insertAfter({ data }, refNode);
|
||||
}
|
||||
|
||||
remove(data) {
|
||||
const node = this.getNode(data);
|
||||
|
||||
if (node && node.parent) {
|
||||
if (node === this.currentNode) {
|
||||
this.currentNode = null;
|
||||
}
|
||||
node.parent.removeChild(node);
|
||||
}
|
||||
}
|
||||
|
||||
append(data, parentData) {
|
||||
const parentNode = parentData ? this.getNode(parentData) : this.root;
|
||||
|
||||
if (parentNode) {
|
||||
parentNode.insertChild({ data });
|
||||
}
|
||||
}
|
||||
|
||||
_initDefaultCheckedNodes() {
|
||||
const defaultCheckedKeys = this.defaultCheckedKeys || [];
|
||||
const nodesMap = this.nodesMap;
|
||||
|
||||
defaultCheckedKeys.forEach((checkedKey) => {
|
||||
const node = nodesMap[checkedKey];
|
||||
|
||||
if (node) {
|
||||
node.setChecked(true, !this.checkStrictly);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_initDefaultCheckedNode(node) {
|
||||
const defaultCheckedKeys = this.defaultCheckedKeys || [];
|
||||
|
||||
if (defaultCheckedKeys.indexOf(node.key) !== -1) {
|
||||
node.setChecked(true, !this.checkStrictly);
|
||||
}
|
||||
}
|
||||
|
||||
setDefaultCheckedKey(newVal) {
|
||||
if (newVal !== this.defaultCheckedKeys) {
|
||||
this.defaultCheckedKeys = newVal;
|
||||
this._initDefaultCheckedNodes();
|
||||
}
|
||||
}
|
||||
|
||||
registerNode(node) {
|
||||
const key = this.key;
|
||||
if (!key || !node || !node.data) return;
|
||||
|
||||
const nodeKey = node.key;
|
||||
if (nodeKey !== undefined) this.nodesMap[node.key] = node;
|
||||
}
|
||||
|
||||
deregisterNode(node) {
|
||||
const key = this.key;
|
||||
if (!key || !node || !node.data) return;
|
||||
|
||||
node.childNodes.forEach(child => {
|
||||
this.deregisterNode(child);
|
||||
});
|
||||
|
||||
delete this.nodesMap[node.key];
|
||||
}
|
||||
|
||||
getCheckedNodes(leafOnly = false, includeHalfChecked = false) {
|
||||
const checkedNodes = [];
|
||||
const traverse = function(node) {
|
||||
const childNodes = node.root ? node.root.childNodes : node.childNodes;
|
||||
|
||||
childNodes.forEach((child) => {
|
||||
if ((child.checked || (includeHalfChecked && child.indeterminate)) && (!leafOnly || (leafOnly && child.isLeaf))) {
|
||||
checkedNodes.push(child.data);
|
||||
}
|
||||
|
||||
traverse(child);
|
||||
});
|
||||
};
|
||||
|
||||
traverse(this);
|
||||
|
||||
return checkedNodes;
|
||||
}
|
||||
|
||||
getCheckedKeys(leafOnly = false) {
|
||||
return this.getCheckedNodes(leafOnly).map((data) => (data || {})[this.key]);
|
||||
}
|
||||
|
||||
getHalfCheckedNodes() {
|
||||
const nodes = [];
|
||||
const traverse = function(node) {
|
||||
const childNodes = node.root ? node.root.childNodes : node.childNodes;
|
||||
|
||||
childNodes.forEach((child) => {
|
||||
if (child.indeterminate) {
|
||||
nodes.push(child.data);
|
||||
}
|
||||
|
||||
traverse(child);
|
||||
});
|
||||
};
|
||||
|
||||
traverse(this);
|
||||
|
||||
return nodes;
|
||||
}
|
||||
|
||||
getHalfCheckedKeys() {
|
||||
return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]);
|
||||
}
|
||||
|
||||
_getAllNodes() {
|
||||
const allNodes = [];
|
||||
const nodesMap = this.nodesMap;
|
||||
for (let nodeKey in nodesMap) {
|
||||
if (Object.prototype.hasOwnProperty.call(nodesMap, nodeKey)) {
|
||||
// if (nodesMap.hasOwnProperty(nodeKey)) {
|
||||
allNodes.push(nodesMap[nodeKey]);
|
||||
}
|
||||
}
|
||||
|
||||
return allNodes;
|
||||
}
|
||||
|
||||
updateChildren(key, data) {
|
||||
const node = this.nodesMap[key];
|
||||
if (!node) return;
|
||||
const childNodes = node.childNodes;
|
||||
for (let i = childNodes.length - 1; i >= 0; i--) {
|
||||
const child = childNodes[i];
|
||||
this.remove(child.data);
|
||||
}
|
||||
for (let i = 0, j = data.length; i < j; i++) {
|
||||
const child = data[i];
|
||||
this.append(child, node.data);
|
||||
}
|
||||
}
|
||||
|
||||
_setCheckedKeys(key, leafOnly = false, checkedKeys) {
|
||||
const allNodes = this._getAllNodes().sort((a, b) => b.level - a.level);
|
||||
const cache = Object.create(null);
|
||||
const keys = Object.keys(checkedKeys);
|
||||
allNodes.forEach(node => node.setChecked(false, false));
|
||||
for (let i = 0, j = allNodes.length; i < j; i++) {
|
||||
const node = allNodes[i];
|
||||
const nodeKey = node.data[key].toString();
|
||||
let checked = keys.indexOf(nodeKey) > -1;
|
||||
if (!checked) {
|
||||
if (node.checked && !cache[nodeKey]) {
|
||||
node.setChecked(false, false);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
let parent = node.parent;
|
||||
while (parent && parent.level > 0) {
|
||||
cache[parent.data[key]] = true;
|
||||
parent = parent.parent;
|
||||
}
|
||||
|
||||
if (node.isLeaf || this.checkStrictly) {
|
||||
node.setChecked(true, false);
|
||||
continue;
|
||||
}
|
||||
node.setChecked(true, true);
|
||||
|
||||
if (leafOnly) {
|
||||
node.setChecked(false, false);
|
||||
const traverse = function(node) {
|
||||
const childNodes = node.childNodes;
|
||||
childNodes.forEach((child) => {
|
||||
if (!child.isLeaf) {
|
||||
child.setChecked(false, false);
|
||||
}
|
||||
traverse(child);
|
||||
});
|
||||
};
|
||||
traverse(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setCheckedNodes(array, leafOnly = false) {
|
||||
const key = this.key;
|
||||
const checkedKeys = {};
|
||||
array.forEach((item) => {
|
||||
checkedKeys[(item || {})[key]] = true;
|
||||
});
|
||||
|
||||
this._setCheckedKeys(key, leafOnly, checkedKeys);
|
||||
}
|
||||
|
||||
setCheckedKeys(keys, leafOnly = false) {
|
||||
this.defaultCheckedKeys = keys;
|
||||
const key = this.key;
|
||||
const checkedKeys = {};
|
||||
keys.forEach((key) => {
|
||||
checkedKeys[key] = true;
|
||||
});
|
||||
|
||||
this._setCheckedKeys(key, leafOnly, checkedKeys);
|
||||
}
|
||||
|
||||
setDefaultExpandedKeys(keys) {
|
||||
keys = keys || [];
|
||||
this.defaultExpandedKeys = keys;
|
||||
|
||||
keys.forEach((key) => {
|
||||
const node = this.getNode(key);
|
||||
if (node) node.expand(null, this.autoExpandParent);
|
||||
});
|
||||
}
|
||||
|
||||
setChecked(data, checked, deep) {
|
||||
const node = this.getNode(data);
|
||||
|
||||
if (node) {
|
||||
node.setChecked(!!checked, deep);
|
||||
}
|
||||
}
|
||||
|
||||
getCurrentNode() {
|
||||
return this.currentNode;
|
||||
}
|
||||
|
||||
setCurrentNode(currentNode) {
|
||||
const prevCurrentNode = this.currentNode;
|
||||
if (prevCurrentNode) {
|
||||
prevCurrentNode.isCurrent = false;
|
||||
}
|
||||
this.currentNode = currentNode;
|
||||
this.currentNode.isCurrent = true;
|
||||
}
|
||||
|
||||
setUserCurrentNode(node) {
|
||||
const key = node[this.key];
|
||||
const currNode = this.nodesMap[key];
|
||||
this.setCurrentNode(currNode);
|
||||
}
|
||||
|
||||
setCurrentNodeKey(key) {
|
||||
if (key === null || key === undefined) {
|
||||
this.currentNode && (this.currentNode.isCurrent = false);
|
||||
this.currentNode = null;
|
||||
return;
|
||||
}
|
||||
const node = this.getNode(key);
|
||||
if (node) {
|
||||
this.setCurrentNode(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
export const NODE_KEY = '$treeNodeId';
|
||||
|
||||
export const markNodeData = function(node, data) {
|
||||
if (!data || data[NODE_KEY]) return;
|
||||
Object.defineProperty(data, NODE_KEY, {
|
||||
value: node.id,
|
||||
enumerable: false,
|
||||
configurable: false,
|
||||
writable: false
|
||||
});
|
||||
};
|
||||
|
||||
export const getNodeKey = function(key, data) {
|
||||
if (!key) return data[NODE_KEY];
|
||||
return data[key];
|
||||
};
|
||||
|
||||
export const findNearestComponent = (element, componentName) => {
|
||||
let target = element;
|
||||
while (target && target.tagName !== 'BODY') {
|
||||
if (target.__vue__ && target.__vue__.$options.name === componentName) {
|
||||
return target.__vue__;
|
||||
}
|
||||
target = target.parentNode;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<div
|
||||
class="el-tree-node"
|
||||
@click.stop="handleClick"
|
||||
@contextmenu="($event) => this.handleContextMenu($event)"
|
||||
v-if="source.visible"
|
||||
:class="{
|
||||
'is-expanded': expanded,
|
||||
'is-current': source.isCurrent,
|
||||
'is-hidden': !!!source.visible,
|
||||
'is-focusable': !!!source.disabled,
|
||||
'is-checked': !!!source.disabled && source.checked
|
||||
}"
|
||||
role="treeitem"
|
||||
tabindex="-1"
|
||||
:aria-expanded="expanded"
|
||||
:aria-disabled="source.disabled"
|
||||
:aria-checked="source.checked"
|
||||
ref="node"
|
||||
>
|
||||
<div class="el-tree-node__content">
|
||||
<span aria-hidden="true" :style="{ 'padding-left': (source.level - 1) * tree.indent + 'px' }"></span>
|
||||
<span
|
||||
:class="[
|
||||
{ 'is-leaf': source.isLeaf, expanded: !source.isLeaf && expanded },
|
||||
'el-tree-node__expand-icon',
|
||||
tree.iconClass ? tree.iconClass : 'el-icon-caret-right'
|
||||
]"
|
||||
>
|
||||
</span>
|
||||
<el-checkbox
|
||||
v-if="showCheckbox"
|
||||
v-model="source.checked"
|
||||
:indeterminate="source.indeterminate"
|
||||
:disabled="!!source.disabled"
|
||||
@click.native.stop
|
||||
@change="handleCheckChange"
|
||||
>
|
||||
</el-checkbox>
|
||||
<span
|
||||
v-if="source.loading"
|
||||
class="el-tree-node__loading-icon el-icon-loading">
|
||||
</span>
|
||||
<node-content :node="source"></node-content>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script type="text/jsx">
|
||||
import ElCheckbox from 'element-ui/packages/checkbox';
|
||||
import emitter from 'element-ui/src/mixins/emitter';
|
||||
import mixinNode from './mixin/node';
|
||||
|
||||
export default {
|
||||
name: 'ElTreeVirtualNode',
|
||||
componentName: 'ElTreeVirtualNode',
|
||||
|
||||
mixins: [emitter, mixinNode],
|
||||
|
||||
props: {
|
||||
source: {
|
||||
default() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
renderContent: Function,
|
||||
showCheckbox: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
props: Object
|
||||
},
|
||||
|
||||
components: {
|
||||
ElCheckbox,
|
||||
NodeContent: {
|
||||
props: {
|
||||
node: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
render(h) {
|
||||
const parent = this.$parent;
|
||||
const tree = parent.tree;
|
||||
const node = this.node;
|
||||
const { data, store } = node;
|
||||
const props = this.$parent.props
|
||||
return parent.renderContent
|
||||
? parent.renderContent.call(parent._renderProxy, h, { _self: tree.$vnode.context, node, data, store })
|
||||
: tree.$scopedSlots.default
|
||||
? tree.$scopedSlots.default({ node, data })
|
||||
: h('span', {
|
||||
style: {
|
||||
display: 'inline-block',
|
||||
width: '100%'
|
||||
}
|
||||
}, [
|
||||
h('span', {
|
||||
class: 'el-tree-node__label',
|
||||
|
||||
}, [data[ props.treeLabel || props.label]])
|
||||
], node[props.treeLabel || props.label] )
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
tree: null,
|
||||
expanded: false,
|
||||
childNodeRendered: false,
|
||||
oldChecked: null,
|
||||
oldIndeterminate: null
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'source.indeterminate'(val) {
|
||||
this.handleSelectChange(this.source.checked, val);
|
||||
},
|
||||
|
||||
'source.checked'(val) {
|
||||
this.handleSelectChange(val, this.source.indeterminate);
|
||||
},
|
||||
|
||||
'source.expanded'(val) {
|
||||
this.$nextTick(() => this.expanded = val);
|
||||
if (val) {
|
||||
this.childNodeRendered = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
const parent = this.$parent.$parent.$parent;
|
||||
this.creator(parent, 'source');
|
||||
}
|
||||
};
|
||||
</script>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -32,6 +32,7 @@ router.beforeEach((to, from, next) => {
|
||||
Vue.ls.set(USER_INFO, res.result.userInfo, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result.sysAllDictItems, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set('domianWebSocketURL', res.result.domianWebSocketURL)
|
||||
Vue.ls.set('domianWebImgURL', res.result.domianWebImgURL)
|
||||
Vue.ls.set('onlinePreviewDomainURL', res.result.onlinePreviewDomainURL)
|
||||
Vue.ls.set('httpsOnlinePreviewDomainURL', res.result.httpsOnlinePreviewDomainURL)
|
||||
Vue.ls.set('domianPreviewURL', res.result.domianPreviewURL)
|
||||
|
||||
@@ -85,6 +85,7 @@ const user = {
|
||||
Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set('domianWebSocketURL', result.domianWebSocketURL)
|
||||
Vue.ls.set('domianWebImgURL', result.domianWebImgURL)
|
||||
Vue.ls.set('onlinePreviewDomainURL', result.onlinePreviewDomainURL)
|
||||
Vue.ls.set('httpsOnlinePreviewDomainURL', result.httpsOnlinePreviewDomainURL)
|
||||
Vue.ls.set('domianPreviewURL', result.domianPreviewURL)
|
||||
@@ -136,10 +137,19 @@ const user = {
|
||||
window._CONFIG['domianPreviewURL'] = Vue.ls.get('domianPreviewURL') + '/jero-boot'
|
||||
window._CONFIG['domianWebSocketURL'] = Vue.ls.get('domianWebSocketURL') + '/jero-boot'
|
||||
window._CONFIG['onlinePreviewDomainURL'] = Vue.ls.get('onlinePreviewDomainURL') + '/onlinePreview'
|
||||
window._CONFIG['domianWebImgURL'] = Vue.ls.get('domianWebImgURL') + '/jero-boot'
|
||||
window._CONFIG['httpsOnlinePreviewDomainURL'] = Vue.ls.get('httpsOnlinePreviewDomainURL') + '/onlinePreview'
|
||||
//Vue.ls.set(USER_AUTH,authData);
|
||||
sessionStorage.setItem(USER_AUTH, JSON.stringify(authData))
|
||||
sessionStorage.setItem(SYS_BUTTON_AUTH, JSON.stringify(allAuthData))
|
||||
let gData = localStorage.getItem('gData')
|
||||
if (!gData) {
|
||||
getAction('sys/user/queryUserTreeList', {}).then((res) => {
|
||||
if (res.success) {
|
||||
localStorage.setItem('gData', JSON.stringify(res.result))
|
||||
}
|
||||
})
|
||||
}
|
||||
if (menuData && menuData.length > 0) {
|
||||
//update--begin--autor:qinfeng-----date:20200109------for:JEECG-63 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------
|
||||
menuData.forEach((item, index) => {
|
||||
@@ -176,6 +186,7 @@ const user = {
|
||||
Vue.ls.remove(USER_NAME)
|
||||
Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
|
||||
Vue.ls.remove(CACHE_INCLUDED_ROUTES)
|
||||
localStorage.removeItem('gData')
|
||||
//console.log('logoutToken: '+ logoutToken)
|
||||
logout(logoutToken).then(() => {
|
||||
if (process.env.VUE_APP_SSO == 'true') {
|
||||
|
||||
+47
-1
@@ -8,6 +8,14 @@
|
||||
<!-- </span>-->
|
||||
{{$route.query.serialNumber +' '+$t('evaluationResults')}}
|
||||
</div>
|
||||
<div class="doc-detail-right">
|
||||
<div @click="endProcessClick"
|
||||
v-if="(formInline.createBy == this.userInfoQuery.username || administrators) && formInline.gatherResult == 'Underway'"
|
||||
class="operator-text-text" :title="$t('endProcess')">
|
||||
<a-icon type="profile"/>
|
||||
{{$t('endProcess')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-top: 68px;background: #fff">
|
||||
<div class="detail-content" style="padding:12px 24px">
|
||||
@@ -70,6 +78,7 @@
|
||||
import viewFileModel from '@/components/viewFileModel/index'
|
||||
import { getAction, putAction, downloadFile } from '@/api/manage'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { postAction } from '../../../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'evaluationResultsList',
|
||||
@@ -85,6 +94,7 @@
|
||||
pageNo: 1,
|
||||
dataSource: [],
|
||||
formInline: {},
|
||||
administrators:false,
|
||||
userInfoQuery: {},
|
||||
columns: [
|
||||
{
|
||||
@@ -143,6 +153,14 @@
|
||||
mounted() {
|
||||
this.userInfoQuery = this.userInfo()
|
||||
this.getData()
|
||||
this.administrators = false
|
||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||
this.userInfo().userRoleList.forEach(res => {
|
||||
if (res.roleCode == 'admin') {
|
||||
this.administrators = true
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
@@ -232,6 +250,20 @@
|
||||
},
|
||||
seeFileClick(item) {
|
||||
this.$refs.viewFileModelRef.clickButtonToUpload(item)
|
||||
},
|
||||
endProcessClick() {
|
||||
let query = {
|
||||
ids: this.$route.query.id
|
||||
}
|
||||
postAction('/lawsOpinionGather/lawsOpinionGatherEO/batchCompleteTask', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -239,6 +271,7 @@
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.doc-detail {
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
@@ -268,7 +301,7 @@
|
||||
}
|
||||
|
||||
.doc-detail-right {
|
||||
width: 800px;
|
||||
/*width: 800px;*/
|
||||
line-height: 68px;
|
||||
display: flex;
|
||||
|
||||
@@ -329,4 +362,17 @@
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
.operator-text-text {
|
||||
cursor: pointer;
|
||||
margin-right: 23px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
+91
-13
@@ -27,8 +27,10 @@
|
||||
<div v-for="(item2,index2) in item1.list" style="width: 340px;display: inline-block"
|
||||
class="content-box-left">
|
||||
<div class="content-box-box-top" style="cursor: default" v-if="index == 0">
|
||||
<img class="content-box-box-img" style="display: inline-block;width: auto" v-if="index2 == 0">
|
||||
<img :src="item2.img" v-else class="content-box-box-img" alt="">
|
||||
<span class="content-box-box-img content-box-box-img-text" v-if="index2 == 0"></span>
|
||||
<span class="content-box-box-img-index" v-else>
|
||||
<img :src="item2.img" class="content-box-box-img" alt="">
|
||||
</span>
|
||||
<span v-if="index2 == 0" class="content-box-box-text"></span>
|
||||
<div v-else class="content-box-box-text">
|
||||
{{item2.applyMarket_dictText}}
|
||||
@@ -37,16 +39,30 @@
|
||||
</div>
|
||||
<div class="content-box-box" :class="{'content-box-box-color':index % 2 == 1 ? true : false}" v-else>
|
||||
<a v-if="index2 == 0 && item2.relevantUrl"
|
||||
style="color: rgb(33, 201, 204)"
|
||||
style="color: rgb(33, 201, 204);font-weight: bold"
|
||||
:class="{'content-box-box-text-admin':!item2.lableName || item2.lableName == 'null' || item2.lableName == 'undefined'? true : false}"
|
||||
class="content-box-box-text content-box-box-text-index"
|
||||
:href="item2.relevantUrl" target="_blank">{{item2.lableName}}</a>
|
||||
<span v-else-if="index2 == 0"
|
||||
:class="{'content-box-box-text-admin':!item2.lableName || item2.lableName == 'null' || item2.lableName == 'undefined'? true : false}"
|
||||
class="content-box-box-text content-box-box-text-index"
|
||||
style="color: #040B29;font-weight: bold">
|
||||
{{item2.lableName}}
|
||||
</span>
|
||||
<span style="color: #21c9cc"
|
||||
:class="{'content-box-box-text-admin':!item2.lableName || item2.lableName == 'null' || item2.lableName == 'undefined'? true : false}"
|
||||
class="content-box-box-text content-box-box-text-index"
|
||||
@click="viewFileClick(item2.lableName)"
|
||||
v-else-if="item2.lableType == 7 && item2.lableName && index2 != 0">
|
||||
{{$t('viewFile')}}
|
||||
<span v-if="item2.lableName && item2.lableName.split(',').length == 1">
|
||||
<span class="file-text" @click="pdfPreview(item2)" :title="item2.contentFileName">
|
||||
{{item2.contentFileName}}
|
||||
</span>
|
||||
<a-icon @click="download(item2)" type="download" class="icon-text"/>
|
||||
</span>
|
||||
<span v-else :title="$t('viewFile')"
|
||||
@click="viewFileClick(item2.lableName)">
|
||||
{{$t('viewFile')}}
|
||||
</span>
|
||||
</span>
|
||||
<span class="content-box-box-text content-box-box-text-index"
|
||||
v-else-if="item2.lableType != 7 && !item2.lableName && index2 != 0"
|
||||
@@ -88,6 +104,8 @@
|
||||
import displayInformationModel from './displayInformationModel'
|
||||
import countryCardViewAdd from './countryCardViewAdd'
|
||||
import viewFileModel from '@/components/viewFileModel/index'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { Base64 } from 'js-base64'
|
||||
|
||||
export default {
|
||||
name: 'countryCardView',
|
||||
@@ -108,6 +126,7 @@
|
||||
countryCardViewList: [],
|
||||
applyMarkets: '',
|
||||
header_text: '',
|
||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||
url: {
|
||||
list: '/problemKnowledgeBase/countryCardTempEO/list',
|
||||
deleteOne: ''
|
||||
@@ -122,6 +141,26 @@
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
pdfPreview(fileQuery) {
|
||||
let fileName = fileQuery.contentFileName
|
||||
fileQuery.id = fileQuery.lableName
|
||||
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=' + fileQuery.id+'&userName='+this.userInfo().username))
|
||||
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls'
|
||||
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else {
|
||||
downloadFile('/sys/common/downLoadFile', fileQuery.contentFileName, { id: fileQuery.id })
|
||||
}
|
||||
},
|
||||
displayInformationClick() {
|
||||
this.$refs.displayInformationModelRef.getData(JSON.parse(JSON.stringify(this.displayList)))
|
||||
},
|
||||
@@ -133,6 +172,9 @@
|
||||
newlyAddedClick() {
|
||||
this.$refs.countryCardViewAddRef.add(this.countryCardViewList)
|
||||
},
|
||||
download(item) {
|
||||
downloadFile('/sys/common/downLoadFile', item.contentFileName, { id: item.lableName, userName: this.userInfo().username })
|
||||
},
|
||||
countryCardViewAddForm(val) {
|
||||
this.countryCardViewList = JSON.parse(JSON.stringify(val))
|
||||
let content = []
|
||||
@@ -204,12 +246,14 @@
|
||||
if (val.lableType == 3) {
|
||||
res1.list.push({
|
||||
lableName: val.contentDropDownValue,
|
||||
lableType: val.lableType
|
||||
lableType: val.lableType,
|
||||
contentFileName:val.contentFileName || ''
|
||||
})
|
||||
} else {
|
||||
res1.list.push({
|
||||
lableName: val.content,
|
||||
lableType: val.lableType
|
||||
lableType: val.lableType,
|
||||
contentFileName:val.contentFileName || ''
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -349,7 +393,7 @@
|
||||
|
||||
.content-box-box-top {
|
||||
width: 340px;
|
||||
height: 160px;
|
||||
height: 115px;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
background: #fff;
|
||||
@@ -359,13 +403,13 @@
|
||||
border-bottom: 1px #d9d9d9 solid;
|
||||
|
||||
.content-box-box-img {
|
||||
width: 238px;
|
||||
height: 100%;
|
||||
width: 169px;
|
||||
/*height: 100%;*/
|
||||
}
|
||||
|
||||
.content-box-box-text {
|
||||
display: inline-block;
|
||||
width: calc(100% - 238px);
|
||||
width: calc(100% - 169px);
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
@@ -400,7 +444,7 @@
|
||||
|
||||
.content-box-box-text {
|
||||
display: inline-block;
|
||||
width: calc(100% - 238px);
|
||||
width: calc(100% - 169px);
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
@@ -427,7 +471,7 @@
|
||||
.content-box-top:first-child {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
height: 160px;
|
||||
height: 115px;
|
||||
z-index: 111;
|
||||
background: #fff;
|
||||
}
|
||||
@@ -448,4 +492,38 @@
|
||||
.content-box-box-color {
|
||||
background: #f2f2f2;
|
||||
}
|
||||
|
||||
.content-box-box-img-text {
|
||||
width: auto !important;
|
||||
display: inline-block;
|
||||
height: 112px;
|
||||
vertical-align: middle;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
.content-box-box-img-index {
|
||||
width: 169px;
|
||||
height: 112px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
.file-text {
|
||||
width: calc(100% - 30px);
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
float: left;
|
||||
color: #040B29
|
||||
}
|
||||
|
||||
.icon-text {
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
margin-top: 21px;
|
||||
}
|
||||
</style>
|
||||
+18
-1
@@ -31,6 +31,10 @@
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="box-content-right">
|
||||
<div @click="deselectAllClick" class="operator-text">
|
||||
<a-icon type="eye"/>
|
||||
{{$t('deselectAll')}}
|
||||
</div>
|
||||
<div @click="selectAllClick" class="operator-text">
|
||||
<a-icon type="eye"/>
|
||||
{{$t('selectAll')}}
|
||||
@@ -106,6 +110,16 @@
|
||||
})
|
||||
})
|
||||
},
|
||||
deselectAllClick(){
|
||||
this.dataList.forEach(res => {
|
||||
res.showOrNot = false
|
||||
this.dataListOne.forEach(val => {
|
||||
if (res.id == val.id) {
|
||||
val.showOrNot = false
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
searchQuery() {
|
||||
if (this.queryParam.labelName) {
|
||||
this.dataList = this.dataList.filter(res => {
|
||||
@@ -220,10 +234,13 @@
|
||||
|
||||
.operator-text {
|
||||
cursor: pointer;
|
||||
margin-right: 13px;
|
||||
margin-right: 56px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
display: inline-block;
|
||||
}
|
||||
.operator-text:last-child{
|
||||
margin-right: 13px;
|
||||
}
|
||||
</style>
|
||||
+77
-50
@@ -139,12 +139,16 @@
|
||||
<div class="title-text">
|
||||
<span class="title-text-text">{{$t('content')}}</span>
|
||||
</div>
|
||||
<a-form-model-item style="height: 357px" class="itemModel itemModel-explain" prop="content">
|
||||
<a-form-model-item style="height: 357px"
|
||||
class="itemModel itemModel-explain ql-snow" prop="content">
|
||||
<quill-editor
|
||||
v-if="isDisplayIndex"
|
||||
class="text-editor"
|
||||
ref="myQuillEditor"
|
||||
@ready="onEditorReady($event)"
|
||||
v-model="formInline.content"
|
||||
style="height: 300px"
|
||||
:content="formInline.content"
|
||||
style="height: 300px"
|
||||
:options="editorOption"
|
||||
@blur="quilleditorBlur"
|
||||
@change="onEditorChange($event)"
|
||||
@@ -242,6 +246,7 @@
|
||||
loading: false,
|
||||
headers: '',
|
||||
dictOptions: [],
|
||||
isDisplayIndex: false,
|
||||
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
|
||||
editorOption: { // 富文本框配置
|
||||
placeholder: '',
|
||||
@@ -319,6 +324,7 @@
|
||||
add: '/problemKnowledgeBase/problemKnowledgeBaseEO/add',
|
||||
edit: '/problemKnowledgeBase/problemKnowledgeBaseEO/edit'
|
||||
},
|
||||
formInlineOne: {},
|
||||
isDisplay: false,
|
||||
disabled: false,
|
||||
content: '<h2>I am Example</h2>',
|
||||
@@ -345,53 +351,14 @@
|
||||
},
|
||||
mounted() {
|
||||
this.getBase()
|
||||
let quill = this.$refs.myQuillEditor.quill
|
||||
this.$forceUpdate()
|
||||
quill.root.addEventListener(
|
||||
'paste',
|
||||
(evt) => {
|
||||
if (
|
||||
evt.clipboardData &&
|
||||
evt.clipboardData.files &&
|
||||
evt.clipboardData.files.length
|
||||
) {
|
||||
evt.preventDefault();
|
||||
[].forEach.call(evt.clipboardData.files, (file) => {
|
||||
if (!file.type.match(/^image\/(gif|jpe?g|a?png|bmp)/i)) {
|
||||
return
|
||||
}
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
axios({
|
||||
url: this.uploadAction,
|
||||
method: 'post',
|
||||
data: formData,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
let quill = this.$refs.myQuillEditor.quill
|
||||
let length = quill.getSelection().index
|
||||
let fileName = res.data.result.fileName
|
||||
let index1 = fileName.lastIndexOf('.')
|
||||
let index2 = fileName.length
|
||||
let fileSuffix = fileName.substring(index1, index2)
|
||||
quill.insertEmbed(length, 'image', window._CONFIG['domianPreviewURL'] + '/sys/common/download/' + res.data.result.id + fileSuffix)
|
||||
quill.setSelection(length + 1)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
false
|
||||
)
|
||||
if (this.$route.query.id) {
|
||||
this.queryById()
|
||||
document.title = this.$t('problemKnowledgeBase') + this.$t('edit')
|
||||
} else {
|
||||
this.isDisplayIndex = true
|
||||
this.$nextTick(()=>{
|
||||
this.myQuillEditor()
|
||||
})
|
||||
document.title = this.$t('problemKnowledgeBase') + this.$t('newlyAdded')
|
||||
}
|
||||
},
|
||||
@@ -408,6 +375,51 @@
|
||||
Delta.ops = ops
|
||||
return Delta
|
||||
},
|
||||
myQuillEditor() {
|
||||
let quill = this.$refs.myQuillEditor.quill
|
||||
this.$forceUpdate()
|
||||
quill.root.addEventListener(
|
||||
'paste',
|
||||
(evt) => {
|
||||
if (
|
||||
evt.clipboardData &&
|
||||
evt.clipboardData.files &&
|
||||
evt.clipboardData.files.length
|
||||
) {
|
||||
evt.preventDefault();
|
||||
[].forEach.call(evt.clipboardData.files, (file) => {
|
||||
if (!file.type.match(/^image\/(gif|jpe?g|a?png|bmp)/i)) {
|
||||
return
|
||||
}
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
axios({
|
||||
url: this.uploadAction,
|
||||
method: 'post',
|
||||
data: formData,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
let quill = this.$refs.myQuillEditor.quill
|
||||
let length = quill.getSelection().index
|
||||
let fileName = res.data.result.fileName
|
||||
let index1 = fileName.lastIndexOf('.')
|
||||
let index2 = fileName.length
|
||||
let fileSuffix = fileName.substring(index1, index2)
|
||||
quill.insertEmbed(length, 'image', window._CONFIG['domianWebImgURL'] + '/sys/common/download/' + res.data.result.id + fileSuffix)
|
||||
quill.setSelection(length + 1)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
false
|
||||
)
|
||||
},
|
||||
quilleditorBlur() {
|
||||
this.$refs.ruleForm.validateField('content')
|
||||
},
|
||||
@@ -428,12 +440,15 @@
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
queryById() {
|
||||
this.loading = true
|
||||
this.isDisplayIndex = false
|
||||
let query = {
|
||||
id: this.$route.query.id
|
||||
}
|
||||
getAction('/problemKnowledgeBase/problemKnowledgeBaseEO/queryById', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.formInline = res.result || {}
|
||||
this.formInlineOne = JSON.parse(JSON.stringify(res.result))
|
||||
if (this.formInline.showPermissions == 'Privacy') {
|
||||
this.isDisplay = true
|
||||
if (this.formInline.permissionUserList && this.formInline.permissionUserList.length > 0) {
|
||||
@@ -458,16 +473,28 @@
|
||||
id: this.formInline.bussDocumentLibraryId.split(',')[index]
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.formInline.standNumber = []
|
||||
}
|
||||
this.formInline = { ...this.formInline }
|
||||
} else {
|
||||
this.formInline = {}
|
||||
}
|
||||
this.isDisplayIndex = true
|
||||
this.$nextTick(() => {
|
||||
this.myQuillEditor()
|
||||
})
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
backClick() {
|
||||
this.$router.go(-1)
|
||||
},
|
||||
onEditorReady(quill) {
|
||||
if (this.formInlineOne.content){
|
||||
document.getElementsByClassName('ql-editor')[0].innerHTML = this.formInlineOne.content
|
||||
}
|
||||
},
|
||||
showPermissionsChange(event, name) {
|
||||
if (event == 'Open') {
|
||||
this.isDisplay = false
|
||||
@@ -481,9 +508,6 @@
|
||||
onEditorFocus(quill) {
|
||||
console.log('editor focus!', quill)
|
||||
},
|
||||
onEditorReady(quill) {
|
||||
console.log('editor ready!', quill)
|
||||
},
|
||||
PersonnelSelectionChange(value, id) {
|
||||
this.formInline[value] = id
|
||||
this.formInline = { ...this.formInline }
|
||||
@@ -511,7 +535,7 @@
|
||||
let index1 = fileName.lastIndexOf('.')
|
||||
let index2 = fileName.length
|
||||
let fileSuffix = fileName.substring(index1, index2)
|
||||
quill.insertEmbed(length, 'image', window._CONFIG['domianPreviewURL'] + '/sys/common/download/' + file.response.result.id + fileSuffix)
|
||||
quill.insertEmbed(length, 'image', window._CONFIG['domianWebImgURL'] + '/sys/common/download/' + file.response.result.id + fileSuffix)
|
||||
quill.setSelection(length + 1)
|
||||
this.quillUpdateImg = false
|
||||
} else if (status === 'uploading') {
|
||||
@@ -575,9 +599,11 @@
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
if (formInline.standNumber && formInline.standNumber.length > 0){
|
||||
// if (formInline.standNumber && formInline.standNumber.length > 0) {
|
||||
if (formInline.standNumber instanceof Array){
|
||||
formInline.standNumber = formInline.standNumber.join(',')
|
||||
}
|
||||
// }
|
||||
this.loading = true
|
||||
this.confirmLoading = true
|
||||
let url = ''
|
||||
@@ -805,6 +831,7 @@
|
||||
height: 38px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.itemOption {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
|
||||
+454
-69
@@ -1,20 +1,8 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="search-detail-wrap">
|
||||
<a-form layout="inline" @keyup.enter.native="onSearch">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('searchContent')">
|
||||
<span>{{$t('searchContent')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('searchContent')"
|
||||
v-model="searchStr"></a-input>
|
||||
<a-button class="box-button" type="primary" @click="onSearch">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="ResetSearch">{{$t('reset')}}</a-button>
|
||||
</div>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<div class="box-content-left">
|
||||
<div class="classification">{{$t('classification')}}:</div>
|
||||
<template v-for="tag in tagList">
|
||||
<a-checkable-tag
|
||||
:key="tag.id"
|
||||
@@ -26,88 +14,190 @@
|
||||
</a-checkable-tag>
|
||||
</template>
|
||||
</div>
|
||||
<div class="box-content-right">
|
||||
<div @click="classificationClick" class="operator-text-text-index">
|
||||
<div class="box-content-content">
|
||||
<div class="box-content-content-index" :title="$t('classificationMaintenance')"
|
||||
@click="classificationClick">
|
||||
<a-icon type="setting"/>
|
||||
{{$t('classificationMaintenance')}}
|
||||
</div>
|
||||
<div @click="managePublishingClick" class="operator-text-text-index">
|
||||
<a-icon type="carry-out"/>
|
||||
{{$t('managePublishing')}}
|
||||
</div>
|
||||
<a-form layout="inline" @keyup.enter.native="onSearch">
|
||||
<div class="box-title-text">
|
||||
<!-- <div class="title-text" :title="$t('searchContent')">-->
|
||||
<!-- <span>{{$t('searchContent')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<a-input-search class="box-input" :placeholder="$t('PleaseEnter')+$t('searchContent')"
|
||||
allowClear
|
||||
@search="onSearch"
|
||||
v-model="searchStr"></a-input-search>
|
||||
<!-- <a-button class="box-button" type="primary" @click="onSearch">{{$t('query')}}</a-button>-->
|
||||
<!-- <a-button class="box-button" style="margin-left: 8px" @click="ResetSearch">{{$t('reset')}}</a-button>-->
|
||||
</div>
|
||||
<div @click="newlyAddedClick" class="operator-text-text-index">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('newlyAdded')}}
|
||||
</a-form>
|
||||
</div>
|
||||
<div v-if="isTrue">
|
||||
<div class="box-content">
|
||||
<div class="box-content-right">
|
||||
<!-- <div class="operator-text-text-index">-->
|
||||
<!-- <a-icon type="setting"/>-->
|
||||
<!-- {{$t('classificationMaintenance')}}-->
|
||||
<!-- </div>-->
|
||||
<div @click="managePublishingClick" class="operator-text-text-index">
|
||||
<a-icon type="carry-out"/>
|
||||
{{$t('managePublishing')}}
|
||||
</div>
|
||||
<div @click="newlyAddedClick" class="operator-text-text-index">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('newlyAdded')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="conList.length > 0" style="margin-top: 16px;height: calc(100vh - 260px);overflow:auto;">
|
||||
<li v-for="(item,index) in conList" :key="item.id">
|
||||
<div style="margin-bottom: 10px;position: relative">
|
||||
<!-- <a-checkbox :value="item.id" class="checkbox-left"></a-checkbox>-->
|
||||
<div class="text-text-right"
|
||||
:class="{ 'null-input':index % 2 == 0 ? true : false}">
|
||||
<div class="text-header" @click="titleClick(item)">
|
||||
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5">
|
||||
<template slot="title">
|
||||
<span v-html="item.title"></span>
|
||||
</template>
|
||||
<span class="text-header-text" style="cursor: pointer" v-html="item.title"></span>
|
||||
</a-tooltip>
|
||||
<div v-if="conList.length > 0" style="margin-top: 16px;height: calc(100vh - 260px);overflow:auto;">
|
||||
<div class="content-box" v-for="(item,index) in conList" :key="index">
|
||||
<div class="content-box-top" @click="detailClcik(item)">
|
||||
<span class="content-box-top-text">
|
||||
{{ item.title }}
|
||||
</span>
|
||||
<span class="content-box-top-color"
|
||||
v-if="item.problemTypeNameList && item.problemTypeNameList.length > 0"
|
||||
:title="val"
|
||||
v-for="val in item.problemTypeNameList">
|
||||
{{val}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="content-box-content" @click="detailClcik(item)">
|
||||
<div class="content-box-content-top" v-html="item.contentOne">
|
||||
|
||||
</div>
|
||||
<div class="text-content">
|
||||
{{item.contentOne}}
|
||||
<div class="content-box-content-botton">
|
||||
<div class="content-box-content-botton-text"
|
||||
v-if="item.accessoryFileNameList && item.accessoryFileNameList.length > 0"
|
||||
:title="val.fileName"
|
||||
v-for="val in item.accessoryFileNameList">
|
||||
{{val.fileName}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-box-xian" @click="detailClcik(item)"></div>
|
||||
<div class="content-box-button">
|
||||
<div class="content-box-button-left" @click="detailClcik(item)">
|
||||
<div class="content-box-button-text">
|
||||
<a-icon type="user"/>
|
||||
{{item.createBy}}
|
||||
</div>
|
||||
<div class="content-box-button-text">
|
||||
<a-icon type="audit"/>
|
||||
{{item.problemTypeName}}
|
||||
</div>
|
||||
<div class="content-box-button-text">
|
||||
<a-icon type="history"/>
|
||||
{{item.createTime}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-box-button-right">
|
||||
<div class="content-box-button-text" @click="forwardClick(item)">
|
||||
<a-icon type="logout"/>
|
||||
{{$t('forward')}}
|
||||
</div>
|
||||
<div class="content-box-button-text">
|
||||
<a-icon type="eye"/>
|
||||
<span class="text">
|
||||
{{item.browsingHistoryCount}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="content-box-button-text"
|
||||
@click="starClick(item)"
|
||||
:class="{'icon-active':item.collectEO && item.collectEO.collectStatus == 'Collect' ? true : false}">
|
||||
<a-icon class="icon" type="star"/>
|
||||
<span class="text">{{item.collectCount}}</span>
|
||||
</div>
|
||||
<div class="content-box-button-text"
|
||||
@click="likeClick(item)"
|
||||
:class="{'icon-active':item.praiseEO && item.praiseEO.praiseStatus == 'Praise' ? true : false}">
|
||||
<a-icon type="like"/>
|
||||
<span class="text">{{item.praiseCount}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
<div class="noData" v-else>
|
||||
{{$t('noData')}}
|
||||
</div>
|
||||
<div class="page" v-if="conList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
:current="pageNo"
|
||||
@change="pageOnChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
<!-- <div v-for="(item,index) in conList" :key="item.id">-->
|
||||
<!-- <div style="margin-bottom: 10px;position: relative">-->
|
||||
<!-- <div class="text-text-right"-->
|
||||
<!-- :class="{ 'null-input':index % 2 == 0 ? true : false}">-->
|
||||
<!-- <div class="text-header" @click="titleClick(item)">-->
|
||||
<!-- <a-tooltip placement="topLeft" :mouseEnterDelay="0.5">-->
|
||||
<!-- <template slot="title">-->
|
||||
<!-- <span v-html="item.title"></span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <span class="text-header-text" style="cursor: pointer" v-html="item.title"></span>-->
|
||||
<!-- </a-tooltip>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="text-content">-->
|
||||
<!-- {{item.contentOne}}-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="noData" v-else>
|
||||
{{$t('noData')}}
|
||||
</div>
|
||||
<div class="page" v-if="conList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
:current="pageNo"
|
||||
@change="pageOnChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<problemKnowledgeBaseListView ref="problemKnowledgeBaseListViewRef"
|
||||
@problemKnowledgeBase="problemKnowledgeBase" v-else/>
|
||||
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||
<classificationMaintenanceModel @classificationMaintenanceModelForm="classificationMaintenanceModelForm"
|
||||
ref="classificationMaintenanceModelRef"/>
|
||||
<SelectedBy ref="SelectedByRef" :title="$t('forward')" @SelectedByForm="SelectedByForm"></SelectedBy>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||
import classificationMaintenanceModel from './classificationMaintenanceModel'
|
||||
import SelectedBy from '@/components/SelectedBy/index'
|
||||
import problemKnowledgeBaseListView from './problemKnowledgeBaseListView'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'problemKnowledgeBaseList',
|
||||
components: {
|
||||
classificationMaintenanceModel
|
||||
classificationMaintenanceModel,
|
||||
SelectedBy,
|
||||
problemKnowledgeBaseListView
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchContent: '',
|
||||
checkboxText: [],
|
||||
conList: [],
|
||||
isTrue: false,
|
||||
searchStr: '',
|
||||
total: 0,
|
||||
selectedTags: [],
|
||||
loading: false,
|
||||
queryBase: {},
|
||||
pageSize: 10,
|
||||
queryForm: {},
|
||||
tagList: [],
|
||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||
pageNo: 1,
|
||||
url: {
|
||||
getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseEO/page'
|
||||
}
|
||||
},
|
||||
CommentQuery: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -116,10 +206,12 @@
|
||||
this.searchStr = serial_number
|
||||
localStorage.removeItem('serial_number')
|
||||
}
|
||||
this.isTrue = true
|
||||
this.getList()
|
||||
this.replacePage()
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
replacePage() {
|
||||
getAction('/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/list', {}).then((res) => {
|
||||
if (res.success) {
|
||||
@@ -129,10 +221,50 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
likeClick(val) {
|
||||
let praiseStatus = ''
|
||||
if (val.praiseEO && val.praiseEO.praiseStatus == 'Praise') {
|
||||
praiseStatus = 'Cancel praise'
|
||||
} else {
|
||||
praiseStatus = 'Praise'
|
||||
}
|
||||
let query = {
|
||||
problemKnowledgeBaseId: val.id,
|
||||
praiseUserId: this.userInfo().id,
|
||||
praiseStatus: praiseStatus,
|
||||
id: val.praiseEO ? val.praiseEO.id : undefined
|
||||
}
|
||||
putAction('/problemKnowledgeBase/problemKnowledgeBasePraiseEO/edit', query).then((res) => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
starClick(val) {
|
||||
let collectStatus = ''
|
||||
if (val.collectEO && val.collectEO.collectStatus == 'Collect') {
|
||||
collectStatus = 'Cancel Collect'
|
||||
} else {
|
||||
collectStatus = 'Collect'
|
||||
}
|
||||
let query = {
|
||||
problemKnowledgeBaseId: val.id,
|
||||
collectUserId: this.userInfo().id,
|
||||
collectStatus: collectStatus,
|
||||
id: val.collectEO ? val.collectEO.id : undefined
|
||||
}
|
||||
putAction('/problemKnowledgeBase/problemKnowledgeBaseCollectEO/edit', query).then((res) => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
problemKnowledgeBase() {
|
||||
this.pageNo = 1
|
||||
this.isTrue = true
|
||||
this.getList()
|
||||
},
|
||||
classificationMaintenanceModelForm() {
|
||||
this.replacePage()
|
||||
},
|
||||
onSearch() {
|
||||
this.isTrue = true
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
@@ -142,6 +274,7 @@
|
||||
? [...selectedTags, tag]
|
||||
: selectedTags.filter(t => t !== tag)
|
||||
this.selectedTags = nextSelectedTags
|
||||
this.isTrue = true
|
||||
this.getList()
|
||||
},
|
||||
ResetSearch() {
|
||||
@@ -218,6 +351,35 @@
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
forwardClick(row) {
|
||||
this.queryForm = row
|
||||
this.$refs.SelectedByRef.getPush()
|
||||
},
|
||||
SelectedByForm(userIds) {
|
||||
let query = {
|
||||
userIds: userIds,
|
||||
departIds: userIds,
|
||||
problemKnowledgeBaseId: this.queryForm.id,
|
||||
problemKnowledgeBaseTitle: this.queryForm.title
|
||||
}
|
||||
postAction('/problemKnowledgeBase/problemKnowledgeBaseEO/forward', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$refs.SelectedByRef.visible = false
|
||||
this.$refs.SelectedByRef.submitLoading = false
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.$refs.SelectedByRef.submitLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
detailClcik(val) {
|
||||
this.isTrue = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.problemKnowledgeBaseListViewRef.getData(JSON.parse(JSON.stringify(val)))
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -226,11 +388,14 @@
|
||||
<style scoped lang="less">
|
||||
.search-detail-wrap {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
/*margin: 0 auto;*/
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
width: 360px;
|
||||
float: right;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
@@ -255,9 +420,8 @@
|
||||
.box-input {
|
||||
/*min-width: 200px;*/
|
||||
display: inline-block;
|
||||
width: 50%;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
@@ -266,11 +430,44 @@
|
||||
}
|
||||
|
||||
.box-content-left {
|
||||
width: 100%;
|
||||
width: calc(100% - 520px);
|
||||
float: left;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
margin-top: 20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.box-content-content {
|
||||
float: left;
|
||||
width: 150px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.box-content-content-index {
|
||||
width: 108px;
|
||||
height: 40px;
|
||||
background: rgba(0, 179, 190, 0.06);
|
||||
border: 1px solid #00BEBE;
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
color: #00B3BE;
|
||||
line-height: 40px;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
.classification {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
color: #000F16;
|
||||
margin-right: 10px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
.box-content-right {
|
||||
@@ -381,14 +578,202 @@
|
||||
}
|
||||
|
||||
::v-deep .ant-tag-checkable:not(.ant-tag-checkable-checked):hover {
|
||||
border: 1px #21c9cc solid;
|
||||
color: #21c9cc;
|
||||
background: #00B3BE;
|
||||
border: 1px solid #00BEBE;
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
|
||||
::v-deep p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::v-deep .ant-input {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.content-box {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding: 24px 24px 16px 24px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #E6E6E9;
|
||||
border-radius: 4px;
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.content-box-top {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
|
||||
.content-box-top-text {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #040B29;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.content-box-top-color {
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
font-weight: 400;
|
||||
color: #00BEBE;
|
||||
padding: 0 10px;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
background: #DBF2F3;
|
||||
border-radius: 3px;
|
||||
margin-left: 6px;
|
||||
max-width: 120px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.content-box-content {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-top: 16px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.content-box-content-top {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
display: -webkit-box;
|
||||
text-overflow: ellipsis;
|
||||
/*! autoprefixer: off */
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
/*! autoprefixer: on;*/
|
||||
text-justify: inter-ideograph;
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.content-box-content-botton {
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
|
||||
.content-box-content-botton-text {
|
||||
width: 118px;
|
||||
height: 32px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
line-height: 32px;
|
||||
padding: 0 6px;
|
||||
background: #EFF1F3;
|
||||
border-radius: 4px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-box-xian {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
border-bottom: 1px #EFF1F3 solid;
|
||||
left: 0;
|
||||
/*margin-top: 10px;*/
|
||||
}
|
||||
|
||||
.content-box-button {
|
||||
width: 100%;
|
||||
margin-top: 26px;
|
||||
overflow: hidden;
|
||||
|
||||
.content-box-button-left {
|
||||
width: 50%;
|
||||
float: left;
|
||||
|
||||
.content-box-button-text {
|
||||
display: inline-block;
|
||||
margin-right: 30px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #6F7385;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
.content-box-button-right {
|
||||
width: 50%;
|
||||
float: left;
|
||||
text-align: right;
|
||||
|
||||
.content-box-button-text {
|
||||
display: inline-block;
|
||||
margin-left: 30px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box-title-text-index {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
/*align-items: center;*/
|
||||
}
|
||||
|
||||
.title-text-index {
|
||||
width: 88px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 48px;
|
||||
color: #000F16;
|
||||
}
|
||||
|
||||
.box-input-index {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.icon-active {
|
||||
color: #00B3BE !important;
|
||||
}
|
||||
|
||||
.text {
|
||||
min-width: 16px;
|
||||
text-align: left;
|
||||
display: inline-block;
|
||||
margin-left: 3px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.box-content-left .ant-tag {
|
||||
@@ -398,13 +783,12 @@
|
||||
}
|
||||
|
||||
.box-content-left .ant-tag-checkable {
|
||||
padding: 4px 10px;
|
||||
padding: 9px 10px;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 10px;
|
||||
background: #fff;
|
||||
border: 1px #d9d9d9 solid;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
background: rgba(4, 11, 41, 0.06);
|
||||
color: #363C54;
|
||||
max-width: 150px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
@@ -413,7 +797,8 @@
|
||||
}
|
||||
|
||||
.box-content-left .ant-tag-checkable-checked {
|
||||
border: 1px #21c9cc solid;
|
||||
color: #21c9cc;
|
||||
background: #00B3BE;
|
||||
border: 1px solid #00BEBE;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
+713
@@ -0,0 +1,713 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="content-box" style="margin-top: 16px">
|
||||
<div class="content-box-top">
|
||||
<a-icon type="arrow-left" @click="back" class="icon-left"/>
|
||||
<span class="content-box-top-text">
|
||||
{{ queryForm.title }}
|
||||
</span>
|
||||
<span class="content-box-top-color"
|
||||
v-if="queryForm.problemTypeNameList && queryForm.problemTypeNameList.length > 0"
|
||||
:title="val"
|
||||
v-for="val in queryForm.problemTypeNameList">
|
||||
{{val}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="content-box-content">
|
||||
<div class="content-box-content-top ql-editor" v-html="queryForm.content">
|
||||
|
||||
</div>
|
||||
<div class="content-box-content-botton">
|
||||
<div class="content-box-content-botton-text"
|
||||
v-if="queryForm.accessoryFileNameList && queryForm.accessoryFileNameList.length > 0"
|
||||
v-for="item in queryForm.accessoryFileNameList">
|
||||
<span @click="pdfPreview(item)" :title="item.fileName" class="file-text">{{item.fileName}}</span>
|
||||
<a-icon @click="download(item)" type="download" class="icon-text"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-box-xian"></div>
|
||||
<div class="content-box-button">
|
||||
<div class="content-box-button-left">
|
||||
<div class="content-box-button-text">
|
||||
<a-icon type="user"/>
|
||||
{{queryForm.createBy}}
|
||||
</div>
|
||||
<div class="content-box-button-text">
|
||||
<a-icon type="audit"/>
|
||||
{{queryForm.problemTypeName}}
|
||||
</div>
|
||||
<div class="content-box-button-text">
|
||||
<a-icon type="history"/>
|
||||
{{queryForm.createTime}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-box-button-right">
|
||||
<div class="content-box-button-text" @click="forwardClick(queryForm)">
|
||||
<a-icon type="logout"/>
|
||||
{{$t('forward')}}
|
||||
</div>
|
||||
<div class="content-box-button-text">
|
||||
<a-icon type="eye"/>
|
||||
<span class="text">{{queryForm.browsingHistoryCount}}</span>
|
||||
</div>
|
||||
<div class="content-box-button-text"
|
||||
:class="{'icon-active':this.isCollect}"
|
||||
@click="starClick()"
|
||||
>
|
||||
<a-icon class="icon" type="star"/>
|
||||
<span class="text">{{queryForm.collectCount}}</span>
|
||||
</div>
|
||||
<div class="content-box-button-text"
|
||||
:class="{'icon-active':this.isPraise}"
|
||||
@click="likeClick()">
|
||||
<a-icon type="like"/>
|
||||
<span class="text">{{queryForm.praiseCount}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-box-comment">
|
||||
<div class="content-box-comment-text">
|
||||
{{$t('comment')}}
|
||||
</div>
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<a-form-model-item class="itemModel" prop="commentContent">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('comment')"
|
||||
v-model.trim="formInline.commentContent"
|
||||
:rows="1"/>
|
||||
</a-form-model-item>
|
||||
<a-button class="header-btn submit"
|
||||
:loading="loading" @click="release"
|
||||
type="primary">{{$t('release')}}
|
||||
</a-button>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
<div class="commentContent-text" v-for="(item,index) in releaseList" :key="index">
|
||||
<div class="commentContent-header">
|
||||
<span class="commentContent-yuan"></span>
|
||||
<span class="commentContent-title">{{item.createBy}}</span>
|
||||
<span class="commentContent-time">{{item.createTime}}</span>
|
||||
</div>
|
||||
<div class="commentContent-content">
|
||||
{{item.commentContent}}
|
||||
</div>
|
||||
<div class="answer-text" style="margin-bottom: 14px" @click="messageClick(item)">
|
||||
{{$t('answer')}}
|
||||
</div>
|
||||
<div class="commentContent-text-one" v-for="(val,index1) in item.problemKnowledgeBaseCommentVOList"
|
||||
v-if="item.problemKnowledgeBaseCommentVOList && item.problemKnowledgeBaseCommentVOList.length > 0">
|
||||
<div class="commentContent-header">
|
||||
<!-- <span class="commentContent-yuan"></span>-->
|
||||
<span class="commentContent-title">{{val.createBy}}</span>
|
||||
<span class="commentContent-time">{{val.createTime}}</span>
|
||||
</div>
|
||||
<div class="commentContent-content">
|
||||
{{val.commentContent}}
|
||||
</div>
|
||||
<div class="answer-text" @click="messageClick(item)">
|
||||
{{$t('answer')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<SelectedBy ref="SelectedByRef" :title="$t('forward')" @SelectedByForm="SelectedByForm"></SelectedBy>
|
||||
</div>
|
||||
<a-modal
|
||||
:title="$t('replyToComments')"
|
||||
:width="700"
|
||||
:visible="visibleComment"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@ok="handleOkComment"
|
||||
@cancel="handleCancelComment"
|
||||
>
|
||||
<a-form-model :model="formInlineComment" class="formAdd" :rules="rulesComment" ref="ruleFormComment">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('replyToComments')">{{$t('replyToComments')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="'replyContent'">
|
||||
<a-textarea
|
||||
:placeholder="$t('PleaseEnter')+$t('replyToComments')"
|
||||
:disabled="false"
|
||||
v-model.trim="formInlineComment.replyContent" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||
import 'quill/dist/quill.core.css'
|
||||
import 'quill/dist/quill.snow.css'
|
||||
import 'quill/dist/quill.bubble.css'
|
||||
import { quillEditor } from 'vue-quill-editor'
|
||||
import SelectedBy from '@/components/SelectedBy/index'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { Base64 } from 'js-base64'
|
||||
|
||||
export default {
|
||||
name: 'problemKnowledgeBaseListView',
|
||||
components: {
|
||||
SelectedBy
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visibleComment: false,
|
||||
releaseList: [],
|
||||
loading: false,
|
||||
formInline: {},
|
||||
confirmLoading: false,
|
||||
formInlineComment: {},
|
||||
rulesComment: {
|
||||
replyContent: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('replyToComments') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
max: 300,
|
||||
message: this.$t('replyToComments') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
rules: {
|
||||
commentContent: [
|
||||
{
|
||||
max: 300,
|
||||
message: this.$t('comment') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
queryBase: {},
|
||||
CommentQuery: {},
|
||||
queryForm: {},
|
||||
isPraise: false,
|
||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||
isCollect: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
pdfPreview(fileQuery) {
|
||||
let fileName = fileQuery.fileName
|
||||
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=' + fileQuery.id + '&userName=' + this.userInfo().username))
|
||||
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls'
|
||||
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else {
|
||||
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
|
||||
}
|
||||
},
|
||||
download(item) {
|
||||
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id, userName: this.userInfo().username })
|
||||
},
|
||||
getData(val) {
|
||||
this.queryBase = val
|
||||
this.queryById()
|
||||
this.releaseData()
|
||||
this.viewAdd()
|
||||
},
|
||||
viewAdd() {
|
||||
let query = {
|
||||
problemKnowledgeBaseId: this.queryBase.id,
|
||||
browsingUserId: this.userInfo().id
|
||||
}
|
||||
postAction('/problemKnowledgeBase/problemKnowledgeBaseBrowsingHistoryEO/add', query).then((res) => {
|
||||
})
|
||||
},
|
||||
queryById() {
|
||||
let query = {
|
||||
id: this.queryBase.id
|
||||
}
|
||||
getAction('/problemKnowledgeBase/problemKnowledgeBaseEO/queryById', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.queryForm = res.result || {}
|
||||
this.queryForm = { ...this.queryForm }
|
||||
if (this.queryForm.praiseEO && this.queryForm.praiseEO.praiseStatus == 'Praise') {
|
||||
this.isPraise = true
|
||||
} else {
|
||||
this.isPraise = false
|
||||
}
|
||||
if (this.queryForm.collectEO && this.queryForm.collectEO.collectStatus == 'Collect') {
|
||||
this.isCollect = true
|
||||
} else {
|
||||
this.isCollect = false
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
likeClick() {
|
||||
let praiseStatus = ''
|
||||
this.isPraise = !this.isPraise
|
||||
if (this.isPraise) {
|
||||
praiseStatus = 'Praise'
|
||||
this.queryForm.praiseCount = this.queryForm.praiseCount + 1
|
||||
} else {
|
||||
praiseStatus = 'Cancel praise'
|
||||
this.queryForm.praiseCount = this.queryForm.praiseCount - 1
|
||||
}
|
||||
let query = {
|
||||
problemKnowledgeBaseId: this.queryBase.id,
|
||||
praiseUserId: this.userInfo().id,
|
||||
praiseStatus: praiseStatus,
|
||||
id: this.queryForm.praiseEO ? this.queryForm.praiseEO.id : undefined
|
||||
}
|
||||
putAction('/problemKnowledgeBase/problemKnowledgeBasePraiseEO/edit', query).then((res) => {
|
||||
if (!this.queryForm.praiseEO || !this.queryForm.praiseEO.id) {
|
||||
this.queryById()
|
||||
}
|
||||
})
|
||||
},
|
||||
starClick() {
|
||||
let collectStatus = ''
|
||||
this.isCollect = !this.isCollect
|
||||
if (this.isCollect) {
|
||||
collectStatus = 'Collect'
|
||||
this.queryForm.collectCount = this.queryForm.collectCount + 1
|
||||
} else {
|
||||
collectStatus = 'Cancel Collect'
|
||||
this.queryForm.collectCount = this.queryForm.collectCount - 1
|
||||
}
|
||||
let query = {
|
||||
problemKnowledgeBaseId: this.queryBase.id,
|
||||
collectUserId: this.userInfo().id,
|
||||
collectStatus: collectStatus,
|
||||
id: this.queryForm.collectEO ? this.queryForm.collectEO.id : undefined
|
||||
}
|
||||
putAction('/problemKnowledgeBase/problemKnowledgeBaseCollectEO/edit', query).then((res) => {
|
||||
if (!this.queryForm.collectEO || !this.queryForm.collectEO.id) {
|
||||
this.queryById()
|
||||
}
|
||||
})
|
||||
},
|
||||
release() {
|
||||
if (!this.formInline.commentContent) {
|
||||
this.$message.warning(this.$t('pleaseEnter'))
|
||||
return
|
||||
}
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let query = {
|
||||
problemKnowledgeBaseId: this.queryBase.id,
|
||||
commentContent: this.formInline.commentContent,
|
||||
commentUserId: this.userInfo().id
|
||||
}
|
||||
this.loading = true
|
||||
postAction('/problemKnowledgeBase/problemKnowledgeBaseCommentEO/add', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
this.releaseData()
|
||||
this.formInline = {}
|
||||
this.loading = false
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleOkComment() {
|
||||
this.$refs.ruleFormComment.validate(valid => {
|
||||
if (valid) {
|
||||
let query = {
|
||||
commentId: this.CommentQuery.id,
|
||||
replyContent: this.formInlineComment.replyContent
|
||||
}
|
||||
this.confirmLoading = true
|
||||
postAction('/project/problemKnowledgeBaseReplyEO/add', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visibleComment = false
|
||||
this.confirmLoading = false
|
||||
this.releaseData()
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.success(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancelComment() {
|
||||
this.visibleComment = false
|
||||
},
|
||||
messageClick(val) {
|
||||
this.CommentQuery = val
|
||||
this.visibleComment = true
|
||||
this.formInlineComment = {}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleFormComment.clearValidate()
|
||||
})
|
||||
},
|
||||
releaseData() {
|
||||
let query = {
|
||||
problemKnowledgeBaseId: this.queryBase.id
|
||||
}
|
||||
getAction('/problemKnowledgeBase/problemKnowledgeBaseCommentEO/list', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.releaseList = res.result || []
|
||||
} else {
|
||||
this.releaseList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
back() {
|
||||
this.$emit('problemKnowledgeBase')
|
||||
},
|
||||
forwardClick(row) {
|
||||
this.queryForm = row
|
||||
this.$refs.SelectedByRef.getPush()
|
||||
},
|
||||
SelectedByForm(userIds) {
|
||||
let query = {
|
||||
userIds: userIds,
|
||||
departIds: userIds,
|
||||
problemKnowledgeBaseId: this.queryForm.id,
|
||||
problemKnowledgeBaseTitle: this.queryForm.title
|
||||
}
|
||||
postAction('/problemKnowledgeBase/problemKnowledgeBaseEO/forward', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$refs.SelectedByRef.visible = false
|
||||
this.$refs.SelectedByRef.submitLoading = false
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.$refs.SelectedByRef.submitLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.content-box {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
/*padding: 24px 24px 16px 24px;*/
|
||||
/*box-sizing: border-box;*/
|
||||
border: 1px solid #E6E6E9;
|
||||
border-radius: 4px;
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.content-box-top {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding: 20px 24px;
|
||||
box-sizing: border-box;
|
||||
background: #F7F7F8;
|
||||
border-bottom: 1px solid #E6E6E9;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.icon-left {
|
||||
font-size: 16px;
|
||||
margin-right: 6px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.content-box-top-text {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #040B29;
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.content-box-top-color {
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #00BEBE;
|
||||
padding: 0 10px;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
background: #DBF2F3;
|
||||
border-radius: 3px;
|
||||
margin-left: 12px;
|
||||
max-width: 120px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.content-box-content {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-top: 16px;
|
||||
padding: 0 24px;
|
||||
margin-bottom: 16px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.content-box-content-top {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
/*display: -webkit-box;*/
|
||||
/*text-overflow: ellipsis;*/
|
||||
/*!*! autoprefixer: off *!*/
|
||||
/*-webkit-box-orient: vertical;*/
|
||||
/*-webkit-line-clamp: 2;*/
|
||||
/*!*! autoprefixer: on;*!*/
|
||||
/*text-justify: inter-ideograph;*/
|
||||
/*overflow: hidden;*/
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.content-box-content-botton {
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
|
||||
.content-box-content-botton-text {
|
||||
width: 140px;
|
||||
height: 32px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
line-height: 32px;
|
||||
padding: 0 6px;
|
||||
background: #EFF1F3;
|
||||
border-radius: 4px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
|
||||
.file-text {
|
||||
width: 90px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: inline-block;
|
||||
margin-right: 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.icon-text {
|
||||
font-size: 16px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 9px;
|
||||
color: #00B3BE;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-box-xian {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
border-bottom: 1px #EFF1F3 solid;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.content-box-button {
|
||||
width: 100%;
|
||||
margin-top: 32px;
|
||||
overflow: hidden;
|
||||
padding: 0 24px 16px 24px;
|
||||
border-bottom: 1px #EFF1F3 solid;
|
||||
|
||||
.content-box-button-left {
|
||||
width: 50%;
|
||||
float: left;
|
||||
|
||||
.content-box-button-text {
|
||||
display: inline-block;
|
||||
margin-right: 30px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #6F7385;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
.content-box-button-right {
|
||||
width: 50%;
|
||||
float: left;
|
||||
text-align: right;
|
||||
|
||||
.content-box-button-text {
|
||||
display: inline-block;
|
||||
margin-left: 30px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-box-comment {
|
||||
width: 100%;
|
||||
padding: 0 24px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.content-box-comment-text {
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #000F16;
|
||||
}
|
||||
|
||||
.commentContent-text {
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.commentContent-header {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.commentContent-yuan {
|
||||
display: inline-block;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background: #00BEBE;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.commentContent-title {
|
||||
font-size: 14px;
|
||||
margin-left: 8px;
|
||||
font-weight: bold;
|
||||
color: #040B29;
|
||||
}
|
||||
|
||||
.commentContent-time {
|
||||
font-size: 14px;
|
||||
margin-left: 8px;
|
||||
font-weight: 400;
|
||||
color: #6F7385;
|
||||
}
|
||||
}
|
||||
|
||||
.commentContent-content {
|
||||
width: 100%;
|
||||
margin-left: 12px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.answer-text {
|
||||
display: inline-block;
|
||||
padding: 3px 14px;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #E6E6E9;
|
||||
border-radius: 3px;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
margin-left: 12px;
|
||||
margin-top: 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.commentContent-text-one {
|
||||
width: 100%;
|
||||
margin-left: 12px;
|
||||
background: #F6F7FA;
|
||||
border-radius: 4px;
|
||||
padding: 20px 20px 0 20px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.commentContent-text-one:last-child {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
/*align-items: center;*/
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 88px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 48px;
|
||||
color: #000F16;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.header-btn {
|
||||
height: 38px;
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.icon-active {
|
||||
color: #00B3BE !important;
|
||||
}
|
||||
|
||||
.text {
|
||||
min-width: 16px;
|
||||
text-align: left;
|
||||
display: inline-block;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
</style>
|
||||
+7
-7
@@ -158,13 +158,13 @@
|
||||
})
|
||||
},
|
||||
titleClick(item) {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/problemKnowledgeBaseView',
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
// let newUrl = this.$router.resolve({
|
||||
// path: '/problemKnowledgeBaseView',
|
||||
// query: {
|
||||
// id: item.id
|
||||
// }
|
||||
// })
|
||||
// window.open(newUrl.href, '_blank')
|
||||
},
|
||||
edit(val) {
|
||||
this.$router.push({
|
||||
|
||||
+7
@@ -136,6 +136,13 @@
|
||||
pageNo: 1,
|
||||
queryParam: {},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('firstLevelDirectory'),
|
||||
align: 'center',
|
||||
dataIndex: 'memoriesChapterOneName',
|
||||
ellipsis: true,
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('chapterContents'),
|
||||
align: 'center',
|
||||
|
||||
+72
-66
@@ -53,72 +53,6 @@
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('vehicleType')">{{$t('vehicleType')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline.applyCar"
|
||||
:placeholder="$t('PleaseSelect')+$t('vehicleType')"
|
||||
:type="'select'"
|
||||
:disabled="disabled"
|
||||
:triggerChange="false" :dictCode="'car_type'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('scopeOfApplication')">{{$t('scopeOfApplication')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline.applyScope"
|
||||
:placeholder="$t('PleaseSelect')+$t('scopeOfApplication')"
|
||||
:type="'select'"
|
||||
:disabled="disabled"
|
||||
:triggerChange="false" :dictCode="'apply_scope'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('status')">{{$t('status')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.state"
|
||||
@input="handleInput('status')"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseSelect')+$t('status')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'state'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('usage')">{{$t('usage')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.useMethod"
|
||||
@input="handleInput('usage')"
|
||||
:placeholder="$t('PleaseSelect')+$t('usage')"
|
||||
:type="'select'"
|
||||
:disabled="disabled"
|
||||
:triggerChange="false" :dictCode="'yong4_fa3'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
@@ -133,6 +67,72 @@
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <div class="box-title-text">-->
|
||||
<!-- <div class="title-text">-->
|
||||
<!-- <span class="title-text-text"-->
|
||||
<!-- :title="$t('vehicleType')">{{$t('vehicleType')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-form-model-item class="itemModel-multi">-->
|
||||
<!-- <j-multi-select-tag class="box-input" v-model="formInline.applyCar"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('vehicleType')"-->
|
||||
<!-- :type="'checkbox'"-->
|
||||
<!-- :disabled="disabled"-->
|
||||
<!-- :triggerChange="false" :dictCode="'car_type'"/>-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-col>-->
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('scopeOfApplication')">{{$t('scopeOfApplication')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi itemModel-multi-one">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline.applyScope"
|
||||
:placeholder="$t('PleaseSelect')+$t('scopeOfApplication')"
|
||||
:type="'checkbox'"
|
||||
:disabled="disabled"
|
||||
:triggerChange="false" :dictCode="'apply_scope'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('status')">{{$t('status')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi itemModel-multi-one">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline.state"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseSelect')+$t('status')"
|
||||
:type="'checkbox'"
|
||||
:triggerChange="false" :dictCode="'state'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('usage')">{{$t('usage')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi itemModel-multi-one">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline.useMethod"
|
||||
:placeholder="$t('PleaseSelect')+$t('usage')"
|
||||
:type="'checkbox'"
|
||||
:disabled="disabled"
|
||||
:triggerChange="false" :dictCode="'yong4_fa3'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<!-- <a-col :span="12">-->
|
||||
@@ -516,4 +516,10 @@
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.itemModel-multi-one {
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 4px;
|
||||
padding: 0 8px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
@@ -260,6 +260,9 @@
|
||||
if (value.length > 1) {
|
||||
value.shift()
|
||||
}
|
||||
if (extra.triggerNode.dataRef && extra.triggerNode.dataRef.parentId) {
|
||||
this.formInline.memoriesChapterOne = extra.triggerNode.dataRef.parentId
|
||||
}
|
||||
this.formInline.memoriesChapter = value
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
@@ -273,7 +276,7 @@
|
||||
text = 'solicitOpinionsRef'
|
||||
} else if (this.$refs.releaseStandardRef) {
|
||||
text = 'releaseStandardRef'
|
||||
}else if (this.$refs.industryTemplateRef) {
|
||||
} else if (this.$refs.industryTemplateRef) {
|
||||
text = 'industryTemplateRef'
|
||||
}
|
||||
this.$refs[text].getData((val) => {
|
||||
@@ -293,7 +296,8 @@
|
||||
let query = Object.assign(val, {
|
||||
month: formInline.month,
|
||||
memoriesChapter: formInline.memoriesChapter,
|
||||
contentTemplate: formInline.contentTemplate
|
||||
contentTemplate: formInline.contentTemplate,
|
||||
memoriesChapterOne:formInline.memoriesChapterOne
|
||||
})
|
||||
postAction(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
@@ -400,7 +404,7 @@
|
||||
|
||||
::v-deep .ant-select-tree-node-content-wrapper {
|
||||
float: right;
|
||||
margin-top: -2px!important;
|
||||
margin-top: -2px !important;
|
||||
}
|
||||
|
||||
::v-deep .ant-select-tree-title {
|
||||
|
||||
+14
-1
@@ -261,16 +261,23 @@
|
||||
itemId: res.id,
|
||||
itemNum: res.items_num,
|
||||
itemName: res.items_name,
|
||||
itemContent: res.iterms_conditions
|
||||
itemContent: res.iterms_conditions,
|
||||
display_seq: res.display_seq || ''
|
||||
})
|
||||
})
|
||||
}
|
||||
this.dataList = this.ImportFileData.concat(this.dataListData)
|
||||
this.dataList = this.dataList.sort((a, b) => {
|
||||
return a.display_seq - b.display_seq
|
||||
})
|
||||
this.dataList = [...this.dataList]
|
||||
},
|
||||
getPersonnelList(res) {
|
||||
this.ImportFileData = this.ImportFileData.concat(res)
|
||||
this.dataList = this.dataListData.concat(this.ImportFileData)
|
||||
this.dataList = this.dataList.sort((a, b) => {
|
||||
return a.display_seq - b.display_seq
|
||||
})
|
||||
this.dataList = [...this.dataList]
|
||||
},
|
||||
getUUID() {
|
||||
@@ -289,6 +296,12 @@
|
||||
if (dataList[i].evaluationMethods && dataList[i].evaluationMethods instanceof Array) {
|
||||
dataList[i].evaluationMethods = dataList[i].evaluationMethods.join(',')
|
||||
}
|
||||
Object.keys(dataList[i]).forEach(res=>{
|
||||
if (dataList[i][res] && typeof dataList[i][res] == 'string') {
|
||||
dataList[i][res] = dataList[i][res].replace(/\"/g, '“')
|
||||
dataList[i][res] = dataList[i][res].replace(/\'/g, '‘')
|
||||
}
|
||||
})
|
||||
dataList[i].lawsTechnologyEvaluationId = this.$route.query.lawsTechnologyEvaluationId || this.getUUID
|
||||
if (!dataList[i].evaluatorIds) {
|
||||
this.$message.warning(this.$t('pleaseCompleteTheEvaluationMethodorEvaluator'))
|
||||
|
||||
+51
-7
@@ -8,15 +8,28 @@
|
||||
<!-- </span>-->
|
||||
{{$route.query.serialNumber +' '+$t('regulatoryTechnicalEvaluationResults')}}
|
||||
</div>
|
||||
<div class="doc-detail-right">
|
||||
<div @click="CurrentStandard" class="operator-text-text" :title="$t('initiateSupplementaryProcess')">
|
||||
<a-icon type="profile"/>
|
||||
{{$t('initiateSupplementaryProcess')}}
|
||||
</div>
|
||||
<div @click="endProcessClick"
|
||||
v-if="this.$route.query.createBy == this.userInfoQuery.username
|
||||
&& this.$route.query.flowStatus == 'Underway'"
|
||||
class="operator-text-text" :title="$t('endProcess')">
|
||||
<a-icon type="profile"/>
|
||||
{{$t('endProcess')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-top: 68px;background: #fff">
|
||||
<div class="detail-content">
|
||||
<div class="content-box">
|
||||
<div class="header-text">
|
||||
<a-button class="box-button-top" type="primary" @click="CurrentStandard">
|
||||
{{$t('initiateSupplementaryProcess')}}
|
||||
</a-button>
|
||||
</div>
|
||||
<!-- <div class="header-text">-->
|
||||
<!-- <a-button class="box-button-top" type="primary" @click="CurrentStandard">-->
|
||||
<!-- {{$t('initiateSupplementaryProcess')}}-->
|
||||
<!-- </a-button>-->
|
||||
<!-- </div>-->
|
||||
<div class="processBackground-text">
|
||||
<span style="font-size: 16px;font-weight: 400;color: #000F16;"> {{$t('processBackground')}}:</span>
|
||||
{{$route.query.processBackground}}
|
||||
@@ -116,6 +129,7 @@
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
import viewFileModel from '@/components/viewFileModel/index'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'evaluationResultsClause',
|
||||
@@ -222,14 +236,30 @@
|
||||
ellipsis: true,
|
||||
width: 160
|
||||
}
|
||||
]
|
||||
],
|
||||
userInfoQuery: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
document.title = this.$route.query.serialNumber + ' ' + this.$t('regulatoryTechnicalEvaluationResults')
|
||||
this.userInfoQuery = this.userInfo()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
endProcessClick() {
|
||||
let query = {
|
||||
ids: this.$route.query.id
|
||||
}
|
||||
postAction('/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/batchCompleteTask', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
},
|
||||
CurrentStandard() {
|
||||
let query = {
|
||||
firstInitiation: '2',
|
||||
@@ -327,7 +357,7 @@
|
||||
}
|
||||
|
||||
.doc-detail-right {
|
||||
width: 800px;
|
||||
/*width: 800px;*/
|
||||
line-height: 68px;
|
||||
display: flex;
|
||||
|
||||
@@ -353,6 +383,7 @@
|
||||
.processBackground-text {
|
||||
font-size: 16px;
|
||||
color: #000F16;
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -432,6 +463,19 @@
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
.operator-text-text {
|
||||
cursor: pointer;
|
||||
margin-right: 23px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.box-clause .ant-card-body {
|
||||
|
||||
+104
-15
@@ -8,15 +8,28 @@
|
||||
<!-- </span>-->
|
||||
{{$route.query.serialNumber +' '+$t('regulatoryTechnicalEvaluationResults')}}
|
||||
</div>
|
||||
<div class="doc-detail-right">
|
||||
<div @click="CurrentStandard" class="operator-text-text" :title="$t('initiateSupplementaryProcess')">
|
||||
<a-icon type="profile"/>
|
||||
{{$t('initiateSupplementaryProcess')}}
|
||||
</div>
|
||||
<div @click="endProcessClick"
|
||||
v-if="this.$route.query.createBy == this.userInfoQuery.username
|
||||
&& this.$route.query.flowStatus == 'Underway'"
|
||||
class="operator-text-text" :title="$t('endProcess')">
|
||||
<a-icon type="profile"/>
|
||||
{{$t('endProcess')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-top: 68px;background: #fff">
|
||||
<div class="detail-content">
|
||||
<div class="content-box">
|
||||
<div class="header-text">
|
||||
<a-button class="box-button-top" type="primary" @click="CurrentStandard">
|
||||
{{$t('initiateSupplementaryProcess')}}
|
||||
</a-button>
|
||||
</div>
|
||||
<!-- <div class="header-text">-->
|
||||
<!-- <a-button class="box-button-top" type="primary" @click="CurrentStandard">-->
|
||||
<!-- {{$t('initiateSupplementaryProcess')}}-->
|
||||
<!-- </a-button>-->
|
||||
<!-- </div>-->
|
||||
<div class="processBackground-text">
|
||||
<span style="font-size: 16px;font-weight: 400;color: #000F16;"> {{$t('processBackground')}}:</span>
|
||||
{{$route.query.processBackground}}
|
||||
@@ -24,18 +37,24 @@
|
||||
<!-- <div class="header-text">-->
|
||||
<!-- {{$t('engineerFeedbackResults')}}-->
|
||||
<!-- </div>-->
|
||||
<a-card :bordered="false" class="box-clause" style="margin-top: 20px" v-for="(item,index) in dataSource">
|
||||
<div class="table-operator" v-if="item.id">
|
||||
<div class="operator-text" style="float: left;font-size: 16px">
|
||||
<a-card :bordered="false" class="box-clause" style="margin-top: 20px"
|
||||
v-for="(item,index) in dataSource">
|
||||
<div class="table-operator-admin">
|
||||
<div class="operator-text" v-if="item.id" :class="{'operator-text-feed':index == 0 ? true:false}"
|
||||
style="font-size: 16px">
|
||||
{{$t('engineer')+item.createBy+$t('feedbackResults')}}
|
||||
</div>
|
||||
<div @click="fileExportClick" v-if="index == 0" class="operator-text">
|
||||
<div class="text-results" v-if="item.id">
|
||||
{{$t('complianceResults')}}:{{item.complianceResultName}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-operator-admin-right">
|
||||
<div @click="fileExportClick" v-if="index == 0" class="operator-text-index">
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
{{$t('fileExport')}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a-table
|
||||
style="margin-left: 18px"
|
||||
ref="table"
|
||||
size="middle"
|
||||
:loading="loading"
|
||||
@@ -52,9 +71,6 @@
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="text-results">
|
||||
{{$t('complianceResults')}}:{{item.complianceResultName}}
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
</div>
|
||||
@@ -68,6 +84,7 @@
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
import viewFileModel from '@/components/viewFileModel/index'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'evaluationResultsWhole',
|
||||
@@ -79,6 +96,8 @@
|
||||
return {
|
||||
queryParam: {},
|
||||
dataSource: [],
|
||||
userInfoQuery:{},
|
||||
administrators:false,
|
||||
url: {
|
||||
list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/list',
|
||||
exportData: 'lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/exportZip'
|
||||
@@ -91,6 +110,7 @@
|
||||
title: this.$t('relevantSections'),
|
||||
dataIndex: 'relatedSection',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
@@ -103,6 +123,7 @@
|
||||
title: this.$t('enclosure'),
|
||||
dataIndex: 'accessoryFile',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'accessoryFile' }
|
||||
}
|
||||
@@ -110,10 +131,33 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.userInfoQuery = this.userInfo()
|
||||
document.title = this.$route.query.serialNumber + ' ' + this.$t('regulatoryTechnicalEvaluationResults')
|
||||
this.getList()
|
||||
this.administrators = false
|
||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||
this.userInfo().userRoleList.forEach(res => {
|
||||
if (res.roleCode == 'admin') {
|
||||
this.administrators = true
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
endProcessClick() {
|
||||
let query = {
|
||||
ids: this.$route.query.id
|
||||
}
|
||||
postAction('/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/batchCompleteTask', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
},
|
||||
CurrentStandard() {
|
||||
let query = {
|
||||
firstInitiation: '2',
|
||||
@@ -197,7 +241,7 @@
|
||||
}
|
||||
|
||||
.doc-detail-right {
|
||||
width: 800px;
|
||||
/*width: 800px;*/
|
||||
line-height: 68px;
|
||||
display: flex;
|
||||
|
||||
@@ -223,6 +267,7 @@
|
||||
.processBackground-text {
|
||||
font-size: 16px;
|
||||
color: #000F16;
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -284,6 +329,50 @@
|
||||
.text-results {
|
||||
font-size: 14px;
|
||||
margin-top: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.operator-text-text {
|
||||
cursor: pointer;
|
||||
margin-right: 23px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.table-operator-admin {
|
||||
width: 240px;
|
||||
float: left;
|
||||
padding: 0.1px;
|
||||
}
|
||||
|
||||
.table-operator-admin-right {
|
||||
float: left;
|
||||
width: calc(100% - 240px);
|
||||
text-align: right;
|
||||
border-left: 1px solid #e8e8e8;
|
||||
}
|
||||
|
||||
.operator-text-index {
|
||||
cursor: pointer;
|
||||
margin-right: 13px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.operator-text-feed {
|
||||
margin-top: 27px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
|
||||
+5
-1
@@ -491,7 +491,11 @@
|
||||
},
|
||||
standardDecompositionDocumentClick() {
|
||||
if (this.standardDecomposition && this.standardDecomposition.length > 0) {
|
||||
this.$refs.standardDecompositionSheetRef.getData(JSON.parse(JSON.stringify(this.standardDecomposition[0])), this.standardList)
|
||||
if (this.standardDecomposition[0].sarFileSplitInfoList && this.standardDecomposition[0].sarFileSplitInfoList.length > 0) {
|
||||
this.$refs.standardDecompositionSheetRef.getData(JSON.parse(JSON.stringify(this.standardDecomposition[0])), this.standardList)
|
||||
} else {
|
||||
this.$message.warning(this.$t('thereForTheCurrentlySelectedData'))
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(this.$t('pleaseSelectStandardFirst'))
|
||||
}
|
||||
|
||||
+17
-12
@@ -55,9 +55,9 @@
|
||||
<span>{{$t('informationCategory')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.information_category"
|
||||
:placeholder="$t('PleaseSelect')+$t('informationCategory')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'information_category'"/>
|
||||
:placeholder="$t('PleaseSelect')+$t('informationCategory')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'information_category'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
@@ -136,7 +136,7 @@
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
sarFileSplitInfoList: [],
|
||||
informationCategoryList:[],
|
||||
informationCategoryList: [],
|
||||
url: {
|
||||
list: '/split/sarFileSplitItems/getSplitItemsByPage'
|
||||
},
|
||||
@@ -226,7 +226,7 @@
|
||||
this.sarFileSplitInfoList = this.standData.sarFileSplitInfoList || []
|
||||
this.sarFileSplitInfoList = [...this.sarFileSplitInfoList]
|
||||
this.queryParam = {}
|
||||
this.queryParam.info_id = this.sarFileSplitInfoList && this.sarFileSplitInfoList.length > 0 ? this.sarFileSplitInfoList[0].id : ''
|
||||
this.queryParam.info_id = this.sarFileSplitInfoList && this.sarFileSplitInfoList.length > 0 ? this.sarFileSplitInfoList[0].id : null
|
||||
this.visible = true
|
||||
if (this.queryParam.info_id) {
|
||||
this.pageNo = 1
|
||||
@@ -244,14 +244,18 @@
|
||||
}
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.replacePage()
|
||||
if (this.queryParam.info_id) {
|
||||
this.pageNo = 1
|
||||
this.replacePage()
|
||||
}
|
||||
},
|
||||
searchReset() {
|
||||
this.pageNo = 1
|
||||
this.queryParam = {}
|
||||
this.queryParam.info_id = this.sarFileSplitInfoList && this.sarFileSplitInfoList.length > 0 ? this.sarFileSplitInfoList[0].id : ''
|
||||
this.replacePage()
|
||||
this.queryParam.info_id = this.sarFileSplitInfoList && this.sarFileSplitInfoList.length > 0 ? this.sarFileSplitInfoList[0].id : null
|
||||
if (this.queryParam.info_id) {
|
||||
this.pageNo = 1
|
||||
this.replacePage()
|
||||
}
|
||||
},
|
||||
onChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
@@ -270,14 +274,15 @@
|
||||
let pageNo = JSON.parse(JSON.stringify(this.pageNo))
|
||||
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
|
||||
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||
if (queryParam.technology_territory && queryParam.technology_territory.length > 0){
|
||||
if (queryParam.technology_territory && queryParam.technology_territory.length > 0) {
|
||||
queryParam.technology_territory = queryParam.technology_territory.join(',')
|
||||
}
|
||||
let query = {
|
||||
pageNo: pageNo + '',
|
||||
pageSize: pageSize + '',
|
||||
info_id: this.queryParam.info_id,
|
||||
technology_territory:queryParam.technology_territory,
|
||||
technology_territory: queryParam.technology_territory,
|
||||
information_category: queryParam.information_category,
|
||||
menu_id: ''
|
||||
}
|
||||
this.loading = true
|
||||
|
||||
@@ -463,7 +463,9 @@
|
||||
serialNumber: row.serialNumber,
|
||||
lawsTechnologyEvaluationId: row.id,
|
||||
standId: row.standId,
|
||||
remark: row.remark
|
||||
remark: row.remark,
|
||||
createBy:row.createBy,
|
||||
flowStatus:row.flowStatus
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
@@ -476,7 +478,9 @@
|
||||
serialNumber: row.serialNumber,
|
||||
lawsTechnologyEvaluationId: row.id,
|
||||
standId: row.standId,
|
||||
remark: row.remark
|
||||
remark: row.remark,
|
||||
createBy:row.createBy,
|
||||
flowStatus:row.flowStatus
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
{{$t('DocumentComparison')}}
|
||||
</div>
|
||||
<div @click="KnowledgeDatabaseClick" v-has="'bussLog:database'" class="operator-text-text"
|
||||
:title="$t('KnowledgeDatabase')">
|
||||
:title="$t('problemKnowledgeBase')">
|
||||
<a-icon type="folder"/>
|
||||
{{$t('KnowledgeDatabase')}}
|
||||
{{$t('problemKnowledgeBase')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+30
-6
@@ -9,6 +9,16 @@
|
||||
<span> {{$t('comparisonResults')}}</span>
|
||||
</div>
|
||||
<div class="doc-detail-right">
|
||||
<div @click="viewConsistentAssessmentClick" class="operator-text-text"
|
||||
:title="$t('viewConsistentAssessment')">
|
||||
<a-icon type="eye"/>
|
||||
{{$t('viewConsistentAssessment')}}
|
||||
</div>
|
||||
<div @click="viewAllClick" class="operator-text-text"
|
||||
:title="$t('viewAll')">
|
||||
<a-icon type="eye"/>
|
||||
{{$t('viewAll')}}
|
||||
</div>
|
||||
<div @click="exportComparisonReportClick" class="operator-text-text"
|
||||
:title="$t('exportComparisonReport')">
|
||||
<a-icon type="export"/>
|
||||
@@ -65,7 +75,8 @@
|
||||
</div>
|
||||
<div class="detail-content-left-button" v-html="item.itemsTextRight"></div>
|
||||
</div>
|
||||
<div class="detail-content-bottom" :class="{'detail-content-bottom-color':checkboxList.join(',').includes(item.id)}">
|
||||
<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')">
|
||||
@@ -176,6 +187,7 @@
|
||||
isDisplay: false,
|
||||
fullCheckbox: false,
|
||||
resultData: {},
|
||||
comment: '',
|
||||
language: '',
|
||||
url: {
|
||||
exportData: '/compare/sarFileCompareItemComment/exportResXls'
|
||||
@@ -207,7 +219,8 @@
|
||||
let query = {
|
||||
selectIds: checkboxList.join(','),
|
||||
includeComments: fullCheckbox,
|
||||
infoId: this.$route.query.id
|
||||
infoId: this.$route.query.id,
|
||||
comment: this.comment
|
||||
}
|
||||
downloadFile(this.url.exportData, this.resultData.serialNumberLeft + ' - ' + this.resultData.serialNumberRight + this.$t('comparisonResults') + '.xls', query, this.Deselect)
|
||||
},
|
||||
@@ -217,10 +230,19 @@
|
||||
this.indeterminate = false
|
||||
this.checkAll = false
|
||||
},
|
||||
viewConsistentAssessmentClick() {
|
||||
this.comment = '一致'
|
||||
this.getData()
|
||||
},
|
||||
viewAllClick() {
|
||||
this.comment = ''
|
||||
this.getData()
|
||||
},
|
||||
getData() {
|
||||
let query = {
|
||||
id: this.$route.query.id,
|
||||
infoId: this.$route.query.id
|
||||
infoId: this.$route.query.id,
|
||||
comment: this.comment
|
||||
}
|
||||
this.loading = true
|
||||
getAction('/compare/sarFileCompareItemComment/queryCompareResult', query).then((res) => {
|
||||
@@ -536,7 +558,7 @@
|
||||
|
||||
.detail-content-content-text-color {
|
||||
border: 1px solid #00B3BE;
|
||||
background: rgba(0,179,190,0.0300);
|
||||
background: rgba(0, 179, 190, 0.0300);
|
||||
}
|
||||
|
||||
.detail-content-left {
|
||||
@@ -577,9 +599,11 @@
|
||||
border-radius: 4px;
|
||||
float: left;
|
||||
}
|
||||
.detail-content-bottom-color{
|
||||
background: rgba(0,179,190,0.0300);
|
||||
|
||||
.detail-content-bottom-color {
|
||||
background: rgba(0, 179, 190, 0.0300);
|
||||
}
|
||||
|
||||
.detail-content-bottom-left {
|
||||
width: 115px;
|
||||
font-size: 14px;
|
||||
|
||||
+49
-1
@@ -105,7 +105,10 @@
|
||||
</a-form-model>
|
||||
</div>
|
||||
<div class="submit-button">
|
||||
<a-button class="box-button" type="primary" @click="submit">{{$t('preservation')}}</a-button>
|
||||
<a-button class="box-button" style="margin-right: 10px"
|
||||
type="primary" @click="consistentAssessmentClick()">{{$t('consistentAssessment')}}
|
||||
</a-button>
|
||||
<a-button class="box-button" type="primary" @click="submit()">{{$t('preservation')}}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -194,6 +197,51 @@
|
||||
path: '/documentComparison'
|
||||
})
|
||||
},
|
||||
consistentAssessmentClick() {
|
||||
if (!this.dataLeft.id && !this.dataRight.id) {
|
||||
this.$message.warning(this.$t('pleaseSelectTheDataCompared'))
|
||||
return
|
||||
}
|
||||
let query = {
|
||||
itemsIdLeft: this.dataLeft.id,
|
||||
itemsIdRight: this.dataRight.id,
|
||||
infoId: this.$route.query.id,
|
||||
comment: '一致'
|
||||
}
|
||||
this.dataLoadingText = this.$t('pleaseWaitWhileRunning')
|
||||
this.loading = true
|
||||
postAction('/compare/sarFileCompareItemComment/add', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.loading = false
|
||||
this.formInline = {}
|
||||
this.resultData.textRight.forEach(val => {
|
||||
if (val.id == this.dataRight.id) {
|
||||
val.reviewed = 1
|
||||
}
|
||||
})
|
||||
this.resultData.textLeft.forEach(val => {
|
||||
if (val.id == this.dataLeft.id) {
|
||||
val.reviewed = 1
|
||||
}
|
||||
})
|
||||
this.resultData = { ...this.resultData }
|
||||
let detailLeftColor = document.getElementsByClassName('detail-content-content-right-data-color')
|
||||
if (detailLeftColor && detailLeftColor.length > 0) {
|
||||
detailLeftColor[0].classList.remove('detail-content-content-right-data-color')
|
||||
}
|
||||
let detailRightColor = document.getElementsByClassName('detail-content-content-right-data-color-right')
|
||||
if (detailRightColor && detailRightColor.length > 0) {
|
||||
detailRightColor[0].classList.remove('detail-content-content-right-data-color-right')
|
||||
}
|
||||
this.dataLeft = {}
|
||||
this.dataRight = {}
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
if (!this.dataLeft.id && !this.dataRight.id) {
|
||||
this.$message.warning(this.$t('pleaseSelectTheDataCompared'))
|
||||
|
||||
@@ -312,7 +312,8 @@
|
||||
//
|
||||
// },
|
||||
downloadData(fileQuery) {
|
||||
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.targetFileId })
|
||||
console.log(fileQuery.targetFileName);
|
||||
downloadFile('/sys/common/downLoadFile', fileQuery.targetFileName, { id: fileQuery.targetFileId })
|
||||
},
|
||||
subscribe(record) {
|
||||
let _this = this
|
||||
|
||||
@@ -208,6 +208,7 @@
|
||||
<a-form-model-item class="itemModel" prop="authManageIdsName">
|
||||
<PersonnelSelection class="box-input add-input"
|
||||
:personneQuery="form"
|
||||
selectDepartment
|
||||
:query="{db_field_name:'authManageIds',db_field_txt:$t('Administrativeprivileges')}"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="form.authManageIdsName"/>
|
||||
@@ -225,6 +226,7 @@
|
||||
<a-form-model-item class="itemModel" prop="authViewIdsName">
|
||||
<PersonnelSelection
|
||||
class="box-input add-input"
|
||||
selectDepartment
|
||||
:personneQuery="form"
|
||||
:query="{db_field_name:'authViewIds',db_field_txt:$t('Checkthepermissions')}"
|
||||
@change="PersonnelSelectionChange"
|
||||
|
||||
@@ -392,7 +392,7 @@ export default {
|
||||
],
|
||||
paramsName: [
|
||||
{ required: true, message: this.$t('pleaseSelect')+this.$t('Paraname'), trigger: 'blur' },
|
||||
{ min:1, max: 350, message: this.$t('cantExeed')+'350'+this.$t('characters'), trigger: 'blur' },
|
||||
{ min:1, max: 500, message: this.$t('cantExeed')+'500'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
technologyTerritory: [
|
||||
{ required: true, message: this.$t('pleaseSelect')+this.$t('technicalField'), trigger: 'change' },
|
||||
@@ -703,8 +703,8 @@ export default {
|
||||
this.$message.warning(this.$t('ParameterName')+this.$t('cannotEmpty'))
|
||||
falg = 0
|
||||
return
|
||||
} else if(item.paramsName.length > 350){
|
||||
this.$message.warning(this.$t('ParameterName')+this.$t('cantExeed')+'350'+this.$t('Characters'))
|
||||
} else if(item.paramsName.length > 500){
|
||||
this.$message.warning(this.$t('ParameterName')+this.$t('cantExeed')+'500'+this.$t('Characters'))
|
||||
falg = 0
|
||||
return
|
||||
}
|
||||
|
||||
@@ -345,6 +345,12 @@
|
||||
this.$message.warning(this.$t('PleaseCompleteList'))
|
||||
return
|
||||
}
|
||||
Object.keys(this.dataSource[i]).forEach(res=>{
|
||||
if (this.dataSource[i][res] && typeof this.dataSource[i][res] == 'string') {
|
||||
this.dataSource[i][res] = this.dataSource[i][res].replace(/\"/g, '“')
|
||||
this.dataSource[i][res] = this.dataSource[i][res].replace(/\'/g, '‘')
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.$route.query.taskDefinitionKey == 'pgrqr'){
|
||||
let feedbackTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
:title="titleName"
|
||||
:isSendBack="isSendBackOne"
|
||||
ref="examineInformationRef"
|
||||
:isSendBack="isSendBackOne"
|
||||
:url="url"/>
|
||||
<!-- @terminationProcess="terminationProcess"-->
|
||||
<footerProcess
|
||||
|
||||
+39
-22
@@ -23,25 +23,25 @@
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <div class="box-title-text tree-select">-->
|
||||
<!-- <div class="title-text" :title="$t('processNode')">-->
|
||||
<!-- <span>{{$t('processNode')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('processNode')"-->
|
||||
<!-- class="box-input"-->
|
||||
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
|
||||
<!-- v-model="queryParam.prcType">-->
|
||||
<!-- <a-select-option v-for="(item, key) in processNodeList"-->
|
||||
<!-- :key="key"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- <span class="itemOption" :title=" item.name ">-->
|
||||
<!-- {{ item.name}}-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-select-option>-->
|
||||
<!-- </a-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <div class="box-title-text tree-select">-->
|
||||
<!-- <div class="title-text" :title="$t('processNode')">-->
|
||||
<!-- <span>{{$t('processNode')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('processNode')"-->
|
||||
<!-- class="box-input"-->
|
||||
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
|
||||
<!-- v-model="queryParam.prcType">-->
|
||||
<!-- <a-select-option v-for="(item, key) in processNodeList"-->
|
||||
<!-- :key="key"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- <span class="itemOption" :title=" item.name ">-->
|
||||
<!-- {{ item.name}}-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-select-option>-->
|
||||
<!-- </a-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-col>-->
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
@@ -89,6 +89,22 @@
|
||||
<span slot="operation" slot-scope="record">
|
||||
<a @click="dealWith(record)" style="margin-right:8px">{{$t('Processing')}}</a>
|
||||
</span>
|
||||
<span slot="standard" slot-scope="text,record">
|
||||
<span v-if="record.prcType == '1'" :title="record.serialNumber">
|
||||
{{record.serialNumber}}
|
||||
</span>
|
||||
<span v-else :title="record.prcNum">
|
||||
{{record.prcNum}}
|
||||
</span>
|
||||
</span>
|
||||
<span slot="titleIndex" slot-scope="text,record">
|
||||
<span v-if="record.prcType == '1'" :title="record.title">
|
||||
{{record.title}}
|
||||
</span>
|
||||
<span v-else :title="record.prcName">
|
||||
{{record.prcName}}
|
||||
</span>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" v-if="dataSource.length > 0">
|
||||
<a-pagination
|
||||
@@ -182,7 +198,7 @@
|
||||
dataIndex: 'taskInfo',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('Sponsor'),
|
||||
@@ -250,6 +266,7 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
batchProcessingClick() {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
@@ -259,8 +276,8 @@
|
||||
})
|
||||
for (let i = 0; i < content.length; i++) {
|
||||
if (content[i].taskDefinitionKey != content[0].taskDefinitionKey) {
|
||||
this.$message.warning(this.$t('processNodesAreInconsistentPleaseSelectConsistentData'))
|
||||
return
|
||||
this.$message.warning(this.$t('processNodesAreInconsistentPleaseSelectConsistentData'))
|
||||
return
|
||||
}
|
||||
}
|
||||
this.$refs.batchProcessingRef.getData(JSON.parse(JSON.stringify(content)))
|
||||
|
||||
@@ -335,6 +335,7 @@
|
||||
})
|
||||
this.yearNameDataList = content[0].yearNameDataList || []
|
||||
this.formInline = value
|
||||
this.formInline = { ...this.formInline }
|
||||
}
|
||||
} else {
|
||||
this.projectNameList = []
|
||||
@@ -348,6 +349,7 @@
|
||||
this.getNameList()
|
||||
this.formInline.studioEngineerName = this.userInfo().username
|
||||
this.formInline.studioEngineer = this.userInfo().id
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
|
||||
@@ -17,18 +17,18 @@
|
||||
</div>
|
||||
<!-- :label="$t('FilterMatching')" :labelCol="{md: 6,xs:24}" :wrapperCol="{md: 18,xs:24}" style="width: 100%;"-->
|
||||
<a-form-model-item class='box-input'>
|
||||
<a-select v-model="formData.dutyTerritory"
|
||||
style='width: 148%'
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')">
|
||||
<a-select-option v-for="(element,index) in dutyTerritory" :key="element.value" :value="element.value">
|
||||
{{element.text}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formData.dutyTerritory"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
|
||||
</a-form-model-item>
|
||||
<a-select v-model="formData.dutyTerritory"
|
||||
style='width: 148%'
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')">
|
||||
<a-select-option v-for="(element,index) in dutyTerritory" :key="element.value" :value="element.value">
|
||||
{{element.text}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formData.dutyTerritory"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
|
||||
</a-col>
|
||||
@@ -60,7 +60,7 @@
|
||||
<div class="table-operator" style='float: right;margin-top: -20px'>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls()">{{ $t('export') }}</a-button>
|
||||
</div>
|
||||
<!-- :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'-->
|
||||
<!-- :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'-->
|
||||
<a-table
|
||||
class='table-area'
|
||||
ref='table'
|
||||
@@ -72,50 +72,80 @@
|
||||
:loading='loading'
|
||||
:scroll="{x: '100%',y:370}"
|
||||
@change='handleTableChange'>
|
||||
<span slot="status" slot-scope="text,record" :title="text" >
|
||||
<a v-if="record.designFlowTaskStatus == 'Compliance'" style='color: #26BD4B'>{{ text }}</a>
|
||||
<a v-if="record.designFlowTaskStatus == 'Non-Compliance'" style='color: #E83030'>{{ text }}</a>
|
||||
<a v-if="record.designFlowTaskStatus == 'To be tracked'" style='color: #FDA71C'>{{ text }}</a>
|
||||
<a v-if="record.designFlowTaskStatus == 'NA'" style='color: #707486'>{{ text }}</a>
|
||||
<a v-if="record.designFlowTaskStatus == 'No rating'" style='color: #00B3BE'>{{ $t('toBeConfirmed') }}</a>
|
||||
<a v-if="record.designFlowTaskStatus == 'Termination of task'" style='color: #E83030'>{{ $t('taskTermination') }}</a>
|
||||
<span slot="status" slot-scope="text,record" :title="text">
|
||||
<a v-if="record.designFlowTaskStatus == 'Compliance'"
|
||||
@click="verifyTaskClick(record,1,false)"
|
||||
style='color: #26BD4B'>{{ text }}</a>
|
||||
<a v-if="record.designFlowTaskStatus == 'Non-Compliance'"
|
||||
@click="verifyTaskClick(record,1,false)"
|
||||
style='color: #E83030'>{{ text }}</a>
|
||||
<a v-if="record.designFlowTaskStatus == 'To be tracked'"
|
||||
@click="verifyTaskClick(record,1,false)"
|
||||
style='color: #FDA71C'>{{ text }}</a>
|
||||
<a v-if="record.designFlowTaskStatus == 'NA'"
|
||||
@click="verifyTaskClick(record,1,false)"
|
||||
style='color: #707486'>{{ text }}</a>
|
||||
<a v-if="record.designFlowTaskStatus == 'No rating'" style='color: #00B3BE'
|
||||
@click="verifyTaskClick(record,1,true)">{{ $t('toBeConfirmed') }}</a>
|
||||
<a v-if="record.designFlowTaskStatus == 'Termination of task'"
|
||||
@click="verifyTaskClick(record,1,false)"
|
||||
style='color: #E83030'>{{ $t('taskTermination') }}</a>
|
||||
</span>
|
||||
<span slot="statusprehomo" slot-scope="text,record" :title="text" >
|
||||
<a v-if="record.prehomoFlowTaskStatus == 'Compliance'" style='color: #26BD4B'>{{ text }}</a>
|
||||
<a v-if="record.prehomoFlowTaskStatus == 'Non-Compliance'" style='color: #E83030'>{{ text }}</a>
|
||||
<a v-if="record.prehomoFlowTaskStatus == 'To be tracked'" style='color: #FDA71C'>{{ text }}</a>
|
||||
<a v-if="record.prehomoFlowTaskStatus == 'NA'" style='color: #707486'>{{ text }}</a>
|
||||
<a v-if="record.prehomoFlowTaskStatus == 'No rating'" style='color: #00B3BE'>{{ $t('toBeConfirmed') }}</a>
|
||||
<a v-if="record.prehomoFlowTaskStatus == 'Termination of task'" style='color: #E83030'>{{ $t('taskTermination') }}</a>
|
||||
<span slot="statusprehomo" slot-scope="text,record" :title="text">
|
||||
<a v-if="record.prehomoFlowTaskStatus == 'Compliance'"
|
||||
@click="verifyTaskClick(record,2,false)"
|
||||
style='color: #26BD4B'>{{ text }}</a>
|
||||
<a v-if="record.prehomoFlowTaskStatus == 'Non-Compliance'"
|
||||
@click="verifyTaskClick(record,2,false)" style='color: #E83030'>{{ text }}</a>
|
||||
<a v-if="record.prehomoFlowTaskStatus == 'To be tracked'"
|
||||
@click="verifyTaskClick(record,2,false)" style='color: #FDA71C'>{{ text }}</a>
|
||||
<a v-if="record.prehomoFlowTaskStatus == 'NA'"
|
||||
@click="verifyTaskClick(record,2,false)" style='color: #707486'>{{ text }}</a>
|
||||
<a v-if="record.prehomoFlowTaskStatus == 'No rating'"
|
||||
@click="verifyTaskClick(record,2,true)" style='color: #00B3BE'>{{ $t('toBeConfirmed') }}</a>
|
||||
<a v-if="record.prehomoFlowTaskStatus == 'Termination of task'"
|
||||
@click="verifyTaskClick(record,2,false)"
|
||||
style='color: #E83030'>{{ $t('taskTermination') }}</a>
|
||||
</span>
|
||||
<span slot="filstatuse" slot-scope="text,record" :title="text" >
|
||||
<a v-if="record.verifyFlowTaskStatus == 'Compliance'" style='color: #26BD4B'>{{ text }}</a>
|
||||
<a v-if="record.verifyFlowTaskStatus == 'Non-Compliance'" style='color: #E83030'>{{ text }}</a>
|
||||
<a v-if="record.verifyFlowTaskStatus == 'To be tracked'" style='color: #FDA71C'>{{ text }}</a>
|
||||
<a v-if="record.verifyFlowTaskStatus == 'NA'" style='color: #707486'>{{ text }}</a>
|
||||
<a v-if="record.verifyFlowTaskStatus == 'No rating'" style='color: #00B3BE'>{{ $t('toBeConfirmed') }}</a>
|
||||
<a v-if="record.verifyFlowTaskStatus == 'Termination of task'" style='color: #E83030'>{{ $t('taskTermination') }}</a>
|
||||
<span slot="filstatuse" slot-scope="text,record" :title="text">
|
||||
<a v-if="record.verifyFlowTaskStatus == 'Compliance'"
|
||||
@click="verifyTaskClick(record,3,false)"
|
||||
style='color: #26BD4B'>{{ text }}</a>
|
||||
<a v-if="record.verifyFlowTaskStatus == 'Non-Compliance'"
|
||||
@click="verifyTaskClick(record,3,false)" style='color: #E83030'>{{ text }}</a>
|
||||
<a v-if="record.verifyFlowTaskStatus == 'To be tracked'"
|
||||
@click="verifyTaskClick(record,3,false)" style='color: #FDA71C'>{{ text }}</a>
|
||||
<a v-if="record.verifyFlowTaskStatus == 'NA'"
|
||||
@click="verifyTaskClick(record,3,false)" style='color: #707486'>{{ text }}</a>
|
||||
<a v-if="record.verifyFlowTaskStatus == 'No rating'"
|
||||
@click="verifyTaskClick(record,3,true)" style='color: #00B3BE'>{{ $t('toBeConfirmed') }}</a>
|
||||
<a v-if="record.verifyFlowTaskStatus == 'Termination of task'"
|
||||
@click="verifyTaskClick(record,3,false)" style='color: #E83030'>{{ $t('taskTermination') }}</a>
|
||||
</span>
|
||||
|
||||
<!-- <template slot="file" slot-scope="text, record">-->
|
||||
<!-- <a class="action-edit" href="javascript:;" @click="dowloadfile(record)" v-has="'bqnrzdpzxlbj'">{{record.exportFileName}}</a>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template slot="file" slot-scope="text, record">-->
|
||||
<!-- <a class="action-edit" href="javascript:;" @click="dowloadfile(record)" v-has="'bqnrzdpzxlbj'">{{record.exportFileName}}</a>-->
|
||||
<!-- </template>-->
|
||||
</a-table>
|
||||
<!-- <div class="page" style='display: flex;justify-content: flex-end;'>-->
|
||||
<!-- <a-pagination-->
|
||||
<!-- :show-total="total => $t('total')+` ${total} `+$t('strip')"-->
|
||||
<!-- show-quick-jumper-->
|
||||
<!-- show-size-changer-->
|
||||
<!-- :page-size.sync="pageSize"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- :current="pageNo"-->
|
||||
<!-- @change="pageOnChange"-->
|
||||
<!-- @showSizeChange="SizeChange"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<div class="table-operator" >
|
||||
<a-button type="primary" v-if='this.opinionGather > 0' @click="handlecomments()">{{ $t('CommentsCollectionResultsForReference') }}</a-button>
|
||||
<a-button type="primary" v-if='this.technologyEvaluation > 0' @click="handletechnical()">{{ $t('TechnicalEvaluationResultsForReference') }}</a-button>
|
||||
<!-- <div class="page" style='display: flex;justify-content: flex-end;'>-->
|
||||
<!-- <a-pagination-->
|
||||
<!-- :show-total="total => $t('total')+` ${total} `+$t('strip')"-->
|
||||
<!-- show-quick-jumper-->
|
||||
<!-- show-size-changer-->
|
||||
<!-- :page-size.sync="pageSize"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- :current="pageNo"-->
|
||||
<!-- @change="pageOnChange"-->
|
||||
<!-- @showSizeChange="SizeChange"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<div class="table-operator">
|
||||
<a-button type="primary" v-if='this.opinionGather > 0' @click="handlecomments()">{{
|
||||
$t('CommentsCollectionResultsForReference') }}
|
||||
</a-button>
|
||||
<a-button type="primary" v-if='this.technologyEvaluation > 0' @click="handletechnical()">{{
|
||||
$t('TechnicalEvaluationResultsForReference') }}
|
||||
</a-button>
|
||||
</div>
|
||||
<!-- <div class='drawer-bootom-button'>-->
|
||||
<!-- <a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>-->
|
||||
@@ -125,282 +155,386 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { putAction, postAction, getAction, deleteAction ,downloadFile } from '@/api/manage'
|
||||
import axios from 'axios'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { putAction, postAction, getAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
import axios from 'axios'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
name: 'diolagArea',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
token:Vue.ls.get(ACCESS_TOKEN),
|
||||
title: this.$t('add'),
|
||||
total: 0,
|
||||
selectedRowKeysDate: {},
|
||||
opinionGather:'',
|
||||
technologyEvaluation:'',
|
||||
loading: false,
|
||||
editId: '',
|
||||
RelatedItemList:[],
|
||||
dutyTerritory:[],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('areaOfResponsibility'),
|
||||
dataIndex: 'dutyTerritory_dicText',
|
||||
width: 120,
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
export default {
|
||||
name: 'diolagArea',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
token: Vue.ls.get(ACCESS_TOKEN),
|
||||
title: this.$t('add'),
|
||||
total: 0,
|
||||
selectedRowKeysDate: {},
|
||||
opinionGather: '',
|
||||
technologyEvaluation: '',
|
||||
loading: false,
|
||||
editId: '',
|
||||
RelatedItemList: [],
|
||||
dutyTerritory: [],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('areaOfResponsibility'),
|
||||
dataIndex: 'dutyTerritory_dicText',
|
||||
width: 120,
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('RelatedItems'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'projectName',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('designComplianceReview'),
|
||||
align: 'center',
|
||||
width: 250,
|
||||
dataIndex: 'designFlowTaskStatus_dicText',
|
||||
scopedSlots: { customRender: 'status' },
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('preHomeConfirmation'),
|
||||
align: 'center',
|
||||
width: 270,
|
||||
dataIndex: 'prehomoFlowTaskStatus_dicText',
|
||||
scopedSlots: { customRender: 'statusprehomo' },
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('verificationComplianceReview'),
|
||||
align: 'center',
|
||||
width: 270,
|
||||
dataIndex: 'verifyFlowTaskStatus_dicText',
|
||||
scopedSlots: { customRender: 'filstatuse' },
|
||||
ellipsis: true
|
||||
}
|
||||
],
|
||||
newVisible: false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 }
|
||||
},
|
||||
{
|
||||
title: this.$t('RelatedItems'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'projectName',
|
||||
ellipsis: true
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 14 }
|
||||
},
|
||||
{
|
||||
title: this.$t('designComplianceReview'),
|
||||
align: 'center',
|
||||
width: 250,
|
||||
dataIndex: 'designFlowTaskStatus_dicText',
|
||||
scopedSlots: { customRender: 'status' },
|
||||
ellipsis: true
|
||||
form: {},
|
||||
formData: {
|
||||
projectName: ''
|
||||
},
|
||||
{
|
||||
title: this.$t('preHomeConfirmation'),
|
||||
align: 'center',
|
||||
width: 270,
|
||||
dataIndex: 'prehomoFlowTaskStatus_dicText',
|
||||
scopedSlots: { customRender: 'statusprehomo' },
|
||||
ellipsis: true
|
||||
rules: {
|
||||
title: [
|
||||
{ required: true, message: this.$t('enterTitle'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('verificationComplianceReview'),
|
||||
align: 'center',
|
||||
width: 270,
|
||||
dataIndex: 'verifyFlowTaskStatus_dicText',
|
||||
scopedSlots: { customRender: 'filstatuse' },
|
||||
ellipsis: true
|
||||
}
|
||||
],
|
||||
newVisible: false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 14 }
|
||||
},
|
||||
form: {},
|
||||
formData: {
|
||||
projectName:'',
|
||||
},
|
||||
rules: {
|
||||
title: [
|
||||
{ required: true, message: this.$t('enterTitle'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
areaTable: [],
|
||||
flag: false, //表单提交标识
|
||||
spinLoading: false,
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
listVisible: false,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
default: '',
|
||||
require: true
|
||||
areaTable: [],
|
||||
flag: false, //表单提交标识
|
||||
spinLoading: false,
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
listVisible: false
|
||||
}
|
||||
},
|
||||
paramsManifestId: {
|
||||
type: String,
|
||||
default: '',
|
||||
require: true
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
default: '',
|
||||
require: true
|
||||
},
|
||||
paramsManifestId: {
|
||||
type: String,
|
||||
default: '',
|
||||
require: true
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.loadData()
|
||||
this.getRelatedItemList()
|
||||
this.getdutyTerritory()
|
||||
},
|
||||
methods: {
|
||||
getRelatedItemList(){
|
||||
getAction('/project/projectNameInfoEO/list', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.RelatedItemList = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
mounted() {
|
||||
this.loadData()
|
||||
this.getRelatedItemList()
|
||||
this.getdutyTerritory()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.loadData()
|
||||
},
|
||||
// 法规意见收集列表
|
||||
handlecomments(){
|
||||
this.$router.push({
|
||||
path: '/collectionOfRegulatoryOpinions',
|
||||
query:{
|
||||
serialNumber:this.item.serialNumber,
|
||||
gatherResult:'Completed'
|
||||
methods: {
|
||||
getRelatedItemList() {
|
||||
getAction('/project/projectNameInfoEO/list', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.RelatedItemList = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.loadData()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.loadData()
|
||||
},
|
||||
// 法规意见收集列表
|
||||
handlecomments() {
|
||||
this.$router.push({
|
||||
path: '/collectionOfRegulatoryOpinions',
|
||||
query: {
|
||||
serialNumber: this.item.serialNumber,
|
||||
gatherResult: 'Completed'
|
||||
}
|
||||
})
|
||||
},
|
||||
getdutyTerritory() {
|
||||
getAction('sys/dict/getDictItems/duty_territory', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dutyTerritory = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
verifyTaskClick(val, num, isTrue) {
|
||||
let query = {}
|
||||
let isDisplay = false
|
||||
switch (num) {
|
||||
case 1:
|
||||
if (val.designTaskStatus == 'NotDone'){
|
||||
isDisplay = true
|
||||
}else{
|
||||
isDisplay = false
|
||||
}
|
||||
query = {
|
||||
taskIds: val.designTaskId,
|
||||
actiProcInstId: val.designPId,
|
||||
projectTaskInventoryId: val.projectLawsInventoryId,
|
||||
projectLibraryId: val.projectLibraryId,
|
||||
id: val.projectLibraryId,
|
||||
studioEngineer: val.studioEngineer,
|
||||
serialNumber: val.serialNumber,
|
||||
TaskKey: val.designTaskDefinitionKey,
|
||||
isDisplay: isDisplay,
|
||||
flowType: 2,
|
||||
Sponsor: 'designInitiatorName',
|
||||
personLiable: 'designDutyName',
|
||||
typeOfDeliverables: 'designDeliverableTypeName',
|
||||
deliverableTemplate: 'designDeliverableTemplate',
|
||||
DueDate: 'designDueDate',
|
||||
remarks: 'designRemark',
|
||||
projectName: val.projectName,
|
||||
targetMarket: val.targetMarket,
|
||||
projectNameId: val.projectNameId,
|
||||
primaryKeyId: val.designTaskDetailId,
|
||||
PersonChargeFeedback: val.designPersonChargeFeedback
|
||||
}
|
||||
break
|
||||
case 2:
|
||||
if (val.prehomoTaskStatus == 'NotDone'){
|
||||
isDisplay = true
|
||||
}else{
|
||||
isDisplay = false
|
||||
}
|
||||
query = {
|
||||
taskIds: val.prehomoTaskId,
|
||||
actiProcInstId: val.prehomoPId,
|
||||
projectTaskInventoryId: val.projectLawsInventoryId,
|
||||
studioEngineer: val.studioEngineer,
|
||||
projectLibraryId: val.projectLibraryId,
|
||||
serialNumber: val.serialNumber,
|
||||
TaskKey: val.prehomoTaskDefinitionKey,
|
||||
flowType: 3,
|
||||
isDisplay: isDisplay,
|
||||
id: val.projectLibraryId,
|
||||
Sponsor: 'prehomoInitiatorName',
|
||||
personLiable: 'prehomoDutyName',
|
||||
typeOfDeliverables: 'prehomoDeliverableTypeName',
|
||||
deliverableTemplate: 'prehomoDeliverableTemplate',
|
||||
DueDate: 'prehomoDueDate',
|
||||
remarks: 'prehomoRemark',
|
||||
projectName: val.projectName,
|
||||
targetMarket: val.targetMarket,
|
||||
projectNameId: val.projectNameId,
|
||||
primaryKeyId: val.prehomoTaskDetailId,
|
||||
PersonChargeFeedback: val.prehomoPersonChargeFeedback
|
||||
}
|
||||
break
|
||||
case 3:
|
||||
if (val.verifyTaskStatus == 'NotDone'){
|
||||
isDisplay = true
|
||||
}else{
|
||||
isDisplay = false
|
||||
}
|
||||
query = {
|
||||
taskIds: val.verifyTaskId,
|
||||
actiProcInstId: val.verifyPId,
|
||||
id: val.projectLibraryId,
|
||||
projectLibraryId: val.projectLibraryId,
|
||||
studioEngineer: val.studioEngineer,
|
||||
serialNumber: val.serialNumber,
|
||||
projectTaskInventoryId: val.projectLawsInventoryId,
|
||||
TaskKey: val.verifyTaskDefinitionKey,
|
||||
flowType: 4,
|
||||
isDisplay: isDisplay,
|
||||
Sponsor: 'verifyInitiatorName',
|
||||
personLiable: 'verifyDutyName',
|
||||
typeOfDeliverables: 'verifyDeliverableTypeName',
|
||||
deliverableTemplate: 'verifyDeliverableTemplate',
|
||||
DueDate: 'verifyDueDate',
|
||||
remarks: 'verifyRemark',
|
||||
projectName: val.projectName,
|
||||
targetMarket: val.targetMarket,
|
||||
projectNameId: val.projectNameId,
|
||||
primaryKeyId: val.verifyTaskDetailId,
|
||||
PersonChargeFeedback: val.verifyPersonChargeFeedback
|
||||
}
|
||||
break
|
||||
}
|
||||
})
|
||||
},
|
||||
getdutyTerritory(){
|
||||
getAction('sys/dict/getDictItems/duty_territory', { }).then((res) => {
|
||||
if (res.success) {
|
||||
this.dutyTerritory = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
// 法规技术评估列表
|
||||
handletechnical(){
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/taskListProcess',
|
||||
query: query
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
// 法规技术评估列表
|
||||
handletechnical() {
|
||||
|
||||
this.$router.push({
|
||||
path: '/technologyAssessment',
|
||||
query:{
|
||||
serialNumber:this.item.serialNumber,
|
||||
flowStatus:'Completed'
|
||||
this.$router.push({
|
||||
path: '/technologyAssessment',
|
||||
query: {
|
||||
serialNumber: this.item.serialNumber,
|
||||
flowStatus: 'Completed'
|
||||
}
|
||||
})
|
||||
},
|
||||
loadData() {
|
||||
let params = {
|
||||
id: this.paramsManifestId,
|
||||
dutyTerritory: this.formData.dutyTerritory ? this.formData.dutyTerritory : '',
|
||||
projectName: this.formData.projectName ? this.formData.projectName : '',
|
||||
projectNameId: this.formData.projectNameId ? this.formData.projectNameId : ''
|
||||
// pageNo: this.pageNo,
|
||||
// pageSize: this.pageSize,
|
||||
}
|
||||
})
|
||||
},
|
||||
loadData() {
|
||||
let params = {
|
||||
id:this.paramsManifestId,
|
||||
dutyTerritory:this.formData.dutyTerritory?this.formData.dutyTerritory:'',
|
||||
projectName:this.formData.projectName?this.formData.projectName:'',
|
||||
projectNameId:this.formData.projectNameId?this.formData.projectNameId:'',
|
||||
// pageNo: this.pageNo,
|
||||
// pageSize: this.pageSize,
|
||||
}
|
||||
this.loading = true
|
||||
getAction('project/lawsComplianceBoard/queryComplianceResultList', params).then((res) => {
|
||||
if (res.success) {
|
||||
this.areaTable = res.result.complianceResultList
|
||||
this.opinionGather = res.result.opinionGather
|
||||
this.technologyEvaluation = res.result.technologyEvaluation
|
||||
// this.total = res.result.total
|
||||
this.loading = false
|
||||
}else{
|
||||
this.loading = false
|
||||
this.loading = true
|
||||
getAction('project/lawsComplianceBoard/queryComplianceResultList', params).then((res) => {
|
||||
if (res.success) {
|
||||
this.areaTable = res.result.complianceResultList
|
||||
this.opinionGather = res.result.opinionGather
|
||||
this.technologyEvaluation = res.result.technologyEvaluation
|
||||
// this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
//导出
|
||||
handleExportXls() {
|
||||
let query = {
|
||||
id: this.paramsManifestId,
|
||||
...this.formData
|
||||
}
|
||||
})
|
||||
},
|
||||
//导出
|
||||
handleExportXls(){
|
||||
let query = {
|
||||
id:this.paramsManifestId,
|
||||
...this.formData
|
||||
downloadFile('/project/lawsComplianceBoard/exportComplianceResultDetail', this.item.serialNumber + '.xls', query, this.Deselect)
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.loadData()
|
||||
},
|
||||
searchReset() {
|
||||
this.formData = {}
|
||||
this.pageNo = 1
|
||||
this.loadData()
|
||||
},
|
||||
handleCancel() {
|
||||
this.$emit('areaVisible', false)
|
||||
},
|
||||
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
|
||||
this.selectedRowKeysDate = selectedRowKeysDate
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
},
|
||||
handleTableChange(val) {
|
||||
console.log(',,,')
|
||||
},
|
||||
showModal() {
|
||||
this.title = this.$t('add')
|
||||
this.newVisible = true
|
||||
this.form = {}
|
||||
}
|
||||
downloadFile('/project/lawsComplianceBoard/exportComplianceResultDetail', this.item.serialNumber +'.xls', query, this.Deselect)
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.loadData()
|
||||
},
|
||||
searchReset() {
|
||||
this.formData = {}
|
||||
this.pageNo = 1
|
||||
this.loadData()
|
||||
},
|
||||
handleCancel() {
|
||||
this.$emit('areaVisible', false)
|
||||
},
|
||||
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
|
||||
this.selectedRowKeysDate = selectedRowKeysDate
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
},
|
||||
handleTableChange(val) {
|
||||
console.log(',,,')
|
||||
},
|
||||
showModal() {
|
||||
this.title = this.$t('add')
|
||||
this.newVisible = true
|
||||
this.form = {}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
selectedRowKeyS(val) {
|
||||
this.selectedRowKeys = val
|
||||
watch: {
|
||||
selectedRowKeyS(val) {
|
||||
this.selectedRowKeys = val
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='less' scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.title-text {
|
||||
width: 110px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: -15px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.title-text {
|
||||
width: 110px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: -15px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.diolag-area {
|
||||
.table-area {
|
||||
margin: 20px 0;
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.action-edit {
|
||||
margin-right: 10px;
|
||||
.diolag-area {
|
||||
.table-area {
|
||||
margin: 20px 0;
|
||||
|
||||
.action-edit {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.table-del {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
|
||||
.table-del {
|
||||
.drawer-bootom-button {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
.drawer-bootom-button{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.area-module {
|
||||
.ant-modal-wrap {
|
||||
.ant-modal {
|
||||
.ant-modal-content {
|
||||
.ant-modal-footer {
|
||||
text-align: center;
|
||||
.area-module {
|
||||
.ant-modal-wrap {
|
||||
.ant-modal {
|
||||
.ant-modal-content {
|
||||
.ant-modal-footer {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -107,7 +107,7 @@
|
||||
{
|
||||
title: this.$t('MenuName'),
|
||||
dataIndex: 'name',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
key: 'name',
|
||||
ellipsis: true,
|
||||
width: 180
|
||||
@@ -115,7 +115,7 @@
|
||||
{
|
||||
title: this.$t('MenuEnName'),
|
||||
dataIndex: 'menuEn',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
key: 'menuEn',
|
||||
ellipsis: true,
|
||||
width: 180
|
||||
@@ -123,7 +123,7 @@
|
||||
{
|
||||
title: 'icon',
|
||||
dataIndex: 'icon',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
key: 'icon',
|
||||
ellipsis: true,
|
||||
width: 180
|
||||
@@ -131,7 +131,7 @@
|
||||
{
|
||||
title: this.$t('assembly'),
|
||||
dataIndex: 'component',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
key: 'component',
|
||||
width: 240,
|
||||
ellipsis: true,
|
||||
@@ -140,7 +140,7 @@
|
||||
{
|
||||
title: this.$t('route'),
|
||||
dataIndex: 'url',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
key: 'url',
|
||||
width: 240,
|
||||
ellipsis: true,
|
||||
@@ -149,7 +149,7 @@
|
||||
{
|
||||
title: this.$t('sort'),
|
||||
dataIndex: 'sortNo',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
width: 80,
|
||||
ellipsis: true,
|
||||
key: 'sortNo'
|
||||
|
||||
@@ -92,7 +92,7 @@ module.exports = {
|
||||
}
|
||||
}, */
|
||||
'/jero-boot': {
|
||||
target: 'http://10.0.1.14:8080', //请求本地 jero-boot后台项目
|
||||
target: 'http://localhost:8080', //请求本地 jero-boot后台项目
|
||||
// target: 'http://10.10.10.46:8101', //请求本地 jero-boot后台项目
|
||||
// target: 'http://10.0.1.25:8080',
|
||||
// target: 'http://10.0.1.5:8080',
|
||||
|
||||
Reference in New Issue
Block a user