智慧园区前端大屏
linwe
2024-11-07 05affc703e81728cc58cc89c1815407ad4997dfe
src/views/layout/components/mainMenu.vue
@@ -12,6 +12,8 @@
import { useRouter, useRoute } from 'vue-router'
import { Search } from '@element-plus/icons-vue'
import { getTime } from '@/utils/getTime.js'
import { useRouterStore } from 'store/router'
const store = useRouterStore()
let router = useRouter()
let currentUrl = ref('statistics')
@@ -49,6 +51,12 @@
  if (params.path) {
    if (router.currentRoute.value.path == params.path) return
    if (params.path == '/layout/supplies' || params.path == '/layout/rt') {
      store.setLoadSingle(true)
    } else {
      store.setLoadSingle(false)
    }
    router.push(params.path)
  } else {
    params.childrenFlag = !params.childrenFlag