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

This commit is contained in:
cuijiaming
2023-03-08 13:37:07 +08:00
13 changed files with 566 additions and 64 deletions
@@ -293,4 +293,10 @@ ALTER TABLE `project_library_role_rel`
ADD COLUMN `model_type` varchar(64) NULL COMMENT '模块类型,对应系统中枚举类 RoleRelModelTypeEnum ' AFTER `role_code`;
-- 初始化历史数据
update project_library_role_rel set model_type = 'Laws inventory'
update project_library_role_rel set model_type = 'Laws inventory';
-- 项目库-认证清单表-增加认证进度备注 2023-03-08 未同步生产环境
ALTER TABLE `project_certification_inventory`
ADD COLUMN `certification_progress_remark` varchar(2000) NULL COMMENT '认证进度备注' AFTER `certification_progress`;
-- 将之前的任务清单-认证进度,修改为 认证清单-认证进度 2023-03-08 未同步生产环境
UPDATE `sys_dict` SET `dict_name` = '认证清单-认证进度', `description` = '认证清单-认证进度' WHERE `id` = '1524311122804346881';
@@ -37,12 +37,12 @@ public enum EvaluationTypeEnum {
public static String getTextByValue(String value,String cut) {
EvaluationTypeEnum[] values = values();
for (EvaluationTypeEnum certificationProgressEnum : values) {
if (certificationProgressEnum.value.equals(value)) {
for (EvaluationTypeEnum evaluationTypeEnum : values) {
if (evaluationTypeEnum.value.equals(value)) {
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
return certificationProgressEnum.name;
return evaluationTypeEnum.name;
}else {
return certificationProgressEnum.value;
return evaluationTypeEnum.value;
}
}
}
@@ -213,4 +213,11 @@ public class ProjectCertificationInventoryEOController extends JeroController<Pr
public Result<?> submitTask(@RequestBody JSONObject json) {
return this.projectCertificationInventoryEOService.submitTask(json);
}
@AutoLog(value = "项目库-认证清单表-批量保存")
@ApiOperation(value="项目库-认证清单表-批量保存", notes="项目库-认证清单表-批量保存")
@PostMapping(value = "/saveBatch")
public Result<?> saveBatch(@RequestBody List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList) {
return this.projectCertificationInventoryEOService.saveBatch(projectCertificationInventoryEOList);
}
}
@@ -174,6 +174,14 @@ public class ProjectCertificationInventoryEO implements Serializable {
@ApiModelProperty(value = "认证进度")
private java.lang.String certificationProgress;
/**认证进度展示名称**/
@TableField(exist = false)
private String certificationProgress_dictText;
@Excel(name = "认证进度备注", width = 15)
@ApiModelProperty(value = "认证进度备注")
private String certificationProgressRemark;
/**项目库id*/
@ApiModelProperty(value = "项目库id")
private String projectLibraryId;
@@ -102,7 +102,7 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
void addProcessInfoEO(ProcessInfoEO processInfoEO, String projectLibraryId);
void addProcessInfoDetailEO(List<ProcessInfoDetailEO> processInfoDetailEOList, ProcessInfoEO processInfoEO);
void addProcessInfoDetailEO(List<ProcessInfoDetailEO> processInfoDetailEOList, String processInfoId, String taskDefinitionKey);
Result<List<SysRole>> getRoleByUserId(Map<String, Object> params);
@@ -128,4 +128,11 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
* @return
*/
Result<?> certificationInitiatingTask(JSONObject json);
/**
* 批量保存
* @param projectCertificationInventoryEOList
* @return
*/
Result<?> saveBatch(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
}
@@ -209,6 +209,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if (CollectionUtils.isNotEmpty(datas)) {
List<SysCategory> categoryList = this.sysCategoryService.list();
List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.getBaseMapper().selectItemsAll();
List<SysDictItem> certificationProgress = this.sysDictItemServiceImpl.selectItemsByDictCode("certification_progress");
List<String> userIdList = new ArrayList<>();
@@ -248,6 +249,20 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
String dutyTerritoryName = this.sysDictItemService.disposeShowDictItemValue(sysDictItems,data.getDutyTerritory(),cut, ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
data.setDutyTerritoryName(dutyTerritoryName);
}
if(StringUtils.isNotEmpty(data.getCertificationProgress())){
String certificationProgress_dictText = "";
List<SysDictItem> collect = certificationProgress.stream()
.filter(dict -> StringUtils.equals(dict.getItemValue(), data.getCertificationProgress()))
.collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(collect)){
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
certificationProgress_dictText = collect.get(0).getItemText();
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
certificationProgress_dictText = collect.get(0).getEnName();
}
}
data.setCertificationProgress_dictText(certificationProgress_dictText);
}
}
}
}
@@ -327,12 +342,20 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
processInfoDetailEO.setStatus(TaskStatusEnum.NOT_DONE.getValue());
processInfoDetailEO.setProcessInfoId(projectLibraryId);
processInfoDetailEO.setActiProcInstId(projectLibraryId);
processInfoDetailEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
processInfoDetailEOList.add(processInfoDetailEO);
}
ProcessInfoEO processInfoEO = new ProcessInfoEO();
this.addProcessInfoEO(processInfoEO,projectLibraryId);
this.addProcessInfoDetailEO(processInfoDetailEOList,processInfoEO);
// 删除该项目数据的待办任务,key为 认证工程师接受任务的数据
QueryWrapper<ProcessInfoDetailEO> deleteDetailWrap = new QueryWrapper<>();
deleteDetailWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,processInfoEO.getId());
deleteDetailWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSJSRW.getKey());
deleteDetailWrap.lambda().eq(ProcessInfoDetailEO::getFlowType,FlowTypeEnum.CERTIFICATION_LC.getValue());
this.processInfoDetailEOService.remove(deleteDetailWrap);
this.processInfoDetailEOService.saveBatch(processInfoDetailEOList);
this.updateBatchById(projectCertificationInventoryEOList);
return Result.OK("发布成功!");
}
@@ -351,6 +374,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
processInfoEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
processInfoEO.setStatus(TodoCenterStatusEnum.LIST_TO_CONFIRM.getValue());
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
processInfoEO.setCreateBy(currentUser.getId());
QueryWrapper<ProcessInfoEO> deleteWrap = new QueryWrapper<>();
deleteWrap.lambda().eq(ProcessInfoEO::getId,projectLibraryId);
this.processInfoEOService.remove(deleteWrap);
@@ -360,19 +386,28 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
/**
* 添加流程信息,用户的待办信息。
* @param processInfoDetailEOList
* @param processInfoEO
* @param processInfoId
*/
@Override
public void addProcessInfoDetailEO(List<ProcessInfoDetailEO> processInfoDetailEOList,ProcessInfoEO processInfoEO){
public void addProcessInfoDetailEO(List<ProcessInfoDetailEO> processInfoDetailEOList,String processInfoId,String taskDefinitionKey){
processInfoDetailEOList.forEach(detail -> {
detail.setActiProcInstId(processInfoId);
detail.setProcessInfoId(processInfoId);
detail.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
detail.setTaskDefinitionKey(taskDefinitionKey);
detail.setStatus(TaskStatusEnum.NOT_DONE.getValue());
// detail.setEndTime(DateUtils.str2Date(endTime,DateUtils.date_sdf.get()));
detail.setCreateTime(new Date());
detail.setStatus(TaskStatusEnum.NOT_DONE.getValue());
});
// 删除该项目数据的待办任务,key为 认证工程师接受任务的数据
QueryWrapper<ProcessInfoDetailEO> deleteDetailWrap = new QueryWrapper<>();
deleteDetailWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,processInfoEO.getId());
deleteDetailWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSJSRW.getKey());
this.processInfoDetailEOService.remove(deleteDetailWrap);
List<String> userIdList = processInfoDetailEOList.stream().map(ProcessInfoDetailEO::getUserId).distinct().collect(Collectors.toList());
QueryWrapper<ProcessInfoDetailEO> removeWrap = new QueryWrapper<>();
removeWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,processInfoId);
removeWrap.lambda().in(ProcessInfoDetailEO::getUserId,userIdList);
// 删除用户在这个认证清单流程中其它的待办任务
this.processInfoDetailEOService.remove(removeWrap);
this.processInfoDetailEOService.saveBatch(processInfoDetailEOList);
}
@@ -619,6 +654,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
@Override
public Result<?> submitTask(JSONObject json) {
if (!json.containsKey("nodeKey")) {
throw new JeroBootException("nodeKey不能为空,请联系管理员!");
}
String nodeKey = json.getString("nodeKey");
CertificationFlowNodeEnum flowNodeEnum = CertificationFlowNodeEnum.getEnumByKey(nodeKey);
@@ -626,12 +665,19 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
throw new JeroBootException("根据" + nodeKey + " 的操作节点没有获取到节点信息,请联系管理员!");
}
String projectLibraryId = json.getString("projectLibraryId");
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.getBaseMapper().selectById(projectLibraryId);
if(ObjectUtils.isEmpty(projectLibraryBase)){
throw new JeroBootException("无法获取项目库信息,项目库id为:" + projectLibraryId + " 请联系管理员!");
}
json.put("projectLibraryBase",projectLibraryBase);
switch (flowNodeEnum){
case RZGCSJSRW:
return this.certificationInitiatingTask(json);
case RZGCSTHRW:
break;
return this.certificationReturnedStudioTask(json);
case ZRRJSRW:
break;
@@ -648,6 +694,52 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
return Result.OK("提交任务成功!");
}
private Result<?> certificationReturnedStudioTask(JSONObject json) {
String ids = json.getString("ids");
if(StringUtils.isEmpty(ids)){
throw new JeroBootException("至少选择一条数据进行操作!");
}
List<String> idList = Arrays.asList(ids.split(","));
List<String> flowStatusList = new ArrayList<>();
flowStatusList.add(CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue());
flowStatusList.add(CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue());
QueryWrapper<ProjectCertificationInventoryEO> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().in(ProjectCertificationInventoryEO::getId,idList);
queryWrapper.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.list(queryWrapper);
if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){
throw new JeroBootException("至少选择一条数据流程状态为'清单待校核 或 责任人拒绝的数据'!");
}
ProjectLibraryBase projectLibraryBase = JSONObject.parseObject(JSONObject.toJSONString(json.get("projectLibraryBase")), ProjectLibraryBase.class);
if (StringUtils.isEmpty(projectLibraryBase.getStudioEngineer())) {
throw new JeroBootException("该项目的studio为空,请维护studio后再进行退回操作!");
}
// 给studio分配待办中心任务
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
processInfoDetailEO.setUserId(projectLibraryBase.getStudioEngineer());
processInfoDetailEOList.add(processInfoDetailEO);
this.addProcessInfoDetailEO(processInfoDetailEOList,projectLibraryBase.getId(),CertificationFlowNodeEnum.STUDIOFQ.getKey());
try {
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue());
}
// 认证工程师发起任务,将数据的状态更新为 任务待确认。
this.updateBatchById(projectCertificationInventoryEOList);
}catch (Exception ex){
ex.printStackTrace();
log.error("认证工程师-退回认证清单任务失败:" + ex.getMessage());
throw new JeroBootException("退回任务失败!");
}
return Result.OK("退回任务成功!");
}
/**
* 认证工程师发起任务
* @param json
@@ -674,10 +766,45 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
throw new JeroBootException("至少选择一条数据流程状态为'清单待校核 或 责任人拒绝的数据'!");
}
ProjectLibraryBase projectLibraryBase = JSONObject.parseObject(JSONObject.toJSONString(json.get("projectLibraryBase")), ProjectLibraryBase.class);
if (ObjectUtils.isEmpty(projectLibraryBase)) {
throw new JeroBootException("无法获取项目库信息");
}
try {
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue());
}
// 给责任人分配待办中心的任务
List<String> dutyPersonList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList());
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
for (String dutyPerson : dutyPersonList) {
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
processInfoDetailEO.setUserId(dutyPerson);
processInfoDetailEOList.add(processInfoDetailEO);
}
this.addProcessInfoDetailEO(processInfoDetailEOList,projectLibraryBase.getId(),CertificationFlowNodeEnum.ZRRJSRW.getKey());
// 更新该项目认证流程中,认证工程师的任务状态。
QueryWrapper<ProjectCertificationInventoryEO> queryCountWrap = new QueryWrapper<>();
queryCountWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,projectLibraryBase.getId());
queryCountWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
int notDoneCount = this.count(queryCountWrap);
// 如果还有 清单待校核、责任人拒绝 状态的数据,不做操作,如果没有 将这个项目认证流程的所有认证工程师待办任务转为已办
if(notDoneCount == 0){
QueryWrapper<ProcessInfoDetailEO> detailQueryWrapper = new QueryWrapper<>();
detailQueryWrapper.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId());
detailQueryWrapper.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSJSRW.getKey());
List<ProcessInfoDetailEO> detailEOList = this.processInfoDetailEOService.list(detailQueryWrapper);
for (ProcessInfoDetailEO processInfoDetailEO : detailEOList) {
processInfoDetailEO.setStatus(TaskStatusEnum.HAVE_DONE.getValue());
}
this.processInfoDetailEOService.updateBatchById(detailEOList);
}
// 认证工程师发起任务,将数据的状态更新为 任务待确认。
this.updateBatchById(projectCertificationInventoryEOList);
}catch (Exception ex){
@@ -689,4 +816,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
return Result.OK("发起任务成功!");
}
@Override
public Result<?> saveBatch(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList) {
if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){
throw new JeroBootException("无法获取需要保存的数据,请检查!");
}
this.updateBatchById(projectCertificationInventoryEOList);
return Result.OK("保存成功!");
}
}
@@ -203,7 +203,10 @@
where pid.user_id = #{params.currentUserId} and pid.status = #{params.taskStatus}
)
)
AND pi.flow_type = #{params.qdqrFlowTypeValue}
AND pi.flow_type IN
<foreach collection="params.qdqrFlowTypeValue" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
)temp
<include refid="BaseQuerySql"/>
order by temp.end_time asc
@@ -39,6 +39,7 @@ import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
import com.jero.modules.wkflow.feginClient.impl.WorkFlowFeignClientImpl;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -199,11 +200,16 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
flowTypeList.add(FlowTypeEnum.RWQRLC.getValue());
flowTypeList.add(FlowTypeEnum.SJFHXSHLC.getValue());
flowTypeList.add(FlowTypeEnum.YZFHXSCLC.getValue());
flowTypeList.add(FlowTypeEnum.PREHOMOQRLC.getValue());
// 2023-03-08 去掉原来的Pre-Homo
// flowTypeList.add(FlowTypeEnum.PREHOMOQRLC.getValue());
params.put("flowTypeList",flowTypeList);
params.put("taskStatus", TaskStatusEnum.NOT_DONE.getValue());
params.put("currentUserId",currentUser.getId());
params.put("qdqrFlowTypeValue",FlowTypeEnum.QDQR.getValue());
List<String> qdqrFlowTypeValue = new ArrayList<>();
qdqrFlowTypeValue.add(FlowTypeEnum.QDQR.getValue());
qdqrFlowTypeValue.add(FlowTypeEnum.CERTIFICATION_LC.getValue());
params.put("qdqrFlowTypeValue",qdqrFlowTypeValue);
IPage page = new Page(pageNo, pageSize);
IPage<ProcessInfoVO> result = this.baseMapper.queryProjectProcessTodoTaskListList(page,params);
@@ -304,7 +310,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
List<String> flowTypeList = new ArrayList<>();
flowTypeList.add(FlowTypeEnum.RWQRLC.getValue());
flowTypeList.add(FlowTypeEnum.SJFHXSHLC.getValue());
flowTypeList.add(FlowTypeEnum.PREHOMOQRLC.getValue());
// flowTypeList.add(FlowTypeEnum.PREHOMOQRLC.getValue());
flowTypeList.add(FlowTypeEnum.YZFHXSCLC.getValue());
//根据法规清单id,查询待办中心数据
@@ -396,7 +402,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
flowTypeList.add(FlowTypeEnum.RWQRLC.getValue());
flowTypeList.add(FlowTypeEnum.SJFHXSHLC.getValue());
flowTypeList.add(FlowTypeEnum.YZFHXSCLC.getValue());
flowTypeList.add(FlowTypeEnum.PREHOMOQRLC.getValue());
// flowTypeList.add(FlowTypeEnum.PREHOMOQRLC.getValue());
}
/**
@@ -567,13 +573,15 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
//判断当前任务是否过期
Date endTime = data.getEndTime();
try {
endTime = sdf.parse(sdf.format(endTime));
} catch (ParseException e) {
e.printStackTrace();
}
if(finalCurrentDate.after(endTime) || finalCurrentDate.equals(endTime)){
data.setEndTimePastDueFlag(true);
if(ObjectUtils.isNotEmpty(endTime)){
try {
endTime = sdf.parse(sdf.format(endTime));
} catch (ParseException e) {
e.printStackTrace();
}
if(finalCurrentDate.after(endTime) || finalCurrentDate.equals(endTime)){
data.setEndTimePastDueFlag(true);
}
}
});
@@ -183,7 +183,8 @@
studioList: [],
disabled: false,
url: {
edit: '/project/projectTaskInventoryEO/edit',
// edit: '/project/projectTaskInventoryEO/edit',
edit: '/project/projectCertificationInventoryEO/edit',
addOrUpdate: '/project/projectTaskInventoryConditionAssessmentEO/addOrUpdate',
list: '/project/projectTaskInventoryConditionAssessmentEO/list'
}
@@ -496,6 +496,9 @@
this.formInline = {}
this.visible = true
this.formInline = value
if (this.formInline.deliverableType) {
this.formInline.deliverableType = this.formInline.deliverableType.split(',')
}
this.getRegulationNo()
this.title = this.$t('edit')
this.$nextTick(() => {
@@ -1,7 +1,7 @@
<template>
<a-modal
:title="$t('batSetting')"
:width="1000"
:title="name"
:width="name == $t('changeSetting') ? 600 : 1000"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@@ -10,7 +10,8 @@
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="12">
<a-col :span="name == $t('changeSetting') ? 24 : 12"
v-if="name == $t('BatchSetting') || name == $t('changeSetting')">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('configurationItem')">{{$t('configurationItem')}}</span>
@@ -32,7 +33,7 @@
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<a-col :span="12" v-if="name == $t('BatchSetting')">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
@@ -47,7 +48,7 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="name == $t('BatchSetting')">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -86,7 +87,7 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="name == $t('BatchSetting')">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -122,7 +123,7 @@
export default {
name: 'batSetting',
props: ['url'],
components:{
components: {
PersonnelSelection
},
data() {
@@ -132,26 +133,28 @@
formInline: {},
rules: {},
ids: [],
configurationItemList:[],
engineeringInterfacePersonList:[],
typeOfDeliverablesList:[],
configurationItemList: [],
engineeringInterfacePersonList: [],
typeOfDeliverablesList: [],
name: ''
}
},
mounted() {
},
methods: {
edit(data) {
edit(data, name) {
this.visible = true
this.$nextTick(() => {
this.ids = data || []
this.formInline = {}
this.name = name
})
},
handleOk() {
// if (this.formInline.dutyTerritory) {
// this.handleOkTwo()
// } else {
this.handleOkOne()
this.handleOkOne()
// }
},
PersonnelSelectionChange(value, id) {
@@ -0,0 +1,252 @@
<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" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<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(undefined)" 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
}
},
mounted() {
},
methods: {
transferModel() {
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
if (this.selectedRowKeys.length > 1) {
this.selectedRowKeys.shift()
}
},
handleCancel() {
this.visible = false
this.$emit('visible')
},
handleSubmit(flag) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.confirmLoading = true
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
this.confirmLoading = false
this.$emit('transferListForm',selectedRowKeys.join(','))
this.selectedRowKeys = []
// postAction('project/projectLawsInventoryEO/add', {
// dummyInventoryBaseId: selectedRowKeys.join(','),
// projectLibraryId: this.$route.query.id,
// flag: flag
// }).then((res) => {
// if (res.success) {
// this.confirmLoading = false
// // this.$message.success(this.$t('OperationSuccessful'))
// // this.visible = false
// this.selectedRowKeys = []
// this.$emit('transferListForm',selectedRowKeys.join(','))
// } else {
// // if (res.message == '该虚拟清单的维护清单中没有数据,是否需要添加') {
// // this.confirmLoading = false
// // this.getAdd()
// // return
// // }
// this.$message.warning(this.$t('operationFailed'))
// this.confirmLoading = false
// }
// })
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
getAdd() {
let _this = this
this.$confirm({
content: _this.$t('TheDoesNotContainData'),
onOk() {
_this.handleSubmit('1')
}
})
}
}
}
</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>
@@ -77,7 +77,7 @@
</div>
<!-- 保存-->
<div @click="preservationClick" v-if="roleSwitchingCode == 2" class="operator-text">
<div @click="preservationClick(1)" v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="check-circle"/>
{{ $t('preservation') }}
</div>
@@ -89,7 +89,8 @@
</div>
<!-- 批量设置-->
<div @click="BatchSettingClick" v-if="roleSwitchingCode == 0 || roleSwitchingCode == 2" class="operator-text">
<div @click="BatchSettingClick($t('BatchSetting'))" v-if="roleSwitchingCode == 0 || roleSwitchingCode == 2"
class="operator-text">
<a-icon type="setting"/>
{{ $t('BatchSetting') }}
</div>
@@ -101,9 +102,9 @@
</div>
<!-- 修改配置-->
<div @click="changeSettingClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21"
<div @click="BatchSettingClick($t('changeSetting'))" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21"
class="operator-text">
<a-icon type="setting" />
<a-icon type="setting"/>
{{ $t('changeSetting') }}
</div>
@@ -192,7 +193,7 @@
<!-- 退回至Studio-->
<div @click="returnToStudioClick" v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="close-circle" />
<a-icon type="close-circle"/>
{{ $t('returnToStudio') }}
</div>
@@ -204,7 +205,7 @@
<!-- 审批退回-->
<div @click="returnedForApprovalClick" v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="close-circle" />
<a-icon type="close-circle"/>
{{ $t('returnedForApproval') }}
</div>
@@ -218,7 +219,7 @@
<!-- 任务退回-->
<div @click="missionRejectionClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21"
class="operator-text">
<a-icon type="close-circle" />
<a-icon type="close-circle"/>
{{ $t('missionRejection') }}
</div>
@@ -230,7 +231,7 @@
<!-- 转办 -->
<div @click="turnToDoClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21" class="operator-text">
<a-icon type="undo" />
<a-icon type="undo"/>
{{ $t('turnToDo') }}
</div>
@@ -323,6 +324,18 @@
</span>
</div>
</a-table>
<div class="page" v-if="dataSource.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>
<transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/>
<certificationDirectory :isDisplayNum="isDisplayNum" :url="url" ref="certificationDirectoryRef"/>
@@ -331,6 +344,7 @@
<modifyHistory ref="modifyHistoryRef"/>
<uploadFile ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></uploadFile>
<TaskListModel @TaskListModelList="transferListForm" ref="TaskListModelRef"/>
<referenceDeliverablesList ref="referenceDeliverablesListRef" @referenceDeliverablesListForm="transferListForm"/>
<a-modal
:title="listTitle"
:width="500"
@@ -413,6 +427,7 @@
import batSetting from './components/batSetting'
import modifyHistory from './components/modifyHistoryList'
import TaskListModel from '../TaskListModel'
import referenceDeliverablesList from './components/referenceDeliverablesList'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import moment from 'moment'
import { mapGetters } from 'vuex'
@@ -428,11 +443,15 @@
addModel,
modifyHistory,
uploadFile,
TaskListModel
TaskListModel,
referenceDeliverablesList
},
data() {
return {
queryParam: {},
pageNo: 1,
pageSize: 10,
total: 0,
CertificationColor: {
'Test passed': 'accordColor',
'Test failed': 'nonConformityColor',
@@ -466,7 +485,8 @@
setBatch: '/project/projectCertificationInventoryEO/setBatch',
deleteOne: '/project/projectCertificationInventoryEO/delete',
AndUserId: '/project/projectLibraryRoleRelEO/queryByProjectLibraryIdAndUserId',
AndUserIdEdit: '/project/projectLibraryRoleRelEO/edit'
AndUserIdEdit: '/project/projectLibraryRoleRelEO/edit',
saveBatch: '/project/projectCertificationInventoryEO/saveBatch'
},
dataSource: [],
roleSwitchingCode: '',
@@ -638,8 +658,8 @@
}
}
}
if (this.roleSwitchingCode == 20 || this.roleSwitchingCode == 21 ||this.roleSwitchingCode == 11 ||
this.roleSwitchingCode == 12 || this.roleSwitchingCode == 13 || this.roleSwitchingCode == 14){
if (this.roleSwitchingCode == 20 || this.roleSwitchingCode == 21 || this.roleSwitchingCode == 11 ||
this.roleSwitchingCode == 12 || this.roleSwitchingCode == 13 || this.roleSwitchingCode == 14) {
for (let i = 0; i < columns.length; i++) {
if (columns[i].title == this.$t('reportNo')) {
columns.splice(i, 1)
@@ -676,17 +696,29 @@
disabledDate(current) {
return current && current < moment().subtract(1, 'day')
},
onChange(page, pageSize) {
this.pageNo = page
this.replacePage()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.replacePage()
},
searchQuery() {
this.pageNo = 1
this.selectedRowKeys = []
this.getList()
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.selectedRowKeys = []
this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback()
},
getPersonnelList() {
this.pageNo = 1
this.getList()
},
handleSuperQuery(params, matchType) {
@@ -700,6 +732,7 @@
sqp['superQueryMatchType'] = matchType
}
this.queryParamQuery = sqp
this.pageNo = 1
this.getList()
},
handleToggleSearch() {
@@ -713,6 +746,8 @@
}
})
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParamQuery,
...queryParam,
projectLibraryId: this.$route.query.id,
@@ -722,6 +757,7 @@
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataSource = res.result.records || []
this.total = res.result.total
this.loading = false
this.JLoading = false
} else {
@@ -733,9 +769,9 @@
transferClick() {
this.$refs.transferListRef.transferModel()
},
BatchSettingClick() {
BatchSettingClick(name) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)), name)
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
@@ -861,13 +897,16 @@
},
transferListForm() {
this.pageNo = 1
this.getList()
},
batSettingForm() {
this.pageNo = 1
this.getList()
this.selectedRowKeys = []
},
addModelForm() {
this.pageNo = 1
this.getList()
},
edit(item) {
@@ -922,7 +961,7 @@
}
this.roleSwitchingCode = this.formInlineRoleSwitching.roleSwitchingCode
this.getList()
this.$emit('getRoleSwitch',this.roleSwitchingCode)
this.$emit('getRoleSwitch', this.roleSwitchingCode)
} else {
this.JLoading = false
}
@@ -960,7 +999,7 @@
this.visibleRoleSwitching = false
this.confirmLoadingRoleSwitching = false
this.getList()
this.$emit('getRoleSwitch',this.roleSwitchingCode)
this.$emit('getRoleSwitch', this.roleSwitchingCode)
} else {
this.confirmLoadingRoleSwitching = false
this.$message.warning(this.$t('operationFailed'))
@@ -973,16 +1012,26 @@
this.visibleRoleSwitching = false
},
//保存
preservationClick() {
preservationClick(num) {
postAction(this.url.saveBatch, { 'dataList': this.dataSource }).then((res) => {
if (res.success) {
if (num == 1) {
this.$message.success(this.$t('OperationSuccessful'))
}
} else {
if (num == 1) {
this.$message.warning(this.$t('operationFailed'))
}
}
})
},
//引用交付物
referenceDeliverablesClick() {
},
//修改配置
changeSettingClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.$refs.referenceDeliverablesListRef.transferModel()
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//发起流程
initiatingProcessClick() {
@@ -1045,6 +1094,25 @@
let item = JSON.parse(JSON.stringify(val))
item.roleCode = this.roleSwitchingCode
this.$refs.TaskListModelRef.getData(item, this.$t('CertificationProgress'))
},
submitTask(value) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = {
'nodeKey': value,
'projectLibraryId': this.$route.query.id,
'ids': selectedRowKeys.join(',')
}
postAction('/project/projectCertificationInventoryEO/submitTask', query).then((res) => {
if (res.success) {
} else {
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
}
}
}