智慧园区前端大屏
shuishen
2024-11-07 3a1224b26d091fb6a2a08555054acb05592d357c
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