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

This commit is contained in:
zyx.net
2022-12-01 09:46:11 +08:00
45 changed files with 2567 additions and 22173 deletions
@@ -27,3 +27,8 @@ ALTER TABLE `laws_weilai`.`params_manifest_history`
ADD COLUMN `project_version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '相关项目版本' AFTER `params_template_name`,
ADD COLUMN `explanation` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '说明' AFTER `project_version`;
-- 认证参数历史列表添加字段--------2022-11-23 未同步生产环境
ALTER TABLE `laws_weilai`.`params_manifest`
ADD COLUMN `project_version_id` varchar(50) NULL COMMENT '项目相关版本对应的项目id' AFTER `explanation`;
ALTER TABLE `laws_weilai`.`params_manifest_history`
ADD COLUMN `project_version_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目相关版本对应的项目id' AFTER `explanation`;
@@ -486,8 +486,8 @@ public class QueryGenerator {
}
name = oConvertUtils.camelToUnderline(name);
log.info("--查询规则-->"+name+" "+rule.getValue()+" "+value);
if(" is null ".equals(value)){
queryWrapper.isNull(name);
if("is null".equals(value)){
queryWrapper.isNull(name).or().eq(name, "");
}else{
switch (rule) {
case GT:
@@ -142,6 +142,7 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/opensso/**", "anon"); //单点登录
filterChainDefinitionMap.put("/project/projectLawsInventoryEO/processCall", "anon"); // 项目库-法规清单 工作流处理数据接口排除
filterChainDefinitionMap.put("/project/projectLawsInventoryEO/updateFlowInfoByProjectLibraryIds", "anon"); // 项目库-法规清单 根据项目库id更新符合性流程发起人、责任人接口排除
filterChainDefinitionMap.put("/project/projectTaskInventoryEO/processCall", "anon"); // 项目库-任务清单 工作流处理数据接口排除
filterChainDefinitionMap.put("/wkflow/processHistoryEO/processCall", "anon"); // 流程历史 工作流处理数据接口排除
filterChainDefinitionMap.put("/lawsOpinionGather/lawsOpinionGatherEO/processCall", "anon"); // 法规收集表 工作流处理数据接口排除
@@ -83,7 +83,7 @@ public class ParamsManifestEOController extends JeroController<ParamsManifestEO,
// 处理 状态 中英文
Map<String, String> stateMap = ManifestStateEnum.toMap(cut);
rows.forEach(manifestEO -> {
manifestEO.setProjectName(paramsManifestEOService.getProjectById(manifestEO.getProjectId()).getProjectName());
manifestEO.setProjectName(paramsManifestEOService.getProjectById(manifestEO.getProjectId(), manifestEO.getProjectVersion()).getProjectName());
manifestEO.setState(stateMap.get(manifestEO.getState()));
});
return Result.OK(cut, pageList);
@@ -103,10 +103,13 @@ public class ParamsManifestEO implements Serializable {
@TableField(exist = false)
private String projectName;
//相关项目版本
@ApiModelProperty(value = "相关项目版本")
private String projectVersion;
//说明
@ApiModelProperty(value = "说明")
private String explanation;
@ApiModelProperty(value = "项目相关版本对应的项目id")
private String projectVersionId;
}
@@ -18,6 +18,7 @@
<result column="params_template_name" property="paramsTemplateName" />
<result column="project_version" property="projectVersion" />
<result column="explanation" property="explanation" />
<result column="project_version_id" property="projectVersionId" />
</resultMap>
<resultMap id="ParamsManifestEOResultMapForCopy" type="com.jero.modules.cert.collect.vo.ParamsManifestVO">
<id column="id" property="id" />
@@ -164,7 +165,7 @@
select tmp_tb.* from(
select
plb.id as project_id,
concat(pni.project_name,'-',pyni.year_name,'-',target_market,'-',project_version) as project_name
concat(pni.project_name,'-',pyni.year_name,'-',target_market) as project_name
from project_library_base plb
left join project_name_info as pni on plb.project_name_id = pni.id
left join project_year_name_info as pyni on plb.year_name_id = pyni.id
@@ -89,7 +89,7 @@ public interface IParamsManifestEOService extends IService<ParamsManifestEO> {
ParamsManifestEO copy(ParamsManifestEO paramsManifestEO, String sourceManifestId);
ParamsManifestVO getProjectById(String projectId);
ParamsManifestVO getProjectById(String projectId, String projectVersion);
List<Map<String, String>> labelListForProjectDetails(String projectId);
@@ -49,6 +49,7 @@ import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
import com.jero.modules.project.service.IProjectLibraryBaseService;
import com.jero.modules.project.service.IProjectRelatedPersonnelService;
import com.jero.modules.split.common.FileUnZip;
import com.jero.modules.split.common.ReadExcel;
@@ -147,6 +148,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
@Autowired
private ProjectLibraryBaseMapper projectLibraryBaseMapper;
@Autowired
private IProjectLibraryBaseService projectLibraryBaseService;
@Autowired
private WebSocketServer webSocketServer; // 同步上报库时变更清单状态时使用
@Resource
private WebSocket webSocket; // 消息专用
@@ -172,6 +175,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
List<ParamsInfoPublishEO> paramsInfoPublishEOList = paramsCollectManifestVO.getParamsInfoPublishEOList();
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId);
// 复制参数项
List<ParamsCollectManifestEO> paramsCollectManifestEOList = new ArrayList<>();
@@ -192,7 +196,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
target.setUpdateTime(date);
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(projectId, source.getDutyTerritory());
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(paramsManifestEO.getProjectVersionId(), source.getDutyTerritory());
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
if (org.apache.commons.lang.StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
@@ -207,7 +211,6 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
}
// 判断清单状态是否为已完成,若是,更改为收集中
ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId);
if (ManifestStateEnum.FINISHED.getValue().equals(paramsManifestEO.getState())) {
// 更新清单状态和完成时间
ParamsManifestEO updateParamsManifestEO = new ParamsManifestEO();
@@ -1043,8 +1046,11 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
@Override
public List<Map<String,String>> querySdtList(ParamsCollectManifestVO paramsCollectManifestVO) {
// 根据主项目ID 查询 相关项目版本的项目ID
String projectVersionId = projectLibraryBaseService.getIdByVersionAndParentId(paramsCollectManifestVO.getProjectVersion(), paramsCollectManifestVO.getProjectId());
List<Map<String,String>> sdtList = new ArrayList<>();
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(paramsCollectManifestVO.getProjectId(), paramsCollectManifestVO.getDutyTerritory());
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(projectVersionId, paramsCollectManifestVO.getDutyTerritory());
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
String sdtIds = projectRelatedPersonnel.getEngineeringInterfacePerson();
if (StringUtils.isNotBlank(sdtIds)) {
@@ -1075,15 +1081,30 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
List<Map<String, String>> userTypeList = new ArrayList<>(); // 一个用户可以有多个用户类型
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录用户
// 查询项目下所有责任领域下的 homo人员
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.queryById(projectId);
List<String> homoList = new ArrayList<>();
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseService.getParentAndChildern(projectId);
List<String> homoList = new ArrayList<>(); //homo人员
List<String> studioList = new ArrayList<>(); //studio人员
if (CollectionUtil.isNotEmpty(projectLibraryBaseList)) {
String homoIdStr = projectLibraryBaseList.get(0).getCertificationEngineer();
if (StringUtils.isNotEmpty(homoIdStr)) {
List<String> homoIdList = Arrays.asList(homoIdStr.split(",")).stream().distinct().collect(Collectors.toList());
homoList = sysUserService.listByIds(homoIdList).stream().map(SysUser::getUsername).collect(Collectors.toList());
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
// 查询主项目及子项目下所有 homo人员
List<String> homoIdList1 = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(",")).stream().collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(homoIdList1)) {
homoList.addAll(sysUserService.listByIds(homoIdList1).stream().map(SysUser::getUsername).collect(Collectors.toList()));
}
// 查询当前登录用户角色 是否是当前项目的studio
List<String> studioList1 = Arrays.asList(projectLibraryBase.getStudioEngineer().split(",")).stream().collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(studioList1)) {
studioList.addAll(sysUserService.listByIds(studioList1).stream().map(SysUser::getUsername).collect(Collectors.toList())); // studio 一个项目只有一个
}
}
// 去重
homoList = homoList.stream().distinct().collect(Collectors.toList());
studioList = studioList.stream().distinct().collect(Collectors.toList());
}
// 查询项目下所有责任领域下的 sdt人员
@@ -1124,11 +1145,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
List<String> userRoleIdList = userRoles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList());
userRoleIds = roleIdList.stream().filter(e->userRoleIdList.contains(e)).collect(Collectors.toList());
}
// 查询当前登录用户角色 是否是当前项目的studio
List<String> studioList = new ArrayList<>();
if (CollectionUtil.isNotEmpty(projectLibraryBaseList)) {
studioList = projectLibraryBaseList.stream().map(ProjectLibraryBase::getStudioEngineerName).collect(Collectors.toList()); // studio 一个项目只有一个
}
String loginUserName = loginUser.getUsername().toLowerCase();
studioList = toLowerCaseOfList(studioList);
@@ -1301,7 +1318,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
//日期
String deadline = new SimpleDateFormat("yyyy-MM-dd").format(paramsCollectManifestEO.getDeadline());
//项目名称
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(paramsManifestEO.getProjectId()); // 获取项目信息
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(paramsManifestEO.getProjectId(), paramsManifestEO.getProjectVersion()); // 获取项目信息
//url
String urlParamsStr = parseUrlParams(paramsManifestEO);
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
@@ -1460,7 +1477,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
updateEO.setDutyTerritory(dutyTerritory);
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(projectId, dutyTerritory);
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(paramsManifestEO.getProjectVersionId(), dutyTerritory);
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
if (org.apache.commons.lang.StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
@@ -1507,8 +1524,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); // 获取清单信息
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId, paramsManifestEO.getProjectVersion()); // 获取项目信息
paramsManifestEO.setProjectName(projectInfo.getProjectName());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -1619,8 +1636,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
Date deadline = paramsCollectManifestVO.getDeadline();
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); // 获取清单信息
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId, paramsManifestEO.getProjectVersion()); // 获取项目信息
paramsManifestEO.setProjectName(projectInfo.getProjectName());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -1751,8 +1768,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
Date deadline = paramsCollectManifestVO.getDeadline();
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); // 获取清单信息
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId, paramsManifestEO.getProjectVersion()); // 获取项目信息
paramsManifestEO.setProjectName(projectInfo.getProjectName());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -2248,6 +2265,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
String projectId = paramsCollectManifestVO.getProjectId();
// 查询参数清单
ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId);
// 查询所有收集参数项
ParamsCollectManifestEO paramsCollectManifestEO = new ParamsCollectManifestEO();
paramsCollectManifestEO.setParamsManifestId(paramsManifestId);
@@ -2260,7 +2280,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
list.forEach(collectManifestEO -> {
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(projectId, collectManifestEO.getDutyTerritory());
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(paramsManifestEO.getProjectVersionId(), collectManifestEO.getDutyTerritory());
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
if (org.apache.commons.lang.StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
@@ -2283,7 +2303,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
@Override
public void exportAll(ParamsCollectManifestVO paramsCollectManifestVO, HttpServletResponse response, HttpServletRequest request) {
// OutputStream os = null;
OutputStream os = null;
OutputStream excelOS = null;
XSSFWorkbook workbook = new XSSFWorkbook();
String fileOriName = "参数项清单导出信息";
@@ -2379,58 +2399,58 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
String repFileName = fileName.replaceAll("/","_");
excelOS = new FileOutputStream(fileNowPath + File.separator + repFileName);
// response.setHeader("Content-Disposition",
// "attachment; filename=\""+ ReadExcel.encodeFileName(fileOriName+".zip", request) +"\"");
// response.setContentType("application/force-download");
// response.flushBuffer();
// os = response.getOutputStream();
response.setHeader("Content-Disposition",
"attachment; filename=\""+ ReadExcel.encodeFileName(fileOriName+".zip", request) +"\"");
response.setContentType("application/force-download");
response.flushBuffer();
os = response.getOutputStream();
workbook.write(excelOS);
excelOS.flush();
excelOS.close();
ZipUtil.zip(fileNowPath,fileNowPath+".zip");
// FileInputStream fis = new FileInputStream(fileNowPath+".zip");
// int len = 0;
// while ((len = fis.read()) != -1) {
// os.write(len);
// }
FileInputStream fis = new FileInputStream(fileNowPath+".zip");
int len = 0;
while ((len = fis.read()) != -1) {
os.write(len);
}
// 将导出文件上传到cos上
String uploadFileName = fileOriName + ".zip";
InputStream uploadFileio = new FileInputStream(new File(fileNowPath+".zip"));
MultipartFile mFile = new MockMultipartFile(uploadFileName, uploadFileName, "text/plain", uploadFileio); // 用于上传
OSSFile ossFile = ossFileService.uploadLocalOfCos(mFile, "/manifest", "", CutEnum.CN.getValue()); // 上传导出的压缩包
// 系统向用户发消息
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
String msgTitle = "The file " + paramsCollectManifestVO.getExportName() + " that you exported has been generated.";
String content = "The file " + paramsCollectManifestVO.getExportName() + " that you exported has been generated, please click download.";
String href = "<a href='/jero-boot/sys/common/downLoadFile?id=" + ossFile.getId() + "'" + " target='_blank'>download</a>.";
String contentInfo = "The file " + paramsCollectManifestVO.getExportName() + " that you exported has been generated, please click " + href;
SysAnnouncement sysAnnouncement = new SysAnnouncement();
sysAnnouncement.setDelFlag("0");
sysAnnouncement.setSendStatus("0");
sysAnnouncement.setSendTime(new Date());
sysAnnouncement.setMsgCategory(MessageTypeEnum.PUSH.getValue()); //消息类型:转发推送
sysAnnouncement.setInitiator(MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName()); // 发起人:系统
sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
sysAnnouncement.setTitile(msgTitle);
sysAnnouncement.setMsgContent(content);
sysAnnouncement.setMsgContentInfo(contentInfo);
sysAnnouncement.setUserIds(currentUser.getId()); // 发送给当前导出人
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
JSONObject obj = new JSONObject();
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
obj.put(WebsocketConst.MSG_ID, currentUser.getId());
obj.put(WebsocketConst.MSG_TXT, contentInfo);
webSocket.sendMessage(obj.toJSONString());
uploadFileio.close();
// os.flush();
// os.close(); // 后开先关
// fis.close(); // 先开后关
// // 将导出文件上传到cos上
// String uploadFileName = fileOriName + ".zip";
// InputStream uploadFileio = new FileInputStream(new File(fileNowPath+".zip"));
// MultipartFile mFile = new MockMultipartFile(uploadFileName, uploadFileName, "text/plain", uploadFileio); // 用于上传
// OSSFile ossFile = ossFileService.uploadLocalOfCos(mFile, "/manifest", "", CutEnum.CN.getValue()); // 上传导出的压缩包
//
// // 系统向用户发消息
// LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
// String msgTitle = "The file " + paramsCollectManifestVO.getExportName() + " that you exported has been generated.";
// String content = "The file " + paramsCollectManifestVO.getExportName() + " that you exported has been generated, please click download.";
//
// String href = "<a href='/jero-boot/sys/common/downLoadFile?id=" + ossFile.getId() + "'" + " target='_blank'>download</a>.";
// String contentInfo = "The file " + paramsCollectManifestVO.getExportName() + " that you exported has been generated, please click " + href;
//
// SysAnnouncement sysAnnouncement = new SysAnnouncement();
// sysAnnouncement.setDelFlag("0");
// sysAnnouncement.setSendStatus("0");
// sysAnnouncement.setSendTime(new Date());
// sysAnnouncement.setMsgCategory(MessageTypeEnum.PUSH.getValue()); //消息类型:转发推送
// sysAnnouncement.setInitiator(MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName()); // 发起人:系统
// sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
// sysAnnouncement.setTitile(msgTitle);
// sysAnnouncement.setMsgContent(content);
// sysAnnouncement.setMsgContentInfo(contentInfo);
// sysAnnouncement.setUserIds(currentUser.getId()); // 发送给当前导出人
// sysAnnouncementService.saveAnnouncement(sysAnnouncement);
//
// JSONObject obj = new JSONObject();
// obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
// obj.put(WebsocketConst.MSG_ID, currentUser.getId());
// obj.put(WebsocketConst.MSG_TXT, contentInfo);
// webSocket.sendMessage(obj.toJSONString());
//
// uploadFileio.close();
os.flush();
os.close(); // 后开先关
fis.close(); // 先开后关
} catch (Exception e) {
if (e instanceof JeroBootException){
throw new JeroBootException(e.getMessage());
@@ -2444,7 +2464,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
}
} finally {
// IOUtils.closeQuietly(os);
IOUtils.closeQuietly(os);
IOUtils.closeQuietly(excelOS);
File tempZipFile = new File(uploadpath + "/tempZip");
FileUtil.deleteContents(tempZipFile);
@@ -2870,6 +2890,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
String projectId = paramsCollectManifestVO.getProjectId();
String cut = paramsCollectManifestVO.getCut();
// 查询参数清单
ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId);
// 查询清单的所有参数项
LambdaQueryWrapper<ParamsCollectManifestEO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(ParamsCollectManifestEO::getId, paramsCollectManifestIdList);
List<ParamsCollectManifestEO> paramsCollectManifestEOList = paramsCollectManifestEOMapper.selectList(queryWrapper);
@@ -2885,7 +2908,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
updateEO.setDutyTerritory(dutyTerritory);
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(projectId, dutyTerritory);
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(paramsManifestEO.getProjectVersionId(), dutyTerritory);
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
if (org.apache.commons.lang.StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
@@ -4446,7 +4469,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
List<ParamsManifestEO> manifestEOS = paramsManifestEOService.list(queryWrapper);
for (ParamsManifestEO manifestEO : manifestEOS) {
//项目名称
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(manifestEO.getProjectId());
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(manifestEO.getProjectId(), manifestEO.getProjectVersion());
if (ObjectUtils.isNotEmpty(projectInfo)) {
//url
String urlParamsStr = parseUrlParams(manifestEO);
@@ -29,6 +29,7 @@ import com.jero.modules.cert.template.enums.ControlTypeEnum;
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
import com.jero.modules.cert.template.service.IParamsTemplateEOService;
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
import com.jero.modules.project.service.IProjectLibraryBaseService;
import com.jero.modules.project.service.IProjectRelatedPersonnelService;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.mapper.SysDictMapper;
@@ -93,6 +94,9 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
@Autowired
private SysDictMapper sysDictMapper;
@Autowired
private IProjectLibraryBaseService projectLibraryBaseService;
/**
@@ -117,6 +121,9 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
String paramsManifestId = UUID.randomUUID().toString().replace("-","");
// 根据主项目ID 查询 相关项目版本的项目ID
String projectVersionId = projectLibraryBaseService.getIdByVersionAndParentId(paramsManifestEO.getProjectVersion(), paramsManifestEO.getProjectId());
// 根据参数模板id发布版本查询对应参数项集合
List<ParamsInfoPublishEO> paramsInfoPublishEOList = paramsInfoPublishEOService.getListByPublishVersion(paramsManifestEO.getParamsTemplateId(),paramsManifestEO.getParamsTemplatePublishVersion());
@@ -135,7 +142,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
if (!ControlTypeEnum.Title.getValue().equals(source.getControlType())) {
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(paramsManifestEO.getProjectId(), source.getDutyTerritory());
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(projectVersionId, source.getDutyTerritory());
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
if (StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
@@ -153,6 +160,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
// 对应参数模板发布版本 前端传过来
paramsManifestEO.setId(paramsManifestId);
paramsManifestEO.setProjectVersionId(projectVersionId);
paramsManifestEO.setState(ManifestStateEnum.COLLECTING.getValue());
paramsManifestEO.setVersion(1); // 默认版本为 1
Date now = new Date();
@@ -184,11 +192,15 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
}
}
// 根据主项目ID 查询 相关项目版本的项目ID
String projectVersionId = projectLibraryBaseService.getIdByVersionAndParentId(paramsManifestEO.getProjectVersion(), oldParamsManifestEO.getProjectId());
ParamsManifestEO updateEO = new ParamsManifestEO();
updateEO.setId(paramsManifestEO.getId());
updateEO.setTitle(paramsManifestEO.getTitle());
updateEO.setProjectVersion(paramsManifestEO.getProjectVersion());
updateEO.setExplanation(paramsManifestEO.getExplanation());
updateEO.setProjectVersionId(projectVersionId);
Date now = new Date();
updateEO.setUpdateTime(now);
return updateById(updateEO);
@@ -546,6 +558,9 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
}
}
// 根据主项目ID 查询 相关项目版本的项目ID
String projectVersionId = projectLibraryBaseService.getIdByVersionAndParentId(paramsManifestEO.getProjectVersion(), paramsManifestEO.getProjectId());
// 查询所有模板参数项
List<ParamsInfoPublishEO> paramsInfoPublishEOList = paramsInfoPublishEOService.getListByPublishVersion(paramsTemplateId, paramsTemplatePublishVersion);
@@ -630,7 +645,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
addCollectManifestEO.setParamsManifestId(addManifestId);
addCollectManifestEO.setState(CollectManifestStateEnum.WAIT_COLLECT.getValue());
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(paramsManifestEO.getProjectId(), addCollectManifestEO.getDutyTerritory());
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(projectVersionId, addCollectManifestEO.getDutyTerritory());
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
if (StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
@@ -669,8 +684,10 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
}
@Override
public ParamsManifestVO getProjectById(String projectId) {
return paramsManifestEOMapper.getProjectById(projectId);
public ParamsManifestVO getProjectById(String projectId, String projectVersion) {
ParamsManifestVO paramsManifestVO = paramsManifestEOMapper.getProjectById(projectId);
paramsManifestVO.setProjectName(paramsManifestVO.getProjectName() + "-" + projectVersion); // 项目名称加上 相关项目版本
return paramsManifestVO;
}
@Override
@@ -689,6 +706,12 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
List<Map<String, Object>> collectingList = new LinkedList<>();
List<Map<String, Object>> submitList = new LinkedList<>();
List<Map<String, Object>> syncReportList = new LinkedList<>();
double totalAll = 0;
double notStartTotal = 0;
double collectingTotal = 0;
double submitTotal = 0;
double syncReportTotal = 0;
// 统计清单参数
ParamsCollectManifestEO paramsCollectManifestEO = new ParamsCollectManifestEO();
@@ -723,6 +746,14 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
String submitPercent = getRatio(submitNumber, total); // 已提交的参数项 百分比
String syncReportPercent = getRatio(syncReportNumber, total); // 已同步上报库的参数项 百分比
// 累加
totalAll += total;
notStartTotal += notStartNumber;
collectingTotal += collectingNumber;
submitTotal += submitNumber;
syncReportTotal += syncReportNumber;
// 组装数据 返回前端
if (notStartNumber == collectingNumber && collectingNumber == submitNumber && submitNumber == syncReportNumber && syncReportNumber == 0) {
continue;
@@ -741,6 +772,34 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
}
// 设置全部
if (CutEnum.EN.getValue().equals(cut)) {
dutyTerritoryNameList.add(0, "All");
} else {
dutyTerritoryNameList.add(0, "全部");
}
Map<String, Object> notStartMap = new HashMap<>();
notStartMap.put("quantity", notStartTotal);
notStartMap.put("percentage", getRatio(notStartTotal, totalAll));
notStartList.add(0, notStartMap);
Map<String, Object> collectinMap = new HashMap<>();
collectinMap.put("quantity", collectingTotal);
collectinMap.put("percentage", getRatio(collectingTotal, totalAll));
collectingList.add(0, collectinMap);
Map<String, Object> submitMap = new HashMap<>();
submitMap.put("quantity", submitTotal);
submitMap.put("percentage", getRatio(submitTotal, totalAll));
submitList.add(0, submitMap);
Map<String, Object> syncReportMap = new HashMap<>();
syncReportMap.put("quantity", syncReportTotal);
syncReportMap.put("percentage", getRatio(syncReportTotal, totalAll));
syncReportList.add(0, syncReportMap);
//
result.put("dutyTerritory", dutyTerritoryNameList);
result.put("notStart", notStartList);
result.put("collecting", collectingList);
@@ -77,4 +77,7 @@ public class ParamsCollectManifestVO {
@ApiModelProperty(value = "用户类型")
private String userTypes; // 用户类型
@ApiModelProperty(value = "项目相关版本")
private String projectVersion;
}
@@ -6332,6 +6332,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
treeDictItem(categoryList, entry, treeFieldList, cut,null);
}
record1.put("technology_territory_id",technology_territory);
if(StringUtils.equals(cut,CutEnum.EN.getValue())){
if(record.containsKey("title") && record.containsKey("title_en")){
record.put("title",record.get("title_en"));
}
}
}
return infoPage;
}
@@ -81,21 +81,27 @@ public class DummyInventoryInfoEO implements Serializable {
/**适用地区*/
@ApiModelProperty(value = "适用地区")
@Dict(dicCode ="region")
//@Dict(dicCode ="region")
@Excel(name = "适用地区", width = 15, dicCode = "region")
private java.lang.String region;
@TableField(exist = false)
private String region_dictText;
/**适用范围*/
@Excel(name = "适用范围", width = 15, dicCode = "apply_scope")
@ApiModelProperty(value = "适用范围")
@Dict(dicCode ="apply_scope")
//@Dict(dicCode ="apply_scope")
private java.lang.String shi4Yong4Fan4Wei2;
@TableField(exist = false)
private String shi4Yong4Fan4Wei2_dictText;
/**状态*/
@Excel(name = "状态", width = 15,dicCode ="state")
@ApiModelProperty(value = "状态")
@Dict(dicCode ="state")
//@Dict(dicCode ="state")
private java.lang.String state;
@TableField(exist = false)
private String state_dictText;
/**对应标准*/
@Excel(name = "对应标准", width = 15)
@@ -107,8 +113,10 @@ public class DummyInventoryInfoEO implements Serializable {
/**实施类别*/
@Excel(name = "实施类别", width = 15,dicCode ="implement_type")
@ApiModelProperty(value = "实施类别")
@Dict(dicCode ="implement_type")
//@Dict(dicCode ="implement_type")
private java.lang.String implementType;
@TableField(exist = false)
private String implementType_dictText;
/**新车型实施日期*/
@Excel(name = "新车型实施日期", width = 15,format = "yyyy-MM-dd")
@@ -138,14 +146,18 @@ public class DummyInventoryInfoEO implements Serializable {
/**认证类型*/
@Excel(name = "认证类型", width = 15,dicCode ="attestation_type")
@ApiModelProperty(value = "认证类型")
@Dict(dicCode ="attestation_type")
//@Dict(dicCode ="attestation_type")
private java.lang.String attestationType;
@TableField(exist = false)
private String attestationType_dictText;
/**认证级别*/
@Excel(name = "认证级别", width = 15,dicCode ="attestation_rank")
@ApiModelProperty(value = "认证级别")
@Dict(dicCode ="attestation_rank")
//@Dict(dicCode ="attestation_rank")
private java.lang.String attestationRank;
@TableField(exist = false)
private String attestationRank_dictText;
/**适用增补件*/
@ApiModelProperty(value = "适用增补件")
@@ -163,8 +175,10 @@ public class DummyInventoryInfoEO implements Serializable {
/**责任领域*/
@Excel(name = "责任领域", width = 15,dicCode ="duty_territory")
@ApiModelProperty(value = "责任领域")
@Dict(dicCode ="duty_territory")
//@Dict(dicCode ="duty_territory")
private java.lang.String dutyTerritory;
@TableField(exist = false)
private String dutyTerritory_dictText;
/**备注*/
@Excel(name = "备注", width = 15)
@@ -192,14 +206,18 @@ public class DummyInventoryInfoEO implements Serializable {
/**设计符合性确认-发起人*/
@Excel(name = "设计-发起人", width = 15,dicCode ="fa1_qi3_ren2")
@ApiModelProperty(value = "设计符合性确认-发起人")
@Dict(dicCode ="fa1_qi3_ren2")
//@Dict(dicCode ="fa1_qi3_ren2")
private java.lang.String designInitiator;
@TableField(exist = false)
private String designInitiator_dictText;
/**设计符合性确认-责任人*/
@Excel(name = "设计-责任人", width = 15,dicCode ="ze2_ren4_ren2")
@ApiModelProperty(value = "设计符合性确认-责任人")
@Dict(dicCode ="ze2_ren4_ren2")
//@Dict(dicCode ="ze2_ren4_ren2")
private java.lang.String designDuty;
@TableField(exist = false)
private String designDuty_dictText;
//交付物说明
@Excel(name = "设计符合性确认-交付物说明", width = 20)
@@ -226,14 +244,18 @@ public class DummyInventoryInfoEO implements Serializable {
/**prehomo确认-发起人*/
@Excel(name = "Prehomo-发起人", width = 15,dicCode ="fa1_qi3_ren2")
@ApiModelProperty(value = "prehomo确认-发起人")
@Dict(dicCode ="fa1_qi3_ren2")
//@Dict(dicCode ="fa1_qi3_ren2")
private java.lang.String prehomoInitiator;
@TableField(exist = false)
private String prehomoInitiator_dictText;
/**prehomo确认-责任人*/
@Excel(name = "Prehomo-责任人", width = 15,dicCode ="ze2_ren4_ren2")
@ApiModelProperty(value = "prehomo确认-责任人")
@Dict(dicCode ="ze2_ren4_ren2")
//@Dict(dicCode ="ze2_ren4_ren2")
private java.lang.String prehomoDuty;
@TableField(exist = false)
private String prehomoDuty_dictText;
//prehomo确认-交付物说明
@Excel(name = "prehomo确认-交付物说明", width = 20)
@@ -259,14 +281,18 @@ public class DummyInventoryInfoEO implements Serializable {
/**验证符合性确认-发起人*/
@Excel(name = "验证-发起人", width = 15,dicCode ="fa1_qi3_ren2")
@ApiModelProperty(value = "验证符合性确认-发起人")
@Dict(dicCode ="fa1_qi3_ren2")
//@Dict(dicCode ="fa1_qi3_ren2")
private java.lang.String verifyInitiator;
@TableField(exist = false)
private String verifyInitiator_dictText;
/**验证符合性确认-责任人*/
@Excel(name = "验证-责任人", width = 15,dicCode ="ze2_ren4_ren2")
@ApiModelProperty(value = "验证符合性确认-责任人")
@Dict(dicCode ="ze2_ren4_ren2")
//@Dict(dicCode ="ze2_ren4_ren2")
private java.lang.String verifyDuty;
@TableField(exist = false)
private String verifyDuty_dictText;
//验证备注
@Excel(name = "验证符合性确认-交付物说明", width = 20)
@@ -35,6 +35,7 @@ public enum DummyInventoryBaseFieldEnum {
VERIFY_DELIVERABLE_TEMPLATE("验证符合性确认-交付物模板", "verify_deliverable_template","Deliverable template"),
VERIFY_INITIATOR("验证符合性确认-发起人", "fa1_qi3_ren2","Initiator"),
VERIFY_DUTY("验证符合性确认-责任人", "ze2_ren4_ren2","Assignee"),
STATE("状态", "state","state"),
;
@@ -71,4 +72,4 @@ public enum DummyInventoryBaseFieldEnum {
public void setEnName(String enName) {
this.enName = enName;
}
}
}
@@ -34,6 +34,7 @@ import com.jero.modules.system.mapper.SysCategoryMapper;
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.ObjectUtils;
@@ -72,6 +73,7 @@ import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServic
* @Date: 2022-04-11
* @Version: V1.0
*/
@Slf4j
@Service
public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryInfoEOMapper, DummyInventoryInfoEO> implements IDummyInventoryInfoEOService {
@@ -329,16 +331,171 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
*/
@Override
public List<DummyInventoryInfoEO> queryList(DummyInventoryInfoEO dummyInventoryInfoEO,HttpServletRequest req) {
long startTime = System.currentTimeMillis();
QueryWrapper<DummyInventoryInfoEO> queryWrapper = QueryGenerator.initQueryWrapper(dummyInventoryInfoEO,req.getParameterMap());
// queryWrapper.in("dummy_inventory_base_id",dummyInventoryInfoEO.getDummyInventoryBaseId());
queryWrapper.orderByDesc("create_time","serial_number");
List<DummyInventoryInfoEO> dummyInventoryInfoEOList = this.list(queryWrapper);
log.info("一阶段消耗时间:" + (System.currentTimeMillis() - startTime));
//技术领域处理
treeDict(dummyInventoryInfoEO, dummyInventoryInfoEOList);
log.info("二阶段消耗时间:" + (System.currentTimeMillis() - startTime));
this.dataDicDispose(dummyInventoryInfoEOList,dummyInventoryInfoEO.getCut());
log.info("三阶段消耗时间:" + (System.currentTimeMillis() - startTime));
return dummyInventoryInfoEOList;
}
/**
* 数据字典数据处理方法 -> 虚拟清单使用@Dict翻译效率太慢了,200条数据需要处理1分钟。
* @param datas
* @param cut
*/
public void dataDicDispose(List<DummyInventoryInfoEO> datas, String cut){
if(CollectionUtils.isNotEmpty(datas)){
List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.getBaseMapper().selectItemsAll();
for (DummyInventoryInfoEO data : datas) {
// 适用地区
String region = data.getRegion();
if(StringUtils.isNotEmpty(region)){
String region_dictText = this.disposeShowDictItemValue(sysDictItems, region,cut, DummyInventoryBaseFieldEnum.REGION.getValue());
data.setRegion_dictText(region_dictText);
}
// 适用范围
String shi4Yong4Fan4Wei2 = data.getShi4Yong4Fan4Wei2();
if(StringUtils.isNotEmpty(shi4Yong4Fan4Wei2)){
String shi4Yong4Fan4Wei2_dictText = this.disposeShowDictItemValue(sysDictItems, shi4Yong4Fan4Wei2,cut, DummyInventoryBaseFieldEnum.SHI4_YONG4_FAN4_WEI2.getValue());
data.setShi4Yong4Fan4Wei2_dictText(shi4Yong4Fan4Wei2_dictText);
}
// 状态
String state = data.getState();
if(StringUtils.isNotEmpty(state)){
String state_dictText = this.disposeShowDictItemValue(sysDictItems, state,cut, DummyInventoryBaseFieldEnum.STATE.getValue());
data.setState_dictText(state_dictText);
}
// 实施类别
String implementType = data.getImplementType();
if(StringUtils.isNotEmpty(implementType)){
String implementType_dictText = this.disposeShowDictItemValue(sysDictItems, implementType,cut, DummyInventoryBaseFieldEnum.IMPLEMENT_TYPE.getValue());
data.setImplementType_dictText(implementType_dictText);
}
// 认证类别
String attestationType = data.getAttestationType();
if(StringUtils.isNotEmpty(attestationType)){
String attestationType_dictText = this.disposeShowDictItemValue(sysDictItems, attestationType,cut, DummyInventoryBaseFieldEnum.ATTESTATION_TYPE.getValue());
data.setAttestationType_dictText(attestationType_dictText);
}
// 认证级别
String attestationRank = data.getAttestationRank();
if(StringUtils.isNotEmpty(attestationRank)){
String attestationRank_dictText = this.disposeShowDictItemValue(sysDictItems, attestationRank,cut, DummyInventoryBaseFieldEnum.ATTESTATION_RANK.getValue());
data.setAttestationRank_dictText(attestationRank_dictText);
}
// 责任领域
String dutyTerritory = data.getDutyTerritory();
if(StringUtils.isNotEmpty(dutyTerritory)){
String dutyTerritory_dictText = this.disposeShowDictItemValue(sysDictItems, dutyTerritory,cut, DummyInventoryBaseFieldEnum.DUTY_TERRITORY.getValue());
data.setDutyTerritory_dictText(dutyTerritory_dictText);
}
// 设计符合性-发起人
String designInitiator = data.getDesignInitiator();
if(StringUtils.isNotEmpty(designInitiator)){
String designInitiator_dictText = this.disposeShowDictItemValue(sysDictItems, designInitiator,cut, DummyInventoryBaseFieldEnum.DESIGN_INITIATOR.getValue());
data.setDesignInitiator_dictText(designInitiator_dictText);
}
// 设计符合性-责任人
String designDuty = data.getDesignDuty();
if(StringUtils.isNotEmpty(designDuty)){
String designDuty_dictText = this.disposeShowDictItemValue(sysDictItems, designDuty,cut, DummyInventoryBaseFieldEnum.DESIGN_DUTY.getValue());
data.setDesignDuty_dictText(designDuty_dictText);
}
// preHomo-发起人
String prehomoInitiator = data.getPrehomoInitiator();
if(StringUtils.isNotEmpty(prehomoInitiator)){
String prehomoInitiator_dictText = this.disposeShowDictItemValue(sysDictItems, prehomoInitiator,cut, DummyInventoryBaseFieldEnum.PREHOMO_INITIATOR.getValue());
data.setPrehomoInitiator_dictText(prehomoInitiator_dictText);
}
// preHomo-责任人
String prehomoDuty = data.getPrehomoDuty();
if(StringUtils.isNotEmpty(prehomoDuty)){
String prehomoDuty_dictText = this.disposeShowDictItemValue(sysDictItems, prehomoDuty,cut, DummyInventoryBaseFieldEnum.PREHOMO_DUTY.getValue());
data.setPrehomoDuty_dictText(prehomoDuty_dictText);
}
// 验证符合性-发起人
String verifyInitiator = data.getVerifyInitiator();
if(StringUtils.isNotEmpty(verifyInitiator)){
String verifyInitiator_dictText = this.disposeShowDictItemValue(sysDictItems, verifyInitiator,cut, DummyInventoryBaseFieldEnum.VERIFY_INITIATOR.getValue());
data.setVerifyInitiator_dictText(verifyInitiator_dictText);
}
// 验证符合性-责任人
String verifyDuty = data.getVerifyDuty();
if(StringUtils.isNotEmpty(verifyDuty)){
String verifyDuty_dictText = this.disposeShowDictItemValue(sysDictItems, verifyDuty,cut, DummyInventoryBaseFieldEnum.VERIFY_DUTY.getValue());
data.setVerifyDuty_dictText(verifyDuty_dictText);
}
}
}
}
/**
* 处理展示数据字典值
* @param sysDictItems 所有的数据字典项
* @param fieldValues 字段值
* @param cut 中英文切换标识
* @param dicCode 数据字典code码
* @return
*/
public String disposeShowDictItemValue(List<SysDictItem> sysDictItems,String fieldValues,String cut,String dicCode){
String result = "";
List<SysDictItem> sysDictItemList = sysDictItems.stream().filter(e -> {
boolean flag = false;
if(StringUtils.equals(e.getDictCode(),dicCode)){
flag = true;
}
return flag;
}).distinct().collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(sysDictItemList)){
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
result = sysDictItemList.stream().filter(e -> {
boolean flag = false;
List<String> fieldValueStrList = Arrays.asList(fieldValues.split(","));
for (String fieldValueStr : fieldValueStrList) {
if(StringUtils.equals(fieldValueStr,e.getItemValue())){
flag = true;
break;
}
}
return flag;
}).map(SysDictItem::getItemText).collect(Collectors.joining(","));
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
result = sysDictItemList.stream().filter(e -> {
boolean flag = false;
List<String> fieldValueStrList = Arrays.asList(fieldValues.split(","));
for (String fieldValueStr : fieldValueStrList) {
if(StringUtils.equals(fieldValueStr,e.getItemValue())){
flag = true;
break;
}
}
return flag;
}).map(SysDictItem::getEnName).collect(Collectors.joining(","));
}
}
return result;
}
/**
* 复制
@@ -381,6 +381,12 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
record1.put("sarFileSplitInfoList",sarFileSplitInfoList);
}
}
if(com.jero.modules.system.util.StringUtils.equals(cut,CutEnum.EN.getValue())){
if(record.containsKey("title") && record.containsKey("title_en")){
record.put("title",record.get("title_en"));
}
}
}
return infoPage;
}
@@ -466,4 +466,10 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
}
@AutoLog(value = "项目库-法规清单表-根据项目库id更新符合性流程发起人、责任人接口")
@ApiOperation(value="项目库-法规清单表-根据项目库id更新符合性流程发起人、责任人接口", notes="项目库-法规清单表-根据项目库id更新符合性流程发起人、责任人接口")
@GetMapping(value = "/updateFlowInfoByProjectLibraryIds")
public Result<?> updateFlowInfoByProjectLibraryIds(@RequestParam("projectLibraryIds") String projectLibraryIds){
return this.projectLawsInventoryEOService.updateFlowInfoByProjectLibraryIds(projectLibraryIds);
}
}
@@ -18,7 +18,7 @@ public enum ProjectRoleEnum {
PREHOMODUTY("prehomo确认-责任人","8",""),
VERIFYINITIATOR("验证符合性确认-发起人","9",""),
VERIFYDUTY("验证符合性确认-责任人","10",""),
MANAGER("验证符合性确认-责任人","11",""),
MANAGER("manage","11",""),
ADMIN("系统管理员","12",""),
;
@@ -160,4 +160,5 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
Result<?> taskUrg(ProjectTaskUrgVo projectTaskUrgVo);
Result<?> updateFlowInfoByProjectLibraryIds(String projectLibraryIds);
}
@@ -124,4 +124,19 @@ public interface IProjectLibraryBaseService extends IService<ProjectLibraryBase>
* @return
*/
List<ProjectLibraryBase> versionStatistics(String id);
/**
* 通过主项目id和子项目版本号
* @param version
* @param parentId
* @return
*/
String getIdByVersionAndParentId(String version, String parentId);
/**
* 查询主项目及其所有子项目
* @param parentId
* @return
*/
List<ProjectLibraryBase> getParentAndChildern(String parentId);
}
@@ -74,6 +74,7 @@ import com.jero.modules.wkflow.feginClient.impl.TaskFeignClientImpl;
import com.jero.modules.wkflow.feginClient.impl.WorkFlowFeignClientImpl;
import com.jero.modules.wkflow.service.IProcessHistoryEOService;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.io.FileUtils;
@@ -129,6 +130,7 @@ import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServic
* @Date: 2022-04-14
* @Version: V1.0
*/
@Slf4j
@Service
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsInventoryEOMapper, ProjectLawsInventoryEO> implements IProjectLawsInventoryEOService {
@@ -473,12 +475,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
// setContentLog(infoDiff,contentLog,infoDiffEn,enContentLog,projectLawsInventoryEO.getProjectLibraryId());
//验证用户是否是该法规上级 项目库的studio 如果是则同步更新流程
int roleCode = checkUserRole(projectLawsInventoryEO.getProjectLibraryId(), currentUser.getId(), "");
if (StringUtils.equals(String.valueOf(roleCode),ProjectRoleEnum.STUDIO_ENGINEER.getValue())){
//更新流程信息
updateFlowInfo(projectLawsInventoryEO);
}
// //验证用户是否是该法规上级 项目库的studio 如果是则同步更新流程
// int roleCode = checkUserRole(projectLawsInventoryEO.getProjectLibraryId(), currentUser.getId(), "");
// if (StringUtils.equals(String.valueOf(roleCode),ProjectRoleEnum.STUDIO_ENGINEER.getValue())){
// //更新流程信息
// updateFlowInfo(projectLawsInventoryEO);
// }
this.updateFlowInfo(projectLawsInventoryEO);
}else {
throw new JeroBootException("该用户没有权限操作该数据!");
}
@@ -710,6 +713,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
@Override
public List<ProjectLawsInventoryEO> queryList(ProjectLawsInventoryEO projectLawsInventoryEO, HttpServletRequest req) {
long startTime = System.currentTimeMillis();
String dutyTerritoryStr = "";
if (StringUtils.isNotEmpty(projectLawsInventoryEO.getDutyTerritory())) {
dutyTerritoryStr = projectLawsInventoryEO.getDutyTerritory();
@@ -749,6 +753,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//if(isProjectRole != Integer.parseInt(ProjectRoleEnum.STUDIO_ENGINEER.getValue())){
int isProjectRole = Integer.parseInt(projectLawsInventoryEO.getRoleCode());
log.info("一阶段消耗时间:" + (System.currentTimeMillis() - startTime));
if(isProjectRole != Integer.parseInt(ProjectRoleEnum.STUDIO_ENGINEER.getValue())
&& isProjectRole != Integer.parseInt(ProjectRoleEnum.MANAGER.getValue())
&& isProjectRole != Integer.parseInt(ProjectRoleEnum.ADMIN.getValue())){
@@ -758,10 +764,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
});
}
List<ProjectLawsInventoryEO> result = super.baseMapper.selectList(projectLawsInventoryEOQueryWrapper);
log.info("二阶段消耗时间:" + (System.currentTimeMillis() - startTime));
dataDispose(result,currentUser,isProjectRole,projectLawsInventoryEO.getCut());
long startTime = System.currentTimeMillis();
log.info("三阶段消耗时间:" + (System.currentTimeMillis() - startTime));
dataDictDispose(result,projectLawsInventoryEO.getCut());
log.debug("处理数据字典消耗时间:" + (System.currentTimeMillis() - startTime));
log.info("四阶段消耗时间:" + (System.currentTimeMillis() - startTime));
return result;
}
@@ -8954,12 +8961,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
if (manager.size() != 0) {
manager.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.MANAGER.getCode());
manager.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.MANAGER.getValue());
manager.get(0).setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.MANAGER.getCode());
sysRoles.addAll(manager);
}
if (admin.size() != 0) {
admin.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.ADMIN.getCode());
admin.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.ADMIN.getValue());
admin.get(0).setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.ADMIN.getCode());
sysRoles.addAll(admin);
}
@@ -9339,5 +9346,24 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
@Override
public Result<?> updateFlowInfoByProjectLibraryIds(String projectLibraryIds) {
if(StringUtils.isEmpty(projectLibraryIds)){
throw new JeroBootException("项目库id不能为空");
}
List<String> projectLibraryIdList = Arrays.asList(projectLibraryIds.split(","));
QueryWrapper<ProjectLawsInventoryEO> lawsInventoryQueryWrap = new QueryWrapper<>();
lawsInventoryQueryWrap.lambda().in(ProjectLawsInventoryEO::getProjectLibraryId,projectLibraryIdList);
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = this.baseMapper.selectList(lawsInventoryQueryWrap);
projectLawsInventoryEOList.forEach(lawsInventoryEO -> {
this.updateFlowInfo(lawsInventoryEO);
});
return new Result<>().success("操作成功!");
}
}
@@ -1316,6 +1316,38 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
}
return list;
}
/**
* 通过主项目id和子项目版本号
* @param version
* @param parentId
* @return
*/
@Override
public String getIdByVersionAndParentId(String version, String parentId) {
if ("00".equals(version)) {
return parentId;
}
LambdaQueryWrapper<ProjectLibraryBase> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ProjectLibraryBase::getProjectVersion,version);
wrapper.eq(ProjectLibraryBase::getParentId, parentId);
List<ProjectLibraryBase> list = this.list(wrapper);
if (CollectionUtils.isNotEmpty(list)) {
return list.get(0).getId();
} else {
return null;
}
}
@Override
public List<ProjectLibraryBase> getParentAndChildern(String parentId) {
LambdaQueryWrapper<ProjectLibraryBase> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ProjectLibraryBase::getId,parentId);
wrapper.or().eq(ProjectLibraryBase::getParentId, parentId);
List<ProjectLibraryBase> list = this.list(wrapper);
return list;
}
}
@@ -29,8 +29,10 @@ import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@@ -111,6 +113,22 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
}
}
}
List<ProjectLibraryBase> projectLibraryBaseLinkedList = new LinkedList<>();
for (ProjectLibraryBase libraryBase : projectLibraryBaseList) {
if(StringUtils.isBlank(libraryBase.getParentId())){
List<ProjectLibraryBase> projectLibraryBaseListTemp = new LinkedList<>();
projectLibraryBaseListTemp.add(libraryBase);
List<ProjectLibraryBase> collect = projectLibraryBaseList.stream().filter(e -> libraryBase.getId().equals(e.getParentId())).collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(collect)){
projectLibraryBaseListTemp.addAll(collect);
Collections.sort(projectLibraryBaseListTemp);
}
projectLibraryBaseLinkedList.addAll(projectLibraryBaseListTemp);
}
}
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsByDictCode("region");
for (ProjectLibraryBase libraryBase : projectLibraryBaseList) {
targetMarket(projectLibraryBase, dictItemList, libraryBase);
@@ -125,7 +143,7 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
if(collect.size() != 0){
index ++;
mapList.put("index",index);
mapList.put("projectName",libraryBase.getProjectName()+" "+libraryBase.getYearName()+"-"+libraryBase.getTargetMarket());
mapList.put("projectName",libraryBase.getProjectName()+" "+libraryBase.getYearName()+"-"+libraryBase.getTargetMarket()+"-"+libraryBase.getProjectVersion());
mapList.put("data",collect);
result.add(mapList);
}
@@ -183,8 +201,12 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
if(projectTaskInventoryEOList.size() != 0){
projectTaskInventoryEOS = projectTaskInventoryEOList.stream().filter(e -> ProjectLawsInventoryIdList.contains(e.getProjectLawsInventoryId())).collect(Collectors.toList());
}
String projectVersion = libraryBase.getProjectVersion();
if(StringUtils.isBlank(projectVersion)){
projectVersion = "00";
}
Map<String,Object> map = new HashMap<>();
map.put("projectName",libraryBase.getProjectName());//项目名称
map.put("projectName",libraryBase.getProjectName()+" "+libraryBase.getYearName()+"-"+libraryBase.getTargetMarket()+"-"+projectVersion);//项目名称
map.put("targetMarket",libraryBase.getTargetMarket());//目标市场
//1. 项目当前状态--projectState(///绿)-->studio视角下的数据
@@ -131,7 +131,7 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
query.in("create_by",sysUser.getUsername()).in("issue_status", InventoryStateEnum.TO_BE_RELEASED.getValue())
.or().in("issue_status",InventoryStateEnum.ISSUE.getValue());
});
queryWrapper.orderByDesc("create_time");
queryWrapper.orderByDesc("name");
Page<LawsMonthlyReportManageEO> pageInfo = this.page(page, queryWrapper);
return pageInfo;
}
@@ -28,35 +28,7 @@ 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;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.*;
import java.io.InputStream;
import java.math.BigInteger;
@@ -603,7 +575,9 @@ public class WordUtil {
String applyScopeName = dictItem(sysDictItems, applyScope,cut, DictCodeReportEnum.APPLYSCOPE.getValue());
String stateName = dictItem(sysDictItems, state,cut, DictCodeReportEnum.STATE_REPORT.getValue());
String useMethodName = dictItem(sysDictItems, useMethod,cut, DictCodeReportEnum.USEMETHOD.getValue());
if(useMethodName.equals("安装即符合")){
useMethodName = "安装需符合";
}
XWPFTable table = document.createTable(10, 2);
//表格属性
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
@@ -1250,9 +1224,20 @@ public class WordUtil {
}
private static void setBlank(String text, XWPFRun run, StringBuilder sb, String itemText) {
//用法的三个复选框 在后端get到的英文和导出的word对应不上也就是和itemText中的内容对应不上
if(text.equals("constraint")){
text = "Mandatory";
}
if(text.equals("recommend")){
text = "Voluntary";
}
if(text.equals("installation is compliant")){
text = "Mandatory if fitted";
}
for (String value : itemText.split(",")) {
String blank = getBlank(value);
if(text.contains(value)){
if(text.equals(value)){
sb.append(""+value+blank);
}else{
sb.append(""+value+blank);
@@ -1386,6 +1371,13 @@ public class WordUtil {
CTR ctr = CTR.Factory.newInstance();
CTRPr rpr = ctr.addNewRPr();
// 设置链接字体大小
CTHpsMeasure sz = rpr.isSetSz() ? rpr.getSz() : rpr.addNewSz();
sz.setVal(new BigInteger("22"));
// CTHpsMeasure szCs = rpr.isSetSzCs() ? rpr.getSzCs() : rpr
// .addNewSzCs();
// szCs.setVal(new BigInteger("11"));
//设置超链接样式
CTColor color = CTColor.Factory.newInstance();
color.setVal("0000FF");
@@ -1400,6 +1392,8 @@ public class WordUtil {
fonts.setHAnsi("Blue Sky Noto Regular");
ctr.setTArray(new CTText[] { ctText });
// Insert the linked text into the link
cLink.setRArray(new CTR[] { ctr });
@@ -0,0 +1,106 @@
package com.jero.modules.todoCenter.job;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
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.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 同步符合性流程截止时间定时器
* @Author: wzj
* @Date: 2022/11/24 13:48
**/
@Slf4j
public class SyncComplianceProcessEndTimeJob implements Job {
@Autowired
private IProjectLawsInventoryEOService projectLawsInventoryEOService;
@Autowired
private IProcessInfoEOService processInfoEOService;
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
log.info("同步符合性流程截止时间,定时任务开启 =====================================================");
QueryWrapper<ProcessInfoEO> processInfoQueryWrap = new QueryWrapper<>();
List<String> flowTypeList = new ArrayList<>();
flowTypeList.add(FlowTypeEnum.SJFHXSHLC.getValue());
flowTypeList.add(FlowTypeEnum.PREHOMOQRLC.getValue());
flowTypeList.add(FlowTypeEnum.YZFHXSCLC.getValue());
processInfoQueryWrap.lambda().in(ProcessInfoEO::getFlowType,flowTypeList);
List<ProcessInfoEO> processInfoEOList = this.processInfoEOService.list(processInfoQueryWrap);
if (CollectionUtils.isNotEmpty(processInfoEOList)) {
List<String> lawsInventoryIdList = processInfoEOList.stream().map(ProcessInfoEO::getProjectLawsInventoryId).distinct().collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(lawsInventoryIdList)) {
QueryWrapper<ProjectLawsInventoryEO> lawsInventoryQueryWrap = new QueryWrapper<>();
lawsInventoryQueryWrap.lambda().in(ProjectLawsInventoryEO::getId,lawsInventoryIdList);
List<ProjectLawsInventoryEO> lawsInventoryEOList = this.projectLawsInventoryEOService.list(lawsInventoryQueryWrap);
if (CollectionUtils.isNotEmpty(lawsInventoryEOList)) {
processInfoEOList.forEach(processInfo -> {
this.setProcessInfoEndTime(lawsInventoryEOList, processInfo);
});
this.processInfoEOService.updateBatchById(processInfoEOList);
}
}
}
log.info("同步符合性流程截止时间,定时任务结束 =====================================================");
}
/**
* 设置流程信息的截止时间
* @param lawsInventoryEOList
* @param processInfoEO
*/
private void setProcessInfoEndTime(List<ProjectLawsInventoryEO> lawsInventoryEOList, ProcessInfoEO processInfoEO) {
for (ProjectLawsInventoryEO projectLawsInventoryEO : lawsInventoryEOList) {
if(StringUtils.equals(processInfoEO.getProjectLawsInventoryId(),projectLawsInventoryEO.getId())){
String flowType = processInfoEO.getFlowType();
// 停止循环标识
boolean stopCycle = false;
FlowTypeEnum flowTypeEnumByValue = FlowTypeEnum.getFlowTypeEnumByValue(flowType);
switch (flowTypeEnumByValue){
case SJFHXSHLC:
if(projectLawsInventoryEO.getDesignDueDate() != null){
processInfoEO.setEndTime(projectLawsInventoryEO.getDesignDueDate());
stopCycle = true;
}
break;
case PREHOMOQRLC:
if(projectLawsInventoryEO.getPrehomoDueDate() != null){
processInfoEO.setEndTime(projectLawsInventoryEO.getPrehomoDueDate());
stopCycle = true;
}
break;
case YZFHXSCLC:
if(projectLawsInventoryEO.getVerifyDueDate() != null){
processInfoEO.setEndTime(projectLawsInventoryEO.getVerifyDueDate());
stopCycle = true;
}
break;
}
// 匹配到一个之后将本次循环终止
if (stopCycle) {
break;
}
}
}
}
}
@@ -57,22 +57,8 @@
concat(pli.serial_number,'、',bdl.title_en) as standard_info,
</if>
pi.flow_type,
createBy.username as "create_by",
pi.create_by,
pi.end_time,
(
select
detail.task_id
from
process_info_detail detail
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId} order by submit_time desc limit 1
) as task_id,
(
select
detail.task_definition_key
from
process_info_detail detail
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId} order by submit_time desc limit 1
) as task_definition_key,
pi.status,
pi.prc_num,
pi.prc_name,
@@ -87,7 +73,6 @@
left join project_name_info pni on pni.id = plb.project_name_id
left join project_year_name_info pyni on pyni.id = plb.year_name_id
left join project_laws_inventory pli on pi.project_laws_inventory_id = pli.id
LEFT JOIN sys_user createBy on createBy.id = pi.create_by
LEFT JOIN buss_document_library bdl ON pi.buss_document_library_id = bdl.id
<where>
<if test="params.queryType != 'issuedProcess'">
@@ -141,22 +126,8 @@
concat(pli.serial_number,'、',bdl.title_en) as standard_info,
</if>
pi.flow_type,
createBy.username AS "create_by",
pi.create_by,
pi.end_time,
(
select
detail.task_id
from
process_info_detail detail
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId} and detail.`status` = 'NotDone' limit 1
) as task_id,
(
select
detail.task_definition_key
from
process_info_detail detail
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId} and detail.`status` = 'NotDone' limit 1
) as task_definition_key,
pi.STATUS,
pi.prc_num,
pi.prc_name,
@@ -171,7 +142,6 @@
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
LEFT JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
LEFT JOIN project_laws_inventory pli ON pi.project_laws_inventory_id = pli.id
LEFT JOIN sys_user createBy ON createBy.id = pi.create_by
LEFT JOIN buss_document_library bdl ON pi.buss_document_library_id = bdl.id
where
(
@@ -201,7 +171,7 @@
'' as title,
'' as title_en,
pi.flow_type,
createBy.username AS "create_by",
pi.create_by,
(
select
pid.end_time
@@ -209,8 +179,6 @@
process_info_detail pid
where pid.process_info_id = pi.id and pid.STATUS = 'NotDone' order by pid.end_time asc limit 1
) as end_time,
'' as task_id,
'' as task_definition_key,
pi.STATUS,
pi.prc_num,
pi.prc_name,
@@ -225,7 +193,6 @@
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
LEFT JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
LEFT JOIN project_laws_inventory pli ON pi.project_laws_inventory_id = pli.id
LEFT JOIN sys_user createBy ON createBy.id = pi.create_by
WHERE
(
pi.id IN (
@@ -260,37 +227,12 @@
pi.STATUS,
pi.prc_num,
pi.prc_name,
(
select
detail.task_id
from
process_info_detail detail
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId}
<if test="params.taskStatus != null and params.taskStatus != ''">
and detail.`status` = #{params.taskStatus}
</if>
order by detail.submit_time desc
limit 1
) as task_id,
(
select
detail.task_definition_key
from
process_info_detail detail
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId}
<if test="params.taskStatus != null and params.taskStatus != ''">
and detail.`status` = #{params.taskStatus}
</if>
order by detail.submit_time desc
limit 1
) as task_definition_key,
createBy.username AS create_by,
pi.create_by,
pi.acti_proc_inst_id,
pi.create_time
FROM
process_info pi
LEFT JOIN buss_document_library bdl ON pi.buss_document_library_id = bdl.id
LEFT JOIN sys_user createBy on createBy.id = pi.create_by
<where>
pi.flow_type IN
<foreach collection="params.flowTypeList" index="index" item="item" open="(" separator="," close=")">
@@ -35,6 +35,7 @@ import com.jero.modules.todoCenter.mapper.ProcessInfoEOMapper;
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
import com.jero.modules.todoCenter.vo.ProcessInfoVO;
import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
import com.jero.modules.wkflow.feginClient.impl.WorkFlowFeignClientImpl;
import org.apache.commons.collections4.CollectionUtils;
@@ -206,7 +207,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
IPage page = new Page(pageNo, pageSize);
IPage<ProcessInfoVO> result = this.baseMapper.queryProjectProcessTodoTaskListList(page,params);
this.disposeData(result.getRecords(),cut);
this.disposeData(result.getRecords(),cut,TaskStatusEnum.NOT_DONE.getValue());
return result;
}
@@ -226,7 +227,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
IPage page = new Page(pageNo, pageSize);
IPage<ProcessInfoVO> result = this.baseMapper.queryProjectProcessPageList(page,params);
this.disposeData(result.getRecords(),cut);
this.disposeData(result.getRecords(),cut,"");
return result;
}
@@ -248,7 +249,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
IPage page = new Page(pageNo, pageSize);
IPage<ProcessInfoVO> result = this.baseMapper.queryProjectProcessPageList(page,params);
this.disposeData(result.getRecords(),cut);
this.disposeData(result.getRecords(),cut,"");
return result;
}
@@ -340,7 +341,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
IPage page = new Page(pageNo, pageSize);
IPage<ProcessInfoVO> result = this.baseMapper.queryLawsAssessPageList(page,params);
this.disposeData(result.getRecords(),cut);
this.disposeData(result.getRecords(),cut,TaskStatusEnum.NOT_DONE.getValue());
return result;
}
@@ -363,7 +364,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
IPage page = new Page(pageNo, pageSize);
IPage<ProcessInfoVO> result = this.baseMapper.queryLawsAssessPageList(page,params);
this.disposeData(result.getRecords(),cut);
this.disposeData(result.getRecords(),cut,TaskStatusEnum.HAVE_DONE.getValue());
return result;
}
@@ -386,7 +387,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
IPage page = new Page(pageNo, pageSize);
IPage<ProcessInfoVO> result = this.baseMapper.queryLawsAssessPageList(page,params);
this.disposeData(result.getRecords(),cut);
this.disposeData(result.getRecords(),cut,TaskStatusEnum.HAVE_DONE.getValue());
return result;
}
@@ -403,7 +404,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
* @param datas
* @param cut
*/
public void disposeData(List<ProcessInfoVO> datas, String cut){
public void disposeData(List<ProcessInfoVO> datas, String cut, String taskStatus){
if(CollectionUtils.isNotEmpty(datas)){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date currentDate = new Date();
@@ -464,6 +465,19 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
List<ProcessInfoDetailEO> detailEOList = detailMap.getValue();
data.setAssignee(detailEOList.stream().map(ProcessInfoDetailEO::getUserId).collect(Collectors.joining(",")));
userIdList.addAll(detailEOList.stream().map(ProcessInfoDetailEO::getUserId).collect(Collectors.toList()));
// 如果上一操作人是空则证明该流程当前处理人也是上一个操作人
if(StringUtils.isEmpty(data.getLastAssignee())){
List<String> collect = detailEOList.stream().filter(detailEO -> {
return (
StringUtils.equals(detailEO.getTaskDefinitionKey(), DesignComplianceNodeEnum.THE_RESPONSIBLE_PERSON_HANDLES_THE_TASK.getKey())
|| StringUtils.equals(detailEO.getTaskDefinitionKey(), DesignComplianceNodeEnum.SPONSOR_REVIEW.getKey())
);
}).map(ProcessInfoDetailEO::getUserId).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(collect)){
data.setLastAssignee(collect.get(0));
}
}
break;
}
}
@@ -557,6 +571,45 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
data.setEndTimePastDueFlag(true);
}
});
// 优化待办中心查询效率
List<String> createByUserIdList = datas.stream().map(ProcessInfoVO::getCreateBy).distinct().collect(Collectors.toList());
List<SysUser> createByUserList = this.sysUserService.querySysUserListByIdList(createByUserIdList);
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
datas.forEach(data -> {
// 设置发起人的名称
if(CollectionUtils.isNotEmpty(createByUserList) && StringUtils.isNotEmpty(data.getCreateBy())){
String createBy = createByUserList.stream().filter(createByUser -> {
boolean flag = false;
if(StringUtils.equals(createByUser.getId(),data.getCreateBy())){
flag = true;
}
return flag;
}).map(SysUser::getUsername).distinct().collect(Collectors.joining(","));
data.setCreateBy(createBy);
}
if(!StringUtils.equals(data.getFlowType(),FlowTypeEnum.QDQR.getValue())){
// 获取当前用户所拥有的待办任务信息
List<ProcessInfoDetailEO> currentUserProcessInfoDetailInfos = processInfoDetailEOList.stream().filter(detail -> {
boolean flag = false;
if (StringUtils.isNotEmpty(taskStatus)) {
flag = (StringUtils.equals(detail.getProcessInfoId(), data.getId()) && StringUtils.equals(detail.getUserId(), currentUser.getId()) && StringUtils.equals(taskStatus, detail.getStatus()));
} else {
flag = (StringUtils.equals(detail.getProcessInfoId(), data.getId()) && StringUtils.equals(detail.getUserId(), currentUser.getId()));
}
return flag;
}).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(currentUserProcessInfoDetailInfos)){
// 设置taskId
data.setTaskId(currentUserProcessInfoDetailInfos.get(0).getTaskId());
// 设置taskDefinitionKey
data.setTaskDefinitionKey(currentUserProcessInfoDetailInfos.get(0).getTaskDefinitionKey());
}
}
});
}
}
@@ -74,4 +74,19 @@ public enum FlowTypeEnum {
}
return null;
}
/**
* 根据value获取枚举对象
* @param value
* @return
*/
public static FlowTypeEnum getFlowTypeEnumByValue(String value) {
FlowTypeEnum[] flowTypeEnumArr = FlowTypeEnum.values();
for (FlowTypeEnum flowTypeEnum : flowTypeEnumArr) {
if(StringUtils.equals(value,flowTypeEnum.getValue())){
return flowTypeEnum;
}
}
return null;
}
}
+207 -21485
View File
File diff suppressed because it is too large Load Diff
@@ -450,6 +450,7 @@
this.getquerySdtId = record.id
getAction(this.url.getquerySdtList, {
projectId: this.$route.query.projectId,
projectVersion:this.$route.query.projectVersion,
dutyTerritory: record.dutyTerritory
}).then((res) => {
if (res.success) {
@@ -710,13 +710,13 @@
/*max-width: 198px;*/
height: 32px;
display: inline-block;
text-align: center;
text-align: left;
line-height: 32px;
/*background: #EFF1F3;*/
border-radius: 4px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
/*text-overflow: ellipsis;*/
/*white-space: nowrap;*/
/*overflow: hidden;*/
font-size: 14px;
font-weight: 400;
color: #040B29;
@@ -450,12 +450,13 @@
this.$refs.SelectedByRef.getPush()
},
detailClick(item,key) {
this.$router.push({
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
query: {
id: item.bussDocumentLibraryId.split(',')[key]
},
}
})
window.open(newUrl.href, '_blank')
},
SelectedByForm(userIds) {
let query = {
@@ -435,6 +435,7 @@
standId: content[0].id,
serialNumber: content[0].serial_number,
title: content[0].title,
title_en: content[0].title_en,
technologyTerritory: content[0].technology_territory_id
})
this.standardDecomposition = content
@@ -482,6 +483,7 @@
if (content && content.length > 0) {
this.selectedRowKeysRecord.push({
standId: content[0].id,
title_en:content[0].title_en,
serialNumber: content[0].serial_number,
title: content[0].title,
technologyTerritory: content[0].technology_territory_id
@@ -1,145 +1,217 @@
<template>
<div class="box">
<div class="collection-search-wrapper">
<div class="collection-search-header">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('title')">
<span>{{$t('title')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
v-model="queryParams.title"></j-input>
</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>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
<div>
<div class="search-detail-wrap">
<div class="box-content-left">
<div class="classification">{{$t('classification')}}:</div>
<template v-for="tag in tagList">
<a-checkable-tag
:key="tag.id"
:title="tag.problemLabel"
:checked="selectedTags.indexOf(tag.id) > -1"
@change="checked => handleChange(tag.id, checked)"
>
{{ tag.problemLabel }}
</a-checkable-tag>
</template>
</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>
</div>
</div>
</a-form>
</div>
<div class="table-operator">
<div class="operator-text" @click="handleBatCancel">
<a-icon type="delete"/>
{{ $t('BatchCancel') }}
</div>
</div>
<div class="box-content">
<a-checkbox-group style="width: 100%" :defaultChecked="checkboxText"
@change="checkboxTextChange" v-model="checkboxText">
<div v-for="item in conList" :key="item.collectEO.id">
<div style="margin-bottom: 10px;position: relative">
<a-checkbox :value="item.collectEO.id" class="checkbox-left"></a-checkbox>
<div class="text-text-right"
@click="checkedClick(item)"
:class="{ 'null-input':item.checked }">
<div class="text-header">
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
<template slot="title">
<span v-html="item.title"></span>
</template>
<div class="text-header-text" style="cursor: pointer" v-html="item.title">
</div>
</a-tooltip>
</div>
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">-->
<!-- <template slot="title">-->
<!-- <span v-html="item.content"></span>-->
<!-- </template>-->
<div class="text-content" v-html="item.content"
>
</div>
<!-- </a-tooltip>-->
<div v-if="isTrue">
<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">
<div class="content-box-content-top" @click="detailClcik(item)"
v-html="item.contentOne">
</div>
<div @click="CancelCollectionClick(item)"
:title="$t('CancelCollection')"
class="text-text-right-text">{{$t('CancelCollection')}}
<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">
<span @click="fileClick(val)">{{val.fileName}}</span>
</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" v-if="item.standNumber">
<a-icon type="audit"/>
{{item.standNumber}}
</div>
<div class="content-box-button-text" v-if="item.targetMarket_dicText">
<img src="../../../../assets/ditu.png" style="width: 15px;margin-top: -3px" alt="">
{{item.targetMarket_dicText}}
</div>
<div class="content-box-button-text" v-if="item.showPermissions_dicText">
<a-icon type="eye"/>
{{item.showPermissions_dicText}}
</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">
<a-icon type="clock-circle" />
{{item.collectEO.createTime}}
</div>
<div class="content-box-button-text"
:class="{'icon-active':item.collectEO && item.collectEO.collectStatus == 'Collect' ? true : false}"
@click="cancelCollection(item)">
<a-icon class="icon" type="star"/>
{{$t('CancelCollection')}}
</div>
</div>
</div>
</div>
</a-checkbox-group>
</div>
<div class="page" v-if="conList && 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 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>
</div>
</template>
<script>
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
import problemKnowledgeBaseListView from './problemKnowledgeBaseListView'
import { mapGetters } from 'vuex'
import { Base64 } from 'js-base64'
export default {
name: 'problemKnowledgeBaseList',
components: {
problemKnowledgeBaseListView
},
data() {
return {
conList: [],
total: 0,
searchStr:'',
pageSize: 10,
pageNo: 1,
tagList:[],
isTrue: true,
checkboxText: [],
checkboxList: [],
selectedTags: [],
loading: false,
queryParams: {},
url: {
getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseCollectEO/queryCollectPageList',
deleteBatch: '/problemKnowledgeBase/problemKnowledgeBaseCollectEO/deleteBatch'
}
},
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download'
}
},
mounted() {
this.getList()
this.replacePage()
},
watch: {
checkboxText: function(value) {
this.conList.forEach(val => {
val.checked = false
})
if (value.length > 0) {
this.conList.forEach(val => {
value.forEach(res => {
if (res === val.collectEO.id) {
val.checked = true
}
})
})
}
this.conList = [...this.conList]
}
},
watch: {},
methods: {
...mapGetters(['userInfo']),
searchQuery() {
replacePage() {
getAction('/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/list', {}).then((res) => {
if (res.success) {
this.tagList = res.result
} else {
this.tagList = []
}
})
},
onSearch() {
this.isTrue = true
this.pageNo = 1
this.getList()
},
checkboxTextChange(value) {
this.checkboxText = JSON.parse(JSON.stringify(value))
if (this.checkboxList && this.checkboxList.length > 0) {
this.checkboxList.forEach(res => {
this.checkboxText.push(res)
})
handleChange(tag, checked) {
const { selectedTags } = this
const nextSelectedTags = checked
? [...selectedTags, tag]
: selectedTags.filter(t => t !== tag)
this.selectedTags = nextSelectedTags
this.isTrue = true
this.getList()
},
detailClcik(val) {
this.isTrue = false
this.$nextTick(() => {
this.$refs.problemKnowledgeBaseListViewRef.getData(JSON.parse(JSON.stringify(val)))
})
},
fileClick(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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
}
},
problemKnowledgeBase() {
this.pageNo = 1
this.isTrue = true
this.getList()
},
searchQuery() {
this.pageNo = 1
this.getList()
},
searchReset() {
this.pageNo = 1
this.queryParams = {}
@@ -178,7 +250,7 @@
this.$message.warning(this.$t('selectLeastOne'))
}
},
CancelCollectionClick(val) {
cancelCollection(val) {
let _this = this
this.$confirm({
content: _this.$t('confirmCancelCollection'),
@@ -209,11 +281,13 @@
return words
},
getList() {
let selectedTags = JSON.parse(JSON.stringify(this.selectedTags))
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
createBy: this.userInfo().username,
...this.queryParams
// createBy: this.userInfo().username,
searchStr: this.searchStr,
problemTypes: selectedTags.join(','),
}
this.loading = true
getAction(this.url.getInfoList, query).then((res) => {
@@ -253,29 +327,26 @@
}
</script>
<style>
.checkbox-left .ant-checkbox-inner {
width: 18px !important;
height: 18px !important;
line-height: 18px !important;
<style scoped lang="less">
.search-detail-wrap {
width: 100%;
overflow: hidden;
/*margin: 0 auto;*/
}
.tooltip-index {
max-width: calc(100% - 300px) !important;
}
</style>
<style lang="less" scoped>
@import '~@assets/less/common.less';
.box-title-text {
line-height: 1.4;
width: 360px;
float: right;
display: flex;
align-items: center;
margin-bottom: 10px;
text-align: center;
justify-content: center;
}
.title-text {
width: 43px;
width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
@@ -289,15 +360,88 @@
}
.box-input {
/*min-width: 200px;*/
display: inline-block;
width: 100%;
height: 38px;
margin-right: 16px;
}
.box-button {
height: 38px;
}
.box-content-left {
width: calc(100% - 400px);
float: left;
font-size: 14px;
font-weight: 400;
color: #040B29;
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 {
width: 100%;
display: inline-block;
text-align: right;
margin-top: 20px;
}
.operator-text-text-index {
cursor: pointer;
margin-right: 53px;
font-size: 14px;
font-weight: 400;
color: #040B29;
display: inline-block;
}
.operator-text-text-index:last-child {
margin-right: 13px;
}
.box-content-left-text {
margin-right: 30px;
cursor: pointer;
}
.box {
padding: 0 0 0 18px;
box-sizing: border-box;
}
.checkbox-left {
float: left;
position: absolute;
@@ -307,50 +451,45 @@
}
.text-text-right {
width: calc(100% - 152px);
display: inline-block;
padding: 19px 28px;
padding: 19px 20px;
box-sizing: border-box;
margin-left: 38px;
cursor: pointer;
}
.text-text-right-text {
width: 110px;
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-break: break-word;
text-align: center;
padding: 0 6px;
box-sizing: border-box;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
color: #00B3BE;
cursor: pointer;
/*margin-left: 38px;*/
}
.null-input {
background-color: #F2F4F8;
}
.search-text-title {
margin-bottom: 22px;
}
.text-header {
margin-bottom: 11px;
width: 100%;
.text-header-text {
margin-right: 52px;
font-size: 16px;
font-weight: bold;
color: #040B29;
width: 100%;
display: inline-block;
max-width: calc(100% - 180px);
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-break: break-word;
}
/*span {*/
/* margin-right: 52px;*/
/* font-size: 16px;*/
/* font-weight: bold;*/
/* color: #040B29;*/
/* display: inline-block;*/
/* max-width: 500px;*/
/* text-overflow: ellipsis;*/
/* white-space: nowrap;*/
/* overflow: hidden;*/
/*}*/
}
.text-content {
@@ -366,12 +505,7 @@
-webkit-line-clamp: 4;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
.box-content {
padding: 0 0 0 8px;
box-sizing: border-box;
word-break: break-all;
}
.page {
@@ -379,20 +513,17 @@
margin-top: 20px;
}
.text-operation {
margin-right: 8px;
}
.submitButtons {
text-align: center;
}
.fileText {
.noData {
width: 100%;
cursor: pointer;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
line-height: 10;
}
::v-deep .ant-tag-checkable:not(.ant-tag-checkable-checked):hover {
background: #00B3BE;
border: 1px solid #00BEBE;
color: #fff;
}
::v-deep p {
@@ -400,21 +531,217 @@
padding: 0;
}
.selectText {
::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: 140px;
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 {
/*max-width: 198px;*/
height: 32px;
display: inline-block;
text-align: left;
line-height: 32px;
/*background: #EFF1F3;*/
border-radius: 4px;
/*text-overflow: ellipsis;*/
/*white-space: nowrap;*/
/*word-break: break-all;*/
/*overflow: hidden;*/
font-size: 14px;
font-weight: 400;
color: #040B29;
margin-right: 20px;
cursor: pointer;
text-decoration: underline;
}
}
}
.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 {
font-size: 14px;
font-weight: 400;
color: #040B29;
}
.box-content-left .ant-tag-checkable {
padding: 9px 10px;
display: inline-block;
box-sizing: border-box;
background: #fff;
background: rgba(4, 11, 41, 0.06);
color: #363C54;
max-width: 280px;
overflow: hidden;
word-break: break-word;
white-space: nowrap;
text-overflow: ellipsis;
word-break: break-all;
}
::v-deep .ant-select-selection--single {
height: 32px !important;
}
::v-deep .ant-select-selection__rendered {
height: 32px !important;
line-height: 32px !important;
.box-content-left .ant-tag-checkable-checked {
background: #00B3BE;
border: 1px solid #00BEBE;
color: #fff;
}
</style>
@@ -0,0 +1,790 @@
<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" v-if="queryForm.standNumber">
<div class="content-box-button-text" v-for="(value,key) in queryForm.standNumber.split(',')">
<a-icon type="file-markdown"/>
<span style='text-decoration: underline;cursor:pointer;' @click='detailClick(queryForm,key)'>{{value}}</span>
</div>
</div>
<div class="content-box-button-text" v-if="queryForm.targetMarket_dicText">
<img src="../../../../assets/ditu.png" style="width: 15px;margin-top: -3px" alt="">
{{queryForm.targetMarket_dicText}}
</div>
<div class="content-box-button-text" v-if="queryForm.showPermissions_dicText">
<a-icon type="eye" />
{{queryForm.showPermissions_dicText}}
</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-index"
style="margin-bottom: 14px">
<span class="answer-text" @click="messageClick(item)">
{{$t('answer')}}
</span>
<span class="answer-text"
v-if="administrators || item.createBy == userInfoQuery.username"
@click="deleteClick(item)">
{{$t('delete')}}
</span>
</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-index">
<span class="answer-text" @click="messageClick(item)">
{{$t('answer')}}
</span>
<span class="answer-text"
v-if="administrators || val.createBy == userInfoQuery.username"
@click="deleteClick(val)">
{{$t('delete')}}
</span>
</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'
import { deleteAction } from '../../../../api/manage'
export default {
name: 'problemKnowledgeBaseListView',
components: {
SelectedBy
},
data() {
return {
visibleComment: false,
administrators: false,
userInfoQuery: {},
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',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
isCollect: false
}
},
mounted() {
this.administrators = false
this.userInfoQuery = this.userInfo()
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
this.userInfo().userRoleList.forEach(res => {
if (res.roleCode == 'admin') {
this.administrators = true
}
})
}
},
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') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
}
},
deleteClick(item) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
let url = ''
if (item.problemKnowledgeBaseId) {
url = '/problemKnowledgeBase/problemKnowledgeBaseCommentEO/deleteBatch'
} else {
url = '/project/problemKnowledgeBaseReplyEO/deleteBatch'
}
deleteAction(url, { ids: item.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.releaseData()
} else {
_this.$message.warning(res.message)
}
})
}
})
},
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()
},
detailClick(item,key) {
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
query: {
id: item.bussDocumentLibraryId.split(',')[key]
}
})
window.open(newUrl.href, '_blank')
},
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 {
/*max-width: 200px;*/
/*min-width: 120px;*/
height: 32px;
display: inline-block;
text-align: center;
line-height: 32px;
/*padding: 0 10px;*/
/*background: #EFF1F3;*/
border-radius: 4px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 14px;
font-weight: 400;
color: #040B29;
margin-right: 20px;
cursor: pointer;
.file-text {
width: calc(100% - 30px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-decoration: underline;
display: inline-block;
margin-right: 6px;
cursor: pointer;
}
.icon-text {
width: 24px;
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-index {
width: 100%;
}
.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>
@@ -18,7 +18,7 @@
</div>
<a-form-model-item class="itemModel" prop="standard">
<a-input class="box-input"
:disabled="true"
:disabled="false"
v-model="formInline.serialNumber"
:placeholder="$t('PleaseEnter')+$t('standard')"/>
</a-form-model-item>
@@ -88,7 +88,7 @@
},
{
title: this.$t('title'),
value: 'title'
value: localStorage.getItem('language') && localStorage.getItem('language') == 'zh-cn'?'title':'title_en'
},
{
title: this.$t('regulatoryEngineer'),
@@ -72,7 +72,7 @@
},
{
title: this.$t('title'),
value: 'title'
value: localStorage.getItem('language') && localStorage.getItem('language') == 'zh-cn'?'title':'title_en'
},
{
title: this.$t('regulatoryEngineer'),
@@ -102,6 +102,7 @@
},
mounted() {
this.isDisplay = false
document.title = this.$t('collectionOfRegulatoryOpinions')
if (this.$route.query.isDisabled) {
this.disabled = JSON.parse(this.$route.query.isDisabled)
}
@@ -292,7 +292,7 @@
let isTrue
if (dataSource && dataSource.length > 0) {
for (let i = 0; i < dataSource.length; i++) {
if (dataSource[i].status == 'haveDone' || !dataSource[i].status) {
if (dataSource[i].status == 'haveDone' || dataSource[i].createUser) {
isTrue = true
} else {
isTrue = false
@@ -54,7 +54,9 @@
}
},
mounted() {
this.$router.push({
path:'/projectRegulationTasks',
})
},
methods: {
callback(key) {
@@ -921,12 +921,8 @@
userTypes: this.currentPersonRole,
exportName:this.$route.query.projectName + '(' + this.$route.query.title + ')'
}
getAction('/params/collectManifest/exportAll', query).then((res) => {
if (res && !res.success) {
this.$message.error(res.message)
}
this.textLoading = false
})
let name = this.$route.query.projectName + '(' + this.$route.query.title + ')' + '.zip'
downloadFile('/params/collectManifest/exportAll', name , query , this.selectClear)
},
//填写人导出
handleExportDre(){
@@ -18,7 +18,7 @@
</div>
<a-form-model-item class="itemModel" prop="serialNumber">
<a-input class="box-input"
:disabled="true"
:disabled="false"
v-model="formInline.serialNumber"
:placeholder="$t('PleaseEnter')+$t('standard')"/>
</a-form-model-item>
@@ -69,16 +69,16 @@
title: this.$t('entryName'),
align: 'center',
dataIndex: 'projectName',
width: 180,
ellipsis: true
},
{
title: this.$t('targetMarket'),
align: 'center',
dataIndex: 'targetMarket',
width: 180,
width: 240,
ellipsis: true
},
// {
// title: this.$t('targetMarket'),
// align: 'center',
// dataIndex: 'targetMarket',
// width: 180,
// ellipsis: true
// },
{
align: 'center',
dataIndex: 'projectStatus',
@@ -177,16 +177,16 @@
align: 'center',
dataIndex: 'projectName',
scopedSlots: { customRender: 'projectName' },
width: 180,
ellipsis: true
},
{
title: this.$t('targetMarket'),
align: 'center',
dataIndex: 'targetMarket',
width: 180,
width: 240,
ellipsis: true
},
// {
// title: this.$t('targetMarket'),
// align: 'center',
// dataIndex: 'targetMarket',
// width: 180,
// ellipsis: true
// },
{
align: 'center',
dataIndex: 'projectStatus',
+323 -274
View File
@@ -7,7 +7,7 @@
<a-col :md="6" :sm="8" style="line-height: 48px">
<div class="box-title-text">
<div class="title-text" :title="$t('MessageContent')">
<span>{{this.$t('MessageContent')}}</span>
<span>{{ this.$t('MessageContent') }}</span>
</div>
<a-input class="box-input"
:placeholder="$t('pleaseEnter')+$t('MessageContent')"
@@ -18,16 +18,16 @@
<a-col :md="6" :sm="8" style="line-height: 48px">
<div class="box-title-text">
<div class="title-text" :title="$t('MessageType')">
<span>{{this.$t('MessageType')}}</span>
<span>{{ this.$t('MessageType') }}</span>
</div>
<a-select class="box-input"
:placeholder="$t('pleaseSelect')+$t('MessageType')"
v-model="queryParam.msgCategory">
<a-select-option :value="undefined">{{$t('pleaseSelect')}}</a-select-option>
<a-select-option :value="undefined">{{ $t('pleaseSelect') }}</a-select-option>
<a-select-option v-for="(item, key) in Object.keys(msgCategoryQuery)"
:key="key" :value="item">
<span style="display: inline-block;width: 100%" :title="msgCategoryQuery[item]">
{{ msgCategoryQuery[item]}}
{{ msgCategoryQuery[item] }}
</span>
</a-select-option>
</a-select>
@@ -35,8 +35,9 @@
</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>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" type="primary" @click="searchQuery">{{ $t('query') }}</a-button>
<a-button class="box-button" style="margin-left: 8px"
@click="searchReset">{{ $t('reset') }}</a-button>
</a-col>
</span>
@@ -46,12 +47,12 @@
<div class="table-operator">
<div @click="readAll" class="operator-text" :title="$t('AllLabelsRead')">
<a-icon type="eye"/>
{{$t('AllLabelsRead')}}
<a-icon type="eye" />
{{ $t('AllLabelsRead') }}
</div>
<div @click="handleDel" class="operator-text">
<a-icon type="delete"/>
{{$t('BatchDelete')}}
<a-icon type="delete" />
{{ $t('BatchDelete') }}
</div>
</div>
@@ -63,7 +64,7 @@
:dataSource="dataSource"
:scroll="{x: '100%'}"
:pagination="ipagination"
:expandIconAsCell='false'
:expandIconAsCell="false"
:expandIconColumnIndex="5"
:expandIcon="expandIcon"
:expandRowByClick="true"
@@ -74,13 +75,13 @@
<!-- @click="msgContentClick(scope)"-->
<a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}"
:title="language == 'zh-cn' && scope.msgContentCn? scope.msgContentCn : scope.msgContent">
{{language == 'zh-cn' && scope.msgContentCn? scope.msgContentCn : scope.msgContent}}
{{ language == 'zh-cn' && scope.msgContentCn ? scope.msgContentCn : scope.msgContent }}
</a>
</span>
<span slot="msgCategory" slot-scope="text,scope">
<!-- :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}" @click="msgContentClick(scope)"-->
<span :title="msgCategoryQuery[text]">
{{msgCategoryQuery[text]}}
{{ msgCategoryQuery[text] }}
</span>
</span>
<p slot="expandedRowRender" slot-scope="record" style="margin: 0;padding-left: 58px;">
@@ -89,300 +90,348 @@
</p>
</a-table>
<show-announcement ref="ShowAnnouncement"></show-announcement>
<dynamic-notice ref="showDynamNotice" :path="openPath" :formData="formData"/>
<dynamic-notice ref="showDynamNotice" :path="openPath" :formData="formData" />
</a-card>
</template>
<script>
import { filterObj } from '@/utils/util'
import { getAction, putAction, deleteAction } from '@/api/manage'
import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import DynamicNotice from '../../components/tools/DynamicNotice'
import { filterObj } from '@/utils/util'
import { getAction, putAction, deleteAction } from '@/api/manage'
import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import DynamicNotice from '../../components/tools/DynamicNotice'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
export default {
name: 'UserAnnouncementList',
mixins: [JeroListMixin],
components: {
DynamicNotice,
ShowAnnouncement
},
data() {
return {
description: '系统通告表管理页面',
queryParam: {},
selectedRowKeys: [],
// '5': this.$t('taskRegulationComplianceTask'),
msgCategoryQuery: {
'1': this.$t('SubscriptionNotification'),
'2': this.$t('warningInformation'),
'3': this.$t('ForwardPush')
// '4': this.$t('CollectinguthenticationParameters'),
// '6':this.$t('RegulationListConfirmationTask'),
// '7':this.$t('RegulationListConfirmationNotification'),
// '8':this.$t('RegulationTaskConfirmation'),
// '9':this.$t('DesignComplianceTask'),
// '10':this.$t('PreHomoTask'),
// '11':this.$t('ValidationTask'),
// '12':this.$t('DesignComplianceNotification'),
// '13':this.$t('PreHomoNotification'),
// '14':this.$t('ValidationComplianceNotification'),
// '15':this.$t('RegulationTaskConfirmationNotification'),
// '17':this.$t('listConfirmation'),
// '18':this.$t('taskAffirm'),
// '19':this.$t('complianceConfirmation'),
// '20':this.$t('collectionLegislativeComments'),
// '21':this.$t('regulatoryAndTechnicalAssessment'),
export default {
name: 'UserAnnouncementList',
mixins: [JeroListMixin],
components: {
DynamicNotice,
ShowAnnouncement
},
data() {
return {
description: '系统通告表管理页面',
queryParam: {},
selectedRowKeys: [],
// '5': this.$t('taskRegulationComplianceTask'),
msgCategoryQuery: {
'1': this.$t('SubscriptionNotification'),
'2': this.$t('warningInformation'),
'3': this.$t('ForwardPush')
// '4': this.$t('CollectinguthenticationParameters'),
// '6':this.$t('RegulationListConfirmationTask'),
// '7':this.$t('RegulationListConfirmationNotification'),
// '8':this.$t('RegulationTaskConfirmation'),
// '9':this.$t('DesignComplianceTask'),
// '10':this.$t('PreHomoTask'),
// '11':this.$t('ValidationTask'),
// '12':this.$t('DesignComplianceNotification'),
// '13':this.$t('PreHomoNotification'),
// '14':this.$t('ValidationComplianceNotification'),
// '15':this.$t('RegulationTaskConfirmationNotification'),
// '17':this.$t('listConfirmation'),
// '18':this.$t('taskAffirm'),
// '19':this.$t('complianceConfirmation'),
// '20':this.$t('collectionLegislativeComments'),
// '21':this.$t('regulatoryAndTechnicalAssessment'),
},
columns: [
{
title: this.$t('MessageContent'),
align: 'left',
dataIndex: 'msgContent',
ellipsis: true,
scopedSlots: { customRender: 'msgTitile' }
},
columns: [
{
title: this.$t('MessageContent'),
align: 'left',
dataIndex: 'msgContent',
ellipsis: true,
scopedSlots: { customRender: 'msgTitile' }
},
{
title: this.$t('Sponsor'),
align: 'left',
ellipsis: true,
dataIndex: 'initiator',
width: 200
},
{
title: this.$t('MessageType'),
align: 'left',
ellipsis: true,
dataIndex: 'msgCategory',
width: 200,
scopedSlots: { customRender: 'msgCategory' }
},
{
title: this.$t('NotificationTime'),
align: 'left',
ellipsis: true,
width: 200,
dataIndex: 'sendTime'
},
{
title: '',
align: 'left',
ellipsis: true,
width: 50
}
],
url: {
list: '/sys/sysAnnouncementSend/getMyAnnouncementSend',
editCementSend: 'sys/sysAnnouncementSend/editByAnntIdAndUserId',
readAllMsg: 'sys/sysAnnouncementSend/read',
deleteUrl: 'sys/sysAnnouncementSend/deleteBatch'
{
title: this.$t('Sponsor'),
align: 'left',
ellipsis: true,
dataIndex: 'initiator',
width: 200
},
loading: false,
openPath: '',
formData: '',
language: ''
{
title: this.$t('MessageType'),
align: 'left',
ellipsis: true,
dataIndex: 'msgCategory',
width: 200,
scopedSlots: { customRender: 'msgCategory' }
},
{
title: this.$t('NotificationTime'),
align: 'left',
ellipsis: true,
width: 200,
dataIndex: 'sendTime'
},
{
title: '',
align: 'left',
ellipsis: true,
width: 50
}
],
url: {
list: '/sys/sysAnnouncementSend/getMyAnnouncementSend',
editCementSend: 'sys/sysAnnouncementSend/editByAnntIdAndUserId',
readAllMsg: 'sys/sysAnnouncementSend/read',
deleteUrl: 'sys/sysAnnouncementSend/deleteBatch'
},
loading: false,
openPath: '',
formData: '',
language: ''
}
},
watch: {
$route: function(res) {
console.log(res)
this.loadData()
}
},
mounted() {
this.language = localStorage.getItem('language') || ''
},
methods: {
expandIcon(props) {
if (props.expanded) {
return <a-icon type="down" onClick={e => {
props.onExpand(props.record, e)
}
}
/>
} else {
return <a-icon type="right" onClick={e => {
props.onExpand(props.record, e)
}
}
/>
}
},
watch: {
$route: function(res) {
console.log(res)
this.loadData()
loadData(arg) {
if (!this.url.list) {
this.$message.error('请设置url.list属性!')
return
}
//加载数据 若传入参数1则加载第一页的内容
if (arg === 1) {
this.ipagination.current = 1
}
var params = this.getQueryParams()//查询条件
this.loading = true
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for适配不分页的数据列表------------
if (res.result.current > 1 && res.result.records.length == 0) {
this.loadData(1)
return
}
this.dataSource = res.result.records || res.result
if (this.dataSource && this.dataSource.length > 0) {
this.dataSource.forEach(val => {
if (val.msgContentInfoCn && val.msgContentInfoCn.includes('/common/downLoadFile')) {
let index = val.msgContentInfoCn.indexOf('target')
val.msgContentInfoCn = val.msgContentInfoCn.slice(0, index - 2) + '&token=' + Vue.ls.get(ACCESS_TOKEN) + '\' '
+ val.msgContentInfoCn.slice(index)
}
if (val.msgContentInfo && val.msgContentInfo.includes('/common/downLoadFile')) {
let index = val.msgContentInfo.indexOf('target')
val.msgContentInfo = val.msgContentInfo.slice(0, index - 2) + '&token=' + Vue.ls.get(ACCESS_TOKEN) + '\' '
+ val.msgContentInfo.slice(index)
}
})
}
if (res.result.total) {
this.ipagination.total = res.result.total
} else {
this.ipagination.total = 0
}
//update-end---author:zhangyafei Date:20201118 for适配不分页的数据列表------------
}
if (res.code === 510) {
this.$message.warning(res.message)
}
this.loading = false
})
},
getQueryParams() {
//获取查询条件
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
if (localStorage.getItem('msgContent')) {
this.queryParam.msgContent = localStorage.getItem('msgContent')
this.queryParam = { ...this.queryParam }
localStorage.removeItem('msgContent')
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters)
param.field = this.getQueryField()
param.pageNo = this.ipagination.current
param.pageSize = this.ipagination.pageSize
return filterObj(param)
},
showAnnouncement(record) {
putAction(this.url.editCementSend, { anntId: record.anntId }).then((res) => {
if (res.success) {
this.loadData()
this.syncHeadNotic(record.anntId)
}
})
if (record.openType === 'component') {
this.openPath = record.openPage
this.formData = { id: record.busId }
this.$refs.showDynamNotice.detail()
} else {
this.$refs.ShowAnnouncement.detail(record)
}
},
mounted() {
this.language = localStorage.getItem('language') || ''
expandChange(isTrue, val) {
if (isTrue) {
if (val.readFlag == '0') {
this.msgContentClick(val)
}
}
},
methods: {
expandIcon(props) {
if (props.expanded) {
return <a-icon type = 'down'onClick = { e=>
{
props.onExpand(props.record, e)
}
}
/>;
} else {
return <a-icon type = 'right' onClick = { e =>
{
props.onExpand(props.record, e)
}
}
/>;
}
},
getQueryParams() {
//获取查询条件
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
if (localStorage.getItem('msgContent')) {
this.queryParam.msgContent = localStorage.getItem('msgContent')
this.queryParam = { ...this.queryParam }
localStorage.removeItem('msgContent')
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters)
param.field = this.getQueryField()
param.pageNo = this.ipagination.current
param.pageSize = this.ipagination.pageSize
return filterObj(param)
},
showAnnouncement(record) {
putAction(this.url.editCementSend, { anntId: record.anntId }).then((res) => {
if (res.success) {
this.loadData()
this.syncHeadNotic(record.anntId)
readAll() {
var that = this
if (this.selectedRowKeys.length > 0) {
that.$confirm({
content: that.$t('AreAllLabelsRead'),
onOk: function() {
let selectedRowKeys = JSON.parse(JSON.stringify(that.selectedRowKeys))
getAction(that.url.readAllMsg, { ids: selectedRowKeys.join(',') }).then((res) => {
if (res.success) {
that.selectedRowKeys = []
that.$message.success(that.$t('OperationSuccessful'))
that.loadData()
} else {
that.$message.success(that.$t('operationFailed'))
}
})
}
})
if (record.openType === 'component') {
this.openPath = record.openPage
this.formData = { id: record.busId }
this.$refs.showDynamNotice.detail()
} else {
this.$refs.ShowAnnouncement.detail(record)
}
},
expandChange(isTrue, val) {
if (isTrue) {
if (val.readFlag == '0') {
this.msgContentClick(val)
} else {
this.$message.warning(this.$t('PleaseSelectData'))
}
},
onSelectChange(value) {
this.selectedRowKeys = value
},
msgContentClick(row) {
getAction(this.url.readAllMsg, { ids: row.id }).then((res) => {
// this.loadData()
})
// this.$router.push({
// path: '/system/MessageDetails',
// query: row
// })
},
handleDel() {
var that = this
if (this.selectedRowKeys.length > 0) {
that.$confirm({
content: that.$t('ConfirmBatchDeletion'),
onOk: function() {
let selectedRowKeys = JSON.parse(JSON.stringify(that.selectedRowKeys))
deleteAction(that.url.deleteUrl, { ids: selectedRowKeys.join(',') }).then((res) => {
if (res.success) {
that.selectedRowKeys = []
that.$message.success(that.$t('OperationSuccessful'))
that.loadData()
} else {
that.$message.warning(that.$t('operationFailed'))
}
})
}
}
},
readAll() {
var that = this
if (this.selectedRowKeys.length > 0) {
that.$confirm({
content: that.$t('AreAllLabelsRead'),
onOk: function() {
let selectedRowKeys = JSON.parse(JSON.stringify(that.selectedRowKeys))
getAction(that.url.readAllMsg, { ids: selectedRowKeys.join(',') }).then((res) => {
if (res.success) {
that.selectedRowKeys = []
that.$message.success(that.$t('OperationSuccessful'))
that.loadData()
} else {
that.$message.success(that.$t('operationFailed'))
}
})
}
})
} else {
this.$message.warning(this.$t('PleaseSelectData'))
}
},
onSelectChange(value) {
this.selectedRowKeys = value
},
msgContentClick(row) {
getAction(this.url.readAllMsg, { ids: row.id }).then((res) => {
// this.loadData()
})
// this.$router.push({
// path: '/system/MessageDetails',
// query: row
// })
},
handleDel() {
var that = this
if (this.selectedRowKeys.length > 0) {
that.$confirm({
content: that.$t('ConfirmBatchDeletion'),
onOk: function() {
let selectedRowKeys = JSON.parse(JSON.stringify(that.selectedRowKeys))
deleteAction(that.url.deleteUrl, { ids: selectedRowKeys.join(',') }).then((res) => {
if (res.success) {
that.selectedRowKeys = []
that.$message.success(that.$t('OperationSuccessful'))
that.loadData()
} else {
that.$message.warning(that.$t('operationFailed'))
}
})
}
})
} else {
this.$message.warning(this.$t('PleaseSelectData'))
}
} else {
this.$message.warning(this.$t('PleaseSelectData'))
}
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
.ant-card-body .table-operator {
margin-bottom: 18px;
}
.ant-card-body .table-operator {
margin-bottom: 18px;
}
.anty-row-operator button {
margin: 0 5px
}
.anty-row-operator button {
margin: 0 5px
}
.ant-btn-danger {
background-color: #ffffff
}
.ant-btn-danger {
background-color: #ffffff
}
.ant-modal-cust-warp {
height: 100%
}
.ant-modal-cust-warp {
height: 100%
}
.ant-modal-cust-warp .ant-modal-body {
height: calc(100% - 110px) !important;
overflow-y: auto
}
.ant-modal-cust-warp .ant-modal-body {
height: calc(100% - 110px) !important;
overflow-y: auto
}
.ant-modal-cust-warp .ant-modal-content {
height: 90% !important;
overflow-y: hidden
}
.ant-modal-cust-warp .ant-modal-content {
height: 90% !important;
overflow-y: hidden
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 90px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.title-text {
width: 20%;
min-width: 90px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
/*margin-top: 2px;*/
}
.box-button {
height: 38px;
/*margin-top: 2px;*/
}
::v-deep .ant-table .ant-table-row-indent + .ant-table-row-expand-icon {
margin-right: 0;
}
::v-deep .ant-table .ant-table-row-indent + .ant-table-row-expand-icon {
margin-right: 0;
}
</style>
<style>
.box-input .ant-select-selection {
height: 38px;
line-height: 38px;
}
.box-input .ant-select-selection {
height: 38px;
line-height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
}
</style>