| | |
| | | <view class="info-row"> |
| | | <view class="info-item"> |
| | | <view class="label">执行人员:</view> |
| | | <view class="value">{{ task.assignee }}</view> |
| | | <view class="value">{{ getAssigneesDisplay(task) }}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | // 优先显示转入医院名称 |
| | | if (task.emergencyInfo.hospitalInName) { |
| | | if(task.emergencyInfo.hospitalInName.includes("家中")){ |
| | | return task.emergencyInfo.destinationAddress; |
| | | return task.emergencyInfo.hospitalInAddress; |
| | | } |
| | | return task.emergencyInfo.hospitalInName; |
| | | } |
| | | } |
| | | // 如果没有转入医院名称,但有转入医院地址,则显示地址 |
| | | if (task.emergencyInfo.hospitalInAddress) { |
| | | return task.emergencyInfo.hospitalInAddress; |
| | | } |
| | | } |
| | | // 其他情况使用原来的endLocation |
| | | return this.formatAddress(task.endLocation || "未设置"); |
| | | }, |
| | | |
| | | // 获取执行人员显示(从 assignees 数组中提取 userName) |
| | | getAssigneesDisplay(task) { |
| | | // 如果有 assignees 数组且不为空 |
| | | if (task.assignees && task.assignees.length > 0) { |
| | | // 提取所有 userName,过滤掉空值 |
| | | const userNames = task.assignees |
| | | .map(assignee => assignee.userName) |
| | | .filter(name => name); // 过滤掉 null/undefined/空字符串 |
| | | |
| | | // 如果有有效的用户名,用逗号连接 |
| | | if (userNames.length > 0) { |
| | | return userNames.join('、'); |
| | | } |
| | | } |
| | | |
| | | // 如果没有 assignees 数组,使用旧的 assigneeName 或 assignee 字段 |
| | | return task.assigneeName || task.assignee || '未分配'; |
| | | }, |
| | | |
| | | // 切换查询界面显示/隐藏 |
| | |
| | | font-size: 26rpx; |
| | | flex: 1; |
| | | word-break: break-all; |
| | | overflow-wrap: break-word; |
| | | line-height: 1.5; |
| | | max-height: none; |
| | | overflow: visible; |
| | | } |
| | | } |
| | | } |