Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

This commit is contained in:
wangzhijiang
2023-04-11 14:45:37 +08:00
15 changed files with 739 additions and 87 deletions
@@ -5669,18 +5669,26 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
list.add(serialNumber);
}
});
String contentTemp = sysUser.getUsername() + " shared " + StringUtils.join(list, ",") + " with you, please be reminded to check it out.";
String contentTempCn = sysUser.getUsername() + "向您分享了" + StringUtils.join(list, ",") + "请查看.";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
feishuMsgVo.setUrl(encode);
feishuMsgVo.setContentEn(contentTemp);
feishuMsgVo.setContent(contentTempCn);
iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}),feishuMsgVo);
String contentTemp = sysUser.getUsername() + " shared " + StringUtils.join(list, ",") + " with you, Please be reminded to check it out.";
String contentTempCn = sysUser.getUsername() + "向您分享了" + StringUtils.join(list, ",") + "请查看";
// FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
// feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
// feishuMsgVo.setUrl(encode);
// feishuMsgVo.setContentEn(contentTemp);
// feishuMsgVo.setContent(contentTempCn);
// iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}),feishuMsgVo);
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
//飞书消息模板-20230410
Map<String,Object> params = new HashMap<>();
params.put("contentInfoFeiCn",contentTempCn);
params.put("contentInfoFeiEn",contentTemp);
params.put("userIdList",userIdList);
params.put("back_url",encode);
params.put("titleCn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameCn());
params.put("titleEn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameEn());
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
}
} catch (IOException e) {
} catch (Exception e) {
log.error("飞书推送失败");
}
sendWebsocket(documentIds, contentInfo);
@@ -75,7 +75,12 @@ public enum TemplateInfoEnum2 {
/**
* 转发推送
*/
TRANSPOND_PUSH("转发推送","ctp_AArfkau1GRMZ","Share / Forward"),
TRANSPOND_PUSH("转发推送","","Share / Forward"),
/**
* 法规预警
*/
LAWS_WARN("法规预警","ctp_AArYGerQrOcE","Regulation Early Warning"),
@@ -138,4 +138,11 @@ public interface IFeishuService {
*/
void sendMessageSubscriptionNotification(String templeteId,Map<String,Object> params);
/**
* 飞书消息模板--法规预警
* @param templeteId
* @param params
*/
void sendMessageLawsWarn(String templeteId,Map<String,Object> params);
}
@@ -1473,4 +1473,47 @@ public class FeishuServiceImpl implements IFeishuService {
}
}
@Override
public void sendMessageLawsWarn(String templeteId, Map<String, Object> params) {
List<String> userIdList = (List<String>) params.get("userIdList");
if (CollectionUtils.isNotEmpty(userIdList)) {
List<SysUser> userInfoList = this.sysUserService.querySysUserListByIdList(userIdList);
String contentCn = (String) params.get("contentInfoFeiCn");
String contentEn = (String) params.get("contentInfoFeiEn");
String back_url = (String) params.get("back_url");
String titleCn = (String) params.get("titleCn");
String titleEn = (String) params.get("titleEn");
String regulationNo = (String) params.get("regulationNo");
String newTypeExecutionDate = (String) params.get("newTypeExecutionDate");
String newVehicleExecutionDate = (String) params.get("newVehicleExecutionDate");
try {
for (String userId : userIdList) {
String thirdId = this.sysUserService.getUserThirdIdByUserId(userInfoList,userId);
if(StringUtils.isNotEmpty(thirdId)){
// 根据结束时间进行排序,获取最近的时间,发消息时使用。
JSONObject larkMesJson = new JSONObject();
larkMesJson.put("template_id", templeteId);
larkMesJson.put("userIds",thirdId);
Map<String,Object> templateVariableMap = new HashMap<>();
templateVariableMap.put("contentInfoFeiCn",contentCn);
templateVariableMap.put("contentInfoFeiEn",contentEn);
templateVariableMap.put("view_url_cn",back_url);
templateVariableMap.put("view_url_en",back_url);
templateVariableMap.put("titleCn",titleCn);
templateVariableMap.put("titleEn",titleEn);
templateVariableMap.put("regulationNo",regulationNo);
templateVariableMap.put("newTypeExecutionDate",newTypeExecutionDate);
templateVariableMap.put("newVehicleExecutionDate",newVehicleExecutionDate);
larkMesJson.put("templateVariableMap",templateVariableMap);
batchSendLarkCardMsgByTemplate2(larkMesJson);
}
}
} catch (Exception e) {
log.error("飞书消息推送失败");
}
}
}
}
@@ -6,6 +6,7 @@ import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.LoginUser;
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCommentEO;
@@ -36,7 +37,9 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
@@ -94,7 +97,7 @@ public class ProblemKnowledgeBaseCommentEOServiceImpl extends ServiceImpl<Proble
String url = backUrl +"/problemknowledgeBase?id="+problemKnowledgeBaseEO.getId();
String href = "<a href='"+url + "'"+ " target='_blank'>"+ problemKnowledgeBaseEO.getTitle() + "</a>";
String contentINfoCNNo = "您发布的问题知识库信息"+href+"有新评论,请注意查看.";
String contentINfoCNNo = "您发布的问题知识库信息"+href+"有新评论请注意查看";
String contentInfoENNo = "In the Q&A knowledge "+href+" you created, a new comment has been added. Please be reminded to check it out.";
//发送消息(站内和飞书)
@@ -111,16 +114,24 @@ public class ProblemKnowledgeBaseCommentEOServiceImpl extends ServiceImpl<Proble
this.sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(com.jero.modules.system.util.StringUtils.join(sysUser.getThirdId(), ","), sysUser.getThirdId());
// String href = backUrl +"/problemknowledgeBase";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
feishuMsgVo.setUrl(url);
feishuMsgVo.setContentEn(contentENNo);
feishuMsgVo.setContent(contentCNNo);
// FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
// feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
// feishuMsgVo.setUrl(url);
// feishuMsgVo.setContentEn(contentENNo);
// feishuMsgVo.setContent(contentCNNo);
try {
this.iFeishuService.sendCardMsgTerritory(sysUser.getThirdId().split(","), feishuMsgVo);
} catch (IOException e) {
// this.iFeishuService.sendCardMsgTerritory(sysUser.getThirdId().split(","), feishuMsgVo);
//飞书消息(模板-20230410
Map<String,Object> params = new HashMap<>();
params.put("contentInfoFeiCn",contentCNNo);
params.put("contentInfoFeiEn",contentENNo);
params.put("userIdList",Arrays.asList(sysUser.getId().split(",")));
params.put("back_url",url);
params.put("titleCn", TemplateInfoEnum2.TRANSPOND_PUSH.getNameCn());
params.put("titleEn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameEn());
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
} catch (Exception e) {
e.printStackTrace();
}
// }
@@ -17,6 +17,7 @@ import com.jero.common.system.vo.LoginUser;
import com.jero.modules.document.enums.SearchEnum;
import com.jero.modules.document.utils.ReadPdfUtil;
import com.jero.modules.document.utils.ReadWordUtil;
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.message.websocket.WebSocket;
@@ -908,18 +909,25 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
//XXX向您分享了XXXXXXXXX,请查看。
//XXX shared xxxxxxxx with you. Please be reminded to check it out.
String contentInfoFeiCn = currentUser.getUsername()+"向您分享了"+problemKnowledgeBaseTitle+",请查看";
String contentInfoFeiCn = currentUser.getUsername()+"向您分享了"+problemKnowledgeBaseTitle+"请查看";
String msgContentENTemp = currentUser.getUsername()+" shared " + problemKnowledgeBaseTitle + " with you.Please be reminded to check it out.";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
feishuMsgVo.setUrl(hrefFeishu);
feishuMsgVo.setContentEn(msgContentENTemp);
feishuMsgVo.setContent(contentInfoFeiCn);
// FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
// feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
// feishuMsgVo.setUrl(hrefFeishu);
// feishuMsgVo.setContentEn(msgContentENTemp);
// feishuMsgVo.setContent(contentInfoFeiCn);
// this.iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo);
this.iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo);
// this.iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContentEN, MessageTypeEnum.PUSH.getName(), hrefFeishu);
} catch (IOException e) {
//飞书消息(模板-20230410
Map<String,Object> params = new HashMap<>();
params.put("contentInfoFeiCn",contentInfoFeiCn);
params.put("contentInfoFeiEn",msgContentENTemp);
params.put("userIdList",userIdList);
params.put("back_url",hrefFeishu);
params.put("titleCn", TemplateInfoEnum2.TRANSPOND_PUSH.getNameCn());
params.put("titleEn",TemplateInfoEnum2.TRANSPOND_PUSH.getNameEn());
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
} catch (Exception e) {
log.error("飞书推送失败");
}
this.sendWebsocket(problemKnowledgeBaseId, contentInfo);
@@ -18,6 +18,7 @@ import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
import com.jero.modules.document.service.IPhasedImplementationDetailsEOService;
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.system.entity.SysAnnouncement;
@@ -55,6 +56,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
@@ -554,41 +556,50 @@ public class LawsWarnService {
for (String s : urlList) {
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
String encode = UriEncoder.encode(s);
List<String> list = new ArrayList<>();
String contentInfoFei = sysUser.getUsername() +" shared Regulation Early Warning infomation with you.";
String contentInfoFeiCn = sysUser.getUsername() +"向您分享了法规预警信息.";
List<String> userIdListNew = userIdList;
mapList.stream().forEach(e->{
if(s.contains((String)e.get("id"))){
String serialNumber = StringUtils.valueOf(e.get("serial_number"));
//封装飞书消息实体类
setFeishuMsgVo(sysUser, sdf, feishuMsgVo, encode, e, serialNumber);
// setFeishuMsgVo(sysUser, sdf, feishuMsgVo, encode, e, serialNumber);
String timeContent = "";
if("1".equals(flag)){
String value = StringUtils.valueOf(e.get("xin1_che1_xing2_shi2_shi1_ri4_qi1"));
if(StringUtils.isNotBlank(value)){
if(value.contains(" ")){
value = value.split(" ")[0];
}
timeContent =" to you as the implementation date of the new model is " +value;
}
}else if("2".equals(flag)){
String value = StringUtils.valueOf(e.get("implement_time"));
if(StringUtils.isNotBlank(value)){
if(value.contains(" ")){
value = value.split(" ")[0];
}
timeContent =" to you as the implementation date of vehicle production is " +value;
}
String documentTitleCn = ""; //文档标题
String documentTitleEn = ""; //文档标题
String newTypeExecutionDate = ""; //新车型实施日期
String newVehicleExecutionDate = ""; //在产车实施日期
if(ObjectUtils.isNotEmpty(e.get("title"))){
documentTitleCn = String.valueOf(e.get("title"));
}
list.add(serialNumber + timeContent);
if(ObjectUtils.isNotEmpty(e.get("title_en"))){
documentTitleEn = String.valueOf(e.get("title_en"));
}
if(ObjectUtils.isNotEmpty(e.get("xin1_che1_xing2_shi2_shi1_ri4_qi1"))){
newTypeExecutionDate = sdf.format(e.get("xin1_che1_xing2_shi2_shi1_ri4_qi1"));
}
if(ObjectUtils.isNotEmpty(e.get("implement_time"))){
newVehicleExecutionDate = sdf.format(e.get("implement_time"));
}
//飞书消息(模板-20230410
Map<String,Object> params = new HashMap<>();
params.put("contentInfoFeiCn",contentInfoFeiCn);
params.put("contentInfoFeiEn",contentInfoFei);
params.put("userIdList",userIdListNew);
params.put("back_url",encode);
params.put("titleCn", " "+documentTitleCn);
params.put("titleEn"," "+documentTitleEn);
params.put("regulationNo"," "+serialNumber);
params.put("newTypeExecutionDate"," "+newTypeExecutionDate);
params.put("newVehicleExecutionDate"," "+newVehicleExecutionDate);
iFeishuService.sendMessageLawsWarn(TemplateInfoEnum2.LAWS_WARN.getValue(),params);
}
});
iFeishuService.sendCardMsgWarn(thirdIdList.toArray(new String[]{}), feishuMsgVo);
// String contentTemp = sysUser.getUsername() + " has pushed " + StringUtils.join(list, ",") + ", Please be reminded to check it out.";
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
// iFeishuService.sendCardMsgWarn(thirdIdList.toArray(new String[]{}), feishuMsgVo);
}
} catch (IOException e) {
} catch (Exception e) {
e.printStackTrace();
}
bussDocumentLibraryEOService.sendWebsocket(documentIds, documentIds);
@@ -3,6 +3,7 @@ package com.jero.modules.warn.service;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.modules.document.entity.BussDocumentLibraryEO;
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
@@ -28,7 +29,9 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
@@ -136,19 +139,19 @@ public class TimedTaskWarn implements Job {
// }
if(currentTime.equals(beforeTimeSixTen)){
//发送飞书消息(提前一年)
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"1");
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"1",userIdList);
//站内消息
sendMessage(bussDocumentLibraryEO, userIdList,"1",sdf,href);
}
if(currentTime.equals(beforeTimeSix)){
//发送飞书消息(提前6个月)
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6");
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6",userIdList);
//站内消息
sendMessage(bussDocumentLibraryEO, userIdList,"6",sdf,href);
}
if(currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str)){
//发送飞书消息(当天)
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0");
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0",userIdList);
//站内消息
sendMessage(bussDocumentLibraryEO, userIdList,"0",sdf,href);
}
@@ -175,19 +178,19 @@ public class TimedTaskWarn implements Job {
}
if(currentTime.equals(beforeTimeSixTen)){
//发送飞书消息(提前一年)
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"1");
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"1",userIdList);
//站内消息
sendMessage(bussDocumentLibraryEO, userIdList,"1",sdf,href);
}
if(currentTime.equals(beforeTimeSix)){
//发送飞书消息(提前6个月)
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6");
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6",userIdList);
//站内消息
sendMessage(bussDocumentLibraryEO, userIdList,"6",sdf,href);
}
if(currentTime.equals(implementTimeStr)){
//发送飞书消息(当天)
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0");
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0",userIdList);
//站内消息
sendMessage(bussDocumentLibraryEO, userIdList,"0",sdf,href);
}
@@ -199,7 +202,8 @@ public class TimedTaskWarn implements Job {
BussDocumentLibraryEO bussDocumentLibraryEO,
String url,
List<String> thirdIdList,
String flag) {
String flag,
List<String> userIdList) {
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setTitle(MessageTypeEnum.WARN.getNameCn()+"/"+MessageTypeEnum.WARN.getName());
feishuMsgVo.setUrl(url);
@@ -217,21 +221,41 @@ public class TimedTaskWarn implements Job {
contentCn = "您所订阅的法规已实施.";
contentEn = "The regulation you subscribed to is implemented.";
}
feishuMsgVo.setContent(contentCn);
feishuMsgVo.setContentEn(contentEn);
feishuMsgVo.setRegulationNo(bussDocumentLibraryEO.getSerialNumber());
feishuMsgVo.setDocumentTitleCn(bussDocumentLibraryEO.getTitle());
feishuMsgVo.setDocumentTitleEn(bussDocumentLibraryEO.getTitleEn());
if(ObjectUtils.isNotEmpty(bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1())){
feishuMsgVo.setNewTypeExecutionDate(sdf.format(bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1()));
}
if(ObjectUtils.isNotEmpty(bussDocumentLibraryEO.getImplementTime())){
feishuMsgVo.setNewVehicleExecutionDate(sdf.format(bussDocumentLibraryEO.getImplementTime()));
}
// feishuMsgVo.setContent(contentCn);
// feishuMsgVo.setContentEn(contentEn);
// feishuMsgVo.setRegulationNo(bussDocumentLibraryEO.getSerialNumber());
// feishuMsgVo.setDocumentTitleCn(bussDocumentLibraryEO.getTitle());
// feishuMsgVo.setDocumentTitleEn(bussDocumentLibraryEO.getTitleEn());
// if(ObjectUtils.isNotEmpty(bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1())){
// feishuMsgVo.setNewTypeExecutionDate(sdf.format(bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1()));
// }
// if(ObjectUtils.isNotEmpty(bussDocumentLibraryEO.getImplementTime())){
// feishuMsgVo.setNewVehicleExecutionDate(sdf.format(bussDocumentLibraryEO.getImplementTime()));
// }
try {
iFeishuService.sendCardMsgWarn(thirdIdList.toArray(new String[]{}),feishuMsgVo);
} catch (IOException e) {
// iFeishuService.sendCardMsgWarn(thirdIdList.toArray(new String[]{}),feishuMsgVo);
//飞书消息(模板-20230410
Map<String,Object> params = new HashMap<>();
params.put("contentInfoFeiCn",contentCn);
params.put("contentInfoFeiEn",contentEn);
params.put("userIdList",userIdList);
params.put("back_url",url);
params.put("titleCn", " "+ bussDocumentLibraryEO.getTitle());
params.put("titleEn", " "+ bussDocumentLibraryEO.getTitleEn());
params.put("regulationNo", " "+ bussDocumentLibraryEO.getSerialNumber());
if(ObjectUtils.isNotEmpty(bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1())){
params.put("newTypeExecutionDate", " "+ sdf.format(bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1()));
}else{
params.put("newTypeExecutionDate","");
}
if(ObjectUtils.isNotEmpty(bussDocumentLibraryEO.getImplementTime())){
params.put("newVehicleExecutionDate", " "+ sdf.format(bussDocumentLibraryEO.getImplementTime()));
}else{
params.put("newVehicleExecutionDate","");
}
iFeishuService.sendMessageLawsWarn(TemplateInfoEnum2.LAWS_WARN.getValue(),params);
} catch (Exception e) {
e.printStackTrace();
}
}
+4 -1
View File
@@ -1423,7 +1423,7 @@ module.exports = {
confirmLaunchTask:'Confirm launch task ?',
conditionsNotMet:'Conditions not met',
onlyProcessStatusReturned:'Only the data whose process status is list to be checked and rejected by the responsible person can be returned',
onlyProcessReturned:'Only data with process status of list to be checked and rejected by responsible person can be initiated And the project interface person and responsible person cannot be blank',
onlyProcessReturned:'Only data with a process status of list to be verified and rejected by the responsible person can be initiated, and the delivery type, engineering interface person, responsible person, and deadline cannot be empty',
confirmToAcceptTheTask:'Confirm to accept the task ?',
confirmRejectTask:'Confirm Reject Task ?',
onlyDataStatusConfirmedSelected:'Only data with process status of task to be confirmed can be selected',
@@ -1767,4 +1767,7 @@ module.exports = {
andPendingSubmissionReviewReturned:'And the process status is result pending submission, review returned',
deliverablesFor:'Deliverables for',
dutyPersonRejected:'Duty Person Rejected',
theCurrentlySelectedDataContainsReviewed:'The currently selected data contains reviewed data. Are you sure to return it?',
reviewTheReasonForReturn:'Review the reason for return',
reasonForTaskRejection:'Reason for task rejection',
}
+5 -1
View File
@@ -1523,7 +1523,7 @@ module.exports = {
confirmLaunchTask:'确认发起任务?',
conditionsNotMet:'不满足条件',
onlyProcessStatusReturned:'只能退回流程状态为清单待校核和责任人拒绝的数据',
onlyProcessReturned:'只能发起流程状态为清单待校核和责任人拒绝的数据,并且工程接口人和责任人不能为空',
onlyProcessReturned:'只能发起流程状态为清单待校核和责任人拒绝的数据,并且交付物类型工程接口人责任人截止时间不能为空',
confirmToAcceptTheTask:'确认接受任务?',
confirmRejectTask:'确认拒绝任务?',
onlyDataStatusConfirmedSelected:'只能选择流程状态为任务待确认的数据',
@@ -1869,4 +1869,8 @@ module.exports = {
andPendingSubmissionReviewReturned:'并且流程状态为结果待提交审查退回',
deliverablesFor:'的交付结果',
dutyPersonRejected:'责任人拒绝',
theCurrentlySelectedDataContainsReviewed:'当前选择的数据中包含审查通过的数据确认退回吗',
reviewTheReasonForReturn:'审查退回原因',
reasonForTaskRejection:'任务拒绝原因',
}
@@ -895,8 +895,8 @@
color: red;
}
</style>
<style lang="less">
.popconfirm {
<style lang="less" scoped>
/deep/.popconfirm {
z-index: 999;
width: 264px
}
@@ -0,0 +1,123 @@
<template>
<a-modal
:title="$t('addConfiguration')"
:width="600"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('configurationItem')">{{$t('configurationItem')}}</span>
</div>
<a-form-model-item class="itemModel" prop="configItem">
<a-input class="box-input"
v-model.trim="formInline.configItem"
:placeholder="$t('PleaseEnter')+$t('configurationItem')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
export default {
name: 'addConfiguration',
data() {
return {
visible: false,
confirmLoading: false,
formInline: {},
ids: [],
rules: {
configItem: [
{
required: true,
message: this.$t('configurationItem') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 100,
message: this.$t('configurationItem') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
]
}
}
},
methods: {
getData(ids) {
this.visible = true
this.ids = ids
this.formInline = {}
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
},
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
}
})
},
handleCancel() {
this.visible = false
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.title-text {
width: 104px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.Required {
color: red;
margin-right: 4px;
}
</style>
@@ -0,0 +1,147 @@
<template>
<div>
<a-modal
:title="title"
:width="600"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules"
ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="title">{{ title }}</span>
</div>
<a-form-model-item class="itemModel" :prop="'explanation'">
<a-textarea :placeholder="$t('pleaseEnter')+title"
v-model.trim="formInline.explanation"
:rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</div>
</template>
<script>
export default {
name: 'reasonForReturn',
data() {
return {
visible: false,
confirmLoading: false,
formInline: {},
rules: {
explanation: [
{
max: 100,
message: this.$t('certifiedEngineer') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'change'
}
]
},
value: '',
text: '',
ids: [],
notConditions: '',
data: '',
title: ''
}
},
mounted() {
},
methods: {
getData(value, text, ids, notConditions, data, title) {
this.value = value
this.text = text
this.ids = ids
this.notConditions = notConditions
this.data = data
this.title = title
this.visible = true
this.formInline = {}
this.confirmLoading = false
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
this.rules = {
explanation: [
{
required: true,
message: title + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 300,
message: title + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
]
}
})
},
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.$emit('reasonForReturnForm', this.value, this.text, this.ids, this.notConditions, this.data)
this.confirmLoading = true
}
})
},
handleCancel() {
this.visible = false
}
}
}
</script>
<style scoped>
.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: 48px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
margin-bottom: 14px;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
</style>
@@ -41,12 +41,15 @@
{{approvalResult[text]}}
</span>
<span slot="approvalOpinion" slot-scope="text,result">
<a-tooltip placement="top">
<template slot="title">
<span>{{text}}</span>
</template>
{{text}}
</a-tooltip>
<a-tooltip placement="topLeft">
<template slot="title" >
<span>{{text}}</span>
</template>
{{text}}
</a-tooltip>
<!-- <span :title="text">-->
<!-- {{text}}-->
<!-- </span>-->
</span>
<span slot="resultofhandling" slot-scope="text,result">
<span :class="statusClass[result.operatorResult]" :title="result.operatorResultName">
@@ -504,4 +507,15 @@
font-weight: 400;
font-size: 12px;
}
///deep/.ant-table-row-cell-ellipsis .tooltip {
// span {
// display: inline-block;
// width: 50%;
// white-space:nowrap;/*强制单行显示*/
// text-overflow:ellipsis;/*超出部分省略号表示*/
// overflow:hidden;/*超出部分隐藏*/
// }
//}
</style>
@@ -0,0 +1,244 @@
<template>
<a-drawer
:title="$t('referenceDeliverables')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px">
<div class="table-page-search-wrapper">
<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" :title="$t('entryName')">
<span>{{$t('entryName')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('entryName')"
v-model="queryParam.projectName"></a-input>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="12" :sm="24">
<a-button class="box-button" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<a-table
:columns="columns"
rowKey="id"
:scroll="{x: '100%',y:600}"
:data-source="dataList"
:pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:' ' , type:'radio'}"
:loading="loading">
</a-table>
<div class="page" v-if="dataList.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="onChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
<div class="drawer-bootom-button">
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
export default {
name: 'referenceDeliverablesList',
components: {},
props: ['url'],
data() {
return {
visible: false,
queryParam: {},
confirmLoading: false,
selectedRowKeys: [],
columns: [
{
title: this.$t('entryName'),
dataIndex: 'projectName',
align: 'left',
ellipsis: true,
width: 223
},
{
title: 'Studio',
dataIndex: 'studioEngineerName',
align: 'left',
ellipsis: true,
width: 223
}
],
dataList: [],
content: [],
loading: false,
pageNo: 1,
pageSize: 10,
total: 0,
ids: '',
detailedWarningList: []
}
},
mounted() {
},
methods: {
transferModel(ids) {
this.visible = true
this.queryParam = {}
this.selectedRowKeys = []
this.replacePage()
},
searchQuery() {
this.pageNo = 1
this.replacePage()
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.replacePage()
},
onChange(page, pageSize) {
this.pageNo = page
this.replacePage()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.replacePage()
},
replacePage() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParam
}
this.loading = true
postAction('project/projectLibraryBase/page', query).then((res) => {
if (res.success) {
this.dataList = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
},
onSelectChange(value) {
this.selectedRowKeys = value
},
handleCancel() {
this.visible = false
},
handleSubmit() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
if (selectedRowKeys.join(',') == this.$route.query.id) {
this.$message.warning(this.$t('theDeliverablesCannotReferencedPleaseReselect'))
return
}
this.confirmLoading = true
postAction('/project/projectCertificationInventoryEO/citeDeliverable', {
projectCertificationInventoryIds: this.ids,
projectLibraryId: this.$route.query.id,
citeProjectLibraryId: selectedRowKeys.join(',')
}).then((res) => {
if (res.success) {
this.confirmLoading = false
if (res.result) {
this.$message.warning(res.result)
} else {
this.$message.success(this.$t('OperationSuccessful'))
}
this.visible = false
this.$emit('referenceDeliverablesListForm')
} else {
if (res.result) {
this.$message.warning(res.result)
} else {
this.$message.warning(this.$t('operationFailed'))
}
this.confirmLoading = false
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
}
}
}
</script>
<style scoped>
.page {
text-align: right;
margin-top: 20px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
z-index: 100;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
}
</style>