| | |
| | | <view class="task-header"> |
| | | <view class="task-title"> |
| | | {{ getTaskTypeText(task.type) }} - {{ task.vehicle }} |
| | | <text v-if="task.isHeadPush === '1'" class="head-push-tag">总</text> |
| | | <text v-if="task.emergencyInfo && task.emergencyInfo.serviceOrdVip === '1'" class="vip-tag">VIP</text> |
| | | <text v-if="task.emergencyInfo && task.emergencyInfo.fromHq2Is === '1'" class="hq-tag">广总</text> |
| | | </view> |
| | | <view |
| | | class="task-status" |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 任务编号单独一行 --> |
| | | <!-- 任务编号和开始时间在同一行显示,但分开一些 --> |
| | | <view class="task-code-row"> |
| | | <text class="task-code">{{ task.showTaskCode }}</text> |
| | | <text class="task-time">{{ task.startTime }}</text> |
| | | </view> |
| | | |
| | | <!-- 任务详细信息 --> |
| | |
| | | <view class="info-row"> |
| | | <view class="info-item"> |
| | | <view class="label">出发地:</view> |
| | | <view class="value">{{ task.startLocation }}</view> |
| | | <view class="value">{{ getStartLocationDisplay(task) }}</view> |
| | | </view> |
| | | <view class="info-item"> |
| | | <view class="label">目的地:</view> |
| | | <view class="value">{{ task.endLocation }}</view> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-item"> |
| | | <view class="label">出发时间:</view> |
| | | <view class="value">{{ task.startTime }}</view> |
| | | <view class="label">目的地:</view> |
| | | <view class="value">{{ getEndLocationDisplay(task) }}</view> |
| | | </view> |
| | | </view> |
| | | <view class="info-row"> |
| | | |
| | | <view class="info-item"> |
| | | <view class="label">执行人员:</view> |
| | | <view class="value">{{ task.assignee }}</view> |
| | |
| | | type: task.taskType, |
| | | vehicle: vehicleInfo, |
| | | vehicleList: task.assignedVehicles || [], |
| | | startLocation: this.formatAddress( |
| | | task.departureAddress || task.startLocation || "未设置" |
| | | ), |
| | | endLocation: this.formatAddress( |
| | | task.destinationAddress || task.endLocation || "未设置" |
| | | ), |
| | | startLocation: task.departureAddress || task.startLocation || "未设置", |
| | | endLocation: task.destinationAddress || task.endLocation || "未设置", |
| | | startTime: task.plannedStartTime |
| | | ? formatDateTime(task.plannedStartTime, "YYYY-MM-DD HH:mm") |
| | | : "未设置", |
| | |
| | | return address.substring(0, dashIndex); |
| | | } |
| | | return address; |
| | | }, |
| | | |
| | | // 获取出发地显示内容(转运任务显示转出医院名称) |
| | | getStartLocationDisplay(task) { |
| | | // 如果是转运任务且有emergencyInfo信息 |
| | | if (task.taskType === 'EMERGENCY_TRANSFER' && task.emergencyInfo && task.emergencyInfo.hospitalOutName) { |
| | | return task.emergencyInfo.hospitalOutName; |
| | | } |
| | | // 其他情况使用原来的startLocation |
| | | return this.formatAddress(task.startLocation || "未设置"); |
| | | }, |
| | | |
| | | // 获取目的地显示内容(转运任务显示转入医院名称或详细地址) |
| | | getEndLocationDisplay(task) { |
| | | // 如果是转运任务且有emergencyInfo信息 |
| | | if (task.taskType === 'EMERGENCY_TRANSFER' && task.emergencyInfo) { |
| | | // 优先显示转入医院名称 |
| | | if (task.emergencyInfo.hospitalInName) { |
| | | if(task.emergencyInfo.hospitalInName.includes("家中")){ |
| | | return task.emergencyInfo.destinationAddress; |
| | | } |
| | | return task.emergencyInfo.hospitalInName; |
| | | } |
| | | |
| | | } |
| | | // 其他情况使用原来的endLocation |
| | | return this.formatAddress(task.endLocation || "未设置"); |
| | | }, |
| | | |
| | | // 转换状态格式(将数据库状态转换为UI使用的状态) |
| | |
| | | * { |
| | | -ms-overflow-style: none; /* IE 10+ */ |
| | | } |
| | | } |
| | | |
| | | // 总部推送标记样式 |
| | | .head-push-tag { |
| | | color: #ff0000; |
| | | font-size: 24rpx; |
| | | font-weight: bold; |
| | | margin-left: 10rpx; |
| | | padding: 2rpx 8rpx; |
| | | border: 1rpx solid #ff0000; |
| | | border-radius: 4rpx; |
| | | } |
| | | |
| | | // 用户信息区域 |
| | |
| | | } |
| | | } |
| | | |
| | | // 任务编号单独一行 |
| | | // 任务编号和时间在同一行显示 |
| | | .task-code-row { |
| | | margin-bottom: 15rpx; |
| | | padding: 10rpx 0; |
| | | border-bottom: 1rpx dashed #e0e0e0; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .task-code { |
| | | font-size: 28rpx; |
| | | color: #333; |
| | | font-weight: 500; |
| | | font-family: monospace; |
| | | } |
| | | |
| | | .task-time { |
| | | font-size: 28rpx; |
| | | color: #333; |
| | | font-weight: 500; |
| | |
| | | color: #666; |
| | | } |
| | | } |
| | | |
| | | .vip-tag { |
| | | display: inline-block; |
| | | padding: 2rpx 8rpx; |
| | | font-size: 20rpx; |
| | | color: #fff; |
| | | background-color: #ff0000; |
| | | border-radius: 4rpx; |
| | | margin-left: 10rpx; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .hq-tag { |
| | | display: inline-block; |
| | | padding: 2rpx 8rpx; |
| | | font-size: 20rpx; |
| | | color: #fff; |
| | | background-color: #5856d6; |
| | | border-radius: 4rpx; |
| | | margin-left: 10rpx; |
| | | vertical-align: middle; |
| | | } |
| | | } |
| | | } |
| | | </style> |