|
|
@@ -66,6 +66,7 @@
|
|
|
:cell-class-name="cellClassName"
|
|
|
:max-height="420"
|
|
|
scrollbar-always-on
|
|
|
+ :cell-style="cellStyle"
|
|
|
>
|
|
|
<!-- 添加序号列 -->
|
|
|
<el-table-column
|
|
|
@@ -672,6 +673,16 @@ const pagedList = computed(() => {
|
|
|
// return list.value.slice(start, end)
|
|
|
})
|
|
|
|
|
|
+const cellStyle = ({ row, column }: any) => {
|
|
|
+ if (['remainH', 'remainKm', 'remainDay'].includes(column.property)) {
|
|
|
+ if (row[column.property] < 0) {
|
|
|
+ return {
|
|
|
+ color: 'var(--el-color-danger)'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// 处理页码变化
|
|
|
const handlePageChange = (page: number) => {
|
|
|
currentPage.value = page
|
|
|
@@ -1939,7 +1950,7 @@ el-table {
|
|
|
background-color: var(--el-table-current-row-bg-color) !important;
|
|
|
}
|
|
|
|
|
|
- .all-filled{
|
|
|
+ .all-filled {
|
|
|
background-color: #67c23a !important;
|
|
|
}
|
|
|
}
|