From 856df58ee56f3c6163bdc938b4fb7c5085ede6b5 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 11 Nov 2024 18:35:09 +0800
Subject: [PATCH] Merge branch 'main' of http://139.196.74.78:10010/r/zhyq/bigScreen
---
src/views/companyInfo/components/mainMenu.vue | 32 ++++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/src/views/companyInfo/components/mainMenu.vue b/src/views/companyInfo/components/mainMenu.vue
index fb0d955..5bc5f9c 100644
--- a/src/views/companyInfo/components/mainMenu.vue
+++ b/src/views/companyInfo/components/mainMenu.vue
@@ -1,6 +1,6 @@
<template>
<div class="page-mode">
- <div @mouseenter="item.childrenFlag = true" :class="{ active: currentUrl.indexOf(item.path) != -1 }"
+ <div @mouseenter="item.childrenFlag = true" :class="{ active: buttonIndex == item.value }"
@mouseleave="item.childrenFlag = false" @click="goToPath(item)" v-for="(item, index) in menuList" :key="index">
{{ item.menuName }}
</div>
@@ -19,20 +19,44 @@
[
{
menuName: '企业信息',
- path: '/layout/sub/companyInfo'
+ path: '/layout/sub/companyInfo',
+ value: 1,
+ },
+ {
+ menuName: '应急物质',
+ path: '/layout/sub/',
+ value: 2,
},
{
menuName: '应急空间',
- path: '/layout/ws'
+ path: '/layout/ws',
+ value: 3,
},
{
menuName: '三道防线',
- path: '/layout/sj'
+ path: '/layout/sj',
+ value: 4,
}
]
)
+let { buttonIndex } = defineProps({
+ buttonIndex: Number
+})
+
+// 父级方法
+const emit = defineEmits(['childEvent'])
const goToPath = (params) => {
+ if (params.value == 1) {
+ emit('childEvent', params.value)
+ return
+
+ } else if (params.value == 2) {
+ emit('childEvent', params.value)
+ return
+ }
+ emit('childEvent', params.value)
+
if (params.children && params.children.length > 0) return
if (params.path) {
--
Gitblit v1.9.3