吉安感知网项目-前端
shuishen
2026-02-02 1d3e8e3a14f09e42ee47d8e8b6cc5feb6c4f7c79
feat:区域划分绘制逻辑、编辑逻辑优化调整
11 files modified
108 ■■■■■ changed files
applications/drone-command/src/utils/cesium/shapeTools/draw/DrawBufferCircleTool.js 16 ●●●● patch | view | raw | blame | history
applications/drone-command/src/utils/cesium/shapeTools/draw/DrawEllipseTool.js 14 ●●●● patch | view | raw | blame | history
applications/drone-command/src/utils/cesium/shapeTools/draw/DrawPolygonTool.js 2 ●●● patch | view | raw | blame | history
applications/drone-command/src/utils/cesium/shapeTools/draw/DrawRectangleTool.js 11 ●●●●● patch | view | raw | blame | history
applications/drone-command/src/utils/cesium/shapeTools/edit/EditBufferCircleTool.js 9 ●●●● patch | view | raw | blame | history
applications/drone-command/src/utils/cesium/shapeTools/edit/EditEllipseTool.js 9 ●●●● patch | view | raw | blame | history
applications/drone-command/src/utils/cesium/shapeTools/edit/EditPolygonTool.js 7 ●●●● patch | view | raw | blame | history
applications/drone-command/src/utils/cesium/shapeTools/edit/EditRectangleTool.js 9 ●●●● patch | view | raw | blame | history
applications/drone-command/src/views/api.txt 28 ●●●● patch | view | raw | blame | history
applications/drone-command/src/views/areaManage/partition/FormDiaLog.vue 1 ●●●● patch | view | raw | blame | history
applications/task-work-order/src/styles/common/cockpit.scss 2 ●●● patch | view | raw | blame | history
applications/drone-command/src/utils/cesium/shapeTools/draw/DrawBufferCircleTool.js
@@ -42,7 +42,7 @@
        this.handler.setInputAction(movement => this.handleMouseMove(movement), Cesium.ScreenSpaceEventType.MOUSE_MOVE)
        this.drawStep = 0
        this.isCompleted = false
        this.tooltip.show('单击设置中心点', { x: 0, y: 0 })
        this.tooltip.hide()
    }
    handleLeftClick(click) {
@@ -108,7 +108,19 @@
    handleMouseMove(movement) {
        if (this.isCompleted) return
        this.tooltip.move(movement.endPosition)
        const tipText = this.drawStep === 0
            ? '单击设置中心点'
            : this.drawStep === 1
                ? '单击设置一级缓冲圆'
                : this.drawStep === 2
                    ? '单击设置二级缓冲圆'
                    : '单击设置三级缓冲圆'
        if (!this.tooltip?.isVisible) {
            this.tooltip.show(tipText, movement.endPosition)
        } else {
            this.tooltip.show(tipText)
            this.tooltip.move(movement.endPosition)
        }
        if (!this.isDrawing) return
        const position = this.getPositionFromScreen(movement.endPosition)
        if (!position) return
applications/drone-command/src/utils/cesium/shapeTools/draw/DrawEllipseTool.js
@@ -37,7 +37,7 @@
        this.handler.setInputAction(movement => this.handleMouseMove(movement), Cesium.ScreenSpaceEventType.MOUSE_MOVE)
        this.drawStep = 0
        this.isCompleted = false
        this.tooltip.show('单击设置中心点', { x: 0, y: 0 })
        this.tooltip.hide()
    }
    handleLeftClick(click) {
@@ -87,7 +87,17 @@
    handleMouseMove(movement) {
        if (this.isCompleted) return
        this.tooltip.move(movement.endPosition)
        const tipText = this.drawStep === 0
            ? '单击设置中心点'
            : this.drawStep === 1
                ? '单击设置长轴'
                : '单击设置短轴'
        if (!this.tooltip?.isVisible) {
            this.tooltip.show(tipText, movement.endPosition)
        } else {
            this.tooltip.show(tipText)
            this.tooltip.move(movement.endPosition)
        }
        if (!this.isDrawing) return
        const position = this.getPositionFromScreen(movement.endPosition)
        if (!position) return
applications/drone-command/src/utils/cesium/shapeTools/draw/DrawPolygonTool.js
@@ -34,7 +34,7 @@
        this.handler.setInputAction(click => this.handleRightClick(click), Cesium.ScreenSpaceEventType.RIGHT_CLICK)
        this.handler.setInputAction(movement => this.handleMouseMove(movement), Cesium.ScreenSpaceEventType.MOUSE_MOVE)
        this.isDrawing = true
        this.tooltip.show(this.getTipText(), { x: 0, y: 0 })
        this.tooltip.hide()
    }
    handleLeftClick(click) {
applications/drone-command/src/utils/cesium/shapeTools/draw/DrawRectangleTool.js
@@ -33,7 +33,7 @@
        this.handler.setInputAction(click => this.handleLeftClick(click), Cesium.ScreenSpaceEventType.LEFT_CLICK)
        this.handler.setInputAction(movement => this.handleMouseMove(movement), Cesium.ScreenSpaceEventType.MOUSE_MOVE)
        this.tooltip.show('单击设置起点', { x: 0, y: 0 })
        this.tooltip.hide()
    }
    handleLeftClick(click) {
@@ -60,14 +60,17 @@
    }
    handleMouseMove(movement) {
        if (!this.isDrawing) {
        const tipText = this.startPosition ? '单击结束绘制' : '单击设置起点'
        if (!this.tooltip?.isVisible) {
            this.tooltip.show(tipText, movement.endPosition)
        } else {
            this.tooltip.show(tipText)
            this.tooltip.move(movement.endPosition)
            return
        }
        if (!this.isDrawing) return
        const position = this.getPositionFromScreen(movement.endPosition)
        if (!position) return
        this.endPosition = position
        this.tooltip.move(movement.endPosition)
    }
    createEntities() {
applications/drone-command/src/utils/cesium/shapeTools/edit/EditBufferCircleTool.js
@@ -106,7 +106,7 @@
        this.handler.setInputAction(evt => this.handleLeftDown(evt), Cesium.ScreenSpaceEventType.LEFT_DOWN)
        this.handler.setInputAction(evt => this.handleMouseMove(evt), Cesium.ScreenSpaceEventType.MOUSE_MOVE)
        this.handler.setInputAction(() => this.handleLeftUp(), Cesium.ScreenSpaceEventType.LEFT_UP)
        this.tooltip.show('拖动控制点编辑', { x: 0, y: 0 })
        this.tooltip.hide()
    }
    handleLeftDown(evt) {
@@ -120,7 +120,12 @@
    }
    handleMouseMove(evt) {
        this.tooltip.move(evt.endPosition)
        if (!this.tooltip?.isVisible) {
            this.tooltip.show('拖动控制点编辑', evt.endPosition)
        } else {
            this.tooltip.show('拖动控制点编辑')
            this.tooltip.move(evt.endPosition)
        }
        if (!this.dragType) return
        const position = this.getPositionFromScreen(evt.endPosition)
        if (!position) return
applications/drone-command/src/utils/cesium/shapeTools/edit/EditEllipseTool.js
@@ -117,7 +117,7 @@
        this.handler.setInputAction(evt => this.handleLeftDown(evt), Cesium.ScreenSpaceEventType.LEFT_DOWN)
        this.handler.setInputAction(evt => this.handleMouseMove(evt), Cesium.ScreenSpaceEventType.MOUSE_MOVE)
        this.handler.setInputAction(() => this.handleLeftUp(), Cesium.ScreenSpaceEventType.LEFT_UP)
        this.tooltip.show('拖动控制点编辑', { x: 0, y: 0 })
        this.tooltip.hide()
    }
    handleLeftDown(evt) {
@@ -130,7 +130,12 @@
    }
    handleMouseMove(evt) {
        this.tooltip.move(evt.endPosition)
        if (!this.tooltip?.isVisible) {
            this.tooltip.show('拖动控制点编辑', evt.endPosition)
        } else {
            this.tooltip.show('拖动控制点编辑')
            this.tooltip.move(evt.endPosition)
        }
        if (!this.dragType) return
        const position = this.getPositionFromScreen(evt.endPosition)
        if (!position) return
applications/drone-command/src/utils/cesium/shapeTools/edit/EditPolygonTool.js
@@ -74,7 +74,12 @@
    }
    handleMouseMove(movement) {
        this.tooltip.show('拖动顶点编辑,右键删除点', movement.endPosition)
        if (!this.tooltip?.isVisible) {
            this.tooltip.show('????????????', movement.endPosition)
        } else {
            this.tooltip.show('????????????')
            this.tooltip.move(movement.endPosition)
        }
        if (!this.isDragging || this.draggedIndex < 0) return
        const position = this.getPositionFromScreen(movement.endPosition)
        if (!position) return
applications/drone-command/src/utils/cesium/shapeTools/edit/EditRectangleTool.js
@@ -47,7 +47,7 @@
        this.handler.setInputAction(evt => this.handleLeftDown(evt), Cesium.ScreenSpaceEventType.LEFT_DOWN)
        this.handler.setInputAction(evt => this.handleMouseMove(evt), Cesium.ScreenSpaceEventType.MOUSE_MOVE)
        this.handler.setInputAction(() => this.handleLeftUp(), Cesium.ScreenSpaceEventType.LEFT_UP)
        this.tooltip.show('拖动顶点编辑', { x: 0, y: 0 })
        this.tooltip.hide()
    }
    handleLeftDown(evt) {
@@ -60,7 +60,12 @@
    }
    handleMouseMove(evt) {
        this.tooltip.move(evt.endPosition)
        if (!this.tooltip?.isVisible) {
            this.tooltip.show('拖动顶点编辑', evt.endPosition)
        } else {
            this.tooltip.show('拖动顶点编辑')
            this.tooltip.move(evt.endPosition)
        }
        if (this.dragIndex == null) return
        const position = this.getPositionFromScreen(evt.endPosition)
        if (!position) return
applications/drone-command/src/views/api.txt
@@ -1,34 +1,22 @@
## 根据多边形区域查询派出所
## 列表
**接口地址**:`/area/fwPoliceStation/queryByPolygons`
**接口地址**:`/area/fwPoliceStation/list`
**请求方式**:`POST`
**请求方式**:`GET`
**请求数据类型**:`application/json`
**请求数据类型**:`application/x-www-form-urlencoded`
**响应数据类型**:`*/*`
**接口描述**:<p>传入多边形WKT字符串集合</p>
**接口描述**:<p>获取全部派出所</p>
**请求示例**:
```javascript
{
  "polygons": [
    "POLYGON((114.96898636473107 27.11156483383477,114.97972069576815 27.111564833834766,114.97972069576815 27.120473921808035,114.96898636473107 27.120473921808035,114.96898636473107 27.11156483383477))"
  ]
}
```
**请求参数**:
@@ -37,10 +25,7 @@
**请求参数**:
| 参数名称 | 参数说明 | 请求类型    | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|dto|派出所多边形区域查询入参|body|true|FwPoliceStationPolygonQueryDTO对象|FwPoliceStationPolygonQueryDTO对象|
|&emsp;&emsp;polygons|多边形WKT字符串集合||true|array|string|
暂无
**响应状态**:
@@ -49,7 +34,6 @@
| 状态码 | 说明 | schema |
| -------- | -------- | ----- | 
|200|OK|R«List«FwPoliceStationVO»»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
applications/drone-command/src/views/areaManage/partition/FormDiaLog.vue
@@ -1257,6 +1257,7 @@
    deviceListRequestToken += 1
    const requestToken = deviceListRequestToken
    const res = await fwDeviceListByPolygonsApi({
        areaId: dialogMode.value === 'add' ? '' : formData.value.id,
        isAreaSelect: 1,
        isTrack: 1,
        polygons,
applications/task-work-order/src/styles/common/cockpit.scss
@@ -1213,7 +1213,7 @@
  // }
  .el-input,
  .el-input-number {
    width: 0;
    min-width: 200px;
    flex: 1;
    .el-input__wrapper {