feat(rohs-check): 新增 RoHS 对话轮次注册与检核批次绑定功能
This commit is contained in:
1 parent
9cba517bff
commit
fa0cdee8df
20 files changed
+1050
-201
No files matched your search
@@ -106,7 +106,7 @@ export function useKbWorkspaceComputed(state: KbWorkspaceState) {
|
||||
return workflow.upload.code !== 'success';
|
||||
}
|
||||
if (filter === 'clean') {
|
||||
return ['pending', 'running', 'failed'].includes(workflow.clean.code);
|
||||
return ['pending', 'queued', 'running', 'failed'].includes(workflow.clean.code);
|
||||
}
|
||||
return ['pending', 'running', 'failed'].includes(workflow.sync.code);
|
||||
};
|
||||
@@ -172,7 +172,7 @@ export function useKbWorkspaceComputed(state: KbWorkspaceState) {
|
||||
selectedDocuments.value.filter((doc) => {
|
||||
if (!doc.latest_version) return false;
|
||||
const workflow = resolveWorkflowState(doc);
|
||||
return ['failed', 'pending', 'idle'].includes(workflow.clean.code);
|
||||
return ['failed', 'pending', 'queued', 'idle'].includes(workflow.clean.code);
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ export type KbFeedbackType = 'success' | 'error' | '';
|
||||
|
||||
/** 上传 → 清洗 → 同步 各阶段展示状态 */
|
||||
export type WorkflowStageState = {
|
||||
code: 'pending' | 'running' | 'success' | 'failed' | 'idle';
|
||||
code: 'pending' | 'queued' | 'running' | 'success' | 'failed' | 'idle';
|
||||
label: string;
|
||||
className: string;
|
||||
errorMessage?: string | null;
|
||||
|
||||
@@ -101,11 +101,17 @@ export const getDocumentWorkflowState = (
|
||||
};
|
||||
} else if (['cleaned', 'ready', 'syncing', 'synced'].includes(latestStatus)) {
|
||||
cleanStage = { code: 'success', label: t('kbWorkspace.status.done'), className: getStatusBadgeClass('success') };
|
||||
} else if (['running', 'queued'].includes(String(cleanJob?.status || '').toLowerCase()) || latestStatus === 'processing') {
|
||||
} else if (String(cleanJob?.status || '').toLowerCase() === 'queued') {
|
||||
cleanStage = {
|
||||
code: 'queued',
|
||||
label: t('kbWorkspace.status.queued'),
|
||||
className: getStatusBadgeClass('queued'),
|
||||
};
|
||||
} else if (String(cleanJob?.status || '').toLowerCase() === 'running' || latestStatus === 'processing') {
|
||||
cleanStage = {
|
||||
code: 'running',
|
||||
label: latestStatus === 'processing' ? t('kbWorkspace.status.cleaning') : t('kbWorkspace.status.pendingClean'),
|
||||
className: getStatusBadgeClass(latestStatus === 'processing' ? 'processing' : 'uploaded'),
|
||||
label: t('kbWorkspace.status.cleaning'),
|
||||
className: getStatusBadgeClass('processing'),
|
||||
};
|
||||
} else if (latestStatus === 'uploaded') {
|
||||
cleanStage = { code: 'pending', label: t('kbWorkspace.status.pendingClean'), className: getStatusBadgeClass('uploaded') };
|
||||
|
||||
Reference in new issue
Block a user