|
|
@@ -21,19 +21,31 @@
|
|
|
<span class="pl-vehicle-summary-divider" aria-hidden="true" />
|
|
|
|
|
|
<div class="pl-vehicle-summary-group">
|
|
|
- <span class="pl-vehicle-summary-label">人员</span>
|
|
|
- <span v-if="!personnelList.length" class="pl-vehicle-summary-value muted">暂无关联人员</span>
|
|
|
- <template v-else>
|
|
|
- <span
|
|
|
- v-for="(person, index) in personnelList"
|
|
|
- :key="person.personnelId || `${person.personnelName}-${index}`"
|
|
|
- class="pl-vehicle-summary-person"
|
|
|
- >
|
|
|
- <el-tag :type="getRoleTagType(person.role)" size="small">{{ getRoleLabel(person.role) }}</el-tag>
|
|
|
- <span class="pl-vehicle-summary-value">{{ person.personnelName || '—' }}</span>
|
|
|
- <span v-if="person.phoneNo" class="pl-vehicle-summary-value muted">{{ person.phoneNo }}</span>
|
|
|
+ <span class="pl-vehicle-summary-label">{{ showTripPersonnel ? '本次安排' : '人员' }}</span>
|
|
|
+ <template v-if="showTripPersonnel">
|
|
|
+ <span class="pl-vehicle-summary-person">
|
|
|
+ <el-tag type="primary" size="small">司机</el-tag>
|
|
|
+ <span class="pl-vehicle-summary-value">{{ tripDriverDisplay || '—' }}</span>
|
|
|
+ </span>
|
|
|
+ <span class="pl-vehicle-summary-person">
|
|
|
+ <el-tag type="warning" size="small">押运员</el-tag>
|
|
|
+ <span class="pl-vehicle-summary-value">{{ tripEscortDisplay || '—' }}</span>
|
|
|
</span>
|
|
|
</template>
|
|
|
+ <template v-else>
|
|
|
+ <span v-if="!personnelList.length" class="pl-vehicle-summary-value muted">暂无关联人员</span>
|
|
|
+ <template v-else>
|
|
|
+ <span
|
|
|
+ v-for="(person, index) in personnelList"
|
|
|
+ :key="person.personnelId || `${person.personnelName}-${index}`"
|
|
|
+ class="pl-vehicle-summary-person"
|
|
|
+ >
|
|
|
+ <el-tag :type="getRoleTagType(person.role)" size="small">{{ getRoleLabel(person.role) }}</el-tag>
|
|
|
+ <span class="pl-vehicle-summary-value">{{ person.personnelName || '—' }}</span>
|
|
|
+ <span v-if="person.phoneNo" class="pl-vehicle-summary-value muted">{{ person.phoneNo }}</span>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -55,9 +67,16 @@ const props = withDefaults(
|
|
|
personnelList?: VehiclePersonnelViewRow[]
|
|
|
/** 展示用承运商名称,优先于 detail.carrierName */
|
|
|
carrierName?: string
|
|
|
+ /** 为 true 时人员区展示本次司机/押运,不再列车辆关联全员 */
|
|
|
+ showTripPersonnel?: boolean
|
|
|
+ tripDriverDisplay?: string
|
|
|
+ tripEscortDisplay?: string
|
|
|
}>(),
|
|
|
{
|
|
|
- personnelList: () => []
|
|
|
+ personnelList: () => [],
|
|
|
+ showTripPersonnel: false,
|
|
|
+ tripDriverDisplay: '',
|
|
|
+ tripEscortDisplay: ''
|
|
|
}
|
|
|
)
|
|
|
|