From c16d1b7847199f53a5613602df24fbec1a588796 Mon Sep 17 00:00:00 2001
From: 徐旺旺 <11530253@qq.com>
Date: 星期二, 09 三月 2021 08:59:32 +0800
Subject: [PATCH] 菜单组件联动
---
src/components/panel/RightSearchPanel.vue | 49 ++++++++++++++++++++-----------------------------
1 files changed, 20 insertions(+), 29 deletions(-)
diff --git a/src/components/panel/RightSearchPanel.vue b/src/components/panel/RightSearchPanel.vue
index fdbaae2..11f10ad 100644
--- a/src/components/panel/RightSearchPanel.vue
+++ b/src/components/panel/RightSearchPanel.vue
@@ -1,7 +1,7 @@
<template>
<div id="right-panel">
<div class="panel-tab">
- <div v-for="item in topicMenu" :key="item.id" :title="item.name" class="tab-item" @click="handleGd" :class="{'B-TMT-tab-waybill-isActive': isWaybillHover}">
+ <div v-for="item in topicMenu" :key="item.id" :title="item.name" class="tab-item" @click="handleClick(item)">
<img :src="item.icon" style="width: 24px;height: 24px;"></div>
<!-- <div class="tab-item" @click="handleHb" :class="{'B-TMT-tab-route-isActive': isRouteHover}"></div>-->
@@ -13,6 +13,10 @@
<div class="right-control">
+ <div class="el-message-box__header panel_header">
+ <div class="el-message-box__title panel_title"><!----><span>{{ title }}</span>
+ </div>
+ </div>
<component :title="title" :is="gcComp"></component>
</div>
</div>
@@ -20,21 +24,16 @@
<script>
import $ from 'jquery'
-import EnvProtectSearch from './topicSearch/EnvProtectSearch'
-import DischargeSearch from './topicSearch/DischargeSearch'
-import { TopicList } from '../../conf/Topic'
-
-import SewersSearch from '@components/panel/topicSearch/SewersSearch'
+import { TopicComp, TopicList } from '../../conf/Topic'
export default {
name: 'MonitorPanel',
- components: { EnvProtectSearch, DischargeSearch },
+ components: TopicComp,
data () {
return {
- topicMenu: [],
topicList: TopicList,
topicCheckedList: [],
isPanelVisible: false,
- gcComp: SewersSearch,
+ gcComp: 'sewersSearch',
gdVisible: true,
hbVisible: false,
@@ -45,21 +44,10 @@
}
},
- computed: {},
- watch: {
- '$store.state.map.topic.topicCheckedList': function (newVal, oldVal) {
- console.log(oldVal)
- console.log(newVal)
- this.topicCheckedList = newVal
- this.topicMenu = []
- this.topicList.forEach((item) => {
- this.topicCheckedList.forEach((itm) => {
- if (item.name === itm) {
- // item.checked = tr
- this.topicMenu.push(item)
- }
- })
- })
+ computed: {
+ topicMenu () {
+ console.log(this.$store.state.map.topic.topicCheckedList)
+ return this.$store.state.map.topic.topicCheckedList
}
},
methods: {
@@ -69,8 +57,9 @@
handlePage (page) {
},
- handleGd () {
- this.title = '绠¢亾淇℃伅鏌ヨ'
+ handleClick (item) {
+ this.title = item.name
+ this.gcComp = item.comp
},
toggleMonitorPanel () {
const el = $('.btn-stretch')
@@ -221,11 +210,11 @@
.B-TMD-table-list-title {
width: 100%;
- height: 50px;
+ height: 30px;
}
.B-TMD-table-list-head {
- width: 160px;
+ //width: 160px;
float: left;
padding-left: 5px;
overflow: hidden;
@@ -308,6 +297,7 @@
.search-form .el-form-item {
margin: 0px;
+ margin-bottom: 8px;
}
.search-form .el-icon-search {
@@ -349,7 +339,8 @@
margin: 5px 0px 0px 0px;
padding: 0px;
border: #051842;
- height: 290px;
+ //height: 290px;
+ height: calc(~"100vh - 180px");
overflow-y: scroll;
background-color: transparent !important;
margin-bottom: -8px !important;
--
Gitblit v1.8.0