EquipmentDetailSections.vue 70 KB

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