合并分支 'dev_third_stage' 到 'master'
Dev third stage 查看合并请求 laws-nio/laws-weilai!190
This commit is contained in:
@@ -1179,4 +1179,10 @@ update onl_cgform_field set is_query = '1', is_read_only = '1' where id = '09fa6
|
||||
-- 配置表,增加问题知识库预览图片配置 2022-09-27 已同步生产环境
|
||||
INSERT INTO `laws_weilai`.`sys_config` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `config`, `config_name`) VALUES ('4', 'admin', '2022-09-28 14:35:30', NULL, NULL, 'A01', 'http://grp.nioint.com/', 'domianWebImgURL');
|
||||
|
||||
--问题知识库,增加字段 发布状态 2022-10-13 未同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`problem_knowledge_base`
|
||||
ADD COLUMN `release_status` varchar(50) NULL COMMENT '发布状态' AFTER `release_time`;
|
||||
|
||||
--处理问题知识库数据,发布人,发布时间,发布状态数据sql 2022-10-13 未同步生产环境
|
||||
update problem_knowledge_base pkd set pkd.release_status = 'Have released',pkd.release_time = pkd.create_time,pkd.release_user_id = (select su.id from sys_user su where su.username = pkd.create_by)
|
||||
|
||||
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package com.jero.modules.system.enums;
|
||||
|
||||
public enum RoleEnum {
|
||||
ADMIN_ID("R&H Manager","R&H Manager","manager","1534020391015444481",2),
|
||||
MANAGER_ID("系统管理员","Administrator","admin","f6817f48af4fb3af11b9e8bf182f618b",3),
|
||||
COUNTRU_CARD_MANAGE("countryCard管理员","countryCardManage","countryCardManage","1564916346120916993",4),
|
||||
;
|
||||
|
||||
String name;
|
||||
String enName;
|
||||
String value;
|
||||
String id;
|
||||
Integer order;
|
||||
|
||||
RoleEnum(String name, String enName, String value, String id, Integer order) {
|
||||
this.name = name;
|
||||
this.enName = enName;
|
||||
this.value = value;
|
||||
this.id = id;
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public void setOrder(Integer order) {
|
||||
this.order = order;
|
||||
}
|
||||
}
|
||||
+6
@@ -270,4 +270,10 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @return
|
||||
*/
|
||||
List<SysRole> queryUserRoleListInfoByUserId(String userId);
|
||||
|
||||
/**
|
||||
* 验证当前登录用户是否是超级管理员。
|
||||
* @return
|
||||
*/
|
||||
boolean isAdministrator();
|
||||
}
|
||||
|
||||
+33
-1
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.system.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -24,6 +25,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.jero.modules.system.util.FindsDepartsChildrenUtil.convertSysDepartToSysDepartTreeModel;
|
||||
|
||||
@@ -286,7 +288,37 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
|
||||
|
||||
@Override
|
||||
public List<String> getSubDepIdsByDepId(String departId) {
|
||||
return this.baseMapper.getSubDepIdsByDepId(departId);
|
||||
List<String> idList = new ArrayList<>();
|
||||
if(StringUtils.isNotEmpty(departId)) {
|
||||
// 查询所有部门
|
||||
LambdaQueryWrapper<SysDepart> query = new LambdaQueryWrapper<SysDepart>();
|
||||
query.eq(SysDepart::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
|
||||
List<SysDepart> listAll = this.list(query);
|
||||
|
||||
List<SysDepart> result = new ArrayList<>();
|
||||
// 递归查询 指定父节点下的所有子节点,包括父节点
|
||||
if (CollectionUtil.isNotEmpty(listAll)) {
|
||||
recursion(listAll, result, departId);
|
||||
}
|
||||
|
||||
|
||||
idList.add(departId); // 加上父节点
|
||||
idList = result.stream().map(SysDepart::getId).collect(Collectors.toList());
|
||||
|
||||
}
|
||||
return idList;
|
||||
}
|
||||
|
||||
// 递归查询子节点
|
||||
private void recursion(List<SysDepart> listAll, List<SysDepart> result, String fatherId) {
|
||||
List<SysDepart> childern = listAll.stream().filter(e-> fatherId.equals(e.getParentId())).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(childern)) {
|
||||
result.addAll(childern);
|
||||
for(SysDepart depart : childern) {
|
||||
recursion(listAll, result, depart.getId());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+28
@@ -17,6 +17,7 @@ import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.modules.base.service.BaseCommonService;
|
||||
import com.jero.modules.system.entity.*;
|
||||
import com.jero.modules.system.enums.PPSyncEnum;
|
||||
import com.jero.modules.system.enums.RoleEnum;
|
||||
import com.jero.modules.system.mapper.*;
|
||||
import com.jero.modules.system.model.SysUserSysDepartModel;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
@@ -24,6 +25,7 @@ import com.jero.modules.system.vo.SysUserDepVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -586,4 +588,30 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证当前登录用户是否是超级管理员
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean isAdministrator() {
|
||||
boolean result = false;
|
||||
RoleEnum administrator = RoleEnum.MANAGER_ID;
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<SysUserRole> userRoleList = this.sysUserRoleMapper.selectList(new QueryWrapper<SysUserRole>().lambda().eq(SysUserRole::getUserId, currentUser.getId())); // 查询用户所有角色
|
||||
if(CollectionUtils.isNotEmpty(userRoleList)){
|
||||
List<SysUserRole> userRoles = userRoleList.stream().filter(userRole -> {
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(userRole.getRoleId(),administrator.getId())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userRoles)){
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
*/
|
||||
public enum ReleaseConditionEnum {
|
||||
|
||||
PUBLISHED("已发布","published","Have published"),
|
||||
PUBLISHED("已发布","published","Published"),
|
||||
DRAFT("草稿","draft","Draft"),
|
||||
;
|
||||
|
||||
|
||||
+18
@@ -8,13 +8,16 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
|
||||
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -37,6 +40,8 @@ import com.jero.common.aspect.annotation.AutoLog;
|
||||
public class LawsOpinionGatherEOController extends JeroController<LawsOpinionGatherEO, ILawsOpinionGatherEOService> {
|
||||
@Autowired
|
||||
private ILawsOpinionGatherEOService lawsOpinionGatherEOService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@@ -57,6 +62,19 @@ public class LawsOpinionGatherEOController extends JeroController<LawsOpinionGat
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsOpinionGatherEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsOpinionGatherEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("start_time");
|
||||
/**
|
||||
* 创建查询数据权限,超级管理员可以看到所有的数据,并且能删除,其它用户只能看到自己创建、或自己为评估人的数据。
|
||||
*/
|
||||
boolean administrator = this.sysUserService.isAdministrator();
|
||||
if(!administrator){
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
//如果不是超级管理员,获取自己所有参与过的法规意见收集
|
||||
queryWrapper.and(query -> {
|
||||
query.eq("create_by",currentUser.getUsername());
|
||||
query.or().like("evaluator_ids",currentUser.getId());
|
||||
});
|
||||
}
|
||||
|
||||
Page<LawsOpinionGatherEO> page = new Page<LawsOpinionGatherEO>(pageNo, pageSize);
|
||||
IPage<LawsOpinionGatherEO> pageList = lawsOpinionGatherEOService.page(page, queryWrapper);
|
||||
this.lawsOpinionGatherEOService.disposeData(pageList.getRecords(),cut);
|
||||
|
||||
+4
@@ -122,4 +122,8 @@ public class LawsOpinionGatherEO implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "评估人ids,多个之间使用英文逗号分隔")
|
||||
private String evaluatorIds;
|
||||
|
||||
/**删除标识 true 可以删除,false,没有权限删除**/
|
||||
@TableField(exist = false)
|
||||
private boolean deleteFlag = false;
|
||||
}
|
||||
|
||||
+8
@@ -6,6 +6,7 @@ import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
|
||||
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
|
||||
@@ -31,6 +32,7 @@ import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.modules.jmreport.common.constant.CommonConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@@ -197,6 +199,8 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
@Override
|
||||
public void disposeData(List<LawsOpinionGatherEO> lawsOpinionGatherEOList,String cut) {
|
||||
if(CollectionUtils.isNotEmpty(lawsOpinionGatherEOList)){
|
||||
boolean administrator = this.sysUserService.isAdministrator();
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
//树形数据字典
|
||||
List<SysCategory> technologyTerritoryList = sysCategoryService.list();
|
||||
lawsOpinionGatherEOList.forEach(lawsOpinionGather -> {
|
||||
@@ -211,6 +215,10 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
List<OSSFile> opinionArchiveFileList = iOSSFileService.getFileInfosByConnectId(StringUtils.join(lawsOpinionGather.getOpinionArchiveId(), ","));
|
||||
lawsOpinionGather.setOpinionArchiveFileList(opinionArchiveFileList);
|
||||
}
|
||||
//如果当前用户是超级管理员,或是这条数据的创建人,给删除权限。
|
||||
if(StringUtils.equals(lawsOpinionGather.getCreateBy(),currentUser.getUsername()) || administrator){
|
||||
lawsOpinionGather.setDeleteFlag(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+15
@@ -3,19 +3,26 @@ package com.jero.modules.lawsTechnologyEvaluation.controller;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationFlowDetailEOService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -40,6 +47,10 @@ import com.jero.common.aspect.annotation.AutoLog;
|
||||
public class LawsTechnologyEvaluationEOController extends JeroController<LawsTechnologyEvaluationEO, ILawsTechnologyEvaluationEOService> {
|
||||
@Autowired
|
||||
private ILawsTechnologyEvaluationEOService lawsTechnologyEvaluationEOService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private ILawsTechnologyEvaluationFlowDetailEOService lawsTechnologyEvaluationFlowDetailEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@@ -60,6 +71,10 @@ public class LawsTechnologyEvaluationEOController extends JeroController<LawsTec
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsTechnologyEvaluationEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("start_time");
|
||||
boolean administrator = this.sysUserService.isAdministrator();
|
||||
if(!administrator){
|
||||
this.lawsTechnologyEvaluationEOService.createQueryPermission(queryWrapper,lawsTechnologyEvaluationEO,administrator);
|
||||
}
|
||||
Page<LawsTechnologyEvaluationEO> page = new Page<LawsTechnologyEvaluationEO>(pageNo, pageSize);
|
||||
IPage<LawsTechnologyEvaluationEO> pageList = lawsTechnologyEvaluationEOService.page(page, queryWrapper);
|
||||
this.lawsTechnologyEvaluationEOService.disposeData(pageList.getRecords(),cut);
|
||||
|
||||
+3
@@ -149,4 +149,7 @@ public class LawsTechnologyEvaluationEO implements Serializable {
|
||||
@ApiModelProperty(value = "流程编号")
|
||||
private String prcNum;
|
||||
|
||||
/**删除标识 true 可以删除,false,没有权限删除**/
|
||||
@TableField(exist = false)
|
||||
private boolean deleteFlag = false;
|
||||
}
|
||||
|
||||
+3
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.lawsTechnologyEvaluation.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
|
||||
@@ -92,4 +93,6 @@ public interface ILawsTechnologyEvaluationEOService extends IService<LawsTechnol
|
||||
void workFlowSendMsg(JSONObject jsonObject);
|
||||
|
||||
Result<?> batchCompleteTask(JSONObject jsonObject);
|
||||
|
||||
void createQueryPermission(QueryWrapper<LawsTechnologyEvaluationEO> queryWrapper, LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO,boolean administrator);
|
||||
}
|
||||
|
||||
+30
@@ -9,6 +9,7 @@ import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.constant.enums.ModuleEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
@@ -39,6 +40,7 @@ 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.jeecg.modules.jmreport.common.constant.CommonConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@@ -229,6 +231,8 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
@Override
|
||||
public void disposeData(List<LawsTechnologyEvaluationEO> datas, String cut) {
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
boolean administrator = this.sysUserService.isAdministrator();
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
for (LawsTechnologyEvaluationEO data : datas) {
|
||||
if(StringUtils.isNotEmpty(data.getEvaluationMethods())){
|
||||
@@ -244,6 +248,9 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
String name = getTreeName(cut, categoryList, technologyTerritory);
|
||||
data.setTechnologyTerritoryName(name);
|
||||
}
|
||||
if(administrator || StringUtils.equals(data.getCreateBy(),currentUser.getUsername())){
|
||||
data.setDeleteFlag(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -696,6 +703,29 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
return new Result<>().success("手动结束成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createQueryPermission(QueryWrapper<LawsTechnologyEvaluationEO> queryWrapper, LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO,boolean administrator) {
|
||||
if(!administrator){
|
||||
//如果不是超级管理员,获取自己创建的和所有参与过的法规技术评估数据。
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
QueryWrapper<LawsTechnologyEvaluationFlowDetailEO> flowDetailQueryWrap = new QueryWrapper<>();
|
||||
flowDetailQueryWrap.lambda().eq(LawsTechnologyEvaluationFlowDetailEO::getEvaluatorId,currentUser.getId());
|
||||
List<LawsTechnologyEvaluationFlowDetailEO> flowDetailEOList = this.lawsTechnologyEvaluationFlowDetailEOService.list(flowDetailQueryWrap);
|
||||
if(CollectionUtils.isNotEmpty(flowDetailEOList)){
|
||||
List<String> lawsTechnologyEvaluationIdList = flowDetailEOList.stream().map(LawsTechnologyEvaluationFlowDetailEO::getLawsTechnologyEvaluationId).distinct().collect(Collectors.toList());
|
||||
queryWrapper.and(query -> {
|
||||
query.eq("create_by",currentUser.getUsername());
|
||||
query.or(q -> {
|
||||
for (String lawsTechnologyEvaluationId : lawsTechnologyEvaluationIdList) {
|
||||
q.or().like("id",lawsTechnologyEvaluationId);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String technologyTerritory : technologyTerritoryList) {
|
||||
|
||||
+8
@@ -13,6 +13,7 @@ import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseEOServ
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -37,6 +38,8 @@ import com.jero.common.aspect.annotation.AutoLog;
|
||||
public class ProblemKnowledgeBaseEOController extends JeroController<ProblemKnowledgeBaseEO, IProblemKnowledgeBaseEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseEOService problemKnowledgeBaseEOService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@@ -54,6 +57,11 @@ public class ProblemKnowledgeBaseEOController extends JeroController<ProblemKnow
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
boolean administrator = this.sysUserService.isAdministrator();
|
||||
//如果当前登录人是超级管理员角色,进入到管理发布页面时,查询所有的数据,其它用户只能查询自己创建的数据。
|
||||
if(administrator){
|
||||
problemKnowledgeBaseEO.setCreateBy(null);
|
||||
}
|
||||
QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseEO, req.getParameterMap());
|
||||
this.problemKnowledgeBaseEOService.createQueryPermission(queryWrapper,problemKnowledgeBaseEO);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
|
||||
+7
-1
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
@@ -156,7 +157,7 @@ public class ProblemKnowledgeBaseEO implements Serializable {
|
||||
/**发布日期*/
|
||||
@Excel(name = "发布日期", width = 15)
|
||||
@ApiModelProperty(value = "发布日期")
|
||||
private java.lang.String releaseTime;
|
||||
private Date releaseTime;
|
||||
|
||||
/**点赞总数量*/
|
||||
@TableField(exist = false)
|
||||
@@ -195,4 +196,9 @@ public class ProblemKnowledgeBaseEO implements Serializable {
|
||||
/**附件展示数组*/
|
||||
@TableField(exist = false)
|
||||
private List<OSSFile> accessoryFileNameList;
|
||||
|
||||
/**发布状态*/
|
||||
@Excel(name = "发布状态", width = 15)
|
||||
@ApiModelProperty(value = "发布状态")
|
||||
private String releaseStatus;
|
||||
}
|
||||
|
||||
+38
-21
@@ -24,6 +24,7 @@ import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.*;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.CollectStatusEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.PraiseStatusEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.ReleaseStatusEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.ShowPermissionsEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.*;
|
||||
@@ -114,17 +115,19 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
Date now = new Date();
|
||||
problemKnowledgeBaseEO.setCreateTime(now);
|
||||
problemKnowledgeBaseEO.setUpdateTime(now);
|
||||
save(problemKnowledgeBaseEO);
|
||||
|
||||
//如果该条问题知识库的展示权限为私密,则创建权限表数据
|
||||
if(StringUtils.equals(problemKnowledgeBaseEO.getShowPermissions(), ShowPermissionsEnum.PRIVACY.getValue())){
|
||||
this.batchInsertProblemKnowledgeBaseUserEO(problemKnowledgeBaseEO);
|
||||
}
|
||||
/*else {
|
||||
//如果展示权限是公开,则把该数据插入到搜索中心中。
|
||||
//如果是已发布,将数据更新到es中。
|
||||
if(StringUtils.equals(problemKnowledgeBaseEO.getReleaseStatus(), ReleaseStatusEnum.HAVE_RELEASED.getValue())){
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
problemKnowledgeBaseEO.setReleaseUserId(currentUser.getId());
|
||||
problemKnowledgeBaseEO.setReleaseTime(now);
|
||||
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||
}*/
|
||||
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||
}
|
||||
save(problemKnowledgeBaseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -382,9 +385,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(fileText)){
|
||||
sbEn.append("Accessory File content" + ":" + fileText + " ");
|
||||
sbEn.append("Attachment" + ":" + fileText + " ");
|
||||
}else {
|
||||
sbEn.append("Accessory File content" + ":" + "-- ");
|
||||
sbEn.append("Attachment" + ":" + "-- ");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -435,15 +438,23 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
public void editById(ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
Date now = new Date();
|
||||
problemKnowledgeBaseEO.setUpdateTime(now);
|
||||
saveOrUpdate(problemKnowledgeBaseEO);
|
||||
|
||||
//如果该条问题知识库的展示权限为私密,则创建权限表数据
|
||||
if(StringUtils.equals(problemKnowledgeBaseEO.getShowPermissions(), ShowPermissionsEnum.PRIVACY.getValue())){
|
||||
this.batchInsertProblemKnowledgeBaseUserEO(problemKnowledgeBaseEO);
|
||||
//this.deleteElasticsearchData(problemKnowledgeBaseEO.getId());
|
||||
}
|
||||
|
||||
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||
//如果是已发布,将数据更新到es中。
|
||||
if(StringUtils.equals(problemKnowledgeBaseEO.getReleaseStatus(), ReleaseStatusEnum.HAVE_RELEASED.getValue())){
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
problemKnowledgeBaseEO.setReleaseUserId(currentUser.getId());
|
||||
problemKnowledgeBaseEO.setReleaseTime(now);
|
||||
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||
}else if(StringUtils.equals(problemKnowledgeBaseEO.getReleaseStatus(), ReleaseStatusEnum.DRAFT.getValue())){
|
||||
//如果是草稿,将es中的数据删掉。
|
||||
this.deleteElasticsearchData(problemKnowledgeBaseEO.getId());
|
||||
}
|
||||
saveOrUpdate(problemKnowledgeBaseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -750,26 +761,32 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
@Override
|
||||
public void createQueryPermission(QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper,ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
/**
|
||||
* 查询权限
|
||||
* 公开:所有人都可以看到。
|
||||
* 私密:只有配置了的权限用户可以看到。
|
||||
* 2022-10-13增加权限,超级管理员可以看到所有的问题知识库数据。
|
||||
*/
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<ProblemKnowledgeBaseUserEO> userPermissionQueryWrapper = new QueryWrapper<>();
|
||||
userPermissionQueryWrapper.lambda().eq(ProblemKnowledgeBaseUserEO::getUserId,currentUser.getId());
|
||||
List<ProblemKnowledgeBaseUserEO> problemKnowledgeBaseUserEOList = problemKnowledgeBaseUserEOService.list(userPermissionQueryWrapper);
|
||||
boolean administrator = this.sysUserService.isAdministrator();
|
||||
if(!administrator){
|
||||
/**
|
||||
* 查询权限
|
||||
* 公开:所有人都可以看到。
|
||||
* 私密:只有配置了的权限用户可以看到。
|
||||
*/
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<ProblemKnowledgeBaseUserEO> userPermissionQueryWrapper = new QueryWrapper<>();
|
||||
userPermissionQueryWrapper.lambda().eq(ProblemKnowledgeBaseUserEO::getUserId,currentUser.getId());
|
||||
List<ProblemKnowledgeBaseUserEO> problemKnowledgeBaseUserEOList = problemKnowledgeBaseUserEOService.list(userPermissionQueryWrapper);
|
||||
|
||||
List<String> problemKnowledgeBaseIdList = problemKnowledgeBaseUserEOList.stream().map(ProblemKnowledgeBaseUserEO::getProblemKnowledgeBaseId).distinct().collect(Collectors.toList());
|
||||
List<String> problemKnowledgeBaseIdList = problemKnowledgeBaseUserEOList.stream().map(ProblemKnowledgeBaseUserEO::getProblemKnowledgeBaseId).distinct().collect(Collectors.toList());
|
||||
|
||||
queryWrapper.lambda().and(query -> {
|
||||
query.eq(ProblemKnowledgeBaseEO::getShowPermissions,ShowPermissionsEnum.OPEN.getValue());
|
||||
queryWrapper.lambda().and(query -> {
|
||||
query.eq(ProblemKnowledgeBaseEO::getShowPermissions,ShowPermissionsEnum.OPEN.getValue());
|
||||
if(CollectionUtils.isNotEmpty(problemKnowledgeBaseIdList)){
|
||||
query.or(o -> {
|
||||
o.eq(ProblemKnowledgeBaseEO::getShowPermissions,ShowPermissionsEnum.PRIVACY.getValue());
|
||||
o.in(ProblemKnowledgeBaseEO::getId,problemKnowledgeBaseIdList);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
String searchStr = problemKnowledgeBaseEO.getSearchStr();
|
||||
if(StringUtils.isNotEmpty(searchStr)){
|
||||
|
||||
+120
-28
@@ -14,9 +14,11 @@ import com.jero.common.util.RedisUtil;
|
||||
import com.jero.common.util.TokenUtils;
|
||||
import com.jero.modules.dummy.service.impl.DummyInventoryInfoEOServiceImpl;
|
||||
import com.jero.modules.enums.DictCodeEnum;
|
||||
import com.jero.modules.ocr.entity.User;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
||||
import com.jero.modules.project.enums.ProjectInventoryFieldEnum;
|
||||
import com.jero.modules.project.enums.ProjectRoleEnum;
|
||||
import com.jero.modules.project.mapper.ProjectRelatedPersonnelMapper;
|
||||
import com.jero.modules.project.service.IProjectRelatedPersonnelService;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
@@ -967,6 +969,11 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
*/
|
||||
@Override
|
||||
public Result<?> oppositeDisposeData(List<ProjectRelatedPersonnel> records, String projectId, String cut) {
|
||||
//查询所有的用户
|
||||
LambdaQueryWrapper<SysUser> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.select(SysUser::getUsername,SysUser::getId);
|
||||
List<SysUser> userList = sysUserService.list(wrapper);
|
||||
|
||||
Result<?> result = new Result<>();
|
||||
int row=3;
|
||||
StringBuilder message = new StringBuilder();
|
||||
@@ -1021,15 +1028,18 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
List<String> lawEngineerNameList = Arrays.asList(projectRelatedPersonnel.getLawEngineerName().split(","));
|
||||
if (CollectionUtils.isNotEmpty(lawEngineerNameList) && StringUtils.isNotBlank(lawEngineerNameList.get(0))) {
|
||||
lawEngineerNameList = lawEngineerNameList.stream().distinct().collect(Collectors.toList());
|
||||
lawEngineerUsers=sysUserService.queryUserIdListByNameList(lawEngineerNameList);
|
||||
if(lawEngineerUsers.size()!=lawEngineerNameList.size()){
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
message.append("导入的法规工程师姓名有误,请检查第" + row + "行");
|
||||
}else{
|
||||
message.append("The imported law engineer is wrong.Please check line " + row );
|
||||
}
|
||||
}
|
||||
//验证导入的相关人员
|
||||
lawEngineerUsers = personnelMatch(userList, lawEngineerNameList, message, ProjectRoleEnum.REGULATI_ENGINEER.getValue(), cut, row);
|
||||
|
||||
// lawEngineerUsers=sysUserService.queryUserIdListByNameList(lawEngineerNameList);
|
||||
// if(lawEngineerUsers.size()!=lawEngineerNameList.size()){
|
||||
// //中英切换提示语
|
||||
// if(CutEnum.CN.getValue().equals(cut)) {
|
||||
// message.append("导入的法规工程师姓名有误,请检查第" + row + "行");
|
||||
// }else{
|
||||
// message.append("The imported law engineer is wrong.Please check line " + row );
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(lawEngineerUsers)) {
|
||||
@@ -1055,15 +1065,18 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
List<String> engineeringInterfacePersonNameList = Arrays.asList(projectRelatedPersonnel.getEngineeringInterfacePersonName().split(","));
|
||||
if (CollectionUtils.isNotEmpty(engineeringInterfacePersonNameList) && StringUtils.isNotBlank(engineeringInterfacePersonNameList.get(0))) {
|
||||
engineeringInterfacePersonNameList = engineeringInterfacePersonNameList.stream().distinct().collect(Collectors.toList());
|
||||
engineeringInterfacePersonUsers=sysUserService.queryUserIdListByNameList(engineeringInterfacePersonNameList);
|
||||
if(engineeringInterfacePersonUsers.size()!=engineeringInterfacePersonNameList.size()){
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
message.append("导入的工程接口人姓名有误,请检查第" + row + "行");
|
||||
}else{
|
||||
message.append("The imported engineering interface person is wrong.Please check line " + row );
|
||||
}
|
||||
}
|
||||
//验证导入的相关人员
|
||||
engineeringInterfacePersonUsers = personnelMatch(userList, engineeringInterfacePersonNameList, message, ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), cut, row);
|
||||
|
||||
// engineeringInterfacePersonUsers=sysUserService.queryUserIdListByNameList(engineeringInterfacePersonNameList);
|
||||
// if(engineeringInterfacePersonUsers.size()!=engineeringInterfacePersonNameList.size()){
|
||||
// //中英切换提示语
|
||||
// if(CutEnum.CN.getValue().equals(cut)) {
|
||||
// message.append("导入的工程接口人姓名有误,请检查第" + row + "行");
|
||||
// }else{
|
||||
// message.append("The imported engineering interface person is wrong.Please check line " + row );
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(engineeringInterfacePersonUsers)) {
|
||||
@@ -1090,8 +1103,13 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
//校验是否为项目基础表设定的认证工程师
|
||||
List<ProjectRelatedPersonnel> baseCertificationEngineerList = queryCertificationEngineer(projectId);
|
||||
List<String> baseCertificationEngineerNameList = baseCertificationEngineerList.stream().map(e -> e.getCertificationEngineerName()).collect(Collectors.toList());
|
||||
//转为小写后在判断
|
||||
List<String> baseCertificationEngineerNameListTemp = new ArrayList<>();
|
||||
for (String s : baseCertificationEngineerNameList) {
|
||||
baseCertificationEngineerNameListTemp.add(s.toLowerCase());
|
||||
}
|
||||
for(String certificationEngineerName : certificationEngineerNameList){
|
||||
if(!baseCertificationEngineerNameList.contains(certificationEngineerName)){
|
||||
if(!baseCertificationEngineerNameListTemp.contains(certificationEngineerName.toLowerCase())){
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
message.append("导入的认证工程师姓名不属于该项目,请检查第" + row + "行");
|
||||
@@ -1101,18 +1119,32 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
break;
|
||||
}
|
||||
}
|
||||
// for(String certificationEngineerName : certificationEngineerNameList){
|
||||
// if(!baseCertificationEngineerNameList.contains(certificationEngineerName.toLowerCase())){
|
||||
// //中英切换提示语
|
||||
// if(CutEnum.CN.getValue().equals(cut)) {
|
||||
// message.append("导入的认证工程师姓名不属于该项目,请检查第" + row + "行");
|
||||
// }else {
|
||||
// message.append("The imported certified engineer name does not belong to this project..Please check line " + row );
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
if (CollectionUtils.isNotEmpty(certificationEngineerNameList) && StringUtils.isNotBlank(certificationEngineerNameList.get(0))) {
|
||||
certificationEngineerNameList = certificationEngineerNameList.stream().distinct().collect(Collectors.toList());
|
||||
certificationEngineerUsers=sysUserService.queryUserIdListByNameList(certificationEngineerNameList);
|
||||
if(certificationEngineerUsers.size()!=certificationEngineerNameList.size()){
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
message.append("导入的认证工程师姓名有误,请检查第" + row + "行");
|
||||
}else {
|
||||
message.append("The imported certification engineer is wrong.Please check line " + row );
|
||||
}
|
||||
}
|
||||
//验证导入的相关人员
|
||||
certificationEngineerUsers = personnelMatch(userList, certificationEngineerNameList, message, ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), cut, row);
|
||||
|
||||
// certificationEngineerUsers=sysUserService.queryUserIdListByNameList(certificationEngineerNameList);
|
||||
// if(certificationEngineerUsers.size()!=certificationEngineerNameList.size()){
|
||||
// //中英切换提示语
|
||||
// if(CutEnum.CN.getValue().equals(cut)) {
|
||||
// message.append("导入的认证工程师姓名有误,请检查第" + row + "行");
|
||||
// }else {
|
||||
// message.append("The imported certification engineer is wrong.Please check line " + row );
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(certificationEngineerUsers)) {
|
||||
@@ -1156,6 +1188,66 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证导入的相关人员
|
||||
* @param userList 所有的用户
|
||||
* @param personnelList 相关人员(法规工程师,认证工程师,工程接口人)
|
||||
* @param message 异常信息拼接
|
||||
* @param personnelType 人员类型
|
||||
* @param cut 中英文切换
|
||||
* @param row 行数
|
||||
*/
|
||||
public List<SysUser> personnelMatch(List<SysUser> userList,
|
||||
List<String> personnelList,
|
||||
StringBuilder message,
|
||||
String personnelType,
|
||||
String cut,
|
||||
int row){
|
||||
int count = 0;
|
||||
//全部转为小写来匹配
|
||||
List<SysUser> sysUserList = new ArrayList<>();
|
||||
for (String personnel : personnelList) {
|
||||
String personnelLower = personnel.toLowerCase();
|
||||
for (SysUser sysUser : userList) {
|
||||
String username = sysUser.getUsername();
|
||||
String usernameLower = username.toLowerCase();
|
||||
if(personnelLower.equals(usernameLower)){
|
||||
sysUserList.add(sysUser);
|
||||
count ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(personnelList.size() != count){
|
||||
//法规工程师异常提示语
|
||||
if(ProjectRoleEnum.REGULATI_ENGINEER.getValue().equals(personnelType)){
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
message.append("导入的工程接口人姓名有误,请检查第" + row + "行");
|
||||
}else{
|
||||
message.append("The imported engineering interface person is wrong.Please check line " + row );
|
||||
}
|
||||
}
|
||||
//认证工程师异常提示语
|
||||
if(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue().equals(personnelType)){
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
message.append("导入的认证工程师姓名有误,请检查第" + row + "行");
|
||||
}else {
|
||||
message.append("The imported certification engineer is wrong.Please check line " + row );
|
||||
}
|
||||
}
|
||||
//工程接口人异常提示语
|
||||
if(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue().equals(personnelType)){
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
message.append("导入的工程接口人姓名有误,请检查第" + row + "行");
|
||||
}else{
|
||||
message.append("The imported engineering interface person is wrong.Please check line " + row );
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return sysUserList;
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectRelatedPersonnel queryByProjectIdAndDutyTerritory(String projectId, String dutyTerritory) {
|
||||
LambdaQueryWrapper<ProjectRelatedPersonnel> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
+23
-2
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.report.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
@@ -62,9 +63,29 @@ public class LawsMonthlyReportWriteEOController extends JeroController<LawsMonth
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
IPage<LawsMonthlyReportWriteEO> pageList = lawsMonthlyReportWriteEOService.getPageInfo(lawsMonthlyReportWriteEO, pageNo,pageSize,req);
|
||||
return Result.OK(pageList);
|
||||
List<LawsMonthlyReportWriteEO> listInfo = lawsMonthlyReportWriteEOService.getListInfo(lawsMonthlyReportWriteEO, pageNo, pageSize, req);
|
||||
Page pages = lawsMonthlyReportWriteEOService.getPages(pageNo, pageSize, listInfo);
|
||||
return Result.OK(pages);
|
||||
}
|
||||
// /**
|
||||
// * 分页列表查询
|
||||
// *
|
||||
// * @param lawsMonthlyReportWriteEO
|
||||
// * @param pageNo
|
||||
// * @param pageSize
|
||||
// * @param req
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "月报填写-分页列表查询")
|
||||
// @ApiOperation(value="月报填写-分页列表查询", notes="月报填写-分页列表查询")
|
||||
// @GetMapping(value = "/page")
|
||||
// public Result<?> queryPageList(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO,
|
||||
// @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
// @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
// HttpServletRequest req) {
|
||||
// IPage<LawsMonthlyReportWriteEO> pageList = lawsMonthlyReportWriteEOService.getPageInfo(lawsMonthlyReportWriteEO, pageNo,pageSize,req);
|
||||
// return Result.OK(pageList);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
|
||||
+7
-2
@@ -13,7 +13,6 @@ import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -29,7 +28,7 @@ import java.util.List;
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="laws_monthly_report_title_template对象", description="月报标题模板")
|
||||
public class LawsMonthlyReportTitleTemplateEO implements Serializable {
|
||||
public class LawsMonthlyReportTitleTemplateEO implements Comparable<LawsMonthlyReportTitleTemplateEO> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@@ -84,4 +83,10 @@ public class LawsMonthlyReportTitleTemplateEO implements Serializable {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String key;
|
||||
|
||||
@Override
|
||||
public int compareTo(LawsMonthlyReportTitleTemplateEO o) {
|
||||
return this.sort-o.sort;//升序
|
||||
// return o.id-this.id;//降序
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,8 +7,8 @@ package com.jero.modules.report.enums;
|
||||
* @auth zhn
|
||||
*/
|
||||
public enum ExportStateEnum {
|
||||
NOT_EXPORT("未导出","Not export","1"),
|
||||
HAS_BEEN_EXPORT("已导出","Has been export","2");
|
||||
NOT_EXPORT("未导出","Not exported","1"),
|
||||
HAS_BEEN_EXPORT("已导出","Exported","2");
|
||||
|
||||
|
||||
String name;
|
||||
|
||||
+8
-1
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.report.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.report.entity.LawsMonthlyReportWriteEO;
|
||||
|
||||
@@ -72,7 +73,11 @@ public interface ILawsMonthlyReportWriteEOService extends IService<LawsMonthlyRe
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
IPage<LawsMonthlyReportWriteEO> getPageInfo(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO,
|
||||
// IPage<LawsMonthlyReportWriteEO> getPageInfo(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO,
|
||||
// Integer pageNo,
|
||||
// Integer pageSize,
|
||||
// HttpServletRequest req);
|
||||
List<LawsMonthlyReportWriteEO> getListInfo(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO,
|
||||
Integer pageNo,
|
||||
Integer pageSize,
|
||||
HttpServletRequest req);
|
||||
@@ -82,4 +87,6 @@ public interface ILawsMonthlyReportWriteEOService extends IService<LawsMonthlyRe
|
||||
LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO);
|
||||
|
||||
IPage queryPageDocument(Map<String, Object> parameter);
|
||||
|
||||
Page getPages(Integer currentPage, Integer pageSize, List<LawsMonthlyReportWriteEO> list);
|
||||
}
|
||||
|
||||
+375
-12
@@ -60,8 +60,10 @@ import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -288,7 +290,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<LawsMonthlyReportWriteEO> getPageInfo(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEOTemp,
|
||||
public List<LawsMonthlyReportWriteEO> getListInfo(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEOTemp,
|
||||
Integer pageNo,
|
||||
Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
@@ -300,11 +302,48 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
if(!rolesList.contains(ProjectRoleEnum.ADMIN.getCode())){
|
||||
queryWrapper.in("create_by",currentUser.getUsername());
|
||||
}
|
||||
Page<LawsMonthlyReportWriteEO> page = new Page<LawsMonthlyReportWriteEO>(pageNo, pageSize);
|
||||
Page<LawsMonthlyReportWriteEO> pageInfo = this.page(page, queryWrapper);
|
||||
// Page<LawsMonthlyReportWriteEO> page = new Page<LawsMonthlyReportWriteEO>(pageNo, pageSize);
|
||||
// Page<LawsMonthlyReportWriteEO> pageInfo = this.page(page, queryWrapper);
|
||||
|
||||
|
||||
//所有的月报
|
||||
List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOList = this.list(queryWrapper);
|
||||
//所有月报的一级目录
|
||||
List<String> oneMenuIdLIst = lawsMonthlyReportWriteEOList.stream().map(LawsMonthlyReportWriteEO::getMemoriesChapterOne).distinct().collect(Collectors.toList());
|
||||
//月报标题模板
|
||||
LambdaQueryWrapper<LawsMonthlyReportTitleTemplateEO> wrapperTemp = new LambdaQueryWrapper<>();
|
||||
wrapperTemp.orderByAsc(LawsMonthlyReportTitleTemplateEO::getSort);
|
||||
List<LawsMonthlyReportTitleTemplateEO> list = lawsMonthlyReportTitleTemplateEOService.list(wrapperTemp);
|
||||
//1. 一级目录
|
||||
List<LawsMonthlyReportTitleTemplateEO> oneList = list.stream().filter(e -> StringUtils.isBlank(e.getParentId())).collect(Collectors.toList());
|
||||
oneList = oneList.stream().filter(e -> oneMenuIdLIst.contains(e.getId())).collect(Collectors.toList());
|
||||
Collections.sort(oneList);//正序排序
|
||||
|
||||
List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS = new LinkedList<>();
|
||||
for (LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO : oneList) {
|
||||
String oneId = lawsMonthlyReportTitleTemplateEO.getId();
|
||||
//一级目录下的二级目录
|
||||
List<LawsMonthlyReportTitleTemplateEO> twoList = list.stream().filter(e -> StringUtils.isNotBlank(e.getParentId()) && oneId.equals(e.getParentId())).collect(Collectors.toList());
|
||||
Collections.sort(twoList);//正序排序
|
||||
|
||||
//一级目录下的月报
|
||||
for (LawsMonthlyReportTitleTemplateEO monthlyReportTitleTemplateEO : twoList) {
|
||||
for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : lawsMonthlyReportWriteEOList) {
|
||||
if(oneId.equals(lawsMonthlyReportWriteEO.getMemoriesChapterOne()) && monthlyReportTitleTemplateEO.getId().equals(lawsMonthlyReportWriteEO.getMemoriesChapter())){
|
||||
lawsMonthlyReportWriteEOS.add(lawsMonthlyReportWriteEO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOListOne = lawsMonthlyReportWriteEOList.stream()
|
||||
// .filter(e -> oneId.equals(e.getMemoriesChapterOne())).collect(Collectors.toList());
|
||||
// lawsMonthlyReportWriteEOS.addAll(lawsMonthlyReportWriteEOListOne);
|
||||
}
|
||||
|
||||
|
||||
//法规月报id
|
||||
List<String> lawsMonthlyReportIdList = pageInfo.getRecords().stream().map(LawsMonthlyReportWriteEO::getId).collect(Collectors.toList());
|
||||
List<String> userIdList = pageInfo.getRecords().stream().map(LawsMonthlyReportWriteEO::getLawsContact).collect(Collectors.toList());
|
||||
List<String> lawsMonthlyReportIdList = lawsMonthlyReportWriteEOS.stream().map(LawsMonthlyReportWriteEO::getId).collect(Collectors.toList());
|
||||
List<String> userIdList = lawsMonthlyReportWriteEOS.stream().map(LawsMonthlyReportWriteEO::getLawsContact).collect(Collectors.toList());
|
||||
List<String> userIds = new ArrayList<>();
|
||||
for (String s : userIdList) {
|
||||
if(StringUtils.isNotBlank(s)){
|
||||
@@ -343,7 +382,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}
|
||||
|
||||
|
||||
for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : pageInfo.getRecords()) {
|
||||
for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : lawsMonthlyReportWriteEOS) {
|
||||
//处理法规联系人
|
||||
lawsContact(userList, lawsMonthlyReportWriteEO,lawsMonthlyReportWriteEOTemp.getCut());
|
||||
//处理章节目录
|
||||
@@ -398,8 +437,121 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}
|
||||
}
|
||||
}
|
||||
return pageInfo;
|
||||
return lawsMonthlyReportWriteEOS;
|
||||
}
|
||||
// @Override
|
||||
// public IPage<LawsMonthlyReportWriteEO> getPageInfo(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEOTemp,
|
||||
// Integer pageNo,
|
||||
// Integer pageSize,
|
||||
// HttpServletRequest req) {
|
||||
// QueryWrapper<LawsMonthlyReportWriteEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsMonthlyReportWriteEOTemp, req.getParameterMap());
|
||||
// queryWrapper.orderByDesc("memories_chapter_one","memories_chapter","create_time");
|
||||
// //管理员查看全部数据,其余人只能查看自己的数据
|
||||
// LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// List<String> rolesList = sysBaseApi.getRolesByUsername(currentUser.getUsername());
|
||||
// if(!rolesList.contains(ProjectRoleEnum.ADMIN.getCode())){
|
||||
// queryWrapper.in("create_by",currentUser.getUsername());
|
||||
// }
|
||||
// Page<LawsMonthlyReportWriteEO> page = new Page<LawsMonthlyReportWriteEO>(pageNo, pageSize);
|
||||
// Page<LawsMonthlyReportWriteEO> pageInfo = this.page(page, queryWrapper);
|
||||
// //法规月报id
|
||||
// List<String> lawsMonthlyReportIdList = pageInfo.getRecords().stream().map(LawsMonthlyReportWriteEO::getId).collect(Collectors.toList());
|
||||
// List<String> userIdList = pageInfo.getRecords().stream().map(LawsMonthlyReportWriteEO::getLawsContact).collect(Collectors.toList());
|
||||
// List<String> userIds = new ArrayList<>();
|
||||
// for (String s : userIdList) {
|
||||
// if(StringUtils.isNotBlank(s)){
|
||||
// if(s.contains(",")){
|
||||
// userIds.addAll(Arrays.asList(s.split(",")));
|
||||
// }else{
|
||||
// userIds.add(s);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// List<JSONObject> jsonObjects = sysBaseApi.queryUsersByIds(StringUtils.join(userIds, ","));
|
||||
// List<LoginUser> userList = new ArrayList<>();
|
||||
// for (JSONObject jsonObject : jsonObjects) {
|
||||
// LoginUser loginUser = JSONObject.parseObject(jsonObject.toJSONString(), LoginUser.class);
|
||||
// userList.add(loginUser);
|
||||
// }
|
||||
//
|
||||
// //获取章节目录
|
||||
// List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOList = lawsMonthlyReportTitleTemplateEOService.list();
|
||||
//
|
||||
// //新征求意见清单模板
|
||||
// List<NewOpinionTemplateEO> newOpinionTemplateEOList = new ArrayList<>();
|
||||
// if(lawsMonthlyReportIdList.size() != 0){
|
||||
// LambdaQueryWrapper<NewOpinionTemplateEO> wrapper = new LambdaQueryWrapper<>();
|
||||
// wrapper.in(NewOpinionTemplateEO::getLawsMonthlyReportWriteId,lawsMonthlyReportIdList);
|
||||
// newOpinionTemplateEOList = iNewOpinionTemplateEOService.list(wrapper);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// //新发布标准清单模板
|
||||
// List<NewStandardTemplateEO> newStandardTemplateEOList = new ArrayList<>();
|
||||
// if(lawsMonthlyReportIdList.size() != 0){
|
||||
// LambdaQueryWrapper<NewStandardTemplateEO> qrapperTemp = new LambdaQueryWrapper<>();
|
||||
// qrapperTemp.in(NewStandardTemplateEO::getLawsMonthlyReportWriteId,lawsMonthlyReportIdList);
|
||||
// newStandardTemplateEOList = iNewStandardTemplateEOService.list(qrapperTemp);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : pageInfo.getRecords()) {
|
||||
// //处理法规联系人
|
||||
// lawsContact(userList, lawsMonthlyReportWriteEO,lawsMonthlyReportWriteEOTemp.getCut());
|
||||
// //处理章节目录
|
||||
// if(StringUtils.isNotBlank(lawsMonthlyReportWriteEO.getMemoriesChapter())){
|
||||
// List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS = lawsMonthlyReportTitleTemplateEOList.stream()
|
||||
// .filter(e -> lawsMonthlyReportWriteEO.getMemoriesChapter().equals(e.getId())).collect(Collectors.toList());
|
||||
// if(CutEnum.CN.getValue().equals(lawsMonthlyReportWriteEOTemp.getCut()) && lawsMonthlyReportTitleTemplateEOS.size() != 0){
|
||||
// lawsMonthlyReportWriteEO.setMemoriesChapterName(lawsMonthlyReportTitleTemplateEOS.get(0).getTitleCn());
|
||||
// }else if(CutEnum.EN.getValue().equals(lawsMonthlyReportWriteEOTemp.getCut()) && lawsMonthlyReportTitleTemplateEOS.size() != 0){
|
||||
// lawsMonthlyReportWriteEO.setMemoriesChapterName(lawsMonthlyReportTitleTemplateEOS.get(0).getTitleEn());
|
||||
// }
|
||||
// }
|
||||
// //处理章节目录对应的一级目录
|
||||
// if(StringUtils.isNotBlank(lawsMonthlyReportWriteEO.getMemoriesChapterOne())){
|
||||
// List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS = lawsMonthlyReportTitleTemplateEOList.stream()
|
||||
// .filter(e -> lawsMonthlyReportWriteEO.getMemoriesChapterOne().equals(e.getId())).collect(Collectors.toList());
|
||||
// if(CutEnum.CN.getValue().equals(lawsMonthlyReportWriteEOTemp.getCut()) && lawsMonthlyReportTitleTemplateEOS.size() != 0){
|
||||
// lawsMonthlyReportWriteEO.setMemoriesChapterOneName(lawsMonthlyReportTitleTemplateEOS.get(0).getTitleCn());
|
||||
// }else if(CutEnum.EN.getValue().equals(lawsMonthlyReportWriteEOTemp.getCut()) && lawsMonthlyReportTitleTemplateEOS.size() != 0){
|
||||
// lawsMonthlyReportWriteEO.setMemoriesChapterOneName(lawsMonthlyReportTitleTemplateEOS.get(0).getTitleEn());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if(ContentTemplateEnum.NEW_REQUEST_LIST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
|
||||
// //新征求意见清单模板
|
||||
// List<NewOpinionTemplateEO> collect = newOpinionTemplateEOList.stream()
|
||||
// .filter(e -> lawsMonthlyReportWriteEO.getId().equals(e.getLawsMonthlyReportWriteId())).collect(Collectors.toList());
|
||||
// lawsMonthlyReportWriteEO.setNewOpinionTemplateEOList(collect);
|
||||
//
|
||||
// }else if(ContentTemplateEnum.NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
|
||||
// //新发布标准清单模板
|
||||
// List<NewStandardTemplateEO> collect = newStandardTemplateEOList.stream()
|
||||
// .filter(e -> lawsMonthlyReportWriteEO.getId().equals(e.getLawsMonthlyReportWriteId())).collect(Collectors.toList());
|
||||
// lawsMonthlyReportWriteEO.setNewStandardTemplateEOList(collect);
|
||||
// }
|
||||
//
|
||||
// //处理导出状态
|
||||
// String exportState = lawsMonthlyReportWriteEO.getExportState();
|
||||
// if(StringUtils.isNotBlank(exportState)){
|
||||
// if(ExportStateEnum.NOT_EXPORT.getValue().equals(exportState)){
|
||||
// if(CutEnum.CN.getValue().equals(lawsMonthlyReportWriteEOTemp.getCut())){
|
||||
// lawsMonthlyReportWriteEO.setExportStateName(ExportStateEnum.NOT_EXPORT.getName());
|
||||
// }else{
|
||||
// lawsMonthlyReportWriteEO.setExportStateName(ExportStateEnum.NOT_EXPORT.getNameEn());
|
||||
// }
|
||||
// }else if(ExportStateEnum.HAS_BEEN_EXPORT.getValue().equals(exportState)){
|
||||
// if(CutEnum.CN.getValue().equals(lawsMonthlyReportWriteEOTemp.getCut())){
|
||||
// lawsMonthlyReportWriteEO.setExportStateName(ExportStateEnum.HAS_BEEN_EXPORT.getName());
|
||||
// }else{
|
||||
// lawsMonthlyReportWriteEO.setExportStateName(ExportStateEnum.HAS_BEEN_EXPORT.getNameEn());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return pageInfo;
|
||||
// }
|
||||
|
||||
private void lawsContact(List<LoginUser> userList, LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO,String cut) {
|
||||
String lawsContact = lawsMonthlyReportWriteEO.getLawsContact();
|
||||
@@ -873,38 +1025,221 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}
|
||||
}
|
||||
|
||||
//封面
|
||||
//封面(office版本)
|
||||
private void coverCn(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
|
||||
String titleCN,
|
||||
XWPFDocument document) {
|
||||
//封面标识
|
||||
String flag = "cover";
|
||||
String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "年") + "月";
|
||||
//标题前面添加一个换行
|
||||
WordUtil.exportWord(document, "", null, ParagraphAlignment.CENTER, 0, null,
|
||||
false, false, "Blue Sky Noto Regular",null,null,"break");
|
||||
|
||||
titleCN = "\r\n\r\n" + titleCN + "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n";
|
||||
//添加标题
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18,
|
||||
false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
|
||||
//标题下面添加9个换行
|
||||
for (int i = 0; i < 9; i++) {
|
||||
WordUtil.exportWord(document, "", null, ParagraphAlignment.CENTER, 0, null,
|
||||
false, false, "Blue Sky Noto Regular",null,null,"break");
|
||||
}
|
||||
WordUtil.exportWord(document, moth, null, ParagraphAlignment.CENTER, 0, 12,
|
||||
false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
|
||||
String year = lawsMonthlyReportWriteEOS.get(0).getMonth().split("-")[0];
|
||||
String mothNew = lawsMonthlyReportWriteEOS.get(0).getMonth().split("-")[1];
|
||||
int mothLast = Integer.valueOf(mothNew) + 1;
|
||||
|
||||
//添加说明 2022/7/15 至 2022/8/14 期间发布的主要内容
|
||||
String text = year + "/" + mothNew +"/15 至 "+year+"/"+mothLast+"/14期间发布的主要内容";
|
||||
WordUtil.exportWord(document, text, null, ParagraphAlignment.CENTER, 0, 11,
|
||||
false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
|
||||
//添加换行
|
||||
WordUtil.exportWord(document, "\r\n", null, ParagraphAlignment.CENTER, 0, null,
|
||||
false, false, null,null,null,flag);
|
||||
|
||||
//添加说明 编辑: 整车工程 - 法规与认证&环保与材料科团队
|
||||
String text1 = "编辑: 整车工程 - 法规与认证&环保与材料科团队";
|
||||
WordUtil.exportWord(document, text1, null, ParagraphAlignment.CENTER, 0, 11,
|
||||
false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
|
||||
//添加下一页
|
||||
document.createParagraph().createRun().addBreak(BreakType.PAGE);
|
||||
}
|
||||
//封面
|
||||
//封面(WPS版本)
|
||||
// private void coverCn(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
|
||||
// String titleCN,
|
||||
// XWPFDocument document) {
|
||||
// //封面标识
|
||||
// String flag = "cover";
|
||||
// String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "年") + "月";
|
||||
//
|
||||
// titleCN = "\r\n\r\n" + titleCN + "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n";
|
||||
// WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18,
|
||||
// false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
// WordUtil.exportWord(document, moth, null, ParagraphAlignment.CENTER, 0, 12,
|
||||
// false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
//
|
||||
// String year = lawsMonthlyReportWriteEOS.get(0).getMonth().split("-")[0];
|
||||
// String mothNew = lawsMonthlyReportWriteEOS.get(0).getMonth().split("-")[1];
|
||||
// int mothLast = Integer.valueOf(mothNew) + 1;
|
||||
//
|
||||
// //添加说明 2022/7/15 至 2022/8/14 期间发布的主要内容
|
||||
// String text = year + "/" + mothNew +"/15 至 "+year+"/"+mothLast+"/14期间发布的主要内容";
|
||||
// WordUtil.exportWord(document, text, null, ParagraphAlignment.CENTER, 0, 11,
|
||||
// false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
//
|
||||
// //添加换行
|
||||
// WordUtil.exportWord(document, "\r\n", null, ParagraphAlignment.CENTER, 0, null,
|
||||
// false, false, null,null,null,flag);
|
||||
//
|
||||
// //添加说明 编辑: 整车工程 - 法规与认证&环保与材料科团队
|
||||
// String text1 = "编辑: 整车工程 - 法规与认证&环保与材料科团队";
|
||||
// WordUtil.exportWord(document, text1, null, ParagraphAlignment.CENTER, 0, 11,
|
||||
// false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
//
|
||||
// //添加下一页
|
||||
// document.createParagraph().createRun().addBreak(BreakType.PAGE);
|
||||
// }
|
||||
//封面(office版本)
|
||||
private void coverEn(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
|
||||
String titleCN,
|
||||
XWPFDocument document) {
|
||||
//封面标识
|
||||
String flag = "cover";
|
||||
String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "年") + "月";
|
||||
|
||||
titleCN = "\r\n\r\n" + titleCN + "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n";
|
||||
String year = lawsMonthlyReportWriteEOS.get(0).getMonth().split("-")[0];
|
||||
String mothNew = lawsMonthlyReportWriteEOS.get(0).getMonth().split("-")[1];
|
||||
int mothLast = Integer.valueOf(mothNew) + 1;
|
||||
String moth = mothNew+"/"+year;
|
||||
String mothNewEn = getMothEn(mothNew);
|
||||
String mothLastEn = getMothEn(String.valueOf(mothLast));
|
||||
|
||||
//标题前面添加一个换行
|
||||
WordUtil.exportWord(document, "", null, ParagraphAlignment.CENTER, 0, null,
|
||||
false, false, "Blue Sky Noto Regular",null,null,"break");
|
||||
|
||||
//添加标题
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18,
|
||||
false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
//标题下面添加8个换行
|
||||
for (int i = 0; i < 8; i++) {
|
||||
WordUtil.exportWord(document, "", null, ParagraphAlignment.CENTER, 0, null,
|
||||
false, false, "Blue Sky Noto Regular",null,null,"break");
|
||||
}
|
||||
|
||||
WordUtil.exportWord(document, moth, null, ParagraphAlignment.CENTER, 0, 12,
|
||||
false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
|
||||
|
||||
|
||||
//添加说明 Update between July 15, 2022 and August 14, 2022
|
||||
String text = "Update between "+mothNewEn+" 15,"+year+" and "+mothLastEn+" 14,"+year;
|
||||
WordUtil.exportWord(document, text, null, ParagraphAlignment.CENTER, 0, 11,
|
||||
false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
|
||||
//添加换行
|
||||
WordUtil.exportWord(document, "\r\n", null, ParagraphAlignment.CENTER, 0, null,
|
||||
false, false, null,null,null,flag);
|
||||
|
||||
//添加说明 编辑: 整车工程 - 法规与认证&环保与材料科团队
|
||||
String text1 = "Edit By: Regulation & Homologation, Environmental & Materials Team";
|
||||
WordUtil.exportWord(document, text1, null, ParagraphAlignment.CENTER, 0, 11,
|
||||
false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
|
||||
//添加下一页
|
||||
document.createParagraph().createRun().addBreak(BreakType.PAGE);
|
||||
}
|
||||
//封面(WPS版本)
|
||||
// private void coverEn(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
|
||||
// String titleCN,
|
||||
// XWPFDocument document) {
|
||||
// //封面标识
|
||||
// String flag = "cover";
|
||||
//
|
||||
// String year = lawsMonthlyReportWriteEOS.get(0).getMonth().split("-")[0];
|
||||
// String mothNew = lawsMonthlyReportWriteEOS.get(0).getMonth().split("-")[1];
|
||||
// int mothLast = Integer.valueOf(mothNew) + 1;
|
||||
// String moth = mothNew+"/"+year;
|
||||
// String mothNewEn = getMothEn(mothNew);
|
||||
// String mothLastEn = getMothEn(String.valueOf(mothLast));
|
||||
//
|
||||
//// String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "年") + "月";
|
||||
//
|
||||
// titleCN = "\r\n\r\n" + titleCN + "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n";
|
||||
// WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18,
|
||||
// false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
// WordUtil.exportWord(document, moth, null, ParagraphAlignment.CENTER, 0, 12,
|
||||
// false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
//
|
||||
//
|
||||
//
|
||||
// //添加说明 Update between July 15, 2022 and August 14, 2022
|
||||
// String text = "Update between "+mothNewEn+" 15,"+year+" and "+mothLastEn+" 14,"+year;
|
||||
// WordUtil.exportWord(document, text, null, ParagraphAlignment.CENTER, 0, 11,
|
||||
// false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
//
|
||||
// //添加换行
|
||||
// WordUtil.exportWord(document, "\r\n", null, ParagraphAlignment.CENTER, 0, null,
|
||||
// false, false, null,null,null,flag);
|
||||
//
|
||||
// //添加说明 编辑: 整车工程 - 法规与认证&环保与材料科团队
|
||||
// String text1 = "Edit By: Regulation & Homologation, Environmental & Materials Team";
|
||||
// WordUtil.exportWord(document, text1, null, ParagraphAlignment.CENTER, 0, 11,
|
||||
// false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
//
|
||||
// //添加下一页
|
||||
// document.createParagraph().createRun().addBreak(BreakType.PAGE);
|
||||
// }
|
||||
|
||||
private String getMothEn(String moth){
|
||||
String result = "";
|
||||
switch (moth) {
|
||||
// 心跳检测
|
||||
case "1":
|
||||
result = "January";
|
||||
break;
|
||||
case "2":
|
||||
result = "February";
|
||||
break;
|
||||
case "3":
|
||||
result = "March";
|
||||
break;
|
||||
case "4":
|
||||
result = "April";
|
||||
break;
|
||||
case "5":
|
||||
result = "May";
|
||||
break;
|
||||
case "6":
|
||||
result = "June";
|
||||
break;
|
||||
case "7":
|
||||
result = "July";
|
||||
break;
|
||||
case "8":
|
||||
result = "August";
|
||||
break;
|
||||
case "9":
|
||||
result = "September";
|
||||
break;
|
||||
case "10":
|
||||
result = "October";
|
||||
break;
|
||||
case "11":
|
||||
result = "November";
|
||||
break;
|
||||
case "12":
|
||||
result = "December";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
private void wordContent(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
|
||||
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS,
|
||||
List<LawsMonthlyReportTitleTemplateEO> reportTitleOneList,
|
||||
@@ -1179,4 +1514,32 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
return infoPage;
|
||||
}
|
||||
|
||||
|
||||
public Page getPages(Integer currentPage, Integer pageSize, List<LawsMonthlyReportWriteEO> list){
|
||||
Page page =new Page();
|
||||
if(list==null){
|
||||
return null;
|
||||
}
|
||||
int size = list.size();
|
||||
if(pageSize > size){
|
||||
pageSize = size;
|
||||
}
|
||||
if(pageSize!=0){
|
||||
//求出最⼤页数,防⽌currentPage越界
|
||||
int maxPage = size % pageSize ==0? size / pageSize : size / pageSize +1;
|
||||
if(currentPage > maxPage){
|
||||
currentPage = maxPage;
|
||||
}
|
||||
}
|
||||
//当前页第⼀条数据的下标
|
||||
int curIdx = currentPage >1?(currentPage -1)* pageSize :0;
|
||||
List pageList =new ArrayList();
|
||||
//将当前页的数据放进pageList
|
||||
for(int i =0; i < pageSize && curIdx + i < size; i++){
|
||||
pageList.add(list.get(curIdx + i));
|
||||
}
|
||||
page.setCurrent(currentPage).setSize(pageSize).setTotal(list.size()).setRecords(pageList);
|
||||
return page;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+188
-93
@@ -128,6 +128,10 @@ public class WordUtil {
|
||||
}
|
||||
|
||||
XWPFRun titleParagraphRun = titleParagraph.createRun();
|
||||
//封面中的换行
|
||||
if("break".equals(flag)){
|
||||
titleParagraphRun.addBreak();
|
||||
}
|
||||
if (isNewline) {
|
||||
titleParagraphRun.setText("\r");
|
||||
} else {
|
||||
@@ -202,45 +206,7 @@ public class WordUtil {
|
||||
styles.addStyle(style);
|
||||
}
|
||||
|
||||
// @SneakyThrows
|
||||
// public static void exportHeardAndFoot(XWPFDocument document){
|
||||
//// XWPFDocument document = new XWPFDocument();
|
||||
//
|
||||
// // create header-footer
|
||||
// XWPFHeaderFooterPolicy headerFooterPolicy = document.getHeaderFooterPolicy();
|
||||
// if (headerFooterPolicy == null) headerFooterPolicy = document.createHeaderFooterPolicy();
|
||||
//
|
||||
// // create header start
|
||||
// XWPFHeader header = headerFooterPolicy.createHeader(XWPFHeaderFooterPolicy.DEFAULT);
|
||||
//
|
||||
// XWPFParagraph paragraph = header.createParagraph();
|
||||
// paragraph.setAlignment(ParagraphAlignment.CENTER);
|
||||
//
|
||||
// XWPFRun run = paragraph.createRun();
|
||||
// run.setText("Header");
|
||||
//
|
||||
// // create footer start
|
||||
// XWPFFooter footer = headerFooterPolicy.createFooter(XWPFHeaderFooterPolicy.DEFAULT);
|
||||
//
|
||||
// paragraph = footer.createParagraph();
|
||||
// paragraph.setAlignment(ParagraphAlignment.CENTER);
|
||||
//
|
||||
// run = paragraph.createRun();
|
||||
// run.setText("Footer");
|
||||
//
|
||||
// CTSectPr sectPr = document.getDocument().getBody().getSectPr();
|
||||
// if (sectPr == null) sectPr = document.getDocument().getBody().addNewSectPr();
|
||||
// CTPageMar pageMar = sectPr.getPgMar();
|
||||
// if (pageMar == null) pageMar = sectPr.addNewPgMar();
|
||||
// pageMar.setLeft(BigInteger.valueOf(2000)); //720 TWentieths of an Inch Point (Twips) = 720/20 = 36 pt = 36/72 = 0.5"
|
||||
// pageMar.setRight(BigInteger.valueOf(720));
|
||||
// pageMar.setTop(BigInteger.valueOf(1440)); //1440 Twips = 1440/20 = 72 pt = 72/72 = 1"
|
||||
// pageMar.setBottom(BigInteger.valueOf(1440));
|
||||
//
|
||||
// pageMar.setHeader(BigInteger.valueOf(2000)); //45.4 pt * 20 = 908 = 45.4 pt header from top
|
||||
// pageMar.setFooter(BigInteger.valueOf(568)); //28.4 pt * 20 = 568 = 28.4 pt footer from bottom
|
||||
//
|
||||
// }
|
||||
//主要内容生成页眉页脚(office版本)
|
||||
@SneakyThrows
|
||||
public static void exportHeardAndFoot(XWPFDocument document,String month){
|
||||
XWPFHeaderFooterPolicy headerFooterPolicy = document.getHeaderFooterPolicy();
|
||||
@@ -266,7 +232,7 @@ public class WordUtil {
|
||||
picture.getCTPicture().getBlipFill().getBlip().setEmbed(blipID);
|
||||
run.addTab();
|
||||
is.close();
|
||||
run.setText(" "+month);
|
||||
run.setText(" "+month);
|
||||
run.setFontSize(11);
|
||||
run.setFontFamily("Blue Sky Noto Regular");
|
||||
}
|
||||
@@ -313,20 +279,107 @@ public class WordUtil {
|
||||
|
||||
CTSectPr sectPr = document.getDocument().getBody().getSectPr();
|
||||
if (sectPr == null) sectPr = document.getDocument().getBody().addNewSectPr();
|
||||
//设置页面大小
|
||||
//设置页面大小(21*29.7)
|
||||
CTPageSz pgSz = sectPr.addNewPgSz();
|
||||
pgSz.setW(BigInteger.valueOf(11907));
|
||||
pgSz.setH(BigInteger.valueOf(16840));
|
||||
pgSz.setW(BigInteger.valueOf(11905));
|
||||
pgSz.setH(BigInteger.valueOf(16838));
|
||||
CTPageMar pageMar = sectPr.getPgMar();
|
||||
if (pageMar == null) pageMar = sectPr.addNewPgMar();
|
||||
pageMar.setLeft(BigInteger.valueOf(1803)); //左边距
|
||||
pageMar.setRight(BigInteger.valueOf(1803));//右边距
|
||||
pageMar.setLeft(BigInteger.valueOf(1797)); //左边距
|
||||
pageMar.setRight(BigInteger.valueOf(1797));//右边距
|
||||
pageMar.setTop(BigInteger.valueOf(1440)); //页眉高度
|
||||
pageMar.setBottom(BigInteger.valueOf(1440));//页脚高度
|
||||
|
||||
pageMar.setHeader(BigInteger.valueOf(720)); //页眉上边框到顶部的距离
|
||||
pageMar.setFooter(BigInteger.valueOf(720)); //页脚下边框到底部的距离
|
||||
}
|
||||
//主要内容生成页眉页脚(WPS版本)
|
||||
// @SneakyThrows
|
||||
// public static void exportHeardAndFoot(XWPFDocument document,String month){
|
||||
// XWPFHeaderFooterPolicy headerFooterPolicy = document.getHeaderFooterPolicy();
|
||||
// if (headerFooterPolicy == null) headerFooterPolicy = document.createHeaderFooterPolicy();
|
||||
// XWPFHeader header = headerFooterPolicy.createHeader(XWPFHeaderFooterPolicy.DEFAULT);
|
||||
//
|
||||
//// String logoFilePath = "/jero-boot/home/weilai.png";
|
||||
// String logoFilePath = WordUtil.class.getClassLoader().getResource("static/home/weilai.png").getPath();
|
||||
// //页眉第一个段落展示logo-----------------------------------------------------------------------------------
|
||||
// if (org.apache.commons.lang3.StringUtils.isNotBlank(logoFilePath)) {
|
||||
// XWPFParagraph logo = header.createParagraph();
|
||||
// logo.setAlignment(ParagraphAlignment.LEFT);
|
||||
// XWPFRun run = logo.createRun();
|
||||
//
|
||||
// String imgFile = logoFilePath;
|
||||
// InputStream is = WordUtil.class.getClassLoader().getResourceAsStream("static/home/weilai.png");
|
||||
//// InputStream is = new FileInputStream(imgFile);
|
||||
// XWPFPicture picture = run.addPicture(is, XWPFDocument.PICTURE_TYPE_PNG, imgFile, Units.toEMU(95), Units.toEMU(35));
|
||||
// String blipID = "";
|
||||
// for(XWPFPictureData picturedata : header.getAllPackagePictures()) { //这段必须有,不然打开的logo图片不显示
|
||||
// blipID = header.getRelationId(picturedata);
|
||||
// }
|
||||
// picture.getCTPicture().getBlipFill().getBlip().setEmbed(blipID);
|
||||
// run.addTab();
|
||||
// is.close();
|
||||
// run.setText(" "+month);
|
||||
// run.setFontSize(11);
|
||||
// run.setFontFamily("Blue Sky Noto Regular");
|
||||
// }
|
||||
// //页眉第二个段落展示日期------------------------------------------------------------
|
||||
// XWPFParagraph paragraph = header.createParagraph();//创建新的段落
|
||||
//// paragraph.setAlignment(ParagraphAlignment.RIGHT);//段落文本的对齐方式
|
||||
// XWPFRun run = paragraph.createRun();
|
||||
//// run.setText(month);
|
||||
//
|
||||
// //页脚(三个段落分别展示3个内容)-----------------------------------------------------
|
||||
// XWPFFooter footer = headerFooterPolicy.createFooter(XWPFHeaderFooterPolicy.DEFAULT);
|
||||
//
|
||||
// paragraph = footer.createParagraph();
|
||||
// paragraph.setAlignment(ParagraphAlignment.CENTER);
|
||||
// run = paragraph.createRun();
|
||||
// run.setText("NIO Internal");
|
||||
// run.setFontSize(11);
|
||||
// run.setFontFamily("Blue Sky Standard Regular");
|
||||
//
|
||||
// paragraph = footer.createParagraph();
|
||||
// paragraph.setAlignment(ParagraphAlignment.LEFT);
|
||||
// run = paragraph.createRun();
|
||||
// run.setText("NIO.com");
|
||||
// run.setFontSize(11);
|
||||
// run.setFontFamily("Blue Sky Noto Regular");
|
||||
//
|
||||
// //生成页码---------------------------------------------------------------------
|
||||
// paragraph = footer.createParagraph();
|
||||
// paragraph.setAlignment(ParagraphAlignment.RIGHT);
|
||||
// run = paragraph.createRun();
|
||||
// CTFldChar fldChar = run.getCTR().addNewFldChar();
|
||||
// fldChar.setFldCharType(STFldCharType.Enum.forString("begin"));
|
||||
//
|
||||
// run = paragraph.createRun();
|
||||
// CTText ctText = run.getCTR().addNewInstrText();
|
||||
// ctText.setStringValue("PAGE \\* MERGEFORMAT");
|
||||
// ctText.setSpace(SpaceAttribute.Space.Enum.forString("preserve"));
|
||||
//
|
||||
// fldChar = run.getCTR().addNewFldChar();
|
||||
// fldChar.setFldCharType(STFldCharType.Enum.forString("end"));
|
||||
// //----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
// CTSectPr sectPr = document.getDocument().getBody().getSectPr();
|
||||
// if (sectPr == null) sectPr = document.getDocument().getBody().addNewSectPr();
|
||||
// //设置页面大小
|
||||
// CTPageSz pgSz = sectPr.addNewPgSz();
|
||||
// pgSz.setW(BigInteger.valueOf(11907));
|
||||
// pgSz.setH(BigInteger.valueOf(16840));
|
||||
// CTPageMar pageMar = sectPr.getPgMar();
|
||||
// if (pageMar == null) pageMar = sectPr.addNewPgMar();
|
||||
// pageMar.setLeft(BigInteger.valueOf(1803)); //左边距
|
||||
// pageMar.setRight(BigInteger.valueOf(1803));//右边距
|
||||
// pageMar.setTop(BigInteger.valueOf(1440)); //页眉高度
|
||||
// pageMar.setBottom(BigInteger.valueOf(1440));//页脚高度
|
||||
//
|
||||
// pageMar.setHeader(BigInteger.valueOf(720)); //页眉上边框到顶部的距离
|
||||
// pageMar.setFooter(BigInteger.valueOf(720)); //页脚下边框到底部的距离
|
||||
// }
|
||||
|
||||
/**
|
||||
* 主页面(只有页脚)
|
||||
@@ -356,18 +409,58 @@ public class WordUtil {
|
||||
if (sectPr == null) sectPr = document.getDocument().getBody().addNewSectPr();
|
||||
//设置页面大小
|
||||
CTPageSz pgSz = sectPr.addNewPgSz();
|
||||
pgSz.setW(BigInteger.valueOf(11907));
|
||||
pgSz.setH(BigInteger.valueOf(16840));
|
||||
pgSz.setW(BigInteger.valueOf(11905));
|
||||
pgSz.setH(BigInteger.valueOf(16838));
|
||||
CTPageMar pageMar = sectPr.getPgMar();
|
||||
if (pageMar == null) pageMar = sectPr.addNewPgMar();
|
||||
pageMar.setLeft(BigInteger.valueOf(1803)); //左边距
|
||||
pageMar.setRight(BigInteger.valueOf(1803));//右边距
|
||||
pageMar.setLeft(BigInteger.valueOf(1797)); //左边距
|
||||
pageMar.setRight(BigInteger.valueOf(1797));//右边距
|
||||
pageMar.setTop(BigInteger.valueOf(1440)); //页眉高度
|
||||
pageMar.setBottom(BigInteger.valueOf(1440));//页脚高度
|
||||
|
||||
pageMar.setHeader(BigInteger.valueOf(500)); //页眉上边框到顶部的距离
|
||||
pageMar.setFooter(BigInteger.valueOf(1200)); //页脚下边框到底部的距离
|
||||
}
|
||||
// /**
|
||||
// * 主页面(只有页脚 WPS版本)
|
||||
// * @param document
|
||||
// * @param month
|
||||
// */
|
||||
// @SneakyThrows
|
||||
// public static void exportHeardAndFootMain(XWPFDocument document,String month){
|
||||
// XWPFHeaderFooterPolicy headerFooterPolicy = document.getHeaderFooterPolicy();
|
||||
// if (headerFooterPolicy == null) headerFooterPolicy = document.createHeaderFooterPolicy();
|
||||
//// XWPFHeader header = headerFooterPolicy.createHeader(XWPFHeaderFooterPolicy.DEFAULT);
|
||||
//// XWPFParagraph paragraph = header.createParagraph();//创建新的段落
|
||||
//// XWPFRun run = paragraph.createRun();
|
||||
//
|
||||
// XWPFFooter footer = headerFooterPolicy.createFooter(XWPFHeaderFooterPolicy.DEFAULT);
|
||||
// XWPFParagraph paragraph = footer.createParagraph();
|
||||
// paragraph.setAlignment(ParagraphAlignment.CENTER);
|
||||
// XWPFRun run = paragraph.createRun();
|
||||
// run.setText("NIO Internal");
|
||||
// run.setFontSize(18);
|
||||
// run.setFontFamily("Blue Sky Standard Regular");
|
||||
//// run.setFontFamily("Blue Sky Noto Regular");
|
||||
// run.setBold(true);
|
||||
//
|
||||
//
|
||||
// CTSectPr sectPr = document.getDocument().getBody().getSectPr();
|
||||
// if (sectPr == null) sectPr = document.getDocument().getBody().addNewSectPr();
|
||||
// //设置页面大小
|
||||
// CTPageSz pgSz = sectPr.addNewPgSz();
|
||||
// pgSz.setW(BigInteger.valueOf(11907));
|
||||
// pgSz.setH(BigInteger.valueOf(16840));
|
||||
// CTPageMar pageMar = sectPr.getPgMar();
|
||||
// if (pageMar == null) pageMar = sectPr.addNewPgMar();
|
||||
// pageMar.setLeft(BigInteger.valueOf(1803)); //左边距
|
||||
// pageMar.setRight(BigInteger.valueOf(1803));//右边距
|
||||
// pageMar.setTop(BigInteger.valueOf(1440)); //页眉高度
|
||||
// pageMar.setBottom(BigInteger.valueOf(1440));//页脚高度
|
||||
//
|
||||
// pageMar.setHeader(BigInteger.valueOf(500)); //页眉上边框到顶部的距离
|
||||
// pageMar.setFooter(BigInteger.valueOf(1200)); //页脚下边框到底部的距离
|
||||
// }
|
||||
|
||||
/**
|
||||
* 导出工具示例
|
||||
@@ -454,7 +547,7 @@ public class WordUtil {
|
||||
String applyScope = lawsMonthlyReportWriteEO.getApplyScope();//适用范围
|
||||
String state = lawsMonthlyReportWriteEO.getState();//状态
|
||||
String useMethod = lawsMonthlyReportWriteEO.getUseMethod();//用法
|
||||
String implementCar = lawsMonthlyReportWriteEO.getImplementCar();//实施车型
|
||||
// String implementCar = lawsMonthlyReportWriteEO.getImplementCar();//实施车型
|
||||
String newCarImplementTime = lawsMonthlyReportWriteEO.getNewCarImplementTime();//新车型实施日期
|
||||
String productionCarImplementTime = lawsMonthlyReportWriteEO.getProductionCarImplementTime();//在产车实施日期
|
||||
String contentCn = lawsMonthlyReportWriteEO.getContentCn();//主要内容中文
|
||||
@@ -463,25 +556,25 @@ public class WordUtil {
|
||||
String workProgressEn = lawsMonthlyReportWriteEO.getWorkProgressEn();//NIO工作进展英文
|
||||
String lawsContactTemp = lawsMonthlyReportWriteEO.getLawsContact();//法规联系人
|
||||
String lawsContact = getLawsContact(loginUserList, lawsContactTemp);
|
||||
if(StringUtils.isNotEmpty(lawsContact)){
|
||||
List<String> lawsContactList = Arrays.asList(lawsContact.split(","));
|
||||
if (lawsContactList.size() > 4) {
|
||||
StringBuilder str = new StringBuilder();
|
||||
int count = 0;
|
||||
for (String s : lawsContactList) {
|
||||
str.append(s + ",");
|
||||
count++;
|
||||
if (count % 4 == 0) {
|
||||
str.append("\n");
|
||||
}
|
||||
}
|
||||
if(str.toString().endsWith("\n")){
|
||||
lawsContact = str.substring(0,str.length()-2);
|
||||
}else{
|
||||
lawsContact = str.substring(0,str.length()-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if(StringUtils.isNotEmpty(lawsContact)){
|
||||
// List<String> lawsContactList = Arrays.asList(lawsContact.split(","));
|
||||
// if (lawsContactList.size() > 4) {
|
||||
// StringBuilder str = new StringBuilder();
|
||||
// int count = 0;
|
||||
// for (String s : lawsContactList) {
|
||||
// str.append(s + ",");
|
||||
// count++;
|
||||
// if (count % 4 == 0) {
|
||||
// str.append("\n");
|
||||
// }
|
||||
// }
|
||||
// if(str.toString().endsWith("\n")){
|
||||
// lawsContact = str.substring(0,str.length()-2);
|
||||
// }else{
|
||||
// lawsContact = str.substring(0,str.length()-1);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
String link = lawsMonthlyReportWriteEO.getLink();//链接
|
||||
String technologyTerritoryName = "";
|
||||
@@ -504,7 +597,7 @@ public class WordUtil {
|
||||
String stateName = dictItem(sysDictItems, state,cut, DictCodeReportEnum.STATE.getValue());
|
||||
String useMethodName = dictItem(sysDictItems, useMethod,cut, DictCodeReportEnum.USEMETHOD.getValue());
|
||||
|
||||
XWPFTable table = document.createTable(11, 2);
|
||||
XWPFTable table = document.createTable(10, 2);
|
||||
//表格属性
|
||||
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
||||
//固定列宽(英文和数字的时候自动换行)
|
||||
@@ -534,19 +627,19 @@ public class WordUtil {
|
||||
//第5行
|
||||
setCellThree(table,3, "用法",useMethodName,sysDictItems,DictCodeReportEnum.USEMETHOD.getValue());
|
||||
//第6行
|
||||
setCell(table,4, "实施车型",implementCar);
|
||||
// setCell(table,4, "实施车型",implementCar);
|
||||
//第7行
|
||||
setCell(table,5, "新车型实施日期",newCarImplementTime);
|
||||
setCell(table,4, "新车型实施日期",newCarImplementTime);
|
||||
//第8行
|
||||
setCell(table,6, "在产车实施日期",productionCarImplementTime);
|
||||
setCell(table,5, "在产车实施日期",productionCarImplementTime);
|
||||
//第9行
|
||||
setCell(table,7, "主要内容",contentCn);
|
||||
setCell(table,6, "主要内容",contentCn);
|
||||
//第10行
|
||||
setCell(table,8, "NIO工作进展",workProgressCn);
|
||||
setCell(table,7, "NIO工作进展",workProgressCn);
|
||||
//第11行
|
||||
setCell(table,9, "法规联系人",lawsContact);
|
||||
setCell(table,8, "法规联系人",lawsContact);
|
||||
//第12行
|
||||
setCell(table,10, "链接",link);
|
||||
setCell(table,9, "链接",link);
|
||||
}else{
|
||||
//第1行
|
||||
setCell(table,0, "Related Areas",technologyTerritoryName);
|
||||
@@ -559,19 +652,19 @@ public class WordUtil {
|
||||
//第5行
|
||||
setCellThree(table,3,"Usage",useMethodName,sysDictItems,DictCodeReportEnum.APPLYSCOPE.getValue());
|
||||
//第6行
|
||||
setCell(table,4,"Implementation Model",implementCar);
|
||||
// setCell(table,4,"Implementation Model",implementCar);
|
||||
//第7行
|
||||
setCell(table,5,"New Type Execution Date",newCarImplementTime);
|
||||
setCell(table,4,"New Type Execution Date",newCarImplementTime);
|
||||
//第8行
|
||||
setCell(table,6,"New Vehicle Execution Date",productionCarImplementTime);
|
||||
setCell(table,5,"New Vehicle Execution Date",productionCarImplementTime);
|
||||
//第9行
|
||||
setCell(table,7,"Main Content",contentEn);
|
||||
setCell(table,6,"Main Content",contentEn);
|
||||
//第10行
|
||||
setCell(table,8,"NIO Work Progress",workProgressEn);
|
||||
setCell(table,7,"NIO Work Progress",workProgressEn);
|
||||
//第11行
|
||||
setCell(table,9,"Regulatory Contact",lawsContact);
|
||||
setCell(table,8,"Regulatory Contact",lawsContact);
|
||||
//第12行
|
||||
setCell(table, 10,"Link",link);
|
||||
setCell(table, 9,"Link",link);
|
||||
}
|
||||
// ctTblLayoutType.setType(STTblLayoutType.FIXED);
|
||||
|
||||
@@ -1040,7 +1133,7 @@ public class WordUtil {
|
||||
for (String s : lawsContact.split(",")) {
|
||||
List<LoginUser> loginUserList = collect.stream().filter(e -> e.getId().equals(s)).collect(Collectors.toList());
|
||||
if(loginUserList.size() != 0){
|
||||
sb.append(loginUserList.get(0).getUsername()+",");
|
||||
sb.append(loginUserList.get(0).getRealname()+",");
|
||||
}
|
||||
}
|
||||
if(com.jero.modules.system.util.StringUtils.isNotBlank(sb)){
|
||||
@@ -1072,6 +1165,7 @@ public class WordUtil {
|
||||
ctTc.addNewP() : ctTc.getPArray(0);
|
||||
//getParagraph(ctP) 获取 XWPFParagraph
|
||||
XWPFParagraph par = cell.getParagraph(ctP);
|
||||
par.setAlignment(ParagraphAlignment.LEFT);
|
||||
//XWPFRun 设置格式
|
||||
XWPFRun run = par.createRun();
|
||||
//单元格内容换行
|
||||
@@ -1109,6 +1203,7 @@ public class WordUtil {
|
||||
ctTc.addNewP() : ctTc.getPArray(0);
|
||||
//getParagraph(ctP) 获取 XWPFParagraph
|
||||
XWPFParagraph par = cell.getParagraph(ctP);
|
||||
par.setAlignment(ParagraphAlignment.LEFT);
|
||||
//XWPFRun 设置格式
|
||||
XWPFRun run = par.createRun();
|
||||
//单元格内容换行 □ ■
|
||||
@@ -1136,7 +1231,7 @@ public class WordUtil {
|
||||
setBlank(text, run, sb, itemText);
|
||||
}
|
||||
if("Usage".equals(fieldName)){
|
||||
String itemText = "Constraint,Recommend,Installation Is Compliant";
|
||||
String itemText = "Mandatory,Voluntary,Mandatory if fitted";
|
||||
setBlank(text, run, sb, itemText);
|
||||
}
|
||||
}
|
||||
@@ -1169,13 +1264,13 @@ public class WordUtil {
|
||||
String blank = "";
|
||||
switch (value) {
|
||||
case "M":
|
||||
blank = " ";
|
||||
blank = " ";
|
||||
break;
|
||||
case "N":
|
||||
blank = "\r\n";
|
||||
break;
|
||||
case "企业":
|
||||
blank = " ";
|
||||
blank = " ";
|
||||
break;
|
||||
case "整车":
|
||||
blank = " ";
|
||||
@@ -1190,10 +1285,10 @@ public class WordUtil {
|
||||
blank = "";
|
||||
break;
|
||||
case "Enterprise":
|
||||
blank = " ";
|
||||
blank = " ";
|
||||
break;
|
||||
case "Vehicle":
|
||||
blank = " ";
|
||||
blank = " ";
|
||||
break;
|
||||
case "System/Parts":
|
||||
blank = "\r\n";
|
||||
@@ -1231,13 +1326,13 @@ public class WordUtil {
|
||||
case "安装需符合":
|
||||
blank = "";
|
||||
break;
|
||||
case "Constraint":
|
||||
case "Mandatory":
|
||||
blank = " ";
|
||||
break;
|
||||
case "Recommend":
|
||||
case "Voluntary":
|
||||
blank = " ";
|
||||
break;
|
||||
case "Installation Is Compliant":
|
||||
case "Mandatory if fitted":
|
||||
blank = "";
|
||||
break;
|
||||
default:
|
||||
|
||||
+7
-7
@@ -576,13 +576,13 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
}
|
||||
}
|
||||
//如果value中包含英文单、双引号,替换成中文的。 英文的符号影响到法规技术评估流程了。
|
||||
if(entry.getValue() != null){
|
||||
if(StringUtils.contains(entry.getValue().toString(),"'") || StringUtils.contains(entry.getValue().toString(),"\"")){
|
||||
String key = entry.getKey();
|
||||
String value = entry.getValue().toString().replaceAll("'", "‘").replaceAll("\"", "”");
|
||||
record1.put(key,value);
|
||||
}
|
||||
}
|
||||
// if(entry.getValue() != null){
|
||||
// if(StringUtils.contains(entry.getValue().toString(),"'") || StringUtils.contains(entry.getValue().toString(),"\"")){
|
||||
// String key = entry.getKey();
|
||||
// String value = entry.getValue().toString().replaceAll("'", "‘").replaceAll("\"", "”");
|
||||
// record1.put(key,value);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
// 拼接文件名
|
||||
|
||||
@@ -3,11 +3,11 @@ module.exports = {
|
||||
account: 'User Account',
|
||||
EnterAccountFuzzyQuery: 'Enter Account Fuzzy Search',
|
||||
Gender: 'Gender',
|
||||
pleaseSelect: 'Please Select',
|
||||
pleaseSelect: 'Please Select ',
|
||||
male: 'Male',
|
||||
female: 'Female',
|
||||
RealName: 'User Name',
|
||||
pleaseEnter: 'Please Enter',
|
||||
pleaseEnter: 'Please Enter ',
|
||||
phoneNumber: 'Phone Number',
|
||||
query: 'Search',
|
||||
userStatues: 'User Status',
|
||||
@@ -193,8 +193,14 @@ module.exports = {
|
||||
OperationLog: 'Operation Log',
|
||||
SearchLog: 'Search Log',
|
||||
enterSearchKeyword: 'Please enter a search keyword',
|
||||
enterSearchContent:'Please enter Search Content',
|
||||
enterStandard:'Please enter Number',
|
||||
entertitle:'Please enter Title',
|
||||
OperationType: 'Operation Type',
|
||||
selectOperationType: 'Please select Operation type',
|
||||
selectProblemClassification:'Please select Problem Classification',
|
||||
selectTranslationResults:'Please select Translation results',
|
||||
selectMarket:'Please select Market',
|
||||
RequestMethod: 'Request Method',
|
||||
RequestParameters: 'Request Parameters',
|
||||
logManagementPage: 'This is the log management page',
|
||||
@@ -343,8 +349,8 @@ module.exports = {
|
||||
standard: 'Number',
|
||||
title: 'Title',
|
||||
TextStatus: 'Text Status',
|
||||
PleaseEnter: 'Please enter',
|
||||
PleaseSelect: 'Please select',
|
||||
PleaseEnter: 'Please enter ',
|
||||
PleaseSelect: 'Please select ',
|
||||
PleaseEnterOrSelect: 'Please Enter Or Select',
|
||||
ModificationTime: 'Modification Time',
|
||||
ModificationContent: 'Modification Content',
|
||||
@@ -386,7 +392,7 @@ module.exports = {
|
||||
DocumentComparison: 'Doc Comparison',
|
||||
KnowledgeDatabase: 'Q&A Knowledge',
|
||||
StandardDetails: 'Standard Details',
|
||||
whole: 'Whole',
|
||||
whole: 'All',
|
||||
DocumentLibrary: 'Document Library',
|
||||
GeneralExportInformation: 'General export information',
|
||||
CustomizeExportInformation: 'Customize export information',
|
||||
@@ -500,7 +506,7 @@ module.exports = {
|
||||
ProcessName: 'Process Name',
|
||||
ProcessType: 'Process Type',
|
||||
AddProcess: 'Add Process',
|
||||
RelatedItems: 'Relevant Project',
|
||||
RelatedItems: 'Project',
|
||||
Sponsor: 'Creator',
|
||||
CurrentProcessor: 'Current Processor',
|
||||
LastProcessor: 'Last Processor',
|
||||
@@ -721,7 +727,7 @@ module.exports = {
|
||||
directoryName: 'Catalogue Name',
|
||||
batch: 'Batch',
|
||||
uploadTime: 'Upload Time',
|
||||
enclosure: 'Enclosure',
|
||||
enclosure: 'Attachments',
|
||||
// 认证
|
||||
// 认证状态
|
||||
timeOperation: 'You have permission to operate this button.',
|
||||
@@ -916,7 +922,7 @@ module.exports = {
|
||||
deliveryHistory: 'Delivery History',
|
||||
projectDeliveryRequirements: 'Project delivery requirements',
|
||||
personLiableConfirm: 'PersonLiable Confirm',
|
||||
complianceResults: 'Compliance Results',
|
||||
complianceResults: 'Feedback',
|
||||
noData: 'No Data',
|
||||
confirmOperation: 'Confirm Operation',
|
||||
sponsorReview: 'Sponsor Review',
|
||||
@@ -983,25 +989,25 @@ module.exports = {
|
||||
taskConfirmationResponsiblePerson: 'Task confirmation of responsible person',
|
||||
or: 'or',
|
||||
warningTime: 'Warning Time',
|
||||
RegulationMonthlyManagement: 'Regulation Monthly Management',
|
||||
RegulationMonthlyFill: 'Regulation Monthly Fill',
|
||||
RegulationMonthlyName: 'Regulation monthly name',
|
||||
monthlyLanguage: 'Monthly Language',
|
||||
RegulationMonthlyManagement: 'Manage Monthly Report',
|
||||
RegulationMonthlyFill: 'Fill in Monthly Report',
|
||||
RegulationMonthlyName: 'Report Name',
|
||||
monthlyLanguage: 'Language',
|
||||
releaseStatus: 'Release Status',
|
||||
uploadedBy: 'Uploaded By',
|
||||
uploadMonthly: 'Upload Monthly',
|
||||
chapterContents: 'Chapter Contents',
|
||||
uploadMonthly: 'Upload Report',
|
||||
chapterContents: 'Chapter',
|
||||
chineseTitle: 'Chinese Title',
|
||||
englishTitle: 'English Title',
|
||||
regulatoryContact: 'Regulatory Contact',
|
||||
regulatoryContact: 'Reg. Contact',
|
||||
exportStatus: 'Export Status',
|
||||
monthlyTitleTemplate: 'Monthly Title Template',
|
||||
monthlyIntegrationAndExport: 'Monthly integration and export',
|
||||
monthlyTitleTemplate: 'Title Template',
|
||||
monthlyIntegrationAndExport: 'Export Report',
|
||||
addContent: 'Add Content',
|
||||
editContent: 'Edit Content',
|
||||
viewContent: 'View Content',
|
||||
fillInTheMonth: 'Fill in the month',
|
||||
monthSelection: 'Month Selection',
|
||||
fillInTheMonth: 'Filled in (Month)',
|
||||
monthSelection: 'Select Month',
|
||||
bringInStandardInformation: 'Bring in standard Information',
|
||||
contentTemplate: 'Content Template',
|
||||
moveUp: 'Move Up',
|
||||
@@ -1009,32 +1015,32 @@ module.exports = {
|
||||
vehicleType: 'Vehicle Type',
|
||||
usage: 'Usage',
|
||||
implementationModel: 'Implementation Model',
|
||||
primaryCoverageCn: 'Primary Coverage (Cn)',
|
||||
primaryCoverageEn: 'Primary Coverage (En)',
|
||||
primaryCoverageCn: 'Description (Cn)',
|
||||
primaryCoverageEn: 'Description (En)',
|
||||
workProgressCn: 'NIO Work Progress (Cn)',
|
||||
workProgressEn: 'NIO Work Progress (En)',
|
||||
initiatingProcess: 'Initiating Process',
|
||||
initiatingProcess: 'Initiate Process',
|
||||
collectResults: 'Collect Results',
|
||||
dateOfInitiation: 'Date Of Initiation',
|
||||
closingDate: 'Closing Date',
|
||||
closingDate: 'Due Date',
|
||||
viewProcess: 'View Process',
|
||||
evaluationResults: 'Evaluation Results',
|
||||
Assessor: 'Assessor',
|
||||
collectionOfRegulatoryOpinions: 'Collection Of Regulatory Opinions',
|
||||
collectionOfRegulatoryOpinionsProcess: 'Collection Of Regulatory Opinions Process',
|
||||
feedbackInformation: 'Feedback Information',
|
||||
relevantSections: 'Relevant Sections',
|
||||
questionsSuggestions: 'Questions Or Suggestions',
|
||||
feedbackInformation: 'Feedback',
|
||||
relevantSections: 'Chapter',
|
||||
questionsSuggestions: 'Questions/Suggestions',
|
||||
reason: 'Reason',
|
||||
proposedTime: 'Proposed Time',
|
||||
feedbackPoint: 'Feedback Point',
|
||||
link: 'Link',
|
||||
planNoChinese: 'Plan No.',
|
||||
standardNameCn: 'Standard Name Cn',
|
||||
standardNameEn: 'Standard Name En',
|
||||
deadlineForComments: 'Deadline for comments',
|
||||
standardNameCn: 'Standard Title Cn',
|
||||
standardNameEn: 'Standard Title En',
|
||||
deadlineForComments: 'Deadline for Comments',
|
||||
standardNo: 'Standard No',
|
||||
implemenDate: 'Implementation Date',
|
||||
implemenDate: 'Effective Date',
|
||||
// 上报库
|
||||
Enable: 'Enable',
|
||||
Latestupdatetime: 'Latest Update Time',
|
||||
@@ -1115,7 +1121,7 @@ module.exports = {
|
||||
PreHomoNotification: 'Pre-Homo Notification',
|
||||
ValidationComplianceNotification: 'Validation Compliance Notification',
|
||||
RegulationTaskConfirmationNotification: 'Regulation Task Confirmation Notification',
|
||||
evaluationMethod: 'Evaluation method',
|
||||
evaluationMethod: 'Check Method',
|
||||
uploadRelevantMaterials: 'Upload relevant materials',
|
||||
processBackground: 'Process Background',
|
||||
selectedStandard: 'Selected Standard',
|
||||
@@ -1123,13 +1129,13 @@ module.exports = {
|
||||
pleaseSelectStandardFirst: 'Please select a standard first',
|
||||
RelevantMaterials: 'RelevantMaterials',
|
||||
evaluatorFeedback: 'Evaluator Feedback',
|
||||
nameTechnicalDocument: 'Name of technical document',
|
||||
nameTechnicalDocument: 'Technical Document',
|
||||
chapter: 'Chapter',
|
||||
problemDescription: 'Problem Description',
|
||||
filingExternalOpinions: 'Filing of external opinions',
|
||||
regulatoryTechnicalEvaluationResults: 'Regulatory technical evaluation results',
|
||||
initiateProcessForCurrentStandard: 'Initiate process for current standard',
|
||||
engineerFeedbackResults: 'Engineer feedback results',
|
||||
engineerFeedbackResults: 'Engineer Feedback',
|
||||
fileExport: 'File Export',
|
||||
feedbackTime: 'Feedback Time',
|
||||
regulatoryTechnologyAssessmentProcess: 'Regulatory technology assessment process',
|
||||
@@ -1147,29 +1153,30 @@ module.exports = {
|
||||
releaseSituation: 'Release situation',
|
||||
comparisonResults: 'Comparison results',
|
||||
Published: 'Published',
|
||||
initiateComparison: 'Initiate comparison',
|
||||
initiateComparison: 'Initiate Comparison',
|
||||
translationLanguage: 'Translation language',
|
||||
translationResults: 'Translation results',
|
||||
conversionTime: 'Conversion time',
|
||||
category: 'Category',
|
||||
RegulatoryProcessEvaluationResults: 'Regulatory Process Evaluation Results',
|
||||
ViewConformanceResults: 'View Conformance Results',
|
||||
CommentsCollectionResultsForReference: 'Comments Collection Results For',
|
||||
TechnicalEvaluationResultsForReference: 'Technical Evaluation Results For',
|
||||
CommentsCollectionResultsForReference: 'Opinion Collection Results',
|
||||
TechnicalEvaluationResultsForReference: 'Technical Assessment Results',
|
||||
ComplianceConfirmationRecord: 'Compliance Confirmation Record',
|
||||
complianceConfirmation: 'Compliance Confirmation',
|
||||
noComparisonDocumentSelected: 'No comparison document selected',
|
||||
RemarkInfo: 'Remarks Info',
|
||||
initiateDocumentComparison: 'Initiate Document Comparison',
|
||||
comparativeComments: 'Comparative Comments',
|
||||
viewTheComparisonResults: 'View The Comparison Results',
|
||||
addFullTextComment: 'Add Full Text Comment',
|
||||
turnOffAutomaticMatching: 'Turn Off Automatic Matching',
|
||||
Deriveconformanceresults: 'Derive Conformance Results',
|
||||
viewTheComparisonResults: 'View Results',
|
||||
addFullTextComment: 'Full Text Comment',
|
||||
turnOffAutomaticMatching: 'Turn Off Auto Match',
|
||||
Deriveconformanceresults: 'Export Results',
|
||||
Regulatorycompliancekanban: 'Regulatory Compliance Kanban',
|
||||
exportComparisonReport: 'Export Comparison Report',
|
||||
comparisonDifferenceComment: 'Comparison Difference Comment',
|
||||
fullTextComments: 'Full text comments',
|
||||
fullTextComments: 'Full Text Comment',
|
||||
pleaseEnterfullTextComments:'Please enter Full Text Comment',
|
||||
fileDeclaration: 'File Declaration',
|
||||
FileForDetails: 'File For Details',
|
||||
Converting: 'Converting',
|
||||
@@ -1177,7 +1184,7 @@ module.exports = {
|
||||
convertFailed: 'Convert Failed',
|
||||
standardData: 'Standard Data',
|
||||
Theorganization: 'The Organization',
|
||||
Addingfolder: 'Adding a folder',
|
||||
Addingfolder: 'Create New Folder',
|
||||
Addingsubfolders: 'Adding Subfolders',
|
||||
Editfolder: 'Edit Folder',
|
||||
Deletefolders: 'Delete Folders',
|
||||
@@ -1188,8 +1195,8 @@ module.exports = {
|
||||
Openpersonnel: 'Open Personnel',
|
||||
originalText: 'Original Text',
|
||||
translatedText: 'Translated Text',
|
||||
Administrativeprivileges: 'Administrativ Pprivileges',
|
||||
Checkthepermissions: 'Check The Permissions',
|
||||
Administrativeprivileges: 'Administrative Permissions',
|
||||
Checkthepermissions: 'Read Permissions',
|
||||
onlyFilesUploaded: 'Only.Docx,.Doc files can be uploaded',
|
||||
selectDirectorylocation: 'Please select the directory location to add the folder',
|
||||
Fileuploaded: 'File uploaded, please wait',
|
||||
@@ -1199,10 +1206,10 @@ module.exports = {
|
||||
Parametercollection: 'Parameter Collection',
|
||||
Collectlist: 'Colle Ctlist',
|
||||
Statisticalmodels: 'Statisti Calmodels',
|
||||
Inthecollection: 'In the collection',
|
||||
Notatthe: 'Not at the',
|
||||
Inthecollection: 'During collection',
|
||||
Notatthe: 'Not started',
|
||||
Thepercentage: 'The Percentage',
|
||||
problemKnowledgeBase: 'Problem Knowledge Base',
|
||||
problemKnowledgeBase: 'Q&A Knowledge',
|
||||
recentHotSpots: 'Recent Hot Spots',
|
||||
disseminationMaterials: 'Dissemination Materials',
|
||||
informationSafety: 'Information Safety',
|
||||
@@ -1211,36 +1218,37 @@ module.exports = {
|
||||
productHighlights: 'Product Highlights',
|
||||
financialReimbursement: 'Financial Reimbursement',
|
||||
classificationMaintenance: 'Classification Maintenance',
|
||||
managePublishing: 'Manage Publishing',
|
||||
displayPermission: 'Display permission',
|
||||
managePublishing: 'Release Management',
|
||||
displayPermission: 'Display Permission',
|
||||
authorizedUser: 'Authorized user',
|
||||
problemClassification: 'Problem classification',
|
||||
problemClassification: 'Problem Classification',
|
||||
market: 'Market',
|
||||
documentNumber: 'Document Number',
|
||||
documentTitle: 'Document Title',
|
||||
bringInDocumentInformation: 'Bring in document information',
|
||||
addStandardInformation:'Add standard information',
|
||||
thereWhichCannotDeleted: 'There are sub headings under this title, which cannot be deleted',
|
||||
sdt: 'Sdt',
|
||||
dre: 'Dre',
|
||||
applicableInstructionsMarketList: 'Applicable instructions of market list',
|
||||
pleaseSelectTheDataCompared: 'Please select the data to be compared',
|
||||
problemLabel: 'Problem label',
|
||||
problemLabel: 'Topic Tag',
|
||||
personCharge: 'Person in charge',
|
||||
addLabel: 'Add Label',
|
||||
addLabel: 'Add Tag',
|
||||
editLabel: 'Edit Label',
|
||||
applicableMarket: 'Applicable market',
|
||||
templateMaintenance: 'Template maintenance',
|
||||
applicableMarket: 'Applicable Market',
|
||||
templateMaintenance: 'Template Maintenance',
|
||||
associatedWebsite: 'Associated website',
|
||||
dropDownOptions: 'Drop down options',
|
||||
dropDownOptionMaintenance: 'Drop down option maintenance',
|
||||
displayInformation: 'Display information',
|
||||
addComparison: 'Add comparison',
|
||||
displayInformation: 'Display Information',
|
||||
addComparison: 'Add Comparison',
|
||||
showOrNot: 'Show or not',
|
||||
comparisonMarket: 'Comparison Market',
|
||||
share: 'Share',
|
||||
simplifiedChinese:'Simplified Chinese',
|
||||
uploadOnly:'Upload only',
|
||||
turnOnAutoMatch:'Turn on auto match',
|
||||
turnOnAutoMatch:'Turn On Auto Match',
|
||||
Adjustareasofresponsibility:'Adjust areas of responsibility',
|
||||
regulatoryTechnicalAssessment:'Regulatory Technical Assessment',
|
||||
punctuationmark:'You can only enter English punctuation marks except the # sign and commas',
|
||||
@@ -1266,8 +1274,8 @@ module.exports = {
|
||||
onlyTheDataWhoseStatusNotInitiatedAcceptedChanged:'Only the data whose list confirmation status is accepted and the task list status is not initiated or the task list status is accepted can be changed',
|
||||
thereTitleWhichCannotBeDeleted:'There are new contents under this title, which cannot be deleted',
|
||||
industryInformationDynamicTemplate:'Industry information dynamic template',
|
||||
relatedFields:'Related fields',
|
||||
relatedFieldsEn:'Related fields (English)',
|
||||
relatedFields:'Relaevant Area',
|
||||
relatedFieldsEn:'Relaevant Area (English)',
|
||||
source:'Source',
|
||||
sourceEn:'Source (English)',
|
||||
onlyone:'Only one merge delimiter can be entered',
|
||||
@@ -1307,9 +1315,9 @@ module.exports = {
|
||||
inRecentYear2:'In recent 2 year',
|
||||
selectAll:'Select All',
|
||||
importLocalDisassemblyOrder:'Import local disassembly order',
|
||||
notExport:'Not export',
|
||||
hasBeenExport:'Has been export',
|
||||
firstLevelDirectory:'First level directory',
|
||||
notExport:'Not exported',
|
||||
hasBeenExport:'Exported',
|
||||
firstLevelDirectory:'Primary Directory',
|
||||
deselectAll:'Deselect All',
|
||||
classification:'Classification',
|
||||
consistentAssessment:'Consistent',
|
||||
@@ -1318,6 +1326,6 @@ module.exports = {
|
||||
viewAll:'View All',
|
||||
endProcess:'End Process',
|
||||
thereForTheCurrentlySelectedData:'There is no standard breakdown for the currently selected data',
|
||||
secondaryDirectory:'Secondary directory',
|
||||
secondaryDirectory:'Secondary Directory',
|
||||
OnlyPersonsCanBeSelected:'The maximum upper limit is exceeded; Only 100 persons can be selected',
|
||||
}
|
||||
@@ -195,8 +195,14 @@ module.exports = {
|
||||
OperationLog: '操作日志',
|
||||
SearchLog: '搜索日志',
|
||||
enterSearchKeyword: '请输入搜索关键词',
|
||||
enterSearchContent:'请输入搜索内容',
|
||||
enterStandard:'请输入编号',
|
||||
entertitle:'请输入标题',
|
||||
OperationType: '操作类型',
|
||||
selectOperationType: '请选择操作类型',
|
||||
selectProblemClassification:'请选择问题分类',
|
||||
selectTranslationResults:'请选择翻译结果',
|
||||
selectMarket:'请选择市场',
|
||||
RequestMethod: '请求方法',
|
||||
RequestParameters: '请求参数',
|
||||
logManagementPage: '这是日志管理页面',
|
||||
@@ -1173,6 +1179,7 @@ module.exports = {
|
||||
exportComparisonReport: '导出对比报告',
|
||||
comparisonDifferenceComment: '对比差异评论',
|
||||
fullTextComments: '全文评论',
|
||||
pleaseEnterfullTextComments:'请输入全文评论',
|
||||
fileDeclaration: '文件说明',
|
||||
FileForDetails: '文件详情',
|
||||
Converting: '转换中',
|
||||
@@ -1321,6 +1328,7 @@ module.exports = {
|
||||
documentNumber: '文档编号',
|
||||
documentTitle: '文档标题',
|
||||
bringInDocumentInformation: '带入文档信息',
|
||||
addStandardInformation:'添加标准信息',
|
||||
thereWhichCannotDeleted: '该标题下存在子标题无法进行删除',
|
||||
sdt: '工程接口人',
|
||||
dre: '填写人',
|
||||
|
||||
@@ -1,16 +1,33 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="box-title-text" v-if="!isInput">
|
||||
<a-input class="box-input" :value="value" @input="indexclick($event)"
|
||||
:disabled="true"
|
||||
:title="value"
|
||||
:placeholder="$t('PleaseSelect')+query.db_field_txt"/>
|
||||
<div class="itemModelStand-select" v-if="!isInput">
|
||||
<a-select
|
||||
class="itemModelStand-input"
|
||||
:value="valueSelect"
|
||||
@change="onChange"
|
||||
mode="multiple"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseSelect')+query.db_field_txt"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode">
|
||||
<a-select-option
|
||||
v-for="(item,index) in dictOptions"
|
||||
:key="index"
|
||||
:value="item.value">
|
||||
<span class="itemOption" :title="item.title">
|
||||
{{ item.title }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<!-- <a-input class="box-input" :value="value" @input="indexclick($event)"-->
|
||||
<!-- :disabled="true"-->
|
||||
<!-- :title="value"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+query.db_field_txt"/>-->
|
||||
<a-button type="primary" class="button-box" :disabled="disabled" @click="standardClick">
|
||||
{{this.$t('PersonnelSelection')}}
|
||||
</a-button>
|
||||
<a-button type="primary" v-if='isDelete' class="button-box" @click="standardDelete">
|
||||
{{this.$t('delete')}}
|
||||
</a-button>
|
||||
<!-- <a-button type="primary" v-if='isDelete' class="button-box" @click="standardDelete">-->
|
||||
<!-- {{this.$t('delete')}}-->
|
||||
<!-- </a-button>-->
|
||||
</div>
|
||||
<div class="box-title-text" v-if="isInput">
|
||||
<a-input :class="{'box-input':!isClass}" :value="value"
|
||||
@@ -71,7 +88,6 @@
|
||||
<a-button @click="handleSubmit" type="primary">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -91,6 +107,8 @@
|
||||
return {
|
||||
loading: false,
|
||||
gData: [],
|
||||
valueSelect: [],
|
||||
dictOptions: [],
|
||||
autoExpandParent: false,
|
||||
checkboxList: [],
|
||||
expandedKeys: [],
|
||||
@@ -111,7 +129,35 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.valueSelect = []
|
||||
this.dictOptions = []
|
||||
setTimeout(() => {
|
||||
if (this.value) {
|
||||
let contentName = []
|
||||
let contentId = []
|
||||
if (this.personneQuery[this.query.db_field_name + 'Name']) {
|
||||
contentName = this.personneQuery[this.query.db_field_name + 'Name'].split(',')
|
||||
} else if (this.personneQuery[this.query.db_field_name]) {
|
||||
contentName = this.personneQuery[this.query.db_field_name].split(',')
|
||||
} else {
|
||||
contentName = []
|
||||
}
|
||||
if (this.personneQuery[this.query.db_field_name + '_id']) {
|
||||
contentId = this.personneQuery[this.query.db_field_name + '_id'].split(',')
|
||||
} else if (this.personneQuery[this.query.db_field_name]) {
|
||||
contentId = this.personneQuery[this.query.db_field_name].split(',')
|
||||
} else {
|
||||
contentId = []
|
||||
}
|
||||
contentId.forEach((res, index) => {
|
||||
this.dictOptions.push({
|
||||
value: res,
|
||||
title: contentName[index]
|
||||
})
|
||||
this.valueSelect.push(res)
|
||||
})
|
||||
}
|
||||
}, 600)
|
||||
},
|
||||
methods: {
|
||||
// checkChange(val, checked, indeterminate) {
|
||||
@@ -314,6 +360,28 @@
|
||||
this.visible = false
|
||||
this.treeVisible = false
|
||||
},
|
||||
onChange(value) {
|
||||
this.valueSelect = value
|
||||
console.log(this.valueSelect)
|
||||
console.log(this.dictOptions)
|
||||
this.userIds = []
|
||||
this.userName = []
|
||||
if (this.valueSelect && this.valueSelect.length > 0) {
|
||||
value.forEach(res => {
|
||||
this.dictOptions.forEach(val => {
|
||||
if (res == val.value) {
|
||||
this.userIds.push(val.value)
|
||||
this.userName.push(val.title)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
let userIds = JSON.parse(JSON.stringify(this.userIds))
|
||||
let userName = JSON.parse(JSON.stringify(this.userName))
|
||||
console.log(userIds)
|
||||
this.$emit('input', userName.join(','))
|
||||
this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript)
|
||||
},
|
||||
handleSubmit() {
|
||||
// if (this.userIds && this.userIds.length > 0) {
|
||||
if (this.isSingleChoice) {
|
||||
@@ -330,6 +398,19 @@
|
||||
// userIds = userIds.filter(function(item, index) {
|
||||
// return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个
|
||||
// })
|
||||
if (!this.isInput) {
|
||||
this.dictOptions = []
|
||||
this.valueSelect = []
|
||||
if (userIds && userIds.length > 0) {
|
||||
userIds.forEach((res, index) => {
|
||||
this.dictOptions.push({
|
||||
title: userName[index],
|
||||
value: res
|
||||
})
|
||||
this.valueSelect.push(res)
|
||||
})
|
||||
}
|
||||
}
|
||||
this.$emit('input', userName.join(','))
|
||||
this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript)
|
||||
this.visible = false
|
||||
@@ -514,11 +595,18 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModelStand-input {
|
||||
width: calc(100% - 100px);
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.button-box {
|
||||
width: 90px;
|
||||
margin-left: 10px;
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
|
||||
float: right;
|
||||
}
|
||||
|
||||
.drawer-bootom-button {
|
||||
@@ -590,4 +678,18 @@
|
||||
color: #21c9cc;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.itemOption {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.itemModelStand-select .ant-select-dropdown--multiple {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
@@ -150,6 +150,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<PersonnelSelection :query="item"
|
||||
v-if="isFormInline"
|
||||
:personneQuery="formInline"
|
||||
@change="PersonnelSelectionChange"
|
||||
:disabled="disabled"
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
:data-source="dataSource"
|
||||
:loading="loading"
|
||||
sticky
|
||||
:components="components"
|
||||
:columns="columns"
|
||||
:rowClassName="rowClassName"
|
||||
@change="tableOnChange"
|
||||
|
||||
+1
@@ -34,6 +34,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="chargePersonIdName">
|
||||
<PersonnelSelection
|
||||
v-if="visible"
|
||||
:isSingleChoice="true"
|
||||
:query="{db_field_name:'chargePersonId',db_field_txt:$t('personCharge')}"
|
||||
:personneQuery="formInline"
|
||||
|
||||
+3
-1
@@ -36,7 +36,9 @@
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="box-content-right">
|
||||
<div @click="managePublishingClick" class="operator-text">
|
||||
<div @click="managePublishingClick"
|
||||
v-has="'countryCard:managePublishing'"
|
||||
class="operator-text">
|
||||
<a-icon type="carry-out"/>
|
||||
{{$t('managePublishing')}}
|
||||
</div>
|
||||
|
||||
+26
-9
@@ -34,9 +34,10 @@
|
||||
<span class="title-text-text"
|
||||
:title="$t('problemClassification')">{{$t('problemClassification')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="problemType">
|
||||
<a-form-model-item class="itemModel itemModel-multi" prop="problemType">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('problemClassification')"
|
||||
@change="problemTypeChange"
|
||||
mode="multiple"
|
||||
v-model="formInline.problemType">
|
||||
<a-select-option v-for="(item, key) in problemTypeList"
|
||||
:key="key"
|
||||
@@ -94,7 +95,7 @@
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('authorizedUser')">{{$t('authorizedUser')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="studioEngineerName">
|
||||
<a-form-model-item class="itemModel-multi" prop="studioEngineerName">
|
||||
<PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('authorizedUser')}"
|
||||
:personneQuery="formInline"
|
||||
@change="PersonnelSelectionChange"
|
||||
@@ -125,9 +126,9 @@
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<a-button class="box-button-index"
|
||||
:title="$t('bringInDocumentInformation')"
|
||||
:title="$t('addStandardInformation')"
|
||||
type="primary" @click="bringInDocumentInformationClick">
|
||||
{{$t('bringInDocumentInformation')}}
|
||||
{{$t('addStandardInformation')}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -178,7 +179,10 @@
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
<div class="submit-button">
|
||||
<a-button class="box-button" type="primary" @click="submit">{{$t('submit')}}</a-button>
|
||||
<a-button class="box-button" type="primary" @click="submit('Draft')">
|
||||
{{$t('tempSave')}}
|
||||
</a-button>
|
||||
<a-button class="box-button" type="primary" @click="submit('Have released')">{{$t('release')}}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -356,7 +360,7 @@
|
||||
document.title = this.$t('problemKnowledgeBase') + this.$t('edit')
|
||||
} else {
|
||||
this.isDisplayIndex = true
|
||||
this.$nextTick(()=>{
|
||||
this.$nextTick(() => {
|
||||
this.myQuillEditor()
|
||||
})
|
||||
document.title = this.$t('problemKnowledgeBase') + this.$t('newlyAdded')
|
||||
@@ -476,6 +480,11 @@
|
||||
} else {
|
||||
this.formInline.standNumber = []
|
||||
}
|
||||
if (this.formInline.problemType) {
|
||||
this.formInline.problemType = this.formInline.problemType.split(',')
|
||||
} else {
|
||||
this.formInline.problemType = []
|
||||
}
|
||||
this.formInline = { ...this.formInline }
|
||||
} else {
|
||||
this.formInline = {}
|
||||
@@ -491,7 +500,7 @@
|
||||
this.$router.go(-1)
|
||||
},
|
||||
onEditorReady(quill) {
|
||||
if (this.formInlineOne.content){
|
||||
if (this.formInlineOne.content) {
|
||||
document.getElementsByClassName('ql-editor')[0].innerHTML = this.formInlineOne.content
|
||||
}
|
||||
},
|
||||
@@ -595,14 +604,20 @@
|
||||
this.formInline[this.uploadName] = attIdList.join(',')
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
submit() {
|
||||
tempSaveClick(){
|
||||
|
||||
},
|
||||
submit(releaseStatus) {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
// if (formInline.standNumber && formInline.standNumber.length > 0) {
|
||||
if (formInline.standNumber instanceof Array){
|
||||
if (formInline.standNumber instanceof Array) {
|
||||
formInline.standNumber = formInline.standNumber.join(',')
|
||||
}
|
||||
if (formInline.problemType instanceof Array) {
|
||||
formInline.problemType = formInline.problemType.join(',')
|
||||
}
|
||||
// }
|
||||
this.loading = true
|
||||
this.confirmLoading = true
|
||||
@@ -624,6 +639,7 @@
|
||||
})
|
||||
})
|
||||
}
|
||||
formInline.releaseStatus = releaseStatus
|
||||
Action(url, formInline).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
@@ -775,6 +791,7 @@
|
||||
.box-button {
|
||||
height: 38px;
|
||||
margin-top: 4px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.box-button-index {
|
||||
|
||||
+63
-18
@@ -15,7 +15,9 @@
|
||||
</template>
|
||||
</div>
|
||||
<div class="box-content-content">
|
||||
<div class="box-content-content-index" :title="$t('classificationMaintenance')"
|
||||
<div class="box-content-content-index"
|
||||
v-has="'problemKnowledgeBase:classificationMaintenance'"
|
||||
:title="$t('classificationMaintenance')"
|
||||
@click="classificationClick">
|
||||
<a-icon type="setting"/>
|
||||
{{$t('classificationMaintenance')}}
|
||||
@@ -42,11 +44,15 @@
|
||||
<!-- <a-icon type="setting"/>-->
|
||||
<!-- {{$t('classificationMaintenance')}}-->
|
||||
<!-- </div>-->
|
||||
<div @click="managePublishingClick" class="operator-text-text-index">
|
||||
<div @click="managePublishingClick"
|
||||
v-has="'problemKnowledgeBase:release'"
|
||||
class="operator-text-text-index">
|
||||
<a-icon type="carry-out"/>
|
||||
{{$t('managePublishing')}}
|
||||
</div>
|
||||
<div @click="newlyAddedClick" class="operator-text-text-index">
|
||||
<div @click="newlyAddedClick"
|
||||
v-has="'problemKnowledgeBase:add'"
|
||||
class="operator-text-text-index">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('newlyAdded')}}
|
||||
</div>
|
||||
@@ -65,16 +71,16 @@
|
||||
{{val}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="content-box-content" @click="detailClcik(item)">
|
||||
<div class="content-box-content-top" v-html="item.contentOne">
|
||||
|
||||
<div class="content-box-content">
|
||||
<div class="content-box-content-top" @click="detailClcik(item)"
|
||||
v-html="item.contentOne">
|
||||
</div>
|
||||
<div class="content-box-content-botton">
|
||||
<div class="content-box-content-botton-text"
|
||||
v-if="item.accessoryFileNameList && item.accessoryFileNameList.length > 0"
|
||||
:title="val.fileName"
|
||||
v-for="val in item.accessoryFileNameList">
|
||||
{{val.fileName}}
|
||||
<span @click="fileClick(val)">{{val.fileName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -85,9 +91,13 @@
|
||||
<a-icon type="user"/>
|
||||
{{item.createBy}}
|
||||
</div>
|
||||
<div class="content-box-button-text">
|
||||
<div class="content-box-button-text" v-if="item.standNumber">
|
||||
<a-icon type="audit"/>
|
||||
{{item.problemTypeName}}
|
||||
{{item.standNumber}}
|
||||
</div>
|
||||
<div class="content-box-button-text" v-if="item.targetMarket_dicText">
|
||||
<a-icon type="idcard"/>
|
||||
{{item.targetMarket_dicText}}
|
||||
</div>
|
||||
<div class="content-box-button-text">
|
||||
<a-icon type="history"/>
|
||||
@@ -170,6 +180,7 @@
|
||||
import SelectedBy from '@/components/SelectedBy/index'
|
||||
import problemKnowledgeBaseListView from './problemKnowledgeBaseListView'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { Base64 } from 'js-base64'
|
||||
|
||||
export default {
|
||||
name: 'problemKnowledgeBaseList',
|
||||
@@ -193,6 +204,7 @@
|
||||
queryForm: {},
|
||||
tagList: [],
|
||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
|
||||
pageNo: 1,
|
||||
url: {
|
||||
getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseEO/page'
|
||||
@@ -207,6 +219,17 @@
|
||||
localStorage.removeItem('serial_number')
|
||||
}
|
||||
this.isTrue = true
|
||||
let BaseQuery = localStorage.getItem('problemknowledgeBase')
|
||||
if (BaseQuery) {
|
||||
let content = JSON.parse(BaseQuery)
|
||||
if (content.id) {
|
||||
this.isTrue = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.problemKnowledgeBaseListViewRef.getData(JSON.parse(JSON.stringify(content)))
|
||||
})
|
||||
}
|
||||
localStorage.removeItem('problemknowledgeBase')
|
||||
}
|
||||
this.getList()
|
||||
this.replacePage()
|
||||
},
|
||||
@@ -255,6 +278,26 @@
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
fileClick(fileQuery) {
|
||||
let fileName = fileQuery.fileName
|
||||
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=' + fileQuery.id + '&userName=' + this.userInfo().username))
|
||||
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else if (fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else {
|
||||
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
|
||||
}
|
||||
},
|
||||
problemKnowledgeBase() {
|
||||
this.pageNo = 1
|
||||
this.isTrue = true
|
||||
@@ -309,7 +352,8 @@
|
||||
},
|
||||
getText(str) {
|
||||
let words = str.replace(/<[^<>]+>/g, '').replace(/ /gi, '') //这里是去除标签
|
||||
return words.replace(/\s/g, '') //这里是去除空格
|
||||
//.replace(/\s/g, '') //这里是去除空格
|
||||
return words
|
||||
},
|
||||
getList() {
|
||||
let selectedTags = JSON.parse(JSON.stringify(this.selectedTags))
|
||||
@@ -317,7 +361,8 @@
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
searchStr: this.searchStr,
|
||||
problemTypes: selectedTags.join(',')
|
||||
problemTypes: selectedTags.join(','),
|
||||
releaseStatus: 'Have released'
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.getInfoList, query).then((res) => {
|
||||
@@ -629,7 +674,7 @@
|
||||
background: #DBF2F3;
|
||||
border-radius: 3px;
|
||||
margin-left: 6px;
|
||||
max-width: 120px;
|
||||
max-width: 140px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
@@ -662,22 +707,22 @@
|
||||
margin-top: 10px;
|
||||
|
||||
.content-box-content-botton-text {
|
||||
max-width: 198px;
|
||||
/*max-width: 198px;*/
|
||||
height: 32px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
line-height: 32px;
|
||||
padding: 0 10px;
|
||||
background: #EFF1F3;
|
||||
/*background: #EFF1F3;*/
|
||||
border-radius: 4px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
margin-right: 10px;
|
||||
margin-right: 20px;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -789,7 +834,7 @@
|
||||
background: #fff;
|
||||
background: rgba(4, 11, 41, 0.06);
|
||||
color: #363C54;
|
||||
max-width: 150px;
|
||||
max-width: 280px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
+69
-12
@@ -33,9 +33,13 @@
|
||||
<a-icon type="user"/>
|
||||
{{queryForm.createBy}}
|
||||
</div>
|
||||
<div class="content-box-button-text">
|
||||
<a-icon type="audit"/>
|
||||
{{queryForm.problemTypeName}}
|
||||
<div class="content-box-button-text" v-if="queryForm.standNumber">
|
||||
<a-icon type="file-markdown"/>
|
||||
{{queryForm.standNumber}}
|
||||
</div>
|
||||
<div class="content-box-button-text" v-if="queryForm.targetMarket_dicText">
|
||||
<a-icon type="idcard"/>
|
||||
{{queryForm.targetMarket_dicText}}
|
||||
</div>
|
||||
<div class="content-box-button-text">
|
||||
<a-icon type="history"/>
|
||||
@@ -96,8 +100,16 @@
|
||||
<div class="commentContent-content">
|
||||
{{item.commentContent}}
|
||||
</div>
|
||||
<div class="answer-text" style="margin-bottom: 14px" @click="messageClick(item)">
|
||||
{{$t('answer')}}
|
||||
<div class="answer-text-index"
|
||||
style="margin-bottom: 14px">
|
||||
<span class="answer-text" @click="messageClick(item)">
|
||||
{{$t('answer')}}
|
||||
</span>
|
||||
<span class="answer-text"
|
||||
v-if="administrators || item.createBy == userInfoQuery.username"
|
||||
@click="deleteClick(item)">
|
||||
{{$t('delete')}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="commentContent-text-one" v-for="(val,index1) in item.problemKnowledgeBaseCommentVOList"
|
||||
v-if="item.problemKnowledgeBaseCommentVOList && item.problemKnowledgeBaseCommentVOList.length > 0">
|
||||
@@ -109,8 +121,15 @@
|
||||
<div class="commentContent-content">
|
||||
{{val.commentContent}}
|
||||
</div>
|
||||
<div class="answer-text" @click="messageClick(item)">
|
||||
<div class="answer-text-index">
|
||||
<span class="answer-text" @click="messageClick(item)">
|
||||
{{$t('answer')}}
|
||||
</span>
|
||||
<span class="answer-text"
|
||||
v-if="administrators || val.createBy == userInfoQuery.username"
|
||||
@click="deleteClick(val)">
|
||||
{{$t('delete')}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -158,6 +177,7 @@
|
||||
import SelectedBy from '@/components/SelectedBy/index'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { Base64 } from 'js-base64'
|
||||
import { deleteAction } from '../../../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'problemKnowledgeBaseListView',
|
||||
@@ -167,6 +187,8 @@
|
||||
data() {
|
||||
return {
|
||||
visibleComment: false,
|
||||
administrators: false,
|
||||
userInfoQuery: {},
|
||||
releaseList: [],
|
||||
loading: false,
|
||||
formInline: {},
|
||||
@@ -205,7 +227,15 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.administrators = false
|
||||
this.userInfoQuery = this.userInfo()
|
||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||
this.userInfo().userRoleList.forEach(res => {
|
||||
if (res.roleCode == 'admin') {
|
||||
this.administrators = true
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
@@ -229,6 +259,28 @@
|
||||
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
|
||||
}
|
||||
},
|
||||
deleteClick(item) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
let url = ''
|
||||
if (item.problemKnowledgeBaseId) {
|
||||
url = '/problemKnowledgeBase/problemKnowledgeBaseCommentEO/deleteBatch'
|
||||
} else {
|
||||
url = '/project/problemKnowledgeBaseReplyEO/deleteBatch'
|
||||
}
|
||||
deleteAction(url, { ids: item.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.releaseData()
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
download(item) {
|
||||
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id, userName: this.userInfo().username })
|
||||
},
|
||||
@@ -494,22 +546,22 @@
|
||||
margin-top: 10px;
|
||||
|
||||
.content-box-content-botton-text {
|
||||
max-width: 200px;
|
||||
/*max-width: 200px;*/
|
||||
/*min-width: 120px;*/
|
||||
height: 32px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
line-height: 32px;
|
||||
padding: 0 10px;
|
||||
background: #EFF1F3;
|
||||
/*padding: 0 10px;*/
|
||||
/*background: #EFF1F3;*/
|
||||
border-radius: 4px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
margin-right: 10px;
|
||||
margin-right: 20px;
|
||||
cursor: pointer;
|
||||
|
||||
.file-text {
|
||||
@@ -517,6 +569,7 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
text-decoration: underline;
|
||||
display: inline-block;
|
||||
margin-right: 6px;
|
||||
cursor: pointer;
|
||||
@@ -632,6 +685,10 @@
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.answer-text-index {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.answer-text {
|
||||
display: inline-block;
|
||||
padding: 3px 14px;
|
||||
|
||||
+82
-24
@@ -3,25 +3,49 @@
|
||||
<div class="doc-detail-wrap">
|
||||
<div class="doc-detail-header" style="position: fixed;top: 0">
|
||||
<div class="doc-detail-title">
|
||||
<!-- <span style="line-height: 66px;display: inline-block;float: left" @click="backClick">-->
|
||||
<!-- <a-icon type="arrow-left" style="margin-right: 6px;"/>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span style="line-height: 66px;display: inline-block;float: left" @click="backClick">-->
|
||||
<!-- <a-icon type="arrow-left" style="margin-right: 6px;"/>-->
|
||||
<!-- </span>-->
|
||||
{{$t('managePublishing')}}
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-top: 68px;background: #fff">
|
||||
<div class="detail-content" style="padding: 30px">
|
||||
<div class="search-detail-wrap">
|
||||
<a-form layout="inline" @keyup.enter.native="onSearch">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('searchContent')">
|
||||
<span>{{$t('searchContent')}}</span>
|
||||
<a-form layout="inline" style="width: 1200px;margin: 0 auto" @keyup.enter.native="onSearch">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="10">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('searchContent')">
|
||||
<span>{{$t('searchContent')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('searchContent')"
|
||||
v-model="queryParam.searchStr"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="10">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('releaseStatus')">
|
||||
<span>{{$t('releaseStatus')}}</span>
|
||||
</div>
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('releaseStatus')"
|
||||
v-model="queryParam.releaseStatus">
|
||||
<a-select-option v-for="(item, key) in releaseStatusList"
|
||||
:key="key"
|
||||
:value="item.value">
|
||||
<span class="selectText" :title=" item.name ">
|
||||
{{ item.name}}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<div style="text-align: right">
|
||||
<a-button class="box-button" type="primary" @click="onSearch">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="ResetSearch">{{$t('reset')}}
|
||||
</a-button>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('searchContent')"
|
||||
v-model="searchStr"></a-input>
|
||||
<a-button class="box-button" type="primary" @click="onSearch">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="ResetSearch">{{$t('reset')}}</a-button>
|
||||
</div>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div v-if="conList.length > 0" style="height: calc(100vh - 240px);overflow:auto;">
|
||||
@@ -41,9 +65,14 @@
|
||||
<div class="text-content">
|
||||
{{item.contentOne}}
|
||||
</div>
|
||||
<div class="text-text-right-text-One">
|
||||
{{item.releaseStatus == 'Draft'?$t('draft'):$t('HaveReleased')}}
|
||||
</div>
|
||||
<div class="text-text-right-text">
|
||||
<a style="margin-right: 10px" @click="edit(item)">{{$t('edit')}}</a>
|
||||
<a @click="deleteData(item)">{{$t('delete')}}</a>
|
||||
<a style="margin-right: 10px" @click="edit(item)"
|
||||
v-if="userInfoQuery.username == item.createBy || administrators">{{$t('edit')}}</a>
|
||||
<a @click="deleteData(item)"
|
||||
v-if="userInfoQuery.username == item.createBy || administrators">{{$t('delete')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,10 +112,22 @@
|
||||
conList: [],
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
searchStr: '',
|
||||
queryParam: {},
|
||||
releaseStatusList: [
|
||||
{
|
||||
name: this.$t('draft'),
|
||||
value: 'Draft'
|
||||
},
|
||||
{
|
||||
name: this.$t('HaveReleased'),
|
||||
value: 'Have released'
|
||||
}
|
||||
],
|
||||
loading: false,
|
||||
administrators: false,
|
||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||
pageNo: 1,
|
||||
userInfoQuery: {},
|
||||
url: {
|
||||
getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseEO/page',
|
||||
deleteBatch: '/problemKnowledgeBase/problemKnowledgeBaseEO/deleteBatch'
|
||||
@@ -96,6 +137,15 @@
|
||||
mounted() {
|
||||
this.getList()
|
||||
document.title = this.$t('managePublishing')
|
||||
this.administrators = false
|
||||
this.userInfoQuery = this.userInfo()
|
||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||
this.userInfo().userRoleList.forEach(res => {
|
||||
if (res.roleCode == 'admin') {
|
||||
this.administrators = true
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
@@ -113,20 +163,21 @@
|
||||
this.getList()
|
||||
},
|
||||
ResetSearch() {
|
||||
this.searchStr = ''
|
||||
this.queryParam = {}
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
getText(str) {
|
||||
let words = str.replace(/<[^<>]+>/g, '').replace(/ /gi, '') //这里是去除标签
|
||||
return words.replace(/\s/g, '') //这里是去除空格
|
||||
//.replace(/\s/g, '') //这里是去除空格
|
||||
return words
|
||||
},
|
||||
getList() {
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
createBy: this.userInfo().username,
|
||||
searchStr: this.searchStr
|
||||
...this.queryParam
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.getInfoList, query).then((res) => {
|
||||
@@ -271,11 +322,21 @@
|
||||
|
||||
.text-text-right {
|
||||
padding: 19px 19px;
|
||||
width: calc(100% - 180px);
|
||||
width: calc(100% - 300px);
|
||||
box-sizing: border-box;
|
||||
/*margin-left: 38px;*/
|
||||
}
|
||||
|
||||
.text-text-right-text-One {
|
||||
width: 120px;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
right: 180px;
|
||||
top: 50%;
|
||||
transform: translate-Y(-50%);
|
||||
}
|
||||
|
||||
.text-text-right-text {
|
||||
width: 180px;
|
||||
height: 100%;
|
||||
@@ -351,16 +412,13 @@
|
||||
|
||||
.search-detail-wrap {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
@@ -380,7 +438,7 @@
|
||||
.box-input {
|
||||
/*min-width: 200px;*/
|
||||
display: inline-block;
|
||||
width: 50%;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
margin-right: 16px;
|
||||
|
||||
+54
-15
@@ -44,19 +44,27 @@
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div @click="monthlyTitleTemplateClick" class="operator-text">
|
||||
<div @click="monthlyTitleTemplateClick"
|
||||
v-has="'monthlyReportFilling:titleTemplate'"
|
||||
class="operator-text">
|
||||
<a-icon type="apartment"/>
|
||||
{{$t('monthlyTitleTemplate')}}
|
||||
</div>
|
||||
<div @click="monthlyIntegrationAndExportClick" class="operator-text">
|
||||
<div @click="monthlyIntegrationAndExportClick"
|
||||
v-has="'monthlyReportFilling:integratedExport'"
|
||||
class="operator-text">
|
||||
<a-icon type="import"/>
|
||||
{{$t('monthlyIntegrationAndExport')}}
|
||||
</div>
|
||||
<div @click="addContentClick" class="operator-text">
|
||||
<div @click="addContentClick"
|
||||
v-has="'monthlyReportFilling:adding'"
|
||||
class="operator-text">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('addContent')}}
|
||||
</div>
|
||||
<div @click="BatchDeleteClick" class="operator-text">
|
||||
<div @click="BatchDeleteClick"
|
||||
v-has="'monthlyReportFilling:batchDelete'"
|
||||
class="operator-text">
|
||||
<a-icon type="delete"/>
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
@@ -74,10 +82,28 @@
|
||||
:columns="columns"
|
||||
>
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation" @click="copyClick(record)">{{$t('copy')}}</a>
|
||||
<a class="text-operation" @click="viewClick(record)">{{$t('view')}}</a>
|
||||
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
|
||||
<a class="text-operation" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
||||
<a class="text-operation"
|
||||
v-has="'monthlyReportFilling:copy'"
|
||||
@click="copyClick(record)">
|
||||
{{$t('copy')}}
|
||||
</a>
|
||||
<a class="text-operation"
|
||||
v-has="'monthlyReportFilling:view'"
|
||||
@click="viewClick(record)">
|
||||
{{$t('view')}}
|
||||
</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userData.username || administrators"
|
||||
v-has="'monthlyReportFilling:edit'"
|
||||
@click="edit(record)">
|
||||
{{$t('edit')}}
|
||||
</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userData.username || administrators"
|
||||
v-has="'monthlyReportFilling:delete'"
|
||||
@click="deleteLib(record)">
|
||||
{{$t('deleteLib')}}
|
||||
</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" v-if="dataSource && dataSource.length > 0">
|
||||
@@ -103,6 +129,7 @@
|
||||
import fillTable from './modules/fillTable'
|
||||
import fillAdd from './modules/fillAdd'
|
||||
import moment from 'moment'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'RegulationMonthlyFill',
|
||||
@@ -118,14 +145,14 @@
|
||||
list: '/report/lawsMonthlyReportWriteEO/page',
|
||||
exportData: '/report/lawsMonthlyReportWriteEO/exportMonthlyReport'
|
||||
},
|
||||
exportStatusList:[
|
||||
exportStatusList: [
|
||||
{
|
||||
value:'2',
|
||||
name:this.$t('hasBeenExport')
|
||||
value: '2',
|
||||
name: this.$t('hasBeenExport')
|
||||
},
|
||||
{
|
||||
value:'1',
|
||||
name:this.$t('notExport')
|
||||
value: '1',
|
||||
name: this.$t('notExport')
|
||||
}
|
||||
],
|
||||
loading: false,
|
||||
@@ -192,15 +219,27 @@
|
||||
width: 190,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
]
|
||||
],
|
||||
userData:{},
|
||||
administrators:false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.queryParam.month = moment(new Date()).format('YYYY-MM')
|
||||
this.getList()
|
||||
this.userData = this.userInfo()
|
||||
this.administrators = false
|
||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||
this.userInfo().userRoleList.forEach(res => {
|
||||
if (res.roleCode == 'admin') {
|
||||
this.administrators = true
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
copyClick(row){
|
||||
...mapGetters(['userInfo']),
|
||||
copyClick(row) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmReplication'),
|
||||
|
||||
+14
-3
@@ -22,7 +22,7 @@
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div @click="uploadMonthlyClick" class="operator-text">
|
||||
<div @click="uploadMonthlyClick" v-has="'monthlyReportManagement:upload'" class="operator-text">
|
||||
<a-icon type="cloud-upload"/>
|
||||
{{$t('uploadMonthly')}}
|
||||
</div>
|
||||
@@ -51,14 +51,16 @@
|
||||
</span>
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userData.username"
|
||||
v-has="'monthlyReportManagement:release'"
|
||||
v-if="record.createBy == userData.username || administrators"
|
||||
@click="withdraw(record)">
|
||||
{{record.issueStatus == 2 ? $t('release') : $t('withdraw')}}
|
||||
</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userData.username && record.issueStatus == 2"
|
||||
v-if="(record.createBy == userData.username || administrators) && record.issueStatus == 2"
|
||||
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
||||
<a class="text-operation"
|
||||
v-has="'monthlyReportManagement:download'"
|
||||
v-if="record.createBy == userData.username || record.issueStatus == 1"
|
||||
@click="download(record)">{{$t('download')}}</a>
|
||||
</span>
|
||||
@@ -110,6 +112,7 @@
|
||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
|
||||
userData: {},
|
||||
administrators:false,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('RegulationMonthlyName'),
|
||||
@@ -161,6 +164,14 @@
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.userData = this.userInfo()
|
||||
this.administrators = false
|
||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||
this.userInfo().userRoleList.forEach(res => {
|
||||
if (res.roleCode == 'admin') {
|
||||
this.administrators = true
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
|
||||
+1
-1
@@ -255,7 +255,7 @@
|
||||
<span class="Required" v-if="!disabled">*</span>
|
||||
<span class="title-text-text" :title="$t('regulatoryContact')">{{$t('regulatoryContact')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="lawsContactName">
|
||||
<a-form-model-item class="itemModel-multi" prop="lawsContactName">
|
||||
<PersonnelSelection
|
||||
:query="{db_field_name:'lawsContact',db_field_txt:$t('regulatoryContact')}"
|
||||
:personneQuery="formInline"
|
||||
|
||||
+2
-1
@@ -205,7 +205,8 @@
|
||||
},
|
||||
getText(str) {
|
||||
let words = str.replace(/<[^<>]+>/g, '').replace(/ /gi, '') //这里是去除标签
|
||||
return words.replace(/\s/g, '') //这里是去除空格
|
||||
//.replace(/\s/g, '') //这里是去除空格
|
||||
return words
|
||||
},
|
||||
getList() {
|
||||
let query = {
|
||||
|
||||
@@ -155,6 +155,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<PersonnelSelection :query="item"
|
||||
v-if="visible"
|
||||
:personneQuery="formInline"
|
||||
@change="PersonnelSelectionChange"
|
||||
:disabled="disabled"
|
||||
|
||||
+3
-2
@@ -60,7 +60,7 @@
|
||||
<span style="cursor: pointer"
|
||||
@click="fileClick(resultData.fileNameRight,resultData.fileIdRight)">{{resultData.fileNameRight}}</span>
|
||||
</div>
|
||||
<div class="detail-content-header-content-rightOne">
|
||||
<div class="detail-content-header-content-rightOne" :title="$t('comparisonDifferenceComment')">
|
||||
{{$t('comparisonDifferenceComment')}}
|
||||
</div>
|
||||
<div class="detail-content-header-content-right" v-if="!isDisplay">
|
||||
@@ -162,7 +162,7 @@
|
||||
<span>{{$t('fullTextComments')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" style="width: calc(100% - 113px)" prop="comment">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('fullTextComments')"
|
||||
<a-textarea :placeholder="$t('pleaseEnterfullTextComments')"
|
||||
v-model.trim="formInlineText.comment"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
@@ -494,6 +494,7 @@
|
||||
.operator-text-text {
|
||||
cursor: pointer;
|
||||
margin-right: 53px;
|
||||
max-width: 138px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
|
||||
+10
-6
@@ -91,7 +91,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="Remarks">
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-form-model :model="formInline"
|
||||
class="formAdd" :rules="rules"
|
||||
ref="ruleForm">
|
||||
<div class="box-title-text-Remarks">
|
||||
<div class="title-text-Remarks" :title="$t('comparativeComments')">
|
||||
<span>{{$t('comparativeComments')}}</span>
|
||||
@@ -99,7 +101,7 @@
|
||||
<a-form-model-item class="itemModel" prop="comment">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('comparativeComments')"
|
||||
v-model="formInline.comment"
|
||||
:rows="4"/>
|
||||
:rows="3"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-form-model>
|
||||
@@ -135,7 +137,7 @@
|
||||
<span>{{$t('fullTextComments')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" style="width: calc(100% - 113px)" prop="comment">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('fullTextComments')"
|
||||
<a-textarea :placeholder="$t('PleaseEnter')+' '+$t('fullTextComments')"
|
||||
v-model.trim="formInlineText.comment"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
@@ -536,7 +538,7 @@
|
||||
.detail-content-left {
|
||||
width: 50%;
|
||||
float: left;
|
||||
height: 620px;
|
||||
height: calc(100vh - 210px);
|
||||
border-right: 2px #EFF1F3 solid;
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
@@ -545,7 +547,7 @@
|
||||
|
||||
.detail-content-right {
|
||||
width: 50%;
|
||||
height: 620px;
|
||||
height: calc(100vh - 210px);
|
||||
float: left;
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
@@ -593,6 +595,7 @@
|
||||
.Remarks {
|
||||
margin-top: 20px;
|
||||
width: 50%;
|
||||
display: inline-block;
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@@ -602,7 +605,8 @@
|
||||
}
|
||||
|
||||
.submit-button {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
width: 50%;
|
||||
margin-top: 20px;
|
||||
text-align: right;
|
||||
padding: 0 32px;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="title-text" :title="$t('standard')">
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
<a-input class="box-input" :placeholder="$t('enterStandard')"
|
||||
v-model="queryParam.serialNumber"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="title-text" :title="$t('title')">
|
||||
<span>{{$t('title')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||
<a-input class="box-input" :placeholder="$t('entertitle')"
|
||||
v-model="queryParam.title"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -42,11 +42,11 @@
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div @click="initiatingProcessClick" class="operator-text">
|
||||
<div @click="initiatingProcessClick" v-has="'documentComparison:Initiate'" class="operator-text">
|
||||
<a-icon type="apartment"/>
|
||||
{{$t('initiateComparison')}}
|
||||
</div>
|
||||
<div @click="BatchDelete" class="operator-text">
|
||||
<div @click="BatchDelete" v-has="'documentComparison:batchDelete'" class="operator-text">
|
||||
<a-icon type="delete"/>
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
@@ -67,15 +67,15 @@
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation" @click="comparisonResultsClick(record)">{{$t('comparisonResults')}}</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userInfoQuery.username"
|
||||
v-if="record.createBy == userInfoQuery.username || administrators"
|
||||
@click="subscribe(record)">
|
||||
{{!record.releaseState || record.releaseState == 'draft' ? $t('release') :$t('withdraw')}}
|
||||
</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userInfoQuery.username && record.releaseState == 'draft'"
|
||||
v-if="(record.createBy == userInfoQuery.username || administrators) && record.releaseState == 'draft'"
|
||||
@click="edit(record)">{{$t('edit')}}</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userInfoQuery.username && record.releaseState == 'draft'"
|
||||
v-if="(record.createBy == userInfoQuery.username || administrators) && record.releaseState == 'draft'"
|
||||
@click="deleteData(record)">{{$t('delete')}}</a>
|
||||
</span>
|
||||
<span slot="serialNumberRight" :title="text" slot-scope="text,record">
|
||||
@@ -132,10 +132,11 @@
|
||||
pageNo: 1,
|
||||
queryParam: {},
|
||||
userInfoQuery: {},
|
||||
administrators:false,
|
||||
selectedRowKeysRecord: [],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('standard') + 1,
|
||||
title: this.$t('standard') + ' 1',
|
||||
align: 'center',
|
||||
dataIndex: 'serialNumberLeft',
|
||||
width: 170,
|
||||
@@ -143,7 +144,7 @@
|
||||
scopedSlots: { customRender: 'serialNumberLeft' }
|
||||
},
|
||||
{
|
||||
title: this.$t('title') + 1,
|
||||
title: this.$t('title') + ' 1',
|
||||
align: 'center',
|
||||
dataIndex: 'titleLeft',
|
||||
width: 170,
|
||||
@@ -151,7 +152,7 @@
|
||||
scopedSlots: { customRender: 'serialNumberLeft' }
|
||||
},
|
||||
{
|
||||
title: this.$t('TextStatus') + 1,
|
||||
title: this.$t('TextStatus') + ' 1',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
@@ -166,7 +167,7 @@
|
||||
// scopedSlots: { customRender: 'fileNameLeft' }
|
||||
// },
|
||||
{
|
||||
title: this.$t('standard') + 2,
|
||||
title: this.$t('standard') + ' 2',
|
||||
align: 'center',
|
||||
dataIndex: 'serialNumberRight',
|
||||
ellipsis: true,
|
||||
@@ -174,7 +175,7 @@
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('title') + 2,
|
||||
title: this.$t('title') + ' 2',
|
||||
align: 'center',
|
||||
dataIndex: 'titleRight',
|
||||
scopedSlots: { customRender: 'serialNumberRight' },
|
||||
@@ -182,7 +183,7 @@
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('TextStatus') + 2,
|
||||
title: this.$t('TextStatus') + ' 2',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
@@ -233,6 +234,14 @@
|
||||
this.queryParam = { ...this.queryParam }
|
||||
}
|
||||
this.userInfoQuery = this.userInfo()
|
||||
this.administrators = false
|
||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||
this.userInfo().userRoleList.forEach(res => {
|
||||
if (res.roleCode == 'admin') {
|
||||
this.administrators = true
|
||||
}
|
||||
})
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="title-text" :title="$t('standard')">
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
<j-input class="box-input" :placeholder="$t('enterStandard')"
|
||||
v-model="queryParam.serialNumber"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="title-text" :title="$t('title')">
|
||||
<span>{{$t('title')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||
<j-input class="box-input" :placeholder="$t('entertitle')"
|
||||
v-model="queryParam.title"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -27,7 +27,7 @@
|
||||
<span>{{$t('translationResults')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.translationResult"
|
||||
:placeholder="$t('PleaseSelect')+$t('translationResults')"
|
||||
:placeholder="$t('selectTranslationResults')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode="translation_result"/>
|
||||
</div>
|
||||
@@ -59,15 +59,15 @@
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div @click="uploadClick" class="operator-text">
|
||||
<div @click="uploadClick" v-has="'documentTranslation:upload'" class="operator-text">
|
||||
<a-icon type="cloud-upload"/>
|
||||
{{$t('upload1')}}
|
||||
</div>
|
||||
<div @click="RetrieveFilesClick" class="operator-text">
|
||||
<div @click="RetrieveFilesClick" v-has="'documentTranslation:retrieval'" class="operator-text">
|
||||
<a-icon type="database"/>
|
||||
{{$t('RetrieveFiles')}}
|
||||
</div>
|
||||
<div @click="BatchDelete" class="operator-text">
|
||||
<div @click="BatchDelete" v-has="'documentTranslation:batchDeletion'" class="operator-text">
|
||||
<a-icon type="delete"/>
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
@@ -86,18 +86,22 @@
|
||||
>
|
||||
<!-- -->
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation" @click="viewClick(record)">{{$t('view')}}</a>
|
||||
<a class="text-operation"
|
||||
v-has="'documentTranslation:view'"
|
||||
@click="viewClick(record)">{{$t('view')}}</a>
|
||||
<!-- <a class="text-operation" @click="checkClick(record)">{{$t('check')}}</a>-->
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userInfoQuery.username"
|
||||
v-if="record.createBy == userInfoQuery.username || administrators"
|
||||
@click="subscribe(record)">
|
||||
{{!record.releaseCondition || record.releaseCondition == 'draft' ? $t('release') :$t('withdraw')}}
|
||||
</a>
|
||||
<a class="text-operation"
|
||||
v-has="'documentTranslation:download'"
|
||||
v-if="record.translationResult == 'Translation done'"
|
||||
@click="downloadData(record)">{{$t('download')}}</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userInfoQuery.username && record.releaseCondition == 'draft'"
|
||||
v-has="'documentTranslation:delete'"
|
||||
v-if="(record.createBy == userInfoQuery.username || administrators) && record.releaseCondition == 'draft'"
|
||||
@click="deleteData(record)">{{$t('delete')}}</a>
|
||||
</span>
|
||||
<span slot="standardTitle" slot-scope="text,record" :title="text">
|
||||
@@ -158,6 +162,7 @@
|
||||
queryParam: {},
|
||||
userInfoQuery: {},
|
||||
selectedRowKeysRecord: [],
|
||||
administrators:false,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
@@ -233,6 +238,14 @@
|
||||
}
|
||||
this.getList()
|
||||
this.userInfoQuery = this.userInfo()
|
||||
this.administrators = false
|
||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||
this.userInfo().userRoleList.forEach(res => {
|
||||
if (res.roleCode == 'admin') {
|
||||
this.administrators = true
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="text-left-wrap">
|
||||
<div class="text-left-select">
|
||||
<span class="text-sel" :title="$t('problemClassification')">{{$t('problemClassification')}}</span>
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('problemClassification')"
|
||||
<a-select :placeholder="$t('selectProblemClassification')"
|
||||
class="text-select"
|
||||
mode="multiple"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="text-left-select">
|
||||
<span class="text-sel" :title="$t('market')">{{$t('market')}}</span>
|
||||
<j-multi-select-tag class="text-select" v-model="queryParamOne.target_market"
|
||||
:placeholder="$t('PleaseSelect')+$t('market')"
|
||||
:placeholder="$t('selectMarket')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'region'"/>
|
||||
</div>
|
||||
@@ -176,13 +176,20 @@
|
||||
})
|
||||
},
|
||||
checkedClick(item) {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/problemKnowledgeBaseView',
|
||||
localStorage.setItem('problemknowledgeBase',JSON.stringify(item))
|
||||
this.$router.push({
|
||||
path: '/problemknowledgeBase',
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
// let newUrl = this.$router.resolve({
|
||||
// path: '/problemknowledgeBase',
|
||||
// query: {
|
||||
// id: item.id
|
||||
// }
|
||||
// })
|
||||
// window.open(newUrl.href, '_blank')
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
@@ -222,7 +229,8 @@
|
||||
},
|
||||
getText(str) {
|
||||
let words = str.replace(/<[^<>]+>/g, '').replace(/ /gi, '') //这里是去除标签
|
||||
return words.replace(/\s/g, '') //这里是去除空格
|
||||
//.replace(/\s/g, '') //这里是去除空格
|
||||
return words
|
||||
},
|
||||
getParagraphInfoList() {
|
||||
let queryParamIndex = JSON.parse(JSON.stringify(this.queryParam))
|
||||
|
||||
@@ -201,7 +201,8 @@
|
||||
},
|
||||
getText(str) {
|
||||
let words = str.replace(/<[^<>]+>/g, '').replace(/ /gi, '') //这里是去除标签
|
||||
return words.replace(/\s/g, '') //这里是去除空格
|
||||
//.replace(/\s/g, '') //这里是去除空格
|
||||
return words
|
||||
},
|
||||
getList() {
|
||||
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
v-else-if="active === $t('whole') || active === $t('problemKnowledgeBase')
|
||||
|| active === $t('monthlyReportRegulations')"
|
||||
class="inputSearch"
|
||||
:placeholder="$t('pleaseEnter')+$t('searchContent')"
|
||||
:placeholder="$t('enterSearchContent')"
|
||||
></a-input>
|
||||
<a-button class="textSearch"
|
||||
v-if="active === $t('DocumentLibrary')"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('file')">{{$t('file')}}</span>
|
||||
:title="$t('fileName')">{{$t('fileName')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="fileKey">
|
||||
<a-button type="primary" class="button-text"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -99,6 +99,7 @@
|
||||
<PersonnelSelection
|
||||
:query="{db_field_name:'userId',db_field_txt:$t('engineer')}"
|
||||
:personneQuery="formInline"
|
||||
v-if="visible"
|
||||
:distributionEngineerList="distributionEngineerList"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="formInline.userIdName"/>
|
||||
|
||||
@@ -93,10 +93,11 @@
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('StudioEngineer')">{{$t('StudioEngineer')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="'studioEngineerName'">
|
||||
<a-form-model-item class="itemModel-multi" :prop="'studioEngineerName'">
|
||||
<PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('StudioEngineer')}"
|
||||
:isSingleChoice="true"
|
||||
:personneQuery="formInline"
|
||||
v-if="visible"
|
||||
@change="PersonnelSelectionChange"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.studioEngineerName"/>
|
||||
@@ -108,10 +109,11 @@
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="'certificationEngineerName'">
|
||||
<a-form-model-item class="itemModel-multi" :prop="'certificationEngineerName'">
|
||||
<PersonnelSelection
|
||||
:query="{db_field_name:'certificationEngineer',db_field_txt:$t('certifiedEngineer')}"
|
||||
:personneQuery="formInline"
|
||||
v-if="visible"
|
||||
@change="PersonnelSelectionChange"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.certificationEngineerName"/>
|
||||
|
||||
@@ -176,8 +176,9 @@
|
||||
<span class="title-text-text" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
|
||||
</div>
|
||||
<!-- :prop="'lawEngineerName'"-->
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-form-model-item class="itemModel-multi">
|
||||
<PersonnelSelection
|
||||
v-if="editVisible"
|
||||
:query="{db_field_name:'lawEngineer',db_field_txt:$t('regulatoryEngineer')}"
|
||||
:personneQuery="formInline"
|
||||
:isDelete='true'
|
||||
@@ -196,8 +197,9 @@
|
||||
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
|
||||
</div>
|
||||
<!-- :prop="'engineeringInterfacePersonName'"-->
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-form-model-item class="itemModel-multi">
|
||||
<PersonnelSelection
|
||||
v-if="editVisible"
|
||||
:query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
|
||||
:personneQuery="formInline"
|
||||
:isDelete='true'
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<PersonnelSelection
|
||||
:query="{db_field_name:'lawEngineer',db_field_txt:$t('regulatoryEngineer')}"
|
||||
:personneQuery="formInline"
|
||||
v-if="visible"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="formInline.lawEngineerName"/>
|
||||
</a-form-model-item>
|
||||
@@ -36,6 +37,7 @@
|
||||
<PersonnelSelection
|
||||
:query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
|
||||
:personneQuery="formInline"
|
||||
v-if="visible"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="formInline.engineeringInterfacePersonName"/>
|
||||
</a-form-model-item>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<a-col :span='9'>
|
||||
<a-form-model-item class="itemAddAdmin" :label="$t('title')" prop='title'>
|
||||
<a-input style='width: 420px'
|
||||
class='box-input'
|
||||
:placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model='formData.title'/>
|
||||
</a-form-model-item>
|
||||
@@ -24,7 +25,7 @@
|
||||
</a-row>
|
||||
<a-row :gutter='24'>
|
||||
<a-col :span='9'>
|
||||
<div class="box-title-text" style="margin-left: -58px;">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text" :title="$t('zoneOfApplication')">{{$t('zoneOfApplication')}}</span>
|
||||
@@ -34,9 +35,9 @@
|
||||
<!-- :disabled="disabled"-->
|
||||
<!-- v-model="formInline[item.db_field_name]"-->
|
||||
<!-- :placeholder="$t('PleaseEnter')+item.db_field_txt"/>-->
|
||||
<!-- <a-input-->
|
||||
<!-- :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"-->
|
||||
<!-- v-model='form.paramsTemplateName'/>-->
|
||||
<!-- <a-input-->
|
||||
<!-- :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"-->
|
||||
<!-- v-model='form.paramsTemplateName'/>-->
|
||||
<j-dict-select-tag class='box-input' v-model='form.region'
|
||||
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
|
||||
:type="'select'"
|
||||
@@ -44,14 +45,14 @@
|
||||
:triggerChange='false' :dictCode="'region'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- <a-form-model-item ref='region' :label="$t('zoneOfApplication')" prop='region'>-->
|
||||
<!-- <a-form-model-item class='itemModel' prop='region'>-->
|
||||
<!-- <j-dict-select-tag class='box-input' v-model='form.region'-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange='false' :dictCode="'region'"/>-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- <a-form-model-item ref='region' :label="$t('zoneOfApplication')" prop='region'>-->
|
||||
<!-- <a-form-model-item class='itemModel' prop='region'>-->
|
||||
<!-- <j-dict-select-tag class='box-input' v-model='form.region'-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange='false' :dictCode="'region'"/>-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-form-model-item>-->
|
||||
</a-col>
|
||||
<a-col :span='9'>
|
||||
<div class="box-title-text">
|
||||
@@ -65,16 +66,17 @@
|
||||
<!-- v-model="formInline[item.db_field_name]"-->
|
||||
<!-- :placeholder="$t('PleaseEnter')+item.db_field_txt"/>-->
|
||||
<a-input
|
||||
class='box-input'
|
||||
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"
|
||||
:title="$t('PleaseSelect')+$t('parameterTemplate')"
|
||||
v-model='form.paramsTemplateName'/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- <a-form-model-item ref='paramsTemplateName' :label="$t('parameterTemplate')" prop='paramsTemplateName'>-->
|
||||
<!-- <a-input-->
|
||||
<!-- :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"-->
|
||||
<!-- v-model='form.paramsTemplateName'/>-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- <a-form-model-item ref='paramsTemplateName' :label="$t('parameterTemplate')" prop='paramsTemplateName'>-->
|
||||
<!-- <a-input-->
|
||||
<!-- :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"-->
|
||||
<!-- v-model='form.paramsTemplateName'/>-->
|
||||
<!-- </a-form-model-item>-->
|
||||
</a-col>
|
||||
<a-col :span='6' style='margin-top: 5px'>
|
||||
<a-button class='box-button' type='primary' @click='searchQuery'>{{ $t('query') }}</a-button>
|
||||
@@ -92,7 +94,7 @@
|
||||
:dataSource='areaTable'
|
||||
:pagination='false'
|
||||
:loading='loading'
|
||||
:scroll='{x: 600}'
|
||||
:scroll='{x: 600,y:300}'
|
||||
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
|
||||
@change='handleTableChange'>
|
||||
</a-table>
|
||||
@@ -376,13 +378,14 @@
|
||||
|
||||
.drawer-bootom-button {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
@@ -390,7 +393,7 @@
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 114px;
|
||||
width: 85px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
@@ -410,7 +413,7 @@
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
width: calc(100% - 101px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
height: 40px;
|
||||
@@ -466,6 +469,10 @@
|
||||
line-height: 6px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.area-module {
|
||||
@@ -481,7 +488,7 @@
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.itemAddAdmin .ant-form-item-control-wrapper .has-error .ant-form-explain {
|
||||
white-space: nowrap!important;
|
||||
.itemAddAdmin .ant-form-item-control-wrapper .has-error .ant-form-explain {
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
</style>
|
||||
@@ -65,7 +65,9 @@
|
||||
</div>
|
||||
<div class="table-operator" style="overflow:hidden;margin-bottom: 20px">
|
||||
<div style="float: right;margin-bottom: 0px;margin-left: 20px">
|
||||
<div class="operator-text" @click="deriveconformanceresults()">
|
||||
<div class="operator-text"
|
||||
v-has="'complianceKanban:export'"
|
||||
@click="deriveconformanceresults()">
|
||||
<a-icon type="solution"/>
|
||||
{{ $t('Deriveconformanceresults') }}
|
||||
</div>
|
||||
@@ -96,7 +98,7 @@
|
||||
<!-- {{ text && text.length > 15 ? text.slice(0, 14) + '...' : text }}-->
|
||||
<!-- </span>-->
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation" @click="handlecody(record)">{{$t('view')}}</a>
|
||||
<a class="text-operation" v-has="'complianceKanban:view'" @click="handlecody(record)">{{$t('view')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
|
||||
@@ -8,11 +8,14 @@
|
||||
:url="url"/>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div @click="handleCompare" class="operator-text">
|
||||
<div @click="handleCompare" v-has="'regulatoryEarlyWarning:push'"
|
||||
class="operator-text">
|
||||
<a-icon type="rocket" :rotate="45"/>
|
||||
{{$t('Push')}}
|
||||
</div>
|
||||
<div @click="handleExport" class="operator-text">
|
||||
<div @click="handleExport"
|
||||
v-has="'regulatoryEarlyWarning:export'"
|
||||
class="operator-text">
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
{{$t('export')}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user