@sim-design/training 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +481 -15
- package/dist/{ArrowLeftOutlined-CiSQq3bL.js → ArrowLeftOutlined-BxA84GXs.js} +1 -1
- package/dist/ArrowLeftOutlined-D785XjyB.js +12 -0
- package/dist/{AssessmentPlugin-Bx4VrBdV.js → AssessmentPlugin-D_iesmyg.js} +7 -7
- package/dist/AssessmentPlugin-zRr-IsdA.js +607 -0
- package/dist/CaseAnalysisPlugin-CXuQpkPd.js +2196 -0
- package/dist/CaseAnalysisPlugin-DytlXsRD.js +2196 -0
- package/dist/CaseDetailContent-DT5nCtRT.js +28613 -0
- package/dist/CaseDetailContent-Y7Q430MG.js +28595 -0
- package/dist/{CharacterDialoguePanel-Bvdab3qj.js → CharacterDialoguePanel-CdtUl-Sv.js} +178 -139
- package/dist/CharacterDialoguePanel-D_4YNFZv.js +815 -0
- package/dist/{CheckCircleFilled-Byo8CDfW.js → CheckCircleFilled-CnslIY7j.js} +1 -1
- package/dist/CheckCircleFilled-NvZaC2sk.js +12 -0
- package/dist/DecisionMakingPlugin-B_KQUFzW.js +1385 -0
- package/dist/DecisionMakingPlugin-ILLGek3S.js +1385 -0
- package/dist/{DecisionSelectPlugin-DtQ2KV34.js → DecisionSelectPlugin-BGQiHGBK.js} +20 -11
- package/dist/DecisionSelectPlugin-Bqmh6XGh.js +872 -0
- package/dist/{DecisionShared-Dh9oeQFT.js → DecisionShared-BHq1lEqt.js} +2 -2
- package/dist/DecisionShared-Be-zKZLT.js +65 -0
- package/dist/DeleteOutlined-BvMjU7m5.js +12 -0
- package/dist/DeleteOutlined-Dqy6M2LH.js +12 -0
- package/dist/{CustomLayoutRenderer--rnQrqQ2.js → DialogueFormPlugin-BpCeFadt.js} +22724 -21631
- package/dist/DialogueFormPlugin-CXlbxX-z.js +123617 -0
- package/dist/DialoguePlugin-CO7Nzv0K.js +596 -0
- package/dist/DialoguePlugin-DDNdsylz.js +596 -0
- package/dist/DocumentReviewPlugin-2CnKQwVG.js +1967 -0
- package/dist/DocumentReviewPlugin-qYYrnjvE.js +1967 -0
- package/dist/{EyeOutlined-XvOAKlLs.js → EyeOutlined-BrKCNjui.js} +1 -1
- package/dist/EyeOutlined-CW0tYV0f.js +12 -0
- package/dist/FormFillingPlugin-C3h8ySOZ.js +969 -0
- package/dist/FormFillingPlugin-CPmd76Qr.js +969 -0
- package/dist/HolderOutlined-CH0tShWu.js +12 -0
- package/dist/HolderOutlined-Dm6TBtqf.js +12 -0
- package/dist/ModelEditor-BjEbFloQ.js +11753 -0
- package/dist/ModelEditor-CwR67DFQ.js +11753 -0
- package/dist/{ProcessOperationPlugin-IijngDlX.js → ProcessOperationPlugin-1Lz431aC.js} +12 -12
- package/dist/ProcessOperationPlugin-BkmdG3ch.js +88 -0
- package/dist/QAPlugin-0C4kpq3J.js +172 -0
- package/dist/QAPlugin-UC8uywcg.js +172 -0
- package/dist/{ReloadOutlined-Daor2m11.js → ReloadOutlined-BZ92nlYF.js} +1 -1
- package/dist/ReloadOutlined-CYoPOwLl.js +12 -0
- package/dist/{SettingOutlined-CLEOgXB-.js → SettingOutlined-F466s0Ti.js} +33 -65
- package/dist/SettingOutlined-c2hikCfN.js +60 -0
- package/dist/StarFilled-Bilmj6UK.js +28 -0
- package/dist/StarFilled-CtH30fL0.js +28 -0
- package/dist/StrategyLabPlugin-CvO07sXV.js +12445 -0
- package/dist/StrategyLabPlugin-DUqZYctQ.js +12445 -0
- package/dist/ThunderboltOutlined-BpmoCKdV.js +28 -0
- package/dist/ThunderboltOutlined-DDQFi5Cv.js +28 -0
- package/dist/TrainingModelContainer-DqCsdC7C.js +11241 -0
- package/dist/TrainingModelContainer-yi8W6KFl.js +11241 -0
- package/dist/{UndoOutlined-ChUQYUul.js → UndoOutlined-6JZVzmdX.js} +26 -42
- package/dist/UndoOutlined-Dw6_9_OL.js +68 -0
- package/dist/{WarningFilled-1Rc4hr0C.js → WarningFilled-Cy1tvuQy.js} +1 -1
- package/dist/WarningFilled-lkr453eh.js +12 -0
- package/dist/{adapters-D1FFZFoA.js → adapters-BbCnXSYo.js} +2 -2
- package/dist/{analysisTools-CXyOvSZT.js → analysisTools-Cp5-3DaU.js} +59 -12
- package/dist/creator.js +4 -2
- package/dist/designTokens-walF_QkZ.js +23 -0
- package/dist/images/healthcare/bg.jpg +0 -0
- package/dist/{index-CYjdXPgc.js → index-C71iHgSs.js} +2640 -2722
- package/dist/{index-XuBVjlmu.js → index-CBvqcbIU.js} +7214 -7643
- package/dist/index-D94YNWTb.js +433 -0
- package/dist/index-DSYmOXnQ.js +6486 -0
- package/dist/index-fP97rKeQ.js +433 -0
- package/dist/index.js +8 -6
- package/dist/judgement-xTGXlDcn.js +29 -0
- package/dist/runtime.js +1 -1
- package/dist/sortable.esm-bm_c5vmI.js +3307 -0
- package/dist/types.js +1 -1
- package/dist/useDialogueLogic-D1lkUKUZ.js +576 -0
- package/dist/useDialogueLogic-vOJ9XRNP.js +576 -0
- package/dist-types/client/src/admin/CaseDataEditor.d.ts +20 -0
- package/dist-types/client/src/admin/CaseEditor.d.ts +19 -0
- package/dist-types/client/src/admin/DialogueFormCheckRulesEditor.d.ts +11 -0
- package/dist-types/client/src/admin/DialogueFormInitDataEditor.d.ts +31 -0
- package/dist-types/client/src/admin/InitDataEditors.d.ts +7 -0
- package/dist-types/client/src/admin/ModelEditor.d.ts +11 -0
- package/dist-types/client/src/admin/ModelPreview.d.ts +13 -0
- package/dist-types/client/src/admin/OptionSelector.d.ts +32 -0
- package/dist-types/client/src/admin/StageStepEditor.d.ts +20 -0
- package/dist-types/client/src/admin/StepAnswerKeyEditor.d.ts +19 -0
- package/dist-types/client/src/admin/StepByStepCreator.d.ts +27 -0
- package/dist-types/client/src/admin/components/AbilityMapEditor.d.ts +12 -0
- package/dist-types/client/src/admin/components/CasePreview.d.ts +8 -0
- package/dist-types/client/src/admin/components/StepAbilitySelector.d.ts +9 -0
- package/dist-types/client/src/admin/constants/creatorConstants.d.ts +39 -0
- package/dist-types/client/src/admin/editors/CaseAnalysisEditor.d.ts +11 -0
- package/dist-types/client/src/admin/editors/DecisionMakingEditor.d.ts +7 -0
- package/dist-types/client/src/admin/editors/DialogueEditor.d.ts +12 -0
- package/dist-types/client/src/admin/editors/DocumentReviewEditor.d.ts +7 -0
- package/dist-types/client/src/admin/editors/DocumentReviewRuntimeRulesEditor.d.ts +15 -0
- package/dist-types/client/src/admin/editors/FormFillingEditor.d.ts +33 -0
- package/dist-types/client/src/admin/editors/ModelUIConfigEditor.d.ts +5 -0
- package/dist-types/client/src/admin/editors/QAEditor.d.ts +6 -0
- package/dist-types/client/src/admin/editors/RouterEditors.d.ts +18 -0
- package/dist-types/client/src/admin/editors/StepBriefingEditor.d.ts +14 -0
- package/dist-types/client/src/admin/editors/StrategyLabEditor.d.ts +24 -0
- package/dist-types/client/src/admin/editors/decisionEditorParts.d.ts +18 -0
- package/dist-types/client/src/admin/editors/index.d.ts +8 -0
- package/dist-types/client/src/admin/editors/shared.d.ts +17 -0
- package/dist-types/client/src/admin/hooks/useStep1Intent.d.ts +16 -0
- package/dist-types/client/src/admin/hooks/useStep2Outline.d.ts +41 -0
- package/dist-types/client/src/admin/hooks/useStep3Details.d.ts +123 -0
- package/dist-types/client/src/admin/hooks/useStep4Cases.d.ts +48 -0
- package/dist-types/client/src/admin/hooks/useStep5Validation.d.ts +16 -0
- package/dist-types/client/src/admin/landingValidation.d.ts +74 -0
- package/dist-types/client/src/admin/schemaFieldUtils.d.ts +55 -0
- package/dist-types/client/src/admin/services.d.ts +461 -0
- package/dist-types/client/src/admin/shared-editors.d.ts +31 -0
- package/dist-types/client/src/admin/types/creatorArtifacts.d.ts +140 -0
- package/dist-types/client/src/components/AbilityMapView.d.ts +15 -0
- package/dist-types/client/src/components/CaseDetail/CaseDetailContent.d.ts +12 -0
- package/dist-types/client/src/components/ConversationalDataCollector/IntentConfirmPanel.d.ts +20 -0
- package/dist-types/client/src/components/ConversationalDataCollector/index.d.ts +7 -0
- package/dist-types/client/src/components/ConversationalDataCollector/intentState.d.ts +24 -0
- package/dist-types/client/src/components/ConversationalDataCollector/types.d.ts +95 -0
- package/dist-types/client/src/components/ConversationalDataCollector/utils.d.ts +62 -0
- package/dist-types/client/src/components/CustomLayoutRenderer.d.ts +8 -0
- package/dist-types/client/src/components/MarkdownRenderer.d.ts +15 -0
- package/dist-types/client/src/components/StrategyLabScene/VisualInputComponents.d.ts +85 -0
- package/dist-types/client/src/components/StrategyLabScene/components/AdversarialView.d.ts +18 -0
- package/dist-types/client/src/components/StrategyLabScene/components/BottomBar.d.ts +22 -0
- package/dist-types/client/src/components/StrategyLabScene/components/CharacterCard.d.ts +14 -0
- package/dist-types/client/src/components/StrategyLabScene/components/CharacterDialoguePanel.d.ts +32 -0
- package/dist-types/client/src/components/StrategyLabScene/components/CollaborativeView.d.ts +20 -0
- package/dist-types/client/src/components/StrategyLabScene/components/ComparisonView.d.ts +16 -0
- package/dist-types/client/src/components/StrategyLabScene/components/DecisionInput.d.ts +27 -0
- package/dist-types/client/src/components/StrategyLabScene/components/DecisionSwitcher.d.ts +14 -0
- package/dist-types/client/src/components/StrategyLabScene/components/EvaluationReport.d.ts +13 -0
- package/dist-types/client/src/components/StrategyLabScene/components/NodeChainPanels.d.ts +32 -0
- package/dist-types/client/src/components/StrategyLabScene/components/ProgressSteps.d.ts +15 -0
- package/dist-types/client/src/components/StrategyLabScene/components/SandboxView.d.ts +19 -0
- package/dist-types/client/src/components/StrategyLabScene/components/ScenarioPanel.d.ts +17 -0
- package/dist-types/client/src/components/StrategyLabScene/components/SimulationAnimation.d.ts +13 -0
- package/dist-types/client/src/components/StrategyLabScene/components/SimulationResult.d.ts +15 -0
- package/dist-types/client/src/components/StrategyLabScene/components/StressTestView.d.ts +22 -0
- package/dist-types/client/src/components/StrategyLabScene/themeMatching.d.ts +21 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/education.d.ts +45 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/healthcare.d.ts +7 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/index.d.ts +22 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/professional.d.ts +7 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/technology.d.ts +7 -0
- package/dist-types/client/src/components/StrategyLabScene/types.d.ts +82 -0
- package/dist-types/client/src/components/StrategyLabScene/views/UnifiedStrategyLabView.d.ts +72 -0
- package/dist-types/client/src/components/TrainingEngine/BriefingQAChat.d.ts +19 -0
- package/dist-types/client/src/components/TrainingEngine/CaseInfoModal.d.ts +12 -0
- package/dist-types/client/src/components/TrainingEngine/CaseSelector.d.ts +15 -0
- package/dist-types/client/src/components/TrainingEngine/ClassicView.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/DashboardHomePage.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/EnhancedStudentProfilePanel.d.ts +9 -0
- package/dist-types/client/src/components/TrainingEngine/EvaluationPanel.d.ts +8 -0
- package/dist-types/client/src/components/TrainingEngine/GlobalQAPanel.d.ts +34 -0
- package/dist-types/client/src/components/TrainingEngine/GuidanceHistoryDrawer.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/GuidancePanel.d.ts +3 -0
- package/dist-types/client/src/components/TrainingEngine/ImmersiveGameView.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/PluginRenderer.d.ts +15 -0
- package/dist-types/client/src/components/TrainingEngine/ProgressTracker.d.ts +3 -0
- package/dist-types/client/src/components/TrainingEngine/StageAssessingOverlay.d.ts +17 -0
- package/dist-types/client/src/components/TrainingEngine/StageAssessmentPanel.d.ts +10 -0
- package/dist-types/client/src/components/TrainingEngine/StepExecutor.d.ts +20 -0
- package/dist-types/client/src/components/TrainingEngine/StepNodeMap.d.ts +15 -0
- package/dist-types/client/src/components/TrainingEngine/StudentProfilePanel.d.ts +6 -0
- package/dist-types/client/src/components/TrainingEngine/ThemeContext.d.ts +8 -0
- package/dist-types/client/src/components/TrainingEngine/TrainingMaterialsSidebar.d.ts +21 -0
- package/dist-types/client/src/components/TrainingEngine/TrainingModelContainer.d.ts +42 -0
- package/dist-types/client/src/components/TrainingEngine/ViewProps.d.ts +37 -0
- package/dist-types/client/src/components/TrainingEngine/profileDataSelectors.d.ts +23 -0
- package/dist-types/client/src/components/TrainingEngine/stepInitData.d.ts +42 -0
- package/dist-types/client/src/components/TrainingEngine/targetAbilityUtils.d.ts +11 -0
- package/dist-types/client/src/components/VisualizationRenderer/ChartRenderer.d.ts +12 -0
- package/dist-types/client/src/components/VisualizationRenderer/types.d.ts +41 -0
- package/dist-types/client/src/config/appConfig.d.ts +15 -0
- package/dist-types/client/src/configs/agentConfig.d.ts +66 -0
- package/dist-types/client/src/configs/intentDiscoveryConfig.d.ts +22 -0
- package/dist-types/client/src/data/mockTrainingModel.d.ts +10 -0
- package/dist-types/client/src/hooks/useAIService.d.ts +17 -0
- package/dist-types/client/src/hooks/useDialogueLogic.d.ts +53 -0
- package/dist-types/client/src/hooks/useFormFillingLogic.d.ts +26 -0
- package/dist-types/client/src/hooks/useFormRealtimeGuidance.d.ts +45 -0
- package/dist-types/client/src/hooks/useRealtimeGuidance.d.ts +66 -0
- package/dist-types/client/src/hooks/useStageAssessment.d.ts +8 -0
- package/dist-types/client/src/hooks/useStepExecution.d.ts +14 -0
- package/dist-types/client/src/hooks/useTrainingModel.d.ts +30 -0
- package/dist-types/client/src/lib/creator.d.ts +1 -0
- package/dist-types/client/src/lib/index.d.ts +1 -0
- package/dist-types/client/src/lib/types.d.ts +113 -22
- package/dist-types/client/src/plugins/AssessmentPlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/CaseAnalysisPlugin.d.ts +9 -0
- package/dist-types/client/src/plugins/CaseAnalysisPluginView.d.ts +26 -0
- package/dist-types/client/src/plugins/DecisionSelectPlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/DialogueFormPlugin.d.ts +9 -0
- package/dist-types/client/src/plugins/DialogueFormPluginView.d.ts +37 -0
- package/dist-types/client/src/plugins/DialoguePlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/DialoguePluginView.d.ts +44 -0
- package/dist-types/client/src/plugins/DocumentReview/DocumentCard.d.ts +47 -0
- package/dist-types/client/src/plugins/DocumentReview/LayoutComponents.d.ts +47 -0
- package/dist-types/client/src/plugins/DocumentReview/MarkListPanel.d.ts +51 -0
- package/dist-types/client/src/plugins/DocumentReview/MarkModal.d.ts +37 -0
- package/dist-types/client/src/plugins/DocumentReview/ResultPanel.d.ts +32 -0
- package/dist-types/client/src/plugins/DocumentReview/Toolbar.d.ts +31 -0
- package/dist-types/client/src/plugins/DocumentReview/designTokens.d.ts +76 -0
- package/dist-types/client/src/plugins/DocumentReviewPlugin.d.ts +14 -0
- package/dist-types/client/src/plugins/ProcessOperationPlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/QAPlugin.d.ts +9 -0
- package/dist-types/client/src/plugins/StrategyLabPlugin.d.ts +7 -0
- package/dist-types/client/src/plugins/decision-making/DecisionMakingPlugin.d.ts +4 -0
- package/dist-types/client/src/plugins/decision-making/DecisionWorkspace.d.ts +23 -0
- package/dist-types/client/src/plugins/decision-making/MaterialsPanel.d.ts +18 -0
- package/dist-types/client/src/plugins/decision-making/logic.d.ts +46 -0
- package/dist-types/client/src/plugins/decision-making/scoring.d.ts +79 -0
- package/dist-types/client/src/plugins/decision-making/styles.d.ts +743 -0
- package/dist-types/client/src/plugins/decision-making/types.d.ts +179 -0
- package/dist-types/client/src/plugins/form-filling/DocumentFormLayout.d.ts +22 -0
- package/dist-types/client/src/plugins/form-filling/FormAssistPanel.d.ts +20 -0
- package/dist-types/client/src/plugins/form-filling/FormFillingPlugin.d.ts +15 -0
- package/dist-types/client/src/plugins/form-filling/forms.d.ts +28 -0
- package/dist-types/client/src/plugins/form-filling/scoring.d.ts +86 -0
- package/dist-types/client/src/plugins/form-filling/useFormFilling.d.ts +42 -0
- package/dist-types/client/src/plugins/form-filling/validationRules.d.ts +26 -0
- package/dist-types/client/src/plugins/shared/DecisionShared.d.ts +54 -0
- package/dist-types/client/src/plugins/shared/FrameworkWidget.d.ts +19 -0
- package/dist-types/client/src/plugins/shared/PluginFooter.d.ts +4 -0
- package/dist-types/client/src/plugins/shared/PluginHeader.d.ts +4 -0
- package/dist-types/client/src/plugins/shared/analysisTools.d.ts +30 -0
- package/dist-types/client/src/plugins/shared/disturbanceUtils.d.ts +5 -0
- package/dist-types/client/src/plugins/shared/index.d.ts +5 -0
- package/dist-types/client/src/plugins/shared/jsonRepair.d.ts +39 -0
- package/dist-types/client/src/plugins/shared/judgement.d.ts +46 -0
- package/dist-types/client/src/plugins/shared/nodeChain.d.ts +15 -0
- package/dist-types/client/src/plugins/shared/renderFieldGrid.d.ts +16 -0
- package/dist-types/client/src/plugins/shared/reportBlocks.d.ts +33 -0
- package/dist-types/client/src/plugins/shared/reportEvaluation.d.ts +30 -0
- package/dist-types/client/src/plugins/shared/reportExport.d.ts +12 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/BlockPropertiesPanel.d.ts +9 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/BlockToolbox.d.ts +11 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/ReportWorkbench.d.ts +20 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/SortableBlock.d.ts +15 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/factory.d.ts +14 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/outlineDraft.d.ts +7 -0
- package/dist-types/client/src/plugins/shared/simulationEngine.d.ts +112 -0
- package/dist-types/client/src/plugins/shared/simulationModes.d.ts +21 -0
- package/dist-types/client/src/plugins/shared/themes.d.ts +5 -0
- package/dist-types/client/src/plugins/shared/types.d.ts +1247 -0
- package/dist-types/client/src/services/AICommandHandler.d.ts +68 -0
- package/dist-types/client/src/services/cozeApiClient.d.ts +44 -0
- package/dist-types/client/src/services/mockApi.d.ts +48 -0
- package/dist-types/client/src/services/storageService.d.ts +88 -0
- package/dist-types/client/src/stores/abilityStore.d.ts +33 -0
- package/dist-types/client/src/stores/dialogueStore.d.ts +30 -0
- package/dist-types/client/src/stores/formRegistryStore.d.ts +45 -0
- package/dist-types/client/src/stores/guidanceStore.d.ts +17 -0
- package/dist-types/client/src/stores/stepEvidenceStore.d.ts +14 -0
- package/dist-types/client/src/stores/strategyLabStore.d.ts +46 -0
- package/dist-types/client/src/stores/trainingStore.d.ts +84 -0
- package/dist-types/client/src/types/ai-commands.d.ts +144 -0
- package/dist-types/client/src/types.d.ts +17 -0
- package/dist-types/client/src/utils/abilityMapGenerator.d.ts +27 -0
- package/dist-types/client/src/utils/formUtils.d.ts +66 -0
- package/dist-types/client/src/utils/rule-engine.d.ts +36 -0
- package/dist-types/shared/types/index.d.ts +592 -0
- package/package.json +5 -3
- package/dist/CaseAnalysisPlugin-CQvF9_zr.js +0 -416
- package/dist/DialogueFormPlugin-C9ssnVMr.js +0 -959
- package/dist/DialoguePlugin-DU00QpmQ.js +0 -416
- package/dist/DocumentReviewPlugin-HNOZY1T4.js +0 -977
- package/dist/FormFillingPlugin-DURWsioi.js +0 -445
- package/dist/ModelEditor-BPJsPR0S.js +0 -8264
- package/dist/PluginHeader-B-GESJmT.js +0 -87
- package/dist/QAPlugin-Bh_UjK1N.js +0 -184
- package/dist/RadarChart-C5ZM0kWt.js +0 -24963
- package/dist/StrategyLabPlugin-DGeZsr_7.js +0 -14361
- package/dist/ThunderboltOutlined-nH_FO_4A.js +0 -44
- package/dist/ToolOutlined-DtuNJDB2.js +0 -28
- package/dist/TrainingModelContainer-DpW-uB8O.js +0 -11883
- package/dist/WarningOutlined-5g1d66hO.js +0 -164
- package/dist/judgement-D_9i7x9S.js +0 -20
- package/dist/useDialogueLogic-IHELcN3X.js +0 -368
|
@@ -0,0 +1,1967 @@
|
|
|
1
|
+
import { j as e, u as We, a as $e, r as He } from "./CaseDetailContent-Y7Q430MG.js";
|
|
2
|
+
import { useState as E, forwardRef as Fe, useRef as ne, useEffect as oe, useMemo as W, useImperativeHandle as Le, useCallback as G } from "react";
|
|
3
|
+
import { Modal as re } from "antd";
|
|
4
|
+
import { a as Re, c as De } from "./judgement-xTGXlDcn.js";
|
|
5
|
+
import { d as Z } from "./designTokens-walF_QkZ.js";
|
|
6
|
+
const te = Z.colors, Ae = ({
|
|
7
|
+
left: t,
|
|
8
|
+
center: l,
|
|
9
|
+
right: a
|
|
10
|
+
}) => /* @__PURE__ */ e.jsxs("div", { style: Y.mainLayout, children: [
|
|
11
|
+
t,
|
|
12
|
+
/* @__PURE__ */ e.jsx("main", { style: Y.contentArea, children: l }),
|
|
13
|
+
a
|
|
14
|
+
] }), Ve = ({
|
|
15
|
+
documentCount: t,
|
|
16
|
+
currentDocName: l,
|
|
17
|
+
expectedTotal: a,
|
|
18
|
+
showExpectedCount: n,
|
|
19
|
+
hint: r = "提示:点击任意字段可标记为可疑不符点,右侧清单实时同步"
|
|
20
|
+
}) => {
|
|
21
|
+
const s = n && typeof a == "number";
|
|
22
|
+
return /* @__PURE__ */ e.jsxs("div", { style: Y.bottomBar, children: [
|
|
23
|
+
/* @__PURE__ */ e.jsxs("div", { style: Y.leftInfo, children: [
|
|
24
|
+
/* @__PURE__ */ e.jsxs("span", { style: Y.infoItem, children: [
|
|
25
|
+
"📄 单证数量:",
|
|
26
|
+
/* @__PURE__ */ e.jsx("strong", { style: Y.infoStrong, children: t }),
|
|
27
|
+
" 份"
|
|
28
|
+
] }),
|
|
29
|
+
/* @__PURE__ */ e.jsxs("span", { style: Y.infoItem, children: [
|
|
30
|
+
"📍 当前单证:",
|
|
31
|
+
/* @__PURE__ */ e.jsx("strong", { style: Y.infoStrong, children: l || "-" })
|
|
32
|
+
] }),
|
|
33
|
+
s && /* @__PURE__ */ e.jsxs("span", { style: Y.infoItem, children: [
|
|
34
|
+
"⚠️ 预设错误数:",
|
|
35
|
+
/* @__PURE__ */ e.jsx("strong", { style: Y.infoStrong, children: a }),
|
|
36
|
+
" 处"
|
|
37
|
+
] })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ e.jsx("div", { style: Y.rightInfo, children: r })
|
|
40
|
+
] });
|
|
41
|
+
}, Y = {
|
|
42
|
+
// 三栏 flex 容器:填满父容器高度,溢出收敛到各栏内部(中栏/左右栏各自滚动)
|
|
43
|
+
mainLayout: {
|
|
44
|
+
display: "flex",
|
|
45
|
+
height: "100%",
|
|
46
|
+
minHeight: "78vh",
|
|
47
|
+
overflow: "hidden",
|
|
48
|
+
position: "relative",
|
|
49
|
+
background: te.background
|
|
50
|
+
},
|
|
51
|
+
// 中栏:flex:1 填充左右栏之外的空间,内容超出时自身滚动
|
|
52
|
+
contentArea: {
|
|
53
|
+
flex: 1,
|
|
54
|
+
minWidth: 0,
|
|
55
|
+
overflowY: "auto",
|
|
56
|
+
padding: "24px 26px"
|
|
57
|
+
},
|
|
58
|
+
// .bottom-bar
|
|
59
|
+
bottomBar: {
|
|
60
|
+
display: "flex",
|
|
61
|
+
alignItems: "center",
|
|
62
|
+
justifyContent: "space-between",
|
|
63
|
+
padding: "14px 24px",
|
|
64
|
+
background: te.surface,
|
|
65
|
+
borderRadius: 10,
|
|
66
|
+
marginTop: 20,
|
|
67
|
+
boxShadow: "0 2px 8px rgba(0,0,0,0.08)",
|
|
68
|
+
fontSize: 15,
|
|
69
|
+
color: te.textSecondary,
|
|
70
|
+
flexWrap: "wrap",
|
|
71
|
+
gap: 12
|
|
72
|
+
},
|
|
73
|
+
// .bottom-bar .left-info
|
|
74
|
+
leftInfo: {
|
|
75
|
+
display: "flex",
|
|
76
|
+
alignItems: "center",
|
|
77
|
+
gap: 24,
|
|
78
|
+
flexWrap: "wrap"
|
|
79
|
+
},
|
|
80
|
+
// .bottom-bar .info-item
|
|
81
|
+
infoItem: {
|
|
82
|
+
display: "flex",
|
|
83
|
+
alignItems: "center",
|
|
84
|
+
gap: 7
|
|
85
|
+
},
|
|
86
|
+
// .bottom-bar .info-item strong
|
|
87
|
+
infoStrong: {
|
|
88
|
+
color: te.primary,
|
|
89
|
+
fontSize: 18
|
|
90
|
+
},
|
|
91
|
+
// .bottom-bar .right-info
|
|
92
|
+
rightInfo: {
|
|
93
|
+
fontSize: 14,
|
|
94
|
+
color: te.textDisabled
|
|
95
|
+
}
|
|
96
|
+
}, P = Z.colors, Pe = `点击任意字段即可将其标记为可疑不符点,并选择对应的错误类型、填写说明;
|
|
97
|
+
右侧标记清单可随时定位、编辑或删除已标记的不符点;
|
|
98
|
+
使用「高亮笔」可在阅读时圈划重点字段,辅助比对;
|
|
99
|
+
核对完成后点击「提交审核」,系统将给出参考不符点清单与得分。`, Oe = ({
|
|
100
|
+
markedCount: t,
|
|
101
|
+
highlightActive: l,
|
|
102
|
+
onToggleHighlight: a,
|
|
103
|
+
onClearMarks: n,
|
|
104
|
+
onSubmit: r,
|
|
105
|
+
submitted: s,
|
|
106
|
+
hintText: T
|
|
107
|
+
}) => {
|
|
108
|
+
const k = () => {
|
|
109
|
+
re.info({
|
|
110
|
+
title: "审核提示",
|
|
111
|
+
width: 520,
|
|
112
|
+
content: /* @__PURE__ */ e.jsx("div", { style: { whiteSpace: "pre-line", lineHeight: 1.8, fontSize: 14.5 }, children: T ?? Pe }),
|
|
113
|
+
okText: "我知道了"
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
return /* @__PURE__ */ e.jsxs("div", { style: R.toolbar, children: [
|
|
117
|
+
/* @__PURE__ */ e.jsxs("div", { style: R.toolbarLeft, children: [
|
|
118
|
+
/* @__PURE__ */ e.jsx(
|
|
119
|
+
ae,
|
|
120
|
+
{
|
|
121
|
+
icon: "✏️",
|
|
122
|
+
label: "高亮笔",
|
|
123
|
+
active: l,
|
|
124
|
+
onClick: a
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ e.jsx(ae, { icon: "💡", label: "审核提示", onClick: k }),
|
|
128
|
+
/* @__PURE__ */ e.jsx(ae, { icon: "🧹", label: "清除标注", onClick: n })
|
|
129
|
+
] }),
|
|
130
|
+
/* @__PURE__ */ e.jsxs("div", { style: R.toolbarRight, children: [
|
|
131
|
+
/* @__PURE__ */ e.jsxs(
|
|
132
|
+
"span",
|
|
133
|
+
{
|
|
134
|
+
style: {
|
|
135
|
+
...R.statusBadge,
|
|
136
|
+
...s ? R.statusBadgeSubmitted : R.statusBadgeReviewing
|
|
137
|
+
},
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ e.jsx("span", { style: R.statusDot }),
|
|
140
|
+
s ? "已提交" : "审核中"
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
/* @__PURE__ */ e.jsxs("span", { style: R.markedText, children: [
|
|
145
|
+
"已标记:",
|
|
146
|
+
/* @__PURE__ */ e.jsx("strong", { style: R.markedNum, children: t }),
|
|
147
|
+
" 处"
|
|
148
|
+
] }),
|
|
149
|
+
/* @__PURE__ */ e.jsx(_e, { onClick: r, submitted: s })
|
|
150
|
+
] }),
|
|
151
|
+
/* @__PURE__ */ e.jsx("style", { children: Ye })
|
|
152
|
+
] });
|
|
153
|
+
}, ae = ({ icon: t, label: l, active: a = !1, onClick: n }) => {
|
|
154
|
+
const [r, s] = E(!1);
|
|
155
|
+
return /* @__PURE__ */ e.jsxs(
|
|
156
|
+
"button",
|
|
157
|
+
{
|
|
158
|
+
type: "button",
|
|
159
|
+
style: {
|
|
160
|
+
...R.toolBtn,
|
|
161
|
+
// active 优先于 hover(原型 .active 与 :hover 同色系)
|
|
162
|
+
...r && !a ? R.toolBtnHover : null,
|
|
163
|
+
...a ? R.toolBtnActive : null
|
|
164
|
+
},
|
|
165
|
+
onMouseEnter: () => s(!0),
|
|
166
|
+
onMouseLeave: () => s(!1),
|
|
167
|
+
onClick: n,
|
|
168
|
+
children: [
|
|
169
|
+
/* @__PURE__ */ e.jsx("span", { style: R.toolBtnIcon, children: t }),
|
|
170
|
+
l
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
}, _e = ({ onClick: t, submitted: l }) => {
|
|
175
|
+
const [a, n] = E(!1);
|
|
176
|
+
return /* @__PURE__ */ e.jsx(
|
|
177
|
+
"button",
|
|
178
|
+
{
|
|
179
|
+
type: "button",
|
|
180
|
+
disabled: l,
|
|
181
|
+
style: {
|
|
182
|
+
...R.submitBtn,
|
|
183
|
+
...l ? R.submitBtnDisabled : null,
|
|
184
|
+
...a && !l ? R.submitBtnHover : null
|
|
185
|
+
},
|
|
186
|
+
onMouseEnter: () => n(!0),
|
|
187
|
+
onMouseLeave: () => n(!1),
|
|
188
|
+
onClick: t,
|
|
189
|
+
children: l ? "已提交" : "提交审核"
|
|
190
|
+
}
|
|
191
|
+
);
|
|
192
|
+
}, Ye = `
|
|
193
|
+
@keyframes dr-toolbar-pulse {
|
|
194
|
+
0%, 100% { opacity: 1; }
|
|
195
|
+
50% { opacity: 0.4; }
|
|
196
|
+
}
|
|
197
|
+
`, R = {
|
|
198
|
+
// .toolbar
|
|
199
|
+
toolbar: {
|
|
200
|
+
display: "flex",
|
|
201
|
+
alignItems: "center",
|
|
202
|
+
justifyContent: "space-between",
|
|
203
|
+
background: P.surface,
|
|
204
|
+
borderRadius: 10,
|
|
205
|
+
padding: "14px 24px",
|
|
206
|
+
marginBottom: 20,
|
|
207
|
+
boxShadow: "0 2px 8px rgba(0,0,0,0.08)"
|
|
208
|
+
},
|
|
209
|
+
// .toolbar-left
|
|
210
|
+
toolbarLeft: {
|
|
211
|
+
display: "flex",
|
|
212
|
+
alignItems: "center",
|
|
213
|
+
gap: 10
|
|
214
|
+
},
|
|
215
|
+
// .toolbar-right
|
|
216
|
+
toolbarRight: {
|
|
217
|
+
display: "flex",
|
|
218
|
+
alignItems: "center",
|
|
219
|
+
gap: 14
|
|
220
|
+
},
|
|
221
|
+
// .tool-btn
|
|
222
|
+
toolBtn: {
|
|
223
|
+
display: "inline-flex",
|
|
224
|
+
alignItems: "center",
|
|
225
|
+
gap: 7,
|
|
226
|
+
padding: "9px 18px",
|
|
227
|
+
// 用拆分写法而非 border 简写:hover/active 态只改 borderColor(non-shorthand),
|
|
228
|
+
// 若基态用 border 简写会导致回到基态时 React 移除 borderColor 而 border 仍在 → 样式冲突告警
|
|
229
|
+
borderWidth: 1,
|
|
230
|
+
borderStyle: "solid",
|
|
231
|
+
borderColor: P.border,
|
|
232
|
+
background: "#fff",
|
|
233
|
+
borderRadius: 8,
|
|
234
|
+
cursor: "pointer",
|
|
235
|
+
fontSize: 15,
|
|
236
|
+
color: P.textSecondary,
|
|
237
|
+
transition: "all 0.2s",
|
|
238
|
+
fontWeight: 500
|
|
239
|
+
},
|
|
240
|
+
// .tool-btn:hover
|
|
241
|
+
toolBtnHover: {
|
|
242
|
+
borderColor: P.primary,
|
|
243
|
+
color: P.primary
|
|
244
|
+
},
|
|
245
|
+
// .tool-btn.active
|
|
246
|
+
toolBtnActive: {
|
|
247
|
+
background: "#e6f7ff",
|
|
248
|
+
borderColor: P.primary,
|
|
249
|
+
color: P.primary
|
|
250
|
+
},
|
|
251
|
+
// .tool-btn .icon
|
|
252
|
+
toolBtnIcon: {
|
|
253
|
+
fontSize: 17
|
|
254
|
+
},
|
|
255
|
+
// .status-badge
|
|
256
|
+
statusBadge: {
|
|
257
|
+
display: "inline-flex",
|
|
258
|
+
alignItems: "center",
|
|
259
|
+
gap: 7,
|
|
260
|
+
padding: "8px 18px",
|
|
261
|
+
borderRadius: 24,
|
|
262
|
+
fontSize: 15,
|
|
263
|
+
fontWeight: 600
|
|
264
|
+
},
|
|
265
|
+
// .status-badge.reviewing
|
|
266
|
+
statusBadgeReviewing: {
|
|
267
|
+
background: "#e6f7ff",
|
|
268
|
+
color: P.primary,
|
|
269
|
+
border: "1px solid #91d5ff"
|
|
270
|
+
},
|
|
271
|
+
// .status-badge.submitted
|
|
272
|
+
statusBadgeSubmitted: {
|
|
273
|
+
background: "#f6ffed",
|
|
274
|
+
color: P.success,
|
|
275
|
+
border: "1px solid #b7eb8f"
|
|
276
|
+
},
|
|
277
|
+
// .status-dot(脉冲)
|
|
278
|
+
statusDot: {
|
|
279
|
+
width: 9,
|
|
280
|
+
height: 9,
|
|
281
|
+
borderRadius: "50%",
|
|
282
|
+
background: "currentColor",
|
|
283
|
+
animation: "dr-toolbar-pulse 2s infinite"
|
|
284
|
+
},
|
|
285
|
+
// 已标记 X 处(原型行内样式)
|
|
286
|
+
markedText: {
|
|
287
|
+
fontSize: 15,
|
|
288
|
+
color: "#999",
|
|
289
|
+
fontWeight: 500
|
|
290
|
+
},
|
|
291
|
+
markedNum: {
|
|
292
|
+
color: P.primary
|
|
293
|
+
},
|
|
294
|
+
// .submit-btn
|
|
295
|
+
submitBtn: {
|
|
296
|
+
padding: "10px 30px",
|
|
297
|
+
background: `linear-gradient(135deg, ${P.primary} 0%, ${P.secondary} 100%)`,
|
|
298
|
+
color: "#fff",
|
|
299
|
+
border: "none",
|
|
300
|
+
borderRadius: 8,
|
|
301
|
+
fontSize: 16,
|
|
302
|
+
fontWeight: 600,
|
|
303
|
+
cursor: "pointer",
|
|
304
|
+
transition: "all 0.2s",
|
|
305
|
+
boxShadow: "0 3px 10px rgba(24,144,255,0.35)"
|
|
306
|
+
},
|
|
307
|
+
// .submit-btn:hover
|
|
308
|
+
submitBtnHover: {
|
|
309
|
+
transform: "translateY(-1px)",
|
|
310
|
+
boxShadow: "0 5px 16px rgba(24,144,255,0.45)"
|
|
311
|
+
},
|
|
312
|
+
// .submit-btn:disabled
|
|
313
|
+
submitBtnDisabled: {
|
|
314
|
+
background: "#d9d9d9",
|
|
315
|
+
cursor: "not-allowed",
|
|
316
|
+
boxShadow: "none",
|
|
317
|
+
transform: "none"
|
|
318
|
+
}
|
|
319
|
+
}, M = Z.colors, Ge = (t) => {
|
|
320
|
+
const l = globalThis.CSS;
|
|
321
|
+
return l != null && l.escape ? l.escape(t) : t.replace(/["\\]/g, "\\$&");
|
|
322
|
+
}, Ke = `
|
|
323
|
+
@keyframes dr-locate-flash {
|
|
324
|
+
0% { box-shadow: 0 0 0 4px rgba(24,144,255,0.55), 0 0 24px rgba(24,144,255,0.25); transform: scale(1.02); }
|
|
325
|
+
50% { box-shadow: 0 0 0 4px rgba(24,144,255,0.25), 0 0 12px rgba(24,144,255,0.12); transform: scale(1.01); }
|
|
326
|
+
100% { box-shadow: none; transform: scale(1); }
|
|
327
|
+
}
|
|
328
|
+
`, Ue = (t) => {
|
|
329
|
+
const l = t || "";
|
|
330
|
+
return /(人身|人寿|寿险|身故|life)/i.test(l) ? "📄" : /(财产|企业财产|property)/i.test(l) ? "🏠" : /(车|机动车|motor|auto|vehicle)/i.test(l) ? "🚗" : /(健康|医疗|重疾|health|medical)/i.test(l) ? "❤️" : "📄";
|
|
331
|
+
}, Xe = (t) => {
|
|
332
|
+
const l = t.map((n) => n.colSpan ?? 1), a = l.reduce((n, r) => Math.max(n, r), 1);
|
|
333
|
+
return l.every((n) => n >= 3) ? "cols-full" : a >= 3 ? "cols-3" : "cols-2";
|
|
334
|
+
}, qe = {
|
|
335
|
+
"cols-2": "repeat(2, 1fr)",
|
|
336
|
+
"cols-3": "repeat(3, 1fr)",
|
|
337
|
+
"cols-full": "1fr"
|
|
338
|
+
}, Je = (t, l, a, n, r, s) => {
|
|
339
|
+
if (!a)
|
|
340
|
+
return { marked: l, markedError: !1, markedCorrect: !1 };
|
|
341
|
+
const T = n.has(t), k = r.has(t), S = s.has(t);
|
|
342
|
+
return T && k ? { marked: !1, markedError: !1, markedCorrect: !0 } : T && !k ? { marked: !1, markedError: !0, markedCorrect: !1 } : S ? { marked: !1, markedError: !0, markedCorrect: !1 } : { marked: !1, markedError: !1, markedCorrect: !1 };
|
|
343
|
+
}, me = Fe(({
|
|
344
|
+
documents: t,
|
|
345
|
+
markedFields: l,
|
|
346
|
+
onFieldClick: a,
|
|
347
|
+
onTabChange: n,
|
|
348
|
+
showExpectedCount: r,
|
|
349
|
+
expectedCountByDoc: s,
|
|
350
|
+
resultMode: T,
|
|
351
|
+
scoreResult: k,
|
|
352
|
+
answers: S,
|
|
353
|
+
highlightedFields: h
|
|
354
|
+
}, w) => {
|
|
355
|
+
const [B, i] = E(0), [c, p] = E(null), y = ne(null), x = ne(null);
|
|
356
|
+
oe(() => {
|
|
357
|
+
B > t.length - 1 && i(0);
|
|
358
|
+
}, [t.length, B]), oe(() => {
|
|
359
|
+
t.length !== 0 && (n == null || n(Math.min(B, t.length - 1)));
|
|
360
|
+
}, [B, t.length, n]);
|
|
361
|
+
const Q = W(() => {
|
|
362
|
+
const g = /* @__PURE__ */ new Map();
|
|
363
|
+
return t.forEach((H, $) => {
|
|
364
|
+
H.fields.forEach((O) => {
|
|
365
|
+
g.has(O.name) || g.set(O.name, $);
|
|
366
|
+
});
|
|
367
|
+
}), g;
|
|
368
|
+
}, [t]);
|
|
369
|
+
Le(w, () => ({
|
|
370
|
+
locate: (g) => {
|
|
371
|
+
const H = Q.get(g);
|
|
372
|
+
H !== void 0 && (i(H), x.current && window.clearTimeout(x.current), p(null), window.setTimeout(() => {
|
|
373
|
+
var O;
|
|
374
|
+
const $ = (O = y.current) == null ? void 0 : O.querySelector(`[data-field="${Ge(g)}"]`);
|
|
375
|
+
$ && $.scrollIntoView({ behavior: "smooth", block: "center" }), p(g), x.current = window.setTimeout(() => {
|
|
376
|
+
p(null), x.current = null;
|
|
377
|
+
}, 1600);
|
|
378
|
+
}, 160));
|
|
379
|
+
}
|
|
380
|
+
}), [Q]), oe(() => () => {
|
|
381
|
+
x.current && window.clearTimeout(x.current);
|
|
382
|
+
}, []);
|
|
383
|
+
const U = W(() => {
|
|
384
|
+
const g = /* @__PURE__ */ new Map();
|
|
385
|
+
return (S ?? []).forEach((H) => g.set(H.fieldName, H)), g;
|
|
386
|
+
}, [S]), ee = W(
|
|
387
|
+
() => new Set((S ?? []).map((g) => g.fieldName)),
|
|
388
|
+
[S]
|
|
389
|
+
), z = W(
|
|
390
|
+
() => new Set(((k == null ? void 0 : k.perAnswer) ?? []).filter((g) => g.hit).map((g) => g.fieldName)),
|
|
391
|
+
[k]
|
|
392
|
+
), D = W(
|
|
393
|
+
() => new Set((k == null ? void 0 : k.falseMarks) ?? []),
|
|
394
|
+
[k]
|
|
395
|
+
);
|
|
396
|
+
if (!t || t.length === 0)
|
|
397
|
+
return null;
|
|
398
|
+
const q = Math.min(B, t.length - 1), K = t[q], N = et(K.fields);
|
|
399
|
+
return /* @__PURE__ */ e.jsxs("div", { ref: y, style: j.documentCard, children: [
|
|
400
|
+
/* @__PURE__ */ e.jsx("style", { children: Ke }),
|
|
401
|
+
/* @__PURE__ */ e.jsx("div", { style: j.tabBar, children: t.map((g, H) => {
|
|
402
|
+
const $ = H === q, O = s == null ? void 0 : s[H], le = r && typeof O == "number" && O > 0;
|
|
403
|
+
return /* @__PURE__ */ e.jsxs(
|
|
404
|
+
"div",
|
|
405
|
+
{
|
|
406
|
+
onClick: () => i(H),
|
|
407
|
+
style: {
|
|
408
|
+
...j.tabItem,
|
|
409
|
+
...$ ? j.tabItemActive : null
|
|
410
|
+
},
|
|
411
|
+
children: [
|
|
412
|
+
/* @__PURE__ */ e.jsx("span", { style: { fontSize: 18 }, children: Ue(g.documentType) }),
|
|
413
|
+
g.documentType,
|
|
414
|
+
le && /* @__PURE__ */ e.jsx(
|
|
415
|
+
"span",
|
|
416
|
+
{
|
|
417
|
+
style: {
|
|
418
|
+
...j.tabBadge,
|
|
419
|
+
background: $ ? M.secondary : M.error
|
|
420
|
+
},
|
|
421
|
+
children: O
|
|
422
|
+
}
|
|
423
|
+
)
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
H
|
|
427
|
+
);
|
|
428
|
+
}) }),
|
|
429
|
+
/* @__PURE__ */ e.jsxs("div", { style: j.tabPanel, children: [
|
|
430
|
+
/* @__PURE__ */ e.jsxs("div", { style: j.docHeader, children: [
|
|
431
|
+
/* @__PURE__ */ e.jsx("div", { style: j.docTitle, children: K.documentType }),
|
|
432
|
+
K.subtitle && /* @__PURE__ */ e.jsx("div", { style: j.docSubtitle, children: K.subtitle }),
|
|
433
|
+
K.docNo && /* @__PURE__ */ e.jsx("div", { style: j.docNo, children: K.docNo })
|
|
434
|
+
] }),
|
|
435
|
+
N.map((g) => {
|
|
436
|
+
const H = Xe(g.fields);
|
|
437
|
+
return /* @__PURE__ */ e.jsxs("div", { style: j.formSection, children: [
|
|
438
|
+
g.title && /* @__PURE__ */ e.jsx("div", { style: j.formSectionTitle, children: g.title }),
|
|
439
|
+
/* @__PURE__ */ e.jsx(
|
|
440
|
+
"div",
|
|
441
|
+
{
|
|
442
|
+
style: {
|
|
443
|
+
...j.formGrid,
|
|
444
|
+
gridTemplateColumns: qe[H]
|
|
445
|
+
},
|
|
446
|
+
children: g.fields.map(($) => /* @__PURE__ */ e.jsx(
|
|
447
|
+
Qe,
|
|
448
|
+
{
|
|
449
|
+
field: $,
|
|
450
|
+
docIndex: q,
|
|
451
|
+
resultMode: T,
|
|
452
|
+
answer: U.get($.name),
|
|
453
|
+
state: Je(
|
|
454
|
+
$.name,
|
|
455
|
+
l.has($.name),
|
|
456
|
+
T,
|
|
457
|
+
ee,
|
|
458
|
+
z,
|
|
459
|
+
D
|
|
460
|
+
),
|
|
461
|
+
highlighted: !!(h != null && h.has($.name)),
|
|
462
|
+
flashing: c === $.name,
|
|
463
|
+
onClick: a
|
|
464
|
+
},
|
|
465
|
+
$.name
|
|
466
|
+
))
|
|
467
|
+
}
|
|
468
|
+
)
|
|
469
|
+
] }, g.key);
|
|
470
|
+
})
|
|
471
|
+
] })
|
|
472
|
+
] });
|
|
473
|
+
});
|
|
474
|
+
me.displayName = "DocumentCard";
|
|
475
|
+
const Qe = ({
|
|
476
|
+
field: t,
|
|
477
|
+
docIndex: l,
|
|
478
|
+
resultMode: a,
|
|
479
|
+
answer: n,
|
|
480
|
+
state: r,
|
|
481
|
+
highlighted: s,
|
|
482
|
+
flashing: T,
|
|
483
|
+
onClick: k
|
|
484
|
+
}) => {
|
|
485
|
+
const [S, h] = E(!1), w = !!s && !r.marked && !r.markedError && !r.markedCorrect, B = {
|
|
486
|
+
...j.fieldItem,
|
|
487
|
+
gridColumn: (t.colSpan ?? 1) > 1 ? "1 / -1" : void 0,
|
|
488
|
+
...S && !r.marked && !r.markedError && !r.markedCorrect && !w ? j.fieldItemHover : null,
|
|
489
|
+
...w ? j.fieldItemHighlightPen : null,
|
|
490
|
+
...r.marked ? j.fieldItemMarked : null,
|
|
491
|
+
...r.markedError ? j.fieldItemMarkedError : null,
|
|
492
|
+
...r.markedCorrect ? j.fieldItemMarkedCorrect : null,
|
|
493
|
+
...T ? j.fieldItemLocateFlash : null
|
|
494
|
+
}, i = r.marked || r.markedError || r.markedCorrect, c = r.markedError && !!n, p = n == null ? void 0 : n.correctValue;
|
|
495
|
+
return /* @__PURE__ */ e.jsxs(
|
|
496
|
+
"div",
|
|
497
|
+
{
|
|
498
|
+
onClick: () => k(l, t),
|
|
499
|
+
onMouseEnter: () => h(!0),
|
|
500
|
+
onMouseLeave: () => h(!1),
|
|
501
|
+
style: B,
|
|
502
|
+
"data-field": t.name,
|
|
503
|
+
children: [
|
|
504
|
+
/* @__PURE__ */ e.jsxs("div", { style: j.fieldLabel, children: [
|
|
505
|
+
/* @__PURE__ */ e.jsx("span", { children: t.label }),
|
|
506
|
+
i && /* @__PURE__ */ e.jsx("span", { style: j.markIndicator, children: "🏷️ 已标记" })
|
|
507
|
+
] }),
|
|
508
|
+
/* @__PURE__ */ e.jsx(
|
|
509
|
+
"div",
|
|
510
|
+
{
|
|
511
|
+
style: {
|
|
512
|
+
...j.fieldValue,
|
|
513
|
+
...c ? j.fieldValueError : null
|
|
514
|
+
},
|
|
515
|
+
children: Ze(t)
|
|
516
|
+
}
|
|
517
|
+
),
|
|
518
|
+
a && c && p && /* @__PURE__ */ e.jsxs("div", { style: { ...j.fieldValue, ...j.fieldValueCorrect, padding: "2px 0" }, children: [
|
|
519
|
+
"应为:",
|
|
520
|
+
p
|
|
521
|
+
] }),
|
|
522
|
+
t.hint && /* @__PURE__ */ e.jsx("div", { style: j.fieldHint, children: t.hint }),
|
|
523
|
+
r.markedCorrect && /* @__PURE__ */ e.jsx("span", { style: { ...j.fieldTag, background: M.success }, children: "正确标记" })
|
|
524
|
+
]
|
|
525
|
+
}
|
|
526
|
+
);
|
|
527
|
+
}, Ze = (t) => t.value ?? "", et = (t) => {
|
|
528
|
+
const l = [], a = /* @__PURE__ */ new Map();
|
|
529
|
+
return t.forEach((n) => {
|
|
530
|
+
const r = n.group ?? "__default";
|
|
531
|
+
a.has(r) || (a.set(r, []), l.push(r)), a.get(r).push(n);
|
|
532
|
+
}), l.map((n) => ({
|
|
533
|
+
key: n,
|
|
534
|
+
title: n === "__default" ? "" : n,
|
|
535
|
+
fields: a.get(n)
|
|
536
|
+
}));
|
|
537
|
+
}, j = {
|
|
538
|
+
// .document-card
|
|
539
|
+
documentCard: {
|
|
540
|
+
background: M.surface,
|
|
541
|
+
borderRadius: 10,
|
|
542
|
+
boxShadow: "0 4px 20px rgba(0,0,0,0.12)",
|
|
543
|
+
overflow: "hidden"
|
|
544
|
+
},
|
|
545
|
+
// .tab-bar
|
|
546
|
+
tabBar: {
|
|
547
|
+
display: "flex",
|
|
548
|
+
background: "#fafbfc",
|
|
549
|
+
borderBottom: `1px solid ${M.border}`,
|
|
550
|
+
overflowX: "auto"
|
|
551
|
+
},
|
|
552
|
+
// .tab-item
|
|
553
|
+
tabItem: {
|
|
554
|
+
padding: "14px 28px",
|
|
555
|
+
fontSize: 16,
|
|
556
|
+
fontWeight: 600,
|
|
557
|
+
color: M.textSecondary,
|
|
558
|
+
cursor: "pointer",
|
|
559
|
+
// 拆分写法:tabItemActive 只改 borderBottomColor,基态用 borderBottom 简写会在切走激活态时触发样式冲突告警
|
|
560
|
+
borderBottomWidth: 3,
|
|
561
|
+
borderBottomStyle: "solid",
|
|
562
|
+
borderBottomColor: "transparent",
|
|
563
|
+
whiteSpace: "nowrap",
|
|
564
|
+
transition: "all 0.2s",
|
|
565
|
+
position: "relative",
|
|
566
|
+
display: "flex",
|
|
567
|
+
alignItems: "center",
|
|
568
|
+
gap: 8
|
|
569
|
+
},
|
|
570
|
+
// .tab-item.active
|
|
571
|
+
tabItemActive: {
|
|
572
|
+
color: M.primary,
|
|
573
|
+
borderBottomColor: M.primary,
|
|
574
|
+
background: "#fff"
|
|
575
|
+
},
|
|
576
|
+
// .tab-badge
|
|
577
|
+
tabBadge: {
|
|
578
|
+
display: "inline-flex",
|
|
579
|
+
alignItems: "center",
|
|
580
|
+
justifyContent: "center",
|
|
581
|
+
minWidth: 22,
|
|
582
|
+
height: 22,
|
|
583
|
+
padding: "0 7px",
|
|
584
|
+
borderRadius: 11,
|
|
585
|
+
fontSize: 12.5,
|
|
586
|
+
fontWeight: 700,
|
|
587
|
+
color: "#fff"
|
|
588
|
+
},
|
|
589
|
+
// .tab-panel
|
|
590
|
+
tabPanel: {
|
|
591
|
+
padding: "30px 40px"
|
|
592
|
+
},
|
|
593
|
+
// .doc-header
|
|
594
|
+
docHeader: {
|
|
595
|
+
textAlign: "center",
|
|
596
|
+
marginBottom: 34,
|
|
597
|
+
paddingBottom: 24,
|
|
598
|
+
borderBottom: "2.5px solid #333"
|
|
599
|
+
},
|
|
600
|
+
// .doc-title
|
|
601
|
+
docTitle: {
|
|
602
|
+
fontFamily: "'SimHei', '黑体', sans-serif",
|
|
603
|
+
fontSize: 28,
|
|
604
|
+
fontWeight: "bold",
|
|
605
|
+
letterSpacing: 6,
|
|
606
|
+
marginBottom: 14,
|
|
607
|
+
color: M.textPrimary
|
|
608
|
+
},
|
|
609
|
+
// .doc-subtitle
|
|
610
|
+
docSubtitle: {
|
|
611
|
+
fontSize: 16,
|
|
612
|
+
color: M.textSecondary,
|
|
613
|
+
fontWeight: 500,
|
|
614
|
+
letterSpacing: 1
|
|
615
|
+
},
|
|
616
|
+
// .doc-no
|
|
617
|
+
docNo: {
|
|
618
|
+
fontSize: 14.5,
|
|
619
|
+
color: M.textDisabled,
|
|
620
|
+
marginTop: 8
|
|
621
|
+
},
|
|
622
|
+
// .form-section
|
|
623
|
+
formSection: {
|
|
624
|
+
marginBottom: 30
|
|
625
|
+
},
|
|
626
|
+
// .form-section-title
|
|
627
|
+
formSectionTitle: {
|
|
628
|
+
fontSize: 18,
|
|
629
|
+
fontWeight: 700,
|
|
630
|
+
color: M.textPrimary,
|
|
631
|
+
marginBottom: 18,
|
|
632
|
+
paddingLeft: 12,
|
|
633
|
+
borderLeft: `4px solid ${M.primary}`,
|
|
634
|
+
lineHeight: 1.5
|
|
635
|
+
},
|
|
636
|
+
// .form-grid
|
|
637
|
+
formGrid: {
|
|
638
|
+
display: "grid",
|
|
639
|
+
gap: "16px 32px"
|
|
640
|
+
},
|
|
641
|
+
// .field-item
|
|
642
|
+
fieldItem: {
|
|
643
|
+
display: "flex",
|
|
644
|
+
flexDirection: "column",
|
|
645
|
+
gap: 6,
|
|
646
|
+
padding: "14px 18px",
|
|
647
|
+
border: "1px solid transparent",
|
|
648
|
+
borderRadius: 8,
|
|
649
|
+
cursor: "pointer",
|
|
650
|
+
transition: "all 0.2s",
|
|
651
|
+
position: "relative"
|
|
652
|
+
},
|
|
653
|
+
// .field-item:hover
|
|
654
|
+
fieldItemHover: {
|
|
655
|
+
background: "#fafafa",
|
|
656
|
+
// 用 border 简写与基态/各 marked 变体保持一致(同元素内统一简写),避免简写/非简写混用告警
|
|
657
|
+
border: "1px solid #e8e8e8"
|
|
658
|
+
},
|
|
659
|
+
// .field-item.marked
|
|
660
|
+
fieldItemMarked: {
|
|
661
|
+
background: "#fff1f0",
|
|
662
|
+
border: "1.5px dashed #ffa39e",
|
|
663
|
+
borderRadius: 8
|
|
664
|
+
},
|
|
665
|
+
// .field-item.marked-error
|
|
666
|
+
fieldItemMarkedError: {
|
|
667
|
+
background: "#fff1f0",
|
|
668
|
+
border: `2.5px solid ${M.error}`
|
|
669
|
+
},
|
|
670
|
+
// .field-item.marked-correct
|
|
671
|
+
fieldItemMarkedCorrect: {
|
|
672
|
+
background: "#f6ffed",
|
|
673
|
+
border: `2.5px solid ${M.success}`
|
|
674
|
+
},
|
|
675
|
+
// .field-item.highlight-pen(高亮笔圈划:荧光黄渐变底)
|
|
676
|
+
fieldItemHighlightPen: {
|
|
677
|
+
background: "linear-gradient(120deg, transparent 0%, #fff59d 40%, transparent 60%)",
|
|
678
|
+
backgroundSize: "200% 100%"
|
|
679
|
+
},
|
|
680
|
+
// .field-item.locate-flash(定位闪烁)
|
|
681
|
+
fieldItemLocateFlash: {
|
|
682
|
+
animation: "dr-locate-flash 1.5s ease-out"
|
|
683
|
+
},
|
|
684
|
+
// .field-label
|
|
685
|
+
fieldLabel: {
|
|
686
|
+
fontSize: 14.5,
|
|
687
|
+
color: M.textSecondary,
|
|
688
|
+
fontWeight: 600,
|
|
689
|
+
display: "flex",
|
|
690
|
+
alignItems: "center",
|
|
691
|
+
justifyContent: "space-between",
|
|
692
|
+
lineHeight: 1.4
|
|
693
|
+
},
|
|
694
|
+
// .field-label .mark-indicator
|
|
695
|
+
markIndicator: {
|
|
696
|
+
fontSize: 13.5,
|
|
697
|
+
display: "inline-flex",
|
|
698
|
+
alignItems: "center",
|
|
699
|
+
gap: 2,
|
|
700
|
+
color: M.textSecondary
|
|
701
|
+
},
|
|
702
|
+
// .field-value
|
|
703
|
+
fieldValue: {
|
|
704
|
+
fontSize: 17,
|
|
705
|
+
color: M.textPrimary,
|
|
706
|
+
fontWeight: 600,
|
|
707
|
+
padding: "6px 0",
|
|
708
|
+
wordBreak: "break-all",
|
|
709
|
+
lineHeight: 1.6,
|
|
710
|
+
whiteSpace: "pre-wrap"
|
|
711
|
+
},
|
|
712
|
+
// .field-value.error-text
|
|
713
|
+
fieldValueError: {
|
|
714
|
+
color: M.error,
|
|
715
|
+
textDecoration: "line-through",
|
|
716
|
+
textDecorationColor: M.error,
|
|
717
|
+
textDecorationThickness: 2
|
|
718
|
+
},
|
|
719
|
+
// .field-value.correct-text
|
|
720
|
+
fieldValueCorrect: {
|
|
721
|
+
color: M.success,
|
|
722
|
+
textDecoration: "none"
|
|
723
|
+
},
|
|
724
|
+
// .field-hint
|
|
725
|
+
fieldHint: {
|
|
726
|
+
fontSize: 13,
|
|
727
|
+
color: M.textDisabled,
|
|
728
|
+
fontStyle: "italic"
|
|
729
|
+
},
|
|
730
|
+
// .field-tag
|
|
731
|
+
fieldTag: {
|
|
732
|
+
position: "absolute",
|
|
733
|
+
top: -7,
|
|
734
|
+
right: -7,
|
|
735
|
+
padding: "3px 9px",
|
|
736
|
+
borderRadius: 10,
|
|
737
|
+
fontSize: 12.5,
|
|
738
|
+
fontWeight: 700,
|
|
739
|
+
color: "#fff",
|
|
740
|
+
zIndex: 5
|
|
741
|
+
}
|
|
742
|
+
}, A = Z.colors, tt = (t) => {
|
|
743
|
+
const l = [], a = /* @__PURE__ */ new Map();
|
|
744
|
+
return t.forEach((n) => {
|
|
745
|
+
const r = n.group ?? "";
|
|
746
|
+
a.has(r) || (a.set(r, []), l.push(r)), a.get(r).push(n);
|
|
747
|
+
}), l.map((n) => ({ key: n, label: n, options: a.get(n) }));
|
|
748
|
+
}, rt = ({
|
|
749
|
+
open: t,
|
|
750
|
+
fieldLabel: l,
|
|
751
|
+
fieldValue: a,
|
|
752
|
+
errorTypes: n,
|
|
753
|
+
existing: r,
|
|
754
|
+
onConfirm: s,
|
|
755
|
+
onRemove: T,
|
|
756
|
+
onCancel: k
|
|
757
|
+
}) => {
|
|
758
|
+
const [S, h] = E(""), [w, B] = E(""), [i, c] = E(!1), [p, y] = E(!1), x = ne(null);
|
|
759
|
+
oe(() => {
|
|
760
|
+
t && (h((r == null ? void 0 : r.typeId) ?? ""), B((r == null ? void 0 : r.reason) ?? ""));
|
|
761
|
+
}, [t, r == null ? void 0 : r.typeId, r == null ? void 0 : r.reason]), oe(() => {
|
|
762
|
+
if (t) {
|
|
763
|
+
const z = window.setTimeout(() => {
|
|
764
|
+
var D;
|
|
765
|
+
return (D = x.current) == null ? void 0 : D.focus();
|
|
766
|
+
}, 0);
|
|
767
|
+
return () => window.clearTimeout(z);
|
|
768
|
+
}
|
|
769
|
+
}, [t]);
|
|
770
|
+
const Q = W(() => tt(n), [n]);
|
|
771
|
+
if (!t) return null;
|
|
772
|
+
const U = () => {
|
|
773
|
+
if (!S) {
|
|
774
|
+
window.alert("请选择错误类型后再确认标记");
|
|
775
|
+
return;
|
|
776
|
+
}
|
|
777
|
+
s(S, w.trim());
|
|
778
|
+
}, ee = (z) => {
|
|
779
|
+
z.target === z.currentTarget && k();
|
|
780
|
+
};
|
|
781
|
+
return /* @__PURE__ */ e.jsx("div", { style: F.overlay, onClick: ee, children: /* @__PURE__ */ e.jsxs("div", { style: F.modal, onClick: (z) => z.stopPropagation(), children: [
|
|
782
|
+
/* @__PURE__ */ e.jsx("div", { style: F.header, children: "📝 标记不符点" }),
|
|
783
|
+
/* @__PURE__ */ e.jsxs("div", { style: F.preview, children: [
|
|
784
|
+
/* @__PURE__ */ e.jsx("div", { style: F.previewLabel, children: l }),
|
|
785
|
+
/* @__PURE__ */ e.jsx("div", { style: F.previewValue, children: a })
|
|
786
|
+
] }),
|
|
787
|
+
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
788
|
+
/* @__PURE__ */ e.jsx("label", { style: F.bodyLabel, htmlFor: "dr-error-type-select", children: "选择错误类型:" }),
|
|
789
|
+
/* @__PURE__ */ e.jsxs(
|
|
790
|
+
"select",
|
|
791
|
+
{
|
|
792
|
+
id: "dr-error-type-select",
|
|
793
|
+
ref: x,
|
|
794
|
+
value: S,
|
|
795
|
+
onChange: (z) => h(z.target.value),
|
|
796
|
+
onFocus: () => c(!0),
|
|
797
|
+
onBlur: () => c(!1),
|
|
798
|
+
style: {
|
|
799
|
+
...F.select,
|
|
800
|
+
...i ? F.inputFocus : null
|
|
801
|
+
},
|
|
802
|
+
children: [
|
|
803
|
+
/* @__PURE__ */ e.jsx("option", { value: "", children: "-- 请选择错误类型 --" }),
|
|
804
|
+
Q.map(
|
|
805
|
+
(z) => z.label ? /* @__PURE__ */ e.jsx("optgroup", { label: z.label, children: z.options.map((D) => /* @__PURE__ */ e.jsx("option", { value: D.id, children: D.label }, D.id)) }, z.key) : z.options.map((D) => /* @__PURE__ */ e.jsx("option", { value: D.id, children: D.label }, D.id))
|
|
806
|
+
)
|
|
807
|
+
]
|
|
808
|
+
}
|
|
809
|
+
),
|
|
810
|
+
/* @__PURE__ */ e.jsx("label", { style: F.bodyLabel, htmlFor: "dr-reason-input", children: "补充说明(可选):" }),
|
|
811
|
+
/* @__PURE__ */ e.jsx(
|
|
812
|
+
"textarea",
|
|
813
|
+
{
|
|
814
|
+
id: "dr-reason-input",
|
|
815
|
+
value: w,
|
|
816
|
+
onChange: (z) => B(z.target.value),
|
|
817
|
+
onFocus: () => y(!0),
|
|
818
|
+
onBlur: () => y(!1),
|
|
819
|
+
placeholder: "请输入您发现的不符原因描述...",
|
|
820
|
+
style: {
|
|
821
|
+
...F.reason,
|
|
822
|
+
...p ? F.inputFocus : null
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
)
|
|
826
|
+
] }),
|
|
827
|
+
/* @__PURE__ */ e.jsxs("div", { style: F.footer, children: [
|
|
828
|
+
/* @__PURE__ */ e.jsx("button", { type: "button", style: F.btnCancel, onClick: k, children: "取消" }),
|
|
829
|
+
/* @__PURE__ */ e.jsx("button", { type: "button", style: F.btnConfirm, onClick: U, children: r ? "更新标记" : "确认标记" }),
|
|
830
|
+
r && T && /* @__PURE__ */ e.jsx("button", { type: "button", style: F.btnRemove, onClick: T, children: "取消标记" })
|
|
831
|
+
] })
|
|
832
|
+
] }) });
|
|
833
|
+
}, F = {
|
|
834
|
+
// .mark-modal-overlay(.show)
|
|
835
|
+
overlay: {
|
|
836
|
+
position: "fixed",
|
|
837
|
+
top: 0,
|
|
838
|
+
left: 0,
|
|
839
|
+
right: 0,
|
|
840
|
+
bottom: 0,
|
|
841
|
+
background: "rgba(0,0,0,0.45)",
|
|
842
|
+
zIndex: 2e3,
|
|
843
|
+
display: "flex",
|
|
844
|
+
alignItems: "center",
|
|
845
|
+
justifyContent: "center"
|
|
846
|
+
},
|
|
847
|
+
// .mark-modal
|
|
848
|
+
modal: {
|
|
849
|
+
background: "#fff",
|
|
850
|
+
borderRadius: 14,
|
|
851
|
+
padding: 28,
|
|
852
|
+
width: 480,
|
|
853
|
+
maxWidth: "94vw",
|
|
854
|
+
boxShadow: "0 16px 48px rgba(0,0,0,0.22)"
|
|
855
|
+
},
|
|
856
|
+
// .mark-modal-header
|
|
857
|
+
header: {
|
|
858
|
+
fontSize: 19,
|
|
859
|
+
fontWeight: 700,
|
|
860
|
+
marginBottom: 20,
|
|
861
|
+
paddingBottom: 14,
|
|
862
|
+
borderBottom: `1px solid ${A.border}`,
|
|
863
|
+
color: A.textPrimary
|
|
864
|
+
},
|
|
865
|
+
// .mark-field-preview
|
|
866
|
+
preview: {
|
|
867
|
+
background: "#f5f5f5",
|
|
868
|
+
borderRadius: 8,
|
|
869
|
+
padding: "14px 18px",
|
|
870
|
+
marginBottom: 20
|
|
871
|
+
},
|
|
872
|
+
// .mark-field-preview .label
|
|
873
|
+
previewLabel: {
|
|
874
|
+
fontSize: 14,
|
|
875
|
+
color: A.textSecondary,
|
|
876
|
+
marginBottom: 5,
|
|
877
|
+
fontWeight: 600
|
|
878
|
+
},
|
|
879
|
+
// .mark-field-preview .value
|
|
880
|
+
previewValue: {
|
|
881
|
+
fontSize: 17,
|
|
882
|
+
fontWeight: 700,
|
|
883
|
+
color: A.textPrimary,
|
|
884
|
+
lineHeight: 1.5,
|
|
885
|
+
wordBreak: "break-all"
|
|
886
|
+
},
|
|
887
|
+
// .mark-modal-body label
|
|
888
|
+
bodyLabel: {
|
|
889
|
+
display: "block",
|
|
890
|
+
fontSize: 15,
|
|
891
|
+
fontWeight: 600,
|
|
892
|
+
marginBottom: 10,
|
|
893
|
+
color: A.textPrimary
|
|
894
|
+
},
|
|
895
|
+
// .mark-error-select
|
|
896
|
+
select: {
|
|
897
|
+
width: "100%",
|
|
898
|
+
padding: "11px 14px",
|
|
899
|
+
// 拆分写法,避免与 inputFocus 的 borderColor 混用 border 简写(失焦时触发样式冲突告警)
|
|
900
|
+
borderWidth: 1,
|
|
901
|
+
borderStyle: "solid",
|
|
902
|
+
borderColor: A.border,
|
|
903
|
+
borderRadius: 8,
|
|
904
|
+
fontSize: 15.5,
|
|
905
|
+
outline: "none",
|
|
906
|
+
marginBottom: 18,
|
|
907
|
+
appearance: "auto",
|
|
908
|
+
cursor: "pointer",
|
|
909
|
+
background: "#fff",
|
|
910
|
+
color: A.textPrimary,
|
|
911
|
+
fontFamily: "inherit"
|
|
912
|
+
},
|
|
913
|
+
// .mark-reason-input
|
|
914
|
+
reason: {
|
|
915
|
+
width: "100%",
|
|
916
|
+
padding: "11px 14px",
|
|
917
|
+
// 拆分写法,避免与 inputFocus 的 borderColor 混用 border 简写(失焦时触发样式冲突告警)
|
|
918
|
+
borderWidth: 1,
|
|
919
|
+
borderStyle: "solid",
|
|
920
|
+
borderColor: A.border,
|
|
921
|
+
borderRadius: 8,
|
|
922
|
+
fontSize: 15.5,
|
|
923
|
+
outline: "none",
|
|
924
|
+
resize: "vertical",
|
|
925
|
+
minHeight: 84,
|
|
926
|
+
fontFamily: "inherit",
|
|
927
|
+
marginBottom: 22,
|
|
928
|
+
lineHeight: 1.6,
|
|
929
|
+
color: A.textPrimary,
|
|
930
|
+
boxSizing: "border-box"
|
|
931
|
+
},
|
|
932
|
+
// :focus(select / textarea 共用)
|
|
933
|
+
inputFocus: {
|
|
934
|
+
borderColor: A.primary,
|
|
935
|
+
boxShadow: "0 0 0 3px rgba(24,144,255,0.12)"
|
|
936
|
+
},
|
|
937
|
+
// .mark-modal-footer
|
|
938
|
+
footer: {
|
|
939
|
+
display: "flex",
|
|
940
|
+
justifyContent: "flex-end",
|
|
941
|
+
gap: 12
|
|
942
|
+
},
|
|
943
|
+
// .btn-cancel
|
|
944
|
+
btnCancel: {
|
|
945
|
+
padding: "10px 24px",
|
|
946
|
+
border: `1px solid ${A.border}`,
|
|
947
|
+
background: "#fff",
|
|
948
|
+
borderRadius: 8,
|
|
949
|
+
cursor: "pointer",
|
|
950
|
+
fontSize: 15,
|
|
951
|
+
color: A.textSecondary,
|
|
952
|
+
fontWeight: 500
|
|
953
|
+
},
|
|
954
|
+
// .btn-confirm
|
|
955
|
+
btnConfirm: {
|
|
956
|
+
padding: "10px 24px",
|
|
957
|
+
border: "none",
|
|
958
|
+
background: A.primary,
|
|
959
|
+
color: "#fff",
|
|
960
|
+
borderRadius: 8,
|
|
961
|
+
cursor: "pointer",
|
|
962
|
+
fontSize: 15,
|
|
963
|
+
fontWeight: 600
|
|
964
|
+
},
|
|
965
|
+
// #removeMarkBtn(.btn-confirm + background:var(--error))
|
|
966
|
+
btnRemove: {
|
|
967
|
+
padding: "10px 24px",
|
|
968
|
+
border: "none",
|
|
969
|
+
background: A.error,
|
|
970
|
+
color: "#fff",
|
|
971
|
+
borderRadius: 8,
|
|
972
|
+
cursor: "pointer",
|
|
973
|
+
fontSize: 15,
|
|
974
|
+
fontWeight: 600
|
|
975
|
+
}
|
|
976
|
+
}, C = Z.colors, ot = ({
|
|
977
|
+
marks: t,
|
|
978
|
+
errorTypes: l,
|
|
979
|
+
collapsed: a,
|
|
980
|
+
onToggleCollapsed: n,
|
|
981
|
+
submitted: r,
|
|
982
|
+
scoreResult: s,
|
|
983
|
+
onLocate: T,
|
|
984
|
+
onEdit: k,
|
|
985
|
+
onDelete: S,
|
|
986
|
+
showExpectedCount: h,
|
|
987
|
+
expectedTotal: w
|
|
988
|
+
}) => {
|
|
989
|
+
const B = W(() => {
|
|
990
|
+
const y = /* @__PURE__ */ new Map();
|
|
991
|
+
return l.forEach((x) => y.set(x.id, x.label)), y;
|
|
992
|
+
}, [l]), i = W(
|
|
993
|
+
() => new Set(((s == null ? void 0 : s.perAnswer) ?? []).filter((y) => y.hit).map((y) => y.fieldName)),
|
|
994
|
+
[s]
|
|
995
|
+
), c = W(() => new Set((s == null ? void 0 : s.falseMarks) ?? []), [s]), p = (y) => r ? i.has(y) ? "correct" : c.has(y) ? "wrong" : "none" : "none";
|
|
996
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
997
|
+
/* @__PURE__ */ e.jsx(
|
|
998
|
+
"aside",
|
|
999
|
+
{
|
|
1000
|
+
style: {
|
|
1001
|
+
...b.panel,
|
|
1002
|
+
...a ? b.panelCollapsed : null
|
|
1003
|
+
},
|
|
1004
|
+
children: /* @__PURE__ */ e.jsxs("div", { style: b.panelInner, children: [
|
|
1005
|
+
/* @__PURE__ */ e.jsxs("div", { style: b.header, children: [
|
|
1006
|
+
/* @__PURE__ */ e.jsxs("h3", { style: b.headerTitle, children: [
|
|
1007
|
+
/* @__PURE__ */ e.jsx("span", { children: "📝" }),
|
|
1008
|
+
" 标记清单"
|
|
1009
|
+
] }),
|
|
1010
|
+
/* @__PURE__ */ e.jsx(
|
|
1011
|
+
"button",
|
|
1012
|
+
{
|
|
1013
|
+
type: "button",
|
|
1014
|
+
style: b.headerToggleBtn,
|
|
1015
|
+
onClick: n,
|
|
1016
|
+
title: "收起标记清单",
|
|
1017
|
+
children: "◀"
|
|
1018
|
+
}
|
|
1019
|
+
)
|
|
1020
|
+
] }),
|
|
1021
|
+
/* @__PURE__ */ e.jsxs("div", { style: b.stats, children: [
|
|
1022
|
+
/* @__PURE__ */ e.jsx("span", { children: "已标记不符点" }),
|
|
1023
|
+
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
1024
|
+
/* @__PURE__ */ e.jsx("span", { style: b.countNum, children: t.length }),
|
|
1025
|
+
h && typeof w == "number" ? ` / ${w} 处` : " 处"
|
|
1026
|
+
] })
|
|
1027
|
+
] }),
|
|
1028
|
+
/* @__PURE__ */ e.jsx("div", { style: b.body, children: t.length === 0 ? /* @__PURE__ */ e.jsxs("div", { style: b.empty, children: [
|
|
1029
|
+
/* @__PURE__ */ e.jsx("div", { style: b.emptyIcon, children: "📝" }),
|
|
1030
|
+
/* @__PURE__ */ e.jsxs("div", { style: b.emptyText, children: [
|
|
1031
|
+
"暂无标记",
|
|
1032
|
+
/* @__PURE__ */ e.jsx("br", {}),
|
|
1033
|
+
"点击左侧单证中的字段进行标注"
|
|
1034
|
+
] })
|
|
1035
|
+
] }) : t.map((y, x) => /* @__PURE__ */ e.jsx(
|
|
1036
|
+
nt,
|
|
1037
|
+
{
|
|
1038
|
+
index: x + 1,
|
|
1039
|
+
mark: y,
|
|
1040
|
+
typeLabel: B.get(y.typeId) || y.typeId,
|
|
1041
|
+
verdict: p(y.fieldName),
|
|
1042
|
+
submitted: r,
|
|
1043
|
+
onLocate: T,
|
|
1044
|
+
onEdit: k,
|
|
1045
|
+
onDelete: S
|
|
1046
|
+
},
|
|
1047
|
+
y.fieldName
|
|
1048
|
+
)) })
|
|
1049
|
+
] })
|
|
1050
|
+
}
|
|
1051
|
+
),
|
|
1052
|
+
a && /* @__PURE__ */ e.jsx(
|
|
1053
|
+
"button",
|
|
1054
|
+
{
|
|
1055
|
+
type: "button",
|
|
1056
|
+
style: b.fab,
|
|
1057
|
+
onClick: n,
|
|
1058
|
+
title: "展开/收起标记清单",
|
|
1059
|
+
children: "📝"
|
|
1060
|
+
}
|
|
1061
|
+
)
|
|
1062
|
+
] });
|
|
1063
|
+
}, nt = ({
|
|
1064
|
+
index: t,
|
|
1065
|
+
mark: l,
|
|
1066
|
+
typeLabel: a,
|
|
1067
|
+
verdict: n,
|
|
1068
|
+
submitted: r,
|
|
1069
|
+
onLocate: s,
|
|
1070
|
+
onEdit: T,
|
|
1071
|
+
onDelete: k
|
|
1072
|
+
}) => {
|
|
1073
|
+
const [S, h] = E(!1), w = {
|
|
1074
|
+
...b.listIndex,
|
|
1075
|
+
...n === "correct" ? b.listIndexCorrect : null,
|
|
1076
|
+
...n === "wrong" ? b.listIndexWrong : null
|
|
1077
|
+
}, B = {
|
|
1078
|
+
...b.listTypeTag,
|
|
1079
|
+
...n === "correct" ? b.listTypeTagCorrect : null
|
|
1080
|
+
};
|
|
1081
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1082
|
+
"div",
|
|
1083
|
+
{
|
|
1084
|
+
style: {
|
|
1085
|
+
...b.listItem,
|
|
1086
|
+
// submitted 只读:不再 hover 高亮、光标恢复默认
|
|
1087
|
+
...S && !r ? b.listItemHover : null,
|
|
1088
|
+
...r ? b.listItemSubmitted : null
|
|
1089
|
+
},
|
|
1090
|
+
onMouseEnter: () => h(!0),
|
|
1091
|
+
onMouseLeave: () => h(!1),
|
|
1092
|
+
children: [
|
|
1093
|
+
/* @__PURE__ */ e.jsxs("div", { style: b.listItemHeader, children: [
|
|
1094
|
+
/* @__PURE__ */ e.jsx("span", { style: w, children: t }),
|
|
1095
|
+
/* @__PURE__ */ e.jsx("span", { style: b.listFieldName, children: l.fieldLabel })
|
|
1096
|
+
] }),
|
|
1097
|
+
/* @__PURE__ */ e.jsxs("div", { style: b.listMeta, children: [
|
|
1098
|
+
/* @__PURE__ */ e.jsx("span", { style: b.listTabTag, children: l.docName }),
|
|
1099
|
+
/* @__PURE__ */ e.jsx("span", { style: B, children: a })
|
|
1100
|
+
] }),
|
|
1101
|
+
/* @__PURE__ */ e.jsx("div", { style: b.listReason, children: l.reason && l.reason.trim() ? l.reason : /* @__PURE__ */ e.jsx("span", { style: b.listReasonPlaceholder, children: "(无补充说明)" }) }),
|
|
1102
|
+
/* @__PURE__ */ e.jsxs("div", { style: b.listActions, children: [
|
|
1103
|
+
/* @__PURE__ */ e.jsx(de, { label: "📍 定位", onClick: () => s(l.fieldName) }),
|
|
1104
|
+
!r && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1105
|
+
/* @__PURE__ */ e.jsx(de, { label: "✏️ 编辑", onClick: () => T(l.fieldName) }),
|
|
1106
|
+
/* @__PURE__ */ e.jsx(de, { label: "🗑️ 删除", variant: "delete", onClick: () => k(l.fieldName) })
|
|
1107
|
+
] })
|
|
1108
|
+
] })
|
|
1109
|
+
]
|
|
1110
|
+
}
|
|
1111
|
+
);
|
|
1112
|
+
}, de = ({ label: t, variant: l = "default", onClick: a }) => {
|
|
1113
|
+
const [n, r] = E(!1), s = l === "delete" ? b.actionBtnDeleteHover : b.actionBtnHover;
|
|
1114
|
+
return /* @__PURE__ */ e.jsx(
|
|
1115
|
+
"button",
|
|
1116
|
+
{
|
|
1117
|
+
type: "button",
|
|
1118
|
+
style: { ...b.actionBtn, ...n ? s : null },
|
|
1119
|
+
onMouseEnter: () => r(!0),
|
|
1120
|
+
onMouseLeave: () => r(!1),
|
|
1121
|
+
onClick: a,
|
|
1122
|
+
children: t
|
|
1123
|
+
}
|
|
1124
|
+
);
|
|
1125
|
+
}, b = {
|
|
1126
|
+
// 外层 wrapper:flex 子项,折叠时 width→0 平滑收拢(取代原 fixed + translateX)
|
|
1127
|
+
panel: {
|
|
1128
|
+
flexShrink: 0,
|
|
1129
|
+
width: 380,
|
|
1130
|
+
overflow: "hidden",
|
|
1131
|
+
transition: "width 0.3s ease",
|
|
1132
|
+
borderLeft: `1px solid ${C.border}`
|
|
1133
|
+
},
|
|
1134
|
+
// 折叠态:宽度收拢到 0
|
|
1135
|
+
panelCollapsed: {
|
|
1136
|
+
width: 0,
|
|
1137
|
+
borderLeft: "none"
|
|
1138
|
+
},
|
|
1139
|
+
// 内层:固定宽内容,避免折叠动画期间内容 reflow;自身纵向滚动
|
|
1140
|
+
panelInner: {
|
|
1141
|
+
width: 380,
|
|
1142
|
+
height: "100%",
|
|
1143
|
+
background: C.surface,
|
|
1144
|
+
overflowY: "auto",
|
|
1145
|
+
display: "flex",
|
|
1146
|
+
flexDirection: "column"
|
|
1147
|
+
},
|
|
1148
|
+
// .mark-panel-header(紫色渐变)
|
|
1149
|
+
header: {
|
|
1150
|
+
display: "flex",
|
|
1151
|
+
alignItems: "center",
|
|
1152
|
+
justifyContent: "space-between",
|
|
1153
|
+
padding: "16px 22px",
|
|
1154
|
+
borderBottom: `1px solid ${C.border}`,
|
|
1155
|
+
background: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
|
1156
|
+
color: "#fff",
|
|
1157
|
+
flexShrink: 0
|
|
1158
|
+
},
|
|
1159
|
+
// .mark-panel-header h3
|
|
1160
|
+
headerTitle: {
|
|
1161
|
+
fontSize: 17.5,
|
|
1162
|
+
fontWeight: 700,
|
|
1163
|
+
display: "flex",
|
|
1164
|
+
alignItems: "center",
|
|
1165
|
+
gap: 8,
|
|
1166
|
+
margin: 0
|
|
1167
|
+
},
|
|
1168
|
+
// .mark-panel-toggle-btn
|
|
1169
|
+
headerToggleBtn: {
|
|
1170
|
+
width: 34,
|
|
1171
|
+
height: 34,
|
|
1172
|
+
border: "none",
|
|
1173
|
+
background: "rgba(255,255,255,0.22)",
|
|
1174
|
+
borderRadius: 8,
|
|
1175
|
+
cursor: "pointer",
|
|
1176
|
+
fontSize: 18,
|
|
1177
|
+
display: "flex",
|
|
1178
|
+
alignItems: "center",
|
|
1179
|
+
justifyContent: "center",
|
|
1180
|
+
color: "#fff",
|
|
1181
|
+
transition: "background 0.2s"
|
|
1182
|
+
},
|
|
1183
|
+
// .mark-panel-stats
|
|
1184
|
+
stats: {
|
|
1185
|
+
display: "flex",
|
|
1186
|
+
alignItems: "center",
|
|
1187
|
+
justifyContent: "space-between",
|
|
1188
|
+
padding: "12px 22px",
|
|
1189
|
+
background: "#fafbfc",
|
|
1190
|
+
borderBottom: `1px solid ${C.border}`,
|
|
1191
|
+
flexShrink: 0,
|
|
1192
|
+
fontSize: 15,
|
|
1193
|
+
color: C.textSecondary,
|
|
1194
|
+
fontWeight: 500
|
|
1195
|
+
},
|
|
1196
|
+
// .mark-panel-stats .count-num
|
|
1197
|
+
countNum: {
|
|
1198
|
+
fontSize: 24,
|
|
1199
|
+
fontWeight: 800,
|
|
1200
|
+
color: C.primary
|
|
1201
|
+
},
|
|
1202
|
+
// .mark-panel-body
|
|
1203
|
+
body: {
|
|
1204
|
+
flex: 1,
|
|
1205
|
+
overflowY: "auto",
|
|
1206
|
+
padding: 0
|
|
1207
|
+
},
|
|
1208
|
+
// .mark-list-empty
|
|
1209
|
+
empty: {
|
|
1210
|
+
display: "flex",
|
|
1211
|
+
flexDirection: "column",
|
|
1212
|
+
alignItems: "center",
|
|
1213
|
+
justifyContent: "center",
|
|
1214
|
+
padding: "56px 24px",
|
|
1215
|
+
color: C.textDisabled
|
|
1216
|
+
},
|
|
1217
|
+
emptyIcon: {
|
|
1218
|
+
fontSize: 48,
|
|
1219
|
+
marginBottom: 16,
|
|
1220
|
+
opacity: 0.45
|
|
1221
|
+
},
|
|
1222
|
+
emptyText: {
|
|
1223
|
+
fontSize: 15,
|
|
1224
|
+
textAlign: "center",
|
|
1225
|
+
lineHeight: 1.8
|
|
1226
|
+
},
|
|
1227
|
+
// .mark-list-item
|
|
1228
|
+
listItem: {
|
|
1229
|
+
padding: "16px 22px",
|
|
1230
|
+
borderBottom: "1px solid #f5f5f5",
|
|
1231
|
+
cursor: "pointer",
|
|
1232
|
+
transition: "background 0.15s",
|
|
1233
|
+
position: "relative"
|
|
1234
|
+
},
|
|
1235
|
+
// .mark-list-item:hover
|
|
1236
|
+
listItemHover: {
|
|
1237
|
+
background: "#fafafa"
|
|
1238
|
+
},
|
|
1239
|
+
// .mark-panel.submitted-mode .mark-list-item
|
|
1240
|
+
listItemSubmitted: {
|
|
1241
|
+
cursor: "default"
|
|
1242
|
+
},
|
|
1243
|
+
// .mark-list-item-header
|
|
1244
|
+
listItemHeader: {
|
|
1245
|
+
display: "flex",
|
|
1246
|
+
alignItems: "flex-start",
|
|
1247
|
+
gap: 12,
|
|
1248
|
+
marginBottom: 10
|
|
1249
|
+
},
|
|
1250
|
+
// .mark-list-index
|
|
1251
|
+
listIndex: {
|
|
1252
|
+
flexShrink: 0,
|
|
1253
|
+
width: 26,
|
|
1254
|
+
height: 26,
|
|
1255
|
+
borderRadius: 13,
|
|
1256
|
+
background: C.primary,
|
|
1257
|
+
color: "#fff",
|
|
1258
|
+
fontSize: 13,
|
|
1259
|
+
fontWeight: 800,
|
|
1260
|
+
display: "flex",
|
|
1261
|
+
alignItems: "center",
|
|
1262
|
+
justifyContent: "center",
|
|
1263
|
+
marginTop: 2
|
|
1264
|
+
},
|
|
1265
|
+
// .mark-list-index.index-wrong
|
|
1266
|
+
listIndexWrong: {
|
|
1267
|
+
background: C.error
|
|
1268
|
+
},
|
|
1269
|
+
// .mark-list-index.index-correct
|
|
1270
|
+
listIndexCorrect: {
|
|
1271
|
+
background: C.success
|
|
1272
|
+
},
|
|
1273
|
+
// .mark-list-field-name
|
|
1274
|
+
listFieldName: {
|
|
1275
|
+
fontSize: 15.5,
|
|
1276
|
+
fontWeight: 700,
|
|
1277
|
+
color: C.textPrimary,
|
|
1278
|
+
lineHeight: 1.45
|
|
1279
|
+
},
|
|
1280
|
+
// .mark-list-meta
|
|
1281
|
+
listMeta: {
|
|
1282
|
+
display: "flex",
|
|
1283
|
+
alignItems: "center",
|
|
1284
|
+
gap: 10,
|
|
1285
|
+
marginBottom: 8,
|
|
1286
|
+
paddingLeft: 38,
|
|
1287
|
+
flexWrap: "wrap"
|
|
1288
|
+
},
|
|
1289
|
+
// .mark-list-tab-tag
|
|
1290
|
+
listTabTag: {
|
|
1291
|
+
display: "inline-block",
|
|
1292
|
+
padding: "2px 10px",
|
|
1293
|
+
background: "#f0f0f0",
|
|
1294
|
+
color: C.textSecondary,
|
|
1295
|
+
borderRadius: 6,
|
|
1296
|
+
fontSize: 12.5,
|
|
1297
|
+
fontWeight: 600
|
|
1298
|
+
},
|
|
1299
|
+
// .mark-list-type-tag
|
|
1300
|
+
listTypeTag: {
|
|
1301
|
+
display: "inline-block",
|
|
1302
|
+
padding: "2px 10px",
|
|
1303
|
+
background: "#fff1f0",
|
|
1304
|
+
color: C.error,
|
|
1305
|
+
borderRadius: 6,
|
|
1306
|
+
fontSize: 12.5,
|
|
1307
|
+
fontWeight: 600
|
|
1308
|
+
},
|
|
1309
|
+
// .mark-list-type-tag.type-correct
|
|
1310
|
+
listTypeTagCorrect: {
|
|
1311
|
+
background: "#f6ffed",
|
|
1312
|
+
color: C.success
|
|
1313
|
+
},
|
|
1314
|
+
// .mark-list-reason
|
|
1315
|
+
listReason: {
|
|
1316
|
+
fontSize: 13.5,
|
|
1317
|
+
color: C.textDisabled,
|
|
1318
|
+
paddingLeft: 38,
|
|
1319
|
+
lineHeight: 1.65,
|
|
1320
|
+
wordBreak: "break-all"
|
|
1321
|
+
},
|
|
1322
|
+
// .mark-list-reason:empty::before
|
|
1323
|
+
listReasonPlaceholder: {
|
|
1324
|
+
color: "#ddd"
|
|
1325
|
+
},
|
|
1326
|
+
// .mark-list-actions
|
|
1327
|
+
listActions: {
|
|
1328
|
+
display: "flex",
|
|
1329
|
+
gap: 8,
|
|
1330
|
+
paddingLeft: 38,
|
|
1331
|
+
marginTop: 10,
|
|
1332
|
+
flexWrap: "wrap"
|
|
1333
|
+
},
|
|
1334
|
+
// .ml-action-btn
|
|
1335
|
+
actionBtn: {
|
|
1336
|
+
padding: "5px 13px",
|
|
1337
|
+
// 拆分写法:hover 变体只改 borderColor,基态若用 border 简写会在 hover 移开时触发样式冲突告警
|
|
1338
|
+
borderWidth: 1,
|
|
1339
|
+
borderStyle: "solid",
|
|
1340
|
+
borderColor: C.border,
|
|
1341
|
+
background: "#fff",
|
|
1342
|
+
borderRadius: 6,
|
|
1343
|
+
cursor: "pointer",
|
|
1344
|
+
fontSize: 13,
|
|
1345
|
+
color: C.textSecondary,
|
|
1346
|
+
transition: "all 0.15s",
|
|
1347
|
+
display: "inline-flex",
|
|
1348
|
+
alignItems: "center",
|
|
1349
|
+
gap: 4,
|
|
1350
|
+
fontWeight: 500
|
|
1351
|
+
},
|
|
1352
|
+
// .ml-action-btn:hover
|
|
1353
|
+
actionBtnHover: {
|
|
1354
|
+
borderColor: C.primary,
|
|
1355
|
+
color: C.primary
|
|
1356
|
+
},
|
|
1357
|
+
// .ml-action-btn.btn-delete:hover
|
|
1358
|
+
actionBtnDeleteHover: {
|
|
1359
|
+
borderColor: C.error,
|
|
1360
|
+
color: C.error
|
|
1361
|
+
},
|
|
1362
|
+
// .mark-panel-fab
|
|
1363
|
+
fab: {
|
|
1364
|
+
position: "absolute",
|
|
1365
|
+
right: 0,
|
|
1366
|
+
top: 16,
|
|
1367
|
+
width: 30,
|
|
1368
|
+
height: 52,
|
|
1369
|
+
background: C.surface,
|
|
1370
|
+
border: `1px solid ${C.border}`,
|
|
1371
|
+
borderRadius: "10px 0 0 10px",
|
|
1372
|
+
cursor: "pointer",
|
|
1373
|
+
zIndex: 30,
|
|
1374
|
+
display: "flex",
|
|
1375
|
+
alignItems: "center",
|
|
1376
|
+
justifyContent: "center",
|
|
1377
|
+
fontSize: 16,
|
|
1378
|
+
color: C.textSecondary,
|
|
1379
|
+
transition: "right 0.3s ease, background 0.2s",
|
|
1380
|
+
boxShadow: "-2px 0 10px rgba(0,0,0,0.08)"
|
|
1381
|
+
}
|
|
1382
|
+
}, L = Z.colors, lt = ({
|
|
1383
|
+
scoreResult: t,
|
|
1384
|
+
answers: l,
|
|
1385
|
+
documents: a,
|
|
1386
|
+
errorTypes: n,
|
|
1387
|
+
marks: r
|
|
1388
|
+
}) => {
|
|
1389
|
+
const s = W(() => {
|
|
1390
|
+
const i = /* @__PURE__ */ new Map();
|
|
1391
|
+
return a.forEach((c) => {
|
|
1392
|
+
c.fields.forEach((p) => {
|
|
1393
|
+
i.set(p.name, {
|
|
1394
|
+
label: p.label,
|
|
1395
|
+
value: p.value,
|
|
1396
|
+
docName: c.documentType
|
|
1397
|
+
});
|
|
1398
|
+
});
|
|
1399
|
+
}), i;
|
|
1400
|
+
}, [a]), T = W(() => {
|
|
1401
|
+
const i = /* @__PURE__ */ new Map();
|
|
1402
|
+
return n.forEach((c) => i.set(c.id, c.label)), i;
|
|
1403
|
+
}, [n]), k = W(() => {
|
|
1404
|
+
const i = /* @__PURE__ */ new Map();
|
|
1405
|
+
return t.perAnswer.forEach((c) => i.set(c.fieldName, c.hit)), i;
|
|
1406
|
+
}, [t]), S = (i) => {
|
|
1407
|
+
var c;
|
|
1408
|
+
return ((c = s.get(i)) == null ? void 0 : c.label) ?? i;
|
|
1409
|
+
}, h = (i) => {
|
|
1410
|
+
var c;
|
|
1411
|
+
return ((c = s.get(i)) == null ? void 0 : c.value) ?? "";
|
|
1412
|
+
}, w = (i) => {
|
|
1413
|
+
var c;
|
|
1414
|
+
return ((c = s.get(i)) == null ? void 0 : c.docName) ?? "";
|
|
1415
|
+
}, B = (i) => T.get(i) ?? i;
|
|
1416
|
+
return /* @__PURE__ */ e.jsxs("div", { style: d.panel, children: [
|
|
1417
|
+
/* @__PURE__ */ e.jsxs("div", { style: d.header, children: [
|
|
1418
|
+
/* @__PURE__ */ e.jsx("h3", { style: d.headerTitle, children: "📋 审核结果 — 不符点清单" }),
|
|
1419
|
+
/* @__PURE__ */ e.jsxs("div", { style: d.stats, children: [
|
|
1420
|
+
/* @__PURE__ */ e.jsxs("span", { style: d.statItem, children: [
|
|
1421
|
+
/* @__PURE__ */ e.jsx("span", { style: { ...d.statNum, color: L.success }, children: t.found }),
|
|
1422
|
+
" 找到"
|
|
1423
|
+
] }),
|
|
1424
|
+
/* @__PURE__ */ e.jsxs("span", { style: d.statItem, children: [
|
|
1425
|
+
/* @__PURE__ */ e.jsx("span", { style: { ...d.statNum, color: L.error }, children: t.missed }),
|
|
1426
|
+
" 遗漏"
|
|
1427
|
+
] }),
|
|
1428
|
+
/* @__PURE__ */ e.jsxs("span", { style: d.statItem, children: [
|
|
1429
|
+
/* @__PURE__ */ e.jsx("span", { style: { ...d.statNum, color: L.warning }, children: t.wrong }),
|
|
1430
|
+
" 误标"
|
|
1431
|
+
] })
|
|
1432
|
+
] })
|
|
1433
|
+
] }),
|
|
1434
|
+
/* @__PURE__ */ e.jsx("div", { style: d.body, children: /* @__PURE__ */ e.jsxs("table", { style: d.table, children: [
|
|
1435
|
+
/* @__PURE__ */ e.jsx("thead", { children: /* @__PURE__ */ e.jsxs("tr", { children: [
|
|
1436
|
+
/* @__PURE__ */ e.jsx("th", { style: { ...d.th, width: 36 }, children: "状态" }),
|
|
1437
|
+
/* @__PURE__ */ e.jsx("th", { style: { ...d.th, width: 150 }, children: "字段名称" }),
|
|
1438
|
+
/* @__PURE__ */ e.jsx("th", { style: { ...d.th, width: 120 }, children: "所属单证" }),
|
|
1439
|
+
/* @__PURE__ */ e.jsx("th", { style: { ...d.th, width: 140 }, children: "错误类型" }),
|
|
1440
|
+
/* @__PURE__ */ e.jsx("th", { style: d.th, children: "原值 → 正确值" })
|
|
1441
|
+
] }) }),
|
|
1442
|
+
/* @__PURE__ */ e.jsxs("tbody", { children: [
|
|
1443
|
+
l.map((i) => {
|
|
1444
|
+
var x;
|
|
1445
|
+
const c = k.get(i.fieldName) ?? !1, p = h(i.fieldName), y = c ? (x = r.get(i.fieldName)) == null ? void 0 : x.reason : void 0;
|
|
1446
|
+
return /* @__PURE__ */ e.jsxs("tr", { style: d.tr, children: [
|
|
1447
|
+
/* @__PURE__ */ e.jsx("td", { style: d.td, children: /* @__PURE__ */ e.jsx("span", { style: d.statusIcon, children: c ? "✅" : "❌" }) }),
|
|
1448
|
+
/* @__PURE__ */ e.jsxs("td", { style: d.td, children: [
|
|
1449
|
+
/* @__PURE__ */ e.jsx("div", { style: d.fieldName, children: S(i.fieldName) }),
|
|
1450
|
+
/* @__PURE__ */ e.jsx("div", { style: d.tabLabel, children: w(i.fieldName) })
|
|
1451
|
+
] }),
|
|
1452
|
+
/* @__PURE__ */ e.jsx("td", { style: d.td, children: w(i.fieldName) }),
|
|
1453
|
+
/* @__PURE__ */ e.jsx("td", { style: d.td, children: /* @__PURE__ */ e.jsx(
|
|
1454
|
+
"span",
|
|
1455
|
+
{
|
|
1456
|
+
style: {
|
|
1457
|
+
...d.typeTag,
|
|
1458
|
+
...c ? d.typeTagWarning : d.typeTagError
|
|
1459
|
+
},
|
|
1460
|
+
children: B(i.typeId)
|
|
1461
|
+
}
|
|
1462
|
+
) }),
|
|
1463
|
+
/* @__PURE__ */ e.jsxs("td", { style: d.td, children: [
|
|
1464
|
+
/* @__PURE__ */ e.jsx("div", { style: d.valueRow, children: c ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1465
|
+
/* @__PURE__ */ e.jsx("span", { style: d.wrongValue, children: p }),
|
|
1466
|
+
/* @__PURE__ */ e.jsx("span", { children: "→" }),
|
|
1467
|
+
/* @__PURE__ */ e.jsx("span", { style: d.correctValue, children: i.correctValue ?? "" })
|
|
1468
|
+
] }) : /* @__PURE__ */ e.jsxs("span", { style: { color: L.error }, children: [
|
|
1469
|
+
"【未标记】原值:",
|
|
1470
|
+
p,
|
|
1471
|
+
" → 应为:",
|
|
1472
|
+
i.correctValue ?? ""
|
|
1473
|
+
] }) }),
|
|
1474
|
+
/* @__PURE__ */ e.jsx("div", { style: d.explanation, children: i.explanation }),
|
|
1475
|
+
y && y.trim() ? /* @__PURE__ */ e.jsxs("div", { style: d.studentReason, children: [
|
|
1476
|
+
"您的备注:",
|
|
1477
|
+
y
|
|
1478
|
+
] }) : null
|
|
1479
|
+
] })
|
|
1480
|
+
] }, i.fieldName);
|
|
1481
|
+
}),
|
|
1482
|
+
t.falseMarks.map((i) => {
|
|
1483
|
+
var p;
|
|
1484
|
+
const c = (p = r.get(i)) == null ? void 0 : p.reason;
|
|
1485
|
+
return /* @__PURE__ */ e.jsxs("tr", { style: d.tr, children: [
|
|
1486
|
+
/* @__PURE__ */ e.jsx("td", { style: d.td, children: /* @__PURE__ */ e.jsx("span", { style: d.statusIcon, children: "⚠️" }) }),
|
|
1487
|
+
/* @__PURE__ */ e.jsx("td", { style: d.td, children: /* @__PURE__ */ e.jsx("div", { style: d.fieldName, children: S(i) }) }),
|
|
1488
|
+
/* @__PURE__ */ e.jsx("td", { style: d.td, children: "-" }),
|
|
1489
|
+
/* @__PURE__ */ e.jsx("td", { style: d.td, children: /* @__PURE__ */ e.jsx("span", { style: { ...d.typeTag, ...d.typeTagWarning }, children: "误标" }) }),
|
|
1490
|
+
/* @__PURE__ */ e.jsxs("td", { style: d.td, children: [
|
|
1491
|
+
"该字段无误,无需标记。",
|
|
1492
|
+
c && c.trim() ? /* @__PURE__ */ e.jsxs("div", { style: d.falseMarkReason, children: [
|
|
1493
|
+
"您的备注:",
|
|
1494
|
+
c
|
|
1495
|
+
] }) : null
|
|
1496
|
+
] })
|
|
1497
|
+
] }, `false-${i}`);
|
|
1498
|
+
})
|
|
1499
|
+
] })
|
|
1500
|
+
] }) })
|
|
1501
|
+
] });
|
|
1502
|
+
}, d = {
|
|
1503
|
+
// .result-panel(margin-top 24,展示态由父层控制显隐)
|
|
1504
|
+
panel: {
|
|
1505
|
+
marginTop: 24
|
|
1506
|
+
},
|
|
1507
|
+
// .result-header(黄色渐变)
|
|
1508
|
+
header: {
|
|
1509
|
+
display: "flex",
|
|
1510
|
+
alignItems: "center",
|
|
1511
|
+
justifyContent: "space-between",
|
|
1512
|
+
background: "linear-gradient(135deg, #fff7e6 0%, #fff1b8 100%)",
|
|
1513
|
+
padding: "16px 24px",
|
|
1514
|
+
borderRadius: "10px 10px 0 0",
|
|
1515
|
+
border: "1px solid #ffe58f",
|
|
1516
|
+
borderBottom: "none"
|
|
1517
|
+
},
|
|
1518
|
+
// .result-header h3
|
|
1519
|
+
headerTitle: {
|
|
1520
|
+
fontSize: 19,
|
|
1521
|
+
fontWeight: 700,
|
|
1522
|
+
color: "#ad6800",
|
|
1523
|
+
display: "flex",
|
|
1524
|
+
alignItems: "center",
|
|
1525
|
+
gap: 10,
|
|
1526
|
+
margin: 0
|
|
1527
|
+
},
|
|
1528
|
+
// .result-stats
|
|
1529
|
+
stats: {
|
|
1530
|
+
display: "flex",
|
|
1531
|
+
gap: 20,
|
|
1532
|
+
fontSize: 15,
|
|
1533
|
+
fontWeight: 500
|
|
1534
|
+
},
|
|
1535
|
+
// .stat-item
|
|
1536
|
+
statItem: {
|
|
1537
|
+
display: "flex",
|
|
1538
|
+
alignItems: "center",
|
|
1539
|
+
gap: 5
|
|
1540
|
+
},
|
|
1541
|
+
// .stat-item .num
|
|
1542
|
+
statNum: {
|
|
1543
|
+
fontWeight: 800,
|
|
1544
|
+
fontSize: 19
|
|
1545
|
+
},
|
|
1546
|
+
// .result-body
|
|
1547
|
+
body: {
|
|
1548
|
+
background: L.surface,
|
|
1549
|
+
border: `1px solid ${L.border}`,
|
|
1550
|
+
borderTop: "none",
|
|
1551
|
+
borderRadius: "0 0 10px 10px",
|
|
1552
|
+
padding: "24px 28px",
|
|
1553
|
+
boxShadow: "0 2px 8px rgba(0,0,0,0.08)"
|
|
1554
|
+
},
|
|
1555
|
+
// .discrepancy-table
|
|
1556
|
+
table: {
|
|
1557
|
+
width: "100%",
|
|
1558
|
+
borderCollapse: "collapse",
|
|
1559
|
+
fontSize: 15.5
|
|
1560
|
+
},
|
|
1561
|
+
// .discrepancy-table thead th
|
|
1562
|
+
th: {
|
|
1563
|
+
background: "#fafafa",
|
|
1564
|
+
padding: "12px 16px",
|
|
1565
|
+
textAlign: "left",
|
|
1566
|
+
fontWeight: 700,
|
|
1567
|
+
color: L.textSecondary,
|
|
1568
|
+
borderBottom: `2px solid ${L.border}`,
|
|
1569
|
+
fontSize: 14.5
|
|
1570
|
+
},
|
|
1571
|
+
// .discrepancy-table tbody tr
|
|
1572
|
+
tr: {},
|
|
1573
|
+
// .discrepancy-table tbody td
|
|
1574
|
+
td: {
|
|
1575
|
+
padding: "14px 16px",
|
|
1576
|
+
borderBottom: "1px solid #f0f0f0",
|
|
1577
|
+
verticalAlign: "top",
|
|
1578
|
+
lineHeight: 1.6
|
|
1579
|
+
},
|
|
1580
|
+
// .dc-field-name
|
|
1581
|
+
fieldName: {
|
|
1582
|
+
fontWeight: 700,
|
|
1583
|
+
color: L.textPrimary,
|
|
1584
|
+
fontSize: 15.5
|
|
1585
|
+
},
|
|
1586
|
+
// .dc-tab-label
|
|
1587
|
+
tabLabel: {
|
|
1588
|
+
display: "inline-block",
|
|
1589
|
+
padding: "2px 10px",
|
|
1590
|
+
background: "#e6f7ff",
|
|
1591
|
+
color: L.primary,
|
|
1592
|
+
borderRadius: 6,
|
|
1593
|
+
fontSize: 13,
|
|
1594
|
+
marginBottom: 5,
|
|
1595
|
+
fontWeight: 500
|
|
1596
|
+
},
|
|
1597
|
+
// .dc-type-tag
|
|
1598
|
+
typeTag: {
|
|
1599
|
+
display: "inline-block",
|
|
1600
|
+
padding: "3px 12px",
|
|
1601
|
+
borderRadius: 6,
|
|
1602
|
+
fontSize: 13.5,
|
|
1603
|
+
fontWeight: 600
|
|
1604
|
+
},
|
|
1605
|
+
// .dc-type-tag.type-error
|
|
1606
|
+
typeTagError: {
|
|
1607
|
+
background: "#fff1f0",
|
|
1608
|
+
color: L.error
|
|
1609
|
+
},
|
|
1610
|
+
// .dc-type-tag.type-warning
|
|
1611
|
+
typeTagWarning: {
|
|
1612
|
+
background: "#fffbe6",
|
|
1613
|
+
color: "#d48806"
|
|
1614
|
+
},
|
|
1615
|
+
// .dc-value-row
|
|
1616
|
+
valueRow: {
|
|
1617
|
+
display: "flex",
|
|
1618
|
+
gap: 18,
|
|
1619
|
+
marginTop: 5,
|
|
1620
|
+
flexWrap: "wrap"
|
|
1621
|
+
},
|
|
1622
|
+
// .dc-wrong-value
|
|
1623
|
+
wrongValue: {
|
|
1624
|
+
color: L.error,
|
|
1625
|
+
textDecoration: "line-through"
|
|
1626
|
+
},
|
|
1627
|
+
// .dc-correct-value
|
|
1628
|
+
correctValue: {
|
|
1629
|
+
color: L.success,
|
|
1630
|
+
fontWeight: 700
|
|
1631
|
+
},
|
|
1632
|
+
// .dc-status-icon
|
|
1633
|
+
statusIcon: {
|
|
1634
|
+
fontSize: 18
|
|
1635
|
+
},
|
|
1636
|
+
// explanation 说明(原型行内:13px 浅灰)
|
|
1637
|
+
explanation: {
|
|
1638
|
+
fontSize: 13,
|
|
1639
|
+
color: L.textDisabled,
|
|
1640
|
+
marginTop: 5,
|
|
1641
|
+
lineHeight: 1.5
|
|
1642
|
+
},
|
|
1643
|
+
// 命中时学员备注(原型行内:蓝色)
|
|
1644
|
+
studentReason: {
|
|
1645
|
+
fontSize: 13,
|
|
1646
|
+
color: L.primary,
|
|
1647
|
+
marginTop: 3
|
|
1648
|
+
},
|
|
1649
|
+
// 误标行学员备注(原型行内:浅灰)
|
|
1650
|
+
falseMarkReason: {
|
|
1651
|
+
fontSize: 13,
|
|
1652
|
+
color: L.textDisabled,
|
|
1653
|
+
marginTop: 3
|
|
1654
|
+
}
|
|
1655
|
+
}, ft = ({ initData: t, runtimeRules: l, onFinish: a }) => {
|
|
1656
|
+
var fe, pe, ue;
|
|
1657
|
+
const { currentCase: n } = We(), r = $e((o) => o.filledData), s = t ?? {}, T = l ?? {}, k = n || {}, S = G(
|
|
1658
|
+
(o) => He(o, k, r),
|
|
1659
|
+
[k, r]
|
|
1660
|
+
), h = W(() => T.referenceAnswers || [], [T.referenceAnswers]), w = W(() => {
|
|
1661
|
+
const o = s.documents || [], m = /* @__PURE__ */ new Map();
|
|
1662
|
+
return h.forEach((f) => {
|
|
1663
|
+
f.displayValue != null && f.displayValue !== "" && m.set(f.fieldName, f.displayValue);
|
|
1664
|
+
}), o.map((f) => ({
|
|
1665
|
+
...f,
|
|
1666
|
+
documentType: S(f.documentType || ""),
|
|
1667
|
+
docNo: f.docNo ? S(f.docNo) : void 0,
|
|
1668
|
+
subtitle: f.subtitle ? S(f.subtitle) : void 0,
|
|
1669
|
+
fields: (f.fields || []).map((u) => {
|
|
1670
|
+
const _ = m.get(u.name), J = _ ?? u.value;
|
|
1671
|
+
return {
|
|
1672
|
+
...u,
|
|
1673
|
+
label: typeof u.label == "string" ? S(u.label) : u.label,
|
|
1674
|
+
value: typeof J == "string" ? S(J) : J,
|
|
1675
|
+
hint: typeof u.hint == "string" ? S(u.hint) : u.hint
|
|
1676
|
+
};
|
|
1677
|
+
})
|
|
1678
|
+
}));
|
|
1679
|
+
}, [s.documents, h, S]), B = W(() => s.errorTypes || [], [s.errorTypes]), i = T.scoring, c = ((fe = s.uiConfig) == null ? void 0 : fe.showExpectedCount) ?? !0, [p, y] = E(/* @__PURE__ */ new Map()), [x, Q] = E(!1), [U, ee] = E(null), [z, D] = E(!1), [q, K] = E(/* @__PURE__ */ new Set()), [N, g] = E(null), [H, $] = E(!1), [O, le] = E(0), ie = ne(null), V = W(() => {
|
|
1680
|
+
const o = /* @__PURE__ */ new Map();
|
|
1681
|
+
return w.forEach((m, f) => {
|
|
1682
|
+
m.fields.forEach((u) => {
|
|
1683
|
+
o.has(u.name) || o.set(u.name, { label: u.label, docName: m.documentType, value: u.value, docIndex: f });
|
|
1684
|
+
});
|
|
1685
|
+
}), o;
|
|
1686
|
+
}, [w]), he = W(() => {
|
|
1687
|
+
const o = {};
|
|
1688
|
+
return h.forEach((m) => {
|
|
1689
|
+
var u;
|
|
1690
|
+
const f = (u = V.get(m.fieldName)) == null ? void 0 : u.docIndex;
|
|
1691
|
+
f !== void 0 && (o[f] = (o[f] || 0) + 1);
|
|
1692
|
+
}), o;
|
|
1693
|
+
}, [h, V]), xe = W(() => {
|
|
1694
|
+
const o = [];
|
|
1695
|
+
return p.forEach((m, f) => {
|
|
1696
|
+
const u = V.get(f);
|
|
1697
|
+
o.push({
|
|
1698
|
+
fieldName: f,
|
|
1699
|
+
fieldLabel: (u == null ? void 0 : u.label) ?? f,
|
|
1700
|
+
docName: (u == null ? void 0 : u.docName) ?? "",
|
|
1701
|
+
typeId: m.typeId,
|
|
1702
|
+
reason: m.reason
|
|
1703
|
+
});
|
|
1704
|
+
}), o;
|
|
1705
|
+
}, [p, V]), ge = G(
|
|
1706
|
+
(o, m) => {
|
|
1707
|
+
if (!x) {
|
|
1708
|
+
if (z) {
|
|
1709
|
+
K((f) => {
|
|
1710
|
+
const u = new Set(f);
|
|
1711
|
+
return u.has(m.name) ? u.delete(m.name) : u.add(m.name), u;
|
|
1712
|
+
});
|
|
1713
|
+
return;
|
|
1714
|
+
}
|
|
1715
|
+
g({ docIndex: o, field: m, existing: p.get(m.name) });
|
|
1716
|
+
}
|
|
1717
|
+
},
|
|
1718
|
+
[x, z, p]
|
|
1719
|
+
), be = G(
|
|
1720
|
+
(o, m) => {
|
|
1721
|
+
if (!N) return;
|
|
1722
|
+
const f = N.field.name;
|
|
1723
|
+
y((u) => {
|
|
1724
|
+
const _ = new Map(u);
|
|
1725
|
+
return _.set(f, { typeId: o, reason: m || void 0 }), _;
|
|
1726
|
+
}), g(null);
|
|
1727
|
+
},
|
|
1728
|
+
[N]
|
|
1729
|
+
), ye = G(() => {
|
|
1730
|
+
if (!N) return;
|
|
1731
|
+
const o = N.field.name;
|
|
1732
|
+
y((m) => {
|
|
1733
|
+
const f = new Map(m);
|
|
1734
|
+
return f.delete(o), f;
|
|
1735
|
+
}), g(null);
|
|
1736
|
+
}, [N]), ve = G((o) => {
|
|
1737
|
+
var m;
|
|
1738
|
+
(m = ie.current) == null || m.locate(o);
|
|
1739
|
+
}, []), je = G(
|
|
1740
|
+
(o) => {
|
|
1741
|
+
var _;
|
|
1742
|
+
if (x) return;
|
|
1743
|
+
const m = V.get(o);
|
|
1744
|
+
if (m === void 0) return;
|
|
1745
|
+
(_ = ie.current) == null || _.locate(o);
|
|
1746
|
+
const f = w[m.docIndex], u = f == null ? void 0 : f.fields.find((J) => J.name === o);
|
|
1747
|
+
u && g({ docIndex: m.docIndex, field: u, existing: p.get(o) });
|
|
1748
|
+
},
|
|
1749
|
+
[x, V, w, p]
|
|
1750
|
+
), ke = G(
|
|
1751
|
+
(o) => {
|
|
1752
|
+
x || re.confirm({
|
|
1753
|
+
title: "删除标记",
|
|
1754
|
+
content: "确定要删除这条标记吗?",
|
|
1755
|
+
okText: "删除",
|
|
1756
|
+
okType: "danger",
|
|
1757
|
+
cancelText: "取消",
|
|
1758
|
+
onOk: () => {
|
|
1759
|
+
y((m) => {
|
|
1760
|
+
const f = new Map(m);
|
|
1761
|
+
return f.delete(o), f;
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1764
|
+
});
|
|
1765
|
+
},
|
|
1766
|
+
[x]
|
|
1767
|
+
), Se = G(() => {
|
|
1768
|
+
x || p.size === 0 && q.size === 0 || re.confirm({
|
|
1769
|
+
title: "清除标注",
|
|
1770
|
+
content: "确定要清除全部标记与高亮吗?此操作不可撤销。",
|
|
1771
|
+
okText: "清除",
|
|
1772
|
+
okType: "danger",
|
|
1773
|
+
cancelText: "取消",
|
|
1774
|
+
onOk: () => {
|
|
1775
|
+
y(/* @__PURE__ */ new Map()), K(/* @__PURE__ */ new Set());
|
|
1776
|
+
}
|
|
1777
|
+
});
|
|
1778
|
+
}, [x, p.size, q.size]), ce = G(
|
|
1779
|
+
(o) => {
|
|
1780
|
+
const m = (I) => {
|
|
1781
|
+
var v;
|
|
1782
|
+
return ((v = B.find((X) => X.id === I)) == null ? void 0 : v.label) ?? I;
|
|
1783
|
+
}, f = h.map((I) => {
|
|
1784
|
+
var v, X;
|
|
1785
|
+
return {
|
|
1786
|
+
label: `${((v = V.get(I.fieldName)) == null ? void 0 : v.label) ?? I.fieldName}(${((X = V.get(I.fieldName)) == null ? void 0 : X.docName) ?? ""}·${m(I.typeId)})`,
|
|
1787
|
+
value: `应为:${I.correctValue ?? "—"};${I.explanation}`
|
|
1788
|
+
};
|
|
1789
|
+
}), u = [
|
|
1790
|
+
{ label: "审核得分", value: String(o.score) },
|
|
1791
|
+
{ label: "命中", value: `${o.found} 处` },
|
|
1792
|
+
{ label: "遗漏", value: `${o.missed} 处` },
|
|
1793
|
+
{ label: "误标", value: `${o.wrong} 处` }
|
|
1794
|
+
], _ = o.perAnswer.filter((I) => !I.hit).map((I) => {
|
|
1795
|
+
const v = V.get(I.fieldName), X = h.find((Ne) => Ne.fieldName === I.fieldName);
|
|
1796
|
+
return `遗漏:${(v == null ? void 0 : v.docName) ?? ""}·${(v == null ? void 0 : v.label) ?? I.fieldName} — ${(X == null ? void 0 : X.explanation) ?? ""}`;
|
|
1797
|
+
}), J = o.missed === 0, Te = h.length === 0 ? "无预设不符点" : J ? "全部预设不符点已识别" : `仍有 ${o.missed} 处预设不符点未识别`, Be = Re({
|
|
1798
|
+
sourceStepId: s.stepId || "unknown",
|
|
1799
|
+
sourceStepName: s.stepName || "单据审核",
|
|
1800
|
+
sourceType: "document-review",
|
|
1801
|
+
title: "单据审核结果",
|
|
1802
|
+
summary: `单据共预设 ${h.length} 处不符点;学员命中 ${o.found} 处、遗漏 ${o.missed} 处、误标 ${o.wrong} 处,得分 ${o.score}。`,
|
|
1803
|
+
keyFacts: [...u, ...f],
|
|
1804
|
+
riskFlags: _,
|
|
1805
|
+
conclusion: Te
|
|
1806
|
+
}), ze = o.perAnswer.filter((I) => I.hit).map((I) => {
|
|
1807
|
+
const v = V.get(I.fieldName);
|
|
1808
|
+
return `命中:${(v == null ? void 0 : v.docName) ?? ""}·${(v == null ? void 0 : v.label) ?? I.fieldName}`;
|
|
1809
|
+
}), Me = [
|
|
1810
|
+
..._,
|
|
1811
|
+
...o.falseMarks.map((I) => {
|
|
1812
|
+
const v = V.get(I);
|
|
1813
|
+
return `误标:${(v == null ? void 0 : v.docName) ?? ""}·${(v == null ? void 0 : v.label) ?? I}(该项无预设不符点)`;
|
|
1814
|
+
})
|
|
1815
|
+
], Ee = {
|
|
1816
|
+
totalScore: o.score,
|
|
1817
|
+
pass: o.score >= 60,
|
|
1818
|
+
dimensions: [
|
|
1819
|
+
{
|
|
1820
|
+
name: "不符点识别",
|
|
1821
|
+
score: o.score,
|
|
1822
|
+
feedback: `识别 ${o.found}/共 ${h.length} 处,误标 ${o.wrong} 处`,
|
|
1823
|
+
errors: [],
|
|
1824
|
+
suggestions: []
|
|
1825
|
+
}
|
|
1826
|
+
],
|
|
1827
|
+
highlights: ze,
|
|
1828
|
+
improvements: Me,
|
|
1829
|
+
nextStepAdvice: ""
|
|
1830
|
+
};
|
|
1831
|
+
return {
|
|
1832
|
+
stepId: s.stepId || "unknown",
|
|
1833
|
+
operationType: "document-review",
|
|
1834
|
+
operationData: {
|
|
1835
|
+
marks: Array.from(p.entries()).map(([I, v]) => ({ fieldName: I, ...v })),
|
|
1836
|
+
scoreResult: o
|
|
1837
|
+
},
|
|
1838
|
+
operationLog: [
|
|
1839
|
+
{
|
|
1840
|
+
action: "document-review-submit",
|
|
1841
|
+
markedCount: p.size,
|
|
1842
|
+
score: o.score,
|
|
1843
|
+
found: o.found,
|
|
1844
|
+
missed: o.missed,
|
|
1845
|
+
wrong: o.wrong,
|
|
1846
|
+
timestamp: Date.now()
|
|
1847
|
+
}
|
|
1848
|
+
],
|
|
1849
|
+
timestamp: Date.now(),
|
|
1850
|
+
evidenceSummary: Be,
|
|
1851
|
+
preComputedEvaluation: Ee
|
|
1852
|
+
};
|
|
1853
|
+
},
|
|
1854
|
+
[h, V, B, p, s.stepId, s.stepName, a]
|
|
1855
|
+
), we = G(() => {
|
|
1856
|
+
if (!x) {
|
|
1857
|
+
if (p.size === 0) {
|
|
1858
|
+
re.warning({
|
|
1859
|
+
title: "尚未标记",
|
|
1860
|
+
content: "您尚未标记任何不符点,请至少标记一处后再提交。",
|
|
1861
|
+
okText: "我知道了"
|
|
1862
|
+
});
|
|
1863
|
+
return;
|
|
1864
|
+
}
|
|
1865
|
+
re.confirm({
|
|
1866
|
+
title: "提交审核",
|
|
1867
|
+
content: `确定提交吗?您已标记 ${p.size} 处不符点。提交后将展示参考不符点清单与评分结果。`,
|
|
1868
|
+
okText: "提交",
|
|
1869
|
+
cancelText: "再检查一下",
|
|
1870
|
+
onOk: () => {
|
|
1871
|
+
const o = Array.from(p.entries()).map(([f, u]) => ({
|
|
1872
|
+
fieldName: f,
|
|
1873
|
+
typeId: u.typeId
|
|
1874
|
+
})), m = De(h, o, i);
|
|
1875
|
+
ee(m), Q(!0), a(ce(m));
|
|
1876
|
+
}
|
|
1877
|
+
});
|
|
1878
|
+
}
|
|
1879
|
+
}, [x, p, h, i, a, ce]), Ie = ((pe = w[O]) == null ? void 0 : pe.documentType) ?? ((ue = w[0]) == null ? void 0 : ue.documentType) ?? "", Ce = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1880
|
+
/* @__PURE__ */ e.jsx(
|
|
1881
|
+
Oe,
|
|
1882
|
+
{
|
|
1883
|
+
markedCount: p.size,
|
|
1884
|
+
highlightActive: z,
|
|
1885
|
+
onToggleHighlight: () => D((o) => !o),
|
|
1886
|
+
onClearMarks: Se,
|
|
1887
|
+
onSubmit: we,
|
|
1888
|
+
submitted: x
|
|
1889
|
+
}
|
|
1890
|
+
),
|
|
1891
|
+
/* @__PURE__ */ e.jsx(
|
|
1892
|
+
me,
|
|
1893
|
+
{
|
|
1894
|
+
ref: ie,
|
|
1895
|
+
documents: w,
|
|
1896
|
+
markedFields: p,
|
|
1897
|
+
onFieldClick: ge,
|
|
1898
|
+
onTabChange: le,
|
|
1899
|
+
showExpectedCount: c,
|
|
1900
|
+
expectedCountByDoc: he,
|
|
1901
|
+
resultMode: x,
|
|
1902
|
+
scoreResult: U ?? void 0,
|
|
1903
|
+
answers: h,
|
|
1904
|
+
highlightedFields: q
|
|
1905
|
+
}
|
|
1906
|
+
),
|
|
1907
|
+
x && U && /* @__PURE__ */ e.jsx(
|
|
1908
|
+
lt,
|
|
1909
|
+
{
|
|
1910
|
+
scoreResult: U,
|
|
1911
|
+
answers: h,
|
|
1912
|
+
documents: w,
|
|
1913
|
+
errorTypes: B,
|
|
1914
|
+
marks: p
|
|
1915
|
+
}
|
|
1916
|
+
),
|
|
1917
|
+
/* @__PURE__ */ e.jsx(
|
|
1918
|
+
Ve,
|
|
1919
|
+
{
|
|
1920
|
+
documentCount: w.length,
|
|
1921
|
+
currentDocName: Ie,
|
|
1922
|
+
expectedTotal: h.length,
|
|
1923
|
+
showExpectedCount: c
|
|
1924
|
+
}
|
|
1925
|
+
)
|
|
1926
|
+
] }), se = N == null ? void 0 : N.field;
|
|
1927
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1928
|
+
/* @__PURE__ */ e.jsx(
|
|
1929
|
+
Ae,
|
|
1930
|
+
{
|
|
1931
|
+
center: Ce,
|
|
1932
|
+
right: /* @__PURE__ */ e.jsx(
|
|
1933
|
+
ot,
|
|
1934
|
+
{
|
|
1935
|
+
marks: xe,
|
|
1936
|
+
errorTypes: B,
|
|
1937
|
+
collapsed: H,
|
|
1938
|
+
onToggleCollapsed: () => $((o) => !o),
|
|
1939
|
+
submitted: x,
|
|
1940
|
+
scoreResult: U ?? void 0,
|
|
1941
|
+
onLocate: ve,
|
|
1942
|
+
onEdit: je,
|
|
1943
|
+
onDelete: ke,
|
|
1944
|
+
showExpectedCount: c,
|
|
1945
|
+
expectedTotal: h.length
|
|
1946
|
+
}
|
|
1947
|
+
)
|
|
1948
|
+
}
|
|
1949
|
+
),
|
|
1950
|
+
se && /* @__PURE__ */ e.jsx(
|
|
1951
|
+
rt,
|
|
1952
|
+
{
|
|
1953
|
+
open: !!N,
|
|
1954
|
+
fieldLabel: se.label,
|
|
1955
|
+
fieldValue: se.value,
|
|
1956
|
+
errorTypes: B,
|
|
1957
|
+
existing: N == null ? void 0 : N.existing,
|
|
1958
|
+
onConfirm: be,
|
|
1959
|
+
onRemove: N != null && N.existing ? ye : void 0,
|
|
1960
|
+
onCancel: () => g(null)
|
|
1961
|
+
}
|
|
1962
|
+
)
|
|
1963
|
+
] });
|
|
1964
|
+
};
|
|
1965
|
+
export {
|
|
1966
|
+
ft as default
|
|
1967
|
+
};
|