修改界面
This commit is contained in:
1 parent
6fdf336b9e
commit
bbc9ad13fe
13 files changed
+1056
-112
No files matched your search
@@ -46,6 +46,16 @@ interface ServiceItem {
|
||||
type: ServiceMethodType
|
||||
}
|
||||
|
||||
const SERVICE_SELECTOR_ROWS: string[][] = [
|
||||
['0', '2', '3', '4'],
|
||||
['6', '7', '10', '8', '9', '11', '12', '13'],
|
||||
['37', '38', '39', '40'],
|
||||
['21', '22', '23', '24', '25', '26'],
|
||||
['15', '16', '17', '18', '19', '20'],
|
||||
['29', '30', '31', '32', '33', '34', '35', '36'],
|
||||
['41', '42', '43', '44']
|
||||
]
|
||||
|
||||
interface DetailRow {
|
||||
id: string
|
||||
code: string
|
||||
@@ -162,6 +172,12 @@ const serviceDict = computed<ServiceItem[]>(() => {
|
||||
const serviceById = computed(() => new Map(serviceDict.value.map(item => [item.id, item])))
|
||||
const serviceIdByCode = computed(() => new Map(serviceDict.value.map(item => [item.code, item.id])))
|
||||
const serviceIdSignature = computed(() => serviceDict.value.map(item => item.id).join('|'))
|
||||
const serviceSelectorRows = computed(() => {
|
||||
const available = new Set(serviceDict.value.map(item => item.id))
|
||||
return SERVICE_SELECTOR_ROWS
|
||||
.map(row => row.filter(id => available.has(id)))
|
||||
.filter(row => row.length > 0)
|
||||
})
|
||||
const fixedBudgetRow: Pick<DetailRow, 'id' | 'code' | 'name'> = { id: 'fixed-budget-c', code: '', name: t('htZxFw.subtotal') }
|
||||
|
||||
/** 判断是否固定汇总行(小计行)。 */
|
||||
@@ -1276,7 +1292,7 @@ onActivated(async () => {
|
||||
<template>
|
||||
<TooltipProvider>
|
||||
<div class="h-full min-h-0 flex flex-col gap-2">
|
||||
<ServiceCheckboxSelector :services="serviceDict" :model-value="selectedIds"
|
||||
<ServiceCheckboxSelector :services="serviceDict" :service-rows="serviceSelectorRows" :model-value="selectedIds"
|
||||
@update:model-value="handleServiceSelectionChange" />
|
||||
|
||||
<div class="rounded-lg border bg-card xmMx flex min-h-0 flex-1 flex-col overflow-hidden">
|
||||
|
||||
Reference in new issue
Block a user