|
|
@@ -47,7 +47,7 @@ import {
|
|
|
ringScaleAt,
|
|
|
} from '../domain/markerMetrics.js'
|
|
|
// 票 83:几何读数(本体宽 / 绘制宽 / pad)与计划读数同一出口,走查不读 DOM 内部结构。
|
|
|
-import { markerGeometryDataset, innerIconFor } from '../domain/markerPlan.js'
|
|
|
+import { markerGeometryDataset } from '../domain/markerPlan.js'
|
|
|
// 本票:未关联设备的屏幕拥挤聚合(纯 domain;本层只负责投影/渲染/点击)。
|
|
|
import { AGGREGATE_BADGE, AGGREGATE_KIND, aggregateBadge, canZoomAggregate, groupUnassociatedByScreen, planMemberList } from '../domain/pointAggregation.js'
|
|
|
|
|
|
@@ -919,6 +919,8 @@ function badgeFingerprint(badge) {
|
|
|
badge.otherAbnormalCount,
|
|
|
badge.mixedIndustry ? '1' : '0',
|
|
|
badge.industryKey,
|
|
|
+ badge.typeChar,
|
|
|
+ badge.typeColor,
|
|
|
badge.effect,
|
|
|
badge.tone,
|
|
|
statusFp,
|
|
|
@@ -929,8 +931,8 @@ function badgeFingerprint(badge) {
|
|
|
/**
|
|
|
* 聚合徽章节点(规格 69–72,**36px 方案**)。
|
|
|
*
|
|
|
- * 视觉:径向高光的玻璃质感圆盘 + 状态色描边/外辉光 + 中心成员数;
|
|
|
- * 左上角类型角标(同质行业图案 / 混合“混”)、右上角最高优先级异常数量(其余异常 +N 种);
|
|
|
+ * 布局(2026-11-24 维护者要求):中央 = **类型大字**(燃/水/排/井/混,行业色语义,
|
|
|
+ * 不使用设备图标);左上 = **数量提示圈(放大)**;右上 = 最高优先级异常数量(其余异常 +N 种);
|
|
|
* 下方类别短文案;外圈只挂一套与最高异常一致的聚合级特效。
|
|
|
*/
|
|
|
function buildUnassociatedAggregateNode(key, badge, tones) {
|
|
|
@@ -938,9 +940,9 @@ function buildUnassociatedAggregateNode(key, badge, tones) {
|
|
|
const toneHex = palette[badge.tone] || palette.neutral || '#01abea'
|
|
|
const abnormalTone = badge.abnormal ? (palette[badge.abnormal.tone] || toneHex) : toneHex
|
|
|
const size = AGGREGATE_BADGE.size
|
|
|
- const chip = AGGREGATE_BADGE.typeChip
|
|
|
+ const bubble = AGGREGATE_BADGE.countBubble
|
|
|
const corner = AGGREGATE_BADGE.statusCorner
|
|
|
- const half = size / 2
|
|
|
+ const typeColor = badge.typeColor || '#aab7c4'
|
|
|
|
|
|
const root = document.createElement('div')
|
|
|
root.className = NODE_CLASS + ' ' + NODE_CLASS + '--aggregate'
|
|
|
@@ -978,37 +980,31 @@ function buildUnassociatedAggregateNode(key, badge, tones) {
|
|
|
const sheen = document.createElement('div')
|
|
|
sheen.style.cssText = 'position:absolute;inset:1px;border-radius:50%;background:linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 52%);pointer-events:none;'
|
|
|
circle.appendChild(sheen)
|
|
|
- const countEl = document.createElement('span')
|
|
|
- countEl.textContent = String(badge.count)
|
|
|
- countEl.style.cssText = 'position:relative;color:#f4fbff;font:700 13px/1 "Bahnschrift","DIN Alternate","Segoe UI",monospace;letter-spacing:-0.02em;text-shadow:0 1px 3px rgba(0,0,0,0.85);'
|
|
|
- circle.appendChild(countEl)
|
|
|
+ // 中央 = 类型大字(行业色语义,不使用设备图标)。
|
|
|
+ const typeEl = document.createElement('span')
|
|
|
+ typeEl.textContent = badge.typeChar || '设'
|
|
|
+ typeEl.title = '类型:' + badge.typeLabel
|
|
|
+ typeEl.style.cssText = 'position:relative;color:' + typeColor + ';font:800 17px/1 "Microsoft YaHei UI","PingFang SC",sans-serif;text-shadow:0 0 8px ' + typeColor + '99, 0 1px 2px rgba(0,0,0,0.9);'
|
|
|
+ circle.appendChild(typeEl)
|
|
|
root.appendChild(circle)
|
|
|
|
|
|
- // 类型角标:同质单一行业 → 该行业图案;混合 → 通用「混」。
|
|
|
- const typeEl = document.createElement('div')
|
|
|
- typeEl.style.cssText = [
|
|
|
+ // 左上 = 数量提示圈(放大到 20px,可容纳三位数)。
|
|
|
+ const countEl = document.createElement('div')
|
|
|
+ countEl.textContent = String(badge.count)
|
|
|
+ countEl.title = badge.count + ' 台独立设备'
|
|
|
+ countEl.style.cssText = [
|
|
|
'position:absolute',
|
|
|
- 'left:' + (-Math.round(chip * 0.3)) + 'px',
|
|
|
- 'top:' + (-Math.round(chip * 0.3)) + 'px',
|
|
|
- 'width:' + chip + 'px', 'height:' + chip + 'px', 'border-radius:50%',
|
|
|
- 'background:radial-gradient(circle at 40% 30%, rgba(255,255,255,0.14), rgba(2,10,24,0.98) 70%)',
|
|
|
- 'border:1px solid ' + toneHex + '88',
|
|
|
- 'box-shadow:0 1px 4px rgba(0,0,0,0.65), 0 0 6px ' + toneHex + '33',
|
|
|
- 'display:flex', 'align-items:center', 'justify-content:center', 'overflow:hidden',
|
|
|
- 'color:#cfe9ff', 'font:700 8px/1 "Segoe UI",sans-serif',
|
|
|
+ 'left:' + (-Math.round(bubble * 0.35)) + 'px',
|
|
|
+ 'top:' + (-Math.round(bubble * 0.35)) + 'px',
|
|
|
+ 'min-width:' + bubble + 'px', 'height:' + bubble + 'px', 'padding:0 3px',
|
|
|
+ 'border-radius:' + Math.round(bubble / 2) + 'px',
|
|
|
+ 'background:linear-gradient(180deg, rgba(4,18,36,0.98), rgba(2,9,27,0.98))',
|
|
|
+ 'border:1.5px solid ' + typeColor,
|
|
|
+ 'box-shadow:0 0 8px ' + typeColor + '66, 0 2px 5px rgba(0,0,0,0.55)',
|
|
|
+ 'box-sizing:border-box', 'display:flex', 'align-items:center', 'justify-content:center',
|
|
|
+ 'color:#f4fbff', 'font:800 11px/1 "Bahnschrift","DIN Alternate","Segoe UI",monospace',
|
|
|
].join(';')
|
|
|
- const iconKey = badge.industryKey ? innerIconFor(badge.industryKey) : ''
|
|
|
- if (iconKey) {
|
|
|
- const img = document.createElement('img')
|
|
|
- img.alt = badge.typeLabel
|
|
|
- img.style.cssText = 'width:' + (chip - 4) + 'px;height:' + (chip - 4) + 'px;display:block;'
|
|
|
- renderInnerIconUrl(iconKey).then((url) => { img.src = url }).catch(() => {})
|
|
|
- typeEl.appendChild(img)
|
|
|
- } else {
|
|
|
- typeEl.textContent = badge.mixedIndustry ? '混' : String(badge.typeLabel || '设').slice(0, 1)
|
|
|
- }
|
|
|
- typeEl.title = '类型:' + badge.typeLabel
|
|
|
- root.appendChild(typeEl)
|
|
|
+ root.appendChild(countEl)
|
|
|
|
|
|
// 异常角标:最高优先级异常数量;其余异常以紧凑 +N 种提示。
|
|
|
const statusEl = document.createElement('div')
|
|
|
@@ -1083,6 +1079,8 @@ function renderAggregates(groups, tones) {
|
|
|
record.root.dataset.aggregateStatus = badge.abnormal ? badge.abnormal.status : badge.primaryStatus
|
|
|
record.root.dataset.aggregateOther = String(badge.otherAbnormalCount)
|
|
|
record.root.dataset.aggregateType = badge.typeLabel
|
|
|
+ record.root.dataset.aggregateTypeChar = badge.typeChar
|
|
|
+ record.root.dataset.aggregateTypeColor = badge.typeColor
|
|
|
record.root.dataset.aggregateEffect = badge.effect
|
|
|
}
|
|
|
for (const [key, record] of aggregatePool.entries()) {
|