<template>
  <PlatformPageWrapper>
    <div><WorkbenchHeader /></div>
    <div class="box1"></div>
    <div class="box2">
      <div class="item-box" @click="goToApplicationHome">
        <div class="text">点击进入应用页面</div>
      </div>
    </div>
    <div class="box3"></div>
    <div class="box4"></div>
    <div class="box5"></div>
    <LoadingBox v-if="loading" />
  </PlatformPageWrapper>
</template>
<script lang="ts" setup>
  import { ref } from 'vue';
  import { LoadingBox } from '/@/components/ModalPanel/index';
  import { PlatformPageWrapper } from '/@/components/Page';
  import WorkbenchHeader from '/@/layouts/platform/WorkbenchHeader.vue';
  import { useGo } from '/@/hooks/web/usePage';
  import { PageEnum } from '/@/enums/pageEnum';
  const go = useGo();
  const loading = ref(false);
  function goToApplicationHome() {
    loading.value = true;
    go(PageEnum.APPLICATION_HOME, false);
    setTimeout(() => {
      loading.value = false;
    }, 1000);
  }
</script>
<style lang="less" scoped>
  .box1 {
    width: 100%;
    height: 380px;
    background: rgb(255 255 255 / 60%);
    border-radius: 10px;
    margin-top: 20px;
  }

  .box2 {
    display: flex;
    align-items: center;
    width: 100%;
    height: 220px;
    background: rgb(255 255 255 / 60%);
    border-radius: 10px;
    margin: 20px 0;
    padding: 20px 26px;

    .item-box {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 180px;
      height: 135px;
      background: #fff;
      border-radius: 8px;
      border: 1px solid #eee;

      .text {
        font-weight: 500;
        font-size: 12px;
        color: #6b788d;
        line-height: 14px;
      }
    }
  }

  .box3 {
    width: 100%;
    height: 498px;
    background: rgb(255 255 255 / 60%);
    border-radius: 10px;
  }

  .box4 {
    width: 100%;
    height: 334px;
    background: rgb(255 255 255 / 60%);
    border-radius: 10px;
    margin: 20px 0;
  }

  .box5 {
    width: 100%;
    height: 334px;
    background: rgb(255 255 255 / 60%);
    border-radius: 10px;
  }
</style>
