验收页面优化(通过且快速审批时无需选择处理人)

This commit is contained in:
王利强
2026-07-28 10:16:06 +08:00
parent 7c3285ed5a
commit 088ff356f2
621 changed files with 1372 additions and 212 deletions

View File

@@ -69,19 +69,25 @@
<view class="detail-card">
<view class="card-header-v2">
<view class="card-header-main">
<text class="operator">{{ item.titlePrefix }}{{ labels.personnelSuffix }}{{ fieldText(item, item.operator) }}</text>
<text class="time">{{ fieldText(item, item.time) }}</text>
<template v-if="item.completed">
<text class="operator">{{ item.titlePrefix }}{{ labels.personnelSuffix }}{{ fieldText(item, item.operator) }}</text>
<text class="time">{{ fieldText(item, item.time) }}</text>
</template>
<template v-else>
<text class="operator">{{ labels.executorPrefix }}{{ labels.personnelSuffix }}{{ fieldText(item, item.currentHandlerName) }}</text>
<text class="time status-pending">{{ labels.statusSuffix }}{{ PENDING_LABEL }}</text>
</template>
</view>
<view
v-if="item.type === 'add' && item.content.levelName"
v-if="item.completed && item.type === 'add' && item.content.levelName"
:class="['level-badge', getLevelTagClass(item.content)]"
>
{{ item.content.levelName }}
</view>
</view>
<view class="card-divider"></view>
<view v-if="item.completed" class="card-divider"></view>
<view class="card-body">
<view v-if="item.completed" class="card-body">
<block v-if="item.type === 'add'">
<view class="detail-row-v2">
<text class="label">{{ labels.hazardCode }}</text>
@@ -646,6 +652,10 @@ const previewImages = (attachments, index) => {
line-height: 1.4;
}
.time.status-pending {
color: #e6a23c;
}
.level-badge {
flex-shrink: 0;
padding: 6rpx 16rpx;

View File

@@ -63,6 +63,16 @@ const resolveTaskKey = (node) => {
return node?.taskKey || node?.subProcessApprovalInfo?.taskKey || '';
};
/** 未完成节点:从 currentHandler 解析当前执行人 */
export const resolveCurrentHandlerName = (currentHandler) => {
if (!currentHandler || typeof currentHandler !== 'object') {
return '';
}
return toDisplayText(currentHandler.handlerNames)
|| toDisplayText(currentHandler.assigneeName)
|| '';
};
/** null/undefined 等非对象值统一转为 {},避免默认参数对 null 不生效 */
const toSafeObject = (value) => (value && typeof value === 'object' ? value : {});
@@ -336,6 +346,7 @@ export const mapProcessNodeToHistoryItem = (node) => {
titlePrefix: '处理',
operator: '',
time: '',
currentHandlerName: '',
content: {},
flowTaskId: '',
completed: true
@@ -354,6 +365,7 @@ export const mapProcessNodeToHistoryItem = (node) => {
titlePrefix: resolveTitlePrefix(rawType, displayType, node),
operator: resolveOperator(node, displayType),
time: resolveTime(node, displayType),
currentHandlerName: resolveCurrentHandlerName(node.currentHandler),
content: mapNodeContent(node, displayType),
flowTaskId: node.flowTaskId || '',
completed: isNodeCompleted(node)

View File

@@ -2,6 +2,8 @@ export const CHAIN_LABELS = {
loading: '加载中...',
empty: '暂无流程记录',
personnelSuffix: '人员:',
executorPrefix: '执行',
statusSuffix: '状态:',
hazardCode: '隐患编号',
hazardTitle: '隐患标题',
checkSource: '检查形式',