From 42f42dc88214f283b43c422f37e10ab45c5c5578 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期三, 12 三月 2025 17:32:13 +0800 Subject: [PATCH] 1. 新增绘图模式的切换 2. 新增行政区划的切换展示 --- src/components/map/MapToolbox.vue | 66 +++++++++++++++++++++------------ 1 files changed, 42 insertions(+), 24 deletions(-) diff --git a/src/components/map/MapToolbox.vue b/src/components/map/MapToolbox.vue index ba324db..270d63b 100644 --- a/src/components/map/MapToolbox.vue +++ b/src/components/map/MapToolbox.vue @@ -1,19 +1,27 @@ <template> <el-dropdown - class="fy-container dropdown-wrap" + class="p-events-auto" trigger="click" size="small" @command="handleCommand" > <el-button type="primary" class="el-button-custom"> <el-icon class="el-icon--left"><TakeawayBox /></el-icon> - 鍦板浘宸ュ叿绠� + 宸ュ叿绠� <el-icon class="el-icon--right"><arrow-down /></el-icon> </el-button> <template #dropdown> <el-dropdown-menu> - <el-dropdown-item v-for="(item, index) in toolItem" :key="index" :command="index"> - <el-button :type="item.value ? 'primary' : 'info'" plain size="default"> + <el-dropdown-item + v-for="(item, index) in toolItem" + :key="item.label" + :command="index" + > + <el-button + :type="item.value ? 'primary' : 'info'" + plain + size="default" + > <font-awesome-icon :icon="item.icon" class="m-r-4" /> {{ item.label + ': ' + (item.value ? '寮�' : '鍏�') }} </el-button> @@ -29,6 +37,15 @@ data() { return { toolItem: [ + { + icon: 'fa fa-map-signs', + label: '琛屾斂鍖哄垝', + value: false, + click: function () { + this.value = !this.value; + toolbox.toggleDistrict(this.value); + } + }, { icon: 'fa fa-map-signs', label: '鍦扮墿鏍囨敞', @@ -57,7 +74,7 @@ } }, { - icon: 'fa fa-compass', + icon: 'fa fa-crosshairs', label: '鍧愭爣鎷惧彇', value: false, click: function () { @@ -65,22 +82,31 @@ toolbox.toggleCoorPicking(this.value); } }, + // { + // icon: 'fa fa-compass', + // label: '鏁版嵁鏍囪', + // value: true, + // click: function () { + // this.value = !this.value; + // // todo 鏁版嵁鏍囪 + // } + // }, { - icon: 'fa fa-compass', - label: '鏁版嵁鏍囪', - value: true, - click: function () { - this.value = !this.value; - // todo 鏁版嵁鏍囪 - } - }, - { - icon: 'fa fa-compass', + icon: 'fa fa-comment-alt', label: '鏁版嵁寮规', value: true, click: function () { this.value = !this.value; - // todo 鏁版嵁寮规 + toolbox.toggleDataDialogStatus(this.value); + } + }, + { + icon: 'fa fa-comment-alt', + label: '婧簮娓呭崟', + value: true, + click: function () { + this.value = !this.value; + toolbox.toggleSceneSearch(this.value); } } ] @@ -95,14 +121,6 @@ </script> <style scoped> -.dropdown-wrap { - position: absolute; - top: 10px; - left: 2px; -} - - - .el-button { margin: initial !important; } -- Gitblit v1.9.3