diff --git a/apps/frontend/src/pages/admin/AdminWorkerPlatformPage.tsx b/apps/frontend/src/pages/admin/AdminWorkerPlatformPage.tsx
index 349e9df9..4be3a2b1 100644
--- a/apps/frontend/src/pages/admin/AdminWorkerPlatformPage.tsx
+++ b/apps/frontend/src/pages/admin/AdminWorkerPlatformPage.tsx
@@ -17,8 +17,11 @@ import WorkOrdersPanel from './panels/WorkOrdersPanel'
export default function AdminWorkerPlatformPage() {
const [searchParams] = useSearchParams()
const [activeTab, setActiveTab] = useState(() => loadActiveTab(searchParams.get('tab')))
- const isAdmin = getAdminRole() === 'admin'
- const visibleActiveTab = !isAdmin && activeTab === 'notifications' ? 'orders' : activeTab
+ const role = getAdminRole()
+ const isAdmin = role === 'admin'
+ const isSupport = role === 'support'
+ const visibleActiveTab =
+ isSupport || (!isAdmin && activeTab === 'notifications') ? 'orders' : activeTab
useEffect(() => {
const tab = searchParams.get('tab')
@@ -40,17 +43,21 @@ export default function AdminWorkerPlatformPage() {
destroyOnHidden={false}
activeKey={visibleActiveTab}
onChange={changeTab}
- items={[
- { key: 'orders', label: '接单工单', children: },
- { key: 'rules', label: '物品规则', children: },
- { key: 'categories', label: '分类', children: },
- { key: 'workers', label: '打手', children: },
- { key: 'finance', label: '资金', children: },
- { key: 'levels', label: '等级权限', children: },
- ...(isAdmin
- ? [{ key: 'notifications', label: '通知配置', children: }]
- : []),
- ]}
+ items={
+ isSupport
+ ? [{ key: 'orders', label: '接单工单', children: }]
+ : [
+ { key: 'orders', label: '接单工单', children: },
+ { key: 'rules', label: '物品规则', children: },
+ { key: 'categories', label: '分类', children: },
+ { key: 'workers', label: '打手', children: },
+ { key: 'finance', label: '资金', children: },
+ { key: 'levels', label: '等级权限', children: },
+ ...(isAdmin
+ ? [{ key: 'notifications', label: '通知配置', children: }]
+ : []),
+ ]
+ }
/>
)
diff --git a/apps/frontend/src/pages/admin/panels/WorkOrdersPanel.tsx b/apps/frontend/src/pages/admin/panels/WorkOrdersPanel.tsx
index d2f5c1c5..0968b67f 100644
--- a/apps/frontend/src/pages/admin/panels/WorkOrdersPanel.tsx
+++ b/apps/frontend/src/pages/admin/panels/WorkOrdersPanel.tsx
@@ -125,6 +125,7 @@ export default function WorkOrdersPanel() {
const [searchParams, setSearchParams] = useSearchParams()
const queryClient = useQueryClient()
const canEditRequirementFields = hasAdminRole('operator')
+ const canViewStatistics = hasAdminRole('operator')
const [statuses, setStatuses] = useState([])
const [targetWorkOrderId, setTargetWorkOrderId] = useState()
const [keyword, setKeyword] = useState('')
@@ -965,7 +966,9 @@ export default function WorkOrdersPanel() {
-
+ {canViewStatistics ? (
+
+ ) : null}