合并分支 'dev_third_stage' 到 'master'
Dev third stage 查看合并请求 laws-nio/laws-weilai!161
This commit is contained in:
@@ -966,3 +966,11 @@ ADD COLUMN `related_areas_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4
|
||||
ADD COLUMN `source_cn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源中文' AFTER `related_areas_en`,
|
||||
ADD COLUMN `time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期' AFTER `source_cn`,
|
||||
ADD COLUMN `source_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源英文' AFTER `time`;
|
||||
|
||||
|
||||
-- 法规技术评估 条款项评估结果表增加字段。 2022-08-26
|
||||
ALTER TABLE `laws_weilai`.`laws_technology_evaluation_item_result`
|
||||
ADD COLUMN `feedback_time` datetime NULL COMMENT '反馈时间' AFTER `laws_technology_evaluation_id`;
|
||||
|
||||
-- 表字段 英文修改 2022-08-31
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Sort Number' WHERE `id` = '1529373706885799937';
|
||||
+2
-2
@@ -8,8 +8,8 @@ package com.jero.modules.document.enums;
|
||||
public enum SearchEnum {
|
||||
INDEX_NAME_DOCUMENT("文档库索引名称","documentLibrary"),
|
||||
TYPE_NAME_DOCUMENT("文档库类型","document"),
|
||||
INDEX_NAME_LAWS_MONTHLY_REPORT("法规月报索引名称","lawsMonthlyReportManage"),
|
||||
TYPE_NAME_LAWS_MONTHLY_REPORT("法规月报类型名称","lawsMonthlyReport"),
|
||||
INDEX_NAME_LAWS_MONTHLY_REPORT("法规月报索引名称","lawsmonthlyreportmanage"),
|
||||
TYPE_NAME_LAWS_MONTHLY_REPORT("法规月报类型名称","lawsmonthlyreport"),
|
||||
FULL_TEXT_SEARCH("全部中文","fulltextsearchcn"),
|
||||
FULL_TEXT_SEARCH_CN("全部中文","fulltextsearchcn"),
|
||||
FULL_TEXT_SEARCH_EN("全部英文","fulltextsearchen"),
|
||||
|
||||
+5
@@ -135,6 +135,11 @@ public class LawsTechnologyEvaluationItemResultEO implements Serializable {
|
||||
@ApiModelProperty(value = "发起人反馈")
|
||||
private java.lang.String sponsorFeedback;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "反馈时间")
|
||||
private java.util.Date feedbackTime;
|
||||
|
||||
/**法规技术评估表id*/
|
||||
@ApiModelProperty(value = "法规技术评估表id")
|
||||
private java.lang.String lawsTechnologyEvaluationId;
|
||||
|
||||
+38
@@ -1,18 +1,25 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCollectEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseCollectEOService;
|
||||
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.problemKnowledgeBase.service.IProblemKnowledgeBaseEOService;
|
||||
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.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -35,6 +42,8 @@ import com.jero.common.aspect.annotation.AutoLog;
|
||||
public class ProblemKnowledgeBaseCollectEOController extends JeroController<ProblemKnowledgeBaseCollectEO, IProblemKnowledgeBaseCollectEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseCollectEOService problemKnowledgeBaseCollectEOService;
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseEOService problemKnowledgeBaseEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@@ -167,4 +176,33 @@ public class ProblemKnowledgeBaseCollectEOController extends JeroController<Prob
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseCollectEO.class);
|
||||
}
|
||||
|
||||
@AutoLog(value = "我的收藏-分页列表查询-问题知识库")
|
||||
@ApiOperation(value="我的收藏-分页列表查询-问题知识库", notes="我的收藏-分页列表查询-问题知识库")
|
||||
@GetMapping(value = "/queryCollectPageList")
|
||||
public Result<?> queryCollectPageList(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
this.problemKnowledgeBaseEOService.createQueryPermission(queryWrapper,problemKnowledgeBaseEO);
|
||||
Page<ProblemKnowledgeBaseEO> page = new Page<ProblemKnowledgeBaseEO>(pageNo, pageSize);
|
||||
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
QueryWrapper<ProblemKnowledgeBaseCollectEO> collectEOQueryWrapper = new QueryWrapper<>();
|
||||
collectEOQueryWrapper.lambda().eq(ProblemKnowledgeBaseCollectEO::getCollectUserId,currentUser.getId());
|
||||
List<ProblemKnowledgeBaseCollectEO> collectEOList = this.problemKnowledgeBaseCollectEOService.list(collectEOQueryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(collectEOList)){
|
||||
List<String> problemKnowledgeBaseIdList = collectEOList.stream().map(ProblemKnowledgeBaseCollectEO::getProblemKnowledgeBaseId).distinct().collect(Collectors.toList());
|
||||
|
||||
queryWrapper.lambda().in(ProblemKnowledgeBaseEO::getId,problemKnowledgeBaseIdList);
|
||||
IPage<ProblemKnowledgeBaseEO> pageList = this.problemKnowledgeBaseEOService.page(page, queryWrapper);
|
||||
this.problemKnowledgeBaseEOService.disposeData(pageList.getRecords(),problemKnowledgeBaseEO.getCut());
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
return Result.OK();
|
||||
}
|
||||
}
|
||||
|
||||
+9
@@ -4,6 +4,8 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
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.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
@@ -172,4 +174,11 @@ public class ProblemKnowledgeBaseEOController extends JeroController<ProblemKnow
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseEO.class);
|
||||
}
|
||||
|
||||
@AutoLog(value = "问题知识库表-转发")
|
||||
@ApiOperation(value="问题知识库表-转发", notes="问题知识库表-转发")
|
||||
@PostMapping(value = "/forward")
|
||||
public Result<?> forward(@RequestBody JSONObject json) {
|
||||
return this.problemKnowledgeBaseEOService.forward(json);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+9
@@ -1,6 +1,8 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
@@ -75,4 +77,11 @@ public interface IProblemKnowledgeBaseEOService extends IService<ProblemKnowledg
|
||||
* @param queryWrapper
|
||||
*/
|
||||
void createQueryPermission(QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper,ProblemKnowledgeBaseEO problemKnowledgeBaseEO);
|
||||
|
||||
/**
|
||||
* 转发
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
Result<?> forward(JSONObject json);
|
||||
}
|
||||
|
||||
+147
-12
@@ -4,14 +4,21 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.constant.WebsocketConst;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.es.JeroElasticsearchTemplate;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.document.enums.SearchEnum;
|
||||
import com.jero.modules.document.utils.ReadPdfUtil;
|
||||
import com.jero.modules.document.utils.ReadWordUtil;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.message.websocket.WebSocket;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.*;
|
||||
@@ -20,16 +27,24 @@ import com.jero.modules.problemKnowledgeBase.enums.PraiseStatusEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.ShowPermissionsEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.*;
|
||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
||||
import com.jero.modules.searchcenter.enums.ModuleTypeFlagEnum;
|
||||
import com.jero.modules.system.entity.SysAnnouncement;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.enums.DicCodeEnum;
|
||||
import com.jero.modules.system.service.ISysAnnouncementService;
|
||||
import com.jero.modules.system.service.ISysDepartService;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -37,6 +52,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
@@ -67,10 +83,23 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
private JeroElasticsearchTemplate jeroElasticsearchTemplate;
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
@Resource
|
||||
private WebSocket webSocket;
|
||||
@Autowired
|
||||
private ISysAnnouncementService sysAnnouncementService;
|
||||
@Resource
|
||||
private IFeishuService iFeishuService;
|
||||
@Autowired
|
||||
private ISysDepartService sysDepartService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
|
||||
public static final String SEARCH_FLAG = "魑";
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -100,7 +129,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
* @param problemKnowledgeBaseEO
|
||||
*/
|
||||
public void addOrUpdateElasticsearch(ProblemKnowledgeBaseEO problemKnowledgeBaseEO){
|
||||
String problemKnowledgeBaseId = problemKnowledgeBaseEO.getId();
|
||||
/*String problemKnowledgeBaseId = problemKnowledgeBaseEO.getId();
|
||||
|
||||
List<Map<String, Object>> mapListTempCn = new ArrayList<>();
|
||||
List<Map<String, Object>> mapListTempEn = new ArrayList<>();
|
||||
@@ -194,7 +223,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("问题知识库添加es失败");
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -202,7 +231,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
* @param problemKnowledgeBaseId
|
||||
*/
|
||||
public void deleteElasticsearchData(String problemKnowledgeBaseId){
|
||||
try {
|
||||
/*try {
|
||||
//根据id删除全部索引中数据
|
||||
this.jeroElasticsearchTemplate.delete(SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), problemKnowledgeBaseId);
|
||||
this.jeroElasticsearchTemplate.delete(SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), problemKnowledgeBaseId);
|
||||
@@ -217,12 +246,12 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
log.error("问题知识库根据id删除es数据失败,问题知识库id为:" + problemKnowledgeBaseId);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
public void esFullText(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,StringBuilder sbCn,StringBuilder sbEn,String cut,String fileText,List<DictModel> targetMarketList){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions())){
|
||||
/*if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions())){
|
||||
String textByValue = ShowPermissionsEnum.getTextByValue(problemKnowledgeBaseEO.getShowPermissions(), cut);
|
||||
sbCn.append("展示权限" + ":" + textByValue + " ");
|
||||
}else {
|
||||
@@ -233,7 +262,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
sbCn.append("标题" + ":" + problemKnowledgeBaseEO.getTitle() + " ");
|
||||
}else {
|
||||
sbCn.append("标题" + ":" + "-- ");
|
||||
}
|
||||
}*/
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getProblemTypeName())){
|
||||
sbCn.append("问题分类" + ":" + problemKnowledgeBaseEO.getProblemTypeName() + " ");
|
||||
@@ -272,10 +301,10 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){
|
||||
sbCn.append("</br>");
|
||||
sbCn.append("内容" + ":" + problemKnowledgeBaseEO.getContent() + " ");
|
||||
sbCn.append("正文" + ":" + problemKnowledgeBaseEO.getContent() + " ");
|
||||
}else {
|
||||
sbCn.append("</br>");
|
||||
sbCn.append("内容" + ":" + "-- ");
|
||||
sbCn.append("正文" + ":" + "-- ");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(fileText)){
|
||||
@@ -285,7 +314,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
}
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions())){
|
||||
/*if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions())){
|
||||
String textByValue = ShowPermissionsEnum.getTextByValue(problemKnowledgeBaseEO.getShowPermissions(), cut);
|
||||
sbEn.append("Display permission" + ":" + textByValue + " ");
|
||||
}else {
|
||||
@@ -296,7 +325,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
sbEn.append("Title" + ":" + problemKnowledgeBaseEO.getTitle() + " ");
|
||||
}else {
|
||||
sbEn.append("Title" + ":" + "-- ");
|
||||
}
|
||||
}*/
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getProblemTypeName())){
|
||||
sbEn.append("Problem classification" + ":" + problemKnowledgeBaseEO.getProblemTypeName() + " ");
|
||||
@@ -335,10 +364,10 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){
|
||||
sbEn.append("</br>");
|
||||
sbEn.append("Content" + ":" + problemKnowledgeBaseEO.getContent() + " ");
|
||||
sbEn.append("Text" + ":" + problemKnowledgeBaseEO.getContent() + " ");
|
||||
}else {
|
||||
sbEn.append("</br>");
|
||||
sbEn.append("Content" + ":" + "-- ");
|
||||
sbEn.append("Text" + ":" + "-- ");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(fileText)){
|
||||
@@ -724,4 +753,110 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> forward(JSONObject json) {
|
||||
String cut = json.getString("cut");
|
||||
|
||||
String userIds = json.getString("userIds");
|
||||
String departIds = json.getString("departIds");
|
||||
if(StringUtils.isEmpty(userIds) && StringUtils.isNotEmpty(departIds)){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
throw new JeroBootException("至少选择一个人或部门进行转发!");
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
throw new JeroBootException("Select at least one person or department to forward!");
|
||||
}
|
||||
}
|
||||
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
List<SysUser> userList = new ArrayList<>();
|
||||
|
||||
Set<String> allDepartIds = new HashSet<>();
|
||||
if(StringUtils.isNotEmpty(departIds)){
|
||||
String[] departIdArr = departIds.split(",");
|
||||
for (String departId : departIdArr) {
|
||||
List<String> subDepIdsByDepId = this.sysDepartService.getSubDepIdsByDepId(departId);
|
||||
allDepartIds.addAll(subDepIdsByDepId);
|
||||
}
|
||||
|
||||
//查询部门下的人员
|
||||
if(allDepartIds.size() != 0){
|
||||
List<SysUser> userListByDepIds = this.sysUserService.getUserListByDepIds(new ArrayList<>(allDepartIds));
|
||||
userList.addAll(userListByDepIds);
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(userIds)){
|
||||
List<SysUser> sysUsers = this.sysUserService.querySysUserListByIdList(Arrays.asList(userIds.split(",")));
|
||||
userList.addAll(sysUsers);
|
||||
}
|
||||
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if (userList.size() != 0) {
|
||||
userIdList.addAll(userList.stream().map(SysUser::getId).distinct().collect(Collectors.toList()));
|
||||
thirdIdList.addAll(userList.stream().map(SysUser::getThirdId).distinct().collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
//String msgType = json.getString("msgType");
|
||||
String problemKnowledgeBaseId = json.getString("problemKnowledgeBaseId");
|
||||
//问题知识库标题
|
||||
String problemKnowledgeBaseTitle = json.getString("problemKnowledgeBaseTitle");
|
||||
|
||||
//XXX向您推送了XXXXXXXXXX,请注意查看。
|
||||
String msgContentEN = currentUser.getUsername()+" pushed " + problemKnowledgeBaseTitle + " to you.Please be reminded to check it out.";
|
||||
String msgTitle = problemKnowledgeBaseTitle + " has been shared with you, please check.";
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.PROBLEM_KNOWLEDGE_BASE_DETAIL.getLink() + "?id=" + problemKnowledgeBaseId;
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.PROBLEM_KNOWLEDGE_BASE_DETAIL.getLink()+ "?id="
|
||||
+ problemKnowledgeBaseId
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, msgContentEN, contentInfo,MessageTypeEnum.PUSH.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
this.sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
this.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
||||
//飞书
|
||||
try {
|
||||
this.iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContentEN, MessageTypeEnum.PUSH.getName(), hrefFeishu);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书推送失败");
|
||||
}
|
||||
this.sendWebsocket(problemKnowledgeBaseId, contentInfo);
|
||||
return Result.OK("转发成功!");
|
||||
}
|
||||
|
||||
public void sendWebsocket(String msgId, String msgTet) {
|
||||
JSONObject obj = new JSONObject();
|
||||
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
||||
obj.put(WebsocketConst.MSG_ID, msgId);
|
||||
obj.put(WebsocketConst.MSG_TXT, msgTet);
|
||||
webSocket.sendMessage(obj.toJSONString());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public SysAnnouncement getSysAnnouncement(List<String> userIdList,
|
||||
String title,
|
||||
String content,
|
||||
String contentInfo,
|
||||
String messageType,
|
||||
String initiator) {
|
||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||
sysAnnouncement.setInitiator(initiator);
|
||||
sysAnnouncement.setDelFlag("0");
|
||||
sysAnnouncement.setSendStatus("0");
|
||||
sysAnnouncement.setSendTime(new Date());
|
||||
sysAnnouncement.setMsgCategory(messageType);//消息类型
|
||||
sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
|
||||
sysAnnouncement.setTitile(title);
|
||||
sysAnnouncement.setMsgContent(content);
|
||||
sysAnnouncement.setMsgContentInfo(contentInfo);
|
||||
sysAnnouncement.setUserIds(StringUtils.join(userIdList, ","));
|
||||
return sysAnnouncement;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-2
@@ -387,8 +387,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
projectLawsInventoryLogEOService.updateLog(contentLog, projectLawsInventoryEO.getProjectLibraryId(),CutEnum.CN.getValue());
|
||||
projectLawsInventoryLogEOService.updateLog(enContentLog, projectLawsInventoryEO.getProjectLibraryId(),CutEnum.EN.getValue());
|
||||
}
|
||||
//项目任务清单数据初始化。
|
||||
this.projectTaskInventoryEOService.saveBatch(projectTaskInventoryEOList);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(projectTaskInventoryEOList)){
|
||||
//项目任务清单数据初始化。
|
||||
this.projectTaskInventoryEOService.saveBatch(projectTaskInventoryEOList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4827,6 +4830,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String projectTaskInventoryId = UUID.randomUUID().toString().replace("-", "");
|
||||
projectTaskInventoryEO.setId(projectTaskInventoryId);
|
||||
projectTaskInventoryEO.setProjectLawsInventoryId(projectLawsInventoryEO.getId());
|
||||
projectLawsInventoryEO.setStandId(projectLawsInventoryEO.getStandId());
|
||||
projectTaskInventoryEOList.add(projectTaskInventoryEO);
|
||||
}
|
||||
this.projectTaskInventoryEOService.saveBatch(projectTaskInventoryEOList);
|
||||
|
||||
+8
-9
@@ -146,7 +146,7 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
this.updateById(lawsMonthlyReportManageEO);
|
||||
|
||||
// 同步es
|
||||
syncElasticsearch(id, issueStatus, issueTime);
|
||||
// syncElasticsearch(id, issueStatus, issueTime);
|
||||
}
|
||||
|
||||
private void syncElasticsearch(String id, String issueStatus, Date issueTime) {
|
||||
@@ -191,20 +191,20 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
List<Map<String, Object>> mapListTempEn = new ArrayList<>();
|
||||
//文件相关封装中文的全文内容(es) 非搜索条件下的:flag---SEARCH_FLAG
|
||||
putMap(id, "法规月报",
|
||||
fileText, monthlyReportManageEO.getName(), fileText,
|
||||
fileText, monthlyReportManageEO.getName(),
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCn, SEARCH_FLAG);
|
||||
//文件相关封装英文的全文内容(es) 搜索条件下的: flag---null
|
||||
//文件相关封装英文的全文内容(es)
|
||||
putMap(id, "monthly report",
|
||||
fileText, monthlyReportManageEO.getName(), fileText,
|
||||
fileText, monthlyReportManageEO.getName(),
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEn, SEARCH_FLAG);
|
||||
|
||||
//文件相关封装中文的全文内容(es)
|
||||
//文件相关封装中文的全文内容(es) 搜索条件下的: flag---null
|
||||
putMap(id + monthlyReportManageEO.getFileId(), "法规月报",
|
||||
fileText, monthlyReportManageEO.getName(), fileText,
|
||||
fileText, monthlyReportManageEO.getName(),
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCnForSearch, null);
|
||||
//文件相关封装英文的全文内容(es)
|
||||
putMap(id + monthlyReportManageEO.getFileId(), "monthly report",
|
||||
fileText, monthlyReportManageEO.getName(), fileText,
|
||||
fileText, monthlyReportManageEO.getName(),
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEnForSearch, null);
|
||||
|
||||
mapListTempCn.add(stringMapCn);
|
||||
@@ -247,7 +247,7 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
}
|
||||
}
|
||||
private void putMap(String id, String moduleType,
|
||||
String content, String title , String fileText,
|
||||
String content, String title ,
|
||||
String fileName, String fileId, Date issueTime, String cut,
|
||||
Map<String, Object> stringMap,
|
||||
String flag){
|
||||
@@ -256,7 +256,6 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
stringMap.put("module_type_flag", ModuleTypeFlagEnum.LAWS_MONTHLY_REPORT.getValue()); // 默认法规月报标识
|
||||
stringMap.put("content", content);
|
||||
stringMap.put("title", title);
|
||||
stringMap.put("file_text", fileText);
|
||||
stringMap.put("file_name", fileName);
|
||||
stringMap.put("file_id", fileId);
|
||||
stringMap.put("create_time", issueTime);
|
||||
|
||||
+22
-11
@@ -647,8 +647,10 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}
|
||||
String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "年") + "月";
|
||||
//单独设置每页右侧的时间
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18, false, false, "Blue Sky Noto Regular");
|
||||
WordUtil.exportWord(document, content, null, ParagraphAlignment.LEFT, 0, 12, false, true, "Blue Sky Noto Regular");
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18,
|
||||
false, false, "Blue Sky Noto Regular",null);
|
||||
WordUtil.exportWord(document, content, null, ParagraphAlignment.LEFT, 0, 12,
|
||||
false, true, "Blue Sky Noto Regular",null);
|
||||
//生成页脚
|
||||
WordUtil.exportHeardAndFootMain(document,moth);
|
||||
int oneCount = 1;
|
||||
@@ -664,7 +666,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
oneTitle = lawsMonthlyReportTitleTemplateEO.getTitleEn();
|
||||
}
|
||||
if(StringUtils.isNotBlank(oneTitle)){
|
||||
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT, 0, 12, false, true, "Blue Sky Noto Regular");
|
||||
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT,
|
||||
0, 12, false, true, "Blue Sky Noto Regular",null);
|
||||
oneCount++;
|
||||
}
|
||||
|
||||
@@ -686,7 +689,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
twoTitle = monthlyReportTitleTemplateEO.getTitleEn();
|
||||
}
|
||||
if(StringUtils.isNotBlank(twoTitle)){
|
||||
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT, 2, 12, false, true, "Blue Sky Noto Regular");
|
||||
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT,
|
||||
2, 12, false, true, "Blue Sky Noto Regular",null);
|
||||
twoCount++;
|
||||
}
|
||||
|
||||
@@ -699,7 +703,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
reportTitle = lawsMonthlyReportWriteEO.getTitleEn();
|
||||
}
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(reportTitle)){
|
||||
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT, 6, 12, false, false, "Blue Sky Noto Regular");
|
||||
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT,
|
||||
6, 12, false, false, "Blue Sky Noto Regular",null);
|
||||
reportCount++;
|
||||
}
|
||||
}
|
||||
@@ -722,7 +727,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
//生成页眉页脚
|
||||
WordUtil.exportHeardAndFoot(document,moth);
|
||||
//生成标题
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18, false, true, "Blue Sky Noto Regular");
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18,
|
||||
false, true, "Blue Sky Noto Regular",null);
|
||||
int oneCount = 1;
|
||||
|
||||
for (LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO : reportTitleOneList) {
|
||||
@@ -736,7 +742,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
oneTitle = lawsMonthlyReportTitleTemplateEO.getTitleEn();
|
||||
}
|
||||
if(StringUtils.isNotBlank(oneTitle)){
|
||||
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT, 0, 14, false, true, "Blue Sky Noto Regular");
|
||||
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT,
|
||||
0, 14, false, true, "Blue Sky Noto Regular","1");
|
||||
oneCount++;
|
||||
}
|
||||
|
||||
@@ -758,7 +765,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
twoTitle = monthlyReportTitleTemplateEO.getTitleEn();
|
||||
}
|
||||
if(StringUtils.isNotBlank(twoTitle)){
|
||||
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT, 2, 12, false, true, "Blue Sky Noto Regular");
|
||||
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT,
|
||||
2, 12, false, true, "Blue Sky Noto Regular","2");
|
||||
twoCount++;
|
||||
}
|
||||
//二级目录下放--->新征求意见清单模板, 新发布标准清单模板
|
||||
@@ -766,12 +774,14 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
List<LawsMonthlyReportWriteEO> issueList = lawsMonthlyReportWriteEOList.stream().filter(e -> ContentTemplateEnum.NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE.getValue().equals(e.getContentTemplate())).collect(Collectors.toList());
|
||||
for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : askList) {
|
||||
WordUtil.exportWordExcelAsk(document,lawsMonthlyReportWriteEO,cut);
|
||||
WordUtil.exportWord(document, null, null, null, 0, 0, false, true, null);
|
||||
WordUtil.exportWord(document, null, null, null,
|
||||
0, 0, false, true, null,null);
|
||||
}
|
||||
|
||||
for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : issueList) {
|
||||
WordUtil.exportWordExcelIssue(document,lawsMonthlyReportWriteEO,cut);
|
||||
WordUtil.exportWord(document, null, null, null, 0, 0, false, true, null);
|
||||
WordUtil.exportWord(document, null, null, null, 0, 0,
|
||||
false, true, null,null);
|
||||
}
|
||||
|
||||
for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : lawsMonthlyReportWriteEOList) {
|
||||
@@ -783,7 +793,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
reportTitle = lawsMonthlyReportWriteEO.getTitleEn();
|
||||
}
|
||||
if(StringUtils.isNotBlank(reportTitle)){
|
||||
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT, 6, 11, false, false, "Blue Sky Noto Regular");
|
||||
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT,
|
||||
6, 11, false, false, "Blue Sky Noto Regular","3");
|
||||
}
|
||||
|
||||
|
||||
|
||||
+27
-4
@@ -23,7 +23,6 @@ import org.apache.poi.xwpf.usermodel.XWPFPicture;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFPictureData;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFRun;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTable;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTableRow;
|
||||
import org.apache.xmlbeans.impl.xb.xmlschema.SpaceAttribute;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFldChar;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTJc;
|
||||
@@ -56,6 +55,7 @@ public class WordUtil {
|
||||
* @param isNewline 是否换行,换行后文本失效
|
||||
* @param isBold 是否加粗,默认不加粗
|
||||
* @param fontFamily 字体,默认宋体
|
||||
* @param directoryLevel 目录级别
|
||||
*/
|
||||
public static void exportWord(XWPFDocument document,
|
||||
String text,
|
||||
@@ -65,12 +65,15 @@ public class WordUtil {
|
||||
Integer fontSize,
|
||||
Boolean isNewline,
|
||||
Boolean isBold,
|
||||
String fontFamily) {
|
||||
|
||||
document.createParagraph();
|
||||
String fontFamily,String directoryLevel) {
|
||||
|
||||
//添加标题
|
||||
XWPFParagraph titleParagraph = document.createParagraph();
|
||||
if(StringUtils.isNotEmpty(directoryLevel)){
|
||||
titleParagraph.setStyle(directoryLevel);
|
||||
}
|
||||
|
||||
|
||||
//设置段落左对齐
|
||||
if (align == null) {
|
||||
titleParagraph.setAlignment(ParagraphAlignment.LEFT);
|
||||
@@ -366,6 +369,26 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String link = lawsMonthlyReportWriteEO.getLink();//链接
|
||||
String technologyTerritoryName = "";
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(technologyTerritory)){
|
||||
|
||||
+149
-61
@@ -33,6 +33,7 @@ import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -49,6 +50,7 @@ import java.util.stream.Collectors;
|
||||
* @date 2022/3/14 10:03
|
||||
* @auth zhn
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
@Autowired
|
||||
@@ -446,39 +448,23 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
Map<String,Object> mapHighlight1 = new HashMap<>();
|
||||
//封装首次的条件
|
||||
if (StringUtils.isNotBlank(selectValue)) {
|
||||
selectValue = selectValue.toLowerCase();
|
||||
|
||||
for (String field : fieldList) {
|
||||
Map<String, Object> map2 = new HashMap<>();
|
||||
Map<String, Object> map3 = new HashMap<>();
|
||||
Map<String, Object> map4 = new HashMap<>();
|
||||
if("serial_number".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}else if("title".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}else if("file_text".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}
|
||||
// 特殊处理编号字段
|
||||
if (field.equals("serial_number")){
|
||||
// map2放最内层
|
||||
map2.put(field, "*" + selectValue + "*");
|
||||
getQueryMapJsonFullText(queryMapJson, selectValue, field);
|
||||
|
||||
// map4放query
|
||||
map4.put("wildcard",map2);
|
||||
} else {
|
||||
map3.put("query",selectValue);
|
||||
// map3.put("minimum_should_match",2);
|
||||
|
||||
map2.put(field, map3);
|
||||
map4.put("match",map2);
|
||||
}
|
||||
queryMapJson.add(map4);
|
||||
//高亮
|
||||
if(!"flag".equals(field)){
|
||||
highlight(mapHighlight, field);
|
||||
} else {
|
||||
// query_string查询
|
||||
Map<String, Object> map25 = new HashMap<>();
|
||||
Map<String, Object> map45 = new HashMap<>();
|
||||
map25.put("query", selectValue);
|
||||
map25.put("allow_leading_wildcard", false); //禁用了前置通配符
|
||||
map45.put("query_string", map25);
|
||||
queryMapJson.add(map45);
|
||||
|
||||
}
|
||||
}
|
||||
mapHighlight1.put("fields",mapHighlight);
|
||||
@@ -489,39 +475,23 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
}
|
||||
//封装二次的条件
|
||||
if (StringUtils.isNotBlank(selectValueTwo)) {
|
||||
selectValueTwo = selectValueTwo.toLowerCase();
|
||||
|
||||
for (String field : fieldList) {
|
||||
Map<String, Object> queryMap = new HashMap<>();
|
||||
Map<String, Object> map2 = new HashMap<>();
|
||||
Map<String, Object> map3 = new HashMap<>();
|
||||
if("serial_number".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}else if("title".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}else if("file_text".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}
|
||||
getQueryMapJsonFullText(queryMapJsonTwo, selectValueTwo, field);
|
||||
|
||||
//特殊处理编号字段
|
||||
if (field.equals("serial_number")){
|
||||
// map2放最内层
|
||||
map2.put(field, "*" + selectValueTwo + "*");
|
||||
// map4放query
|
||||
queryMap.put("wildcard",map2);
|
||||
} else {
|
||||
map3.put("query",selectValueTwo);
|
||||
// map3.put("minimum_should_match",2);
|
||||
map2.put(field, map3);
|
||||
queryMap.put("match", map2);
|
||||
}
|
||||
|
||||
queryMapJsonTwo.add(queryMap);
|
||||
//高亮
|
||||
if(!"flag".equals(field)){
|
||||
highlight(mapHighlight, field);
|
||||
} else {
|
||||
// query_string查询
|
||||
Map<String, Object> map25 = new HashMap<>();
|
||||
Map<String, Object> map45 = new HashMap<>();
|
||||
map25.put("query", selectValue);
|
||||
map25.put("allow_leading_wildcard", false); //禁用了前置通配符
|
||||
map45.put("query_string", map25);
|
||||
queryMapJson.add(map45);
|
||||
|
||||
}
|
||||
}
|
||||
mapHighlight1.put("fields",mapHighlight);
|
||||
@@ -546,7 +516,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
}
|
||||
|
||||
JSONObject sort = new JSONObject();
|
||||
if(StringUtils.isEmpty(selectValue)){
|
||||
if(StringUtils.isEmpty(selectValue) || StringUtils.equals(selectValue,SEARCH_FLAG)){
|
||||
Map<String,Object> createTime = new HashMap<>();
|
||||
Map<String,Object> createTime1 = new HashMap<>();
|
||||
createTime.put("order","desc");
|
||||
@@ -559,6 +529,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
score1.put("_score",score);
|
||||
sort.putAll(score1);
|
||||
}
|
||||
log.info("搜索中心-全部索引,排序方式为:" + sort.toJSONString());
|
||||
|
||||
// Map<String,Object> mapSort = new HashMap<>();
|
||||
// Map<String,Object> mapSortTemp = new HashMap<>();
|
||||
@@ -573,6 +544,65 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
return page;
|
||||
}
|
||||
|
||||
private void getQueryMapJsonFullText(JSONArray queryMapJson, String selectValue, String field) {
|
||||
// 前缀匹配 缺点是前缀一定不能断开
|
||||
//情况举例:用户只记得前面那段字
|
||||
Map<String, Object> map21 = new HashMap<>();
|
||||
Map<String, Object> map31 = new HashMap<>();
|
||||
Map<String, Object> map41 = new HashMap<>();
|
||||
if("serial_number".equals(field)){
|
||||
map31.put("boost",1);
|
||||
}else if("title".equals(field)){
|
||||
map31.put("boost",1);
|
||||
}else if("file_text".equals(field)){
|
||||
map31.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map31.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map31.put("boost",1);
|
||||
}
|
||||
map31.put("value", selectValue);
|
||||
map21.put(field + ".keyword", map31);
|
||||
map41.put("prefix", map21);
|
||||
queryMapJson.add(map41);
|
||||
|
||||
// match_phrase_prefix 词组匹配查询,允许最后词组与文中的任意分词前缀匹配
|
||||
Map<String, Object> map22 = new HashMap<>();
|
||||
Map<String, Object> map32 = new HashMap<>();
|
||||
Map<String, Object> map42 = new HashMap<>();
|
||||
if("serial_number".equals(field)){
|
||||
map32.put("boost",1);
|
||||
}else if("title".equals(field)){
|
||||
map32.put("boost",1);
|
||||
}else if("file_text".equals(field)){
|
||||
map32.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map32.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map32.put("boost",1);
|
||||
}
|
||||
map32.put("query", selectValue);
|
||||
map22.put(field, map32);
|
||||
map42.put("match_phrase_prefix", map22);
|
||||
queryMapJson.add(map42);
|
||||
|
||||
// match分词匹配查询
|
||||
// 情况举例:用户可能他知道开头的前缀几个字,知道中间的几个字
|
||||
Map<String, Object> map23 = new HashMap<>();
|
||||
Map<String, Object> map43 = new HashMap<>();
|
||||
map23.put(field, selectValue);
|
||||
map43.put("match", map23);
|
||||
queryMapJson.add(map43);
|
||||
|
||||
// wildcard模糊查询
|
||||
//情况举例:用户只记得中间那段字
|
||||
Map<String, Object> map24 = new HashMap<>();
|
||||
Map<String, Object> map44 = new HashMap<>();
|
||||
map24.put(field, "*" + selectValue + "*");
|
||||
map44.put("wildcard",map24);
|
||||
queryMapJson.add(map44);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private IPage getiPage(String selectValue, String selectValueTwo, JSONArray queryMapJson,Map<String,Object> highlightMap,
|
||||
JSONArray should, Integer pageNo, Integer pageSize, String paragraphFlag,
|
||||
@@ -1153,7 +1183,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
//封装首次的条件
|
||||
if (StringUtils.isNotBlank(selectValue)) {
|
||||
for (String field : fieldList) {
|
||||
Map<String, Object> map2 = new HashMap<>();
|
||||
/*Map<String, Object> map2 = new HashMap<>();
|
||||
Map<String, Object> map3 = new HashMap<>();
|
||||
Map<String, Object> map4 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
@@ -1174,11 +1204,22 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
map2.put(field, map3);
|
||||
map4.put("match",map2);
|
||||
}
|
||||
queryMapInputJson.add(map4);
|
||||
queryMapInputJson.add(map4);*/
|
||||
|
||||
getQueryMapJson(queryMapInputJson, selectValue, field);
|
||||
|
||||
//高亮
|
||||
if(!"flag".equals(field)){
|
||||
problemKnowledgeBaseHighlight(mapHighlight, field);
|
||||
}else {
|
||||
// query_string查询
|
||||
Map<String, Object> map25 = new HashMap<>();
|
||||
Map<String, Object> map45 = new HashMap<>();
|
||||
map25.put("query", selectValue);
|
||||
map25.put("fields", fieldList.toArray());
|
||||
map25.put("allow_leading_wildcard", false); //禁用了前置通配符
|
||||
map45.put("query_string", map25);
|
||||
queryMapJson.add(map45);
|
||||
}
|
||||
}
|
||||
mapHighlight1.put("fields",mapHighlight);
|
||||
@@ -1256,7 +1297,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
queryMapJsonAll.add(jsonObjectThree);
|
||||
}
|
||||
JSONObject sort = new JSONObject();
|
||||
if(StringUtils.isEmpty(selectValue)){
|
||||
if(StringUtils.isEmpty(selectValue) || StringUtils.equals(selectValue,SEARCH_FLAG)){
|
||||
Map<String,Object> createTime = new HashMap<>();
|
||||
Map<String,Object> createTime1 = new HashMap<>();
|
||||
createTime.put("order","desc");
|
||||
@@ -1435,12 +1476,59 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
list1.add("</text>");
|
||||
mapTemp.put("pre_tags", list);
|
||||
mapTemp.put("post_tags", list1);
|
||||
mapTemp.put("fragment_size", 550);//高亮字段内容长度,去除html样式标签,统计字数,设置为200
|
||||
mapTemp.put("fragment_size", 280);//高亮字段内容长度,去除html样式标签,统计字数,设置为200
|
||||
mapTemp.put("number_of_fragments", 1);//高亮内容默认分为5段, 此处设置为一段
|
||||
mapTemp.put("type", "plain");
|
||||
mapHighlight.put(key, mapTemp);
|
||||
}
|
||||
|
||||
private void getQueryMapJson(JSONArray queryMapJson, String selectValue, String field) {
|
||||
// 前缀匹配 缺点是前缀一定不能断开
|
||||
//情况举例:用户只记得前面那段字
|
||||
Map<String, Object> map21 = new HashMap<>();
|
||||
Map<String, Object> map31 = new HashMap<>();
|
||||
Map<String, Object> map41 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
map31.put("boost",1);
|
||||
}else if("content".equals(field)){
|
||||
map31.put("boost",0.01);
|
||||
}
|
||||
map31.put("value", selectValue);
|
||||
map21.put(field + ".keyword", map31);
|
||||
map41.put("prefix", map21);
|
||||
queryMapJson.add(map41);
|
||||
|
||||
// match_phrase_prefix 词组匹配查询,允许最后词组与文中的任意分词前缀匹配
|
||||
Map<String, Object> map22 = new HashMap<>();
|
||||
Map<String, Object> map32 = new HashMap<>();
|
||||
Map<String, Object> map42 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
map32.put("boost",1);
|
||||
}else if("content".equals(field)){
|
||||
map32.put("boost",0.01);
|
||||
}
|
||||
map32.put("query", selectValue);
|
||||
map22.put(field, map32);
|
||||
map42.put("match_phrase_prefix", map22);
|
||||
queryMapJson.add(map42);
|
||||
|
||||
// match分词匹配查询
|
||||
// 情况举例:用户可能他知道开头的前缀几个字,知道中间的几个字
|
||||
Map<String, Object> map23 = new HashMap<>();
|
||||
Map<String, Object> map43 = new HashMap<>();
|
||||
map23.put(field, selectValue);
|
||||
map43.put("match", map23);
|
||||
queryMapJson.add(map43);
|
||||
|
||||
// wildcard模糊查询
|
||||
//情况举例:用户只记得中间那段字
|
||||
Map<String, Object> map24 = new HashMap<>();
|
||||
Map<String, Object> map44 = new HashMap<>();
|
||||
map24.put(field, "*" + selectValue + "*");
|
||||
map44.put("wildcard",map24);
|
||||
queryMapJson.add(map44);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
+73
-49
@@ -77,35 +77,28 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
Map<String,Object> mapHighlight1 = new HashMap<>();
|
||||
//封装首次的条件
|
||||
if (StringUtils.isNotBlank(selectValue)) {
|
||||
selectValue = selectValue.toLowerCase();
|
||||
for (String field : fieldList) {
|
||||
Map<String, Object> map2 = new HashMap<>();
|
||||
Map<String, Object> map3 = new HashMap<>();
|
||||
Map<String, Object> map4 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}else if("content".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}
|
||||
// 标题字段 通配符模糊匹配
|
||||
if (field.equals("title")){
|
||||
// map2放最内层
|
||||
map2.put(field, "*" + selectValue + "*");
|
||||
|
||||
// map4放query
|
||||
map4.put("wildcard",map2);
|
||||
} else {
|
||||
map3.put("query", selectValue);
|
||||
map2.put(field, map3);
|
||||
map4.put("match", map2);
|
||||
}
|
||||
queryMapJson.add(map4);
|
||||
getQueryMapJson(queryMapJson, selectValue, field);
|
||||
|
||||
//高亮
|
||||
if(!"flag".equals(field)){
|
||||
highlight(mapHighlight, field);
|
||||
} else {
|
||||
// query_string查询
|
||||
Map<String, Object> map25 = new HashMap<>();
|
||||
Map<String, Object> map45 = new HashMap<>();
|
||||
map25.put("query", selectValue);
|
||||
map25.put("fields", fieldList.toArray());
|
||||
map25.put("allow_leading_wildcard", false); //禁用了前置通配符
|
||||
map45.put("query_string", map25);
|
||||
queryMapJson.add(map45);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
mapHighlight1.put("fields",mapHighlight);
|
||||
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(queryMapJson)){
|
||||
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapJson);
|
||||
@@ -113,33 +106,22 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
}
|
||||
//封装二次的条件
|
||||
if (StringUtils.isNotBlank(selectValueTwo)) {
|
||||
selectValueTwo = selectValueTwo.toLowerCase();
|
||||
for (String field : fieldList) {
|
||||
Map<String, Object> queryMap = new HashMap<>();
|
||||
Map<String, Object> map2 = new HashMap<>();
|
||||
Map<String, Object> map3 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}else if("content".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}
|
||||
getQueryMapJson(queryMapJsonTwo, selectValueTwo, field);
|
||||
|
||||
// 标题字段 通配符模糊匹配
|
||||
if (field.equals("title")){
|
||||
// map2放最内层
|
||||
map2.put(field, "*" + selectValueTwo + "*");
|
||||
// map4放query
|
||||
queryMap.put("wildcard",map2);
|
||||
} else {
|
||||
map3.put("query", selectValueTwo);
|
||||
// map3.put("minimum_should_match",2);
|
||||
map2.put(field, map3);
|
||||
queryMap.put("match", map2);
|
||||
}
|
||||
|
||||
queryMapJsonTwo.add(queryMap);
|
||||
//高亮
|
||||
if(!"flag".equals(field)){
|
||||
highlight(mapHighlight, field);
|
||||
} else {
|
||||
// query_string查询
|
||||
Map<String, Object> map25 = new HashMap<>();
|
||||
Map<String, Object> map45 = new HashMap<>();
|
||||
map25.put("query", selectValue);
|
||||
map25.put("allow_leading_wildcard", false);
|
||||
map45.put("query_string", map25);
|
||||
queryMapJsonTwo.add(map45);
|
||||
|
||||
}
|
||||
}
|
||||
mapHighlight1.put("fields",mapHighlight);
|
||||
@@ -227,11 +209,6 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
}
|
||||
mapSource.put(key,fieldConyent);
|
||||
}
|
||||
//如果这一条数据中有高亮字段值,但是file_text中没有高亮值, 则赋空值,否则列表中会展示所有的文件内容, 赋空后,则展示基础数据
|
||||
String fileText = (String) mapSource.get("file_text");
|
||||
if(StringUtils.isNotBlank(fileText) && !fileText.contains("<text class='highlight-class'>")){
|
||||
mapSource.put("file_text","");
|
||||
}
|
||||
}
|
||||
mapList.add(mapSource);
|
||||
}
|
||||
@@ -258,10 +235,57 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
list1.add("</text>");
|
||||
mapTemp.put("pre_tags", list);
|
||||
mapTemp.put("post_tags", list1);
|
||||
mapTemp.put("fragment_size", 550);//高亮字段内容长度,去除html样式标签,统计字数,设置为200
|
||||
mapTemp.put("fragment_size", 500);//高亮字段内容长度,去除html样式标签,统计字数,设置为200
|
||||
mapTemp.put("number_of_fragments", 1);//高亮内容默认分为5段, 此处设置为一段
|
||||
mapTemp.put("type", "plain");
|
||||
mapHighlight.put(key, mapTemp);
|
||||
}
|
||||
|
||||
private void getQueryMapJson(JSONArray queryMapJson, String selectValue, String field) {
|
||||
// 前缀匹配 缺点是前缀一定不能断开
|
||||
//情况举例:用户只记得前面那段字
|
||||
Map<String, Object> map21 = new HashMap<>();
|
||||
Map<String, Object> map31 = new HashMap<>();
|
||||
Map<String, Object> map41 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
map31.put("boost",1);
|
||||
}else if("content".equals(field)){
|
||||
map31.put("boost",0.01);
|
||||
}
|
||||
map31.put("value", selectValue);
|
||||
map21.put(field + ".keyword", map31);
|
||||
map41.put("prefix", map21);
|
||||
queryMapJson.add(map41);
|
||||
|
||||
// match_phrase_prefix 词组匹配查询,允许最后词组与文中的任意分词前缀匹配
|
||||
Map<String, Object> map22 = new HashMap<>();
|
||||
Map<String, Object> map32 = new HashMap<>();
|
||||
Map<String, Object> map42 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
map32.put("boost",1);
|
||||
}else if("content".equals(field)){
|
||||
map32.put("boost",0.01);
|
||||
}
|
||||
map32.put("query", selectValue);
|
||||
map22.put(field, map32);
|
||||
map42.put("match_phrase_prefix", map22);
|
||||
queryMapJson.add(map42);
|
||||
|
||||
// match分词匹配查询
|
||||
// 情况举例:用户可能他知道开头的前缀几个字,知道中间的几个字
|
||||
Map<String, Object> map23 = new HashMap<>();
|
||||
Map<String, Object> map43 = new HashMap<>();
|
||||
map23.put(field, selectValue);
|
||||
map43.put("match", map23);
|
||||
queryMapJson.add(map43);
|
||||
|
||||
// wildcard模糊查询
|
||||
//情况举例:用户只记得中间那段字
|
||||
Map<String, Object> map24 = new HashMap<>();
|
||||
Map<String, Object> map44 = new HashMap<>();
|
||||
map24.put(field, "*" + selectValue + "*");
|
||||
map44.put("wildcard",map24);
|
||||
queryMapJson.add(map44);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+6
-5
@@ -65,10 +65,7 @@ import org.apache.poi.hssf.util.HSSFColor;
|
||||
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
|
||||
import org.apache.poi.xssf.usermodel.XSSFRichTextString;
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.apache.poi.xssf.usermodel.*;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -419,6 +416,9 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
} else if(fieldPersonIdList.contains(key) || standardIdList.contains(key)){
|
||||
continue;
|
||||
} else {
|
||||
if ("iterms_conditions".equals(key)) {
|
||||
value = value.toString().replaceAll("\\\\", "\\\\\\\\").replaceAll("'", "\\\\'");
|
||||
}
|
||||
valuesBuilder.append("," + "'" + value + "'");
|
||||
}
|
||||
|
||||
@@ -787,8 +787,9 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
}
|
||||
//处理列表表头排序
|
||||
if("page".equals(type)) {
|
||||
conditionSb.append(" order by SAR_FILE_SPLIT_MENU.display_seq asc");
|
||||
conditionSb.append(" order by SAR_FILE_SPLIT_MENU.display_seq asc, zhan3_shi4_shun4_xu4 is null, zhan3_shi4_shun4_xu4 asc"); // 默认排序
|
||||
|
||||
// TODO 处理空值排最后
|
||||
if (StringUtils.isNotBlank((String) parameter.get("orderByField"))) {
|
||||
conditionSb.append(", sar_file_split_items." + (String) parameter.get("orderByField"));
|
||||
if ("1".equals((String) parameter.get("orderBy"))) {
|
||||
|
||||
@@ -91,6 +91,11 @@
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>com.e-iceblue</id>
|
||||
<name>e-iceblue</name>
|
||||
<url>https://repo.e-iceblue.cn/repository/maven-public/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
@@ -110,6 +115,11 @@
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>e-iceblue</groupId>
|
||||
<artifactId>spire.office.free</artifactId>
|
||||
<version>5.3.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
|
||||
@@ -781,7 +781,9 @@
|
||||
height: calc(100% - 100px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/deep/ .ant-select-allow-clear{
|
||||
height: 30px;
|
||||
}
|
||||
.text {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
@@ -48,10 +48,10 @@
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
title:{
|
||||
title: {
|
||||
type: String,
|
||||
default:''
|
||||
},
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -102,7 +102,12 @@
|
||||
this.visibleTree = false
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$emit('SelectedByForm',this.userIds.join(','))
|
||||
if (this.userIds && this.userIds.length > 0) {
|
||||
this.submitLoading = true
|
||||
this.$emit('SelectedByForm', this.userIds.join(','))
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
onSearch(e) {
|
||||
this.gData = []
|
||||
@@ -171,7 +176,7 @@
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
z-index:100;
|
||||
z-index: 100;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
|
||||
@@ -332,7 +332,12 @@
|
||||
if (res.success) {
|
||||
this.confirmLoading = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
eventBUs.$emit('searchReset')
|
||||
if (this.formInline.id) {
|
||||
eventBUs.$emit('searchGetData')
|
||||
} else {
|
||||
eventBUs.$emit('searchReset')
|
||||
}
|
||||
|
||||
this.$emit('addFormClick')
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
this.visible = false
|
||||
this.visibleTree = false
|
||||
this.$emit('clearSelected')
|
||||
eventBUs.$emit('searchReset')
|
||||
eventBUs.$emit('searchGetData')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
@@ -188,7 +188,7 @@
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
z-index:100;
|
||||
z-index: 100;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
|
||||
@@ -915,7 +915,7 @@
|
||||
}
|
||||
::v-deep .ant-table-row:first-child {
|
||||
background: #fff!important;
|
||||
opacity: 0.9;
|
||||
/*opacity: 0.9;*/
|
||||
}
|
||||
|
||||
::v-deep .ant-table-body {
|
||||
|
||||
+2
-2
@@ -333,7 +333,7 @@
|
||||
value.id = this.getUUID()
|
||||
value.currentUserName = this.userInfo().username
|
||||
Object.keys(value).forEach(res => {
|
||||
if (value[res] && value[res] instanceof String) {
|
||||
if (value[res] && typeof value[res] == 'string') {
|
||||
value[res] = value[res].replace(/\"/g, '“')
|
||||
value[res] = value[res].replace(/\'/g, '‘')
|
||||
}
|
||||
@@ -364,7 +364,7 @@
|
||||
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
value.handlingTime = handlingTime
|
||||
Object.keys(value).forEach(res => {
|
||||
if (value[res] && value[res] instanceof String) {
|
||||
if (value[res] && typeof value[res] == 'string') {
|
||||
value[res] = value[res].replace(/\"/g, '“')
|
||||
value[res] = value[res].replace(/\'/g, '‘')
|
||||
}
|
||||
|
||||
+6
@@ -175,6 +175,12 @@
|
||||
dataIndex: 'releaseStatus_dictText',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('creater'),
|
||||
align: 'center',
|
||||
dataIndex: 'createBy',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
|
||||
+20
-5
@@ -3,9 +3,9 @@
|
||||
<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">-->
|
||||
<!-- <a-icon type="arrow-left" @click="back" style="margin-right: 6px;"/>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span style="line-height: 66px;display: inline-block;float: left">-->
|
||||
<!-- <a-icon type="arrow-left" @click="back" style="margin-right: 6px;"/>-->
|
||||
<!-- </span>-->
|
||||
{{queryForm.title}}
|
||||
</div>
|
||||
<div class="doc-detail-right">
|
||||
@@ -156,8 +156,23 @@
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
SelectedByForm() {
|
||||
|
||||
SelectedByForm(userIds) {
|
||||
let query = {
|
||||
userIds: userIds,
|
||||
departIds: userIds,
|
||||
problemKnowledgeBaseId: this.queryForm.id,
|
||||
problemKnowledgeBaseTitle: this.queryForm.title
|
||||
}
|
||||
postAction('/problemKnowledgeBase/problemKnowledgeBaseEO/forward', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$refs.SelectedByRef.visible = false
|
||||
this.$refs.SelectedByRef.submitLoading = false
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.$refs.SelectedByRef.submitLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
queryById() {
|
||||
let query = {
|
||||
|
||||
+1
-1
@@ -217,7 +217,7 @@
|
||||
},
|
||||
{
|
||||
title: this.$t('feedbackTime'),
|
||||
dataIndex: 'updateTime',
|
||||
dataIndex: 'feedbackTime',
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
width: 160
|
||||
|
||||
+2
-2
@@ -537,7 +537,7 @@
|
||||
if (value[res] && value[res] instanceof Array) {
|
||||
value[res] = value[res].join(',')
|
||||
}
|
||||
if (value[res] && value[res] instanceof String) {
|
||||
if (value[res] && typeof value[res] == 'string') {
|
||||
value[res] = value[res].replace(/\"/g, '“')
|
||||
value[res] = value[res].replace(/\'/g, '‘')
|
||||
}
|
||||
@@ -579,7 +579,7 @@
|
||||
},
|
||||
completeTask(value, taskId) {
|
||||
Object.keys(value).forEach(res => {
|
||||
if (value[res] && value[res] instanceof String) {
|
||||
if (value[res] && typeof value[res] == 'string') {
|
||||
value[res] = value[res].replace(/\"/g, '“')
|
||||
value[res] = value[res].replace(/\'/g, '‘')
|
||||
}
|
||||
|
||||
@@ -0,0 +1,419 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="collection-search-wrapper">
|
||||
<div class="collection-search-header">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('title')">
|
||||
<span>{{$t('title')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model="queryParams.title"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px"
|
||||
class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleBatCancel">
|
||||
<a-icon type="delete"/>
|
||||
{{ $t('BatchCancel') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<a-checkbox-group style="width: 100%" :defaultChecked="checkboxText"
|
||||
@change="checkboxTextChange" v-model="checkboxText">
|
||||
<div v-for="item in conList" :key="item.id">
|
||||
<div style="margin-bottom: 10px;position: relative">
|
||||
<a-checkbox :value="item.id" class="checkbox-left"></a-checkbox>
|
||||
<div class="text-text-right"
|
||||
@click="checkedClick(item)"
|
||||
:class="{ 'null-input':item.checked }">
|
||||
<div class="text-header">
|
||||
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
|
||||
<template slot="title">
|
||||
<span v-html="item.title"></span>
|
||||
</template>
|
||||
<div class="text-header-text" style="cursor: pointer" v-html="item.title">
|
||||
|
||||
</div>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">-->
|
||||
<!-- <template slot="title">-->
|
||||
<!-- <span v-html="item.content"></span>-->
|
||||
<!-- </template>-->
|
||||
<div class="text-content" v-html="item.content"
|
||||
>
|
||||
</div>
|
||||
<!-- </a-tooltip>-->
|
||||
</div>
|
||||
<div @click="CancelCollectionClick(item)"
|
||||
:title="$t('CancelCollection')"
|
||||
class="text-text-right-text">{{$t('CancelCollection')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-checkbox-group>
|
||||
</div>
|
||||
<div class="page" v-if="conList && conList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
:current="pageNo"
|
||||
@change="pageOnChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'problemKnowledgeBaseList',
|
||||
data() {
|
||||
return {
|
||||
conList: [],
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
checkboxText: [],
|
||||
checkboxList: [],
|
||||
loading: false,
|
||||
queryParams: {},
|
||||
url: {
|
||||
getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseCollectEO/queryCollectPageList',
|
||||
deleteBatch: '/problemKnowledgeBase/problemKnowledgeBaseCollectEO/deleteBatch'
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
watch: {
|
||||
checkboxText: function(value) {
|
||||
this.conList.forEach(val => {
|
||||
val.checked = false
|
||||
})
|
||||
if (value.length > 0) {
|
||||
this.conList.forEach(val => {
|
||||
value.forEach(res => {
|
||||
if (res === val.id) {
|
||||
val.checked = true
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
this.conList = [...this.conList]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
checkboxTextChange(value) {
|
||||
this.checkboxText = JSON.parse(JSON.stringify(value))
|
||||
if (this.checkboxList && this.checkboxList.length > 0) {
|
||||
this.checkboxList.forEach(res => {
|
||||
this.checkboxText.push(res)
|
||||
})
|
||||
}
|
||||
},
|
||||
searchReset() {
|
||||
this.pageNo = 1
|
||||
this.queryParams = {}
|
||||
this.getList()
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.checkboxList = JSON.parse(JSON.stringify(this.checkboxText))
|
||||
this.getList()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.checkboxList = JSON.parse(JSON.stringify(this.checkboxText))
|
||||
this.pageSize = pageSize
|
||||
this.getList()
|
||||
},
|
||||
handleBatCancel() {
|
||||
if (this.checkboxText && this.checkboxText.length > 0) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('BatchCancelCollection'),
|
||||
onOk() {
|
||||
let checkboxText = JSON.parse(JSON.stringify(_this.checkboxText))
|
||||
deleteAction(_this.url.deleteBatch, { ids: checkboxText.join(',') }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.checkboxText = []
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
CancelCollectionClick(val) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('confirmCancelCollection'),
|
||||
onOk() {
|
||||
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
checkedClick(item) {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/problemKnowledgeBaseView',
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
getText(str) {
|
||||
let words = str.replace(/<[^<>]+>/g, '').replace(/ /gi, '') //这里是去除标签
|
||||
return words.replace(/\s/g, '') //这里是去除空格
|
||||
},
|
||||
getList() {
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
createBy: this.userInfo().username,
|
||||
...this.queryParams
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.getInfoList, query).then((res) => {
|
||||
if (res.success) {
|
||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
return
|
||||
}
|
||||
this.conList = res.result.records
|
||||
if (this.conList && this.conList.length > 0) {
|
||||
this.conList.forEach(val => {
|
||||
if (val.content) {
|
||||
val.content = this.getText(val.content)
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.checkboxList && this.checkboxList.length > 0) {
|
||||
let contentList = []
|
||||
for (let j = 0; j < this.conList.length; j++) {
|
||||
contentList.push(this.conList[j].id)
|
||||
}
|
||||
this.checkboxList = this.checkboxList.filter(val => {
|
||||
return !contentList.join(',').includes(val)
|
||||
})
|
||||
}
|
||||
this.checkboxText = [...this.checkboxText]
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.conList = []
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.checkbox-left .ant-checkbox-inner {
|
||||
width: 18px !important;
|
||||
height: 18px !important;
|
||||
line-height: 18px !important;
|
||||
}
|
||||
|
||||
.tooltip-index {
|
||||
max-width: calc(100% - 300px) !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 43px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.checkbox-left {
|
||||
float: left;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.text-text-right {
|
||||
width: calc(100% - 152px);
|
||||
display: inline-block;
|
||||
padding: 19px 28px;
|
||||
box-sizing: border-box;
|
||||
margin-left: 38px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.text-text-right-text {
|
||||
width: 110px;
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
word-break: break-word;
|
||||
text-align: center;
|
||||
padding: 0 6px;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #00B3BE;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.null-input {
|
||||
background-color: #F2F4F8;
|
||||
}
|
||||
|
||||
.text-header {
|
||||
margin-bottom: 11px;
|
||||
width: 100%;
|
||||
|
||||
.text-header-text {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #040B29;
|
||||
width: 100%;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
word-break: break-word;
|
||||
}
|
||||
}
|
||||
|
||||
.text-content {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
opacity: 0.7;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
text-overflow: ellipsis;
|
||||
/*! autoprefixer: off */
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 4;
|
||||
/*! autoprefixer: on;*/
|
||||
text-justify: inter-ideograph;
|
||||
word-break: break-all
|
||||
}
|
||||
|
||||
.box-content {
|
||||
padding: 0 0 0 8px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.text-operation {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.submitButtons {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.fileText {
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
::v-deep p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.selectText {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
::v-deep .ant-select-selection--single {
|
||||
height: 32px !important;
|
||||
}
|
||||
|
||||
::v-deep .ant-select-selection__rendered {
|
||||
height: 32px !important;
|
||||
line-height: 32px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,104 +1,115 @@
|
||||
<template>
|
||||
<div class="collection">
|
||||
<a-card :bordered="false">
|
||||
<div class="collection-search-wrapper">
|
||||
<div class="collection-search-header">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('standard')">
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
v-model="queryParams.serialNumber"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('title')">
|
||||
<span>{{$t('title')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model="queryParams.title"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('status')">
|
||||
<span>{{$t('status')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParams.state"
|
||||
:placeholder="$t('PleaseSelect')+$t('status')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'state'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px"
|
||||
class="table-page-search-submitButtons">
|
||||
<!-- <a-tabs :model="activeTab" @change="callback">-->
|
||||
<!-- <a-tab-pane :key="$t('DocumentLibrary')" :tab="$t('DocumentLibrary')">-->
|
||||
<div class="collection-search-wrapper">
|
||||
<div class="collection-search-header">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('standard')">
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
v-model="queryParams.serialNumber"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('title')">
|
||||
<span>{{$t('title')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model="queryParams.title"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('status')">
|
||||
<span>{{$t('status')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParams.state"
|
||||
:placeholder="$t('PleaseSelect')+$t('status')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'state'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px"
|
||||
class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleBatCancel">
|
||||
<a-icon type="delete"/>
|
||||
{{ $t('BatchCancel') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="colloction-table">
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
:scroll="{x: '100%'}"
|
||||
:columns="columns"
|
||||
:dataSource="tableData"
|
||||
:pagination="false"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleBatCancel">
|
||||
<a-icon type="delete"/>
|
||||
{{ $t('BatchCancel') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="colloction-table">
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
:scroll="{x: '100%'}"
|
||||
:columns="columns"
|
||||
:dataSource="tableData"
|
||||
:pagination="false"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
>
|
||||
<span slot="serialNumber" slot-scope="text, record">
|
||||
<a class="table-del" @click="onDetail(record)">{{record.serialNumber}}</a>
|
||||
</span>
|
||||
<span slot="serialtitle" slot-scope="text, record">
|
||||
<span slot="serialtitle" slot-scope="text, record">
|
||||
<a class="table-del" @click="onDetail(record)">{{record.title}}</a>
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a class="table-del" @click="onCancel(record)">{{$t('CancelCollection')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" v-if="tableData.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+ $t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:current="queryParams.pageNo"
|
||||
:page-size.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@change="onChangePage"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</a-table>
|
||||
<div class="page" v-if="tableData.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+ $t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:current="queryParams.pageNo"
|
||||
:page-size.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@change="onChangePage"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </a-tab-pane>-->
|
||||
<!-- <a-tab-pane :key="$t('problemKnowledgeBase')" :tab="$t('problemKnowledgeBase')">-->
|
||||
<!-- <problemKnowledgeBaseList ref="problemKnowledgeBaseListRef"/>-->
|
||||
<!-- </a-tab-pane>-->
|
||||
<!-- </a-tabs>-->
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
|
||||
|
||||
import problemKnowledgeBaseList from './components/problemKnowledgeBaseList'
|
||||
export default {
|
||||
name: 'collection',
|
||||
components:{
|
||||
problemKnowledgeBaseList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedRowKeys: [],
|
||||
activeTab:this.$t('DocumentLibrary'),
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
@@ -175,6 +186,9 @@
|
||||
}
|
||||
})
|
||||
},//搜索
|
||||
callback(event){
|
||||
|
||||
},
|
||||
searchQuery() {
|
||||
this.loadData()
|
||||
},
|
||||
@@ -312,7 +326,7 @@
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 33px;
|
||||
width: 43px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
@@ -357,12 +371,4 @@
|
||||
/* float: none!important;*/
|
||||
/*}*/
|
||||
/*}*/
|
||||
.box-input .ant-select-selection__rendered {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--single {
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
@@ -184,7 +184,7 @@
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.idList = []
|
||||
eventBUs.$emit('searchReset')
|
||||
eventBUs.$emit('searchGetData')
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
@@ -233,7 +233,7 @@
|
||||
getAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
eventBUs.$emit('searchReset')
|
||||
eventBUs.$emit('searchGetData')
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
|
||||
+3
-1
@@ -160,10 +160,11 @@
|
||||
<div class="submit-button">
|
||||
<a-button class="box-button" type="primary" @click="submit">{{$t('initiateDocumentComparison')}}</a-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<JLoading :loading="loading">{{$t('pleaseWaitWhileRunning')}}</JLoading>
|
||||
</div>
|
||||
<JLoading :loading="loading">{{$t('pleaseWaitWhileRunning')}}</JLoading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -412,6 +413,7 @@
|
||||
|
||||
.doc-detail-wrap {
|
||||
padding-bottom: 20px;
|
||||
position: relative;
|
||||
|
||||
.doc-detail-header {
|
||||
width: 100%;
|
||||
|
||||
@@ -58,8 +58,9 @@
|
||||
<a-select-option v-for="(item, key) in translationResultsList"
|
||||
:key="key"
|
||||
:value="item.id">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.dbFieldTxt">
|
||||
{{ item.dbFieldTxt }}
|
||||
<span style="display: inline-block;width: 100%"
|
||||
:title="language == 'zh-cn' ? item.dbFieldTxt:item.dbFieldEnName">
|
||||
{{ language == 'zh-cn' ? item.dbFieldTxt:item.dbFieldEnName }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
@@ -94,7 +95,8 @@
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<uploadFile ref="uploadFile" :restrictUploads="true" :Uploadable="'.docx,.doc,'" :isMultiple="true" @uploadSuccess="uploadSuccess"/>
|
||||
<uploadFile ref="uploadFile" :restrictUploads="true" :Uploadable="'.docx,.doc,'" :isMultiple="true"
|
||||
@uploadSuccess="uploadSuccess"/>
|
||||
<standardData ref="standardDataRef" @standardDataForm="standardDataForm"/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -155,10 +157,12 @@
|
||||
},
|
||||
ids: [],
|
||||
translationResultsList: [],
|
||||
LanguageList: []
|
||||
LanguageList: [],
|
||||
language: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.language = localStorage.getItem('language')
|
||||
this.getTextStatus()
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</template>
|
||||
<span style="cursor: pointer"
|
||||
class="text-header-text"
|
||||
v-if="item.serial_number && !item.module_type_flag"
|
||||
v-if="item.serial_number && item.module_type_flag == 'WDK'"
|
||||
v-html="item.serial_number"></span>
|
||||
<template slot="title">
|
||||
<span v-html="item.title"></span>
|
||||
@@ -30,7 +30,7 @@
|
||||
<template slot="title">
|
||||
<span v-html="item.file_name"></span>
|
||||
</template>
|
||||
<span class="text-header-text" v-if="item.file_name && !item.module_type_flag" style="cursor: pointer"
|
||||
<span class="text-header-text" v-if="item.file_name && item.module_type_flag == 'WDK'" style="cursor: pointer"
|
||||
v-html="item.file_name"></span>
|
||||
</a-tooltip>
|
||||
<!-- <a-tooltip placement="topLeft" :mouseEnterDelay="0.5">-->
|
||||
|
||||
@@ -65,10 +65,10 @@
|
||||
<a-tab-pane :key="$t('whole')" :tab="$t('whole')"></a-tab-pane>
|
||||
<a-tab-pane :key="$t('DocumentLibrary')" :tab="$t('DocumentLibrary')" force-render>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane :key="$t('problemKnowledgeBase')" :tab="$t('problemKnowledgeBase')" force-render>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane :key="$t('monthlyReportRegulations')" :tab="$t('monthlyReportRegulations')" force-render>
|
||||
</a-tab-pane>
|
||||
<!-- <a-tab-pane :key="$t('problemKnowledgeBase')" :tab="$t('problemKnowledgeBase')" force-render>-->
|
||||
<!-- </a-tab-pane>-->
|
||||
<!-- <a-tab-pane :key="$t('monthlyReportRegulations')" :tab="$t('monthlyReportRegulations')" force-render>-->
|
||||
<!-- </a-tab-pane>-->
|
||||
</a-tabs>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
import viewFileModel from '@/components/viewFileModel/index'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'evaluatorFeedback',
|
||||
@@ -345,9 +346,21 @@
|
||||
return
|
||||
}
|
||||
}
|
||||
if (this.$route.query.taskDefinitionKey == 'pgrqr'){
|
||||
let feedbackTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
this.dataSource[i].feedbackTime = feedbackTime
|
||||
}
|
||||
}
|
||||
callBack && callBack(this.dataSource)
|
||||
},
|
||||
preservationData(callBack) {
|
||||
if (this.$route.query.taskDefinitionKey == 'pgrqr'){
|
||||
let feedbackTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
this.dataSource[i].feedbackTime = feedbackTime
|
||||
}
|
||||
}
|
||||
callBack && callBack(this.dataSource)
|
||||
},
|
||||
accessoryFileClick(item) {
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
value.handlingTime = handlingTime
|
||||
Object.keys(value).forEach(res => {
|
||||
if (value[res] && value[res] instanceof String) {
|
||||
if (value[res] && typeof value[res] == 'string') {
|
||||
value[res] = value[res].replace(/\"/g, '“')
|
||||
value[res] = value[res].replace(/\'/g, '‘')
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
let operatorTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
value.operatorTime = operatorTime
|
||||
Object.keys(value).forEach(res => {
|
||||
if (value[res] && value[res] instanceof String) {
|
||||
if (value[res] && typeof value[res] == 'string') {
|
||||
value[res] = value[res].replace(/\"/g, '“')
|
||||
value[res] = value[res].replace(/\'/g, '‘')
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
value.handlingTime = handlingTime
|
||||
Object.keys(value).forEach(res => {
|
||||
if (value[res] && value[res] instanceof String) {
|
||||
if (value[res] && typeof value[res] == 'string') {
|
||||
value[res] = value[res].replace(/\"/g, '“')
|
||||
value[res] = value[res].replace(/\'/g, '‘')
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
let json = Object.assign(this.queryBy, value)
|
||||
let data = JSON.stringify(json).replace(/\"/g, '\'')
|
||||
Object.keys(value).forEach(res => {
|
||||
if (value[res] && value[res] instanceof String) {
|
||||
if (value[res] && typeof value[res] == 'string') {
|
||||
value[res] = value[res].replace(/\"/g, '“')
|
||||
value[res] = value[res].replace(/\'/g, '‘')
|
||||
}
|
||||
|
||||
@@ -1787,7 +1787,7 @@
|
||||
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
value.handlingTime = handlingTime
|
||||
Object.keys(value).forEach(res => {
|
||||
if (value[res] && value[res] instanceof String) {
|
||||
if (value[res] && typeof value[res] == 'string') {
|
||||
value[res] = value[res].replace(/\"/g, '“')
|
||||
value[res] = value[res].replace(/\'/g, '‘')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user