提交 a6ac3515 authored 作者: kxjia's avatar kxjia

合并代码

...@@ -168,6 +168,29 @@ export function todoListAll() { ...@@ -168,6 +168,29 @@ export function todoListAll() {
}) })
} }
// 转办任务 why 2026-4-7 add
export function assign(data) {
return defHttp.post({
url: '/flowable/task/assign',
data: data
})
}
// 转办任务 why 2026-4-8 add
export function assignRead(data) {
return defHttp.post({
url: '/flowable/task/assignRead',
data: data
})
}
// 查询待阅任务列表
export function todoReadList(query) {
return defHttp.get({
url: '/flowable/task/todoReadList',
params: query
})
}
......
...@@ -26,6 +26,10 @@ ...@@ -26,6 +26,10 @@
<template #icon><CloseCircleOutlined /></template> <template #icon><CloseCircleOutlined /></template>
转办 转办
</a-button> </a-button>
<a-button type="danger" size="large" @click="handleAssignReadTask" :loading="assiReadgning" class="action-btn">
<template #icon><CloseCircleOutlined /></template>
转阅
</a-button>
</a-space> </a-space>
</div> </div>
<div class="action-right"> <div class="action-right">
...@@ -216,7 +220,7 @@ ...@@ -216,7 +220,7 @@
// API // API
import { flowRecord } from '/@/components/Process/api/finished'; import { flowRecord } from '/@/components/Process/api/finished';
import { flowXmlAndNode } from '/@/components/Process/api/definition'; import { flowXmlAndNode } from '/@/components/Process/api/definition';
import { complete, flowTaskForm, getNextFlowNode, getMyTaskFlow,assign } from '/@/components/Process/api/todo'; import { complete, flowTaskForm, getNextFlowNode, getMyTaskFlow,assign,assignRead } from '/@/components/Process/api/todo';
import { flowTaskInfo } from '/@/components/Process/api/process'; import { flowTaskInfo } from '/@/components/Process/api/process';
// 组件 // 组件
...@@ -291,6 +295,7 @@ ...@@ -291,6 +295,7 @@
const isFixed = ref(true); const isFixed = ref(true);
const assigning = ref(false); const assigning = ref(false);
const assiReadgning = ref(false);
const userType = computed(() => { const userType = computed(() => {
return nextNode.value?.type || ''; return nextNode.value?.type || '';
}); });
...@@ -769,6 +774,58 @@ ...@@ -769,6 +774,58 @@
} }
}; };
//转阅处理
const handleAssignReadTask = async () => {
if (assiReadgning.value) return;
try {
assiReadgning.value = true;
const submitData = {
instanceId: taskForm.instanceId,
deployId: taskForm.deployId,
taskId: taskForm.taskId,
comment: '',
values: {},
};
const formData = await validate();
Object.assign(submitData, formData);
submitData.comment = submitData.comment || '';
//test1 1958436761110269953
// submitData.values['targetUserId'] = '1959869916657950721';
if (userType.value === 'user') {
submitData.values['targetUserId'] = formData.checkSendUser;
submitData.values['approvalType'] = 'user';
if (formData.checkSendUser) {
submitData.values['targetUserId'] = formData.checkSendUser;
submitData.values['approvalType'] = 'user';
}
} else if (formData.checkSendRole) {
submitData.values['targetUserId'] = formData.checkSendRole;
submitData.values['approvalType'] = 'role';
}
// 执行发送
const result = await assignRead(submitData);
message.success('任务转阅成功');
emit('success', result);
emit('callback');
} catch (error: any) {
if (error.errorFields) {
message.error('请完善表单信息');
} else {
console.error('转阅任务失败:', error);
message.error(error.message || '转阅任务失败');
}
} finally {
assiReadgning.value = false;
}
};
defineExpose({ defineExpose({
iniData, iniData,
......
...@@ -276,4 +276,16 @@ public class FlowTaskController { ...@@ -276,4 +276,16 @@ public class FlowTaskController {
return flowTaskService.getMyTaskFlow(flowTaskVo); return flowTaskService.getMyTaskFlow(flowTaskVo);
} }
@PostMapping(value = "/assignRead")
public Result assignRead(@RequestBody FlowTaskVo flowTaskVo) {
flowTaskService.assignReadTask(flowTaskVo);
return Result.OK();
}
//待阅列表
@GetMapping(value = "/todoReadList")
public Result todoReadList(@RequestParam Integer pageNum,
@RequestParam Integer pageSize) {
return flowTaskService.todoReadList(pageNum, pageSize);
}
} }
...@@ -175,6 +175,8 @@ public interface IFlowTaskService { ...@@ -175,6 +175,8 @@ public interface IFlowTaskService {
public FlowNextDto getFlowNodeType(String taskId); public FlowNextDto getFlowNodeType(String taskId);
public Result flowFormAllData(String deployId,String taskId); public Result flowFormAllData(String deployId,String taskId);
public Result getMyTaskFlow(FlowTaskVo flowTaskVo); public Result getMyTaskFlow(FlowTaskVo flowTaskVo);
public void assignReadTask(FlowTaskVo flowTaskVo);
public Result todoReadList(Integer pageNum, Integer pageSize) ;
public Result<List<String>> todoListAll(); public Result<List<String>> todoListAll();
......
...@@ -447,13 +447,13 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl ...@@ -447,13 +447,13 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
.singleResult(); .singleResult();
String procDefId=""; String procDefId="";
if (processDefinition != null) { if (processDefinition != null) {
procDefId = processDefinition.getId(); procDefId = processDefinition.getId();
// 使用 procDefId // 使用 procDefId
} }
processDefinition = repositoryService.createProcessDefinitionQuery() processDefinition = repositoryService.createProcessDefinitionQuery()
.processDefinitionId(procDefId) .processDefinitionId(procDefId)
.singleResult(); .singleResult();
if (Objects.nonNull(processDefinition) && processDefinition.isSuspended()) { if (Objects.nonNull(processDefinition) && processDefinition.isSuspended()) {
...@@ -470,7 +470,7 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl ...@@ -470,7 +470,7 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
Task task = taskService.createTaskQuery().processInstanceId(processInstance.getProcessInstanceId()).active().singleResult(); Task task = taskService.createTaskQuery().processInstanceId(processInstance.getProcessInstanceId()).active().singleResult();
result.put("deployId", DeployId); result.put("deployId", DeployId);
result.put("taskId", task.getId()); result.put("taskId", task.getId());
result.put("procInsId", task.getProcessDefinitionId()); result.put("procInsId", task.getProcessInstanceId());
result.put("executionId", task.getExecutionId()); result.put("executionId", task.getExecutionId());
result.put("instanceId", task.getProcessInstanceId()); result.put("instanceId", task.getProcessInstanceId());
...@@ -503,19 +503,19 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl ...@@ -503,19 +503,19 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
} }
String tabname= flowForm.getFormTableName(); String tabname= flowForm.getFormTableName();
if(tabname!=null&&!tabname.equals("")&&zdmc!=null&&!zdmc.equals("")&&zdval!=null&&!zdval.equals("")){ if(tabname!=null&&!tabname.equals("")&&zdmc!=null&&!zdmc.equals("")&&zdval!=null&&!zdval.equals("")){
String formContent=zdmc+"="+zdval; String formContent=zdmc+"="+zdval;
FlowForm flowFormben=new FlowForm(); FlowForm flowFormben=new FlowForm();
flowFormben.setFormTableName(tabname); flowFormben.setFormTableName(tabname);
flowFormben.setFormContent(formContent); flowFormben.setFormContent(formContent);
flowFormben.setFormTp("2"); flowFormben.setFormTp("2");
flowFormben.setFormUrl(DeployId); flowFormben.setFormUrl(DeployId);
sysDeployFormService.updateBisTabBpmStatus(flowFormben); sysDeployFormService.updateBisTabBpmStatus(flowFormben);
} }
} }
...@@ -603,6 +603,7 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl ...@@ -603,6 +603,7 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
e.printStackTrace(); e.printStackTrace();
return Result.error("流程启动错误"); return Result.error("流程启动错误");
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论