合并分支 'dev_third_stage' 到 'master'

Dev third stage

查看合并请求 laws-nio/laws-weilai!153
This commit is contained in:
肖文钰
2022-08-24 10:00:29 +08:00
45 changed files with 1748 additions and 707 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` = '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 ('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');
@@ -946,15 +946,15 @@ INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_ti
-- 删除之前的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`
ADD COLUMN `approval_opinion` varchar(2000) NULL COMMENT '审批意见' AFTER `flow_type`;
--- 用户表 删除工号唯一索引 2022-08-18
--- 用户表 删除工号唯一索引 2022-08-18 已同步生产环境
ALTER TABLE `laws_weilai`.`sys_user`
DROP INDEX `uniq_sys_user_work_no`;
-- 工作流 流程表增加流程名称 英文字段 2022-08-19
-- 工作流 流程表增加流程名称 英文字段 2022-08-19 已同步生产环境
ALTER TABLE `laws_weilai_wkflow`.`bus_process_name`
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);
Map<String, Object> map = new HashMap<>();
String dbFieldName = onlCgformField.getDbFieldName();
if ("nio_number".equals(dbFieldName) || "params_name".equals(dbFieldName)) {
map.put("click3", true);
}
if ("description".equals(dbFieldName)) {
indexOfDescription = i;
map.put("click2", true);
@@ -1,6 +1,6 @@
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.extension.plugins.pagination.Page;
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.enums.ExportTemplateStateEnum;
import com.jero.modules.cert.report.service.IParamsExportTemplateEOService;
import com.jero.modules.ocr.util.LineHumpUtil;
import com.jero.modules.system.util.StringUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -61,9 +62,15 @@ public class ParamsExportTemplateEOController extends JeroController<ParamsExpor
paramsExportTemplateEO.setTemplateName(paramsExportTemplateEO.getTemplateName().replace("%", "\\%"));
}
LambdaQueryWrapper<ParamsExportTemplateEO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.like(StringUtils.isNotEmpty(paramsExportTemplateEO.getTemplateName()), ParamsExportTemplateEO::getTemplateName, paramsExportTemplateEO.getTemplateName())
.orderByDesc(ParamsExportTemplateEO::getCreateTime);
if (StringUtils.isNotBlank(paramsExportTemplateEO.getOrderByField())) {
paramsExportTemplateEO.setOrderByField(LineHumpUtil.humpToLine2(paramsExportTemplateEO.getOrderByField()));
}
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);
IPage<ParamsExportTemplateEO> pageList = paramsExportTemplateEOService.page(page, queryWrapper);
// 处理 状态 中英文
@@ -85,4 +85,10 @@ public class ParamsExportTemplateEO implements Serializable {
@TableField(exist = false)
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;
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.extension.plugins.pagination.Page;
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.modules.cert.template.entity.ParamsTemplateEO;
import com.jero.modules.cert.template.service.IParamsTemplateEOService;
import com.jero.modules.ocr.util.LineHumpUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@@ -62,11 +63,17 @@ public class ParamsTemplateEOController extends JeroController<ParamsTemplateEO,
paramsTemplateEO.setParamsTemplateName(paramsTemplateEO.getParamsTemplateName().replace("%","\\%"));
}
LambdaQueryWrapper<ParamsTemplateEO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.like(StringUtils.isNotEmpty(paramsTemplateEO.getParamsTemplateName()), ParamsTemplateEO::getParamsTemplateName, paramsTemplateEO.getParamsTemplateName())
.eq(StringUtils.isNotEmpty(paramsTemplateEO.getRegion()), ParamsTemplateEO::getRegion, paramsTemplateEO.getRegion())
if (StringUtils.isNotBlank(paramsTemplateEO.getOrderByField())) {
paramsTemplateEO.setOrderByField(LineHumpUtil.humpToLine2(paramsTemplateEO.getOrderByField()));
}
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())
.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);
IPage<ParamsTemplateEO> pageList = paramsTemplateEOService.page(page, queryWrapper);
return Result.OK(cut, pageList);
@@ -1,6 +1,7 @@
package com.jero.modules.cert.template.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
@@ -86,4 +87,10 @@ public class ParamsTemplateEO implements Serializable {
@ApiModelProperty(value = "当前版本")
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 = "文档对比信息条款评论表-导出结果")
@ApiOperation(value = "文档对比信息条款评论表-导出结果", notes = "文档对比信息条款评论表-导出结果")
@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 = "includeComments", required = true) boolean includeComments,
@RequestParam(name = "cut", required = true) String cut,
HttpServletResponse response) {
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.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 = "";
@@ -197,14 +203,17 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
} else {
header = "Number,Title,Content,Number,Title,Content,Comment";
}
int[] columnWidth = {5000, 5000, 10000, 5000, 5000, 10000, 10000};
CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象
cellStyle.setAlignment(HorizontalAlignment.CENTER);
cellStyle.setAlignment(HorizontalAlignment.LEFT);
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
cellStyle.setWrapText(true);
Row rowHeader = sheet.createRow(0);//开始创建标题行
if (StringUtils.isNotBlank(header)) {
String[] headerArr = header.split(",");
for (int i = 0; i < headerArr.length; i++) {
rowHeader.createCell(i).setCellValue(headerArr[i]);
sheet.setColumnWidth(i, columnWidth[i]);
}
}
int i = 1;
@@ -219,18 +228,28 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
String text = itemLeft.getItemsText();
text = text.replace("<p>", "").replace("</p>", "\r\n");
row.createCell(2).setCellValue(text);
row.setRowStyle(cellStyle);
}
}
String itemIdRight = itemComment.getItemsIdRight();
SarFileCompareItem itemRight = sfcItemMap.get(itemIdRight);
if (null != itemRight) {
row.createCell(3).setCellValue(itemRight.getItemsNum());
row.createCell(4).setCellValue(itemRight.getItemsName());
String text = itemRight.getItemsText();
text = text.replace("<p>", "").replace("</p>", "\r\n");
row.createCell(5).setCellValue(text);
if (!StringUtils.isEmpty(itemIdRight)) {
SarFileCompareItem itemRight = sfcItemMap.get(itemIdRight);
if (null != itemRight) {
row.createCell(3).setCellValue(itemRight.getItemsNum());
row.createCell(4).setCellValue(itemRight.getItemsName());
String text = itemRight.getItemsText();
text = text.replace("<p>", "").replace("</p>", "\r\n");
row.createCell(5).setCellValue(text);
row.setRowStyle(cellStyle);
}
}
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++;
}
if (includeComments || StringUtils.isEmpty(selectIds)) {
@@ -245,13 +264,10 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
sheet.addMergedRegion(rangeAddress);
SarFileCompareInfo compareInfo = sarFileCompareInfoServiceImpl.queryById(infoId);
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();
// File file = new File("C://work/ee.xlsx");
// os = new FileOutputStream(file);
workbook.write(os);
os.flush();
} 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.util.HttpRequestUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -565,69 +566,111 @@ public class FeishuServiceImpl implements IFeishuService {
headerMap.put("Authorization", "Bearer " + token);
headerMap.put("Content-Type", "application/json; charset=utf-8");
String sendJson = " {\n" +
" \"config\": {\n" +
" \"wide_screen_mode\": true\n" +
" },\n" +
//参考https://open.feishu.cn/tool/cardbuilder?from=openplantform_mcb_entrance
/*String sendJson = "{\n" +
" \"header\": {\n" +
" \"template\": \"green\",\n" +
" \"title\": {\n" +
" \"tag\": \"plain_text\",\n" +
" \"content\": \"点击下方的分类查看常见问题\"\n" +
" },\n" +
" \"template\": \"green\"\n" +
" \"content\": \"知识库分类负责人\",\n" +
" \"tag\": \"plain_text\"\n" +
" }\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" +
"}";
JSONObject jsonObject = JSONObject.parseObject(sendJson);
JSONArray elements = new JSONArray();
JSONObject element = new JSONObject();
element.put("tag","action");
element.put("layout","bisected");
JSONArray fields = new JSONArray();
//获取分类
List<ProblemKnowledgeBaseClassifyEO> problemKnowledgeBaseClassifyEOList = this.problemKnowledgeBaseClassifyEOService.list();
this.problemKnowledgeBaseClassifyEOService.disposeData(problemKnowledgeBaseClassifyEOList);
JSONArray actions = new JSONArray();
//组装推送过去的点击按钮
//获取所有分类下的负责人信息
List<String> chargePersonUserIdList = new ArrayList<>();
for (ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO : problemKnowledgeBaseClassifyEOList) {
JSONObject buttonObject = new JSONObject();
JSONObject text = new JSONObject();
JSONObject value = new JSONObject();
buttonObject.put("tag","button");
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);
if(StringUtils.isNotEmpty(problemKnowledgeBaseClassifyEO.getChargePersonId())){
String chargePersonId = problemKnowledgeBaseClassifyEO.getChargePersonId();
for (String chargePerson : chargePersonId.split(",")) {
chargePersonUserIdList.add(chargePerson);
}
}
}
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);
jsonObject.put("elements",elements);
// 设置请求参数
JSONObject paramsMap = new JSONObject();
paramsMap.put("user_ids", userIds);
paramsMap.put("msg_type", "interactive");
paramsMap.put("card", jsonObject);
if(StringUtils.isNotEmpty(problemKnowledgeBaseClassifyEO.getChargePersonId())){
for (String chargePersonId : problemKnowledgeBaseClassifyEO.getChargePersonId().split(",")) {
for (SysUser sysUser : chargePersonUserList) {
if(StringUtils.equals(chargePersonId,sysUser.getId())){
String thirdId = sysUser.getThirdId();
atUserSb.append("<at id=" + thirdId + "></at>");
atUserSb.append(" ");
}
}
}
}
// 发送请求给飞书
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);
text.put("content","问题标签:" + problemKnowledgeBaseClassifyEO.getProblemLabel() + "\n" + "责任人:" + atUserSb.toString());
text.put("tag","lark_md");
field.put("is_short",true);
field.put("text",text);
fields.add(field);
}
element.put("tag","div");
element.put("fields",fields);
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);
}
/**
@@ -142,11 +143,14 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
}
}
//获取所有市场
List<DictModel> targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
//sbCn sbEn 这两个字段作为es中英文切换
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();
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<>();
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.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions_dicText())){
sbCn.append("展示权限" + ":" + problemKnowledgeBaseEO.getShowPermissions_dicText() + " ");
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions())){
String textByValue = ShowPermissionsEnum.getTextByValue(problemKnowledgeBaseEO.getShowPermissions(), cut);
sbCn.append("展示权限" + ":" + textByValue + " ");
}else {
sbCn.append("展示权限" + ":" + "-- ");
}
@@ -236,8 +241,19 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
sbCn.append("问题分类" + ":" + "-- ");
}
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getTargetMarket_dicText())){
sbCn.append("市场" + ":" + problemKnowledgeBaseEO.getTargetMarket_dicText() + " ");
if(StringUtils.isNotEmpty(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::getText).collect(Collectors.joining(","));
sbCn.append("市场" + ":" + targetMarket + " ");
}else {
sbCn.append("市场" + ":" + "-- ");
}
@@ -255,8 +271,10 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
}*/
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){
sbCn.append("</br>");
sbCn.append("内容" + ":" + problemKnowledgeBaseEO.getContent() + " ");
}else {
sbCn.append("</br>");
sbCn.append("内容" + ":" + "-- ");
}
@@ -268,7 +286,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions())){
sbEn.append("Display permission" + ":" + problemKnowledgeBaseEO.getShowPermissions() + " ");
String textByValue = ShowPermissionsEnum.getTextByValue(problemKnowledgeBaseEO.getShowPermissions(), cut);
sbEn.append("Display permission" + ":" + textByValue + " ");
}else {
sbEn.append("Display permission" + ":" + "-- ");
}
@@ -286,7 +305,18 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
}
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 {
sbEn.append("Market" + ":" + "-- ");
}
@@ -304,8 +334,10 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
}*/
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){
sbEn.append("</br>");
sbEn.append("Content" + ":" + problemKnowledgeBaseEO.getContent() + " ");
}else {
sbEn.append("</br>");
sbEn.append("Content" + ":" + "-- ");
}
@@ -349,6 +381,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
convertAfterMap.put("standard_title",problemKnowledgeBaseEO.getStandTitle());
convertAfterMap.put("content",problemKnowledgeBaseEO.getContent());
convertAfterMap.put("createTime",problemKnowledgeBaseEO.getCreateTime());
convertAfterMap.put("show_permissions",problemKnowledgeBaseEO.getShowPermissions());
}
}
@@ -368,9 +401,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
if(StringUtils.equals(problemKnowledgeBaseEO.getShowPermissions(), ShowPermissionsEnum.PRIVACY.getValue())){
this.batchInsertProblemKnowledgeBaseUserEO(problemKnowledgeBaseEO);
//this.deleteElasticsearchData(problemKnowledgeBaseEO.getId());
}else {
//this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
}
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
}
/**
@@ -406,9 +439,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
this.problemKnowledgeBaseCommentEOService.remove(deleteWrapper);
/*for (String problemKnowledgeBaseId : ids) {
for (String problemKnowledgeBaseId : ids) {
this.deleteElasticsearchData(problemKnowledgeBaseId);
}*/
}
}
/**
@@ -1,26 +1,28 @@
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.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.project.entity.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.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.jero.common.aspect.annotation.AutoLog;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
@@ -181,4 +183,16 @@ public class ConditionAssessmentEOController extends JeroController<ConditionAss
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;
import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson.JSONObject;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.project.entity.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.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.jero.common.aspect.annotation.AutoLog;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
/**
@@ -203,4 +203,32 @@ public class ProjectTaskInventoryEOController extends JeroController<ProjectTask
public Result<?> remindDispose(@RequestBody JSONObject 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;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.common.api.vo.Result;
import com.jero.common.system.vo.LoginUser;
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.vo.ConditionAssessmentVO;
import java.util.List;
import java.util.Map;
@@ -92,4 +92,10 @@ public interface IConditionAssessmentEOService extends IService<ConditionAssessm
* @return
*/
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;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.common.api.vo.Result;
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.HttpServletResponse;
@@ -84,5 +85,21 @@ public interface IProjectTaskInventoryEOService extends IService<ProjectTaskInve
*/
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);
}
@@ -1,6 +1,7 @@
package com.jero.modules.project.service.impl;
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.system.vo.LoginUser;
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.mapper.ConditionAssessmentEOMapper;
import com.jero.modules.project.service.IConditionAssessmentEOService;
import com.jero.modules.project.vo.ConditionAssessmentVO;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
@@ -16,8 +18,6 @@ import org.springframework.stereotype.Service;
import java.util.*;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 任务清单-项目状态评估表
* @Author: jero-boot
@@ -251,4 +251,70 @@ public class ConditionAssessmentEOServiceImpl extends ServiceImpl<ConditionAsses
}
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();
}
}
@@ -4755,10 +4755,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//存在文档库没有的数据
List<String> collect = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).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())){
throw new JeroBootException(StringUtils.join(serialNumbers,",")+"文档库中不存在,不能添加");
}else{
throw new JeroBootException(StringUtils.join(serialNumbers,",")+" does not exist in the document library and cannot be added");
if(serialNumbers.size() > 0){
if(CutEnum.CN.getValue().equals(dataList.get(0).getCut())){
throw new JeroBootException(StringUtils.join(serialNumbers,",")+"文档库中不存在,不能添加");
}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.IProjectTaskInventoryEOService;
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.SysUser;
import com.jero.modules.system.mapper.SysUserMapper;
@@ -459,6 +460,96 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
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
@@ -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);
// 同步es
// syncElasticsearch(id, issueStatus, issueTime);
syncElasticsearch(id, issueStatus, 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.JSONObject;
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.extension.plugins.pagination.Page;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.constant.enums.ModuleEnum;
import com.jero.common.constant.enums.YesOrNoEnum;
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.service.impl.OnlCgformFieldServiceImpl;
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.oss.entity.OSSFile;
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.subscribe.entity.OnlCgformSubscribe;
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.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -65,6 +71,8 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
private IOnlCgformCollectionService iOnlCgformCollectionService;
@Autowired
private IOnlCgformSubscribeService iOnlCgformSubscribeService;
@Autowired
private IProblemKnowledgeBaseUserEOService problemKnowledgeBaseUserEOService;
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.FULL_TEXT_SEARCH_CN.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 queryShould = new JSONArray();
String selectValue = (String) map.get("selectValue");
String selectValueTwo = (String) map.get("selectValueTwo");
String problem_type = (String) map.get("problem_type");
@@ -1097,19 +1111,26 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
List<String> fieldList = new ArrayList<>();
fieldList.add("title");//权重5
fieldList.add("content");//权重4
// fieldList.add("problem_type");//权重3
// fieldList.add("target_market"); //权重2
fieldList.add("module_type");
fieldList.add("id");
fieldList.add("flag");
//fieldList.add("module_type");
//fieldList.add("id");
//fieldList.add("flag");
JSONArray queryMapJson = new JSONArray();
JSONArray queryMapInputJson = new JSONArray();
JSONArray queryMapJsonTwo = new JSONArray();
JSONArray queryMapJsonThree = new JSONArray();
JSONArray queryMapJsonProblemType = new JSONArray();
JSONArray queryMapJsonTargetMarket = 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> mapHighlight1 = new HashMap<>();
//封装首次的条件
@@ -1124,14 +1145,19 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
map3.put("boost",0.01);
}else if("content".equals(field)){
map3.put("boost",0.01);
}else if("file_name".equals(field)){
map3.put("boost",1);
}
map3.put("query",selectValue);
map2.put(field, map3);
map4.put("match",map2);
queryMapJson.add(map4);
//特殊处理标题字段
if (field.equals("title")){
// map2放最内层
map2.put(field, "*" + selectValue + "*");
// map4放query
map4.put("wildcard",map2);
} else {
map3.put("query",selectValue);
map2.put(field, map3);
map4.put("match",map2);
}
queryMapInputJson.add(map4);
//高亮
if(!"flag".equals(field)){
@@ -1143,41 +1169,23 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
//封装问题类型选择框查询条件
if (StringUtils.isNotBlank(problem_type)) {
Map<String, Object> map2 = new HashMap<>();
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);
this.createQueryWhere(problem_type,"problem_type",queryMapJson);
}
//封装市场选择框查询条件
if (StringUtils.isNotBlank(target_market)) {
Map<String, Object> map2 = new HashMap<>();
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);
this.createQueryWhere(target_market,"target_market",queryMapJson);
}
if(CollectionUtils.isNotEmpty(queryMapJson)){
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapJson);
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, null, null);
queryMapJsonAll.add(jsonObject);
}
if(CollectionUtils.isNotEmpty(queryMapInputJson)){
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapInputJson);
queryMapJsonAll.add(jsonObject);
}
//封装二次的条件
if (StringUtils.isNotBlank(selectValueTwo)) {
for (String field : fieldList) {
@@ -1190,13 +1198,10 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
map3.put("boost",0.01);
}else if("content".equals(field)){
map3.put("boost",0.01);
}else if("file_name".equals(field)){
map3.put("boost",1);
}
//特殊处理编号字段
map3.put("query",selectValueTwo);
// map3.put("minimum_should_match",2);
map2.put(field, map3);
queryMap.put("match", map2);
@@ -1237,20 +1242,20 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
Integer pageNo = Integer.parseInt(map.get("pageNo").toString());
Integer pageSize = Integer.parseInt(map.get("pageSize").toString());
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;
}
@NotNull
private IPage getProblemKnowledgeBasePage(String selectValue, String selectValueTwo, JSONArray queryMapJson,Map<String,Object> highlightMap,
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();
//基础添加封装
if ("paragraphFlag".equals(paragraphFlag)) {
jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, null);
jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, queryShould);
} else {
jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, null);
jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, queryShould);
}
JSONArray jsonArraySort = new JSONArray();
jsonArraySort.add(querySort);
@@ -1291,10 +1296,10 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
mapSource.put(key,fieldConyent);
}
//如果这一条数据中有高亮字段值,但是file_text中没有高亮值, 则赋控制,否则列表中会展示所有的文件内容, 赋空后,则展示基础数据
String fileText = (String) mapSource.get("content");
/*String fileText = (String) mapSource.get("content");
if(StringUtils.isNotBlank(fileText) && !fileText.contains("<text class='highlight-class'>")){
mapSource.put("content","");
}
}*/
}
mapList.add(mapSource);
}
@@ -1313,6 +1318,58 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
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();
//1. 需要查询的字段
List<String> fieldList = new ArrayList<>();
fieldList.add("title");//权重5
fieldList.add("file_text");//权重4
fieldList.add("content");//权重3
fieldList.add("file_name"); //权重2
fieldList.add("module_type");
fieldList.add("id");
fieldList.add("title");//权重2
fieldList.add("content");//权重1
fieldList.add("flag");
JSONArray queryMapJson = new JSONArray();
@@ -87,17 +83,21 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
Map<String, Object> map4 = new HashMap<>();
if("title".equals(field)){
map3.put("boost",1);
}else if("file_text".equals(field)){
map3.put("boost",0.01);
}else if("content".equals(field)){
map3.put("boost",0.01);
}else if("file_name".equals(field)){
map3.put("boost",1);
}
// 标题字段 通配符模糊匹配
if (field.equals("title")){
// map2放最内层
map2.put(field, "*" + selectValue + "*");
map3.put("query",selectValue);
map2.put(field, map3);
map4.put("match",map2);
// map4放query
map4.put("wildcard",map2);
} else {
map3.put("query", selectValue);
map2.put(field, map3);
map4.put("match", map2);
}
queryMapJson.add(map4);
//高亮
@@ -119,19 +119,22 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
Map<String, Object> map3 = new HashMap<>();
if("title".equals(field)){
map3.put("boost",1);
}else if("file_text".equals(field)){
map3.put("boost",0.01);
}else if("content".equals(field)){
map3.put("boost",0.01);
}else if("file_name".equals(field)){
map3.put("boost",1);
}
//特殊处理编号字段
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);
map2.put(field, map3);
queryMap.put("match", map2);
map2.put(field, map3);
queryMap.put("match", map2);
}
queryMapJsonTwo.add(queryMap);
//高亮
@@ -190,8 +193,11 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
} else {
jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, null);
}
JSONArray jsonArraySort = new JSONArray();
jsonArraySort.add(querySort);
if (SEARCH_FLAG.equals(selectValue) && StringUtils.isEmpty(selectValueTwo)) {
jsonArraySort.add(querySort);
}
//1. 条件,分页
JSONObject queryObject = jeroElasticsearchTemplate.buildQuery(null,
@@ -1,6 +1,6 @@
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.extension.plugins.pagination.Page;
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.modules.document.service.IBussDocumentLibraryEOService;
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.page.SarFileSplitInfoEOPage;
import com.jero.modules.split.service.ISarFileSplitInfoService;
@@ -59,7 +60,7 @@ public class SarFileSplitInfoController extends JeroController<SarFileSplitInfoE
@GetMapping(value = "/page")
@RequiresPermissions("split:sarFileSplitInfo:page")
public Result<?> queryPageList(SarFileSplitInfoEOPage sarFileSplitInfoEOPage) {
LambdaQueryWrapper<SarFileSplitInfoEO> queryWrapper = new LambdaQueryWrapper<>();
QueryWrapper<SarFileSplitInfoEO> queryWrapper = new QueryWrapper<>();
if(StringUtils.isNotEmpty(sarFileSplitInfoEOPage.getSerialNumber())){
sarFileSplitInfoEOPage.setSerialNumber(sarFileSplitInfoEOPage.getSerialNumber().replace("%","\\%"));
}
@@ -67,13 +68,18 @@ public class SarFileSplitInfoController extends JeroController<SarFileSplitInfoE
sarFileSplitInfoEOPage.setTitle(sarFileSplitInfoEOPage.getTitle().replace("%","\\%"));
}
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.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);
.like(StringUtils.isNotEmpty(sarFileSplitInfoEOPage.getTitle()) && CutEnum.EN.getValue().equals(sarFileSplitInfoEOPage.getCut()), SarFileSplitInfoEO::getTitleEn, sarFileSplitInfoEOPage.getTitle());
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());
IPage<SarFileSplitInfoEO> pageList = sarFileSplitInfoService.page(page, queryWrapper);
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.modules.document.enums.FieldTypeEnum;
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.oss.entity.OSSFile;
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.shiro.SecurityUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
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.web.multipart.MultipartFile;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
@@ -792,6 +788,16 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
//处理列表表头排序
if("page".equals(type)) {
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();
return condition;
+3
View File
@@ -1269,4 +1269,7 @@ module.exports = {
source:'Source',
sourceEn:'Source (English)',
onlyone:'Only one merge delimiter can be entered',
BatchMaintenanceProgress:'Batch Maintenance Progress',
BatchChangeStatus:'Batch Change Status',
CollectinguthenticationParameters:'Collecting Authentication Parameters',
}
+4
View File
@@ -1371,4 +1371,8 @@ module.exports = {
source: '来源',
sourceEn: '来源(英文)',
onlyone:'只能输入一个合并分隔符',
BatchMaintenanceProgress:'批量维护进度',
BatchChangeStatus:'批量修改状态',
CollectinguthenticationParameters:'认证参数收集',
}
@@ -1,93 +1,58 @@
<template>
<div class='diolag-area'>
<a-spin :spinning='spinLoading'>
<a-form-model
@keyup.enter.native="searchQuery"
class='tag-module'
ref='ruleForm'
:model='form'
:rules='rules'
:label-col='labelCol'
:wrapper-col='wrapperCol'
>
<a-row :gutter='24'>
<a-col :span='9'>
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="12" :sm="8">
<div class="box-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>
</div>
<a-form-model-item class="itemModel" :prop='region'>
<!-- <a-input class="box-input"-->
<!-- :disabled="disabled"-->
<!-- 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 class="itemModel">
<a-input class="box-input" :title="$t('pleaseEnter')+$t('ParameterName')"
v-model='form.nioNumber' :placeholder="$t('pleaseEnter')+$t('NiONumber')"/>
</a-form-model-item>
</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 :span='9'>
<a-col :md="12" :sm="8">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('ParameterName')">{{$t('ParameterName')}}</span>
</div>
<a-form-model-item class="itemModel" :prop='region'>
<!-- <a-input class="box-input"-->
<!-- :disabled="disabled"-->
<!-- v-model="formInline[item.db_field_name]"-->
<!-- :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 class="itemModel">
<a-input class="box-input"
v-model='form.paramsName' :title="$t('pleaseEnter')+$t('ParameterName')"
:placeholder="$t('pleaseEnter')+$t('ParameterName')"/>
</a-form-model-item>
</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 :span='6' style='margin-top: 5px'>
<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'>
<a-col :md="12" :sm="8">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel" :prop='region'>
<!-- <a-input class="box-input"-->
<!-- :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'
<a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input" v-model='form.dutyTerritory'
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:title="$t('PleaseSelect')+$t('areaOfResponsibility')"
:triggerChange='false' :dictCode="'duty_territory'" />
:triggerChange='false' :dictCode="'duty_territory'"/>
</a-form-model-item>
</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 :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-row>
</a-form-model>
</a-form>
</a-spin>
<a-table
class='table-area'
@@ -110,137 +75,137 @@
</a-table>
<div class='drawer-bootom-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>
</template>
<script>
import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
export default {
name: 'diolagArea',
components: {},
data() {
return {
title: this.$t('add'),
total: 0,
selectedRowKeysDate: {},
loading: false,
editId: '',
columns: [
{
title: this.$t('NiONumber'),
dataIndex: 'nioNumber',
align: 'center',
width:200,
ellipsis: true
export default {
name: 'diolagArea',
components: {},
data() {
return {
title: this.$t('add'),
total: 0,
selectedRowKeysDate: {},
loading: false,
editId: '',
columns: [
{
title: this.$t('NiONumber'),
dataIndex: 'nioNumber',
align: 'center',
width: 200,
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 }
},
{
title: this.$t('ParameterName'),
align: 'center',
dataIndex: 'paramsName',
width:200,
ellipsis: true
wrapperCol: {
xs: { span: 24 },
sm: { span: 14 }
},
{
title: this.$t('areaOfResponsibility'),
dataIndex: 'dutyTerritory_dictText',
align: 'center',
width:200,
ellipsis: true
}
],
newVisible: false,
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
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
form: {},
rules: {
// templatetitle: [
// { required: true, message: this.$t('enterTitle'), trigger: 'blur' }
// ]
},
areaTable: [],
flag: false, //表单提交标识
spinLoading: false,
confirmLoading: false,
templatetitle: '',
selectedRowKeys: []
}
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()
},
searchReset() {
this.form = {}
this.loadData()
},
handleCancel() {
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
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() {
this.loadData()
},
searchReset() {
this.form = {}
this.loadData()
},
handleCancel() {
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 = {
paramsInfoPublishEOList: this.selectedRowKeysDate,
paramsManifestId: this.paramsManifest.id,
projectId: this.$route.query.projectId
paramsInfoPublishEOList: this.selectedRowKeysDate,
paramsManifestId: this.paramsManifest.id,
projectId: this.$route.query.projectId
}
postAction(`params/collectManifest/add`, postDate).then(res => {
if (res.success) {
@@ -258,234 +223,239 @@ export default {
this.spinLoading = false
this.newVisible = false
})
} else {
return false
} else {
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() {
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
watch: {
paramsManifest(val) {
this.loadData()
}
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>
<style lang='less' scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
.diolag-area {
.table-area {
margin: 20px 0;
.diolag-area {
.table-area {
margin: 20px 0;
.action-edit {
margin-right: 10px;
.action-edit {
margin-right: 10px;
}
}
.table-del {
color: red;
}
}
.table-del {
color: red;
.drawer-bootom-button {
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 {
width: 114px;
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-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.title-text {
width: 114px;
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;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
height: 40px;
margin-bottom: 24px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel-text {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
height: 40px;
margin-bottom: 24px;
}
.Required {
color: red;
margin-right: 4px;
}
.itemModel-text {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.Required {
color: red;
margin-right: 4px;
}
.header-text {
font-size: 16px;
font-weight: bold;
margin-left: 15px;
/*border-bottom: 1px #d9d9d9 dashed;*/
height: 30px;
margin-bottom: 30px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.header-text {
font-size: 16px;
font-weight: bold;
margin-left: 15px;
/*border-bottom: 1px #d9d9d9 dashed;*/
height: 30px;
margin-bottom: 30px;
}
.button-text {
height: 38px;
width: calc(100% - 100px);
line-height: 38px;
background: #fff;
border: 1px #00B3BE solid;
color: #00B3BE;
}
.formAdd {
margin-bottom: 40px;
}
.button-text-text {
position: absolute;
right: -10px;
top: -21px;
display: inline-block;
padding: 6px;
border-radius: 50%;
background: red;
text-align: center;
line-height: 6px;
color: #fff;
}
.button-text {
height: 38px;
width: calc(100% - 100px);
line-height: 38px;
background: #fff;
border: 1px #00B3BE solid;
color: #00B3BE;
}
.button-text-text {
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 lang='less'>
.area-module {
.ant-modal-wrap {
.ant-modal {
.ant-modal-content {
.ant-modal-footer {
text-align: center;
.area-module {
.ant-modal-wrap {
.ant-modal {
.ant-modal-content {
.ant-modal-footer {
text-align: center;
}
}
}
}
}
}
</style>
<style>
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: 100%;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: 100%;
}
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
.itemModel .ant-form-item-control-wrapper {
width: 100%;
}
.itemModel .ant-form-item-control-wrapper {
width: 100%;
}
.itemModel-text .ant-form-item-control-wrapper {
width: 100% !important;
}
.itemModel-text .ant-form-item-control-wrapper {
width: 100% !important;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
</style>
@@ -286,6 +286,9 @@ export default {
}
</style>
<style scoped>
/deep/.ant-modal-body{
height: 100% !important;
}
.box-title-text {
line-height: 1.4;
display: flex;
@@ -635,6 +635,7 @@
dataIndex: res.db_field_name,
align: 'center',
// ellipsis: true,
fixed: res.click3?'left':'',
sorter: res.sort,
width: 160
})
@@ -137,7 +137,7 @@
_this.$message.success(_this.$t('OperationSuccessful'))
_this.replacePage()
} 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">
<a-icon type="arrow-left" style="margin-right: 6px;"/>
</span>
{{$t('newlyAdded')}}
{{this.$route.query.id ? $t('edit') :$t('newlyAdded')}}
</div>
</div>
<div style="padding-top: 68px;background: #fff">
@@ -26,7 +26,7 @@
<a-select-option v-for="(item, key) in projectNameList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
<span class="selectText" :title=" item.name ">
{{ item.name}}
</span>
</a-select-option>
@@ -73,11 +73,12 @@
</div>
<a-form-model-item class="itemModel" prop="problemType">
<a-select :placeholder="$t('PleaseSelect')+$t('problemClassification')"
@change="problemTypeChange"
v-model="formInline.problemType">
<a-select-option v-for="(item, key) in problemTypeList"
:key="key"
:value="item.id">
<span style="display: inline-block;width: 100%" :title="item.problemLabel ">
<span class="selectText" :title="item.problemLabel ">
{{item.problemLabel}}
</span>
</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() {
let query = {
id: this.$route.query.id
@@ -333,7 +341,7 @@
})
}
,
showPermissionsChange(event) {
showPermissionsChange(event, name) {
if (event == 'Open') {
this.isDisplay = false
} else {
@@ -597,4 +605,13 @@
::v-deep .ql-snow .ql-picker {
height: 36px;
}
.selectText {
width: 100%;
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-break: break-word;
}
</style>
@@ -365,14 +365,21 @@
::v-deep .ant-tag {
padding: 2px 4px;
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;
}
::v-deep p {
margin: 0;
padding: 0;
}
</style>
<style>
.box-content-left .ant-tag {
@@ -383,6 +390,7 @@
.box-content-left .ant-tag-checkable {
padding: 3px 8px;
margin-bottom: 10px;
}
.box-content-left .ant-tag-checkable-checked {
@@ -6,7 +6,7 @@
<span style="line-height: 66px;display: inline-block;float: left">
<a-icon type="arrow-left" style="margin-right: 6px;"/>
</span>
{{$t('applicableInstructionsMarketList')}}
{{queryForm.title}}
</div>
<div class="doc-detail-right">
<div @click="forwardClick" class="operator-text-text" :title="$t('forward')">
@@ -123,7 +123,7 @@
value: 'standNumber'
},
{
title: this.$t('standardName'),
title: this.$t('title'),
value: 'title'
},
{
@@ -150,7 +150,6 @@
}
},
mounted() {
document.title = this.$t('applicableInstructionsMarketList')
this.viewAdd()
this.queryById()
this.releaseData()
@@ -168,6 +167,7 @@
if (res.success) {
this.queryForm = res.result || {}
this.queryForm = { ...this.queryForm }
document.title = this.queryForm.title
if (this.formInline.showPermissions == 'Privacy') {
this.isDisplay = true
} else {
@@ -46,7 +46,7 @@
<span slot="language" slot-scope="text,record">
<span>{{text == 1?$t('simplifiedChinese'):$t('English')}}</span>
</span>
<span slot="RegulationMonthlyName" slot-scope="text,record">
<span slot="RegulationMonthlyName" :title="text" slot-scope="text,record">
<a @click="preview(record)">{{text}}</a>
</span>
<span slot="operation" slot-scope="text,record">
@@ -217,7 +217,7 @@
},
{
title: this.$t('feedbackTime'),
dataIndex: 'createTime',
dataIndex: 'updateTime',
align: 'center',
ellipsis: true,
width: 160
@@ -130,7 +130,7 @@
<div style="margin-bottom: 10px;position: relative">
<a-checkbox :value="item.id" class="checkbox-left"></a-checkbox>
<div class="text-text-right"
@click="checkedClick(item)"
@click="titleClick(item)"
:class="{ 'null-input':item.checked }">
<div class="text-header">
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
@@ -144,51 +144,53 @@
<span v-html="item.serial_number"></span>
</template>
<span style="cursor: pointer"
@click="titleClick(item)" v-html="item.serial_number"></span>
v-html="item.serial_number"></span>
</a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
<template slot="title">
<span v-html="item.title"></span>
</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 placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
<template slot="title">
<span v-html="item.file_name"></span>
</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>
</div>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"
v-if="selectModel == ''">
<template slot="title">
<span v-html="item.content"></span>
</template>
<div class="text-content" @click="checkedClick(item)" v-html="item.content"
>
</div>
</a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"
v-else-if="(item.file_text instanceof Array) && selectModel != ''">
<template slot="title">
<span v-html="item.content"></span>
</template>
<div class="text-content" @click="checkedClick(item)" v-html="item.content"></div>
</a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"
v-else-if="!item.file_text && selectModel != ''">
<template slot="title">
<span v-html="item.content"></span>
</template>
<div class="text-content" @click="checkedClick(item)" v-html="item.content"></div>
</a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" v-else>
<template slot="title">
<span v-html="item.file_text"></span>
</template>
<div class="text-content" @click="checkedClick(item)" v-html="item.file_text">
</div>
</a-tooltip>
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
<!-- >-->
<!-- <template slot="title">-->
<!-- <span v-html="item.content"></span>-->
<!-- </template>-->
<div v-if="selectModel == ''" class="text-content" v-html="item.content"
>
</div>
<!-- </a-tooltip>-->
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
<!-- >-->
<!-- <template slot="title">-->
<!-- <span v-html="item.content"></span>-->
<!-- </template>-->
<div v-else-if="(item.file_text instanceof Array) && selectModel != ''"
class="text-content" v-html="item.content"></div>
<!-- </a-tooltip>-->
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
<!-- >-->
<!-- <template slot="title">-->
<!-- <span v-html="item.content"></span>-->
<!-- </template>-->
<div v-else-if="!item.file_text && selectModel != ''"
class="text-content" v-html="item.content"></div>
<!-- </a-tooltip>-->
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" >-->
<!-- <template slot="title">-->
<!-- <span v-html="item.file_text"></span>-->
<!-- </template>-->
<div v-else class="text-content" v-html="item.file_text">
</div>
<!-- </a-tooltip>-->
</div>
</div>
</li>
@@ -666,6 +668,11 @@
postAction(this.url.getParagraphInfoList, query).then((res) => {
if (res.success) {
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.loading = false
} else {
@@ -857,6 +864,7 @@
padding: 19px 28px;
box-sizing: border-box;
margin-left: 38px;
cursor: pointer;
}
.null-input {
@@ -934,6 +942,11 @@
word-break: break-all
}
::v-deep p {
margin: 0;
padding: 0;
}
/*::v-deep .ant-select {*/
/* max-width: calc(100% - 126px) !important;*/
/*}*/
@@ -4,7 +4,7 @@
<span>{{$t('searchScope')}}</span>
<span>{{ queryParam.selectValue }}</span>
</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">
<div style="margin-bottom: 10px;position: relative">
<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>
</a-tooltip>
</div>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" v-if="!queryParam.selectValue"
:mouseEnterDelay="0.5">
<template slot="title">
<span v-html="item.content"></span>
</template>
<div class="text-content" v-html="item.content"
>
</div>
</a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"
v-else-if="(item.file_text instanceof Array) && queryParam.selectValue">
<template slot="title">
<span v-html="item.content"></span>
</template>
<div class="text-content" v-html="item.content"></div>
</a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"
v-else-if="!item.file_text && queryParam.selectValue">
<template slot="title">
<span v-html="item.content"></span>
</template>
<div class="text-content" v-html="item.content"></div>
</a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" v-else>
<template slot="title">
<span v-html="item.file_text"></span>
</template>
<div class="text-content" v-html="item.file_text">
</div>
</a-tooltip>
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" -->
<!-- :mouseEnterDelay="0.5">-->
<!-- <template slot="title">-->
<!-- <span v-html="item.content"></span>-->
<!-- </template>-->
<div v-if="!queryParam.selectValue" class="text-content" v-html="item.content"
>
</div>
<!-- </a-tooltip>-->
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
<!-- >-->
<!-- <template slot="title">-->
<!-- <span v-html="item.content"></span>-->
<!-- </template>-->
<div v-else-if="(item.file_text instanceof Array) && queryParam.selectValue"
class="text-content" v-html="item.content"></div>
<!-- </a-tooltip>-->
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
<!-- >-->
<!-- <template slot="title">-->
<!-- <span v-html="item.content"></span>-->
<!-- </template>-->
<div v-else-if="!item.file_text && queryParam.selectValue"
class="text-content" v-html="item.content"></div>
<!-- </a-tooltip>-->
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" >-->
<!-- <template slot="title">-->
<!-- <span v-html="item.file_text"></span>-->
<!-- </template>-->
<div v-else class="text-content" v-html="item.file_text">
</div>
<!-- </a-tooltip>-->
</div>
</div>
</li>
@@ -191,6 +193,11 @@
postAction(this.url.getInfoList, query).then((res) => {
if (res.success) {
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.loading = false
} else {
@@ -305,4 +312,9 @@
text-align: center;
line-height: 10;
}
::v-deep p {
margin: 0;
padding: 0;
}
</style>
@@ -12,7 +12,7 @@
<a-select-option v-for="(item, key) in tagList"
:key="key"
:value="item.id">
<span style="display: inline-block;width: 100%" :title=" item.problemLabel ">
<span class="selectText" :title=" item.problemLabel ">
{{ item.problemLabel}}
</span>
</a-select-option>
@@ -20,10 +20,10 @@
</div>
<div class="text-left-select">
<span class="text-sel" :title="$t('market')">{{$t('market')}}</span>
<j-dict-select-tag class="text-select" v-model="queryParamOne.target_market"
:placeholder="$t('PleaseSelect')+$t('market')"
:type="'select'"
:triggerChange="false" :dictCode="'region'"/>
<j-multi-select-tag class="text-select" v-model="queryParamOne.target_market"
:placeholder="$t('PleaseSelect')+$t('market')"
:type="'select'"
:triggerChange="false" :dictCode="'region'"/>
</div>
</div>
<div class="table-page-search-submitButtons submitButtons">
@@ -41,8 +41,8 @@
</div>
</div>
<div class="box-content">
<a-checkbox-group v-model="checkboxText">
<li v-for="item in conList" :key="item.id">
<a-checkbox-group style="width: 100%" v-model="checkboxText">
<div v-for="item in conList" :key="item.id">
<div style="margin-bottom: 10px;position: relative">
<a-checkbox :value="item.id" class="checkbox-left"></a-checkbox>
<div class="text-text-right"
@@ -53,20 +53,22 @@
<template slot="title">
<span v-html="item.title"></span>
</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>
</div>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
<template slot="title">
<span v-html="item.content"></span>
</template>
<div class="text-content" v-html="item.content"
>
</div>
</a-tooltip>
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">-->
<!-- <template slot="title">-->
<!-- <span v-html="item.content"></span>-->
<!-- </template>-->
<div class="text-content" v-html="item.content"
>
</div>
<!-- </a-tooltip>-->
</div>
</div>
</li>
</div>
</a-checkbox-group>
</div>
<div class="page">
@@ -220,7 +222,9 @@
return words.replace(/\s/g, '') //这里是去除空格
},
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))
Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) {
@@ -238,6 +242,12 @@
postAction(this.url.getParagraphInfoList, query).then((res) => {
if (res.success) {
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.loading = false
} else {
@@ -428,16 +438,17 @@
.text-header {
margin-bottom: 11px;
width: 100%;
span {
.text-header-text {
font-size: 16px;
font-weight: bold;
color: #040B29;
display: inline-block;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-break: break-word;
}
}
@@ -482,4 +493,18 @@
overflow: hidden;
text-overflow: ellipsis;
}
::v-deep p {
margin: 0;
padding: 0;
}
.selectText {
width: 100%;
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-break: break-word;
}
</style>
@@ -8,9 +8,9 @@
<li v-for="(item,index) in conList" :key="item.id">
<div style="margin-bottom: 10px;position: relative">
<a-checkbox :value="item.id" class="checkbox-left"></a-checkbox>
<div class="text-text-right"
<div class="text-text-right" @click="titleClick(item)"
: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">
<template slot="title">
<span v-html="item.module_type"></span>
@@ -21,7 +21,7 @@
</template>
<span style="cursor: pointer"
class="text-header-text"
v-if="item.serial_number"
v-if="item.serial_number && !item.module_type_flag"
v-html="item.serial_number"></span>
<template slot="title">
<span v-html="item.title"></span>
@@ -30,7 +30,7 @@
<template slot="title">
<span v-html="item.file_name"></span>
</template>
<span class="text-header-text" v-if="item.file_name" 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>
</a-tooltip>
<!-- <a-tooltip placement="topLeft" :mouseEnterDelay="0.5">-->
@@ -43,36 +43,39 @@
</a-tooltip>
</div>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" v-if="!queryParam.selectValue"
:mouseEnterDelay="0.5">
<template slot="title">
<span v-html="item.content"></span>
</template>
<div class="text-content" @click="checkedClick(item)" v-html="item.content"
>
</div>
</a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"
v-else-if="(item.file_text instanceof Array) && queryParam.selectValue">
<template slot="title">
<span v-html="item.content"></span>
</template>
<div class="text-content" @click="checkedClick(item)" v-html="item.content"></div>
</a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"
v-else-if="!item.file_text && queryParam.selectValue">
<template slot="title">
<span v-html="item.content"></span>
</template>
<div class="text-content" @click="checkedClick(item)" v-html="item.content"></div>
</a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" v-else>
<template slot="title">
<span v-html="item.file_text"></span>
</template>
<div class="text-content" @click="checkedClick(item)" v-html="item.file_text">
</div>
</a-tooltip>
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" -->
<!-- :mouseEnterDelay="0.5">-->
<!-- <template slot="title">-->
<!-- <span v-html="item.content"></span>-->
<!-- </template>-->
<div v-if="!queryParam.selectValue" class="text-content" v-html="item.content"
>
</div>
<!-- </a-tooltip>-->
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
<!-- >-->
<!-- <template slot="title">-->
<!-- <span v-html="item.content"></span>-->
<!-- </template>-->
<div v-else-if="(item.file_text instanceof Array) && queryParam.selectValue"
class="text-content" v-html="item.content"></div>
<!-- </a-tooltip>-->
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5"-->
<!-- >-->
<!-- <template slot="title">-->
<!-- <span v-html="item.content"></span>-->
<!-- </template>-->
<div v-else-if="!item.file_text && queryParam.selectValue"
class="text-content" v-html="item.content"></div>
<!-- </a-tooltip>-->
<!-- <a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5" >-->
<!-- <template slot="title">-->
<!-- <span v-html="item.file_text"></span>-->
<!-- </template>-->
<!-- @click="checkedClick(item)"-->
<div v-else class="text-content" v-html="item.file_text">
</div>
<!-- </a-tooltip>-->
</div>
</div>
</li>
@@ -213,6 +216,12 @@
postAction(this.url.getInfoList, query).then((res) => {
if (res.success) {
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
} else {
this.conList = []
@@ -287,6 +296,7 @@
padding: 19px 28px;
box-sizing: border-box;
margin-left: 38px;
cursor: pointer;
}
.null-input {
@@ -351,4 +361,9 @@
text-align: center;
line-height: 10;
}
::v-deep p {
margin: 0;
padding: 0;
}
</style>
@@ -65,10 +65,10 @@
<a-tab-pane :key="$t('whole')" :tab="$t('whole')"></a-tab-pane>
<a-tab-pane :key="$t('DocumentLibrary')" :tab="$t('DocumentLibrary')" force-render>
</a-tab-pane>
<!-- <a-tab-pane :key="$t('problemKnowledgeBase')" :tab="$t('problemKnowledgeBase')" force-render>-->
<!-- </a-tab-pane>-->
<!-- <a-tab-pane :key="$t('monthlyReportRegulations')" :tab="$t('monthlyReportRegulations')" force-render>-->
<!-- </a-tab-pane>-->
<a-tab-pane :key="$t('problemKnowledgeBase')" :tab="$t('problemKnowledgeBase')" force-render>
</a-tab-pane>
<a-tab-pane :key="$t('monthlyReportRegulations')" :tab="$t('monthlyReportRegulations')" force-render>
</a-tab-pane>
</a-tabs>
</div>
</div>
@@ -644,12 +644,12 @@ export default {
// } else {
// value.technologyTerritory = value.technologyTerritory.split(',')
// }
this.formInline = value
if(this.formInline.controlType == 11){
this.required = false
}else{
this.required = true
}
this.formInline = value
this.title = this.$t('edit')
this.flag = 0
// 获取认证类别
@@ -80,6 +80,12 @@
<!-- <a-icon type="setting"/>-->
<!-- {{ $t('batSetting') }}-->
<!-- </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">
<a-icon type="bulb"/>
{{$t('CertificationDirectory')}}
@@ -100,6 +106,8 @@
:pagination="false"
:scroll="{x: true}"
:data-source="dataSource"
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns"
>
<div slot="standardInformation" slot-scope="text,result" class="box-left">
@@ -178,11 +186,38 @@
<certificationDirectory :isDisplayNum="isDisplayNum" :url="url" ref="certificationDirectoryRef"/>
<TaskListModel @TaskListModelList="TaskListModelList" ref="TaskListModelRef"/>
<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>
</template>
<script>
import certificationDirectory from './certificationDirectory'
import batchChangeModel from './batchChangeModel'
import batchModel from './batchModel'
import TaskListModel from './TaskListModel'
import taskBatSetting from './taskBatSetting'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
@@ -194,6 +229,8 @@
components: {
certificationDirectory,
TaskListModel,
batchChangeModel,
batchModel,
taskBatSetting
},
props: ['isDisplayNum', 'areaOfResponsibility'],
@@ -259,6 +296,7 @@
}
],
selectedRowKeys: [],
status: {
'NotDone': '待办',
'haveDone': '已办',
@@ -305,7 +343,11 @@
exportXls: '/project/projectTaskInventoryEO/exportXls'
},
loading: false,
visibleoperationFailed:false,
NotSelectedNoEngineerValue:[],
dataSource: [],
selectionRowsArray:[],
roleCodes:[],
long: ''
}
},
@@ -352,8 +394,15 @@
taskBatSettingForm() {
this.getList()
},
onSelectChange(value) {
batchChangeModel() {
this.getList()
},
batchModel() {
this.getList()
},
onSelectChange(value, selectionRows) {
this.selectedRowKeys = value
this.selectionRowsArray = selectionRows
},
handleExport() {
let query = {
@@ -450,6 +499,7 @@
CertificationDirectory() {
this.$refs.certificationDirectoryRef.addModel()
},
getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => {
@@ -484,6 +534,77 @@
let item = JSON.parse(JSON.stringify(val))
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() {
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'),
'2': this.$t('warningInformation'),
'3': this.$t('ForwardPush'),
'4': this.$t('authenticationMessage'),
'4': this.$t('CollectinguthenticationParameters'),
// '6':this.$t('RegulationListConfirmationTask'),
// '7':this.$t('RegulationListConfirmationNotification'),
// '8':this.$t('RegulationTaskConfirmation'),