|
|
@@ -377,7 +377,15 @@
|
|
|
-->
|
|
|
<PipeColorLegend :counts="pipeColorCountsView" />
|
|
|
<!-- 实体详情只占中央一张图;按来源栏靠近对应侧边,绝不覆盖侧栏。 -->
|
|
|
- <EntityDetailDrawer v-if="!introVisible && !facilityDetailOpen" :side="entityDetailSide" @locate-device="locateDeviceFromDetail" @focus-network="focusNetworkFromDetail" @open-work-order="openWorkOrderFromDetail" @open-relation="openRelationFromDetail" />
|
|
|
+ <EntityDetailDrawer
|
|
|
+ v-if="!introVisible && !facilityDetailOpen"
|
|
|
+ :side="entityDetailSide"
|
|
|
+ :underground-ready="undergroundReadyForDetail"
|
|
|
+ @locate-device="locateDeviceFromDetail"
|
|
|
+ @focus-network="focusNetworkFromDetail"
|
|
|
+ @open-work-order="openWorkOrderFromDetail"
|
|
|
+ @open-underground="openUndergroundFromDetail"
|
|
|
+ />
|
|
|
</section>
|
|
|
|
|
|
<PipeEnhancement
|
|
|
@@ -1069,10 +1077,13 @@ async function openWorkOrderFromDetail(workOrderCode) {
|
|
|
if (!workOrderCode) return false
|
|
|
if (facilityDetailOpen.value) entityDetailStore.close()
|
|
|
const orderId = await resolveWorkOrderId(workOrderCode)
|
|
|
+ // 记住来源详情:工单卡点 × 时退回刚才那张隐患/风险详情,而不是一路关掉。
|
|
|
+ const back = entityDetailStore.identity ? { ...entityDetailStore.identity } : null
|
|
|
// 反查不到(工单被删或超出列表范围)时仍按编号打开,由卡片如实说「详情暂未取到」。
|
|
|
return entityDetailStore.show(
|
|
|
{ kind: 'work-order', id: orderId || workOrderCode },
|
|
|
orderId ? { orderId } : {},
|
|
|
+ back ? { returnTo: back } : {},
|
|
|
)
|
|
|
}
|
|
|
|
|
|
@@ -1147,7 +1158,8 @@ async function focusNetworkFromDetail(networkCode) {
|
|
|
// 打开卡片与飞行并行:卡片一打开,设施图标就由 facilityPointStore 的选中点派生出来。
|
|
|
const [located] = await Promise.all([
|
|
|
pointLocateStore.focusFacilityPoint(identity, { network: pipeNetworkStore.layer.data }),
|
|
|
- entityDetailStore.show(identity, networkPrefill(networkCode)),
|
|
|
+ // 管网在基础设施详情端点里没有资源(实测 404),直接跳过远端请求,卡片用 prefill 就够。
|
|
|
+ entityDetailStore.show(identity, networkPrefill(networkCode), { skipRemote: true }),
|
|
|
])
|
|
|
return located
|
|
|
}
|
|
|
@@ -1237,23 +1249,33 @@ function handlePanelAction(action) {
|
|
|
return true
|
|
|
}
|
|
|
if (action.kind === 'warningType') return focusWarningType(action.key)
|
|
|
+ if (action.kind === 'historyType') return focusHistoryType(action.key)
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 预警类型排行 → 切「预警处置」模式的当前预警列表,并按该类型**本地**筛选(票 07 · G11)。
|
|
|
- *
|
|
|
- * 三步都必须真实发生:切模式(否则用户看不到列表)、切到预警族(排行是预警类型)、
|
|
|
- * 写本地筛选状态(不伪造服务端参数)。列表覆盖范围由 `eventStore.view.filterView` 如实回显。
|
|
|
- * @param {string} code warning_type 码(排行行的 `actionKey`)
|
|
|
- * @returns {boolean} 是否真的切了
|
|
|
+ * 概览「预警类型排行」是**近 30 日发生量**,点击落点是预警处置的**历史分析**类型筛选,
|
|
|
+ * 不是当前预警(已处理/已解除的类型在当前列表本来就看不到)。
|
|
|
*/
|
|
|
function focusWarningType(code) {
|
|
|
const key = typeof code === 'string' ? code.trim() : ''
|
|
|
if (!key) return false
|
|
|
uiStore.setMode('warningResponse')
|
|
|
- if (eventStore.mode !== EVENT_FAMILY.WARNING) eventStore.setMode(EVENT_FAMILY.WARNING)
|
|
|
- eventStore.setWarningTypeFilter(key, warningTypeLabel(key))
|
|
|
+ eventStore.clearWarningTypeFilter()
|
|
|
+ eventStore.setHistoryTypeFilter(key, warningTypeLabel(key))
|
|
|
+ void eventStore.loadPanels({ mode: EVENT_FAMILY.WARNING, range: '30d' })
|
|
|
+ return true
|
|
|
+}
|
|
|
+
|
|
|
+/** 预警分析「按事件类型」排行 → 同一条历史分析类型筛选;再点一次取消。 */
|
|
|
+function focusHistoryType(code) {
|
|
|
+ const key = typeof code === 'string' ? code.trim() : ''
|
|
|
+ if (!key) return false
|
|
|
+ if (eventStore.historyTypeFilter && eventStore.historyTypeFilter.code === key) {
|
|
|
+ eventStore.clearHistoryTypeFilter()
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ eventStore.setHistoryTypeFilter(key, warningTypeLabel(key))
|
|
|
return true
|
|
|
}
|
|
|
|
|
|
@@ -1511,6 +1533,13 @@ const facilityUndergroundReady = computed(() => Boolean(
|
|
|
facilityDetailOpen.value && facilityUndergroundTarget(currentFacilityRow.value),
|
|
|
))
|
|
|
|
|
|
+/** 实体详情抽屉里的地下设施能否进「地下管线详情视图」:管网一定能(按管段编码选中),窨井沿用设施判定。 */
|
|
|
+const undergroundReadyForDetail = computed(() => {
|
|
|
+ const category = entityDetailStore.identity && entityDetailStore.identity.category
|
|
|
+ if (category === 'PIPE_NETWORK') return true
|
|
|
+ return category === 'MANHOLE' && facilityUndergroundReady.value
|
|
|
+})
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 设备→设施真实关联索引(维护者 2026-10-22 批准的后端契约)。
|
|
|
@@ -1591,6 +1620,34 @@ const pipeColorCountsView = computed(() => pipeColorCounts(pipeNetworkStore.laye
|
|
|
*/
|
|
|
|
|
|
/** 「查看详情」:选中关联管段,既有三维视图随之打开(不新建第二条渲染链)。 */
|
|
|
+/**
|
|
|
+ * 详情卡里的「查看详情 →」:进「地下管线详情视图」。
|
|
|
+ *
|
|
|
+ * 管网没有设施点行(走的是实体详情抽屉),所以直接按管段编码选中三维视图;
|
|
|
+ * 其它地下设施仍走原有判定(要有可渲染的 3D 模型与坐标)。
|
|
|
+ */
|
|
|
+function openUndergroundFromDetail() {
|
|
|
+ const identity = entityDetailStore.identity
|
|
|
+ if (identity && identity.category === 'PIPE_NETWORK' && identity.id) {
|
|
|
+ return pipeEnhancementStore.select(PIPE_ENHANCEMENT_KIND.PIPE, identity.id)
|
|
|
+ }
|
|
|
+ openFacilityUnderground()
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 详情卡里的「查看详情 →」:进「地下管线详情视图」。
|
|
|
+ *
|
|
|
+ * 管网没有设施点行(走的是实体详情抽屉),所以直接按管段编码选中三维视图;
|
|
|
+ * 其它地下设施仍走原有判定(要有可渲染的 3D 模型与坐标)。
|
|
|
+ */
|
|
|
+function openUndergroundFromDetail() {
|
|
|
+ const identity = entityDetailStore.identity
|
|
|
+ if (identity && identity.category === 'PIPE_NETWORK' && identity.id) {
|
|
|
+ return pipeEnhancementStore.select(PIPE_ENHANCEMENT_KIND.PIPE, identity.id)
|
|
|
+ }
|
|
|
+ openFacilityUnderground()
|
|
|
+}
|
|
|
+
|
|
|
function openFacilityUnderground() {
|
|
|
const target = facilityUndergroundTarget(currentFacilityRow.value)
|
|
|
if (!target) return
|