派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-03-16 31fc16c132772ea0c6d9598d58366941f6cc91d9
功能实现
1个文件已修改
70 ■■■■ 已修改文件
src/components/panel/ToolBoxPanel.vue 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/ToolBoxPanel.vue
@@ -19,13 +19,13 @@
            <span>{{ item.label }}</span>
          </el-button>
          <el-button v-for="(itemT,indexT) in item.items" :key="indexT" @click="choiceItem(itemT)">
            <img :src="itemT.icon" alt=""/>
            <img :src="itemT.icon" :title="itemT.title"/>
          </el-button>
        </el-popover>
      </el-row>
      <el-button @click="changeSelect" class="special-button">
        <i :class="selectGroup === false ? 'el-icon-d-arrow-right':'el-icon-d-arrow-left'"></i>
      </el-button>
      </el-row>
    </div>
  </div>
</template>
@@ -49,11 +49,6 @@
// 测量的方法
import Measure from '@/components/plugin/MeaSure'
// import '@/components/plugin/leaflet-measure-path/leaflet-measure-path.css'
// 封装的选择弹框
// import BaseNavMenuItem from '@components/panel/BaseNavMenuItem'
// 标注的方法
// import MakeTation from '@components/plugin/MakeTation'
export default {
  name: 'ToolBoxPanel',
@@ -69,27 +64,32 @@
            {
              index: '1-1',
              label: '点标绘',
              icon: marker
              icon: marker,
              title: '点标绘'
            },
            {
              index: '1-2',
              label: '线标绘',
              icon: line
              icon: line,
              title: '线标绘'
            },
            {
              index: '1-4',
              label: '多边形',
              icon: polygonJ
              icon: polygonJ,
              title: '多边形'
            },
            {
              index: '1-5',
              label: '矩形',
              icon: polygonS
              icon: polygonS,
              title: '矩形'
            },
            {
              index: '1-3',
              label: '圆形',
              icon: polygonY
              icon: polygonY,
              title: '圆形'
            }
          ]
        },
@@ -101,12 +101,14 @@
            {
              index: '3-1',
              label: '距离',
              icon: distance
              icon: distance,
              title: '距离测量'
            },
            {
              index: '3-2',
              label: '面积',
              icon: mm
              icon: mm,
              title: '面积测量'
            }
          ]
        },
@@ -154,15 +156,21 @@
          items: [
            {
              index: '4-1',
              label: '全屏'
              label: '全屏',
              icon: '',
              title: '全屏'
            },
            {
              index: '4-2',
              label: 'A4横向'
              label: 'A4横向',
              icon: '',
              title: 'A4横向'
            },
            {
              index: '4-3',
              label: 'A4纵向'
              label: 'A4纵向',
              icon: '',
              title: 'A4纵向'
            }
          ]
        }
@@ -208,6 +216,34 @@
        case '面积':
          Measure.startMeasureArea(this.map, this.L)
          break
        case '全屏':
          // this.map.toggleFullscreen()
          var printer = this.L.easyPrint({
            sizeModes: ['Current', 'A4Landscape', 'A4Portrait'],
            filename: 'map_image',
            exportOnly: true,
            hideControlContainer: true
          }).addTo(this.map)
          printer.printMap('CurrentSize', 'MyManualPrint')
          break
        case 'A4横向':
          var printerX = this.L.easyPrint({
            sizeModes: ['Current', 'A4Landscape', 'A4Portrait'],
            filename: 'map_image',
            exportOnly: true,
            hideControlContainer: true
          }).addTo(this.map)
          printerX.printMap('A4Landscape page', 'MyManualPrint')
          break
        case 'A4纵向':
          var printerY = this.L.easyPrint({
            sizeModes: ['Current', 'A4Landscape', 'A4Portrait'],
            filename: 'map_image',
            exportOnly: true,
            hideControlContainer: true
          }).addTo(this.map)
          printerY.printMap('A4Portrait page', 'MyManualPrint')
          break
      }
    },
    // handleSelect (index) {