| | |
| | | |
| | | <view class="info-item"> |
| | | <view class="label">执行人员:</view> |
| | | <view class="value">{{ task.assignee }}</view> |
| | | <view class="value">{{ getAssigneesDisplay(task) }}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | // 获取目的地显示内容(转运任务显示转入医院名称或详细地址) |
| | | getEndLocationDisplay(task) { |
| | | // 如果是转运任务且有emergencyInfo信息 |
| | | // console.log("get end location display",task.taskType,task.emergencyInfo.hospitalInAddress,task.showTaskCode); |
| | | if (task.taskType === 'EMERGENCY_TRANSFER' && task.emergencyInfo) { |
| | | // console.log('转运任务 - 紧急信息:', task.emergencyInfo) |
| | | // 优先显示转入医院名称 |
| | | if (task.emergencyInfo.hospitalInName) { |
| | | if(task.emergencyInfo.hospitalInName.includes("家中")){ |
| | | return task.emergencyInfo.destinationAddress; |
| | | } |
| | | return task.emergencyInfo.hospitalInName; |
| | | } |
| | | |
| | | // console.log("get end local",task.emergencyInfo.hospitalInAddress); |
| | | return task.emergencyInfo.hospitalInAddress; |
| | | // if (task.emergencyInfo.hospitalInName) { |
| | | // if(task.emergencyInfo.hospitalInName.includes("家中")){ |
| | | // return task.emergencyInfo.destinationAddress; |
| | | // } |
| | | // 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 || '未分配'; |
| | | }, |
| | | |
| | | // 转换状态格式(将数据库状态转换为UI使用的状态) |
| | |
| | | font-size: 26rpx; |
| | | flex: 1; |
| | | word-break: break-all; |
| | | overflow-wrap: break-word; |
| | | line-height: 1.5; |
| | | max-height: none; |
| | | overflow: visible; |
| | | } |
| | | } |
| | | } |