From 38d284031252a9f4eea353a59a234452dadd09a6 Mon Sep 17 00:00:00 2001 From: "alexander.kerscher" Date: Wed, 6 Mar 2024 07:42:27 +0100 Subject: [PATCH 01/33] Options beim Laden der Daten uebergeben --- .../src/api/service/LadeMessdatenService.ts | 33 +++---------------- .../messstelle/charts/MessstelleDiagramme.vue | 14 +++++++- .../panels/ZeitauswahlRadiogroup.vue | 9 +++++ 3 files changed, 27 insertions(+), 29 deletions(-) diff --git a/frontend/src/api/service/LadeMessdatenService.ts b/frontend/src/api/service/LadeMessdatenService.ts index 20cf1315..4162d51c 100644 --- a/frontend/src/api/service/LadeMessdatenService.ts +++ b/frontend/src/api/service/LadeMessdatenService.ts @@ -1,8 +1,6 @@ import FetchService from "@/api/service/FetchService"; -import LadeBelastungsplanDTO from "@/types/zaehlung/zaehldaten/LadeBelastungsplanDTO"; -import OptionsDTO from "@/types/zaehlung/OptionsDTO"; import LadeProcessedZaehldatenDTO from "@/types/zaehlung/zaehldaten/LadeProcessedZaehldatenDTO"; -import LadeZaehldatenZeitreiheDTO from "@/types/zaehlung/zaehldaten/LadeZaehldatenZeitreiheDTO"; +import MessstelleOptionsDTO from "@/types/messstelle/MessstelleOptionsDTO"; export default class LadeMessdatenService { private static readonly ENDPOINT_LADE_MESSDATEN_PROCESSED: string = @@ -15,34 +13,13 @@ export default class LadeMessdatenService { "api/dave-backend-service/lade-zeitreihe"; public static ladeMessdatenProcessed( - messstelleId: string + messstelleId: string, + options: MessstelleOptionsDTO ): Promise { - return FetchService.getData( - `${this.ENDPOINT_LADE_MESSDATEN_PROCESSED}?messstelle_id=${messstelleId}`, - "Beim Laden der aufbreiteteten Messdaten ist ein Fehler aufgetreten." - ); - } - - public static ladeBelastungsplan( - id: string, - options: OptionsDTO - ): Promise { - return FetchService.postData( - options, - `${this.ENDPOINT_LADE_BELSTUNGSPLAN}?zaehlung_id=${id}`, - "Beim Laden der Daten für den Belastungsplan ist ein Fehler aufgetreten." - ); - } - - public static ladeZeitreihe( - zaehlstelleId: string, - zaehlungId: string, - options: OptionsDTO - ): Promise { return FetchService.postData( options, - `${this.ENDPOINT_LADE_ZEITREIHE}?zaehlstelle_id=${zaehlstelleId}&zaehlung_id=${zaehlungId}`, - "Beim Laden der Daten für die Zeitreihe ist ein Fehler aufgetreten." + `${this.ENDPOINT_LADE_MESSDATEN_PROCESSED}?messstelle_id=${messstelleId}`, + "Beim Laden der aufbreiteteten Messdaten ist ein Fehler aufgetreten." ); } } diff --git a/frontend/src/components/messstelle/charts/MessstelleDiagramme.vue b/frontend/src/components/messstelle/charts/MessstelleDiagramme.vue index f29964cc..64527e17 100644 --- a/frontend/src/components/messstelle/charts/MessstelleDiagramme.vue +++ b/frontend/src/components/messstelle/charts/MessstelleDiagramme.vue @@ -139,6 +139,7 @@ import { useReportTools } from "@/util/reportTools"; import LadeZaehldatenHeatmapDTO from "@/types/zaehlung/zaehldaten/LadeZaehldatenHeatmapDTO"; import LadeZaehldatumDTO from "@/types/zaehlung/zaehldaten/LadeZaehldatumDTO"; import MesswerteListenausgabe from "@/components/messstelle/charts/MesswerteListenausgabe.vue"; +import MessstelleOptionsDTO from "@/types/messstelle/MessstelleOptionsDTO"; // Refactoring: Synergieeffekt mit ZaehldatenDiagramme nutzen @@ -196,6 +197,10 @@ const messstelleId: ComputedRef = computed(() => { return route.params.messstelleId; }); +const options: ComputedRef = computed(() => { + return store.getters["filteroptionsMessstelle/getFilteroptions"]; +}); + watch(activeTab, (active) => { store.dispatch("messstelleInfo/setActiveTab", active); isTabListenausgabe.value = TAB_LISTENAUSGABE === activeTab.value; @@ -207,6 +212,10 @@ watch(activeTab, (active) => { ].includes(activeTab.value); }); +watch(options, () => { + loadData(); +}); + /** * Die Requests für alle Diagramme werden abgesetzt. */ @@ -216,7 +225,10 @@ function loadData() { function loadProcessedChartData() { chartDataLoading.value = true; - LadeMessdatenService.ladeMessdatenProcessed(messstelleId.value) + LadeMessdatenService.ladeMessdatenProcessed( + messstelleId.value, + options.value + ) .then((processedZaehldaten: LadeProcessedZaehldatenDTO) => { zaehldatenSteplineDTO.value = processedZaehldaten.zaehldatenStepline; diff --git a/frontend/src/components/messstelle/optionsmenue/panels/ZeitauswahlRadiogroup.vue b/frontend/src/components/messstelle/optionsmenue/panels/ZeitauswahlRadiogroup.vue index 0776d853..8af8d060 100644 --- a/frontend/src/components/messstelle/optionsmenue/panels/ZeitauswahlRadiogroup.vue +++ b/frontend/src/components/messstelle/optionsmenue/panels/ZeitauswahlRadiogroup.vue @@ -19,6 +19,7 @@ { } return ""; }); + +function zeitauswahlChanged() { + if (chosenOptionsCopy.value.zeitauswahl === Zeitauswahl.TAGESWERT) { + chosenOptionsCopy.value.zeitblock = Zeitblock.ZB_00_24; + } +} \ No newline at end of file From a6f897f79f6a986b2e32779e4e3e6341a1eb765d Mon Sep 17 00:00:00 2001 From: "alexander.kerscher" Date: Wed, 6 Mar 2024 07:43:04 +0100 Subject: [PATCH 02/33] Options beim Laden der Daten uebergeben --- frontend/src/api/service/LadeMessdatenService.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/frontend/src/api/service/LadeMessdatenService.ts b/frontend/src/api/service/LadeMessdatenService.ts index 4162d51c..5a92b74c 100644 --- a/frontend/src/api/service/LadeMessdatenService.ts +++ b/frontend/src/api/service/LadeMessdatenService.ts @@ -6,12 +6,6 @@ export default class LadeMessdatenService { private static readonly ENDPOINT_LADE_MESSDATEN_PROCESSED: string = "api/dave-backend-service/lade-messwerte"; - private static readonly ENDPOINT_LADE_BELSTUNGSPLAN: string = - "api/dave-backend-service/lade-belastungsplan"; - - private static readonly ENDPOINT_LADE_ZEITREIHE: string = - "api/dave-backend-service/lade-zeitreihe"; - public static ladeMessdatenProcessed( messstelleId: string, options: MessstelleOptionsDTO From a0bfd1aa0b1973519f8d05c92805a60d89ae26d8 Mon Sep 17 00:00:00 2001 From: "alexander.kerscher" Date: Wed, 6 Mar 2024 14:06:36 +0100 Subject: [PATCH 03/33] default angepasst --- .../messstelle/optionsmenue/OptionsmenueMessstelle.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/messstelle/optionsmenue/OptionsmenueMessstelle.vue b/frontend/src/components/messstelle/optionsmenue/OptionsmenueMessstelle.vue index 8ed241cd..13702f0c 100644 --- a/frontend/src/components/messstelle/optionsmenue/OptionsmenueMessstelle.vue +++ b/frontend/src/components/messstelle/optionsmenue/OptionsmenueMessstelle.vue @@ -156,7 +156,7 @@ function setDefaultOptionsForMessstelle(): void { ); } chosenOptions.value.intervall = ZaehldatenIntervall.STUNDE_KOMPLETT; - chosenOptions.value.zeitblock = Zeitblock.ZB_06_10; + chosenOptions.value.zeitblock = Zeitblock.ZB_00_24; chosenOptions.value.zeitauswahl = Zeitauswahl.TAGESWERT; chosenOptions.value.tagesTyp = ""; saveChosenOptions(); From d7d7e1b7a7fafdc511ee97bccccd930c2ac6b47b Mon Sep 17 00:00:00 2001 From: "alexander.kerscher" Date: Thu, 7 Mar 2024 15:36:25 +0100 Subject: [PATCH 04/33] default angepasst --- .../messstelle/charts/MessstelleDiagramme.vue | 15 ++------ .../optionsmenue/OptionsmenueMessstelle.vue | 26 +++++++++++--- .../panels/TagesTypRadiogroup.vue | 34 ++++++++++++++----- .../panels/ZeitauswahlRadiogroup.vue | 19 +++++++---- .../panels/ZeitauswahlStundeOrBlock.vue | 10 +----- .../store/modules/filteroptionsMessstelle.ts | 3 +- 6 files changed, 65 insertions(+), 42 deletions(-) diff --git a/frontend/src/components/messstelle/charts/MessstelleDiagramme.vue b/frontend/src/components/messstelle/charts/MessstelleDiagramme.vue index 64527e17..0c82b403 100644 --- a/frontend/src/components/messstelle/charts/MessstelleDiagramme.vue +++ b/frontend/src/components/messstelle/charts/MessstelleDiagramme.vue @@ -123,7 +123,7 @@