|
|
@@ -216,8 +216,32 @@ export const useDeviceLayerStore = defineStore('deviceLayerStore', () => {
|
|
|
const selected = detailStore.selection
|
|
|
const code = selected && selected.pointCode ? selected.pointCode : ''
|
|
|
|
|
|
- // 没有点位级选择(关闭了、或从地图点的是未关联设备)→ 图层立即撤下。
|
|
|
+ /**
|
|
|
+ * 独立设备(没有宿主点位)也要能上图。
|
|
|
+ *
|
|
|
+ * 这类目标 `pointCode` 为空,早先会直接落到下面的「没有点位级选择 → 图层撤下」分支,
|
|
|
+ * 于是揭示行**根本没机会生成**:点「定位设备」只飞相机,图标与锚定都没有依据
|
|
|
+ * (维护者 2026-12-02:Elements 里 data-enhancement-device-status 为 0 of 0)。
|
|
|
+ * 这里在撤下之前先认一次定位目标自带的设备行。
|
|
|
+ */
|
|
|
+ const revealDevice = options.revealDevice && options.revealDevice.device
|
|
|
+ ? revealRow(options.revealDevice.device, options.revealDevice.code)
|
|
|
+ : null
|
|
|
if (!code) {
|
|
|
+ if (revealDevice) {
|
|
|
+ token += 1
|
|
|
+ pointCode.value = ''
|
|
|
+ rows.value = markRaw([revealDevice])
|
|
|
+ counts.value = countPlacements([revealDevice])
|
|
|
+ total.value = 1
|
|
|
+ legend.value = associatedLegend(counts.value)
|
|
|
+ overlap.value = { k: 1, n: 1, maxFan: 10, groups: [], active: false, degraded: false }
|
|
|
+ effectsPlan.value = null
|
|
|
+ notice.value = { risky: false, text: '' }
|
|
|
+ painted.value = false
|
|
|
+ lastPlanKey = ''
|
|
|
+ return { total: 1, drawn: 1 }
|
|
|
+ }
|
|
|
token += 1
|
|
|
pointCode.value = ''
|
|
|
rows.value = []
|