layout01.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <div class="dash--board--contents type1">
  3. <!-- CORE -->
  4. <div>
  5. <Core12x14
  6. :config="coreConfig"
  7. :interval-time="props.intervalTime"
  8. />
  9. </div>
  10. <!-- USER -->
  11. <div>
  12. <User12x10
  13. :config="userConfig"
  14. :interval-time="props.intervalTime"
  15. />
  16. </div>
  17. <!-- RAN -->
  18. <div>
  19. <Ran12x24
  20. :config="raneConfig"
  21. :interval-time="props.intervalTime"
  22. />
  23. </div>
  24. </div>
  25. </template>
  26. <script setup>
  27. import { useI18n } from 'vue-i18n';
  28. import Core12x14 from '@/components/home/dashboard/layout01/core/layout01Core.vue'
  29. import User12x10 from '@/components/home/dashboard/layout01/user/layout01User.vue'
  30. import Ran12x24 from '@/components/home/dashboard/layout01/ran/layout01Ran.vue'
  31. /***********************
  32. * plugins inject
  33. ************************/
  34. const {$toast, $log, $dayjs, $eventBus } = useNuxtApp()
  35. const i18n = useI18n()
  36. // props
  37. const props = defineProps({
  38. intervalTime: {
  39. type: Number,
  40. default: 5000
  41. }
  42. })
  43. /***********************
  44. * data & created
  45. ************************/
  46. const widgets = computed(() => useAuthStore().getWidgets);
  47. const coreConfig = computed(() => widgets.value?.find(w => w.widgetGrp == 'CORE'));
  48. const userConfig = computed(() => widgets.value?.find(w => w.widgetGrp == 'USER'));
  49. const raneConfig = computed(() => widgets.value?.find(w => w.widgetGrp == 'RANE'));
  50. /***********************
  51. * Methods
  52. ************************/
  53. </script>