派生自 wuyushui/SewerAndRainNetwork

YANGDL
2021-03-09 d7dd4a54b16e97e8e60bf0ea28762c3952093a8b
src/components/panel/RightSearchPanel.vue
@@ -3,23 +3,33 @@
    <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}">
        <img :src="item.icon" style="width: 24px;height: 24px;"></div>
<!--      <div class="tab-item" @click="handleHb" :class="{'B-TMT-tab-route-isActive': isRouteHover}"></div>-->
<!--      <div class="tab-item" @click="handlePk" :class="{'B-TMT-tab-route-isActive': isRouteHover}"></div>-->
    </div>
    <div class="panel-fold-btn">
      <div class="btn-stretch" @click="toggleMonitorPanel"></div>
    </div>
<!--    <div class="panel-fold-btn" >-->
<!--      <div class="btn-stretch" @click="toggleMonitorPanel"></div>-->
<!--    </div>-->
    <div class="right-control">
<!--      <div class="panel-fold-btn" @click="toggleMonitorPanel" >-->
<!--            <div :class="[isCollapse? 'btn-stretch':'btn-shrink']" ></div>-->
<!--&lt;!&ndash;                <div class="btn-stretch" v-if="isCollapse"  </div>&ndash;&gt;-->
<!--&lt;!&ndash;            <div class="btn-shrink" v-else-if="!isCollapse" ></div>&ndash;&gt;-->
<!--&lt;!&ndash;        :style = "{width:isCollapse ? '290px' : '0px'}"&ndash;&gt;-->
<!--      </div>-->
<!--    <div class="right-control" v-if="!isCollapse"  >-->
    <div class="right-control" :class="[{ 'unfold': !isCollapse },{ 'shrink': isCollapse }] " >
      <div class="panel-fold-btn" @click="toggleMonitorPanel">
<!--        <div class="btn-stretch" v-if="isCollapse"></div>-->
<!--        <div class="btn-shrink" v-else-if="!isCollapse"></div>-->
        <div :class="[isCollapse? 'btn-stretch':'btn-shrink']" ></div>
      </div>
      <component :title="title" :is="gcComp"></component>
    </div>
  </div>
