diff --git a/apps/frontend/src/pages/worker/WorkerHallPage.tsx b/apps/frontend/src/pages/worker/WorkerHallPage.tsx index 044b2991..6471671e 100644 --- a/apps/frontend/src/pages/worker/WorkerHallPage.tsx +++ b/apps/frontend/src/pages/worker/WorkerHallPage.tsx @@ -1,11 +1,16 @@ import { AppstoreOutlined, + ArrowRightOutlined, + CheckCircleOutlined, ClockCircleOutlined, + FireOutlined, PushpinOutlined, QuestionCircleOutlined, ReloadOutlined, SearchOutlined, + ThunderboltOutlined, TrophyOutlined, + WalletOutlined, } from '@ant-design/icons' import { useInfiniteQuery, useQuery, useQueryClient } from '@tanstack/react-query' import { @@ -28,6 +33,7 @@ import { Typography, } from 'antd' import { useEffect, useRef, useState } from 'react' +import { Link } from 'react-router' import { fetchWorkerHallOrders, @@ -159,6 +165,9 @@ export default function WorkerHallPage() { const maxActiveOrders = Number(worker?.level?.permissions.maxActiveOrders || 0) const remainingSlots = maxActiveOrders > 0 ? Math.max(0, maxActiveOrders - activeCount) : null const shouldWarn = (remainingSlots !== null && remainingSlots <= 0) || problemCount > 0 + const totalHallOrders = Number(ordersQuery.data?.pages[0]?.data.pagination.total || orders.length) + const quotaPercent = + maxActiveOrders > 0 ? Math.min(100, Math.round((activeCount / maxActiveOrders) * 100)) : 0 useEffect(() => { const target = loadMoreRef.current @@ -363,11 +372,18 @@ export default function WorkerHallPage() { className={`worker-hall-game-card ${primaryCategoryId === 0 ? 'active' : ''}`} onClick={() => handleSelectPrimaryCategory(0)} > -
+
@@ -380,7 +396,14 @@ export default function WorkerHallPage() { className={`worker-hall-game-card ${primaryCategoryId === category.categoryId ? 'active' : ''}`} onClick={() => handleSelectPrimaryCategory(category.categoryId)} > -
+
{category.iconUrl ? ( ) : (
-
-
- 抢单大厅 -
-
- - - 抢单确认 - - - - -
-
- - - -
-
+ {/* 桌面端整合头部:标题 + 实时派单标签 + 居中全局搜索 + 快捷操作 */} +
+
+ + 抢单大厅 + + + + 实时派单 +
-
- +
+ } + prefix={} onChange={(event) => { const nextKeyword = event.target.value setKeywordInput(nextKeyword) @@ -662,33 +656,163 @@ export default function WorkerHallPage() {
+ +
+ + + + + +
+
+ + {/* 桌面端 4 栏 KPI 仪表盘 */} +
+ {/* 卡片 1: 账户资产 */} +
+
+
+ +
+
+ 可用余额 + + {worker ? formatMoney(worker.wallet.availableAmount) : '-'} + +
+
+
+
+ 冻结押金: + + {worker ? formatMoney(worker.wallet.frozenDepositAmount) : '¥0.00'} + +
+ {worker?.level?.name ? ( + {worker.level.name} + ) : null} +
+
+ + {/* 卡片 2: 接单配额 */} +
+
+
+ +
+
+ 接单配额 + + {remainingSlots === null ? '未限制' : `${activeCount} / ${maxActiveOrders}`} + 单 + +
+
+
+
+
85 ? 'danger' : quotaPercent > 60 ? 'warning' : 'safe' + }`} + style={{ width: `${quotaPercent}%` }} + /> +
+ + {remainingSlots === null + ? '等级未限' + : remainingSlots > 0 + ? `还可接 ${remainingSlots} 单` + : '已达上限'} + +
+
+ + {/* 卡片 3: 进行中任务 */} +
+
+
+ +
+
+ 进行中任务 + + {activeCount} + 单代练中 + +
+
+
+
+ 待验收 {pendingAcceptanceCount} + 0 ? 'red' : 'neutral'}`}> + 问题单 {problemCount} + +
+ + 工单管理 + +
+
+ + {/* 卡片 4: 实时订单池 */} +
+
+
+ +
+
+ 大厅可抢订单 + + {totalHallOrders} + 单在池 + +
+
+
+ + + 极速响应 · 秒级派发 + + 支持拼单 +
+
-
- {summaryItems.map((item) => ( -
- {item.label} - {item.value} - {item.note} -
- ))} -
- {/* 桌面端一级分类卡片与二级联动 */} {primaryCategories.length > 0 ? ( -
+