吉安感知网项目-前端
shuishen
2026-02-03 a30fdd7841fb5048cfb092c7b4059038e130105b
feat:优化调整
3 files modified
51 ■■■■■ changed files
applications/drone-command/src/views/areaManage/partition/FormDiaLog.vue 48 ●●●●● patch | view | raw | blame | history
applications/drone-command/src/views/areaManage/sceneConfig/index.vue 2 ●●● patch | view | raw | blame | history
applications/drone-command/src/views/basicManage/deviceStock/DeviceTrackDiaLog.vue 1 ●●●● patch | view | raw | blame | history
applications/drone-command/src/views/areaManage/partition/FormDiaLog.vue
@@ -260,6 +260,7 @@
import ellipseIcon from '@/assets/images/areaMap/ellipse.png'
import bufferIcon from '@/assets/images/areaMap/buffer.png'
import trashIcon from '@/assets/images/areaMap/trash.png'
import equipmentIcon from '@/assets/images/dataCockpit/map/equipment.png'
const initForm = () => ({
    areaName: '', // 区域名称
@@ -314,6 +315,7 @@
let viewEntity
let shapeDisplaySource
const deviceRangePrimitiveMap = new Map()
const deviceIconEntityMap = new Map()
const activeToolMode = ref('')
const suppressDeviceFly = ref(false)
const isDialogInitializing = ref(false)
@@ -437,6 +439,7 @@
            hideTypePanel()
            clearShapeDisplay()
            clearDeviceRangePrimitives()
            clearDeviceIconEntities()
        }
    }
)
@@ -504,10 +507,20 @@
    deviceRangePrimitiveMap.clear()
}
function clearDeviceIconEntities () {
    if (!viewer || !deviceIconEntityMap.size) return
    for (const entity of deviceIconEntityMap.values()) {
        viewer.entities.remove(entity)
    }
    deviceIconEntityMap.clear()
}
function clearDeviceListState () {
    deviceOptions.value = []
    selectedDeviceRows.value = []
    formData.value.deviceIds = ''
    clearDeviceRangePrimitives()
    clearDeviceIconEntities()
    if (deviceTableRef.value) {
        deviceTableRef.value.clearSelection()
    }
@@ -599,8 +612,10 @@
async function renderDeviceRangeSingle (device) {
    if (!viewer) return
    clearDeviceRangePrimitives()
    clearDeviceIconEntities()
    const position = getDeviceLngLat(device)
    if (!position) return
    addDeviceIconEntity(device, position)
    const rangeMeters = normalizeDeviceRange(device.effectiveRangeKm)
    const primitive = await createDeviceRangePrimitive(viewer, position, rangeMeters)
    if (!primitive) return
@@ -620,6 +635,12 @@
            deviceRangePrimitiveMap.delete(id)
        }
    }
    for (const [id, entity] of deviceIconEntityMap.entries()) {
        if (!nextIds.has(id)) {
            viewer.entities.remove(entity)
            deviceIconEntityMap.delete(id)
        }
    }
    const pendingRows = selectedRows.filter(row => {
        const id = String(row?.id)
        return id && !deviceRangePrimitiveMap.has(id)
@@ -628,14 +649,17 @@
    const primitives = await Promise.all(
        pendingRows.map(async row => {
            const position = getDeviceLngLat(row)
            if (!position) return { row, primitive: null }
            if (!position) return { row, primitive: null, position: null }
            const rangeMeters = normalizeDeviceRange(row.effectiveRangeKm)
            const primitive = await createDeviceRangePrimitive(viewer, position, rangeMeters)
            return { row, primitive }
            return { row, primitive, position }
        })
    )
    if (renderToken !== deviceRangeRenderToken) return
    primitives.forEach(({ row, primitive }) => {
    primitives.forEach(({ row, primitive, position }) => {
        if (position) {
            addDeviceIconEntity(row, position)
        }
        if (!primitive) return
        const id = String(row?.id)
        if (!nextIds.has(id)) return
@@ -665,6 +689,23 @@
function clearShapeDisplay () {
    if (!shapeDisplaySource) return
    shapeDisplaySource.entities.removeAll()
}
function addDeviceIconEntity (device, position) {
    if (!viewer || !position) return
    const id = String(device?.id ?? '')
    if (!id || deviceIconEntityMap.has(id)) return
    const entity = viewer.entities.add({
        position: Cesium.Cartesian3.fromDegrees(position.lng, position.lat, position.height || 0),
        billboard: {
            image: equipmentIcon,
            width: 28,
            height: 38,
            verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
            heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
        },
    })
    deviceIconEntityMap.set(id, entity)
}
function normalizeShapePoint (point) {
@@ -1357,6 +1398,7 @@
    initMap()
    clearShapeDisplay()
    clearDeviceRangePrimitives()
    clearDeviceIconEntities()
    viewEntity && viewer?.entities?.remove(viewEntity)
    viewEntity = null
    clearActiveTool()
applications/drone-command/src/views/areaManage/sceneConfig/index.vue
@@ -54,7 +54,7 @@
                    </el-table-column>
                    <el-table-column prop="areaCount" show-overflow-tooltip label="区域数量" />
                    <el-table-column prop="counterDeviceCount" show-overflow-tooltip label="反制设备数量" />
                    <el-table-column prop="detectDeviceCount" show-overflow-tooltip label="探测设备数量" />
                    <el-table-column prop="detectDeviceCount" show-overflow-tooltip label="侦测设备数量" />
                    <el-table-column label="操作" class-name="operation-btns">
                        <template v-slot="{ row }">
                            <el-link @click="openForm('view', row)">查看</el-link>
applications/drone-command/src/views/basicManage/deviceStock/DeviceTrackDiaLog.vue
@@ -140,6 +140,7 @@
        const payload = {
            ...formData.value,
            outTarget: selected?.label ?? formData.value.outTarget,
            outTargetCode: formData.value.outTarget
        }
        await fwDeviceTrackSubmitApi(payload)
        saveOperationLog({