feat:优化

This commit is contained in:
2025-12-06 23:48:26 +08:00
parent 19b617389b
commit 55f4c3a507

View File

@@ -14,7 +14,7 @@
<el-button <el-button
@click="startDrawPolygon" @click="startDrawPolygon"
:type="currentDrawType === 'polygon' ? 'primary' : 'default'" :type="currentDrawType === 'polygon' ? 'primary' : 'default'"
:disabled="isDrawing"
size="default" size="default"
> >
多边形 多边形
@@ -22,7 +22,7 @@
<el-button <el-button
@click="startDrawRectangle" @click="startDrawRectangle"
:type="currentDrawType === 'rectangle' ? 'primary' : 'default'" :type="currentDrawType === 'rectangle' ? 'primary' : 'default'"
:disabled="isDrawing"
size="default" size="default"
> >
矩形 矩形
@@ -30,20 +30,12 @@
<el-button <el-button
@click="startDrawCircle" @click="startDrawCircle"
:type="currentDrawType === 'circle' ? 'primary' : 'default'" :type="currentDrawType === 'circle' ? 'primary' : 'default'"
:disabled="isDrawing"
size="default" size="default"
> >
圆形 圆形
</el-button> </el-button>
</div> </div>
<el-button
v-if="isDrawing"
@click="cancelDrawing"
type="warning"
size="default"
>
取消绘制
</el-button>
</div> </div>
<!-- 无人机状态面板 --> <!-- 无人机状态面板 -->
@@ -616,16 +608,7 @@ const startDrawCircle = () => {
}) })
} }
// 取消绘制 // 取消绘制功能已移除
const cancelDrawing = () => {
if (mouseTool) {
mouseTool.close(true) // 关闭绘制工具true表示取消当前绘制
}
// 重置状态
isDrawing.value = false
currentDrawType.value = null
}
// 获取类型名称 // 获取类型名称
const getTypeName = (type) => { const getTypeName = (type) => {