| | |
| | | </transition> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item v-for="(ite,index) in item.items" :key="index" :command='ite.headings'> |
| | | <span @click='toggleActive(ite)'>{{ ite.headings }}</span> |
| | | <span>{{ ite.headings }}</span> |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | |
| | | export default { |
| | | name: 'ToolBoxPanel', |
| | | components: {}, |
| | | props: ['map'], |
| | | data () { |
| | | return { |
| | | isPanelVisible: false, |
| | |
| | | enterprise: '' |
| | | }, |
| | | selectGroup: false, |
| | | selectGroupOne: false |
| | | drawLayer: null, |
| | | L: window.L, |
| | | map: null |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | handleCommand (command) { |
| | | console.log(command) |
| | | if (command === '全屏') { |
| | | this.map.toggleFullscreen() |
| | | } |
| | | }, |
| | | toggleActive (k) { |
| | | if (k === 'fullscreen') { |
| | | this.map.toggleFullscreen() |
| | | switch (command) { |
| | | 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 |
| | | case '线标绘': |
| | | this.drawLayer = this.map.editTools.startPolyline() |
| | | this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit) |
| | | break |
| | | case '面标绘': |
| | | this.drawLayer = this.map.editTools.startPolygon() |
| | | this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit) |
| | | break |
| | | case '箭头标绘': |
| | | this.drawLayer = this.map.editTools.startPolyline() |
| | | this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit) |
| | | break |
| | | case '点标注': |
| | | this.drawLayer = this.map.editTools.startMarker() |
| | | this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit) |
| | | break |
| | | case '图标标注': |
| | | this.drawLayer = this.map.editTools.startIcon() |
| | | this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit) |
| | | break |
| | | case '文字标注': |
| | | this.drawLayer = this.map.editTools.startText() |
| | | this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit) |
| | | break |
| | | } |
| | | }, |
| | | loadData () { |
| | |
| | | background: #305B62; |
| | | //margin-top: 15px; |
| | | width: 35px; |
| | | height: 35px; |
| | | height: 38px; |
| | | border-radius: 50%; |
| | | border: 2px skyblue solid; |
| | | display: flex; |