|
@@ -1,10 +1,44 @@
|
|
|
<template>
|
|
|
<div :class="{ 'has-logo': sidebarLogo }">
|
|
|
<!--混合布局-->
|
|
|
- <div class="flex w-full" v-if="layout == 'mix'">
|
|
|
- <SidebarLogo v-if="sidebarLogo" :collapse="!appStore.sidebar.opened" />
|
|
|
- <SidebarMixTopMenu class="flex-1" />
|
|
|
- <NavbarRight />
|
|
|
+ <div
|
|
|
+ class="flex w-full"
|
|
|
+ style="
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0 20px;
|
|
|
+ border-bottom: 1px solid #fff;
|
|
|
+ "
|
|
|
+ v-if="layout == 'mix'"
|
|
|
+ >
|
|
|
+ <!-- <SidebarLogo v-if="sidebarLogo" :collapse="!appStore.sidebar.opened" /> -->
|
|
|
+ <div class="viewTitle">{{ title }}</div>
|
|
|
+ <SidebarMixTopMenu class="flex-1" v-show="false" />
|
|
|
+ <div>
|
|
|
+ <el-space>
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ border-radius: 50%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <svg-icon
|
|
|
+ class="activeNotice"
|
|
|
+ icon-class="closeI"
|
|
|
+ size="47"
|
|
|
+ @click="toExitApp"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <div class="name">李明华</div>
|
|
|
+ </div>
|
|
|
+ </el-space>
|
|
|
+ </div>
|
|
|
+ <!-- <NavbarRight /> -->
|
|
|
</div>
|
|
|
<!--左侧布局 || 顶部布局 -->
|
|
|
<template v-else>
|
|
@@ -19,13 +53,30 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { useSettingsStore, usePermissionStore, useAppStore } from "@/store";
|
|
|
-
|
|
|
+const route = useRoute();
|
|
|
const appStore = useAppStore();
|
|
|
const settingsStore = useSettingsStore();
|
|
|
const permissionStore = usePermissionStore();
|
|
|
-
|
|
|
+const title = ref("");
|
|
|
const sidebarLogo = computed(() => settingsStore.sidebarLogo);
|
|
|
const layout = computed(() => settingsStore.layout);
|
|
|
+const toExitApp = () => {
|
|
|
+ if (window.openHarmonyBridge && window.openHarmonyBridge.exitApp) {
|
|
|
+ window.openHarmonyBridge.exitApp("");
|
|
|
+ }
|
|
|
+};
|
|
|
+const setTitle = () => {
|
|
|
+ const path = route.fullPath;
|
|
|
+ console.log(path);
|
|
|
+ switch (path) {
|
|
|
+ case "/deviceList":
|
|
|
+ title.value = "设备列表";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+};
|
|
|
+onMounted(() => {
|
|
|
+ setTitle();
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -34,4 +85,12 @@ const layout = computed(() => settingsStore.layout);
|
|
|
height: calc(100vh - $navbar-height);
|
|
|
}
|
|
|
}
|
|
|
+.name {
|
|
|
+ font-size: 20px;
|
|
|
+ color: white;
|
|
|
+}
|
|
|
+.viewTitle {
|
|
|
+ font-size: 30px;
|
|
|
+ color: white;
|
|
|
+}
|
|
|
</style>
|