From 40f2cc4bdc91f63954c8b2bbd351bc650657affc Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 12 Nov 2024 14:25:15 +0800
Subject: [PATCH] 配置更改; 图层默认显示调整; 弹窗关闭相关调整;
---
src/views/companyInfo/components/mainMenu.vue | 34 +++++++++++++++++++++++++++++-----
1 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/src/views/companyInfo/components/mainMenu.vue b/src/views/companyInfo/components/mainMenu.vue
index dc89375..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'
+ menuName: '三道防线',
+ 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