派生自 wuyushui/SewerAndRainNetwork

wangqi
2021-03-19 043a44a6b4d61796eafdecc02a13d47dd7137888
src/components/panel/ToolBoxPanel.vue
@@ -15,7 +15,7 @@
              v-for="(item,index) in menuList" :key="index"
              :width="item.index === '2'?230 : 150"
          >
            <el-button slot="reference" class="el-button" :class="active === index ? 'tools-panel-choose':''"
            <el-button slot="reference" class="el-button" :class="active === index && checked? 'tools-panel-choose':''"
                       @click="changeChoose(index)">
              <img :src="item.iconSelecd" alt="" v-if="active === index && checked"/>
              <img :src="item.icon" alt="" v-else/>
@@ -24,7 +24,7 @@
            </el-button>
            <el-button v-for="(itemT,indexT) in item.items" :key="indexT" @click="choiceItem(itemT,indexT)"
                       v-show="item.index!=='2'">
              <img :src="itemT.iconChoose" :title="itemT.title" v-if="Selecd === indexT"/>
              <img :src="itemT.iconChoose" :title="itemT.title" v-if="Selecd === indexT && checkedItem"/>
              <img :src="itemT.icon" :title="itemT.title" v-else/>
            </el-button>
            <div class="base-map-inner-panel" v-show="item.index==='2'">
@@ -90,7 +90,7 @@
  name: 'ToolBoxPanel',
  data () {
    return {
      isShow: true,
      isShow: false,
      currentBaseMapCode: 'tianditu_img',
      basemapList: [],
      selectGroup: false,
@@ -98,9 +98,11 @@
      drawLayerArray: [],
      map: null,
      active: -1,
      Selecd: -1,
      checked: false,
      checkbutton: -1,
      checkedItem: false,
      Selecd: -1,
      isSelecd: -1,
      menuList: [
        {
          icon: plot,
@@ -265,6 +267,7 @@
      this.basemapList = this.basemapHelper.getBasemapList()
    },
    changeBasemap (itm) {
      this.active = -1
      const code = itm.code
      this.basemapList.forEach((item) => {
        if (item.code === code) {
@@ -301,7 +304,16 @@
    },
    choiceItem (itemT, indexT) {
      this.Selecd = indexT
      this.checked = false
      if (this.isSelecd === indexT) {
        this.checkedItem = !this.checkedItem
      } else {
        if (this.isSelecd === -1) {
          this.checkedItem = !this.checkedItem
        } else {
          this.checkedItem = true
        }
      }
      this.isSelecd = indexT
      switch (itemT.label) {
        case '点标绘':
          var myIcon = this.L.icon({
@@ -379,6 +391,7 @@
          printerY.printMap('A4Portrait page', '纵向')
          break
      }
      this.active = -1
    },
    setLogic () {
      this.drawLayer.on('dblclick', this.L.DomEvent.stop).on('dblclick', this.drawLayer.toggleEdit)
@@ -393,7 +406,6 @@
    },
    changeSelectMouse () {
      this.selectGroup = true
      // this.checked = false
    }
  }
}
@@ -454,6 +466,7 @@
    }
    .el-button-choice {
      left: 500px;
      z-index: 999;
      padding: 0;
      margin: 0 0.015rem;
@@ -529,6 +542,7 @@
          display: block;
          color: @color-shadow;
        }
        .default-span {
          display: block;
          color: @color-over;