layout02.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <div class="dash--board--contents type2">
  3. <!-- CORE -->
  4. <div>
  5. <Core12x12
  6. :config="coreConfig"
  7. :interval-time="props.intervalTime"
  8. />
  9. </div>
  10. <!-- USER -->
  11. <div>
  12. <User12x12
  13. :config="userConfig"
  14. :interval-time="props.intervalTime"
  15. />
  16. </div>
  17. <!-- RAN -->
  18. <div>
  19. <Ran24x12
  20. :config="raneConfig"
  21. :interval-time="props.intervalTime"
  22. />
  23. </div>
  24. </div>
  25. </template>
  26. <script setup>
  27. /***********************
  28. * import
  29. ************************/
  30. import { useI18n } from "vue-i18n"
  31. import Core12x12 from '@/components/home/dashboard/layout02/core/layout02Core.vue'
  32. import User12x12 from '@/components/home/dashboard/layout02/user/layout02User.vue'
  33. import Ran24x12 from '@/components/home/dashboard/layout02/ran/layout02Ran.vue'
  34. /***********************
  35. * plugins inject
  36. ************************/
  37. const { $toast, $log, $dayjs, $eventBus } = useNuxtApp()
  38. // props
  39. const props = defineProps({
  40. intervalTime: {
  41. type: Number,
  42. default: 5000
  43. }
  44. })
  45. // 참조가능 데이터 설정
  46. defineExpose({})
  47. // 발신 이벤트 선언
  48. const emit = defineEmits([""]);
  49. const i18n = useI18n();
  50. /***********************
  51. * data & created
  52. ************************/
  53. const widgets = computed(() => useAuthStore().getWidgets);
  54. const coreConfig = computed(() => widgets.value?.find(w => w.widgetGrp == 'CORE'));
  55. const userConfig = computed(() => widgets.value?.find(w => w.widgetGrp == 'USER'));
  56. const raneConfig = computed(() => widgets.value?.find(w => w.widgetGrp == 'RANE'));
  57. /***********************
  58. * Methods
  59. ************************/
  60. </script>