This commit is contained in:
2026-08-12 20:36:17 +08:00
parent 791c3b89a7
commit 7beca3f985
5 changed files with 15 additions and 41 deletions
@@ -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,