fix(web-admin): put trip driver/escort on vehicle summary row

Merge「本次安排」into PlVehicleSummaryStrip instead of a separate
row above the vehicle info strip.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-09-13 12:29:47 +08:00
1 parent c580bdf03f
commit 499896b29c
3 files changed
+37 -61

No files matched your search

@@ -57,27 +57,15 @@
</div>
</div>
<div
v-if="showTripPersonnelRow"
class="pl-plan-trip-personnel pl-plan-transport-block"
>
<span class="pl-plan-trip-personnel__label">本次安排</span>
<span class="pl-plan-trip-personnel__item">
<el-tag type="primary" size="small">司机</el-tag>
<span class="pl-plan-trip-personnel__value">{{ tripDriverDisplay }}</span>
</span>
<span class="pl-plan-trip-personnel__item">
<el-tag type="warning" size="small">押运员</el-tag>
<span class="pl-plan-trip-personnel__value">{{ tripEscortDisplay }}</span>
</span>
</div>
<PlVehicleSummaryStrip
v-if="vehicleBundle"
class="pl-plan-transport-block"
:detail="vehicleBundle.detail"
:personnel-list="vehicleBundle.personnelList"
:carrier-name="summaryCarrierName"
:show-trip-personnel="showTripPersonnelRow"
:trip-driver-display="tripDriverDisplay"
:trip-escort-display="tripEscortDisplay"
@view="vehicleViewVisible = true"
/>
<p v-else-if="!loading" class="pl-plan-form-empty-hint">暂无车辆信息</p>
@@ -1660,35 +1648,6 @@
}
}
.pl-plan-trip-personnel {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 10px 16px;
padding: 10px 12px;
border: 1px solid #a7f3d0;
border-radius: 8px;
background: #ecfdf5;
}
.pl-plan-trip-personnel__label {
font-size: 12px;
font-weight: 600;
color: #047857;
}
.pl-plan-trip-personnel__item {
display: inline-flex;
align-items: center;
gap: 6px;
min-width: 0;
}
.pl-plan-trip-personnel__value {
font-size: 13px;
color: #1e293b;
}
.pl-plan-view-stop-block {
display: flex;
flex-direction: column;
@@ -21,18 +21,30 @@
<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: ''
}
)