Company overview
ФПК РЖД
Ultimul post: Fără date
- Posturi
- 0
- Interviuri
- 1
- Întrebări
- 18
- Sarcini
- 0
Published in the selected period
Posturi · 0
No vacancies were found for the selected period.
Published records
Interviuri · 1
Other direction
Interviuri · 1
Grouped by direction
Întrebări și sarcini · 18
Other direction
Întrebări · 18
<template> <h1>Secțiunea panourilor de bord</h1> <div class="dashboards-wrapper"> <button class="btn" v-for="(dashboard,ind) in dashboardArr" :key="ind" @click="switchDashboard(dashboard)"> {{ dashboard }} </button> </div> <div v-if="crntDashboard==='Panou de control al pasagerilor transportați'"> <passengers-dashboard :props="dataToDashboards"/> </div> <div v-else-if="crntDashboard==='Analiza trenurilor'"> <trains-dashboard :props="dataToDashboards"/> </div> <div v-else-if="crntDashboard==='Monitorizarea pisicilor transportate'"> <cats-dashboard :props="dataToDashboards"/> </div> </template> <script setup> const dashboardArr = ['Panou de control al pasagerilor transportați', 'Analiza trenurilor', 'Monitorizarea pisicilor transportate'] const crntDashboard = ref('') function switchDashboard(dashboardName) { crntDashboard.value = dashboardName switch (dashboardName) { case 'Panou de control al pasagerilor transportați': dataToDashboards.value = getDataToPassengers() break case 'Analiza trenurilor': dataToDashboards.value = getDataToTrains() break case 'Monitorizarea pisicilor transportate': dataToDashboards.value = getDataToCats() break } } const dataToDashboards = ref() async function getDataToPassengers() { const _data = await $fetch(`/app/passengers`) return _data } async function getDataToTrains() { const _data = await $fetch(`/app/trains`) return _data } async function getDataToCats() { const _data = await $fetch(`/app/cats`) return _data } </script>