<!--
 * @Author: sjl
 * @Date: 2023-04-08 11:51:03
 * @Descripttion: 
-->
<template>
  <div class="p-4 md:flex">
    页面紧急开发中。。。。。。
    <!-- <div
      class="md:w-7/10 w-full !mr-4 enter-y"
      :class="role !== RoleEnum.SYS_ADMIN && '!md:w-full !mr-0'"
    >
      <GrowCard :loading="loading" class="enter-y" :role="role" />
      <SiteAnalysisMessage class="!my-4 enter-y" :loading="loading" :role="role" />
      <SiteAnalysis class="!my-4 enter-y" :loading="loading" :role="role" />
      <div class="md:flex enter-y" v-if="!isAdmin(role)">
        <Card title="核心流程指南" style="width: 100%">
          <img alt="核心流程指南" src="/src/assets/images/flow.png" />
        </Card>
      </div>
    </div>
    <div v-if="role === RoleEnum.SYS_ADMIN" class="md:w-3/10 w-full enter-y">
      <Card
        :style="{ width: '100%', height: !isAdmin(role) ? '100%' : '98.4%' }"
        :title="!isAdmin(role) ? '帮助文档' : ''"
      >
        <HelpDoc :role="role" />
      </Card>
    </div> -->
  </div>
</template>
<script lang="ts" setup>
  import { ref } from 'vue';
  import GrowCard from './components/GrowCard.vue';
  import SiteAnalysis from './components/SiteAnalysis.vue';
  import SiteAnalysisMessage from './components/SiteAnalysisMessage.vue';
  import { Card } from 'ant-design-vue';
  import HelpDoc from './components/HelpDoc.vue';
  import { USER_INFO_KEY } from '/@/enums/cacheEnum';
  import { getAuthCache } from '/@/utils/auth';
  import { isAdmin, RoleEnum } from '/@/enums/roleEnum';

  defineExpose({
    isAdmin,
  });

  const userInfo: any = getAuthCache(USER_INFO_KEY);

  const role: string = userInfo?.roles[0];

  console.log({ role });

  const loading = ref(true);

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