Merge branch 'feature_dev_20230103_KJJY' into dev_2nd_LCYH

# Conflicts:
#	jero-boot/db/蔚来标准sql/dev_2nd_period.sql
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/controller/ParamsInfoEOController.java
#	jero-web/src/components/CollectionType/index.vue
#	jero-web/src/components/CollectionTypeDisabled/index.vue
#	jero-web/src/components/tableCollection/index.vue
#	jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
This commit is contained in:
高嵩
2023-03-20 10:26:24 +08:00
22 changed files with 3286 additions and 1852 deletions
@@ -398,4 +398,11 @@ INSERT INTO `sys_category` (`id`, `pid`, `name`, `code`, `create_by`, `create_ti
-- 法规清单表 增加字段 设计、验证符合性确认-流程状态 2023-03-17 未同步生产环境
ALTER TABLE `project_laws_inventory`
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")
private String paramsCollectManifestId;
/**排序号**/
private Integer orderNum;
}
@@ -56,6 +56,15 @@ public interface IParamsConfigDataEOService extends IService<ParamsConfigDataEO>
*/
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);
}
/**
* 通过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.service.ISysDictService;
import com.jero.modules.system.service.ISysUserService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -700,23 +701,27 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
// 配置数据: nio编号,控件类型,控件备选值,控件校验 均一致时 将清单参数项项复制到模板参数项,否则不复制
for (ParamsConfigEO configEO : paramsConfigEOList) {
ParamsConfigDataEO configDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(configEO.getId(), collectManifestEO.getId());
// ParamsConfigDataEO configDataEO = paramsConfigDataEOService.queryByConfigIdAndCollectManifestId(configEO.getId(), collectManifestEO.getId());
ParamsConfigDataEO addConfigDataEO = new ParamsConfigDataEO();
if (ObjectUtil.isNotEmpty(configDataEO)) {
BeanUtils.copyProperties(configDataEO, addConfigDataEO);
List<ParamsConfigDataEO> configDataEOList = this.paramsConfigDataEOService.queryListByConfigIdAndCollectManifestId(configEO.getId(), collectManifestEO.getId());
if(CollectionUtils.isNotEmpty(configDataEOList)){
for (ParamsConfigDataEO configDataEO : configDataEOList) {
ParamsConfigDataEO addConfigDataEO = new ParamsConfigDataEO();
if (ObjectUtil.isNotEmpty(configDataEO)) {
BeanUtils.copyProperties(configDataEO, addConfigDataEO);
addConfigDataEO.setId(null);
addConfigDataEO.setCreateBy(null);
addConfigDataEO.setCreateTime(null);
addConfigDataEO.setUpdateBy(null);
addConfigDataEO.setUpdateTime(null);
addConfigDataEO.setSysOrgCode(null);
addConfigDataEO.setParamsConfigId(configIdMap.get(configEO.getId()));
addConfigDataEO.setParamsCollectManifestId(addCollectManifestId);
addConfigDataEOList.add(addConfigDataEO);
addConfigDataEO.setId(null);
addConfigDataEO.setCreateBy(null);
addConfigDataEO.setCreateTime(null);
addConfigDataEO.setUpdateBy(null);
addConfigDataEO.setUpdateTime(null);
addConfigDataEO.setSysOrgCode(null);
addConfigDataEO.setParamsConfigId(configIdMap.get(configEO.getId()));
addConfigDataEO.setParamsCollectManifestId(addCollectManifestId);
addConfigDataEOList.add(addConfigDataEO);
}
}
}
}
}
@@ -22,6 +22,8 @@ public interface IParamsReportConfigDataEOService extends IService<ParamsReportC
*/
ParamsReportConfigDataEO queryByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId);
List<ParamsReportConfigDataEO> queryListByConfigIdAndCollectManifestId(String paramsConfigId, String paramsCollectManifestId);
List<ParamsReportConfigDataEO> queryByConfigIdListAndCollectManifestId(List<String> paramsConfigIdList, String paramsCollectManifestId);
/**
@@ -35,6 +35,22 @@ public class ParamsReportConfigDataEOServiceImpl extends ServiceImpl<ParamsRepor
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
public List<ParamsReportConfigDataEO> queryByConfigIdListAndCollectManifestId(List<String> paramsConfigIdList, String paramsCollectManifestId) {
return baseMapper.selectByConfigIdListAndCollectManifestId(paramsConfigIdList, paramsCollectManifestId);
@@ -210,12 +210,38 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
Map<String, Object> configMap = new HashMap<>();
/*Map<String, Object> configMap = new HashMap<>();
String paramsConfigId = paramsConfigEO.getId();
ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
configMap.put("controlType", controlType);
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);
configIdList.add(paramsConfigEO.getId());
@@ -1319,42 +1345,57 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
if (ControlTypeEnum.Title.getValue().equals(controlType)) {
record1.put(paramsConfigEO.getId(), titleDefaultValue);
} 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)) { // 文件名称重复 且文件内容相同
configDataBuilder.append(fileName).append("#");
fileList.addAll(ossFileList);
}else {
configDataBuilder.append(fileName).append("#");
fileList.addAll(ossFileList);
fileListAll.addAll(ossFileList);
String paramsConfigId = paramsConfigEO.getId();
List<ParamsReportConfigDataEO> paramsConfigDataEOList = this.paramsReportConfigDataEOService.queryListByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
if(CollectionUtils.isNotEmpty(paramsConfigDataEOList)){
for (ParamsReportConfigDataEO paramsConfigDataEO : paramsConfigDataEOList) {
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();
if (configData.contains("#")) {
configData = configData.substring(0, configData.lastIndexOf("#"));
if (configData.contains(paramsReportDetailVO.getSeparator())) {
configData = configData.substring(0, configData.lastIndexOf(paramsReportDetailVO.getSeparator()));
}
record1.put(paramsConfigEO.getId(), configData);
@@ -1368,66 +1409,53 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
} else {
List<ParamsReportConfigDataEO> paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId);
String textDatas = paramsReportConfigDataEOS.stream().filter(e -> StringUtils.isNotEmpty(e.getTextData()))
.map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator()));
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
String pullDatas = paramsReportConfigDataEOS.stream().filter(e -> StringUtils.isNotEmpty(e.getPullData()))
.map(ParamsReportConfigDataEO::getPullData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator()));
for (ParamsReportConfigDataEO paramsConfigDataEO : paramsReportConfigDataEOS) {
StringBuilder configDataBuilderTemp = new StringBuilder(); // 重新组合配置数据
List<String> fileNameList = new ArrayList<>();
for(ParamsReportConfigDataEO paramsReportConfigDataEO : paramsReportConfigDataEOS) {
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) {
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsReportConfigDataEO.getFileConnectId());
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)) { // 文件名称重复 且文件内容不同
// 判断 新文件名是不是当前参数下 配置间的 重复
int count = (int) fileList.stream().filter(e->newFileName.equals(e.getFileName())).count();
if (count <= 0) { // 不是 (如果是,不做任何操作)
fileNameList.add(newFileName);
ossFileList.get(0).setFileName(newFileName);
fileList.addAll(ossFileList);
fileListAll.addAll(ossFileList);
}
configDataBuilderTemp.append(newFileName).append("#");
ossFileList.get(0).setFileName(newFileName);
fileList.addAll(ossFileList);
fileListAll.addAll(ossFileList);
} else if ("old".equals(newFileName)) { // 文件名称重复 且文件内容相同
// 判断这种重复是不是当前参数下 配置间的
int count = (int) fileList.stream().filter(e->fileName.equals(e.getFileName())).count();
if (count <= 0) { // 不是 (如果是,不做任何操作)
fileNameList.add(fileName);
fileList.addAll(ossFileList);
fileListAll.addAll(ossFileList);
}
}else { // 文件名称不重复
fileNameList.add(fileName);
configDataBuilderTemp.append(fileName).append("#");
fileList.addAll(ossFileList);
} else {
configDataBuilderTemp.append(fileName).append("#");
fileList.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(); // 重新组合配置数据
if (StringUtils.isNotEmpty(pullDatas)) {
configDataBuilder.append(pullDatas).append("#");
String configDataStr = configDataBuilder.toString();
if (configDataStr.contains(paramsReportDetailVO.getSeparator())) {
configDataStr = configDataStr.substring(0, configDataStr.lastIndexOf(paramsReportDetailVO.getSeparator()));
}
if (StringUtils.isNotEmpty(textDatas)) {
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);
record1.put("params_value", configDataStr);
}
}
@@ -1473,6 +1501,18 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
String configData = "";
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()))
.map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); // 整合文本数据
@@ -1777,13 +1817,12 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
continue;
}
ParamsReportConfigDataEO paramsReportConfigDataEO = new ParamsReportConfigDataEO();
// 取值
String paramsReportConfigEOId = entry.getKey();
ParamsReportConfigEO paramsReportConfigEO = paramsReportConfigEOService.getById(paramsReportConfigEOId);
Map<String, Object> paramsReportConfigDataMap = (Map<String, Object>) entry.getValue();
// 无法转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");
// 判断是新增还是修改
ParamsConfigDataEO oldConfigDataEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsReportConfigEOId, paramsCollectManifestId, paramsReportConfigDataEOList);
@@ -1795,117 +1834,193 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
logEnContent.append(paramsReportConfigEO.getConfigName());
configNameCn = paramsReportConfigEO.getConfigName()+"";
configNameEn = paramsReportConfigEO.getConfigName();
Map<String, Object> paramsConfigDataVOMap = (Map<String, Object>) paramsReportConfigDataMap.get("paramsConfigData");
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");
for (Map.Entry<String, Object> paramsConfigDataMap : paramsConfigDataVOMap.entrySet()) {
String configDataId = paramsConfigDataMap.getKey();
List<Map<String, Object>> configDataVOList = (List<Map<String, Object>>) paramsConfigDataMap.getValue();
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(", ");
if (CollectionUtil.isNotEmpty(configDataVOList)) {
Integer orderNum = (Integer) configDataVOList.get(0).get("orderNum");
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(", ");
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");
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(", ");
// 判断是新增还是修改
ParamsConfigDataEO oldConfigDataEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsReportConfigEOId, paramsCollectManifestId, paramsReportConfigDataEOList,configDataId);
if (ObjectUtil.isNotEmpty(oldConfigDataEO)) {
paramsReportConfigDataEO.setId(oldConfigDataEO.getId());
changeFlag = true;
}
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(", ");
} else if (type.equals(ConfigDataTypeEnum.PULL.getValue())
|| type.equals(ConfigDataTypeEnum.PULL_MORE.getValue())) {
paramsReportConfigDataEO.setPullData(dataValue);
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(", ");
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.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 (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);
changeFlag = true;
}
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);
} 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;
}
ossFileService.updateFileInfo(oSSFileList);
dataValue = connectId;
newFileNames = ossFileService.getFileInfosByConnectId(connectId).stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
} 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;
}
}
}
}
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);
}
}
newConfigDataEOList.add(paramsReportConfigDataEO);
logCnContent.append(paramsReportConfigEO.getConfigName()).append("");
logEnContent.append(paramsReportConfigEO.getConfigName());
//******************这里是当前配置的循环结束了******************
//判断结尾是不是该配置的名字--如果是(说明该配置没有被改变)需要从logCnContent中删除该配置名字
@@ -1966,14 +2081,13 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
if (CollectionUtil.isNotEmpty(insertLogEOList)) {
paramsReportDetailLogEOService.saveBatch(insertLogEOList);
}
return paramsReportConfigDataEOService.saveOrUpdateBatch(newConfigDataEOList);
return paramsReportConfigDataEOService.saveBatch(newConfigDataEOList);
}
private ParamsReportConfigDataEO getConfigDataEOByConfigIdAndCollectManifestId(String configId, String collectManifestId, List<ParamsReportConfigDataEO> paramsReportConfigDataEOList) {
private ParamsReportConfigDataEO getConfigDataEOByConfigIdAndCollectManifestId(String configId, String collectManifestId, List<ParamsReportConfigDataEO> paramsReportConfigDataEOList,String configDataId) {
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());
if (CollectionUtil.isNotEmpty(configDataEOList)) {
return configDataEOList.get(0);
@@ -29,6 +29,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -55,6 +56,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
@Autowired
private ICertCategoryParamsInfoEOService certCategoryParamsInfoEOService;
/**
* 分页列表查询
*
@@ -338,4 +340,68 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
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;
/**控件类型*/
@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 = "控件类型")
private String controlType;
@@ -15,12 +15,12 @@ public enum ControlTypeEnum {
PULL_SINGLE("下拉单选","Pull single","2"),
PULL_MORE("下拉多选","Pull more","3"),
FILE("附件","File","4"),
TEXT_PULL_SINGLE("文本+下拉单选","Text+Pull single","5"),
TEXT_PULL_MORE("文本+下拉多选","Text+Pull more","6"),
TEXT_PULL_SINGLE("下拉单选+文本","Pull single+Text","5"),
TEXT_PULL_MORE("下拉多选+文本","Pull more+Text","6"),
TEXT_FILE("文本+附件","Text+File","7"),
PULL_SINGLE_FILE("下拉单选+附件","Pull single+File","8"),
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");
String name;
+3 -3
View File
@@ -1088,12 +1088,12 @@ module.exports = {
NDropdownradio: 'Pull single',
NDropdownmultipleselection: 'Pull more',
Nenclosure: 'File',
Atext: 'Text+Pull single',
Btext: 'Text+Pull more',
Atext: 'Pull single+Text',
Btext: 'Pull more+Text',
Ctext: 'Text+File',
Dtext: 'Pull single+File',
Etext: 'Pull more+File',
Ftext: 'Text+Pull single+File',
Ftext: 'Pull single+Text+File',
Gtext: 'Title',
Nnothing: 'Null',
Nchinese: 'Chinese',
+3 -3
View File
@@ -1100,12 +1100,12 @@ module.exports = {
NDropdownradio: '下拉单选',
NDropdownmultipleselection: '下拉多选',
Nenclosure: '附件',
Atext: '文本+下拉单选',
Btext: '文本+下拉多选',
Atext: '下拉单选+文本',
Btext: '下拉多选+文本',
Ctext: '文本+附件',
Dtext: '下拉单选+附件',
Etext: '下拉多选+附件',
Ftext: '文本+下拉单选+附件',
Ftext: '下拉单选+文本+附件',
Gtext: '标题',
Nnothing: '无',
Nchinese: '中文',
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 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>
</a-table>
</div>
@@ -725,6 +728,13 @@
this.pageNohistory = 1
this.visible = false
},
collectionForm(){
this.getTableList()
},
consolidateData(){
this.dataSource = [...this.dataSource]
console.log(this.dataSource)
},
getAndUserId(result) {
let query = {
paramsManifestId: this.$route.query.id,
@@ -785,7 +795,7 @@
align: 'left',
ellipsis: true,
sorter: res.sort,
width: 500
width: 600
})
num++
this.content.push(res)
@@ -793,6 +803,7 @@
customRender: 'detailClick',
title: 'titleName' + num
}
console.log( this.content," this.content this.content this.content this.content this.content")
// 非配置列
} else {
this.columns.push({
@@ -857,6 +868,7 @@
})
},
getTableListReset() {
this.formInline = {}
this.queryParamQuery = {}
let params = {
@@ -888,13 +900,24 @@
if (this.currentPersonRole !== 'dre') {
res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => {
itemLi.isLock = 1
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
for (const key in Obj[item].paramsConfigData){
Obj[item].paramsConfigData[key].forEach((itemLi) =>
{
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)
@@ -903,11 +926,18 @@
res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => {
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
for (const key in Obj[item].paramsConfigData){
Obj[item].paramsConfigData[key].forEach((itemLi) => {
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)
@@ -987,34 +1017,56 @@
// })
let tt = []
if (this.currentPersonRole !== 'dre') {
console.log(res.result.records, 'res.result.records')
res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
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(',')
}
})
for (const key in Obj[item].paramsConfigData){
Obj[item].paramsConfigData[key].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(',')
}
})
}
// 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)
})
} else {
res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => {
if (itemLi.type === 'pull_more') {
itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
}
})
for (const key in Obj[item].paramsConfigData){
Obj[item].paramsConfigData[key].forEach((itemLi) => {
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)
@@ -58,7 +58,7 @@
<!-- </span>-->
<!-- </span>-->
<span slot="detailClick" slot-scope="text,record">
<collection-type :detailDate='text'/>
<collection-type @consolidateData="consolidateData" :detailDate='text'/>
</span>
</a-table>
</div>
@@ -301,6 +301,7 @@
detailDateList: [],
selectedRowKeys: [],
selectedRowrowValue: [],
description:'',
dataSource: [],
pageNo: 1,
pageSize: 100,
@@ -683,13 +684,24 @@
if (this.currentPersonRole !== 'dre') {
res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => {
itemLi.isLock = 1
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
for (const key in Obj[item].paramsConfigData){
Obj[item].paramsConfigData[key].forEach((itemLi) =>
{
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)
@@ -698,11 +710,18 @@
res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => {
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
for (const key in Obj[item].paramsConfigData){
Obj[item].paramsConfigData[key].forEach((itemLi) => {
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)
@@ -723,6 +742,9 @@
cancleoperationFailed() {
this.selectedRowKeys = []
},
consolidateData(){
this.dataSource = [...this.dataSource]
},
getTableList(currentPersonRole) {
console.log(this.url.tableList)
let paramsManifestid
@@ -766,28 +788,56 @@
// })
let tt = []
if (this.currentPersonRole !== 'dre') {
console.log(res.result.records, 'res.result.records')
res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => {
itemLi.isLock = 1
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
for (const key in Obj[item].paramsConfigData){
Obj[item].paramsConfigData[key].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(',')
}
})
}
// 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)
})
} else {
res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
Obj[item].list.forEach((itemLi) => {
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
})
for (const key in Obj[item].paramsConfigData){
Obj[item].paramsConfigData[key].forEach((itemLi) => {
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)
@@ -73,12 +73,20 @@ import { mapGetters } from 'vuex'
this.containerId = 'container-ty-' + new Date().getTime()
},
mounted() {
this.detailDate.list.forEach((item) => {
if (item.type === 'file') {
this.template.templateId = item.templateId
this.template.templateName = item.templateName
}
})
for (const key in this.detailDate.paramsConfigData){
this.detailDate.paramsConfigData[key].forEach((item) => {
if (item.type === 'file') {
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')
this.cut = ''
if (long && long == 'zh-cn') {
@@ -78,7 +78,8 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24" v-if='combineFlag'>
<!-- v-if='combineFlag'-->
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
@@ -316,34 +316,69 @@
data.forEach(res => {
selectedRowKeysValue.push(res)
})
console.log(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 !== 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(',')
}
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()
// console.log(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 !== 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(',')
// }
// 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()
// }
// }
// }
// }
// }
// 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
postDateobj.remarks = selectedRowKeysValue[i].remarks
postDate.push(postDateobj)
}
let configDataList = { configDataList: postDate }
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
// return
if (configDataList && configDataList.length > 0) {
configDataList.forEach(res => {
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(',')
}
})
})
}
})
})
}
this.textLoading = true
let query = {
...configDataList,
configDataList: configDataList,
paramsManifestId: this.$route.query.id
}
postAction('/report/detail/save', query).then((res) => {
@@ -56,45 +56,56 @@
<!-- </div>-->
<!-- </a-col>-->
<template v-if="toggleSearchStatus">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('dre')">
<span>{{$t('dre')}}</span>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('NareaOfResponsibility')">
<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>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('dre')"
v-model="formInline.dre"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('sdt')">
<span>{{$t('sdt')}}</span>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('dre')">
<span>{{$t('dre')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('dre')"
v-model="formInline.dre"></a-input>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('sdt')"
v-model="formInline.sdt"></a-input>
</div>
</a-col>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<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>
<!-- <a-col :md="6" :sm="8">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text" :title="$t('status')">-->
<!-- <span>{{$t('status')}}</span>-->
<!-- </div>-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('status')"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- v-model="formInline.state">-->
<!-- <a-select-option v-for="(item, key) in statusList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name}}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :md="6" :sm="8">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text" :title="$t('status')">-->
<!-- <span>{{$t('status')}}</span>-->
<!-- </div>-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('status')"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- v-model="formInline.state">-->
<!-- <a-select-option v-for="(item, key) in statusList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name}}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </div>-->
<!-- </a-col>-->
<span style="float: right;overflow: hidden;margin-right: 11px"
class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
@@ -130,11 +141,11 @@
<a-icon type="plus"/>
{{$t('addTo')}}
</div>
<!-- &lt;!&ndash; 下发收集 &ndash;&gt;-->
<!-- <div @click="distributionAndCollectionJurisdiction" class="operator-text-title">-->
<!-- <a-icon type="solution"/>-->
<!-- {{$t('distributionAndCollection')}}-->
<!-- </div>-->
<!-- &lt;!&ndash; 下发收集 &ndash;&gt;-->
<!-- <div @click="distributionAndCollectionJurisdiction" class="operator-text-title">-->
<!-- <a-icon type="solution"/>-->
<!-- {{$t('distributionAndCollection')}}-->
<!-- </div>-->
<!-- 导出-->
<div @click="handleExport" class="operator-text-title" v-if='currentPersonRole == "homo"'>
<a-icon type="export" :rotate="-90"/>
@@ -161,25 +172,28 @@
{{$t('Updateparametercolumn')}}
</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"/>
{{$t('SynchronousReportLibrary')}}
</div>
<!-- 截止时间-->
<!-- <div @click="TaskCutOffTimeLibrary" class="operator-text-title">-->
<!-- <a-icon type="bulb"/>-->
<!-- {{$t('TaskCutOffTime')}}-->
<!-- </div>-->
<!-- <div @click="TaskCutOffTimeLibrary" class="operator-text-title">-->
<!-- <a-icon type="bulb"/>-->
<!-- {{$t('TaskCutOffTime')}}-->
<!-- </div>-->
<!-- 批量删除-->
<div @click="handleDelJurisdiction" class="operator-text-title" v-if='currentPersonRole == "homo"'>
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</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"/>
{{$t('bringInTheProjectInterface')}}
</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"/>
{{$t('Adjustareasofresponsibility')}}
</div>
@@ -189,13 +203,15 @@
{{$t('Assignedby')}}
</div>
</template>
<!-- @click='morepop'-->
<div class="operator-text" style="position: relative " v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
<!-- @click='morepop'-->
<div class="operator-text" style="position: relative "
v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
</div>
</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"/>
{{$t('distributionAndCollection')}}
</div>
@@ -233,7 +249,8 @@
</div>
<!-- 导入-->
<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 @click="handleExportDre" class="operator-text"
@@ -244,7 +261,7 @@
<!-- 强制撤回-->
<div @click="compulsoryWithdrawaljurisdiction" class="operator-text"
v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
<a-icon type="undo":rotate="90"/>
<a-icon type="undo" :rotate="90"/>
{{$t('CompulsoryWithdrawal')}}
</div>
@@ -258,9 +275,9 @@
</div>
<div style="width: 100%">
<!-- 表格-10控件-->
<!-- :queryParamQuery='queryParamQuery'-->
<!-- :queryParamQuery='queryParamQuery'-->
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest' @rowValue='rowValue'
:formInline='formInline' :currentPersonRole='currentPersonRole'
:formInline='formInline' :currentPersonRole='currentPersonRole'
@getDataSource="getDataSource"
@handlePreservation="handlePreservation"
@value='value'
@@ -323,27 +340,28 @@
<!-- 认证分配填写人--->
<a-modal v-model="areaVisibleAssignedbyhomo" :title="$t('Assignedby')" width='950px' :footer="null">
<assigned-by-homo v-if='areaVisibleAssignedbyhomo' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList'
@GetgetLoginUserType='GetgetLoginUserType'
@areaVisibleAssignedbyflaghomo='areaVisibleAssignedbyflaghomo' @areaVisible='areaVisibleAssignedbyhomo = false'/>
@GetgetTableList='GetgetTableList'
@GetgetLoginUserType='GetgetLoginUserType'
@areaVisibleAssignedbyflaghomo='areaVisibleAssignedbyflaghomo'
@areaVisible='areaVisibleAssignedbyhomo = false'/>
</a-modal>
<!-- 下发收集--->
<!-- <a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('distributionAndCollection')" width='400px' :footer="null">-->
<task-cut-off-time ref='areaVisibleTaskCutOffTime' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList'
@areaVisibleTaskCutOffTimeflag='areaVisibleTaskCutOffTimeflag'/>
<!-- </a-modal>-->
<!-- <a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('distributionAndCollection')" width='400px' :footer="null">-->
<task-cut-off-time ref='areaVisibleTaskCutOffTime' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList'
@areaVisibleTaskCutOffTimeflag='areaVisibleTaskCutOffTimeflag'/>
<!-- </a-modal>-->
<!-- 一键下发收集--->
<!-- <a-modal v-model="OneclickCollection" :title="$t('OneclickCollection')" width='400px' :footer="null">-->
<task-time ref='OneclickCollection' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList'
@areaVisibleTaskCutOffTimeAll='areaVisibleTaskCutOffTimeAll'/>
<!-- </a-modal>-->
<!-- 调整责任领域-->
<!-- <a-modal v-model="OneclickCollection" :title="$t('OneclickCollection')" width='400px' :footer="null">-->
<task-time ref='OneclickCollection' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList'
@areaVisibleTaskCutOffTimeAll='areaVisibleTaskCutOffTimeAll'/>
<!-- </a-modal>-->
<!-- 调整责任领域-->
<a-modal v-model="Adjustareasofrespon" :title="$t('Adjustareasofresponsibility')" width='620px' :footer="null">
<adjustarea-sofrespon v-if='Adjustareasofrespon' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList'
@AdjustareasofresponAll='AdjustareasofresponAll'/>
@GetgetTableList='GetgetTableList'
@AdjustareasofresponAll='AdjustareasofresponAll'/>
</a-modal>
<!-- 引用参数--->
<a-modal v-model="areaVisiblereferenceparameter" :title="$t('referenceparameter')" width='650px' :footer="null">
@@ -373,9 +391,9 @@
<parameter-column v-if='parametercolumn' @drawerhandleCancel='drawerhandleCancel'
@GetgetTableList='GetgetTableList'
@GetgetHeader='GetgetHeader'
:templateTitle='templatetitle'
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url'
:projectId='this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id'>
:templateTitle='templatetitle'
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url'
:projectId='this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id'>
</parameter-column>
</a-drawer>
@@ -444,7 +462,8 @@
<!-- 认证工程师-提示-->
<div style='font-size: 18px;text-align: center' v-if='NoEngineer === 1'>
{{ 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">
'{{$t('CollectionInitiated')}}'、'{{$t('ReturnedPerson')}}'{{$t('or')}}'{{$t('alteration')}}'
@@ -484,7 +503,7 @@
<p style='display: inline; color: red'>'{{$t('ReturnedEngineer')}}'</p>
</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>
{{$t('or')}}
<p style='display: inline; color: red'>'{{$t('CollectionInitiated')}}'</p>
@@ -550,47 +569,47 @@
{
value: '1',
title: this.$t('CollectionInitiated'),
key:'1',
key: '1'
},
{
value: '2',
title: this.$t('handledInterface'),
key:'2',
key: '2'
},
{
value: '3',
title: this.$t('ReturnedPerson'),
key:'3',
key: '3'
},
{
value: '4',
title: this.$t('completed'),
key:'4',
key: '4'
},
{
value: '5',
title: this.$t('Filledreturn'),
key:'5',
key: '5'
},
{
value: '6',
title: this.$t('Submitted'),
key:'6',
key: '6'
},
{
value: '7',
title: this.$t('ReturnedEngineer'),
key:'7',
key: '7'
},
{
value: '8',
title: this.$t('SynchronizedLibrary'),
key:'8',
key: '8'
},
{
value: '9',
title: this.$t('alteration'),
key:'9',
key: '9'
}
]
return {
@@ -682,12 +701,12 @@
value: 'dre',
text: this.$t('dre'),
dictCode: 'dre'//只要 dictCode 有值无论 type 是什么都显示为字典下拉框
},
}
],
selectedRowKeys: [],
textLoading: false,
formInline: {},
queryParamQuery:{},
queryParamQuery: {},
url: {
tableHeader: 'params/collectManifest/getHeader',
tableList: 'params/collectManifest/list',
@@ -704,7 +723,7 @@
configureareaVisible: false, // 配置的彈框
pageNo: 1,
pageSize: 10,
rolename:'',
rolename: '',
total: 0,
selectedRowKeysArray: '',
templatetitle: '',
@@ -721,9 +740,9 @@
areaVisibleAssignedby: false, // 分配填写人弹框
areaVisibleAssignedbyhomo: false, // 认证分配填写人弹框
areaVisibleTaskCutOffTime: false, // 截至时间弹框
OneclickCollection:false,
parametercolumn:false,
Adjustareasofrespon:false,
OneclickCollection: false,
parametercolumn: false,
Adjustareasofrespon: false,
areaVisiblereferenceparameter: false, // 引用参数弹框
areaVisibsynchronous: false, // 同步上报库弹框
visibleoperationFailed: false, // 数据失败的弹框
@@ -772,7 +791,8 @@
window.addEventListener('keyup',this.handleKeyup)
window.addEventListener('click',this.handleClick)
this.GetgetLoginUserType()
if(this.$route.query.type == '1'){
console.log(this.currentPersonRole)
if (this.$route.query.type == '1') {
this.handleOkRoleSwitching()
}
// clearTimeout(this.timeBatch)
@@ -867,9 +887,9 @@
})
},
handleOkRoleSwitching() {
if(this.$route.query.type == '1'){
if (this.$route.query.type == '1') {
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,
projectId: this.$route.query.projectId,
userId: this.userInfo().id
@@ -881,8 +901,8 @@
this.visibleRoleSwitching = false
this.confirmLoadingRoleSwitching = false
localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode ? this.formInlineRoleSwitching.roleSwitchingCode : this.$route.query.userType))
this.RoleType.forEach((item,index) => {
if(item.value == this.currentPersonRole){
this.RoleType.forEach((item, index) => {
if (item.value == this.currentPersonRole) {
this.rolename = item.label
}
})
@@ -892,7 +912,7 @@
this.$message.warning(this.$t('operationFailed'))
}
})
}else {
} else {
this.$refs.ruleFormRoleSwitching.validate(valid => {
if (valid) {
let query = {
@@ -909,8 +929,8 @@
this.visibleRoleSwitching = false
this.confirmLoadingRoleSwitching = false
localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode))
this.RoleType.forEach((item,index) => {
if(item.value == this.currentPersonRole){
this.RoleType.forEach((item, index) => {
if (item.value == this.currentPersonRole) {
this.rolename = item.label
}
})
@@ -926,7 +946,7 @@
},
roleSwitchingClick() {
this.visibleRoleSwitching = true
this.$nextTick(()=>{
this.$nextTick(() => {
this.formInlineRoleSwitching.roleSwitchingCode = this.currentPersonRole
this.$refs.ruleFormRoleSwitching.clearValidate()
clearTimeout(this.timeBatch)
@@ -966,7 +986,7 @@
GetgetTableList() {
this.$refs.CollectionTabel.getTableList(this.queryParamQuery)
},
GetgetHeader(){
GetgetHeader() {
this.$refs.CollectionTabel.getHeader()
},
// 错误数据的弹框
@@ -1065,7 +1085,7 @@
}
},
//导出
handleExport(){
handleExport() {
this.$message.success(this.$t('Intheexport'))
let long = localStorage.getItem('language')
this.cut = ''
@@ -1077,16 +1097,16 @@
let query = {
paramsManifestId: this.paramsManifest.id,
paramsTemplateId: this.$route.query.paramsTemplateId,
paramsTemplatePublishVersion:1,
paramsTemplatePublishVersion: 1,
cut: this.cut,
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'
downloadFile('/params/collectManifest/exportAll', name , query , this.selectClear)
downloadFile('/params/collectManifest/exportAll', name, query, this.selectClear)
},
//填写人导出
handleExportDre(){
handleExportDre() {
let long = localStorage.getItem('language')
this.cut = ''
if (long && long === 'zh-cn') {
@@ -1101,17 +1121,17 @@
...this.formInline,
...this.queryParamQuery,
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'
downloadFile('/params/collectManifest/exportDre', name , query , this.selectClear)
downloadFile('/params/collectManifest/exportDre', name, query, this.selectClear)
},
getList(){
getList() {
this.$refs.CollectionTabel.getTableList(this.queryParamQuery)
},
iVisible(val,num) {
iVisible(val, num) {
this.importsVisible = val
if (num == 1){
if (num == 1) {
eventBUs.$emit('searchGetData')
}
},
@@ -1134,7 +1154,7 @@
this.queryParamQuery = sqp
this.$refs.CollectionTabel.pageNo = 1
// 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.RoleType = val
this.RoleType.forEach((item,index) => {
if(item.value == this.currentPersonRole){
this.RoleType.forEach((item, index) => {
if (item.value == this.currentPersonRole) {
this.rolename = item.label
}
})
@@ -1453,18 +1473,18 @@
})
},
// 调整责任领域
AdjustareasofresponsibilityClick(){
if(this.selectedRowKeysValue.length == 0){
AdjustareasofresponsibilityClick() {
if (this.selectedRowKeysValue.length == 0) {
this.$message.warning(this.$t('selectLeastOne'))
}else{
} else {
this.Adjustareasofrespon = true
}
},
// 下发收集的权限
distributionAndCollectionJurisdiction() {
if(this.selectedRowKeysValue.length == 0){
if (this.selectedRowKeysValue.length == 0) {
this.$message.warning(this.$t('selectLeastOne'))
}else{
} else {
this.$refs.areaVisibleTaskCutOffTime.searchData()
}
// let homodistributionAndCollection = this.homodistributionAndCollection()
@@ -1482,7 +1502,7 @@
// 一键下发收集
defOneclickCollection() {
this.$refs.OneclickCollection.searchData()
// this.OneclickCollection = true
// this.OneclickCollection = true
},
// 引用参数列
Referenceparametercolumn() {
@@ -1490,12 +1510,12 @@
},
Updateparametercolumn() {
let data = JSON.parse(JSON.stringify(this.$refs.CollectionTabel.dataSource))
console.log(data)
let referencesCol = []
let postDate = []
let colunmnFlag = ''
data.forEach((item,index) => {
if(!item.referencesCol){
this.colunmnFlag = false
data.forEach((item, index) => {
if (!item.referencesCol) {
this.colunmnFlag = true
}
referencesCol.push({
@@ -1503,42 +1523,59 @@
id: item.id
})
})
if(this.colunmnFlag){
if (this.colunmnFlag) {
this.$message.warning(this.$t('columnfirst'))
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++) {
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 = 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()
}
}
configDataList.push({
id: referencesCol[i].id
})
let key = Object.keys(referencesCol[i].referencesCol.paramsConfigData)
let value = referencesCol[i].referencesCol.paramsConfigData
for (let j = 0; j < key.length; j++) {
let keyName = key[j]
for (let k = 0; k < value[keyName].length; k++) {
if (value[keyName][k].type == 'pull_more') {
value[keyName][k].dataValue = value[keyName][k].dataValue.join(',')
}
}
configDataList[i][keyName] = value[keyName]
}
postDateobj.id = referencesCol[i].id
postDate.push(postDateobj)
}
let configDataList = { configDataList: postDate }
let query = {
...configDataList,
configDataList: configDataList,
paramsManifestId: this.paramsManifest.id
}
postAction('/params/collectManifest/updateReferencesCol', query).then((res) => {
if (res.success) {
this.GetgetTableList()
this.$message.success(this.$t('OperationSuccessful'))
} else {
this.$message.warning(this.$t('operationFailed'))
this.$message.success(this.$t('OperationSuccessful'))
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
},
@@ -1630,41 +1667,75 @@
let selectedRowKeysValue = []
data.forEach(res => {
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)
}
})
console.log(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()
// 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()
// }
// }
// }
// }
// }
// 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
delete postDateobj.referencesCol
postDate.push(postDateobj)
}
console.log(postDate)
let configDataList = { configDataList: postDate }
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
if (num && num == 1) {
this.textLoading = true
// return
if (configDataList && configDataList.length > 0) {
configDataList.forEach(res => {
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 query = {
...configDataList,
// ...configDataList,
configDataList: configDataList,
paramsManifestId: this.paramsManifest.id
}
postAction('/params/collectManifest/save', query).then((res) => {
@@ -1720,34 +1791,92 @@
let _this = this
let postDate = []
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++) {
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
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]
}
}
}
}
}
// 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
postDate.push(postDateobj)
// configDataList.forEach(res => {
// 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) {
this.$message.warning(this.$t('selectLeastOne'))
} else {
@@ -1755,7 +1884,11 @@
this.$confirm({
content: _this.$t('Areyousureparameteritems'),
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) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.GetgetTableList()
@@ -1789,7 +1922,8 @@
return
}
let _this = this
let param = { ids: _array.join(','),
let param = {
ids: _array.join(','),
currentPersonRole: this.currentPersonRole,
paramsManifestId: this.$route.query.id
}
@@ -1847,9 +1981,9 @@
let _this = this
let param = { ids: _array.join(',') }
let url = ''
if(this.currentPersonRole == 'homo'){
if (this.currentPersonRole == 'homo') {
url = '/jero-boot/params/collectManifest/mandatoryWithdraw'
}else{
} else {
url = '/jero-boot/params/collectManifest/withdraw'
}
this.$confirm({
@@ -1893,8 +2027,8 @@
},
// 分配填写人
assignedBy() {
let sdtJurisdictionAssigned = this.sdtJurisdictionAssigned()
// 工程接口人
let sdtJurisdictionAssigned = this.sdtJurisdictionAssigned()
// 工程接口人
if (sdtJurisdictionAssigned == 1) {
this.areaVisibleAssignedby = true
} else if (sdtJurisdictionAssigned == 0) {
@@ -1936,10 +2070,10 @@
areaVisibleTaskCutOffTimeflag(val) {
this.$refs.CollectionTabel.getTableList(this.queryParamQuery)
},
areaVisibleTaskCutOffTimeAll(val){
areaVisibleTaskCutOffTimeAll(val) {
this.$refs.CollectionTabel.getTableList(this.queryParamQuery)
},
AdjustareasofresponAll(val){
AdjustareasofresponAll(val) {
console.log(val)
this.Adjustareasofrespon = val
this.$refs.CollectionTabel.getTableList(this.queryParamQuery)
@@ -1987,7 +2121,7 @@
handleDel() {
let param = {
ids: this.selectedRowKeysArray,
paramsManifestId:this.$route.query.id
paramsManifestId: this.$route.query.id
}
if (this.selectedRowKeys.length > 0) {
let _this = this
@@ -2100,6 +2234,7 @@
cursor: pointer;
border-radius: 4px;
}
.operator-text-title {
cursor: pointer;
margin-right: 22px;
@@ -2245,12 +2380,13 @@
}
}
}
.text-wraning{
.text-wraning {
word-break: break-word;
}
</style>
<style lang='less'>
.ant-popover-message-title{
margin-bottom: -30px;
}
.ant-popover-message-title {
margin-bottom: -30px;
}
</style>