<template>
      <div class="homeView" style=" height: calc(100vh - 120px) !important;">
    <model v-if="!authStore.showMenuFlag"></model>
    <dashboard v-if="authStore.showMenuFlag"></dashboard>
  </div>

  <!-- <div class="main">
    <div class="main_container">
      <div class="mode" v-for="(item, index) in modeList" :key="index">
        <div class="mode_top">
          <div class="mode_name">
            <p>
              {{ item.name }}
            </p>
          </div>
          <div class="test_button">
            <el-button
              size="small"
              type="primary"
              @click="handelOpen(item.isActive)"
              >进入检测</el-button
            >
          </div>
        </div>
        <div class="mode_img">
          <img :src="item.img" />
        </div>
      </div>
    </div>
  </div> -->
</template>
<script lang="ts" setup>
import { ref, onMounted } from "vue";
import { useRouter } from "vue-router";
import { ElMessage } from "element-plus";
import { useAuthStore } from "@/stores/modules/auth.ts";
import model from "./tabs/model.vue";
import dashboard from "./tabs/dashboard.vue";
const authStore = useAuthStore();
console.log(authStore.showMenuFlagGet, "????????????????33333333");
const activeIndex = ref("1-1");
const router = useRouter();
const modeList = [
  {
    name: "模拟式模式",
    subName: "未启用模拟式检测计划",
    img: "/src/assets/images/dashboard/1.svg",
    isActive: true,
  },
  {
    name: "数字式模式",
    subName: "启用数字检测计划",
    img: "/src/assets/images/dashboard/2.svg",
    isActive: false,
  },
  {
    name: "对比式模式",
    subName: "启用对比式检测计划",
    img: "/src/assets/images/dashboard/3.svg",
    isActive: false,
  },
];
const handelOpen = async (isActive: any) => {
  await authStore.setShowMenu();
  return;
  if (isActive) {
    router.push({ path: "/static" });
  } else {
    ElMessage({
      message: "当前模式未配置",
      type: "warning",
    });
  }
};
const handleSelect = (key: string, keyPath: string[]) => {
  console.log(key, keyPath);
};
onMounted(() => {
  console.log();
});
</script>
<style lang="scss" scoped>
.homeView{
  width: 100%;
  height: calc(100vh - 120px);
}
</style>
