Home2.razor 24 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063
  1. @page "/home2"
  2. @rendermode InteractiveServer
  3. @attribute [ReuseTabsPage(Title = "主页 2", Pin = true, Closable = false, Order = 1)]
  4. @using EasyTemplate.Tool.Util
  5. @using EasyTemplate.Service
  6. @using System.Timers
  7. <div class="main-container">
  8. <!-- 1. Header Section -->
  9. @* <header class="header-section">
  10. <!-- Global System Status Summary -->
  11. <div class="global-status">
  12. <div class="status-item status-normal">
  13. <span class="status-dot animate-ping"></span>
  14. <span class="status-text">正常:<span class="status-count">@normalCount</span></span>
  15. </div>
  16. <div class="status-divider"></div>
  17. <div class="status-item status-warning">
  18. <span class="status-dot"></span>
  19. <span class="status-text">预警:<span class="status-count">@warningCount</span></span>
  20. </div>
  21. <div class="status-divider"></div>
  22. <div class="status-item status-alarm">
  23. <span class="status-dot animate-pulse"></span>
  24. <span class="status-text">报警:<span class="status-count">@alarmCount</span></span>
  25. </div>
  26. </div>
  27. </header> *@
  28. <!-- 2. Main Nozzle Grid Section -->
  29. <main class="main-content">
  30. <div class="nozzle-grid">
  31. @if (items.Any())
  32. {
  33. int i = 0;
  34. foreach (var item in items)
  35. {
  36. i++;
  37. int num_page = ShowNozzleItem_Row * ShowNozzle_Col;
  38. if (i >= (currentPage-1) * num_page+1 && i <= currentPage * num_page)
  39. {
  40. <NozzleCard NozNo="@item.Value.noz.ToString()"
  41. OilName="@item.Value.oil"
  42. VLR="@item.Value.VLR"
  43. warnstate="@item.Value.warnstate"
  44. nozzlestate="@item.Value.nozzlestate" />
  45. }
  46. }
  47. @* @foreach (var item in items)
  48. {
  49. <NozzleCard
  50. NozNo="@item.Value.noz.ToString()"
  51. OilName="@item.Value.oil"
  52. VLR="@item.Value.VLR"
  53. warnstate="@item.Value.warnstate"
  54. nozzlestate="@item.Value.nozzlestate" />
  55. } *@
  56. }
  57. else
  58. {
  59. @for (int i = 1; i <= 32; i++)
  60. {
  61. var num = i.ToString("D2");
  62. var fuelTypes = new[] { "92#", "95#", "98#", "0#" };
  63. var fuel = fuelTypes[i % fuelTypes.Length];
  64. var state = i switch
  65. {
  66. 5 => 1, // Warning
  67. 6 => 2, // Alarm
  68. 4 or 15 or 22 => 3, // Offline
  69. _ => i % 3 == 0 ? 0 : (i % 2 == 0 ? -1 : 0) // Normal or Idle
  70. };
  71. <NozzleCard
  72. NozNo="@(num)"
  73. OilName="@(fuel)"
  74. VLR="@(state == 0 || state == 1 ? (1.0 + (i % 10) * 0.01).ToString("F2") : "--")"
  75. warnstate="@(state)"
  76. nozzlestate="@(state == 0 || state == 1 ? 1 : 0)" />
  77. }
  78. }
  79. </div>
  80. </main>
  81. <!-- 3. Top Status Bar (Key Metrics & Remote Platforms) -->
  82. <section class="top-status-bar">
  83. <!-- Key Metrics (Left) -->
  84. <div class="key-metrics">
  85. <!-- Tank Pressure -->
  86. <div class="metric-card metric-normal">
  87. <div class="metric-corner"></div>
  88. <div class="metric-icon">
  89. <span>📊</span>
  90. </div>
  91. <div class="metric-content">
  92. <div class="metric-label">油罐压力</div>
  93. <div class="metric-value">
  94. <span>@tankPressure.Value</span>
  95. <span class="metric-unit">kPa</span>
  96. </div>
  97. </div>
  98. <div class="metric-status">
  99. <span class="status-icon">✓</span>
  100. <span class="status-label">正常</span>
  101. </div>
  102. </div>
  103. <!-- Vapor Concentration -->
  104. <div class="metric-card metric-warning">
  105. <div class="metric-corner"></div>
  106. <div class="metric-icon">
  107. <span>💧</span>
  108. </div>
  109. <div class="metric-content">
  110. <div class="metric-label">油气浓度</div>
  111. <div class="metric-value">
  112. <span>@vaporConcentration.Value</span>
  113. <span class="metric-unit">g/m³</span>
  114. </div>
  115. </div>
  116. <div class="metric-status">
  117. <span class="status-icon animate-pulse">⚠</span>
  118. <span class="status-label">偏高</span>
  119. </div>
  120. </div>
  121. <!-- Pipeline Pressure -->
  122. <div class="metric-card metric-normal">
  123. <div class="metric-corner"></div>
  124. <div class="metric-icon">
  125. <span>🔧</span>
  126. </div>
  127. <div class="metric-content">
  128. <div class="metric-label">管线压力</div>
  129. <div class="metric-value">
  130. <span>@pipelinePressure.Value</span>
  131. <span class="metric-unit">kPa</span>
  132. </div>
  133. </div>
  134. <div class="metric-status">
  135. <span class="status-icon">✓</span>
  136. <span class="status-label">正常</span>
  137. </div>
  138. </div>
  139. <!-- Tank Temperature -->
  140. <div class="metric-card metric-alarm">
  141. <div class="metric-corner"></div>
  142. <div class="metric-icon">
  143. <span>🌡</span>
  144. </div>
  145. <div class="metric-content">
  146. <div class="metric-label">油罐温度</div>
  147. <div class="metric-value">
  148. <span>@tankTemperature.Value</span>
  149. <span class="metric-unit">°C</span>
  150. </div>
  151. </div>
  152. <div class="metric-status">
  153. <span class="status-icon animate-bounce">✕</span>
  154. <span class="status-label">超限</span>
  155. </div>
  156. </div>
  157. </div>
  158. <!-- Remote Platform Status (Right) -->
  159. <div class="remote-platforms">
  160. <div class="platform-title">
  161. <span>☁️</span>
  162. <span>数据远传状态</span>
  163. </div>
  164. <div class="platform-grid">
  165. <div class="platform-item">
  166. <span class="platform-name">市环保局</span>
  167. <div class="platform-status status-uploading">
  168. <span class="sync-icon animate-spin">🔄</span>
  169. <span>上传中</span>
  170. </div>
  171. </div>
  172. <div class="platform-item">
  173. <span class="platform-name">省质监局</span>
  174. <div class="platform-status status-synced">
  175. <span class="status-dot-small"></span>
  176. <span>已同步</span>
  177. </div>
  178. </div>
  179. <div class="platform-item">
  180. <span class="platform-name">集团总部</span>
  181. <div class="platform-status status-uploading">
  182. <span class="sync-icon animate-spin">🔄</span>
  183. <span>上传中</span>
  184. </div>
  185. </div>
  186. <div class="platform-item platform-delayed">
  187. <span class="platform-name">应急管理</span>
  188. <div class="platform-status status-delayed">
  189. <span class="status-dot-small animate-pulse"></span>
  190. <span>网络延迟</span>
  191. </div>
  192. </div>
  193. </div>
  194. </div>
  195. </section>
  196. <!-- 4. Pagination Control (Fixed Bottom) -->
  197. <footer class="pagination-footer">
  198. <!-- Legend -->
  199. <div class="legend">
  200. <span class="legend-title">状态图例:</span>
  201. <div class="legend-item">
  202. <span class="legend-dot legend-normal"></span>
  203. <span class="legend-text">正常 (加油/空闲)</span>
  204. </div>
  205. <div class="legend-item">
  206. <span class="legend-dot legend-offline"></span>
  207. <span class="legend-text">离线</span>
  208. </div>
  209. <div class="legend-item">
  210. <span class="legend-dot legend-warning"></span>
  211. <span class="legend-text">预警</span>
  212. </div>
  213. <div class="legend-item">
  214. <span class="legend-dot legend-alarm"></span>
  215. <span class="legend-text">报警</span>
  216. </div>
  217. </div>
  218. <!-- Pagination Center -->
  219. <div class="pagination-center">
  220. <span class="pagination-info">
  221. 第 <span class="page-number">@currentPage</span> 页 / 共 @totalPages 页 (@items.Count 条)
  222. </span>
  223. <div class="pagination-buttons">
  224. <button class="page-btn" disabled="@(currentPage <= 1)" @onclick="PreviousPage">
  225. ← 上一页
  226. </button>
  227. @for (int i = 1; i <= totalPages; i++)
  228. {
  229. var hasWarning = i == 2;
  230. var hasAlarm = i == 1;
  231. var isAllNormal = i == 3;
  232. <button class="page-btn @(i == currentPage ? "active" : "") @(hasAlarm ? "btn-alarm" : "") @(hasWarning && !hasAlarm ? "btn-warning" : "") @(isAllNormal && !hasAlarm && !hasWarning ? "btn-normal" : "")"
  233. @onclick="() => GoToPage(i)">
  234. @i
  235. @if (hasWarning && !hasAlarm)
  236. {
  237. <span class="page-indicator"></span>
  238. }
  239. </button>
  240. }
  241. <button class="page-btn" disabled="@(currentPage >= totalPages)" @onclick="NextPage">
  242. 下一页 →
  243. </button>
  244. </div>
  245. </div>
  246. <!-- Quick Jump -->
  247. <div class="quick-jump">
  248. <span class="jump-label">跳转至</span>
  249. <select class="jump-select" @onchange="OnQuickJump">
  250. @for (int i = 1; i <= totalPages; i++)
  251. {
  252. <option value="@i">@i</option>
  253. }
  254. </select>
  255. <span class="jump-label">页</span>
  256. </div>
  257. </footer>
  258. </div>
  259. @code {
  260. private Dictionary<int, NozzleState> items = new Dictionary<int, NozzleState>();
  261. private const int ShowNozzleItem_Row = 8; // 每行显示的枪数
  262. private const int ShowNozzle_Col = 4; // 每页显示的行数
  263. private const int ItemsPerPage = ShowNozzleItem_Row * ShowNozzle_Col;
  264. private int currentPage = 1;
  265. private int totalPages = 1;
  266. // Status counts
  267. private int normalCount = 0;
  268. private int warningCount = 0;
  269. private int alarmCount = 0;
  270. // Current time
  271. private DateTime currentTime = DateTime.Now;
  272. // Sensor data
  273. private SensorData tankPressure = new() { Value = "1.25", Status = 0 };
  274. private SensorData vaporConcentration = new() { Value = "18.5", Status = 1 };
  275. private SensorData pipelinePressure = new() { Value = "3.80", Status = 0 };
  276. private SensorData tankTemperature = new() { Value = "42.5", Status = 2 };
  277. private Timer? timer;
  278. protected override async Task OnInitializedAsync()
  279. {
  280. await RefreshData();
  281. StartTimer();
  282. }
  283. private void StartTimer()
  284. {
  285. timer = new Timer(1000); // 1 秒间隔
  286. timer.Elapsed += async (sender, e) => await RefreshData();
  287. timer.Start();
  288. }
  289. private async Task RefreshData()
  290. {
  291. var nozzlestates = GlobalTool.g_mNozzleState;
  292. try
  293. {
  294. await InvokeAsync(() =>
  295. {
  296. items = nozzlestates;
  297. currentTime = DateTime.Now;
  298. // Calculate status counts
  299. normalCount = items.Count(x => x.Value.warnstate == 0 || x.Value.warnstate == -1);
  300. warningCount = items.Count(x => x.Value.warnstate == 1);
  301. alarmCount = items.Count(x => x.Value.warnstate == 2);
  302. // Update sensor data from real data if available
  303. UpdateSensorData();
  304. // Calculate total pages
  305. totalPages = Math.Max(1, (int)Math.Ceiling(items.Count / (double)ItemsPerPage));
  306. StateHasChanged();
  307. });
  308. }
  309. catch (Exception ex)
  310. {
  311. Console.WriteLine($"数据刷新失败:{ex.Message}");
  312. }
  313. }
  314. private void UpdateSensorData()
  315. {
  316. // TODO: Replace with actual sensor data from database or service
  317. // For now, using mock data
  318. }
  319. private void PreviousPage()
  320. {
  321. if (currentPage > 1)
  322. {
  323. currentPage--;
  324. StateHasChanged();
  325. }
  326. }
  327. private void NextPage()
  328. {
  329. if (currentPage < totalPages)
  330. {
  331. currentPage++;
  332. StateHasChanged();
  333. }
  334. }
  335. private void GoToPage(int page)
  336. {
  337. if (page >= 1 && page <= totalPages)
  338. {
  339. currentPage = page;
  340. StateHasChanged();
  341. }
  342. }
  343. private void OnQuickJump(ChangeEventArgs e)
  344. {
  345. if (int.TryParse(e.Value?.ToString(), out int page))
  346. {
  347. GoToPage(page);
  348. }
  349. }
  350. public void Dispose()
  351. {
  352. timer?.Stop();
  353. timer?.Dispose();
  354. }
  355. public class SensorData
  356. {
  357. public string Value { get; set; } = "";
  358. public int Status { get; set; }
  359. }
  360. }
  361. <style>
  362. /* Main Container */
  363. .main-container {
  364. display: flex;
  365. flex-direction: column;
  366. height: 100vh;
  367. background-color: #f8fafc;
  368. color: #0f172a;
  369. font-family: 'Satoshi', Arial, sans-serif;
  370. overflow: hidden;
  371. }
  372. /* Header Section */
  373. .header-section {
  374. height: 64px;
  375. background-color: rgba(255, 255, 255, 0.9);
  376. backdrop-filter: blur(10px);
  377. border-bottom: 1px solid #e2e8f0;
  378. display: flex;
  379. align-items: center;
  380. justify-content: space-between;
  381. padding: 0 24px;
  382. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  383. z-index: 20;
  384. flex-shrink: 0;
  385. }
  386. .header-left {
  387. display: flex;
  388. align-items: center;
  389. gap: 16px;
  390. }
  391. .logo-icon {
  392. width: 40px;
  393. height: 40px;
  394. border-radius: 8px;
  395. background: linear-gradient(135deg, #10b981, #059669);
  396. display: flex;
  397. align-items: center;
  398. justify-content: center;
  399. box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
  400. }
  401. .icon-leaf {
  402. font-size: 24px;
  403. color: white;
  404. }
  405. .app-title {
  406. font-size: 20px;
  407. font-weight: bold;
  408. letter-spacing: 0.5px;
  409. color: #1e293b;
  410. }
  411. /* Global Status */
  412. .global-status {
  413. display: flex;
  414. align-items: center;
  415. gap: 24px;
  416. background-color: #f8fafc;
  417. padding: 8px 20px;
  418. border-radius: 9999px;
  419. border: 1px solid #e2e8f0;
  420. }
  421. .status-item {
  422. display: flex;
  423. align-items: center;
  424. gap: 8px;
  425. }
  426. .status-dot {
  427. width: 12px;
  428. height: 12px;
  429. border-radius: 50%;
  430. position: relative;
  431. }
  432. .status-normal .status-dot {
  433. background-color: #10b981;
  434. }
  435. .status-warning .status-dot {
  436. background-color: #f59e0b;
  437. }
  438. .status-alarm .status-dot {
  439. background-color: #ef4444;
  440. }
  441. .animate-ping {
  442. animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
  443. }
  444. @@keyframes ping {
  445. 75%, 100% {
  446. transform: scale(2);
  447. opacity: 0;
  448. }
  449. }
  450. .animate-pulse {
  451. animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  452. }
  453. @@keyframes pulse {
  454. 0%, 100% {
  455. opacity: 1;
  456. }
  457. 50% {
  458. opacity: 0.5;
  459. }
  460. }
  461. .status-text {
  462. font-size: 14px;
  463. color: #475569;
  464. }
  465. .status-count {
  466. font-family: monospace;
  467. font-weight: bold;
  468. }
  469. .status-normal .status-count {
  470. color: #10b981;
  471. }
  472. .status-warning .status-count {
  473. color: #f59e0b;
  474. }
  475. .status-alarm .status-count {
  476. color: #ef4444;
  477. }
  478. .status-divider {
  479. width: 1px;
  480. height: 32px;
  481. background-color: #cbd5e1;
  482. }
  483. /* Header Right */
  484. .header-right {
  485. display: flex;
  486. align-items: center;
  487. gap: 24px;
  488. }
  489. .clock-display {
  490. display: flex;
  491. flex-direction: column;
  492. align-items: flex-end;
  493. }
  494. .clock-time {
  495. font-family: monospace;
  496. font-size: 20px;
  497. font-weight: bold;
  498. color: #1e293b;
  499. }
  500. .clock-date {
  501. font-size: 12px;
  502. color: #64748b;
  503. font-family: monospace;
  504. }
  505. .user-button {
  506. width: 40px;
  507. height: 40px;
  508. border-radius: 50%;
  509. background-color: #f8fafc;
  510. border: 1px solid #e2e8f0;
  511. display: flex;
  512. align-items: center;
  513. justify-content: center;
  514. cursor: pointer;
  515. transition: background-color 0.2s;
  516. }
  517. .user-button:hover {
  518. background-color: #f1f5f9;
  519. }
  520. /* Top Status Bar */
  521. .top-status-bar {
  522. display: grid;
  523. grid-template-columns: 2fr 1fr;
  524. gap: 16px;
  525. padding: 16px 24px;
  526. flex-shrink: 0;
  527. }
  528. /* Key Metrics */
  529. .key-metrics {
  530. display: grid;
  531. grid-template-columns: repeat(4, 1fr);
  532. gap: 16px;
  533. }
  534. .metric-card {
  535. background-color: white;
  536. border-radius: 12px;
  537. padding: 16px;
  538. display: flex;
  539. align-items: center;
  540. gap: 16px;
  541. position: relative;
  542. overflow: hidden;
  543. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  544. }
  545. .metric-normal {
  546. border: 1px solid #e2e8f0;
  547. }
  548. .metric-warning {
  549. border: 1px solid rgba(245, 158, 11, 0.3);
  550. }
  551. .metric-alarm {
  552. border: 2px solid rgba(239, 68, 68, 0.4);
  553. box-shadow: 0 0 16px rgba(239, 68, 68, 0.2);
  554. }
  555. .metric-corner {
  556. position: absolute;
  557. top: 0;
  558. right: 0;
  559. width: 64px;
  560. height: 64px;
  561. background-color: rgba(16, 185, 129, 0.1);
  562. border-radius: 0 0 0 64px;
  563. }
  564. .metric-warning .metric-corner {
  565. background-color: rgba(245, 158, 11, 0.1);
  566. }
  567. .metric-alarm .metric-corner {
  568. background-color: rgba(239, 68, 68, 0.1);
  569. }
  570. .metric-icon {
  571. width: 48px;
  572. height: 48px;
  573. border-radius: 50%;
  574. display: flex;
  575. align-items: center;
  576. justify-content: center;
  577. flex-shrink: 0;
  578. font-size: 24px;
  579. }
  580. .metric-normal .metric-icon {
  581. background-color: rgba(16, 185, 129, 0.1);
  582. border: 1px solid rgba(16, 185, 129, 0.2);
  583. }
  584. .metric-warning .metric-icon {
  585. background-color: rgba(245, 158, 11, 0.1);
  586. border: 1px solid rgba(245, 158, 11, 0.3);
  587. }
  588. .metric-alarm .metric-icon {
  589. background-color: rgba(239, 68, 68, 0.1);
  590. border: 1px solid rgba(239, 68, 68, 0.3);
  591. }
  592. .metric-content {
  593. flex: 1;
  594. }
  595. .metric-label {
  596. font-size: 12px;
  597. color: #64748b;
  598. margin-bottom: 4px;
  599. }
  600. .metric-value {
  601. display: flex;
  602. align-items: baseline;
  603. gap: 4px;
  604. }
  605. .metric-value span:first-child {
  606. font-size: 24px;
  607. font-family: monospace;
  608. font-weight: bold;
  609. color: #1e293b;
  610. }
  611. .metric-warning .metric-value span:first-child {
  612. color: #f59e0b;
  613. }
  614. .metric-alarm .metric-value span:first-child {
  615. color: #ef4444;
  616. }
  617. .metric-unit {
  618. font-size: 12px;
  619. color: #64748b;
  620. font-family: monospace;
  621. }
  622. .metric-status {
  623. display: flex;
  624. flex-direction: column;
  625. align-items: flex-end;
  626. }
  627. .status-icon {
  628. font-size: 16px;
  629. }
  630. .metric-normal .status-icon {
  631. color: #10b981;
  632. }
  633. .metric-warning .status-icon {
  634. color: #f59e0b;
  635. }
  636. .metric-alarm .status-icon {
  637. color: #ef4444;
  638. }
  639. .status-label {
  640. font-size: 10px;
  641. margin-top: 4px;
  642. }
  643. .metric-normal .status-label {
  644. color: #10b981;
  645. }
  646. .metric-warning .status-label {
  647. color: #f59e0b;
  648. }
  649. .metric-alarm .status-label {
  650. color: #ef4444;
  651. font-weight: bold;
  652. }
  653. .animate-bounce {
  654. animation: bounce 1s infinite;
  655. }
  656. @@keyframes bounce {
  657. 0%, 100% {
  658. transform: translateY(-25%);
  659. animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  660. }
  661. 50% {
  662. transform: translateY(0);
  663. animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  664. }
  665. }
  666. .animate-spin {
  667. animation: spin 2s linear infinite;
  668. }
  669. @@keyframes spin {
  670. from {
  671. transform: rotate(0deg);
  672. }
  673. to {
  674. transform: rotate(360deg);
  675. }
  676. }
  677. /* Remote Platforms */
  678. .remote-platforms {
  679. background-color: white;
  680. border-radius: 12px;
  681. border: 1px solid #e2e8f0;
  682. padding: 16px;
  683. display: flex;
  684. flex-direction: column;
  685. justify-content: space-between;
  686. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  687. }
  688. .platform-title {
  689. font-size: 14px;
  690. font-weight: medium;
  691. color: #334155;
  692. display: flex;
  693. align-items: center;
  694. gap: 8px;
  695. margin-bottom: 8px;
  696. }
  697. .platform-grid {
  698. display: grid;
  699. grid-template-columns: repeat(2, 1fr);
  700. gap: 8px;
  701. }
  702. .platform-item {
  703. background-color: #f8fafc;
  704. border: 1px solid #f1f5f9;
  705. border-radius: 6px;
  706. padding: 8px 12px;
  707. display: flex;
  708. align-items: center;
  709. justify-content: space-between;
  710. }
  711. .platform-delayed {
  712. background-color: rgba(251, 146, 60, 0.05);
  713. border-color: rgba(245, 158, 11, 0.3);
  714. }
  715. .platform-name {
  716. font-size: 12px;
  717. color: #475569;
  718. }
  719. .platform-status {
  720. display: flex;
  721. align-items: center;
  722. gap: 6px;
  723. font-size: 10px;
  724. }
  725. .status-dot-small {
  726. width: 8px;
  727. height: 8px;
  728. border-radius: 50%;
  729. background-color: #10b981;
  730. }
  731. .status-uploading {
  732. color: #10b981;
  733. }
  734. .status-synced {
  735. color: #64748b;
  736. }
  737. .status-delayed {
  738. color: #f59e0b;
  739. }
  740. .sync-icon {
  741. font-size: 12px;
  742. }
  743. /* Main Content */
  744. .main-content {
  745. flex: 1;
  746. overflow-y: hidden;
  747. padding: 0 24px 192px;
  748. }
  749. .nozzle-grid {
  750. display: grid;
  751. grid-template-columns: repeat(8, 1fr);
  752. gap: 4px;
  753. }
  754. /* Pagination Footer */
  755. .pagination-footer {
  756. position: fixed;
  757. bottom: 0;
  758. left: 0;
  759. right: 0;
  760. height: 56px;
  761. background-color: rgba(255, 255, 255, 0.95);
  762. backdrop-filter: blur(10px);
  763. border-top: 1px solid #e2e8f0;
  764. display: flex;
  765. align-items: center;
  766. justify-content: space-between;
  767. padding: 0 24px;
  768. z-index: 40;
  769. box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.02);
  770. }
  771. .legend {
  772. display: flex;
  773. align-items: center;
  774. gap: 16px;
  775. font-size: 12px;
  776. }
  777. .legend-title {
  778. color: #64748b;
  779. }
  780. .legend-item {
  781. display: flex;
  782. align-items: center;
  783. gap: 6px;
  784. }
  785. .legend-dot {
  786. width: 10px;
  787. height: 10px;
  788. border-radius: 50%;
  789. }
  790. .legend-normal {
  791. background-color: #10b981;
  792. box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
  793. }
  794. .legend-offline {
  795. background-color: #cbd5e1;
  796. border: 1px solid #94a3b8;
  797. }
  798. .legend-warning {
  799. background-color: #f59e0b;
  800. box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
  801. }
  802. .legend-alarm {
  803. background-color: #ef4444;
  804. box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
  805. }
  806. .legend-text {
  807. color: #475569;
  808. }
  809. .pagination-center {
  810. display: flex;
  811. align-items: center;
  812. gap: 24px;
  813. }
  814. .pagination-info {
  815. font-size: 14px;
  816. color: #64748b;
  817. }
  818. .page-number {
  819. color: #1e293b;
  820. font-weight: bold;
  821. }
  822. .pagination-buttons {
  823. display: flex;
  824. align-items: center;
  825. gap: 8px;
  826. }
  827. .page-btn {
  828. min-width: 28px;
  829. height: 28px;
  830. border-radius: 6px;
  831. display: flex;
  832. align-items: center;
  833. justify-content: center;
  834. font-size: 13px;
  835. font-weight: bold;
  836. cursor: pointer;
  837. transition: all 0.2s;
  838. border: 1px solid transparent;
  839. position: relative;
  840. }
  841. .page-btn:disabled {
  842. opacity: 0.5;
  843. cursor: not-allowed;
  844. }
  845. .page-btn:not(:disabled):hover {
  846. transform: translateY(-1px);
  847. }
  848. .page-btn.active {
  849. background-color: #ef4444;
  850. color: white;
  851. box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
  852. }
  853. .btn-warning {
  854. background-color: #fef3c7;
  855. color: #f59e0b;
  856. border-color: rgba(245, 158, 11, 0.3);
  857. }
  858. .btn-warning:hover:not(:disabled) {
  859. background-color: #fde68a;
  860. }
  861. .btn-normal {
  862. background-color: #d1fae5;
  863. color: #059669;
  864. border-color: rgba(16, 185, 129, 0.2);
  865. }
  866. .btn-normal:hover:not(:disabled) {
  867. background-color: #a7f3d0;
  868. }
  869. .page-indicator {
  870. position: absolute;
  871. top: -4px;
  872. right: -4px;
  873. width: 8px;
  874. height: 8px;
  875. background-color: #f59e0b;
  876. border-radius: 50%;
  877. }
  878. .quick-jump {
  879. display: flex;
  880. align-items: center;
  881. gap: 8px;
  882. font-size: 14px;
  883. }
  884. .jump-label {
  885. color: #64748b;
  886. }
  887. .jump-select {
  888. background-color: white;
  889. border: 1px solid #cbd5e1;
  890. border-radius: 6px;
  891. padding: 4px 8px;
  892. font-size: 13px;
  893. outline: none;
  894. cursor: pointer;
  895. }
  896. .jump-select:focus {
  897. border-color: #10b981;
  898. box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
  899. }
  900. /* Scrollbar */
  901. ::-webkit-scrollbar {
  902. width: 6px;
  903. height: 6px;
  904. }
  905. ::-webkit-scrollbar-track {
  906. background: #f1f5f9;
  907. }
  908. ::-webkit-scrollbar-thumb {
  909. background: #cbd5e1;
  910. border-radius: 3px;
  911. }
  912. ::-webkit-scrollbar-thumb:hover {
  913. background: #94a3b8;
  914. }
  915. </style>