index.vue 1.13 KB
<template>
  <div class="p-4">
    <GrowCard :loading="loading" class="enter-y" :exchangeTab="exchangeTab" />
    <SiteAnalysis class="!my-4 enter-y" :loading="loading" />
    <!-- <div class="md:flex enter-y">
      <VisitRadar class="md:w-1/3 w-full" :loading="loading" />
      <VisitSource class="md:w-1/3 !md:mx-4 !md:my-0 !my-4 w-full" :loading="loading" />
      <SalesProductPie class="md:w-1/3 w-full" :loading="loading" />
    </div> -->
  </div>
</template>
<script lang="ts" setup>
  import { onMounted, ref, watch } from 'vue';
  import GrowCard from './components/GrowCard.vue';
  import SiteAnalysis from './components/SiteAnalysis.vue';
  import { useDataStoreWithOut } from '/@/store/modules/data';
  import { exchangeTab } from '@/store/modules/user';

  const loading = ref(true);
  const dataStore = useDataStoreWithOut();
  watch(
    () => exchangeTab.value,
    () => {},
  );
  onMounted(() => {
    dataStore.getFetchData();
    dataStore.getFetchData2();
    dataStore.getFetchChartData();
    dataStore.getCustomerSalesData1();
    exchangeTab.value;
  });

  setTimeout(() => {
    loading.value = false;
  }, 1500);
</script>