Release/test 合并上生产 #2

Merged
admin merged 736 commits from release/test into main 2026-09-17 11:50:56 +08:00
5 changed files with 15 additions and 41 deletions
Showing only changes of commit 7beca3f985 - Show all commits
@@ -6,10 +6,7 @@ const pages = [
['src/modules/container-loading/pages/ContainersView.vue', ':loading="loading"', 'LoadErrorState', 'empty-text="暂无货柜"', 'statusText(row.planStatus)', 'platform:firstleg:container:view', '@retry="loadRows"'],
['src/modules/loading-lists/components/LoadingListsView.vue', ':loading="loading"', 'LoadErrorState', ':empty-text="`暂无符合筛选条件的${title}`"', 'loadingListStatusLabel(row.status)', 'canView', '@retry="load"'],
['src/modules/ocean-bookings/pages/OceanBookingsView.vue', ':loading="loading"', 'LoadErrorState', 'empty-text="暂无符合筛选条件的订舱"', 'oceanBookingStatusLabel(row.status)', 'platform:firstleg:ocean-booking:view', '@retry="load"'],
['src/modules/port-schedules/pages/PortSchedulesView.vue', ':loading="loading"', 'LoadErrorState', 'empty-text="暂无符合条件的船期"', "row.expired ? '已过期' : '有效'", 'platform:firstleg:port-schedule:view', '@retry="load"'],
['src/modules/trucking/pages/TruckAppointmentsView.vue', ':loading="loading"', 'LoadErrorState', 'empty-text="暂无符合筛选条件的拖车预约"', 'statusLabel(row.status)', 'platform:firstleg:truck-appointment:view', '@retry="load"'],
['src/modules/customs/pages/CustomsCasesView.vue', ':loading="loading"', 'LoadErrorState', 'empty-text="暂无报关协同记录"', 'customsStatusLabel(row.status)', 'platform:firstleg:customs:view', '@retry="load"'],
['src/modules/outbound-dispatch/pages/OutboundDispatchesView.vue', ':loading="loading"', 'LoadErrorState', 'empty-text="暂无符合条件的出仓记录"', 'outboundDispatchStatusLabel(row.dispatchStatus)', 'platform:firstleg:outbound-dispatch:view', '@retry="load"'],
] as const
function source(path: string) {
+6 -4
View File
@@ -63,11 +63,10 @@ describe('admin router access metadata', () => {
expect(detailIndex).toBeGreaterThan(globalIndex)
})
it('registers phase-three service center routes with their stable permissions', () => {
it('registers the retained phase-three service center routes with stable permissions', () => {
const expected = [
['port-schedules', '/port-schedules', 'platform:firstleg:port-schedule:list'],
['customs-cases', '/customs', 'platform:firstleg:customs:list'],
['outbound-dispatches', '/outbound-dispatches', 'platform:firstleg:outbound-dispatch:list'],
['ocean-bookings', '/ocean-bookings', 'platform:firstleg:ocean-booking:list'],
['trucking', '/trucking', 'platform:firstleg:truck-appointment:list'],
]
for (const [name, path, permission] of expected) {
@@ -75,6 +74,9 @@ describe('admin router access metadata', () => {
expect(route?.path).toBe(path)
expect(route?.meta.permission).toBe(permission)
}
expect(router.getRoutes().find((item) => item.name === 'port-schedules')).toBeUndefined()
expect(router.getRoutes().find((item) => item.name === 'outbound-dispatches')).toBeUndefined()
})
it('protects counterparty records with a stable master-data permission', () => {
-6
View File
@@ -21,9 +21,6 @@ import { warehouseRoutes } from '@/modules/warehouses/routes'
import { prototypeModuleRoutes } from '@/prototype/routes'
import { oceanBookingRoutes } from '@/modules/ocean-bookings/routes'
import { truckingRoutes } from '@/modules/trucking/routes'
import { portScheduleRoutes } from '@/modules/port-schedules/routes'
import { customsRoutes } from '@/modules/customs/routes'
import { outboundDispatchRoutes } from '@/modules/outbound-dispatch/routes'
import { feeItemRoutes } from '@/modules/fee-items/routes'
import { containerLoadingRoutes } from '@/modules/container-loading/routes'
import { loadingListRoutes } from '@/modules/loading-lists/routes'
@@ -53,10 +50,7 @@ const router = createRouter({
...dashboardRoutes,
...prototypeModuleRoutes,
...oceanBookingRoutes,
...portScheduleRoutes,
...truckingRoutes,
...customsRoutes,
...outboundDispatchRoutes,
...containerLoadingRoutes,
...loadingListRoutes,
...financeRoutes,
+7 -15
View File
@@ -14,7 +14,6 @@ describe('adminNavigation', () => {
'客户管理',
'国内仓',
'海外派送',
'服务中心',
'供应商中心',
'货柜管理',
'海外业务',
@@ -36,19 +35,15 @@ describe('adminNavigation', () => {
'库位管理',
'托盘管理',
])
expect(adminNavigation.find((item) => item.key === 'service-center')?.children?.map((item) => item.title)).toEqual([
'订舱列表',
'船期信息',
'拖车列表',
'报关协同',
'国内出仓',
])
expect(adminNavigation.find((item) => item.key === 'service-center')).toBeUndefined()
expect(adminNavigation.find((item) => item.key === 'supplier-center')?.children?.map((item) => item.title)).toEqual([
'供应商列表',
'快递公司',
'往来单位',
])
expect(adminNavigation.find((item) => item.key === 'container-management')?.children?.map((item) => item.title)).toEqual([
'订舱列表',
'拖车列表',
'货柜列表',
'智能装柜',
'预装清单',
@@ -103,9 +98,9 @@ describe('adminNavigation', () => {
expect(paths).toContain('/container-loading/smart-loading')
expect(paths).toContain('/loading-plans')
expect(paths).toContain('/loading-lists')
expect(paths).toContain('/port-schedules')
expect(paths).toContain('/customs')
expect(paths).toContain('/outbound-dispatches')
expect(paths).not.toContain('/port-schedules')
expect(paths).not.toContain('/customs')
expect(paths).not.toContain('/outbound-dispatches')
expect(paths).not.toContain('/prototype/container-management/container-list')
expect(paths).not.toContain('/prototype/container-management/preload-list')
expect(paths).not.toContain('/prototype/container-management/manifest')
@@ -209,7 +204,7 @@ describe('adminNavigation', () => {
])
})
it('shows each phase-three service center entry only with its matching permission', () => {
it('shows only the prototype-backed phase-three service center entries', () => {
const filtered = filterAdminNavigation(adminNavigation, new Set([
'platform:firstleg:ocean-booking:list',
'platform:firstleg:port-schedule:list',
@@ -221,10 +216,7 @@ describe('adminNavigation', () => {
expect(getNavigationLeaves(filtered).map((item) => item.path)).toEqual([
'/dashboard',
'/ocean-bookings',
'/port-schedules',
'/trucking',
'/customs',
'/outbound-dispatches',
])
})
+2 -13
View File
@@ -26,7 +26,6 @@ import {
PrototypeOverseasBusinessIcon,
PrototypeOverseasWarehouseIcon,
PrototypeSalesIcon,
PrototypeServiceIcon,
PrototypeSupplierIcon,
PrototypeSystemIcon,
} from './prototypeMenuIcons'
@@ -85,18 +84,6 @@ export const adminNavigation: AdminNavigationNode[] = [
{ key: 'outbound-selfpick', title: '自提单', icon: ClipboardList, path: '/prototype/overseas-delivery/self-pickup' },
],
},
{
key: 'service-center',
title: '服务中心',
icon: PrototypeServiceIcon,
children: [
{ key: 'booking-list', title: '订舱列表', icon: ClipboardList, path: '/ocean-bookings', permission: 'platform:firstleg:ocean-booking:list' },
{ key: 'port-schedules', title: '船期信息', icon: ClipboardList, path: '/port-schedules', permission: 'platform:firstleg:port-schedule:list' },
{ key: 'truck-list', title: '拖车列表', icon: Truck, path: '/trucking', permission: 'platform:firstleg:truck-appointment:list' },
{ key: 'customs-cases', title: '报关协同', icon: FileCheck2, path: '/customs', permission: 'platform:firstleg:customs:list' },
{ key: 'outbound-dispatches', title: '国内出仓', icon: Truck, path: '/outbound-dispatches', permission: 'platform:firstleg:outbound-dispatch:list' },
],
},
{
key: 'supplier-center',
title: '供应商中心',
@@ -112,6 +99,8 @@ export const adminNavigation: AdminNavigationNode[] = [
title: '货柜管理',
icon: PrototypeContainerIcon,
children: [
{ key: 'booking-list', title: '订舱列表', icon: ClipboardList, path: '/ocean-bookings', permission: 'platform:firstleg:ocean-booking:list' },
{ key: 'truck-list', title: '拖车列表', icon: Truck, path: '/trucking', permission: 'platform:firstleg:truck-appointment:list' },
{ key: 'container-list', title: '货柜列表', icon: WarehouseIcon, path: '/container-loading', permission: 'platform:firstleg:container:list' },
{ key: 'container-smart-loading', title: '智能装柜', icon: ClipboardList, path: '/container-loading/smart-loading', permission: 'platform:firstleg:smart-loading:list' },
{ key: 'container-preload', title: '预装清单', icon: ClipboardList, path: '/loading-plans', permission: 'platform:firstleg:preload:list' },