智慧园区前端大屏
shuishen
2024-11-11 7e3753d954e1f2fc37b1970cb4fef8f8d59ad0fc
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')
@@ -22,6 +24,10 @@
      path: '/layout/survey'
    },
    {
      menuName: '风险源',
      path: '/layout/rs'
    },
    {
      menuName: '应急空间',
      path: '/layout/space'
    },
@@ -30,12 +36,16 @@
      path: '/layout/supplies'
    },
    {
      menuName: '应急设备',
      path: '/layout/equipment'
    },
    {
      menuName: '三级防控',
      path: '/layout/pac'
    },
    {
      menuName: '救援队伍',
      path: '/layout/rt'
    },
    {
      menuName: '污染物处理',
      path: '/layout/pd'
    },
  ]
)
@@ -45,6 +55,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
@@ -78,7 +94,7 @@
  &>div {
    background-image: url(/images/mode-tab.png);
    background-size: cover;
    width: 150px;
    width: 136px;
    height: 50px;
    font-size: 16px;
    text-align: center;