| | |
| | | const chargingColumns = [ |
| | | { title: '序号', key: 'index', align: 'left' as const, width: 80, render: (row: any, index: number) => (chargingPage.value.pageNum - 1) * chargingPage.value.pageSize + index + 1 }, |
| | | { title: '记录时间', key: 'operationTime', align: 'left' as const, width: 180, render: (row: any) => row.operationTime ? dayjs(row.operationTime).format('YYYY/MM/DD HH:mm:ss') : '-' }, |
| | | { title: '充电前剩余电量', key: 'startRemainingBattery', align: 'left' as const, width: 160, render: (row: any) => row.startRemainingBattery ? `${row.startRemainingBattery}%` : '-' }, |
| | | { title: '充电前剩余电量', key: 'startRemainingBattery', align: 'left' as const, width: 160, |
| | | render: (row: any) =>( |
| | | <div class="flex items-center gap-4px"> |
| | | <n-image |
| | | src="/src/assets/element-img/power.png" |
| | | style="width:25px;height:12px" |
| | | /> |
| | | <span style="color:#E85050;font-size: 11px;">{row.startRemainingBattery ?? "0"} km</span> |
| | | </div> |
| | | ) |
| | | }, |
| | | { title: '图片', key: 'startChargingPicture', align: 'left' as const, width: 140, render: (row: any) => renderImageCell(row.startChargingPicture) }, |
| | | { title: '充电后剩余电量', key: 'endRemainingBattery', align: 'left' as const, width: 160, render: (row: any) => row.endRemainingBattery ? `${row.endRemainingBattery}%` : '-' }, |
| | | { title: '充电后剩余电量', key: 'endRemainingBattery', align: 'left' as const, width: 160, |
| | | render: (row: any) => ( |
| | | row.endRemainingBattery ? <div class="flex items-center gap-4px"> |
| | | <n-image |
| | | src="/src/assets/element-img/powered.png" |
| | | style="width:25px;height:12px" |
| | | /> |
| | | <span style="color:#06B752;font-size: 11px;">{row.endRemainingBattery ?? "0"} km</span> |
| | | </div> : '-' |
| | | ) |
| | | }, |
| | | { title: '图片', key: 'endChargingPicture', align: 'left' as const, width: 140, render: (row: any) => renderImageCell(row.endChargingPicture) }, |
| | | { title: '充电时间', key: 'chargingTime', align: 'left' as const, width: 240, render: (row: any) => |
| | | ( |
| | |
| | | <NTabs v-model:value="activeTab" type="line" animated> |
| | | <!-- 年检记录 --> |
| | | <NTabPane name="inspection" tab="年检记录" class="h-full flex-1"> |
| | | <div class="flex flex-col h-full" > |
| | | <div class="flex flex-col h-full"> |
| | | <!-- 搜索区域 --> |
| | | <NCard :bordered="false" class="search-form-card"> |
| | | <NForm |
| | |
| | | :data="inspectionRecords" |
| | | :loading="loading" |
| | | class="flex-1" |
| | | flex-height |
| | | :scroll-x="inspectionScrollX" |
| | | striped |
| | | > |
| | |
| | | |
| | | <!-- 整备记录 --> |
| | | <NTabPane name="preparation" tab="整备记录" class="h-full flex-1"> |
| | | <div class="flex flex-col h-full" > |
| | | <div class="flex flex-col h-full"> |
| | | <!-- 搜索区域 --> |
| | | <NCard :bordered="false" class="search-form-card"> |
| | | <NForm |
| | |
| | | :columns="preparationColumns" |
| | | :data="preparationRecords" |
| | | :loading="loading" |
| | | class="flex-1" |
| | | flex-height |
| | | :scroll-x="preparationScrollX" |
| | | striped |
| | | > |
| | |
| | | </NTabPane> |
| | | <!-- 车辆清洁 --> |
| | | <NTabPane name="clean" tab="车辆清洁" class="h-full flex-1"> |
| | | <div class="flex flex-col h-full" > |
| | | <div class="flex flex-col h-full"> |
| | | <!-- 搜索区域 --> |
| | | <NCard :bordered="false" class="search-form-card"> |
| | | <NForm |
| | |
| | | :data="cleanRecords" |
| | | :loading="loading" |
| | | class="flex-1" |
| | | flex-height |
| | | :scroll-x="cleanScrollX" |
| | | striped |
| | | > |
| | |
| | | |
| | | <!-- 充电记录 --> |
| | | <NTabPane name="charging" tab="充电记录" class="h-full flex-1"> |
| | | <div class="flex flex-col h-full" > |
| | | <div class="flex flex-col h-full"> |
| | | <!-- 搜索区域 --> |
| | | <NCard :bordered="false" class="search-form-card"> |
| | | <NForm |
| | |
| | | :data="chargingRecords" |
| | | :loading="loading" |
| | | class="flex-1" |
| | | flex-height |
| | | :scroll-x="chargingScrollX" |
| | | striped |
| | | > |
| | |
| | | |
| | | <!-- 检测记录 --> |
| | | <NTabPane name="detection" tab="检测记录" class="h-full flex-1"> |
| | | <div class="flex flex-col h-full" > |
| | | <div class="flex flex-col h-full"> |
| | | <NCard :bordered="false" class="search-form-card"> |
| | | <NForm |
| | | inline |
| | |
| | | :data="detectionRecords" |
| | | :loading="loading" |
| | | class="flex-1" |
| | | flex-height |
| | | :scroll-x="detectionScrollX" |
| | | striped |
| | | > |
| | |
| | | |
| | | <!-- 维修记录 --> |
| | | <NTabPane name="maintenance" tab="维修记录" class="h-full flex-1"> |
| | | <div class="flex flex-col h-full" > |
| | | <div class="flex flex-col h-full"> |
| | | <NCard :bordered="false" class="search-form-card"> |
| | | <NForm |
| | | inline |
| | |
| | | :data="maintenanceRecords" |
| | | :loading="loading" |
| | | class="flex-1" |
| | | flex-height |
| | | :scroll-x="maintenanceScrollX" |
| | | striped |
| | | > |
| | |
| | | /> |
| | | </div> |
| | | </NTabPane> |
| | | |
| | | |
| | | <!-- 任务/事故记录 --> |
| | | <NTabPane name="task" tab="任务/事故记录" class="h-full flex-1"> |
| | | <div class="flex flex-col h-full" > |
| | | <div class="flex flex-col h-full"> |
| | | <NCard :bordered="false" class="search-form-card"> |
| | | <NForm |
| | | inline |
| | |
| | | :data="taskRecords" |
| | | :loading="loading" |
| | | class="flex-1" |
| | | flex-height |
| | | :scroll-x="taskScrollX" |
| | | striped |
| | | > |
| | |
| | | align-items: center; |
| | | font-size: 13px; |
| | | |
| | | |
| | | .detail-label { |
| | | color: rgba(23, 31, 38, 0.6); |
| | | font-size: 13px; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | .n-tabs{ |
| | | .n-tabs { |
| | | height: 100%; |
| | | display: flex; |
| | | } |
| | | ::v-deep .n-tabs-pane-wrapper{ |
| | | ::v-deep .n-tabs-pane-wrapper { |
| | | flex: 1; |
| | | } |
| | | </style> |