合并分支 'dev_third_stage' 到 'master'
Dev third stage 查看合并请求 laws-nio/laws-weilai!175
This commit is contained in:
@@ -1109,5 +1109,5 @@ INSERT INTO `laws_weilai`.`sys_permission` (`id`, `parent_id`, `name`, `url`, `c
|
||||
INSERT INTO `laws_weilai`.`sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`) VALUES ('1567711678239260673', '1539780399024934914', '法规意见-批量删除', NULL, NULL, NULL, NULL, 2, 'regulatoryComments:batchDelete', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'admin', '2022-09-08 11:09:25', NULL, NULL, 0, 0, '1', 0, 'Regulatory Comments - batch Delete');
|
||||
INSERT INTO `laws_weilai`.`sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`) VALUES ('1567711460491968513', '1539780399024934914', '法规意见-删除', NULL, NULL, NULL, NULL, 2, 'regulatoryComments:delete', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'admin', '2022-09-08 11:08:34', NULL, NULL, 0, 0, '1', 0, 'Regulatory Comments - delete');
|
||||
|
||||
-- 上报库删除按钮
|
||||
-- 上报库删除按钮 2022-09-14已同步生产环境
|
||||
INSERT INTO `laws_weilai`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`) VALUES ('1569609701240446977', '1539429224550457346', '删除', NULL, NULL, NULL, NULL, 2, 'params:report:delete', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'admin', '2022-09-13 16:51:29', NULL, NULL, 0, 0, '1', 0, 'Delete');
|
||||
+1
-1
@@ -78,7 +78,7 @@
|
||||
pm.state as state,
|
||||
concat(pni.project_name,'-',pyni.year_name) as project_name,
|
||||
pm.params_template_id as params_template_id,
|
||||
pt.params_template_name as params_template_name,
|
||||
if (pt.params_template_name is not null, pt.params_template_name, pm.params_template_name) as params_template_name,
|
||||
pm.params_template_publish_version as params_template_publish_version,
|
||||
pm.create_time as create_time
|
||||
from params_manifest pm
|
||||
|
||||
+5
-1
@@ -30,6 +30,7 @@ import com.jero.modules.cert.template.enums.ParamsIsMustEnum;
|
||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.project.util.Docx4jUtils;
|
||||
import com.jero.modules.project.util.ExcelUtil;
|
||||
import com.jero.modules.project.util.WordUtil;
|
||||
import com.jero.modules.split.common.ReadExcel;
|
||||
@@ -48,6 +49,7 @@ import org.docx4j.Docx4J;
|
||||
import org.docx4j.openpackaging.exceptions.Docx4JException;
|
||||
import org.docx4j.openpackaging.packages.SpreadsheetMLPackage;
|
||||
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
|
||||
import org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
@@ -785,6 +787,8 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
if (CosBootUtil.doesObjectExist(templateUrl)) {
|
||||
InputStream wordTemplate = CosBootUtil.download(templateUrl);
|
||||
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(wordTemplate);
|
||||
MainDocumentPart mainDocumentPart = wordMLPackage.getMainDocumentPart();
|
||||
Docx4jUtils.cleanDocumentPartDouble(mainDocumentPart);
|
||||
|
||||
//下载关联文件内容
|
||||
List<Map<String, Object>> fileListAll = (List<Map<String, Object>>) allParamsInfoList.get(2).get("fileListAll");
|
||||
@@ -838,7 +842,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
|
||||
// 替换占位符内容
|
||||
WordUtil.replacePictureBatch(wordMLPackage, imgListAll);
|
||||
WordUtil.replaceVariable(wordMLPackage, params);
|
||||
WordUtil.replaceVariableWithOutClear(wordMLPackage, params);
|
||||
Docx4J.save(wordMLPackage, wordOS);
|
||||
|
||||
wordOS.flush();
|
||||
|
||||
+27
-12
@@ -1,25 +1,26 @@
|
||||
package com.jero.modules.project.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
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.project.entity.ProjectLawsInventoryRejectCauseEO;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryRejectCauseEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryRejectCauseEO;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryRejectCauseEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@@ -85,6 +86,20 @@ public class ProjectLawsInventoryRejectCauseEOController extends JeroController<
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量添加
|
||||
*
|
||||
* @param projectLawsInventoryRejectCauseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "清单确认-拒绝原因表-批量添加")
|
||||
@ApiOperation(value="清单确认-拒绝原因表-批量添加", notes="清单确认-拒绝原因表-批量添加")
|
||||
@PostMapping(value = "/addBatch")
|
||||
public Result<?> addBatch(@Validated @RequestBody ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO) {
|
||||
projectLawsInventoryRejectCauseEOService.addBatch(projectLawsInventoryRejectCauseEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
|
||||
+8
-7
@@ -66,7 +66,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
|
||||
private String projectLibraryId;
|
||||
|
||||
/**编号*/
|
||||
@Excel(name = "Number", width = 20)
|
||||
@Excel(name = "*Number", width = 20)
|
||||
@ApiModelProperty(value = "编号")
|
||||
private String serialNumber;
|
||||
|
||||
@@ -116,13 +116,14 @@ public class ProjectLawsInventoryEOEn implements Serializable {
|
||||
private String implementType;
|
||||
|
||||
/**新车型实施日期*/
|
||||
@Excel(name = "New Type Execution Date", width = 30, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "新车型实施日期")
|
||||
private Date xin1Che1Xing2Shi2Shi1Ri4Qi1;
|
||||
|
||||
/**在产车实施日期*/
|
||||
@Excel(name = "New Vehicle Execute Date", width = 30, format = "yyyy-MM-dd")
|
||||
@Excel(name = "New Vehicle Execution Date", width = 30, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "在产车实施日期")
|
||||
@@ -135,7 +136,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
|
||||
private String attestationType;
|
||||
|
||||
/**认证级别*/
|
||||
@Excel(name = "Certification Level", width = 25,dicCode ="attestation_rank")
|
||||
@Excel(name = "*Certification Level", width = 25,dicCode ="attestation_rank")
|
||||
@ApiModelProperty(value = "认证级别")
|
||||
@Dict(dicCode ="attestation_rank")
|
||||
private String attestationRank;
|
||||
@@ -150,7 +151,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
|
||||
private String wvtaId;
|
||||
|
||||
/**责任领域*/
|
||||
@Excel(name = "Responsible Field", width = 25,dicCode ="duty_territory")
|
||||
@Excel(name = "*Responsible Field", width = 25,dicCode ="duty_territory")
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
@Dict(dicCode ="duty_territory")
|
||||
private String dutyTerritory;
|
||||
@@ -212,7 +213,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
|
||||
private String designInitiatorId;
|
||||
|
||||
/**设计符合性确认-发起人名称*/
|
||||
@Excel(name = "Initiator", width = 25,groupName = "Design Compliance Check")
|
||||
@Excel(name = "Reviewer", width = 25,groupName = "Design Compliance Check")
|
||||
@TableField(exist = false)
|
||||
private String designInitiatorName;
|
||||
|
||||
@@ -268,7 +269,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
|
||||
private String prehomoInitiatorId;
|
||||
|
||||
/**prehomo确认-发起人名称*/
|
||||
@Excel(name = "Initiator", width = 25,groupName = "Pre-homo Check")
|
||||
@Excel(name = "Reviewer", width = 25,groupName = "Pre-homo Check")
|
||||
@TableField(exist = false)
|
||||
private String prehomoInitiatorName;
|
||||
|
||||
@@ -324,7 +325,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
|
||||
private String verifyInitiatorId;
|
||||
|
||||
/**验证符合性确认-发起人名称*/
|
||||
@Excel(name = "Initiator", width = 25,groupName = "Validation Compliance Check")
|
||||
@Excel(name = "Reviewer", width = 25,groupName = "Validation Compliance Check")
|
||||
@TableField(exist = false)
|
||||
private String verifyInitiatorName;
|
||||
|
||||
|
||||
+8
-8
@@ -1,21 +1,19 @@
|
||||
package com.jero.modules.project.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
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;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
@@ -88,4 +86,6 @@ public class ProjectLawsInventoryRejectCauseEO implements Serializable {
|
||||
@ApiModelProperty(value = "拒绝类型")
|
||||
private java.lang.String rejectType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String taskIds;
|
||||
}
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.jero.modules.project.enums;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @date 2022/9/14 16:09
|
||||
* @auth zhn
|
||||
*/
|
||||
public enum DataSourceEnum {
|
||||
TEMPLATE_DATA("模板数据","1"),
|
||||
LIST_DATA("列表数据","2");
|
||||
String name;
|
||||
String value;
|
||||
|
||||
DataSourceEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
+9
@@ -57,5 +57,14 @@ public enum InventoryAffirmStatusEnum {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static String getTextByName(String name) {
|
||||
InventoryAffirmStatusEnum[] values = values();
|
||||
for (InventoryAffirmStatusEnum inventoryAffirmStatusEnum : values) {
|
||||
if (inventoryAffirmStatusEnum.name.equals(name)) {
|
||||
return inventoryAffirmStatusEnum.value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+9
@@ -53,5 +53,14 @@ public enum TaskAffirmStatusEnum {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static String getTextByName(String name) {
|
||||
TaskAffirmStatusEnum[] values = values();
|
||||
for (TaskAffirmStatusEnum taskAffirmStatusEnum : values) {
|
||||
if (taskAffirmStatusEnum.name.equals(name)) {
|
||||
return taskAffirmStatusEnum.value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -22,6 +22,8 @@ public interface IProjectLawsInventoryRejectCauseEOService extends IService<Proj
|
||||
*/
|
||||
void add(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO);
|
||||
|
||||
void addBatch(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
|
||||
+1394
-202
File diff suppressed because it is too large
Load Diff
+42
-3
@@ -1,16 +1,23 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryRejectCauseEO;
|
||||
import com.jero.modules.project.mapper.ProjectLawsInventoryRejectCauseEOMapper;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryRejectCauseEOService;
|
||||
import com.jero.modules.wkflow.feginClient.TaskFeignClient;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 清单确认-拒绝原因表
|
||||
@@ -21,6 +28,9 @@ import javax.servlet.http.HttpServletRequest;
|
||||
@Service
|
||||
public class ProjectLawsInventoryRejectCauseEOServiceImpl extends ServiceImpl<ProjectLawsInventoryRejectCauseEOMapper, ProjectLawsInventoryRejectCauseEO> implements IProjectLawsInventoryRejectCauseEOService {
|
||||
|
||||
@Autowired
|
||||
private TaskFeignClient taskFeignClient;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -35,6 +45,35 @@ public class ProjectLawsInventoryRejectCauseEOServiceImpl extends ServiceImpl<Pr
|
||||
save(projectLawsInventoryRejectCauseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量保存
|
||||
*
|
||||
* @param projectLawsInventoryRejectCauseEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void addBatch(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO) {
|
||||
List<String> taskIdList = Arrays.asList(projectLawsInventoryRejectCauseEO.getTaskIds().split(","));
|
||||
|
||||
List<ProjectLawsInventoryRejectCauseEO> insertEOList = new ArrayList<>();
|
||||
// 获取法规清单id
|
||||
for(String taskId : taskIdList) {
|
||||
ProjectLawsInventoryRejectCauseEO insertEO = new ProjectLawsInventoryRejectCauseEO();
|
||||
BeanUtils.copyProperties(projectLawsInventoryRejectCauseEO, insertEO);
|
||||
|
||||
String taskDetailJson = taskFeignClient.queryTaskDetailByTaskIds(taskId);
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = JSONObject.parseObject(taskDetailJson, ProjectLawsInventoryEO.class);
|
||||
insertEO.setProjectLawsInventoryId(projectLawsInventoryEO.getId());
|
||||
insertEO.setTaskIds(null);
|
||||
Date now = new Date();
|
||||
insertEO.setCreateTime(now);
|
||||
insertEO.setUpdateTime(now);
|
||||
|
||||
insertEOList.add(insertEO);
|
||||
}
|
||||
saveBatch(insertEOList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
|
||||
+64
@@ -100,6 +100,70 @@ public final class Docx4jUtils {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* cleanDocumentPart
|
||||
*
|
||||
* @param documentPart
|
||||
*/
|
||||
public static boolean cleanDocumentPartDouble(MainDocumentPart documentPart) throws Exception {
|
||||
if (documentPart == null) {
|
||||
return false;
|
||||
}
|
||||
Document document = documentPart.getContents();
|
||||
String wmlTemplate =
|
||||
XmlUtils.marshaltoString(document, true, false, Context.jc);
|
||||
wmlTemplate = cleanXmlString(wmlTemplate);
|
||||
document = (Document) XmlUtils.unwrap(DocxVariableClearUtils.doCleanDocumentPart(wmlTemplate, Context.jc));
|
||||
// document = (Document) DocumentHelper.parseText(wmlTemplate);
|
||||
documentPart.setContents(document);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static String cleanXmlString(String string) {
|
||||
|
||||
StringBuilder appender = new StringBuilder();
|
||||
|
||||
//判断每一行数据中不包含'$'的数据先添加进新文件
|
||||
if (!string.contains("$")) {
|
||||
appender.append(string);
|
||||
return appender.toString();
|
||||
}
|
||||
//如果一行数据中包含'$'变量符将替换为'#$'
|
||||
string = string.replaceAll("\\$", "#\\$");
|
||||
//然后以'#'切割成每一行(数组),这样一来'$'都将在每一行的开头
|
||||
String[] ss = string.split("#");
|
||||
|
||||
//遍历每一行(数组ss)
|
||||
for (int i = 0; i < ss.length; i++) {
|
||||
// 同一行的数据写到同一行,文件追加自动换行了(最后的完整数据)
|
||||
StringBuilder sb = new StringBuilder();
|
||||
//暂存数据
|
||||
String s1 = ss[i];
|
||||
//将不是以'$'开头的行数据放进StringBuilder
|
||||
if (!s1.startsWith("$")) {
|
||||
if (i > 0) {
|
||||
sb.append("#");
|
||||
}
|
||||
sb.append(s1);
|
||||
appender.append(sb.toString());
|
||||
continue;
|
||||
}
|
||||
//被分离的数据一般都是'${'这样被分开
|
||||
//匹配以'$'开头的变量找到'}' 得到索引位置
|
||||
int i1 = s1.indexOf("}");
|
||||
//先切割得到这个完整体
|
||||
String substr = s1.substring(0, i1 + 1);
|
||||
//把变量追加到StringBuilder
|
||||
sb.append(substr.replaceAll("\n","").replaceAll("<[^>]+>", ""));
|
||||
//再将标签数据追加到StringBuilder包裹变量
|
||||
sb.append(s1.substring(i1 + 1));
|
||||
|
||||
appender.append(sb.toString());
|
||||
}
|
||||
|
||||
return appender.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 清扫 docx4j 模板变量字符,通常以${variable}形式
|
||||
* <p>
|
||||
|
||||
+5
-2
@@ -59,6 +59,11 @@ public class WordUtil {
|
||||
documentPart.variableReplace((HashMap<String, String>) map);
|
||||
}
|
||||
|
||||
public static void replaceVariableWithOutClear(WordprocessingMLPackage wordMLPackage, Map<String, String> map) throws Exception {
|
||||
MainDocumentPart documentPart = wordMLPackage.getMainDocumentPart();
|
||||
documentPart.variableReplace((HashMap<String, String>) map);
|
||||
}
|
||||
|
||||
public static void replaceTable(String templatePath, int tableNum, int rowNum, List<Map<String, Object>> dataList, String outPath) throws Exception {
|
||||
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(new File(templatePath));
|
||||
MainDocumentPart mainDocumentPart = wordMLPackage.getMainDocumentPart();
|
||||
@@ -203,7 +208,6 @@ public class WordUtil {
|
||||
public static void replacePictureBatch(WordprocessingMLPackage wordMLPackage, List<Map<String, Object>> picList) throws Exception {
|
||||
try {
|
||||
MainDocumentPart mainDocumentPart = wordMLPackage.getMainDocumentPart();
|
||||
Docx4jUtils.cleanDocumentPart(mainDocumentPart);
|
||||
Document wmlDoc = (Document)mainDocumentPart.getJaxbElement();
|
||||
Body body = wmlDoc.getBody();
|
||||
List<Text> textList = getAllPlaceholderElementFromObject(body); // 获取文档中所有占位符
|
||||
@@ -241,7 +245,6 @@ public class WordUtil {
|
||||
*/
|
||||
public static Map<String, String> filterParams(WordprocessingMLPackage wordMLPackage, Map<String, String> params) throws Exception {
|
||||
MainDocumentPart mainDocumentPart = wordMLPackage.getMainDocumentPart();
|
||||
Docx4jUtils.cleanDocumentPart(mainDocumentPart);
|
||||
Document wmlDoc = (Document)mainDocumentPart.getJaxbElement();
|
||||
Body body = wmlDoc.getBody();
|
||||
List<Text> textList = getAllPlaceholderElementFromObject(body); // 获取文档中所有占位符
|
||||
|
||||
+64
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.split.common;
|
||||
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.xkcoding.http.util.StringUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.tools.zip.ZipEntry;
|
||||
@@ -169,6 +170,69 @@ public class FileUnZip {
|
||||
return resultlist;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据文件名称读取固定目录下文件
|
||||
* 适用范围:filename内容 dir/file
|
||||
* gaoyan
|
||||
* @param filename
|
||||
*/
|
||||
public static List<File> readFileByFilenameDataList(String path,
|
||||
String filename,
|
||||
String cut,
|
||||
String errorMsg,
|
||||
List<String> msgList,
|
||||
String nameCn,
|
||||
String nameEn,
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
//法规清单列表数据导入的时候,交付物模板字段为文件属性,填写时需要在本文件同级目录下以标准号为名称建立文件夹,并在文件夹下放置文件,假设在AAA标准号下放置了B.docx,则应填写AAA/B.docx
|
||||
filename = projectLawsInventoryEO.getSerialNumber()+"/"+filename;
|
||||
String filenameOne = "";
|
||||
String filenameTwo = "";
|
||||
if(filename.contains("/")){
|
||||
filenameOne = filename.split("/")[0];
|
||||
filenameTwo = filename.split("/")[1];
|
||||
}
|
||||
List<File> resultlist = new ArrayList<>();
|
||||
if (StringUtil.isNotEmpty(path)){
|
||||
File file = new File(path);
|
||||
if (file.isDirectory()) {
|
||||
File[] files = file.listFiles();
|
||||
for (File fi : files) {
|
||||
if(fi.isDirectory()){
|
||||
File[] filesTemp = fi.listFiles();
|
||||
for (File fileTemp : filesTemp) {
|
||||
// 对文件进行过滤
|
||||
if (fileTemp.getName().equals(filenameTwo) && fi.getName().equals(filenameOne) && StringUtils.isNotBlank(filenameOne)) {
|
||||
resultlist.add(fileTemp);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
// 对文件进行过滤
|
||||
if (fi.getName().equals(filenameTwo) && fi.getPath().contains(filenameOne) && StringUtils.isNotBlank(filenameOne)) {
|
||||
resultlist.add(fi);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(resultlist.size() == 0){
|
||||
String name = "";
|
||||
if(filename.contains("/")){
|
||||
name = filenameTwo;
|
||||
}else{
|
||||
name = filename;
|
||||
}
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg += nameCn + name + "格式不正确或者压缩包中没有" + name + "文件,请参考模板下载中的说明";
|
||||
}else{
|
||||
errorMsg += nameEn + name + " Incorrect format or not present in compressed package " + name + " file please refer to the description in template download;";
|
||||
}
|
||||
if(msgList != null){
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
}
|
||||
return resultlist;
|
||||
}
|
||||
/**
|
||||
* 根据文件名称读取固定目录下文件
|
||||
* 适用范围:filename内容 dir/file
|
||||
|
||||
+16
@@ -97,6 +97,22 @@ public class workFlowController {
|
||||
return str;
|
||||
}
|
||||
|
||||
@AutoLog(value = "批量完成任务")
|
||||
@ApiOperation(value="批量完成任务", notes="批量完成任务")
|
||||
@PostMapping("/completeTaskBatch")
|
||||
public Result<String> completeTaskByUserIdBatch(@RequestBody BusMes busMes){
|
||||
if(StringUtils.isEmpty(busMes.getUserId())){
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
busMes.setUserId(currentUser.getId());
|
||||
}
|
||||
Result<String> str = workFlowFeignClient.completeTaskByUserIdBatch(busMes);
|
||||
if(str.getCode() == 500){
|
||||
str.setSuccess(false);
|
||||
}
|
||||
// sendWebsocket(busMes.getTaskId(),busMes.getTaskId());
|
||||
return str;
|
||||
}
|
||||
|
||||
public void sendWebsocket(String msgId, String msgTet) {
|
||||
com.alibaba.fastjson.JSONObject obj = new com.alibaba.fastjson.JSONObject();
|
||||
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
||||
|
||||
@@ -28,6 +28,15 @@ public class BusMes {
|
||||
|
||||
private String nowStateType;
|
||||
|
||||
private String flag;
|
||||
private String approvalOpinion; // 反馈意见 待办流程-批量办理专用
|
||||
private String dreUserId; // 待办流程-批量办理专用
|
||||
private String dreUserIdName; // 待办流程-批量办理专用
|
||||
private String handlingTime; // 待办流程-批量办理专用
|
||||
private String projectLawsInventoryIds; // 待办流程-批量办理专用
|
||||
private String taskDefinitionKey; // 待办流程-批量办理专用
|
||||
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
@@ -128,4 +137,60 @@ public class BusMes {
|
||||
public String getNowStateType() { return nowStateType; }
|
||||
|
||||
public void setNowStateType(String nowStateType) { this.nowStateType = nowStateType; }
|
||||
|
||||
public String getFlag() {
|
||||
return flag;
|
||||
}
|
||||
|
||||
public void setFlag(String flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public String getApprovalOpinion() {
|
||||
return approvalOpinion;
|
||||
}
|
||||
|
||||
public void setApprovalOpinion(String approvalOpinion) {
|
||||
this.approvalOpinion = approvalOpinion;
|
||||
}
|
||||
|
||||
public String getDreUserId() {
|
||||
return dreUserId;
|
||||
}
|
||||
|
||||
public void setDreUserId(String dreUserId) {
|
||||
this.dreUserId = dreUserId;
|
||||
}
|
||||
|
||||
public String getDreUserIdName() {
|
||||
return dreUserIdName;
|
||||
}
|
||||
|
||||
public void setDreUserIdName(String dreUserIdName) {
|
||||
this.dreUserIdName = dreUserIdName;
|
||||
}
|
||||
|
||||
public String getHandlingTime() {
|
||||
return handlingTime;
|
||||
}
|
||||
|
||||
public void setHandlingTime(String handlingTime) {
|
||||
this.handlingTime = handlingTime;
|
||||
}
|
||||
|
||||
public String getProjectLawsInventoryIds() {
|
||||
return projectLawsInventoryIds;
|
||||
}
|
||||
|
||||
public void setProjectLawsInventoryIds(String projectLawsInventoryIds) {
|
||||
this.projectLawsInventoryIds = projectLawsInventoryIds;
|
||||
}
|
||||
|
||||
public String getTaskDefinitionKey() {
|
||||
return taskDefinitionKey;
|
||||
}
|
||||
|
||||
public void setTaskDefinitionKey(String taskDefinitionKey) {
|
||||
this.taskDefinitionKey = taskDefinitionKey;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,6 +1,5 @@
|
||||
package com.jero.modules.wkflow.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -73,4 +72,6 @@ public class BusProcessName implements Serializable {
|
||||
private String projectName;
|
||||
|
||||
private String handlingTime;
|
||||
|
||||
private String projectLawsInventoryId;
|
||||
}
|
||||
|
||||
+8
@@ -36,6 +36,14 @@ public interface WorkFlowFeignClient {
|
||||
@RequestMapping(value = "/bat-wkflow/completeTask",method = RequestMethod.POST)
|
||||
Result<String> completeTaskByUserId(@RequestBody BusMes busMes);
|
||||
|
||||
/**
|
||||
* 批量完成任务
|
||||
* @param busMes
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/completeTaskBatch",method = RequestMethod.POST)
|
||||
Result<String> completeTaskByUserIdBatch(@RequestBody BusMes busMes);
|
||||
|
||||
/**
|
||||
* 通过流程实例id查询当前待办的流程实例是否结束
|
||||
* @param prcId
|
||||
|
||||
+10
@@ -46,6 +46,16 @@ public class WorkFlowFeignClientImpl{
|
||||
return stringWrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量完成任务
|
||||
* @param busMes
|
||||
* @return
|
||||
*/
|
||||
public Result<String> completeTaskByUserIdBatch( BusMes busMes){
|
||||
Result<String> stringWrapper = workFlowFeignClient.completeTaskByUserIdBatch(busMes);
|
||||
return stringWrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过流程实例id查询当前待办的流程实例是否结束
|
||||
* @param prcId
|
||||
|
||||
@@ -1292,4 +1292,10 @@ module.exports = {
|
||||
Deletetitle:'Delete the title',
|
||||
toConfirmed: 'to confirm',
|
||||
confirmtitle:'The title is incorrect. Please re-enter it',
|
||||
batchProcessing:'Batch Processing',
|
||||
onlyDataTaskConfirmationProcessSelected:'Only data of task confirmation process can be selected',
|
||||
processNode:'Process Node',
|
||||
personChargeReceivesTheTask:'Person in charge receives the task',
|
||||
theResponsiblePersonTaskForTheSecondTime:'The responsible person receives the task for the second time',
|
||||
processNodesAreInconsistentPleaseSelectConsistentData:'Process nodes are inconsistent; Please select consistent data',
|
||||
}
|
||||
@@ -1394,4 +1394,10 @@ module.exports = {
|
||||
Deletetitle:'删除标题',
|
||||
toConfirmed: '来确认',
|
||||
confirmtitle:'标题不正确,请重新输入',
|
||||
batchProcessing:'批量办理',
|
||||
onlyDataTaskConfirmationProcessSelected:'只能选择流程类型为任务确认流程的数据',
|
||||
processNode:'流程节点',
|
||||
personChargeReceivesTheTask:'责任人接收任务',
|
||||
theResponsiblePersonTaskForTheSecondTime:'责任人二次接收任务',
|
||||
processNodesAreInconsistentPleaseSelectConsistentData:'流程节点不一致;请选择一致的数据',
|
||||
}
|
||||
@@ -238,6 +238,7 @@ export default {
|
||||
if(res.data.result.length == 0){
|
||||
this.visibleoperationFailed = false
|
||||
this.textLoading = false
|
||||
this.visible = false
|
||||
_this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
||||
this.$emit('GetgetTableList')
|
||||
@@ -246,6 +247,7 @@ export default {
|
||||
this.NotSelectedRowKeysValue = res.data.result
|
||||
this.visibleoperationFailed = true
|
||||
this.textLoading = false
|
||||
this.visible = false
|
||||
}
|
||||
|
||||
// this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
||||
|
||||
@@ -239,12 +239,14 @@ export default {
|
||||
_this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$emit('areaVisibleTaskCutOffTimeAll', false)
|
||||
this.$emit('GetgetTableList')
|
||||
this.visible = false
|
||||
this.textLoading = false
|
||||
|
||||
}else{
|
||||
this.NotSelectedRowKeysValue = res.data.result
|
||||
this.visibleoperationFailed = true
|
||||
this.textLoading = false
|
||||
this.visible = false
|
||||
}
|
||||
|
||||
// this.$emit('areaVisibleTaskCutOffTime', false)
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
dreUserIdName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('selectIssuer') + this.$t('cannotEmpty'),
|
||||
message: this.$t('selectInquiry') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
|
||||
+250
@@ -0,0 +1,250 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-modal
|
||||
:title="$t('batchProcessing')"
|
||||
:width="700"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24" v-if="taskDefinitionKey != 'dreqr'">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"></span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="flag">
|
||||
<a-radio-group style="margin-top: 2px" @change="flagChange" class="box-input" v-model="formInline.flag">
|
||||
<a-radio value="0">
|
||||
{{$t('accept')}}
|
||||
</a-radio>
|
||||
<a-radio value="1">
|
||||
{{$t('disagree')}}
|
||||
</a-radio>
|
||||
<a-radio value="3" v-if="taskDefinitionKey == 'zrrjsrw'">
|
||||
{{$t('inquiry')}}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="isTrue">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('selectInquiry')">{{$t('selectInquiry')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="dreUserIdName">
|
||||
<PersonnelSelection class="box-input"
|
||||
:personneQuery="formInline"
|
||||
:query="{db_field_name:'dreUserId',db_field_txt:$t('selectInquiry')}"
|
||||
:isInput="true"
|
||||
:isSingleChoice="true"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="formInline.dreUserIdName"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('feedbackMessage')">{{$t('feedbackMessage')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="standard">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('feedbackMessage')" v-model="formInline.approvalOpinion"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import moment from 'moment'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'batchProcessing',
|
||||
components: {
|
||||
PersonnelSelection
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
rules: {
|
||||
flag: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('reviewResults') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
dreUserIdName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('selectInquiry') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
approvalOpinion: [
|
||||
{
|
||||
max: 300,
|
||||
message: this.$t('feedbackMessage') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
confirmLoading: false,
|
||||
visible: false,
|
||||
selectedRowKeys: [],
|
||||
issue: false,
|
||||
isTrue: false,
|
||||
taskDefinitionKey: '',
|
||||
taskIds:[],
|
||||
projectLawsInventoryIds:[],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
getData(data) {
|
||||
this.selectedRowKeys = data
|
||||
this.taskDefinitionKey = this.selectedRowKeys[0].taskDefinitionKey
|
||||
this.taskIds = []
|
||||
this.projectLawsInventoryIds = []
|
||||
this.selectedRowKeys.forEach(res=>{
|
||||
if (res.taskIds.indexOf(',') != '-1'){
|
||||
res.taskIds = res.taskIds.slice(0,res.taskIds.indexOf(','))
|
||||
}
|
||||
this.taskIds.push(res.taskIds)
|
||||
this.projectLawsInventoryIds.push(res.projectLawsInventoryId)
|
||||
})
|
||||
this.confirmLoading = false
|
||||
this.visible = true
|
||||
this.isTrue = false
|
||||
this.$nextTick(() => {
|
||||
this.formInline = {}
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
flagChange(event) {
|
||||
if (event.target.value == 3) {
|
||||
this.isTrue = true
|
||||
} else {
|
||||
this.isTrue = false
|
||||
}
|
||||
},
|
||||
PersonnelSelectionChange(value, id) {
|
||||
this.formInline[value] = id
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
addBatch(){
|
||||
let rejectTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
let query = {
|
||||
rejectUserId:this.userInfo().id,
|
||||
rejectTime:rejectTime,
|
||||
rejectCause:this.formInline.approvalOpinion,
|
||||
taskIds:this.taskIds.join(','),
|
||||
rejectType:'1',
|
||||
}
|
||||
postAction('/project/projectLawsInventoryRejectCauseEO/addBatch', query).then((res) => {
|
||||
|
||||
})
|
||||
},
|
||||
handleOk() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
let query = {
|
||||
...this.formInline,
|
||||
taskIds:this.taskIds.join(','),
|
||||
userId:this.userInfo().id,
|
||||
taskDefinitionKey:this.taskDefinitionKey,
|
||||
handlingTime:handlingTime,
|
||||
projectLawsInventoryIds:this.projectLawsInventoryIds.join(',')
|
||||
}
|
||||
if (this.formInline.flag == '1'){
|
||||
this.addBatch()
|
||||
}
|
||||
if (!this.formInline.flag){
|
||||
query.flag = '0'
|
||||
}
|
||||
this.confirmLoading = true
|
||||
postAction('/workFlow/completeTaskBatch', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('batchProcessingForm')
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 84px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
</style>
|
||||
+190
-5
@@ -1,9 +1,65 @@
|
||||
<!--待办流程-->
|
||||
<template>
|
||||
<div class="box">
|
||||
<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 tree-select">
|
||||
<div class="title-text" :title="$t('ProcessType')">
|
||||
<span>{{$t('ProcessType')}}</span>
|
||||
</div>
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('ProcessType')"
|
||||
class="box-input"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
v-model="queryParam.prcType">
|
||||
<a-select-option v-for="(item, key) in Object.keys(prcTypeName)"
|
||||
:key="key"
|
||||
:value="item">
|
||||
<span class="itemOption" :title=" prcTypeName[item] ">
|
||||
{{ prcTypeName[item]}}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <div class="box-title-text tree-select">-->
|
||||
<!-- <div class="title-text" :title="$t('processNode')">-->
|
||||
<!-- <span>{{$t('processNode')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('processNode')"-->
|
||||
<!-- class="box-input"-->
|
||||
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
|
||||
<!-- v-model="queryParam.prcType">-->
|
||||
<!-- <a-select-option v-for="(item, key) in processNodeList"-->
|
||||
<!-- :key="key"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- <span class="itemOption" :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-index">
|
||||
<div @click="batchProcessingClick" class="operator-text-index">
|
||||
<a-icon type="apartment"/>
|
||||
{{$t('batchProcessing')}}
|
||||
</div>
|
||||
</div>
|
||||
<a-table
|
||||
class="table"
|
||||
rowKey="id"
|
||||
:rowKey="(record)=>JSON.stringify(record)"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%'}"
|
||||
@@ -11,7 +67,7 @@
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
>
|
||||
<span slot="prcType" slot-scope="text,record">
|
||||
<span slot="prcType" slot-scope="text,record" :title="prcTypeName[text]">
|
||||
{{prcTypeName[text]}}
|
||||
</span>
|
||||
<span slot="operation" slot-scope="record">
|
||||
@@ -30,6 +86,7 @@
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<batchProcessing ref="batchProcessingRef" @batchProcessingForm="batchProcessingForm"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -37,13 +94,18 @@
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
import { mapGetters } from 'vuex'
|
||||
import store from '@/store/'
|
||||
import batchProcessing from './components/batchProcessing'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'ProcessCenter',
|
||||
components: {
|
||||
batchProcessing
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {},
|
||||
queryParam: {},
|
||||
total: 0,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
@@ -53,6 +115,20 @@
|
||||
5: this.$t('collectionOfRegulatoryOpinionsProcess'),
|
||||
6: this.$t('regulatoryTechnologyAssessmentProcess')
|
||||
},
|
||||
processNodeList: [
|
||||
{
|
||||
name: this.$t('personChargeReceivesTheTask'),
|
||||
value: 'zrrjsrw'
|
||||
},
|
||||
{
|
||||
name: this.$t('engineerReply'),
|
||||
value: 'dreqr'
|
||||
},
|
||||
{
|
||||
name: this.$t('theResponsiblePersonTaskForTheSecondTime'),
|
||||
value: 'zrrqr'
|
||||
}
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('RelatedItems'),
|
||||
@@ -83,6 +159,13 @@
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'prcType' }
|
||||
},
|
||||
{
|
||||
title: this.$t('processNode'),
|
||||
dataIndex: 'taskInfo',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: this.$t('Sponsor'),
|
||||
dataIndex: 'creatUserName',
|
||||
@@ -136,18 +219,60 @@
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
onSelectChange() {
|
||||
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = []
|
||||
if (value && value.length > 0) {
|
||||
value.forEach(res => {
|
||||
res = JSON.parse(res)
|
||||
if (res.prcType == '1') {
|
||||
this.selectedRowKeys.push(JSON.stringify(res))
|
||||
} else {
|
||||
this.$message.warning(this.$t('onlyDataTaskConfirmationProcessSelected'))
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
batchProcessingClick() {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
let content = []
|
||||
selectedRowKeys.forEach(res => {
|
||||
content.push(JSON.parse(res))
|
||||
})
|
||||
for (let i = 0; i < content.length; i++) {
|
||||
if (content[i].taskDefinitionKey != content[0].taskDefinitionKey) {
|
||||
this.$message.warning(this.$t('processNodesAreInconsistentPleaseSelectConsistentData'))
|
||||
return
|
||||
}
|
||||
}
|
||||
this.$refs.batchProcessingRef.getData(JSON.parse(JSON.stringify(content)))
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
batchProcessingForm() {
|
||||
this.pageNo = 1
|
||||
this.queryProcess()
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.queryProcess()
|
||||
},
|
||||
searchReset() {
|
||||
this.queryParam = {}
|
||||
this.pageNo = 1
|
||||
this.queryProcess()
|
||||
},
|
||||
queryProcess() {
|
||||
this.loading = true
|
||||
let parmes = JSON.parse(JSON.stringify(this.searchForm))
|
||||
let parmes = JSON.parse(JSON.stringify(this.queryParam))
|
||||
parmes.current = this.pageNo
|
||||
parmes.size = this.pageSize
|
||||
parmes.userId = this.userInfo().userId
|
||||
postAction('task/todoTaskList', parmes).then((res) => {
|
||||
this.dataSource = res.list || []
|
||||
this.total = res.count
|
||||
this.selectedRowKeys = []
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
@@ -192,8 +317,68 @@
|
||||
</script>
|
||||
|
||||
<style lang="less" 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;*/
|
||||
}
|
||||
|
||||
.table-operator-index {
|
||||
/*width: 100%;*/
|
||||
text-align: right;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.operator-text-index {
|
||||
cursor: pointer;
|
||||
margin-right: 13px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.itemOption {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user