feat: 立即开始停止学习并整理学时历史与界面
This commit is contained in:
@@ -5,6 +5,7 @@ import { LogOutOutline, MoonOutline, PersonOutline, SunnyOutline } from "@vicons
|
||||
import { isDark, toggleTheme } from "../shared/theme";
|
||||
import { navOptions, type PageKey } from "./navigation";
|
||||
import HomeView from "../features/home/HomeView.vue";
|
||||
import HoursHistoryView from "../features/history/HoursHistoryView.vue";
|
||||
import ExamsView from "../features/exams/ExamsView.vue";
|
||||
import TrainingsView from "../features/trainings/TrainingsView.vue";
|
||||
|
||||
@@ -15,7 +16,7 @@ const collapsed = ref(window.innerWidth < 800);
|
||||
|
||||
function pageFromHash(): PageKey {
|
||||
const name = window.location.hash.replace(/^#\/?/, "");
|
||||
if (name === "exams" || name === "trainings" || name === "home") return name;
|
||||
if (name === "exams" || name === "trainings" || name === "history" || name === "home") return name;
|
||||
return "home";
|
||||
}
|
||||
|
||||
@@ -48,7 +49,7 @@ const logoutOptions = [
|
||||
];
|
||||
|
||||
function onMenu(key: string) {
|
||||
if (key === "home" || key === "exams" || key === "trainings") {
|
||||
if (key === "home" || key === "history" || key === "exams" || key === "trainings") {
|
||||
page.value = key;
|
||||
remember(key);
|
||||
}
|
||||
@@ -111,6 +112,7 @@ function onLogout(key: string) {
|
||||
</n-layout-sider>
|
||||
<n-layout class="content" :native-scrollbar="false" content-style="height: 100%; min-height: 0; overflow: hidden; display: flex; flex-direction: column;">
|
||||
<HomeView v-if="page === 'home'" :employee-id="props.employeeId" />
|
||||
<HoursHistoryView v-else-if="page === 'history'" />
|
||||
<ExamsView v-else-if="page === 'exams'" />
|
||||
<TrainingsView v-else />
|
||||
</n-layout>
|
||||
|
||||
Reference in New Issue
Block a user