Merge remote-tracking branch 'origin/fix_2nd_period' into fix_2nd_period
This commit is contained in:
@@ -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 `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`;
|
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`;
|
||||||
+2
-2
@@ -486,8 +486,8 @@ public class QueryGenerator {
|
|||||||
}
|
}
|
||||||
name = oConvertUtils.camelToUnderline(name);
|
name = oConvertUtils.camelToUnderline(name);
|
||||||
log.info("--查询规则-->"+name+" "+rule.getValue()+" "+value);
|
log.info("--查询规则-->"+name+" "+rule.getValue()+" "+value);
|
||||||
if(" is null ".equals(value)){
|
if("is null".equals(value)){
|
||||||
queryWrapper.isNull(name);
|
queryWrapper.isNull(name).or().eq(name, "");
|
||||||
}else{
|
}else{
|
||||||
switch (rule) {
|
switch (rule) {
|
||||||
case GT:
|
case GT:
|
||||||
|
|||||||
+1
@@ -142,6 +142,7 @@ public class ShiroConfig {
|
|||||||
filterChainDefinitionMap.put("/opensso/**", "anon"); //单点登录
|
filterChainDefinitionMap.put("/opensso/**", "anon"); //单点登录
|
||||||
|
|
||||||
filterChainDefinitionMap.put("/project/projectLawsInventoryEO/processCall", "anon"); // 项目库-法规清单 工作流处理数据接口排除
|
filterChainDefinitionMap.put("/project/projectLawsInventoryEO/processCall", "anon"); // 项目库-法规清单 工作流处理数据接口排除
|
||||||
|
filterChainDefinitionMap.put("/project/projectLawsInventoryEO/updateFlowInfoByProjectLibraryIds", "anon"); // 项目库-法规清单 根据项目库id更新符合性流程发起人、责任人接口排除
|
||||||
filterChainDefinitionMap.put("/project/projectTaskInventoryEO/processCall", "anon"); // 项目库-任务清单 工作流处理数据接口排除
|
filterChainDefinitionMap.put("/project/projectTaskInventoryEO/processCall", "anon"); // 项目库-任务清单 工作流处理数据接口排除
|
||||||
filterChainDefinitionMap.put("/wkflow/processHistoryEO/processCall", "anon"); // 流程历史 工作流处理数据接口排除
|
filterChainDefinitionMap.put("/wkflow/processHistoryEO/processCall", "anon"); // 流程历史 工作流处理数据接口排除
|
||||||
filterChainDefinitionMap.put("/lawsOpinionGather/lawsOpinionGatherEO/processCall", "anon"); // 法规收集表 工作流处理数据接口排除
|
filterChainDefinitionMap.put("/lawsOpinionGather/lawsOpinionGatherEO/processCall", "anon"); // 法规收集表 工作流处理数据接口排除
|
||||||
|
|||||||
+1
-1
@@ -83,7 +83,7 @@ public class ParamsManifestEOController extends JeroController<ParamsManifestEO,
|
|||||||
// 处理 状态 中英文
|
// 处理 状态 中英文
|
||||||
Map<String, String> stateMap = ManifestStateEnum.toMap(cut);
|
Map<String, String> stateMap = ManifestStateEnum.toMap(cut);
|
||||||
rows.forEach(manifestEO -> {
|
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()));
|
manifestEO.setState(stateMap.get(manifestEO.getState()));
|
||||||
});
|
});
|
||||||
return Result.OK(cut, pageList);
|
return Result.OK(cut, pageList);
|
||||||
|
|||||||
+5
-2
@@ -103,10 +103,13 @@ public class ParamsManifestEO implements Serializable {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
||||||
//相关项目版本
|
@ApiModelProperty(value = "相关项目版本")
|
||||||
private String projectVersion;
|
private String projectVersion;
|
||||||
|
|
||||||
//说明
|
@ApiModelProperty(value = "说明")
|
||||||
private String explanation;
|
private String explanation;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "项目相关版本对应的项目id")
|
||||||
|
private String projectVersionId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -18,6 +18,7 @@
|
|||||||
<result column="params_template_name" property="paramsTemplateName" />
|
<result column="params_template_name" property="paramsTemplateName" />
|
||||||
<result column="project_version" property="projectVersion" />
|
<result column="project_version" property="projectVersion" />
|
||||||
<result column="explanation" property="explanation" />
|
<result column="explanation" property="explanation" />
|
||||||
|
<result column="project_version_id" property="projectVersionId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap id="ParamsManifestEOResultMapForCopy" type="com.jero.modules.cert.collect.vo.ParamsManifestVO">
|
<resultMap id="ParamsManifestEOResultMapForCopy" type="com.jero.modules.cert.collect.vo.ParamsManifestVO">
|
||||||
<id column="id" property="id" />
|
<id column="id" property="id" />
|
||||||
@@ -164,7 +165,7 @@
|
|||||||
select tmp_tb.* from(
|
select tmp_tb.* from(
|
||||||
select
|
select
|
||||||
plb.id as project_id,
|
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
|
from project_library_base plb
|
||||||
left join project_name_info as pni on plb.project_name_id = pni.id
|
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
|
left join project_year_name_info as pyni on plb.year_name_id = pyni.id
|
||||||
|
|||||||
+1
-1
@@ -89,7 +89,7 @@ public interface IParamsManifestEOService extends IService<ParamsManifestEO> {
|
|||||||
|
|
||||||
ParamsManifestEO copy(ParamsManifestEO paramsManifestEO, String sourceManifestId);
|
ParamsManifestEO copy(ParamsManifestEO paramsManifestEO, String sourceManifestId);
|
||||||
|
|
||||||
ParamsManifestVO getProjectById(String projectId);
|
ParamsManifestVO getProjectById(String projectId, String projectVersion);
|
||||||
|
|
||||||
List<Map<String, String>> labelListForProjectDetails(String projectId);
|
List<Map<String, String>> labelListForProjectDetails(String projectId);
|
||||||
|
|
||||||
|
|||||||
+95
-72
@@ -49,6 +49,7 @@ import com.jero.modules.oss.service.IOSSFileService;
|
|||||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||||
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
||||||
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
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.project.service.IProjectRelatedPersonnelService;
|
||||||
import com.jero.modules.split.common.FileUnZip;
|
import com.jero.modules.split.common.FileUnZip;
|
||||||
import com.jero.modules.split.common.ReadExcel;
|
import com.jero.modules.split.common.ReadExcel;
|
||||||
@@ -147,6 +148,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ProjectLibraryBaseMapper projectLibraryBaseMapper;
|
private ProjectLibraryBaseMapper projectLibraryBaseMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private IProjectLibraryBaseService projectLibraryBaseService;
|
||||||
|
@Autowired
|
||||||
private WebSocketServer webSocketServer; // 同步上报库时变更清单状态时使用
|
private WebSocketServer webSocketServer; // 同步上报库时变更清单状态时使用
|
||||||
@Resource
|
@Resource
|
||||||
private WebSocket webSocket; // 消息专用
|
private WebSocket webSocket; // 消息专用
|
||||||
@@ -172,6 +175,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
List<ParamsInfoPublishEO> paramsInfoPublishEOList = paramsCollectManifestVO.getParamsInfoPublishEOList();
|
List<ParamsInfoPublishEO> paramsInfoPublishEOList = paramsCollectManifestVO.getParamsInfoPublishEOList();
|
||||||
|
|
||||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId);
|
||||||
|
|
||||||
// 复制参数项
|
// 复制参数项
|
||||||
List<ParamsCollectManifestEO> paramsCollectManifestEOList = new ArrayList<>();
|
List<ParamsCollectManifestEO> paramsCollectManifestEOList = new ArrayList<>();
|
||||||
@@ -192,7 +196,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
target.setUpdateTime(date);
|
target.setUpdateTime(date);
|
||||||
|
|
||||||
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
|
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
|
||||||
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(projectId, source.getDutyTerritory());
|
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(paramsManifestEO.getProjectVersionId(), source.getDutyTerritory());
|
||||||
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
|
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
|
||||||
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
||||||
if (org.apache.commons.lang.StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
|
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())) {
|
if (ManifestStateEnum.FINISHED.getValue().equals(paramsManifestEO.getState())) {
|
||||||
// 更新清单状态和完成时间
|
// 更新清单状态和完成时间
|
||||||
ParamsManifestEO updateParamsManifestEO = new ParamsManifestEO();
|
ParamsManifestEO updateParamsManifestEO = new ParamsManifestEO();
|
||||||
@@ -1043,8 +1046,11 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String,String>> querySdtList(ParamsCollectManifestVO paramsCollectManifestVO) {
|
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<>();
|
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)) {
|
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
|
||||||
String sdtIds = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
String sdtIds = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
||||||
if (StringUtils.isNotBlank(sdtIds)) {
|
if (StringUtils.isNotBlank(sdtIds)) {
|
||||||
@@ -1075,15 +1081,30 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
List<Map<String, String>> userTypeList = new ArrayList<>(); // 一个用户可以有多个用户类型
|
List<Map<String, String>> userTypeList = new ArrayList<>(); // 一个用户可以有多个用户类型
|
||||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录用户
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录用户
|
||||||
|
|
||||||
// 查询项目下所有责任领域下的 homo人员
|
|
||||||
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.queryById(projectId);
|
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseService.getParentAndChildern(projectId);
|
||||||
List<String> homoList = new ArrayList<>();
|
List<String> homoList = new ArrayList<>(); //homo人员
|
||||||
|
List<String> studioList = new ArrayList<>(); //studio人员
|
||||||
if (CollectionUtil.isNotEmpty(projectLibraryBaseList)) {
|
if (CollectionUtil.isNotEmpty(projectLibraryBaseList)) {
|
||||||
String homoIdStr = projectLibraryBaseList.get(0).getCertificationEngineer();
|
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
|
||||||
if (StringUtils.isNotEmpty(homoIdStr)) {
|
// 查询主项目及子项目下所有 homo人员
|
||||||
List<String> homoIdList = Arrays.asList(homoIdStr.split(",")).stream().distinct().collect(Collectors.toList());
|
List<String> homoIdList1 = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(",")).stream().collect(Collectors.toList());
|
||||||
homoList = sysUserService.listByIds(homoIdList).stream().map(SysUser::getUsername).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人员
|
// 查询项目下所有责任领域下的 sdt人员
|
||||||
@@ -1124,11 +1145,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
List<String> userRoleIdList = userRoles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
List<String> userRoleIdList = userRoles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
||||||
userRoleIds = roleIdList.stream().filter(e->userRoleIdList.contains(e)).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();
|
String loginUserName = loginUser.getUsername().toLowerCase();
|
||||||
studioList = toLowerCaseOfList(studioList);
|
studioList = toLowerCaseOfList(studioList);
|
||||||
@@ -1301,7 +1318,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
//日期
|
//日期
|
||||||
String deadline = new SimpleDateFormat("yyyy-MM-dd").format(paramsCollectManifestEO.getDeadline());
|
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
|
//url
|
||||||
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
||||||
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
||||||
@@ -1460,7 +1477,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
updateEO.setDutyTerritory(dutyTerritory);
|
updateEO.setDutyTerritory(dutyTerritory);
|
||||||
|
|
||||||
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
|
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
|
||||||
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(projectId, dutyTerritory);
|
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(paramsManifestEO.getProjectVersionId(), dutyTerritory);
|
||||||
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
|
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
|
||||||
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
||||||
if (org.apache.commons.lang.StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
|
if (org.apache.commons.lang.StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
|
||||||
@@ -1507,8 +1524,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
|
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
|
||||||
|
|
||||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
||||||
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息
|
|
||||||
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); // 获取清单信息
|
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); // 获取清单信息
|
||||||
|
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId, paramsManifestEO.getProjectVersion()); // 获取项目信息
|
||||||
paramsManifestEO.setProjectName(projectInfo.getProjectName());
|
paramsManifestEO.setProjectName(projectInfo.getProjectName());
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
@@ -1619,8 +1636,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
Date deadline = paramsCollectManifestVO.getDeadline();
|
Date deadline = paramsCollectManifestVO.getDeadline();
|
||||||
|
|
||||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
||||||
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息
|
|
||||||
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); // 获取清单信息
|
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); // 获取清单信息
|
||||||
|
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId, paramsManifestEO.getProjectVersion()); // 获取项目信息
|
||||||
paramsManifestEO.setProjectName(projectInfo.getProjectName());
|
paramsManifestEO.setProjectName(projectInfo.getProjectName());
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
@@ -1751,8 +1768,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
Date deadline = paramsCollectManifestVO.getDeadline();
|
Date deadline = paramsCollectManifestVO.getDeadline();
|
||||||
|
|
||||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
||||||
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息
|
|
||||||
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); // 获取清单信息
|
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); // 获取清单信息
|
||||||
|
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId, paramsManifestEO.getProjectVersion()); // 获取项目信息
|
||||||
paramsManifestEO.setProjectName(projectInfo.getProjectName());
|
paramsManifestEO.setProjectName(projectInfo.getProjectName());
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
@@ -2248,6 +2265,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
|
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
|
||||||
String projectId = paramsCollectManifestVO.getProjectId();
|
String projectId = paramsCollectManifestVO.getProjectId();
|
||||||
|
|
||||||
|
// 查询参数清单
|
||||||
|
ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId);
|
||||||
|
|
||||||
// 查询所有收集参数项
|
// 查询所有收集参数项
|
||||||
ParamsCollectManifestEO paramsCollectManifestEO = new ParamsCollectManifestEO();
|
ParamsCollectManifestEO paramsCollectManifestEO = new ParamsCollectManifestEO();
|
||||||
paramsCollectManifestEO.setParamsManifestId(paramsManifestId);
|
paramsCollectManifestEO.setParamsManifestId(paramsManifestId);
|
||||||
@@ -2260,7 +2280,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
list.forEach(collectManifestEO -> {
|
list.forEach(collectManifestEO -> {
|
||||||
|
|
||||||
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
|
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
|
||||||
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(projectId, collectManifestEO.getDutyTerritory());
|
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(paramsManifestEO.getProjectVersionId(), collectManifestEO.getDutyTerritory());
|
||||||
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
|
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
|
||||||
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
||||||
if (org.apache.commons.lang.StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
|
if (org.apache.commons.lang.StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
|
||||||
@@ -2283,7 +2303,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exportAll(ParamsCollectManifestVO paramsCollectManifestVO, HttpServletResponse response, HttpServletRequest request) {
|
public void exportAll(ParamsCollectManifestVO paramsCollectManifestVO, HttpServletResponse response, HttpServletRequest request) {
|
||||||
// OutputStream os = null;
|
OutputStream os = null;
|
||||||
OutputStream excelOS = null;
|
OutputStream excelOS = null;
|
||||||
XSSFWorkbook workbook = new XSSFWorkbook();
|
XSSFWorkbook workbook = new XSSFWorkbook();
|
||||||
String fileOriName = "参数项清单导出信息";
|
String fileOriName = "参数项清单导出信息";
|
||||||
@@ -2379,58 +2399,58 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
String repFileName = fileName.replaceAll("/","_");
|
String repFileName = fileName.replaceAll("/","_");
|
||||||
excelOS = new FileOutputStream(fileNowPath + File.separator + repFileName);
|
excelOS = new FileOutputStream(fileNowPath + File.separator + repFileName);
|
||||||
// response.setHeader("Content-Disposition",
|
response.setHeader("Content-Disposition",
|
||||||
// "attachment; filename=\""+ ReadExcel.encodeFileName(fileOriName+".zip", request) +"\"");
|
"attachment; filename=\""+ ReadExcel.encodeFileName(fileOriName+".zip", request) +"\"");
|
||||||
// response.setContentType("application/force-download");
|
response.setContentType("application/force-download");
|
||||||
// response.flushBuffer();
|
response.flushBuffer();
|
||||||
// os = response.getOutputStream();
|
os = response.getOutputStream();
|
||||||
workbook.write(excelOS);
|
workbook.write(excelOS);
|
||||||
excelOS.flush();
|
excelOS.flush();
|
||||||
excelOS.close();
|
excelOS.close();
|
||||||
ZipUtil.zip(fileNowPath,fileNowPath+".zip");
|
ZipUtil.zip(fileNowPath,fileNowPath+".zip");
|
||||||
// FileInputStream fis = new FileInputStream(fileNowPath+".zip");
|
FileInputStream fis = new FileInputStream(fileNowPath+".zip");
|
||||||
// int len = 0;
|
int len = 0;
|
||||||
// while ((len = fis.read()) != -1) {
|
while ((len = fis.read()) != -1) {
|
||||||
// os.write(len);
|
os.write(len);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// 将导出文件上传到cos上
|
// // 将导出文件上传到cos上
|
||||||
String uploadFileName = fileOriName + ".zip";
|
// String uploadFileName = fileOriName + ".zip";
|
||||||
InputStream uploadFileio = new FileInputStream(new File(fileNowPath+".zip"));
|
// InputStream uploadFileio = new FileInputStream(new File(fileNowPath+".zip"));
|
||||||
MultipartFile mFile = new MockMultipartFile(uploadFileName, uploadFileName, "text/plain", uploadFileio); // 用于上传
|
// MultipartFile mFile = new MockMultipartFile(uploadFileName, uploadFileName, "text/plain", uploadFileio); // 用于上传
|
||||||
OSSFile ossFile = ossFileService.uploadLocalOfCos(mFile, "/manifest", "", CutEnum.CN.getValue()); // 上传导出的压缩包
|
// OSSFile ossFile = ossFileService.uploadLocalOfCos(mFile, "/manifest", "", CutEnum.CN.getValue()); // 上传导出的压缩包
|
||||||
|
//
|
||||||
// 系统向用户发消息
|
// // 系统向用户发消息
|
||||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
// LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
||||||
String msgTitle = "The file " + paramsCollectManifestVO.getExportName() + " that you exported has been generated.";
|
// 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 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 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;
|
// String contentInfo = "The file " + paramsCollectManifestVO.getExportName() + " that you exported has been generated, please click " + href;
|
||||||
|
//
|
||||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
// SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||||
sysAnnouncement.setDelFlag("0");
|
// sysAnnouncement.setDelFlag("0");
|
||||||
sysAnnouncement.setSendStatus("0");
|
// sysAnnouncement.setSendStatus("0");
|
||||||
sysAnnouncement.setSendTime(new Date());
|
// sysAnnouncement.setSendTime(new Date());
|
||||||
sysAnnouncement.setMsgCategory(MessageTypeEnum.PUSH.getValue()); //消息类型:转发推送
|
// sysAnnouncement.setMsgCategory(MessageTypeEnum.PUSH.getValue()); //消息类型:转发推送
|
||||||
sysAnnouncement.setInitiator(MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName()); // 发起人:系统
|
// sysAnnouncement.setInitiator(MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName()); // 发起人:系统
|
||||||
sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
|
// sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
|
||||||
sysAnnouncement.setTitile(msgTitle);
|
// sysAnnouncement.setTitile(msgTitle);
|
||||||
sysAnnouncement.setMsgContent(content);
|
// sysAnnouncement.setMsgContent(content);
|
||||||
sysAnnouncement.setMsgContentInfo(contentInfo);
|
// sysAnnouncement.setMsgContentInfo(contentInfo);
|
||||||
sysAnnouncement.setUserIds(currentUser.getId()); // 发送给当前导出人
|
// sysAnnouncement.setUserIds(currentUser.getId()); // 发送给当前导出人
|
||||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
// sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||||
|
//
|
||||||
JSONObject obj = new JSONObject();
|
// JSONObject obj = new JSONObject();
|
||||||
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
// obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
||||||
obj.put(WebsocketConst.MSG_ID, currentUser.getId());
|
// obj.put(WebsocketConst.MSG_ID, currentUser.getId());
|
||||||
obj.put(WebsocketConst.MSG_TXT, contentInfo);
|
// obj.put(WebsocketConst.MSG_TXT, contentInfo);
|
||||||
webSocket.sendMessage(obj.toJSONString());
|
// webSocket.sendMessage(obj.toJSONString());
|
||||||
|
//
|
||||||
uploadFileio.close();
|
// uploadFileio.close();
|
||||||
// os.flush();
|
os.flush();
|
||||||
// os.close(); // 后开先关
|
os.close(); // 后开先关
|
||||||
// fis.close(); // 先开后关
|
fis.close(); // 先开后关
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (e instanceof JeroBootException){
|
if (e instanceof JeroBootException){
|
||||||
throw new JeroBootException(e.getMessage());
|
throw new JeroBootException(e.getMessage());
|
||||||
@@ -2444,7 +2464,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
// IOUtils.closeQuietly(os);
|
IOUtils.closeQuietly(os);
|
||||||
IOUtils.closeQuietly(excelOS);
|
IOUtils.closeQuietly(excelOS);
|
||||||
File tempZipFile = new File(uploadpath + "/tempZip");
|
File tempZipFile = new File(uploadpath + "/tempZip");
|
||||||
FileUtil.deleteContents(tempZipFile);
|
FileUtil.deleteContents(tempZipFile);
|
||||||
@@ -2870,6 +2890,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
String projectId = paramsCollectManifestVO.getProjectId();
|
String projectId = paramsCollectManifestVO.getProjectId();
|
||||||
String cut = paramsCollectManifestVO.getCut();
|
String cut = paramsCollectManifestVO.getCut();
|
||||||
|
|
||||||
|
// 查询参数清单
|
||||||
|
ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsManifestId);
|
||||||
|
// 查询清单的所有参数项
|
||||||
LambdaQueryWrapper<ParamsCollectManifestEO> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ParamsCollectManifestEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.in(ParamsCollectManifestEO::getId, paramsCollectManifestIdList);
|
queryWrapper.in(ParamsCollectManifestEO::getId, paramsCollectManifestIdList);
|
||||||
List<ParamsCollectManifestEO> paramsCollectManifestEOList = paramsCollectManifestEOMapper.selectList(queryWrapper);
|
List<ParamsCollectManifestEO> paramsCollectManifestEOList = paramsCollectManifestEOMapper.selectList(queryWrapper);
|
||||||
@@ -2885,7 +2908,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
updateEO.setDutyTerritory(dutyTerritory);
|
updateEO.setDutyTerritory(dutyTerritory);
|
||||||
|
|
||||||
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
|
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
|
||||||
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(projectId, dutyTerritory);
|
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(paramsManifestEO.getProjectVersionId(), dutyTerritory);
|
||||||
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
|
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
|
||||||
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
||||||
if (org.apache.commons.lang.StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
|
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);
|
List<ParamsManifestEO> manifestEOS = paramsManifestEOService.list(queryWrapper);
|
||||||
for (ParamsManifestEO manifestEO : manifestEOS) {
|
for (ParamsManifestEO manifestEO : manifestEOS) {
|
||||||
//项目名称
|
//项目名称
|
||||||
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(manifestEO.getProjectId());
|
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(manifestEO.getProjectId(), manifestEO.getProjectVersion());
|
||||||
if (ObjectUtils.isNotEmpty(projectInfo)) {
|
if (ObjectUtils.isNotEmpty(projectInfo)) {
|
||||||
//url
|
//url
|
||||||
String urlParamsStr = parseUrlParams(manifestEO);
|
String urlParamsStr = parseUrlParams(manifestEO);
|
||||||
|
|||||||
+63
-4
@@ -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.IParamsInfoPublishEOService;
|
||||||
import com.jero.modules.cert.template.service.IParamsTemplateEOService;
|
import com.jero.modules.cert.template.service.IParamsTemplateEOService;
|
||||||
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
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.project.service.IProjectRelatedPersonnelService;
|
||||||
import com.jero.modules.system.entity.SysUser;
|
import com.jero.modules.system.entity.SysUser;
|
||||||
import com.jero.modules.system.mapper.SysDictMapper;
|
import com.jero.modules.system.mapper.SysDictMapper;
|
||||||
@@ -93,6 +94,9 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SysDictMapper sysDictMapper;
|
private SysDictMapper sysDictMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IProjectLibraryBaseService projectLibraryBaseService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -117,6 +121,9 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
|||||||
|
|
||||||
String paramsManifestId = UUID.randomUUID().toString().replace("-","");
|
String paramsManifestId = UUID.randomUUID().toString().replace("-","");
|
||||||
|
|
||||||
|
// 根据主项目ID 查询 相关项目版本的项目ID
|
||||||
|
String projectVersionId = projectLibraryBaseService.getIdByVersionAndParentId(paramsManifestEO.getProjectVersion(), paramsManifestEO.getProjectId());
|
||||||
|
|
||||||
// 根据参数模板id发布版本查询对应参数项集合
|
// 根据参数模板id发布版本查询对应参数项集合
|
||||||
List<ParamsInfoPublishEO> paramsInfoPublishEOList = paramsInfoPublishEOService.getListByPublishVersion(paramsManifestEO.getParamsTemplateId(),paramsManifestEO.getParamsTemplatePublishVersion());
|
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())) {
|
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)) {
|
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
|
||||||
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
||||||
if (StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
|
if (StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
|
||||||
@@ -153,6 +160,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
|||||||
|
|
||||||
// 对应参数模板发布版本 前端传过来
|
// 对应参数模板发布版本 前端传过来
|
||||||
paramsManifestEO.setId(paramsManifestId);
|
paramsManifestEO.setId(paramsManifestId);
|
||||||
|
paramsManifestEO.setProjectVersionId(projectVersionId);
|
||||||
paramsManifestEO.setState(ManifestStateEnum.COLLECTING.getValue());
|
paramsManifestEO.setState(ManifestStateEnum.COLLECTING.getValue());
|
||||||
paramsManifestEO.setVersion(1); // 默认版本为 1
|
paramsManifestEO.setVersion(1); // 默认版本为 1
|
||||||
Date now = new Date();
|
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();
|
ParamsManifestEO updateEO = new ParamsManifestEO();
|
||||||
updateEO.setId(paramsManifestEO.getId());
|
updateEO.setId(paramsManifestEO.getId());
|
||||||
updateEO.setTitle(paramsManifestEO.getTitle());
|
updateEO.setTitle(paramsManifestEO.getTitle());
|
||||||
updateEO.setProjectVersion(paramsManifestEO.getProjectVersion());
|
updateEO.setProjectVersion(paramsManifestEO.getProjectVersion());
|
||||||
updateEO.setExplanation(paramsManifestEO.getExplanation());
|
updateEO.setExplanation(paramsManifestEO.getExplanation());
|
||||||
|
updateEO.setProjectVersionId(projectVersionId);
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
updateEO.setUpdateTime(now);
|
updateEO.setUpdateTime(now);
|
||||||
return updateById(updateEO);
|
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);
|
List<ParamsInfoPublishEO> paramsInfoPublishEOList = paramsInfoPublishEOService.getListByPublishVersion(paramsTemplateId, paramsTemplatePublishVersion);
|
||||||
|
|
||||||
@@ -630,7 +645,7 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
|||||||
addCollectManifestEO.setParamsManifestId(addManifestId);
|
addCollectManifestEO.setParamsManifestId(addManifestId);
|
||||||
addCollectManifestEO.setState(CollectManifestStateEnum.WAIT_COLLECT.getValue());
|
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)) {
|
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
|
||||||
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
||||||
if (StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
|
if (StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
|
||||||
@@ -669,8 +684,10 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ParamsManifestVO getProjectById(String projectId) {
|
public ParamsManifestVO getProjectById(String projectId, String projectVersion) {
|
||||||
return paramsManifestEOMapper.getProjectById(projectId);
|
ParamsManifestVO paramsManifestVO = paramsManifestEOMapper.getProjectById(projectId);
|
||||||
|
paramsManifestVO.setProjectName(paramsManifestVO.getProjectName() + "-" + projectVersion); // 项目名称加上 相关项目版本
|
||||||
|
return paramsManifestVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -689,6 +706,12 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
|||||||
List<Map<String, Object>> collectingList = new LinkedList<>();
|
List<Map<String, Object>> collectingList = new LinkedList<>();
|
||||||
List<Map<String, Object>> submitList = new LinkedList<>();
|
List<Map<String, Object>> submitList = new LinkedList<>();
|
||||||
List<Map<String, Object>> syncReportList = 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();
|
ParamsCollectManifestEO paramsCollectManifestEO = new ParamsCollectManifestEO();
|
||||||
@@ -723,6 +746,14 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
|||||||
String submitPercent = getRatio(submitNumber, total); // 已提交的参数项 百分比
|
String submitPercent = getRatio(submitNumber, total); // 已提交的参数项 百分比
|
||||||
String syncReportPercent = getRatio(syncReportNumber, 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) {
|
if (notStartNumber == collectingNumber && collectingNumber == submitNumber && submitNumber == syncReportNumber && syncReportNumber == 0) {
|
||||||
continue;
|
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("dutyTerritory", dutyTerritoryNameList);
|
||||||
result.put("notStart", notStartList);
|
result.put("notStart", notStartList);
|
||||||
result.put("collecting", collectingList);
|
result.put("collecting", collectingList);
|
||||||
|
|||||||
+3
@@ -77,4 +77,7 @@ public class ParamsCollectManifestVO {
|
|||||||
@ApiModelProperty(value = "用户类型")
|
@ApiModelProperty(value = "用户类型")
|
||||||
private String userTypes; // 用户类型
|
private String userTypes; // 用户类型
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "项目相关版本")
|
||||||
|
private String projectVersion;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -6332,6 +6332,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
treeDictItem(categoryList, entry, treeFieldList, cut,null);
|
treeDictItem(categoryList, entry, treeFieldList, cut,null);
|
||||||
}
|
}
|
||||||
record1.put("technology_territory_id",technology_territory);
|
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;
|
return infoPage;
|
||||||
}
|
}
|
||||||
|
|||||||
+39
-13
@@ -81,21 +81,27 @@ public class DummyInventoryInfoEO implements Serializable {
|
|||||||
|
|
||||||
/**适用地区*/
|
/**适用地区*/
|
||||||
@ApiModelProperty(value = "适用地区")
|
@ApiModelProperty(value = "适用地区")
|
||||||
@Dict(dicCode ="region")
|
//@Dict(dicCode ="region")
|
||||||
@Excel(name = "适用地区", width = 15, dicCode = "region")
|
@Excel(name = "适用地区", width = 15, dicCode = "region")
|
||||||
private java.lang.String region;
|
private java.lang.String region;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String region_dictText;
|
||||||
|
|
||||||
/**适用范围*/
|
/**适用范围*/
|
||||||
@Excel(name = "适用范围", width = 15, dicCode = "apply_scope")
|
@Excel(name = "适用范围", width = 15, dicCode = "apply_scope")
|
||||||
@ApiModelProperty(value = "适用范围")
|
@ApiModelProperty(value = "适用范围")
|
||||||
@Dict(dicCode ="apply_scope")
|
//@Dict(dicCode ="apply_scope")
|
||||||
private java.lang.String shi4Yong4Fan4Wei2;
|
private java.lang.String shi4Yong4Fan4Wei2;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String shi4Yong4Fan4Wei2_dictText;
|
||||||
|
|
||||||
/**状态*/
|
/**状态*/
|
||||||
@Excel(name = "状态", width = 15,dicCode ="state")
|
@Excel(name = "状态", width = 15,dicCode ="state")
|
||||||
@ApiModelProperty(value = "状态")
|
@ApiModelProperty(value = "状态")
|
||||||
@Dict(dicCode ="state")
|
//@Dict(dicCode ="state")
|
||||||
private java.lang.String state;
|
private java.lang.String state;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String state_dictText;
|
||||||
|
|
||||||
/**对应标准*/
|
/**对应标准*/
|
||||||
@Excel(name = "对应标准", width = 15)
|
@Excel(name = "对应标准", width = 15)
|
||||||
@@ -107,8 +113,10 @@ public class DummyInventoryInfoEO implements Serializable {
|
|||||||
/**实施类别*/
|
/**实施类别*/
|
||||||
@Excel(name = "实施类别", width = 15,dicCode ="implement_type")
|
@Excel(name = "实施类别", width = 15,dicCode ="implement_type")
|
||||||
@ApiModelProperty(value = "实施类别")
|
@ApiModelProperty(value = "实施类别")
|
||||||
@Dict(dicCode ="implement_type")
|
//@Dict(dicCode ="implement_type")
|
||||||
private java.lang.String implementType;
|
private java.lang.String implementType;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String implementType_dictText;
|
||||||
|
|
||||||
/**新车型实施日期*/
|
/**新车型实施日期*/
|
||||||
@Excel(name = "新车型实施日期", width = 15,format = "yyyy-MM-dd")
|
@Excel(name = "新车型实施日期", width = 15,format = "yyyy-MM-dd")
|
||||||
@@ -138,14 +146,18 @@ public class DummyInventoryInfoEO implements Serializable {
|
|||||||
/**认证类型*/
|
/**认证类型*/
|
||||||
@Excel(name = "认证类型", width = 15,dicCode ="attestation_type")
|
@Excel(name = "认证类型", width = 15,dicCode ="attestation_type")
|
||||||
@ApiModelProperty(value = "认证类型")
|
@ApiModelProperty(value = "认证类型")
|
||||||
@Dict(dicCode ="attestation_type")
|
//@Dict(dicCode ="attestation_type")
|
||||||
private java.lang.String attestationType;
|
private java.lang.String attestationType;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String attestationType_dictText;
|
||||||
|
|
||||||
/**认证级别*/
|
/**认证级别*/
|
||||||
@Excel(name = "认证级别", width = 15,dicCode ="attestation_rank")
|
@Excel(name = "认证级别", width = 15,dicCode ="attestation_rank")
|
||||||
@ApiModelProperty(value = "认证级别")
|
@ApiModelProperty(value = "认证级别")
|
||||||
@Dict(dicCode ="attestation_rank")
|
//@Dict(dicCode ="attestation_rank")
|
||||||
private java.lang.String attestationRank;
|
private java.lang.String attestationRank;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String attestationRank_dictText;
|
||||||
|
|
||||||
/**适用增补件*/
|
/**适用增补件*/
|
||||||
@ApiModelProperty(value = "适用增补件")
|
@ApiModelProperty(value = "适用增补件")
|
||||||
@@ -163,8 +175,10 @@ public class DummyInventoryInfoEO implements Serializable {
|
|||||||
/**责任领域*/
|
/**责任领域*/
|
||||||
@Excel(name = "责任领域", width = 15,dicCode ="duty_territory")
|
@Excel(name = "责任领域", width = 15,dicCode ="duty_territory")
|
||||||
@ApiModelProperty(value = "责任领域")
|
@ApiModelProperty(value = "责任领域")
|
||||||
@Dict(dicCode ="duty_territory")
|
//@Dict(dicCode ="duty_territory")
|
||||||
private java.lang.String dutyTerritory;
|
private java.lang.String dutyTerritory;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String dutyTerritory_dictText;
|
||||||
|
|
||||||
/**备注*/
|
/**备注*/
|
||||||
@Excel(name = "备注", width = 15)
|
@Excel(name = "备注", width = 15)
|
||||||
@@ -192,14 +206,18 @@ public class DummyInventoryInfoEO implements Serializable {
|
|||||||
/**设计符合性确认-发起人*/
|
/**设计符合性确认-发起人*/
|
||||||
@Excel(name = "设计-发起人", width = 15,dicCode ="fa1_qi3_ren2")
|
@Excel(name = "设计-发起人", width = 15,dicCode ="fa1_qi3_ren2")
|
||||||
@ApiModelProperty(value = "设计符合性确认-发起人")
|
@ApiModelProperty(value = "设计符合性确认-发起人")
|
||||||
@Dict(dicCode ="fa1_qi3_ren2")
|
//@Dict(dicCode ="fa1_qi3_ren2")
|
||||||
private java.lang.String designInitiator;
|
private java.lang.String designInitiator;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String designInitiator_dictText;
|
||||||
|
|
||||||
/**设计符合性确认-责任人*/
|
/**设计符合性确认-责任人*/
|
||||||
@Excel(name = "设计-责任人", width = 15,dicCode ="ze2_ren4_ren2")
|
@Excel(name = "设计-责任人", width = 15,dicCode ="ze2_ren4_ren2")
|
||||||
@ApiModelProperty(value = "设计符合性确认-责任人")
|
@ApiModelProperty(value = "设计符合性确认-责任人")
|
||||||
@Dict(dicCode ="ze2_ren4_ren2")
|
//@Dict(dicCode ="ze2_ren4_ren2")
|
||||||
private java.lang.String designDuty;
|
private java.lang.String designDuty;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String designDuty_dictText;
|
||||||
|
|
||||||
//交付物说明
|
//交付物说明
|
||||||
@Excel(name = "设计符合性确认-交付物说明", width = 20)
|
@Excel(name = "设计符合性确认-交付物说明", width = 20)
|
||||||
@@ -226,14 +244,18 @@ public class DummyInventoryInfoEO implements Serializable {
|
|||||||
/**prehomo确认-发起人*/
|
/**prehomo确认-发起人*/
|
||||||
@Excel(name = "Prehomo-发起人", width = 15,dicCode ="fa1_qi3_ren2")
|
@Excel(name = "Prehomo-发起人", width = 15,dicCode ="fa1_qi3_ren2")
|
||||||
@ApiModelProperty(value = "prehomo确认-发起人")
|
@ApiModelProperty(value = "prehomo确认-发起人")
|
||||||
@Dict(dicCode ="fa1_qi3_ren2")
|
//@Dict(dicCode ="fa1_qi3_ren2")
|
||||||
private java.lang.String prehomoInitiator;
|
private java.lang.String prehomoInitiator;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String prehomoInitiator_dictText;
|
||||||
|
|
||||||
/**prehomo确认-责任人*/
|
/**prehomo确认-责任人*/
|
||||||
@Excel(name = "Prehomo-责任人", width = 15,dicCode ="ze2_ren4_ren2")
|
@Excel(name = "Prehomo-责任人", width = 15,dicCode ="ze2_ren4_ren2")
|
||||||
@ApiModelProperty(value = "prehomo确认-责任人")
|
@ApiModelProperty(value = "prehomo确认-责任人")
|
||||||
@Dict(dicCode ="ze2_ren4_ren2")
|
//@Dict(dicCode ="ze2_ren4_ren2")
|
||||||
private java.lang.String prehomoDuty;
|
private java.lang.String prehomoDuty;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String prehomoDuty_dictText;
|
||||||
|
|
||||||
//prehomo确认-交付物说明
|
//prehomo确认-交付物说明
|
||||||
@Excel(name = "prehomo确认-交付物说明", width = 20)
|
@Excel(name = "prehomo确认-交付物说明", width = 20)
|
||||||
@@ -259,14 +281,18 @@ public class DummyInventoryInfoEO implements Serializable {
|
|||||||
/**验证符合性确认-发起人*/
|
/**验证符合性确认-发起人*/
|
||||||
@Excel(name = "验证-发起人", width = 15,dicCode ="fa1_qi3_ren2")
|
@Excel(name = "验证-发起人", width = 15,dicCode ="fa1_qi3_ren2")
|
||||||
@ApiModelProperty(value = "验证符合性确认-发起人")
|
@ApiModelProperty(value = "验证符合性确认-发起人")
|
||||||
@Dict(dicCode ="fa1_qi3_ren2")
|
//@Dict(dicCode ="fa1_qi3_ren2")
|
||||||
private java.lang.String verifyInitiator;
|
private java.lang.String verifyInitiator;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String verifyInitiator_dictText;
|
||||||
|
|
||||||
/**验证符合性确认-责任人*/
|
/**验证符合性确认-责任人*/
|
||||||
@Excel(name = "验证-责任人", width = 15,dicCode ="ze2_ren4_ren2")
|
@Excel(name = "验证-责任人", width = 15,dicCode ="ze2_ren4_ren2")
|
||||||
@ApiModelProperty(value = "验证符合性确认-责任人")
|
@ApiModelProperty(value = "验证符合性确认-责任人")
|
||||||
@Dict(dicCode ="ze2_ren4_ren2")
|
//@Dict(dicCode ="ze2_ren4_ren2")
|
||||||
private java.lang.String verifyDuty;
|
private java.lang.String verifyDuty;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String verifyDuty_dictText;
|
||||||
|
|
||||||
//验证备注
|
//验证备注
|
||||||
@Excel(name = "验证符合性确认-交付物说明", width = 20)
|
@Excel(name = "验证符合性确认-交付物说明", width = 20)
|
||||||
|
|||||||
+1
@@ -35,6 +35,7 @@ public enum DummyInventoryBaseFieldEnum {
|
|||||||
VERIFY_DELIVERABLE_TEMPLATE("验证符合性确认-交付物模板", "verify_deliverable_template","Deliverable template"),
|
VERIFY_DELIVERABLE_TEMPLATE("验证符合性确认-交付物模板", "verify_deliverable_template","Deliverable template"),
|
||||||
VERIFY_INITIATOR("验证符合性确认-发起人", "fa1_qi3_ren2","Initiator"),
|
VERIFY_INITIATOR("验证符合性确认-发起人", "fa1_qi3_ren2","Initiator"),
|
||||||
VERIFY_DUTY("验证符合性确认-责任人", "ze2_ren4_ren2","Assignee"),
|
VERIFY_DUTY("验证符合性确认-责任人", "ze2_ren4_ren2","Assignee"),
|
||||||
|
STATE("状态", "state","state"),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+157
@@ -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.SysCategoryServiceImpl;
|
||||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
@@ -72,6 +73,7 @@ import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServic
|
|||||||
* @Date: 2022-04-11
|
* @Date: 2022-04-11
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryInfoEOMapper, DummyInventoryInfoEO> implements IDummyInventoryInfoEOService {
|
public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryInfoEOMapper, DummyInventoryInfoEO> implements IDummyInventoryInfoEOService {
|
||||||
|
|
||||||
@@ -329,16 +331,171 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<DummyInventoryInfoEO> queryList(DummyInventoryInfoEO dummyInventoryInfoEO,HttpServletRequest req) {
|
public List<DummyInventoryInfoEO> queryList(DummyInventoryInfoEO dummyInventoryInfoEO,HttpServletRequest req) {
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
QueryWrapper<DummyInventoryInfoEO> queryWrapper = QueryGenerator.initQueryWrapper(dummyInventoryInfoEO,req.getParameterMap());
|
QueryWrapper<DummyInventoryInfoEO> queryWrapper = QueryGenerator.initQueryWrapper(dummyInventoryInfoEO,req.getParameterMap());
|
||||||
// queryWrapper.in("dummy_inventory_base_id",dummyInventoryInfoEO.getDummyInventoryBaseId());
|
// queryWrapper.in("dummy_inventory_base_id",dummyInventoryInfoEO.getDummyInventoryBaseId());
|
||||||
queryWrapper.orderByDesc("create_time","serial_number");
|
queryWrapper.orderByDesc("create_time","serial_number");
|
||||||
|
|
||||||
List<DummyInventoryInfoEO> dummyInventoryInfoEOList = this.list(queryWrapper);
|
List<DummyInventoryInfoEO> dummyInventoryInfoEOList = this.list(queryWrapper);
|
||||||
|
log.info("一阶段消耗时间:" + (System.currentTimeMillis() - startTime));
|
||||||
//技术领域处理
|
//技术领域处理
|
||||||
treeDict(dummyInventoryInfoEO, dummyInventoryInfoEOList);
|
treeDict(dummyInventoryInfoEO, dummyInventoryInfoEOList);
|
||||||
|
log.info("二阶段消耗时间:" + (System.currentTimeMillis() - startTime));
|
||||||
|
this.dataDicDispose(dummyInventoryInfoEOList,dummyInventoryInfoEO.getCut());
|
||||||
|
log.info("三阶段消耗时间:" + (System.currentTimeMillis() - startTime));
|
||||||
return dummyInventoryInfoEOList;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复制
|
* 复制
|
||||||
|
|||||||
+6
@@ -381,6 +381,12 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
record1.put("sarFileSplitInfoList",sarFileSplitInfoList);
|
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;
|
return infoPage;
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ public enum ProjectRoleEnum {
|
|||||||
PREHOMODUTY("prehomo确认-责任人","8",""),
|
PREHOMODUTY("prehomo确认-责任人","8",""),
|
||||||
VERIFYINITIATOR("验证符合性确认-发起人","9",""),
|
VERIFYINITIATOR("验证符合性确认-发起人","9",""),
|
||||||
VERIFYDUTY("验证符合性确认-责任人","10",""),
|
VERIFYDUTY("验证符合性确认-责任人","10",""),
|
||||||
MANAGER("验证符合性确认-责任人","11",""),
|
MANAGER("manage","11",""),
|
||||||
ADMIN("系统管理员","12",""),
|
ADMIN("系统管理员","12",""),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
+1
@@ -160,4 +160,5 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
|
|||||||
|
|
||||||
Result<?> taskUrg(ProjectTaskUrgVo projectTaskUrgVo);
|
Result<?> taskUrg(ProjectTaskUrgVo projectTaskUrgVo);
|
||||||
|
|
||||||
|
Result<?> updateFlowInfoByProjectLibraryIds(String projectLibraryIds);
|
||||||
}
|
}
|
||||||
|
|||||||
+15
@@ -124,4 +124,19 @@ public interface IProjectLibraryBaseService extends IService<ProjectLibraryBase>
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ProjectLibraryBase> versionStatistics(String id);
|
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);
|
||||||
}
|
}
|
||||||
|
|||||||
+36
-10
@@ -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.feginClient.impl.WorkFlowFeignClientImpl;
|
||||||
import com.jero.modules.wkflow.service.IProcessHistoryEOService;
|
import com.jero.modules.wkflow.service.IProcessHistoryEOService;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.collections4.MapUtils;
|
import org.apache.commons.collections4.MapUtils;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
@@ -129,6 +130,7 @@ import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServic
|
|||||||
* @Date: 2022-04-14
|
* @Date: 2022-04-14
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||||
public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsInventoryEOMapper, ProjectLawsInventoryEO> implements IProjectLawsInventoryEOService {
|
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());
|
// setContentLog(infoDiff,contentLog,infoDiffEn,enContentLog,projectLawsInventoryEO.getProjectLibraryId());
|
||||||
|
|
||||||
|
|
||||||
//验证用户是否是该法规上级 项目库的studio, 如果是,则同步更新流程
|
// //验证用户是否是该法规上级 项目库的studio, 如果是,则同步更新流程
|
||||||
int roleCode = checkUserRole(projectLawsInventoryEO.getProjectLibraryId(), currentUser.getId(), "");
|
// int roleCode = checkUserRole(projectLawsInventoryEO.getProjectLibraryId(), currentUser.getId(), "");
|
||||||
if (StringUtils.equals(String.valueOf(roleCode),ProjectRoleEnum.STUDIO_ENGINEER.getValue())){
|
// if (StringUtils.equals(String.valueOf(roleCode),ProjectRoleEnum.STUDIO_ENGINEER.getValue())){
|
||||||
//更新流程信息
|
// //更新流程信息
|
||||||
updateFlowInfo(projectLawsInventoryEO);
|
// updateFlowInfo(projectLawsInventoryEO);
|
||||||
}
|
// }
|
||||||
|
this.updateFlowInfo(projectLawsInventoryEO);
|
||||||
}else {
|
}else {
|
||||||
throw new JeroBootException("该用户没有权限操作该数据!");
|
throw new JeroBootException("该用户没有权限操作该数据!");
|
||||||
}
|
}
|
||||||
@@ -710,6 +713,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
@Override
|
@Override
|
||||||
public List<ProjectLawsInventoryEO> queryList(ProjectLawsInventoryEO projectLawsInventoryEO, HttpServletRequest req) {
|
public List<ProjectLawsInventoryEO> queryList(ProjectLawsInventoryEO projectLawsInventoryEO, HttpServletRequest req) {
|
||||||
|
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
String dutyTerritoryStr = "";
|
String dutyTerritoryStr = "";
|
||||||
if (StringUtils.isNotEmpty(projectLawsInventoryEO.getDutyTerritory())) {
|
if (StringUtils.isNotEmpty(projectLawsInventoryEO.getDutyTerritory())) {
|
||||||
dutyTerritoryStr = projectLawsInventoryEO.getDutyTerritory();
|
dutyTerritoryStr = projectLawsInventoryEO.getDutyTerritory();
|
||||||
@@ -749,6 +753,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
//if(isProjectRole != Integer.parseInt(ProjectRoleEnum.STUDIO_ENGINEER.getValue())){
|
//if(isProjectRole != Integer.parseInt(ProjectRoleEnum.STUDIO_ENGINEER.getValue())){
|
||||||
int isProjectRole = Integer.parseInt(projectLawsInventoryEO.getRoleCode());
|
int isProjectRole = Integer.parseInt(projectLawsInventoryEO.getRoleCode());
|
||||||
|
|
||||||
|
log.info("一阶段消耗时间:" + (System.currentTimeMillis() - startTime));
|
||||||
|
|
||||||
if(isProjectRole != Integer.parseInt(ProjectRoleEnum.STUDIO_ENGINEER.getValue())
|
if(isProjectRole != Integer.parseInt(ProjectRoleEnum.STUDIO_ENGINEER.getValue())
|
||||||
&& isProjectRole != Integer.parseInt(ProjectRoleEnum.MANAGER.getValue())
|
&& isProjectRole != Integer.parseInt(ProjectRoleEnum.MANAGER.getValue())
|
||||||
&& isProjectRole != Integer.parseInt(ProjectRoleEnum.ADMIN.getValue())){
|
&& isProjectRole != Integer.parseInt(ProjectRoleEnum.ADMIN.getValue())){
|
||||||
@@ -758,10 +764,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
List<ProjectLawsInventoryEO> result = super.baseMapper.selectList(projectLawsInventoryEOQueryWrapper);
|
List<ProjectLawsInventoryEO> result = super.baseMapper.selectList(projectLawsInventoryEOQueryWrapper);
|
||||||
|
log.info("二阶段消耗时间:" + (System.currentTimeMillis() - startTime));
|
||||||
dataDispose(result,currentUser,isProjectRole,projectLawsInventoryEO.getCut());
|
dataDispose(result,currentUser,isProjectRole,projectLawsInventoryEO.getCut());
|
||||||
long startTime = System.currentTimeMillis();
|
log.info("三阶段消耗时间:" + (System.currentTimeMillis() - startTime));
|
||||||
dataDictDispose(result,projectLawsInventoryEO.getCut());
|
dataDictDispose(result,projectLawsInventoryEO.getCut());
|
||||||
log.debug("处理数据字典消耗时间:" + (System.currentTimeMillis() - startTime));
|
log.info("四阶段消耗时间:" + (System.currentTimeMillis() - startTime));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8954,12 +8961,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
}
|
}
|
||||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||||
if (manager.size() != 0) {
|
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());
|
manager.get(0).setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.MANAGER.getCode());
|
||||||
sysRoles.addAll(manager);
|
sysRoles.addAll(manager);
|
||||||
}
|
}
|
||||||
if (admin.size() != 0) {
|
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());
|
admin.get(0).setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.ADMIN.getCode());
|
||||||
sysRoles.addAll(admin);
|
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("操作成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+32
@@ -1316,6 +1316,38 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
|||||||
}
|
}
|
||||||
return list;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+24
-2
@@ -29,8 +29,10 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
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");
|
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsByDictCode("region");
|
||||||
for (ProjectLibraryBase libraryBase : projectLibraryBaseList) {
|
for (ProjectLibraryBase libraryBase : projectLibraryBaseList) {
|
||||||
targetMarket(projectLibraryBase, dictItemList, libraryBase);
|
targetMarket(projectLibraryBase, dictItemList, libraryBase);
|
||||||
@@ -125,7 +143,7 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
|
|||||||
if(collect.size() != 0){
|
if(collect.size() != 0){
|
||||||
index ++;
|
index ++;
|
||||||
mapList.put("index",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);
|
mapList.put("data",collect);
|
||||||
result.add(mapList);
|
result.add(mapList);
|
||||||
}
|
}
|
||||||
@@ -183,8 +201,12 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
|
|||||||
if(projectTaskInventoryEOList.size() != 0){
|
if(projectTaskInventoryEOList.size() != 0){
|
||||||
projectTaskInventoryEOS = projectTaskInventoryEOList.stream().filter(e -> ProjectLawsInventoryIdList.contains(e.getProjectLawsInventoryId())).collect(Collectors.toList());
|
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<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());//目标市场
|
map.put("targetMarket",libraryBase.getTargetMarket());//目标市场
|
||||||
|
|
||||||
//1. 项目当前状态--projectState(蓝/红/黄/绿)-->studio视角下的数据
|
//1. 项目当前状态--projectState(蓝/红/黄/绿)-->studio视角下的数据
|
||||||
|
|||||||
+1
-1
@@ -131,7 +131,7 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
|||||||
query.in("create_by",sysUser.getUsername()).in("issue_status", InventoryStateEnum.TO_BE_RELEASED.getValue())
|
query.in("create_by",sysUser.getUsername()).in("issue_status", InventoryStateEnum.TO_BE_RELEASED.getValue())
|
||||||
.or().in("issue_status",InventoryStateEnum.ISSUE.getValue());
|
.or().in("issue_status",InventoryStateEnum.ISSUE.getValue());
|
||||||
});
|
});
|
||||||
queryWrapper.orderByDesc("create_time");
|
queryWrapper.orderByDesc("name");
|
||||||
Page<LawsMonthlyReportManageEO> pageInfo = this.page(page, queryWrapper);
|
Page<LawsMonthlyReportManageEO> pageInfo = this.page(page, queryWrapper);
|
||||||
return pageInfo;
|
return pageInfo;
|
||||||
}
|
}
|
||||||
|
|||||||
+25
-31
@@ -28,35 +28,7 @@ import org.apache.poi.xwpf.usermodel.XWPFStyles;
|
|||||||
import org.apache.poi.xwpf.usermodel.XWPFTable;
|
import org.apache.poi.xwpf.usermodel.XWPFTable;
|
||||||
import org.apache.poi.xwpf.usermodel.XWPFTableCell;
|
import org.apache.poi.xwpf.usermodel.XWPFTableCell;
|
||||||
import org.apache.xmlbeans.impl.xb.xmlschema.SpaceAttribute;
|
import org.apache.xmlbeans.impl.xb.xmlschema.SpaceAttribute;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTColor;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.*;
|
||||||
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 java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
@@ -603,7 +575,9 @@ public class WordUtil {
|
|||||||
String applyScopeName = dictItem(sysDictItems, applyScope,cut, DictCodeReportEnum.APPLYSCOPE.getValue());
|
String applyScopeName = dictItem(sysDictItems, applyScope,cut, DictCodeReportEnum.APPLYSCOPE.getValue());
|
||||||
String stateName = dictItem(sysDictItems, state,cut, DictCodeReportEnum.STATE_REPORT.getValue());
|
String stateName = dictItem(sysDictItems, state,cut, DictCodeReportEnum.STATE_REPORT.getValue());
|
||||||
String useMethodName = dictItem(sysDictItems, useMethod,cut, DictCodeReportEnum.USEMETHOD.getValue());
|
String useMethodName = dictItem(sysDictItems, useMethod,cut, DictCodeReportEnum.USEMETHOD.getValue());
|
||||||
|
if(useMethodName.equals("安装即符合")){
|
||||||
|
useMethodName = "安装需符合";
|
||||||
|
}
|
||||||
XWPFTable table = document.createTable(10, 2);
|
XWPFTable table = document.createTable(10, 2);
|
||||||
//表格属性
|
//表格属性
|
||||||
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
||||||
@@ -1250,9 +1224,20 @@ public class WordUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void setBlank(String text, XWPFRun run, StringBuilder sb, String itemText) {
|
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(",")) {
|
for (String value : itemText.split(",")) {
|
||||||
String blank = getBlank(value);
|
String blank = getBlank(value);
|
||||||
if(text.contains(value)){
|
if(text.equals(value)){
|
||||||
sb.append("■"+value+blank);
|
sb.append("■"+value+blank);
|
||||||
}else{
|
}else{
|
||||||
sb.append("□"+value+blank);
|
sb.append("□"+value+blank);
|
||||||
@@ -1386,6 +1371,13 @@ public class WordUtil {
|
|||||||
CTR ctr = CTR.Factory.newInstance();
|
CTR ctr = CTR.Factory.newInstance();
|
||||||
CTRPr rpr = ctr.addNewRPr();
|
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();
|
CTColor color = CTColor.Factory.newInstance();
|
||||||
color.setVal("0000FF");
|
color.setVal("0000FF");
|
||||||
@@ -1400,6 +1392,8 @@ public class WordUtil {
|
|||||||
fonts.setHAnsi("Blue Sky Noto Regular");
|
fonts.setHAnsi("Blue Sky Noto Regular");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ctr.setTArray(new CTText[] { ctText });
|
ctr.setTArray(new CTText[] { ctText });
|
||||||
// Insert the linked text into the link
|
// Insert the linked text into the link
|
||||||
cLink.setRArray(new CTR[] { ctr });
|
cLink.setRArray(new CTR[] { ctr });
|
||||||
|
|||||||
+106
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+4
-62
@@ -57,22 +57,8 @@
|
|||||||
concat(pli.serial_number,'、',bdl.title_en) as standard_info,
|
concat(pli.serial_number,'、',bdl.title_en) as standard_info,
|
||||||
</if>
|
</if>
|
||||||
pi.flow_type,
|
pi.flow_type,
|
||||||
createBy.username as "create_by",
|
pi.create_by,
|
||||||
pi.end_time,
|
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.status,
|
||||||
pi.prc_num,
|
pi.prc_num,
|
||||||
pi.prc_name,
|
pi.prc_name,
|
||||||
@@ -87,7 +73,6 @@
|
|||||||
left join project_name_info pni on pni.id = plb.project_name_id
|
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_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 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
|
LEFT JOIN buss_document_library bdl ON pi.buss_document_library_id = bdl.id
|
||||||
<where>
|
<where>
|
||||||
<if test="params.queryType != 'issuedProcess'">
|
<if test="params.queryType != 'issuedProcess'">
|
||||||
@@ -141,22 +126,8 @@
|
|||||||
concat(pli.serial_number,'、',bdl.title_en) as standard_info,
|
concat(pli.serial_number,'、',bdl.title_en) as standard_info,
|
||||||
</if>
|
</if>
|
||||||
pi.flow_type,
|
pi.flow_type,
|
||||||
createBy.username AS "create_by",
|
pi.create_by,
|
||||||
pi.end_time,
|
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.STATUS,
|
||||||
pi.prc_num,
|
pi.prc_num,
|
||||||
pi.prc_name,
|
pi.prc_name,
|
||||||
@@ -171,7 +142,6 @@
|
|||||||
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
|
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_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 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
|
LEFT JOIN buss_document_library bdl ON pi.buss_document_library_id = bdl.id
|
||||||
where
|
where
|
||||||
(
|
(
|
||||||
@@ -201,7 +171,7 @@
|
|||||||
'' as title,
|
'' as title,
|
||||||
'' as title_en,
|
'' as title_en,
|
||||||
pi.flow_type,
|
pi.flow_type,
|
||||||
createBy.username AS "create_by",
|
pi.create_by,
|
||||||
(
|
(
|
||||||
select
|
select
|
||||||
pid.end_time
|
pid.end_time
|
||||||
@@ -209,8 +179,6 @@
|
|||||||
process_info_detail pid
|
process_info_detail pid
|
||||||
where pid.process_info_id = pi.id and pid.STATUS = 'NotDone' order by pid.end_time asc limit 1
|
where pid.process_info_id = pi.id and pid.STATUS = 'NotDone' order by pid.end_time asc limit 1
|
||||||
) as end_time,
|
) as end_time,
|
||||||
'' as task_id,
|
|
||||||
'' as task_definition_key,
|
|
||||||
pi.STATUS,
|
pi.STATUS,
|
||||||
pi.prc_num,
|
pi.prc_num,
|
||||||
pi.prc_name,
|
pi.prc_name,
|
||||||
@@ -225,7 +193,6 @@
|
|||||||
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
|
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_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 project_laws_inventory pli ON pi.project_laws_inventory_id = pli.id
|
||||||
LEFT JOIN sys_user createBy ON createBy.id = pi.create_by
|
|
||||||
WHERE
|
WHERE
|
||||||
(
|
(
|
||||||
pi.id IN (
|
pi.id IN (
|
||||||
@@ -260,37 +227,12 @@
|
|||||||
pi.STATUS,
|
pi.STATUS,
|
||||||
pi.prc_num,
|
pi.prc_num,
|
||||||
pi.prc_name,
|
pi.prc_name,
|
||||||
(
|
pi.create_by,
|
||||||
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.acti_proc_inst_id,
|
pi.acti_proc_inst_id,
|
||||||
pi.create_time
|
pi.create_time
|
||||||
FROM
|
FROM
|
||||||
process_info pi
|
process_info pi
|
||||||
LEFT JOIN buss_document_library bdl ON pi.buss_document_library_id = bdl.id
|
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>
|
<where>
|
||||||
pi.flow_type IN
|
pi.flow_type IN
|
||||||
<foreach collection="params.flowTypeList" index="index" item="item" open="(" separator="," close=")">
|
<foreach collection="params.flowTypeList" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
|||||||
+60
-7
@@ -35,6 +35,7 @@ import com.jero.modules.todoCenter.mapper.ProcessInfoEOMapper;
|
|||||||
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
|
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
|
||||||
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
|
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
|
||||||
import com.jero.modules.todoCenter.vo.ProcessInfoVO;
|
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.enums.FlowTypeEnum;
|
||||||
import com.jero.modules.wkflow.feginClient.impl.WorkFlowFeignClientImpl;
|
import com.jero.modules.wkflow.feginClient.impl.WorkFlowFeignClientImpl;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
@@ -206,7 +207,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
|||||||
|
|
||||||
IPage page = new Page(pageNo, pageSize);
|
IPage page = new Page(pageNo, pageSize);
|
||||||
IPage<ProcessInfoVO> result = this.baseMapper.queryProjectProcessTodoTaskListList(page,params);
|
IPage<ProcessInfoVO> result = this.baseMapper.queryProjectProcessTodoTaskListList(page,params);
|
||||||
this.disposeData(result.getRecords(),cut);
|
this.disposeData(result.getRecords(),cut,TaskStatusEnum.NOT_DONE.getValue());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,7 +227,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
|||||||
|
|
||||||
IPage page = new Page(pageNo, pageSize);
|
IPage page = new Page(pageNo, pageSize);
|
||||||
IPage<ProcessInfoVO> result = this.baseMapper.queryProjectProcessPageList(page,params);
|
IPage<ProcessInfoVO> result = this.baseMapper.queryProjectProcessPageList(page,params);
|
||||||
this.disposeData(result.getRecords(),cut);
|
this.disposeData(result.getRecords(),cut,"");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,7 +249,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
|||||||
|
|
||||||
IPage page = new Page(pageNo, pageSize);
|
IPage page = new Page(pageNo, pageSize);
|
||||||
IPage<ProcessInfoVO> result = this.baseMapper.queryProjectProcessPageList(page,params);
|
IPage<ProcessInfoVO> result = this.baseMapper.queryProjectProcessPageList(page,params);
|
||||||
this.disposeData(result.getRecords(),cut);
|
this.disposeData(result.getRecords(),cut,"");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -340,7 +341,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
|||||||
|
|
||||||
IPage page = new Page(pageNo, pageSize);
|
IPage page = new Page(pageNo, pageSize);
|
||||||
IPage<ProcessInfoVO> result = this.baseMapper.queryLawsAssessPageList(page,params);
|
IPage<ProcessInfoVO> result = this.baseMapper.queryLawsAssessPageList(page,params);
|
||||||
this.disposeData(result.getRecords(),cut);
|
this.disposeData(result.getRecords(),cut,TaskStatusEnum.NOT_DONE.getValue());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,7 +364,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
|||||||
|
|
||||||
IPage page = new Page(pageNo, pageSize);
|
IPage page = new Page(pageNo, pageSize);
|
||||||
IPage<ProcessInfoVO> result = this.baseMapper.queryLawsAssessPageList(page,params);
|
IPage<ProcessInfoVO> result = this.baseMapper.queryLawsAssessPageList(page,params);
|
||||||
this.disposeData(result.getRecords(),cut);
|
this.disposeData(result.getRecords(),cut,TaskStatusEnum.HAVE_DONE.getValue());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,7 +387,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
|||||||
|
|
||||||
IPage page = new Page(pageNo, pageSize);
|
IPage page = new Page(pageNo, pageSize);
|
||||||
IPage<ProcessInfoVO> result = this.baseMapper.queryLawsAssessPageList(page,params);
|
IPage<ProcessInfoVO> result = this.baseMapper.queryLawsAssessPageList(page,params);
|
||||||
this.disposeData(result.getRecords(),cut);
|
this.disposeData(result.getRecords(),cut,TaskStatusEnum.HAVE_DONE.getValue());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -403,7 +404,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
|||||||
* @param datas
|
* @param datas
|
||||||
* @param cut
|
* @param cut
|
||||||
*/
|
*/
|
||||||
public void disposeData(List<ProcessInfoVO> datas, String cut){
|
public void disposeData(List<ProcessInfoVO> datas, String cut, String taskStatus){
|
||||||
if(CollectionUtils.isNotEmpty(datas)){
|
if(CollectionUtils.isNotEmpty(datas)){
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
Date currentDate = new Date();
|
Date currentDate = new Date();
|
||||||
@@ -464,6 +465,19 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
|||||||
List<ProcessInfoDetailEO> detailEOList = detailMap.getValue();
|
List<ProcessInfoDetailEO> detailEOList = detailMap.getValue();
|
||||||
data.setAssignee(detailEOList.stream().map(ProcessInfoDetailEO::getUserId).collect(Collectors.joining(",")));
|
data.setAssignee(detailEOList.stream().map(ProcessInfoDetailEO::getUserId).collect(Collectors.joining(",")));
|
||||||
userIdList.addAll(detailEOList.stream().map(ProcessInfoDetailEO::getUserId).collect(Collectors.toList()));
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -557,6 +571,45 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
|||||||
data.setEndTimePastDueFlag(true);
|
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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+15
@@ -74,4 +74,19 @@ public enum FlowTypeEnum {
|
|||||||
}
|
}
|
||||||
return null;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+207
-21485
File diff suppressed because it is too large
Load Diff
@@ -450,6 +450,7 @@
|
|||||||
this.getquerySdtId = record.id
|
this.getquerySdtId = record.id
|
||||||
getAction(this.url.getquerySdtList, {
|
getAction(this.url.getquerySdtList, {
|
||||||
projectId: this.$route.query.projectId,
|
projectId: this.$route.query.projectId,
|
||||||
|
projectVersion:this.$route.query.projectVersion,
|
||||||
dutyTerritory: record.dutyTerritory
|
dutyTerritory: record.dutyTerritory
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
|||||||
+4
-4
@@ -710,13 +710,13 @@
|
|||||||
/*max-width: 198px;*/
|
/*max-width: 198px;*/
|
||||||
height: 32px;
|
height: 32px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: left;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
/*background: #EFF1F3;*/
|
/*background: #EFF1F3;*/
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
text-overflow: ellipsis;
|
/*text-overflow: ellipsis;*/
|
||||||
white-space: nowrap;
|
/*white-space: nowrap;*/
|
||||||
overflow: hidden;
|
/*overflow: hidden;*/
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #040B29;
|
color: #040B29;
|
||||||
|
|||||||
+3
-2
@@ -450,12 +450,13 @@
|
|||||||
this.$refs.SelectedByRef.getPush()
|
this.$refs.SelectedByRef.getPush()
|
||||||
},
|
},
|
||||||
detailClick(item,key) {
|
detailClick(item,key) {
|
||||||
this.$router.push({
|
let newUrl = this.$router.resolve({
|
||||||
path: '/docManage/library/detail',
|
path: '/docManage/library/detail',
|
||||||
query: {
|
query: {
|
||||||
id: item.bussDocumentLibraryId.split(',')[key]
|
id: item.bussDocumentLibraryId.split(',')[key]
|
||||||
},
|
}
|
||||||
})
|
})
|
||||||
|
window.open(newUrl.href, '_blank')
|
||||||
},
|
},
|
||||||
SelectedByForm(userIds) {
|
SelectedByForm(userIds) {
|
||||||
let query = {
|
let query = {
|
||||||
|
|||||||
+2
@@ -435,6 +435,7 @@
|
|||||||
standId: content[0].id,
|
standId: content[0].id,
|
||||||
serialNumber: content[0].serial_number,
|
serialNumber: content[0].serial_number,
|
||||||
title: content[0].title,
|
title: content[0].title,
|
||||||
|
title_en: content[0].title_en,
|
||||||
technologyTerritory: content[0].technology_territory_id
|
technologyTerritory: content[0].technology_territory_id
|
||||||
})
|
})
|
||||||
this.standardDecomposition = content
|
this.standardDecomposition = content
|
||||||
@@ -482,6 +483,7 @@
|
|||||||
if (content && content.length > 0) {
|
if (content && content.length > 0) {
|
||||||
this.selectedRowKeysRecord.push({
|
this.selectedRowKeysRecord.push({
|
||||||
standId: content[0].id,
|
standId: content[0].id,
|
||||||
|
title_en:content[0].title_en,
|
||||||
serialNumber: content[0].serial_number,
|
serialNumber: content[0].serial_number,
|
||||||
title: content[0].title,
|
title: content[0].title,
|
||||||
technologyTerritory: content[0].technology_territory_id
|
technologyTerritory: content[0].technology_territory_id
|
||||||
|
|||||||
+495
-168
@@ -1,145 +1,217 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="box">
|
<div>
|
||||||
<div class="collection-search-wrapper">
|
<div class="search-detail-wrap">
|
||||||
<div class="collection-search-header">
|
<div class="box-content-left">
|
||||||
<div class="table-page-search-wrapper">
|
<div class="classification">{{$t('classification')}}:</div>
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<template v-for="tag in tagList">
|
||||||
<a-row :gutter="24">
|
<a-checkable-tag
|
||||||
<a-col :md="6" :sm="8">
|
:key="tag.id"
|
||||||
<div class="box-title-text">
|
:title="tag.problemLabel"
|
||||||
<div class="title-text" :title="$t('title')">
|
:checked="selectedTags.indexOf(tag.id) > -1"
|
||||||
<span>{{$t('title')}}</span>
|
@change="checked => handleChange(tag.id, checked)"
|
||||||
</div>
|
>
|
||||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
{{ tag.problemLabel }}
|
||||||
v-model="queryParams.title"></j-input>
|
</a-checkable-tag>
|
||||||
</div>
|
</template>
|
||||||
</a-col>
|
</div>
|
||||||
<span style="float: right;overflow: hidden;margin-right: 11px"
|
<a-form layout="inline" @keyup.enter.native="onSearch">
|
||||||
class="table-page-search-submitButtons">
|
<div class="box-title-text">
|
||||||
<a-col :md="6" :sm="24">
|
<!-- <div class="title-text" :title="$t('searchContent')">-->
|
||||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
<!-- <span>{{$t('searchContent')}}</span>-->
|
||||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
<!-- </div>-->
|
||||||
</a-col>
|
<a-input-search class="box-input" :placeholder="$t('PleaseEnter')+$t('searchContent')"
|
||||||
</span>
|
allowClear
|
||||||
</a-row>
|
@search="onSearch"
|
||||||
</a-form>
|
v-model="searchStr"></a-input-search>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-operator">
|
<div v-if="isTrue">
|
||||||
<div class="operator-text" @click="handleBatCancel">
|
<div v-if="conList.length > 0" style="margin-top: 16px;height: calc(100vh - 260px);overflow:auto;">
|
||||||
<a-icon type="delete"/>
|
<div class="content-box" v-for="(item,index) in conList" :key="index">
|
||||||
{{ $t('BatchCancel') }}
|
<div class="content-box-top" @click="detailClcik(item)">
|
||||||
</div>
|
<span class="content-box-top-text">
|
||||||
</div>
|
{{ item.title }}
|
||||||
<div class="box-content">
|
</span>
|
||||||
<a-checkbox-group style="width: 100%" :defaultChecked="checkboxText"
|
<span class="content-box-top-color"
|
||||||
@change="checkboxTextChange" v-model="checkboxText">
|
v-if="item.problemTypeNameList && item.problemTypeNameList.length > 0"
|
||||||
<div v-for="item in conList" :key="item.collectEO.id">
|
:title="val"
|
||||||
<div style="margin-bottom: 10px;position: relative">
|
v-for="val in item.problemTypeNameList">
|
||||||
<a-checkbox :value="item.collectEO.id" class="checkbox-left"></a-checkbox>
|
{{val}}
|
||||||
<div class="text-text-right"
|
</span>
|
||||||
@click="checkedClick(item)"
|
</div>
|
||||||
:class="{ 'null-input':item.checked }">
|
<div class="content-box-content">
|
||||||
<div class="text-header">
|
<div class="content-box-content-top" @click="detailClcik(item)"
|
||||||
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
|
v-html="item.contentOne">
|
||||||
<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>
|
</div>
|
||||||
<div @click="CancelCollectionClick(item)"
|
<div class="content-box-content-botton">
|
||||||
:title="$t('CancelCollection')"
|
<div class="content-box-content-botton-text"
|
||||||
class="text-text-right-text">{{$t('CancelCollection')}}
|
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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-checkbox-group>
|
</div>
|
||||||
</div>
|
<div class="noData" v-else>
|
||||||
<div class="page" v-if="conList && conList.length > 0">
|
{{$t('noData')}}
|
||||||
<a-pagination
|
</div>
|
||||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
<div class="page" v-if="conList.length > 0">
|
||||||
show-quick-jumper
|
<a-pagination
|
||||||
show-size-changer
|
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||||
:page-size.sync="pageSize"
|
show-quick-jumper
|
||||||
:total="total"
|
show-size-changer
|
||||||
:current="pageNo"
|
:page-size.sync="pageSize"
|
||||||
@change="pageOnChange"
|
:total="total"
|
||||||
@showSizeChange="SizeChange"
|
:current="pageNo"
|
||||||
/>
|
@change="pageOnChange"
|
||||||
|
@showSizeChange="SizeChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<problemKnowledgeBaseListView ref="problemKnowledgeBaseListViewRef"
|
||||||
|
@problemKnowledgeBase="problemKnowledgeBase" v-else/>
|
||||||
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
|
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
|
||||||
|
import problemKnowledgeBaseListView from './problemKnowledgeBaseListView'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
import { Base64 } from 'js-base64'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'problemKnowledgeBaseList',
|
name: 'problemKnowledgeBaseList',
|
||||||
|
components: {
|
||||||
|
problemKnowledgeBaseListView
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
conList: [],
|
conList: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
|
searchStr:'',
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
|
tagList:[],
|
||||||
|
isTrue: true,
|
||||||
checkboxText: [],
|
checkboxText: [],
|
||||||
checkboxList: [],
|
checkboxList: [],
|
||||||
|
selectedTags: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
queryParams: {},
|
queryParams: {},
|
||||||
url: {
|
url: {
|
||||||
getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseCollectEO/queryCollectPageList',
|
getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseCollectEO/queryCollectPageList',
|
||||||
deleteBatch: '/problemKnowledgeBase/problemKnowledgeBaseCollectEO/deleteBatch'
|
deleteBatch: '/problemKnowledgeBase/problemKnowledgeBaseCollectEO/deleteBatch'
|
||||||
}
|
},
|
||||||
|
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||||
|
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.replacePage()
|
||||||
},
|
},
|
||||||
watch: {
|
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]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapGetters(['userInfo']),
|
...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.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
checkboxTextChange(value) {
|
handleChange(tag, checked) {
|
||||||
this.checkboxText = JSON.parse(JSON.stringify(value))
|
const { selectedTags } = this
|
||||||
if (this.checkboxList && this.checkboxList.length > 0) {
|
const nextSelectedTags = checked
|
||||||
this.checkboxList.forEach(res => {
|
? [...selectedTags, tag]
|
||||||
this.checkboxText.push(res)
|
: 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() {
|
searchReset() {
|
||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
this.queryParams = {}
|
this.queryParams = {}
|
||||||
@@ -178,7 +250,7 @@
|
|||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
CancelCollectionClick(val) {
|
cancelCollection(val) {
|
||||||
let _this = this
|
let _this = this
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
content: _this.$t('confirmCancelCollection'),
|
content: _this.$t('confirmCancelCollection'),
|
||||||
@@ -209,11 +281,13 @@
|
|||||||
return words
|
return words
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
|
let selectedTags = JSON.parse(JSON.stringify(this.selectedTags))
|
||||||
let query = {
|
let query = {
|
||||||
pageNo: this.pageNo,
|
pageNo: this.pageNo,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
createBy: this.userInfo().username,
|
// createBy: this.userInfo().username,
|
||||||
...this.queryParams
|
searchStr: this.searchStr,
|
||||||
|
problemTypes: selectedTags.join(','),
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.getInfoList, query).then((res) => {
|
getAction(this.url.getInfoList, query).then((res) => {
|
||||||
@@ -253,29 +327,26 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style scoped lang="less">
|
||||||
.checkbox-left .ant-checkbox-inner {
|
.search-detail-wrap {
|
||||||
width: 18px !important;
|
width: 100%;
|
||||||
height: 18px !important;
|
overflow: hidden;
|
||||||
line-height: 18px !important;
|
/*margin: 0 auto;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip-index {
|
|
||||||
max-width: calc(100% - 300px) !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
@import '~@assets/less/common.less';
|
|
||||||
|
|
||||||
.box-title-text {
|
.box-title-text {
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
|
width: 360px;
|
||||||
|
float: right;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
text-align: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
width: 43px;
|
width: 110px;
|
||||||
color: #000F16;
|
color: #000F16;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@@ -289,15 +360,88 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.box-input {
|
.box-input {
|
||||||
|
/*min-width: 200px;*/
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
|
margin-right: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-button {
|
.box-button {
|
||||||
height: 38px;
|
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 {
|
.checkbox-left {
|
||||||
float: left;
|
float: left;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -307,50 +451,45 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.text-text-right {
|
.text-text-right {
|
||||||
width: calc(100% - 152px);
|
padding: 19px 20px;
|
||||||
display: inline-block;
|
|
||||||
padding: 19px 28px;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-left: 38px;
|
/*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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.null-input {
|
.null-input {
|
||||||
background-color: #F2F4F8;
|
background-color: #F2F4F8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-text-title {
|
||||||
|
margin-bottom: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
.text-header {
|
.text-header {
|
||||||
margin-bottom: 11px;
|
margin-bottom: 11px;
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.text-header-text {
|
.text-header-text {
|
||||||
|
margin-right: 52px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #040B29;
|
color: #040B29;
|
||||||
width: 100%;
|
display: inline-block;
|
||||||
|
max-width: calc(100% - 180px);
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
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 {
|
.text-content {
|
||||||
@@ -366,12 +505,7 @@
|
|||||||
-webkit-line-clamp: 4;
|
-webkit-line-clamp: 4;
|
||||||
/*! autoprefixer: on;*/
|
/*! autoprefixer: on;*/
|
||||||
text-justify: inter-ideograph;
|
text-justify: inter-ideograph;
|
||||||
word-break: break-all
|
word-break: break-all;
|
||||||
}
|
|
||||||
|
|
||||||
.box-content {
|
|
||||||
padding: 0 0 0 8px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.page {
|
.page {
|
||||||
@@ -379,20 +513,17 @@
|
|||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-operation {
|
.noData {
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submitButtons {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fileText {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
cursor: pointer;
|
text-align: center;
|
||||||
white-space: nowrap;
|
line-height: 10;
|
||||||
overflow: hidden;
|
}
|
||||||
text-overflow: ellipsis;
|
|
||||||
|
::v-deep .ant-tag-checkable:not(.ant-tag-checkable-checked):hover {
|
||||||
|
background: #00B3BE;
|
||||||
|
border: 1px solid #00BEBE;
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep p {
|
::v-deep p {
|
||||||
@@ -400,21 +531,217 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.selectText {
|
::v-deep .ant-input {
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-box {
|
||||||
width: 100%;
|
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;
|
display: inline-block;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 16px;
|
||||||
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
height: 42px;
|
||||||
word-break: break-word;
|
line-height: 48px;
|
||||||
|
color: #000F16;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .ant-select-selection--single {
|
.box-input-index {
|
||||||
height: 32px !important;
|
display: inline-block;
|
||||||
|
height: 38px;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .ant-select-selection__rendered {
|
.itemModel {
|
||||||
height: 32px !important;
|
width: 100%;
|
||||||
line-height: 32px !important;
|
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;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-content-left .ant-tag-checkable-checked {
|
||||||
|
background: #00B3BE;
|
||||||
|
border: 1px solid #00BEBE;
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
+790
@@ -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>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="standard">
|
<a-form-model-item class="itemModel" prop="standard">
|
||||||
<a-input class="box-input"
|
<a-input class="box-input"
|
||||||
:disabled="true"
|
:disabled="false"
|
||||||
v-model="formInline.serialNumber"
|
v-model="formInline.serialNumber"
|
||||||
:placeholder="$t('PleaseEnter')+$t('standard')"/>
|
:placeholder="$t('PleaseEnter')+$t('standard')"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('title'),
|
title: this.$t('title'),
|
||||||
value: 'title'
|
value: localStorage.getItem('language') && localStorage.getItem('language') == 'zh-cn'?'title':'title_en'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('regulatoryEngineer'),
|
title: this.$t('regulatoryEngineer'),
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('title'),
|
title: this.$t('title'),
|
||||||
value: 'title'
|
value: localStorage.getItem('language') && localStorage.getItem('language') == 'zh-cn'?'title':'title_en'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('regulatoryEngineer'),
|
title: this.$t('regulatoryEngineer'),
|
||||||
@@ -102,6 +102,7 @@
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.isDisplay = false
|
this.isDisplay = false
|
||||||
|
document.title = this.$t('collectionOfRegulatoryOpinions')
|
||||||
if (this.$route.query.isDisabled) {
|
if (this.$route.query.isDisabled) {
|
||||||
this.disabled = JSON.parse(this.$route.query.isDisabled)
|
this.disabled = JSON.parse(this.$route.query.isDisabled)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -292,7 +292,7 @@
|
|||||||
let isTrue
|
let isTrue
|
||||||
if (dataSource && dataSource.length > 0) {
|
if (dataSource && dataSource.length > 0) {
|
||||||
for (let i = 0; i < dataSource.length; i++) {
|
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
|
isTrue = true
|
||||||
} else {
|
} else {
|
||||||
isTrue = false
|
isTrue = false
|
||||||
|
|||||||
@@ -54,7 +54,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.$router.push({
|
||||||
|
path:'/projectRegulationTasks',
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
callback(key) {
|
callback(key) {
|
||||||
|
|||||||
@@ -921,12 +921,8 @@
|
|||||||
userTypes: this.currentPersonRole,
|
userTypes: this.currentPersonRole,
|
||||||
exportName:this.$route.query.projectName + '(' + this.$route.query.title + ')'
|
exportName:this.$route.query.projectName + '(' + this.$route.query.title + ')'
|
||||||
}
|
}
|
||||||
getAction('/params/collectManifest/exportAll', query).then((res) => {
|
let name = this.$route.query.projectName + '(' + this.$route.query.title + ')' + '.zip'
|
||||||
if (res && !res.success) {
|
downloadFile('/params/collectManifest/exportAll', name , query , this.selectClear)
|
||||||
this.$message.error(res.message)
|
|
||||||
}
|
|
||||||
this.textLoading = false
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
//填写人导出
|
//填写人导出
|
||||||
handleExportDre(){
|
handleExportDre(){
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="serialNumber">
|
<a-form-model-item class="itemModel" prop="serialNumber">
|
||||||
<a-input class="box-input"
|
<a-input class="box-input"
|
||||||
:disabled="true"
|
:disabled="false"
|
||||||
v-model="formInline.serialNumber"
|
v-model="formInline.serialNumber"
|
||||||
:placeholder="$t('PleaseEnter')+$t('standard')"/>
|
:placeholder="$t('PleaseEnter')+$t('standard')"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
|
|||||||
+8
-8
@@ -69,16 +69,16 @@
|
|||||||
title: this.$t('entryName'),
|
title: this.$t('entryName'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'projectName',
|
dataIndex: 'projectName',
|
||||||
width: 180,
|
width: 240,
|
||||||
ellipsis: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('targetMarket'),
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'targetMarket',
|
|
||||||
width: 180,
|
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// title: this.$t('targetMarket'),
|
||||||
|
// align: 'center',
|
||||||
|
// dataIndex: 'targetMarket',
|
||||||
|
// width: 180,
|
||||||
|
// ellipsis: true
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'projectStatus',
|
dataIndex: 'projectStatus',
|
||||||
|
|||||||
@@ -177,16 +177,16 @@
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'projectName',
|
dataIndex: 'projectName',
|
||||||
scopedSlots: { customRender: 'projectName' },
|
scopedSlots: { customRender: 'projectName' },
|
||||||
width: 180,
|
width: 240,
|
||||||
ellipsis: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('targetMarket'),
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'targetMarket',
|
|
||||||
width: 180,
|
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// title: this.$t('targetMarket'),
|
||||||
|
// align: 'center',
|
||||||
|
// dataIndex: 'targetMarket',
|
||||||
|
// width: 180,
|
||||||
|
// ellipsis: true
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'projectStatus',
|
dataIndex: 'projectStatus',
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<a-col :md="6" :sm="8" style="line-height: 48px">
|
<a-col :md="6" :sm="8" style="line-height: 48px">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text" :title="$t('MessageContent')">
|
<div class="title-text" :title="$t('MessageContent')">
|
||||||
<span>{{this.$t('MessageContent')}}</span>
|
<span>{{ this.$t('MessageContent') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-input class="box-input"
|
<a-input class="box-input"
|
||||||
:placeholder="$t('pleaseEnter')+$t('MessageContent')"
|
:placeholder="$t('pleaseEnter')+$t('MessageContent')"
|
||||||
@@ -18,16 +18,16 @@
|
|||||||
<a-col :md="6" :sm="8" style="line-height: 48px">
|
<a-col :md="6" :sm="8" style="line-height: 48px">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text" :title="$t('MessageType')">
|
<div class="title-text" :title="$t('MessageType')">
|
||||||
<span>{{this.$t('MessageType')}}</span>
|
<span>{{ this.$t('MessageType') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-select class="box-input"
|
<a-select class="box-input"
|
||||||
:placeholder="$t('pleaseSelect')+$t('MessageType')"
|
:placeholder="$t('pleaseSelect')+$t('MessageType')"
|
||||||
v-model="queryParam.msgCategory">
|
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)"
|
<a-select-option v-for="(item, key) in Object.keys(msgCategoryQuery)"
|
||||||
:key="key" :value="item">
|
:key="key" :value="item">
|
||||||
<span style="display: inline-block;width: 100%" :title="msgCategoryQuery[item]">
|
<span style="display: inline-block;width: 100%" :title="msgCategoryQuery[item]">
|
||||||
{{ msgCategoryQuery[item]}}
|
{{ msgCategoryQuery[item] }}
|
||||||
</span>
|
</span>
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -35,8 +35,9 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</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-button class="box-button" style="margin-left: 8px"
|
||||||
|
@click="searchReset">{{ $t('reset') }}</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@@ -46,12 +47,12 @@
|
|||||||
|
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<div @click="readAll" class="operator-text" :title="$t('AllLabelsRead')">
|
<div @click="readAll" class="operator-text" :title="$t('AllLabelsRead')">
|
||||||
<a-icon type="eye"/>
|
<a-icon type="eye" />
|
||||||
{{$t('AllLabelsRead')}}
|
{{ $t('AllLabelsRead') }}
|
||||||
</div>
|
</div>
|
||||||
<div @click="handleDel" class="operator-text">
|
<div @click="handleDel" class="operator-text">
|
||||||
<a-icon type="delete"/>
|
<a-icon type="delete" />
|
||||||
{{$t('BatchDelete')}}
|
{{ $t('BatchDelete') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -63,7 +64,7 @@
|
|||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:scroll="{x: '100%'}"
|
:scroll="{x: '100%'}"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
:expandIconAsCell='false'
|
:expandIconAsCell="false"
|
||||||
:expandIconColumnIndex="5"
|
:expandIconColumnIndex="5"
|
||||||
:expandIcon="expandIcon"
|
:expandIcon="expandIcon"
|
||||||
:expandRowByClick="true"
|
:expandRowByClick="true"
|
||||||
@@ -74,13 +75,13 @@
|
|||||||
<!-- @click="msgContentClick(scope)"-->
|
<!-- @click="msgContentClick(scope)"-->
|
||||||
<a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}"
|
<a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}"
|
||||||
:title="language == 'zh-cn' && scope.msgContentCn? scope.msgContentCn : scope.msgContent">
|
: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>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<span slot="msgCategory" slot-scope="text,scope">
|
<span slot="msgCategory" slot-scope="text,scope">
|
||||||
<!-- :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}" @click="msgContentClick(scope)"-->
|
<!-- :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}" @click="msgContentClick(scope)"-->
|
||||||
<span :title="msgCategoryQuery[text]">
|
<span :title="msgCategoryQuery[text]">
|
||||||
{{msgCategoryQuery[text]}}
|
{{ msgCategoryQuery[text] }}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<p slot="expandedRowRender" slot-scope="record" style="margin: 0;padding-left: 58px;">
|
<p slot="expandedRowRender" slot-scope="record" style="margin: 0;padding-left: 58px;">
|
||||||
@@ -89,300 +90,348 @@
|
|||||||
</p>
|
</p>
|
||||||
</a-table>
|
</a-table>
|
||||||
<show-announcement ref="ShowAnnouncement"></show-announcement>
|
<show-announcement ref="ShowAnnouncement"></show-announcement>
|
||||||
<dynamic-notice ref="showDynamNotice" :path="openPath" :formData="formData"/>
|
<dynamic-notice ref="showDynamNotice" :path="openPath" :formData="formData" />
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { filterObj } from '@/utils/util'
|
import { filterObj } from '@/utils/util'
|
||||||
import { getAction, putAction, deleteAction } from '@/api/manage'
|
import { getAction, putAction, deleteAction } from '@/api/manage'
|
||||||
import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
|
import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
|
||||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
import DynamicNotice from '../../components/tools/DynamicNotice'
|
import DynamicNotice from '../../components/tools/DynamicNotice'
|
||||||
|
import Vue from 'vue'
|
||||||
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserAnnouncementList',
|
name: 'UserAnnouncementList',
|
||||||
mixins: [JeroListMixin],
|
mixins: [JeroListMixin],
|
||||||
components: {
|
components: {
|
||||||
DynamicNotice,
|
DynamicNotice,
|
||||||
ShowAnnouncement
|
ShowAnnouncement
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
description: '系统通告表管理页面',
|
description: '系统通告表管理页面',
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
// '5': this.$t('taskRegulationComplianceTask'),
|
// '5': this.$t('taskRegulationComplianceTask'),
|
||||||
msgCategoryQuery: {
|
msgCategoryQuery: {
|
||||||
'1': this.$t('SubscriptionNotification'),
|
'1': this.$t('SubscriptionNotification'),
|
||||||
'2': this.$t('warningInformation'),
|
'2': this.$t('warningInformation'),
|
||||||
'3': this.$t('ForwardPush')
|
'3': this.$t('ForwardPush')
|
||||||
// '4': this.$t('CollectinguthenticationParameters'),
|
// '4': this.$t('CollectinguthenticationParameters'),
|
||||||
// '6':this.$t('RegulationListConfirmationTask'),
|
// '6':this.$t('RegulationListConfirmationTask'),
|
||||||
// '7':this.$t('RegulationListConfirmationNotification'),
|
// '7':this.$t('RegulationListConfirmationNotification'),
|
||||||
// '8':this.$t('RegulationTaskConfirmation'),
|
// '8':this.$t('RegulationTaskConfirmation'),
|
||||||
// '9':this.$t('DesignComplianceTask'),
|
// '9':this.$t('DesignComplianceTask'),
|
||||||
// '10':this.$t('PreHomoTask'),
|
// '10':this.$t('PreHomoTask'),
|
||||||
// '11':this.$t('ValidationTask'),
|
// '11':this.$t('ValidationTask'),
|
||||||
// '12':this.$t('DesignComplianceNotification'),
|
// '12':this.$t('DesignComplianceNotification'),
|
||||||
// '13':this.$t('PreHomoNotification'),
|
// '13':this.$t('PreHomoNotification'),
|
||||||
// '14':this.$t('ValidationComplianceNotification'),
|
// '14':this.$t('ValidationComplianceNotification'),
|
||||||
// '15':this.$t('RegulationTaskConfirmationNotification'),
|
// '15':this.$t('RegulationTaskConfirmationNotification'),
|
||||||
// '17':this.$t('listConfirmation'),
|
// '17':this.$t('listConfirmation'),
|
||||||
// '18':this.$t('taskAffirm'),
|
// '18':this.$t('taskAffirm'),
|
||||||
// '19':this.$t('complianceConfirmation'),
|
// '19':this.$t('complianceConfirmation'),
|
||||||
// '20':this.$t('collectionLegislativeComments'),
|
// '20':this.$t('collectionLegislativeComments'),
|
||||||
// '21':this.$t('regulatoryAndTechnicalAssessment'),
|
// '21':this.$t('regulatoryAndTechnicalAssessment'),
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: this.$t('MessageContent'),
|
||||||
|
align: 'left',
|
||||||
|
dataIndex: 'msgContent',
|
||||||
|
ellipsis: true,
|
||||||
|
scopedSlots: { customRender: 'msgTitile' }
|
||||||
},
|
},
|
||||||
columns: [
|
{
|
||||||
{
|
title: this.$t('Sponsor'),
|
||||||
title: this.$t('MessageContent'),
|
align: 'left',
|
||||||
align: 'left',
|
ellipsis: true,
|
||||||
dataIndex: 'msgContent',
|
dataIndex: 'initiator',
|
||||||
ellipsis: true,
|
width: 200
|
||||||
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'
|
|
||||||
},
|
},
|
||||||
loading: false,
|
{
|
||||||
openPath: '',
|
title: this.$t('MessageType'),
|
||||||
formData: '',
|
align: 'left',
|
||||||
language: ''
|
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: {
|
loadData(arg) {
|
||||||
$route: function(res) {
|
if (!this.url.list) {
|
||||||
console.log(res)
|
this.$message.error('请设置url.list属性!')
|
||||||
this.loadData()
|
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() {
|
expandChange(isTrue, val) {
|
||||||
this.language = localStorage.getItem('language') || ''
|
if (isTrue) {
|
||||||
|
if (val.readFlag == '0') {
|
||||||
|
this.msgContentClick(val)
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
readAll() {
|
||||||
expandIcon(props) {
|
var that = this
|
||||||
if (props.expanded) {
|
if (this.selectedRowKeys.length > 0) {
|
||||||
return <a-icon type = 'down'onClick = { e=>
|
that.$confirm({
|
||||||
{
|
content: that.$t('AreAllLabelsRead'),
|
||||||
props.onExpand(props.record, e)
|
onOk: function() {
|
||||||
}
|
let selectedRowKeys = JSON.parse(JSON.stringify(that.selectedRowKeys))
|
||||||
}
|
getAction(that.url.readAllMsg, { ids: selectedRowKeys.join(',') }).then((res) => {
|
||||||
/>;
|
if (res.success) {
|
||||||
} else {
|
that.selectedRowKeys = []
|
||||||
return <a-icon type = 'right' onClick = { e =>
|
that.$message.success(that.$t('OperationSuccessful'))
|
||||||
{
|
that.loadData()
|
||||||
props.onExpand(props.record, e)
|
} else {
|
||||||
}
|
that.$message.success(that.$t('operationFailed'))
|
||||||
}
|
}
|
||||||
/>;
|
})
|
||||||
}
|
|
||||||
},
|
|
||||||
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') {
|
} else {
|
||||||
this.openPath = record.openPage
|
this.$message.warning(this.$t('PleaseSelectData'))
|
||||||
this.formData = { id: record.busId }
|
}
|
||||||
this.$refs.showDynamNotice.detail()
|
},
|
||||||
} else {
|
onSelectChange(value) {
|
||||||
this.$refs.ShowAnnouncement.detail(record)
|
this.selectedRowKeys = value
|
||||||
}
|
},
|
||||||
},
|
msgContentClick(row) {
|
||||||
expandChange(isTrue, val) {
|
getAction(this.url.readAllMsg, { ids: row.id }).then((res) => {
|
||||||
if (isTrue) {
|
// this.loadData()
|
||||||
if (val.readFlag == '0') {
|
})
|
||||||
this.msgContentClick(val)
|
// 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({
|
} else {
|
||||||
// path: '/system/MessageDetails',
|
this.$message.warning(this.$t('PleaseSelectData'))
|
||||||
// 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'))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@import '~@assets/less/common.less';
|
@import '~@assets/less/common.less';
|
||||||
|
|
||||||
.ant-card-body .table-operator {
|
.ant-card-body .table-operator {
|
||||||
margin-bottom: 18px;
|
margin-bottom: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.anty-row-operator button {
|
.anty-row-operator button {
|
||||||
margin: 0 5px
|
margin: 0 5px
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-btn-danger {
|
.ant-btn-danger {
|
||||||
background-color: #ffffff
|
background-color: #ffffff
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-modal-cust-warp {
|
.ant-modal-cust-warp {
|
||||||
height: 100%
|
height: 100%
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-modal-cust-warp .ant-modal-body {
|
.ant-modal-cust-warp .ant-modal-body {
|
||||||
height: calc(100% - 110px) !important;
|
height: calc(100% - 110px) !important;
|
||||||
overflow-y: auto
|
overflow-y: auto
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-modal-cust-warp .ant-modal-content {
|
.ant-modal-cust-warp .ant-modal-content {
|
||||||
height: 90% !important;
|
height: 90% !important;
|
||||||
overflow-y: hidden
|
overflow-y: hidden
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-title-text {
|
.box-title-text {
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
min-width: 90px;
|
min-width: 90px;
|
||||||
color: #000F16;
|
color: #000F16;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-input {
|
.box-input {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 70%;
|
width: 70%;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-button {
|
.box-button {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
/*margin-top: 2px;*/
|
/*margin-top: 2px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .ant-table .ant-table-row-indent + .ant-table-row-expand-icon {
|
::v-deep .ant-table .ant-table-row-indent + .ant-table-row-expand-icon {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.box-input .ant-select-selection {
|
.box-input .ant-select-selection {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
line-height: 38px;
|
line-height: 38px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-input .ant-select-selection__rendered {
|
.box-input .ant-select-selection__rendered {
|
||||||
line-height: 38px;
|
line-height: 38px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user