EquipmentDetailSections.vue 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474
  1. <!--
  2. 设备详情的分区(票 11):档案 / 指标 / 预警 / 报警 / 工单状态 / 设备图片。
  3. 票 46 返工(维护者 2026-10-15 第 1 条):**弃用六块竖排的长滚动**,改为标签页切换
  4. 设备档案(默认,图片归此页下方)|最新指标|预警信息|报警信息|工单状态;
  5. 预警/报警列表每页最多 10 条。页签计划与分页边界都是
  6. domain 纯函数(`EQUIPMENT_TABS`/`panelsForTab`/`pagedRows`),组件只画结论。
  7. 票 59(统一分页批次一):**三清单(预警/报警/工单)都接共享 `PagerNav.vue`**
  8. (页码直达 + 输入框跳页 + 计数行),翻页窗口计算归 `domain/pagination.js` 单源,
  9. 本组件不再自画 pager、不再有第二份翻页算术;前后页/页码/跳页共用唯一出口
  10. `gotoPage(panel, target)`,越界夹回由 `pagedRows` 做。
  11. **渲染计划仍是六块独立分区**(t11 D1/D9):标签页只改呈现归属,
  12. 每块仍独立成败;指标页改读独立采集记录分区,按当前需求不画状态点/过期说明。
  13. 档案读失败但指标可用仍各自呈现,不能共用一个成败。
  14. 三种「没内容」在界面上的区别(票 16 的词汇,措辞由 domain/equipmentDetailView.js 给):
  15. 空数据 EMPTY → 「该分区当前没有数据」
  16. 失败 FAILED → 「该分区加载失败(其它分区不受影响)」
  17. 不可用 UNAVAILABLE → 「该分区数据不可用(其它分区不受影响)」
  18. 过期 STALE 是**有值**:内容照画,只是标签说「数据已过期,显示最后一次成功数据」。
  19. 事件高亮采用既有四级颜色词表;数值预警黄/报警红与等级提示点分别呈现。
  20. 票 12 在**工单状态这块里**接上了状态时间线(不新增第七块面板):
  21. 每张工单下面挂它自己的那条轨迹(`timelineSource()` 按工单编码配好)。
  22. 轨迹分区**独立于工单列表成败** —— 后端可在工单列表成功时单独把 `timelines` 标 FAILED
  23. (`SOURCE_SECTION_FAILED`),那时界面必须说「轨迹没取到」而不是"没有动作记录"。
  24. -->
  25. <template>
  26. <div ref="sectionsRoot" class="equipment-sections" data-equipment-sections :data-device-code="deviceCode">
  27. <!--
  28. 票 46 返工:标签页条。计数挂在页签上(预警/报警/工单才有;
  29. 维护者要「避免长滚动列表查找困难」——点之前就知道每页后面有多少条)。
  30. -->
  31. <div class="equipment-tabs" role="tablist" aria-label="设备详情分区切换" data-equipment-tabs>
  32. <button
  33. v-for="tab in tabs"
  34. :key="tab.name"
  35. type="button"
  36. role="tab"
  37. class="equipment-tabs__tab"
  38. :class="{ 'is-active': tab.name === activeTab }"
  39. :aria-selected="tab.name === activeTab"
  40. :data-equipment-tab="tab.name"
  41. :data-tab-count="tab.count || ''"
  42. @click="activeTab = tab.name"
  43. >
  44. {{ tab.label }}<b v-if="tab.count" class="equipment-tabs__count">{{ tab.count }}</b>
  45. </button>
  46. </div>
  47. <!--
  48. 当前页签的面板(档案页含两块:档案 + 设备图片,所以 tabpanel 挂在**包装层**
  49. 而不是每块 section 上 —— 一个页签对应一个 tabpanel 才是正确的可访问语义)。
  50. -->
  51. <p v-if="aggregate?.retained" class="equipment-section__hint" data-detail-refresh-retained>本次详情更新未完成,保留上次已加载内容。</p>
  52. <div class="equipment-tab__body" role="tabpanel" data-equipment-tab-body>
  53. <section
  54. v-for="panel in activePanels"
  55. :key="panel.name"
  56. class="equipment-section"
  57. :class="{ 'equipment-section--video': panel.kind === 'metrics' && isCamera }"
  58. :data-equipment-section="panel.name"
  59. :data-panel-state="panel.section.state || 'empty'"
  60. :data-panel-retained="panel.section.retained ? 'true' : 'false'"
  61. >
  62. <header class="equipment-section__head">
  63. <span class="equipment-section__title">{{ panel.label }}</span>
  64. <SectionStateTag v-if="panel.kind !== 'metrics'" :name="panel.name" :section="panel.section" />
  65. </header>
  66. <!-- 过期分区在内容之上再点一次题(颜色之外的第二种提示,灰度下也读得出) -->
  67. <p v-if="panel.kind !== 'metrics' && panel.section.retained" class="equipment-section__stale" data-section-stale-note>
  68. {{ staleNote }}
  69. </p>
  70. <!-- ---------- 有内容:按 kind 分派 ---------- -->
  71. <template v-if="panel.kind === 'metrics' || panel.hasContent">
  72. <!--
  73. 票 46:分类查询条 —— 预警/报警/工单**共用这一块**(同一组绑定只写一处)。
  74. 分类归组在 domain(等级复用票 13 词表、工单复用 0–7 字典),组件只画 chips;
  75. 点分类只筛视图,不发请求、不动选择(筛选变化不丢详情上下文)。
  76. -->
  77. <template v-if="isFilterable(panel) && chipsOf(panel).length > 1">
  78. <div class="equipment-section__chips" role="group" :aria-label="`${panel.label}分类查询`" data-category-bar>
  79. <button
  80. v-for="chip in chipsOf(panel)"
  81. :key="chip.key || 'all'"
  82. type="button"
  83. class="equipment-section__chip"
  84. :class="{ 'is-active': chip.key === activeCategory(panel.name) }"
  85. :aria-pressed="chip.key === activeCategory(panel.name)"
  86. :data-category-chip="`${panel.name}:${chip.key || 'all'}`"
  87. @click="toggleCategory(panel.name, chip.key)"
  88. >
  89. {{ chip.label }} <b class="equipment-section__chip-count" data-category-count>{{ chip.count }}</b>
  90. </button>
  91. </div>
  92. <p v-if="categoryNoteText(panel)" class="equipment-section__note" data-category-note>{{ categoryNoteText(panel) }}</p>
  93. </template>
  94. <!-- 档案:键值行 -->
  95. <dl v-if="panel.kind === 'archive'" class="equipment-section__rows" data-archive-rows>
  96. <div v-for="row in rowsOf(panel)" :key="row.key" class="equipment-section__row" :data-archive-row="row.key">
  97. <dt>{{ row.label }}</dt>
  98. <dd :class="{ 'is-muted': isPlaceholder(row.value), 'equipment-section__mono': row.mono }">{{ row.value }}</dd>
  99. </div>
  100. </dl>
  101. <!-- 采集记录:最近50行;分页后只合并当前页相同采集时间。 -->
  102. <div v-else-if="panel.kind === 'metrics'" class="equipment-section__list" data-collection-records>
  103. <!-- 监控入口属于最新指标卡片本身,不再与指标框并列(维护者 2026-11-18)。 -->
  104. <p v-if="isCamera" class="equipment-section__hint" data-video-metrics-note>
  105. 视频监控通过下方入口查看实时画面与已有录像
  106. </p>
  107. <VideoMonitorEntry :device-code="deviceCode" :monitor-source="monitorSource" @device-resolved="videoDevice = $event" />
  108. <!-- 仅已确认的摄像机不呈现数值采集记录;其它设备保留独立分区的真实状态。 -->
  109. <template v-if="!isCamera">
  110. <p v-if="panel.section.state === 'failed'" class="equipment-section__hint" data-metrics-failed>
  111. 该分区加载失败(其它分区不受影响)
  112. </p>
  113. <p v-else-if="panel.section.state === 'unavailable'" class="equipment-section__hint" data-metrics-unavailable>
  114. 该分区数据不可用(其它分区不受影响)
  115. </p>
  116. <p v-else-if="!recordTableOf(panel).total" class="equipment-section__hint" data-metrics-empty>
  117. 暂无采集记录
  118. </p>
  119. <template v-else>
  120. <p class="equipment-section__note">采集记录(最近50条)</p>
  121. <div class="collection-table-wrap">
  122. <table v-if="recordTableOf(panel).total" class="collection-table" data-collection-table aria-label="设备最近采集记录">
  123. <thead>
  124. <tr>
  125. <th v-for="column in recordTableOf(panel).columns" :key="column.key" :class="{ 'collection-table__time': column.isTime, 'collection-table__audio-col': column.isAudio }">
  126. <span class="collection-table__heading" :title="column.label">{{ column.label }}</span>
  127. <span v-if="column.unit" class="collection-table__unit">({{ column.unit }})</span>
  128. </th>
  129. </tr>
  130. </thead>
  131. <tbody v-for="group in recordTableOf(panel).groups" :key="group.key"
  132. :class="{ 'collection-table__group--latest': group.isLatest }"
  133. :style="{ '--collection-accent': group.color }"
  134. :data-collection-group="group.key" :data-collection-group-state="group.state">
  135. <tr v-for="(row, rowIndex) in group.rows" :key="rowIndex" data-collection-row :class="{ 'collection-table__row--latest': group.isLatest }" :data-collection-latest="group.isLatest ? 'true' : undefined">
  136. <template v-for="(cell, cellIndex) in row.cells" :key="cell.key">
  137. <td
  138. v-if="!recordTableOf(panel).columns[cellIndex].isTime || row.timeRowspan > 0"
  139. data-collection-cell
  140. :data-reading-state="cell.assessment?.state"
  141. :style="cell.assessment ? { '--reading-color': cell.assessment.color } : undefined"
  142. :title="cell.assessment?.label"
  143. :rowspan="recordTableOf(panel).columns[cellIndex].isTime ? row.timeRowspan : undefined"
  144. :class="{ 'collection-table__time': recordTableOf(panel).columns[cellIndex].isTime, 'collection-table__audio-col': recordTableOf(panel).columns[cellIndex].isAudio }"
  145. >
  146. <template v-if="recordTableOf(panel).columns[cellIndex].isTime">
  147. <span v-if="group.isLatest" class="collection-table__latest-badge" data-collection-latest-badge>最新</span>
  148. <span class="collection-table__time-date">{{ row.createDate }}</span>
  149. <span v-if="row.createClock" class="collection-table__time-clock">{{ row.createClock }}</span>
  150. </template>
  151. <button v-else-if="cell.audioPath" type="button" class="collection-table__audio-button" data-collection-audio-open :aria-label="'播放' + (cell.audioLabel || '音频记录')" :title="cell.audioLabel || '播放音频'" @click="openRecordAudio(cell, $event)">
  152. <span aria-hidden="true">▶</span><span>播放</span>
  153. </button>
  154. <!--
  155. long 布局的格内是「指标名:读数」整条:名称走正文样式,
  156. 读数段与其它设备的指标值同一套等宽数字字体。
  157. -->
  158. <span
  159. v-else-if="cell.reading && cell.reading.label"
  160. class="collection-table__reading"
  161. >
  162. <span class="collection-table__reading-label">{{ cell.reading.label }}</span>
  163. <span class="collection-table__reading-result">
  164. <span class="collection-table__reading-value" :class="{ 'is-muted': isPlaceholder(cell.reading.value) }">{{ cell.reading.value }}</span>
  165. <MetricStateHint v-if="cell.assessment?.hint" :color="cell.assessment.hint.color"
  166. :label="cell.assessment.hint.label" :refresh-key="aggregate" />
  167. </span>
  168. </span>
  169. <span v-else class="collection-table__reading-result">
  170. <span :class="{ 'is-muted': isPlaceholder(cell.text), 'collection-table__value': cell.isReading }">{{ cell.text }}</span>
  171. <MetricStateHint v-if="cell.assessment?.hint" :color="cell.assessment.hint.color"
  172. :label="cell.assessment.hint.label" :refresh-key="aggregate" />
  173. </span>
  174. </td>
  175. </template>
  176. </tr>
  177. </tbody>
  178. </table>
  179. </div>
  180. <p v-if="recordTableOf(panel).assessmentNote" class="equipment-section__hint" data-collection-assessment-note>{{ recordTableOf(panel).assessmentNote }}</p>
  181. <PagerNav
  182. :page="recordTableOf(panel).page"
  183. :page-count="recordTableOf(panel).pageCount"
  184. :total="recordTableOf(panel).total"
  185. list-name="采集记录"
  186. @page="(target) => gotoPage(panel, target)"
  187. />
  188. </template>
  189. </template>
  190. </div>
  191. <!--
  192. 预警 / 报警:条目默认可折叠(票 46)—— 折叠行给时间·名称·等级·状态·量值,
  193. 展开看详情(事件时间 / 状态 / 来源 / 关联设备,缺值给占位符)。
  194. 票 46 返工第 1 条:每页最多 10 条(上一页/下一页 + 页码;先筛后翻)。
  195. 分类 chips 在上面共用那一块。
  196. -->
  197. <div v-else-if="panel.kind === 'events'" class="equipment-section__list" :data-event-list="panel.name">
  198. <details
  199. v-for="(event, index) in pagedOf(panel).rows"
  200. :key="event.code || index"
  201. class="equipment-section__item equipment-section__item--collapsible"
  202. :class="{ 'equipment-section__item--active': event.active }"
  203. :style="{ '--detail-accent': event.activeColor }"
  204. :open="isDetailOpen(panel, event, index)"
  205. @toggle="rememberDetailToggle(panel, event, index, $event)"
  206. :data-event="event.code || index"
  207. :data-event-level-color="event.levelColor"
  208. :data-item-active="event.active ? 'true' : 'false'"
  209. data-history-item
  210. >
  211. <summary class="equipment-section__item-head">
  212. <!-- 标题=单号;内容=描述、时间、等级、状态;右下角提示可展开看详情。 -->
  213. <span class="equipment-section__item-name equipment-section__mono" data-event-title>{{ event.title }}</span>
  214. <span v-if="event.description" class="equipment-section__item-desc" data-event-desc>{{ event.description }}</span>
  215. <span class="equipment-section__meta" data-event-meta>
  216. <span data-event-level :data-tone="event.levelTone">{{ event.levelText }}</span>
  217. <!-- 维护者 2026-11-13:不再用笼统的「未解除」徽标,直接高亮真实状态。 -->
  218. <span v-if="event.status" class="equipment-section__status-badge"
  219. :data-event-status="event.status" :data-status-tone="event.statusTone"
  220. :data-tone="event.statusTone">{{ event.status }}</span>
  221. <span v-if="event.workOrderStateName" class="equipment-section__status-badge"
  222. data-work-order-state-badge :data-tone="event.workOrderStateTone">工单 {{ event.workOrderStateName }}</span>
  223. <span v-if="event.timeText" data-event-time>{{ event.timeText }}</span>
  224. </span>
  225. <span class="equipment-section__item-more" aria-hidden="true" data-event-more>点击查看详情 ›</span>
  226. </summary>
  227. <dl class="equipment-section__detail" data-history-detail>
  228. <div v-for="row in eventDetailRows(event)" :key="row.label" class="equipment-section__detail-row" :data-detail-row="row.label">
  229. <dt>{{ row.label }}</dt>
  230. <dd :data-tone="row.tone || undefined" :class="{ 'equipment-section__detail-value--tone': row.tone }">
  231. <template v-if="row.badge"><span class="equipment-section__order-code">{{ row.value }}</span><span class="equipment-section__order-state" :data-tone="row.tone">{{ row.badge }}</span></template>
  232. <template v-else>{{ row.value }}</template>
  233. </dd>
  234. </div>
  235. </dl>
  236. </details>
  237. <p v-if="!pagedOf(panel).total" class="equipment-section__hint" data-section-empty-list>
  238. {{ rowsOf(panel).length ? '当前分类下没有记录(换一个分类或点「全部」)' : emptyList(panel.label) }}
  239. </p>
  240. <!-- 分页控件(票 59 共享 PagerNav,前后页/页码/跳页同一个 @page 出口) -->
  241. <PagerNav
  242. :page="pagedOf(panel).page"
  243. :page-count="pagedOf(panel).pageCount"
  244. :total="pagedOf(panel).total"
  245. :list-name="panel.label"
  246. @page="(target) => gotoPage(panel, target)"
  247. />
  248. </div>
  249. <!--
  250. 工单状态:状态名(缺则按状态字典补)+ 关键时间 + 每张工单自己的状态时间线(票 12)。
  251. 票 46:条目默认可折叠,展开保留事件时间/状态/来源/关联对象 + 计划与实际结案时间。
  252. 「没有动作记录」那句仍由 `timeline.hasContent` 门控(票 12 的 F9 守卫逐字钉住)。
  253. 票 59:接入统一分页(每页 ≤10,先分类后翻页)。
  254. -->
  255. <div v-else-if="panel.kind === 'orders'" class="equipment-section__list" data-work-order-list>
  256. <details
  257. v-for="(order, index) in pagedOf(panel).rows"
  258. :key="order.code || index"
  259. class="equipment-section__item equipment-section__item--collapsible"
  260. :class="{ 'equipment-section__item--active': order.active }"
  261. :style="{ '--detail-accent': order.activeColor }"
  262. :open="isDetailOpen(panel, order, index)"
  263. @toggle="rememberDetailToggle(panel, order, index, $event)"
  264. :data-work-order="order.code || index"
  265. :data-work-order-state="order.stateCode"
  266. :data-item-active="order.active ? 'true' : 'false'"
  267. data-history-item
  268. >
  269. <summary class="equipment-section__item-head equipment-section__wo-head">
  270. <!-- 维护者 2026-11-13:按管理端工单卡片排版(工单号+状态、描述、关联设备、位置、故障时间、查看详情)。 -->
  271. <span class="equipment-section__wo-title">
  272. <span class="equipment-section__wo-label">工单号</span>
  273. <span class="equipment-section__mono" data-work-order-code>{{ order.title }}</span>
  274. <span class="equipment-section__status-badge" :data-work-order-state-name="order.stateName"
  275. :data-tone="order.active ? 'lv3' : 'lv4'">{{ order.stateName }}</span>
  276. </span>
  277. <span class="equipment-section__wo-row">
  278. <span class="equipment-section__wo-label">工单描述</span>
  279. <span data-work-order-desc>{{ order.description || '—' }}</span>
  280. </span>
  281. <span class="equipment-section__wo-row">
  282. <span class="equipment-section__wo-label">关联设备</span>
  283. <span class="equipment-section__wo-value" data-work-order-device>{{ order.deviceLabel }}</span>
  284. <button v-if="order.deviceCode" type="button" class="equipment-section__locate"
  285. :data-locate-device="order.deviceCode" @click.stop="locateDevice(order.deviceCode)">定位设备</button>
  286. </span>
  287. <span class="equipment-section__wo-row">
  288. <span class="equipment-section__wo-label">设备位置</span>
  289. <span data-work-order-location>{{ order.deviceLocation }}</span>
  290. </span>
  291. <span class="equipment-section__wo-row">
  292. <span class="equipment-section__wo-label">故障时间</span>
  293. <span data-work-order-fault-time>{{ order.faultTimeText || order.timeText || '—' }}</span>
  294. </span>
  295. <span class="equipment-section__item-more" aria-hidden="true" data-work-order-more>查看详情 ›</span>
  296. </summary>
  297. <!-- 维护者 2026-11-23:详情分「工单信息 / 处置流程」两个子页签,各自独立查看。 -->
  298. <div class="equipment-section__wo-tabs" role="tablist" data-work-order-tabs>
  299. <button
  300. v-for="tab in WORK_ORDER_DETAIL_TABS"
  301. :key="tab.key"
  302. type="button"
  303. role="tab"
  304. class="equipment-section__wo-tab"
  305. :data-work-order-tab="tab.key"
  306. :data-active="woTabOf(order) === tab.key ? 'true' : 'false'"
  307. :aria-selected="woTabOf(order) === tab.key ? 'true' : 'false'"
  308. @click="setWoTab(order, tab.key)"
  309. >{{ tab.label }}</button>
  310. </div>
  311. <template v-if="woTabOf(order) === 'info'">
  312. <dl class="equipment-section__detail equipment-section__wo-detail" data-history-detail>
  313. <div v-for="row in workOrderDetailRows(order)" :key="row.label" class="equipment-section__detail-row" :data-detail-row="row.label">
  314. <dt>{{ row.label }}</dt>
  315. <dd>{{ row.value }}</dd>
  316. </div>
  317. </dl>
  318. <!-- 维修前/后附件:缩略图直接点开查看(维护者 2026-11-23)。 -->
  319. <div
  320. v-for="group in workOrderAttachmentGroups(order)"
  321. :key="group.key"
  322. class="equipment-section__wo-attachments"
  323. :data-work-order-images="group.key"
  324. >
  325. <span class="equipment-section__wo-label">{{ group.label }}附件</span>
  326. <ImageGallery :items="proofItems(order, group)" />
  327. </div>
  328. </template>
  329. <!--
  330. 票 12:这张工单自己的状态路径 + 动作轨迹。
  331. · 轨迹分区拿到了数据 → 完整轨迹(状态路径 + 动作流水);
  332. · 轨迹分区失败/为空 → **仍铺状态路径**(当前状态码在工单列表里,
  333. 本来就拿得到),只是没有动作流水。因为"轨迹没取到"而连
  334. "这张工单现在在哪一态"也一起不画,等于丢掉已有的信息。
  335. 分区自己的成败由下面那条整块占位说明如实交代。
  336. -->
  337. <template v-else>
  338. <WorkOrderTimeline
  339. v-if="trackOfOrder(order)"
  340. :track="trackOfOrder(order)"
  341. :path-only="!timeline.hasContent"
  342. />
  343. <p v-else-if="timeline.hasContent" class="equipment-section__hint" data-wo-timeline-missing>
  344. 这张工单没有动作记录
  345. </p>
  346. </template>
  347. </details>
  348. <!-- 轨迹分区自己失败/为空:整块说一句(不按每张工单重复同一句话,那是噪音) -->
  349. <p v-if="timeline.placeholder" class="equipment-section__hint" data-wo-timeline-placeholder>
  350. {{ timeline.placeholder }}
  351. </p>
  352. <p v-if="!pagedOf(panel).total" class="equipment-section__hint" data-section-empty-list>
  353. {{ rowsOf(panel).length ? '当前分类下没有记录(换一个分类或点「全部」)' : emptyList('工单') }}
  354. </p>
  355. <!-- 分页控件(票 59 共享 PagerNav,与预警/报警同一控件、同一出口) -->
  356. <PagerNav
  357. :page="pagedOf(panel).page"
  358. :page-count="pagedOf(panel).pageCount"
  359. :total="pagedOf(panel).total"
  360. :list-name="panel.label"
  361. @page="(target) => gotoPage(panel, target)"
  362. />
  363. </div>
  364. <!-- 设备图片:只画后端指定的那一张(前端不索引、不挑选) -->
  365. <figure v-else-if="panel.kind === 'image'" class="equipment-section__figure" data-latest-image>
  366. <ImageGallery
  367. :key="deviceImageKey(panel)"
  368. :items="deviceImageItems(panel)"
  369. size="large"
  370. hint="点击放大"
  371. empty-text="后端未提供该设备的图片"
  372. :style="{ '--image-gallery-max-height': 'calc(140 * var(--u, 1px))' }"
  373. />
  374. <figcaption v-if="image(panel).hasImage" class="equipment-section__meta">拍摄于 {{ image(panel).capturedAt }}</figcaption>
  375. </figure>
  376. </template>
  377. <!-- ---------- 没内容:如实说,不画空框冒充数据 ---------- -->
  378. <p v-else class="equipment-section__hint" data-section-placeholder>{{ panel.placeholder }}</p>
  379. <!-- 字段缺失:只说条数,具体路径进 tooltip(不漏接口字段名给值班人员) -->
  380. <p
  381. v-if="panel.missing.count"
  382. class="equipment-section__missing"
  383. data-section-missing
  384. :data-missing-count="panel.missing.count"
  385. :title="panel.missing.tooltip"
  386. >
  387. {{ panel.missing.text }}
  388. </p>
  389. </section>
  390. </div>
  391. <!--
  392. 音频播放条:贴在播放键上方渐入的小浮层(Teleport 到 body,避免被滚动容器裁剪)。
  393. 不再用居中大弹窗/背景虚化;点击外部、滚动或 Esc 都会收起。
  394. -->
  395. <Teleport to="body">
  396. <div
  397. v-if="activeAudioPath"
  398. ref="audioPlayer"
  399. class="collection-audio-player"
  400. :class="{ 'is-below': audioPlacement.below }"
  401. :style="audioPlayerStyle"
  402. data-collection-audio-player
  403. >
  404. <div class="collection-audio-player__head">
  405. <span class="collection-audio-player__label">{{ activeAudioLabel }}</span>
  406. <button type="button" class="collection-audio-player__close" aria-label="关闭播放条" @click="closeAudioPlayer">×</button>
  407. </div>
  408. <audio v-if="activeAudioUrl" class="collection-audio-player__audio" controls preload="metadata" :src="activeAudioUrl" />
  409. </div>
  410. </Teleport>
  411. </div>
  412. </template>
  413. <script setup>
  414. import { computed, nextTick, onBeforeUnmount, ref, watch } from 'vue'
  415. import { resolveDeviceImageUrl } from '../services/deviceImage.js'
  416. import { DETAIL_PLACEHOLDER } from '../domain/detailFlow.js'
  417. import {
  418. DEFAULT_EQUIPMENT_TAB,
  419. EVENT_CATEGORY_ORDER,
  420. EQUIPMENT_TABS,
  421. WORK_ORDER_CATEGORY_ORDER,
  422. archiveRows,
  423. categoryChips,
  424. categoryNote,
  425. emptyListText,
  426. equipmentPanels,
  427. eventDetailRows,
  428. eventRows,
  429. filterByCategory,
  430. imageView,
  431. collectionRecordTable,
  432. pagedRows,
  433. panelsForTab,
  434. prioritizeActiveRows,
  435. tabCount,
  436. timelineSource,
  437. workOrderDetailRows,
  438. workOrderAttachmentGroups,
  439. workOrderRows,
  440. } from '../domain/equipmentDetailView.js'
  441. import { pathOnlyTrack } from '../domain/workOrderTimeline.js'
  442. import VideoMonitorEntry from './VideoMonitorEntry.vue'
  443. import SectionStateTag from './SectionStateTag.vue'
  444. import WorkOrderTimeline from './WorkOrderTimeline.vue'
  445. import PagerNav from './PagerNav.vue'
  446. import MetricStateHint from './MetricStateHint.vue'
  447. import ImageGallery from './ImageGallery.vue'
  448. const props = defineProps({
  449. /** `stores/detailStore.js` 的 `sections.equipmentAggregate`。 */
  450. aggregate: { type: Object, default: null },
  451. /** 当前选中的设备编码(分区头与图片 alt 用)。 */
  452. deviceCode: { type: String, default: '' },
  453. monitorSource: { type: String, default: 'detail' },
  454. })
  455. const emit = defineEmits(['locate-device'])
  456. /** 工单卡「关联设备」定位:#131 统一由外壳的 pointLocateStore 处理。 */
  457. function locateDevice(code) {
  458. if (code) emit('locate-device', code)
  459. }
  460. const sectionsRoot = ref(null)
  461. const panels = computed(() => equipmentPanels(props.aggregate))
  462. const videoDevice = ref(null)
  463. // 档案 type 是 deviceType 的领域字段;只认当前设备的摄像机正证据,不以能力查询失败推断传感器。
  464. const isCamera = computed(() => {
  465. const archive = panels.value.find((panel) => panel.kind === 'archive')?.section.data
  466. return String(archive?.type ?? '').trim() === '20'
  467. || (videoDevice.value?.deviceCode === props.deviceCode && videoDevice.value?.typeCode === '20')
  468. })
  469. /**
  470. * 工单详情的两个子页签(维护者 2026-11-23:信息与流水分开看,便于查看)。
  471. * 停在哪个页签**按工单号记忆**,互不影响;默认停在「工单信息」。
  472. */
  473. const WORK_ORDER_DETAIL_TABS = [
  474. { key: 'info', label: '工单信息' },
  475. { key: 'flow', label: '处置流程' },
  476. ]
  477. const woTabs = ref({})
  478. function woTabOf(order) {
  479. return woTabs.value[order?.code] || 'info'
  480. }
  481. function setWoTab(order, key) {
  482. if (!order?.code || woTabOf(order) === key) return
  483. woTabs.value = { ...woTabs.value, [order.code]: key }
  484. }
  485. /** 工单维修前/后附件:alt 标出组别与序号,caption 带工单号(读屏与悬浮都能分清是哪一组)。 */
  486. function proofItems(order, group) {
  487. const title = order?.title || '工单'
  488. return (group.images || []).map((path, index) => ({
  489. url: path,
  490. alt: `${group.label}附件${index + 1}`,
  491. caption: `${title} · ${group.label}附件`,
  492. }))
  493. }
  494. // ---- 票 46 返工第 1 条:标签页切换(弃用六块竖排的长滚动)----
  495. /** 页签清单(domain 给顺序与背后的分区归属;计数给预警/报警/工单三页)。 */
  496. const tabs = computed(() =>
  497. EQUIPMENT_TABS.map((tab) => ({ ...tab, count: tabCount(panels.value, tab.name) })),
  498. )
  499. /** 当前页签(默认「设备档案」;换设备复位,不把 A 的页签停在 B 上)。 */
  500. const activeTab = ref(DEFAULT_EQUIPMENT_TAB)
  501. // 同设备刷新只更新内容;DOM 重排后保留内部及外层详情的滚动位置与可见条目。
  502. let scrollRevision = 0
  503. watch([() => props.aggregate, () => props.deviceCode], (_current, previous) => {
  504. const revision = ++scrollRevision
  505. const device = props.deviceCode
  506. const sameDevice = previous[1] === device
  507. const tab = activeTab.value
  508. const positions = []
  509. const items = Array.from(sectionsRoot.value?.querySelectorAll?.('[data-collection-record-key], [data-history-item]') || [])
  510. for (let element = sectionsRoot.value; element; element = element.parentElement) {
  511. if (typeof document !== 'undefined' && (element === document.body || element === document.documentElement)) break
  512. if (typeof element.scrollTop === 'number' && (element.scrollTop || element.scrollHeight > element.clientHeight)) {
  513. const rect = element.getBoundingClientRect?.()
  514. const anchor = rect && items.find((item) => {
  515. const bounds = item.getBoundingClientRect()
  516. return bounds.bottom > rect.top && bounds.top < rect.bottom
  517. })
  518. const key = anchor && (anchor.getAttribute('data-collection-record-key') || anchor.getAttribute('data-event') || anchor.getAttribute('data-work-order'))
  519. positions.push({ element, top: element.scrollTop, left: element.scrollLeft,
  520. key: key && key !== DETAIL_PLACEHOLDER ? key : '',
  521. offset: anchor ? anchor.getBoundingClientRect().top - rect.top : 0,
  522. })
  523. }
  524. }
  525. nextTick(() => {
  526. if (revision !== scrollRevision || device !== props.deviceCode || (sameDevice && tab !== activeTab.value)) return
  527. if (!sameDevice) {
  528. for (const { element } of positions) { element.scrollTop = 0; element.scrollLeft = 0 }
  529. return
  530. }
  531. const currentItems = Array.from(sectionsRoot.value?.querySelectorAll?.('[data-collection-record-key], [data-history-item]') || [])
  532. for (const { element, top, left, key, offset } of positions) {
  533. if (element.isConnected === false) continue
  534. const anchor = key && currentItems.find((item) =>
  535. [item.getAttribute('data-collection-record-key'), item.getAttribute('data-event'), item.getAttribute('data-work-order')].includes(key))
  536. // 新记录插到前面时仍跟住原来正在看的条目;条目已移除才退回像素位置。
  537. element.scrollTop = anchor ? element.scrollTop + anchor.getBoundingClientRect().top - element.getBoundingClientRect().top - offset : top
  538. element.scrollLeft = left
  539. }
  540. })
  541. }, { flush: 'pre' })
  542. onBeforeUnmount(() => { scrollRevision += 1 })
  543. /** 当前页签要渲染的面板(保留渲染计划自己的次序;图片随档案页出现)。 */
  544. const activePanels = computed(() => panelsForTab(panels.value, activeTab.value))
  545. /**
  546. * 时间线来源(票 12):按工单编码配好的轨迹 + 轨迹分区自己的状态。
  547. * 只算一次 —— 每张工单渲染时都去重算会把 O(n²) 的判断塞进模板。
  548. */
  549. const timeline = computed(() => timelineSource(props.aggregate))
  550. const staleNote = '数据已过期 · 显示最后一次成功数据,不是实时值'
  551. // ---- 票 46:分类查询与历史折叠(**视图本地状态**)----
  552. //
  553. // 为什么不进 store:分类/页码/折叠是「这一屏怎么看」,不是业务事实,也不是全局筛选条件。
  554. // 放进 `filterStore` 会让它跨设备、跨模式生效并触发重新取数 —— 那是把视图偏好
  555. // 冒充成数据条件(票 46 非目标明写「不改变后端事实与只读边界」)。
  556. // 组件卸载即消失;换设备时下面 `watch` 把它清掉,不残留成"A 的分类挂在 B 上"。
  557. /** 各分区当前生效的分类键(`{ [分区名]: 分类键 }`;空串/缺失=全部)。 */
  558. const categories = ref({})
  559. /** 各分区当前页码(1 起;预警/报警/工单三块都接入分页)。 */
  560. const pages = ref({})
  561. const recordTables = computed(() => Object.fromEntries(
  562. panels.value.filter((panel) => panel.kind === 'metrics').map((panel) => [panel.name, collectionRecordTable(panel.section.data, pages.value[panel.name] || 1)]),
  563. ))
  564. function recordTableOf(panel) {
  565. return recordTables.value[panel.name]
  566. }
  567. function recordKey(row) {
  568. if (!row.timeKey) return undefined
  569. return JSON.stringify([row.timeKey, row.cells.filter((cell) => cell.isReading).map((cell) => [cell.key, cell.reading?.label])])
  570. }
  571. const audioPlayer = ref(null)
  572. const activeAudioPath = ref('')
  573. const activeAudioLabel = ref('音频记录')
  574. const activeAudioUrl = computed(() => activeAudioPath.value ? resolveDeviceImageUrl(activeAudioPath.value) : '')
  575. const audioPlacement = ref({ left: 0, top: 0, below: false })
  576. const audioPlayerStyle = computed(() => ({
  577. left: `${audioPlacement.value.left}px`,
  578. top: `${audioPlacement.value.top}px`,
  579. }))
  580. let audioTriggerEl = null
  581. /** 打开播放条:以触发按钮为锚,默认在按钮上方渐入;顶部空间不足时翻到按钮下方。 */
  582. function openRecordAudio(cell, event) {
  583. if (!cell?.audioPath) return
  584. const rect = event?.currentTarget?.getBoundingClientRect?.()
  585. if (rect) {
  586. const margin = 132
  587. const left = Math.min(Math.max(rect.left + rect.width / 2, margin), Math.max(margin, window.innerWidth - margin))
  588. const below = rect.top < 96
  589. audioPlacement.value = { left: Math.round(left), top: Math.round(below ? rect.bottom : rect.top), below }
  590. }
  591. audioTriggerEl = event?.currentTarget || null
  592. activeAudioPath.value = cell.audioPath
  593. activeAudioLabel.value = cell.audioLabel || '音频记录'
  594. }
  595. function closeAudioPlayer() {
  596. if (!activeAudioPath.value) return
  597. activeAudioPath.value = ''
  598. audioTriggerEl = null
  599. }
  600. function audioOutsideHandler(event) {
  601. if (audioPlayer.value?.contains(event.target) || audioTriggerEl?.contains?.(event.target)) return
  602. closeAudioPlayer()
  603. }
  604. function audioEscapeHandler(event) {
  605. if (event.key === 'Escape') closeAudioPlayer()
  606. }
  607. function attachAudioGuards() {
  608. document.addEventListener('pointerdown', audioOutsideHandler, true)
  609. // 滚动时按钮会离开锚点,直接收起(capture 才能收到各滚动容器不冒泡的 scroll)。
  610. window.addEventListener('scroll', closeAudioPlayer, true)
  611. window.addEventListener('keydown', audioEscapeHandler, true)
  612. }
  613. function detachAudioGuards() {
  614. if (typeof document === 'undefined' || typeof window === 'undefined') return
  615. document.removeEventListener('pointerdown', audioOutsideHandler, true)
  616. window.removeEventListener('scroll', closeAudioPlayer, true)
  617. window.removeEventListener('keydown', audioEscapeHandler, true)
  618. }
  619. watch(activeAudioPath, (open) => { if (open) attachAudioGuards(); else detachAudioGuards() })
  620. onBeforeUnmount(detachAudioGuards)
  621. /** 某分区的行视图(未过滤)。 */
  622. function rowsOf(panel) {
  623. const data = panel.section.data
  624. if (panel.kind === 'archive') return archiveRows(data)
  625. if (panel.kind === 'orders') return workOrderRows(data)
  626. const orderPanel = panels.value.find((item) => item.kind === 'orders')
  627. return eventRows(data, (orderPanel && orderPanel.section.data) || [])
  628. }
  629. /** 这一块有没有分类查询(预警/报警/工单有;档案/指标/图片没有列表语义)。 */
  630. function isFilterable(panel) {
  631. return panel.kind === 'events' || panel.kind === 'orders'
  632. }
  633. /** 某分区的分类 chips(只有 events/orders 两类有;其它块回空数组,模板据此不画 chip 条)。 */
  634. function chipsOf(panel) {
  635. if (panel.kind !== 'events' && panel.kind !== 'orders') return []
  636. const order = panel.kind === 'orders' ? WORK_ORDER_CATEGORY_ORDER : EVENT_CATEGORY_ORDER
  637. return categoryChips(rowsOf(panel), order)
  638. }
  639. function activeCategory(panelName) {
  640. return categories.value[panelName] || ''
  641. }
  642. /** 点同一项取消(与票 37 的类型筛选同款交互:不需要额外的"清除"按钮就能撤)。 */
  643. function toggleCategory(panelName, key) {
  644. categories.value = { ...categories.value, [panelName]: activeCategory(panelName) === key ? '' : key }
  645. // 换分类 = 换结果集,页码回第 1 页(停在第 3 页看新分类会直接显示"没有记录")。
  646. pages.value = { ...pages.value, [panelName]: 1 }
  647. }
  648. /** 过滤后的行(chip 只筛视图,不动数据、不发请求)。 */
  649. function visibleRows(panel) {
  650. const rows = filterByCategory(rowsOf(panel), activeCategory(panel.name))
  651. if (panel.kind !== 'events' && panel.kind !== 'orders') return rows
  652. return prioritizeActiveRows(rows)
  653. }
  654. /** 过滤 + 分页后的窗口(domain 单源 `pagedRows` 收边界;票 59 三清单同一条路径,组件不再备第二份兜底形状)。 */
  655. function pagedOf(panel) {
  656. return pagedRows(visibleRows(panel), pages.value[panel.name] || 1)
  657. }
  658. /**
  659. * 翻页唯一出口(票 59):PagerNav 的前后页/页码直达/跳页都带**目标页码(1 起)**回来。
  660. * 这里只存状态,不另做夹取——越界统一由 domain `pagedRows` 在下一帧渲染时夹回(条文 6)。
  661. */
  662. function gotoPage(panel, target) {
  663. pages.value = { ...pages.value, [panel.name]: Number(target) || 1 }
  664. }
  665. function categoryNoteText(panel) {
  666. return categoryNote(chipsOf(panel), activeCategory(panel.name))
  667. }
  668. /**
  669. * 票 115 优化:未解除/未结案条目的展开状态。
  670. *
  671. * 切换页签时清空手动状态 ⇒ 进入对应页签时,active 条目默认展开;
  672. * 用户手动收起/展开后以手动状态为准(manualOpen[key]),不会每帧被默认值顶回去。
  673. */
  674. const manualOpen = ref({})
  675. function detailKey(panel, item, index) {
  676. return panel.name + '|' + (item.code || index)
  677. }
  678. function isDetailOpen(panel, item, index) {
  679. const key = detailKey(panel, item, index)
  680. return Object.hasOwn(manualOpen.value, key) ? manualOpen.value[key] : item.active === true
  681. }
  682. function rememberDetailToggle(panel, item, index, event) {
  683. const key = detailKey(panel, item, index)
  684. manualOpen.value = { ...manualOpen.value, [key]: event.target.open }
  685. }
  686. watch(activeTab, () => {
  687. manualOpen.value = {}
  688. })
  689. // 换设备:页签、分类条件与页码全部复位(不同设备的分布互不相干,留着就是拿 A 的状态看 B)。
  690. watch(
  691. () => props.deviceCode,
  692. () => {
  693. categories.value = {}
  694. pages.value = {}
  695. manualOpen.value = {}
  696. activeTab.value = DEFAULT_EQUIPMENT_TAB
  697. },
  698. )
  699. /**
  700. * 取某张工单的轨迹。
  701. *
  702. * 轨迹分区有数据 → 用它那条**完整**轨迹(按工单编码配,票 12 验收第 2 条);
  703. * 分区没数据(失败/空)→ 退回**只有状态路径**的那份(`pathOnlyTrack`),
  704. * 因为"这张工单现在在哪一态"来自工单列表,与轨迹成败无关,不该一起丢掉。
  705. */
  706. function trackOfOrder(order) {
  707. if (!order.code) return null
  708. const full = timeline.value.hasContent ? timeline.value.tracks[order.code] : null
  709. return full || pathOnlyTrack(order)
  710. }
  711. /** 设备图片视图:有没有后端点名的那一张、拍摄于何时(地址解析交给展示组件)。 */
  712. function image(panel) {
  713. return imageView(panel.section.data)
  714. }
  715. /**
  716. * 设备图片只有后端点名的那一张;没有就给空列表,由组件说「后端未提供」。
  717. *
  718. * 这里传**原始地址**,解析交给组件的唯一解析器:如果把已解析结果塞回去,
  719. * 解析器拒绝(带凭据 / 非法协议)时会变成空地址,界面就会把「地址不可用」
  720. * 误说成「后端未提供」,还会与下面的「拍摄于 …」自相矛盾。
  721. */
  722. function deviceImageItems(panel) {
  723. const view = image(panel)
  724. return view.hasImage ? [{ url: view.url, alt: `${props.deviceCode} 设备图片` }] : []
  725. }
  726. /** 换设备/换图时重建组件(连带复位预览与加载状态);用后端原始地址做键。 */
  727. function deviceImageKey(panel) {
  728. return image(panel).url
  729. }
  730. watch([() => props.deviceCode, activeTab], () => {
  731. closeAudioPlayer()
  732. })
  733. function emptyList(label) {
  734. return emptyListText(label)
  735. }
  736. function isPlaceholder(text) {
  737. return text === DETAIL_PLACEHOLDER
  738. }
  739. </script>
  740. <style scoped>
  741. .collection-table-wrap { min-width: 0; overflow-x: hidden; }
  742. .collection-table {
  743. width: 100%;
  744. table-layout: fixed;
  745. border-collapse: collapse;
  746. color: var(--text-primary, #e5f4ff);
  747. font-size: calc(11 * var(--u, 1px));
  748. }
  749. .collection-table th,
  750. .collection-table td {
  751. min-width: 0;
  752. padding: calc(4 * var(--u, 1px)) calc(3 * var(--u, 1px));
  753. border: 1px solid rgba(69, 161, 226, .16);
  754. text-align: left;
  755. vertical-align: middle;
  756. }
  757. .collection-table th {
  758. color: #a6d8ff;
  759. background: rgba(29, 83, 124, .25);
  760. font-size: calc(10 * var(--u, 1px));
  761. letter-spacing: .02em;
  762. line-height: 1.2;
  763. }
  764. .collection-table__heading {
  765. display: inline-block;
  766. max-width: 100%;
  767. overflow: hidden;
  768. color: inherit;
  769. font-weight: 600;
  770. text-overflow: ellipsis;
  771. vertical-align: bottom;
  772. white-space: nowrap;
  773. word-break: keep-all;
  774. }
  775. .collection-table__unit {
  776. white-space: normal;
  777. word-break: break-word;
  778. overflow-wrap: anywhere;
  779. font-size: .92em;
  780. }
  781. .collection-table td { background: rgba(7, 27, 48, .35); font-variant-numeric: tabular-nums; line-height: 1.35; overflow-wrap: anywhere; }
  782. .collection-table tbody:not(.collection-table__group--latest):nth-of-type(even) td { background: rgba(7, 27, 48, .22); }
  783. .collection-table tbody:not(.collection-table__group--latest) tr:hover td { background: rgba(1, 171, 234, .12); }
  784. /* 渐变只画在整次采集的行组上,td 透明;长表 rowspan 的时间格也共用同一张背景。 */
  785. .collection-table__group--latest {
  786. --reading-color: var(--lv4, #27d17a);
  787. background: linear-gradient(90deg, color-mix(in srgb, var(--collection-accent) 24%, transparent), rgba(7, 27, 48, .28) 100%);
  788. }
  789. .collection-table .collection-table__group--latest td {
  790. background: transparent;
  791. border-color: color-mix(in srgb, var(--collection-accent) 30%, transparent);
  792. }
  793. .collection-table__group--latest tr:first-child td:first-child { box-shadow: inset 3px 0 0 var(--collection-accent); }
  794. .collection-table__group--latest:hover {
  795. background: linear-gradient(90deg, color-mix(in srgb, var(--collection-accent) 30%, transparent), rgba(7, 27, 48, .34) 100%);
  796. }
  797. .collection-table__latest-badge {
  798. display: inline-flex;
  799. align-items: center;
  800. margin-bottom: calc(2 * var(--u, 1px));
  801. padding: 0 calc(5 * var(--u, 1px));
  802. border: 1px solid color-mix(in srgb, var(--collection-accent) 65%, transparent);
  803. border-radius: 999px;
  804. background: color-mix(in srgb, var(--collection-accent) 16%, transparent);
  805. color: var(--collection-accent);
  806. font-size: var(--fs-caption, 10.5px);
  807. line-height: calc(16 * var(--u, 1px));
  808. letter-spacing: .04em;
  809. white-space: nowrap;
  810. }
  811. /* 采集时间已拆两行(日期 10 字符是最宽一行),定宽按内容收紧,
  812. 余量让给右侧指标列(维护者 2026-11-06 反馈:125u 约剩一半空白)。 */
  813. .collection-table__time { width: calc(82 * var(--u, 1px)); }
  814. .collection-table__time-date,
  815. .collection-table__time-clock { display: block; white-space: nowrap; }
  816. .collection-table__audio-col { width: calc(72 * var(--u, 1px)); }
  817. .collection-table__audio-button {
  818. display: inline-flex;
  819. align-items: center;
  820. justify-content: center;
  821. gap: calc(3 * var(--u, 1px));
  822. width: 100%;
  823. min-width: 0;
  824. padding: calc(3 * var(--u, 1px)) calc(4 * var(--u, 1px));
  825. border: 1px solid rgba(1, 171, 234, .5);
  826. border-radius: 999px;
  827. background: rgba(1, 91, 150, .26);
  828. color: #b8e8ff;
  829. font: inherit;
  830. white-space: nowrap;
  831. cursor: pointer;
  832. }
  833. .collection-table__audio-button:hover,
  834. .collection-table__audio-button:focus-visible { border-color: #ffb020; color: #ffd08a; outline: none; }
  835. /* 指标读数排版(wide / long 两种布局共用这一套,不因列名不同而脱节):
  836. 字体与左右侧面板 KPI 数值(.panel-kpi__value)同档 --num(Rajdhani / Share Tech Mono…,
  837. 单源 tokens.css);字号按表格密度自 22u KPI 档收到 13.5u;满不透明度的 --text-strong
  838. 高亮白并加粗,读数在大屏上一眼可读;读数相对单元格左边界略微缩进。
  839. long 布局的「指标名:读数」整条,名称段用正文样式、读数段复用本套字体(见下)。
  840. 报警行以更高优先级抢回红色,占位灰由后置 is-muted 覆盖。 */
  841. .collection-table__value,
  842. .collection-table__reading-value {
  843. color: var(--reading-color, var(--text-strong, #fff));
  844. opacity: 1;
  845. font-family: var(--num, monospace);
  846. font-size: calc(13.5 * var(--u, 1px));
  847. font-weight: 700;
  848. letter-spacing: .02em;
  849. text-shadow: 0 0 8px color-mix(in srgb, currentColor 24%, transparent);
  850. }
  851. .collection-table__value {
  852. padding-left: calc(4 * var(--u, 1px));
  853. }
  854. .collection-table__reading-label {
  855. color: var(--muted, #5680b0);
  856. font-size: calc(11 * var(--u, 1px));
  857. font-weight: 400;
  858. }
  859. .collection-table__reading {
  860. display: grid;
  861. grid-template-columns: minmax(0, 48%) minmax(0, 1fr);
  862. column-gap: calc(14 * var(--u, 1px));
  863. align-items: baseline;
  864. padding-left: calc(4 * var(--u, 1px));
  865. text-align: left;
  866. }
  867. .collection-table__reading-result {
  868. display: inline-flex;
  869. min-width: 0;
  870. align-items: baseline;
  871. justify-content: flex-start;
  872. gap: calc(6 * var(--u, 1px));
  873. }
  874. .collection-table__reading-result > span:first-child { min-width: 0; }
  875. .collection-table__value.is-muted,
  876. .collection-table__reading-value.is-muted { color: var(--muted, #5680b0); font-weight: 400; text-shadow: none; }
  877. .collection-table__label {
  878. color: var(--muted, #5680b0);
  879. font-size: calc(10.5 * var(--u, 1px));
  880. }
  881. .equipment-sections,
  882. .equipment-sections *,
  883. .equipment-sections *::before,
  884. .equipment-sections *::after {
  885. box-sizing: border-box;
  886. }
  887. .equipment-sections {
  888. display: grid;
  889. gap: calc(6 * var(--u, 1px));
  890. }
  891. /*
  892. 票 46 返工第 1 条:标签页条(与票 13 的分段切换、票 46 的分类 chips 同一套视觉语言,
  893. 但它是**分区切换**不是筛选)。计数挂在页签右上角;默认页 = 设备档案。
  894. */
  895. .equipment-tabs {
  896. display: flex;
  897. flex-wrap: wrap;
  898. gap: calc(3 * var(--u, 1px));
  899. }
  900. .equipment-tabs__tab {
  901. display: inline-flex;
  902. align-items: center;
  903. gap: calc(3 * var(--u, 1px));
  904. padding: calc(2 * var(--u, 1px)) calc(9 * var(--u, 1px));
  905. border: 1px solid rgba(1, 171, 234, 0.32);
  906. border-radius: calc(8 * var(--u, 1px));
  907. background: rgba(0, 20, 72, 0.6);
  908. color: var(--text-2);
  909. font: inherit;
  910. font-size: var(--fs-caption, 10.5px);
  911. letter-spacing: 0.04em;
  912. cursor: pointer;
  913. }
  914. .equipment-tabs__tab:hover,
  915. .equipment-tabs__tab:focus-visible {
  916. border-color: rgba(1, 171, 234, 0.6);
  917. color: var(--text-strong);
  918. outline: none;
  919. }
  920. .equipment-tabs__tab.is-active {
  921. border-color: rgba(0, 184, 255, 0.85);
  922. background: linear-gradient(180deg, rgba(1, 171, 234, 0.85), rgba(0, 82, 168, 0.85));
  923. color: var(--text-strong);
  924. }
  925. .equipment-tabs__count {
  926. font-family: var(--num, monospace);
  927. color: var(--lv2, #ffb020);
  928. }
  929. .equipment-tabs__tab.is-active .equipment-tabs__count {
  930. color: var(--text-strong);
  931. }
  932. .equipment-tab__body {
  933. display: grid;
  934. gap: calc(6 * var(--u, 1px));
  935. }
  936. /* 票 59:分页控件与样式移交共享 PagerNav.vue,组件不再自画 pager。 */
  937. /* 每块分区:自己的边框与抬头 —— 失败的那一块缩成一行提示,成功的照常展开。 */
  938. .equipment-section {
  939. display: grid;
  940. gap: calc(3 * var(--u, 1px));
  941. padding: calc(5 * var(--u, 1px)) var(--space-2, 8px);
  942. border: 1px solid rgba(1, 171, 234, 0.24);
  943. border-radius: calc(8 * var(--u, 1px));
  944. background: var(--inset, rgba(2, 10, 20, 0.55));
  945. }
  946. .equipment-section[data-panel-state='failed'],
  947. .equipment-section[data-panel-state='unavailable'] {
  948. border-color: rgba(255, 59, 82, 0.4);
  949. }
  950. .equipment-section--video[data-panel-state='failed'],
  951. .equipment-section--video[data-panel-state='unavailable'] {
  952. border-color: rgba(1, 171, 234, 0.24);
  953. }
  954. .equipment-section[data-panel-state='stale'] {
  955. border-color: rgba(255, 176, 32, 0.45);
  956. }
  957. .equipment-section__head {
  958. display: flex;
  959. align-items: center;
  960. justify-content: space-between;
  961. gap: var(--space-2, 8px);
  962. }
  963. .equipment-section__title {
  964. min-width: 0;
  965. overflow: hidden;
  966. color: var(--text);
  967. font-size: var(--fs-body, 13px);
  968. font-weight: 700;
  969. letter-spacing: 0.06em;
  970. white-space: nowrap;
  971. text-overflow: ellipsis;
  972. }
  973. .equipment-section__stale {
  974. margin: 0;
  975. color: var(--lv2, #ffb020);
  976. font-size: var(--fs-caption, 10.5px);
  977. letter-spacing: 0.04em;
  978. }
  979. .equipment-section__rows {
  980. display: grid;
  981. gap: calc(2 * var(--u, 1px));
  982. margin: 0;
  983. }
  984. .equipment-section__row {
  985. display: grid;
  986. grid-template-columns: calc(58 * var(--u, 1px)) minmax(0, 1fr);
  987. align-items: baseline;
  988. gap: var(--space-2, 8px);
  989. border-bottom: 1px dashed rgba(1, 171, 234, 0.14);
  990. }
  991. .equipment-section__row dt {
  992. color: var(--muted, #5680b0);
  993. font-size: var(--fs-caption, 10.5px);
  994. letter-spacing: 0.04em;
  995. }
  996. .equipment-section__row dd {
  997. margin: 0;
  998. color: var(--text, #d7ecff);
  999. min-width: 0;
  1000. overflow-wrap: anywhere;
  1001. word-break: normal;
  1002. }
  1003. .equipment-section__list {
  1004. display: grid;
  1005. gap: calc(4 * var(--u, 1px));
  1006. }
  1007. .equipment-section__item {
  1008. display: grid;
  1009. gap: 1px;
  1010. padding-bottom: calc(3 * var(--u, 1px));
  1011. border-bottom: 1px dashed rgba(1, 171, 234, 0.14);
  1012. }
  1013. /*
  1014. 票 46:分类 chips 条(预警/报警按等级、工单按状态)。
  1015. 与票 13 的分段切换同一套视觉语言(胶囊 + 选中高亮),但它是**视图过滤**不是模式切换。
  1016. 计数直接挂在 chip 上 —— 分类前有多少条要看得见,筛完剩几条由列表自己说话。
  1017. */
  1018. .equipment-section__chips {
  1019. display: flex;
  1020. flex-wrap: wrap;
  1021. gap: calc(3 * var(--u, 1px));
  1022. }
  1023. .equipment-section__chip {
  1024. display: inline-flex;
  1025. align-items: center;
  1026. gap: calc(3 * var(--u, 1px));
  1027. padding: 1px calc(7 * var(--u, 1px));
  1028. border: 1px solid rgba(1, 171, 234, 0.32);
  1029. border-radius: calc(8 * var(--u, 1px));
  1030. background: rgba(0, 20, 72, 0.6);
  1031. color: var(--text-2);
  1032. font: inherit;
  1033. font-size: var(--fs-caption, 10.5px);
  1034. letter-spacing: 0.04em;
  1035. cursor: pointer;
  1036. }
  1037. .equipment-section__chip:hover,
  1038. .equipment-section__chip:focus-visible {
  1039. border-color: rgba(1, 171, 234, 0.6);
  1040. color: var(--text-strong);
  1041. outline: none;
  1042. }
  1043. .equipment-section__chip.is-active {
  1044. border-color: rgba(0, 184, 255, 0.85);
  1045. background: linear-gradient(180deg, rgba(1, 171, 234, 0.85), rgba(0, 82, 168, 0.85));
  1046. color: var(--text-strong);
  1047. }
  1048. .equipment-section__chip-count {
  1049. font-family: var(--num, monospace);
  1050. }
  1051. /*
  1052. 票 46:历史条目默认折叠(`<details>` 原生语义:键盘可达、展开态自带 aria-expanded)。
  1053. summary 一行读完关键信息;展开后的详情走 dl 键值行。去掉原生三角,换成边框反馈。
  1054. */
  1055. .equipment-section__item--collapsible {
  1056. gap: calc(2 * var(--u, 1px));
  1057. /* 每条数据一个线框:普通项也由整块持有边框,与高亮项同一层,不再出现错位/重叠。 */
  1058. padding: calc(4 * var(--u, 1px)) calc(6 * var(--u, 1px));
  1059. border: 1px solid rgba(1, 171, 234, 0.22);
  1060. border-radius: calc(6 * var(--u, 1px));
  1061. }
  1062. .equipment-section__item--collapsible[open] {
  1063. border-color: rgba(1, 171, 234, 0.5);
  1064. }
  1065. .equipment-section__item--collapsible[open] {
  1066. border-bottom-color: rgba(1, 171, 234, 0.35);
  1067. padding-bottom: calc(5 * var(--u, 1px));
  1068. }
  1069. /*
  1070. 事件按等级色强调;未分级预警黄、报警红;非终态工单天蓝。
  1071. 2026-11-12 维护者反馈「高亮框和普通框对不上、边框重叠」:原来整块用 inset box-shadow
  1072. 画了一圈,头部又各带一条 border + 背景,两层框叠在一起。现在**每条只保留一个线框**:
  1073. 普通项用整块 border,高亮项把同一个 border 换成等级色,头部不再画框。
  1074. */
  1075. .equipment-section__item--active {
  1076. padding-left: calc(6 * var(--u, 1px));
  1077. border: 1px solid color-mix(in srgb, var(--detail-accent) 55%, transparent);
  1078. border-radius: calc(6 * var(--u, 1px));
  1079. background: linear-gradient(90deg, color-mix(in srgb, var(--detail-accent) 20%, transparent), rgba(7, 27, 48, .12) 78%);
  1080. box-shadow: inset 3px 0 0 var(--detail-accent), 0 0 12px color-mix(in srgb, var(--detail-accent) 12%, transparent);
  1081. }
  1082. .equipment-section__item--active[open] {
  1083. border-color: color-mix(in srgb, var(--detail-accent) 78%, transparent);
  1084. background: linear-gradient(90deg, color-mix(in srgb, var(--detail-accent) 26%, transparent), rgba(7, 27, 48, .16) 82%);
  1085. }
  1086. /* 高亮项的头部不另画框,避免与整块边框形成双层。 */
  1087. .equipment-section__item--active .equipment-section__item-head,
  1088. .equipment-section__item--collapsible.equipment-section__item--active[open] .equipment-section__item-head {
  1089. border-color: transparent;
  1090. background: transparent;
  1091. }
  1092. /* 状态徽标:按预警状态色高亮(待接收/已接收黄、处置中蓝、已处置紫、已解除绿)。 */
  1093. .equipment-section__status-badge {
  1094. display: inline-flex;
  1095. align-items: center;
  1096. padding: 0 calc(6 * var(--u, 1px));
  1097. border: 1px solid currentcolor;
  1098. border-radius: 999px;
  1099. background: color-mix(in srgb, currentcolor 18%, transparent);
  1100. font-size: var(--fs-caption, 10.5px);
  1101. line-height: calc(16 * var(--u, 1px));
  1102. letter-spacing: .04em;
  1103. white-space: nowrap;
  1104. }
  1105. /* 等级与状态共用的色键映射(色值只在 tokens.css 声明一份)。 */
  1106. [data-tone="lv1"] { color: var(--lv1); }
  1107. [data-tone="lv2"] { color: var(--lv2); }
  1108. [data-tone="lv3"] { color: var(--lv3); }
  1109. [data-tone="lv4"] { color: var(--lv4); }
  1110. [data-tone="handled"] { color: var(--status-handled); }
  1111. [data-tone="neutral"] { color: var(--neutral); }
  1112. .equipment-section__detail-value--tone { font-weight: 600; }
  1113. /* 预警描述允许多行(简单描述一行、实际值/阈值一行)。 */
  1114. .equipment-section__detail-row dd { white-space: pre-line; }
  1115. .equipment-section__active-badge {
  1116. display: inline-flex;
  1117. align-items: center;
  1118. padding: 0 calc(6 * var(--u, 1px));
  1119. border: 1px solid var(--detail-accent);
  1120. border-radius: 999px;
  1121. background: color-mix(in srgb, var(--detail-accent) 24%, transparent);
  1122. color: color-mix(in srgb, var(--detail-accent) 55%, white);
  1123. font-size: var(--fs-caption, 10.5px);
  1124. line-height: calc(16 * var(--u, 1px));
  1125. letter-spacing: .04em;
  1126. white-space: nowrap;
  1127. }
  1128. /* 工单卡片:管理端同款竖向排布,字号提到正文级(维护者 2026-11-13 要求加大)。 */
  1129. .equipment-section__wo-head { gap: calc(4 * var(--u, 1px)); }
  1130. /* 工单卡片字号与预警/报警卡片保持一致(不单独放大),只保留卡片式排布。 */
  1131. .equipment-section__wo-title {
  1132. display: flex;
  1133. align-items: center;
  1134. gap: calc(8 * var(--u, 1px));
  1135. min-width: 0;
  1136. padding-bottom: calc(3 * var(--u, 1px));
  1137. border-bottom: 1px dashed rgba(1, 171, 234, 0.28);
  1138. }
  1139. .equipment-section__wo-label {
  1140. flex: none;
  1141. min-width: calc(56 * var(--u, 1px));
  1142. color: var(--muted, #5680b0);
  1143. }
  1144. .equipment-section__wo-row {
  1145. display: flex;
  1146. align-items: flex-start;
  1147. gap: calc(8 * var(--u, 1px));
  1148. line-height: 1.5;
  1149. }
  1150. .equipment-section__wo-row > span:last-child { min-width: 0; overflow-wrap: anywhere; }
  1151. .equipment-section__wo-value { min-width: 0; flex: 1; overflow-wrap: anywhere; }
  1152. .equipment-section__locate {
  1153. flex: none;
  1154. padding: 0 calc(7 * var(--u, 1px));
  1155. border: 1px solid rgba(1, 171, 234, .45);
  1156. border-radius: calc(9 * var(--u, 1px));
  1157. background: rgba(0, 20, 72, .5);
  1158. color: var(--cyan-hi, #35d8ff);
  1159. font: inherit;
  1160. font-size: calc(10 * var(--u, 1px));
  1161. cursor: pointer;
  1162. }
  1163. .equipment-section__locate:hover,
  1164. .equipment-section__locate:focus-visible { border-color: var(--cyan-hi, #00b8ff); color: var(--text-strong); }
  1165. /* 工单详情子页签(维护者 2026-11-23):工单信息与处置流程分开看,各自独立。 */
  1166. .equipment-section__wo-tabs {
  1167. display: flex;
  1168. gap: calc(6 * var(--u, 1px));
  1169. margin: calc(2 * var(--u, 1px)) 0;
  1170. }
  1171. .equipment-section__wo-tab {
  1172. padding: calc(2 * var(--u, 1px)) calc(10 * var(--u, 1px));
  1173. border: 1px solid rgba(1, 171, 234, .3);
  1174. border-radius: 999px;
  1175. background: transparent;
  1176. color: var(--muted, #5680b0);
  1177. font-size: var(--fs-caption, 10.5px);
  1178. line-height: 1.6;
  1179. cursor: pointer;
  1180. }
  1181. .equipment-section__wo-tab[data-active='true'] {
  1182. border-color: var(--lv3, #1aabff);
  1183. color: var(--lv3, #1aabff);
  1184. background: color-mix(in srgb, var(--lv3, #1aabff) 14%, transparent);
  1185. }
  1186. /* 维修前/后附件:缩略图点开看大图(取不到就压暗并标注,不画破图)。 */
  1187. .equipment-section__wo-attachments {
  1188. display: flex;
  1189. align-items: flex-start;
  1190. gap: calc(8 * var(--u, 1px));
  1191. margin-top: calc(4 * var(--u, 1px));
  1192. }
  1193. /* 工单详情:面板较窄,两列键值改为竖向一行一项,字号与正文一致。 */
  1194. .equipment-section__wo-detail { gap: calc(6 * var(--u, 1px)); }
  1195. .equipment-section__item-desc {
  1196. color: var(--text-2, #88b7e8);
  1197. font-size: var(--fs-caption, 10.5px);
  1198. line-height: 1.5;
  1199. overflow-wrap: anywhere;
  1200. }
  1201. .equipment-section__item-more {
  1202. justify-self: end;
  1203. color: var(--muted, #5680b0);
  1204. font-size: var(--fs-caption, 10.5px);
  1205. letter-spacing: .02em;
  1206. }
  1207. .equipment-section__item-head:hover .equipment-section__item-more { color: var(--cyan-hi, #00b8ff); }
  1208. .equipment-section__item-head {
  1209. display: grid;
  1210. gap: 1px;
  1211. cursor: pointer;
  1212. list-style: none;
  1213. padding: calc(1 * var(--u, 1px)) calc(3 * var(--u, 1px));
  1214. margin: calc(-1 * var(--u, 1px)) calc(-3 * var(--u, 1px)) 0;
  1215. border: 1px solid transparent;
  1216. border-radius: calc(8 * var(--u, 1px));
  1217. }
  1218. .equipment-section__item-head::-webkit-details-marker {
  1219. display: none;
  1220. }
  1221. /* hover / 展开只改背景,不再给头部加第二条框——整块边框已经是这一行的唯一线框。 */
  1222. .equipment-section__item-head:hover {
  1223. background: rgba(0, 53, 156, 0.28);
  1224. }
  1225. .equipment-section__item--collapsible[open] .equipment-section__item-head {
  1226. background: rgba(0, 53, 156, 0.22);
  1227. }
  1228. .equipment-section__detail {
  1229. display: grid;
  1230. gap: calc(1 * var(--u, 1px));
  1231. margin: calc(2 * var(--u, 1px)) 0 0;
  1232. padding: calc(3 * var(--u, 1px)) var(--space-2, 8px);
  1233. border-left: 2px solid rgba(1, 171, 234, 0.4);
  1234. background: rgba(2, 10, 20, 0.4);
  1235. }
  1236. .equipment-section__detail-row {
  1237. display: grid;
  1238. grid-template-columns: calc(58 * var(--u, 1px)) minmax(0, 1fr);
  1239. align-items: baseline;
  1240. gap: var(--space-2, 8px);
  1241. }
  1242. /* 详情键值改竖向一项一行,字号与事件详情一致(不单独放大)。 */
  1243. .equipment-section__wo-detail .equipment-section__detail-row { grid-template-columns: calc(84 * var(--u, 1px)) minmax(0, 1fr); }
  1244. .equipment-section__detail-row dt {
  1245. color: var(--muted, #5680b0);
  1246. font-size: var(--fs-caption, 10.5px);
  1247. letter-spacing: 0.04em;
  1248. }
  1249. .equipment-section__detail-row dd {
  1250. margin: 0;
  1251. min-width: 0;
  1252. color: var(--text, #d7ecff);
  1253. font-size: var(--fs-caption, 10.5px);
  1254. overflow-wrap: anywhere;
  1255. }
  1256. .equipment-section__order-code { margin-right: calc(5 * var(--u, 1px)); font-family: var(--num, monospace); overflow-wrap: anywhere; }
  1257. .equipment-section__order-state { display: inline-block; padding: 0 calc(6 * var(--u, 1px)); border: 1px solid rgba(1, 171, 234, .4); border-radius: 9px; background: rgba(1, 171, 234, .12); color: var(--cyan-hi); font-weight: 700; }
  1258. .equipment-section__order-state[data-tone='lv1'] { border-color: rgba(255,59,82,.65); background: rgba(255,59,82,.14); color: #ffc2c9; }
  1259. .equipment-section__order-state[data-tone='lv2'] { border-color: rgba(255,176,32,.65); background: rgba(255,176,32,.14); color: #ffdc91; }
  1260. .equipment-section__order-state[data-tone='lv3'] { border-color: rgba(1,171,234,.65); background: rgba(1,171,234,.14); color: #b7e4ff; }
  1261. .equipment-section__order-state[data-tone='lv4'] { border-color: rgba(53,219,146,.6); background: rgba(53,219,146,.14); color: #b8f2d4; }
  1262. .equipment-section__order-state[data-tone='neutral'] { border-color: rgba(86,128,176,.5); background: rgba(86,128,176,.12); color: #c4d5e8; }
  1263. .equipment-section__item-name {
  1264. color: var(--text, #d7ecff);
  1265. font-size: var(--fs-caption, 10.5px);
  1266. }
  1267. .equipment-section__item-name em {
  1268. color: var(--muted, #5680b0);
  1269. font-style: normal;
  1270. }
  1271. .equipment-section__value {
  1272. color: var(--text);
  1273. font-family: var(--num, monospace);
  1274. font-size: var(--fs-body, 13px);
  1275. }
  1276. .equipment-section__value em {
  1277. color: var(--muted, #5680b0);
  1278. font-style: normal;
  1279. font-size: var(--fs-caption, 10.5px);
  1280. }
  1281. .equipment-section__meta {
  1282. display: flex;
  1283. flex-wrap: wrap;
  1284. gap: var(--space-2, 8px);
  1285. color: var(--text-2, #88b7e8);
  1286. font-size: var(--fs-caption, 10.5px);
  1287. }
  1288. .equipment-section__note {
  1289. margin: 0;
  1290. color: var(--muted, #5680b0);
  1291. font-size: var(--fs-caption, 10.5px);
  1292. }
  1293. .equipment-section__figure {
  1294. display: grid;
  1295. gap: calc(3 * var(--u, 1px));
  1296. margin: 0;
  1297. }
  1298. .equipment-section__hint,
  1299. .equipment-section__missing,
  1300. .is-muted {
  1301. margin: 0;
  1302. color: var(--muted, #5680b0);
  1303. font-size: var(--fs-caption, 10.5px);
  1304. letter-spacing: 0.04em;
  1305. }
  1306. .equipment-section__missing {
  1307. color: var(--lv2, #ffb020);
  1308. }
  1309. .equipment-section__mono {
  1310. font-family: var(--num, monospace);
  1311. letter-spacing: 0.04em;
  1312. }
  1313. /* 音频播放条:贴播放键上方渐入的小浮层,不遮罩、不虚化整屏 UI。 */
  1314. .collection-audio-player {
  1315. position: fixed;
  1316. z-index: calc(var(--z-columns, 30) + 5);
  1317. width: min(264px, 88vw);
  1318. padding: calc(6 * var(--u, 1px)) calc(8 * var(--u, 1px)) calc(8 * var(--u, 1px));
  1319. border: 1px solid var(--cyan, #01abea);
  1320. border-radius: calc(8 * var(--u, 1px));
  1321. background: rgba(4, 20, 38, .97);
  1322. box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
  1323. color: var(--text, #e5f4ff);
  1324. transform: translate(-50%, calc(-100% - 8px));
  1325. animation: collection-audio-pop-above .18s ease-out;
  1326. }
  1327. .collection-audio-player.is-below {
  1328. transform: translate(-50%, 8px);
  1329. animation-name: collection-audio-pop-below;
  1330. }
  1331. @keyframes collection-audio-pop-above {
  1332. from { opacity: 0; transform: translate(-50%, calc(-100% - 2px)); }
  1333. }
  1334. @keyframes collection-audio-pop-below {
  1335. from { opacity: 0; transform: translate(-50%, 2px); }
  1336. }
  1337. .collection-audio-player__head {
  1338. display: flex;
  1339. align-items: center;
  1340. justify-content: space-between;
  1341. gap: calc(6 * var(--u, 1px));
  1342. margin-bottom: calc(4 * var(--u, 1px));
  1343. }
  1344. .collection-audio-player__label {
  1345. min-width: 0;
  1346. overflow: hidden;
  1347. color: #a6d8ff;
  1348. font-size: var(--fs-caption, 10.5px);
  1349. text-overflow: ellipsis;
  1350. white-space: nowrap;
  1351. }
  1352. .collection-audio-player__close {
  1353. flex: none;
  1354. width: calc(20 * var(--u, 1px));
  1355. height: calc(20 * var(--u, 1px));
  1356. padding: 0;
  1357. border: 1px solid rgba(1, 171, 234, .5);
  1358. border-radius: 999px;
  1359. background: rgba(1, 91, 150, .26);
  1360. color: inherit;
  1361. font-size: calc(12 * var(--u, 1px));
  1362. line-height: 1;
  1363. cursor: pointer;
  1364. }
  1365. .collection-audio-player__audio { display: block; width: 100%; max-width: 100%; height: calc(32 * var(--u, 1px)); }
  1366. </style>