Files
pqs-9100_client/frontend/src/views/home/index.vue

87 lines
2.2 KiB
Vue
Raw Normal View History

2024-08-22 16:36:00 +08:00
<template>
2024-08-27 16:38:26 +08:00
<div class="homeView" style=" height: calc(100vh - 120px) !important;">
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"
type="primary"
@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";
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";
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);
};
2024-08-22 16:36:00 +08:00
onMounted(() => {
console.log();
});
</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-08-27 16:38:26 +08:00
height: calc(100vh - 120px);
2024-08-23 13:19:20 +08:00
}
</style>