Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+188
-39
@@ -35,6 +35,7 @@ import com.jero.modules.project.util.WordUtil;
|
|||||||
import com.jero.modules.split.common.ReadExcel;
|
import com.jero.modules.split.common.ReadExcel;
|
||||||
import com.jero.modules.system.entity.SysDictItem;
|
import com.jero.modules.system.entity.SysDictItem;
|
||||||
import com.jero.modules.system.service.ISysDictItemService;
|
import com.jero.modules.system.service.ISysDictItemService;
|
||||||
|
import org.apache.commons.codec.digest.DigestUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.poi.hssf.util.HSSFColor;
|
import org.apache.poi.hssf.util.HSSFColor;
|
||||||
@@ -762,21 +763,21 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
nowFile.mkdirs();
|
nowFile.mkdirs();
|
||||||
String fileName = fileOriName + ".docx";
|
String fileName = fileOriName + ".docx";
|
||||||
|
|
||||||
// 查询导出数据
|
|
||||||
List<Map> allParamsInfoList = queryForExportCustom(paramsReportDetailVO);
|
|
||||||
Map<String, String> params = allParamsInfoList.get(0);
|
|
||||||
List<Map<String, Object>> imgListAll = (List<Map<String, Object>>) allParamsInfoList.get(1).get("imgListAll");
|
|
||||||
|
|
||||||
String templateUrl = "";
|
|
||||||
ParamsExportTemplateEO paramsExportTemplateEO = paramsExportTemplateEOService.getById(paramsReportDetailVO.getExportTemplateId());
|
|
||||||
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(paramsExportTemplateEO.getFileConnectId());
|
|
||||||
if (CollectionUtil.isNotEmpty(ossFiles)) {
|
|
||||||
templateUrl = ossFiles.get(0).getUrl();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 替换模板中的占位符
|
// 替换模板中的占位符
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
// 查询导出数据
|
||||||
|
List<Map> allParamsInfoList = queryForExportCustom(paramsReportDetailVO);
|
||||||
|
Map<String, String> params = allParamsInfoList.get(0);
|
||||||
|
List<Map<String, Object>> imgListAll = (List<Map<String, Object>>) allParamsInfoList.get(1).get("imgListAll");
|
||||||
|
|
||||||
|
String templateUrl = "";
|
||||||
|
ParamsExportTemplateEO paramsExportTemplateEO = paramsExportTemplateEOService.getById(paramsReportDetailVO.getExportTemplateId());
|
||||||
|
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(paramsExportTemplateEO.getFileConnectId());
|
||||||
|
if (CollectionUtil.isNotEmpty(ossFiles)) {
|
||||||
|
templateUrl = ossFiles.get(0).getUrl();
|
||||||
|
}
|
||||||
|
|
||||||
// 拿取模板
|
// 拿取模板
|
||||||
String repFileName = fileName.replaceAll("/","_");
|
String repFileName = fileName.replaceAll("/","_");
|
||||||
wordOS = new FileOutputStream(fileNowPath + File.separator + repFileName);
|
wordOS = new FileOutputStream(fileNowPath + File.separator + repFileName);
|
||||||
@@ -788,16 +789,36 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
List<Map<String, Object>> fileListAll = (List<Map<String, Object>>) allParamsInfoList.get(2).get("fileListAll");
|
List<Map<String, Object>> fileListAll = (List<Map<String, Object>>) allParamsInfoList.get(2).get("fileListAll");
|
||||||
|
|
||||||
if (fileListAll != null && !fileListAll.isEmpty()) {
|
if (fileListAll != null && !fileListAll.isEmpty()) {
|
||||||
Map<String,String> paramsAfterFilter = WordUtil.filterParams(wordMLPackage, params);
|
Map<String,String> paramsAfterFilter = WordUtil.filterParams(wordMLPackage, params); // 过滤出需要导出的参数项
|
||||||
if (CollectionUtil.isNotEmpty(paramsAfterFilter)) {
|
if (CollectionUtil.isNotEmpty(paramsAfterFilter)) {
|
||||||
List<String> nioNumberList = paramsAfterFilter.keySet().stream().collect(Collectors.toList());
|
List<String> nioNumberList = paramsAfterFilter.keySet().stream().collect(Collectors.toList());
|
||||||
List<OSSFile> allRelevFileList = new ArrayList<>();
|
List<OSSFile> allRelevFileList = new ArrayList<>();
|
||||||
|
// 判断文件是否重复
|
||||||
for (Map<String, Object> fileMap : fileListAll) {
|
for (Map<String, Object> fileMap : fileListAll) {
|
||||||
for (Map.Entry map : fileMap.entrySet()) {
|
for (Map.Entry map : fileMap.entrySet()) {
|
||||||
String key = (String) map.getKey();
|
String key = (String) map.getKey();
|
||||||
List<OSSFile> fileList = (List<OSSFile>) map.getValue();
|
List<OSSFile> fileList = (List<OSSFile>) map.getValue();
|
||||||
|
|
||||||
if (nioNumberList.contains(key)) {
|
if (nioNumberList.contains(key)) {
|
||||||
allRelevFileList.addAll(fileList);
|
String newFileName = isRepeat(allRelevFileList, fileList.get(0));
|
||||||
|
if (!"".equals(newFileName) && !"old".equals(newFileName)) { // 文件名称重复 且文件内容不同
|
||||||
|
String configDataStr = params.get(key);
|
||||||
|
if (StringUtils.isNotEmpty(configDataStr)) {
|
||||||
|
if (configDataStr.contains("#")) {
|
||||||
|
String newConfigDataStr = configDataStr.substring(0, configDataStr.lastIndexOf("#")) + newFileName;
|
||||||
|
params.put(key, newConfigDataStr);
|
||||||
|
} else {
|
||||||
|
params.put(key, newFileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fileList.get(0).setFileName(newFileName);
|
||||||
|
allRelevFileList.addAll(fileList);
|
||||||
|
|
||||||
|
} else if ("".equals(newFileName)) { // 文件名称不重复
|
||||||
|
allRelevFileList.addAll(fileList);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -893,21 +914,21 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
nowFile.mkdirs();
|
nowFile.mkdirs();
|
||||||
String fileName = fileOriName + ".xlsx";
|
String fileName = fileOriName + ".xlsx";
|
||||||
|
|
||||||
// 查询导出数据
|
|
||||||
List<Map> allParamsInfoList = queryForExportCustom(paramsReportDetailVO);
|
|
||||||
HashMap<String, String> params = (HashMap<String, String>) allParamsInfoList.get(0);
|
|
||||||
List<Map<String, Object>> imgListAll = (List<Map<String, Object>>) allParamsInfoList.get(1).get("imgListAll");
|
|
||||||
|
|
||||||
String templateUrl = "";
|
|
||||||
ParamsExportTemplateEO paramsExportTemplateEO = paramsExportTemplateEOService.getById(paramsReportDetailVO.getExportTemplateId());
|
|
||||||
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(paramsExportTemplateEO.getFileConnectId());
|
|
||||||
if (CollectionUtil.isNotEmpty(ossFiles)) {
|
|
||||||
templateUrl = ossFiles.get(0).getUrl();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 替换模板中的占位符
|
// 替换模板中的占位符
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
// 查询导出数据
|
||||||
|
List<Map> allParamsInfoList = queryForExportCustom(paramsReportDetailVO);
|
||||||
|
HashMap<String, String> params = (HashMap<String, String>) allParamsInfoList.get(0);
|
||||||
|
List<Map<String, Object>> imgListAll = (List<Map<String, Object>>) allParamsInfoList.get(1).get("imgListAll");
|
||||||
|
|
||||||
|
String templateUrl = "";
|
||||||
|
ParamsExportTemplateEO paramsExportTemplateEO = paramsExportTemplateEOService.getById(paramsReportDetailVO.getExportTemplateId());
|
||||||
|
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(paramsExportTemplateEO.getFileConnectId());
|
||||||
|
if (CollectionUtil.isNotEmpty(ossFiles)) {
|
||||||
|
templateUrl = ossFiles.get(0).getUrl();
|
||||||
|
}
|
||||||
|
|
||||||
// 拿取模板
|
// 拿取模板
|
||||||
String repFileName = fileName.replaceAll("/","_");
|
String repFileName = fileName.replaceAll("/","_");
|
||||||
wordOS = new FileOutputStream(fileNowPath + File.separator + repFileName);
|
wordOS = new FileOutputStream(fileNowPath + File.separator + repFileName);
|
||||||
@@ -931,7 +952,25 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
String key = (String) map.getKey();
|
String key = (String) map.getKey();
|
||||||
List<OSSFile> fileList = (List<OSSFile>) map.getValue();
|
List<OSSFile> fileList = (List<OSSFile>) map.getValue();
|
||||||
if (nioNumberList.contains(key)) {
|
if (nioNumberList.contains(key)) {
|
||||||
allRelevFileList.addAll(fileList);
|
String newFileName = isRepeat(allRelevFileList, fileList.get(0));
|
||||||
|
if (!"".equals(newFileName) && !"old".equals(newFileName)) { // 文件名称重复 且文件内容不同
|
||||||
|
String configDataStr = params.get(key);
|
||||||
|
if (StringUtils.isNotEmpty(configDataStr)) {
|
||||||
|
if (configDataStr.contains("#")) {
|
||||||
|
String newConfigDataStr = configDataStr.substring(0, configDataStr.lastIndexOf("#")) + newFileName;
|
||||||
|
params.put(key, newConfigDataStr);
|
||||||
|
} else {
|
||||||
|
params.put(key, newFileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fileList.get(0).setFileName(newFileName);
|
||||||
|
allRelevFileList.addAll(fileList);
|
||||||
|
|
||||||
|
} else if ("".equals(newFileName)) { // 文件名称不重复
|
||||||
|
allRelevFileList.addAll(fileList);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1064,7 +1103,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
bis.close(); // 先开后关
|
bis.close(); // 先开后关
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Map<String, Object>> queryForExportNormal(ParamsReportDetailVO paramsReportDetailVO) {
|
private List<Map<String, Object>> queryForExportNormal(ParamsReportDetailVO paramsReportDetailVO) throws IOException {
|
||||||
List<String> idList = new ArrayList<>();
|
List<String> idList = new ArrayList<>();
|
||||||
if (StringUtils.isNotEmpty(paramsReportDetailVO.getIds())) {
|
if (StringUtils.isNotEmpty(paramsReportDetailVO.getIds())) {
|
||||||
idList = Arrays.asList(paramsReportDetailVO.getIds().split(","));
|
idList = Arrays.asList(paramsReportDetailVO.getIds().split(","));
|
||||||
@@ -1074,6 +1113,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
|
|
||||||
List<ParamsReportConfigEO> paramsConfigEOList = paramsReportConfigEOService.queryList(paramsReportDetailVO.getParamsManifestId()); // 查询所有配置列
|
List<ParamsReportConfigEO> paramsConfigEOList = paramsReportConfigEOService.queryList(paramsReportDetailVO.getParamsManifestId()); // 查询所有配置列
|
||||||
|
|
||||||
|
List<OSSFile> fileListAll = new ArrayList<>(); // 仅用于校验文件是否重复
|
||||||
// 查询配置列数据
|
// 查询配置列数据
|
||||||
for (Map<String, Object> record1 : dataList) {
|
for (Map<String, Object> record1 : dataList) {
|
||||||
|
|
||||||
@@ -1086,7 +1126,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
//不合并
|
//不合并
|
||||||
if ("1".equals(paramsReportDetailVO.getCombineFlag())) {
|
if ("1".equals(paramsReportDetailVO.getCombineFlag())) {
|
||||||
paramsConfigEOList = paramsConfigEOList.stream().filter(e->configIdList.contains(e.getId())).collect(Collectors.toList()); // 过滤出要导出的配置列
|
paramsConfigEOList = paramsConfigEOList.stream().filter(e->configIdList.contains(e.getId())).collect(Collectors.toList()); // 过滤出要导出的配置列
|
||||||
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
|
for (ParamsConfigEO paramsConfigEO : paramsConfigEOList) { // 参数配置
|
||||||
|
|
||||||
if (ControlTypeEnum.Title.getValue().equals(controlType)) {
|
if (ControlTypeEnum.Title.getValue().equals(controlType)) {
|
||||||
record1.put(paramsConfigEO.getId(), titleDefaultValue);
|
record1.put(paramsConfigEO.getId(), titleDefaultValue);
|
||||||
@@ -1103,9 +1143,24 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||||
configDataBuilder.append(ossFileList.get(0).getFileName()).append("#");
|
// 不合并导出时 验证文件名是否相同,相同进一步验证文件内容是否相同,不同时重命名文件
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
fileList.addAll(ossFileList);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1116,7 +1171,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
|
|
||||||
record1.put(paramsConfigEO.getId(), configData);
|
record1.put(paramsConfigEO.getId(), configData);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
} else if ("2".equals(paramsReportDetailVO.getCombineFlag())) { // 合并
|
} else if ("2".equals(paramsReportDetailVO.getCombineFlag())) { // 合并
|
||||||
String configData = "";
|
String configData = "";
|
||||||
@@ -1136,9 +1191,35 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) {
|
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) {
|
||||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsReportConfigDataEO.getFileConnectId());
|
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsReportConfigDataEO.getFileConnectId());
|
||||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||||
fileNameList.add(ossFileList.get(0).getFileName());
|
// 合并导出时 验证文件名是否相同,相同进一步验证文件内容是否形同,不同时重命名文件
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
} 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);
|
||||||
|
fileList.addAll(ossFileList);
|
||||||
|
fileListAll.addAll(ossFileList);
|
||||||
|
}
|
||||||
|
|
||||||
fileList.addAll(ossFileList);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1151,7 +1232,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
configDataBuilder.append(textDatas).append("#");
|
configDataBuilder.append(textDatas).append("#");
|
||||||
}
|
}
|
||||||
if (CollectionUtil.isNotEmpty(fileNameList)) {
|
if (CollectionUtil.isNotEmpty(fileNameList)) {
|
||||||
fileNameList = fileNameList.stream().distinct().collect(Collectors.toList());
|
// fileNameList = fileNameList.stream().distinct().collect(Collectors.toList());
|
||||||
configDataBuilder.append(StringUtils.join(fileNameList, paramsReportDetailVO.getSeparator())).append("#");
|
configDataBuilder.append(StringUtils.join(fileNameList, paramsReportDetailVO.getSeparator())).append("#");
|
||||||
}
|
}
|
||||||
configData = configDataBuilder.toString();
|
configData = configDataBuilder.toString();
|
||||||
@@ -1168,7 +1249,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
return dataList;
|
return dataList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Map> queryForExportCustom(ParamsReportDetailVO paramsReportDetailVO) {
|
private List<Map> queryForExportCustom(ParamsReportDetailVO paramsReportDetailVO) throws IOException {
|
||||||
paramsReportDetailVO.setSeparator("*"); // 设置分隔符
|
paramsReportDetailVO.setSeparator("*"); // 设置分隔符
|
||||||
|
|
||||||
List<String> idList = new ArrayList<>();
|
List<String> idList = new ArrayList<>();
|
||||||
@@ -1194,8 +1275,8 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
String controlType = (String) record1.get("control_type");
|
String controlType = (String) record1.get("control_type");
|
||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
|
if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
|
||||||
List<OSSFile> fileList = new ArrayList<>();
|
List<OSSFile> fileList = new ArrayList<>(); // 存放当前编号下的非图片文件
|
||||||
List<OSSFile> imgFileList = new ArrayList<>();
|
List<OSSFile> imgFileList = new ArrayList<>(); // 存放当前编号下的图片文件
|
||||||
|
|
||||||
// 合并配置数据
|
// 合并配置数据
|
||||||
String configData = "";
|
String configData = "";
|
||||||
@@ -1208,7 +1289,8 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
.map(ParamsReportConfigDataEO::getPullData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); // 整合下拉数据
|
.map(ParamsReportConfigDataEO::getPullData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); // 整合下拉数据
|
||||||
|
|
||||||
List<String> fileNameList = new ArrayList<>();
|
List<String> fileNameList = new ArrayList<>();
|
||||||
for (ParamsReportConfigDataEO paramsReportConfigDataEO : paramsReportConfigDataEOS) { // 获取”导出文件夹“下的文件
|
if (CollectionUtil.isNotEmpty(paramsReportConfigDataEOS)) {
|
||||||
|
ParamsReportConfigDataEO paramsReportConfigDataEO = paramsReportConfigDataEOS.get(0); // 获取”导出文件夹“下的文件
|
||||||
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) {
|
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) {
|
||||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsReportConfigDataEO.getFileConnectId());
|
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsReportConfigDataEO.getFileConnectId());
|
||||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||||
@@ -1561,6 +1643,73 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean compareFileContent(String fileUrl1, String fileUrl2) throws IOException {
|
||||||
|
if (CosBootUtil.doesObjectExist(fileUrl1) && CosBootUtil.doesObjectExist(fileUrl2)){
|
||||||
|
try (InputStream file1 = CosBootUtil.download(fileUrl1);
|
||||||
|
InputStream file2 = CosBootUtil.download(fileUrl2);) {
|
||||||
|
|
||||||
|
String md5Hex1 = DigestUtils.md5Hex(file1);
|
||||||
|
String md5Hex2 = DigestUtils.md5Hex(file2);
|
||||||
|
|
||||||
|
return md5Hex1.equals(md5Hex2);
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
throw new IOException(e.getMessage());
|
||||||
|
}
|
||||||
|
} else { // 有文件不存在时,也视为不相同
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断导出文件是否重复
|
||||||
|
private String isRepeat(List<OSSFile> fileList, OSSFile ossFile) throws IOException {
|
||||||
|
String fileName = ossFile.getFileName();
|
||||||
|
String currentFileUrl = ossFile.getUrl();
|
||||||
|
|
||||||
|
List<OSSFile> result = fileList.stream().filter(e-> fileName.equals(e.getFileName())).collect(Collectors.toList());
|
||||||
|
if (result.size() > 0) { // 文件名重复
|
||||||
|
String fileUrl = result.get(0).getUrl();
|
||||||
|
if (!compareFileContent(currentFileUrl, fileUrl)) { // 文件内容不同
|
||||||
|
List<OSSFile> sameFileList = fileList.stream().filter(e-> compareFileName(fileName, e.getFileName())).collect(Collectors.toList());
|
||||||
|
int count = sameFileList.size();
|
||||||
|
if (count > 0) {
|
||||||
|
// 判断 和重命名的文件 内容是否相同
|
||||||
|
for (OSSFile file : sameFileList) {
|
||||||
|
if (compareFileContent(currentFileUrl, file.getUrl())) {
|
||||||
|
return file.getFileName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 遍历完 没相同的 再重命名
|
||||||
|
String newFileName = fileName.substring(0, fileName.lastIndexOf(".")) + (count + 1) + fileName.substring(fileName.lastIndexOf("."));
|
||||||
|
return newFileName;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
String newFileName = fileName.substring(0, fileName.lastIndexOf(".")) + (count + 1) + fileName.substring(fileName.lastIndexOf("."));
|
||||||
|
return newFileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else { // 文件内容相同
|
||||||
|
return "old";
|
||||||
|
}
|
||||||
|
|
||||||
|
} else { // 文件名不重复
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 比较文件名,如 currentFileName: 文件.pdf ; fileName: 文件1.pdf
|
||||||
|
private boolean compareFileName(String currentFileName, String fileName) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(fileName.substring(0, fileName.lastIndexOf(".") - 1));
|
||||||
|
sb.append(fileName.substring(fileName.lastIndexOf("."), fileName.length()));
|
||||||
|
if (currentFileName.equals(sb.toString())) {
|
||||||
|
return true;
|
||||||
|
} else { // 当 currentFileName = fileName 时 也返回false
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实体对象转成Map
|
* 实体对象转成Map
|
||||||
* @param obj 实体对象
|
* @param obj 实体对象
|
||||||
|
|||||||
+2
-4
@@ -137,8 +137,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
// @RequiresPermissions("params:paramsInfo:add")
|
// @RequiresPermissions("params:paramsInfo:add")
|
||||||
public Result<?> add(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
|
public Result<?> add(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
|
||||||
if (StringUtils.isEmpty(paramsInfoEO.getCertCategory())
|
if (StringUtils.isEmpty(paramsInfoEO.getCertCategory())) {
|
||||||
&& !ControlTypeEnum.Title.getValue().equals(paramsInfoEO.getControlType())) {
|
|
||||||
return Result.error("认证类别不能为空!");
|
return Result.error("认证类别不能为空!");
|
||||||
}
|
}
|
||||||
boolean isSuccess = paramsInfoEOService.add(paramsInfoEO);
|
boolean isSuccess = paramsInfoEOService.add(paramsInfoEO);
|
||||||
@@ -160,8 +159,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
@PostMapping(value = "/edit")
|
@PostMapping(value = "/edit")
|
||||||
@RequiresPermissions("params:paramsInfo:edit")
|
@RequiresPermissions("params:paramsInfo:edit")
|
||||||
public Result<?> edit(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
|
public Result<?> edit(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
|
||||||
if (StringUtils.isEmpty(paramsInfoEO.getCertCategory())
|
if (StringUtils.isEmpty(paramsInfoEO.getCertCategory())) {
|
||||||
&& !ControlTypeEnum.Title.getValue().equals(paramsInfoEO.getControlType())) {
|
|
||||||
return Result.error("认证类别不能为空!");
|
return Result.error("认证类别不能为空!");
|
||||||
}
|
}
|
||||||
boolean isSuccess = paramsInfoEOService.editById(paramsInfoEO);
|
boolean isSuccess = paramsInfoEOService.editById(paramsInfoEO);
|
||||||
|
|||||||
+7
-11
@@ -1311,6 +1311,13 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
errorMsg += (String)resultMap.get("errorMsg");
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
countError += (int)resultMap.get("countError");
|
countError += (int)resultMap.get("countError");
|
||||||
|
|
||||||
|
// 认证类别
|
||||||
|
// 来源:认证类别sheet页
|
||||||
|
resultMap = validateMustAndLength(nioCertCategoryMap.get(nioNumber), "认证类别", "Cert Category", IsMustEnum.YES.getValue(), "1000", false, cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
dto.setCertCategory(nioCertCategoryMap.get(nioNumber));
|
||||||
|
|
||||||
// String certCategory = dto.getCertCategory();
|
// String certCategory = dto.getCertCategory();
|
||||||
// resultMap = validateMustAndLength(certCategory, "认证类别", "cert category", IsMustEnum.YES.getValue(), "1000", false, cut);
|
// resultMap = validateMustAndLength(certCategory, "认证类别", "cert category", IsMustEnum.YES.getValue(), "1000", false, cut);
|
||||||
// errorMsg += (String)resultMap.get("errorMsg");
|
// errorMsg += (String)resultMap.get("errorMsg");
|
||||||
@@ -1332,17 +1339,6 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
controlType = (String)resultMap.get("value");
|
controlType = (String)resultMap.get("value");
|
||||||
dto.setControlType(controlType);
|
dto.setControlType(controlType);
|
||||||
|
|
||||||
// 认证类别
|
|
||||||
// 来源:认证类别sheet页
|
|
||||||
if (ControlTypeEnum.Title.getValue().equals(controlType)) {
|
|
||||||
resultMap = validateMustAndLength(nioCertCategoryMap.get(nioNumber), "认证类别", "Cert Category", IsMustEnum.NO.getValue(), "1000", false, cut);
|
|
||||||
} else {
|
|
||||||
resultMap = validateMustAndLength(nioCertCategoryMap.get(nioNumber), "认证类别", "Cert Category", IsMustEnum.YES.getValue(), "1000", false, cut);
|
|
||||||
}
|
|
||||||
errorMsg += (String)resultMap.get("errorMsg");
|
|
||||||
countError += (int)resultMap.get("countError");
|
|
||||||
dto.setCertCategory(nioCertCategoryMap.get(nioNumber));
|
|
||||||
|
|
||||||
// 控件备选值
|
// 控件备选值
|
||||||
String controlValues = dto.getControlValues();
|
String controlValues = dto.getControlValues();
|
||||||
if (ControlTypeEnum.PULL_SINGLE.getValue().equals(controlType)
|
if (ControlTypeEnum.PULL_SINGLE.getValue().equals(controlType)
|
||||||
|
|||||||
@@ -178,6 +178,7 @@
|
|||||||
v-model="item.val"
|
v-model="item.val"
|
||||||
:options="item.options"
|
:options="item.options"
|
||||||
allowClear
|
allowClear
|
||||||
|
class="item-input"
|
||||||
:placeholder="$t('pleaseSelect')"
|
:placeholder="$t('pleaseSelect')"
|
||||||
:mode="allowMultiple(item)?'multiple':''"
|
:mode="allowMultiple(item)?'multiple':''"
|
||||||
/>
|
/>
|
||||||
@@ -191,12 +192,14 @@
|
|||||||
<a-time-picker v-else-if="item.type==='time'"
|
<a-time-picker v-else-if="item.type==='time'"
|
||||||
:value="item.val ? moment(item.val,'HH:mm:ss') : null" format="HH:mm:ss"
|
:value="item.val ? moment(item.val,'HH:mm:ss') : null" format="HH:mm:ss"
|
||||||
style="width: 100%;display: inline-block" @change="(time,value)=>item.val=value"/>
|
style="width: 100%;display: inline-block" @change="(time,value)=>item.val=value"/>
|
||||||
<a-input-number v-else-if=" item.type=='int'||item.type=='number' " style="width: 100%" :placeholder="$t('pleaseSelect')+$t('numericalValue')" v-model="item.val"/>
|
<a-input-number v-else-if=" item.type=='int'||item.type=='number' "
|
||||||
|
class="item-input"
|
||||||
|
style="width: 100%" :placeholder="$t('pleaseSelect')+$t('numericalValue')" v-model="item.val"/>
|
||||||
<a-select v-else-if="item.type=='switch'" :placeholder="$t('pleaseSelect')" v-model="item.val">
|
<a-select v-else-if="item.type=='switch'" :placeholder="$t('pleaseSelect')" v-model="item.val">
|
||||||
<a-select-option value="Y">{{$t('yes')}}</a-select-option>
|
<a-select-option value="Y">{{$t('yes')}}</a-select-option>
|
||||||
<a-select-option value="N">{{$t('not')}}</a-select-option>
|
<a-select-option value="N">{{$t('not')}}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
<a-input v-else v-model="item.val" :placeholder="$t('EnterValue')"/>
|
<a-input v-else v-model="item.val" class="item-input" :placeholder="$t('EnterValue')"/>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
<a-col :md="4" :xs="0" style="margin-bottom: 12px;">
|
<a-col :md="4" :xs="0" style="margin-bottom: 12px;">
|
||||||
@@ -748,4 +751,10 @@
|
|||||||
::v-deep .ant-modal-body{
|
::v-deep .ant-modal-body{
|
||||||
overflow-y: visible!important;
|
overflow-y: visible!important;
|
||||||
}
|
}
|
||||||
|
.item-input{
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
::v-deep .ant-select{
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -87,6 +87,10 @@ export const JeroListMixin = {
|
|||||||
getAction(this.url.list, params).then((res) => {
|
getAction(this.url.list, params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||||
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
|
this.loadData(1)
|
||||||
|
return
|
||||||
|
}
|
||||||
this.dataSource = res.result.records||res.result;
|
this.dataSource = res.result.records||res.result;
|
||||||
if(res.result.total)
|
if(res.result.total)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -261,6 +261,11 @@
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.getList()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.dataSource = res.result.records || []
|
this.dataSource = res.result.records || []
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
@@ -126,6 +126,11 @@
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.getInfoList, query).then((res) => {
|
getAction(this.url.getInfoList, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.getList()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.conList = res.result.records
|
this.conList = res.result.records
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
+5
@@ -241,6 +241,11 @@
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.getList()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.dataSource = res.result.records || []
|
this.dataSource = res.result.records || []
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
+5
@@ -183,6 +183,11 @@
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.getInfoList, query).then((res) => {
|
getAction(this.url.getInfoList, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.getList()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.conList = res.result.records
|
this.conList = res.result.records
|
||||||
if (this.conList && this.conList.length > 0) {
|
if (this.conList && this.conList.length > 0) {
|
||||||
this.conList.forEach(val => {
|
this.conList.forEach(val => {
|
||||||
|
|||||||
+5
@@ -131,6 +131,11 @@
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.getInfoList, query).then((res) => {
|
getAction(this.url.getInfoList, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.getList()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.conList = res.result.records
|
this.conList = res.result.records
|
||||||
if (this.conList && this.conList.length > 0) {
|
if (this.conList && this.conList.length > 0) {
|
||||||
this.conList.forEach(val => {
|
this.conList.forEach(val => {
|
||||||
|
|||||||
+1
-1
@@ -206,7 +206,7 @@
|
|||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
this.pageNo = res.result.current - 1
|
this.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -194,7 +194,7 @@
|
|||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
this.pageNo = res.result.current - 1
|
this.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -331,6 +331,11 @@
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.getList()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.dataSource = res.result.records || []
|
this.dataSource = res.result.records || []
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
@@ -164,6 +164,11 @@
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
postAction(`collection/onlCgformCollection/page`, params).then(res => {
|
postAction(`collection/onlCgformCollection/page`, params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
|
this.queryParams.pageNo = 1
|
||||||
|
this.loadData()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.tableData = [...res.result.records]
|
this.tableData = [...res.result.records]
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
@@ -1324,6 +1324,18 @@
|
|||||||
border: 1px #00B3BE solid;
|
border: 1px #00B3BE solid;
|
||||||
color: #00B3BE;
|
color: #00B3BE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree {
|
||||||
|
width: auto;
|
||||||
|
height: 300px;
|
||||||
|
overflow: auto;
|
||||||
|
position: absolute;
|
||||||
|
/*background: #fff;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-dropdown {
|
||||||
|
min-height: 320px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
|||||||
@@ -185,6 +185,11 @@
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
postAction(`subscribe/onlCgformSubscribe/page`, params).then(res => {
|
postAction(`subscribe/onlCgformSubscribe/page`, params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
|
this.queryParams.pageNo = 1
|
||||||
|
this.loadData()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.tableData = [...res.result.records]
|
this.tableData = [...res.result.records]
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
+11
-1
@@ -71,7 +71,7 @@
|
|||||||
{{$t('selectedStandard')}}
|
{{$t('selectedStandard')}}
|
||||||
</span>
|
</span>
|
||||||
<span class="box-button-standard-right"
|
<span class="box-button-standard-right"
|
||||||
:title="selectedRowKeysLeftRecord[0]?selectedRowKeysLeftRecord[0].serialNumber+' '+selectedRowKeysLeftRecord[0].fileName:$t('noComparisonDocumentSelected')"
|
:title="selectedRowKeysLeftRecord[0]?selectedRowKeysLeftRecord[0].serialNumber+' '+selectedRowKeysLeftRecord[0].fileName:$t('noComparisonDocumentSelected')"
|
||||||
:class="{'box-button-standard-right-color':selectedRowKeysLeftRecord[0]}">
|
:class="{'box-button-standard-right-color':selectedRowKeysLeftRecord[0]}">
|
||||||
{{selectedRowKeysLeftRecord[0]?selectedRowKeysLeftRecord[0].serialNumber+' '+selectedRowKeysLeftRecord[0].fileName:$t('noComparisonDocumentSelected')}}
|
{{selectedRowKeysLeftRecord[0]?selectedRowKeysLeftRecord[0].serialNumber+' '+selectedRowKeysLeftRecord[0].fileName:$t('noComparisonDocumentSelected')}}
|
||||||
</span>
|
</span>
|
||||||
@@ -357,6 +357,11 @@
|
|||||||
this.loadingLeft = true
|
this.loadingLeft = true
|
||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
|
this.pageNoLeft = 1
|
||||||
|
this.getListLeft()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.dataSourceLeft = res.result.records || []
|
this.dataSourceLeft = res.result.records || []
|
||||||
this.totalLeft = res.result.total
|
this.totalLeft = res.result.total
|
||||||
this.loadingLeft = false
|
this.loadingLeft = false
|
||||||
@@ -381,6 +386,11 @@
|
|||||||
this.loadingRight = true
|
this.loadingRight = true
|
||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
|
this.pageNoRight = 1
|
||||||
|
this.getListRight()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.dataSourceRight = res.result.records || []
|
this.dataSourceRight = res.result.records || []
|
||||||
this.totalRight = res.result.total
|
this.totalRight = res.result.total
|
||||||
this.loadingRight = false
|
this.loadingRight = false
|
||||||
|
|||||||
@@ -258,6 +258,11 @@
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.getList()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.dataSource = res.result.records || []
|
this.dataSource = res.result.records || []
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
@@ -491,11 +496,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .ant-table-row:first-child {
|
::v-deep .ant-table-row:first-child {
|
||||||
background: #fff!important;
|
background: #fff !important;
|
||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .ant-table-body {
|
::v-deep .ant-table-body {
|
||||||
background: transparent!important;
|
background: transparent !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -276,6 +276,11 @@
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.getList()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.dataSource = res.result.records || []
|
this.dataSource = res.result.records || []
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
@@ -413,7 +413,7 @@
|
|||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
this.pageNo = res.result.current - 1
|
this.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ export default {
|
|||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
this.pageNo = res.result.current - 1
|
this.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -236,7 +236,7 @@
|
|||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
this.pageNo = res.result.current - 1
|
this.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ export default {
|
|||||||
getAction(this.url.tableList, params).then((res) => {
|
getAction(this.url.tableList, params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
this.pageNo = res.result.current - 1
|
this.pageNo = 1
|
||||||
this.getTableList()
|
this.getTableList()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ export default {
|
|||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
this.pageNo = res.result.current - 1
|
this.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,7 +134,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24" v-if='required'>
|
<!-- v-if='required'-->
|
||||||
|
<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">
|
||||||
@@ -248,8 +249,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
<!-- v-if='required'-->
|
||||||
<a-row :gutter="24" >
|
<a-row :gutter="24" >
|
||||||
<a-col :span="24" v-if='required'>
|
<a-col :span="24" >
|
||||||
<a-tabs>
|
<a-tabs>
|
||||||
<a-tab-pane v-for='(item,index) in contentList' :tab="item.cut == 'cn' ? item.text : item.textEn" :key="index + 1">
|
<a-tab-pane v-for='(item,index) in contentList' :tab="item.cut == 'cn' ? item.text : item.textEn" :key="index + 1">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
@@ -470,11 +472,11 @@ export default {
|
|||||||
},
|
},
|
||||||
controlTypeChange(value){
|
controlTypeChange(value){
|
||||||
this.$refs.ruleForm.clearValidate(['controlVerify','titleDefaultValue','controlValues'])
|
this.$refs.ruleForm.clearValidate(['controlVerify','titleDefaultValue','controlValues'])
|
||||||
if(value == 11){
|
// if(value == 11){
|
||||||
this.required = false
|
// this.required = false
|
||||||
}else {
|
// }else {
|
||||||
this.required = true
|
// this.required = true
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
uploadSuccess(data) {
|
uploadSuccess(data) {
|
||||||
let attIdList = []
|
let attIdList = []
|
||||||
@@ -645,11 +647,11 @@ export default {
|
|||||||
// value.technologyTerritory = value.technologyTerritory.split(',')
|
// value.technologyTerritory = value.technologyTerritory.split(',')
|
||||||
// }
|
// }
|
||||||
this.formInline = value
|
this.formInline = value
|
||||||
if(this.formInline.controlType == 11){
|
// if(this.formInline.controlType == 11){
|
||||||
this.required = false
|
// this.required = false
|
||||||
}else{
|
// }else{
|
||||||
this.required = true
|
// this.required = true
|
||||||
}
|
// }
|
||||||
this.title = this.$t('edit')
|
this.title = this.$t('edit')
|
||||||
this.flag = 0
|
this.flag = 0
|
||||||
// 获取认证类别
|
// 获取认证类别
|
||||||
@@ -674,7 +676,8 @@ export default {
|
|||||||
this.$refs['ruleForm'].resetFields()
|
this.$refs['ruleForm'].resetFields()
|
||||||
},
|
},
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
if(this.formInline.certCategory == undefined && this.formInline.controlType != 11) {
|
// && this.formInline.controlType != 11
|
||||||
|
if(this.formInline.certCategory == undefined ) {
|
||||||
this.$message.warning(this.$t('certificationCategory')+this.$t('cannotEmpty'))
|
this.$message.warning(this.$t('certificationCategory')+this.$t('cannotEmpty'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -736,12 +739,12 @@ export default {
|
|||||||
})
|
})
|
||||||
let querycontentList = JSON.parse(JSON.stringify(this.contentList))
|
let querycontentList = JSON.parse(JSON.stringify(this.contentList))
|
||||||
query.certCategoryParamsInfoEOList = querycontentList
|
query.certCategoryParamsInfoEOList = querycontentList
|
||||||
if(this.formInline.controlType == 11){
|
// if(this.formInline.controlType == 11){
|
||||||
query.certCategoryParamsInfoEOList = []
|
// query.certCategoryParamsInfoEOList = []
|
||||||
query.certCategory = ''
|
// query.certCategory = ''
|
||||||
}else{
|
// }else{
|
||||||
query.titleDefaultValue = ''
|
// query.titleDefaultValue = ''
|
||||||
}
|
// }
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
Action(url, query).then((res) => {
|
Action(url, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
|||||||
@@ -390,7 +390,7 @@ export default {
|
|||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
this.pageNo = res.result.current - 1
|
this.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,10 +79,14 @@
|
|||||||
<span slot="sponsorFeedback" slot-scope="text,result">
|
<span slot="sponsorFeedback" slot-scope="text,result">
|
||||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('sponsorFeedback')"
|
<a-textarea :placeholder="$t('pleaseEnter')+$t('sponsorFeedback')"
|
||||||
v-model.trim="result.sponsorFeedback"
|
v-model.trim="result.sponsorFeedback"
|
||||||
|
:title="result.sponsorFeedback"
|
||||||
onkeyup="this.value=this.value.replace(/(^\s+)|(\s+$)/g, '')"
|
onkeyup="this.value=this.value.replace(/(^\s+)|(\s+$)/g, '')"
|
||||||
:maxLength="300"
|
:maxLength="300"
|
||||||
:rows="2"/>
|
:rows="2"/>
|
||||||
</span>
|
</span>
|
||||||
|
<span slot="sponsorFeedbackIndex" :title="text" slot-scope="text,result">
|
||||||
|
{{text ? text : '--'}}
|
||||||
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
<uploadFile ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></uploadFile>
|
<uploadFile ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></uploadFile>
|
||||||
@@ -193,6 +197,14 @@
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
scopedSlots: { customRender: 'complianceResults' }
|
scopedSlots: { customRender: 'complianceResults' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('sponsorFeedback'),
|
||||||
|
dataIndex: 'sponsorFeedback',
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
ellipsis: true,
|
||||||
|
scopedSlots: { customRender: 'sponsorFeedbackIndex' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
columnsThree: [
|
columnsThree: [
|
||||||
|
|||||||
@@ -112,7 +112,7 @@
|
|||||||
{{$t('edit')}}
|
{{$t('edit')}}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<span slot="regulatoryEngineer" >
|
<span slot="regulatoryEngineer">
|
||||||
<span :title="$t('regulatoryEngineer')">
|
<span :title="$t('regulatoryEngineer')">
|
||||||
{{$t('regulatoryEngineer')}}
|
{{$t('regulatoryEngineer')}}
|
||||||
</span>
|
</span>
|
||||||
@@ -218,6 +218,7 @@
|
|||||||
<!-- :prop="'certificationEngineer'"-->
|
<!-- :prop="'certificationEngineer'"-->
|
||||||
<a-form-model-item class="itemModel">
|
<a-form-model-item class="itemModel">
|
||||||
<a-select allowClear
|
<a-select allowClear
|
||||||
|
class="box-input"
|
||||||
v-model="formInline.certificationEngineer"
|
v-model="formInline.certificationEngineer"
|
||||||
:placeholder="$t('certifiedEngineer')+$t('areaOfResponsibility')">
|
:placeholder="$t('certifiedEngineer')+$t('areaOfResponsibility')">
|
||||||
<a-select-option v-for="(item, key) in dictOptionsValue"
|
<a-select-option v-for="(item, key) in dictOptionsValue"
|
||||||
@@ -283,18 +284,18 @@
|
|||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'lawEngineerName',
|
dataIndex: 'lawEngineerName',
|
||||||
slots:{title:'regulatoryEngineer'},
|
slots: { title: 'regulatoryEngineer' },
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
slots:{title:'engineeringInterfacePerson'},
|
slots: { title: 'engineeringInterfacePerson' },
|
||||||
dataIndex: 'engineeringInterfacePersonName',
|
dataIndex: 'engineeringInterfacePersonName',
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
slots:{title:'certifiedEngineer'},
|
slots: { title: 'certifiedEngineer' },
|
||||||
dataIndex: 'certificationEngineerName',
|
dataIndex: 'certificationEngineerName',
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
@@ -417,10 +418,10 @@
|
|||||||
this.selectedRowKeys = []
|
this.selectedRowKeys = []
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
handleCancel(){
|
handleCancel() {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
handleSubmit(){
|
handleSubmit() {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
batSettingClick() {
|
batSettingClick() {
|
||||||
@@ -469,6 +470,9 @@
|
|||||||
this.editVisible = true
|
this.editVisible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.formInline = JSON.parse(JSON.stringify(item))
|
this.formInline = JSON.parse(JSON.stringify(item))
|
||||||
|
if (!(this.dictOptionsValue.some(val => val.certificationEngineer == this.formInline.certificationEngineer))) {
|
||||||
|
this.formInline.certificationEngineer = undefined
|
||||||
|
}
|
||||||
this.$refs.ruleForm.clearValidate()
|
this.$refs.ruleForm.clearValidate()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -642,11 +646,12 @@
|
|||||||
height: 38px;
|
height: 38px;
|
||||||
/*margin-top: 2px;*/
|
/*margin-top: 2px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer-bootom-button {
|
.drawer-bootom-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index:100;
|
z-index: 100;
|
||||||
border-top: 1px solid #e8e8e8;
|
border-top: 1px solid #e8e8e8;
|
||||||
padding: 10px 16px;
|
padding: 10px 16px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|||||||
@@ -353,7 +353,7 @@
|
|||||||
postAction(this.url.list, query).then((res) => {
|
postAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
this.pageNo = res.result.current - 1
|
this.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -342,6 +342,11 @@
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.page, query).then((res) => {
|
getAction(this.url.page, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.getList()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.dataSource = res.result.records || []
|
this.dataSource = res.result.records || []
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
@@ -359,13 +359,11 @@ export default {
|
|||||||
postAction(this.url.list, query).then((res) => {
|
postAction(this.url.list, query).then((res) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
this.pageNo = res.result.current - 1
|
this.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log(res.result)
|
|
||||||
this.dataSource = res.result.records || []
|
this.dataSource = res.result.records || []
|
||||||
|
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user