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

This commit is contained in:
zyx.net
2022-09-01 17:29:09 +08:00
21 changed files with 435 additions and 70 deletions
@@ -25,6 +25,8 @@ public enum MessageTypeEnum {
LIST_CONFIRMATION("List Confirmation", "17"), // 清单确认
TASK_CONFIRMATION("Task Confirmation", "18"), // 任务确认
COMPLIANCE_CONFIRMATION("Compliance Confirmation", "19"), // 符合性确认
COLLECTION_OF_LEGISLATIVE_COMMENTS("Collection of Legislative Comments", "20"), // 法规意见收集
REGULATORY_AND_TECHNICAL_ASSESSMENT("Regulatory and technical assessment", "21"), // 法规技术评估
;
String name;
@@ -73,4 +73,6 @@ public interface ILawsOpinionGatherEOService extends IService<LawsOpinionGatherE
* @param lawsOpinionGatherEOList
*/
void disposeData(List<LawsOpinionGatherEO> lawsOpinionGatherEOList,String cut);
void workFlowSendMsg(JSONObject jsonObject);
}
@@ -1,25 +1,39 @@
package com.jero.modules.lawsOpinionGather.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
import com.jero.modules.lawsOpinionGather.mapper.LawsOpinionGatherEOMapper;
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.entity.ProjectNameInfoEO;
import com.jero.modules.project.entity.ProjectYearNameInfoEO;
import com.jero.modules.project.enums.JumpLinkEnum;
import com.jero.modules.project.enums.MsgTypeEnum;
import com.jero.modules.project.enums.OperatorTypeEnum;
import com.jero.modules.project.enums.RequestSourceEnum;
import com.jero.modules.project.util.SendMessageUtils;
import com.jero.modules.system.entity.SysCategory;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -40,6 +54,11 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
private SysCategoryServiceImpl sysCategoryService;
@Autowired
private IOSSFileService iOSSFileService;
@Autowired
private ISysUserService sysUserService;
@Value(value = "${jero.backUrl}")
private String backUrl;
/**
* 保存
@@ -140,6 +159,11 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
lawsOpinionGatherEO.setGatherResult(jsonObject.getString("gatherResult"));
this.baseMapper.updateById(lawsOpinionGatherEO);
}
// 发送消息
if(StringUtils.equals(operatorType, OperatorTypeEnum.SEND_MSG.getValue())){
workFlowSendMsg(jsonObject);
}
return new Result<>().success("调用成功!");
}
@@ -192,4 +216,53 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
}
return result;
}
/**
* 工作流发送消息
* @param jsonObject
*/
@Override
public void workFlowSendMsg(JSONObject jsonObject){
String msgType = jsonObject.getString("msgType"); //发送消息类型
if(StringUtils.isEmpty(msgType)){
throw new JeroBootException("发送消息类型不能为空,请检查!");
}
String lawsOpinionGatherId = jsonObject.getString("lawsOpinionGatherId");
String serialNumber = jsonObject.getString("serialNumber"); //文档库编号
List<String> userIdList = new ArrayList<>();
String msgContentEN = "";
String msgTitle = "";
if(StringUtils.equals(msgType,MsgTypeEnum.LAWS_OPOMOPM_GATHER_START_MSG.getValue())){
userIdList.addAll(Arrays.asList(jsonObject.getString("evaluatorIds").split(",")));
String endTime = jsonObject.getString("endTime"); //截止日期
msgContentEN = "You recieved the Collection of Legislative Comments of "+serialNumber+" . The due date is "+endTime+". Please check and address it in a timely manner.";
msgTitle = "You have a Collection of Legislative Comments task to complete";
}else if(StringUtils.equals(msgType,MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_SUBMIT_MSG.getValue())){
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
SysUser currentUser = sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
userIdList.add(jsonObject.getString("initiatorUserId"));
msgContentEN = currentUser.getUsername() + " has submitted the collection process of Collection of Legislative Comments of "+serialNumber+", please check it in time.";
msgTitle = "You have a Collection of Legislative Comments task completed";
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_MSG.getValue())){
userIdList = (List<String>) jsonObject.get("userIdList");
msgContentEN = "The the Collection of Legislative Comments of "+serialNumber+" will expire tomorrow . Please check and address it in time.";
msgTitle = "You have a Collection of Legislative Comments task completed";
}
//飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
//系统内部跳转链接
String href = "<a href='" + JumpLinkEnum.TASK_AFFIRM_LINK.getLink() + "'>" + " View details" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo);
SendMessageUtils.sendMessage(msgTitle,msgContentEN,userIdList,lawsOpinionGatherId,sendMessageMap,null,MessageTypeEnum.COLLECTION_OF_LEGISLATIVE_COMMENTS,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
}
}
@@ -88,4 +88,6 @@ public interface ILawsTechnologyEvaluationEOService extends IService<LawsTechnol
Result<?> importItemExcel(MultipartFile file, String cut, HttpServletRequest request)throws Exception;
List<Map<String, Object>> queryPageDummyById(Map<String, Object> parameter);
void workFlowSendMsg(JSONObject jsonObject);
}
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.constant.enums.ModuleEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
@@ -17,12 +18,17 @@ import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationEOMapper;
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationEOService;
import com.jero.modules.project.enums.JumpLinkEnum;
import com.jero.modules.project.enums.MsgTypeEnum;
import com.jero.modules.project.enums.OperatorTypeEnum;
import com.jero.modules.project.enums.RequestSourceEnum;
import com.jero.modules.project.util.SendMessageUtils;
import com.jero.modules.split.entity.SarFileSplitInfoEO;
import com.jero.modules.split.service.ISarFileSplitInfoService;
import com.jero.modules.system.entity.SysCategory;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import org.apache.commons.collections4.CollectionUtils;
@@ -72,6 +78,10 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
private ISarFileSplitInfoService sarFileSplitInfoService;
@Value(value = "${jero.path.upload}")
private String uploadpath;
@Autowired
private ISysUserService sysUserService;
@Value(value = "${jero.backUrl}")
private String backUrl;
/**
* 保存
@@ -163,6 +173,8 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
}else if(StringUtils.equals(operatorType,OperatorTypeEnum.UPDATE_STATUS.getValue())){
LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO = JSONObject.parseObject(JSONObject.toJSONString(jsonObject.get("lawsTechnologyEvaluationEO")),LawsTechnologyEvaluationEO.class);
this.updateById(lawsTechnologyEvaluationEO);
}else if(StringUtils.equals(operatorType,OperatorTypeEnum.SEND_MSG.getValue())){
this.workFlowSendMsg(jsonObject);
}
return new Result<>().success("调用成功!");
@@ -524,6 +536,64 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
return result;
}
@Override
public void workFlowSendMsg(JSONObject jsonObject) {
String msgType = jsonObject.getString("msgType"); //发送消息类型
if(StringUtils.isEmpty(msgType)){
throw new JeroBootException("发送消息类型不能为空,请检查!");
}
String lawsTechnologyEvaluationId = jsonObject.getString("lawsTechnologyEvaluationId");
String serialNumber = jsonObject.getString("serialNumber"); //文档库编号
List<String> userIdList = new ArrayList<>();
String msgContentEN = "";
String msgTitle = "";
if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_START_MSG.getValue())){
userIdList.add(jsonObject.getString("evaluationId"));
String endTime = jsonObject.getString("endTime"); //截止日期
//您收到GB 7258 的法规技术评估流程任务,请及时查看处理。
msgContentEN = "You recieved the Regulatory and technical assessment of "+serialNumber+" . The due date is "+endTime+". Please check and address it in a timely manner.";
msgTitle = "You have a Regulatory and technical assessment task to complete";
}else if(StringUtils.equals(msgType,MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_ENALUATOR_SUBMIT_MSG.getValue())){
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
userIdList.add(jsonObject.getString("initiatorUserId"));
//XXX(人员账号)已提交GB 7258 的法规意见收集流程,请及时查看审核。
msgContentEN = currentUser.getUsername() + " has submitted the collection process of Regulatory and technical assessment of "+serialNumber+", Please check and address it in time.";
msgTitle = "You have a Regulatory and technical assessment task to complete";
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_ACCEPTED_MSG.getValue())){
userIdList.add(jsonObject.getString("evaluationId"));
//您提交的GB 7258 的法规技术评估流程已通过。
msgContentEN = "The regulatory and technical assessment process for "+serialNumber+" you submitted has passed.";
msgTitle = "You have a Regulatory and technical assessment task completed";
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_REJECTED_MSG.getValue())){
userIdList.add(jsonObject.getString("evaluationId"));
//您提交的GB 7258 的法规技术评估流程已被退回,请及时查看处理。
msgContentEN = "The regulatory and technical assessment process of "+serialNumber+" you submitted has been returned, Please check and address it in time.";
msgTitle = "You have a Regulatory and technical assessment task to complete";
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_MSG.getValue())){
userIdList = (List<String>) jsonObject.get("userIdList");
//您GB 7258的法规技术评估流程将于明天结束,请及时查看处理
msgContentEN = "The the Regulatory and technical assessment of "+serialNumber+" will expire tomorrow. Please check and address it in time.";
msgTitle = "You have a Regulatory and technical assessment task to complete";
}
//飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
//系统内部跳转链接
String href = "<a href='" + JumpLinkEnum.TASK_AFFIRM_LINK.getLink() + "'>" + " View details" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo);
SendMessageUtils.sendMessage(msgTitle,msgContentEN,userIdList,lawsTechnologyEvaluationId,sendMessageMap,null, MessageTypeEnum.COLLECTION_OF_LEGISLATIVE_COMMENTS,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
}
private String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
StringBuilder sb = new StringBuilder();
for (String technologyTerritory : technologyTerritoryList) {
@@ -30,6 +30,16 @@ public enum MsgTypeEnum {
DESIGN_INITIATOR_ACCEPTED_MSG("设计符合性发起人通过发送消息","designInitiatorAcceptedMsg"),
PREHOMO_INITIATOR_ACCEPTED_MSG("prehomo发起人通过发送消息","prehomoInitiatorAcceptedMsg"),
VERIFY_INITIATOR_ACCEPTED_MSG("验证符合性发起人通过发送消息","verifyInitiatorAcceptedMsg"),
LAWS_OPOMOPM_GATHER_START_MSG("法规意见收集发起消息","lawsOpomopmGatherStartMsg"),
LAWS_OPOMOPM_GATHER_ENALUATOR_SUBMIT_MSG("法规意见收集评估人提交任务消息","lawsOpomopmGatherEnaluatorSubmitMsg"),
LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_MSG("法规意见收集到期前一天消息","lawsOpomopmGatherExpireRemindMsg"),
LAWS_TECHNOLOGY_EVALUATION_START_MSG("法规技术评估发起消息","lawsTechnologyEvaluationStartMsg"),
LAWS_TECHNOLOGY_EVALUATION_ENALUATOR_SUBMIT_MSG("法规技术评估,评估人提交任务消息","lawsTechnologyEvaluationEnaluatorSubmitMsg"),
LAWS_TECHNOLOGY_EVALUATION_AUDIT_ACCEPTED_MSG("法规技术评估,发起人审核通过消息","lawsTechnologyEvaluationAuditAcceptedMsg"),
LAWS_TECHNOLOGY_EVALUATION_AUDIT_REJECTED_MSG("法规技术评估,发起人审核拒绝消息","lawsTechnologyEvaluationAuditRejectedMsg"),
LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_MSG("法规技术评估到期前一天消息","lawsTechnologyEvaluationExpireRemindMsg"),
;
String name;
@@ -2586,7 +2586,7 @@ public class FileSpiltService {
String path = splitUrl+"/jero-boot/sys/split/file/getImage?fileUrl="+filepathandname;
CosBootUtil.uploadByte(bytev, filepathandname);
String imgCon = path;
String imgConVal = "<img class=\"wordImg\" src=\"" + path + "\">";
String imgConVal = "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\"" + path + "\">";
message.getItemsCondi().add(imgConVal);
message.setItermsConditions(message.getItermsConditions() + imgConVal);
itemsValList.add(getSplitItemsValObject(message.getId(), SplitFilePragraTypeEnum.IMG.getValue(), imgCon, message.getItemsCondi().size(), null));
@@ -158,7 +158,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
} else if ("IMG".equals(valEO.getType())) {
String imgUrl = valEO.getItemContent();
valEO.setItemContent(imgUrl);
valContent = "<img class=\"wordImg\" src=\""+ valEO.getItemContent() +"\">";
valContent = "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\""+ valEO.getItemContent() +"\">";
// valContent = valEO.getItemContent();
} else if ("TABLE".equals(valEO.getType())) {
valContent = valEO.getItemContent();
@@ -233,7 +233,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
} else if ("IMG".equals(valEO.getType())) {
String imgUrl = valEO.getItemContent();
valEO.setItemContent(imgUrl);
valContent = "<img class=\"wordImg\" src=\"" + valEO.getItemContent() + "\">";
valContent = "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\"" + valEO.getItemContent() + "\">";
// valContent = valEO.getItemContent();
} else if ("TABLE".equals(valEO.getType())) {
valContent = valEO.getItemContent();
@@ -1693,7 +1693,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
return mFile;
}
private List<Map<String, Object>> read(File file, List<String> dbfieldList, String[] titles, String cut) throws IOException, InvalidFormatException {
private List<Map<String, Object>> read(File file, List<String> dbfieldList, String[] titles, String cut) throws Exception {
//最终返回数据
List<Map<String, Object>> list = new ArrayList<>();
@@ -1702,8 +1702,14 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
InputStream is = new FileInputStream(file);
String name = file.getName().toLowerCase();
// 创建excel操作对象
if (name.contains(".xlsx") || name.contains(".xls")) {
if (name.contains(".xlsx")) {
workbook = WorkbookFactory.create(is);
} else {
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("请导入正确模板!");
} else {
throw new JeroBootException("Please import the correct template");
}
}
//得到一个工作表
Sheet sheet = workbook.getSheetAt(0);
@@ -1744,10 +1750,38 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
}
}
}
Row rowDescription= sheet.getRow(1);
if (rowDescription != null) {
Cell cell = rowDescription.getCell(0);
if(ObjectUtil.isNotNull(cell)){
//设置单元格类型
cell.setCellType(CellType.STRING);
String cellValue = cell.getStringCellValue();
if(!cellValue.contains("填写说明")){
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("请导入正确模板!");
} else {
throw new JeroBootException("Please import the correct template");
}
}
} else{
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("请导入正确模板!");
} else {
throw new JeroBootException("Please import the correct template");
}
}
}else{
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("请导入正确模板!");
} else {
throw new JeroBootException("Please import the correct template");
}
}
Map<String, Object> map = null;
//获得所有数据
//从第x行开始获取
//从第3行开始获取,第一行是表头,第二行是填写说明
for (int x = 2; x <= totalRowNum; x++) {
map = new HashMap<String, Object>();
//获得第i行对象
@@ -2461,7 +2495,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
if ("TEXT".equals(valEO.getType())) {
valContent += "<p>" + valEO.getItemContent() + "</p>";
} else if ("IMG".equals(valEO.getType())) {
valContent += "<img class=\"wordImg\" src=\""+ valEO.getItemContent() +"\">";
valContent += "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\""+ valEO.getItemContent() +"\">";
// valContent += valEO.getItemContent();
} else if ("TABLE".equals(valEO.getType())) {
valContent += valEO.getItemContent();
@@ -164,4 +164,7 @@ public interface WorkFlowFeignClient {
*/
@RequestMapping(value = "/bat-wkflow/deleteProcessInstanceByTaskId",method = RequestMethod.GET)
Result<String> deleteProcessInstanceByTaskId(@RequestParam("taskId") String taskId);
@RequestMapping(value = "/bat-wkflow/task/getLawsOpinionGatherFlowAssigneeList",method = RequestMethod.GET)
List<String> getLawsOpinionGatherFlowAssigneeList(@RequestParam("lawsOpinionGatherId") String lawsOpinionGatherId);
}
@@ -124,6 +124,10 @@
this.getData()
this.getTableList()
})
eventBUs.$on('searchGetData', target => {
this.getData()
this.getTableList()
})
this.getData()
this.getTableList()
this.userData = this.userInfo()
@@ -136,6 +136,11 @@
this.getData()
this.getTableList()
})
eventBUs.$on('searchGetData', target => {
this.selectedRowKeys = []
this.getData()
this.getTableList()
})
this.getData()
this.getTableList()
},
@@ -129,6 +129,11 @@
this.getData()
this.getTableList()
})
eventBUs.$on('searchGetData', target => {
this.selectedRowKeys = []
this.getData()
this.getTableList()
})
this.getData()
this.getTableList()
this.userData = this.userInfo()
@@ -285,7 +285,7 @@
.then( (res) =>{
if (res.data.success) {
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
}else{
this.$message.warning(this.$t('operationFailed'))
}
@@ -362,7 +362,7 @@
getAction(`ocr/ocrRecord/delete`,params).then(res=> {
if(res.success){
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
}else{
this.$message.warning(this.$t('operationFailed'))
}
@@ -152,6 +152,11 @@
}
getAction(`split/sarFileSplitInfo/page`,params).then(res=>{
if(res.success){
if (res.result.current > 1 && res.result.records.length == 0) {
this.queryParams.pageNo = res.result.current - 1
this.loadData()
return
}
this.tableData=[...res.result.records]
this.loading=false
this.total=res.result.total
@@ -206,7 +211,7 @@
// this.queryParams.pageNo=this.queryParams.pageNo-1
// }
this.selectedRowKeys=[]
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
// this.loadData()
}else{
this.$message.warning(this.$t('operationFailed'))
@@ -232,7 +237,7 @@
// if (this.tableData && this.tableData.length == 1 && this.queryParams.pageNo != 1) {
// this.queryParams.pageNo = this.queryParams.pageNo - 1
// }
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
// this.loadData()
} else {
this.$message.warning(this.$t('operationFailed'))
@@ -853,7 +853,7 @@
info_id: this.infoId
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
eventBUs.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
// eventBUs.$emit('searchReset')
this.selectedRowKeys = []
} else {
@@ -895,7 +895,7 @@
info_id: this.infoId
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
eventBUs.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
},
//批量删除
handleBatCancel() {
@@ -934,7 +934,7 @@
info_id: this.infoId
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
eventBUs.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
this.selectClear()
// eventBUs.$emit('searchReset')
} else {
@@ -1004,7 +1004,7 @@
info_id: this.infoId
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
eventBUs.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
// eventBUs.$emit('searchReset')
} else {
this.$message.warning(this.$t('operationFailed'))
@@ -196,6 +196,11 @@
getAction(`sys/dictItem/page`, params).then(res => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.queryParams.pageNo = 1
this.loadData()
return
}
this.total = res.result.total
this.tableData = [...res.result.records]
this.dataFlag = true
@@ -210,6 +215,11 @@
sysDictId: this.record.id,
isTagDict: 1
}).then(res => {
if (res.result.current > 1 && res.result.records.length == 0) {
this.queryParams.pageNo = 1
this.loadData()
return
}
this.tabletreeDataSource = [...res.result.records]
this.total = res.result.total
let data = this.toTree(this.tabletreeDataSource)
@@ -88,7 +88,7 @@
show-size-changer
:page-size.sync="queryParams.pageSize"
:total="total"
:current="pageNo"
:current="queryParams.pageNo"
@change="onChangePage"
@showSizeChange="SizeChange"
/>
@@ -233,12 +233,21 @@
// sys/dict/page
postAction(`sys/dict/tagDictPage`, params).then(res => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.queryParams.pageNo = 1
this.loadData()
return
}
this.loading = false
this.total = res.result.total
this.tableData = [...res.result.records]
}else{
this.loading = false
}
}).finally(() => {
this.loading = false
})
// .finally(() => {
// this.loading = false
//})
},
//查询
searchQuery() {
@@ -260,7 +269,7 @@
},
hideModal() {
this.form.dictName = this.form.dictName.trim()
if (this.form.description){
if (this.form.description) {
this.form.description = this.form.description.trim()
}
let params = {
@@ -305,6 +305,16 @@
}
postAction(`tag/onlCgformTag/page`, paramsItem).then(res => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
if (this.key == 1) {
this.queryParamOne.pageNo = 1
this.loadData(1)
} else if (this.key == 2) {
this.queryParamTwo.pageNo = 1
this.loadData(0)
}
return
}
this.total = res.result.total
this.tableData = [...res.result.records]
this.spinning = false
@@ -804,6 +804,49 @@
</div>
</a-col>
</a-row>
<div class="header-text" v-if="rejectCauseList && rejectCauseList.length > 0">
{{$t('reasonsForRejection')}}
</div>
<div v-if="rejectCauseList && rejectCauseList.length > 0"
v-for="(item,index) in rejectCauseList">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectedBy')">{{$t('rejectedBy')}}</span>
</div>
<div class="itemModel-reject">
{{item.createBy ? item.createBy : '--'}}
</div>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectionTime')">{{$t('rejectionTime')}}</span>
</div>
<div class="itemModel-reject">
{{item.rejectTime ? item.rejectTime : '--'}}
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectReason')">{{$t('rejectReason')}}</span>
</div>
<div class="itemModel-reject">
{{item.rejectCause ? item.rejectCause : '--'}}
</div>
</div>
</a-col>
</a-row>
</div>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
@@ -907,7 +950,8 @@
verifyDutyIdDisabled: false,
verifyInitiatorIdDisabled: false,
DeliverableTreeList: [],
userInfoQuery: {}
userInfoQuery: {},
rejectCauseList: []
}
},
mounted() {
@@ -916,6 +960,18 @@
},
methods: {
...mapGetters(['userInfo']),
getRejectCause(id) {
let query = {
projectLawsInventoryId: id
}
getAction('/project/projectLawsInventoryRejectCauseEO/list', query).then((res) => {
if (res.success) {
this.rejectCauseList = res.result
} else {
this.rejectCauseList = []
}
})
},
getDeliverableTree() {
getAction('/sys/category/getDeliverableTree', {}).then((res) => {
if (res.success) {
@@ -1110,6 +1166,7 @@
item.designDeliverableType = item.designDeliverableType ? item.designDeliverableType.split(',') : []
item.prehomoDeliverableType = item.prehomoDeliverableType ? item.prehomoDeliverableType.split(',') : []
item.verifyDeliverableType = item.verifyDeliverableType ? item.verifyDeliverableType.split(',') : []
this.getRejectCause(item.id)
if (item.dutyTerritory) {
this.queryPersonByProject(item)
} else {
@@ -1400,6 +1457,15 @@
margin-top: 2px;
}
.itemModel-reject {
width: calc(100% - 130px);
display: inline-block;
font-size: 16px;
word-break: break-all;
color: #040B29;
padding-top: 11px;
}
.Required {
color: red;
margin-right: 4px;
@@ -220,6 +220,11 @@
@click="edit(record)">
{{ $t('edit') }}
</a>
<a class="text-operation"
v-else
@click="viewClick(record)">
{{$t('view')}}
</a>
<a class="text-operation"
v-if="(record.inventoryAffirmStatus == 'Not started' || record.inventoryAffirmStatus == 'Rejected') && record.roleCode == 0"
@click="deleteLib(record)">
@@ -229,10 +234,13 @@
@click="resultReportedClick(record)">
{{$t('resultReported')}}
</a>
<a class="text-operation"
@click="viewClick(record)">
</span>
<span slot="operationOne" slot-scope="text,record">
<a class="text-operation"
@click="viewClick(record)">
{{$t('view')}}
</a>
</a>
</span>
<span slot="titleName" slot-scope="text,record" :title="text">
<span class="textName">
@@ -745,6 +753,13 @@
fixed: 'right',
width: 240,
scopedSlots: { customRender: 'operation' }
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 140,
scopedSlots: { customRender: 'operationOne' }
}
],
columnsFileAll: [
@@ -1014,7 +1029,14 @@
let columnResult = JSON.parse(JSON.stringify(this.columnsAll))
if (!this.isRoleSwitching) {
for (var i = 0; i < columnResult.length; i++) {
if (columnResult[i].title === this.$t('operation')) {
if (columnResult[i].title === this.$t('operation') && columnResult[i].width == 240) {
columnResult.splice(i, 1)
i--
}
}
} else if (this.isRoleSwitching) {
for (var i = 0; i < columnResult.length; i++) {
if (columnResult[i].title === this.$t('operation') && columnResult[i].width == 140) {
columnResult.splice(i, 1)
i--
}
@@ -2019,15 +2041,18 @@
if (valid) {
let url = '/project/projectCommentEO/add'
let content = []
let ids = []
if (this.rowKeysSuccessList && this.rowKeysSuccessList.length > 0) {
this.rowKeysSuccessList.forEach(res => {
content.push(res.serialNumber)
ids.push(res.id)
})
}
let query = {
commentContent: this.$t('For') + content.join(',') + this.$t('markedRejection') + '' + this.formInlineComment.commentContent,
projectLibraryId: this.$route.query.id
}
this.rejectCauseAdd(this.formInlineComment.commentContent,ids)
this.confirmLoadingComment = true
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
this.updateStatusBatch(1, selectedRowKeys)
@@ -2042,6 +2067,19 @@
}
})
},
rejectCauseAdd(rejectCause,ids) {
let rejectTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
let query = {
rejectUserId:this.userInfo().id,
rejectTime:rejectTime,
rejectCause:rejectCause,
projectLawsInventoryId:ids.join(','),
rejectType:'0',
}
postAction('/project/projectLawsInventoryRejectCauseEO/add', query).then((res) => {
})
},
handleCancelComment() {
this.visibleComment = false
},
@@ -2368,7 +2406,7 @@
}
::v-deep .ant-table-row:first-child {
background: #fff!important;
background: #fff !important;
opacity: 0.9;
}
@@ -433,46 +433,49 @@
</div>
</a-col>
</a-row>
<!-- <div class="header-text">-->
<!-- {{$t('reasonsForRejection')}}-->
<!-- </div>-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('rejectedBy')">{{$t('rejectedBy')}}</span>-->
<!-- </div>-->
<!-- <div class="itemModel">-->
<!-- {{formInline.verifyRemark ? formInline.verifyRemark : '&#45;&#45;'}}-->
<!-- </div>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('rejectionTime')">{{$t('rejectionTime')}}</span>-->
<!-- </div>-->
<!-- <div class="itemModel">-->
<!-- {{formInline.verifyRemark ? formInline.verifyRemark : '&#45;&#45;'}}-->
<!-- </div>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('rejectReason')">{{$t('rejectReason')}}</span>-->
<!-- </div>-->
<!-- <div class="itemModel">-->
<!-- {{formInline.verifyRemark ? formInline.verifyRemark : '&#45;&#45;'}}-->
<!-- </div>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<div class="header-text" v-if="rejectCauseList && rejectCauseList.length > 0">
{{$t('reasonsForRejection')}}
</div>
<div v-if="rejectCauseList && rejectCauseList.length > 0"
v-for="(item,index) in rejectCauseList">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectedBy')">{{$t('rejectedBy')}}</span>
</div>
<div class="itemModel">
{{item.createBy ? item.createBy : '--'}}
</div>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectionTime')">{{$t('rejectionTime')}}</span>
</div>
<div class="itemModel">
{{item.rejectTime ? item.rejectTime : '--'}}
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectReason')">{{$t('rejectReason')}}</span>
</div>
<div class="itemModel">
{{item.rejectCause ? item.rejectCause : '--'}}
</div>
</div>
</a-col>
</a-row>
</div>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
@@ -486,7 +489,7 @@
<script>
import viewFileModel from '@/components/viewFileModel/index'
import { getAction, postAction, putAction } from '@/api/manage'
import { mapGetters } from 'vuex'
export default {
@@ -503,7 +506,8 @@
rulesData: {},
formInline: {},
disabled: false,
userInfoQuery: {}
userInfoQuery: {},
rejectCauseList:[]
}
},
mounted() {
@@ -514,8 +518,21 @@
editModel(item) {
this.visible = true
this.formInline = item
this.getRejectCause(item.id)
this.formInline = { ...this.formInline }
},
getRejectCause(id) {
let query = {
projectLawsInventoryId: id
}
getAction('/project/projectLawsInventoryRejectCauseEO/list', query).then((res) => {
if (res.success) {
this.rejectCauseList = res.result
} else {
this.rejectCauseList = []
}
})
},
handleCancel() {
this.visible = false
},
@@ -550,7 +567,7 @@
width: calc(100% - 130px);
display: inline-block;
font-size: 16px;
word-break: break-word;
word-break: break-all;
color: #040B29;
}