2024-08-22 16:36:00 +08:00
|
|
|
<template>
|
2024-10-10 17:47:55 +08:00
|
|
|
<!-- style=" height: calc(100vh - 120px) !important;" -->
|
|
|
|
|
<div class="homeView">
|
2024-08-23 13:19:20 +08:00
|
|
|
<model v-if="!authStore.showMenuFlag"></model>
|
|
|
|
|
<dashboard v-if="authStore.showMenuFlag"></dashboard>
|
2024-08-22 16:36:00 +08:00
|
|
|
</div>
|
2024-08-27 16:38:26 +08:00
|
|
|
|
2024-08-23 13:19:20 +08:00
|
|
|
<!-- <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"
|
2024-10-31 14:53:29 +08:00
|
|
|
dictType="primary"
|
2024-08-23 13:19:20 +08:00
|
|
|
@click="handelOpen(item.isActive)"
|
|
|
|
|
>进入检测</el-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mode_img">
|
|
|
|
|
<img :src="item.img" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
2024-08-22 16:36:00 +08:00
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
2024-08-23 13:19:20 +08:00
|
|
|
import { useRouter } from "vue-router";
|
|
|
|
|
import { ElMessage } from "element-plus";
|
2024-10-09 20:03:07 +08:00
|
|
|
import { useAuthStore } from "@/stores/modules/auth";
|
2024-08-23 13:19:20 +08:00
|
|
|
import model from "./tabs/model.vue";
|
|
|
|
|
import dashboard from "./tabs/dashboard.vue";
|
2024-11-05 14:15:56 +08:00
|
|
|
import { onMounted } from "vue";
|
2024-08-23 13:19:20 +08:00
|
|
|
const authStore = useAuthStore();
|
2024-11-14 18:26:34 +08:00
|
|
|
|
2024-08-23 13:19:20 +08:00
|
|
|
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[]) => {
|
2024-11-14 18:26:34 +08:00
|
|
|
//console.log(key, keyPath);
|
2024-08-23 13:19:20 +08:00
|
|
|
};
|
2024-08-22 16:36:00 +08:00
|
|
|
onMounted(() => {
|
2024-11-14 18:26:34 +08:00
|
|
|
//console.log();
|
2024-08-22 16:36:00 +08:00
|
|
|
});
|
|
|
|
|
</script>
|
2024-08-23 13:19:20 +08:00
|
|
|
<style lang="scss" scoped>
|
2024-08-27 16:38:26 +08:00
|
|
|
.homeView{
|
2024-08-23 13:19:20 +08:00
|
|
|
width: 100%;
|
2024-10-10 17:47:55 +08:00
|
|
|
// height: calc(100vh - 120px);
|
|
|
|
|
height: 100%;
|
2024-08-23 13:19:20 +08:00
|
|
|
}
|
|
|
|
|
</style>
|