Merge branch 'master' into 'fix_bug_first_stage'

# Conflicts:
#   jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java
#   jero-web/src/common/lang/en-us.js
#   jero-web/src/common/lang/zh-cn.js
This commit is contained in:
肖文钰
2022-08-24 10:15:59 +08:00
45 changed files with 1746 additions and 706 deletions
@@ -928,7 +928,7 @@ UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Responsible Fi
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Filled by' WHERE `id` = 'a371f6d49781c0921a48f317d1ba69b6'; UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Filled by' WHERE `id` = 'a371f6d49781c0921a48f317d1ba69b6';
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Eng. Interface' WHERE `id` = '58c3d5a50c86be19d5ab0cd5ac4d6d8b'; UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Eng. Interface' WHERE `id` = '58c3d5a50c86be19d5ab0cd5ac4d6d8b';
-- 国家国旗表 增加旗帜 2022-08-16 -- 国家国旗表 增加旗帜 2022-08-16 已同步生产环境
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('14', NULL, NULL, NULL, NULL, NULL, '海湾地区', 'GCC', NULL, '/jero-boot/nationalFlag/GCC.png'); INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('14', NULL, NULL, NULL, NULL, NULL, '海湾地区', 'GCC', NULL, '/jero-boot/nationalFlag/GCC.png');
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('15', NULL, NULL, NULL, NULL, NULL, '巴西', 'Brazil', NULL, '/jero-boot/nationalFlag/Brazil.png'); INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('15', NULL, NULL, NULL, NULL, NULL, '巴西', 'Brazil', NULL, '/jero-boot/nationalFlag/Brazil.png');
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('16', NULL, NULL, NULL, NULL, NULL, '德国', 'Germany', NULL, '/jero-boot/nationalFlag/Germany.png'); INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('16', NULL, NULL, NULL, NULL, NULL, '德国', 'Germany', NULL, '/jero-boot/nationalFlag/Germany.png');
@@ -946,15 +946,15 @@ INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_ti
-- 删除之前的3中国香港 和8海湾地区 -- 删除之前的3中国香港 和8海湾地区
delete from country_national_flag where id in ('3','8'); delete from country_national_flag where id in ('3','8');
-- 法规流程历史表增加字段 审批意见 2022-08-16 -- 法规流程历史表增加字段 审批意见 2022-08-16 已同步生产环境
ALTER TABLE `laws_weilai`.`laws_process_history` ALTER TABLE `laws_weilai`.`laws_process_history`
ADD COLUMN `approval_opinion` varchar(2000) NULL COMMENT '审批意见' AFTER `flow_type`; ADD COLUMN `approval_opinion` varchar(2000) NULL COMMENT '审批意见' AFTER `flow_type`;
--- 用户表 删除工号唯一索引 2022-08-18 --- 用户表 删除工号唯一索引 2022-08-18 已同步生产环境
ALTER TABLE `laws_weilai`.`sys_user` ALTER TABLE `laws_weilai`.`sys_user`
DROP INDEX `uniq_sys_user_work_no`; DROP INDEX `uniq_sys_user_work_no`;
-- 工作流 流程表增加流程名称 英文字段 2022-08-19 -- 工作流 流程表增加流程名称 英文字段 2022-08-19 已同步生产环境
ALTER TABLE `laws_weilai_wkflow`.`bus_process_name` ALTER TABLE `laws_weilai_wkflow`.`bus_process_name`
ADD COLUMN `PRC_NAME_EN` varchar(255) NULL COMMENT '流程名称(英文)' AFTER `PROJECT_LAWS_INVENTORY_ID`; ADD COLUMN `PRC_NAME_EN` varchar(255) NULL COMMENT '流程名称(英文)' AFTER `PROJECT_LAWS_INVENTORY_ID`;
@@ -772,6 +772,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
OnlCgformField onlCgformField = fieldList.get(i); OnlCgformField onlCgformField = fieldList.get(i);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
String dbFieldName = onlCgformField.getDbFieldName(); String dbFieldName = onlCgformField.getDbFieldName();
if ("nio_number".equals(dbFieldName) || "params_name".equals(dbFieldName)) {
map.put("click3", true);
}
if ("description".equals(dbFieldName)) { if ("description".equals(dbFieldName)) {
indexOfDescription = i; indexOfDescription = i;
map.put("click2", true); map.put("click2", true);
@@ -1,6 +1,6 @@
package com.jero.modules.cert.report.controller; package com.jero.modules.cert.report.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
@@ -9,6 +9,7 @@ import com.jero.common.system.base.controller.JeroController;
import com.jero.modules.cert.report.entity.ParamsExportTemplateEO; import com.jero.modules.cert.report.entity.ParamsExportTemplateEO;
import com.jero.modules.cert.report.enums.ExportTemplateStateEnum; import com.jero.modules.cert.report.enums.ExportTemplateStateEnum;
import com.jero.modules.cert.report.service.IParamsExportTemplateEOService; import com.jero.modules.cert.report.service.IParamsExportTemplateEOService;
import com.jero.modules.ocr.util.LineHumpUtil;
import com.jero.modules.system.util.StringUtils; import com.jero.modules.system.util.StringUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@@ -61,9 +62,15 @@ public class ParamsExportTemplateEOController extends JeroController<ParamsExpor
paramsExportTemplateEO.setTemplateName(paramsExportTemplateEO.getTemplateName().replace("%", "\\%")); paramsExportTemplateEO.setTemplateName(paramsExportTemplateEO.getTemplateName().replace("%", "\\%"));
} }
LambdaQueryWrapper<ParamsExportTemplateEO> queryWrapper = new LambdaQueryWrapper<>(); if (StringUtils.isNotBlank(paramsExportTemplateEO.getOrderByField())) {
queryWrapper.like(StringUtils.isNotEmpty(paramsExportTemplateEO.getTemplateName()), ParamsExportTemplateEO::getTemplateName, paramsExportTemplateEO.getTemplateName()) paramsExportTemplateEO.setOrderByField(LineHumpUtil.humpToLine2(paramsExportTemplateEO.getOrderByField()));
.orderByDesc(ParamsExportTemplateEO::getCreateTime); }
QueryWrapper<ParamsExportTemplateEO> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().like(StringUtils.isNotEmpty(paramsExportTemplateEO.getTemplateName()), ParamsExportTemplateEO::getTemplateName, paramsExportTemplateEO.getTemplateName());
queryWrapper.orderBy(StringUtils.isNotBlank(paramsExportTemplateEO.getOrderByField()), "1".equals(paramsExportTemplateEO.getOrderBy())?true:false, paramsExportTemplateEO.getOrderByField())
.orderBy(StringUtils.isBlank(paramsExportTemplateEO.getOrderByField()), false, "create_time"); // 默认按创建时间降序
Page<ParamsExportTemplateEO> page = new Page<ParamsExportTemplateEO>(pageNo, pageSize); Page<ParamsExportTemplateEO> page = new Page<ParamsExportTemplateEO>(pageNo, pageSize);
IPage<ParamsExportTemplateEO> pageList = paramsExportTemplateEOService.page(page, queryWrapper); IPage<ParamsExportTemplateEO> pageList = paramsExportTemplateEOService.page(page, queryWrapper);
// 处理 状态 中英文 // 处理 状态 中英文
@@ -85,4 +85,10 @@ public class ParamsExportTemplateEO implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private String state_dictText; private String state_dictText;
//排序
@TableField(exist = false)
private String orderBy; // 顺序 1-升序, 2-降序
@TableField(exist = false)
private String orderByField; // 字段
} }
@@ -1,6 +1,6 @@
package com.jero.modules.cert.template.controller; package com.jero.modules.cert.template.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
@@ -9,6 +9,7 @@ import com.jero.common.constant.enums.CutEnum;
import com.jero.common.system.base.controller.JeroController; import com.jero.common.system.base.controller.JeroController;
import com.jero.modules.cert.template.entity.ParamsTemplateEO; import com.jero.modules.cert.template.entity.ParamsTemplateEO;
import com.jero.modules.cert.template.service.IParamsTemplateEOService; import com.jero.modules.cert.template.service.IParamsTemplateEOService;
import com.jero.modules.ocr.util.LineHumpUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@@ -62,11 +63,17 @@ public class ParamsTemplateEOController extends JeroController<ParamsTemplateEO,
paramsTemplateEO.setParamsTemplateName(paramsTemplateEO.getParamsTemplateName().replace("%","\\%")); paramsTemplateEO.setParamsTemplateName(paramsTemplateEO.getParamsTemplateName().replace("%","\\%"));
} }
LambdaQueryWrapper<ParamsTemplateEO> queryWrapper = new LambdaQueryWrapper<>(); if (StringUtils.isNotBlank(paramsTemplateEO.getOrderByField())) {
queryWrapper.like(StringUtils.isNotEmpty(paramsTemplateEO.getParamsTemplateName()), ParamsTemplateEO::getParamsTemplateName, paramsTemplateEO.getParamsTemplateName()) paramsTemplateEO.setOrderByField(LineHumpUtil.humpToLine2(paramsTemplateEO.getOrderByField()));
.eq(StringUtils.isNotEmpty(paramsTemplateEO.getRegion()), ParamsTemplateEO::getRegion, paramsTemplateEO.getRegion()) }
QueryWrapper<ParamsTemplateEO> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().like(StringUtils.isNotEmpty(paramsTemplateEO.getParamsTemplateName()), ParamsTemplateEO::getParamsTemplateName, paramsTemplateEO.getParamsTemplateName())
.eq(StringUtils.isNotEmpty(paramsTemplateEO.getRegion()), ParamsTemplateEO::getRegion, paramsTemplateEO.getRegion());
// .eq(StringUtils.isNotEmpty(paramsTemplateEO.getState()), ParamsTemplateEO::getState, paramsTemplateEO.getState()) // .eq(StringUtils.isNotEmpty(paramsTemplateEO.getState()), ParamsTemplateEO::getState, paramsTemplateEO.getState())
.orderByDesc(ParamsTemplateEO::getUpdateTime); queryWrapper.orderBy(StringUtils.isNotBlank(paramsTemplateEO.getOrderByField()), "1".equals(paramsTemplateEO.getOrderBy())?true:false, paramsTemplateEO.getOrderByField())
.orderBy(StringUtils.isBlank(paramsTemplateEO.getOrderByField()), false, "update_time");
Page<ParamsTemplateEO> page = new Page<ParamsTemplateEO>(pageNo, pageSize); Page<ParamsTemplateEO> page = new Page<ParamsTemplateEO>(pageNo, pageSize);
IPage<ParamsTemplateEO> pageList = paramsTemplateEOService.page(page, queryWrapper); IPage<ParamsTemplateEO> pageList = paramsTemplateEOService.page(page, queryWrapper);
return Result.OK(cut, pageList); return Result.OK(cut, pageList);
@@ -1,6 +1,7 @@
package com.jero.modules.cert.template.entity; package com.jero.modules.cert.template.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
@@ -86,4 +87,10 @@ public class ParamsTemplateEO implements Serializable {
@ApiModelProperty(value = "当前版本") @ApiModelProperty(value = "当前版本")
private java.lang.Integer version; private java.lang.Integer version;
//排序
@TableField(exist = false)
private String orderBy; // 顺序 1-升序, 2-降序
@TableField(exist = false)
private String orderByField; // 字段
} }
@@ -161,13 +161,12 @@ public class SarFileCompareItemCommentController extends JeroController<SarFileC
@AutoLog(value = "文档对比信息条款评论表-导出结果") @AutoLog(value = "文档对比信息条款评论表-导出结果")
@ApiOperation(value = "文档对比信息条款评论表-导出结果", notes = "文档对比信息条款评论表-导出结果") @ApiOperation(value = "文档对比信息条款评论表-导出结果", notes = "文档对比信息条款评论表-导出结果")
@GetMapping(value = "/exportResXls") @GetMapping(value = "/exportResXls")
public Result<?> exportResXls(@RequestParam(name = "infoId", required = true) String infoId, public void exportResXls(@RequestParam(name = "infoId", required = true) String infoId,
@RequestParam(name = "selectIds", required = true) String selectIds, @RequestParam(name = "selectIds", required = true) String selectIds,
@RequestParam(name = "includeComments", required = true) boolean includeComments, @RequestParam(name = "includeComments", required = true) boolean includeComments,
@RequestParam(name = "cut", required = true) String cut, @RequestParam(name = "cut", required = true) String cut,
HttpServletResponse response) { HttpServletResponse response) {
sarFileCompareItemCommentService.exportResXls(response, infoId, selectIds, includeComments, cut); sarFileCompareItemCommentService.exportResXls(response, infoId, selectIds, includeComments, cut);
return Result.OK();
} }
} }
@@ -188,7 +188,13 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
response.setHeader("Content-Disposition", "attachment; filename=" + fileName); response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
response.setContentType("application/force-download"); response.setContentType("application/force-download");
//创建工作表对象 //创建工作表对象
Sheet sheet = workbook.createSheet("对比结果"); String sheetName = "对比结果";
if (CutEnum.CN.getValue().equals(cut)) {
sheetName = "对比结果";
} else {
sheetName = "Comparing results";
}
Sheet sheet = workbook.createSheet(sheetName);
// 创建头部 // 创建头部
String header = ""; String header = "";
@@ -197,14 +203,17 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
} else { } else {
header = "Number,Title,Content,Number,Title,Content,Comment"; header = "Number,Title,Content,Number,Title,Content,Comment";
} }
int[] columnWidth = {5000, 5000, 10000, 5000, 5000, 10000, 10000};
CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象 CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象
cellStyle.setAlignment(HorizontalAlignment.CENTER); cellStyle.setAlignment(HorizontalAlignment.LEFT);
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
cellStyle.setWrapText(true); cellStyle.setWrapText(true);
Row rowHeader = sheet.createRow(0);//开始创建标题行 Row rowHeader = sheet.createRow(0);//开始创建标题行
if (StringUtils.isNotBlank(header)) { if (StringUtils.isNotBlank(header)) {
String[] headerArr = header.split(","); String[] headerArr = header.split(",");
for (int i = 0; i < headerArr.length; i++) { for (int i = 0; i < headerArr.length; i++) {
rowHeader.createCell(i).setCellValue(headerArr[i]); rowHeader.createCell(i).setCellValue(headerArr[i]);
sheet.setColumnWidth(i, columnWidth[i]);
} }
} }
int i = 1; int i = 1;
@@ -219,18 +228,28 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
String text = itemLeft.getItemsText(); String text = itemLeft.getItemsText();
text = text.replace("<p>", "").replace("</p>", "\r\n"); text = text.replace("<p>", "").replace("</p>", "\r\n");
row.createCell(2).setCellValue(text); row.createCell(2).setCellValue(text);
row.setRowStyle(cellStyle);
} }
} }
String itemIdRight = itemComment.getItemsIdRight(); String itemIdRight = itemComment.getItemsIdRight();
SarFileCompareItem itemRight = sfcItemMap.get(itemIdRight); if (!StringUtils.isEmpty(itemIdRight)) {
if (null != itemRight) { SarFileCompareItem itemRight = sfcItemMap.get(itemIdRight);
row.createCell(3).setCellValue(itemRight.getItemsNum()); if (null != itemRight) {
row.createCell(4).setCellValue(itemRight.getItemsName()); row.createCell(3).setCellValue(itemRight.getItemsNum());
String text = itemRight.getItemsText(); row.createCell(4).setCellValue(itemRight.getItemsName());
text = text.replace("<p>", "").replace("</p>", "\r\n"); String text = itemRight.getItemsText();
row.createCell(5).setCellValue(text); text = text.replace("<p>", "").replace("</p>", "\r\n");
row.createCell(5).setCellValue(text);
row.setRowStyle(cellStyle);
}
} }
row.createCell(6).setCellValue(itemComment.getComment()); row.createCell(6).setCellValue(itemComment.getComment());
for (int j = 0; j < 7; j++) {
Cell cell = row.getCell(j);
if (null != cell) {
cell.setCellStyle(cellStyle);
}
}
i++; i++;
} }
if (includeComments || StringUtils.isEmpty(selectIds)) { if (includeComments || StringUtils.isEmpty(selectIds)) {
@@ -245,13 +264,10 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
sheet.addMergedRegion(rangeAddress); sheet.addMergedRegion(rangeAddress);
SarFileCompareInfo compareInfo = sarFileCompareInfoServiceImpl.queryById(infoId); SarFileCompareInfo compareInfo = sarFileCompareInfoServiceImpl.queryById(infoId);
row.createCell(1).setCellValue(compareInfo.getComments()); row.createCell(1).setCellValue(compareInfo.getComments());
row.getCell(1).setCellStyle(cellStyle);
} }
for (int j = 0; j < 7; j++) {
sheet.autoSizeColumn(j, true);//设置列宽
}
os = response.getOutputStream(); os = response.getOutputStream();
// File file = new File("C://work/ee.xlsx");
// os = new FileOutputStream(file);
workbook.write(os); workbook.write(os);
os.flush(); os.flush();
} catch (IOException e) { } catch (IOException e) {
@@ -21,6 +21,7 @@ import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService; import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.util.HttpRequestUtil; import com.jero.modules.system.util.HttpRequestUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -565,69 +566,111 @@ public class FeishuServiceImpl implements IFeishuService {
headerMap.put("Authorization", "Bearer " + token); headerMap.put("Authorization", "Bearer " + token);
headerMap.put("Content-Type", "application/json; charset=utf-8"); headerMap.put("Content-Type", "application/json; charset=utf-8");
String sendJson = " {\n" + //参考:https://open.feishu.cn/tool/cardbuilder?from=openplantform_mcb_entrance
" \"config\": {\n" + /*String sendJson = "{\n" +
" \"wide_screen_mode\": true\n" +
" },\n" +
" \"header\": {\n" + " \"header\": {\n" +
" \"template\": \"green\",\n" +
" \"title\": {\n" + " \"title\": {\n" +
" \"tag\": \"plain_text\",\n" + " \"content\": \"知识库分类负责人\",\n" +
" \"content\": \"点击下方的分类查看常见问题\"\n" + " \"tag\": \"plain_text\"\n" +
" },\n" + " }\n" +
" \"template\": \"green\"\n" + " },\n" +
" \"elements\": [\n" +
" {\n" +
" \"fields\": [\n" +
" {\n" +
" \"is_short\": true,\n" +
" \"text\": {\n" +
" \"content\": \"**\uD83D\uDC64 提交人:**\\n<at id=fag43ef3></at>\",\n" +
" \"tag\": \"lark_md\"\n" +
" }\n" +
" }\n" +
" ],\n" +
" \"tag\": \"div\"\n" +
" }\n" +
" ]\n" +
"}";*/
String sendJson = "{\n" +
" \"header\": {\n" +
" \"template\": \"green\",\n" +
" \"title\": {\n" +
" \"content\": \"知识库分类负责人\",\n" +
" \"tag\": \"plain_text\"\n" +
" }\n" +
" }\n" + " }\n" +
"}"; "}";
JSONObject jsonObject = JSONObject.parseObject(sendJson); JSONObject jsonObject = JSONObject.parseObject(sendJson);
JSONArray elements = new JSONArray(); JSONArray elements = new JSONArray();
JSONObject element = new JSONObject(); JSONObject element = new JSONObject();
element.put("tag","action"); JSONArray fields = new JSONArray();
element.put("layout","bisected");
//获取分类 //获取分类
List<ProblemKnowledgeBaseClassifyEO> problemKnowledgeBaseClassifyEOList = this.problemKnowledgeBaseClassifyEOService.list(); List<ProblemKnowledgeBaseClassifyEO> problemKnowledgeBaseClassifyEOList = this.problemKnowledgeBaseClassifyEOService.list();
this.problemKnowledgeBaseClassifyEOService.disposeData(problemKnowledgeBaseClassifyEOList); this.problemKnowledgeBaseClassifyEOService.disposeData(problemKnowledgeBaseClassifyEOList);
JSONArray actions = new JSONArray(); //获取所有分类下的负责人信息
List<String> chargePersonUserIdList = new ArrayList<>();
//组装推送过去的点击按钮
for (ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO : problemKnowledgeBaseClassifyEOList) { for (ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO : problemKnowledgeBaseClassifyEOList) {
JSONObject buttonObject = new JSONObject(); if(StringUtils.isNotEmpty(problemKnowledgeBaseClassifyEO.getChargePersonId())){
JSONObject text = new JSONObject(); String chargePersonId = problemKnowledgeBaseClassifyEO.getChargePersonId();
JSONObject value = new JSONObject(); for (String chargePerson : chargePersonId.split(",")) {
buttonObject.put("tag","button"); chargePersonUserIdList.add(chargePerson);
}
text.put("tag","plain_text"); }
text.put("content",problemKnowledgeBaseClassifyEO.getProblemLabel() + " [" + problemKnowledgeBaseClassifyEO.getChargePersonIdName() + "]");
value.put("chosen",problemKnowledgeBaseClassifyEO.getChargePersonId());
buttonObject.put("text",text);
buttonObject.put("type","primary");
buttonObject.put("value",value);
actions.add(buttonObject);
} }
element.put("actions",actions); if(CollectionUtils.isNotEmpty(chargePersonUserIdList)){
List<SysUser> chargePersonUserList = this.sysUserService.querySysUserListByIdList(chargePersonUserIdList);
//组装推送过去的知识库负责人信息
for (ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO : problemKnowledgeBaseClassifyEOList) {
JSONObject field = new JSONObject();
JSONObject text = new JSONObject();
StringBuilder atUserSb = new StringBuilder();
elements.add(element); if(StringUtils.isNotEmpty(problemKnowledgeBaseClassifyEO.getChargePersonId())){
jsonObject.put("elements",elements); for (String chargePersonId : problemKnowledgeBaseClassifyEO.getChargePersonId().split(",")) {
// 设置请求参数 for (SysUser sysUser : chargePersonUserList) {
JSONObject paramsMap = new JSONObject(); if(StringUtils.equals(chargePersonId,sysUser.getId())){
paramsMap.put("user_ids", userIds); String thirdId = sysUser.getThirdId();
paramsMap.put("msg_type", "interactive"); atUserSb.append("<at id=" + thirdId + "></at>");
paramsMap.put("card", jsonObject); atUserSb.append(" ");
}
}
}
}
// 发送请求给飞书 text.put("content","问题标签:" + problemKnowledgeBaseClassifyEO.getProblemLabel() + "\n" + "责任人:" + atUserSb.toString());
String response = null; text.put("tag","lark_md");
try {
response = HttpRequestUtil.getResponseOfPOST(batchSendMessageUrl, headerMap, paramsMap.toJSONString()); field.put("is_short",true);
} catch (IOException e) { field.put("text",text);
e.printStackTrace(); fields.add(field);
} }
// 获取返回结果
JSONObject tokenJson = JSONObject.parseObject(response); element.put("tag","div");
if(!tokenJson.get("code").toString().equals("0")) { element.put("fields",fields);
log.error("请求出现异常:" + tokenJson.get("msg") + " " + tokenJson); elements.add(element);
jsonObject.put("elements",elements);
// 设置请求参数
JSONObject paramsMap = new JSONObject();
paramsMap.put("user_ids", userIds);
paramsMap.put("msg_type", "interactive");
paramsMap.put("card", jsonObject);
// 发送请求给飞书
String response = null;
try {
response = HttpRequestUtil.getResponseOfPOST(batchSendMessageUrl, headerMap, paramsMap.toJSONString());
} catch (IOException e) {
e.printStackTrace();
}
// 获取返回结果
JSONObject tokenJson = JSONObject.parseObject(response);
if(!tokenJson.get("code").toString().equals("0")) {
log.error("请求出现异常:" + tokenJson.get("msg") + " " + tokenJson);
}
} }
} }
@@ -92,6 +92,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
//如果展示权限是公开,则把该数据插入到搜索中心中。 //如果展示权限是公开,则把该数据插入到搜索中心中。
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO); this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
} }
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
} }
/** /**
@@ -142,11 +143,14 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
} }
} }
//获取所有市场
List<DictModel> targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
//sbCn sbEn 这两个字段作为es中英文切换 //sbCn sbEn 这两个字段作为es中英文切换
StringBuilder sbCn = new StringBuilder(); StringBuilder sbCn = new StringBuilder();
esFullText(problemKnowledgeBaseEO,sbCn,null,CutEnum.CN.getValue(),fileTextSb.toString()); esFullText(problemKnowledgeBaseEO,sbCn,null,CutEnum.CN.getValue(),fileTextSb.toString(),targetMarketList);
StringBuilder sbEn = new StringBuilder(); StringBuilder sbEn = new StringBuilder();
esFullText(problemKnowledgeBaseEO,null,sbEn,CutEnum.EN.getValue(),fileTextSb.toString()); esFullText(problemKnowledgeBaseEO,null,sbEn,CutEnum.EN.getValue(),fileTextSb.toString(),targetMarketList);
Map<String, Object> stringMapCn = new HashMap<>(); Map<String, Object> stringMapCn = new HashMap<>();
this.problemKnowledgeBaseEOConvertMapByCut(problemKnowledgeBaseEO,CutEnum.EN.getValue(),stringMapCn); this.problemKnowledgeBaseEOConvertMapByCut(problemKnowledgeBaseEO,CutEnum.EN.getValue(),stringMapCn);
@@ -216,10 +220,11 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
} }
} }
public void esFullText(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,StringBuilder sbCn,StringBuilder sbEn,String cut,String fileText){ 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.equals(cut,CutEnum.CN.getValue())){
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions_dicText())){ if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions())){
sbCn.append("展示权限" + ":" + problemKnowledgeBaseEO.getShowPermissions_dicText() + " "); String textByValue = ShowPermissionsEnum.getTextByValue(problemKnowledgeBaseEO.getShowPermissions(), cut);
sbCn.append("展示权限" + ":" + textByValue + " ");
}else { }else {
sbCn.append("展示权限" + ":" + "-- "); sbCn.append("展示权限" + ":" + "-- ");
} }
@@ -236,8 +241,19 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
sbCn.append("问题分类" + ":" + "-- "); sbCn.append("问题分类" + ":" + "-- ");
} }
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getTargetMarket_dicText())){ if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getTargetMarket())){
sbCn.append("市场" + ":" + problemKnowledgeBaseEO.getTargetMarket_dicText() + " "); String[] targetMarketArr = problemKnowledgeBaseEO.getTargetMarket().split(",");
String targetMarket = targetMarketList.stream().filter(e -> {
boolean flag = false;
for (String s : targetMarketArr) {
if (StringUtils.equals(s, e.getValue())) {
flag = true;
}
}
return flag;
}).map(DictModel::getText).collect(Collectors.joining(","));
sbCn.append("市场" + ":" + targetMarket + " ");
}else { }else {
sbCn.append("市场" + ":" + "-- "); sbCn.append("市场" + ":" + "-- ");
} }
@@ -255,8 +271,10 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
}*/ }*/
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){ if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){
sbCn.append("</br>");
sbCn.append("内容" + ":" + problemKnowledgeBaseEO.getContent() + " "); sbCn.append("内容" + ":" + problemKnowledgeBaseEO.getContent() + " ");
}else { }else {
sbCn.append("</br>");
sbCn.append("内容" + ":" + "-- "); sbCn.append("内容" + ":" + "-- ");
} }
@@ -268,7 +286,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){ }else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions())){ if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions())){
sbEn.append("Display permission" + ":" + problemKnowledgeBaseEO.getShowPermissions() + " "); String textByValue = ShowPermissionsEnum.getTextByValue(problemKnowledgeBaseEO.getShowPermissions(), cut);
sbEn.append("Display permission" + ":" + textByValue + " ");
}else { }else {
sbEn.append("Display permission" + ":" + "-- "); sbEn.append("Display permission" + ":" + "-- ");
} }
@@ -286,7 +305,18 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
} }
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getTargetMarket())){ if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getTargetMarket())){
sbEn.append("Market" + ":" + problemKnowledgeBaseEO.getTargetMarket() + " "); String[] targetMarketArr = problemKnowledgeBaseEO.getTargetMarket().split(",");
String targetMarket = targetMarketList.stream().filter(e -> {
boolean flag = false;
for (String s : targetMarketArr) {
if (StringUtils.equals(s, e.getValue())) {
flag = true;
}
}
return flag;
}).map(DictModel::getTextEn).collect(Collectors.joining(","));
sbEn.append("Market" + ":" + targetMarket + " ");
}else { }else {
sbEn.append("Market" + ":" + "-- "); sbEn.append("Market" + ":" + "-- ");
} }
@@ -304,8 +334,10 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
}*/ }*/
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){ if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){
sbEn.append("</br>");
sbEn.append("Content" + ":" + problemKnowledgeBaseEO.getContent() + " "); sbEn.append("Content" + ":" + problemKnowledgeBaseEO.getContent() + " ");
}else { }else {
sbEn.append("</br>");
sbEn.append("Content" + ":" + "-- "); sbEn.append("Content" + ":" + "-- ");
} }
@@ -349,6 +381,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
convertAfterMap.put("standard_title",problemKnowledgeBaseEO.getStandTitle()); convertAfterMap.put("standard_title",problemKnowledgeBaseEO.getStandTitle());
convertAfterMap.put("content",problemKnowledgeBaseEO.getContent()); convertAfterMap.put("content",problemKnowledgeBaseEO.getContent());
convertAfterMap.put("createTime",problemKnowledgeBaseEO.getCreateTime()); convertAfterMap.put("createTime",problemKnowledgeBaseEO.getCreateTime());
convertAfterMap.put("show_permissions",problemKnowledgeBaseEO.getShowPermissions());
} }
} }
@@ -367,10 +400,10 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
//如果该条问题知识库的展示权限为私密,则创建权限表数据 //如果该条问题知识库的展示权限为私密,则创建权限表数据
if(StringUtils.equals(problemKnowledgeBaseEO.getShowPermissions(), ShowPermissionsEnum.PRIVACY.getValue())){ if(StringUtils.equals(problemKnowledgeBaseEO.getShowPermissions(), ShowPermissionsEnum.PRIVACY.getValue())){
this.batchInsertProblemKnowledgeBaseUserEO(problemKnowledgeBaseEO); this.batchInsertProblemKnowledgeBaseUserEO(problemKnowledgeBaseEO);
this.deleteElasticsearchData(problemKnowledgeBaseEO.getId()); //this.deleteElasticsearchData(problemKnowledgeBaseEO.getId());
}else {
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
} }
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
} }
/** /**
@@ -1,26 +1,28 @@
package com.jero.modules.project.controller; package com.jero.modules.project.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.project.entity.ConditionAssessmentEO;
import com.jero.modules.project.service.IConditionAssessmentEOService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.system.base.controller.JeroController; import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.project.entity.ConditionAssessmentEO;
import com.jero.modules.project.service.IConditionAssessmentEOService;
import com.jero.modules.project.vo.ConditionAssessmentVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import javax.servlet.http.HttpServletRequest;
import com.jero.common.aspect.annotation.AutoLog; import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/** /**
@@ -181,4 +183,16 @@ public class ConditionAssessmentEOController extends JeroController<ConditionAss
return conditionAssessmentEOService.addOrUpdate(conditionAssessmentEO); return conditionAssessmentEOService.addOrUpdate(conditionAssessmentEO);
} }
/**
* 批量添加或修改
*
* @param conditionAssessmentVO
* @return
*/
@AutoLog(value = "任务清单-项目状态评估表-批量添加或修改")
@ApiOperation(value="任务清单-项目状态评估表-批量添加或修改", notes="任务清单-项目状态评估表-批量添加或修改")
@PostMapping(value = "/addOrUpdateBatch")
public Result<?> addOrUpdateConditionAssessmentBatch(@RequestBody ConditionAssessmentVO conditionAssessmentVO) {
return conditionAssessmentEOService.addOrUpdateBatch(conditionAssessmentVO);
}
} }
@@ -1,27 +1,27 @@
package com.jero.modules.project.controller; package com.jero.modules.project.controller;
import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.system.base.controller.JeroController; import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
import com.jero.modules.project.vo.ProjectTaskInventoryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api; import javax.servlet.http.HttpServletRequest;
import io.swagger.annotations.ApiOperation; import javax.servlet.http.HttpServletResponse;
import com.jero.common.aspect.annotation.AutoLog; import java.util.Arrays;
import java.util.List;
/** /**
@@ -203,4 +203,32 @@ public class ProjectTaskInventoryEOController extends JeroController<ProjectTask
public Result<?> remindDispose(@RequestBody JSONObject jsonObject){ public Result<?> remindDispose(@RequestBody JSONObject jsonObject){
return this.projectTaskInventoryEOService.remindDispose(jsonObject); return this.projectTaskInventoryEOService.remindDispose(jsonObject);
} }
/**
* 编辑
*
* @param projectTaskInventoryVO
* @return
*/
@AutoLog(value = "项目库-任务清单表-批量维护进度")
@ApiOperation(value="项目库-任务清单表-批量维护进度", notes="项目库-任务清单表-批量维护进度")
@PostMapping(value = "/editBatch")
public Result<?> editCertificationProgressBatch(@RequestBody ProjectTaskInventoryVO projectTaskInventoryVO) {
projectTaskInventoryEOService.editBatch(projectTaskInventoryVO);
return Result.OK("编辑成功!");
}
/**
* 认证进度和当前状态修改时,校验角色是否符合
*
* @param projectTaskInventoryVO
* @return
*/
@AutoLog(value = "项目库-任务清单表-校验角色是否符合")
@ApiOperation(value="项目库-任务清单表-校验角色是否符合", notes="项目库-任务清单表-校验角色是否符合")
@PostMapping(value = "/verifyRoleCode")
public Result<?> verifyRoleCode(@RequestBody ProjectTaskInventoryVO projectTaskInventoryVO) {
List<String> msgList = projectTaskInventoryEOService.verifyRoleCode(projectTaskInventoryVO);
return Result.OK(msgList);
}
} }
@@ -1,11 +1,11 @@
package com.jero.modules.project.service; package com.jero.modules.project.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
import com.jero.common.system.vo.LoginUser; import com.jero.common.system.vo.LoginUser;
import com.jero.modules.project.entity.ConditionAssessmentEO; import com.jero.modules.project.entity.ConditionAssessmentEO;
import com.jero.modules.project.entity. ConditionAssessmentEO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.modules.project.entity.ProjectTaskInventoryEO; import com.jero.modules.project.entity.ProjectTaskInventoryEO;
import com.jero.modules.project.vo.ConditionAssessmentVO;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -92,4 +92,10 @@ public interface IConditionAssessmentEOService extends IService<ConditionAssessm
* @return * @return
*/ */
List<Map<String,Object>> getProjectStatusAssessStatisticsGroupByTerritory(Map<String,Object> params); List<Map<String,Object>> getProjectStatusAssessStatisticsGroupByTerritory(Map<String,Object> params);
/**
* 任务清单-项目状态评估表-批量添加或修改
* @param conditionAssessmentVO
*/
Result<?> addOrUpdateBatch(ConditionAssessmentVO conditionAssessmentVO);
} }
@@ -1,9 +1,10 @@
package com.jero.modules.project.service; package com.jero.modules.project.service;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
import com.jero.modules.project.entity.ProjectTaskInventoryEO; import com.jero.modules.project.entity.ProjectTaskInventoryEO;
import com.baomidou.mybatisplus.extension.service.IService; import com.jero.modules.project.vo.ProjectTaskInventoryVO;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@@ -84,5 +85,21 @@ public interface IProjectTaskInventoryEOService extends IService<ProjectTaskInve
*/ */
void deleteByProjectLawsInventoryIds(List<String> projectLawsInventoryIds); void deleteByProjectLawsInventoryIds(List<String> projectLawsInventoryIds);
/**
* 批量更新认证进度
*
* @param projectTaskInventoryVO
* @return
*/
void editBatch(ProjectTaskInventoryVO projectTaskInventoryVO);
/**
* 校验角色是否符合
*
* @param projectTaskInventoryVO
* @return
*/
List<String> verifyRoleCode(ProjectTaskInventoryVO projectTaskInventoryVO);
void exportXls(HttpServletResponse response, HttpServletRequest request, ProjectTaskInventoryEO projectTaskInventoryEO); void exportXls(HttpServletResponse response, HttpServletRequest request, ProjectTaskInventoryEO projectTaskInventoryEO);
} }
@@ -1,6 +1,7 @@
package com.jero.modules.project.service.impl; package com.jero.modules.project.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
import com.jero.common.system.vo.LoginUser; import com.jero.common.system.vo.LoginUser;
import com.jero.modules.project.entity.ConditionAssessmentEO; import com.jero.modules.project.entity.ConditionAssessmentEO;
@@ -8,6 +9,7 @@ import com.jero.modules.project.entity.ProjectTaskInventoryEO;
import com.jero.modules.project.enums.ProjectRoleEnum; import com.jero.modules.project.enums.ProjectRoleEnum;
import com.jero.modules.project.mapper.ConditionAssessmentEOMapper; import com.jero.modules.project.mapper.ConditionAssessmentEOMapper;
import com.jero.modules.project.service.IConditionAssessmentEOService; import com.jero.modules.project.service.IConditionAssessmentEOService;
import com.jero.modules.project.vo.ConditionAssessmentVO;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
@@ -16,8 +18,6 @@ import org.springframework.stereotype.Service;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/** /**
* @Description: 任务清单-项目状态评估表 * @Description: 任务清单-项目状态评估表
* @Author: jero-boot * @Author: jero-boot
@@ -251,4 +251,70 @@ public class ConditionAssessmentEOServiceImpl extends ServiceImpl<ConditionAsses
} }
return result; return result;
} }
@Override
public Result<?> addOrUpdateBatch(ConditionAssessmentVO conditionAssessmentVO) {
List<String> projectLawsInventoryIdList = Arrays.asList(conditionAssessmentVO.getProjectLawsInventoryIds().split(","));
List<String> roleCodeListOld = Arrays.asList(conditionAssessmentVO.getRoleCodes().split(","));
for (int i=0; i < projectLawsInventoryIdList.size(); i++) {
String projectLawsInventoryId = projectLawsInventoryIdList.get(i);
String roleCode = roleCodeListOld.get(i);
List<String> roleCodeList = new ArrayList<>();
List<ConditionAssessmentEO> list = new ArrayList<>();
if (StringUtils.equals(roleCode, ProjectRoleEnum.REGULATI_ENGINEER.getValue())) {
roleCodeList.add(ProjectRoleEnum.REGULATI_ENGINEER.getValue());
ConditionAssessmentEO regulatiEngineer = new ConditionAssessmentEO();
regulatiEngineer.setProjectLawsInventoryId(projectLawsInventoryId);
regulatiEngineer.setConditionAssessment(conditionAssessmentVO.getConditionAssessment());
regulatiEngineer.setRemark(conditionAssessmentVO.getRemark());
regulatiEngineer.setRoleCode(ProjectRoleEnum.REGULATI_ENGINEER.getValue());
list.add(regulatiEngineer);
} else if (StringUtils.equals(roleCode, ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue())) {
roleCodeList.add(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue());
ConditionAssessmentEO homologationEngineer = new ConditionAssessmentEO();
homologationEngineer.setProjectLawsInventoryId(projectLawsInventoryId);
homologationEngineer.setConditionAssessment(conditionAssessmentVO.getConditionAssessment());
homologationEngineer.setRemark(conditionAssessmentVO.getRemark());
homologationEngineer.setRoleCode(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue());
list.add(homologationEngineer);
} else if (StringUtils.equals(roleCode, ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue())) {
roleCodeList.add(ProjectRoleEnum.REGULATI_ENGINEER.getValue());
roleCodeList.add(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue());
ConditionAssessmentEO regulatiEngineer = new ConditionAssessmentEO();
regulatiEngineer.setProjectLawsInventoryId(projectLawsInventoryId);
regulatiEngineer.setConditionAssessment(conditionAssessmentVO.getConditionAssessment());
regulatiEngineer.setRemark(conditionAssessmentVO.getRemark());
regulatiEngineer.setRoleCode(ProjectRoleEnum.REGULATI_ENGINEER.getValue());
ConditionAssessmentEO homologationEngineer = new ConditionAssessmentEO();
homologationEngineer.setProjectLawsInventoryId(projectLawsInventoryId);
homologationEngineer.setConditionAssessment(conditionAssessmentVO.getConditionAssessment());
homologationEngineer.setRemark(conditionAssessmentVO.getRemark());
homologationEngineer.setRoleCode(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue());
list.add(regulatiEngineer);
list.add(homologationEngineer);
}
if(CollectionUtils.isNotEmpty(list)){
QueryWrapper<ConditionAssessmentEO> deleteWrapper = new QueryWrapper<>();
deleteWrapper.lambda().eq(ConditionAssessmentEO::getProjectLawsInventoryId,projectLawsInventoryId);
deleteWrapper.lambda().in(ConditionAssessmentEO::getRoleCode,roleCodeList);
this.baseMapper.delete(deleteWrapper);
saveBatch(list);
}
}
return Result.ok();
}
} }
@@ -4922,10 +4922,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//存在文档库没有的数据 //存在文档库没有的数据
List<String> collect = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList()); List<String> collect = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
List<String> serialNumbers = serialNumberList.stream().filter(e -> !collect.contains(e)).collect(Collectors.toList()); List<String> serialNumbers = serialNumberList.stream().filter(e -> !collect.contains(e)).collect(Collectors.toList());
if(CutEnum.CN.getValue().equals(dataList.get(0).getCut())){ if(serialNumbers.size() > 0){
throw new JeroBootException(StringUtils.join(serialNumbers,",")+"文档库中不存在,不能添加"); if(CutEnum.CN.getValue().equals(dataList.get(0).getCut())){
}else{ throw new JeroBootException(StringUtils.join(serialNumbers,",")+"文档库中不存在,不能添加");
throw new JeroBootException(StringUtils.join(serialNumbers,",")+" does not exist in the document library and cannot be added"); }else{
throw new JeroBootException(StringUtils.join(serialNumbers,",")+" does not exist in the document library and cannot be added");
}
} }
} }
@@ -18,6 +18,7 @@ import com.jero.modules.project.service.IConditionAssessmentEOService;
import com.jero.modules.project.service.IProjectLawsInventoryEOService; import com.jero.modules.project.service.IProjectLawsInventoryEOService;
import com.jero.modules.project.service.IProjectTaskInventoryEOService; import com.jero.modules.project.service.IProjectTaskInventoryEOService;
import com.jero.modules.project.util.SendMessageUtils; import com.jero.modules.project.util.SendMessageUtils;
import com.jero.modules.project.vo.ProjectTaskInventoryVO;
import com.jero.modules.system.entity.SysDictItem; import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.mapper.SysUserMapper; import com.jero.modules.system.mapper.SysUserMapper;
@@ -459,6 +460,96 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
this.baseMapper.delete(deleteWrapper); this.baseMapper.delete(deleteWrapper);
} }
@Override
public void editBatch(ProjectTaskInventoryVO projectTaskInventoryVO) {
List<String> idList = Arrays.asList(projectTaskInventoryVO.getIds().split(","));
List<ProjectTaskInventoryEO> updateEOList = new ArrayList<>();
for (String id : idList) {
ProjectTaskInventoryEO updateEO = new ProjectTaskInventoryEO();
updateEO.setId(id);
updateEO.setCertificationProgress(projectTaskInventoryVO.getCertificationProgress());
updateEO.setCertificationProgressRemark(projectTaskInventoryVO.getCertificationProgressRemark());
Date now = new Date();
updateEO.setUpdateTime(now);
updateEOList.add(updateEO);
}
updateBatchById(updateEOList);
}
@Override
public List<String> verifyRoleCode(ProjectTaskInventoryVO projectTaskInventoryVO) {
List<String> projectLawsInventoryIdList = Arrays.asList(projectTaskInventoryVO.getProjectLawsInventoryIds().split(","));
List<String> roleCodeList = new ArrayList<>();
if (StringUtils.isNotEmpty(projectTaskInventoryVO.getRoleCodes())) {
roleCodeList = Arrays.asList(projectTaskInventoryVO.getRoleCodes().split(","));
}
String cut = projectTaskInventoryVO.getCut();
String operation = projectTaskInventoryVO.getOperation();
List<Map<String, String>> msgMapList = new ArrayList<>();
for (int i=0; i < projectLawsInventoryIdList.size(); i++) {
String projectLawsInventoryId = projectLawsInventoryIdList.get(i);
ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryEOService.getById(projectLawsInventoryId);
Map<String, String> msgMap = new HashMap<>();
if (CollectionUtils.isEmpty(roleCodeList)) {
msgMap.put("serialNumber", projectLawsInventoryEO.getSerialNumber());
msgMapList.add(msgMap);
} else {
String roleCode = roleCodeList.get(i);
if ("1".equals(operation)) {
if (!(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue().equals(roleCode)
|| ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue().equals(roleCode))) {
msgMap.put("serialNumber", projectLawsInventoryEO.getSerialNumber());
msgMapList.add(msgMap);
}
} else if ("2".equals(operation)) {
if (!(ProjectRoleEnum.REGULATI_ENGINEER.getValue().equals(roleCode)
|| ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue().equals(roleCode)
|| ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue().equals(roleCode))) {
msgMap.put("serialNumber", projectLawsInventoryEO.getSerialNumber());
msgMapList.add(msgMap);
}
}
}
}
return getMsg(msgMapList, cut, operation);
}
private List<String> getMsg(List<Map<String, String>> msgMapList, String cut, String operation) {
List<String> msgList = new ArrayList<>();
for (Map<String, String> msgMap : msgMapList) {
String serialNumber = msgMap.get("serialNumber");
StringBuilder stringBuilder = new StringBuilder();
if ("1".equals(operation)) {
if (CutEnum.EN.getValue().equals(cut)) {
stringBuilder.append("Number ").append("<span style='color: red'>").append(serialNumber).append("</span>").append(", the current user can not maintain homologation progress.");
} else {
stringBuilder.append("编号").append("<span style='color: red'>").append(serialNumber).append("</span>").append(",当前用户没有维护认证进度权限。");
}
} else if("2".equals(operation)) {
if (CutEnum.EN.getValue().equals(cut)) {
stringBuilder.append("Number ").append("<span style='color: red'>").append(serialNumber).append("</span>").append(", the current user can not modify current status.");
} else {
stringBuilder.append("编号").append("<span style='color: red'>").append(serialNumber).append("</span>").append(",当前用户没有修改状态权限。");
}
}
msgList.add(stringBuilder.toString());
}
return msgList;
}
/** /**
* 创建任务清单列表数据 * 创建任务清单列表数据
* @param projectTaskInventoryEOList * @param projectTaskInventoryEOList
@@ -0,0 +1,15 @@
package com.jero.modules.project.vo;
import lombok.Data;
@Data
public class ConditionAssessmentVO {
private String cut;
// 当前状态
private String projectLawsInventoryIds;
private String roleCodes;
private String conditionAssessment;
private String remark;
}
@@ -0,0 +1,18 @@
package com.jero.modules.project.vo;
import lombok.Data;
@Data
public class ProjectTaskInventoryVO {
private String cut;
// 认证进度
private String ids;
private String projectLawsInventoryIds;
private String roleCodes;
private String certificationProgress;
private String certificationProgressRemark;
private String operation; // 1-维护进度,2-修改状态
}
@@ -146,7 +146,7 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
this.updateById(lawsMonthlyReportManageEO); this.updateById(lawsMonthlyReportManageEO);
// 同步es // 同步es
// syncElasticsearch(id, issueStatus, issueTime); syncElasticsearch(id, issueStatus, issueTime);
} }
private void syncElasticsearch(String id, String issueStatus, Date issueTime) { private void syncElasticsearch(String id, String issueStatus, Date issueTime) {
@@ -4,12 +4,14 @@ package com.jero.modules.searchcenter.service.impl;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.CutEnum;
import com.jero.common.constant.enums.ModuleEnum; import com.jero.common.constant.enums.ModuleEnum;
import com.jero.common.constant.enums.YesOrNoEnum; import com.jero.common.constant.enums.YesOrNoEnum;
import com.jero.common.es.JeroElasticsearchTemplate; import com.jero.common.es.JeroElasticsearchTemplate;
import com.jero.common.system.vo.LoginUser;
import com.jero.generater.modules.online.cgform.entity.OnlCgformField; import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
import com.jero.modules.collection.entity.OnlCgformCollection; import com.jero.modules.collection.entity.OnlCgformCollection;
@@ -20,6 +22,9 @@ import com.jero.modules.document.service.IBussDocumentLibraryEOService;
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl; import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseUserEO;
import com.jero.modules.problemKnowledgeBase.enums.ShowPermissionsEnum;
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseUserEOService;
import com.jero.modules.searchcenter.vo.SearchVO; import com.jero.modules.searchcenter.vo.SearchVO;
import com.jero.modules.subscribe.entity.OnlCgformSubscribe; import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
import com.jero.modules.subscribe.service.IOnlCgformSubscribeService; import com.jero.modules.subscribe.service.IOnlCgformSubscribeService;
@@ -30,6 +35,7 @@ import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@@ -65,6 +71,8 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
private IOnlCgformCollectionService iOnlCgformCollectionService; private IOnlCgformCollectionService iOnlCgformCollectionService;
@Autowired @Autowired
private IOnlCgformSubscribeService iOnlCgformSubscribeService; private IOnlCgformSubscribeService iOnlCgformSubscribeService;
@Autowired
private IProblemKnowledgeBaseUserEOService problemKnowledgeBaseUserEOService;
public static final String SEARCH_FLAG = "";//标识(es数据带此标识的代表全文和段落的数据,不带此标识的代表列表数据) public static final String SEARCH_FLAG = "";//标识(es数据带此标识的代表全文和段落的数据,不带此标识的代表列表数据)
@@ -849,6 +857,10 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
jeroElasticsearchTemplate.removeIndex(SearchEnum.INDEX_NAME_DOCUMENT.getValue()); jeroElasticsearchTemplate.removeIndex(SearchEnum.INDEX_NAME_DOCUMENT.getValue());
jeroElasticsearchTemplate.removeIndex(SearchEnum.FULL_TEXT_SEARCH_CN.getValue()); jeroElasticsearchTemplate.removeIndex(SearchEnum.FULL_TEXT_SEARCH_CN.getValue());
jeroElasticsearchTemplate.removeIndex(SearchEnum.FULL_TEXT_SEARCH_EN.getValue()); jeroElasticsearchTemplate.removeIndex(SearchEnum.FULL_TEXT_SEARCH_EN.getValue());
jeroElasticsearchTemplate.removeIndex(SearchEnum.INDEX_NAME_LAWS_MONTHLY_REPORT.getValue());
jeroElasticsearchTemplate.removeIndex(SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_CN.getValue());
jeroElasticsearchTemplate.removeIndex(SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_EN.getValue());
} }
@@ -1089,6 +1101,8 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
} }
JSONArray queryJsonMustNot = new JSONArray(); JSONArray queryJsonMustNot = new JSONArray();
JSONArray queryShould = new JSONArray();
String selectValue = (String) map.get("selectValue"); String selectValue = (String) map.get("selectValue");
String selectValueTwo = (String) map.get("selectValueTwo"); String selectValueTwo = (String) map.get("selectValueTwo");
String problem_type = (String) map.get("problem_type"); String problem_type = (String) map.get("problem_type");
@@ -1097,19 +1111,26 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
List<String> fieldList = new ArrayList<>(); List<String> fieldList = new ArrayList<>();
fieldList.add("title");//权重5 fieldList.add("title");//权重5
fieldList.add("content");//权重4 fieldList.add("content");//权重4
// fieldList.add("problem_type");//权重3 //fieldList.add("module_type");
// fieldList.add("target_market"); //权重2 //fieldList.add("id");
fieldList.add("module_type"); //fieldList.add("flag");
fieldList.add("id");
fieldList.add("flag");
JSONArray queryMapJson = new JSONArray(); JSONArray queryMapJson = new JSONArray();
JSONArray queryMapInputJson = new JSONArray();
JSONArray queryMapJsonTwo = new JSONArray(); JSONArray queryMapJsonTwo = new JSONArray();
JSONArray queryMapJsonThree = new JSONArray(); JSONArray queryMapJsonThree = new JSONArray();
JSONArray queryMapJsonProblemType = new JSONArray();
JSONArray queryMapJsonTargetMarket = new JSONArray();
JSONArray queryMapJsonAll = new JSONArray(); JSONArray queryMapJsonAll = new JSONArray();
//基础查询权限,展示权限为公开的,所有人都能查看,展示权限为私密的,只有配置了权限的用户可以查看。
if("base".equals("base")){
JSONArray queryMapJsonBase = new JSONArray();
this.createQueryWhere(ShowPermissionsEnum.OPEN.getValue(),"show_permissions",queryMapJsonBase);
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapJsonBase);
queryMapJsonAll.add(jsonObject);
}
Map<String,Object> mapHighlight = new HashMap<>(); Map<String,Object> mapHighlight = new HashMap<>();
Map<String,Object> mapHighlight1 = new HashMap<>(); Map<String,Object> mapHighlight1 = new HashMap<>();
//封装首次的条件 //封装首次的条件
@@ -1124,14 +1145,19 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
map3.put("boost",0.01); map3.put("boost",0.01);
}else if("content".equals(field)){ }else if("content".equals(field)){
map3.put("boost",0.01); map3.put("boost",0.01);
}else if("file_name".equals(field)){
map3.put("boost",1);
} }
//特殊处理标题字段
map3.put("query",selectValue); if (field.equals("title")){
map2.put(field, map3); // map2放最内层
map4.put("match",map2); map2.put(field, "*" + selectValue + "*");
queryMapJson.add(map4); // map4放query
map4.put("wildcard",map2);
} else {
map3.put("query",selectValue);
map2.put(field, map3);
map4.put("match",map2);
}
queryMapInputJson.add(map4);
//高亮 //高亮
if(!"flag".equals(field)){ if(!"flag".equals(field)){
@@ -1143,41 +1169,23 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
//封装问题类型选择框查询条件。 //封装问题类型选择框查询条件。
if (StringUtils.isNotBlank(problem_type)) { if (StringUtils.isNotBlank(problem_type)) {
Map<String, Object> map2 = new HashMap<>(); this.createQueryWhere(problem_type,"problem_type",queryMapJson);
Map<String, Object> map3 = new HashMap<>();
Map<String, Object> map4 = new HashMap<>();
map3.put("query",problem_type);
map2.put("problem_type", map3);
map4.put("match",map2);
queryMapJson.add(map4);
//高亮
highlight(mapHighlight, problem_type);
mapHighlight1.put("fields",mapHighlight);
} }
//封装市场选择框查询条件。 //封装市场选择框查询条件。
if (StringUtils.isNotBlank(target_market)) { if (StringUtils.isNotBlank(target_market)) {
Map<String, Object> map2 = new HashMap<>(); this.createQueryWhere(target_market,"target_market",queryMapJson);
Map<String, Object> map3 = new HashMap<>();
Map<String, Object> map4 = new HashMap<>();
map3.put("query",target_market);
map2.put("target_market", map3);
map4.put("match",map2);
queryMapJson.add(map4);
//高亮
highlight(mapHighlight, target_market);
mapHighlight1.put("fields",mapHighlight);
} }
if(CollectionUtils.isNotEmpty(queryMapJson)){ if(CollectionUtils.isNotEmpty(queryMapJson)){
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapJson); JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, null, null);
queryMapJsonAll.add(jsonObject); queryMapJsonAll.add(jsonObject);
} }
if(CollectionUtils.isNotEmpty(queryMapInputJson)){
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapInputJson);
queryMapJsonAll.add(jsonObject);
}
//封装二次的条件 //封装二次的条件
if (StringUtils.isNotBlank(selectValueTwo)) { if (StringUtils.isNotBlank(selectValueTwo)) {
for (String field : fieldList) { for (String field : fieldList) {
@@ -1190,13 +1198,10 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
map3.put("boost",0.01); map3.put("boost",0.01);
}else if("content".equals(field)){ }else if("content".equals(field)){
map3.put("boost",0.01); map3.put("boost",0.01);
}else if("file_name".equals(field)){
map3.put("boost",1);
} }
//特殊处理编号字段 //特殊处理编号字段
map3.put("query",selectValueTwo); map3.put("query",selectValueTwo);
// map3.put("minimum_should_match",2);
map2.put(field, map3); map2.put(field, map3);
queryMap.put("match", map2); queryMap.put("match", map2);
@@ -1237,20 +1242,20 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
Integer pageNo = Integer.parseInt(map.get("pageNo").toString()); Integer pageNo = Integer.parseInt(map.get("pageNo").toString());
Integer pageSize = Integer.parseInt(map.get("pageSize").toString()); Integer pageSize = Integer.parseInt(map.get("pageSize").toString());
IPage page = this.getProblemKnowledgeBasePage(selectValue, selectValueTwo, queryMapJsonAll, mapHighlight1,null, IPage page = this.getProblemKnowledgeBasePage(selectValue, selectValueTwo, queryMapJsonAll, mapHighlight1,null,
pageNo, pageSize, null,(String) map.get("cut"),sort,queryJsonMustNot); pageNo, pageSize, null,(String) map.get("cut"),sort,queryJsonMustNot,queryShould);
return page; return page;
} }
@NotNull @NotNull
private IPage getProblemKnowledgeBasePage(String selectValue, String selectValueTwo, JSONArray queryMapJson,Map<String,Object> highlightMap, private IPage getProblemKnowledgeBasePage(String selectValue, String selectValueTwo, JSONArray queryMapJson,Map<String,Object> highlightMap,
JSONArray should, Integer pageNo, Integer pageSize, String paragraphFlag, JSONArray should, Integer pageNo, Integer pageSize, String paragraphFlag,
String cut,JSONObject querySort,JSONArray queryMustNot) { String cut,JSONObject querySort,JSONArray queryMustNot,JSONArray queryShould) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
//基础添加封装 //基础添加封装
if ("paragraphFlag".equals(paragraphFlag)) { if ("paragraphFlag".equals(paragraphFlag)) {
jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, null); jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, queryShould);
} else { } else {
jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, null); jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, queryShould);
} }
JSONArray jsonArraySort = new JSONArray(); JSONArray jsonArraySort = new JSONArray();
jsonArraySort.add(querySort); jsonArraySort.add(querySort);
@@ -1291,10 +1296,10 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
mapSource.put(key,fieldConyent); mapSource.put(key,fieldConyent);
} }
//如果这一条数据中有高亮字段值,但是file_text中没有高亮值, 则赋控制,否则列表中会展示所有的文件内容, 赋空后,则展示基础数据 //如果这一条数据中有高亮字段值,但是file_text中没有高亮值, 则赋控制,否则列表中会展示所有的文件内容, 赋空后,则展示基础数据
String fileText = (String) mapSource.get("content"); /*String fileText = (String) mapSource.get("content");
if(StringUtils.isNotBlank(fileText) && !fileText.contains("<text class='highlight-class'>")){ if(StringUtils.isNotBlank(fileText) && !fileText.contains("<text class='highlight-class'>")){
mapSource.put("content",""); mapSource.put("content","");
} }*/
} }
mapList.add(mapSource); mapList.add(mapSource);
} }
@@ -1313,6 +1318,58 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
return page; return page;
} }
/**
* 创建查询条件
* @param queryValue 查询的值
* @param fieldKey 查询的字段
* @param jsonArray
*/
public void createQueryWhere (String queryValue,String fieldKey,JSONArray jsonArray){
/**
* fieldKeyMap:字段keyMap,用于存 需要查询的字段 以及字段中的条件 "queryMap"
* queryMap:存放查询条件map
* matchMap:匹配Map
*/
Map<String, Object> fieldKeyMap = new HashMap<>();
Map<String, Object> queryMap = new HashMap<>();
Map<String, Object> matchMap = new HashMap<>();
queryMap.put("query", queryValue);
fieldKeyMap.put(fieldKey, queryMap);
matchMap.put("match",fieldKeyMap);
// 如果是私密,并且查询字段key是展示权限 的话,查询当前用户拥有权限的问题知识库数据
if(StringUtils.equals(fieldKey,"show_permissions")){
//查询出当前登录人所拥有的问题知识库私密数据权限。
LoginUser currentOperatorUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<ProblemKnowledgeBaseUserEO> userPermissionQueryWrapper = new QueryWrapper<>();
userPermissionQueryWrapper.lambda().eq(ProblemKnowledgeBaseUserEO::getUserId,currentOperatorUser.getId());
List<ProblemKnowledgeBaseUserEO> problemKnowledgeBaseUserEOList = this.problemKnowledgeBaseUserEOService.list(userPermissionQueryWrapper);
if(CollectionUtils.isNotEmpty(problemKnowledgeBaseUserEOList)){
List<String> problemKnowledgeBaseIdList = problemKnowledgeBaseUserEOList.stream().map(ProblemKnowledgeBaseUserEO::getProblemKnowledgeBaseId).distinct().collect(Collectors.toList());
//in查询该用户拥有权限的问题知识库id。
Map<String, Object> fieldKeyMap2 = new HashMap<>();
Map<String, Object> matchMap2 = new HashMap<>();
fieldKeyMap2.put("id", problemKnowledgeBaseIdList);
matchMap2.put("terms",fieldKeyMap2);
jsonArray.add(matchMap2);
}else {
Map<String, Object> fieldKeyMap2 = new HashMap<>();
Map<String, Object> queryMap2 = new HashMap<>();
Map<String, Object> matchMap2 = new HashMap<>();
queryMap2.put("query", "null");
fieldKeyMap2.put("id", queryMap2);
matchMap2.put("match",fieldKeyMap2);
jsonArray.add(matchMap2);
}
}
jsonArray.add(matchMap);
}
} }
@@ -64,12 +64,8 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
String selectValueTwo = searchVO.getSelectValueTwo(); String selectValueTwo = searchVO.getSelectValueTwo();
//1. 需要查询的字段 //1. 需要查询的字段
List<String> fieldList = new ArrayList<>(); List<String> fieldList = new ArrayList<>();
fieldList.add("title");//权重5 fieldList.add("title");//权重2
fieldList.add("file_text");//权重4 fieldList.add("content");//权重1
fieldList.add("content");//权重3
fieldList.add("file_name"); //权重2
fieldList.add("module_type");
fieldList.add("id");
fieldList.add("flag"); fieldList.add("flag");
JSONArray queryMapJson = new JSONArray(); JSONArray queryMapJson = new JSONArray();
@@ -87,17 +83,21 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
Map<String, Object> map4 = new HashMap<>(); Map<String, Object> map4 = new HashMap<>();
if("title".equals(field)){ if("title".equals(field)){
map3.put("boost",1); map3.put("boost",1);
}else if("file_text".equals(field)){
map3.put("boost",0.01);
}else if("content".equals(field)){ }else if("content".equals(field)){
map3.put("boost",0.01); map3.put("boost",0.01);
}else if("file_name".equals(field)){
map3.put("boost",1);
} }
// 标题字段 通配符模糊匹配
if (field.equals("title")){
// map2放最内层
map2.put(field, "*" + selectValue + "*");
map3.put("query",selectValue); // map4放query
map2.put(field, map3); map4.put("wildcard",map2);
map4.put("match",map2); } else {
map3.put("query", selectValue);
map2.put(field, map3);
map4.put("match", map2);
}
queryMapJson.add(map4); queryMapJson.add(map4);
//高亮 //高亮
@@ -119,19 +119,22 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
Map<String, Object> map3 = new HashMap<>(); Map<String, Object> map3 = new HashMap<>();
if("title".equals(field)){ if("title".equals(field)){
map3.put("boost",1); map3.put("boost",1);
}else if("file_text".equals(field)){
map3.put("boost",0.01);
}else if("content".equals(field)){ }else if("content".equals(field)){
map3.put("boost",0.01); map3.put("boost",0.01);
}else if("file_name".equals(field)){
map3.put("boost",1);
} }
//特殊处理编号字段 // 标题字段 通配符模糊匹配
map3.put("query",selectValueTwo); 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); // map3.put("minimum_should_match",2);
map2.put(field, map3); map2.put(field, map3);
queryMap.put("match", map2); queryMap.put("match", map2);
}
queryMapJsonTwo.add(queryMap); queryMapJsonTwo.add(queryMap);
//高亮 //高亮
@@ -190,8 +193,11 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
} else { } else {
jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, null); jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, null);
} }
JSONArray jsonArraySort = new JSONArray(); JSONArray jsonArraySort = new JSONArray();
jsonArraySort.add(querySort); if (SEARCH_FLAG.equals(selectValue) && StringUtils.isEmpty(selectValueTwo)) {
jsonArraySort.add(querySort);
}
//1. 条件,分页 //1. 条件,分页
JSONObject queryObject = jeroElasticsearchTemplate.buildQuery(null, JSONObject queryObject = jeroElasticsearchTemplate.buildQuery(null,
@@ -1,6 +1,6 @@
package com.jero.modules.split.controller; package com.jero.modules.split.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
@@ -9,6 +9,7 @@ import com.jero.common.constant.enums.CutEnum;
import com.jero.common.system.base.controller.JeroController; import com.jero.common.system.base.controller.JeroController;
import com.jero.modules.document.service.IBussDocumentLibraryEOService; import com.jero.modules.document.service.IBussDocumentLibraryEOService;
import com.jero.modules.lanswitch.service.ILanguageSwitchService; import com.jero.modules.lanswitch.service.ILanguageSwitchService;
import com.jero.modules.ocr.util.LineHumpUtil;
import com.jero.modules.split.entity.SarFileSplitInfoEO; import com.jero.modules.split.entity.SarFileSplitInfoEO;
import com.jero.modules.split.page.SarFileSplitInfoEOPage; import com.jero.modules.split.page.SarFileSplitInfoEOPage;
import com.jero.modules.split.service.ISarFileSplitInfoService; import com.jero.modules.split.service.ISarFileSplitInfoService;
@@ -59,7 +60,7 @@ public class SarFileSplitInfoController extends JeroController<SarFileSplitInfoE
@GetMapping(value = "/page") @GetMapping(value = "/page")
@RequiresPermissions("split:sarFileSplitInfo:page") @RequiresPermissions("split:sarFileSplitInfo:page")
public Result<?> queryPageList(SarFileSplitInfoEOPage sarFileSplitInfoEOPage) { public Result<?> queryPageList(SarFileSplitInfoEOPage sarFileSplitInfoEOPage) {
LambdaQueryWrapper<SarFileSplitInfoEO> queryWrapper = new LambdaQueryWrapper<>(); QueryWrapper<SarFileSplitInfoEO> queryWrapper = new QueryWrapper<>();
if(StringUtils.isNotEmpty(sarFileSplitInfoEOPage.getSerialNumber())){ if(StringUtils.isNotEmpty(sarFileSplitInfoEOPage.getSerialNumber())){
sarFileSplitInfoEOPage.setSerialNumber(sarFileSplitInfoEOPage.getSerialNumber().replace("%","\\%")); sarFileSplitInfoEOPage.setSerialNumber(sarFileSplitInfoEOPage.getSerialNumber().replace("%","\\%"));
} }
@@ -67,13 +68,18 @@ public class SarFileSplitInfoController extends JeroController<SarFileSplitInfoE
sarFileSplitInfoEOPage.setTitle(sarFileSplitInfoEOPage.getTitle().replace("%","\\%")); sarFileSplitInfoEOPage.setTitle(sarFileSplitInfoEOPage.getTitle().replace("%","\\%"));
} }
if(StringUtils.isNotEmpty(sarFileSplitInfoEOPage.getFileId())){//判断是不是以及传回文档库 if(StringUtils.isNotEmpty(sarFileSplitInfoEOPage.getFileId())){//判断是不是以及传回文档库
queryWrapper.isNotNull(SarFileSplitInfoEO::getFileId); queryWrapper.lambda().isNotNull(SarFileSplitInfoEO::getFileId);
} }
queryWrapper.like(StringUtils.isNotEmpty(sarFileSplitInfoEOPage.getSerialNumber()), SarFileSplitInfoEO::getSerialNumber, sarFileSplitInfoEOPage.getSerialNumber()) if(StringUtils.isNotBlank(sarFileSplitInfoEOPage.getOrderByField())){
sarFileSplitInfoEOPage.setOrderByField(LineHumpUtil.humpToLine2(sarFileSplitInfoEOPage.getOrderByField()));
}
queryWrapper.lambda().like(StringUtils.isNotEmpty(sarFileSplitInfoEOPage.getSerialNumber()), SarFileSplitInfoEO::getSerialNumber, sarFileSplitInfoEOPage.getSerialNumber())
.like(StringUtils.isNotEmpty(sarFileSplitInfoEOPage.getTitle()) && CutEnum.CN.getValue().equals(sarFileSplitInfoEOPage.getCut()), SarFileSplitInfoEO::getTitle, sarFileSplitInfoEOPage.getTitle()) .like(StringUtils.isNotEmpty(sarFileSplitInfoEOPage.getTitle()) && CutEnum.CN.getValue().equals(sarFileSplitInfoEOPage.getCut()), SarFileSplitInfoEO::getTitle, sarFileSplitInfoEOPage.getTitle())
.like(StringUtils.isNotEmpty(sarFileSplitInfoEOPage.getTitle()) && CutEnum.EN.getValue().equals(sarFileSplitInfoEOPage.getCut()), SarFileSplitInfoEO::getTitleEn, sarFileSplitInfoEOPage.getTitle()) .like(StringUtils.isNotEmpty(sarFileSplitInfoEOPage.getTitle()) && CutEnum.EN.getValue().equals(sarFileSplitInfoEOPage.getCut()), SarFileSplitInfoEO::getTitleEn, sarFileSplitInfoEOPage.getTitle());
.orderBy(StringUtils.isNotBlank(sarFileSplitInfoEOPage.getOrderByField()), "1".equals(sarFileSplitInfoEOPage.getOrderBy())?true:false, SarFileSplitInfoEO::getCreateTime)
.orderBy(StringUtils.isBlank(sarFileSplitInfoEOPage.getOrderByField()), false, SarFileSplitInfoEO::getCreateTime); queryWrapper.orderBy(StringUtils.isNotBlank(sarFileSplitInfoEOPage.getOrderByField()), "1".equals(sarFileSplitInfoEOPage.getOrderBy())?true:false, sarFileSplitInfoEOPage.getOrderByField())
.orderBy(StringUtils.isBlank(sarFileSplitInfoEOPage.getOrderByField()), false, "create_time");
Page<SarFileSplitInfoEO> page = new Page<SarFileSplitInfoEO>(sarFileSplitInfoEOPage.getPageNo(), sarFileSplitInfoEOPage.getPageSize()); Page<SarFileSplitInfoEO> page = new Page<SarFileSplitInfoEO>(sarFileSplitInfoEOPage.getPageNo(), sarFileSplitInfoEOPage.getPageSize());
IPage<SarFileSplitInfoEO> pageList = sarFileSplitInfoService.page(page, queryWrapper); IPage<SarFileSplitInfoEO> pageList = sarFileSplitInfoService.page(page, queryWrapper);
List<SarFileSplitInfoEO> rows = pageList.getRecords(); List<SarFileSplitInfoEO> rows = pageList.getRecords();
@@ -24,7 +24,6 @@ import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
import com.jero.modules.document.enums.FieldTypeEnum; import com.jero.modules.document.enums.FieldTypeEnum;
import com.jero.modules.document.service.IBussDocumentLibraryEOService; import com.jero.modules.document.service.IBussDocumentLibraryEOService;
import com.jero.modules.ocr.util.LineHumpUtil;
import com.jero.modules.ocr.util.UUIDUtils; import com.jero.modules.ocr.util.UUIDUtils;
import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.oss.service.IOSSFileService;
@@ -72,7 +71,6 @@ import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.mock.web.MockMultipartFile; import org.springframework.mock.web.MockMultipartFile;
@@ -81,12 +79,10 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import sun.misc.BASE64Decoder; import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.nio.file.StandardOpenOption; import java.nio.file.StandardOpenOption;
@@ -792,6 +788,16 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
//处理列表表头排序 //处理列表表头排序
if("page".equals(type)) { 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");
if (StringUtils.isNotBlank((String) parameter.get("orderByField"))) {
conditionSb.append(", sar_file_split_items." + (String) parameter.get("orderByField"));
if ("1".equals((String) parameter.get("orderBy"))) {
conditionSb.append(" asc");//正序
} else if ("2".equals((String) parameter.get("orderBy"))) {
conditionSb.append(" desc");//倒序
}
}
} }
String condition = conditionSb.toString(); String condition = conditionSb.toString();
return condition; return condition;
+3
View File
@@ -1275,4 +1275,7 @@ module.exports = {
taskConfirmedPersonnelCannotBeSetBatch:'When the task confirmation status is to be confirmed, personnel cannot be set in batch', taskConfirmedPersonnelCannotBeSetBatch:'When the task confirmation status is to be confirmed, personnel cannot be set in batch',
theSelectedDataResponsibilityFieldCannotEmpty:'The selected data responsibility field cannot be empty', theSelectedDataResponsibilityFieldCannotEmpty:'The selected data responsibility field cannot be empty',
theTaskConfirmationStatusCannot:'Only the list confirmation status is "reject" or "accept" and the task confirmation status cannot be "data to be confirmed"', theTaskConfirmationStatusCannot:'Only the list confirmation status is "reject" or "accept" and the task confirmation status cannot be "data to be confirmed"',
BatchMaintenanceProgress:'Batch Maintenance Progress',
BatchChangeStatus:'Batch Change Status',
CollectinguthenticationParameters:'Collecting Authentication Parameters',
} }
+3
View File
@@ -1377,4 +1377,7 @@ module.exports = {
taskConfirmedPersonnelCannotBeSetBatch:'任务确认状态为待确认时无法批量设置人员', taskConfirmedPersonnelCannotBeSetBatch:'任务确认状态为待确认时无法批量设置人员',
theSelectedDataResponsibilityFieldCannotEmpty:'所选数据责任领域不能为空', theSelectedDataResponsibilityFieldCannotEmpty:'所选数据责任领域不能为空',
theTaskConfirmationStatusCannot:'只能变更清单确认状态为拒绝或接受及任务确认状态不能为待确认的数据', theTaskConfirmationStatusCannot:'只能变更清单确认状态为拒绝或接受及任务确认状态不能为待确认的数据',
BatchMaintenanceProgress:'批量维护进度',
BatchChangeStatus:'批量修改状态',
CollectinguthenticationParameters:'认证参数收集',
} }
@@ -1,93 +1,58 @@
<template> <template>
<div class='diolag-area'> <div class='diolag-area'>
<a-spin :spinning='spinLoading'> <a-spin :spinning='spinLoading'>
<a-form-model <a-form layout="inline" @keyup.enter.native="searchQuery">
@keyup.enter.native="searchQuery" <a-row :gutter="24">
class='tag-module' <a-col :md="12" :sm="8">
ref='ruleForm'
:model='form'
:rules='rules'
:label-col='labelCol'
:wrapper-col='wrapperCol'
>
<a-row :gutter='24'>
<a-col :span='9'>
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<!-- <span class="Required">*</span>--> <!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('NiONumber')">{{$t('NiONumber')}}</span> <span class="title-text-text" :title="$t('NiONumber')">{{$t('NiONumber')}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop='region'> <a-form-model-item class="itemModel">
<!-- <a-input class="box-input"--> <a-input class="box-input" :title="$t('pleaseEnter')+$t('ParameterName')"
<!-- :disabled="disabled"--> v-model='form.nioNumber' :placeholder="$t('pleaseEnter')+$t('NiONumber')"/>
<!-- v-model="formInline[item.db_field_name]"-->
<!-- :placeholder="$t('PleaseEnter')+item.db_field_txt"/>-->
<a-input class="box-input" :title="$t('pleaseEnter')+$t('ParameterName')"
v-model='form.nioNumber' :placeholder="$t('pleaseEnter')+$t('NiONumber')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
<!-- <a-form-model-item ref='region' :label="$t('NiONumber')" prop='region' >-->
<!-- <a-input-->
<!-- v-model='form.nioNumber' :placeholder="$t('pleaseEnter')+$t('NiONumber')" />-->
<!-- </a-form-model-item>-->
</a-col> </a-col>
<a-col :span='9'> <a-col :md="12" :sm="8">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<!-- <span class="Required">*</span>--> <!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('ParameterName')">{{$t('ParameterName')}}</span> <span class="title-text-text" :title="$t('ParameterName')">{{$t('ParameterName')}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop='region'> <a-form-model-item class="itemModel">
<!-- <a-input class="box-input"--> <a-input class="box-input"
<!-- :disabled="disabled"--> v-model='form.paramsName' :title="$t('pleaseEnter')+$t('ParameterName')"
<!-- v-model="formInline[item.db_field_name]"--> :placeholder="$t('pleaseEnter')+$t('ParameterName')"/>
<!-- :placeholder="$t('PleaseEnter')+item.db_field_txt"/>-->
<a-input
v-model='form.paramsName' :title="$t('pleaseEnter')+$t('ParameterName')" :placeholder="$t('pleaseEnter')+$t('ParameterName')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
<!-- <a-form-model-item ref='paramsTemplateName' :label="$t('ParameterName')" prop='paramsTemplateName'>-->
<!-- <a-input-->
<!-- v-model='form.paramsName' :placeholder="$t('pleaseEnter')+$t('ParameterName')" />-->
<!-- </a-form-model-item>-->
</a-col> </a-col>
<a-col :span='6' style='margin-top: 5px'> <a-col :md="12" :sm="8">
<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>
</a-row>
<a-row :gutter='24'>
<a-col :span='10'>
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<!-- <span class="Required">*</span>--> <!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span> <span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop='region'> <a-form-model-item class="itemModel">
<!-- <a-input class="box-input"--> <j-dict-select-tag class="box-input" v-model='form.dutyTerritory'
<!-- :disabled="disabled"-->
<!-- v-model="formInline[item.db_field_name]"-->
<!-- :placeholder="$t('PleaseEnter')+item.db_field_txt"/>-->
<j-dict-select-tag class='box-input' v-model='form.dutyTerritory'
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')" :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'" :type="'select'"
:title="$t('PleaseSelect')+$t('areaOfResponsibility')" :title="$t('PleaseSelect')+$t('areaOfResponsibility')"
:triggerChange='false' :dictCode="'duty_territory'" /> :triggerChange='false' :dictCode="'duty_territory'"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
<!-- <a-form-model-item ref='region' :label="$t('areaOfResponsibility')" prop='region'>-->
<!-- <a-form-model-item class='itemModel' prop='region'>-->
<!-- <j-dict-select-tag class='box-input' v-model='form.dutyTerritory'-->
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
<!-- :type="'select'"-->
<!-- :triggerChange='false' :dictCode="'duty_territory'" />-->
<!-- </a-form-model-item>-->
<!-- </a-form-model-item>-->
</a-col> </a-col>
<a-col :span='9'> <a-col :md="12" :sm="8">
<span style="float: right;overflow: hidden;margin-right: 16px;margin-bottom: 20px"
class="table-page-search-submitButtons">
<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>
</span>
</a-col> </a-col>
</a-row> </a-row>
</a-form-model> </a-form>
</a-spin> </a-spin>
<a-table <a-table
class='table-area' class='table-area'
@@ -110,137 +75,137 @@
</a-table> </a-table>
<div class='drawer-bootom-button'> <div class='drawer-bootom-button'>
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button> <a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading' >{{ $t('submit') }}</a-button> <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { putAction, postAction, getAction, deleteAction } from '@/api/manage' import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
export default { export default {
name: 'diolagArea', name: 'diolagArea',
components: {}, components: {},
data() { data() {
return { return {
title: this.$t('add'), title: this.$t('add'),
total: 0, total: 0,
selectedRowKeysDate: {}, selectedRowKeysDate: {},
loading: false, loading: false,
editId: '', editId: '',
columns: [ columns: [
{ {
title: this.$t('NiONumber'), title: this.$t('NiONumber'),
dataIndex: 'nioNumber', dataIndex: 'nioNumber',
align: 'center', align: 'center',
width:200, width: 200,
ellipsis: true ellipsis: true
},
{
title: this.$t('ParameterName'),
align: 'center',
dataIndex: 'paramsName',
width: 200,
ellipsis: true
},
{
title: this.$t('areaOfResponsibility'),
dataIndex: 'dutyTerritory_dictText',
align: 'center',
width: 200,
ellipsis: true
}
],
newVisible: false,
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
}, },
{ wrapperCol: {
title: this.$t('ParameterName'), xs: { span: 24 },
align: 'center', sm: { span: 14 }
dataIndex: 'paramsName',
width:200,
ellipsis: true
}, },
{ form: {},
title: this.$t('areaOfResponsibility'), rules: {
dataIndex: 'dutyTerritory_dictText', // templatetitle: [
align: 'center', // { required: true, message: this.$t('enterTitle'), trigger: 'blur' }
width:200, // ]
ellipsis: true },
} areaTable: [],
], flag: false, //表单提交标识
newVisible: false, spinLoading: false,
labelCol: { confirmLoading: false,
xs: { span: 24 }, templatetitle: '',
sm: { span: 7 } selectedRowKeys: []
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 14 }
},
form: {},
rules: {
// templatetitle: [
// { required: true, message: this.$t('enterTitle'), trigger: 'blur' }
// ]
},
areaTable: [],
flag: false, //表单提交标识
spinLoading: false,
confirmLoading: false,
templatetitle: '',
selectedRowKeys: [],
}
},
props: {
paramsManifest: {
type: Object,
default: {},
require: true
}
},
mounted() {
this.loadData()
},
methods: {
loadData() {
this.loading = true
let _tt = {
paramsManifestId: this.paramsManifest.id,
paramsTemplateId: this.paramsManifest.paramsTemplateId,
paramsTemplatePublishVersion: this.paramsManifest.paramsTemplatePublishVersion
} }
let params = {
...this.form,
..._tt
}
getAction(`params/collectManifest/paramsInfoList`, params).then(res => {
if (res.success) {
this.areaTable = [...res.result]
}
}).finally(() => {
this.loading = false
})
}, },
searchQuery() { props: {
paramsManifest: {
type: Object,
default: {},
require: true
}
},
mounted() {
this.loadData() this.loadData()
}, },
searchReset() { methods: {
this.form = {} loadData() {
this.loadData() this.loading = true
}, let _tt = {
handleCancel() { paramsManifestId: this.paramsManifest.id,
this.$emit('areaVisible', false) paramsTemplateId: this.paramsManifest.paramsTemplateId,
}, paramsTemplatePublishVersion: this.paramsManifest.paramsTemplatePublishVersion
onSelectChange(selectedRowKeys, selectedRowKeysDate) { }
this.selectedRowKeysDate = selectedRowKeysDate let params = {
this.selectedRowKeys = selectedRowKeys ...this.form,
this.$emit('addselectedRowKeys',this.selectedRowKeys) ..._tt
}, }
handleTableChange(val) { getAction(`params/collectManifest/paramsInfoList`, params).then(res => {
}, if (res.success) {
showModal() { this.areaTable = [...res.result]
this.title = this.$t('add') }
this.newVisible = true }).finally(() => {
this.form = {} this.loading = false
}, })
//新增 },
handleSubmit() { searchQuery() {
if (this.selectedRowKeys.length == 0) { this.loadData()
this.$message.warning(this.$t('pleaseSelectData')) },
} else { searchReset() {
this.$refs.ruleForm.validate(valid => { this.form = {}
if (valid) { this.loadData()
this.flag = true },
this.spinLoading = true handleCancel() {
this.confirmLoading = true this.$emit('areaVisible', false)
},
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
this.selectedRowKeysDate = selectedRowKeysDate
this.selectedRowKeys = selectedRowKeys
this.$emit('addselectedRowKeys', this.selectedRowKeys)
},
handleTableChange(val) {
},
showModal() {
this.title = this.$t('add')
this.newVisible = true
this.form = {}
},
//新增
handleSubmit() {
if (this.selectedRowKeys.length == 0) {
this.$message.warning(this.$t('pleaseSelectData'))
} else {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.flag = true
this.spinLoading = true
this.confirmLoading = true
//新增 //新增
let postDate = { let postDate = {
paramsInfoPublishEOList: this.selectedRowKeysDate, paramsInfoPublishEOList: this.selectedRowKeysDate,
paramsManifestId: this.paramsManifest.id, paramsManifestId: this.paramsManifest.id,
projectId: this.$route.query.projectId projectId: this.$route.query.projectId
} }
postAction(`params/collectManifest/add`, postDate).then(res => { postAction(`params/collectManifest/add`, postDate).then(res => {
if (res.success) { if (res.success) {
@@ -258,234 +223,239 @@ export default {
this.spinLoading = false this.spinLoading = false
this.newVisible = false this.newVisible = false
}) })
} else { } else {
return false return false
}
})
}
},
cancelModel() {
this.newVisible = false
this.$refs.ruleForm.resetFields()
},
//删除按钮
deleteArea(val) {
this.$confirm({
title: this.$t('confirmDeletion'),
content: '',
onOk:
async () => {
getAction(`tag/onlCgformArea/delete`, { id: val }).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
if (this.areaTable.length == 1 && this.queryParams.pageNo != 1) {
this.queryParams.pageNo = this.queryParams.pageNo - 1
}
this.loadData()
} else {
// this.$message.warning(res.message)
if (res.message == '该展示区域有关联数据无法删除') {
this.$message.warning(this.$t('noDelete'))
} else {
this.$message.warning(this.$t('operationFailed'))
}
}
})
}
})
},
//编辑按钮
editArea(val) {
this.title = this.$t('edit')
this.newVisible = true
let params = {
id: val
}
getAction(`tag/onlCgformArea/queryById`, params).then((res) => {
if (res.success) {
this.form = { ...res.result }
// this.$emit('updateOk',res.result)
} }
}) })
} }
}, },
cancelModel() { watch: {
this.newVisible = false paramsManifest(val) {
this.$refs.ruleForm.resetFields() this.loadData()
},
//删除按钮
deleteArea(val) {
this.$confirm({
title: this.$t('confirmDeletion'),
content: '',
onOk:
async () => {
getAction(`tag/onlCgformArea/delete`, { id: val }).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
if (this.areaTable.length == 1 && this.queryParams.pageNo != 1) {
this.queryParams.pageNo = this.queryParams.pageNo - 1
}
this.loadData()
} else {
// this.$message.warning(res.message)
if (res.message == '该展示区域有关联数据无法删除') {
this.$message.warning(this.$t('noDelete'))
} else {
this.$message.warning(this.$t('operationFailed'))
}
}
})
}
})
},
//编辑按钮
editArea(val) {
this.title = this.$t('edit')
this.newVisible = true
let params = {
id: val
} }
getAction(`tag/onlCgformArea/queryById`, params).then((res) => {
if (res.success) {
this.form = { ...res.result }
// this.$emit('updateOk',res.result)
}
})
} }
},
watch: {
paramsManifest(val) {
this.loadData()
},
}
} }
</script> </script>
<style lang='less' scoped> <style lang='less' scoped>
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
.diolag-area { .diolag-area {
.table-area { .table-area {
margin: 20px 0; margin: 20px 0;
.action-edit { .action-edit {
margin-right: 10px; margin-right: 10px;
}
}
.table-del {
color: red;
} }
} }
.table-del { .drawer-bootom-button {
color: red; display: flex;
justify-content: center;
} }
}
.drawer-bootom-button{
display: flex;
justify-content: center;
}
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text { .box-title-text {
width: 114px; line-height: 1.4;
text-align: right; display: flex;
display: inline-block; /*align-items: center;*/
font-weight: 500; }
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.box-input { .title-text {
display: inline-block; width: 114px;
height: 38px; text-align: right;
width: 100%; display: inline-block;
} font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.itemModel { .box-input {
width: calc(100% - 130px); display: inline-block;
display: inline-block; height: 38px;
margin-top: 2px; width: 100%;
height: 40px; }
margin-bottom: 24px;
}
.itemModel-text { .itemModel {
width: calc(100% - 130px); width: calc(100% - 130px);
display: inline-block; display: inline-block;
margin-top: 2px; margin-top: 2px;
} height: 40px;
margin-bottom: 24px;
}
.Required { .itemModel-text {
color: red; width: calc(100% - 130px);
margin-right: 4px; display: inline-block;
} margin-top: 2px;
}
.title-text-text { .Required {
margin-top: 9px; color: red;
} margin-right: 4px;
}
.header-text { .title-text-text {
font-size: 16px; margin-top: 9px;
font-weight: bold; }
margin-left: 15px;
/*border-bottom: 1px #d9d9d9 dashed;*/
height: 30px;
margin-bottom: 30px;
}
.formAdd { .header-text {
margin-bottom: 40px; font-size: 16px;
} font-weight: bold;
margin-left: 15px;
/*border-bottom: 1px #d9d9d9 dashed;*/
height: 30px;
margin-bottom: 30px;
}
.button-text { .formAdd {
height: 38px; margin-bottom: 40px;
width: calc(100% - 100px); }
line-height: 38px;
background: #fff;
border: 1px #00B3BE solid;
color: #00B3BE;
}
.button-text-text { .button-text {
position: absolute; height: 38px;
right: -10px; width: calc(100% - 100px);
top: -21px; line-height: 38px;
display: inline-block; background: #fff;
padding: 6px; border: 1px #00B3BE solid;
border-radius: 50%; color: #00B3BE;
background: red; }
text-align: center;
line-height: 6px; .button-text-text {
color: #fff; position: absolute;
} right: -10px;
top: -21px;
display: inline-block;
padding: 6px;
border-radius: 50%;
background: red;
text-align: center;
line-height: 6px;
color: #fff;
}
.box-button {
height: 38px;
}
</style> </style>
<style lang='less'> <style lang='less'>
.area-module { .area-module {
.ant-modal-wrap { .ant-modal-wrap {
.ant-modal { .ant-modal {
.ant-modal-content { .ant-modal-content {
.ant-modal-footer { .ant-modal-footer {
text-align: center; text-align: center;
}
} }
} }
} }
} }
}
</style> </style>
<style> <style>
.formAdd .ant-form-item-label { .formAdd .ant-form-item-label {
width: 130px; width: 130px;
} }
.formAdd .ant-form-item-control-wrapper { .formAdd .ant-form-item-control-wrapper {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
} }
/*.formAdd .ant-form-item {*/ /*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/ /* margin-bottom: 20px;*/
/*}*/ /*}*/
.itemModel .ant-form-item-control-wrapper { .itemModel .ant-form-item-control-wrapper {
width: 100%; width: 100%;
} }
.itemModel-text .ant-form-item-control-wrapper { .itemModel-text .ant-form-item-control-wrapper {
width: 100% !important; width: 100% !important;
} }
.box-input .ant-select-selection--single { .box-input .ant-select-selection--single {
height: 38px; height: 38px;
} }
.box-input .ant-select-selection--multiple { .box-input .ant-select-selection--multiple {
height: 38px; height: 38px;
} }
.box-input .ant-select-selection__rendered { .box-input .ant-select-selection__rendered {
line-height: 38px; line-height: 38px;
height: 38px; height: 38px;
} }
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li { .box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px; margin-top: 6px;
} }
.box-input .ant-calendar-picker { .box-input .ant-calendar-picker {
line-height: 38px; line-height: 38px;
height: 38px; height: 38px;
} }
.box-input .ant-calendar-picker-input { .box-input .ant-calendar-picker-input {
height: 38px; height: 38px;
} }
.box-input .ant-input-number-input-wrap { .box-input .ant-input-number-input-wrap {
line-height: 38px; line-height: 38px;
height: 38px; height: 38px;
} }
</style> </style>
@@ -286,6 +286,9 @@ export default {
} }
</style> </style>
<style scoped> <style scoped>
/deep/.ant-modal-body{
height: 100% !important;
}
.box-title-text { .box-title-text {
line-height: 1.4; line-height: 1.4;
display: flex; display: flex;
@@ -635,6 +635,7 @@
dataIndex: res.db_field_name, dataIndex: res.db_field_name,
align: 'center', align: 'center',
// ellipsis: true, // ellipsis: true,
fixed: res.click3?'left':'',
sorter: res.sort, sorter: res.sort,
width: 160 width: 160
}) })
@@ -137,7 +137,7 @@
_this.$message.success(_this.$t('OperationSuccessful')) _this.$message.success(_this.$t('OperationSuccessful'))
_this.replacePage() _this.replacePage()
} else { } else {
_this.$message.warning(res.success) _this.$message.warning(res.message)
} }
}) })
} }
@@ -6,7 +6,7 @@
<span style="line-height: 66px;display: inline-block;float: left;cursor: pointer" @click="backClick"> <span style="line-height: 66px;display: inline-block;float: left;cursor: pointer" @click="backClick">
<a-icon type="arrow-left" style="margin-right: 6px;"/> <a-icon type="arrow-left" style="margin-right: 6px;"/>
</span> </span>
{{$t('newlyAdded')}} {{this.$route.query.id ? $t('edit') :$t('newlyAdded')}}
</div> </div>
</div> </div>
<div style="padding-top: 68px;background: #fff"> <div style="padding-top: 68px;background: #fff">
@@ -26,7 +26,7 @@
<a-select-option v-for="(item, key) in projectNameList" <a-select-option v-for="(item, key) in projectNameList"
:key="key" :key="key"
:value="item.value"> :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name "> <span class="selectText" :title=" item.name ">
{{ item.name}} {{ item.name}}
</span> </span>
</a-select-option> </a-select-option>
@@ -73,11 +73,12 @@
</div> </div>
<a-form-model-item class="itemModel" prop="problemType"> <a-form-model-item class="itemModel" prop="problemType">
<a-select :placeholder="$t('PleaseSelect')+$t('problemClassification')" <a-select :placeholder="$t('PleaseSelect')+$t('problemClassification')"
@change="problemTypeChange"
v-model="formInline.problemType"> v-model="formInline.problemType">
<a-select-option v-for="(item, key) in problemTypeList" <a-select-option v-for="(item, key) in problemTypeList"
:key="key" :key="key"
:value="item.id"> :value="item.id">
<span style="display: inline-block;width: 100%" :title="item.problemLabel "> <span class="selectText" :title="item.problemLabel ">
{{item.problemLabel}} {{item.problemLabel}}
</span> </span>
</a-select-option> </a-select-option>
@@ -299,6 +300,13 @@
} }
}) })
}, },
problemTypeChange(event) {
let content = this.problemTypeList.filter(res => {
return res.id == event
})
this.formInline.problemTypeName = content[0].problemLabel
this.formInline = { ...this.formInline }
},
queryById() { queryById() {
let query = { let query = {
id: this.$route.query.id id: this.$route.query.id
@@ -333,7 +341,7 @@
}) })
} }
, ,
showPermissionsChange(event) { showPermissionsChange(event, name) {
if (event == 'Open') { if (event == 'Open') {
this.isDisplay = false this.isDisplay = false
} else { } else {
@@ -597,4 +605,13 @@
::v-deep .ql-snow .ql-picker { ::v-deep .ql-snow .ql-picker {
height: 36px; height: 36px;
} }
.selectText {
width: 100%;
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-break: break-word;
}
</style> </style>
@@ -365,14 +365,21 @@
::v-deep .ant-tag { ::v-deep .ant-tag {
padding: 2px 4px; padding: 2px 4px;
background: #9B9DA9; background: #9B9DA9;
color: #fff!important; color: #fff !important;
} }
::v-deep .ant-tag-checkable:not(.ant-tag-checkable-checked):hover{
color: #fff!important; ::v-deep .ant-tag-checkable:not(.ant-tag-checkable-checked):hover {
color: #fff !important;
} }
::v-deep .ant-tag-checkable-checked{
::v-deep .ant-tag-checkable-checked {
background: #21c9cc; background: #21c9cc;
} }
::v-deep p {
margin: 0;
padding: 0;
}
</style> </style>
<style> <style>
.box-content-left .ant-tag { .box-content-left .ant-tag {
@@ -383,6 +390,7 @@
.box-content-left .ant-tag-checkable { .box-content-left .ant-tag-checkable {
padding: 3px 8px; padding: 3px 8px;
margin-bottom: 10px;
} }
.box-content-left .ant-tag-checkable-checked { .box-content-left .ant-tag-checkable-checked {
@@ -6,7 +6,7 @@
<span style="line-height: 66px;display: inline-block;float: left"> <span style="line-height: 66px;display: inline-block;float: left">
<a-icon type="arrow-left" style="margin-right: 6px;"/> <a-icon type="arrow-left" style="margin-right: 6px;"/>
</span> </span>
{{$t('applicableInstructionsMarketList')}} {{queryForm.title}}
</div> </div>
<div class="doc-detail-right"> <div class="doc-detail-right">
<div @click="forwardClick" class="operator-text-text" :title="$t('forward')"> <div @click="forwardClick" class="operator-text-text" :title="$t('forward')">
@@ -123,7 +123,7 @@
value: 'standNumber' value: 'standNumber'
}, },
{ {
title: this.$t('standardName'), title: this.$t('title'),
value: 'title' value: 'title'
}, },
{ {
@@ -150,7 +150,6 @@
} }
}, },
mounted() { mounted() {
document.title = this.$t('applicableInstructionsMarketList')
this.viewAdd() this.viewAdd()
this.queryById() this.queryById()
this.releaseData() this.releaseData()
@@ -168,6 +167,7 @@
if (res.success) { if (res.success) {
this.queryForm = res.result || {} this.queryForm = res.result || {}
this.queryForm = { ...this.queryForm } this.queryForm = { ...this.queryForm }
document.title = this.queryForm.title
if (this.formInline.showPermissions == 'Privacy') { if (this.formInline.showPermissions == 'Privacy') {
this.isDisplay = true this.isDisplay = true
} else { } else {
@@ -46,7 +46,7 @@
<span slot="language" slot-scope="text,record"> <span slot="language" slot-scope="text,record">
<span>{{text == 1?$t('simplifiedChinese'):$t('English')}}</span> <span>{{text == 1?$t('simplifiedChinese'):$t('English')}}</span>
</span> </span>
<span slot="RegulationMonthlyName" slot-scope="text,record"> <span slot="RegulationMonthlyName" :title="text" slot-scope="text,record">
<a @click="preview(record)">{{text}}</a> <a @click="preview(record)">{{text}}</a>
</span> </span>
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
@@ -217,7 +217,7 @@
}, },
{ {
title: this.$t('feedbackTime'), title: this.$t('feedbackTime'),
dataIndex: 'createTime', dataIndex: 'updateTime',
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
width: 160 width: 160
@@ -130,7 +130,7 @@
<div style="margin-bottom: 10px;position: relative"> <div style="margin-bottom: 10px;position: relative">
<a-checkbox :value="item.id" class="checkbox-left"></a-checkbox> <a-checkbox :value="item.id" class="checkbox-left"></a-checkbox>
<div class="text-text-right" <div class="text-text-right"
@click="checkedClick(item)" @click="titleClick(item)"
:class="{ 'null-input':item.checked }"> :class="{ 'null-input':item.checked }">
<div class="text-header"> <div class="text-header">
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"> <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
@@ -144,51 +144,53 @@
<span v-html="item.serial_number"></span> <span v-html="item.serial_number"></span>
</template> </template>
<span style="cursor: pointer" <span style="cursor: pointer"
@click="titleClick(item)" v-html="item.serial_number"></span> v-html="item.serial_number"></span>
</a-tooltip> </a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"> <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
<template slot="title"> <template slot="title">
<span v-html="item.title"></span> <span v-html="item.title"></span>
</template> </template>
<span style="cursor: pointer" v-html="item.title" @click="titleClick(item)"></span> <span style="cursor: pointer" v-html="item.title"></span>
</a-tooltip> </a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"> <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
<template slot="title"> <template slot="title">
<span v-html="item.file_name"></span> <span v-html="item.file_name"></span>
</template> </template>
<span style="cursor: pointer" v-html="item.file_name" @click="titleClick(item)"></span> <span style="cursor: pointer" v-html="item.file_name"></span>
</a-tooltip> </a-tooltip>
</div> </div>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" <!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
v-if="selectModel == ''"> <!-- >-->
<template slot="title"> <!-- <template slot="title">-->
<span v-html="item.content"></span> <!-- <span v-html="item.content"></span>-->
</template> <!-- </template>-->
<div class="text-content" @click="checkedClick(item)" v-html="item.content" <div v-if="selectModel == ''" class="text-content" v-html="item.content"
> >
</div> </div>
</a-tooltip> <!-- </a-tooltip>-->
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" <!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
v-else-if="(item.file_text instanceof Array) && selectModel != ''"> <!-- >-->
<template slot="title"> <!-- <template slot="title">-->
<span v-html="item.content"></span> <!-- <span v-html="item.content"></span>-->
</template> <!-- </template>-->
<div class="text-content" @click="checkedClick(item)" v-html="item.content"></div> <div v-else-if="(item.file_text instanceof Array) && selectModel != ''"
</a-tooltip> class="text-content" v-html="item.content"></div>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" <!-- </a-tooltip>-->
v-else-if="!item.file_text && selectModel != ''"> <!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
<template slot="title"> <!-- >-->
<span v-html="item.content"></span> <!-- <template slot="title">-->
</template> <!-- <span v-html="item.content"></span>-->
<div class="text-content" @click="checkedClick(item)" v-html="item.content"></div> <!-- </template>-->
</a-tooltip> <div v-else-if="!item.file_text && selectModel != ''"
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" v-else> class="text-content" v-html="item.content"></div>
<template slot="title"> <!-- </a-tooltip>-->
<span v-html="item.file_text"></span> <!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" >-->
</template> <!-- <template slot="title">-->
<div class="text-content" @click="checkedClick(item)" v-html="item.file_text"> <!-- <span v-html="item.file_text"></span>-->
</div> <!-- </template>-->
</a-tooltip> <div v-else class="text-content" v-html="item.file_text">
</div>
<!-- </a-tooltip>-->
</div> </div>
</div> </div>
</li> </li>
@@ -666,6 +668,11 @@
postAction(this.url.getParagraphInfoList, query).then((res) => { postAction(this.url.getParagraphInfoList, query).then((res) => {
if (res.success) { if (res.success) {
this.conList = res.result.records this.conList = res.result.records
if (this.conList && this.conList.length > 0) {
this.conList.forEach(val => {
val.content = val.content.replace(/<img .*?>/g, '')
})
}
this.total = res.result.total this.total = res.result.total
this.loading = false this.loading = false
} else { } else {
@@ -857,6 +864,7 @@
padding: 19px 28px; padding: 19px 28px;
box-sizing: border-box; box-sizing: border-box;
margin-left: 38px; margin-left: 38px;
cursor: pointer;
} }
.null-input { .null-input {
@@ -934,6 +942,11 @@
word-break: break-all word-break: break-all
} }
::v-deep p {
margin: 0;
padding: 0;
}
/*::v-deep .ant-select {*/ /*::v-deep .ant-select {*/
/* max-width: calc(100% - 126px) !important;*/ /* max-width: calc(100% - 126px) !important;*/
/*}*/ /*}*/
@@ -4,7 +4,7 @@
<span>{{$t('searchScope')}}</span> <span>{{$t('searchScope')}}</span>
<span>{{ queryParam.selectValue }}</span> <span>{{ queryParam.selectValue }}</span>
</div> </div>
<a-checkbox-group v-model="checkboxText" v-if="conList.length > 0"> <a-checkbox-group style="width: 100%" v-model="checkboxText" v-if="conList.length > 0">
<li v-for="(item,index) in conList" :key="item.id"> <li v-for="(item,index) in conList" :key="item.id">
<div style="margin-bottom: 10px;position: relative"> <div style="margin-bottom: 10px;position: relative">
<a-checkbox :value="item.id" class="checkbox-left"></a-checkbox> <a-checkbox :value="item.id" class="checkbox-left"></a-checkbox>
@@ -19,36 +19,38 @@
<span class="text-header-text" style="cursor: pointer" v-html="item.title"></span> <span class="text-header-text" style="cursor: pointer" v-html="item.title"></span>
</a-tooltip> </a-tooltip>
</div> </div>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" v-if="!queryParam.selectValue" <!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" -->
:mouseEnterDelay="0.5"> <!-- :mouseEnterDelay="0.5">-->
<template slot="title"> <!-- <template slot="title">-->
<span v-html="item.content"></span> <!-- <span v-html="item.content"></span>-->
</template> <!-- </template>-->
<div class="text-content" v-html="item.content" <div v-if="!queryParam.selectValue" class="text-content" v-html="item.content"
> >
</div> </div>
</a-tooltip> <!-- </a-tooltip>-->
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" <!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
v-else-if="(item.file_text instanceof Array) && queryParam.selectValue"> <!-- >-->
<template slot="title"> <!-- <template slot="title">-->
<span v-html="item.content"></span> <!-- <span v-html="item.content"></span>-->
</template> <!-- </template>-->
<div class="text-content" v-html="item.content"></div> <div v-else-if="(item.file_text instanceof Array) && queryParam.selectValue"
</a-tooltip> class="text-content" v-html="item.content"></div>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" <!-- </a-tooltip>-->
v-else-if="!item.file_text && queryParam.selectValue"> <!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
<template slot="title"> <!-- >-->
<span v-html="item.content"></span> <!-- <template slot="title">-->
</template> <!-- <span v-html="item.content"></span>-->
<div class="text-content" v-html="item.content"></div> <!-- </template>-->
</a-tooltip> <div v-else-if="!item.file_text && queryParam.selectValue"
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" v-else> class="text-content" v-html="item.content"></div>
<template slot="title"> <!-- </a-tooltip>-->
<span v-html="item.file_text"></span> <!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" >-->
</template> <!-- <template slot="title">-->
<div class="text-content" v-html="item.file_text"> <!-- <span v-html="item.file_text"></span>-->
</div> <!-- </template>-->
</a-tooltip> <div v-else class="text-content" v-html="item.file_text">
</div>
<!-- </a-tooltip>-->
</div> </div>
</div> </div>
</li> </li>
@@ -191,6 +193,11 @@
postAction(this.url.getInfoList, query).then((res) => { postAction(this.url.getInfoList, query).then((res) => {
if (res.success) { if (res.success) {
this.conList = res.result.records this.conList = res.result.records
if (this.conList && this.conList.length > 0) {
this.conList.forEach(val => {
val.content = val.content.replace(/<img .*?>/g, '')
})
}
this.total = res.result.total this.total = res.result.total
this.loading = false this.loading = false
} else { } else {
@@ -305,4 +312,9 @@
text-align: center; text-align: center;
line-height: 10; line-height: 10;
} }
::v-deep p {
margin: 0;
padding: 0;
}
</style> </style>
@@ -12,7 +12,7 @@
<a-select-option v-for="(item, key) in tagList" <a-select-option v-for="(item, key) in tagList"
:key="key" :key="key"
:value="item.id"> :value="item.id">
<span style="display: inline-block;width: 100%" :title=" item.problemLabel "> <span class="selectText" :title=" item.problemLabel ">
{{ item.problemLabel}} {{ item.problemLabel}}
</span> </span>
</a-select-option> </a-select-option>
@@ -20,10 +20,10 @@
</div> </div>
<div class="text-left-select"> <div class="text-left-select">
<span class="text-sel" :title="$t('market')">{{$t('market')}}</span> <span class="text-sel" :title="$t('market')">{{$t('market')}}</span>
<j-dict-select-tag class="text-select" v-model="queryParamOne.target_market" <j-multi-select-tag class="text-select" v-model="queryParamOne.target_market"
:placeholder="$t('PleaseSelect')+$t('market')" :placeholder="$t('PleaseSelect')+$t('market')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'region'"/> :triggerChange="false" :dictCode="'region'"/>
</div> </div>
</div> </div>
<div class="table-page-search-submitButtons submitButtons"> <div class="table-page-search-submitButtons submitButtons">
@@ -41,8 +41,8 @@
</div> </div>
</div> </div>
<div class="box-content"> <div class="box-content">
<a-checkbox-group v-model="checkboxText"> <a-checkbox-group style="width: 100%" v-model="checkboxText">
<li v-for="item in conList" :key="item.id"> <div v-for="item in conList" :key="item.id">
<div style="margin-bottom: 10px;position: relative"> <div style="margin-bottom: 10px;position: relative">
<a-checkbox :value="item.id" class="checkbox-left"></a-checkbox> <a-checkbox :value="item.id" class="checkbox-left"></a-checkbox>
<div class="text-text-right" <div class="text-text-right"
@@ -53,20 +53,22 @@
<template slot="title"> <template slot="title">
<span v-html="item.title"></span> <span v-html="item.title"></span>
</template> </template>
<span style="cursor: pointer" v-html="item.title"></span> <div class="text-header-text" style="cursor: pointer" v-html="item.title">
</div>
</a-tooltip> </a-tooltip>
</div> </div>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"> <!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">-->
<template slot="title"> <!-- <template slot="title">-->
<span v-html="item.content"></span> <!-- <span v-html="item.content"></span>-->
</template> <!-- </template>-->
<div class="text-content" v-html="item.content" <div class="text-content" v-html="item.content"
> >
</div> </div>
</a-tooltip> <!-- </a-tooltip>-->
</div> </div>
</div> </div>
</li> </div>
</a-checkbox-group> </a-checkbox-group>
</div> </div>
<div class="page"> <div class="page">
@@ -220,7 +222,9 @@
return words.replace(/\s/g, '') //这里是去除空格 return words.replace(/\s/g, '') //这里是去除空格
}, },
getParagraphInfoList() { getParagraphInfoList() {
let queryParamOne = Object.assign(this.queryParam, this.queryParamOne) let queryParamIndex = JSON.parse(JSON.stringify(this.queryParam))
let queryParamAdmin = JSON.parse(JSON.stringify(this.queryParamOne))
let queryParamOne = Object.assign(queryParamIndex, queryParamAdmin)
let queryParam = JSON.parse(JSON.stringify(queryParamOne)) let queryParam = JSON.parse(JSON.stringify(queryParamOne))
Object.keys(queryParam).forEach(val => { Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) { if (queryParam[val] instanceof Array) {
@@ -238,6 +242,12 @@
postAction(this.url.getParagraphInfoList, query).then((res) => { postAction(this.url.getParagraphInfoList, query).then((res) => {
if (res.success) { if (res.success) {
this.conList = res.result.records this.conList = res.result.records
if (this.conList && this.conList.length > 0) {
this.conList.forEach(val => {
val.content = val.content.replace(/<img .*?>/g, '')
val.content = val.content.replace(/<\/?p[^>]*>/gi, '')
})
}
this.total = res.result.total this.total = res.result.total
this.loading = false this.loading = false
} else { } else {
@@ -428,16 +438,17 @@
.text-header { .text-header {
margin-bottom: 11px; margin-bottom: 11px;
width: 100%;
span { .text-header-text {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
color: #040B29; color: #040B29;
display: inline-block;
width: 100%; width: 100%;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
word-break: break-word;
} }
} }
@@ -482,4 +493,18 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; 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;
}
</style> </style>
@@ -8,9 +8,9 @@
<li v-for="(item,index) in conList" :key="item.id"> <li v-for="(item,index) in conList" :key="item.id">
<div style="margin-bottom: 10px;position: relative"> <div style="margin-bottom: 10px;position: relative">
<a-checkbox :value="item.id" class="checkbox-left"></a-checkbox> <a-checkbox :value="item.id" class="checkbox-left"></a-checkbox>
<div class="text-text-right" <div class="text-text-right" @click="titleClick(item)"
:class="{ 'null-input':item.checked }"> :class="{ 'null-input':item.checked }">
<div class="text-header" @click="titleClick(item)"> <div class="text-header">
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"> <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
<template slot="title"> <template slot="title">
<span v-html="item.module_type"></span> <span v-html="item.module_type"></span>
@@ -21,7 +21,7 @@
</template> </template>
<span style="cursor: pointer" <span style="cursor: pointer"
class="text-header-text" class="text-header-text"
v-if="item.serial_number" v-if="item.serial_number && !item.module_type_flag"
v-html="item.serial_number"></span> v-html="item.serial_number"></span>
<template slot="title"> <template slot="title">
<span v-html="item.title"></span> <span v-html="item.title"></span>
@@ -30,7 +30,7 @@
<template slot="title"> <template slot="title">
<span v-html="item.file_name"></span> <span v-html="item.file_name"></span>
</template> </template>
<span class="text-header-text" v-if="item.file_name" style="cursor: pointer" <span class="text-header-text" v-if="item.file_name && !item.module_type_flag" style="cursor: pointer"
v-html="item.file_name"></span> v-html="item.file_name"></span>
</a-tooltip> </a-tooltip>
<!-- <a-tooltip placement="topLeft" :mouseEnterDelay="0.5">--> <!-- <a-tooltip placement="topLeft" :mouseEnterDelay="0.5">-->
@@ -43,36 +43,39 @@
</a-tooltip> </a-tooltip>
</div> </div>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" v-if="!queryParam.selectValue" <!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" -->
:mouseEnterDelay="0.5"> <!-- :mouseEnterDelay="0.5">-->
<template slot="title"> <!-- <template slot="title">-->
<span v-html="item.content"></span> <!-- <span v-html="item.content"></span>-->
</template> <!-- </template>-->
<div class="text-content" @click="checkedClick(item)" v-html="item.content" <div v-if="!queryParam.selectValue" class="text-content" v-html="item.content"
> >
</div> </div>
</a-tooltip> <!-- </a-tooltip>-->
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" <!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
v-else-if="(item.file_text instanceof Array) && queryParam.selectValue"> <!-- >-->
<template slot="title"> <!-- <template slot="title">-->
<span v-html="item.content"></span> <!-- <span v-html="item.content"></span>-->
</template> <!-- </template>-->
<div class="text-content" @click="checkedClick(item)" v-html="item.content"></div> <div v-else-if="(item.file_text instanceof Array) && queryParam.selectValue"
</a-tooltip> class="text-content" v-html="item.content"></div>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" <!-- </a-tooltip>-->
v-else-if="!item.file_text && queryParam.selectValue"> <!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
<template slot="title"> <!-- >-->
<span v-html="item.content"></span> <!-- <template slot="title">-->
</template> <!-- <span v-html="item.content"></span>-->
<div class="text-content" @click="checkedClick(item)" v-html="item.content"></div> <!-- </template>-->
</a-tooltip> <div v-else-if="!item.file_text && queryParam.selectValue"
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" v-else> class="text-content" v-html="item.content"></div>
<template slot="title"> <!-- </a-tooltip>-->
<span v-html="item.file_text"></span> <!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" >-->
</template> <!-- <template slot="title">-->
<div class="text-content" @click="checkedClick(item)" v-html="item.file_text"> <!-- <span v-html="item.file_text"></span>-->
</div> <!-- </template>-->
</a-tooltip> <!-- @click="checkedClick(item)"-->
<div v-else class="text-content" v-html="item.file_text">
</div>
<!-- </a-tooltip>-->
</div> </div>
</div> </div>
</li> </li>
@@ -213,6 +216,12 @@
postAction(this.url.getInfoList, query).then((res) => { postAction(this.url.getInfoList, query).then((res) => {
if (res.success) { if (res.success) {
this.conList = res.result.records this.conList = res.result.records
if (this.conList && this.conList.length > 0) {
this.conList.forEach(val => {
val.content = val.content.replace(/<img .*?>/g, '')
val.content = val.content.replace(/<\/?p[^>]*>/gi,'')
})
}
this.total = res.result.total this.total = res.result.total
} else { } else {
this.conList = [] this.conList = []
@@ -287,6 +296,7 @@
padding: 19px 28px; padding: 19px 28px;
box-sizing: border-box; box-sizing: border-box;
margin-left: 38px; margin-left: 38px;
cursor: pointer;
} }
.null-input { .null-input {
@@ -351,4 +361,9 @@
text-align: center; text-align: center;
line-height: 10; line-height: 10;
} }
::v-deep p {
margin: 0;
padding: 0;
}
</style> </style>
@@ -65,10 +65,10 @@
<a-tab-pane :key="$t('whole')" :tab="$t('whole')"></a-tab-pane> <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 :key="$t('DocumentLibrary')" :tab="$t('DocumentLibrary')" force-render>
</a-tab-pane> </a-tab-pane>
<!-- <a-tab-pane :key="$t('problemKnowledgeBase')" :tab="$t('problemKnowledgeBase')" force-render>--> <a-tab-pane :key="$t('problemKnowledgeBase')" :tab="$t('problemKnowledgeBase')" force-render>
<!-- </a-tab-pane>--> </a-tab-pane>
<!-- <a-tab-pane :key="$t('monthlyReportRegulations')" :tab="$t('monthlyReportRegulations')" force-render>--> <a-tab-pane :key="$t('monthlyReportRegulations')" :tab="$t('monthlyReportRegulations')" force-render>
<!-- </a-tab-pane>--> </a-tab-pane>
</a-tabs> </a-tabs>
</div> </div>
</div> </div>
@@ -644,12 +644,12 @@ export default {
// } else { // } else {
// value.technologyTerritory = value.technologyTerritory.split(',') // value.technologyTerritory = value.technologyTerritory.split(',')
// } // }
this.formInline = value
if(this.formInline.controlType == 11){ if(this.formInline.controlType == 11){
this.required = false this.required = false
}else{ }else{
this.required = true this.required = true
} }
this.formInline = value
this.title = this.$t('edit') this.title = this.$t('edit')
this.flag = 0 this.flag = 0
// 获取认证类别 // 获取认证类别
@@ -80,6 +80,12 @@
<!-- <a-icon type="setting"/>--> <!-- <a-icon type="setting"/>-->
<!-- {{ $t('batSetting') }}--> <!-- {{ $t('batSetting') }}-->
<!-- </div>--> <!-- </div>-->
<div @click="BatchMaintenanceProgress" class="operator-text">
{{$t('BatchMaintenanceProgress')}}
</div>
<div @click="BatchChangeStatus" class="operator-text">
{{$t('BatchChangeStatus')}}
</div>
<div @click="CertificationDirectory" class="operator-text"> <div @click="CertificationDirectory" class="operator-text">
<a-icon type="bulb"/> <a-icon type="bulb"/>
{{$t('CertificationDirectory')}} {{$t('CertificationDirectory')}}
@@ -100,6 +106,8 @@
:pagination="false" :pagination="false"
:scroll="{x: true}" :scroll="{x: true}"
:data-source="dataSource" :data-source="dataSource"
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns" :columns="columns"
> >
<div slot="standardInformation" slot-scope="text,result" class="box-left"> <div slot="standardInformation" slot-scope="text,result" class="box-left">
@@ -178,11 +186,38 @@
<certificationDirectory :isDisplayNum="isDisplayNum" :url="url" ref="certificationDirectoryRef"/> <certificationDirectory :isDisplayNum="isDisplayNum" :url="url" ref="certificationDirectoryRef"/>
<TaskListModel @TaskListModelList="TaskListModelList" ref="TaskListModelRef"/> <TaskListModel @TaskListModelList="TaskListModelList" ref="TaskListModelRef"/>
<taskBatSetting @taskBatSettingForm="taskBatSettingForm" ref="taskBatSettingRef"></taskBatSetting> <taskBatSetting @taskBatSettingForm="taskBatSettingForm" ref="taskBatSettingRef"></taskBatSetting>
<batchChangeModel @batchChangeModel="batchChangeModel" ref="batchChangeModelRef"/>
<batchModel @batchModel="batchModel" ref="batchModelRef"/>
<!-- 错误数据提示-->
<a-modal
:title="$t('operationFailed')"
:width="860"
v-model="visibleoperationFailed"
:maskClosable="false"
@cancel='cancleoperationFailed'
:footer="null"
>
<a-row :gutter="24">
<a-col :span="24">
<span style='font-size: 16px;margin-bottom: 20px;display: flex;justify-content: center'
v-for='(item,key) in NotSelectedNoEngineerValue'>
<span v-html='item'></span>
</span>
</a-col>
</a-row>
<div class="imports-footer">
<div class="imports-footer-wrap" style='text-align: center'>
<a-button class="imports-btn" type="primary" @click="cancleoperationFailed">{{$t('cancel')}}</a-button>
</div>
</div>
</a-modal>
</a-card> </a-card>
</template> </template>
<script> <script>
import certificationDirectory from './certificationDirectory' import certificationDirectory from './certificationDirectory'
import batchChangeModel from './batchChangeModel'
import batchModel from './batchModel'
import TaskListModel from './TaskListModel' import TaskListModel from './TaskListModel'
import taskBatSetting from './taskBatSetting' import taskBatSetting from './taskBatSetting'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage' import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
@@ -194,6 +229,8 @@
components: { components: {
certificationDirectory, certificationDirectory,
TaskListModel, TaskListModel,
batchChangeModel,
batchModel,
taskBatSetting taskBatSetting
}, },
props: ['isDisplayNum', 'areaOfResponsibility'], props: ['isDisplayNum', 'areaOfResponsibility'],
@@ -259,6 +296,7 @@
} }
], ],
selectedRowKeys: [], selectedRowKeys: [],
status: { status: {
'NotDone': '待办', 'NotDone': '待办',
'haveDone': '已办', 'haveDone': '已办',
@@ -305,7 +343,11 @@
exportXls: '/project/projectTaskInventoryEO/exportXls' exportXls: '/project/projectTaskInventoryEO/exportXls'
}, },
loading: false, loading: false,
visibleoperationFailed:false,
NotSelectedNoEngineerValue:[],
dataSource: [], dataSource: [],
selectionRowsArray:[],
roleCodes:[],
long: '' long: ''
} }
}, },
@@ -352,8 +394,15 @@
taskBatSettingForm() { taskBatSettingForm() {
this.getList() this.getList()
}, },
onSelectChange(value) { batchChangeModel() {
this.getList()
},
batchModel() {
this.getList()
},
onSelectChange(value, selectionRows) {
this.selectedRowKeys = value this.selectedRowKeys = value
this.selectionRowsArray = selectionRows
}, },
handleExport() { handleExport() {
let query = { let query = {
@@ -450,6 +499,7 @@
CertificationDirectory() { CertificationDirectory() {
this.$refs.certificationDirectoryRef.addModel() this.$refs.certificationDirectoryRef.addModel()
}, },
getList() { getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam)) let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => { Object.keys(queryParam).forEach(val => {
@@ -484,6 +534,77 @@
let item = JSON.parse(JSON.stringify(val)) let item = JSON.parse(JSON.stringify(val))
this.$refs.TaskListModelRef.getData(item, this.$t('CurrentStatus')) this.$refs.TaskListModelRef.getData(item, this.$t('CurrentStatus'))
}, },
//批量维护进度
BatchMaintenanceProgress() {
if(this.selectionRowsArray.length <1){
this.$message.warning(this.$t('selectLeastOne'))
}else{
let query = {}
let projectLawsInventoryIds = []
let roleCodes = []
this.selectionRowsArray.forEach((item,index) => {
projectLawsInventoryIds.push(item.projectLawsInventoryId)
roleCodes.push(item.roleCode)
})
query = {
roleCodes: roleCodes.join(','),
operation:'1',
projectLawsInventoryIds: projectLawsInventoryIds.join(',')
}
postAction('/project/projectTaskInventoryEO/verifyRoleCode', query).then((res) => {
if (res.success) {
if(res.result.length == 0){
this.$refs.batchModelRef.getData(this.selectedRowKeys)
}else{
this.NotSelectedNoEngineerValue = res.result
this.visibleoperationFailed = true
}
} else {
}
})
}
},
//批量修改状态
BatchChangeStatus() {
if(this.selectionRowsArray.length <1){
this.$message.warning(this.$t('selectLeastOne'))
}else{
let query = {}
let projectLawsInventoryIds = []
let roleCodes = []
this.selectionRowsArray.forEach((item,index) => {
projectLawsInventoryIds.push(item.projectLawsInventoryId)
roleCodes.push(item.roleCode)
})
query = {
roleCodes: roleCodes.join(','),
operation:'2',
projectLawsInventoryIds: projectLawsInventoryIds.join(',')
}
postAction('/project/projectTaskInventoryEO/verifyRoleCode', query).then((res) => {
if (res.success) {
if(res.result.length == 0){
this.$refs.batchChangeModelRef.getData(this.selectionRowsArray)
}else{
this.NotSelectedNoEngineerValue = res.result
this.visibleoperationFailed = true
}
} else {
}
})
}
},
cancleoperationFailed(){
this.visibleoperationFailed = false
},
TaskListModelList() { TaskListModelList() {
this.getList() this.getList()
}, },
@@ -0,0 +1,216 @@
<!--批量当前状态-->
<template>
<a-modal
:title="title"
:width="700"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="visible = false"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<div class="headerText">
{{this.$t('redSchedule')}}<br/>
{{this.$t('yellowSchedule')}}<br/>
{{this.$t('greenRequirements')}}<br/>
{{this.$t('blueUndeterminedState')}}
</div>
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('CurrentProjectStatusEvaluation')">{{$t('CurrentProjectStatusEvaluation')}}</span>
</div>
<a-form-model-item class="itemModel" prop="conditionAssessment">
<a-select
:disabled="disabled"
v-model="formInline.conditionAssessment"
:placeholder="$t('PleaseSelect')+$t('CurrentProjectStatusEvaluation')">
<a-select-option :value="'1'">
<span style="display: inline-block;width: 100%">
{{ $t('red') }}
</span>
</a-select-option>
<a-select-option :value="'2'">
<span style="display: inline-block;width: 100%">
{{ $t('yellow') }}
</span>
</a-select-option>
<a-select-option :value="'3'">
<span style="display: inline-block;width: 100%">
{{ $t('green') }}
</span>
</a-select-option>
<a-select-option :value="'4'" disabled>
<span style="display: inline-block;width: 100%">
{{ $t('blue') }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('remarks')">{{$t('remarks')}}</span>
</div>
<a-form-model-item class="itemModel" prop="remark">
<a-textarea
:placeholder="$t('remarks')"
:disabled="disabled"
v-model="formInline.remark" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import { postAction, putAction, getAction } from '@/api/manage'
export default {
name: 'TaskListModel',
data() {
return {
formInline: {},
rules: {},
selectionRowsArray:[],
projectLawsInventoryIds:[],
roleCodes:[],
visible: false,
title:'',
confirmLoading: false,
studioList: [],
disabled: false,
url: {
edit: '/project/projectTaskInventoryEO/edit',
addOrUpdate: '/project/projectTaskInventoryConditionAssessmentEO/addOrUpdate',
list: '/project/projectTaskInventoryConditionAssessmentEO/list'
}
}
},
mounted() {
},
methods: {
getData(val) {
this.visible = true
this.title = this.$t('BatchChangeStatus')
this.selectionRowsArray = val
this.$nextTick(() => {
this.formInline = {}
this.$refs.ruleForm.clearValidate()
})
},
getList(val) {
getAction(this.url.list, { projectLawsInventoryId: val.projectLawsInventoryId }).then((res) => {
if (res.success) {
this.studioList = res.result || []
} else {
this.studioList = []
}
})
},
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
handleOk() {
if (this.disabled) {
this.visible = false
return
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = {}
let projectLawsInventoryIds = []
let roleCodes = []
let Action
this.selectionRowsArray.forEach((item,index) => {
projectLawsInventoryIds.push(item.projectLawsInventoryId)
roleCodes.push(item.roleCode)
})
query = {
roleCodes: roleCodes.join(','),
remark: this.formInline.remark,
conditionAssessment: this.formInline.conditionAssessment,
projectLawsInventoryIds: projectLawsInventoryIds.join(',')
}
Action = postAction
this.confirmLoading = true
Action('/project/projectTaskInventoryConditionAssessmentEO/addOrUpdateBatch', query).then((res) => {
if (res.success) {
this.visible = false
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.$emit('batchChangeModel')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
}
})
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text {
width: 134px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.headerText {
margin-left: 30px;
color: #040B29;
font-weight: 400;
}
</style>
@@ -0,0 +1,180 @@
<!--批量维护进度-->
<template>
<a-modal
:title="title"
:width="700"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="visible = false"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('CertificationProgress')">{{$t('CertificationProgress')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="!disabled?'certificationProgress':''">
<j-dict-select-tag class="box-input" v-model="formInline.certificationProgress"
:disabled="disabled"
@input="handleInput('certificationProgress')"
:placeholder="$t('PleaseSelect')+$t('CertificationProgress')"
:type="'select'"
:triggerChange="false" :dictCode="'certification_progress'"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('remarks')">{{$t('remarks')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="!disabled?'certificationProgressRemark':''">
<a-textarea
:placeholder="$t('PleaseEnter')+$t('remarks')"
:disabled="disabled"
v-model="formInline.certificationProgressRemark" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import { postAction, putAction, getAction } from '@/api/manage'
export default {
name: 'TaskListModel',
data() {
return {
formInline: {},
selectionRowsArray:[],
rules: {},
title:'',
visible: false,
confirmLoading: false,
studioList: [],
ids:'',
disabled: false,
url: {
edit: '/project/projectTaskInventoryEO/edit',
addOrUpdate: '/project/projectTaskInventoryConditionAssessmentEO/addOrUpdate',
list: '/project/projectTaskInventoryConditionAssessmentEO/list'
}
}
},
mounted() {
},
methods: {
getData(val) {
this.visible = true
this.title = this.$t('BatchMaintenanceProgress')
this.selectionRowsArray = val
this.$nextTick(() => {
this.formInline = {}
this.$refs.ruleForm.clearValidate()
})
},
getList(val) {
getAction(this.url.list, { projectLawsInventoryId: val.projectLawsInventoryId }).then((res) => {
if (res.success) {
this.studioList = res.result || []
} else {
this.studioList = []
}
})
},
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
handleOk() {
if (this.disabled) {
this.visible = false
return
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = {}
this.ids = this.selectionRowsArray.join(',')
query = {
ids: this.ids,
certificationProgress: this.formInline.certificationProgress,
certificationProgressRemark: this.formInline.certificationProgressRemark
}
this.confirmLoading = true
postAction('/project/projectTaskInventoryEO/editBatch', query).then((res) => {
if (res.success) {
this.visible = false
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.$emit('batchModel')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
}
})
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text {
width: 134px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.headerText {
margin-left: 30px;
color: #040B29;
font-weight: 400;
}
</style>
@@ -105,7 +105,7 @@
'1': this.$t('SubscriptionNotification'), '1': this.$t('SubscriptionNotification'),
'2': this.$t('warningInformation'), '2': this.$t('warningInformation'),
'3': this.$t('ForwardPush'), '3': this.$t('ForwardPush'),
'4': this.$t('authenticationMessage'), '4': this.$t('CollectinguthenticationParameters'),
// '6':this.$t('RegulationListConfirmationTask'), // '6':this.$t('RegulationListConfirmationTask'),
// '7':this.$t('RegulationListConfirmationNotification'), // '7':this.$t('RegulationListConfirmationNotification'),
// '8':this.$t('RegulationTaskConfirmation'), // '8':this.$t('RegulationTaskConfirmation'),