From 184c0d092bf27da9c0b5a8b5f1bace94f99e4354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=98=9F?= <10947742+xu-xing9@user.noreply.gitee.com> Date: Tue, 14 Apr 2026 14:47:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=9F=E4=BA=A7=E6=89=B9?= =?UTF-8?q?=E6=AC=A1=E7=AD=9B=E9=80=89=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .next/dev/build-manifest.json | 26 ++- .next/dev/fallback-build-manifest.json | 26 ++- .next/dev/logs/next-development.log | 17 ++ .next/dev/server/middleware-build-manifest.js | 26 ++- .next/dev/server/pages-manifest.json | 6 +- .../dev/static/development/_buildManifest.js | 3 + .next/dev/trace | 8 + src/app/devices/page.tsx | 186 ++++++++++++------ 8 files changed, 237 insertions(+), 61 deletions(-) diff --git a/.next/dev/build-manifest.json b/.next/dev/build-manifest.json index 7d41cf9..546e56f 100644 --- a/.next/dev/build-manifest.json +++ b/.next/dev/build-manifest.json @@ -1,6 +1,30 @@ { "pages": { - "/_app": [] + "/_app": [ + "static/chunks/node_modules_next_dist_compiled_0o6l_m6._.js", + "static/chunks/node_modules_next_dist_shared_lib_0~pg0mt._.js", + "static/chunks/node_modules_next_dist_client_0pe1dg-._.js", + "static/chunks/node_modules_next_dist_0u_w_5s._.js", + "static/chunks/node_modules_next_app_0jt-zj..js", + "static/chunks/[next]_entry_page-loader_ts_0j~flwh._.js", + "static/chunks/node_modules_react-dom_0bruynb._.js", + "static/chunks/node_modules_0lx093h._.js", + "static/chunks/[root-of-the-server]__0c0okpg._.js", + "static/chunks/pages__app_07xvfw~._.js", + "static/chunks/turbopack-pages__app_0_wu8vy._.js" + ], + "/_error": [ + "static/chunks/node_modules_next_dist_compiled_0o6l_m6._.js", + "static/chunks/node_modules_next_dist_shared_lib_12bi_n7._.js", + "static/chunks/node_modules_next_dist_client_0pe1dg-._.js", + "static/chunks/node_modules_next_dist_0rt-2cr._.js", + "static/chunks/[next]_entry_page-loader_ts_0rqw6yo._.js", + "static/chunks/node_modules_react-dom_0bruynb._.js", + "static/chunks/node_modules_0lx093h._.js", + "static/chunks/[root-of-the-server]__01mw43t._.js", + "static/chunks/pages__error_07xvfw~._.js", + "static/chunks/turbopack-pages__error_016chbq._.js" + ] }, "devFiles": [], "polyfillFiles": [ diff --git a/.next/dev/fallback-build-manifest.json b/.next/dev/fallback-build-manifest.json index 087bbcf..41883af 100644 --- a/.next/dev/fallback-build-manifest.json +++ b/.next/dev/fallback-build-manifest.json @@ -1,6 +1,30 @@ { "pages": { - "/_app": [] + "/_app": [ + "static/chunks/node_modules_next_dist_compiled_0o6l_m6._.js", + "static/chunks/node_modules_next_dist_shared_lib_0~pg0mt._.js", + "static/chunks/node_modules_next_dist_client_0pe1dg-._.js", + "static/chunks/node_modules_next_dist_0u_w_5s._.js", + "static/chunks/node_modules_next_app_0jt-zj..js", + "static/chunks/[next]_entry_page-loader_ts_0j~flwh._.js", + "static/chunks/node_modules_react-dom_0bruynb._.js", + "static/chunks/node_modules_0lx093h._.js", + "static/chunks/[root-of-the-server]__0c0okpg._.js", + "static/chunks/pages__app_07xvfw~._.js", + "static/chunks/turbopack-pages__app_0_wu8vy._.js" + ], + "/_error": [ + "static/chunks/node_modules_next_dist_compiled_0o6l_m6._.js", + "static/chunks/node_modules_next_dist_shared_lib_12bi_n7._.js", + "static/chunks/node_modules_next_dist_client_0pe1dg-._.js", + "static/chunks/node_modules_next_dist_0rt-2cr._.js", + "static/chunks/[next]_entry_page-loader_ts_0rqw6yo._.js", + "static/chunks/node_modules_react-dom_0bruynb._.js", + "static/chunks/node_modules_0lx093h._.js", + "static/chunks/[root-of-the-server]__01mw43t._.js", + "static/chunks/pages__error_07xvfw~._.js", + "static/chunks/turbopack-pages__error_016chbq._.js" + ] }, "devFiles": [], "polyfillFiles": [], diff --git a/.next/dev/logs/next-development.log b/.next/dev/logs/next-development.log index 63ffc83..a3146f8 100644 --- a/.next/dev/logs/next-development.log +++ b/.next/dev/logs/next-development.log @@ -2,3 +2,20 @@ {"timestamp":"00:00:03.305","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"} {"timestamp":"19:08:22.325","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"} {"timestamp":"19:08:25.916","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"} +{"timestamp":"117:32:37.131","source":"Server","level":"LOG","message":"✓ Compiled in 153ms"} +{"timestamp":"117:32:38.097","source":"Server","level":"ERROR","message":"⨯ Error: The default export is not a React Component in \"/devices/page\""} +{"timestamp":"117:32:38.544","source":"Server","level":"ERROR","message":"⨯ Error: The default export is not a React Component in \"/devices/page\""} +{"timestamp":"117:32:38.547","source":"Server","level":"WARN","message":"⚠ Fast Refresh had to perform a full reload when ./src/app/devices/page.tsx changed. Read more: https://nextjs.org/docs/messages/fast-refresh-reload"} +{"timestamp":"117:32:38.940","source":"Server","level":"ERROR","message":"⨯ Error: The default export is not a React Component in \"/devices/page\""} +{"timestamp":"117:32:39.220","source":"Server","level":"ERROR","message":"⨯ Error: The default export is not a React Component in \"/devices/page\""} +{"timestamp":"117:32:40.255","source":"Server","level":"ERROR","message":"⨯ Error: The default export is not a React Component in \"/devices/page\""} +{"timestamp":"117:32:40.535","source":"Server","level":"ERROR","message":"⨯ Error: The default export is not a React Component in \"/devices/page\""} +{"timestamp":"117:32:40.837","source":"Server","level":"ERROR","message":"⨯ Error: The default export is not a React Component in \"/devices/page\""} +{"timestamp":"117:32:41.104","source":"Server","level":"ERROR","message":"⨯ Error: The default export is not a React Component in \"/devices/page\""} +{"timestamp":"117:32:41.590","source":"Server","level":"ERROR","message":"⨯ Error: The default export is not a React Component in \"/devices/page\""} +{"timestamp":"117:32:41.994","source":"Server","level":"ERROR","message":"⨯ Error: The default export is not a React Component in \"/devices/page\""} +{"timestamp":"117:32:42.214","source":"Browser","level":"ERROR","message":"uncaughtError: Error: The default export is not a React Component in \"/devices/page\""} +{"timestamp":"117:32:42.258","source":"Server","level":"ERROR","message":"[browser] \"\\u001b[31mUncaught Error: The default export is not a React Component in \\\"/devices/page\\\"\\u001b[39m\""} +{"timestamp":"117:32:42.259","source":"Browser","level":"ERROR","message":"\u001b[31mUncaught Error: The default export is not a React Component in \"/devices/page\"\u001b[39m"} +{"timestamp":"117:33:29.348","source":"Server","level":"LOG","message":"✓ Compiled in 274ms"} +{"timestamp":"117:33:30.697","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"} diff --git a/.next/dev/server/middleware-build-manifest.js b/.next/dev/server/middleware-build-manifest.js index 0c14f46..5e07d36 100644 --- a/.next/dev/server/middleware-build-manifest.js +++ b/.next/dev/server/middleware-build-manifest.js @@ -1,6 +1,30 @@ globalThis.__BUILD_MANIFEST = { "pages": { - "/_app": [] + "/_app": [ + "static/chunks/node_modules_next_dist_compiled_0o6l_m6._.js", + "static/chunks/node_modules_next_dist_shared_lib_0~pg0mt._.js", + "static/chunks/node_modules_next_dist_client_0pe1dg-._.js", + "static/chunks/node_modules_next_dist_0u_w_5s._.js", + "static/chunks/node_modules_next_app_0jt-zj..js", + "static/chunks/[next]_entry_page-loader_ts_0j~flwh._.js", + "static/chunks/node_modules_react-dom_0bruynb._.js", + "static/chunks/node_modules_0lx093h._.js", + "static/chunks/[root-of-the-server]__0c0okpg._.js", + "static/chunks/pages__app_07xvfw~._.js", + "static/chunks/turbopack-pages__app_0_wu8vy._.js" + ], + "/_error": [ + "static/chunks/node_modules_next_dist_compiled_0o6l_m6._.js", + "static/chunks/node_modules_next_dist_shared_lib_12bi_n7._.js", + "static/chunks/node_modules_next_dist_client_0pe1dg-._.js", + "static/chunks/node_modules_next_dist_0rt-2cr._.js", + "static/chunks/[next]_entry_page-loader_ts_0rqw6yo._.js", + "static/chunks/node_modules_react-dom_0bruynb._.js", + "static/chunks/node_modules_0lx093h._.js", + "static/chunks/[root-of-the-server]__01mw43t._.js", + "static/chunks/pages__error_07xvfw~._.js", + "static/chunks/turbopack-pages__error_016chbq._.js" + ] }, "devFiles": [], "polyfillFiles": [ diff --git a/.next/dev/server/pages-manifest.json b/.next/dev/server/pages-manifest.json index 9e26dfe..6ac637a 100644 --- a/.next/dev/server/pages-manifest.json +++ b/.next/dev/server/pages-manifest.json @@ -1 +1,5 @@ -{} \ No newline at end of file +{ + "/_app": "pages/_app.js", + "/_document": "pages/_document.js", + "/_error": "pages/_error.js" +} \ No newline at end of file diff --git a/.next/dev/static/development/_buildManifest.js b/.next/dev/static/development/_buildManifest.js index 94ca914..a11039d 100644 --- a/.next/dev/static/development/_buildManifest.js +++ b/.next/dev/static/development/_buildManifest.js @@ -1,4 +1,7 @@ self.__BUILD_MANIFEST = { + "/_error": [ + "static/chunks/pages/_error.js" + ], "__rewrites": { "afterFiles": [], "beforeFiles": [], diff --git a/.next/dev/trace b/.next/dev/trace index 1df504f..f71e906 100644 --- a/.next/dev/trace +++ b/.next/dev/trace @@ -39,3 +39,11 @@ [{"name":"ensure-page","duration":1392,"timestamp":506189525065,"id":215,"parentId":3,"tags":{"inputPage":"/models/page"},"startTime":1776043586667,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":17507,"timestamp":506189527628,"id":216,"parentId":1,"tags":{"path":"/models?_rsc=1ls1f"},"startTime":1776043586687,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":21320,"timestamp":506189524633,"id":214,"parentId":1,"tags":{"url":"/models?_rsc=1ls1f"},"startTime":1776043586667,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":3,"timestamp":506189545980,"id":217,"parentId":214,"tags":{"url":"/models?_rsc=1ls1f","memory.rss":"887209984","memory.heapUsed":"79920728","memory.heapTotal":"85753856"},"startTime":1776043586688,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":1104,"timestamp":506190330520,"id":219,"parentId":3,"tags":{"inputPage":"/devices/page"},"startTime":1776043587472,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":14535,"timestamp":506190332382,"id":220,"parentId":1,"tags":{"path":"/devices?_rsc=l1ivr"},"startTime":1776043587489,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":17322,"timestamp":506190330135,"id":218,"parentId":1,"tags":{"url":"/devices?_rsc=l1ivr"},"startTime":1776043587472,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":1,"timestamp":506190347482,"id":221,"parentId":218,"tags":{"url":"/devices?_rsc=l1ivr","memory.rss":"887963648","memory.heapUsed":"81336672","memory.heapTotal":"87064576"},"startTime":1776043587489,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":1117,"timestamp":506191283262,"id":223,"parentId":3,"tags":{"inputPage":"/models/page"},"startTime":1776043588425,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":15270,"timestamp":506191285168,"id":224,"parentId":1,"tags":{"path":"/models?_rsc=1gjub"},"startTime":1776043588443,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":18165,"timestamp":506191282926,"id":222,"parentId":1,"tags":{"url":"/models?_rsc=1gjub"},"startTime":1776043588425,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":3,"timestamp":506191301116,"id":225,"parentId":222,"tags":{"url":"/models?_rsc=1gjub","memory.rss":"888958976","memory.heapUsed":"82064792","memory.heapTotal":"86540288"},"startTime":1776043588443,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":1033,"timestamp":506193595005,"id":227,"parentId":3,"tags":{"inputPage":"/boards/page"},"startTime":1776043590737,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":14612,"timestamp":506193596774,"id":228,"parentId":1,"tags":{"path":"/boards?_rsc=11q75"},"startTime":1776043590754,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":17213,"timestamp":506193594691,"id":226,"parentId":1,"tags":{"url":"/boards?_rsc=11q75"},"startTime":1776043590737,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":2,"timestamp":506193611932,"id":229,"parentId":226,"tags":{"url":"/boards?_rsc=11q75","memory.rss":"890109952","memory.heapUsed":"82973808","memory.heapTotal":"88350720"},"startTime":1776043590754,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":3162,"timestamp":506194291121,"id":231,"parentId":3,"tags":{"inputPage":"/licenses/page"},"startTime":1776043591433,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":16161,"timestamp":506194295056,"id":232,"parentId":1,"tags":{"path":"/licenses?_rsc=1gr75"},"startTime":1776043591453,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":21277,"timestamp":506194290780,"id":230,"parentId":1,"tags":{"url":"/licenses?_rsc=1gr75"},"startTime":1776043591433,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":3,"timestamp":506194312101,"id":233,"parentId":230,"tags":{"url":"/licenses?_rsc=1gr75","memory.rss":"890097664","memory.heapUsed":"84290288","memory.heapTotal":"90710016"},"startTime":1776043591454,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":3101,"timestamp":506195564068,"id":235,"parentId":3,"tags":{"inputPage":"/config-files/page"},"startTime":1776043592706,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":16743,"timestamp":506195568184,"id":236,"parentId":1,"tags":{"path":"/config-files?_rsc=bjy9k"},"startTime":1776043592727,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":22182,"timestamp":506195563716,"id":234,"parentId":1,"tags":{"url":"/config-files?_rsc=bjy9k"},"startTime":1776043592706,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":4,"timestamp":506195585948,"id":237,"parentId":234,"tags":{"url":"/config-files?_rsc=bjy9k","memory.rss":"895291392","memory.heapUsed":"84714864","memory.heapTotal":"91234304"},"startTime":1776043592728,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":2103,"timestamp":506196404642,"id":239,"parentId":3,"tags":{"inputPage":"/licenses/page"},"startTime":1776043593547,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":15993,"timestamp":506196407699,"id":240,"parentId":1,"tags":{"path":"/licenses?_rsc=1yhke"},"startTime":1776043593566,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":20170,"timestamp":506196404076,"id":238,"parentId":1,"tags":{"url":"/licenses?_rsc=1yhke"},"startTime":1776043593546,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":2,"timestamp":506196424286,"id":241,"parentId":238,"tags":{"url":"/licenses?_rsc=1yhke","memory.rss":"893071360","memory.heapUsed":"85508376","memory.heapTotal":"91758592"},"startTime":1776043593566,"traceId":"9d03e020888f11ed"},{"name":"turbopack-persistence","duration":9000,"timestamp":506198409384,"id":242,"parentId":3,"tags":{"reason":"idle timeout","snapshot_duration_ms":0.34680000000000005,"persist_duration_ms":9.2832,"task_count":178},"startTime":1776043595560,"traceId":"9d03e020888f11ed"}] [{"name":"ensure-page","duration":1115,"timestamp":506206003429,"id":245,"parentId":3,"tags":{"inputPage":"/config-files/page"},"startTime":1776043603146,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":16439,"timestamp":506206005549,"id":246,"parentId":1,"tags":{"path":"/config-files?_rsc=8b6rn"},"startTime":1776043603165,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":19611,"timestamp":506206003102,"id":244,"parentId":1,"tags":{"url":"/config-files?_rsc=8b6rn"},"startTime":1776043603145,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":3,"timestamp":506206022743,"id":247,"parentId":244,"tags":{"url":"/config-files?_rsc=8b6rn","memory.rss":"894894080","memory.heapUsed":"86210848","memory.heapTotal":"89866240"},"startTime":1776043603165,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":2627,"timestamp":506225803657,"id":249,"parentId":3,"tags":{"inputPage":"/calibration/page"},"startTime":1776043622946,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":15879,"timestamp":506225807067,"id":250,"parentId":1,"tags":{"path":"/calibration?_rsc=xevh7"},"startTime":1776043622966,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":20433,"timestamp":506225803340,"id":248,"parentId":1,"tags":{"url":"/calibration?_rsc=xevh7"},"startTime":1776043622946,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":3,"timestamp":506225823811,"id":251,"parentId":248,"tags":{"url":"/calibration?_rsc=xevh7","memory.rss":"890814464","memory.heapUsed":"86908584","memory.heapTotal":"90390528"},"startTime":1776043622966,"traceId":"9d03e020888f11ed"},{"name":"turbopack-persistence","duration":10000,"timestamp":506227836903,"id":252,"parentId":3,"tags":{"reason":"idle timeout","snapshot_duration_ms":0.4878,"persist_duration_ms":9.031799999999999,"task_count":92},"startTime":1776043624989,"traceId":"9d03e020888f11ed"}] [{"name":"ensure-page","duration":2752,"timestamp":506232547502,"id":255,"parentId":3,"tags":{"inputPage":"/repair/page"},"startTime":1776043629690,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":16574,"timestamp":506232551054,"id":256,"parentId":1,"tags":{"path":"/repair?_rsc=1hj8e"},"startTime":1776043629710,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":21130,"timestamp":506232547173,"id":254,"parentId":1,"tags":{"url":"/repair?_rsc=1hj8e"},"startTime":1776043629689,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":2,"timestamp":506232568352,"id":257,"parentId":254,"tags":{"url":"/repair?_rsc=1hj8e","memory.rss":"891703296","memory.heapUsed":"88014232","memory.heapTotal":"91439104"},"startTime":1776043629711,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":2703,"timestamp":506235675124,"id":259,"parentId":3,"tags":{"inputPage":"/scrap/page"},"startTime":1776043632817,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":16703,"timestamp":506235678754,"id":260,"parentId":1,"tags":{"path":"/scrap?_rsc=17yqj"},"startTime":1776043632838,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":21883,"timestamp":506235674686,"id":258,"parentId":1,"tags":{"url":"/scrap?_rsc=17yqj"},"startTime":1776043632817,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":3,"timestamp":506235696608,"id":261,"parentId":258,"tags":{"url":"/scrap?_rsc=17yqj","memory.rss":"890818560","memory.heapUsed":"83681568","memory.heapTotal":"91439104"},"startTime":1776043632839,"traceId":"9d03e020888f11ed"},{"name":"turbopack-persistence","duration":11000,"timestamp":506237707298,"id":262,"parentId":3,"tags":{"reason":"idle timeout","snapshot_duration_ms":0.5429,"persist_duration_ms":11.179,"task_count":97},"startTime":1776043634862,"traceId":"9d03e020888f11ed"}] +[{"name":"turbopack-persistence","duration":10000,"timestamp":506333616945,"id":264,"parentId":3,"tags":{"reason":"idle timeout","snapshot_duration_ms":0.5263000000000001,"persist_duration_ms":9.2551,"task_count":1},"startTime":1776043730769,"traceId":"9d03e020888f11ed"}] +[{"name":"turbopack-persistence","duration":9000,"timestamp":506338325718,"id":266,"parentId":3,"tags":{"reason":"idle timeout","snapshot_duration_ms":0.5546,"persist_duration_ms":8.2142,"task_count":1},"startTime":1776043735475,"traceId":"9d03e020888f11ed"}] +[{"name":"ensure-page","duration":1110,"timestamp":508869861354,"id":269,"parentId":3,"tags":{"inputPage":"/calibration/page"},"startTime":1776046267003,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":25625,"timestamp":508869863241,"id":270,"parentId":1,"tags":{"path":"/calibration?_rsc=1hghk"},"startTime":1776046267031,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":29060,"timestamp":508869860980,"id":268,"parentId":1,"tags":{"url":"/calibration?_rsc=1hghk"},"startTime":1776046267003,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":4,"timestamp":508869890094,"id":271,"parentId":268,"tags":{"url":"/calibration?_rsc=1hghk","memory.rss":"890155008","memory.heapUsed":"84846976","memory.heapTotal":"92725248"},"startTime":1776046267032,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":1074,"timestamp":508873660646,"id":273,"parentId":3,"tags":{"inputPage":"/devices/page"},"startTime":1776046270802,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":14826,"timestamp":508873662465,"id":274,"parentId":1,"tags":{"path":"/devices?_rsc=1hj8e"},"startTime":1776046270819,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":17541,"timestamp":508873660301,"id":272,"parentId":1,"tags":{"url":"/devices?_rsc=1hj8e"},"startTime":1776046270802,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":2,"timestamp":508873677870,"id":275,"parentId":272,"tags":{"url":"/devices?_rsc=1hj8e","memory.rss":"889647104","memory.heapUsed":"85476264","memory.heapTotal":"92725248"},"startTime":1776046270819,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":2915,"timestamp":608784526522,"id":277,"parentId":3,"tags":{"inputPage":"/models/page"},"startTime":1776146181669,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":21887,"timestamp":608784530490,"id":278,"parentId":1,"tags":{"path":"/models?_rsc=3ar9b"},"startTime":1776146181695,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":27374,"timestamp":608784525808,"id":276,"parentId":1,"tags":{"url":"/models?_rsc=3ar9b"},"startTime":1776146181668,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":2,"timestamp":608784553210,"id":279,"parentId":276,"tags":{"url":"/models?_rsc=3ar9b","memory.rss":"890630144","memory.heapUsed":"88210560","memory.heapTotal":"92143616"},"startTime":1776146181695,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":2287,"timestamp":608785475330,"id":281,"parentId":3,"tags":{"inputPage":"/devices/page"},"startTime":1776146182617,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":18077,"timestamp":608785478465,"id":282,"parentId":1,"tags":{"path":"/devices?_rsc=1un77"},"startTime":1776146182639,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":22347,"timestamp":608785474748,"id":280,"parentId":1,"tags":{"url":"/devices?_rsc=1un77"},"startTime":1776146182617,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":2,"timestamp":608785497125,"id":283,"parentId":280,"tags":{"url":"/devices?_rsc=1un77","memory.rss":"890707968","memory.heapUsed":"88868472","memory.heapTotal":"92667904"},"startTime":1776146182639,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":2986,"timestamp":608786587564,"id":285,"parentId":3,"tags":{"inputPage":"/registration/page"},"startTime":1776146183730,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":21444,"timestamp":608786591698,"id":286,"parentId":1,"tags":{"path":"/registration?_rsc=3ar9b"},"startTime":1776146183756,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":26703,"timestamp":608786587241,"id":284,"parentId":1,"tags":{"url":"/registration?_rsc=3ar9b"},"startTime":1776146183729,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":2,"timestamp":608786613974,"id":287,"parentId":284,"tags":{"url":"/registration?_rsc=3ar9b","memory.rss":"890961920","memory.heapUsed":"89587624","memory.heapTotal":"93192192"},"startTime":1776146183756,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":1306,"timestamp":608903683780,"id":289,"parentId":3,"tags":{"inputPage":"/devices/page"},"startTime":1776146300826,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":14735,"timestamp":608903686001,"id":290,"parentId":1,"tags":{"path":"/devices?_rsc=qfacv"},"startTime":1776146300843,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":18088,"timestamp":608903683427,"id":288,"parentId":1,"tags":{"url":"/devices?_rsc=qfacv"},"startTime":1776146300825,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":3,"timestamp":608903701558,"id":291,"parentId":288,"tags":{"url":"/devices?_rsc=qfacv","memory.rss":"892047360","memory.heapUsed":"90347560","memory.heapTotal":"94502912"},"startTime":1776146300843,"traceId":"9d03e020888f11ed"},{"name":"compile-path","duration":31231,"timestamp":609079930573,"id":294,"parentId":1,"tags":{"trigger":"/devices"},"startTime":1776146477073,"traceId":"9d03e020888f11ed"}] +[{"name":"client-hmr-latency","duration":241000,"timestamp":609079685123,"id":297,"parentId":3,"tags":{"updatedModules":["[project]/src/app/devices/page.tsx [app-client]"],"page":"/devices","isPageHidden":false},"startTime":1776146478485,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":2280,"timestamp":609081361803,"id":299,"parentId":3,"tags":{"inputPage":"/devices/page"},"startTime":1776146478504,"traceId":"9d03e020888f11ed"},{"name":"compile-path","duration":1042773,"timestamp":609081341945,"id":296,"parentId":1,"tags":{"trigger":"/_error"},"startTime":1776146478484,"traceId":"9d03e020888f11ed"}] +[{"name":"handle-request","duration":2744359,"timestamp":609079929459,"id":292,"parentId":1,"tags":{"url":"/devices?_rsc=15bk2"},"startTime":1776146477072,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":2,"timestamp":609082673863,"id":301,"parentId":292,"tags":{"url":"/devices?_rsc=15bk2","memory.rss":"1190420480","memory.heapUsed":"284308864","memory.heapTotal":"312778752"},"startTime":1776146479816,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":658600,"timestamp":609082016354,"id":300,"parentId":3,"tags":{"inputPage":"/_error"},"startTime":1776146479159,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":1324417,"timestamp":609081361079,"id":298,"parentId":1,"tags":{"url":"/devices"},"startTime":1776146478503,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":6,"timestamp":609082685578,"id":302,"parentId":298,"tags":{"url":"/devices","memory.rss":"1190535168","memory.heapUsed":"285197176","memory.heapTotal":"313040896"},"startTime":1776146479828,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":214803,"timestamp":609082473467,"id":303,"parentId":1,"tags":{"path":"/devices?_rsc=15bk2"},"startTime":1776146479831,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":13948,"timestamp":609082675907,"id":304,"parentId":1,"tags":{"path":"/devices"},"startTime":1776146479832,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":2062,"timestamp":609082692921,"id":306,"parentId":3,"tags":{"inputPage":"/devices/page"},"startTime":1776146479835,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":6516,"timestamp":609083331701,"id":307,"parentId":3,"tags":{"inputPage":"/_error"},"startTime":1776146480474,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":656146,"timestamp":609082692292,"id":305,"parentId":1,"tags":{"url":"/devices?_rsc=15bk2"},"startTime":1776146479835,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":3,"timestamp":609083348473,"id":310,"parentId":305,"tags":{"url":"/devices?_rsc=15bk2","memory.rss":"1278525440","memory.heapUsed":"364596304","memory.heapTotal":"399974400"},"startTime":1776146480491,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":13318,"timestamp":609083336124,"id":309,"parentId":3,"tags":{"inputPage":"/devices/page"},"startTime":1776146480478,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":566117,"timestamp":609083339792,"id":312,"parentId":1,"tags":{"path":"/devices?_rsc=15bk2"},"startTime":1776146481048,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":7579,"timestamp":609083901285,"id":311,"parentId":3,"tags":{"inputPage":"/_error"},"startTime":1776146481043,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":582286,"timestamp":609083334932,"id":308,"parentId":1,"tags":{"url":"/devices"},"startTime":1776146480477,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":2,"timestamp":609083917251,"id":313,"parentId":308,"tags":{"url":"/devices","memory.rss":"1355603968","memory.heapUsed":"449758024","memory.heapTotal":"478265344"},"startTime":1776146481059,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":18672,"timestamp":609083909808,"id":316,"parentId":1,"tags":{"path":"/devices"},"startTime":1776146481071,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":12959,"timestamp":609083917775,"id":315,"parentId":3,"tags":{"inputPage":"/devices/page"},"startTime":1776146481060,"traceId":"9d03e020888f11ed"},{"name":"render-path","duration":866192,"timestamp":609083931714,"id":318,"parentId":1,"tags":{"path":"/devices?_rsc=15bk2"},"startTime":1776146481940,"traceId":"9d03e020888f11ed"},{"name":"ensure-page","duration":9602,"timestamp":609084791354,"id":317,"parentId":3,"tags":{"inputPage":"/_error"},"startTime":1776146481934,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":894782,"timestamp":609083917454,"id":314,"parentId":1,"tags":{"url":"/devices?_rsc=15bk2"},"startTime":1776146481060,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":2,"timestamp":609084812266,"id":319,"parentId":314,"tags":{"url":"/devices?_rsc=15bk2","memory.rss":"1297915904","memory.heapUsed":"189125704","memory.heapTotal":"252837888"},"startTime":1776146481954,"traceId":"9d03e020888f11ed"},{"name":"navigation-to-hydration","duration":2348000,"timestamp":609082692796,"id":320,"parentId":3,"tags":{"pathname":"/devices","query":""},"startTime":1776146482187,"traceId":"9d03e020888f11ed"},{"name":"turbopack-persistence","duration":337000,"timestamp":609087122455,"id":321,"parentId":3,"tags":{"reason":"idle timeout","snapshot_duration_ms":0.962,"persist_duration_ms":335.37919999999997,"task_count":4096},"startTime":1776146484602,"traceId":"9d03e020888f11ed"}] +[{"name":"turbopack-compaction","duration":1677000,"timestamp":609087460205,"id":323,"parentId":3,"tags":{},"startTime":1776146486279,"traceId":"9d03e020888f11ed"}] +[{"name":"client-hmr-latency","duration":388000,"timestamp":609131736407,"id":325,"parentId":3,"tags":{"updatedModules":[],"page":"/devices","isPageHidden":false},"startTime":1776146529293,"traceId":"9d03e020888f11ed"},{"name":"compile-path","duration":47188,"timestamp":609132215753,"id":328,"parentId":1,"tags":{"trigger":"/devices"},"startTime":1776146529358,"traceId":"9d03e020888f11ed"}] +[{"name":"render-path","duration":552481,"timestamp":609132665025,"id":329,"parentId":1,"tags":{"path":"/devices"},"startTime":1776146530360,"traceId":"9d03e020888f11ed"},{"name":"handle-request","duration":1005013,"timestamp":609132213777,"id":326,"parentId":1,"tags":{"url":"/devices"},"startTime":1776146529356,"traceId":"9d03e020888f11ed"},{"name":"memory-usage","duration":3,"timestamp":609133218881,"id":330,"parentId":326,"tags":{"url":"/devices","memory.rss":"1036951552","memory.heapUsed":"136689552","memory.heapTotal":"154652672"},"startTime":1776146530361,"traceId":"9d03e020888f11ed"},{"name":"turbopack-persistence","duration":97000,"timestamp":609135501226,"id":331,"parentId":3,"tags":{"reason":"idle timeout","snapshot_duration_ms":0.9155,"persist_duration_ms":96.44930000000001,"task_count":3278},"startTime":1776146532740,"traceId":"9d03e020888f11ed"}] diff --git a/src/app/devices/page.tsx b/src/app/devices/page.tsx index 72432a7..72d7aee 100644 --- a/src/app/devices/page.tsx +++ b/src/app/devices/page.tsx @@ -1,21 +1,21 @@ 'use client' -import { useState } from 'react' +import { useState, useMemo } from 'react' import Link from 'next/link' -import { Download, Plus, Search, ChevronLeft, ChevronRight, Monitor, Cpu, Wifi, Power } from 'lucide-react' +import { Download, Plus, Search, ChevronLeft, ChevronRight, Monitor, Cpu, Wifi, Power, Tag } from 'lucide-react' const devicesData = [ - { id: 1, sn: 'GD30-2025-000001', model: 'GD-30 Supreme', type: '高密度电法仪', status: '已激活', firmware: 'v2.3.5', productionDate: '2025-01-15 14:30', customer: '北京地质研究院' }, - { id: 2, sn: 'GD30-2025-000002', model: 'GD-30 Supreme', type: '高密度电法仪', status: '已激活', firmware: 'v2.3.5', productionDate: '2025-01-18 09:15', customer: '中国地质大学' }, - { id: 3, sn: 'GD30-2024-000056', model: 'GD-30 Supreme', type: '高密度电法仪', status: '已出厂', firmware: 'v2.3.4', productionDate: '2024-12-20 16:00', customer: '成都理工大学' }, - { id: 4, sn: 'GT20-2025-000045', model: 'GD-20', type: '二维电法仪', status: '已激活', firmware: 'v1.8.5', productionDate: '2025-02-10 11:20', customer: '武汉地质调查中心' }, - { id: 5, sn: 'GT20-2025-000046', model: 'GD-20', type: '二维电法仪', status: '装配中', firmware: 'v1.8.5', productionDate: '2025-03-01 08:45', customer: '-' }, - { id: 6, sn: 'GD30-2024-000078', model: 'GD-30 Supreme', type: '高密度电法仪', status: '已出厂', firmware: 'v2.3.4', productionDate: '2024-11-05 13:30', customer: '长安大学' }, - { id: 7, sn: 'GD10-2024-000033', model: 'GD-10 Supreme', type: '入门级电法仪', status: '已激活', firmware: 'v1.5.2', productionDate: '2024-09-12 10:00', customer: '河海大学' }, - { id: 8, sn: 'GD30-2024-000089', model: 'GD-30 Supreme', type: '高密度电法仪', status: '装配中', firmware: 'v2.3.5', productionDate: '2025-03-05 15:10', customer: '-' }, - { id: 9, sn: 'GT20-2025-000012', model: 'GD-20', type: '二维电法仪', status: '已激活', firmware: 'v1.8.5', productionDate: '2025-01-22 09:30', customer: '中南大学' }, - { id: 10, sn: 'GD30-2024-000102', model: 'GD-30 Supreme', type: '高密度电法仪', status: '已出厂', firmware: 'v2.3.4', productionDate: '2024-10-18 14:00', customer: '吉林大学' }, - { id: 11, sn: 'GD10-2024-000034', model: 'GD-10 Supreme', type: '入门级电法仪', status: '装配中', firmware: 'v1.5.2', productionDate: '2025-03-08 11:45', customer: '-' }, - { id: 12, sn: 'GD30-2024-000145', model: 'GD-30 Supreme', type: '高密度电法仪', status: '已激活', firmware: 'v2.3.5', productionDate: '2024-08-25 16:20', customer: '同济大学' }, + { id: 1, sn: 'GD30-2025-000001', model: 'GD-30 Supreme', type: '高密度电法仪', status: '已激活', firmware: 'v2.3.5', productionDate: '2025-01-15 14:30', customer: '北京地质研究院', batch: 'B2025-01' }, + { id: 2, sn: 'GD30-2025-000002', model: 'GD-30 Supreme', type: '高密度电法仪', status: '已激活', firmware: 'v2.3.5', productionDate: '2025-01-18 09:15', customer: '中国地质大学', batch: 'B2025-01' }, + { id: 3, sn: 'GD30-2024-000056', model: 'GD-30 Supreme', type: '高密度电法仪', status: '已出厂', firmware: 'v2.3.4', productionDate: '2024-12-20 16:00', customer: '成都理工大学', batch: 'B2024-12' }, + { id: 4, sn: 'GT20-2025-000045', model: 'GD-20', type: '二维电法仪', status: '已激活', firmware: 'v1.8.5', productionDate: '2025-02-10 11:20', customer: '武汉地质调查中心', batch: 'B2025-02' }, + { id: 5, sn: 'GT20-2025-000046', model: 'GD-20', type: '二维电法仪', status: '装配中', firmware: 'v1.8.5', productionDate: '2025-03-01 08:45', customer: '-', batch: 'B2025-03' }, + { id: 6, sn: 'GD30-2024-000078', model: 'GD-30 Supreme', type: '高密度电法仪', status: '已出厂', firmware: 'v2.3.4', productionDate: '2024-11-05 13:30', customer: '长安大学', batch: 'B2024-11' }, + { id: 7, sn: 'GD10-2024-000033', model: 'GD-10 Supreme', type: '入门级电法仪', status: '已激活', firmware: 'v1.5.2', productionDate: '2024-09-12 10:00', customer: '河海大学', batch: 'B2024-09' }, + { id: 8, sn: 'GD30-2024-000089', model: 'GD-30 Supreme', type: '高密度电法仪', status: '装配中', firmware: 'v2.3.5', productionDate: '2025-03-05 15:10', customer: '-', batch: 'B2025-03' }, + { id: 9, sn: 'GT20-2025-000012', model: 'GD-20', type: '二维电法仪', status: '已激活', firmware: 'v1.8.5', productionDate: '2025-01-22 09:30', customer: '中南大学', batch: 'B2025-01' }, + { id: 10, sn: 'GD30-2024-000102', model: 'GD-30 Supreme', type: '高密度电法仪', status: '已出厂', firmware: 'v2.3.4', productionDate: '2024-10-18 14:00', customer: '吉林大学', batch: 'B2024-10' }, + { id: 11, sn: 'GD10-2024-000034', model: 'GD-10 Supreme', type: '入门级电法仪', status: '装配中', firmware: 'v1.5.2', productionDate: '2025-03-08 11:45', customer: '-', batch: 'B2025-03' }, + { id: 12, sn: 'GD30-2024-000145', model: 'GD-30 Supreme', type: '高密度电法仪', status: '已激活', firmware: 'v2.3.5', productionDate: '2024-08-25 16:20', customer: '同济大学', batch: 'B2024-08' }, ] const modelOptions = ['全部', 'GD-30 Supreme', 'GD-20', 'GD-10 Supreme'] @@ -44,10 +44,23 @@ export default function DevicesPage() { const [filterStatus, setFilterStatus] = useState('全部') const [filterDate, setFilterDate] = useState('') const [searchText, setSearchText] = useState('') + const [selectedBatch, setSelectedBatch] = useState('全部') const [currentPage, setCurrentPage] = useState(1) const pageSize = 8 + // 从数据中提取所有批次并按时间倒序排列,统计每个批次的设备数量 + const batchList = useMemo(() => { + const batchMap = new Map() + devicesData.forEach(d => { + batchMap.set(d.batch, (batchMap.get(d.batch) || 0) + 1) + }) + return Array.from(batchMap.entries()) + .sort((a, b) => b[0].localeCompare(a[0])) + .map(([batch, count]) => ({ batch, count })) + }, []) + const filtered = devicesData.filter(d => { + if (selectedBatch !== '全部' && d.batch !== selectedBatch) return false if (filterModel !== '全部' && d.model !== filterModel) return false if (filterStatus !== '全部' && d.status !== filterStatus) return false if (filterDate && !d.productionDate.startsWith(filterDate)) return false @@ -57,6 +70,11 @@ export default function DevicesPage() { const totalPages = Math.ceil(filtered.length / pageSize) const paged = filtered.slice((currentPage - 1) * pageSize, currentPage * pageSize) + const handleBatchSelect = (batch: string) => { + setSelectedBatch(batch) + setCurrentPage(1) + } + return (
{/* Header */} @@ -104,52 +122,106 @@ export default function DevicesPage() {
- {/* Device Cards */} -
- {paged.map(device => ( -
-
-
- {device.sn} + {/* Main content: Batch sidebar + Device cards */} +
+ {/* Batch sidebar */} +
+
+ + 生产批次 +
+
+ + {batchList.map(({ batch, count }) => ( + + ))} +
+
+ + {/* Right content area */} +
+ {/* Device Cards */} +
+ {paged.map(device => ( +
+
+
+ {device.sn} +
+
+ {getStatusIcon(device.status)} + {device.status} + {device.batch} +
+
+
型号:{device.model} {device.type}
+
主机版本:{device.firmware}
+
生产日期:{device.productionDate}
+
+
+
+ + 详情 + + {device.status === '已激活' && ( + <> +
+ + + )} +
-
- {getStatusIcon(device.status)} - {device.status} -
-
-
型号:{device.model} {device.type}
-
主机版本:{device.firmware}
-
生产日期:{device.productionDate}
-
-
-
- - 详情 - - {device.status === '已激活' && ( - <> -
- - - )} + ))} +
+ + {/* Pagination */} +
+ + 显示 {filtered.length > 0 ? (currentPage - 1) * pageSize + 1 : 0}-{Math.min(currentPage * pageSize, filtered.length)} / 共 {filtered.length} 台 + +
+ + {Array.from({ length: totalPages }, (_, i) => ( + + ))} +
- ))} -
- - {/* Pagination */} -
- - 显示 {(currentPage - 1) * pageSize + 1}-{Math.min(currentPage * pageSize, filtered.length)} / 共 {filtered.length} 台 - -
- - {Array.from({ length: totalPages }, (_, i) => ( - - ))} -