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

This commit is contained in:
liyawei
2022-07-14 18:30:55 +08:00
32 changed files with 1620 additions and 202 deletions
@@ -0,0 +1,34 @@
package com.jero.common.util;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
public class FileUtils {
/**
* 复制文件
* @param in
* @param newFile
* @throws IOException
*/
public static void copyFile(InputStream in, String newFile) throws IOException {
File file2 = new File(newFile);
if (!file2.exists()) {
file2.createNewFile();
}
try (FileOutputStream ou = new FileOutputStream(newFile);) {
byte[] bs = new byte[1024];
int count = 0;
while ((count = in.read(bs, 0, bs.length)) != -1) {
ou.write(bs, 0, count);
}
ou.flush();
} catch (IOException e) {
e.printStackTrace();
throw new IOException("复制文件失败!");
} finally {
in.close();
}
}
}
@@ -11,7 +11,7 @@ import com.jero.modules.lawsOpinionGather.enums.LawsOpinionGatherNodeEnum;
import com.jero.modules.lawsOpinionGather.enums.OperatorRoleCodeEnum;
import com.jero.modules.lawsOpinionGather.mapper.LawsProcessHistoryEOMapper;
import com.jero.modules.lawsOpinionGather.service.ILawsProcessHistoryEOService;
import com.jero.modules.lawsTechnologyEvaluation.job.LawsTechnologyEvaluationNodeEnum;
import com.jero.modules.lawsTechnologyEvaluation.enums.LawsTechnologyEvaluationNodeEnum;
import com.jero.modules.project.enums.OperatorTypeEnum;
import com.jero.modules.project.enums.RequestSourceEnum;
import com.jero.modules.system.entity.SysUser;
@@ -2,11 +2,13 @@ package com.jero.modules.lawsTechnologyEvaluation.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO;
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO;
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationComplianceResultEOService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -157,6 +159,20 @@ public class LawsTechnologyEvaluationComplianceResultEOController extends JeroCo
return super.exportXls(request, lawsTechnologyEvaluationComplianceResultEO, LawsTechnologyEvaluationComplianceResultEO.class, "法规技术评估-评估人反馈-符合性结果表");
}
/**
* 导出zip压缩包,带文件。
* @param response
* @param request
* @param lawsTechnologyEvaluationComplianceResultEO
* @param params
*/
@RequestMapping(value = "/exportZip")
public void exportZip(HttpServletResponse response,HttpServletRequest request,
LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO,
@RequestParam Map<String,Object> params) {
this.lawsTechnologyEvaluationComplianceResultEOService.exportZip(response,request, lawsTechnologyEvaluationComplianceResultEO,params);
}
/**
* 通过excel导入数据
*
@@ -2,6 +2,7 @@ package com.jero.modules.lawsTechnologyEvaluation.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -160,6 +161,20 @@ public class LawsTechnologyEvaluationItemResultEOController extends JeroControll
return super.exportXls(request, lawsTechnologyEvaluationItemResultEO, LawsTechnologyEvaluationItemResultEO.class, "法规技术评估-条款信息评估结果表");
}
/**
* 导出zip压缩包,带文件。
* @param response
* @param request
* @param lawsTechnologyEvaluationItemResultEO
* @param params
*/
@RequestMapping(value = "/exportZip")
public void exportZip(HttpServletResponse response,HttpServletRequest request,
LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO,
@RequestParam Map<String,Object> params) {
this.lawsTechnologyEvaluationItemResultEOService.exportZip(response,request, lawsTechnologyEvaluationItemResultEO,params);
}
/**
* 通过excel导入数据
*
@@ -34,6 +34,8 @@ public class LawsTechnologyEvaluationComplianceResultEO implements Serializable
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
@TableField(exist = false)
private java.lang.String ids;
/**创建人*/
@ApiModelProperty(value = "创建人")
@@ -68,6 +70,8 @@ public class LawsTechnologyEvaluationComplianceResultEO implements Serializable
@Excel(name = "符合性结果", width = 15)
@ApiModelProperty(value = "符合性结果")
private java.lang.String complianceResult;
@TableField(exist = false)
private java.lang.String complianceResultName;
/**流程实例id*/
@Excel(name = "流程实例id", width = 15)
@@ -108,11 +108,15 @@ public class LawsTechnologyEvaluationItemResultEO implements Serializable {
@Excel(name = "附件", width = 15)
@ApiModelProperty(value = "附件")
private java.lang.String accessoryFile;
@TableField(exist = false)
private java.lang.String accessoryFileName;
/**符合性结果*/
@Excel(name = "符合性结果", width = 15)
@ApiModelProperty(value = "符合性结果")
private java.lang.String complianceResult;
@TableField(exist = false)
private java.lang.String complianceResultName;
/**评估人id*/
@Excel(name = "评估人id", width = 15)
@@ -2,6 +2,7 @@ package com.jero.modules.lawsTechnologyEvaluation.entity;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@@ -80,6 +81,8 @@ public class LawsTechnologyEvaluationResultEO implements Serializable {
@Excel(name = "附件", width = 15)
@ApiModelProperty(value = "附件")
private java.lang.String accessoryFile;
@TableField(exist = false)
private java.lang.String accessoryFileName;
/**提出时间*/
@Excel(name = "提出时间", width = 15, format = "yyyy-MM-dd")
@@ -1,4 +1,4 @@
package com.jero.modules.lawsTechnologyEvaluation.job;
package com.jero.modules.lawsTechnologyEvaluation.enums;
import com.alibaba.druid.util.StringUtils;
import com.jero.common.constant.enums.CutEnum;
@@ -63,7 +63,7 @@ public class LawsTechnologyEvaluationJob implements Job {
if(CollectionUtils.isNotEmpty(lawsTechnologyEvaluationFlowDetailEOList)){
String actiProcInstIds = lawsTechnologyEvaluationFlowDetailEOList.stream().map(LawsTechnologyEvaluationFlowDetailEO::getActiProcInstId).distinct().collect(Collectors.joining(","));
Result<String> result = this.workFlowFeignClient.completeTaskByPids(actiProcInstIds);
Result<String> result = this.workFlowFeignClient.completeLawsTechnologyEvaluationTaskByPids(actiProcInstIds);
if(result.getCode().equals(CommonConstant.SC_OK_200)){
updateLawsTechnologyEvaluationEOList.forEach(lawsTechnologyEvaluationEO -> {
lawsTechnologyEvaluationEO.setFlowStatus(GatherResultEnum.COMPLETED.getValue());
@@ -2,9 +2,12 @@ package com.jero.modules.lawsTechnologyEvaluation.service;
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* @Description: 法规技术评估-评估人反馈-符合性结果表
@@ -62,4 +65,8 @@ public interface ILawsTechnologyEvaluationComplianceResultEOService extends ISer
List<LawsTechnologyEvaluationComplianceResultEO> queryList(LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO,
HttpServletRequest req,
String cut);
void exportZip(HttpServletResponse response, HttpServletRequest request,
LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO,
Map<String, Object> params);
}
@@ -6,7 +6,9 @@ import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluation
import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* @Description: 法规技术评估-条款信息评估结果表
@@ -79,4 +81,8 @@ public interface ILawsTechnologyEvaluationItemResultEOService extends IService<L
void batchUpdate(JSONObject jsonObject);
void disposeData(List<LawsTechnologyEvaluationItemResultEO> datas, String cut);
void exportZip(HttpServletResponse response, HttpServletRequest request, LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO, Map<String, Object> params);
}
@@ -76,4 +76,6 @@ public interface ILawsTechnologyEvaluationResultEOService extends IService<LawsT
* @return
*/
JSONObject queryEvaluationResultAndComplianceResult(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO, HttpServletRequest req);
void disposeData(List<LawsTechnologyEvaluationResultEO> datas, String cut);
}
@@ -1,18 +1,41 @@
package com.jero.modules.lawsTechnologyEvaluation.service.impl;
import cn.hutool.core.util.ZipUtil;
import com.alibaba.druid.util.StringUtils;
import com.aliyuncs.utils.IOUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.FileUtils;
import com.jero.common.util.oss.CosBootUtil;
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO;
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationItemResultEO;
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO;
import com.jero.modules.lawsTechnologyEvaluation.enums.ComplianceResultEnum;
import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationComplianceResultEOMapper;
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationComplianceResultEOService;
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationResultEOService;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.system.util.PDFUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import org.apache.shiro.SecurityUtils;
import org.aspectj.util.FileUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.List;
import java.util.Date;
import java.util.Map;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -20,6 +43,7 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @Description: 法规技术评估-评估人反馈-符合性结果表
@@ -30,8 +54,12 @@ import javax.servlet.http.HttpServletRequest;
@Service
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends ServiceImpl<LawsTechnologyEvaluationComplianceResultEOMapper, LawsTechnologyEvaluationComplianceResultEO> implements ILawsTechnologyEvaluationComplianceResultEOService {
@Value(value = "${jero.path.upload}")
private String uploadpath;
@Autowired
private ILawsTechnologyEvaluationResultEOService evaluationResultEOService;
@Autowired
private IOSSFileService iOSSFileService;
/**
* 保存
@@ -103,14 +131,18 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi
HttpServletRequest req,
String cut) {
QueryWrapper<LawsTechnologyEvaluationComplianceResultEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationComplianceResultEO, req.getParameterMap());
if(org.apache.commons.lang3.StringUtils.isNotEmpty(lawsTechnologyEvaluationComplianceResultEO.getIds())){
queryWrapper.lambda().in(LawsTechnologyEvaluationComplianceResultEO::getId,lawsTechnologyEvaluationComplianceResultEO.getIds().split(","));
}
List<LawsTechnologyEvaluationComplianceResultEO> complianceResultEOList = this.baseMapper.selectList(queryWrapper);
if(CollectionUtils.isNotEmpty(complianceResultEOList)){
this.disposeData(complianceResultEOList,cut);
List<String> complianceResultIdList = complianceResultEOList.stream().map(LawsTechnologyEvaluationComplianceResultEO::getId).distinct().collect(Collectors.toList());
QueryWrapper<LawsTechnologyEvaluationResultEO> evaluationResultEOQueryWrapper = new QueryWrapper<>();
evaluationResultEOQueryWrapper.lambda().in(LawsTechnologyEvaluationResultEO::getComplianceResultId,complianceResultIdList);
List<LawsTechnologyEvaluationResultEO> evaluationResultEOList = this.evaluationResultEOService.list(evaluationResultEOQueryWrapper);
this.evaluationResultEOService.disposeData(evaluationResultEOList,cut);
if(CollectionUtils.isNotEmpty(evaluationResultEOList)){
for (LawsTechnologyEvaluationComplianceResultEO complianceResultEO : complianceResultEOList) {
@@ -129,4 +161,169 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi
}
return complianceResultEOList;
}
@Override
public void exportZip(HttpServletResponse response, HttpServletRequest request,
LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO,
Map<String, Object> params) {
String ids = (String)params.get("ids");
String cut = (String)params.get("cut");
if(!StringUtils.isEmpty(ids)){
lawsTechnologyEvaluationComplianceResultEO.setIds(ids);
}
List<LawsTechnologyEvaluationComplianceResultEO> exportData = this.queryList(lawsTechnologyEvaluationComplianceResultEO, request, cut);
this.disposeData(exportData,cut);
String title = "";
String bottomTitle = "";
String fileName = "";
String sheetName = "";
if(org.apache.commons.lang3.StringUtils.equals(cut, CutEnum.CN.getValue())){
title = "相关章节,问题说明,附件";
bottomTitle = "符合性结果:";
fileName = "评估结果 " + ".xlsx";
sheetName = "反馈结果";
}else if(org.apache.commons.lang3.StringUtils.equals(cut,CutEnum.EN.getValue())){
title = "Related section,Problem description,Accessory";
bottomTitle = "Compliance results:";
fileName = "Evaluation results " + ".xlsx";
sheetName = "Feedback result";
}
OutputStream os = null;
HSSFWorkbook workbook = new HSSFWorkbook();
String path = uploadpath + "/tempZip/itemEvaluationResults/" + System.currentTimeMillis();
try {
response.setHeader("Content-Disposition",
"attachment; filename=" + fileName);
response.setContentType("application/force-download");
//设置导出数据
if(CollectionUtils.isNotEmpty(exportData)) {
//创建表头
String[] titleArr = title.split(",");
for (int i = 0; i < exportData.size(); i++){
//使用评估人的名字命名sheet页
HSSFSheet sheet = workbook.createSheet(exportData.get(i).getCreateBy() + " " + sheetName);
CellStyle titleCellStyle = workbook.createCellStyle();
titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中
titleCellStyle.setWrapText(true);//自动换行
Row firstRow = sheet.createRow(0);
for (int j=0; j<3; j++){
sheet.setColumnWidth(j,10000);
Cell cell = firstRow.createCell(j);
cell.setCellStyle(titleCellStyle);
cell.setCellValue(titleArr[j]);
}
//获取这个评估人填写的评估结果
List<LawsTechnologyEvaluationResultEO> lawsTechnologyEvaluationResultEOList = exportData.get(i).getLawsTechnologyEvaluationResultEOList();
int evaluationResultListSize = lawsTechnologyEvaluationResultEOList.size();
if(CollectionUtils.isNotEmpty(lawsTechnologyEvaluationResultEOList)){
for (int dataIndex = 0; dataIndex < lawsTechnologyEvaluationResultEOList.size(); dataIndex++) {
Row dataRow = sheet.createRow(dataIndex + 1);
dataRow.createCell(0).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getRelatedSection());
dataRow.createCell(1).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getIssueOrSuggest());
dataRow.createCell(2).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getAccessoryFileName());
}
}
//把符合性结果设置进excel表格中。
Row bottomRow = sheet.createRow(evaluationResultListSize + 1);
Cell bottomRowFirstCell = bottomRow.createCell(0);
bottomRowFirstCell.setCellStyle(titleCellStyle);
bottomRowFirstCell.setCellValue(bottomTitle + " " + exportData.get(i).getComplianceResultName());
}
}
File fileTemp = new File(path);
if (fileTemp.exists()) {
fileTemp.delete();
}
fileTemp.mkdirs();
//excel
OutputStream excelOS = new FileOutputStream(path + File.separator + fileName);
workbook.write(excelOS);
excelOS.flush();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
for (LawsTechnologyEvaluationComplianceResultEO data : exportData) {
List<LawsTechnologyEvaluationResultEO> evaluationResultEOList = data.getLawsTechnologyEvaluationResultEOList();
if(CollectionUtils.isNotEmpty(evaluationResultEOList)){
for (LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO : evaluationResultEOList) {
String accessoryFile = lawsTechnologyEvaluationResultEO.getAccessoryFile();
List<OSSFile> fileInfosList = iOSSFileService.getFileInfos(accessoryFile);
if (fileInfosList.size() != 0) {
for (OSSFile ossFile : fileInfosList) {
String url = ossFile.getUrl();
//判断文件是否存在
if(org.apache.commons.lang3.StringUtils.isNotBlank(url)){
//判断文件是否存在
boolean b = CosBootUtil.doesObjectExist(url);
if(b){
InputStream download = CosBootUtil.download(url);
if(url.endsWith(".pdf") || url.endsWith(".PDF")){
String currentTime = sdf.format(new Date());
String waterContent = loginUser.getUsername() + " " + currentTime;
File newFile = PDFUtils.PDFWatermark(download,uploadpath,ossFile.getFileName(),waterContent);
download = new FileInputStream(newFile.getPath());
}
//复制文件
FileUtils.copyFile(download, path + File.separator + ossFile.getFileName());
}
}
}
}
}
}
}
ZipUtil.zip(path, path + ".zip");
//文件
FileInputStream fis = new FileInputStream(path + ".zip");
os = response.getOutputStream();
int len = 0;
while ((len = fis.read()) != -1) {
os.write(len);
}
os.flush();
fis.close();
excelOS.close();
}catch (IOException ex){
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("下载文件失败");
}else{
throw new JeroBootException("Failed to download file");
}
}finally {
IOUtils.closeQuietly(os);
File file = new File(path);
FileUtil.deleteContents(file);
File fileTemp = new File(path + ".zip");
FileUtil.deleteContents(fileTemp);
}
}
public void disposeData(List<LawsTechnologyEvaluationComplianceResultEO> datas,String cut){
if(CollectionUtils.isNotEmpty(datas)){
for (LawsTechnologyEvaluationComplianceResultEO data : datas) {
if(!StringUtils.isEmpty(data.getComplianceResult())){
data.setComplianceResultName(ComplianceResultEnum.getTextByValue(data.getComplianceResult(),cut));
}
}
}
}
}
@@ -327,33 +327,22 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
nowFile.mkdirs();
HSSFSheet sheet = workbook.createSheet("sheet1");
sheet.setDefaultColumnWidth(16);//列宽
HSSFCellStyle cellStyle = workbook.createCellStyle();
cellStyle.setWrapText(true);//自动换行
cellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中
HSSFCellStyle cellStyleTemp = workbook.createCellStyle();
cellStyleTemp.setWrapText(true);//自动换行
String explainInfo = null;
HSSFRichTextString explain = new HSSFRichTextString(explainInfo);
CellStyle titleCellStyle = workbook.createCellStyle();
titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中
titleCellStyle.setWrapText(true);//自动换行
//表头
Row row = sheet.createRow(0);//开始创建标题行
String[] headerArr = title.split(",");
for (int m = 0; m < headerArr.length; m++) {
row.createCell(m).setCellValue(headerArr[m]);
sheet.setColumnWidth(m,10000);
Cell cell = row.createCell(m);
cell.setCellStyle(titleCellStyle);
cell.setCellValue(headerArr[m]);
}
/*Row rowExplain = sheet.createRow(1);
short height = (short) (7 * 200);
rowExplain.setHeight((short) height);
Cell cell = rowExplain.createCell(0);
cell.setCellValue(explain);
cell.setCellStyle(cellStyleTemp);*/
response.setHeader("Content-Disposition",
"attachment; filename=\"" + fileOriName + ".xls");
response.setContentType("application/force-download");
@@ -1,29 +1,42 @@
package com.jero.modules.lawsTechnologyEvaluation.service.impl;
import cn.hutool.core.util.ZipUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.aliyuncs.utils.IOUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.FileUtils;
import com.jero.common.util.oss.CosBootUtil;
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationItemResultEO;
import com.jero.modules.lawsTechnologyEvaluation.enums.ComplianceResultEnum;
import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationItemResultEOMapper;
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationItemResultEOService;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.project.enums.OperatorTypeEnum;
import com.jero.modules.project.enums.RequestSourceEnum;
import com.jero.modules.system.entity.SysCategory;
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
import com.jero.modules.system.util.PDFUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import org.apache.shiro.SecurityUtils;
import org.aspectj.util.FileUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Date;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -31,6 +44,7 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @Description: 法规技术评估-条款信息评估结果表
@@ -42,8 +56,12 @@ import javax.servlet.http.HttpServletRequest;
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl<LawsTechnologyEvaluationItemResultEOMapper, LawsTechnologyEvaluationItemResultEO> implements ILawsTechnologyEvaluationItemResultEOService {
@Value(value = "${jero.path.upload}")
private String uploadpath;
@Autowired
private SysCategoryServiceImpl sysCategoryService;
@Autowired
private IOSSFileService iOSSFileService;
/**
* 保存
@@ -178,10 +196,169 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl
List<String> evaluationMethodsList = Arrays.asList(evaluationMethods.split(","));
String name = getTreeName(cut, categoryList, evaluationMethodsList);
data.setEvaluationMethodsName(name);
if(StringUtils.isNotEmpty(data.getComplianceResult())){
data.setComplianceResultName(ComplianceResultEnum.getTextByValue(data.getComplianceResult(),cut));
}
if(StringUtils.isNotEmpty(data.getAccessoryFile())){
List<OSSFile> accessoryFileList = iOSSFileService.getFileInfos(data.getAccessoryFile());
String accessoryFileName = accessoryFileList.stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
data.setAccessoryFileName(accessoryFileName);
}
}
}
}
@Override
public void exportZip(HttpServletResponse response, HttpServletRequest request, LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO, Map<String, Object> params) {
String ids = (String)params.get("ids");
String cut = (String)params.get("cut");
QueryWrapper<LawsTechnologyEvaluationItemResultEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationItemResultEO, request.getParameterMap());
if(StringUtils.isNotEmpty(ids)){
List<String> idList = Arrays.asList(ids.split(","));
queryWrapper.lambda().in(LawsTechnologyEvaluationItemResultEO::getId,idList);
}
List<LawsTechnologyEvaluationItemResultEO> exportData = this.baseMapper.selectList(queryWrapper);
this.disposeData(exportData,cut);
String title = "";
String fileName = "";
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
title = "条款号,条款名称,条款内容,评估人,评估方式,技术文件名称,章节,符合性结果,意见,附件,反馈时间";
fileName = "条款评估结果 " + ".xlsx";
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
title = "Item num,Item name,Item Contents,Evaluator,Evaluation methods,Name of technical document,Section,Compliance results,Opinion,Accessory,Feedback time ";
fileName = "Item Evaluation results " + ".xlsx";
}
OutputStream os = null;
HSSFWorkbook workbook = new HSSFWorkbook();
String path = uploadpath + "/tempZip/itemEvaluationResults/" + System.currentTimeMillis();
try {
response.setHeader("Content-Disposition",
"attachment; filename=" + fileName);
response.setContentType("application/force-download");
HSSFSheet sheet = workbook.createSheet("sheet1");
CellStyle titleCellStyle = workbook.createCellStyle();
titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中
titleCellStyle.setWrapText(true);//自动换行
Row firstRow = sheet.createRow(0);
//创建表头
String[] titleArr = title.split(",");
for (int i=0; i<=5; i++){
sheet.setColumnWidth(i,4000);
Cell cell = firstRow.createCell(i);
cell.setCellStyle(titleCellStyle);
cell.setCellValue(titleArr[i]);
}
//设置导出数据
if(CollectionUtils.isNotEmpty(exportData)) {
for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) {
Row dataRow = sheet.createRow(dataIndex + 1);
dataRow.createCell(0).setCellValue(exportData.get(dataIndex).getItemNum());
dataRow.createCell(1).setCellValue(exportData.get(dataIndex).getItemName());
dataRow.createCell(2).setCellValue(exportData.get(dataIndex).getItemContent());
dataRow.createCell(3).setCellValue(exportData.get(dataIndex).getCreateBy());
dataRow.createCell(4).setCellValue(exportData.get(dataIndex).getEvaluationMethodsName());
dataRow.createCell(5).setCellValue(exportData.get(dataIndex).getTechnicalFileName());
dataRow.createCell(6).setCellValue(exportData.get(dataIndex).getSection());
dataRow.createCell(7).setCellValue(exportData.get(dataIndex).getComplianceResultName());
dataRow.createCell(8).setCellValue(exportData.get(dataIndex).getOpinion());
dataRow.createCell(9).setCellValue(exportData.get(dataIndex).getAccessoryFileName());
String feedBackTimeStr = disposeDate(exportData.get(dataIndex).getCreateTime());
dataRow.createCell(10).setCellValue(feedBackTimeStr);
}
}
File fileTemp = new File(path);
if (fileTemp.exists()) {
fileTemp.delete();
}
fileTemp.mkdirs();
//excel
OutputStream excelOS = new FileOutputStream(path + File.separator + fileName);
workbook.write(excelOS);
excelOS.flush();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
for (LawsTechnologyEvaluationItemResultEO data : exportData) {
String accessoryFile = data.getAccessoryFile();
List<OSSFile> fileInfosList = iOSSFileService.getFileInfos(accessoryFile);
if (fileInfosList.size() != 0) {
for (OSSFile ossFile : fileInfosList) {
String url = ossFile.getUrl();
//判断文件是否存在
if(StringUtils.isNotBlank(url)){
//判断文件是否存在
boolean b = CosBootUtil.doesObjectExist(url);
if(b){
InputStream download = CosBootUtil.download(url);
if(url.endsWith(".pdf") || url.endsWith(".PDF")){
String currentTime = sdf.format(new Date());
String waterContent = loginUser.getUsername() + " " + currentTime;
File newFile = PDFUtils.PDFWatermark(download,uploadpath,ossFile.getFileName(),waterContent);
download = new FileInputStream(newFile.getPath());
}
FileUtils.copyFile(download, path + File.separator + ossFile.getFileName());
}
}
}
}
}
ZipUtil.zip(path, path + ".zip");
//文件
FileInputStream fis = new FileInputStream(path + ".zip");
os = response.getOutputStream();
int len = 0;
while ((len = fis.read()) != -1) {
os.write(len);
}
os.flush();
fis.close();
excelOS.close();
}catch (IOException ex){
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("下载文件失败");
}else{
throw new JeroBootException("Failed to download file");
}
}finally {
IOUtils.closeQuietly(os);
File file = new File(path);
FileUtil.deleteContents(file);
File fileTemp = new File(path + ".zip");
FileUtil.deleteContents(fileTemp);
}
}
public String disposeDate(Date date){
String result = "";
try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if(date != null){
result = sdf.format(date);
}
}catch (Exception ex){
ex.printStackTrace();
log.error("处理日期失败:" +ex.getMessage());
}
return result;
}
private String getTreeName(String cut, List<SysCategory> categoryList, List<String> evaluationMethodsList) {
StringBuilder sb = new StringBuilder();
for (String evaluationMethods : evaluationMethodsList) {
@@ -9,6 +9,9 @@ import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluation
import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationResultEOMapper;
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationComplianceResultEOService;
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationResultEOService;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
import me.zhyd.oauth.utils.StringUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -17,6 +20,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Date;
import java.util.UUID;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Propagation;
@@ -36,6 +40,8 @@ public class LawsTechnologyEvaluationResultEOServiceImpl extends ServiceImpl<Law
@Autowired
private ILawsTechnologyEvaluationComplianceResultEOService complianceResultEOService;
@Autowired
private IOSSFileService iOSSFileService;
/**
* 保存
@@ -168,4 +174,17 @@ public class LawsTechnologyEvaluationResultEOServiceImpl extends ServiceImpl<Law
}
return result;
}
@Override
public void disposeData(List<LawsTechnologyEvaluationResultEO> datas, String cut) {
if(CollectionUtils.isNotEmpty(datas)){
for (LawsTechnologyEvaluationResultEO data : datas) {
if(StringUtils.isNotEmpty(data.getAccessoryFile())){
List<OSSFile> accessoryFileList = iOSSFileService.getFileInfos(data.getAccessoryFile());
String accessoryFileName = accessoryFileList.stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
data.setAccessoryFileName(accessoryFileName);
}
}
}
}
}
@@ -145,4 +145,7 @@ public interface WorkFlowFeignClient {
*/
@RequestMapping(value = "/bat-wkflow/startLawsTechnologyEvaluationProcess",method = RequestMethod.POST,headers = {"content-type=application/json"})
Result<String> startLawsTechnologyEvaluationProcess(String jsonObject);
@RequestMapping(value = "/bat-wkflow/task/completeLawsTechnologyEvaluationTaskByPids",method = RequestMethod.GET)
Result<String> completeLawsTechnologyEvaluationTaskByPids(@RequestParam("actiProcInstIds") String actiProcInstIds);
}
+9
View File
@@ -1136,4 +1136,13 @@ module.exports = {
sponsorFeedback:'Sponsor feedback',
processNumber:'Process number',
processName:'Process Name',
feedbackResults:'Feedback results',
theDoesNotSupportPreview:'The current file format does not support Preview',
releaseSituation:'Release situation',
comparisonResults:'Comparison results',
Published:'Published',
initiateComparison:'Initiate comparison',
translationLanguage:'Translation language',
translationResults:'Translation results',
conversionTime:'Conversion time',
}
+9
View File
@@ -1140,4 +1140,13 @@ module.exports = {
sponsorFeedback:'发起人反馈',
processNumber:'流程编号',
processName:'流程名称',
feedbackResults:'反馈结果',
theDoesNotSupportPreview:'当前文件格式不支持预览',
releaseSituation:'发布情况',
comparisonResults:'对比结果',
Published:'已发布',
initiateComparison:'发起对比',
translationLanguage:'翻译语言',
translationResults:'翻译结果',
conversionTime:'转换时间',
}
@@ -46,15 +46,15 @@
<!-- 认证工程师 -->
<span
v-if='record.state == "待发起收集" || record.state == "工程接口人退回"'>
<span
<span :title='record.dataValue'
@click='ondataValueTobe(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }}</span>
</span>
<span v-else>
<span @click='dataValueTobe(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }}</span>
<span :title='record.dataValue' @click='dataValueTobe(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }}</span>
</span>
</span>
<span v-else>
<span @click='dataValueTobe(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }}</span>
<span :title='record.dataValue' @click='dataValueTobe(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }}</span>
</span>
</span>
@@ -438,7 +438,7 @@
if (res.data.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.areaVisiblezr = false
this.getTableList()
this.getLoginUserType()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
@@ -637,6 +637,7 @@
console.log(pagination, filters, sorter, 'iiiiiiiiiiiiiiiii')
},
getTableListReset() {
this.formInline = {}
let params = {
paramsManifestId: this.$route.query.id,
pageNo: this.pageNo,
@@ -92,6 +92,7 @@
title: this.$t('relevantSections'),
align: 'center',
dataIndex: 'relatedSection',
ellipsis: true,
width: 180
},
{
@@ -26,10 +26,10 @@
<a-icon type="cloud-upload"/>
{{$t('uploadMonthly')}}
</div>
<div @click="BatchDeleteClick" class="operator-text">
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</div>
<!-- <div @click="BatchDeleteClick" class="operator-text">-->
<!-- <a-icon type="delete"/>-->
<!-- {{$t('BatchDelete')}}-->
<!-- </div>-->
</div>
<div>
<a-table
@@ -46,13 +46,21 @@
<span slot="language" slot-scope="text,record">
<span>{{text == 1?$t('chinese'):$t('English')}}</span>
</span>
<span slot="RegulationMonthlyName" slot-scope="text,record">
<a @click="preview(record)">{{text}}</a>
</span>
<span slot="operation" slot-scope="text,record">
<a class="text-operation"
v-if="record.createBy == userData.username"
@click="withdraw(record)">
{{record.issueStatus == 2 ? $t('release') : $t('withdraw')}}
</a>
<a class="text-operation"
v-if="record.createBy == userData.username && record.issueStatus == 2"
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
<a class="text-operation"
v-if="record.createBy == userData.username || record.issueStatus == 1"
@click="download(record)">{{$t('download')}}</a>
</span>
</a-table>
<div class="page" v-if="dataSource && dataSource.length > 0">
@@ -75,7 +83,9 @@
<script>
import eventBUs from '../../../../common/event'
import managementAdd from './modules/managementAdd'
import { getAction, postAction } from '@/api/manage'
import { getAction, postAction, downloadFile } from '@/api/manage'
import { mapGetters } from 'vuex'
import { Base64 } from 'js-base64'
export default {
name: 'RegulationMonthlyManagement',
@@ -97,13 +107,16 @@
pageSize: 10,
pageNo: 1,
queryParam: {},
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
userData: {},
columns: [
{
title: this.$t('RegulationMonthlyName'),
align: 'center',
dataIndex: 'name',
width: 190,
ellipsis: true
ellipsis: true,
scopedSlots: { customRender: 'RegulationMonthlyName' }
},
{
title: this.$t('monthlyLanguage'),
@@ -146,8 +159,10 @@
},
mounted() {
this.getList()
this.userData = this.userInfo()
},
methods: {
...mapGetters(['userInfo']),
searchQuery() {
this.pageNo = 1
this.getList()
@@ -191,6 +206,30 @@
}
})
},
preview(item) {
let fileName = item.name
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + item.fileId + '&userName=' + this.userInfo().username))
} else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
window.open(url, '_blank')
} else {
if (item.createBy == this.userInfo().username){
downloadFile('/sys/common/downLoadFile', item.name, { id: item.fileId, userName: this.userInfo().username })
}else{
this.$message.warning(this.$t('theDoesNotSupportPreview'))
}
}
},
download(item) {
downloadFile('/sys/common/downLoadFile', item.name, { id: item.fileId, userName: this.userInfo().username })
},
uploadMonthlyClick() {
this.$refs.managementAddRef.add()
},
@@ -6,7 +6,7 @@
<!-- <span style="line-height: 66px;display: inline-block;float: left">-->
<!-- <a-icon type="home" style="margin-right: 6px;"/>-->
<!-- </span>-->
{{$t('regulatoryTechnicalEvaluationResults')}}
{{$route.query.serialNumber +' '+$t('regulatoryTechnicalEvaluationResults')}}
</div>
</div>
<div style="padding-top: 68px;background: #fff">
@@ -19,7 +19,7 @@
</a-button>
</div>
<div class="processBackground-text">
dskf' ;sdfl';s sd稍等景点风光大家分工法规地方官给,。不买;两个客人坦克;量大幅高开的管理骨科大夫给的快感的法律公开大家赶快来的风格
{{$route.query.processBackground}}
</div>
<div class="header-text">
{{$t('engineerFeedbackResults')}}
@@ -35,10 +35,10 @@
</div>
<PersonnelSelection class="box-input"
:personneQuery="queryParam"
:query="{db_field_name:'Assessor',db_field_txt:$t('Assessor')}"
:query="{db_field_name:'evaluators',db_field_txt:$t('Assessor')}"
:isInput="true"
@change="PersonnelSelectionChange"
v-model="queryParam.AssessorName"/>
v-model="queryParam.evaluatorsName"/>
</div>
</a-col>
<a-col :md="6" :sm="8">
@@ -46,8 +46,18 @@
<div class="title-text" :title="$t('complianceResults')">
<span>{{$t('complianceResults')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('complianceResults')"
v-model="queryParam.title"></j-input>
<a-select :placeholder="$t('PleaseSelect')+$t('complianceResults')"
class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="queryParam.complianceResult">
<a-select-option v-for="(item, key) in complianceResultsList"
: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;" class="table-page-search-submitButtons">
@@ -61,7 +71,7 @@
</div>
<div class="table-operator">
<div @click="fileExportClick" class="operator-text">
<a-icon type="apartment"/>
<a-icon type="export" :rotate="-90"/>
{{$t('fileExport')}}
</div>
</div>
@@ -71,142 +81,211 @@
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: '100%'}"
:scroll="{x: '100%',y:'calc(100vh - 100px)'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns"
>
<div slot="clauseContent" slot-scope="text,result">
<a-tooltip placement="topLeft">
<template slot="title">
<span v-html="text"></span>
</template>
<div class="clauseContent-text" v-html="text"></div>
</a-tooltip>
</div>
<span slot="accessoryFile" slot-scope="text,result">
<a v-if="text" @click="accessoryFileClick(text)">
{{ $t('viewFile') }}
</a>
<span v-else>--</span>
</span>
</a-table>
<!-- <div class="page" v-if="dataSource && dataSource.length > 0">-->
<!-- <a-pagination-->
<!-- :show-total="total => $t('total')+` ${total} `+$t('strip')"-->
<!-- show-quick-jumper-->
<!-- show-size-changer-->
<!-- :page-size.sync="pageSize"-->
<!-- :total="total"-->
<!-- :current="pageNo"-->
<!-- @change="pageOnChange"-->
<!-- @showSizeChange="SizeChange"-->
<!-- />-->
<!-- </div>-->
</div>
</a-card>
</div>
</div>
</div>
</div>
<viewFileModel ref="viewFileModelRef"/>
</div>
</template>
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile } from '@/api/manage'
import viewFileModel from '@/components/viewFileModel/index'
export default {
name: 'evaluationResultsClause',
components:{
PersonnelSelection
components: {
PersonnelSelection,
viewFileModel
},
data() {
return {
queryParam: {},
dataSource: [],
selectedRowKeys: [],
complianceResultsList: [
{
name: this.$t('accord'),
value: 'Compliance'
},
{
name: this.$t('nonConformity'),
value: 'Non-Compliance'
}
],
loading: false,
url: {
list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationItemResultEO/list',
exportData: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationItemResultEO/exportZip'
},
columns: [
{
title: this.$t('clauseNo'),
dataIndex: 'items_num',
dataIndex: 'itemNum',
align: 'center',
ellipsis: true
ellipsis: true,
width: 160
},
{
title: this.$t('clauseName'),
dataIndex: 'items_name',
dataIndex: 'itemName',
align: 'center',
ellipsis: true
ellipsis: true,
width: 160
},
{
title: this.$t('clauseContent'),
dataIndex: 'iterms_conditions',
dataIndex: 'itemContent',
align: 'center',
ellipsis: true
width: 260,
scopedSlots: { customRender: 'clauseContent' }
},
{
title: this.$t('Assessor'),
dataIndex: 'Assessor',
align: 'center',
ellipsis: true
ellipsis: true,
width: 160
},
{
title: this.$t('evaluationMethod'),
dataIndex: 'evaluationMethod',
dataIndex: 'evaluationMethodsName',
align: 'center',
ellipsis: true
ellipsis: true,
width: 160
},
{
title: this.$t('nameTechnicalDocument'),
dataIndex: 'nameTechnicalDocument',
dataIndex: 'technicalFileName',
align: 'center',
ellipsis: true
ellipsis: true,
width: 260
},
{
title: this.$t('chapter'),
dataIndex: 'chapter',
dataIndex: 'section',
align: 'center',
ellipsis: true
ellipsis: true,
width: 260
},
{
title: this.$t('complianceResults'),
dataIndex: 'complianceResults',
dataIndex: 'complianceResultName',
align: 'center',
ellipsis: true
ellipsis: true,
width: 160
},
{
title: this.$t('opinion'),
dataIndex: 'opinion',
align: 'center',
ellipsis: true
ellipsis: true,
width: 260
},
{
title: this.$t('enclosure'),
dataIndex: 'enclosure',
dataIndex: 'accessoryFile',
align: 'center',
ellipsis: true
ellipsis: true,
width: 160,
scopedSlots: { customRender: 'accessoryFile' }
},
{
title: this.$t('feedbackTime'),
dataIndex: 'feedbackTime',
dataIndex: 'createTime',
align: 'center',
ellipsis: true
ellipsis: true,
width: 160
}
]
}
},
mounted() {
this.getList()
},
methods: {
CurrentStandard() {
let query = {
firstInitiation: '2',
whetherTobring: '1'
}
let newUrl = this.$router.resolve({
path: '/evaluationInitiationProcess',
query: query
})
window.open(newUrl.href, '_blank')
},
onSelectChange(value) {
this.selectedRowKeys = value
},
searchQuery() {
this.pageNo = 1
this.getList()
},
searchReset() {
this.queryParam = {}
this.pageNo = 1
this.getList()
},
getList() {
let query = {
lawsTechnologyEvaluationId: this.$route.query.id,
...this.queryParam
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataSource = res.result || []
this.loading = false
} else {
this.dataSource = []
this.loading = false
}
})
},
fileExportClick() {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = {
...this.queryParam,
ids: selectedRowKeys.join(','),
lawsTechnologyEvaluationId: this.$route.query.id
}
downloadFile(this.url.exportData, this.$route.query.serialNumber + ' ' + this.$t('regulatoryTechnicalEvaluationResults') + '.zip',
query, this.Deselect)
},
Deselect() {
this.selectedRowKeys = []
},
PersonnelSelectionChange(value, id) {
this.queryParam[value] = id
this.queryParam = { ...this.queryParam }
},
accessoryFileClick(item) {
this.$refs.viewFileModelRef.clickButtonToUpload(item)
}
}
}
</script>
@@ -228,6 +307,7 @@
display: flex;
justify-content: space-between;
border-bottom: 2px #eff1f3 solid;
z-index: 1000;
background: #fff;
.doc-detail-title {
@@ -326,9 +406,30 @@
margin-top: 2px;
}
.clauseContent-text {
width: 100%;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
</style>
<style>
.box-clause .ant-card-body {
padding: 0;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
</style>
@@ -6,7 +6,7 @@
<!-- <span style="line-height: 66px;display: inline-block;float: left">-->
<!-- <a-icon type="home" style="margin-right: 6px;"/>-->
<!-- </span>-->
{{$t('regulatoryTechnicalEvaluationResults')}}
{{$route.query.serialNumber +' '+$t('regulatoryTechnicalEvaluationResults')}}
</div>
</div>
<div style="padding-top: 68px;background: #fff">
@@ -19,18 +19,18 @@
</a-button>
</div>
<div class="processBackground-text">
dskf' ;sdfl';s sd稍等景点风光大家分工法规地方官给,。不买;两个客人坦克;量大幅高开的管理骨科大夫给的快感的法律公开大家赶快来的风格
{{$route.query.processBackground}}
</div>
<!-- <div class="header-text">-->
<!-- {{$t('engineerFeedbackResults')}}-->
<!-- </div>-->
<a-card :bordered="false" class="box-clause" style="margin-top: 20px" v-for="item in dataSource">
<a-card :bordered="false" class="box-clause" style="margin-top: 20px" v-for="(item,index) in dataSource">
<div class="table-operator">
<div @click="fileExportClick" class="operator-text" style="float: left;font-size: 16px">
{{$t('engineerFeedbackResults')}}
<div class="operator-text" style="float: left;font-size: 16px">
{{$t('engineer')+item.createBy+$t('feedbackResults')}}
</div>
<div @click="fileExportClick" class="operator-text">
<a-icon type="apartment"/>
<div @click="fileExportClick" v-if="index == 0" class="operator-text">
<a-icon type="export" :rotate="-90"/>
{{$t('fileExport')}}
</div>
</div>
@@ -40,100 +40,116 @@
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: '100%'}"
:data-source="item.dataList"
:scroll="{x: '100%',y:350}"
:data-source="item.lawsTechnologyEvaluationResultEOList"
:columns="columns"
>
<span slot="accessoryFile" slot-scope="text,result">
<a v-if="text" @click="accessoryFileClick(text)">
{{ $t('viewFile') }}
</a>
<span v-else>--</span>
</span>
</a-table>
</div>
<div class="text-results">
{{$t('complianceResults')}}{{item.complianceResultName}}
</div>
</a-card>
</div>
</div>
</div>
</div>
<viewFileModel ref="viewFileModelRef"/>
</div>
</template>
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile } from '@/api/manage'
import viewFileModel from '@/components/viewFileModel/index'
export default {
name: 'evaluationResultsWhole',
components: {
PersonnelSelection
PersonnelSelection,
viewFileModel
},
data() {
return {
queryParam: {},
dataSource: [
{
dataList:[
{
relevantSections:111,
problemDescription:222,
enclosure:'',
}
]
},
{
dataList:[
{
relevantSections:111,
problemDescription:222,
enclosure:'',
}
]
}
],
dataSource: [],
url: {
list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/list',
exportData: 'lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/exportZip'
},
selectedRowKeys: [],
loading: false,
columns: [
{
title: this.$t('relevantSections'),
dataIndex: 'relevantSections',
dataIndex: 'relatedSection',
align: 'center',
ellipsis: true
},
{
title: this.$t('problemDescription'),
dataIndex: 'problemDescription',
dataIndex: 'issueOrSuggest',
align: 'center',
ellipsis: true
},
{
title: this.$t('enclosure'),
dataIndex: 'enclosure',
dataIndex: 'accessoryFile',
align: 'center',
ellipsis: true
ellipsis: true,
scopedSlots: { customRender: 'accessoryFile' }
}
]
}
},
mounted() {
this.getList()
},
methods: {
CurrentStandard() {
let query = {
firstInitiation: '2',
whetherTobring: '2'
}
let newUrl = this.$router.resolve({
path: '/evaluationInitiationProcess',
query: query
})
window.open(newUrl.href, '_blank')
},
onSelectChange(value) {
},
searchQuery() {
this.pageNo = 1
this.getList()
},
searchReset() {
this.queryParam = {}
this.pageNo = 1
this.getList()
},
fileExportClick() {
let query = {
lawsTechnologyEvaluationId: this.$route.query.id
}
downloadFile(this.url.exportData, this.$route.query.serialNumber + ' ' + this.$t('regulatoryTechnicalEvaluationResults') + '.zip', query)
},
PersonnelSelectionChange(value, id) {
this.queryParam[value] = id
this.queryParam = { ...this.queryParam }
getList() {
let query = {
lawsTechnologyEvaluationId: this.$route.query.id
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataSource = res.result || []
this.loading = false
} else {
this.dataSource = []
this.loading = false
}
})
},
accessoryFileClick(item) {
this.$refs.viewFileModelRef.clickButtonToUpload(item)
}
}
}
@@ -150,6 +166,7 @@
.doc-detail-header {
width: 100%;
height: 68px;
z-index: 1000;
line-height: 68px;
padding: 0 0 0 32px;
box-sizing: border-box;
@@ -254,6 +271,10 @@
margin-top: 2px;
}
.text-results {
font-size: 14px;
margin-top: 10px;
}
</style>
<style>
.box-clause .ant-card-body {
@@ -5,34 +5,37 @@
/>
<div class="detail-box">
<div class="detail-content" style="padding: 20px">
<div class="table-page-search-wrapper">
<div class="table-page-search-wrapper" v-if="whetherDisplay">
<search ref="searchRef"
:flag="'1'"
:url="url"/>
</div>
<a-table
ref="table"
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: '100%'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange ,columnTitle:' '}"
:columns="columns"
>
</a-table>
<div class="page" v-if="dataSource && dataSource.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="pageOnChange"
@showSizeChange="SizeChange"
/>
<div v-if="whetherDisplay">
<a-table
ref="table"
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: '100%'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange ,columnTitle:' '}"
:columns="columns"
>
</a-table>
<div class="page" v-if="dataSource && dataSource.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="pageOnChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24" style="margin-bottom: 10px">
<a-col :span="24">
@@ -238,6 +241,7 @@
},
searchParmes: {},
selectedRowKeysRecord: [],
whetherDisplay: false,
columns: [
{
title: this.$t('standard'),
@@ -293,6 +297,11 @@
} else {
this.isTrue = false
}
if (this.$route.query.firstInitiation == '1') {
this.whetherDisplay = true
} else {
this.whetherDisplay = false
}
eventBUs.$on('searchQuery', search => {
Object.keys(search).forEach(res => {
if (search[res] instanceof Array) {
@@ -454,7 +463,9 @@
value.startTime = startTime
value.flowStatus = 'Underway'
value.taskAffirmDueDate = value.endTime
value.lawsTechnologyEvaluationId = this.getUUID()
if (!value.lawsTechnologyEvaluationId){
value.lawsTechnologyEvaluationId = this.getUUID()
}
value.regulationOwnerId = this.userInfo().id
value.regulationOwnerName = this.userInfo().username
Object.keys(value).forEach(res => {
@@ -474,12 +485,14 @@
query = {
type: 6,
...value,
firstInitiation: this.$route.query.firstInitiation,
msg: JSON.stringify({ itemList: dataList }).replace(/\"/g, '\'')
}
} else {
query = {
type: 6,
...value,
firstInitiation: this.$route.query.firstInitiation,
msg: JSON.stringify({ evaluators: value.evaluators }).replace(/\"/g, '\'')
}
}
@@ -156,9 +156,10 @@
<script>
import { getAction, postAction } from '@/api/manage'
import processInformation from './components/processInformation'
export default {
name: 'index',
components:{
components: {
processInformation
},
data() {
@@ -338,6 +339,7 @@
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.visible = false
this.formInline.firstInitiation = '1'
let newUrl = this.$router.resolve({
path: '/evaluationInitiationProcess',
query: this.formInline
@@ -360,11 +362,33 @@
this.$refs.processInformationRef.getData(JSON.parse(JSON.stringify(row)))
},
evaluationResultsClick(row) {
let newUrl = this.$router.resolve({
path: '/evaluationResultsWhole',
query: row
})
window.open(newUrl.href, '_blank')
if (row.evaluationType == 'Feedback evaluation') {
let newUrl = this.$router.resolve({
path: '/evaluationResultsWhole',
query: {
id: row.id,
processBackground: row.processBackground,
serialNumber: row.serialNumber,
title: row.title,
technologyTerritory: row.technologyTerritory,
standId: row.standId
}
})
window.open(newUrl.href, '_blank')
} else {
let newUrl = this.$router.resolve({
path: '/evaluationResultsClause',
query: {
id: row.id,
processBackground: row.processBackground,
serialNumber: row.serialNumber,
title: row.title,
technologyTerritory: row.technologyTerritory,
standId: row.standId
}
})
window.open(newUrl.href, '_blank')
}
}
}
}
@@ -2,60 +2,98 @@
<div class="monthlyReportRegulations-box">
<div class="header-text">
<div class="header-text-left">{{this.$t('monthlyReportRegulations')}}</div>
<div class="header-text-right">
<div class="header-text-right" @click="moreClick">
More
<img src="../../../assets/gengduo.png" alt="">
</div>
</div>
<div class="monthlyReportRegulations-box-content">
<div class="monthlyReportRegulations-text" v-for="item in monthlyReportRegulationsList">
<div class="monthlyReportRegulations-box-content" v-if="monthlyReportRegulationsList.length > 0">
<div class="monthlyReportRegulations-text" v-for="item in monthlyReportRegulationsList" @click="preview(item)">
<div class="yuan"></div>
<div class="text" :title="item.name">{{item.name}}</div>
<div class="time">{{item.time}}</div>
<div class="time">{{item.createTime}}</div>
</div>
</div>
<div v-else style="height: 300px;position: relative">
<JNoData/>
</div>
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
</div>
</template>
<script>
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
export default {
name: 'monthlyReportRegulations',
data() {
return {
monthlyReportRegulationsList: [
{
name: '蔚来汽车法规月报_202201_主页面 CN.docx',
time: '2022-01-01 13:24:36'
},
{
name: '蔚来汽车法规月报_202202_主页面 CN.docx',
time: '2022-02-01 15:50:06'
},
{
name: '蔚来汽车法规月报_202203_主页面 CN.docx',
time: '2022-03-01 13:56:20'
},
{
name: '蔚来汽车法规月报_202204_主页面 CN.docx',
time: '2022-04-01 16:24:45'
},
{
name: '蔚来汽车法规月报_202205_主页面 CN.docx',
time: '2022-06-01 17:24:06'
},
{
name: '蔚来汽车法规月报_202206_主页面 CN.docx',
time: '2022-06-01 17:24:06'
monthlyReportRegulationsList: [],
loading: false,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
url: {
list: '/report/lawsMonthlyReportManageEO/page'
}
}
},
mounted() {
this.getList()
},
methods: {
...mapGetters(['userInfo']),
getList() {
let query = {
pageNo: 1,
pageSize: 6,
issueStatus: '1'
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.monthlyReportRegulationsList = res.result.records || []
this.loading = false
} else {
this.loading = false
}
]
})
},
moreClick() {
this.$router.push({
path: '/monthlyRegulationReport'
})
},
preview(item) {
let fileName = item.name
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + item.fileId + '&userName=' + this.userInfo().username))
} else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
window.open(url, '_blank')
} else {
if (item.createBy == this.userInfo().username){
downloadFile('/sys/common/downLoadFile', item.name, { id: item.fileId, userName: this.userInfo().username })
}else{
this.$message.warning(this.$t('theDoesNotSupportPreview'))
}
}
}
}
}
</script>
<style scoped lang="less">
.monthlyReportRegulations-box {
width: 100%;
position: relative;
.header-text {
width: 100%;
@@ -73,6 +111,7 @@
font-weight: 400;
color: #9B9DA9;
margin-top: 6px;
cursor: pointer;
}
}
@@ -0,0 +1,340 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('standard')">
<span>{{$t('standard')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
v-model="queryParam.serialNumber"></j-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('title')">
<span>{{$t('title')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
v-model="queryParam.title"></j-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text tree-select">
<div class="title-text" :title="$t('releaseSituation')">
<span>{{$t('releaseSituation')}}</span>
</div>
<a-select :placeholder="$t('PleaseSelect')+$t('releaseSituation')"
class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear
v-model="queryParam.flowStatus">
<a-select-option v-for="(item, key) in gatherResultList"
: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">
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="table-operator">
<div @click="initiatingProcessClick" class="operator-text">
<a-icon type="apartment"/>
{{$t('initiateComparison')}}
</div>
</div>
<div>
<a-table
ref="table"
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: '100%'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns"
>
<!-- -->
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="comparisonResultsClick(record)">{{$t('comparisonResults')}}</a>
<a class="text-operation"
@click="subscribe(record)">
{{!record.state || record.state == 0 ? $t('release') :$t('withdraw')}}
</a>
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
<a class="text-operation" @click="deleteData(record)">{{$t('delete')}}</a>
</span>
</a-table>
<div class="page" v-if="dataSource && dataSource.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="pageOnChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
</a-card>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
export default {
name: 'index',
components: {},
data() {
return {
//url传参严格按照当前命名
url: {
list: '',
deleteBatch:'',
},
loading: false,
dataSource: [],
selectedRowKeys: [],
total: 0,
pageSize: 10,
pageNo: 1,
queryParam: {},
gatherResultList: [
{
value: '1',
name: this.$t('draft')
},
{
value: '2',
name: this.$t('Published')
}
],
columns: [
{
title: this.$t('standard') + 1,
align: 'center',
dataIndex: 'serialNumber',
width: 170
},
{
title: this.$t('title') + 1,
align: 'center',
dataIndex: 'title',
width: 170
},
{
title: this.$t('TextStatus'),
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'TextStatus'
},
{
title: this.$t('fileName'),
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'fileName'
},
{
title: this.$t('standard') + 2,
align: 'center',
dataIndex: 'serialNumberTwo',
width: 170
},
{
title: this.$t('title') + 2,
align: 'center',
dataIndex: 'titleTwo',
width: 170
},
{
title: this.$t('TextStatus'),
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'TextStatusTwo'
},
{
title: this.$t('fileName'),
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'fileNameTwo'
},
{
title: this.$t('releaseSituation'),
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'releaseSituation'
},
{
title: this.$t('remarks'),
align: 'center',
ellipsis: true,
width: 170,
dataIndex: 'remark'
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 260,
scopedSlots: { customRender: 'operation' }
}
]
}
},
mounted() {
this.getList()
},
methods: {
searchQuery() {
this.pageNo = 1
this.getList()
},
searchReset() {
this.queryParam = {}
this.pageNo = 1
this.getList()
},
pageOnChange(page) {
this.pageNo = page
this.getList()
},
SizeChange(pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.getList()
},
getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) {
queryParam[val] = queryParam[val].join(',')
}
})
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...queryParam
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataSource = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
},
onSelectChange(value) {
this.selectedRowKeys = value
},
comparisonResultsClick() {
},
subscribe() {
},
edit(){
},
initiatingProcessClick(){
},
deleteData(val){
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
getAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.page {
text-align: right;
margin-top: 20px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
/*margin-top: 2px;*/
}
.text-operation {
margin-right: 8px;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.Required {
color: red;
margin-right: 4px;
}
</style>
@@ -0,0 +1,330 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('standard')">
<span>{{$t('standard')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
v-model="queryParam.serialNumber"></j-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('title')">
<span>{{$t('title')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
v-model="queryParam.title"></j-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text tree-select">
<div class="title-text" :title="$t('releaseSituation')">
<span>{{$t('releaseSituation')}}</span>
</div>
<a-select :placeholder="$t('PleaseSelect')+$t('releaseSituation')"
class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear
v-model="queryParam.flowStatus">
<a-select-option v-for="(item, key) in gatherResultList"
: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">
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="table-operator">
<div @click="initiatingProcessClick" class="operator-text">
<a-icon type="apartment"/>
{{$t('initiateComparison')}}
</div>
</div>
<div>
<a-table
ref="table"
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: '100%'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns"
>
<!-- -->
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="viewClick(record)">{{$t('view')}}</a>
<a class="text-operation" @click="checkClick(record)">{{$t('check')}}</a>
<a class="text-operation"
@click="subscribe(record)">
{{!record.state || record.state == 0 ? $t('release') :$t('withdraw')}}
</a>
<a class="text-operation" @click="downloadData(record)">{{$t('download')}}</a>
<a class="text-operation" @click="deleteData(record)">{{$t('delete')}}</a>
</span>
</a-table>
<div class="page" v-if="dataSource && dataSource.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="pageOnChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
</a-card>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
export default {
name: 'index',
components: {},
data() {
return {
//url传参严格按照当前命名
url: {
list: '',
deleteBatch:'',
},
loading: false,
dataSource: [],
selectedRowKeys: [],
total: 0,
pageSize: 10,
pageNo: 1,
queryParam: {},
gatherResultList: [
{
value: '1',
name: this.$t('draft')
},
{
value: '2',
name: this.$t('Published')
}
],
columns: [
{
title: this.$t('standard'),
align: 'center',
dataIndex: 'serialNumber',
width: 170
},
{
title: this.$t('title'),
align: 'center',
dataIndex: 'title',
width: 170
},
{
title: this.$t('TextStatus'),
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'TextStatus'
},
{
title: this.$t('fileName'),
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'fileName'
},
{
title: this.$t('translationLanguage'),
align: 'center',
dataIndex: 'translationLanguage',
width: 170
},
{
title: this.$t('translationResults'),
align: 'center',
dataIndex: 'translationResults',
width: 170
},
{
title: this.$t('conversionTime'),
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'conversionTime'
},
{
title: this.$t('releaseSituation'),
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'releaseSituation'
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 260,
scopedSlots: { customRender: 'operation' }
}
]
}
},
mounted() {
this.getList()
},
methods: {
searchQuery() {
this.pageNo = 1
this.getList()
},
searchReset() {
this.queryParam = {}
this.pageNo = 1
this.getList()
},
pageOnChange(page) {
this.pageNo = page
this.getList()
},
SizeChange(pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.getList()
},
getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) {
queryParam[val] = queryParam[val].join(',')
}
})
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...queryParam
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataSource = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
},
onSelectChange(value) {
this.selectedRowKeys = value
},
viewClick(row) {
},
checkClick(row){
},
downloadData(){
},
subscribe() {
},
initiatingProcessClick(){
},
deleteData(val){
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
getAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.page {
text-align: right;
margin-top: 20px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
/*margin-top: 2px;*/
}
.text-operation {
margin-right: 8px;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.Required {
color: red;
margin-right: 4px;
}
</style>
@@ -181,6 +181,13 @@
deleteData() {
this.formInline.dataList.pop()
this.formInline = { ...this.formInline }
},
submitData(callBack) {
this.$refs.ruleForm.validate(valid => {
if (valid) {
callBack && callBack(this.formInline.dataList)
}
})
}
}
}
@@ -142,13 +142,13 @@
res.lawsOpinionGatherId = this.queryProject.id
res.actiProcInstId = this.$route.query.prcId
})
postAction('/lawsOpinionGather/lawsOpinionAssessmentResultEO/insertBatch', { dataList:list }).then((res) => {
postAction('/lawsOpinionGather/lawsOpinionAssessmentResultEO/insertBatch', { dataList: list }).then((res) => {
if (res.success) {
if (num == 1) {
this.$message.success(this.$t('OperationSuccessful'))
this.$router.push({
path: '/collectionOfRegulatoryOpinions'
})
// this.$router.push({
// path: '/collectionOfRegulatoryOpinions'
// })
this.loading = false
} else {
this.completeTask()
@@ -162,8 +162,12 @@
})
},
submit() {
let dataList = this.$refs.feedbackInformationRef.formInline.dataList
this.insertBatch(dataList, 2)
this.$refs.feedbackInformationRef.submitData((res) => {
this.loading = true
this.insertBatch(res, 2)
})
// let dataList = this.$refs.feedbackInformationRef.formInline.dataList
// this.insertBatch(dataList, 2)
},
completeTask() {
let query = {
@@ -608,6 +608,8 @@
},
mounted() {
this.GetgetLoginUserType()
console.log(this.currentPersonRole)
// this.LoginUserType()
setTimeout(() => {
if (this.currentPersonRole == 'dre') {
this.handlePreservation()
@@ -1178,11 +1180,12 @@
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') {
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++) {
@@ -1241,7 +1244,7 @@
let postDateobj = {}
let itemIn = Object.keys(selectedRowKeysValue[i])
for (let j = 0; j < itemIn.length; j++) {
if (itemIn[j] !== 'sdt') {
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++) {
@@ -1436,9 +1439,10 @@
this.$refs.CollectionTabel.getTableList()
},
searchReset() {
this.formInline = {}
this.$refs.CollectionTabel.getTableListReset()
this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback()
this.$refs.globalAdvancedQueryRef.handleReset()
// this.$refs.globalAdvancedQueryRef.emitCallback()
},
// 批量删除 -- 与下发收集一致
handleDelJurisdiction() {