fix: 让子任务组审核卡片显示与主任务相同的流程阶段标签
1. 后端添加审核人信息(设计负责人名称)到子任务组数据 2. 前端添加getProcessStageForReview函数支持子任务组 3. 子任务组现在显示'设计负责人:xxx审核'标签
This commit is contained in:
parent
681e1dcc9a
commit
0dd78c3bf8
@ -1107,6 +1107,20 @@ public class TaskItemService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加审核人信息(目标部门负责人)
|
||||||
|
Long targetDeptId = getTargetDeptIdFromTaskType(item.getTaskTypeId());
|
||||||
|
if (targetDeptId != null) {
|
||||||
|
com.designhub.entity.Department targetDept = departmentMapper.selectById(targetDeptId);
|
||||||
|
if (targetDept != null && targetDept.getLeaderId() != null) {
|
||||||
|
com.designhub.entity.User leader = userMapper.selectById(targetDept.getLeaderId());
|
||||||
|
if (leader != null) {
|
||||||
|
groupInfo.put("currentApproverName", leader.getRealName());
|
||||||
|
groupInfo.put("currentApproverRole", "receiving_leader");
|
||||||
|
groupInfo.put("approvalStatus", "pending_receiving_approval");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 计算子任务组总积分
|
// 计算子任务组总积分
|
||||||
groupInfo.put("totalScore", item.getTotalScore() != null ? item.getTotalScore() : 0);
|
groupInfo.put("totalScore", item.getTotalScore() != null ? item.getTotalScore() : 0);
|
||||||
|
|
||||||
|
|||||||
@ -543,12 +543,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 流程阶段(仅主任务) -->
|
<!-- 流程阶段 -->
|
||||||
<div v-if="task._itemType !== 'taskGroup' && getProcessStage(task)" class="process-stage">
|
<div v-if="getProcessStageForReview(task)" class="process-stage">
|
||||||
<span class="stage-icon">
|
<span class="stage-icon">
|
||||||
<Icon name="clock" size="sm" color="#31f08b" />
|
<Icon name="clock" size="sm" color="#31f08b" />
|
||||||
</span>
|
</span>
|
||||||
<span class="stage-text">{{ getProcessStage(task) }}</span>
|
<span class="stage-text">{{ getProcessStageForReview(task) }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 任务信息 -->
|
<!-- 任务信息 -->
|
||||||
@ -2626,6 +2626,22 @@ const getProcessStage = (task: TaskOrSubTask): string => {
|
|||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取待审核页面的流程阶段(支持子任务组)
|
||||||
|
*/
|
||||||
|
const getProcessStageForReview = (task: any): string => {
|
||||||
|
// 子任务组:使用后端返回的审核人信息
|
||||||
|
if (task._itemType === 'taskGroup') {
|
||||||
|
if (task.currentApproverName) {
|
||||||
|
return `设计负责人:${task.currentApproverName}审核`
|
||||||
|
}
|
||||||
|
return '设计负责人审核'
|
||||||
|
}
|
||||||
|
|
||||||
|
// 主任务:使用原有逻辑
|
||||||
|
return getProcessStage(task)
|
||||||
|
}
|
||||||
|
|
||||||
// 判断是否为新发布任务(1小时内)
|
// 判断是否为新发布任务(1小时内)
|
||||||
const isNewTask = (task: TaskOrSubTask) => {
|
const isNewTask = (task: TaskOrSubTask) => {
|
||||||
if (!task.createTime) return false
|
if (!task.createTime) return false
|
||||||
@ -3888,6 +3904,10 @@ const loadReviewTasks = async () => {
|
|||||||
publisherId: group.publisherId,
|
publisherId: group.publisherId,
|
||||||
publisherName: group.publisherName,
|
publisherName: group.publisherName,
|
||||||
publisherDeptName: group.publisherDeptName,
|
publisherDeptName: group.publisherDeptName,
|
||||||
|
// 审核人信息(流程阶段显示)
|
||||||
|
currentApproverName: group.currentApproverName,
|
||||||
|
currentApproverRole: group.currentApproverRole,
|
||||||
|
approvalStatus: group.approvalStatus,
|
||||||
// 前置任务的素材下载链接
|
// 前置任务的素材下载链接
|
||||||
prevDownloadUrls: group.prevDownloadUrls || [],
|
prevDownloadUrls: group.prevDownloadUrls || [],
|
||||||
// 标记类型
|
// 标记类型
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user