耐受图调整、屏蔽非必要的菜单、登录后跳转到变频器页面

This commit is contained in:
caozehui
2026-04-27 08:39:30 +08:00
parent 8744dfb0d8
commit 8ab1a35f3b
8 changed files with 512 additions and 340 deletions

View File

@@ -26,6 +26,7 @@
</template>
<script lang="ts" setup>
import { computed } from 'vue'
import { HOME_URL } from '@/config'
import { useAuthStore } from '@/stores/modules/auth'
import { useModeStore } from '@/stores/modules/mode' // 引入模式 store
import { useTabsStore } from '@/stores/modules/tabs'
@@ -74,8 +75,8 @@ const handelOpen = async (item: string, key: string) => {
await initDynamicRouter()
// 只有当目标路径与当前路径不同时才跳转
if (router.currentRoute.value.path !== '/home/index') {
await router.push({ path: '/home/index' })
if (router.currentRoute.value.path !== HOME_URL) {
await router.push({ path: HOME_URL })
} else {
// 如果已在目标页面,手动触发组件更新
window.location.reload() // 或者采用其他方式刷新数据