优化接单大厅数量和排行榜
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
|||||||
ShoppingOutlined,
|
ShoppingOutlined,
|
||||||
UserOutlined,
|
UserOutlined,
|
||||||
} from '@ant-design/icons'
|
} from '@ant-design/icons'
|
||||||
import { App, Button, Layout, Menu, Space, Tag, Typography } from 'antd'
|
import { App, Button, Layout, Menu, Typography } from 'antd'
|
||||||
import type { MenuProps } from 'antd'
|
import type { MenuProps } from 'antd'
|
||||||
import { Outlet, useLocation, useNavigate } from 'react-router'
|
import { Outlet, useLocation, useNavigate } from 'react-router'
|
||||||
|
|
||||||
@@ -67,12 +67,6 @@ export default function WorkerLayout() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="worker-mobile-user-area">
|
<div className="worker-mobile-user-area">
|
||||||
<Tag color={resolveStatusTagColor(status)} className="worker-mobile-status-tag">
|
|
||||||
{formatWorkerStatus(status)}
|
|
||||||
</Tag>
|
|
||||||
<span className="worker-mobile-username" title={username}>
|
|
||||||
{username}
|
|
||||||
</span>
|
|
||||||
<Button
|
<Button
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -141,12 +135,6 @@ export default function WorkerLayout() {
|
|||||||
</div>
|
</div>
|
||||||
</Layout.Sider>
|
</Layout.Sider>
|
||||||
<Layout className="admin-main-shell">
|
<Layout className="admin-main-shell">
|
||||||
<Layout.Header className="admin-topbar">
|
|
||||||
<Space className="admin-user" size={12}>
|
|
||||||
<Tag color={resolveStatusTagColor(status)}>{formatWorkerStatus(status)}</Tag>
|
|
||||||
<Typography.Text strong>{username}</Typography.Text>
|
|
||||||
</Space>
|
|
||||||
</Layout.Header>
|
|
||||||
<Layout.Content className="admin-content">
|
<Layout.Content className="admin-content">
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</Layout.Content>
|
</Layout.Content>
|
||||||
@@ -168,11 +156,3 @@ function formatWorkerStatus(status: string) {
|
|||||||
if (status === 'disabled') return '已停用'
|
if (status === 'disabled') return '已停用'
|
||||||
return '未登录'
|
return '未登录'
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolveStatusTagColor(status: string) {
|
|
||||||
if (status === 'active') return 'success'
|
|
||||||
if (status === 'pending_review') return 'warning'
|
|
||||||
if (status === 'rejected') return 'error'
|
|
||||||
if (status === 'disabled') return 'default'
|
|
||||||
return 'default'
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -462,14 +462,8 @@ export default function WorkerHallPage() {
|
|||||||
<div className="worker-page-head">
|
<div className="worker-page-head">
|
||||||
<div className="worker-page-head-title-row">
|
<div className="worker-page-head-title-row">
|
||||||
<Typography.Title level={3}>抢单大厅</Typography.Title>
|
<Typography.Title level={3}>抢单大厅</Typography.Title>
|
||||||
|
<div className="worker-hall-page-actions">
|
||||||
<div className="worker-hall-head-controls">
|
<div className="worker-hall-head-controls">
|
||||||
<Tooltip title="接单排行榜">
|
|
||||||
<Button
|
|
||||||
aria-label="接单排行榜"
|
|
||||||
icon={<TrophyOutlined />}
|
|
||||||
onClick={() => setLeaderboardOpen(true)}
|
|
||||||
/>
|
|
||||||
</Tooltip>
|
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={
|
title={
|
||||||
autoRefresh
|
autoRefresh
|
||||||
@@ -498,6 +492,18 @@ export default function WorkerHallPage() {
|
|||||||
刷新
|
刷新
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="worker-hall-leaderboard-trigger">
|
||||||
|
<Tooltip title="接单排行榜">
|
||||||
|
<Button
|
||||||
|
aria-label="接单排行榜"
|
||||||
|
icon={<TrophyOutlined />}
|
||||||
|
onClick={() => setLeaderboardOpen(true)}
|
||||||
|
>
|
||||||
|
接单排行榜
|
||||||
|
</Button>
|
||||||
|
</Tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="worker-hall-search-bar">
|
<div className="worker-hall-search-bar">
|
||||||
|
|||||||
@@ -13,20 +13,27 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.worker-page-head {
|
.worker-page-head {
|
||||||
display: flex;
|
display: grid;
|
||||||
|
grid-template-areas:
|
||||||
|
'main'
|
||||||
|
'search';
|
||||||
|
grid-template-columns: minmax(0, 1fr);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
gap: 12px 16px;
|
||||||
gap: 16px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.worker-page-head h3 {
|
.worker-page-head h3 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.worker-page-head-title-row {
|
.worker-page-head-title-row {
|
||||||
|
grid-area: main;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
min-width: 0;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,9 +60,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.worker-hall-search-bar {
|
.worker-hall-search-bar {
|
||||||
|
grid-area: search;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.worker-hall-leaderboard-trigger {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.worker-hall-page-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ===== 我的订单统计与 Tabs (PC端) ===== */
|
/* ===== 我的订单统计与 Tabs (PC端) ===== */
|
||||||
|
|
||||||
.worker-orders-toolbar {
|
.worker-orders-toolbar {
|
||||||
@@ -405,29 +424,46 @@
|
|||||||
|
|
||||||
.worker-hall-card-grid {
|
.worker-hall-card-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
|
grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
|
||||||
gap: 16px;
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 1080P 标准桌面屏 (1440px - 1980px) 稳定呈现 6 列 */
|
||||||
|
@media (min-width: 1440px) and (max-width: 1980px) {
|
||||||
|
.worker-hall-card-grid {
|
||||||
|
grid-template-columns: repeat(6, minmax(0, 1fr));
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 2K 及以上高分宽屏显示器稳定呈现 7 列 */
|
||||||
|
@media (min-width: 1981px) {
|
||||||
|
.worker-hall-card-grid {
|
||||||
|
grid-template-columns: repeat(7, minmax(0, 1fr));
|
||||||
|
gap: 14px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.worker-hall-card {
|
.worker-hall-card {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
padding: 16px;
|
padding: 12px 14px;
|
||||||
border-radius: 14px;
|
border-radius: 12px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border: 1px solid #e5e7eb;
|
border: 1px solid #e5e7eb;
|
||||||
box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
|
box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 12px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.worker-hall-card-title {
|
.worker-hall-card-title {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 4px;
|
gap: 3px;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.worker-hall-card-title .ant-typography {
|
.worker-hall-card-title .ant-typography {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.worker-hall-card-link,
|
.worker-hall-card-link,
|
||||||
@@ -436,7 +472,7 @@
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #0f172a;
|
color: #0f172a;
|
||||||
font-size: 15px;
|
font-size: 14px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -444,12 +480,12 @@
|
|||||||
|
|
||||||
.worker-hall-card-amount-row {
|
.worker-hall-card-amount-row {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 6px;
|
gap: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.worker-hall-card-amount {
|
.worker-hall-card-amount {
|
||||||
color: #f97316;
|
color: #f97316;
|
||||||
font-size: 32px;
|
font-size: 28px;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
@@ -458,12 +494,12 @@
|
|||||||
.worker-hall-card-hint {
|
.worker-hall-card-hint {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 1.5;
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.worker-hall-card-actions {
|
.worker-hall-card-actions {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 8px;
|
gap: 6px;
|
||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -471,7 +507,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 8px;
|
gap: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.worker-hall-card-actions-row .ant-btn {
|
.worker-hall-card-actions-row .ant-btn {
|
||||||
@@ -480,12 +516,14 @@
|
|||||||
|
|
||||||
.worker-hall-card-grab-row {
|
.worker-hall-card-grab-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.worker-hall-card-grab-row .ant-btn {
|
.worker-hall-card-grab-row .ant-btn {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
padding-inline: 6px;
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.worker-hall-sharing-button:not(:disabled) {
|
.worker-hall-sharing-button:not(:disabled) {
|
||||||
|
|||||||
Reference in New Issue
Block a user