派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-03-09 c16d1b7847199f53a5613602df24fbec1a588796
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')