| | |
| | | import { createBasStationAreaTableColumns } from './basStationAreaTable.columns' |
| | | import { |
| | | BAS_STATION_AREA_REPORT_STYLE, |
| | | BAS_STATION_AREA_REPORT_TITLE, |
| | | buildBasStationAreaDialogModel, |
| | | buildBasStationAreaPageQueryParams, |
| | | buildBasStationAreaPrintRows, |
| | |
| | | createBasStationAreaSearchState, |
| | | getBasStationAreaBinaryOptions, |
| | | getBasStationAreaPaginationKey, |
| | | getBasStationAreaReportTitle, |
| | | getBasStationAreaStatusOptions, |
| | | getBasStationAreaTypeOptions, |
| | | normalizeBasStationAreaDetailRecord, |
| | |
| | | const typeLabelMap = computed( |
| | | () => |
| | | new Map( |
| | | getBasStationAreaTypeOptions() |
| | | getBasStationAreaTypeOptions(t) |
| | | .map((item) => [String(item.value), item.label]) |
| | | .filter(([value, label]) => value && label) |
| | | ) |
| | |
| | | const resolveTypeLabel = (value) => typeLabelMap.value.get(String(value)) || '' |
| | | const resolveStationAliasLabel = (id) => stationLabelMap.value.get(String(id)) || '' |
| | | const resolveUseStatusLabel = (value) => useStatusLabelMap.value.get(String(value)) || '' |
| | | const reportTitle = BAS_STATION_AREA_REPORT_TITLE |
| | | const reportTitle = computed(() => getBasStationAreaReportTitle(t)) |
| | | const reportQueryParams = computed(() => buildBasStationAreaSearchParams(searchForm.value)) |
| | | |
| | | const searchItems = computed(() => [ |
| | |
| | | type: 'select', |
| | | props: { |
| | | clearable: true, |
| | | options: getBasStationAreaTypeOptions() |
| | | options: getBasStationAreaTypeOptions(t) |
| | | } |
| | | }, |
| | | { |
| | |
| | | type: 'select', |
| | | props: { |
| | | clearable: true, |
| | | options: getBasStationAreaStatusOptions() |
| | | options: getBasStationAreaStatusOptions(t) |
| | | } |
| | | }, |
| | | { |
| | |
| | | } |
| | | ) |
| | | detailData.value = normalizeBasStationAreaDetailRecord(detail, { |
| | | t, |
| | | resolveAreaLabel, |
| | | resolveCrossZoneAreaLabel, |
| | | resolveContainerTypeLabel, |
| | |
| | | paginationKey: getBasStationAreaPaginationKey(), |
| | | columnsFactory: () => |
| | | createBasStationAreaTableColumns({ |
| | | t, |
| | | handleView: openDetail, |
| | | handleEdit: hasAuth('update') ? openEditDialog : null, |
| | | handleDelete: hasAuth('delete') ? (row) => handleDeleteAction?.(row) : null, |
| | |
| | | } |
| | | return records.map((item) => |
| | | normalizeBasStationAreaListRow(item, { |
| | | t, |
| | | resolveAreaLabel, |
| | | resolveCrossZoneAreaLabel, |
| | | resolveContainerTypeLabel, |
| | |
| | | resolvePrintRecords, |
| | | buildPreviewRows: (records) => |
| | | buildBasStationAreaPrintRows(records, { |
| | | t, |
| | | resolveAreaLabel, |
| | | resolveCrossZoneAreaLabel, |
| | | resolveContainerTypeLabel, |
| | |
| | | buildBasStationAreaReportMeta({ |
| | | previewMeta: previewMeta.value, |
| | | count: previewRows.value.length, |
| | | orientation: previewMeta.value?.reportStyle?.orientation || BAS_STATION_AREA_REPORT_STYLE.orientation |
| | | orientation: previewMeta.value?.reportStyle?.orientation || BAS_STATION_AREA_REPORT_STYLE.orientation, |
| | | t |
| | | }) |
| | | ) |
| | | |