修复(履约渠道): 收敛管道事件避免待办自动刷新
This commit is contained in:
@@ -564,7 +564,6 @@ function applyAdminRealtimeEvent(
|
||||
event.scopes.includes('admin_fulfillment_pipelines')
|
||||
) {
|
||||
void queryClient.invalidateQueries({ queryKey: ['fulfillment-pipelines'] })
|
||||
void queryClient.invalidateQueries({ queryKey: ['fulfillment-pending'] })
|
||||
}
|
||||
|
||||
if (event.type === 'work_order.changed' && event.scopes.includes('admin_work_orders')) {
|
||||
|
||||
@@ -668,7 +668,7 @@ function PendingPanel() {
|
||||
<PercentTable
|
||||
rowKey={(row) => rowKey(row)}
|
||||
size="small"
|
||||
loading={query.isFetching}
|
||||
loading={query.isLoading}
|
||||
dataSource={query.data?.data?.items || []}
|
||||
columns={columns}
|
||||
pagination={buildAdminTablePagination({
|
||||
|
||||
@@ -26,6 +26,12 @@ test('履约管道状态由后台 SSE 失效刷新,不再 30 秒轮询', () =>
|
||||
assert.match(page, /SSE\s+自动刷新/)
|
||||
assert.ok(layout.includes("event.type === 'fulfillment_pipeline.changed'"))
|
||||
assert.ok(layout.includes("queryKey: ['fulfillment-pipelines']"))
|
||||
const pipelineRealtimeBlock = layout.slice(
|
||||
layout.indexOf("event.type === 'fulfillment_pipeline.changed'"),
|
||||
layout.indexOf("event.type === 'work_order.changed'"),
|
||||
)
|
||||
assert.ok(!pipelineRealtimeBlock.includes("queryKey: ['fulfillment-pending']"))
|
||||
assert.ok(page.includes('loading={query.isLoading}'))
|
||||
})
|
||||
|
||||
test('公共订单 SSE 允许匿名连接且只携带重读信号', () => {
|
||||
|
||||
Reference in New Issue
Block a user