| | |
| | | :tableData="tableData" |
| | | :page="page" |
| | | :tableLoading="tableLoading" |
| | | :row-class-name="tableRowClassName" |
| | | @pagination="pagination"> |
| | | <template #completionStatus="{ row }"> |
| | | <el-progress :percentage="toProgressPercentage(row?.completionStatus)" |
| | |
| | | </template> |
| | | <template #todayReportState="{ row }"> |
| | | {{ formatTodayReportState(row?.todayReportState) }} |
| | | </template> |
| | | <template #totalReportDurationMinutes="{ row }"> |
| | | {{ formatDurationHours(row?.totalReportDurationMinutes) }} |
| | | </template> |
| | | </PIMTable> |
| | | </div> |
| | |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "系统核算时间(小时)", |
| | | prop: "totalReportDurationMinutes", |
| | | dataType: "slot", |
| | | slot: "totalReportDurationMinutes", |
| | | width: "160", |
| | | }, |
| | | { |
| | | label: "计划开始时间", |
| | | prop: "planStartTime", |
| | | width: "140", |
| | |
| | | if (state === 2) return "已开始"; |
| | | if (state === 3) return "已结束"; |
| | | return "-"; |
| | | }; |
| | | const formatDurationHours = val => { |
| | | const minutes = Number(val); |
| | | if (!Number.isFinite(minutes) || minutes < 0) return "-"; |
| | | return (minutes / 60).toFixed(2); |
| | | }; |
| | | const tableRowClassName = ({ row }) => { |
| | | const state = Number(row?.todayReportState); |
| | | if (state === 1) return "today-report-not-started"; |
| | | if (state === 2) return "today-report-started"; |
| | | if (state === 3) return "today-report-ended"; |
| | | return ""; |
| | | }; |
| | | |
| | | // 查询列表 |
| | |
| | | text-align: center; |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | :deep(.el-table .today-report-not-started > td) { |
| | | background-color: #fff7e6 !important; |
| | | } |
| | | |
| | | :deep(.el-table .today-report-started > td) { |
| | | background-color: #ecf5ff !important; |
| | | } |
| | | |
| | | :deep(.el-table .today-report-ended > td) { |
| | | background-color: #f0f9eb !important; |
| | | } |
| | | </style> |
| | | |
| | | <style lang="scss"> |