修改大屏切换
parent
9db50321d6
commit
e50c4aa274
File diff suppressed because it is too large
Load Diff
|
@ -1,12 +1,28 @@
|
|||
<template>
|
||||
<div :class="{ 'has-logo': showLogo }" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
|
||||
<div
|
||||
:class="{ 'has-logo': showLogo }"
|
||||
:style="{
|
||||
backgroundColor:
|
||||
sideTheme === 'theme-dark'
|
||||
? variables.menuBackground
|
||||
: variables.menuLightBackground,
|
||||
}"
|
||||
>
|
||||
<logo v-if="showLogo" :collapse="isCollapse" />
|
||||
<el-scrollbar :class="sideTheme" wrap-class="scrollbar-wrapper">
|
||||
<el-menu
|
||||
:default-active="activeMenu"
|
||||
:collapse="isCollapse"
|
||||
:background-color="sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
|
||||
:text-color="sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
|
||||
:background-color="
|
||||
sideTheme === 'theme-dark'
|
||||
? variables.menuBackground
|
||||
: variables.menuLightBackground
|
||||
"
|
||||
:text-color="
|
||||
sideTheme === 'theme-dark'
|
||||
? variables.menuColor
|
||||
: variables.menuLightColor
|
||||
"
|
||||
:unique-opened="true"
|
||||
:active-text-color="theme"
|
||||
:collapse-transition="false"
|
||||
|
@ -24,19 +40,29 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import Logo from './Logo'
|
||||
import SidebarItem from './SidebarItem'
|
||||
import variables from '@/assets/styles/variables.module.scss'
|
||||
import useAppStore from '@/store/modules/app'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import usePermissionStore from '@/store/modules/permission'
|
||||
|
||||
import Logo from "./Logo";
|
||||
import SidebarItem from "./SidebarItem";
|
||||
import variables from "@/assets/styles/variables.module.scss";
|
||||
import useAppStore from "@/store/modules/app";
|
||||
import useSettingsStore from "@/store/modules/settings";
|
||||
import usePermissionStore from "@/store/modules/permission";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
const route = useRoute();
|
||||
const appStore = useAppStore()
|
||||
const settingsStore = useSettingsStore()
|
||||
const permissionStore = usePermissionStore()
|
||||
const appStore = useAppStore();
|
||||
const settingsStore = useSettingsStore();
|
||||
const permissionStore = usePermissionStore();
|
||||
const userStore = useUserStore();
|
||||
|
||||
const sidebarRouters = computed(() => permissionStore.sidebarRouters);
|
||||
const sidebarRouters = computed(() => {
|
||||
let tmps = permissionStore.sidebarRouters;
|
||||
tmps.forEach((item) => {
|
||||
if (item.meta && item.meta.title == "项目大屏") {
|
||||
item.name += "?prjId=" + userStore.currentPrjId;
|
||||
item.path += "?prjId=" + userStore.currentPrjId;
|
||||
}
|
||||
});
|
||||
return tmps;
|
||||
});
|
||||
const showLogo = computed(() => settingsStore.sidebarLogo);
|
||||
const sideTheme = computed(() => settingsStore.sideTheme);
|
||||
const theme = computed(() => settingsStore.theme);
|
||||
|
@ -49,6 +75,5 @@ const activeMenu = computed(() => {
|
|||
return meta.activeMenu;
|
||||
}
|
||||
return path;
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -115,6 +115,7 @@ import {
|
|||
devicePositionUpdateItems,
|
||||
} from "@/api/bim/bim.js";
|
||||
import icons from "./icons.js";
|
||||
import { debounce } from "lodash-es";
|
||||
export default {
|
||||
name: "SandTableSetting",
|
||||
components: {
|
||||
|
@ -157,7 +158,10 @@ export default {
|
|||
this.initEngine();
|
||||
},
|
||||
methods: {
|
||||
doSave() {
|
||||
doSave: debounce(function () {
|
||||
this.toSave();
|
||||
}, 300),
|
||||
toSave() {
|
||||
this.$confirm("确认保存修改?", "提示", {
|
||||
type: "warning",
|
||||
confirmButtonText: "确 认",
|
||||
|
|
Loading…
Reference in New Issue