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

This commit is contained in:
zyx.net
2023-03-20 11:10:33 +08:00
23 changed files with 8524 additions and 7119 deletions
@@ -398,4 +398,11 @@ INSERT INTO `sys_category` (`id`, `pid`, `name`, `code`, `create_by`, `create_ti
-- 法规清单表 增加字段 设计、验证符合性确认-流程状态 2023-03-17 未同步生产环境 -- 法规清单表 增加字段 设计、验证符合性确认-流程状态 2023-03-17 未同步生产环境
ALTER TABLE `project_laws_inventory` ALTER TABLE `project_laws_inventory`
ADD COLUMN `design_flow_status` varchar(255) NULL COMMENT '设计符合性确认-流程状态' AFTER `design_due_date`, ADD COLUMN `design_flow_status` varchar(255) NULL COMMENT '设计符合性确认-流程状态' AFTER `design_due_date`,
ADD COLUMN `verify_flow_status` varchar(255) NULL COMMENT '验证符合性确认-流程状态' AFTER `verify_due_date`; ADD COLUMN `verify_flow_status` varchar(255) NULL COMMENT '验证符合性确认-流程状态' AFTER `verify_due_date`;
-- 参数配置数据表,增加排序号字段sql 2023-1-31 未同步生产环境
ALTER TABLE `laws_weilai`.`params_config_data`
ADD COLUMN `order_num` int(10) NULL COMMENT '排序号' AFTER `params_collect_manifest_id`;
-- 上报库参数配置数据表,增加排序号字段sql 2023-2-1 未同步生产环境
ALTER TABLE `laws_weilai`.`params_report_config_data`
ADD COLUMN `order_num` int(10) NULL COMMENT '排序号' AFTER `params_collect_manifest_id`;
@@ -88,4 +88,6 @@ public class ParamsConfigDataEO implements Serializable {
@ApiModelProperty(value = "参数收集清单id") @ApiModelProperty(value = "参数收集清单id")
private String paramsCollectManifestId; private String paramsCollectManifestId;
/**排序号**/
private Integer orderNum;
} }
@@ -56,6 +56,15 @@ public interface IParamsConfigDataEOService extends IService<ParamsConfigDataEO>
*/ */
ParamsConfigDataEO queryByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId); ParamsConfigDataEO queryByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId);
/**
* 通过id查询
*
* @param paramsConfigId
* @param paramsCollectManifestId
* @return
*/
List<ParamsConfigDataEO> queryListByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId);
/** /**
* 列表查询 * 列表查询
* *
@@ -99,6 +99,21 @@ public class ParamsConfigDataEOServiceImpl extends ServiceImpl<ParamsConfigDataE
return getOne(queryWrapper); return getOne(queryWrapper);
} }
/**
* 通过id查询
*
* @param paramsConfigId
* @param paramsCollectManifestId
* @return
*/
@Override
public List<ParamsConfigDataEO> queryListByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId) {
LambdaQueryWrapper<ParamsConfigDataEO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ParamsConfigDataEO::getParamsConfigId, paramsConfigId);
queryWrapper.eq(ParamsConfigDataEO::getParamsCollectManifestId, paramsCollectManifestId);
return this.list(queryWrapper);
}
/** /**
* 列表查询 * 列表查询
* *
@@ -43,6 +43,7 @@ import com.jero.modules.system.enums.DicCodeEnum;
import com.jero.modules.system.mapper.SysDictMapper; import com.jero.modules.system.mapper.SysDictMapper;
import com.jero.modules.system.service.ISysDictService; import com.jero.modules.system.service.ISysDictService;
import com.jero.modules.system.service.ISysUserService; import com.jero.modules.system.service.ISysUserService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -700,23 +701,27 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
// 配置数据: nio编号,控件类型,控件备选值,控件校验 均一致时 将清单参数项项复制到模板参数项,否则不复制 // 配置数据: nio编号,控件类型,控件备选值,控件校验 均一致时 将清单参数项项复制到模板参数项,否则不复制
for (ParamsConfigEO configEO : paramsConfigEOList) { for (ParamsConfigEO configEO : paramsConfigEOList) {
ParamsConfigDataEO configDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(configEO.getId(), collectManifestEO.getId()); // ParamsConfigDataEO configDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(configEO.getId(), collectManifestEO.getId());
ParamsConfigDataEO addConfigDataEO = new ParamsConfigDataEO(); List<ParamsConfigDataEO> configDataEOList = this.paramsConfigDataEOService.queryListByConfigIdAndCollectManifestId(configEO.getId(), collectManifestEO.getId());
if (ObjectUtil.isNotEmpty(configDataEO)) { if(CollectionUtils.isNotEmpty(configDataEOList)){
BeanUtils.copyProperties(configDataEO, addConfigDataEO); for (ParamsConfigDataEO configDataEO : configDataEOList) {
ParamsConfigDataEO addConfigDataEO = new ParamsConfigDataEO();
if (ObjectUtil.isNotEmpty(configDataEO)) {
BeanUtils.copyProperties(configDataEO, addConfigDataEO);
addConfigDataEO.setId(null); addConfigDataEO.setId(null);
addConfigDataEO.setCreateBy(null); addConfigDataEO.setCreateBy(null);
addConfigDataEO.setCreateTime(null); addConfigDataEO.setCreateTime(null);
addConfigDataEO.setUpdateBy(null); addConfigDataEO.setUpdateBy(null);
addConfigDataEO.setUpdateTime(null); addConfigDataEO.setUpdateTime(null);
addConfigDataEO.setSysOrgCode(null); addConfigDataEO.setSysOrgCode(null);
addConfigDataEO.setParamsConfigId(configIdMap.get(configEO.getId())); addConfigDataEO.setParamsConfigId(configIdMap.get(configEO.getId()));
addConfigDataEO.setParamsCollectManifestId(addCollectManifestId); addConfigDataEO.setParamsCollectManifestId(addCollectManifestId);
addConfigDataEOList.add(addConfigDataEO); addConfigDataEOList.add(addConfigDataEO);
}
}
} }
} }
} }
@@ -22,6 +22,8 @@ public interface IParamsReportConfigDataEOService extends IService<ParamsReportC
*/ */
ParamsReportConfigDataEO queryByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId); ParamsReportConfigDataEO queryByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId);
List<ParamsReportConfigDataEO> queryListByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId);
List<ParamsReportConfigDataEO> queryByConfigIdListAndCollectManifestId(List<String> paramsConfigIdList, String paramsCollectManifestId); List<ParamsReportConfigDataEO> queryByConfigIdListAndCollectManifestId(List<String> paramsConfigIdList, String paramsCollectManifestId);
/** /**
@@ -35,6 +35,22 @@ public class ParamsReportConfigDataEOServiceImpl extends ServiceImpl<ParamsRepor
return getOne(queryWrapper); return getOne(queryWrapper);
} }
/**
* 通过id查询
*
* @param paramsConfigId
* @param paramsCollectManifestId
* @return
*/
@Override
public List<ParamsReportConfigDataEO> queryListByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId) {
LambdaQueryWrapper<ParamsReportConfigDataEO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ParamsReportConfigDataEO::getParamsConfigId, paramsConfigId);
queryWrapper.eq(ParamsReportConfigDataEO::getParamsCollectManifestId, paramsCollectManifestId);
queryWrapper.orderByDesc(ParamsReportConfigDataEO::getOrderNum);
return this.list(queryWrapper);
}
@Override @Override
public List<ParamsReportConfigDataEO> queryByConfigIdListAndCollectManifestId(List<String> paramsConfigIdList, String paramsCollectManifestId) { public List<ParamsReportConfigDataEO> queryByConfigIdListAndCollectManifestId(List<String> paramsConfigIdList, String paramsCollectManifestId) {
return baseMapper.selectByConfigIdListAndCollectManifestId(paramsConfigIdList, paramsCollectManifestId); return baseMapper.selectByConfigIdListAndCollectManifestId(paramsConfigIdList, paramsCollectManifestId);
@@ -210,12 +210,38 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
if (CollectionUtil.isNotEmpty(paramsConfigEOList)) { if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置 paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
Map<String, Object> configMap = new HashMap<>(); /*Map<String, Object> configMap = new HashMap<>();
String paramsConfigId = paramsConfigEO.getId(); String paramsConfigId = paramsConfigEO.getId();
ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据 ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据 List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
configMap.put("controlType", controlType); configMap.put("controlType", controlType);
configMap.put("list", paramsConfigDataVOList); configMap.put("list", paramsConfigDataVOList);
manifestMap.put(paramsConfigEO.getId(), configMap);*/
Map<String,Object> paramsConfigDataVO = new HashMap<>();
Map<String, Object> configMap = new HashMap<>();
String paramsConfigId = paramsConfigEO.getId();
List<ParamsReportConfigDataEO> paramsConfigDataEOList = this.paramsReportConfigDataEOService.queryListByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
if(CollectionUtils.isNotEmpty(paramsConfigDataEOList)){
// 匿名比较器排序
Collections.sort(paramsConfigDataEOList, new Comparator<ParamsReportConfigDataEO>() {
@Override
public int compare(ParamsReportConfigDataEO p1, ParamsReportConfigDataEO p2) {
if(p2.getOrderNum() == null || p1.getOrderNum() == null){
return 0;
}
return p1.getOrderNum().compareTo(p2.getOrderNum());
}
});
for (ParamsReportConfigDataEO paramsConfigDataEO : paramsConfigDataEOList) {
List<ParamsConfigDataVO> paramsConfigDataVOList = this.getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
paramsConfigDataVO.put(paramsConfigDataEO.getId(),paramsConfigDataVOList);
}
}
configMap.put("paramsConfigData", paramsConfigDataVO);
configMap.put("controlType", controlType);
manifestMap.put(paramsConfigEO.getId(), configMap); manifestMap.put(paramsConfigEO.getId(), configMap);
configIdList.add(paramsConfigEO.getId()); configIdList.add(paramsConfigEO.getId());
@@ -1319,42 +1345,57 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
if (ControlTypeEnum.Title.getValue().equals(controlType)) { if (ControlTypeEnum.Title.getValue().equals(controlType)) {
record1.put(paramsConfigEO.getId(), titleDefaultValue); record1.put(paramsConfigEO.getId(), titleDefaultValue);
} else { } else {
String paramsConfigId = paramsConfigEO.getId();
ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
configDataBuilder.append(paramsConfigDataEO.getPullData()).append("#");
}
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
configDataBuilder.append(paramsConfigDataEO.getTextData()).append("#");
}
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
if (CollectionUtil.isNotEmpty(ossFileList)) {
// 不合并导出时 验证文件名是否相同,相同进一步验证文件内容是否相同,不同时重命名文件
String fileName = ossFileList.get(0).getFileName();
String newFileName = isRepeat(fileListAll, ossFileList.get(0));
if (!"".equals(newFileName) && !"old".equals(newFileName)) { // 文件名称重复 且文件内容不同
configDataBuilder.append(newFileName).append("#");
ossFileList.get(0).setFileName(newFileName);
fileList.addAll(ossFileList);
fileListAll.addAll(ossFileList);
} else if ("old".equals(newFileName)) { // 文件名称重复 且文件内容相同 String paramsConfigId = paramsConfigEO.getId();
configDataBuilder.append(fileName).append("#"); List<ParamsReportConfigDataEO> paramsConfigDataEOList = this.paramsReportConfigDataEOService.queryListByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
fileList.addAll(ossFileList); StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
}else { if(CollectionUtils.isNotEmpty(paramsConfigDataEOList)){
configDataBuilder.append(fileName).append("#"); for (ParamsReportConfigDataEO paramsConfigDataEO : paramsConfigDataEOList) {
fileList.addAll(ossFileList);
fileListAll.addAll(ossFileList); StringBuilder configDataBuilderTemp = new StringBuilder(); // 重新组合配置数据
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
configDataBuilderTemp.append(paramsConfigDataEO.getPullData()).append("#");
}
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
configDataBuilderTemp.append(paramsConfigDataEO.getTextData()).append("#");
}
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
if (CollectionUtil.isNotEmpty(ossFileList)) {
// 不合并导出时 验证文件名是否相同,相同进一步验证文件内容是否相同,不同时重命名文件
String fileName = ossFileList.get(0).getFileName();
String newFileName = isRepeat(fileListAll, ossFileList.get(0));
if (!"".equals(newFileName) && !"old".equals(newFileName)) { // 文件名称重复 且文件内容不同
configDataBuilderTemp.append(newFileName).append("#");
ossFileList.get(0).setFileName(newFileName);
fileList.addAll(ossFileList);
fileListAll.addAll(ossFileList);
} else if ("old".equals(newFileName)) { // 文件名称重复 且文件内容相同
configDataBuilderTemp.append(fileName).append("#");
fileList.addAll(ossFileList);
} else {
configDataBuilderTemp.append(fileName).append("#");
fileList.addAll(ossFileList);
fileListAll.addAll(ossFileList);
}
}
} }
String configData = configDataBuilderTemp.toString();
if (configData.contains("#")) {
configData = configData.substring(0, configData.lastIndexOf("#"));
}
configDataBuilder.append(configData).append(paramsReportDetailVO.getSeparator());
} }
} }
String configData = configDataBuilder.toString(); String configData = configDataBuilder.toString();
if (configData.contains("#")) { if (configData.contains(paramsReportDetailVO.getSeparator())) {
configData = configData.substring(0, configData.lastIndexOf("#")); configData = configData.substring(0, configData.lastIndexOf(paramsReportDetailVO.getSeparator()));
} }
record1.put(paramsConfigEO.getId(), configData); record1.put(paramsConfigEO.getId(), configData);
@@ -1368,66 +1409,53 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
} else { } else {
List<ParamsReportConfigDataEO> paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId); List<ParamsReportConfigDataEO> paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId);
String textDatas = paramsReportConfigDataEOS.stream().filter(e -> StringUtils.isNotEmpty(e.getTextData())) StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
.map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator()));
String pullDatas = paramsReportConfigDataEOS.stream().filter(e -> StringUtils.isNotEmpty(e.getPullData())) for (ParamsReportConfigDataEO paramsConfigDataEO : paramsReportConfigDataEOS) {
.map(ParamsReportConfigDataEO::getPullData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); StringBuilder configDataBuilderTemp = new StringBuilder(); // 重新组合配置数据
List<String> fileNameList = new ArrayList<>(); if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
for(ParamsReportConfigDataEO paramsReportConfigDataEO : paramsReportConfigDataEOS) { configDataBuilderTemp.append(paramsConfigDataEO.getPullData()).append("#");
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) { }
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsReportConfigDataEO.getFileConnectId()); if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
configDataBuilderTemp.append(paramsConfigDataEO.getTextData()).append("#");
}
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
if (CollectionUtil.isNotEmpty(ossFileList)) { if (CollectionUtil.isNotEmpty(ossFileList)) {
// 合并导出时 验证文件名是否相同,相同进一步验证文件内容是否同,不同时重命名文件 // 合并导出时 验证文件名是否相同,相同进一步验证文件内容是否同,不同时重命名文件
String fileName = ossFileList.get(0).getFileName(); String fileName = ossFileList.get(0).getFileName();
String newFileName = isRepeat(fileListAll, ossFileList.get(0)); String newFileName = isRepeat(fileListAll, ossFileList.get(0));
if (!"".equals(newFileName) && !"old".equals(newFileName)) { // 文件名称重复 且文件内容不同 if (!"".equals(newFileName) && !"old".equals(newFileName)) { // 文件名称重复 且文件内容不同
// 判断 新文件名是不是当前参数下 配置间的 重复 configDataBuilderTemp.append(newFileName).append("#");
int count = (int) fileList.stream().filter(e->newFileName.equals(e.getFileName())).count(); ossFileList.get(0).setFileName(newFileName);
if (count <= 0) { // 不是 (如果是,不做任何操作) fileList.addAll(ossFileList);
fileNameList.add(newFileName); fileListAll.addAll(ossFileList);
ossFileList.get(0).setFileName(newFileName);
fileList.addAll(ossFileList);
fileListAll.addAll(ossFileList);
}
} else if ("old".equals(newFileName)) { // 文件名称重复 且文件内容相同 } else if ("old".equals(newFileName)) { // 文件名称重复 且文件内容相同
configDataBuilderTemp.append(fileName).append("#");
// 判断这种重复是不是当前参数下 配置间的 fileList.addAll(ossFileList);
int count = (int) fileList.stream().filter(e->fileName.equals(e.getFileName())).count(); } else {
if (count <= 0) { // 不是 (如果是,不做任何操作) configDataBuilderTemp.append(fileName).append("#");
fileNameList.add(fileName);
fileList.addAll(ossFileList);
fileListAll.addAll(ossFileList);
}
}else { // 文件名称不重复
fileNameList.add(fileName);
fileList.addAll(ossFileList); fileList.addAll(ossFileList);
fileListAll.addAll(ossFileList); fileListAll.addAll(ossFileList);
} }
} }
} }
configData = configDataBuilderTemp.toString();
if (configData.contains("#")) {
configData = configData.substring(0, configData.lastIndexOf("#"));
}
configDataBuilder.append(configData).append(paramsReportDetailVO.getSeparator());
} }
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据 String configDataStr = configDataBuilder.toString();
if (StringUtils.isNotEmpty(pullDatas)) { if (configDataStr.contains(paramsReportDetailVO.getSeparator())) {
configDataBuilder.append(pullDatas).append("#"); configDataStr = configDataStr.substring(0, configDataStr.lastIndexOf(paramsReportDetailVO.getSeparator()));
} }
if (StringUtils.isNotEmpty(textDatas)) { record1.put("params_value", configDataStr);
configDataBuilder.append(textDatas).append("#");
}
if (CollectionUtil.isNotEmpty(fileNameList)) {
// fileNameList = fileNameList.stream().distinct().collect(Collectors.toList());
configDataBuilder.append(StringUtils.join(fileNameList, paramsReportDetailVO.getSeparator())).append("#");
}
configData = configDataBuilder.toString();
if (configData.contains("#")) {
configData = configData.substring(0, configData.lastIndexOf("#"));
}
record1.put("params_value", configData);
} }
} }
@@ -1473,6 +1501,18 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
String configData = ""; String configData = "";
List<ParamsReportConfigDataEO> paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId); List<ParamsReportConfigDataEO> paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId);
// 匿名比较器排序
Collections.sort(paramsReportConfigDataEOS, new Comparator<ParamsReportConfigDataEO>() {
@Override
public int compare(ParamsReportConfigDataEO p1, ParamsReportConfigDataEO p2) {
if(p2.getOrderNum() == null || p1.getOrderNum() == null){
return 0;
}
// 倒序
return p2.getOrderNum().compareTo(p1.getOrderNum());
}
});
String textDatas = paramsReportConfigDataEOS.stream().filter(e->StringUtils.isNotEmpty(e.getTextData())) String textDatas = paramsReportConfigDataEOS.stream().filter(e->StringUtils.isNotEmpty(e.getTextData()))
.map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); // 整合文本数据 .map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); // 整合文本数据
@@ -1777,135 +1817,201 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
continue; continue;
} }
ParamsReportConfigDataEO paramsReportConfigDataEO = new ParamsReportConfigDataEO();
// 取值 // 取值
String paramsReportConfigEOId = entry.getKey(); String paramsReportConfigEOId = entry.getKey();
ParamsReportConfigEO paramsReportConfigEO = paramsReportConfigEOService.getById(paramsReportConfigEOId); ParamsReportConfigEO paramsReportConfigEO = paramsReportConfigEOService.getById(paramsReportConfigEOId);
Map<String, Object> paramsReportConfigDataMap = (Map<String, Object>) entry.getValue(); Map<String, Object> paramsReportConfigDataMap = (Map<String, Object>) entry.getValue();
// 无法转ParamsConfigDataVO(遍历会出现该异常 LinkedHashMap cannot be cast to ParamsConfigDataVO // 无法转ParamsConfigDataVO(遍历会出现该异常 LinkedHashMap cannot be cast to ParamsConfigDataVO
List<Map<String, Object>> configDataVOList = (List<Map<String, Object>>) paramsReportConfigDataMap.get("list"); // List<Map<String, Object>> configDataVOList = (List<Map<String, Object>>) paramsReportConfigDataMap.get("list");
Map<String, Object> paramsConfigDataVOMap = (Map<String, Object>) paramsReportConfigDataMap.get("paramsConfigData");
for (Map.Entry<String, Object> paramsConfigDataMap : paramsConfigDataVOMap.entrySet()) {
String configDataId = paramsConfigDataMap.getKey();
List<Map<String, Object>> configDataVOList = (List<Map<String, Object>>) paramsConfigDataMap.getValue();
if (CollectionUtil.isNotEmpty(configDataVOList)) {
Integer orderNum = (Integer) configDataVOList.get(0).get("orderNum");
ParamsReportConfigDataEO paramsReportConfigDataEO = new ParamsReportConfigDataEO();
paramsReportConfigDataEO.setOrderNum(orderNum);
for (Map<String, Object> paramsConfigDataVO : configDataVOList) {
String type = (String) paramsConfigDataVO.get("type");
String dataValue = (String) paramsConfigDataVO.get("dataValue");
// 判断是新增还是修改
ParamsConfigDataEO oldConfigDataEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsReportConfigEOId, paramsCollectManifestId, paramsReportConfigDataEOList,configDataId);
if (ObjectUtil.isNotEmpty(oldConfigDataEO)) {
paramsReportConfigDataEO.setId(oldConfigDataEO.getId());
if (type.equals(ConfigDataTypeEnum.TEXT.getValue())) {
// paramsReportConfigDataEO.setTextData(dataValue);
if (StringUtils.isEmpty(oldConfigDataEO.getTextData()) && StringUtils.isNotEmpty(dataValue)) {
logCnContent.append("\"").append("").append("\"").append("改为").append("\"").append(dataValue).append("\"").append("");
logEnContent.append(" from ").append("\"").append("Null").append("\"").append(" to ").append("\"").append(dataValue).append("\"").append(", ");
changeFlag = true;
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getTextData()) && StringUtils.isEmpty(dataValue)) {
logCnContent.append("\"").append(oldConfigDataEO.getTextData()).append("\"").append("改为").append("\"").append("").append("\"").append("");
logEnContent.append(" from ").append("\"").append(oldConfigDataEO.getTextData()).append("\"").append(" to ").append("\"").append("Null").append("\"").append(", ");
changeFlag = true;
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getTextData()) && StringUtils.isNotEmpty(dataValue) && !oldConfigDataEO.getTextData().equals(dataValue)) {
logCnContent.append("\"").append(oldConfigDataEO.getTextData()).append("\"").append("改为").append("\"").append(dataValue).append("\"").append("");
logEnContent.append(" from ").append("\"").append(oldConfigDataEO.getTextData()).append("\"").append(" to ").append("\"").append(dataValue).append("\"").append(", ");
changeFlag = true;
}
} else if (type.equals(ConfigDataTypeEnum.PULL.getValue())
|| type.equals(ConfigDataTypeEnum.PULL_MORE.getValue())) {
// paramsReportConfigDataEO.setPullData(dataValue);
if (StringUtils.isEmpty(oldConfigDataEO.getPullData()) && StringUtils.isNotEmpty(dataValue)) {
logCnContent.append("\"").append("").append("\"").append("改为").append("\"").append(dataValue).append("\"").append("");
logEnContent.append(" from ").append("\"").append("Null").append("\"").append(" to ").append("\"").append(dataValue).append("\"").append(", ");
changeFlag = true;
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getPullData()) && StringUtils.isEmpty(dataValue)) {
logCnContent.append("\"").append(oldConfigDataEO.getPullData()).append("\"").append("改为").append("\"").append("").append("\"").append("");
logEnContent.append(" from ").append("\"").append(oldConfigDataEO.getPullData()).append("\"").append(" to ").append("\"").append("Null").append("\"").append(", ");
changeFlag = true;
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getPullData()) && StringUtils.isNotEmpty(dataValue) && !oldConfigDataEO.getPullData().equals(dataValue)) {
logCnContent.append("\"").append(oldConfigDataEO.getPullData()).append("\"").append("改为").append("\"").append(dataValue).append("\"").append("");
logEnContent.append(" from ").append("\"").append(oldConfigDataEO.getPullData()).append("\"").append(" to ").append("\"").append(dataValue).append("\"").append(", ");
changeFlag = true;
}
} else if (type.equals(ConfigDataTypeEnum.FILE.getValue())) {
String newFileNames = "";
if (StringUtils.isNotEmpty(dataValue) && dataValue.contains(",")) { // 新加多个文件. 目前没用到这段代码
// 处理文件connectId
String[] fileIdList = dataValue.split(",");
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(fileIdList[0]);
if(CollectionUtil.isEmpty(ossFiles)) { // 新加了一个文件
String connectId = UUID.randomUUID().toString().replace("-", "");
List<OSSFile> updateFileList = new ArrayList<>();
for (int i = 0; i < fileIdList.length; i++) {
OSSFile ossFile = new OSSFile();
ossFile.setId(fileIdList[i]);
ossFile.setConnectId(connectId);
updateFileList.add(ossFile);
}
ossFileService.updateBatchById(updateFileList);
dataValue = connectId;
newFileNames = ossFileService.getFileInfosByConnectId(connectId).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
}
} else if (StringUtils.isNotEmpty(dataValue) && !dataValue.contains(",")) {
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(dataValue);
if(CollectionUtil.isEmpty(ossFiles)){ // 新加了一个文件
String connectId = UUID.randomUUID().toString().replace("-", "");
//修改文件表关联信息connect_id
List<OSSFile> oSSFileList = new ArrayList<>();
for (String fileId : dataValue.split(",")) {
OSSFile ossFile = new OSSFile();
ossFile.setId(fileId);
ossFile.setConnectId(connectId);
oSSFileList.add(ossFile);
}
ossFileService.updateFileInfo(oSSFileList);
dataValue = connectId;
newFileNames = ossFileService.getFileInfosByConnectId(connectId).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
}
}
// paramsReportConfigDataEO.setFileConnectId(dataValue);
if (StringUtils.isEmpty(oldConfigDataEO.getFileConnectId()) && StringUtils.isNotEmpty(dataValue)) {
logCnContent.append("\"").append("").append("\"").append("改为").append("\"").append(newFileNames).append("\"").append("");
logEnContent.append(" from ").append("\"").append("Null").append("\"").append(" to ").append("\"").append(newFileNames).append("\"").append(", ");
changeFlag = true;
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getFileConnectId()) && StringUtils.isEmpty(dataValue)) {
String oldFileNames = ossFileService.getFileInfosByConnectId(oldConfigDataEO.getFileConnectId()).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
logCnContent.append("\"").append(oldFileNames).append("\"").append("改为").append("\"").append("").append("\"").append("");
logEnContent.append(" from ").append("\"").append(oldFileNames).append("\"").append(" to ").append("\"").append("Null").append("\"").append(", ");
changeFlag = true;
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getFileConnectId()) && StringUtils.isNotEmpty(dataValue)) {
String oldFileNames = ossFileService.getFileInfosByConnectId(oldConfigDataEO.getFileConnectId()).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
if (!oldConfigDataEO.getFileConnectId().equals(dataValue)) {
logCnContent.append("\"").append(oldFileNames).append("\"").append("改为").append("\"").append(newFileNames).append("\"").append("");
logEnContent.append(" from ").append("\"").append(oldFileNames).append("\"").append(" to ").append("\"").append(newFileNames).append("\"").append(", ");
changeFlag = true;
}
}
}
}
if (type.equals(ConfigDataTypeEnum.TEXT.getValue())) {
paramsReportConfigDataEO.setTextData(dataValue);
} else if (type.equals(ConfigDataTypeEnum.PULL.getValue())
|| type.equals(ConfigDataTypeEnum.PULL_MORE.getValue())) {
paramsReportConfigDataEO.setPullData(dataValue);
} else if (type.equals(ConfigDataTypeEnum.FILE.getValue())) {
String newFileNames = "";
if (StringUtils.isNotEmpty(dataValue) && dataValue.contains(",")) { // 新加多个文件. 目前没用到这段代码
// 处理文件connectId
String[] fileIdList = dataValue.split(",");
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(fileIdList[0]);
if(CollectionUtil.isEmpty(ossFiles)) { // 新加了一个文件
String connectId = UUID.randomUUID().toString().replace("-", "");
List<OSSFile> updateFileList = new ArrayList<>();
for (int i = 0; i < fileIdList.length; i++) {
OSSFile ossFile = new OSSFile();
ossFile.setId(fileIdList[i]);
ossFile.setConnectId(connectId);
updateFileList.add(ossFile);
}
ossFileService.updateBatchById(updateFileList);
dataValue = connectId;
newFileNames = ossFileService.getFileInfosByConnectId(connectId).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
}
} else if (StringUtils.isNotEmpty(dataValue) && !dataValue.contains(",")) {
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(dataValue);
if(CollectionUtil.isEmpty(ossFiles)){ // 新加了一个文件
String connectId = UUID.randomUUID().toString().replace("-", "");
//修改文件表关联信息connect_id
List<OSSFile> oSSFileList = new ArrayList<>();
for (String fileId : dataValue.split(",")) {
OSSFile ossFile = new OSSFile();
ossFile.setId(fileId);
ossFile.setConnectId(connectId);
oSSFileList.add(ossFile);
}
ossFileService.updateFileInfo(oSSFileList);
dataValue = connectId;
newFileNames = ossFileService.getFileInfosByConnectId(connectId).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
}
}
paramsReportConfigDataEO.setFileConnectId(dataValue);
}
}
QueryWrapper<ParamsReportConfigDataEO> removeConfigDataWrap = new QueryWrapper<>();
removeConfigDataWrap.lambda().eq(ParamsReportConfigDataEO::getParamsConfigId,paramsReportConfigEOId);
removeConfigDataWrap.lambda().eq(ParamsReportConfigDataEO::getParamsCollectManifestId,paramsCollectManifestId);
this.paramsReportConfigDataEOService.remove(removeConfigDataWrap);
paramsReportConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
paramsReportConfigDataEO.setParamsConfigId(paramsReportConfigEOId);
newConfigDataEOList.add(paramsReportConfigDataEO);
}
// 判断是新增还是修改
ParamsConfigDataEO oldConfigDataEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsReportConfigEOId, paramsCollectManifestId, paramsReportConfigDataEOList);
if (ObjectUtil.isNotEmpty(oldConfigDataEO)) {
paramsReportConfigDataEO.setId(oldConfigDataEO.getId());
} }
//******************配置2被添加了**********************
logCnContent.append(paramsReportConfigEO.getConfigName()).append(""); logCnContent.append(paramsReportConfigEO.getConfigName()).append("");
logEnContent.append(paramsReportConfigEO.getConfigName()); logEnContent.append(paramsReportConfigEO.getConfigName());
configNameCn = paramsReportConfigEO.getConfigName()+"";
configNameEn = paramsReportConfigEO.getConfigName();
paramsReportConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
paramsReportConfigDataEO.setParamsConfigId(paramsReportConfigEOId);
if (CollectionUtil.isNotEmpty(configDataVOList)) {
for (Map<String, Object> paramsConfigDataVO : configDataVOList) {
String type = (String) paramsConfigDataVO.get("type");
String dataValue = (String) paramsConfigDataVO.get("dataValue");
if (type.equals(ConfigDataTypeEnum.TEXT.getValue())) {
paramsReportConfigDataEO.setTextData(dataValue);
if (StringUtils.isEmpty(oldConfigDataEO.getTextData()) && StringUtils.isNotEmpty(dataValue)) {
logCnContent.append("\"").append("").append("\"").append("改为").append("\"").append(dataValue).append("\"").append("");
logEnContent.append(" from ").append("\"").append("Null").append("\"").append(" to ").append("\"").append(dataValue).append("\"").append(", ");
changeFlag = true;
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getTextData()) && StringUtils.isEmpty(dataValue)) {
logCnContent.append("\"").append(oldConfigDataEO.getTextData()).append("\"").append("改为").append("\"").append("").append("\"").append("");
logEnContent.append(" from ").append("\"").append(oldConfigDataEO.getTextData()).append("\"").append(" to ").append("\"").append("Null").append("\"").append(", ");
changeFlag = true;
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getTextData()) && StringUtils.isNotEmpty(dataValue) && !oldConfigDataEO.getTextData().equals(dataValue)) {
logCnContent.append("\"").append(oldConfigDataEO.getTextData()).append("\"").append("改为").append("\"").append(dataValue).append("\"").append("");
logEnContent.append(" from ").append("\"").append(oldConfigDataEO.getTextData()).append("\"").append(" to ").append("\"").append(dataValue).append("\"").append(", ");
changeFlag = true;
}
} else if (type.equals(ConfigDataTypeEnum.PULL.getValue())
|| type.equals(ConfigDataTypeEnum.PULL_MORE.getValue())) {
paramsReportConfigDataEO.setPullData(dataValue);
if (StringUtils.isEmpty(oldConfigDataEO.getPullData()) && StringUtils.isNotEmpty(dataValue)) {
logCnContent.append("\"").append("").append("\"").append("改为").append("\"").append(dataValue).append("\"").append("");
logEnContent.append(" from ").append("\"").append("Null").append("\"").append(" to ").append("\"").append(dataValue).append("\"").append(", ");
changeFlag = true;
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getPullData()) && StringUtils.isEmpty(dataValue)) {
logCnContent.append("\"").append(oldConfigDataEO.getPullData()).append("\"").append("改为").append("\"").append("").append("\"").append("");
logEnContent.append(" from ").append("\"").append(oldConfigDataEO.getPullData()).append("\"").append(" to ").append("\"").append("Null").append("\"").append(", ");
changeFlag = true;
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getPullData()) && StringUtils.isNotEmpty(dataValue) && !oldConfigDataEO.getPullData().equals(dataValue)) {
logCnContent.append("\"").append(oldConfigDataEO.getPullData()).append("\"").append("改为").append("\"").append(dataValue).append("\"").append("");
logEnContent.append(" from ").append("\"").append(oldConfigDataEO.getPullData()).append("\"").append(" to ").append("\"").append(dataValue).append("\"").append(", ");
changeFlag = true;
}
} else if (type.equals(ConfigDataTypeEnum.FILE.getValue())) {
String newFileNames = "";
if (StringUtils.isNotEmpty(dataValue) && dataValue.contains(",")) { // 新加多个文件. 目前没用到这段代码
// 处理文件connectId
String[] fileIdList = dataValue.split(",");
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(fileIdList[0]);
if(CollectionUtil.isEmpty(ossFiles)) { // 新加了一个文件
String connectId = UUID.randomUUID().toString().replace("-", "");
List<OSSFile> updateFileList = new ArrayList<>();
for (int i = 0; i < fileIdList.length; i++) {
OSSFile ossFile = new OSSFile();
ossFile.setId(fileIdList[i]);
ossFile.setConnectId(connectId);
updateFileList.add(ossFile);
}
ossFileService.updateBatchById(updateFileList);
dataValue = connectId;
newFileNames = ossFileService.getFileInfosByConnectId(connectId).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
}
} else if (StringUtils.isNotEmpty(dataValue) && !dataValue.contains(",")) {
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(dataValue);
if(CollectionUtil.isEmpty(ossFiles)){ // 新加了一个文件
String connectId = UUID.randomUUID().toString().replace("-", "");
//修改文件表关联信息connect_id
List<OSSFile> oSSFileList = new ArrayList<>();
for (String fileId : dataValue.split(",")) {
OSSFile ossFile = new OSSFile();
ossFile.setId(fileId);
ossFile.setConnectId(connectId);
oSSFileList.add(ossFile);
}
ossFileService.updateFileInfo(oSSFileList);
dataValue = connectId;
newFileNames = ossFileService.getFileInfosByConnectId(connectId).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
}
}
paramsReportConfigDataEO.setFileConnectId(dataValue);
if (StringUtils.isEmpty(oldConfigDataEO.getFileConnectId()) && StringUtils.isNotEmpty(dataValue)) {
logCnContent.append("\"").append("").append("\"").append("改为").append("\"").append(newFileNames).append("\"").append("");
logEnContent.append(" from ").append("\"").append("Null").append("\"").append(" to ").append("\"").append(newFileNames).append("\"").append(", ");
changeFlag = true;
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getFileConnectId()) && StringUtils.isEmpty(dataValue)) {
String oldFileNames = ossFileService.getFileInfosByConnectId(oldConfigDataEO.getFileConnectId()).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
logCnContent.append("\"").append(oldFileNames).append("\"").append("改为").append("\"").append("").append("\"").append("");
logEnContent.append(" from ").append("\"").append(oldFileNames).append("\"").append(" to ").append("\"").append("Null").append("\"").append(", ");
changeFlag = true;
} else if (StringUtils.isNotEmpty(oldConfigDataEO.getFileConnectId()) && StringUtils.isNotEmpty(dataValue)) {
String oldFileNames = ossFileService.getFileInfosByConnectId(oldConfigDataEO.getFileConnectId()).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
if (!oldConfigDataEO.getFileConnectId().equals(dataValue)) {
logCnContent.append("\"").append(oldFileNames).append("\"").append("改为").append("\"").append(newFileNames).append("\"").append("");
logEnContent.append(" from ").append("\"").append(oldFileNames).append("\"").append(" to ").append("\"").append(newFileNames).append("\"").append(", ");
changeFlag = true;
}
}
}
}
}
newConfigDataEOList.add(paramsReportConfigDataEO);
//******************这里是当前配置的循环结束了****************** //******************这里是当前配置的循环结束了******************
//判断结尾是不是该配置的名字--如果是(说明该配置没有被改变)需要从logCnContent中删除该配置名字 //判断结尾是不是该配置的名字--如果是(说明该配置没有被改变)需要从logCnContent中删除该配置名字
@@ -1966,14 +2072,13 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
if (CollectionUtil.isNotEmpty(insertLogEOList)) { if (CollectionUtil.isNotEmpty(insertLogEOList)) {
paramsReportDetailLogEOService.saveBatch(insertLogEOList); paramsReportDetailLogEOService.saveBatch(insertLogEOList);
} }
return paramsReportConfigDataEOService.saveOrUpdateBatch(newConfigDataEOList); return paramsReportConfigDataEOService.saveBatch(newConfigDataEOList);
} }
private ParamsReportConfigDataEO getConfigDataEOByConfigIdAndCollectManifestId(String configId, String collectManifestId, List<ParamsReportConfigDataEO> paramsReportConfigDataEOList,String configDataId) {
private ParamsReportConfigDataEO getConfigDataEOByConfigIdAndCollectManifestId(String configId, String collectManifestId, List<ParamsReportConfigDataEO> paramsReportConfigDataEOList) {
List<ParamsReportConfigDataEO> configDataEOList = paramsReportConfigDataEOList.stream() List<ParamsReportConfigDataEO> configDataEOList = paramsReportConfigDataEOList.stream()
.filter(e-> configId.equals(e.getParamsConfigId()) && collectManifestId.equals(e.getParamsCollectManifestId())) .filter(e-> configId.equals(e.getParamsConfigId()) && collectManifestId.equals(e.getParamsCollectManifestId()) && StringUtils.equals(configDataId,e.getId()))
.collect(Collectors.toList()); .collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(configDataEOList)) { if (CollectionUtil.isNotEmpty(configDataEOList)) {
return configDataEOList.get(0); return configDataEOList.get(0);
@@ -29,6 +29,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -55,6 +56,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
@Autowired @Autowired
private ICertCategoryParamsInfoEOService certCategoryParamsInfoEOService; private ICertCategoryParamsInfoEOService certCategoryParamsInfoEOService;
/** /**
* 分页列表查询 * 分页列表查询
* *
@@ -338,4 +340,68 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
return paramsInfoEOService.importParamsInfo(file, cut, paramsTemplateId); return paramsInfoEOService.importParamsInfo(file, cut, paramsTemplateId);
} }
/**
* 自动添加测试数据接口
* @param json
* @return
*/
@PostMapping(value = "/test/autoAddTestData")
public Result<?> autoAddTestData(@RequestBody JSONObject json) {
//TODO 测试接口
String certCategory = json.getString("certCategory");
String certCategoryType = json.getString("certCategoryType"); // gg、3c、yy、hb
String controlType = json.getString("controlType");
String controlVerify = json.getString("controlVerify");
String cut = json.getString("cut");
String dutyTerritory = json.getString("dutyTerritory");
String isMust = json.getString("isMust");
String nioNumber = json.getString("nioNumber");
String paramsBatch = json.getString("paramsBatch");
String paramsName = json.getString("paramsName");
String paramsTemplateId = json.getString("paramsTemplateId");
if (StringUtils.isEmpty(certCategory)) {
return Result.error("认证类别不能为空!");
}
boolean isSuccess = false;
Integer startIndex = json.getInteger("startIndex");
Integer endIndex = json.getInteger("endIndex");
for (Integer i = 0; i < endIndex; i++) {
ParamsInfoEO paramsInfoEO = new ParamsInfoEO();
paramsInfoEO.setNioNumber(nioNumber + "-" + String.format("%04d",startIndex + i));
paramsInfoEO.setParamsName(paramsName + "-" + String.format("%04d",startIndex + i) + "名称");
paramsInfoEO.setCertCategory(certCategory);
paramsInfoEO.setControlType(controlType);
paramsInfoEO.setControlVerify(controlVerify);
paramsInfoEO.setCut(cut);
paramsInfoEO.setDutyTerritory(dutyTerritory);
paramsInfoEO.setIsMust(isMust);
paramsInfoEO.setParamsBatch(paramsBatch);
paramsInfoEO.setParamsTemplateId(paramsTemplateId);
List<CertCategoryParamsInfoEO> certCategoryParamsInfoEOList = new ArrayList<>();
CertCategoryParamsInfoEO certCategoryParamsInfoEO = new CertCategoryParamsInfoEO();
certCategoryParamsInfoEO.setCertCategory(certCategory);
certCategoryParamsInfoEO.setParamsName(paramsName + "-" + String.format("%04d",startIndex + i) + "-" + certCategoryType + "-" + "name");
certCategoryParamsInfoEO.setParamsNumber(nioNumber + "-" + String.format("%04d",startIndex + i) + "-" + certCategoryType);
certCategoryParamsInfoEOList.add(certCategoryParamsInfoEO);
paramsInfoEO.setCertCategoryParamsInfoEOList(certCategoryParamsInfoEOList);
isSuccess = paramsInfoEOService.add(paramsInfoEO);
if(!isSuccess){
break;
}
}
if (isSuccess) {
return Result.OK("添加成功!");
} else {
return Result.error("添加失败!");
}
}
} }
@@ -106,7 +106,7 @@ public class ParamsInfoEO implements Serializable {
private String certCategory; private String certCategory;
/**控件类型*/ /**控件类型*/
@Excel(name = "*控件类型", width = 15, replace = {"文本_1","下拉单选_2","下拉多选_3","附件_4","文本+下拉单选_5","文本+下拉多选_6","文本+附件_7","下拉单选+附件_8","下拉多选+附件_9","文本+下拉单选+附件_10","标题_11"}) @Excel(name = "*控件类型", width = 15, replace = {"文本_1","下拉单选_2","下拉多选_3","附件_4","下拉单选+文本_5","下拉多选+文本_6","文本+附件_7","下拉单选+附件_8","下拉多选+附件_9","下拉单选+文本+附件_10","标题_11"})
@ApiModelProperty(value = "控件类型") @ApiModelProperty(value = "控件类型")
private String controlType; private String controlType;
@@ -15,12 +15,12 @@ public enum ControlTypeEnum {
PULL_SINGLE("下拉单选","Pull single","2"), PULL_SINGLE("下拉单选","Pull single","2"),
PULL_MORE("下拉多选","Pull more","3"), PULL_MORE("下拉多选","Pull more","3"),
FILE("附件","File","4"), FILE("附件","File","4"),
TEXT_PULL_SINGLE("文本+下拉单选","Text+Pull single","5"), TEXT_PULL_SINGLE("下拉单选+文本","Pull single+Text","5"),
TEXT_PULL_MORE("文本+下拉多选","Text+Pull more","6"), TEXT_PULL_MORE("下拉多选+文本","Pull more+Text","6"),
TEXT_FILE("文本+附件","Text+File","7"), TEXT_FILE("文本+附件","Text+File","7"),
PULL_SINGLE_FILE("下拉单选+附件","Pull single+File","8"), PULL_SINGLE_FILE("下拉单选+附件","Pull single+File","8"),
PULL_MORE_FILE("下拉多选+附件","Pull more+File","9"), PULL_MORE_FILE("下拉多选+附件","Pull more+File","9"),
TEXT_PULL_SINGLE_FILE("文本+下拉单选+附件","Text+Pull single+File","10"), TEXT_PULL_SINGLE_FILE("下拉单选+文本+附件","Pull single+Text+File","10"),
Title("标题","Title","11"); Title("标题","Title","11");
String name; String name;
+11 -4
View File
@@ -1088,12 +1088,12 @@ module.exports = {
NDropdownradio: 'Pull single', NDropdownradio: 'Pull single',
NDropdownmultipleselection: 'Pull more', NDropdownmultipleselection: 'Pull more',
Nenclosure: 'File', Nenclosure: 'File',
Atext: 'Text+Pull single', Atext: 'Pull single+Text',
Btext: 'Text+Pull more', Btext: 'Pull more+Text',
Ctext: 'Text+File', Ctext: 'Text+File',
Dtext: 'Pull single+File', Dtext: 'Pull single+File',
Etext: 'Pull more+File', Etext: 'Pull more+File',
Ftext: 'Text+Pull single+File', Ftext: 'Pull single+Text+File',
Gtext: 'Title', Gtext: 'Title',
Nnothing: 'Null', Nnothing: 'Null',
Nchinese: 'Chinese', Nchinese: 'Chinese',
@@ -1663,5 +1663,12 @@ module.exports = {
project:'Project', project:'Project',
Categoryofdeliverables:'Category of deliverables', Categoryofdeliverables:'Category of deliverables',
Taskconfirmationresult:'Task confirmation result', Taskconfirmationresult:'Task confirmation result',
Compliancetaskhandling:'Compliance task handling' Compliancetaskhandling:'Compliance task handling',
theDataYouSelectedContainsSkip:'The data you selected contains data with a blank deliverable type;Please confirm whether to skip',
designComplianceProcessFor:'Design compliance process for',
validationComplianceProcessFor:'Validation compliance process for',
thePersonResponsibleForVerifyingEmpty:'The person responsible for verifying the compliance process cannot be empty',
theDeadlineComplianceProcessCannotEmpty:'The deadline for the validation compliance process cannot be empty',
theDeadlineForTheDesignCannotBeEmpty:'The deadline for the design compliance process cannot be empty',
thePersonResponsibleForDesignCannotBeBlank:'The person responsible for designing the compliance process cannot be empty',
} }
+10 -5
View File
@@ -1100,12 +1100,12 @@ module.exports = {
NDropdownradio: '下拉单选', NDropdownradio: '下拉单选',
NDropdownmultipleselection: '下拉多选', NDropdownmultipleselection: '下拉多选',
Nenclosure: '附件', Nenclosure: '附件',
Atext: '文本+下拉单选', Atext: '下拉单选+文本',
Btext: '文本+下拉多选', Btext: '下拉多选+文本',
Ctext: '文本+附件', Ctext: '文本+附件',
Dtext: '下拉单选+附件', Dtext: '下拉单选+附件',
Etext: '下拉多选+附件', Etext: '下拉多选+附件',
Ftext: '文本+下拉单选+附件', Ftext: '下拉单选+文本+附件',
Gtext: '标题', Gtext: '标题',
Nnothing: '无', Nnothing: '无',
Nchinese: '中文', Nchinese: '中文',
@@ -1762,7 +1762,12 @@ module.exports = {
taskname:'任务名称', taskname:'任务名称',
updatereleasetime:'升级发布时间', updatereleasetime:'升级发布时间',
upgradeplanexpirationtime:'升级计划截止时间', upgradeplanexpirationtime:'升级计划截止时间',
theDataYouSelectedContainsSkip:'您所勾选的数据中包含交付物类型为空的数据请确认是否跳过',
designComplianceProcessFor:'的设计符合性流程',
validationComplianceProcessFor:'的验证符合性流程',
thePersonResponsibleForVerifyingEmpty:'验证符合性流程的责任人不能为空',
theDeadlineComplianceProcessCannotEmpty:'验证符合性流程的截止时间不能为空',
theDeadlineForTheDesignCannotBeEmpty:'设计符合性流程的截止时间不能为空',
thePersonResponsibleForDesignCannotBeBlank:'设计符合性流程的责任人不能为空',
} }
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -75,7 +75,10 @@
</span> </span>
<span slot="detailClick" slot-scope="text,record"> <span slot="detailClick" slot-scope="text,record">
<collection-type :detailDate='text'/> <collection-type :detailDate='text' :recordList = 'record' :columName='content'
:currentPersonRole="currentPersonRole"
@consolidateData="consolidateData"
@collectionForm='collectionForm'/>
</span> </span>
</a-table> </a-table>
</div> </div>
@@ -725,6 +728,13 @@
this.pageNohistory = 1 this.pageNohistory = 1
this.visible = false this.visible = false
}, },
collectionForm(){
this.getTableList()
},
consolidateData(){
this.dataSource = [...this.dataSource]
console.log(this.dataSource)
},
getAndUserId(result) { getAndUserId(result) {
let query = { let query = {
paramsManifestId: this.$route.query.id, paramsManifestId: this.$route.query.id,
@@ -785,7 +795,7 @@
align: 'left', align: 'left',
ellipsis: true, ellipsis: true,
sorter: res.sort, sorter: res.sort,
width: 500 width: 600
}) })
num++ num++
this.content.push(res) this.content.push(res)
@@ -793,6 +803,7 @@
customRender: 'detailClick', customRender: 'detailClick',
title: 'titleName' + num title: 'titleName' + num
} }
console.log( this.content," this.content this.content this.content this.content this.content")
// 非配置列 // 非配置列
} else { } else {
this.columns.push({ this.columns.push({
@@ -857,6 +868,7 @@
}) })
}, },
getTableListReset() { getTableListReset() {
this.formInline = {} this.formInline = {}
this.queryParamQuery = {} this.queryParamQuery = {}
let params = { let params = {
@@ -888,13 +900,24 @@
if (this.currentPersonRole !== 'dre') { if (this.currentPersonRole !== 'dre') {
res.result.records.forEach((Obj) => { res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => { Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => { for (const key in Obj[item].paramsConfigData){
itemLi.isLock = 1 Obj[item].paramsConfigData[key].forEach((itemLi) =>
if (itemLi.type === 'pull_more') { {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
} itemLi.isLock = 1
}) if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
}
// Obj[item].list.forEach((itemLi) => {
// itemLi.isLock = 1
// if (itemLi.type === 'pull_more') {
// itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
// }
// })
} }
}) })
tt.push(Obj) tt.push(Obj)
@@ -903,11 +926,18 @@
res.result.records.forEach((Obj) => { res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => { Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => { for (const key in Obj[item].paramsConfigData){
if (itemLi.type === 'pull_more') { Obj[item].paramsConfigData[key].forEach((itemLi) => {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',') if (itemLi.type === 'pull_more') {
} itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}) }
})
}
// Obj[item].list.forEach((itemLi) => {
// if (itemLi.type === 'pull_more') {
// itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
// }
// })
} }
}) })
tt.push(Obj) tt.push(Obj)
@@ -987,34 +1017,56 @@
// }) // })
let tt = [] let tt = []
if (this.currentPersonRole !== 'dre') { if (this.currentPersonRole !== 'dre') {
console.log(res.result.records, 'res.result.records') console.log(res.result.records, 'res.result.records')
res.result.records.forEach((Obj) => { res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => { Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => { for (const key in Obj[item].paramsConfigData){
// console.log(item) Obj[item].paramsConfigData[key].forEach((itemLi) => {
if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){ console.log(item)
itemLi.isLock = 0 if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){
}else{ itemLi.isLock = 0
itemLi.isLock = 1 }else{
} itemLi.isLock = 1
if (itemLi.type === 'pull_more') { }
itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',') if (itemLi.type === 'pull_more') {
} itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
}) }
})
}
// Obj[item].list.forEach((itemLi) => {
// console.log(item)
// if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){
// itemLi.isLock = 0
// }else{
// itemLi.isLock = 1
// }
// if (itemLi.type === 'pull_more') {
// itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
// }
// })
} }
}) })
tt.push(Obj) tt.push(Obj)
}) })
} else { } else {
res.result.records.forEach((Obj) => { res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => { Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => { for (const key in Obj[item].paramsConfigData){
if (itemLi.type === 'pull_more') { Obj[item].paramsConfigData[key].forEach((itemLi) => {
itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',') if (itemLi.type === 'pull_more') {
} itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
}) }
})
}
// Obj[item].list.forEach((itemLi) => {
// if (itemLi.type === 'pull_more') {
// itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
// }
// })
} }
}) })
tt.push(Obj) tt.push(Obj)
@@ -58,7 +58,7 @@
<!-- </span>--> <!-- </span>-->
<!-- </span>--> <!-- </span>-->
<span slot="detailClick" slot-scope="text,record"> <span slot="detailClick" slot-scope="text,record">
<collection-type :detailDate='text'/> <collection-type @consolidateData="consolidateData" :detailDate='text'/>
</span> </span>
</a-table> </a-table>
</div> </div>
@@ -301,6 +301,7 @@
detailDateList: [], detailDateList: [],
selectedRowKeys: [], selectedRowKeys: [],
selectedRowrowValue: [], selectedRowrowValue: [],
description:'',
dataSource: [], dataSource: [],
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
@@ -683,13 +684,24 @@
if (this.currentPersonRole !== 'dre') { if (this.currentPersonRole !== 'dre') {
res.result.records.forEach((Obj) => { res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => { Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => { for (const key in Obj[item].paramsConfigData){
itemLi.isLock = 1 Obj[item].paramsConfigData[key].forEach((itemLi) =>
if (itemLi.type === 'pull_more') { {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
} itemLi.isLock = 1
}) if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
}
// Obj[item].list.forEach((itemLi) => {
// itemLi.isLock = 1
// if (itemLi.type === 'pull_more') {
// itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
// }
// })
} }
}) })
tt.push(Obj) tt.push(Obj)
@@ -698,11 +710,18 @@
res.result.records.forEach((Obj) => { res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => { Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => { for (const key in Obj[item].paramsConfigData){
if (itemLi.type === 'pull_more') { Obj[item].paramsConfigData[key].forEach((itemLi) => {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',') if (itemLi.type === 'pull_more') {
} itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}) }
})
}
// Obj[item].list.forEach((itemLi) => {
// if (itemLi.type === 'pull_more') {
// itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
// }
// })
} }
}) })
tt.push(Obj) tt.push(Obj)
@@ -723,6 +742,9 @@
cancleoperationFailed() { cancleoperationFailed() {
this.selectedRowKeys = [] this.selectedRowKeys = []
}, },
consolidateData(){
this.dataSource = [...this.dataSource]
},
getTableList(currentPersonRole) { getTableList(currentPersonRole) {
console.log(this.url.tableList) console.log(this.url.tableList)
let paramsManifestid let paramsManifestid
@@ -766,28 +788,56 @@
// }) // })
let tt = [] let tt = []
if (this.currentPersonRole !== 'dre') { if (this.currentPersonRole !== 'dre') {
console.log(res.result.records, 'res.result.records')
res.result.records.forEach((Obj) => { res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => { Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => { for (const key in Obj[item].paramsConfigData){
itemLi.isLock = 1 Obj[item].paramsConfigData[key].forEach((itemLi) => {
if (itemLi.type === 'pull_more') { console.log(item)
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',') if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){
} itemLi.isLock = 0
}) }else{
itemLi.isLock = 1
}
if (itemLi.type === 'pull_more') {
itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
}
})
}
// Obj[item].list.forEach((itemLi) => {
// console.log(item)
// if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){
// itemLi.isLock = 0
// }else{
// itemLi.isLock = 1
// }
// if (itemLi.type === 'pull_more') {
// itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
// }
// })
} }
}) })
tt.push(Obj) tt.push(Obj)
}) })
} else { } else {
res.result.records.forEach((Obj) => { res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => { Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => { for (const key in Obj[item].paramsConfigData){
if (itemLi.type === 'pull_more') { Obj[item].paramsConfigData[key].forEach((itemLi) => {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',') if (itemLi.type === 'pull_more') {
} itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
}) }
})
}
// Obj[item].list.forEach((itemLi) => {
// if (itemLi.type === 'pull_more') {
// itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
// }
// })
} }
}) })
tt.push(Obj) tt.push(Obj)
@@ -73,12 +73,20 @@ import { mapGetters } from 'vuex'
this.containerId = 'container-ty-' + new Date().getTime() this.containerId = 'container-ty-' + new Date().getTime()
}, },
mounted() { mounted() {
this.detailDate.list.forEach((item) => { for (const key in this.detailDate.paramsConfigData){
if (item.type === 'file') { this.detailDate.paramsConfigData[key].forEach((item) => {
this.template.templateId = item.templateId if (item.type === 'file') {
this.template.templateName = item.templateName this.template.templateId = item.templateId
} this.template.templateName = item.templateName
}) }
})
}
// this.detailDate.list.forEach((item) => {
// if (item.type === 'file') {
// this.template.templateId = item.templateId
// this.template.templateName = item.templateName
// }
// })
let long = localStorage.getItem('language') let long = localStorage.getItem('language')
this.cut = '' this.cut = ''
if (long && long == 'zh-cn') { if (long && long == 'zh-cn') {
@@ -78,7 +78,8 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24" v-if='combineFlag'> <!-- v-if='combineFlag'-->
<a-row :gutter="24">
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -316,34 +316,69 @@
data.forEach(res => { data.forEach(res => {
selectedRowKeysValue.push(res) selectedRowKeysValue.push(res)
}) })
console.log(selectedRowKeysValue) // console.log(selectedRowKeysValue)
for (let i = 0; i < selectedRowKeysValue.length; i++) { // for (let i = 0; i < selectedRowKeysValue.length; i++) {
let postDateobj = {} // let postDateobj = {}
let itemIn = Object.keys(selectedRowKeysValue[i]) // let itemIn = Object.keys(selectedRowKeysValue[i])
for (let j = 0; j < itemIn.length; j++) { // for (let j = 0; j < itemIn.length; j++) {
if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) { // if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) {
if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) { // if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]] // postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) { // for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue instanceof Array) { // if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue instanceof Array) {
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',') // selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
} // }
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) { // if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString() // selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
// }
// }
// }
// }
// }
// postDateobj.id = selectedRowKeysValue[i].id
// postDateobj.remarks = selectedRowKeysValue[i].remarks
// postDate.push(postDateobj)
// }
// let configDataList = { configDataList: postDate }
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
let configDataList = []
for (let i = 0; i < selectedRowKeysValue.length; i++) {
configDataList.push({
id: selectedRowKeysValue[i].id
})
if (selectedRowKeysValue[i].configIds && selectedRowKeysValue[i].configIds.length > 0) {
for (let j = 0; j < selectedRowKeysValue[i].configIds.length; j++) {
let keyIndex = Object.keys(selectedRowKeysValue[i])
for (let k = 0; k < keyIndex.length; k++) {
if (keyIndex[k] == selectedRowKeysValue[i].configIds[j]) {
let keyName = keyIndex[k]
configDataList[i][keyName] = selectedRowKeysValue[i][keyName]
} }
} }
} }
} }
} }
postDateobj.id = selectedRowKeysValue[i].id // return
postDateobj.remarks = selectedRowKeysValue[i].remarks if (configDataList && configDataList.length > 0) {
postDate.push(postDateobj) configDataList.forEach(res => {
} Object.keys(res).forEach(val => {
let configDataList = { configDataList: postDate } if (res[val] && res[val].paramsConfigData) {
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) { let paramsConfigData = res[val].paramsConfigData
Object.keys(paramsConfigData).forEach((ol, index) => {
paramsConfigData[ol][0].orderNum = index
paramsConfigData[ol].forEach(item => {
if (item.type == 'pull_more') {
item.dataValue = item.dataValue.join(',')
}
})
})
}
})
})
}
this.textLoading = true this.textLoading = true
let query = { let query = {
...configDataList, configDataList: configDataList,
paramsManifestId: this.$route.query.id paramsManifestId: this.$route.query.id
} }
postAction('/report/detail/save', query).then((res) => { postAction('/report/detail/save', query).then((res) => {
@@ -56,45 +56,56 @@
<!-- </div>--> <!-- </div>-->
<!-- </a-col>--> <!-- </a-col>-->
<template v-if="toggleSearchStatus"> <template v-if="toggleSearchStatus">
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text" :title="$t('dre')"> <div class="title-text" :title="$t('NareaOfResponsibility')">
<span>{{$t('dre')}}</span> <span>{{$t('NareaOfResponsibility')}}</span>
</div>
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</div> </div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('dre')" </a-col>
v-model="formInline.dre"></a-input> <a-col :md="6" :sm="8">
</div> <div class="box-title-text">
</a-col> <div class="title-text" :title="$t('dre')">
<a-col :md="6" :sm="8"> <span>{{$t('dre')}}</span>
<div class="box-title-text"> </div>
<div class="title-text" :title="$t('sdt')"> <a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('dre')"
<span>{{$t('sdt')}}</span> v-model="formInline.dre"></a-input>
</div> </div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('sdt')" </a-col>
v-model="formInline.sdt"></a-input> <a-col :md="6" :sm="8">
</div> <div class="box-title-text">
</a-col> <div class="title-text" :title="$t('sdt')">
<span>{{$t('sdt')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('sdt')"
v-model="formInline.sdt"></a-input>
</div>
</a-col>
</template> </template>
<!-- <a-col :md="6" :sm="8">--> <!-- <a-col :md="6" :sm="8">-->
<!-- <div class="box-title-text">--> <!-- <div class="box-title-text">-->
<!-- <div class="title-text" :title="$t('status')">--> <!-- <div class="title-text" :title="$t('status')">-->
<!-- <span>{{$t('status')}}</span>--> <!-- <span>{{$t('status')}}</span>-->
<!-- </div>--> <!-- </div>-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('status')"--> <!-- <a-select :placeholder="$t('PleaseSelect')+$t('status')"-->
<!-- class="box-input"--> <!-- class="box-input"-->
<!-- allowClear--> <!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"--> <!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- v-model="formInline.state">--> <!-- v-model="formInline.state">-->
<!-- <a-select-option v-for="(item, key) in statusList"--> <!-- <a-select-option v-for="(item, key) in statusList"-->
<!-- :key="key"--> <!-- :key="key"-->
<!-- :value="item.value">--> <!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">--> <!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name}}--> <!-- {{ item.name}}-->
<!-- </span>--> <!-- </span>-->
<!-- </a-select-option>--> <!-- </a-select-option>-->
<!-- </a-select>--> <!-- </a-select>-->
<!-- </div>--> <!-- </div>-->
<!-- </a-col>--> <!-- </a-col>-->
<span style="float: right;overflow: hidden;margin-right: 11px" <span style="float: right;overflow: hidden;margin-right: 11px"
class="table-page-search-submitButtons"> class="table-page-search-submitButtons">
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
@@ -130,11 +141,11 @@
<a-icon type="plus"/> <a-icon type="plus"/>
{{$t('addTo')}} {{$t('addTo')}}
</div> </div>
<!-- &lt;!&ndash; 下发收集 &ndash;&gt;--> <!-- &lt;!&ndash; 下发收集 &ndash;&gt;-->
<!-- <div @click="distributionAndCollectionJurisdiction" class="operator-text-title">--> <!-- <div @click="distributionAndCollectionJurisdiction" class="operator-text-title">-->
<!-- <a-icon type="solution"/>--> <!-- <a-icon type="solution"/>-->
<!-- {{$t('distributionAndCollection')}}--> <!-- {{$t('distributionAndCollection')}}-->
<!-- </div>--> <!-- </div>-->
<!-- 导出--> <!-- 导出-->
<div @click="handleExport" class="operator-text-title" v-if='currentPersonRole == "homo"'> <div @click="handleExport" class="operator-text-title" v-if='currentPersonRole == "homo"'>
<a-icon type="export" :rotate="-90"/> <a-icon type="export" :rotate="-90"/>
@@ -161,25 +172,28 @@
{{$t('Updateparametercolumn')}} {{$t('Updateparametercolumn')}}
</div> </div>
<!-- 同步上报库 --> <!-- 同步上报库 -->
<div @click="handleSynchronousReportLibraryJurisdiction" class="operator-text-title" v-if='currentPersonRole == "homo"'> <div @click="handleSynchronousReportLibraryJurisdiction" class="operator-text-title"
v-if='currentPersonRole == "homo"'>
<a-icon type="sync"/> <a-icon type="sync"/>
{{$t('SynchronousReportLibrary')}} {{$t('SynchronousReportLibrary')}}
</div> </div>
<!-- 截止时间--> <!-- 截止时间-->
<!-- <div @click="TaskCutOffTimeLibrary" class="operator-text-title">--> <!-- <div @click="TaskCutOffTimeLibrary" class="operator-text-title">-->
<!-- <a-icon type="bulb"/>--> <!-- <a-icon type="bulb"/>-->
<!-- {{$t('TaskCutOffTime')}}--> <!-- {{$t('TaskCutOffTime')}}-->
<!-- </div>--> <!-- </div>-->
<!-- 批量删除--> <!-- 批量删除-->
<div @click="handleDelJurisdiction" class="operator-text-title" v-if='currentPersonRole == "homo"'> <div @click="handleDelJurisdiction" class="operator-text-title" v-if='currentPersonRole == "homo"'>
<a-icon type="delete"/> <a-icon type="delete"/>
{{$t('BatchDelete')}} {{$t('BatchDelete')}}
</div> </div>
<div @click="bringInTheProjectInterfaceClick" class="operator-text-title" v-if='currentPersonRole == "homo"'> <div @click="bringInTheProjectInterfaceClick" class="operator-text-title"
v-if='currentPersonRole == "homo"'>
<a-icon type="user"/> <a-icon type="user"/>
{{$t('bringInTheProjectInterface')}} {{$t('bringInTheProjectInterface')}}
</div> </div>
<div @click="AdjustareasofresponsibilityClick" class="operator-text-title" v-if='currentPersonRole == "homo"'> <div @click="AdjustareasofresponsibilityClick" class="operator-text-title"
v-if='currentPersonRole == "homo"'>
<a-icon type="setting"/> <a-icon type="setting"/>
{{$t('Adjustareasofresponsibility')}} {{$t('Adjustareasofresponsibility')}}
</div> </div>
@@ -189,13 +203,15 @@
{{$t('Assignedby')}} {{$t('Assignedby')}}
</div> </div>
</template> </template>
<!-- @click='morepop'--> <!-- @click='morepop'-->
<div class="operator-text" style="position: relative " v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'> <div class="operator-text" style="position: relative "
v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }} <span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
</div> </div>
</a-popconfirm> </a-popconfirm>
<!-- 下发收集 --> <!-- 下发收集 -->
<div @click="distributionAndCollectionJurisdiction" class="operator-text" v-if='currentPersonRole == "homo"'> <div @click="distributionAndCollectionJurisdiction" class="operator-text"
v-if='currentPersonRole == "homo"'>
<a-icon type="solution"/> <a-icon type="solution"/>
{{$t('distributionAndCollection')}} {{$t('distributionAndCollection')}}
</div> </div>
@@ -233,7 +249,8 @@
</div> </div>
<!-- 导入--> <!-- 导入-->
<div class="operator-text" v-if='currentPersonRole == "dre"'> <div class="operator-text" v-if='currentPersonRole == "dre"'>
<ImportFileOnlyList :url="url" :isTrue="false" :accept="'.zip'" :paramsManifestId='this.$route.query.id' @getList='getList'/> <ImportFileOnlyList :url="url" :isTrue="false" :accept="'.zip'" :paramsManifestId='this.$route.query.id'
@getList='getList'/>
</div> </div>
<!-- 填写人导出--> <!-- 填写人导出-->
<div @click="handleExportDre" class="operator-text" <div @click="handleExportDre" class="operator-text"
@@ -244,7 +261,7 @@
<!-- 强制撤回--> <!-- 强制撤回-->
<div @click="compulsoryWithdrawaljurisdiction" class="operator-text" <div @click="compulsoryWithdrawaljurisdiction" class="operator-text"
v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'> v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
<a-icon type="undo":rotate="90"/> <a-icon type="undo" :rotate="90"/>
{{$t('CompulsoryWithdrawal')}} {{$t('CompulsoryWithdrawal')}}
</div> </div>
@@ -258,9 +275,9 @@
</div> </div>
<div style="width: 100%"> <div style="width: 100%">
<!-- 表格-10控件--> <!-- 表格-10控件-->
<!-- :queryParamQuery='queryParamQuery'--> <!-- :queryParamQuery='queryParamQuery'-->
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest' @rowValue='rowValue' <table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest' @rowValue='rowValue'
:formInline='formInline' :currentPersonRole='currentPersonRole' :formInline='formInline' :currentPersonRole='currentPersonRole'
@getDataSource="getDataSource" @getDataSource="getDataSource"
@handlePreservation="handlePreservation" @handlePreservation="handlePreservation"
@value='value' @value='value'
@@ -323,27 +340,28 @@
<!-- 认证分配填写人---> <!-- 认证分配填写人--->
<a-modal v-model="areaVisibleAssignedbyhomo" :title="$t('Assignedby')" width='950px' :footer="null"> <a-modal v-model="areaVisibleAssignedbyhomo" :title="$t('Assignedby')" width='950px' :footer="null">
<assigned-by-homo v-if='areaVisibleAssignedbyhomo' :selectedRowKeysArray='selectedRowKeysArray' <assigned-by-homo v-if='areaVisibleAssignedbyhomo' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList' @GetgetTableList='GetgetTableList'
@GetgetLoginUserType='GetgetLoginUserType' @GetgetLoginUserType='GetgetLoginUserType'
@areaVisibleAssignedbyflaghomo='areaVisibleAssignedbyflaghomo' @areaVisible='areaVisibleAssignedbyhomo = false'/> @areaVisibleAssignedbyflaghomo='areaVisibleAssignedbyflaghomo'
@areaVisible='areaVisibleAssignedbyhomo = false'/>
</a-modal> </a-modal>
<!-- 下发收集---> <!-- 下发收集--->
<!-- <a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('distributionAndCollection')" width='400px' :footer="null">--> <!-- <a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('distributionAndCollection')" width='400px' :footer="null">-->
<task-cut-off-time ref='areaVisibleTaskCutOffTime' :selectedRowKeysArray='selectedRowKeysArray' <task-cut-off-time ref='areaVisibleTaskCutOffTime' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList' @GetgetTableList='GetgetTableList'
@areaVisibleTaskCutOffTimeflag='areaVisibleTaskCutOffTimeflag'/> @areaVisibleTaskCutOffTimeflag='areaVisibleTaskCutOffTimeflag'/>
<!-- </a-modal>--> <!-- </a-modal>-->
<!-- 一键下发收集---> <!-- 一键下发收集--->
<!-- <a-modal v-model="OneclickCollection" :title="$t('OneclickCollection')" width='400px' :footer="null">--> <!-- <a-modal v-model="OneclickCollection" :title="$t('OneclickCollection')" width='400px' :footer="null">-->
<task-time ref='OneclickCollection' :selectedRowKeysArray='selectedRowKeysArray' <task-time ref='OneclickCollection' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList' @GetgetTableList='GetgetTableList'
@areaVisibleTaskCutOffTimeAll='areaVisibleTaskCutOffTimeAll'/> @areaVisibleTaskCutOffTimeAll='areaVisibleTaskCutOffTimeAll'/>
<!-- </a-modal>--> <!-- </a-modal>-->
<!-- 调整责任领域--> <!-- 调整责任领域-->
<a-modal v-model="Adjustareasofrespon" :title="$t('Adjustareasofresponsibility')" width='620px' :footer="null"> <a-modal v-model="Adjustareasofrespon" :title="$t('Adjustareasofresponsibility')" width='620px' :footer="null">
<adjustarea-sofrespon v-if='Adjustareasofrespon' :selectedRowKeysArray='selectedRowKeysArray' <adjustarea-sofrespon v-if='Adjustareasofrespon' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList' @GetgetTableList='GetgetTableList'
@AdjustareasofresponAll='AdjustareasofresponAll'/> @AdjustareasofresponAll='AdjustareasofresponAll'/>
</a-modal> </a-modal>
<!-- 引用参数---> <!-- 引用参数--->
<a-modal v-model="areaVisiblereferenceparameter" :title="$t('referenceparameter')" width='650px' :footer="null"> <a-modal v-model="areaVisiblereferenceparameter" :title="$t('referenceparameter')" width='650px' :footer="null">
@@ -373,9 +391,9 @@
<parameter-column v-if='parametercolumn' @drawerhandleCancel='drawerhandleCancel' <parameter-column v-if='parametercolumn' @drawerhandleCancel='drawerhandleCancel'
@GetgetTableList='GetgetTableList' @GetgetTableList='GetgetTableList'
@GetgetHeader='GetgetHeader' @GetgetHeader='GetgetHeader'
:templateTitle='templatetitle' :templateTitle='templatetitle'
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url' :selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url'
:projectId='this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id'> :projectId='this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id'>
</parameter-column> </parameter-column>
</a-drawer> </a-drawer>
@@ -444,7 +462,8 @@
<!-- 认证工程师-提示--> <!-- 认证工程师-提示-->
<div style='font-size: 18px;text-align: center' v-if='NoEngineer === 1'> <div style='font-size: 18px;text-align: center' v-if='NoEngineer === 1'>
{{ currentPersonRole =='homo'? $t('certifiedEngineer'): (currentPersonRole =='sdt'? {{ currentPersonRole =='homo'? $t('certifiedEngineer'): (currentPersonRole =='sdt'?
$t('engineeringInterfacePerson'): $t('completedBy')) }}{{jurisdiction === "homoQZTH"? $t('Datastateexcept') : $t('Datastatusis')}} $t('engineeringInterfacePerson'): $t('completedBy')) }}{{jurisdiction === 'homoQZTH'? $t('Datastateexcept')
: $t('Datastatusis')}}
<!-- 下发收集时--> <!-- 下发收集时-->
<span v-if='jurisdiction === "HOMOZFSJ"' class="text-wraning"> <span v-if='jurisdiction === "HOMOZFSJ"' class="text-wraning">
'{{$t('CollectionInitiated')}}'、'{{$t('ReturnedPerson')}}'{{$t('or')}}'{{$t('alteration')}}' '{{$t('CollectionInitiated')}}'、'{{$t('ReturnedPerson')}}'{{$t('or')}}'{{$t('alteration')}}'
@@ -484,7 +503,7 @@
<p style='display: inline; color: red'>'{{$t('ReturnedEngineer')}}'</p> <p style='display: inline; color: red'>'{{$t('ReturnedEngineer')}}'</p>
</span> </span>
<!-- 强制撤回--> <!-- 强制撤回-->
<span v-else-if='jurisdiction === "homoQZTH"' class="text-wraning" > <span v-else-if='jurisdiction === "homoQZTH"' class="text-wraning">
<p style='display: inline; color: red'>'{{$t('SynchronizedLibrary')}}'</p> <p style='display: inline; color: red'>'{{$t('SynchronizedLibrary')}}'</p>
{{$t('or')}} {{$t('or')}}
<p style='display: inline; color: red'>'{{$t('CollectionInitiated')}}'</p> <p style='display: inline; color: red'>'{{$t('CollectionInitiated')}}'</p>
@@ -550,47 +569,47 @@
{ {
value: '1', value: '1',
title: this.$t('CollectionInitiated'), title: this.$t('CollectionInitiated'),
key:'1', key: '1'
}, },
{ {
value: '2', value: '2',
title: this.$t('handledInterface'), title: this.$t('handledInterface'),
key:'2', key: '2'
}, },
{ {
value: '3', value: '3',
title: this.$t('ReturnedPerson'), title: this.$t('ReturnedPerson'),
key:'3', key: '3'
}, },
{ {
value: '4', value: '4',
title: this.$t('completed'), title: this.$t('completed'),
key:'4', key: '4'
}, },
{ {
value: '5', value: '5',
title: this.$t('Filledreturn'), title: this.$t('Filledreturn'),
key:'5', key: '5'
}, },
{ {
value: '6', value: '6',
title: this.$t('Submitted'), title: this.$t('Submitted'),
key:'6', key: '6'
}, },
{ {
value: '7', value: '7',
title: this.$t('ReturnedEngineer'), title: this.$t('ReturnedEngineer'),
key:'7', key: '7'
}, },
{ {
value: '8', value: '8',
title: this.$t('SynchronizedLibrary'), title: this.$t('SynchronizedLibrary'),
key:'8', key: '8'
}, },
{ {
value: '9', value: '9',
title: this.$t('alteration'), title: this.$t('alteration'),
key:'9', key: '9'
} }
] ]
return { return {
@@ -682,12 +701,12 @@
value: 'dre', value: 'dre',
text: this.$t('dre'), text: this.$t('dre'),
dictCode: 'dre'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框 dictCode: 'dre'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
}, }
], ],
selectedRowKeys: [], selectedRowKeys: [],
textLoading: false, textLoading: false,
formInline: {}, formInline: {},
queryParamQuery:{}, queryParamQuery: {},
url: { url: {
tableHeader: 'params/collectManifest/getHeader', tableHeader: 'params/collectManifest/getHeader',
tableList: 'params/collectManifest/list', tableList: 'params/collectManifest/list',
@@ -704,7 +723,7 @@
configureareaVisible: false, // 配置的彈框 configureareaVisible: false, // 配置的彈框
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
rolename:'', rolename: '',
total: 0, total: 0,
selectedRowKeysArray: '', selectedRowKeysArray: '',
templatetitle: '', templatetitle: '',
@@ -721,9 +740,9 @@
areaVisibleAssignedby: false, // 分配填写人弹框 areaVisibleAssignedby: false, // 分配填写人弹框
areaVisibleAssignedbyhomo: false, // 认证分配填写人弹框 areaVisibleAssignedbyhomo: false, // 认证分配填写人弹框
areaVisibleTaskCutOffTime: false, // 截至时间弹框 areaVisibleTaskCutOffTime: false, // 截至时间弹框
OneclickCollection:false, OneclickCollection: false,
parametercolumn:false, parametercolumn: false,
Adjustareasofrespon:false, Adjustareasofrespon: false,
areaVisiblereferenceparameter: false, // 引用参数弹框 areaVisiblereferenceparameter: false, // 引用参数弹框
areaVisibsynchronous: false, // 同步上报库弹框 areaVisibsynchronous: false, // 同步上报库弹框
visibleoperationFailed: false, // 数据失败的弹框 visibleoperationFailed: false, // 数据失败的弹框
@@ -772,7 +791,8 @@
window.addEventListener('keyup',this.handleKeyup) window.addEventListener('keyup',this.handleKeyup)
window.addEventListener('click',this.handleClick) window.addEventListener('click',this.handleClick)
this.GetgetLoginUserType() this.GetgetLoginUserType()
if(this.$route.query.type == '1'){ console.log(this.currentPersonRole)
if (this.$route.query.type == '1') {
this.handleOkRoleSwitching() this.handleOkRoleSwitching()
} }
// clearTimeout(this.timeBatch) // clearTimeout(this.timeBatch)
@@ -867,9 +887,9 @@
}) })
}, },
handleOkRoleSwitching() { handleOkRoleSwitching() {
if(this.$route.query.type == '1'){ if (this.$route.query.type == '1') {
let query = { let query = {
userType:this.formInlineRoleSwitching.roleSwitchingCode ? this.formInlineRoleSwitching.roleSwitchingCode : this.$route.query.userType, userType: this.formInlineRoleSwitching.roleSwitchingCode ? this.formInlineRoleSwitching.roleSwitchingCode : this.$route.query.userType,
paramsManifestId: this.$route.query.id, paramsManifestId: this.$route.query.id,
projectId: this.$route.query.projectId, projectId: this.$route.query.projectId,
userId: this.userInfo().id userId: this.userInfo().id
@@ -881,8 +901,8 @@
this.visibleRoleSwitching = false this.visibleRoleSwitching = false
this.confirmLoadingRoleSwitching = false this.confirmLoadingRoleSwitching = false
localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode ? this.formInlineRoleSwitching.roleSwitchingCode : this.$route.query.userType)) localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode ? this.formInlineRoleSwitching.roleSwitchingCode : this.$route.query.userType))
this.RoleType.forEach((item,index) => { this.RoleType.forEach((item, index) => {
if(item.value == this.currentPersonRole){ if (item.value == this.currentPersonRole) {
this.rolename = item.label this.rolename = item.label
} }
}) })
@@ -892,7 +912,7 @@
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
} }
}) })
}else { } else {
this.$refs.ruleFormRoleSwitching.validate(valid => { this.$refs.ruleFormRoleSwitching.validate(valid => {
if (valid) { if (valid) {
let query = { let query = {
@@ -909,8 +929,8 @@
this.visibleRoleSwitching = false this.visibleRoleSwitching = false
this.confirmLoadingRoleSwitching = false this.confirmLoadingRoleSwitching = false
localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode)) localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode))
this.RoleType.forEach((item,index) => { this.RoleType.forEach((item, index) => {
if(item.value == this.currentPersonRole){ if (item.value == this.currentPersonRole) {
this.rolename = item.label this.rolename = item.label
} }
}) })
@@ -926,7 +946,7 @@
}, },
roleSwitchingClick() { roleSwitchingClick() {
this.visibleRoleSwitching = true this.visibleRoleSwitching = true
this.$nextTick(()=>{ this.$nextTick(() => {
this.formInlineRoleSwitching.roleSwitchingCode = this.currentPersonRole this.formInlineRoleSwitching.roleSwitchingCode = this.currentPersonRole
this.$refs.ruleFormRoleSwitching.clearValidate() this.$refs.ruleFormRoleSwitching.clearValidate()
clearTimeout(this.timeBatch) clearTimeout(this.timeBatch)
@@ -966,7 +986,7 @@
GetgetTableList() { GetgetTableList() {
this.$refs.CollectionTabel.getTableList(this.queryParamQuery) this.$refs.CollectionTabel.getTableList(this.queryParamQuery)
}, },
GetgetHeader(){ GetgetHeader() {
this.$refs.CollectionTabel.getHeader() this.$refs.CollectionTabel.getHeader()
}, },
// 错误数据的弹框 // 错误数据的弹框
@@ -1065,7 +1085,7 @@
} }
}, },
//导出 //导出
handleExport(){ handleExport() {
this.$message.success(this.$t('Intheexport')) this.$message.success(this.$t('Intheexport'))
let long = localStorage.getItem('language') let long = localStorage.getItem('language')
this.cut = '' this.cut = ''
@@ -1077,16 +1097,16 @@
let query = { let query = {
paramsManifestId: this.paramsManifest.id, paramsManifestId: this.paramsManifest.id,
paramsTemplateId: this.$route.query.paramsTemplateId, paramsTemplateId: this.$route.query.paramsTemplateId,
paramsTemplatePublishVersion:1, paramsTemplatePublishVersion: 1,
cut: this.cut, cut: this.cut,
userTypes: this.currentPersonRole, userTypes: this.currentPersonRole,
exportName:this.$route.query.projectName + '(' + this.$route.query.title + ')' exportName: this.$route.query.projectName + '(' + this.$route.query.title + ')'
} }
let name = this.$route.query.projectName + '(' + this.$route.query.title + ')' + '.zip' let name = this.$route.query.projectName + '(' + this.$route.query.title + ')' + '.zip'
downloadFile('/params/collectManifest/exportAll', name , query , this.selectClear) downloadFile('/params/collectManifest/exportAll', name, query, this.selectClear)
}, },
//填写人导出 //填写人导出
handleExportDre(){ handleExportDre() {
let long = localStorage.getItem('language') let long = localStorage.getItem('language')
this.cut = '' this.cut = ''
if (long && long === 'zh-cn') { if (long && long === 'zh-cn') {
@@ -1101,17 +1121,17 @@
...this.formInline, ...this.formInline,
...this.queryParamQuery, ...this.queryParamQuery,
ids: this.selectedRowKeys.join(','), ids: this.selectedRowKeys.join(','),
exportName:this.$route.query.projectName + '(' + this.$route.query.title + ')' exportName: this.$route.query.projectName + '(' + this.$route.query.title + ')'
} }
let name = this.$route.query.projectName + '(' + this.$route.query.title + ')' + '.zip' let name = this.$route.query.projectName + '(' + this.$route.query.title + ')' + '.zip'
downloadFile('/params/collectManifest/exportDre', name , query , this.selectClear) downloadFile('/params/collectManifest/exportDre', name, query, this.selectClear)
}, },
getList(){ getList() {
this.$refs.CollectionTabel.getTableList(this.queryParamQuery) this.$refs.CollectionTabel.getTableList(this.queryParamQuery)
}, },
iVisible(val,num) { iVisible(val, num) {
this.importsVisible = val this.importsVisible = val
if (num == 1){ if (num == 1) {
eventBUs.$emit('searchGetData') eventBUs.$emit('searchGetData')
} }
}, },
@@ -1134,7 +1154,7 @@
this.queryParamQuery = sqp this.queryParamQuery = sqp
this.$refs.CollectionTabel.pageNo = 1 this.$refs.CollectionTabel.pageNo = 1
// this.$refs.CollectionTabel.getTableList(this.queryParamQuery) // this.$refs.CollectionTabel.getTableList(this.queryParamQuery)
eventBUs.$emit('getTableList',this.queryParamQuery) eventBUs.$emit('getTableList', this.queryParamQuery)
}, },
// 认证工程师 批量删除 权限 // 认证工程师 批量删除 权限
// 仅仅状态为 待发起收集 工程接口人退回 变更 可以批量删除 // 仅仅状态为 待发起收集 工程接口人退回 变更 可以批量删除
@@ -1337,8 +1357,8 @@
this.currentPersonRole = currentPersonRole || userType || val[0].value this.currentPersonRole = currentPersonRole || userType || val[0].value
} }
this.RoleType = val this.RoleType = val
this.RoleType.forEach((item,index) => { this.RoleType.forEach((item, index) => {
if(item.value == this.currentPersonRole){ if (item.value == this.currentPersonRole) {
this.rolename = item.label this.rolename = item.label
} }
}) })
@@ -1453,18 +1473,18 @@
}) })
}, },
// 调整责任领域 // 调整责任领域
AdjustareasofresponsibilityClick(){ AdjustareasofresponsibilityClick() {
if(this.selectedRowKeysValue.length == 0){ if (this.selectedRowKeysValue.length == 0) {
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
}else{ } else {
this.Adjustareasofrespon = true this.Adjustareasofrespon = true
} }
}, },
// 下发收集的权限 // 下发收集的权限
distributionAndCollectionJurisdiction() { distributionAndCollectionJurisdiction() {
if(this.selectedRowKeysValue.length == 0){ if (this.selectedRowKeysValue.length == 0) {
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
}else{ } else {
this.$refs.areaVisibleTaskCutOffTime.searchData() this.$refs.areaVisibleTaskCutOffTime.searchData()
} }
// let homodistributionAndCollection = this.homodistributionAndCollection() // let homodistributionAndCollection = this.homodistributionAndCollection()
@@ -1482,7 +1502,7 @@
// 一键下发收集 // 一键下发收集
defOneclickCollection() { defOneclickCollection() {
this.$refs.OneclickCollection.searchData() this.$refs.OneclickCollection.searchData()
// this.OneclickCollection = true // this.OneclickCollection = true
}, },
// 引用参数列 // 引用参数列
Referenceparametercolumn() { Referenceparametercolumn() {
@@ -1490,12 +1510,12 @@
}, },
Updateparametercolumn() { Updateparametercolumn() {
let data = JSON.parse(JSON.stringify(this.$refs.CollectionTabel.dataSource)) let data = JSON.parse(JSON.stringify(this.$refs.CollectionTabel.dataSource))
console.log(data)
let referencesCol = [] let referencesCol = []
let postDate = [] let postDate = []
let colunmnFlag = '' let colunmnFlag = ''
data.forEach((item,index) => { this.colunmnFlag = false
if(!item.referencesCol){ data.forEach((item, index) => {
if (!item.referencesCol) {
this.colunmnFlag = true this.colunmnFlag = true
} }
referencesCol.push({ referencesCol.push({
@@ -1503,42 +1523,59 @@
id: item.id id: item.id
}) })
}) })
if(this.colunmnFlag){ if (this.colunmnFlag) {
this.$message.warning(this.$t('columnfirst')) this.$message.warning(this.$t('columnfirst'))
return return
} }
console.log(referencesCol)
// for (let i = 0; i < referencesCol.length; i++) {
// let postDateobj = {}
// let itemIn = Object.keys(referencesCol[i])
// for (let j = 0; j < itemIn.length; j++) {
// if (itemIn[j] !== 'sdt' && referencesCol[i][itemIn[j]].list) {
// if (referencesCol[i][itemIn[j]] instanceof Object && !(referencesCol[i][itemIn[j]] instanceof Array)) {
// postDateobj[itemIn[j]] = referencesCol[i][itemIn[j]]
// for (let k = 0; k < referencesCol[i][itemIn[j]].list.length; k++) {
// if (referencesCol[i][itemIn[j]].list[k].type == 'pull_more' && referencesCol[i][itemIn[j]].list[k].dataValue instanceof Array) {
// referencesCol[i][itemIn[j]].list[k].dataValue = referencesCol[i][itemIn[j]].list[k].dataValue.join(',')
// }
// if (referencesCol[i][itemIn[j]].list[k].type == 'text' && referencesCol[i][itemIn[j]].list[k].dataValue !== null) {
// referencesCol[i][itemIn[j]].list[k].dataValue = referencesCol[i][itemIn[j]].list[k].dataValue.toString()
// }
// }
// }
// }
// }
// postDateobj.id = referencesCol[i].id
// postDate.push(postDateobj)
// }
let configDataList = []
for (let i = 0; i < referencesCol.length; i++) { for (let i = 0; i < referencesCol.length; i++) {
let postDateobj = {} configDataList.push({
let itemIn = Object.keys(referencesCol[i]) id: referencesCol[i].id
for (let j = 0; j < itemIn.length; j++) { })
if (itemIn[j] !== 'sdt' && referencesCol[i][itemIn[j]].list) { let key = Object.keys(referencesCol[i].referencesCol.paramsConfigData)
if (referencesCol[i][itemIn[j]] instanceof Object && !(referencesCol[i][itemIn[j]] instanceof Array)) { let value = referencesCol[i].referencesCol.paramsConfigData
postDateobj[itemIn[j]] = referencesCol[i][itemIn[j]] for (let j = 0; j < key.length; j++) {
for (let k = 0; k < referencesCol[i][itemIn[j]].list.length; k++) { let keyName = key[j]
if (referencesCol[i][itemIn[j]].list[k].type == 'pull_more') { for (let k = 0; k < value[keyName].length; k++) {
referencesCol[i][itemIn[j]].list[k].dataValue = referencesCol[i][itemIn[j]].list[k].dataValue.join(',') if (value[keyName][k].type == 'pull_more') {
} value[keyName][k].dataValue = value[keyName][k].dataValue.join(',')
if (referencesCol[i][itemIn[j]].list[k].type == 'text' && referencesCol[i][itemIn[j]].list[k].dataValue !== null) {
referencesCol[i][itemIn[j]].list[k].dataValue = referencesCol[i][itemIn[j]].list[k].dataValue.toString()
}
}
} }
} }
configDataList[i][keyName] = value[keyName]
} }
postDateobj.id = referencesCol[i].id
postDate.push(postDateobj)
} }
let configDataList = { configDataList: postDate }
let query = { let query = {
...configDataList, configDataList: configDataList,
paramsManifestId: this.paramsManifest.id paramsManifestId: this.paramsManifest.id
} }
postAction('/params/collectManifest/updateReferencesCol', query).then((res) => { postAction('/params/collectManifest/updateReferencesCol', query).then((res) => {
if (res.success) { if (res.success) {
this.GetgetTableList() this.GetgetTableList()
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
} }
}) })
}, },
@@ -1630,41 +1667,75 @@
let selectedRowKeysValue = [] let selectedRowKeysValue = []
data.forEach(res => { data.forEach(res => {
if (res.state == 'To be filled' || res.state == '待填写' || res.state == '认证工程师退回' || if (res.state == 'To be filled' || res.state == '待填写' || res.state == '认证工程师退回' ||
res.state == 'Rejected by homo engineer') { res.state == 'Rejected by homo engineer') {
selectedRowKeysValue.push(res) selectedRowKeysValue.push(res)
} }
}) })
console.log(selectedRowKeysValue) // for (let i = 0; i < selectedRowKeysValue.length; i++) {
for (let i = 0; i < selectedRowKeysValue.length; i++) { // let postDateobj = {}
let postDateobj = {} // let itemIn = Object.keys(selectedRowKeysValue[i])
let itemIn = Object.keys(selectedRowKeysValue[i]) // for (let j = 0; j < itemIn.length; j++) {
for (let j = 0; j < itemIn.length; j++) { // if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) {
if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) { // if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) { // postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]] // for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) { // if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more') {
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more') { // selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',') // }
} // if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) { // selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString() // }
// }
// }
// }
// }
// postDateobj.id = selectedRowKeysValue[i].id
// delete postDateobj.referencesCol
// postDate.push(postDateobj)
// }
// console.log(postDate)
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
if (num && num == 1) {
this.textLoading = true
}
let configDataList = []
for (let i = 0; i < selectedRowKeysValue.length; i++) {
configDataList.push({
id: selectedRowKeysValue[i].id
})
if (selectedRowKeysValue[i].configIds && selectedRowKeysValue[i].configIds.length > 0) {
for (let j = 0; j < selectedRowKeysValue[i].configIds.length; j++) {
let keyIndex = Object.keys(selectedRowKeysValue[i])
for (let k = 0; k < keyIndex.length; k++) {
if (keyIndex[k] == selectedRowKeysValue[i].configIds[j]) {
let keyName = keyIndex[k]
configDataList[i][keyName] = selectedRowKeysValue[i][keyName]
} }
} }
} }
} }
} }
postDateobj.id = selectedRowKeysValue[i].id // return
delete postDateobj.referencesCol if (configDataList && configDataList.length > 0) {
postDate.push(postDateobj) configDataList.forEach(res => {
} Object.keys(res).forEach(val => {
console.log(postDate) if (res[val] && res[val].paramsConfigData) {
let configDataList = { configDataList: postDate } let paramsConfigData = res[val].paramsConfigData
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) { Object.keys(paramsConfigData).forEach((ol, index) => {
if (num && num == 1) { paramsConfigData[ol][0].orderNum = index
this.textLoading = true paramsConfigData[ol].forEach(item => {
if (item.type == 'pull_more') {
item.dataValue = item.dataValue.join(',')
}
})
})
}
})
})
} }
let query = { let query = {
...configDataList, // ...configDataList,
configDataList: configDataList,
paramsManifestId: this.paramsManifest.id paramsManifestId: this.paramsManifest.id
} }
postAction('/params/collectManifest/save', query).then((res) => { postAction('/params/collectManifest/save', query).then((res) => {
@@ -1720,34 +1791,92 @@
let _this = this let _this = this
let postDate = [] let postDate = []
let selectedRowKeysValue = JSON.parse(JSON.stringify(this.selectedRowKeysValue)) let selectedRowKeysValue = JSON.parse(JSON.stringify(this.selectedRowKeysValue))
// for (let i = 0; i < selectedRowKeysValue.length; i++) {
// let postDateobj = {}
// let itemIn = Object.keys(selectedRowKeysValue[i])
// for (let j = 0; j < itemIn.length; j++) {
// if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) {
// if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
// postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
// for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
// if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more') {
// selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
// }
// if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
// selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
// }
// if (!selectedRowKeysValue[i][itemIn[j]].list[k].dataValue && selectedRowKeysValue[i][itemIn[j]].list[k].isMust == '1'
// && selectedRowKeysValue[i][itemIn[j]].list[k].isLock == '0') {
// this.$message.warning(selectedRowKeysValue[i].nioNumber + ',' + this.$t('requiredParametersEmpty'))
// return
// }
// }
// }
// }
// }
// postDateobj.id = selectedRowKeysValue[i].id
// postDate.push(postDateobj)
// }
let configDataList = []
for (let i = 0; i < selectedRowKeysValue.length; i++) { for (let i = 0; i < selectedRowKeysValue.length; i++) {
let postDateobj = {} configDataList.push({
let itemIn = Object.keys(selectedRowKeysValue[i]) id: selectedRowKeysValue[i].id
for (let j = 0; j < itemIn.length; j++) { })
if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) { if (selectedRowKeysValue[i].configIds && selectedRowKeysValue[i].configIds.length > 0) {
if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) { for (let j = 0; j < selectedRowKeysValue[i].configIds.length; j++) {
postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]] let keyIndex = Object.keys(selectedRowKeysValue[i])
for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) { for (let k = 0; k < keyIndex.length; k++) {
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more') { if (keyIndex[k] == selectedRowKeysValue[i].configIds[j]) {
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',') let keyName = keyIndex[k]
} configDataList[i][keyName] = selectedRowKeysValue[i][keyName]
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) { }
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString() }
} }
if (!selectedRowKeysValue[i][itemIn[j]].list[k].dataValue && selectedRowKeysValue[i][itemIn[j]].list[k].isMust == '1' }
&& selectedRowKeysValue[i][itemIn[j]].list[k].isLock == '0') { }
this.$message.warning(selectedRowKeysValue[i].nioNumber + ',' + this.$t('requiredParametersEmpty')) // return
return if (configDataList && configDataList.length > 0) {
for (let i = 0; i < configDataList.length; i++) {
let res = Object.keys(configDataList[i])
for (let j = 0; j < res.length; j++) {
let key = res[j]
if (configDataList[i][key] && configDataList[i][key].paramsConfigData) {
let paramsConfigData = configDataList[i][key].paramsConfigData
let paramsConfigDataQuery = Object.keys(paramsConfigData)
for (let k = 0; k < paramsConfigDataQuery.length; k++) {
let keyName = paramsConfigDataQuery[k]
paramsConfigData[keyName][0].orderNum = k
let keyNameOne = paramsConfigData[keyName]
for (let l = 0; l < keyNameOne.length; l++) {
if (keyNameOne[l].type == 'pull_more') {
keyNameOne[l].dataValue = keyNameOne[l].dataValue.join(',')
}
if (!keyNameOne[l].dataValue && keyNameOne[l].isMust == '1' && keyNameOne[l].isLock == '0') {
this.$message.warning(selectedRowKeysValue[i].nioNumber + ',' + this.$t('requiredParametersEmpty'))
return
}
} }
} }
} }
} }
} }
postDateobj.id = selectedRowKeysValue[i].id // configDataList.forEach(res => {
postDate.push(postDateobj) // Object.keys(res).forEach(val => {
// if (res[val] && res[val].paramsConfigData) {
// let paramsConfigData = res[val].paramsConfigData
// Object.keys(paramsConfigData).forEach((ol, index) => {
// paramsConfigData[ol][0].orderNum = index
// paramsConfigData[ol].forEach(item => {
// if (item.type == 'pull_more') {
// item.dataValue = item.dataValue.join(',')
// }
// })
// })
// }
// })
// })
} }
// let configDataList = { configDataList: postDate }
let configDataList = { configDataList: postDate }
if (this.selectedRowKeys.length == 0) { if (this.selectedRowKeys.length == 0) {
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
} else { } else {
@@ -1755,7 +1884,11 @@
this.$confirm({ this.$confirm({
content: _this.$t('Areyousureparameteritems'), content: _this.$t('Areyousureparameteritems'),
onOk() { onOk() {
postAction(_this.url.add, configDataList).then((res) => { let query = {
configDataList: configDataList,
paramsManifestId: _this.paramsManifest.id
}
postAction(_this.url.add, query).then((res) => {
if (res.success) { if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful')) _this.$message.success(_this.$t('OperationSuccessful'))
_this.GetgetTableList() _this.GetgetTableList()
@@ -1789,7 +1922,8 @@
return return
} }
let _this = this let _this = this
let param = { ids: _array.join(','), let param = {
ids: _array.join(','),
currentPersonRole: this.currentPersonRole, currentPersonRole: this.currentPersonRole,
paramsManifestId: this.$route.query.id paramsManifestId: this.$route.query.id
} }
@@ -1847,9 +1981,9 @@
let _this = this let _this = this
let param = { ids: _array.join(',') } let param = { ids: _array.join(',') }
let url = '' let url = ''
if(this.currentPersonRole == 'homo'){ if (this.currentPersonRole == 'homo') {
url = '/jero-boot/params/collectManifest/mandatoryWithdraw' url = '/jero-boot/params/collectManifest/mandatoryWithdraw'
}else{ } else {
url = '/jero-boot/params/collectManifest/withdraw' url = '/jero-boot/params/collectManifest/withdraw'
} }
this.$confirm({ this.$confirm({
@@ -1893,8 +2027,8 @@
}, },
// 分配填写人 // 分配填写人
assignedBy() { assignedBy() {
let sdtJurisdictionAssigned = this.sdtJurisdictionAssigned() let sdtJurisdictionAssigned = this.sdtJurisdictionAssigned()
// 工程接口人 // 工程接口人
if (sdtJurisdictionAssigned == 1) { if (sdtJurisdictionAssigned == 1) {
this.areaVisibleAssignedby = true this.areaVisibleAssignedby = true
} else if (sdtJurisdictionAssigned == 0) { } else if (sdtJurisdictionAssigned == 0) {
@@ -1936,10 +2070,10 @@
areaVisibleTaskCutOffTimeflag(val) { areaVisibleTaskCutOffTimeflag(val) {
this.$refs.CollectionTabel.getTableList(this.queryParamQuery) this.$refs.CollectionTabel.getTableList(this.queryParamQuery)
}, },
areaVisibleTaskCutOffTimeAll(val){ areaVisibleTaskCutOffTimeAll(val) {
this.$refs.CollectionTabel.getTableList(this.queryParamQuery) this.$refs.CollectionTabel.getTableList(this.queryParamQuery)
}, },
AdjustareasofresponAll(val){ AdjustareasofresponAll(val) {
console.log(val) console.log(val)
this.Adjustareasofrespon = val this.Adjustareasofrespon = val
this.$refs.CollectionTabel.getTableList(this.queryParamQuery) this.$refs.CollectionTabel.getTableList(this.queryParamQuery)
@@ -1987,7 +2121,7 @@
handleDel() { handleDel() {
let param = { let param = {
ids: this.selectedRowKeysArray, ids: this.selectedRowKeysArray,
paramsManifestId:this.$route.query.id paramsManifestId: this.$route.query.id
} }
if (this.selectedRowKeys.length > 0) { if (this.selectedRowKeys.length > 0) {
let _this = this let _this = this
@@ -2100,6 +2234,7 @@
cursor: pointer; cursor: pointer;
border-radius: 4px; border-radius: 4px;
} }
.operator-text-title { .operator-text-title {
cursor: pointer; cursor: pointer;
margin-right: 22px; margin-right: 22px;
@@ -2245,12 +2380,13 @@
} }
} }
} }
.text-wraning{
.text-wraning {
word-break: break-word; word-break: break-word;
} }
</style> </style>
<style lang='less'> <style lang='less'>
.ant-popover-message-title{ .ant-popover-message-title {
margin-bottom: -30px; margin-bottom: -30px;
} }
</style> </style>
@@ -231,12 +231,12 @@
{{ $t('withdraw') }} {{ $t('withdraw') }}
</div> </div>
<!-- 发起任务--> <!-- 发起任务-->
<div class="operator-text" @click="submitClick(0)" v-if="this.roleSwitchingCode == '1'"> <div class="operator-text" @click="submitOrSendBackClick(0)" v-if="this.roleSwitchingCode == '1'">
<a-icon type="check-circle"/> <a-icon type="check-circle"/>
{{ $t('initiateTask') }} {{ $t('initiateTask') }}
</div> </div>
<!-- 退回--> <!-- 退回-->
<div class="operator-text" @click="sendBackClick(1)" v-if="this.roleSwitchingCode == '1'"> <div class="operator-text" @click="submitOrSendBackClick(1)" v-if="this.roleSwitchingCode == '1'">
<a-icon type="close-circle"/> <a-icon type="close-circle"/>
{{ $t('sendBack') }} {{ $t('sendBack') }}
</div> </div>
@@ -1178,7 +1178,8 @@
rowKeysSuccessList: [], rowKeysSuccessList: [],
selectedRowKeysList: [], selectedRowKeysList: [],
rowKeysWarningList: [], rowKeysWarningList: [],
rolecode: false rolecode: false,
dataWarningList: []
} }
}, },
@@ -2076,51 +2077,26 @@
this.detailedSuccessList = [] this.detailedSuccessList = []
this.detailedWarningList = [] this.detailedWarningList = []
}) })
} else {
let TaskSuccessList = JSON.parse(JSON.stringify(this.TaskSuccessList))
for (let i = 0; i < TaskSuccessList.length; i++) {
TaskSuccessList[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate
Object.keys(TaskSuccessList[i]).forEach(res => {
if (TaskSuccessList[i][res] && TaskSuccessList[i][res] instanceof String) {
TaskSuccessList[i][res] = TaskSuccessList[i][res].replace(/\"/g, '“')
TaskSuccessList[i][res] = TaskSuccessList[i][res].replace(/\'/g, '')
}
})
}
this.confirmLoading = true
this.startProcess(TaskSuccessList)
} }
} }
}) })
}, },
startProcess(value) { startProcess(value,type) {
let query = { let query = {
type: 1, type: type,
projectLawsInvnetoryList: value, projectLawsInvnetoryList: value,
projectNameId: this.$route.query.projectNameId, projectNameId: this.$route.query.projectNameId,
projectName: this.$route.query.projectName, projectName: this.$route.query.projectName,
projectLawsInventoryId: value.id, projectLawsInventoryId: value.id
taskAffirmDueDate: this.formInline.taskAffirmDueDate
} }
postAction('/workFlow/startProcess', query).then((res) => { postAction('/workFlow/startProcess', query).then((res) => {
if (res.success) { if (res.success) {
this.visible = false // this.visible = false
this.selectedRowKeys = [] // this.selectedRowKeys = []
this.$message.success(this.$t('OperationSuccessful')) // this.$message.success(this.$t('OperationSuccessful'))
this.confirmLoading = false // this.confirmLoading = false
this.getList() this.completeTask(value, res.result)
let that = this
if (this.TaskWarningList.length > 0) {
this.$warning({
content: (
< div >
{ that.TaskWarningList }
< /div>
)
})
}
// this.completeTask(value, res.result, index)
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
} }
@@ -2128,162 +2104,38 @@
}, },
completeTask(value, taskId, index) { completeTask(value, taskId, index) {
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss') return new Promise((resolve, reject) => {
value.handlingTime = handlingTime value.handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
Object.keys(value).forEach(res => { Object.keys(value).forEach(res => {
if (value[res] && typeof value[res] == 'string') { if (value[res] && typeof value[res] == 'string') {
value[res] = value[res].replace(/\"/g, '“') value[res] = value[res].replace(/\"/g, '“')
value[res] = value[res].replace(/\'/g, '') value[res] = value[res].replace(/\'/g, '')
}
})
let query = {
userid: this.userInfo().id,
taskId: taskId,
json: JSON.stringify(value).replace(/\"/g, '\'')
}
postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) {
if (index == this.TaskSuccessList.length) {
this.visible = false
this.selectedRowKeys = []
this.$message.success(this.$t('OperationSuccessful'))
this.confirmLoading = false
this.getList()
let that = this
if (this.TaskWarningList.length > 0) {
this.$warning({
content: (
< div >
{ that.TaskWarningList }
< /div>
)
})
}
} }
} else { })
this.$message.warning(this.$t('operationFailed')) let query = {
userid: this.userInfo().id,
taskId: taskId,
json: JSON.stringify(value).replace(/\"/g, '\'')
} }
postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) {
// this.visible = false
// this.selectedRowKeys = []
// this.$message.success(this.$t('OperationSuccessful'))
// this.confirmLoading = false
// this.getList()
resolve(res)
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
}) })
}, },
getRowKeys(value, num, callBack) { submitOrSendBackClick(num) {
let isTrue = true
let dataSource = []
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < value.length; j++) {
if (this.dataSource[i].id == value[j]) {
dataSource.push(this.dataSource[i])
}
}
}
this.rowKeysSuccessList = []
this.rowKeysWarningList = []
for (let i = 0; i < dataSource.length; i++) {
if (dataSource[i].inventoryAffirmStatus == 'List to confirm' || dataSource[i].inventoryAffirmStatus == 'Rejected') {
if (dataSource[i].roleCode == 1 && dataSource[i].regulationOwnerSubmitStatus) {
this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('submitted') } < /div>)
continue
} else if (dataSource[i].roleCode == 2 && dataSource[i].homologationEngineerSubmitStatus) {
this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('submitted') } < /div>)
continue
} else if (dataSource[i].roleCode == 4 && (dataSource[i].homologationEngineerSubmitStatus && dataSource[i].regulationOwnerSubmitStatus)) {
this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('submitted') } < /div>)
continue
}
if (num == 1) {
if ((dataSource[i].designInitiatorId == dataSource[i].regulationOwnerId
&& dataSource[i].designInitiatorId == this.userInfo().id) ||
(dataSource[i].designInitiatorId == dataSource[i].homologationEngineerId
&& dataSource[i].designInitiatorId == this.userInfo().id)) {
if (!dataSource[i].designDutyId && !dataSource[i].designDueDate) {
this.rowKeysWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theResponsiblePersonAndDeadlineClank') } < /div>)
continue
} else if (!dataSource[i].designDutyId) {
this.rowKeysWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theResponsiblePersonEmpty') } < /div>)
continue
} else if (!dataSource[i].designDueDate) {
this.rowKeysWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theDeadlineEmpty') } < /div>)
continue
} else if (!dataSource[i].designDeliverableType) {
this.rowKeysWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theDeliveryTypeCannotBeEmpty') } < /div>)
continue
}
}
if ((dataSource[i].prehomoInitiatorId == dataSource[i].regulationOwnerId
&& dataSource[i].prehomoInitiatorId == this.userInfo().id) ||
(dataSource[i].prehomoInitiatorId == dataSource[i].homologationEngineerId
&& dataSource[i].prehomoInitiatorId == this.userInfo().id)) {
if (!dataSource[i].prehomoDutyId && !dataSource[i].prehomoDueDate) {
this.rowKeysWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theResponsiblePersonAndDeadlineClank') } < /div>)
continue
} else if (!dataSource[i].prehomoDutyId) {
this.rowKeysWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theResponsiblePersonEmpty') } < /div>)
continue
} else if (!dataSource[i].prehomoDueDate) {
this.rowKeysWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theDeadlineEmpty') } < /div>)
continue
} else if (!dataSource[i].prehomoDeliverableType) {
this.rowKeysWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theDeliveryTypeCannotBeEmpty') } < /div>)
continue
}
}
if ((dataSource[i].verifyInitiatorId == dataSource[i].regulationOwnerId
&& dataSource[i].verifyInitiatorId == this.userInfo().id) ||
(dataSource[i].verifyInitiatorId == dataSource[i].homologationEngineerId
&& dataSource[i].verifyInitiatorId == this.userInfo().id)) {
if (!dataSource[i].verifyDutyId && !dataSource[i].verifyDueDate) {
this.rowKeysWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theResponsiblePersonAndDeadlineClank') } < /div>)
continue
} else if (!dataSource[i].verifyDutyId) {
this.rowKeysWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theResponsiblePersonEmpty') } < /div>)
continue
} else if (!dataSource[i].verifyDueDate) {
this.rowKeysWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theDeadlineEmpty') } < /div>)
continue
} else if (!dataSource[i].verifyDeliverableType) {
this.rowKeysWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theDeliveryTypeCannotBeEmpty') } < /div>)
continue
}
}
}
this.rowKeysSuccessList.push(dataSource[i])
} else {
this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('incorrectsubmitted') } < /div>)
}
}
if (this.rowKeysSuccessList && this.rowKeysSuccessList.length > 0) {
callBack && callBack()
} else {
let that = this
this.$warning({
content: (
< div >
{ that.rowKeysWarningList }
< /div>
)
})
}
},
sendBackClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.detailedWarningList = [] this.detailedWarningList = []
this.dataWarningList = []
let dataSource = [] let dataSource = []
let idList = [] let idList = []
this.rowKeysSuccessList = [] this.rowKeysSuccessList = []
@@ -2302,14 +2154,20 @@
} else { } else {
this.detailedWarningList.push( this.detailedWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>) < div > { dataSource[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
this.dataWarningList.push(
< div > { dataSource[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
} }
} }
if (idList && idList.length > 0) { if (idList && idList.length > 0) {
this.visibleComment = true if (num == 0) {
this.formInlineComment = {} this.submitClick(this.rowKeysSuccessList, 1)
this.$nextTick(() => { } else {
this.$refs.ruleFormComment.clearValidate() this.visibleComment = true
}) this.formInlineComment = {}
this.$nextTick(() => {
this.$refs.ruleFormComment.clearValidate()
})
}
} else { } else {
this.promptInformation(this.detailedWarningList) this.promptInformation(this.detailedWarningList)
} }
@@ -2317,6 +2175,99 @@
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
} }
}, },
submitClick(dataList, num) {
let content = []
let designList = []
let verifyList = []
let detailedWarningList = []
this.detailedWarningList = this.dataWarningList || []
let _this = this
_this.$destroyAll()
if (num == 1) {
for (let i = 0; i < dataList.length; i++) {
if (!dataList[i].designDeliverableType && !dataList[i].designDutyId && !dataList[i].designDueDate) {
content.push(dataList[i])
continue
}
if (!dataList[i].verifyDeliverableType && !dataList[i].verifyDutyId && !dataList[i].verifyDueDate) {
content.push(dataList[i])
continue
}
}
}
if (content && content.length > 0) {
for (let i = 0; i < content.length; i++) {
if (!content[i].designDeliverableType) {
designList.push(content[i].serialNumber)
}
if (!content[i].verifyDeliverableType) {
verifyList.push(content[i].serialNumber)
}
}
if (designList.length > 0 || verifyList.length > 0) {
detailedWarningList.push(
< div > { this.$t('theDataYouSelectedContainsSkip') } < /div>)
}
if (designList.length > 0) {
detailedWarningList.push(
< div > { designList.join(',') + ' ' + this.$t('designComplianceProcessFor') } < /div>)
}
if (verifyList.length > 0) {
detailedWarningList.push(
< div > { verifyList.join(',') + ' ' + this.$t('validationComplianceProcessFor') } < /div>)
}
this.$confirm({
content: detailedWarningList,
class: 'confirmClass',
onOk() {
_this.submitClick(dataList, 2)
}
})
return
}
this.$confirm({
content: _this.$t('confirmLaunchTask'),
onOk() {
_this.submitAdmin(dataList)
}
})
},
submitAdmin(dataList) {
let _this = this
for (let i = 0; i < dataList.length; i++) {
if (dataList[i].designDeliverableType) {
if (!dataList[i].designDutyId) {
_this.detailedWarningList.push(
< div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForDesignCannotBeBlank') } < /div>)
}
if (!dataList[i].designDueDate) {
_this.detailedWarningList.push(
< div > { dataList[i].serialNumber + _this.$t('theDeadlineForTheDesignCannotBeEmpty') } < /div>)
}
}
if (dataList[i].verifyDeliverableType) {
if (!dataList[i].verifyDueDate) {
_this.detailedWarningList.push(
< div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForVerifyingEmpty') } < /div>)
}
if (!dataList[i].verifyDutyId) {
_this.detailedWarningList.push(
< div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForVerifyingEmpty') } < /div>)
}
}
if (dataList[i].designDeliverableType && dataList[i].designDutyId && dataList[i].designDueDate) {
_this.startProcess(dataList[i], 2)
Promise.all(_this.completeTask()).then((res) => {
console.log(res)
}).catch(error => {
console.log('error', error)
})
}
if (dataList[i].verifyDeliverableType && dataList[i].verifyDutyId && dataList[i].verifyDueDate) {
_this.startProcess(dataList[i], 2)
}
}
},
handleOkComment() { handleOkComment() {
this.$refs.ruleFormComment.validate(valid => { this.$refs.ruleFormComment.validate(valid => {
if (valid) { if (valid) {
@@ -2895,5 +2846,13 @@
touch-action: none; touch-action: none;
} }
.confirmClass .ant-modal-confirm-body {
display: flex;
}
.confirmClass .ant-modal-confirm-body .ant-modal-confirm-content {
margin-top: 0 !important;
}
/* 插件 end */ /* 插件 end */
</style> </style>