</template>
<script>
import $ from 'jquery'
// import $ from 'jquery'
import EnvProtectSearch from './topicSearch/EnvProtectSearch'
import DischargeSearch from './topicSearch/DischargeSearch'
import { TopicList } from '../../conf/Topic'
@@ -34,32 +44,22 @@
      topicList: TopicList,
      topicCheckedList: [],
      isPanelVisible: false,
      gcComp: SewersSearch,
      gcComp: 'sewersSearch',
      gdVisible: true,
      hbVisible: false,
      pkVisible: false,
      toggleMonitorStyle: 'right:0px',
      title: '污雨水管网'
      title: '污雨水管网',
      isCollapse: false
    }
  },
  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: {
@@ -73,38 +73,44 @@
      this.title = '管道信息查询'
    },
    toggleMonitorPanel () {
      const el = $('.btn-stretch')
      const el2 = $('.panel-fold-btn')
      // let cs = 'btn-stretch-active'
      var rightControl = $('#right-panel')
      const right = rightControl.css('right')
      if (right === '10px') {
        rightControl.animate({
          right: '-322px'
        })
        el.css({
          transform: 'rotateY(180deg)',
          'transform-origin': '50% 50%',
          transition: 'transform 1s linear'
        })
        el2.animate({
          right: '320px',
          speed: 1000
        })
      } else {
        rightControl.animate({
          right: '10px'
        })
        el.css({
          transform: 'rotateY(0deg)',
          'transform-origin': '50% 50%',
          transition: 'transform 1s linear'
        })
        el2.animate({
          right: '290px',
          speed: 1000
        })
      }
      this.isCollapse = !this.isCollapse
      // const el = $('.btn-stretch')
      // const el2 = $('.panel-fold-btn')
      // const el = document.getElementsByClassName('.btn-stretch')
      // const el2 = document.getElementsByClassName('.panel-fold-btn')
      // let  = 'btn-stretch-active'
      // var rightControl = $('#right-panel')
      // var rightControl = document.getElementById('#right-panel')
      // const right = rightControl.css('right')
      // const rightit = rightControl.ownerDocument.defaultView
      // const right = rightit.getComputedStyle(rightit, null).right
    //   if (right === '10px') {
    //     rightControl.animate({
    //       right: '-322px'
    //     })
    //     el.css({
    //       transform: 'rotateY(180deg)',
    //       'transform-origin': '50% 50%',
    //       transition: 'transform 1s linear'
    //     })
    //     el2.animate({
    //       right: '320px',
    //       speed: 1000
    //     })
    //   } else {
    //     rightControl.animate({
    //       right: '10px'
    //     })
    //     el.css({
    //       transform: 'rotateY(0deg)',
    //       'transform-origin': '50% 50%',
    //       transition: 'transform 1s linear'
    //     })
    //     el2.animate({
    //       right: '290px',
    //       speed: 1000
    //     })
    //   }
    }
  },
  mounted () {
@@ -142,6 +148,7 @@
  .el-form-item__label {
    color: rgb(52, 224, 255);
    /*<!--color: @color;-->*/
  }
  .el-input__inner::placeholder {
@@ -221,11 +228,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;
@@ -233,14 +240,29 @@
    white-space: nowrap;
  }
  .panel-fold-btn{
    overflow: hidden;
    position: absolute;
    top:45%;
    left: -18px;
    /*left: 0px;*/
    //right: 320px;
    right: 290px;
    /*right: 290px;*/
    z-index: 1000;
    /*right: 0px;*/
    background-color: rgba(5,24,66,.8);
    border-radius: 10px 0 0 10px;
    .btn-stretch {
      width: 20px;
      height: 40px;
      background: url('../../assets/images/map-pages/icon/icon.png') no-repeat -408px 5px;
      cursor: pointer;
      /*margin-left: -20px;*/
      transform: rotateY(0deg);
      transform-origin: 50% 50%;
      transition: transform 1s linear;
        /*transition: 3s linear;*/
    }
    .btn-shrink {
      width: 20px;
      height: 40px;
      background: url('../../assets/images/map-pages/icon/icon.png') no-repeat -408px 5px;
@@ -273,17 +295,20 @@
  }
  .right-control {
    width: 290px;
    /*width: 290px;*/
    //height: 573px;
    height: 100%;
    position: absolute;
    position: relative;
    top: 0;
    right: 0;
    z-index: 999;
    background: url('../../assets/images/map-pages/icon/bgc.png') no-repeat;
    background-size: 100% 98%;
  }
  .a{
    transform: translateX(328px);
    transition: transform 3s linear;
    }
  .panel_searchTotal {
    font-size: 12px;
    float: right;
@@ -291,13 +316,13 @@
  .panel_header {
    // background-color: #030D2E;
    padding: 7px 15px 3px 20px;
    padding: 8px 15px 3px 20px;
  }
  .panel_title {
    font-size: 12px;
    margin: 0px;
    padding: 0px;
    /*margin: 0px;*/
    /*padding: 0px;*/
    color: #78c4ff;
    font-weight: bold;
  }
@@ -307,7 +332,7 @@
  }
  .search-form .el-form-item {
    margin: 0px;
    /*margin: 0px;*/
    margin-bottom: 8px;
  }
@@ -350,7 +375,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;
@@ -452,7 +478,7 @@
  ::-webkit-scrollbar-track {
    /*滚动条里面轨道*/
    // box-shadow   : inset 0 0 5px rgba(0, 0, 0, 0.2);
    box-shadow   : inset 0 0 5px rgba(0, 0, 0, 0.2);
    border-radius: 0px;
    background: #0E3565;
  }
@@ -481,5 +507,13 @@
      background-color: #061e51 !important;
    }
  }
  .unfold {
    transform: translateX(332px);
    transition: transform 0.5s linear;
  }
  .shrink {
    transform: translateX(0px);
    transition: transform 0.5s linear;
  }
}
</style>