This commit is contained in:
wintsa committed 2026-03-19 21:24:34 +08:00
1 parent 59bab33e9b
commit 35670bb276
2 files changed
+19 -6

No files matched your search

+18 -5
View File
@@ -1,4 +1,4 @@
<script setup lang="ts">
<script setup lang="ts">
import { computed, defineComponent, h, nextTick, onActivated, onMounted, ref, shallowRef, watch, type PropType } from 'vue'
import { AgGridVue } from 'ag-grid-vue3'
import type { ColDef, FirstDataRenderedEvent, GridApi, GridOptions, GridReadyEvent, ICellRendererParams, RowDataUpdatedEvent } from 'ag-grid-community'
@@ -329,7 +329,10 @@ const columnDefs: ColDef<SummaryRow>[] = [
if (params.data.rowType === 'additional' || params.data.rowType === 'reserve') return 5
return 1
},
valueFormatter: params => (params.value == null ? '' : formatThousandsFlexible(params.value, 3))
valueFormatter: params => {
if (params.data?.rowType === 'total') return ''
return params.value == null ? '' : formatThousandsFlexible(params.value, 3)
}
},
{
headerName: '用地规模法',
@@ -338,7 +341,10 @@ const columnDefs: ColDef<SummaryRow>[] = [
flex: 1.2,
headerClass: 'ag-right-aligned-header',
cellClass: 'ag-right-aligned-cell',
valueFormatter: params => (params.value == null ? '' : formatThousandsFlexible(params.value, 3))
valueFormatter: params => {
if (params.data?.rowType === 'total') return ''
return params.value == null ? '' : formatThousandsFlexible(params.value, 3)
}
},
{
headerName: '工作量法',
@@ -347,7 +353,10 @@ const columnDefs: ColDef<SummaryRow>[] = [
flex: 1.2,
headerClass: 'ag-right-aligned-header',
cellClass: 'ag-right-aligned-cell',
valueFormatter: params => (params.value == null ? '' : formatThousandsFlexible(params.value, 3))
valueFormatter: params => {
if (params.data?.rowType === 'total') return ''
return params.value == null ? '' : formatThousandsFlexible(params.value, 3)
}
},
{
headerName: '工时法',
@@ -356,7 +365,10 @@ const columnDefs: ColDef<SummaryRow>[] = [
flex: 1.2,
headerClass: 'ag-right-aligned-header',
cellClass: 'ag-right-aligned-cell',
valueFormatter: params => (params.value == null ? '' : formatThousandsFlexible(params.value, 3))
valueFormatter: params => {
if (params.data?.rowType === 'total') return ''
return params.value == null ? '' : formatThousandsFlexible(params.value, 3)
}
},
{
headerName: '小计',
@@ -483,3 +495,4 @@ onActivated(() => {
background: color-mix(in oklab, var(--muted) 45%, transparent);
}
</style>