From c94fe7fd80d7986e9b64ece642a1a7d32cf29214 Mon Sep 17 00:00:00 2001 From: zouzhiwen <409053122@qq.com> Date: Wed, 3 Jun 2026 18:05:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=99=BA=E4=B8=96=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/extensionResource.ts | 20 ++ src/api/palletCacheStation.ts | 18 -- src/api/task.ts | 10 +- src/layouts/AdminLayout.vue | 14 +- src/router/index.ts | 8 +- .../ExtensionResourceView.vue} | 224 ++++++++++-------- src/views/task/TaskChainDetail.vue | 31 ++- tsconfig.tsbuildinfo | 2 +- 8 files changed, 195 insertions(+), 132 deletions(-) create mode 100644 src/api/extensionResource.ts delete mode 100644 src/api/palletCacheStation.ts rename src/views/{station/PalletCacheStationView.vue => resource/ExtensionResourceView.vue} (59%) diff --git a/src/api/extensionResource.ts b/src/api/extensionResource.ts new file mode 100644 index 0000000..5965f20 --- /dev/null +++ b/src/api/extensionResource.ts @@ -0,0 +1,20 @@ +import request from '@/utils/request' + +export interface ExtensionResourceSnapshotVO { + resourceType: string + resourceName: string + warehouse: string + capacity: number + boundCount: number + reservedCount: number + totalCount: number + remainingCapacity: number + reservedChainCodes: string[] +} + +export function getExtensionResourceSnapshots(warehouse: string) { + return request.get( + '/api/robot/external/admin/extension-resource/snapshot', + { params: { warehouse } }, + ) +} diff --git a/src/api/palletCacheStation.ts b/src/api/palletCacheStation.ts deleted file mode 100644 index 671fd4e..0000000 --- a/src/api/palletCacheStation.ts +++ /dev/null @@ -1,18 +0,0 @@ -import request from '@/utils/request' - -export interface PalletCacheStationVO { - warehouse: string - capacity: number - boundCount: number - reservedCount: number - totalCount: number - remainingCapacity: number - reservedChainCodes: string[] -} - -export function getPalletCacheStationSnapshot(warehouse: string) { - return request.get( - '/api/robot/external/admin/pallet-cache-station/snapshot', - { params: { warehouse } }, - ) -} diff --git a/src/api/task.ts b/src/api/task.ts index 01dc048..fb001a6 100644 --- a/src/api/task.ts +++ b/src/api/task.ts @@ -181,7 +181,7 @@ export interface CallbackField { } const hkFields: CallbackField[] = [ - { name: 'robotTaskCode', label: '任务编号(任务链编号)', type: 'string' }, + { name: 'robotTaskCode', label: '机器调用编号', type: 'string' }, { name: 'singleRobotCode', label: '机器人标识', type: 'string' }, { name: 'currentSeq', label: '当前执行顺序', type: 'string' }, ] @@ -199,10 +199,11 @@ const zsTaskStepOptions = [ { value: 'IN_LIFTER', label: '托盘进提升机' }, { value: 'OUT_LIFTER', label: '托盘出提升机' }, { value: 'VEHICLE_MOVE', label: '四向车搬运' }, + { value: 'VEHICLE_WILL_PICK', label: '四向车准备举升托盘' }, ] const zsTaskInfoBackFields: CallbackField[] = [ - { name: 'taskCode', label: '任务编号(任务链编号)', type: 'string' }, + { name: 'taskCode', label: '机器调用编号', type: 'string' }, { name: 'palletCode', label: '托盘码', type: 'string' }, { name: 'status', label: '任务状态', type: 'select', options: zsTaskStatusOptions }, { name: 'taskStep', label: '任务步骤', type: 'select', options: zsTaskStepOptions }, @@ -244,6 +245,7 @@ export const callbackScenarioMap: Record = { HK_INBOUND: [hkArriveWcs], HK_MOVE: [hkArriveWcs], HK_OUTBOUND_WAIT: [hkArriveWcs, hkArriveStation], + HK_ARRIVE_ELEVATOR: [hkArriveWcs], HK_ARRIVE_STATION: [hkArriveStation], HK_PICK_PALLET: [{ key: 'pickPalletDone', label: 'AGV完成取货', url: '/api/robot/external/hk/pickPalletDone', fields: hkFields }], HK_PICK_UP: [{ key: 'pickUp', label: '海康举起托盘', url: '/api/robot/external/hk/pickUp', fields: hkFields }], @@ -251,6 +253,10 @@ export const callbackScenarioMap: Record = { HK_LEAVE_START_POINT: [{ key: 'leaveStartPoint', label: 'AGV离开起点', url: '/api/robot/external/hk/leaveStartPoint', fields: hkFields }], ZS_INBOUND: [{ key: 'taskInfoBack', label: '任务状态回传', url: '/api/robot/external/zs/wms/taskInfoBack', fields: zsTaskInfoBackFields }], ZS_OUTBOUND: [{ key: 'taskInfoBack', label: '任务状态回传', url: '/api/robot/external/zs/wms/taskInfoBack', fields: zsTaskInfoBackFields }], + ZS_PRE_PICK_UP: [{ key: 'taskInfoBack', label: '四向车准备举升托盘', url: '/api/robot/external/zs/wms/taskInfoBack', fields: zsTaskInfoBackFields }], + ZS_PICK_UP: [{ key: 'taskInfoBack', label: '智世举起目标托盘', url: '/api/robot/external/zs/wms/taskInfoBack', fields: zsTaskInfoBackFields }], + ZS_OUTBOUND_IN_LIFTER: [{ key: 'taskInfoBack', label: '托盘进提升机', url: '/api/robot/external/zs/wms/taskInfoBack', fields: zsTaskInfoBackFields }], + ZS_OUTBOUND_FINISH: [{ key: 'taskInfoBack', label: '智世出库完成', url: '/api/robot/external/zs/wms/taskInfoBack', fields: zsTaskInfoBackFields }], ZS_MOVE: [{ key: 'taskInfoBack', label: '任务状态回传', url: '/api/robot/external/zs/wms/taskInfoBack', fields: zsTaskInfoBackFields }], ZS_OUTER_DETECT: [{ key: 'exceptionPickUpNotify', label: '外形检测异常', url: '/api/robot/external/zs/wms/exceptionPickUpNotify', fields: zsExceptionFields }], ZS_APPLY_INBOUND: [{ key: 'palletCodeIn', label: '请求入库', url: '/api/robot/external/zs/wms/palletCodeIn', fields: zsPalletCodeInFields }], diff --git a/src/layouts/AdminLayout.vue b/src/layouts/AdminLayout.vue index 9d8ee7e..7296bd9 100644 --- a/src/layouts/AdminLayout.vue +++ b/src/layouts/AdminLayout.vue @@ -31,9 +31,9 @@ - + - + @@ -207,7 +207,7 @@ const userStore = useUserStore() const isMonitorMode = computed(() => userStore.isMonitorMode()) const keepAliveNames = computed(() => { if (isMonitorMode.value) { - return ['TaskChainList', 'TaskChainDetail', 'ElevatorList', 'StationQueueView', 'PalletCacheStationView', 'ExceptionDocsView'] + return ['TaskChainList', 'TaskChainDetail', 'ElevatorList', 'StationQueueView', 'ExtensionResourceView', 'ExceptionDocsView'] } return [ 'DashboardView', @@ -215,7 +215,7 @@ const keepAliveNames = computed(() => { 'TaskChainDetail', 'ElevatorList', 'StationQueueView', - 'PalletCacheStationView', + 'ExtensionResourceView', 'VendorLoadView', 'TaskGenerateView', 'ExceptionDocsView', @@ -340,7 +340,7 @@ const tabs = computed(() => [ { path: '/task/chain', label: '任务链', icon: List }, { path: '/elevator', label: '提升机', icon: SetUp }, { path: '/station/queue', label: '排队', icon: Tickets }, - { path: '/station/pallet-cache', label: '缓存站', icon: Box }, + { path: '/resource/extension', label: '资源', icon: Box }, ...(!isMonitorMode.value ? [{ path: '/vendor/load', label: '厂商负载', icon: DataLine }] : []), ...(!isMonitorMode.value ? [{ path: '/generate', label: '生成', icon: Plus }] : []), { path: '/docs/exception', label: '异常', icon: Document }, @@ -350,7 +350,7 @@ const activeMenu = computed(() => { const path = route.path if (path.startsWith('/task/chain')) return '/task/chain' if (path.startsWith('/station/queue')) return '/station/queue' - if (path.startsWith('/station/pallet-cache')) return '/station/pallet-cache' + if (path.startsWith('/resource/extension')) return '/resource/extension' if (path.startsWith('/docs/exception')) return '/docs/exception' return path }) @@ -359,7 +359,7 @@ const activeTab = computed(() => { const path = route.path if (path.startsWith('/task/chain')) return '/task/chain' if (path.startsWith('/station/queue')) return '/station/queue' - if (path.startsWith('/station/pallet-cache')) return '/station/pallet-cache' + if (path.startsWith('/resource/extension')) return '/resource/extension' if (path.startsWith('/docs/exception')) return '/docs/exception' return path }) diff --git a/src/router/index.ts b/src/router/index.ts index bfdb806..9aecc71 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -53,10 +53,10 @@ const router = createRouter({ meta: { title: '站点排队' }, }, { - path: 'station/pallet-cache', - name: 'PalletCacheStationView', - component: () => import('@/views/station/PalletCacheStationView.vue'), - meta: { title: '托盘缓存站' }, + path: 'resource/extension', + name: 'ExtensionResourceView', + component: () => import('@/views/resource/ExtensionResourceView.vue'), + meta: { title: '拓展资源' }, }, { path: 'vendor/load', diff --git a/src/views/station/PalletCacheStationView.vue b/src/views/resource/ExtensionResourceView.vue similarity index 59% rename from src/views/station/PalletCacheStationView.vue rename to src/views/resource/ExtensionResourceView.vue index e1d78dc..5197397 100644 --- a/src/views/station/PalletCacheStationView.vue +++ b/src/views/resource/ExtensionResourceView.vue @@ -14,14 +14,14 @@ 查询 - 缓存站总占用 = 已绑定缓存站库位的托盘数量 + Redis 中在途预占缓存站名额的任务链数量。 + 拓展资源总占用 = 已绑定数量 + Redis 中在途预占名额的任务链数量。
- 托盘缓存站 - {{ snapshot.warehouse }} + 拓展资源 + {{ snapshots[0].warehouse }}
点击预占任务链查看详情 · 预占数据来自 Redis Set @@ -30,118 +30,127 @@
- -
- + +
+ -
- -
+
+
+
+ +
-
-
- 已绑定 - {{ snapshot.boundCount }} +
+
+ 已绑定 + {{ resource.boundCount }} +
+
+ 在途预占 + {{ resource.reservedCount }} +
+
+ 总占用 + {{ resource.totalCount }} +
+
+ 剩余容量 + {{ resource.remainingCapacity }} +
+
-
- 在途预占 - {{ snapshot.reservedCount }} -
-
- 总占用 - {{ snapshot.totalCount }} -
-
- 剩余容量 - {{ snapshot.remainingCapacity }} + +
+
+ 预占任务链 + + {{ resource.reservedChainCodes.length }} 条 + +
+ +
+ +
+
- - - - -
- -
-
-