@guodun/antdv 1.2.5 → 1.3.1
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/dist/es/components/contract-signing-location/index.mjs +11 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocation.mjs +5 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +551 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.mjs +5 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +612 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationInspector.mjs +5 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationInspector.vue.mjs +228 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationNavigator.mjs +5 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationNavigator.vue.mjs +71 -0
- package/dist/es/components/contract-signing-location/src/constants.mjs +42 -0
- package/dist/es/components/contract-signing-location/src/coordinates.mjs +182 -0
- package/dist/es/components/contract-signing-location/src/icons.mjs +114 -0
- package/dist/es/components/contract-signing-location/src/location-rules.mjs +296 -0
- package/dist/es/components/contract-signing-location/src/page-layout.mjs +115 -0
- package/dist/es/components/contract-signing-location/src/preview-requests.mjs +25 -0
- package/dist/es/components/contract-signing-location/src/style/index.mjs +1 -0
- package/dist/es/components/contract-signing-location/src/types.mjs +0 -0
- package/dist/es/components/contract-signing-location/style/index.css +1 -0
- package/dist/es/components/contract-signing-location/style/index.mjs +1 -0
- package/dist/es/components/index.mjs +12 -0
- package/dist/es/components/pro-contract-signing-flow/index.mjs +9 -0
- package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.mjs +5 -0
- package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.vue.mjs +74 -0
- package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.mjs +5 -0
- package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.vue.mjs +338 -0
- package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.mjs +5 -0
- package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.vue.mjs +115 -0
- package/dist/es/components/pro-contract-signing-flow/src/ProContractSigningFlow.mjs +5 -0
- package/dist/es/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.mjs +152 -0
- package/dist/es/components/pro-contract-signing-flow/src/composables/use-contract-signing-flow.mjs +365 -0
- package/dist/es/components/pro-contract-signing-flow/src/constants.mjs +48 -0
- package/dist/es/components/pro-contract-signing-flow/src/types.mjs +0 -0
- package/dist/es/components/pro-contract-signing-flow/style/index.css +1 -0
- package/dist/es/components/pro-contract-signing-flow/style/index.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/index.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +43 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.vue.mjs +42 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.mjs +88 -78
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.vue.mjs +169 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererToolbar.vue.mjs +18 -7
- package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +522 -318
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +2440 -1166
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +320 -198
- package/dist/es/components/pro-contract-template-designer/src/SigningPlacementInspector.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.mjs +142 -0
- package/dist/es/components/pro-contract-template-designer/src/SigningPlacementLayer.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.mjs +134 -0
- package/dist/es/components/pro-contract-template-designer/src/TableContextMenu.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/TableContextMenu.vue.mjs +189 -0
- package/dist/es/components/pro-contract-template-designer/src/TableSizePicker.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/TableSizePicker.vue.mjs +117 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-fit-width-zoom.mjs +33 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +334 -322
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-draft-cache.mjs +1 -1
- package/dist/es/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.mjs +7 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.vue.mjs +213 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.vue_vue_type_style_index_0_scoped_8082f8b4_lang.css +1 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/editor-extensions.mjs +62 -27
- package/dist/es/components/pro-contract-template-designer/src/extensions/office-content.mjs +241 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/template-variable.mjs +56 -119
- package/dist/es/components/pro-contract-template-designer/src/extensions/word-paste.mjs +145 -0
- package/dist/es/components/pro-contract-template-designer/src/types.mjs +13 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/content-image.mjs +171 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/context-variable.mjs +17 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/html.mjs +59 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/image-url.mjs +44 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/signing-placement.mjs +292 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +124 -167
- package/dist/es/components/pro-contract-template-designer/src/utils/template-tool-icons.mjs +28 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/template-variable-render.mjs +1 -1
- package/dist/es/components/pro-contract-template-designer/src/utils/word-paste.mjs +737 -0
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/index.mjs +75 -63
- package/dist/lib/components/contract-signing-location/index.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationInspector.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationInspector.vue.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationNavigator.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationNavigator.vue.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/constants.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/coordinates.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/icons.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/location-rules.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/page-layout.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/preview-requests.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/style/index.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/types.cjs +0 -0
- package/dist/lib/components/contract-signing-location/style/index.cjs +1 -0
- package/dist/lib/components/contract-signing-location/style/index.css +1 -0
- package/dist/lib/components/index.cjs +1 -1
- package/dist/lib/components/pro-contract-signing-flow/index.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ProContractSigningFlow.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/composables/use-contract-signing-flow.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/constants.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/types.cjs +0 -0
- package/dist/lib/components/pro-contract-signing-flow/style/index.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/style/index.css +1 -0
- package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererToolbar.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementInspector.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementLayer.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/TableContextMenu.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/TableContextMenu.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/TableSizePicker.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/TableSizePicker.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-fit-width-zoom.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-draft-cache.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.vue_vue_type_style_index_0_scoped_8082f8b4_lang.css +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/editor-extensions.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/office-content.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/template-variable.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/word-paste.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/types.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/content-image.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/context-variable.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/html.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/image-url.cjs +2 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/signing-placement.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +3 -3
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-tool-icons.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-variable-render.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/word-paste.cjs +3 -0
- package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/theme/contract-signing-location.css +1 -0
- package/dist/theme/icon.css +1 -1
- package/dist/theme/index.css +1 -1
- package/dist/theme/pro-contract-signing-flow.css +1 -0
- package/dist/types/components/contract-signing-location/index.d.ts +9 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +134 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.d.ts +49 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningLocationInspector.vue.d.ts +32 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningLocationNavigator.vue.d.ts +13 -0
- package/dist/types/components/contract-signing-location/src/constants.d.ts +40 -0
- package/dist/types/components/contract-signing-location/src/coordinates.d.ts +59 -0
- package/dist/types/components/contract-signing-location/src/icons.d.ts +12 -0
- package/dist/types/components/contract-signing-location/src/location-rules.d.ts +50 -0
- package/dist/types/components/contract-signing-location/src/page-layout.d.ts +49 -0
- package/dist/types/components/contract-signing-location/src/preview-requests.d.ts +8 -0
- package/dist/types/components/contract-signing-location/src/types.d.ts +223 -0
- package/dist/types/{antdv/src/components → components}/hooks/use-basic-app-config.d.ts +2 -2
- package/dist/types/{antdv/src/components → components}/index.d.ts +2 -0
- package/dist/types/components/pro-contract-signing-flow/index.d.ts +7 -0
- package/dist/types/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.vue.d.ts +42 -0
- package/dist/types/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.vue.d.ts +15 -0
- package/dist/types/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.vue.d.ts +19 -0
- package/dist/types/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.d.ts +59 -0
- package/dist/types/components/pro-contract-signing-flow/src/composables/use-contract-signing-flow.d.ts +217 -0
- package/dist/types/components/pro-contract-signing-flow/src/constants.d.ts +26 -0
- package/dist/types/components/pro-contract-signing-flow/src/types.d.ts +124 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/ContractTemplateAgentContext.vue.d.ts +1 -1
- package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/ContractTemplateAgentPanel.vue.d.ts +5 -5
- package/dist/types/components/pro-contract-template-agent/src/ContractTemplateAgentPreview.vue.d.ts +11 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/ProContractTemplateAgentWorkbench.vue.d.ts +1 -1
- package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/composables/use-contract-template-agent.d.ts +11 -11
- package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/types.d.ts +39 -2
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/index.d.ts +2 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.d.ts +9 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.vue.d.ts +7 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.vue.d.ts +71 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/ContractTemplateRendererToolbar.vue.d.ts +14 -3
- package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +197 -0
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +120 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.d.ts +11 -3
- package/dist/types/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.d.ts +17 -0
- package/dist/types/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.d.ts +19 -0
- package/dist/types/components/pro-contract-template-designer/src/TableContextMenu.vue.d.ts +22 -0
- package/dist/types/components/pro-contract-template-designer/src/TableSizePicker.vue.d.ts +23 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-fit-width-zoom.d.ts +28 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +139 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-draft-cache.d.ts +83 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/constants.d.ts +49 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.vue.d.ts +5 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/editor-extensions.d.ts +16 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/extensions/font-size.d.ts +6 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/office-content.d.ts +11 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/extensions/template-variable.d.ts +17 -2
- package/dist/types/components/pro-contract-template-designer/src/extensions/word-paste.d.ts +25 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/types.d.ts +253 -23
- package/dist/types/components/pro-contract-template-designer/src/utils/content-image.d.ts +80 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/context-variable.d.ts +37 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/html.d.ts +74 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/image-url.d.ts +6 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/signing-placement.d.ts +105 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/utils/template-renderer.d.ts +15 -1
- package/dist/types/components/pro-contract-template-designer/src/utils/template-tool-icons.d.ts +12 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/utils/template-variable-render.d.ts +39 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/word-paste.d.ts +45 -0
- package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioArrayInput.vue.d.ts +3 -3
- package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioArraySubForm.vue.d.ts +3 -3
- package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioKV.vue.d.ts +3 -3
- package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioSubForm.vue.d.ts +9 -9
- package/dist/types/{antdv/src/components → components}/pro-selector/src/pro-user.d.ts +3 -3
- package/dist/types/{antdv/src/components → components}/pro-selector-group/src/hooks/useApi.d.ts +1 -1
- package/global.d.ts +2 -0
- package/package.json +13 -8
- package/dist/types/antdv/src/components/pro-contract-template-agent/src/ContractTemplateAgentPreview.vue.d.ts +0 -11
- package/dist/types/antdv/src/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +0 -79
- package/dist/types/antdv/src/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +0 -57
- package/dist/types/antdv/src/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +0 -41
- package/dist/types/antdv/src/components/pro-contract-template-designer/src/composables/use-template-draft-cache.d.ts +0 -39
- package/dist/types/antdv/src/components/pro-contract-template-designer/src/extensions/editor-extensions.d.ts +0 -9
- package/dist/types/antdv/src/components/pro-contract-template-designer/src/extensions/template-field.d.ts +0 -5
- /package/dist/types/{antdv/src/components → components}/collapse-transtion/hooks/use-collapse-transtion.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/collapse-transtion/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/collapse-transtion/src/collapse-transtion.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/collapse-transtion/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/cover-scroll-bar/hooks/use-has-scroll.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/cover-scroll-bar/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/cover-scroll-bar/src/cover-scroll-bar.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/cover-scroll-bar/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/dept-selector/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/dept-selector/src/dept.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/dept-selector/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/hooks/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/icon/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/icon/src/icon.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/icon/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/plus-upload/apis/plus-upload.api.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/plus-upload/hook/useExtractPlusUpload.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/plus-upload/hook/usePlusUpload.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/plus-upload/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/plus-upload/src/plus-upload.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/plus-upload/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-area/apis/pro-area.api.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-area/hooks/use-pro-area.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-area/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-area/src/ProArea.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-area/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-cell/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-cell/src/index.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-cell/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-cell-group/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-cell-group/src/index.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-cell-group/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/composables/use-contract-template-agent-split.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/composables/use-contract-template-agent-workbench.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/utils/contract-template-agent-adapter.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/ContractTemplateRendererField.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-drawer/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-drawer/src/index.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-drawer/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-dynamic-tags/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-dynamic-tags/src/index.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-dynamic-tags/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/index.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioDatePicker.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioInput.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioInputNumber.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioKeyValue.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioSelect.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioSwitch.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioTextarea.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioTimePicker.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/utils.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/v-model-utils.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-loading/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-loading/src/pro-loading.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-loading/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-menu-tree/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-menu-tree/src/hooks.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-menu-tree/src/pro-menu-tree.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-menu-tree/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-modal/hooks/useProModal.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-modal/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-modal/src/Modal.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-modal/src/ProModal.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-modal/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-overlay/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-overlay/src/pro-overlay.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-picker/apis/pro-picker.api.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-picker/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-picker/src/ProPicker.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-picker/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/src/components/org-tree.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/src/components/user.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/src/hooks/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/src/hooks/useUserSelector.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/src/util.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/src/utils/orgTree.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/dept-tree.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/dept.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/role.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/select-box.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/user.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/index.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/utils/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-signature/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-signature/src/ProSignature.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-signature/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/hooks/use-pro-table.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/constants.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/field/field-date-range/field-date-range.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/field/field-input/field-input.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/field/field-radio/field-radio.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/field/field-select/field-select.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/field/field.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/form-render.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/hooks/use-form.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/hooks/use-table.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/pro-table.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/utils.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-tag/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-tag/src/ProTag.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-tag/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-tag-group/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-tag-group/src/ProTagGroup.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-tag-group/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-title/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-title/src/ProTitle.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-title/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/data.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/file-list.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/gd-upload.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/hooks/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/hooks/resType.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/hooks/useHttp.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/hooks/useUpload.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/props.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/utils/emitter.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/utils/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-user-avatar/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-user-avatar/src/index.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-user-avatar/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-user-avatar/src/util.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/role-selector/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/role-selector/src/role.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/role-selector/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/scale-virtual-list/component/scale-virtual-list.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/scale-virtual-list/component/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/scale-virtual-list/hooks/useVirtualList.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/scale-virtual-list/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/scroll-bar/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/scroll-bar/src/scroll-bar.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/scroll-bar/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/utils/install.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/utils/tool.d.ts +0 -0
- /package/dist/types/{antdv/src/extract.d.ts → extract.d.ts} +0 -0
- /package/dist/types/{antdv/src/hooks → hooks}/index.d.ts +0 -0
- /package/dist/types/{antdv/src/hooks → hooks}/setup-theme.d.ts +0 -0
- /package/dist/types/{antdv/src/hooks → hooks}/use-namespace/index.d.ts +0 -0
- /package/dist/types/{antdv/src/hooks → hooks}/useModelValue.d.ts +0 -0
- /package/dist/types/{antdv/src/hooks → hooks}/useProForm.d.ts +0 -0
- /package/dist/types/{antdv/src/index.d.ts → index.d.ts} +0 -0
package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs
CHANGED
|
@@ -1,60 +1,142 @@
|
|
|
1
|
-
import e from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
2
|
-
import t from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
3
|
-
import n from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
4
|
-
import r from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
5
|
-
import i from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
6
|
-
import a from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
7
|
-
import o from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
8
|
-
import ee from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
9
|
-
import te from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
10
|
-
import ne from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
11
|
-
import re from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
12
|
-
import ie from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
13
|
-
import ae from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
14
|
-
import oe from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
15
|
-
import se from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
16
|
-
import ce from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
17
|
-
import le from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
18
|
-
import ue from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
19
|
-
import de from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
20
|
-
import fe from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
21
|
-
import pe from "../../../node_modules/@ant-design/icons-vue/es/icons/
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
1
|
+
import e from "../../../node_modules/@ant-design/icons-vue/es/icons/AlignCenterOutlined.mjs";
|
|
2
|
+
import t from "../../../node_modules/@ant-design/icons-vue/es/icons/AlignLeftOutlined.mjs";
|
|
3
|
+
import n from "../../../node_modules/@ant-design/icons-vue/es/icons/AlignRightOutlined.mjs";
|
|
4
|
+
import r from "../../../node_modules/@ant-design/icons-vue/es/icons/AuditOutlined.mjs";
|
|
5
|
+
import i from "../../../node_modules/@ant-design/icons-vue/es/icons/BoldOutlined.mjs";
|
|
6
|
+
import a from "../../../node_modules/@ant-design/icons-vue/es/icons/ClearOutlined.mjs";
|
|
7
|
+
import o from "../../../node_modules/@ant-design/icons-vue/es/icons/ColumnWidthOutlined.mjs";
|
|
8
|
+
import ee from "../../../node_modules/@ant-design/icons-vue/es/icons/CopyOutlined.mjs";
|
|
9
|
+
import te from "../../../node_modules/@ant-design/icons-vue/es/icons/DatabaseOutlined.mjs";
|
|
10
|
+
import ne from "../../../node_modules/@ant-design/icons-vue/es/icons/DeleteOutlined.mjs";
|
|
11
|
+
import re from "../../../node_modules/@ant-design/icons-vue/es/icons/DownOutlined.mjs";
|
|
12
|
+
import ie from "../../../node_modules/@ant-design/icons-vue/es/icons/EllipsisOutlined.mjs";
|
|
13
|
+
import ae from "../../../node_modules/@ant-design/icons-vue/es/icons/EyeOutlined.mjs";
|
|
14
|
+
import oe from "../../../node_modules/@ant-design/icons-vue/es/icons/FileAddOutlined.mjs";
|
|
15
|
+
import se from "../../../node_modules/@ant-design/icons-vue/es/icons/FormatPainterOutlined.mjs";
|
|
16
|
+
import ce from "../../../node_modules/@ant-design/icons-vue/es/icons/FullscreenExitOutlined.mjs";
|
|
17
|
+
import le from "../../../node_modules/@ant-design/icons-vue/es/icons/FullscreenOutlined.mjs";
|
|
18
|
+
import ue from "../../../node_modules/@ant-design/icons-vue/es/icons/ItalicOutlined.mjs";
|
|
19
|
+
import de from "../../../node_modules/@ant-design/icons-vue/es/icons/LeftOutlined.mjs";
|
|
20
|
+
import fe from "../../../node_modules/@ant-design/icons-vue/es/icons/MinusOutlined.mjs";
|
|
21
|
+
import pe from "../../../node_modules/@ant-design/icons-vue/es/icons/OrderedListOutlined.mjs";
|
|
22
|
+
import me from "../../../node_modules/@ant-design/icons-vue/es/icons/PictureOutlined.mjs";
|
|
23
|
+
import he from "../../../node_modules/@ant-design/icons-vue/es/icons/PlusOutlined.mjs";
|
|
24
|
+
import ge from "../../../node_modules/@ant-design/icons-vue/es/icons/RedoOutlined.mjs";
|
|
25
|
+
import _e from "../../../node_modules/@ant-design/icons-vue/es/icons/ReloadOutlined.mjs";
|
|
26
|
+
import ve from "../../../node_modules/@ant-design/icons-vue/es/icons/RightOutlined.mjs";
|
|
27
|
+
import ye from "../../../node_modules/@ant-design/icons-vue/es/icons/ScissorOutlined.mjs";
|
|
28
|
+
import be from "../../../node_modules/@ant-design/icons-vue/es/icons/TableOutlined.mjs";
|
|
29
|
+
import xe from "../../../node_modules/@ant-design/icons-vue/es/icons/UnderlineOutlined.mjs";
|
|
30
|
+
import Se from "../../../node_modules/@ant-design/icons-vue/es/icons/UndoOutlined.mjs";
|
|
31
|
+
import Ce from "../../../node_modules/@ant-design/icons-vue/es/icons/UnorderedListOutlined.mjs";
|
|
32
|
+
import we from "../../../node_modules/@ant-design/icons-vue/es/icons/ZoomInOutlined.mjs";
|
|
33
|
+
import Te from "../../../node_modules/@ant-design/icons-vue/es/icons/ZoomOutOutlined.mjs";
|
|
34
|
+
import { useFitWidthZoom as Ee } from "./composables/use-fit-width-zoom.mjs";
|
|
35
|
+
import { CONTRACT_TEXT_STYLE_PRESETS as s, DEFAULT_CONTRACT_FONT_FAMILY as De, DEFAULT_FONT_SIZE_PRESETS as Oe, DEFAULT_TEXT_ALIGN_OPTIONS as ke, resolveFontFamilyOptions as Ae } from "./constants.mjs";
|
|
36
|
+
import { isSafeContractImageUrl as je } from "./utils/image-url.mjs";
|
|
37
|
+
import { MAX_CONTRACT_IMAGE_DIMENSION as Me, normalizeContractImageDimension as Ne, processContractImageFile as Pe } from "./utils/content-image.mjs";
|
|
38
|
+
import { inferContextVariableLabel as Fe, resolveContextVariableWidth as Ie } from "./utils/context-variable.mjs";
|
|
39
|
+
import { isContractTemplateFieldType as Le } from "./types.mjs";
|
|
40
|
+
import { ContractTemplateLocationRuleBuildError as Re, SIGNING_PLACEMENT_MIME as ze, SIGNING_PLACEMENT_TYPE_LABELS as Be, applySigningPlacementPatch as Ve, buildContractLocationRules as He, buildSigningPlacementLocationRules as Ue, canMutateSigningPlacements as We, clampSigningPlacement as Ge, createSigningPlacement as Ke, getSigningPlacementDefaultSize as qe, resolveSigningPlacementToolItems as Je, scaleSigningPlacementToPage as Ye, serializeSigningPlacementDragPayload as Xe } from "./utils/signing-placement.mjs";
|
|
41
|
+
import { DEFAULT_FIELD_STYLE as Ze, DEFAULT_FIELD_TYPES as Qe, DEFAULT_PAGE_SIZE as $e, PAGE_SIZE_OPTIONS as et, buildTemplatePreviewPages as tt, cloneTemplateValue as nt, collectTemplateLocationRuleExportErrors as rt, createBlankPage as it, createBlankTemplate as at, createDefaultPage as ot, createTemplateVariable as st, exportTemplateValue as ct, getFieldOption as lt, getPageSizeOption as ut, normalizeContractTemplateMaxPages as dt, normalizeTemplateValue as ft, resolvePageSize as pt, syncTemplateVariablesWithPages as mt, validateTemplateValue as ht } from "./composables/use-template-designer.mjs";
|
|
42
|
+
import gt from "./DesignerPage.mjs";
|
|
43
|
+
import _t from "./ContractTemplatePreviewPage.mjs";
|
|
44
|
+
import vt from "./TableContextMenu.mjs";
|
|
45
|
+
import yt from "./TableSizePicker.mjs";
|
|
46
|
+
import { DEFAULT_DRAFT_CACHE_INTERVAL as bt, DEFAULT_DRAFT_CACHE_KEY as xt, DEFAULT_DRAFT_CACHE_MAX_BYTES as c, clearTemplateDraftCache as St, createDraftCacheStatus as Ct, formatDraftCacheSavedAt as wt, getBrowserDraftCacheStorage as Tt, isBlankTemplateDraftValue as Et, loadTemplateDraftCache as Dt, saveTemplateDraftCache as Ot } from "./composables/use-template-draft-cache.mjs";
|
|
47
|
+
import kt from "./SigningPlacementInspector.mjs";
|
|
48
|
+
import { resolveFieldTypeIcon as At, resolveSigningPlacementTypeIcon as jt } from "./utils/template-tool-icons.mjs";
|
|
49
|
+
import { Fragment as l, Teleport as Mt, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, nextTick as v, normalizeClass as y, normalizeStyle as Nt, onBeforeUnmount as Pt, onMounted as Ft, openBlock as b, ref as x, renderList as S, resolveDynamicComponent as It, toDisplayString as C, unref as w, vShow as Lt, watch as Rt, withCtx as T, withDirectives as zt, withModifiers as Bt } from "vue";
|
|
50
|
+
import { Alert as Vt, Button as E, Empty as Ht, Input as D, InputNumber as Ut, Modal as Wt, Popover as Gt, Select as O, Switch as Kt, Tag as qt, Tooltip as k } from "ant-design-vue";
|
|
51
|
+
import { useElementSize as Jt } from "@vueuse/core";
|
|
28
52
|
//#region src/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue?vue&type=script&setup=true&lang.ts
|
|
29
|
-
var
|
|
53
|
+
var Yt = ["aria-label", "aria-expanded"], Xt = { class: "gd-contract-template-designer__panel-stack" }, Zt = { class: "gd-contract-template-designer__panel gd-contract-template-designer__panel--navigation" }, Qt = { class: "gd-contract-template-designer__panel-head" }, $t = { class: "gd-contract-template-designer__panel-actions" }, en = ["onClick"], tn = { class: "gd-contract-template-designer__page-nav-actions" }, nn = {
|
|
30
54
|
key: 0,
|
|
31
55
|
class: "gd-contract-template-designer__page-config"
|
|
32
|
-
},
|
|
56
|
+
}, rn = { class: "gd-contract-template-designer__form-row" }, an = { class: "gd-contract-template-designer__page-size-note" }, on = { class: "gd-contract-template-designer__panel gd-contract-template-designer__panel--navigation" }, sn = { class: "gd-contract-template-designer__panel-head" }, cn = ["onClick"], ln = {
|
|
57
|
+
key: 0,
|
|
58
|
+
class: "gd-contract-template-designer__panel gd-contract-template-designer__panel--navigation"
|
|
59
|
+
}, un = { class: "gd-contract-template-designer__panel-head" }, dn = ["onClick"], fn = { class: "gd-contract-template-designer__workspace-header" }, pn = { class: "gd-contract-template-designer__workspace-meta" }, mn = { class: "gd-contract-template-designer__workspace-actions" }, hn = { class: "gd-contract-template-designer__workspace-controls" }, gn = { class: "gd-contract-template-designer__zoom" }, _n = { class: "gd-contract-template-designer__workspace-buttons" }, vn = { class: "gd-contract-template-designer__toolbar" }, yn = { class: "gd-contract-template-designer__toolbar-group" }, bn = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--style" }, xn = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--format" }, Sn = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--insert" }, Cn = { class: "gd-contract-template-designer__popover gd-contract-template-designer__control-insert-popover" }, wn = { class: "gd-contract-template-designer__text-menu-control-options" }, Tn = ["aria-label", "onClick"], En = { class: "gd-contract-template-designer__popover gd-contract-template-designer__image-insert-popover" }, Dn = {
|
|
60
|
+
class: "gd-contract-template-designer__image-size-fields",
|
|
61
|
+
role: "group",
|
|
62
|
+
"aria-label": "图片尺寸"
|
|
63
|
+
}, On = { class: "gd-contract-template-designer__toolbar-more" }, kn = { class: "gd-contract-template-designer__toolbar-extra" }, An = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--typography" }, jn = ["value", "disabled"], Mn = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--cleanup" }, Nn = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--table" }, Pn = { class: "gd-contract-template-designer__popover" }, Fn = { class: "gd-contract-template-designer__switch-row" }, In = { class: "gd-contract-template-designer__popover" }, Ln = { class: "gd-contract-template-designer__table-actions" }, Rn = {
|
|
33
64
|
key: 0,
|
|
34
65
|
class: "gd-contract-template-designer__validation"
|
|
35
|
-
},
|
|
66
|
+
}, zn = {
|
|
36
67
|
key: 0,
|
|
37
68
|
class: "gd-contract-template-designer__validation-list"
|
|
38
|
-
},
|
|
69
|
+
}, Bn = ["onClick"], Vn = ["aria-label", "aria-expanded"], Hn = { class: "gd-contract-template-designer__panel-stack" }, Un = { class: "gd-contract-template-designer__panel gd-contract-template-designer__panel--tools" }, Wn = [
|
|
70
|
+
"disabled",
|
|
71
|
+
"onDragstart",
|
|
72
|
+
"onClick"
|
|
73
|
+
], Gn = {
|
|
74
|
+
class: "gd-contract-template-designer__tool-item-icon",
|
|
75
|
+
"aria-hidden": "true"
|
|
76
|
+
}, Kn = { class: "gd-contract-template-designer__tool-item-copy" }, qn = {
|
|
77
|
+
key: 0,
|
|
78
|
+
class: "gd-contract-template-designer__panel gd-contract-template-designer__panel--tools"
|
|
79
|
+
}, Jn = { class: "gd-contract-template-designer__panel-head" }, Yn = { class: "gd-contract-template-designer__panel-actions" }, Xn = [
|
|
39
80
|
"disabled",
|
|
40
81
|
"onDragstart",
|
|
41
82
|
"onClick"
|
|
42
|
-
],
|
|
83
|
+
], Zn = {
|
|
84
|
+
class: "gd-contract-template-designer__tool-item-icon",
|
|
85
|
+
"aria-hidden": "true"
|
|
86
|
+
}, Qn = { class: "gd-contract-template-designer__signing-tool-copy" }, $n = { class: "gd-contract-template-designer__signing-tool-label" }, er = {
|
|
87
|
+
key: 2,
|
|
88
|
+
class: "gd-contract-template-designer__panel gd-contract-template-designer__panel--properties"
|
|
89
|
+
}, tr = { class: "gd-contract-template-designer__panel-head" }, nr = {
|
|
43
90
|
key: 0,
|
|
44
91
|
class: "gd-contract-template-designer__panel-actions"
|
|
45
|
-
},
|
|
92
|
+
}, rr = { class: "gd-contract-template-designer__form-row" }, ir = { class: "gd-contract-template-designer__form-row" }, ar = { class: "gd-contract-template-designer__form-row" }, or = { class: "gd-contract-template-designer__form-row" }, sr = { class: "gd-contract-template-designer__form-row" }, cr = { class: "gd-contract-template-designer__form-row" }, lr = {
|
|
46
93
|
key: 0,
|
|
47
94
|
class: "gd-contract-template-designer__switch-grid"
|
|
48
|
-
},
|
|
95
|
+
}, ur = { class: "gd-contract-template-designer__switch-row" }, dr = {
|
|
49
96
|
key: 0,
|
|
50
97
|
class: "gd-contract-template-designer__form-row is-compact"
|
|
51
|
-
},
|
|
98
|
+
}, fr = {
|
|
52
99
|
key: 1,
|
|
53
100
|
class: "gd-contract-template-designer__form-row"
|
|
54
|
-
},
|
|
101
|
+
}, pr = { class: "gd-contract-template-designer__form-row" }, mr = { class: "gd-contract-template-designer__form-row" }, hr = { class: "gd-contract-template-designer__form-row" }, gr = { class: "gd-contract-template-designer__form-row" }, _r = { class: "gd-contract-template-designer__switch-grid" }, vr = { class: "gd-contract-template-designer__switch-row" }, yr = { class: "gd-contract-template-designer__switch-row" }, br = { class: "gd-contract-template-designer__switch-row" }, xr = {
|
|
55
102
|
key: 0,
|
|
56
103
|
class: "gd-contract-template-designer__switch-row"
|
|
57
|
-
},
|
|
104
|
+
}, Sr = { class: "gd-contract-template-designer__form-row" }, Cr = { class: "gd-contract-template-designer__form-row" }, wr = { class: "gd-contract-template-designer__form-row" }, Tr = ["value", "disabled"], Er = { class: "gd-contract-template-designer__form-row" }, Dr = ["value", "disabled"], Or = { class: "gd-contract-template-designer__form-row" }, kr = ["value", "disabled"], Ar = { class: "gd-contract-template-designer__form-row" }, jr = { class: "gd-contract-template-designer__form-row" }, Mr = { class: "gd-contract-template-designer__form-row" }, Nr = {
|
|
105
|
+
class: "gd-contract-template-designer__image-size-fields",
|
|
106
|
+
role: "group",
|
|
107
|
+
"aria-label": "图片尺寸"
|
|
108
|
+
}, Pr = { class: "gd-contract-template-designer__popover-actions" }, Fr = {
|
|
109
|
+
class: "gd-contract-template-designer__text-menu-row",
|
|
110
|
+
role: "group",
|
|
111
|
+
"aria-label": "编辑历史与剪贴板"
|
|
112
|
+
}, Ir = {
|
|
113
|
+
key: 0,
|
|
114
|
+
class: "gd-contract-template-designer__text-menu-quick-insert",
|
|
115
|
+
role: "group",
|
|
116
|
+
"aria-label": "光标处插入"
|
|
117
|
+
}, Lr = {
|
|
118
|
+
class: "gd-contract-template-designer__text-menu-row gd-contract-template-designer__text-menu-row--controls",
|
|
119
|
+
role: "group",
|
|
120
|
+
"aria-label": "文字样式"
|
|
121
|
+
}, Rr = ["value"], zr = ["aria-label"], Br = { class: "gd-contract-template-designer__text-menu-control-head" }, Vr = { class: "gd-contract-template-designer__text-menu-control-options" }, Hr = ["aria-label", "onClick"], Ur = ["disabled"], Wr = {
|
|
122
|
+
class: "gd-contract-template-designer__text-menu-bind-list",
|
|
123
|
+
role: "listbox",
|
|
124
|
+
"aria-label": "已有正文控件"
|
|
125
|
+
}, Gr = ["onClick"], Kr = { class: "gd-contract-template-designer__text-menu-bind-item-label" }, qr = { class: "gd-contract-template-designer__text-menu-bind-item-meta" }, Jr = {
|
|
126
|
+
key: 0,
|
|
127
|
+
class: "gd-contract-template-designer__text-menu-bind-empty"
|
|
128
|
+
}, Yr = {
|
|
129
|
+
class: "gd-contract-template-designer__text-menu-row",
|
|
130
|
+
role: "group",
|
|
131
|
+
"aria-label": "常用格式与列表"
|
|
132
|
+
}, Xr = {
|
|
133
|
+
class: "gd-contract-template-designer__text-menu-row gd-contract-template-designer__text-menu-row--cleanup",
|
|
134
|
+
role: "group",
|
|
135
|
+
"aria-label": "清理格式"
|
|
136
|
+
}, Zr = {
|
|
137
|
+
class: "gd-contract-template-designer__sr-status",
|
|
138
|
+
"aria-live": "polite"
|
|
139
|
+
}, Qr = { class: "gd-contract-template-designer__preview" }, $r = { class: "gd-contract-template-designer__submit-data" }, ei = .5, ti = 1.5, ni = .1, ri = 128, ii = 108, ai = 48, oi = 24, si = 10, ci = 48, li = 304, ui = 300, di = 288, fi = 196, A = 12, pi = /* @__PURE__ */ _({
|
|
58
140
|
name: "ProContractTemplateDesigner",
|
|
59
141
|
__name: "ProContractTemplateDesigner",
|
|
60
142
|
props: {
|
|
@@ -67,9 +149,12 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
|
|
|
67
149
|
type: Boolean,
|
|
68
150
|
default: !1
|
|
69
151
|
},
|
|
70
|
-
pageSize: { default: () =>
|
|
71
|
-
|
|
72
|
-
|
|
152
|
+
pageSize: { default: () => $e },
|
|
153
|
+
maxPages: { default: 50 },
|
|
154
|
+
imageCompression: { type: [Object, Boolean] },
|
|
155
|
+
imageUpload: {},
|
|
156
|
+
variableTypes: { default: () => Qe },
|
|
157
|
+
defaultVariableStyle: { default: () => Ze },
|
|
73
158
|
fontFamilies: { default: void 0 },
|
|
74
159
|
fontFamilyMode: { default: "append" },
|
|
75
160
|
showSubmitDataViewer: {
|
|
@@ -80,13 +165,17 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
|
|
|
80
165
|
type: Boolean,
|
|
81
166
|
default: !0
|
|
82
167
|
},
|
|
168
|
+
showSigningPlacementTools: {
|
|
169
|
+
type: Boolean,
|
|
170
|
+
default: !1
|
|
171
|
+
},
|
|
83
172
|
enableDraftCache: {
|
|
84
173
|
type: Boolean,
|
|
85
174
|
default: !0
|
|
86
175
|
},
|
|
87
|
-
draftCacheKey: { default:
|
|
88
|
-
draftCacheInterval: { default:
|
|
89
|
-
draftCacheMaxBytes: { default:
|
|
176
|
+
draftCacheKey: { default: xt },
|
|
177
|
+
draftCacheInterval: { default: bt },
|
|
178
|
+
draftCacheMaxBytes: { default: c },
|
|
90
179
|
showDraftCacheStatus: {
|
|
91
180
|
type: Boolean,
|
|
92
181
|
default: !0
|
|
@@ -97,16 +186,41 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
|
|
|
97
186
|
"change",
|
|
98
187
|
"variable-add",
|
|
99
188
|
"validate",
|
|
100
|
-
"draft-cache-change"
|
|
189
|
+
"draft-cache-change",
|
|
190
|
+
"page-limit",
|
|
191
|
+
"image-error",
|
|
192
|
+
"signing-placement-add",
|
|
193
|
+
"signing-placement-change",
|
|
194
|
+
"signing-placement-remove",
|
|
195
|
+
"signing-placement-select"
|
|
101
196
|
],
|
|
102
|
-
setup(
|
|
103
|
-
let
|
|
197
|
+
setup(Qe, { expose: bt, emit: xt }) {
|
|
198
|
+
let c = Qe, _ = xt, pi = x(), mi = x(), hi = x(), gi = x(), _i = x(), vi = x();
|
|
199
|
+
function yi(e) {
|
|
200
|
+
if (!e || !Array.isArray(e.pages) || !Array.isArray(e.signingPlacements)) return [];
|
|
201
|
+
try {
|
|
202
|
+
return ht(e).filter((e) => e.type === "signing-placement");
|
|
203
|
+
} catch {
|
|
204
|
+
return [];
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
let bi = x(yi(c.modelValue)), j = x(ft(c.modelValue, c.pageSize)), M = x(""), N = x(""), P = x(j.value.pages[0]?.id ?? ""), xi = x(!1), Si = x([]), F = /* @__PURE__ */ new Map(), Ci = x(!1), wi = x(""), Ti = x(!1), Ei = x(), Di = x(!1), Oi = x(""), I = x(1), ki = x(!1), Ai = x(!1), ji = x(!1), Mi = x(!1), Ni = x({}), Pi = x(), Fi = x(""), L = x(!1), Ii = x(!1), Li = x(!1), Ri = x(!1), zi = x(""), Bi = x(), Vi = x(), Hi = x(""), Ui = x(!1), R = x(), Wi = x(), Gi = x(!1), Ki = x(""), z = x(), qi = x(), B = x(), Ji = x(), Yi = x(), Xi = x(), Zi = x(""), Qi = x(Ct("idle", "暂无本地草稿")), $i = x({
|
|
104
208
|
rows: 3,
|
|
105
209
|
cols: 3,
|
|
106
210
|
withHeaderRow: !0
|
|
107
|
-
}),
|
|
108
|
-
|
|
109
|
-
|
|
211
|
+
}), ea, ta, na = "", V = u(() => c.readonly || c.disabled), ra = u(() => !!c.enableDraftCache && !V.value), H = u(() => j.value.variables.find((e) => e.key === M.value)), U = u(() => j.value.signingPlacements ?? []), ia = u(() => Ei.value ? tt(Ei.value) : []), aa = u(() => U.value.find((e) => e.id === N.value)), oa = u(() => U.value.map((e) => {
|
|
212
|
+
let t = j.value.pages.findIndex((t) => t.id === e.pageId);
|
|
213
|
+
return {
|
|
214
|
+
placement: e,
|
|
215
|
+
label: Be[e.type],
|
|
216
|
+
detail: `${Be[e.type]} · 第 ${Math.max(0, t) + 1} 页`
|
|
217
|
+
};
|
|
218
|
+
})), sa = u(() => {
|
|
219
|
+
let e = aa.value?.pageId;
|
|
220
|
+
return Y(j.value.pages.find((t) => t.id === e));
|
|
221
|
+
}), W = u(() => j.value.pages.find((e) => e.id === P.value) ?? j.value.pages[0]), ca = u(() => pt(W.value?.pageSize, j.value.pageSize)), la = u(() => xi.value && Si.value.length === 0), ua = u(() => xi.value ? la.value ? "校验通过,正文变量与变量配置一致" : `发现 ${Si.value.length} 个校验问题` : ""), da = u(() => `${W.value?.title || "合同正文"} · ${ca.value.label} · 共 ${j.value.pages.length} 页`), fa = u(() => {
|
|
222
|
+
switch (Qi.value.type) {
|
|
223
|
+
case "saved": return `草稿已缓存 ${wt(Qi.value.savedAt)}`;
|
|
110
224
|
case "restored": return "已恢复本地草稿";
|
|
111
225
|
case "too-large": return "草稿过大,未缓存";
|
|
112
226
|
case "unavailable":
|
|
@@ -115,17 +229,17 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
|
|
|
115
229
|
case "cleared": return "草稿缓存已清理";
|
|
116
230
|
default: return "";
|
|
117
231
|
}
|
|
118
|
-
}),
|
|
119
|
-
"is-success":
|
|
120
|
-
"is-warning":
|
|
121
|
-
"is-error":
|
|
122
|
-
})),
|
|
232
|
+
}), pa = u(() => ({
|
|
233
|
+
"is-success": Qi.value.type === "saved" || Qi.value.type === "restored",
|
|
234
|
+
"is-warning": Qi.value.type === "too-large",
|
|
235
|
+
"is-error": Qi.value.type === "unavailable" || Qi.value.type === "read-failed" || Qi.value.type === "write-failed"
|
|
236
|
+
})), ma = u(() => `${Math.round(I.value * 100)}%`), ha = u(() => Ae(c.fontFamilies, c.fontFamilyMode)), ga = u(() => ha.value.map((e) => ({
|
|
123
237
|
label: e.label,
|
|
124
238
|
value: e.value
|
|
125
|
-
}))),
|
|
239
|
+
}))), _a = u(() => s.map((e) => ({
|
|
126
240
|
label: e.label,
|
|
127
241
|
value: e.key
|
|
128
|
-
}))),
|
|
242
|
+
}))), va = ke, ya = [
|
|
129
243
|
{
|
|
130
244
|
label: "正文",
|
|
131
245
|
value: "paragraph"
|
|
@@ -154,13 +268,13 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
|
|
|
154
268
|
label: "H6",
|
|
155
269
|
value: 6
|
|
156
270
|
}
|
|
157
|
-
],
|
|
271
|
+
], ba = [{
|
|
158
272
|
label: "实线",
|
|
159
273
|
value: "solid"
|
|
160
274
|
}, {
|
|
161
275
|
label: "虚线",
|
|
162
276
|
value: "dashed"
|
|
163
|
-
}],
|
|
277
|
+
}], xa = [
|
|
164
278
|
{
|
|
165
279
|
label: "完整显示",
|
|
166
280
|
value: "contain"
|
|
@@ -173,51 +287,61 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
|
|
|
173
287
|
label: "拉伸填充",
|
|
174
288
|
value: "fill"
|
|
175
289
|
}
|
|
176
|
-
],
|
|
290
|
+
], Sa = et.map((e) => ({
|
|
177
291
|
label: `${e.label} · ${e.width} × ${e.height}`,
|
|
178
292
|
value: e.format
|
|
179
|
-
})),
|
|
180
|
-
|
|
293
|
+
})), Ca = u(() => Je({ showSigningPlacementTools: c.showSigningPlacementTools })), wa = u(() => c.variableTypes.filter((e) => Le(e?.type))), Ta = u(() => wa.value.map((e) => ({
|
|
294
|
+
...e,
|
|
295
|
+
icon: At(e.type)
|
|
296
|
+
}))), Ea = u(() => dt(c.maxPages)), Da = u(() => j.value.pages.length >= Ea.value), Oa = u(() => {
|
|
297
|
+
let e = Ki.value.trim().toLowerCase(), t = j.value.variables;
|
|
298
|
+
return e ? t.filter((t) => t.label.toLowerCase().includes(e) || t.key.toLowerCase().includes(e)) : t;
|
|
299
|
+
}), ka = u(() => Math.max(ai, ca.value.width - ri)), Aa = u(() => Math.max(oi, ca.value.height - ii)), G = u(() => Ni.value[P.value] ?? La()), ja = u(() => G.value.currentHeadingLevel ?? "paragraph"), Ma = u(() => G.value.fontFamily || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif"), Na = u(() => G.value.fontSize ?? Ze.fontSize ?? 14), Pa = u(() => G.value.textColor || Ze.color || "#1f2937"), Fa = u(() => H.value?.style?.fontFamily || Ze.fontFamily || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif"), Ia = u(() => {
|
|
300
|
+
let e = Oe.map((e) => ({
|
|
181
301
|
label: `${e}px`,
|
|
182
302
|
value: e
|
|
183
|
-
})), t =
|
|
184
|
-
return n && !
|
|
303
|
+
})), t = Ha(Na.value), n = Ha(Fi.value), r = /* @__PURE__ */ new Map();
|
|
304
|
+
return n && !Oe.includes(n) && r.set(n, {
|
|
185
305
|
label: `使用 ${n}px`,
|
|
186
306
|
value: n
|
|
187
|
-
}), t && !
|
|
307
|
+
}), t && !Oe.includes(t) && r.set(t, {
|
|
188
308
|
label: n === t ? `使用 ${t}px` : `${t}px`,
|
|
189
309
|
value: t
|
|
190
310
|
}), [...Array.from(r.values()), ...e];
|
|
191
311
|
});
|
|
192
|
-
|
|
312
|
+
Rt(() => c.modelValue, (e) => {
|
|
193
313
|
if (!e) return;
|
|
194
|
-
let t =
|
|
195
|
-
JSON.stringify(t) !== JSON.stringify(
|
|
196
|
-
}, { deep: !0 }),
|
|
197
|
-
|
|
198
|
-
}, { deep: !0 }),
|
|
199
|
-
|
|
200
|
-
}),
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
314
|
+
let t = ft(e, c.pageSize);
|
|
315
|
+
bi.value = yi(e), JSON.stringify(t) !== JSON.stringify(j.value) && (j.value = t, P.value = t.pages[0]?.id ?? "", M.value = "", N.value = "", bo(P.value));
|
|
316
|
+
}, { deep: !0 }), Rt(() => c.pageSize, (e) => {
|
|
317
|
+
j.value = ft(j.value, e), bo(P.value);
|
|
318
|
+
}, { deep: !0 }), Rt(Ea, () => {
|
|
319
|
+
bo(j.value.pages[0]?.id);
|
|
320
|
+
}), Rt(V, (e) => {
|
|
321
|
+
e && ($(), L.value = !1, Ii.value = !1);
|
|
322
|
+
}), Rt(U, (e) => {
|
|
323
|
+
N.value && !e.some((e) => e.id === N.value) && (N.value = "", _("signing-placement-select", void 0));
|
|
324
|
+
}, { deep: !0 }), Rt(() => [
|
|
325
|
+
c.enableDraftCache,
|
|
326
|
+
c.draftCacheKey,
|
|
327
|
+
c.draftCacheInterval,
|
|
328
|
+
V.value
|
|
205
329
|
], () => {
|
|
206
|
-
|
|
207
|
-
}),
|
|
330
|
+
na = "", Za();
|
|
331
|
+
}), Rt(ki, (e) => {
|
|
208
332
|
if (!(typeof document > "u")) {
|
|
209
333
|
if (e) {
|
|
210
|
-
|
|
334
|
+
ea = document.body.style.overflow, document.body.style.overflow = "hidden";
|
|
211
335
|
return;
|
|
212
336
|
}
|
|
213
|
-
document.body.style.overflow =
|
|
337
|
+
document.body.style.overflow = ea ?? "", ea = void 0;
|
|
214
338
|
}
|
|
215
|
-
}),
|
|
216
|
-
|
|
217
|
-
}),
|
|
218
|
-
|
|
339
|
+
}), Ft(() => {
|
|
340
|
+
Ya(), Za(), bo(P.value), window.addEventListener("pointerdown", vc, !0), window.addEventListener("keydown", bc), window.addEventListener("resize", $), window.addEventListener("scroll", $, !0);
|
|
341
|
+
}), Pt(() => {
|
|
342
|
+
ki.value && typeof document < "u" && (document.body.style.overflow = ea ?? ""), window.removeEventListener("pointerdown", vc, !0), window.removeEventListener("keydown", bc), window.removeEventListener("resize", $), window.removeEventListener("scroll", $, !0), Xa();
|
|
219
343
|
});
|
|
220
|
-
function
|
|
344
|
+
function La() {
|
|
221
345
|
return {
|
|
222
346
|
isFocused: !1,
|
|
223
347
|
canUndo: !1,
|
|
@@ -229,36 +353,36 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
|
|
|
229
353
|
isOrderedList: !1,
|
|
230
354
|
isTableActive: !1,
|
|
231
355
|
textAlign: "left",
|
|
232
|
-
fontFamily:
|
|
233
|
-
fontSize:
|
|
234
|
-
textColor:
|
|
356
|
+
fontFamily: De,
|
|
357
|
+
fontSize: Ze.fontSize ?? 14,
|
|
358
|
+
textColor: Ze.color ?? "#1f2937",
|
|
235
359
|
selectionText: ""
|
|
236
360
|
};
|
|
237
361
|
}
|
|
238
|
-
function
|
|
362
|
+
function Ra(e) {
|
|
239
363
|
return e === "left" || e === "center" || e === "right";
|
|
240
364
|
}
|
|
241
|
-
function
|
|
365
|
+
function za(e) {
|
|
242
366
|
return typeof e == "number" && Number.isInteger(e) && e >= 1 && e <= 6;
|
|
243
367
|
}
|
|
244
|
-
function
|
|
245
|
-
return typeof e == "string" &&
|
|
368
|
+
function Ba(e) {
|
|
369
|
+
return typeof e == "string" && s.some((t) => t.key === e);
|
|
246
370
|
}
|
|
247
|
-
function
|
|
371
|
+
function Va(e, t = Na.value) {
|
|
248
372
|
let n = Number(e);
|
|
249
|
-
return Number.isFinite(n) ? Math.min(
|
|
373
|
+
return Number.isFinite(n) ? Math.min(ci, Math.max(si, Math.round(n))) : t;
|
|
250
374
|
}
|
|
251
|
-
function
|
|
375
|
+
function Ha(e) {
|
|
252
376
|
let t = String(e || "").trim().match(/(\d+(\.\d+)?)/);
|
|
253
377
|
if (!t) return;
|
|
254
378
|
let n = Number(t[1]);
|
|
255
|
-
if (Number.isFinite(n)) return Math.min(
|
|
379
|
+
if (Number.isFinite(n)) return Math.min(ci, Math.max(si, Math.round(n)));
|
|
256
380
|
}
|
|
257
|
-
function
|
|
381
|
+
function Ua(e = j.value) {
|
|
258
382
|
return {
|
|
259
383
|
...e,
|
|
260
384
|
pages: e.pages.map((e) => {
|
|
261
|
-
let t =
|
|
385
|
+
let t = F.get(e.id);
|
|
262
386
|
return {
|
|
263
387
|
...e,
|
|
264
388
|
contentHtml: t?.getHTML() ?? e.contentHtml,
|
|
@@ -268,133 +392,231 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
|
|
|
268
392
|
};
|
|
269
393
|
}
|
|
270
394
|
function K(e) {
|
|
271
|
-
let t =
|
|
272
|
-
return
|
|
395
|
+
let t = ft(e, c.pageSize);
|
|
396
|
+
return j.value = t, xi.value = !1, Si.value = [], _("update:modelValue", nt(t)), _("change", nt(t)), t;
|
|
273
397
|
}
|
|
274
|
-
function
|
|
275
|
-
|
|
398
|
+
function Wa(e, t = e.type !== "unchanged") {
|
|
399
|
+
Qi.value = e, t && _("draft-cache-change", { ...e });
|
|
276
400
|
}
|
|
277
|
-
function
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
if (!Yn.value) {
|
|
282
|
-
let e = Re("unavailable", "草稿缓存未启用");
|
|
283
|
-
return Dr(e), e;
|
|
401
|
+
function Ga() {
|
|
402
|
+
if (!ra.value) {
|
|
403
|
+
let e = Ct("unavailable", "草稿缓存未启用");
|
|
404
|
+
return Wa(e), e;
|
|
284
405
|
}
|
|
285
|
-
let e =
|
|
286
|
-
storage:
|
|
287
|
-
key:
|
|
288
|
-
value:
|
|
289
|
-
maxBytes:
|
|
290
|
-
previousValueSerialized:
|
|
406
|
+
let e = Ot({
|
|
407
|
+
storage: Tt(),
|
|
408
|
+
key: c.draftCacheKey,
|
|
409
|
+
value: nt(Ua()),
|
|
410
|
+
maxBytes: c.draftCacheMaxBytes,
|
|
411
|
+
previousValueSerialized: na
|
|
291
412
|
});
|
|
292
|
-
return e.valueSerialized && (
|
|
413
|
+
return e.valueSerialized && (na = e.valueSerialized), e.status.type !== "unchanged" && Wa(e.status), e.status;
|
|
293
414
|
}
|
|
294
|
-
function
|
|
295
|
-
let e =
|
|
296
|
-
return e.valueSerialized && (
|
|
415
|
+
function Ka() {
|
|
416
|
+
let e = Dt(Tt(), c.draftCacheKey);
|
|
417
|
+
return e.valueSerialized && (na = e.valueSerialized), e.status.type !== "idle" && Wa(e.status), e.value ? nt(e.value) : void 0;
|
|
297
418
|
}
|
|
298
|
-
function
|
|
299
|
-
let e =
|
|
300
|
-
|
|
419
|
+
function qa() {
|
|
420
|
+
let e = St(Tt(), c.draftCacheKey);
|
|
421
|
+
na = "", Wa(e);
|
|
301
422
|
}
|
|
302
|
-
function
|
|
303
|
-
return { ...
|
|
423
|
+
function Ja() {
|
|
424
|
+
return { ...Qi.value };
|
|
304
425
|
}
|
|
305
|
-
function
|
|
306
|
-
if (!
|
|
307
|
-
let e =
|
|
308
|
-
if (e.valueSerialized && (
|
|
309
|
-
|
|
426
|
+
function Ya() {
|
|
427
|
+
if (!ra.value || !Et(c.modelValue)) return;
|
|
428
|
+
let e = Dt(Tt(), c.draftCacheKey);
|
|
429
|
+
if (e.valueSerialized && (na = e.valueSerialized), e.value) {
|
|
430
|
+
P.value = K(e.value).pages[0]?.id ?? "", M.value = "", bo(P.value), Wa(e.status);
|
|
310
431
|
return;
|
|
311
432
|
}
|
|
312
|
-
e.status.type !== "idle" && e.status.type !== "invalid" &&
|
|
433
|
+
e.status.type !== "idle" && e.status.type !== "invalid" && Wa(e.status);
|
|
313
434
|
}
|
|
314
|
-
function
|
|
315
|
-
|
|
435
|
+
function Xa() {
|
|
436
|
+
ta &&= (clearInterval(ta), void 0);
|
|
316
437
|
}
|
|
317
|
-
function
|
|
318
|
-
if (
|
|
319
|
-
let e = Math.max(1e3, Math.round(Number(
|
|
320
|
-
|
|
321
|
-
|
|
438
|
+
function Za() {
|
|
439
|
+
if (Xa(), !ra.value || typeof window > "u") return;
|
|
440
|
+
let e = Math.max(1e3, Math.round(Number(c.draftCacheInterval) || 5e3));
|
|
441
|
+
ta = window.setInterval(() => {
|
|
442
|
+
Ga();
|
|
322
443
|
}, e);
|
|
323
444
|
}
|
|
324
|
-
function
|
|
325
|
-
t ?
|
|
445
|
+
function Qa(e, t) {
|
|
446
|
+
t ? F.set(e, t) : F.delete(e);
|
|
326
447
|
}
|
|
327
|
-
function q(e) {
|
|
328
|
-
|
|
448
|
+
function q(e, t = W.value?.id ?? P.value) {
|
|
449
|
+
V.value || F.get(t)?.runCommand(e);
|
|
329
450
|
}
|
|
330
451
|
function J(e) {
|
|
331
|
-
q(e),
|
|
452
|
+
q(e), $();
|
|
453
|
+
}
|
|
454
|
+
function $a(e) {
|
|
455
|
+
let t = R.value?.pageId;
|
|
456
|
+
t && (F.get(t)?.focus(), Zi.value = typeof document < "u" && document.execCommand(e) ? `${e === "copy" ? "已复制" : e === "cut" ? "已剪切" : "已粘贴"}` : "浏览器未授权剪贴板操作,请使用系统快捷键。", $());
|
|
332
457
|
}
|
|
333
|
-
function
|
|
334
|
-
let t = K(
|
|
335
|
-
return
|
|
458
|
+
function eo(e) {
|
|
459
|
+
let t = K(mt(e));
|
|
460
|
+
return M.value && !t.variables.some((e) => e.key === M.value) && (M.value = ""), t;
|
|
336
461
|
}
|
|
337
|
-
function
|
|
338
|
-
|
|
339
|
-
...
|
|
340
|
-
pages:
|
|
341
|
-
}),
|
|
462
|
+
function to(e) {
|
|
463
|
+
eo({
|
|
464
|
+
...j.value,
|
|
465
|
+
pages: j.value.pages.map((t) => t.id === e.id ? e : t)
|
|
466
|
+
}), bo(e.id);
|
|
467
|
+
}
|
|
468
|
+
function Y(e) {
|
|
469
|
+
return pt(e?.pageSize, j.value.pageSize);
|
|
470
|
+
}
|
|
471
|
+
function no(e) {
|
|
472
|
+
return U.value.filter((t) => t.pageId === e);
|
|
473
|
+
}
|
|
474
|
+
function X(e) {
|
|
475
|
+
return {
|
|
476
|
+
...e,
|
|
477
|
+
...e.sealTypes ? { sealTypes: [...e.sealTypes] } : {}
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
function Z(e) {
|
|
481
|
+
let t = e ? U.value.find((t) => t.id === e) : void 0;
|
|
482
|
+
N.value = t?.id ?? "", t && (M.value = "", P.value = t.pageId), _("signing-placement-select", t ? X(t) : void 0);
|
|
483
|
+
}
|
|
484
|
+
function ro(e) {
|
|
485
|
+
Z(e.id);
|
|
486
|
+
}
|
|
487
|
+
function io(e) {
|
|
488
|
+
let t = new Set(e);
|
|
489
|
+
t.size && (bi.value = bi.value.filter((e) => e.type !== "signing-placement" || !t.has(e.id)));
|
|
490
|
+
}
|
|
491
|
+
function ao(e) {
|
|
492
|
+
bi.value = bi.value.filter((t) => t.type !== "signing-placement" || t.pageId !== e);
|
|
493
|
+
}
|
|
494
|
+
function oo(e, t = []) {
|
|
495
|
+
return io(t), K({
|
|
496
|
+
...j.value,
|
|
497
|
+
signingPlacements: e
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
function so(e, t = W.value?.id ?? j.value.pages[0]?.id, n) {
|
|
501
|
+
if (!We(c.readonly, c.disabled) || !t) return;
|
|
502
|
+
let r = j.value.pages.find((e) => e.id === t);
|
|
503
|
+
if (!r) return;
|
|
504
|
+
let i = Ke(e, t, Y(r), { ...n ?? F.get(t)?.getVisibleSigningPlacementPosition(e) });
|
|
505
|
+
return oo([...U.value, i]), P.value = t, Z(i.id), _("signing-placement-add", X(i)), i;
|
|
506
|
+
}
|
|
507
|
+
function co(e, t, n, r) {
|
|
508
|
+
if (!c.showSigningPlacementTools) return;
|
|
509
|
+
let i = qe(t.type);
|
|
510
|
+
so(t.type, e, {
|
|
511
|
+
x: n - i.width / 2,
|
|
512
|
+
y: r - i.height / 2
|
|
513
|
+
});
|
|
342
514
|
}
|
|
343
|
-
function
|
|
344
|
-
return
|
|
515
|
+
function lo(e) {
|
|
516
|
+
return so(e.type);
|
|
345
517
|
}
|
|
346
|
-
function
|
|
347
|
-
if (
|
|
348
|
-
|
|
518
|
+
function uo(e, t) {
|
|
519
|
+
if (!We(c.readonly, c.disabled)) {
|
|
520
|
+
e.preventDefault();
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
e.dataTransfer?.setData(ze, Xe(t)), e.dataTransfer && (e.dataTransfer.effectAllowed = "copy");
|
|
524
|
+
}
|
|
525
|
+
function fo(e) {
|
|
526
|
+
if (!We(c.readonly, c.disabled)) return;
|
|
527
|
+
let t = j.value.pages.find((t) => t.id === e.pageId);
|
|
349
528
|
if (!t) return;
|
|
350
|
-
let n =
|
|
351
|
-
|
|
352
|
-
...
|
|
353
|
-
|
|
529
|
+
let n = Ge({
|
|
530
|
+
...e,
|
|
531
|
+
...e.type === "seal" ? {} : { sealTypes: void 0 }
|
|
532
|
+
}, Y(t));
|
|
533
|
+
oo(U.value.map((e) => e.id === n.id ? n : e), [n.id]), N.value = n.id, _("signing-placement-change", X(n));
|
|
534
|
+
}
|
|
535
|
+
function po(e) {
|
|
536
|
+
let t = aa.value;
|
|
537
|
+
if (!t) return;
|
|
538
|
+
let n = j.value.pages.find((e) => e.id === t.pageId);
|
|
539
|
+
n && fo(Ve(t, e, Y(n)));
|
|
540
|
+
}
|
|
541
|
+
function mo(e = aa.value) {
|
|
542
|
+
if (!We(c.readonly, c.disabled) || !e) return;
|
|
543
|
+
let t = j.value.pages.find((t) => t.id === e.pageId);
|
|
544
|
+
if (!t) return;
|
|
545
|
+
let n = Ke(e.type, e.pageId, Y(t), {
|
|
546
|
+
...X(e),
|
|
547
|
+
id: void 0,
|
|
548
|
+
x: e.x + 16,
|
|
549
|
+
y: e.y + 16
|
|
550
|
+
});
|
|
551
|
+
oo([...U.value, n]), Z(n.id), _("signing-placement-add", X(n));
|
|
552
|
+
}
|
|
553
|
+
function ho(e = aa.value) {
|
|
554
|
+
!We(c.readonly, c.disabled) || !e || (oo(U.value.filter((t) => t.id !== e.id), [e.id]), N.value === e.id && Z(), _("signing-placement-remove", X(e)));
|
|
555
|
+
}
|
|
556
|
+
function go(e) {
|
|
557
|
+
if (V.value || !W.value) return;
|
|
558
|
+
let t = ut(e);
|
|
559
|
+
if (!t) return;
|
|
560
|
+
let n = W.value.id, r = Y(W.value), i = pt(t, j.value.pageSize), a = U.value.map((e) => e.pageId === n ? Ye(e, r, i) : e);
|
|
561
|
+
io(a.filter((e) => e.pageId === n).map((e) => e.id)), K({
|
|
562
|
+
...j.value,
|
|
563
|
+
pages: j.value.pages.map((e) => e.id === n ? {
|
|
354
564
|
...e,
|
|
355
|
-
pageSize:
|
|
356
|
-
} : e)
|
|
357
|
-
|
|
565
|
+
pageSize: i
|
|
566
|
+
} : e),
|
|
567
|
+
signingPlacements: a
|
|
568
|
+
}), a.filter((e) => e.pageId === n).forEach((e) => _("signing-placement-change", X(e))), bo(n);
|
|
358
569
|
}
|
|
359
|
-
function
|
|
570
|
+
function _o(e) {
|
|
360
571
|
return {
|
|
361
572
|
type: "doc",
|
|
362
573
|
content: e.length ? e : [{ type: "paragraph" }]
|
|
363
574
|
};
|
|
364
575
|
}
|
|
365
|
-
function
|
|
576
|
+
function vo(e) {
|
|
366
577
|
return e.replace(/<p>\s*(<br>)?\s*<\/p>/gi, "").trim().length === 0;
|
|
367
578
|
}
|
|
368
|
-
function
|
|
369
|
-
let r = e.contentJson?.content, i = [...t, ...r?.length ? r : []], a =
|
|
579
|
+
function yo(e, t, n) {
|
|
580
|
+
let r = e.contentJson?.content, i = [...t, ...r?.length ? r : []], a = vo(e.contentHtml || "") ? "" : e.contentHtml;
|
|
370
581
|
return {
|
|
371
582
|
...e,
|
|
372
583
|
contentHtml: `${n}${a}`,
|
|
373
|
-
contentJson:
|
|
584
|
+
contentJson: _o(i)
|
|
374
585
|
};
|
|
375
586
|
}
|
|
376
|
-
function
|
|
377
|
-
|
|
587
|
+
function bo(e = P.value) {
|
|
588
|
+
if (V.value) return;
|
|
589
|
+
let t = j.value.pages.findIndex((e) => e.id === wi.value), n = j.value.pages.findIndex((t) => t.id === e);
|
|
590
|
+
(!wi.value || t < 0 || n >= 0 && n < t) && (wi.value = e), !Ci.value && v(() => So());
|
|
378
591
|
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
592
|
+
function xo(e) {
|
|
593
|
+
let t = Ea.value;
|
|
594
|
+
Zi.value = `合同最多支持 ${t} 页`, _("page-limit", t, e);
|
|
595
|
+
}
|
|
596
|
+
async function So() {
|
|
597
|
+
if (!Ci.value) {
|
|
598
|
+
Ci.value = !0;
|
|
382
599
|
try {
|
|
383
|
-
let e =
|
|
384
|
-
|
|
385
|
-
let t = 0;
|
|
386
|
-
for (; t <
|
|
387
|
-
await
|
|
388
|
-
let n =
|
|
600
|
+
let e = wi.value;
|
|
601
|
+
wi.value = "";
|
|
602
|
+
let t = 0, n = Math.max(40, Ea.value + 1);
|
|
603
|
+
for (; t < n;) {
|
|
604
|
+
await v();
|
|
605
|
+
let n = Ua().pages, r = Math.max(0, n.findIndex((t) => t.id === e)), i = !1;
|
|
389
606
|
for (let t = r; t < n.length; t += 1) {
|
|
390
|
-
let r = n[t]
|
|
607
|
+
let r = n[t];
|
|
608
|
+
if (t === n.length - 1 && n.length >= Ea.value && F.get(r.id)?.hasOverflowContent()) {
|
|
609
|
+
xo("auto-pagination");
|
|
610
|
+
break;
|
|
611
|
+
}
|
|
612
|
+
let a = F.get(r.id)?.splitOverflowContent();
|
|
391
613
|
if (!a) continue;
|
|
392
|
-
let o =
|
|
614
|
+
let o = Ua().pages, ee = o.findIndex((e) => e.id === r.id);
|
|
393
615
|
if (ee < 0) break;
|
|
394
616
|
o[ee] = a.page;
|
|
395
617
|
let te = o[ee + 1];
|
|
396
|
-
te ? o[ee + 1] =
|
|
397
|
-
...
|
|
618
|
+
te ? o[ee + 1] = F.get(te.id)?.prependContent(a.overflowContent) ?? yo(te, a.overflowContent, a.overflowHtml) : o.push(it(o.length + 1, Y(a.page), a.overflowHtml, _o(a.overflowContent))), eo({
|
|
619
|
+
...j.value,
|
|
398
620
|
pages: o
|
|
399
621
|
}), e = o[ee + 1]?.id ?? a.page.id, i = !0;
|
|
400
622
|
break;
|
|
@@ -403,53 +625,192 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
|
|
|
403
625
|
t += 1;
|
|
404
626
|
}
|
|
405
627
|
} finally {
|
|
406
|
-
|
|
628
|
+
Ci.value = !1, wi.value && v(() => So());
|
|
407
629
|
}
|
|
408
630
|
}
|
|
409
631
|
}
|
|
410
|
-
function
|
|
411
|
-
if (
|
|
412
|
-
|
|
632
|
+
function Co() {
|
|
633
|
+
if (V.value) return;
|
|
634
|
+
if (Da.value) {
|
|
635
|
+
xo("add");
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
let e = ot(j.value.pages.length + 1, ca.value);
|
|
639
|
+
K({
|
|
640
|
+
...j.value,
|
|
641
|
+
pages: [...j.value.pages, e]
|
|
642
|
+
}), P.value = e.id;
|
|
643
|
+
}
|
|
644
|
+
function wo(e) {
|
|
645
|
+
if (V.value) return;
|
|
646
|
+
if (Da.value) {
|
|
647
|
+
xo("duplicate");
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
let t = j.value.pages.findIndex((t) => t.id === e.id);
|
|
651
|
+
if (t < 0) return;
|
|
652
|
+
let n = nt({
|
|
653
|
+
pages: [e],
|
|
654
|
+
variables: [],
|
|
655
|
+
pageSize: j.value.pageSize,
|
|
656
|
+
signingPlacements: []
|
|
657
|
+
}).pages[0], r = it(t + 2, Y(e), n.contentHtml, n.contentJson);
|
|
658
|
+
r.title = `${e.title || `第 ${t + 1} 页`}副本`;
|
|
659
|
+
let i = [...j.value.pages];
|
|
660
|
+
i.splice(t + 1, 0, r);
|
|
661
|
+
let a = no(e.id).map((e) => Ke(e.type, r.id, Y(r), {
|
|
662
|
+
...X(e),
|
|
663
|
+
id: void 0,
|
|
664
|
+
pageId: r.id
|
|
665
|
+
}));
|
|
413
666
|
K({
|
|
414
|
-
...
|
|
415
|
-
pages:
|
|
416
|
-
|
|
667
|
+
...j.value,
|
|
668
|
+
pages: i,
|
|
669
|
+
signingPlacements: [...U.value, ...a]
|
|
670
|
+
}), P.value = r.id, a.forEach((e) => _("signing-placement-add", X(e))), a[0] && Z(a[0].id);
|
|
671
|
+
}
|
|
672
|
+
function To(e) {
|
|
673
|
+
if (V.value || j.value.pages.length <= 1) return;
|
|
674
|
+
let t = j.value.pages.findIndex((t) => t.id === e.id);
|
|
675
|
+
if (t < 0) return;
|
|
676
|
+
let n = no(e.id);
|
|
677
|
+
ao(e.id);
|
|
678
|
+
let r = j.value.pages.filter((t) => t.id !== e.id), i = eo({
|
|
679
|
+
...j.value,
|
|
680
|
+
pages: r,
|
|
681
|
+
signingPlacements: U.value.filter((t) => t.pageId !== e.id)
|
|
682
|
+
});
|
|
683
|
+
P.value = i.pages[Math.min(t, i.pages.length - 1)]?.id ?? "", n.some((e) => e.id === N.value) && Z(), n.forEach((e) => _("signing-placement-remove", X(e)));
|
|
417
684
|
}
|
|
418
|
-
function
|
|
419
|
-
|
|
685
|
+
function Eo(e) {
|
|
686
|
+
if (V.value || j.value.pages.length <= 1) return;
|
|
687
|
+
let t = no(e.id).length;
|
|
688
|
+
if (!t) {
|
|
689
|
+
To(e);
|
|
690
|
+
return;
|
|
691
|
+
}
|
|
692
|
+
Wt.confirm({
|
|
693
|
+
title: "删除合同页面",
|
|
694
|
+
content: `此页包含 ${t} 个签署位置,删除页面会同时移除这些位置,是否继续?`,
|
|
695
|
+
okText: "确认删除",
|
|
696
|
+
okType: "danger",
|
|
697
|
+
cancelText: "取消",
|
|
698
|
+
onOk: () => To(e)
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
function Do(e) {
|
|
702
|
+
let t = new Set(j.value.variables.map((e) => e.key)), n = 1;
|
|
420
703
|
for (; t.has(`${e}_${n}`);) n += 1;
|
|
421
704
|
return `${e}_${n}`;
|
|
422
705
|
}
|
|
423
|
-
function
|
|
706
|
+
function Oo(e) {
|
|
424
707
|
let t = e.type ?? "text";
|
|
425
|
-
return
|
|
708
|
+
return st({
|
|
426
709
|
...e,
|
|
427
710
|
type: t,
|
|
428
|
-
key: e.key ||
|
|
429
|
-
label: e.label ||
|
|
430
|
-
},
|
|
711
|
+
key: e.key || Do(t),
|
|
712
|
+
label: e.label || lt(t, c.variableTypes).label
|
|
713
|
+
}, c.variableTypes, c.defaultVariableStyle);
|
|
431
714
|
}
|
|
432
|
-
function
|
|
433
|
-
if (
|
|
434
|
-
let r =
|
|
715
|
+
function ko(e, t = W.value?.id ?? j.value.pages[0].id, n) {
|
|
716
|
+
if (V.value) return e;
|
|
717
|
+
let r = F.get(t)?.insertVariable(e, n), i = !j.value.variables.some((t) => t.key === e.key);
|
|
435
718
|
return K({
|
|
436
|
-
...
|
|
437
|
-
pages: r ?
|
|
438
|
-
variables: i ? [...
|
|
439
|
-
}),
|
|
719
|
+
...j.value,
|
|
720
|
+
pages: r ? j.value.pages.map((e) => e.id === r.id ? r : e) : j.value.pages,
|
|
721
|
+
variables: i ? [...j.value.variables, e] : j.value.variables
|
|
722
|
+
}), M.value = e.key, Z(), P.value = t, i && _("variable-add", e), bo(t), e;
|
|
440
723
|
}
|
|
441
|
-
function
|
|
442
|
-
|
|
724
|
+
function Ao(e) {
|
|
725
|
+
let { width: t, height: n, ...r } = e, i = Ne(t), a = Ne(n);
|
|
726
|
+
return {
|
|
727
|
+
...r,
|
|
728
|
+
...i === void 0 ? {} : { width: i },
|
|
729
|
+
...a === void 0 ? {} : { height: a }
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
function jo(e = {}) {
|
|
733
|
+
let t = Ne(Bi.value), n = Ne(Vi.value);
|
|
734
|
+
return {
|
|
735
|
+
...e,
|
|
736
|
+
...t === void 0 ? {} : { width: t },
|
|
737
|
+
...n === void 0 ? {} : { height: n }
|
|
738
|
+
};
|
|
739
|
+
}
|
|
740
|
+
function Mo() {
|
|
741
|
+
zi.value = "", Bi.value = void 0, Vi.value = void 0, Hi.value = "";
|
|
742
|
+
}
|
|
743
|
+
function No(e, t = W.value?.id ?? j.value.pages[0]?.id, n) {
|
|
744
|
+
let r = Ao({
|
|
745
|
+
...e,
|
|
746
|
+
src: e.src.trim()
|
|
747
|
+
});
|
|
748
|
+
if (!(V.value || !t || !je(r.src) || !r.src || !F.get(t)?.insertContentImage(r, n))) return P.value = t, M.value = "", Z(), r.src;
|
|
749
|
+
}
|
|
750
|
+
function Po(e) {
|
|
751
|
+
return e instanceof Error ? e : /* @__PURE__ */ Error("图片处理失败");
|
|
752
|
+
}
|
|
753
|
+
async function Fo(e, t) {
|
|
754
|
+
t === "toolbar" && (Ui.value = !0, Hi.value = "");
|
|
755
|
+
try {
|
|
756
|
+
return (await Pe(e, {
|
|
757
|
+
source: t,
|
|
758
|
+
compression: c.imageCompression,
|
|
759
|
+
upload: c.imageUpload
|
|
760
|
+
})).src;
|
|
761
|
+
} catch (e) {
|
|
762
|
+
let n = Po(e);
|
|
763
|
+
t === "toolbar" && (Hi.value = n.message), Zi.value = n.message, _("image-error", n, t);
|
|
764
|
+
return;
|
|
765
|
+
} finally {
|
|
766
|
+
t === "toolbar" && (Ui.value = !1);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
async function Io(e) {
|
|
770
|
+
return await Fo(e, "paste") ?? null;
|
|
771
|
+
}
|
|
772
|
+
async function Lo(e, t = {}) {
|
|
773
|
+
if (V.value) return;
|
|
774
|
+
let n = W.value?.id ?? j.value.pages[0]?.id, r = n ? F.get(n)?.getSelectionRange() : void 0, i = typeof e == "string" ? e.trim() : await Fo(e, "toolbar");
|
|
775
|
+
if (!i || !je(i)) {
|
|
776
|
+
typeof e == "string" && (Hi.value = "请输入安全的图片 URL");
|
|
777
|
+
return;
|
|
778
|
+
}
|
|
779
|
+
let a = No({
|
|
780
|
+
...t,
|
|
781
|
+
src: i
|
|
782
|
+
}, n, r);
|
|
783
|
+
return a && (Ri.value = !1, Mo(), Zi.value = "已插入图片"), a;
|
|
784
|
+
}
|
|
785
|
+
function Ro() {
|
|
786
|
+
V.value || Ui.value || ($(), Hi.value = "", vi.value && (vi.value.value = ""), vi.value?.click());
|
|
787
|
+
}
|
|
788
|
+
async function zo(e) {
|
|
789
|
+
let t = e.target.files?.[0];
|
|
790
|
+
t && await Lo(t, jo({ alt: t.name }));
|
|
791
|
+
}
|
|
792
|
+
async function Bo() {
|
|
793
|
+
let e = zi.value;
|
|
794
|
+
await Lo(e, jo());
|
|
795
|
+
}
|
|
796
|
+
function Vo(e) {
|
|
797
|
+
is(e), Li.value = !1;
|
|
798
|
+
}
|
|
799
|
+
function Ho() {
|
|
800
|
+
$(), Co();
|
|
801
|
+
}
|
|
802
|
+
function Uo(e, t, n, r) {
|
|
803
|
+
$(), ko(Oo({ type: t }), e, {
|
|
443
804
|
left: n,
|
|
444
805
|
top: r
|
|
445
806
|
});
|
|
446
807
|
}
|
|
447
|
-
function
|
|
448
|
-
|
|
808
|
+
function Wo(e) {
|
|
809
|
+
$(), M.value = e, Z();
|
|
449
810
|
}
|
|
450
|
-
function
|
|
451
|
-
let t =
|
|
452
|
-
|
|
811
|
+
function Go(e) {
|
|
812
|
+
let t = j.value.variables.find((t) => t.id === e.id), n = [...j.value.pages], r = t?.key ?? e.key, i = "";
|
|
813
|
+
F.forEach((t, a) => {
|
|
453
814
|
let o = t.updateVariable(e, r);
|
|
454
815
|
if (o) {
|
|
455
816
|
i ||= a;
|
|
@@ -457,230 +818,350 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
|
|
|
457
818
|
e >= 0 && (n[e] = o);
|
|
458
819
|
}
|
|
459
820
|
}), K({
|
|
460
|
-
...
|
|
821
|
+
...j.value,
|
|
461
822
|
pages: n,
|
|
462
|
-
variables:
|
|
463
|
-
}),
|
|
823
|
+
variables: j.value.variables.map((t) => t.id === e.id ? e : t)
|
|
824
|
+
}), M.value = e.key, bo(i || P.value);
|
|
464
825
|
}
|
|
465
|
-
function
|
|
466
|
-
|
|
467
|
-
...
|
|
826
|
+
function Q(e) {
|
|
827
|
+
H.value && Go({
|
|
828
|
+
...H.value,
|
|
468
829
|
...e,
|
|
469
830
|
style: {
|
|
470
|
-
...
|
|
831
|
+
...H.value.style,
|
|
471
832
|
...e.style
|
|
472
833
|
}
|
|
473
834
|
});
|
|
474
835
|
}
|
|
475
|
-
function
|
|
476
|
-
(e === "left" || e === "center" || e === "right") &&
|
|
836
|
+
function Ko(e) {
|
|
837
|
+
(e === "left" || e === "center" || e === "right") && Q({ style: { textAlign: e } });
|
|
477
838
|
}
|
|
478
|
-
function
|
|
479
|
-
(e === "solid" || e === "dashed") &&
|
|
839
|
+
function qo(e) {
|
|
840
|
+
(e === "solid" || e === "dashed") && Q({ style: { borderStyle: e } });
|
|
480
841
|
}
|
|
481
|
-
function
|
|
482
|
-
(e === "contain" || e === "cover" || e === "fill") &&
|
|
842
|
+
function Jo(e) {
|
|
843
|
+
(e === "contain" || e === "cover" || e === "fill") && Q({ style: { objectFit: e } });
|
|
483
844
|
}
|
|
484
|
-
function
|
|
485
|
-
|
|
845
|
+
function Yo(e) {
|
|
846
|
+
Q({ style: e });
|
|
486
847
|
}
|
|
487
|
-
function
|
|
488
|
-
|
|
848
|
+
function Xo(e) {
|
|
849
|
+
Yo({ fontFamily: String(e || "").trim() || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif" });
|
|
489
850
|
}
|
|
490
|
-
function
|
|
491
|
-
|
|
851
|
+
function Zo(e) {
|
|
852
|
+
Yo({ fontSize: Va(e, H.value?.style?.fontSize ?? 14) });
|
|
492
853
|
}
|
|
493
|
-
function
|
|
494
|
-
|
|
854
|
+
function Qo(e) {
|
|
855
|
+
H.value && Q({
|
|
495
856
|
multiline: e,
|
|
496
|
-
rows:
|
|
497
|
-
lineHeight:
|
|
857
|
+
rows: H.value.rows || 3,
|
|
858
|
+
lineHeight: H.value.lineHeight || 28,
|
|
498
859
|
style: e ? { underline: !0 } : void 0
|
|
499
860
|
});
|
|
500
861
|
}
|
|
501
|
-
function
|
|
502
|
-
|
|
862
|
+
function $o(e) {
|
|
863
|
+
H.value && Q({
|
|
503
864
|
rows: Number(e || 3),
|
|
504
|
-
lineHeight:
|
|
865
|
+
lineHeight: H.value.lineHeight || 28
|
|
505
866
|
});
|
|
506
867
|
}
|
|
507
|
-
function
|
|
508
|
-
if (
|
|
509
|
-
let t = [...
|
|
510
|
-
|
|
868
|
+
function es(e) {
|
|
869
|
+
if (V.value) return;
|
|
870
|
+
let t = [...j.value.pages];
|
|
871
|
+
F.forEach((n, r) => {
|
|
511
872
|
let i = n.removeVariable(e.key);
|
|
512
873
|
if (i) {
|
|
513
874
|
let e = t.findIndex((e) => e.id === r);
|
|
514
875
|
e >= 0 && (t[e] = i);
|
|
515
876
|
}
|
|
516
877
|
}), K({
|
|
517
|
-
...
|
|
878
|
+
...j.value,
|
|
518
879
|
pages: t,
|
|
519
|
-
variables:
|
|
520
|
-
}),
|
|
880
|
+
variables: j.value.variables.filter((t) => t.id !== e.id)
|
|
881
|
+
}), M.value = "", N.value = "";
|
|
521
882
|
}
|
|
522
|
-
function
|
|
523
|
-
let t = (e.trim() || "variable").replace(/\s+/g, "_"), n = new Set(
|
|
883
|
+
function ts(e) {
|
|
884
|
+
let t = (e.trim() || "variable").replace(/\s+/g, "_"), n = new Set(j.value.variables.map((e) => e.key));
|
|
524
885
|
if (!n.has(t)) return t;
|
|
525
886
|
let r = 2;
|
|
526
887
|
for (; n.has(`${t}_${r}`);) r += 1;
|
|
527
888
|
return `${t}_${r}`;
|
|
528
889
|
}
|
|
529
|
-
function
|
|
530
|
-
|
|
890
|
+
function ns(e) {
|
|
891
|
+
V.value || ko(st({
|
|
531
892
|
...e,
|
|
532
893
|
id: void 0,
|
|
533
|
-
key:
|
|
894
|
+
key: ts(`${e.key || e.type}_copy`),
|
|
534
895
|
label: `${e.label}副本`,
|
|
535
896
|
style: { ...e.style }
|
|
536
|
-
},
|
|
897
|
+
}, c.variableTypes, c.defaultVariableStyle));
|
|
898
|
+
}
|
|
899
|
+
function rs(e) {
|
|
900
|
+
return V.value ? void 0 : ko(j.value.variables.find((t) => t.key === e.key) ?? st(e, c.variableTypes, c.defaultVariableStyle));
|
|
901
|
+
}
|
|
902
|
+
function is(e) {
|
|
903
|
+
if (!V.value) return ko(Oo({ type: e }));
|
|
904
|
+
}
|
|
905
|
+
function as(e) {
|
|
906
|
+
if (V.value || !Le(e)) return;
|
|
907
|
+
let t = R.value, n = wa.value.find((t) => t.type === e);
|
|
908
|
+
if (!t || !n) return;
|
|
909
|
+
let r = Fe(t.leadingText) || n.label, i = Ie(t.selectionWidth, ai, ka.value), a = os();
|
|
910
|
+
ko(Oo({
|
|
911
|
+
type: e,
|
|
912
|
+
label: r,
|
|
913
|
+
...i ? { width: i } : {},
|
|
914
|
+
...a ? { style: a } : {}
|
|
915
|
+
}), t.pageId), Zi.value = t.hasSelection ? `已将选中内容替换为${n.label}控件` : `已插入${n.label}控件`, $();
|
|
916
|
+
}
|
|
917
|
+
function os() {
|
|
918
|
+
let e = G.value, t = {};
|
|
919
|
+
return e.isUnderline && (t.underline = !0), typeof e.fontSize == "number" && Number.isFinite(e.fontSize) && (t.fontSize = e.fontSize), e.fontFamily && (t.fontFamily = e.fontFamily), e.textColor && (t.color = e.textColor), Object.keys(t).length ? t : void 0;
|
|
920
|
+
}
|
|
921
|
+
function ss(e) {
|
|
922
|
+
if (V.value) return;
|
|
923
|
+
let t = R.value;
|
|
924
|
+
t && (ko(e, t.pageId), Zi.value = `已绑定到${e.label},沿用原控件尺寸`, $());
|
|
925
|
+
}
|
|
926
|
+
function cs(e) {
|
|
927
|
+
return lt(e.type && Le(e.type) ? e.type : "text", wa.value).label;
|
|
928
|
+
}
|
|
929
|
+
function ls() {
|
|
930
|
+
j.value.variables.length && (Gi.value = !0, v(() => {
|
|
931
|
+
dc(), Wi.value?.querySelector(".gd-contract-template-designer__text-menu-bind-search input")?.focus();
|
|
932
|
+
}));
|
|
537
933
|
}
|
|
538
|
-
function
|
|
539
|
-
|
|
934
|
+
function us(e, t) {
|
|
935
|
+
e.dataTransfer?.setData("application/x-gd-contract-variable", t), e.dataTransfer && (e.dataTransfer.effectAllowed = "copy");
|
|
540
936
|
}
|
|
541
|
-
function
|
|
542
|
-
|
|
937
|
+
function ds(e) {
|
|
938
|
+
return I.value = Math.round(Math.min(ti, Math.max(ei, Number.isFinite(e) ? e : 1)) * 100) / 100, I.value;
|
|
543
939
|
}
|
|
544
|
-
|
|
545
|
-
|
|
940
|
+
let { width: fs } = Jt(mi), { width: ps } = Jt(gi), ms = u(() => Math.max(...j.value.pages.map((e) => Y(e).width), $e.width) + 10), hs = x(!1), gs = x(0);
|
|
941
|
+
function _s() {
|
|
942
|
+
let e = gi.value;
|
|
943
|
+
if (!e) return;
|
|
944
|
+
if (typeof window < "u" && window.matchMedia("(max-width: 760px)").matches) {
|
|
945
|
+
hs.value = !1;
|
|
946
|
+
return;
|
|
947
|
+
}
|
|
948
|
+
let t = e.clientWidth;
|
|
949
|
+
if (!(t <= 0)) {
|
|
950
|
+
if (!hs.value) {
|
|
951
|
+
let n = e.scrollWidth;
|
|
952
|
+
gs.value = n, n > t + 1 && (hs.value = !0);
|
|
953
|
+
return;
|
|
954
|
+
}
|
|
955
|
+
gs.value > 0 && t >= gs.value + 8 && (hs.value = !1);
|
|
956
|
+
}
|
|
546
957
|
}
|
|
547
|
-
|
|
548
|
-
|
|
958
|
+
Rt(ps, () => {
|
|
959
|
+
v(_s);
|
|
960
|
+
}, { immediate: !0 }), Ft(() => {
|
|
961
|
+
v(_s), typeof document < "u" && document.fonts?.ready && document.fonts.ready.then(() => {
|
|
962
|
+
gi.value && v(_s);
|
|
963
|
+
});
|
|
964
|
+
});
|
|
965
|
+
let { fitWidth: vs, applyAutoFit: ys, markUserAdjusted: bs } = Ee({
|
|
966
|
+
viewportWidth: fs,
|
|
967
|
+
widestPageWidth: ms,
|
|
968
|
+
padding: 48,
|
|
969
|
+
minZoom: ei,
|
|
970
|
+
maxZoom: ti,
|
|
971
|
+
getZoom: () => I.value,
|
|
972
|
+
applyZoom: ds
|
|
973
|
+
});
|
|
974
|
+
function xs(e) {
|
|
975
|
+
return bs(), ds(e);
|
|
549
976
|
}
|
|
550
|
-
function
|
|
551
|
-
return
|
|
977
|
+
function Ss() {
|
|
978
|
+
return ys();
|
|
552
979
|
}
|
|
553
|
-
function
|
|
554
|
-
return
|
|
980
|
+
function Cs() {
|
|
981
|
+
return I.value;
|
|
555
982
|
}
|
|
556
|
-
function
|
|
557
|
-
|
|
983
|
+
function ws() {
|
|
984
|
+
xs(I.value + ni);
|
|
558
985
|
}
|
|
559
|
-
function
|
|
560
|
-
|
|
986
|
+
function Ts() {
|
|
987
|
+
xs(I.value - ni);
|
|
561
988
|
}
|
|
562
|
-
|
|
563
|
-
|
|
989
|
+
Rt(hs, (e) => {
|
|
990
|
+
e || (Mi.value = !1, v(_s));
|
|
991
|
+
});
|
|
992
|
+
function Es(e) {
|
|
993
|
+
let t = e.target instanceof HTMLElement ? e.target : null;
|
|
994
|
+
t && (t.closest(".gd-contract-template-designer__toolbar-more, .ant-popover, .ant-select-dropdown") || (Mi.value = !1));
|
|
995
|
+
}
|
|
996
|
+
Rt(Mi, (e) => {
|
|
997
|
+
typeof document > "u" || (e ? document.addEventListener("mousedown", Es, !0) : document.removeEventListener("mousedown", Es, !0));
|
|
998
|
+
}), Pt(() => {
|
|
999
|
+
typeof document < "u" && document.removeEventListener("mousedown", Es, !0);
|
|
1000
|
+
});
|
|
1001
|
+
function Ds() {
|
|
1002
|
+
$(), L.value = !1, Ii.value = !1, Mi.value = !1, ki.value = !ki.value;
|
|
564
1003
|
}
|
|
565
|
-
function
|
|
566
|
-
|
|
1004
|
+
function Os() {
|
|
1005
|
+
$(), Ei.value = nt(Ua()), Ti.value = !0;
|
|
567
1006
|
}
|
|
568
|
-
function
|
|
569
|
-
|
|
1007
|
+
function ks() {
|
|
1008
|
+
Ti.value = !1, Ei.value = void 0;
|
|
570
1009
|
}
|
|
571
|
-
function
|
|
572
|
-
return
|
|
1010
|
+
function As() {
|
|
1011
|
+
return Gs();
|
|
573
1012
|
}
|
|
574
|
-
function
|
|
575
|
-
|
|
576
|
-
let e =
|
|
577
|
-
return
|
|
1013
|
+
function js() {
|
|
1014
|
+
$();
|
|
1015
|
+
let e = As();
|
|
1016
|
+
return Oi.value = JSON.stringify(e, null, 2), Di.value = !0, e;
|
|
578
1017
|
}
|
|
579
|
-
function
|
|
580
|
-
|
|
1018
|
+
function Ms() {
|
|
1019
|
+
Di.value = !1;
|
|
581
1020
|
}
|
|
582
|
-
function
|
|
583
|
-
|
|
584
|
-
let e =
|
|
585
|
-
|
|
1021
|
+
function Ns() {
|
|
1022
|
+
$(), L.value = !1, Ii.value = !1;
|
|
1023
|
+
let e = U.value.map(X);
|
|
1024
|
+
bi.value = [];
|
|
1025
|
+
let t = !!N.value;
|
|
1026
|
+
M.value = "", N.value = "", P.value = "", Ti.value = !1, Ei.value = void 0, Di.value = !1, Oi.value = "", Ni.value = {}, wi.value = "";
|
|
1027
|
+
let n = K(at($e));
|
|
1028
|
+
return t && _("signing-placement-select", void 0), e.forEach((e) => _("signing-placement-remove", e)), P.value = n.pages[0]?.id ?? "", nt(n);
|
|
586
1029
|
}
|
|
587
|
-
function
|
|
588
|
-
|
|
1030
|
+
function Ps() {
|
|
1031
|
+
V.value || ($(), Wt.confirm({
|
|
589
1032
|
title: "清空合同内容",
|
|
590
|
-
content: "
|
|
1033
|
+
content: "将清空全部合同正文、页面、模板变量和签署位置,仅保留一个空白 A4 合同页。此操作不可撤销。",
|
|
591
1034
|
okText: "确认清空",
|
|
592
1035
|
okType: "danger",
|
|
593
1036
|
cancelText: "取消",
|
|
594
1037
|
onOk: () => {
|
|
595
|
-
|
|
1038
|
+
Ns();
|
|
596
1039
|
}
|
|
597
1040
|
}));
|
|
598
1041
|
}
|
|
599
|
-
function
|
|
600
|
-
let t =
|
|
1042
|
+
function Fs(e) {
|
|
1043
|
+
let t = Ua().pages, n = t.find((e) => e.id === P.value);
|
|
601
1044
|
return (n ? [n, ...t.filter((e) => e.id !== n.id)] : t).find((t) => t.contentHtml.includes(`data-key="${e.key}"`) || t.contentHtml.includes(`data-key='${e.key}'`));
|
|
602
1045
|
}
|
|
603
|
-
function
|
|
604
|
-
|
|
605
|
-
let t =
|
|
606
|
-
t && (
|
|
607
|
-
|
|
1046
|
+
function Is(e) {
|
|
1047
|
+
$(), M.value = e.key, Z();
|
|
1048
|
+
let t = Fs(e);
|
|
1049
|
+
t && (P.value = t.id, v(() => {
|
|
1050
|
+
F.get(t.id)?.scrollIntoVariable(e.key);
|
|
608
1051
|
}));
|
|
609
1052
|
}
|
|
610
|
-
function
|
|
611
|
-
let t =
|
|
612
|
-
t &&
|
|
1053
|
+
function Ls(e) {
|
|
1054
|
+
let t = j.value.variables.find((t) => t.key === e || t.id === e);
|
|
1055
|
+
t && Is(t);
|
|
1056
|
+
}
|
|
1057
|
+
function Rs(e) {
|
|
1058
|
+
let t = U.value.find((t) => t.id === e);
|
|
1059
|
+
t && ($(), M.value = "", P.value = t.pageId, Z(t.id), v(() => {
|
|
1060
|
+
F.get(t.pageId)?.scrollIntoSigningPlacement(t.id);
|
|
1061
|
+
}));
|
|
613
1062
|
}
|
|
614
|
-
function
|
|
615
|
-
|
|
616
|
-
|
|
1063
|
+
function zs(e, t = !0) {
|
|
1064
|
+
$(), P.value = e, t && v(() => {
|
|
1065
|
+
F.get(e)?.scrollIntoPage();
|
|
617
1066
|
});
|
|
618
1067
|
}
|
|
619
|
-
function
|
|
620
|
-
|
|
1068
|
+
function Bs(e) {
|
|
1069
|
+
j.value.pages.some((t) => t.id === e) && zs(e);
|
|
621
1070
|
}
|
|
622
|
-
function
|
|
623
|
-
return
|
|
1071
|
+
function Vs() {
|
|
1072
|
+
return nt(Ua());
|
|
624
1073
|
}
|
|
625
|
-
function
|
|
626
|
-
|
|
1074
|
+
function Hs(e) {
|
|
1075
|
+
bi.value = yi(e);
|
|
1076
|
+
let t = K(ft(e, c.pageSize));
|
|
1077
|
+
t.signingPlacements?.some((e) => e.id === N.value) || Z(), bo(t.pages[0]?.id);
|
|
627
1078
|
}
|
|
628
|
-
function
|
|
629
|
-
let e =
|
|
630
|
-
return
|
|
1079
|
+
function Us() {
|
|
1080
|
+
let e = Ys([...bi.value, ...ht(Ua(), { maxPages: Ea.value })]);
|
|
1081
|
+
return Si.value = e, xi.value = !0, _("validate", e), e;
|
|
631
1082
|
}
|
|
632
|
-
function
|
|
1083
|
+
function Ws(e) {
|
|
1084
|
+
if (e.type === "signing-placement") {
|
|
1085
|
+
let t = U.value.find((t) => t.id === e.id);
|
|
1086
|
+
if (t) {
|
|
1087
|
+
zs(t.pageId), Z(t.id);
|
|
1088
|
+
return;
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
633
1091
|
if (e.variableKey) {
|
|
634
|
-
|
|
1092
|
+
Ls(e.variableKey);
|
|
635
1093
|
return;
|
|
636
1094
|
}
|
|
637
1095
|
if (e.pageId) {
|
|
638
|
-
|
|
1096
|
+
Bs(e.pageId);
|
|
639
1097
|
return;
|
|
640
1098
|
}
|
|
641
|
-
let t =
|
|
1099
|
+
let t = j.value.variables.find((t) => t.id === e.id || t.key === e.id);
|
|
642
1100
|
if (t) {
|
|
643
|
-
|
|
1101
|
+
Is(t);
|
|
644
1102
|
return;
|
|
645
1103
|
}
|
|
646
|
-
|
|
1104
|
+
j.value.pages.some((t) => t.id === e.id) && zs(e.id);
|
|
1105
|
+
}
|
|
1106
|
+
function Gs() {
|
|
1107
|
+
return ct(Ua());
|
|
1108
|
+
}
|
|
1109
|
+
function Ks(e) {
|
|
1110
|
+
let t = Ua();
|
|
1111
|
+
try {
|
|
1112
|
+
let n = rt(t, bi.value);
|
|
1113
|
+
if (n.length) throw new Re(n);
|
|
1114
|
+
return e(t);
|
|
1115
|
+
} catch (e) {
|
|
1116
|
+
throw e instanceof Re && (Si.value = [...e.errors], xi.value = !0, _("validate", [...e.errors])), e;
|
|
1117
|
+
}
|
|
647
1118
|
}
|
|
648
|
-
function
|
|
649
|
-
return
|
|
1119
|
+
function qs(e) {
|
|
1120
|
+
return Ks((t) => Ue(t, e));
|
|
650
1121
|
}
|
|
651
|
-
function
|
|
652
|
-
|
|
1122
|
+
function Js(e) {
|
|
1123
|
+
return Ks((t) => He(t, e));
|
|
653
1124
|
}
|
|
654
|
-
function
|
|
655
|
-
|
|
1125
|
+
function Ys(e) {
|
|
1126
|
+
let t = /* @__PURE__ */ new Set();
|
|
1127
|
+
return e.filter((e) => {
|
|
1128
|
+
let n = `${e.code ?? ""}|${e.id}|${e.pageId ?? ""}|${e.message}`;
|
|
1129
|
+
return t.has(n) ? !1 : (t.add(n), !0);
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
function Xs(e) {
|
|
1133
|
+
Si.value = [...e], xi.value = !0;
|
|
656
1134
|
}
|
|
657
|
-
function
|
|
658
|
-
|
|
1135
|
+
function Zs() {
|
|
1136
|
+
Si.value = [], xi.value = !1;
|
|
659
1137
|
}
|
|
660
|
-
function
|
|
661
|
-
|
|
1138
|
+
function Qs() {
|
|
1139
|
+
F.get(W.value?.id ?? P.value)?.focus();
|
|
1140
|
+
}
|
|
1141
|
+
function $s(e) {
|
|
1142
|
+
Ra(e) && q({
|
|
662
1143
|
type: "set-text-align",
|
|
663
1144
|
value: e
|
|
664
1145
|
});
|
|
665
1146
|
}
|
|
666
|
-
function
|
|
1147
|
+
function ec(e) {
|
|
667
1148
|
if (e === "paragraph") {
|
|
668
1149
|
q({ type: "set-paragraph" });
|
|
669
1150
|
return;
|
|
670
1151
|
}
|
|
671
|
-
|
|
1152
|
+
za(e) && q({
|
|
672
1153
|
type: "set-heading",
|
|
673
1154
|
level: e
|
|
674
1155
|
});
|
|
675
1156
|
}
|
|
676
|
-
function
|
|
677
|
-
let t =
|
|
1157
|
+
function tc(e) {
|
|
1158
|
+
let t = Ha(e);
|
|
678
1159
|
t && (q({
|
|
679
1160
|
type: "set-font-size",
|
|
680
1161
|
value: t
|
|
681
|
-
}),
|
|
1162
|
+
}), Fi.value = "");
|
|
682
1163
|
}
|
|
683
|
-
function
|
|
1164
|
+
function nc(e) {
|
|
684
1165
|
let t = String(e || "").trim();
|
|
685
1166
|
if (!t) {
|
|
686
1167
|
q({ type: "unset-font-family" });
|
|
@@ -691,989 +1172,1782 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
|
|
|
691
1172
|
value: t
|
|
692
1173
|
});
|
|
693
1174
|
}
|
|
694
|
-
function
|
|
695
|
-
|
|
696
|
-
t && q({
|
|
697
|
-
type: "set-color",
|
|
698
|
-
value: t
|
|
699
|
-
});
|
|
1175
|
+
function rc(e) {
|
|
1176
|
+
ic(e.target?.value ?? "");
|
|
700
1177
|
}
|
|
701
|
-
function
|
|
1178
|
+
function ic(e) {
|
|
702
1179
|
let t = e.trim();
|
|
703
1180
|
t && q({
|
|
704
1181
|
type: "set-color",
|
|
705
1182
|
value: t
|
|
706
1183
|
});
|
|
707
1184
|
}
|
|
708
|
-
function
|
|
709
|
-
|
|
1185
|
+
function ac(e) {
|
|
1186
|
+
Fi.value = e;
|
|
710
1187
|
}
|
|
711
|
-
function
|
|
712
|
-
|
|
1188
|
+
function oc() {
|
|
1189
|
+
Fi.value.trim() && tc(Fi.value);
|
|
713
1190
|
}
|
|
714
|
-
function
|
|
715
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
1191
|
+
function sc(e) {
|
|
1192
|
+
e.key === "Enter" && (e.preventDefault(), oc());
|
|
716
1193
|
}
|
|
717
|
-
function
|
|
718
|
-
e || (
|
|
1194
|
+
function cc(e) {
|
|
1195
|
+
e || (oc(), Fi.value = "");
|
|
719
1196
|
}
|
|
720
|
-
function
|
|
721
|
-
|
|
1197
|
+
function lc(e) {
|
|
1198
|
+
Ba(e) && (q({
|
|
722
1199
|
type: "apply-text-style-preset",
|
|
723
1200
|
preset: e
|
|
724
|
-
}),
|
|
1201
|
+
}), Pi.value = void 0, $());
|
|
725
1202
|
}
|
|
726
|
-
function
|
|
727
|
-
if (
|
|
728
|
-
|
|
729
|
-
let t = Math.max(
|
|
730
|
-
|
|
1203
|
+
function uc(e) {
|
|
1204
|
+
if (V.value) return;
|
|
1205
|
+
P.value = e.pageId, L.value = !1, Ii.value = !1, z.value = void 0, B.value = void 0, Gi.value = !1, Ki.value = "";
|
|
1206
|
+
let t = Math.max(A, Math.min(e.clientX, window.innerWidth - li)), n = Math.max(A, Math.min(e.clientY, window.innerHeight - ui));
|
|
1207
|
+
R.value = {
|
|
731
1208
|
pageId: e.pageId,
|
|
732
1209
|
x: t,
|
|
733
|
-
y: n
|
|
1210
|
+
y: n,
|
|
1211
|
+
hasSelection: e.hasSelection,
|
|
1212
|
+
selectionWidth: e.selectionWidth,
|
|
1213
|
+
leadingText: e.leadingText
|
|
1214
|
+
}, v(() => {
|
|
1215
|
+
dc(), Wi.value?.querySelector("button:not(:disabled)")?.focus();
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
function dc() {
|
|
1219
|
+
let e = Wi.value, t = R.value;
|
|
1220
|
+
if (!e || !t) return;
|
|
1221
|
+
let n = e.getBoundingClientRect();
|
|
1222
|
+
R.value = {
|
|
1223
|
+
...t,
|
|
1224
|
+
x: Math.max(A, Math.min(t.x, window.innerWidth - n.width - A)),
|
|
1225
|
+
y: Math.max(A, Math.min(t.y, window.innerHeight - n.height - A))
|
|
1226
|
+
};
|
|
1227
|
+
}
|
|
1228
|
+
function fc(e) {
|
|
1229
|
+
V.value || (P.value = e.pageId, L.value = !1, Ii.value = !1, R.value = void 0, B.value = void 0, z.value = {
|
|
1230
|
+
...e,
|
|
1231
|
+
x: Math.max(8, Math.min(e.clientX, window.innerWidth - 248)),
|
|
1232
|
+
y: Math.max(8, Math.min(e.clientY, window.innerHeight - 400))
|
|
1233
|
+
}, v(() => {
|
|
1234
|
+
let e = qi.value?.getMenuElement(), t = z.value;
|
|
1235
|
+
if (e && t) {
|
|
1236
|
+
let n = e.getBoundingClientRect();
|
|
1237
|
+
z.value = {
|
|
1238
|
+
...t,
|
|
1239
|
+
x: Math.max(8, Math.min(t.x, window.innerWidth - n.width - 8)),
|
|
1240
|
+
y: Math.max(8, Math.min(t.y, window.innerHeight - n.height - 8))
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
qi.value?.focusFirstItem();
|
|
1244
|
+
}));
|
|
1245
|
+
}
|
|
1246
|
+
function pc(e) {
|
|
1247
|
+
V.value || (P.value = e.pageId, L.value = !1, Ii.value = !1, R.value = void 0, z.value = void 0, Yi.value = e.image.width, Xi.value = e.image.height, M.value = "", N.value && Z(), B.value = {
|
|
1248
|
+
pageId: e.pageId,
|
|
1249
|
+
image: e.image,
|
|
1250
|
+
x: Math.max(A, Math.min(e.clientX, window.innerWidth - di)),
|
|
1251
|
+
y: Math.max(A, Math.min(e.clientY, window.innerHeight - fi))
|
|
1252
|
+
}, v(() => {
|
|
1253
|
+
mc(), Ji.value?.querySelector("input, button:not(:disabled)")?.focus();
|
|
1254
|
+
}));
|
|
1255
|
+
}
|
|
1256
|
+
function mc() {
|
|
1257
|
+
let e = Ji.value, t = B.value;
|
|
1258
|
+
if (!e || !t) return;
|
|
1259
|
+
let n = e.getBoundingClientRect();
|
|
1260
|
+
B.value = {
|
|
1261
|
+
...t,
|
|
1262
|
+
x: Math.max(A, Math.min(t.x, window.innerWidth - n.width - A)),
|
|
1263
|
+
y: Math.max(A, Math.min(t.y, window.innerHeight - n.height - A))
|
|
734
1264
|
};
|
|
735
1265
|
}
|
|
736
|
-
function
|
|
737
|
-
|
|
1266
|
+
function hc() {
|
|
1267
|
+
let e = B.value;
|
|
1268
|
+
!e || V.value || (F.get(e.pageId)?.updateSelectedContentImage({
|
|
1269
|
+
width: Ne(Yi.value),
|
|
1270
|
+
height: Ne(Xi.value)
|
|
1271
|
+
}) && (Zi.value = "已更新图片尺寸"), $());
|
|
738
1272
|
}
|
|
739
|
-
function
|
|
740
|
-
|
|
1273
|
+
function gc() {
|
|
1274
|
+
let e = B.value;
|
|
1275
|
+
!e || V.value || (F.get(e.pageId)?.updateSelectedContentImage({
|
|
1276
|
+
width: void 0,
|
|
1277
|
+
height: void 0
|
|
1278
|
+
}) && (Zi.value = "已恢复图片自然尺寸"), $());
|
|
741
1279
|
}
|
|
742
|
-
function
|
|
743
|
-
|
|
1280
|
+
function _c(e) {
|
|
1281
|
+
e.type === "table" ? fc(e) : e.type === "image" ? pc(e) : uc(e);
|
|
1282
|
+
}
|
|
1283
|
+
function $() {
|
|
1284
|
+
R.value = void 0, z.value = void 0, B.value = void 0, Gi.value = !1, Ki.value = "";
|
|
1285
|
+
}
|
|
1286
|
+
function vc(e) {
|
|
1287
|
+
!R.value && !z.value && !B.value || (e.target instanceof HTMLElement ? e.target : null)?.closest(".gd-contract-template-designer__context-menu") || $();
|
|
1288
|
+
}
|
|
1289
|
+
function yc(e) {
|
|
1290
|
+
let t = pi.value;
|
|
744
1291
|
if (!t || typeof document > "u") return !1;
|
|
745
1292
|
let n = e.target instanceof Node ? e.target : void 0, r = document.activeElement;
|
|
746
|
-
return !!(n && t.contains(n) || r && t.contains(r));
|
|
1293
|
+
return !!(n && t.contains(n) || r && t.contains(r) || n instanceof Element && n.closest(".gd-contract-template-designer__context-menu"));
|
|
747
1294
|
}
|
|
748
|
-
function
|
|
1295
|
+
function bc(e) {
|
|
749
1296
|
if ((e.ctrlKey || e.metaKey) && !e.altKey && e.key.toLowerCase() === "s") {
|
|
750
|
-
if (!
|
|
751
|
-
e.preventDefault(),
|
|
1297
|
+
if (!ra.value || !yc(e)) return;
|
|
1298
|
+
e.preventDefault(), Ga();
|
|
752
1299
|
return;
|
|
753
1300
|
}
|
|
754
|
-
e.key === "Escape" && (
|
|
1301
|
+
e.key === "Escape" && ($(), L.value = !1, Ii.value = !1, ki.value = !1);
|
|
755
1302
|
}
|
|
756
|
-
function
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
1303
|
+
function xc(e, t) {
|
|
1304
|
+
e === P.value && t.selectedContentImage && (M.value = "", N.value && Z());
|
|
1305
|
+
let n = Ni.value[e];
|
|
1306
|
+
n && JSON.stringify(n) === JSON.stringify(t) || (Ni.value = {
|
|
1307
|
+
...Ni.value,
|
|
760
1308
|
[e]: t
|
|
761
1309
|
});
|
|
762
1310
|
}
|
|
763
|
-
function $i
|
|
1311
|
+
function Sc(e = $i.value.rows, t = $i.value.cols) {
|
|
764
1312
|
q({
|
|
765
1313
|
type: "insert-table",
|
|
766
1314
|
options: {
|
|
767
|
-
rows: Math.min(10, Math.max(1, Math.round(Number(
|
|
768
|
-
cols: Math.min(10, Math.max(1, Math.round(Number(
|
|
769
|
-
withHeaderRow:
|
|
1315
|
+
rows: Math.min(10, Math.max(1, Math.round(Number(e) || 3))),
|
|
1316
|
+
cols: Math.min(10, Math.max(1, Math.round(Number(t) || 3))),
|
|
1317
|
+
withHeaderRow: !!$i.value.withHeaderRow
|
|
770
1318
|
}
|
|
771
|
-
}),
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
1319
|
+
}), L.value = !1, $();
|
|
1320
|
+
}
|
|
1321
|
+
let Cc = {
|
|
1322
|
+
"delete-table-row": {
|
|
1323
|
+
label: "删除当前行",
|
|
1324
|
+
countKey: "deleteRow"
|
|
1325
|
+
},
|
|
1326
|
+
"delete-table-column": {
|
|
1327
|
+
label: "删除当前列",
|
|
1328
|
+
countKey: "deleteColumn"
|
|
1329
|
+
},
|
|
1330
|
+
"delete-table": {
|
|
1331
|
+
label: "删除表格",
|
|
1332
|
+
countKey: "deleteTable"
|
|
1333
|
+
}
|
|
1334
|
+
};
|
|
1335
|
+
function wc(e) {
|
|
1336
|
+
let t = z.value;
|
|
1337
|
+
if (!t) return;
|
|
1338
|
+
let n = () => {
|
|
1339
|
+
q(e, t.pageId), $();
|
|
1340
|
+
}, r = Cc[e.type];
|
|
1341
|
+
if (!r) {
|
|
1342
|
+
n();
|
|
1343
|
+
return;
|
|
1344
|
+
}
|
|
1345
|
+
let i = t.affectedVariableCounts[r.countKey];
|
|
1346
|
+
$(), Wt.confirm({
|
|
1347
|
+
title: r.label,
|
|
1348
|
+
content: i ? `此操作将移除 ${i} 个正文变量节点,是否继续?` : "此操作将修改表格结构,是否继续?",
|
|
1349
|
+
okText: "确认",
|
|
1350
|
+
okType: "danger",
|
|
1351
|
+
cancelText: "取消",
|
|
1352
|
+
onOk: n,
|
|
1353
|
+
onCancel: () => F.get(t.pageId)?.focus()
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1356
|
+
function Tc(e) {
|
|
1357
|
+
let t = qi.value?.getMenuElement();
|
|
1358
|
+
if (!t) return;
|
|
1359
|
+
if (e.key === "Escape") {
|
|
1360
|
+
e.preventDefault();
|
|
1361
|
+
let t = z.value?.pageId;
|
|
1362
|
+
$(), F.get(t ?? "")?.focus();
|
|
1363
|
+
return;
|
|
1364
|
+
}
|
|
1365
|
+
let n = Array.from(t.querySelectorAll("button:not(:disabled)"));
|
|
1366
|
+
if (!n.length) return;
|
|
1367
|
+
if (e.key === "Home" || e.key === "End") {
|
|
1368
|
+
e.preventDefault(), n[e.key === "Home" ? 0 : n.length - 1]?.focus();
|
|
1369
|
+
return;
|
|
1370
|
+
}
|
|
1371
|
+
if (![
|
|
1372
|
+
"ArrowUp",
|
|
1373
|
+
"ArrowDown",
|
|
1374
|
+
"ArrowLeft",
|
|
1375
|
+
"ArrowRight"
|
|
1376
|
+
].includes(e.key)) return;
|
|
1377
|
+
let r = (Math.max(0, n.indexOf(document.activeElement)) + (e.key === "ArrowUp" || e.key === "ArrowLeft" ? -1 : 1) + n.length) % n.length;
|
|
1378
|
+
e.preventDefault(), n[r]?.focus();
|
|
1379
|
+
}
|
|
1380
|
+
function Ec(e) {
|
|
1381
|
+
if (e.key !== "Escape") return;
|
|
1382
|
+
e.preventDefault();
|
|
1383
|
+
let t = R.value?.pageId;
|
|
1384
|
+
$(), F.get(t ?? "")?.focus();
|
|
1385
|
+
}
|
|
1386
|
+
function Dc(e) {
|
|
1387
|
+
if (e.key !== "Escape") return;
|
|
1388
|
+
e.preventDefault();
|
|
1389
|
+
let t = B.value?.pageId;
|
|
1390
|
+
$(), F.get(t ?? "")?.focus();
|
|
1391
|
+
}
|
|
1392
|
+
function Oc(e) {
|
|
1393
|
+
q({ type: e }), Ii.value = !1, $();
|
|
1394
|
+
}
|
|
1395
|
+
return bt({
|
|
1396
|
+
getValue: Vs,
|
|
1397
|
+
setValue: Hs,
|
|
1398
|
+
validate: Us,
|
|
1399
|
+
exportTemplate: Gs,
|
|
1400
|
+
getSubmitData: As,
|
|
1401
|
+
clearTemplate: Ns,
|
|
1402
|
+
saveDraftCache: Ga,
|
|
1403
|
+
loadDraftCache: Ka,
|
|
1404
|
+
clearDraftCache: qa,
|
|
1405
|
+
getDraftCacheStatus: Ja,
|
|
1406
|
+
insertVariable: rs,
|
|
1407
|
+
insertImage: Lo,
|
|
1408
|
+
focus: Qs,
|
|
1409
|
+
openPreview: Os,
|
|
1410
|
+
closePreview: ks,
|
|
1411
|
+
openSubmitDataViewer: js,
|
|
1412
|
+
closeSubmitDataViewer: Ms,
|
|
1413
|
+
setServerValidationErrors: Xs,
|
|
1414
|
+
clearValidationErrors: Zs,
|
|
1415
|
+
scrollToVariable: Ls,
|
|
1416
|
+
scrollToSigningPlacement: Rs,
|
|
1417
|
+
scrollToPage: Bs,
|
|
1418
|
+
setZoom: xs,
|
|
1419
|
+
resetZoom: Ss,
|
|
1420
|
+
getZoom: Cs,
|
|
1421
|
+
fitWidth: vs,
|
|
1422
|
+
insertSigningPlacement: so,
|
|
1423
|
+
selectSigningPlacement: Z,
|
|
1424
|
+
buildLocationRules: qs,
|
|
1425
|
+
buildContractLocationRules: Js
|
|
1426
|
+
}), (Ee, s) => (b(), p("div", {
|
|
801
1427
|
ref_key: "designerElement",
|
|
802
|
-
ref:
|
|
803
|
-
class:
|
|
804
|
-
"is-disabled":
|
|
805
|
-
"is-readonly":
|
|
806
|
-
"is-fullscreen":
|
|
1428
|
+
ref: pi,
|
|
1429
|
+
class: y(["gd-contract-template-designer", {
|
|
1430
|
+
"is-disabled": Qe.disabled,
|
|
1431
|
+
"is-readonly": V.value,
|
|
1432
|
+
"is-fullscreen": ki.value
|
|
807
1433
|
}])
|
|
808
1434
|
}, [
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
},
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
onClick: (t) => Di(e.id)
|
|
828
|
-
}, [h("span", null, [g(b(e.title || `第 ${t + 1} 页`) + " ", 1), h("small", null, b(zr(e).label), 1)]), _(x(rt), null, {
|
|
829
|
-
default: S(() => [g(b(t + 1), 1)]),
|
|
830
|
-
_: 2
|
|
831
|
-
}, 1024)], 10, st))), 128)),
|
|
832
|
-
H.value ? (v(), m("div", ct, [h("label", lt, [s[57] ||= h("span", null, "页面格式", -1), _(x(E), {
|
|
833
|
-
value: U.value.format,
|
|
834
|
-
options: x(lr),
|
|
835
|
-
disabled: B.value,
|
|
836
|
-
onChange: Br
|
|
837
|
-
}, null, 8, [
|
|
838
|
-
"value",
|
|
839
|
-
"options",
|
|
840
|
-
"disabled"
|
|
841
|
-
])]), h("div", ut, b(U.value.width) + " × " + b(U.value.height), 1)])) : p("", !0)
|
|
842
|
-
]), h("section", dt, [
|
|
843
|
-
h("div", ft, [s[58] ||= h("strong", null, "模板变量", -1), _(x(rt), null, {
|
|
844
|
-
default: S(() => [g(b(O.value.variables.length), 1)]),
|
|
1435
|
+
m("div", { class: y(["gd-contract-template-designer__layout", {
|
|
1436
|
+
"is-sidebar-collapsed": Ai.value,
|
|
1437
|
+
"is-inspector-collapsed": ji.value
|
|
1438
|
+
}]) }, [
|
|
1439
|
+
m("aside", { class: y(["gd-contract-template-designer__sidebar", { "is-collapsed": Ai.value }]) }, [g(w(k), { title: Ai.value ? "展开页面栏" : "收起页面栏" }, {
|
|
1440
|
+
default: T(() => [m("button", {
|
|
1441
|
+
type: "button",
|
|
1442
|
+
class: "gd-contract-template-designer__panel-handle",
|
|
1443
|
+
"aria-label": Ai.value ? "展开页面栏" : "收起页面栏",
|
|
1444
|
+
"aria-expanded": !Ai.value,
|
|
1445
|
+
onClick: s[0] ||= (e) => Ai.value = !Ai.value
|
|
1446
|
+
}, [Ai.value ? (b(), d(w(ve), {
|
|
1447
|
+
key: 0,
|
|
1448
|
+
"aria-hidden": "true"
|
|
1449
|
+
})) : (b(), d(w(de), {
|
|
1450
|
+
key: 1,
|
|
1451
|
+
"aria-hidden": "true"
|
|
1452
|
+
}))], 8, Yt)]),
|
|
845
1453
|
_: 1
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
},
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
1454
|
+
}, 8, ["title"]), m("div", Xt, [
|
|
1455
|
+
m("section", Zt, [
|
|
1456
|
+
m("div", Qt, [
|
|
1457
|
+
s[81] ||= m("strong", null, "页面", -1),
|
|
1458
|
+
g(w(qt), null, {
|
|
1459
|
+
default: T(() => [h(C(j.value.pages.length) + " / " + C(Ea.value), 1)]),
|
|
1460
|
+
_: 1
|
|
1461
|
+
}),
|
|
1462
|
+
m("div", $t, [g(w(k), { title: Da.value ? `已达 ${Ea.value} 页上限` : "新增页面" }, {
|
|
1463
|
+
default: T(() => [g(w(E), {
|
|
1464
|
+
size: "small",
|
|
1465
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1466
|
+
disabled: V.value || Da.value,
|
|
1467
|
+
"aria-label": "新增页面",
|
|
1468
|
+
onClick: Co
|
|
1469
|
+
}, {
|
|
1470
|
+
default: T(() => [g(w(he), { "aria-hidden": "true" })]),
|
|
1471
|
+
_: 1
|
|
1472
|
+
}, 8, ["disabled"])]),
|
|
1473
|
+
_: 1
|
|
1474
|
+
}, 8, ["title"])])
|
|
1475
|
+
]),
|
|
1476
|
+
(b(!0), p(l, null, S(j.value.pages, (e, t) => (b(), p("div", {
|
|
1477
|
+
key: e.id,
|
|
1478
|
+
class: "gd-contract-template-designer__page-nav-row"
|
|
1479
|
+
}, [m("button", {
|
|
1480
|
+
type: "button",
|
|
1481
|
+
class: y(["gd-contract-template-designer__nav-item", { "is-active": P.value === e.id }]),
|
|
1482
|
+
onClick: (t) => zs(e.id)
|
|
1483
|
+
}, [m("span", null, [h(C(e.title || `第 ${t + 1} 页`) + " ", 1), m("small", null, C(Y(e).label) + " · " + C(no(e.id).length) + " 个签署位置", 1)]), g(w(qt), null, {
|
|
1484
|
+
default: T(() => [h(C(t + 1), 1)]),
|
|
1485
|
+
_: 2
|
|
1486
|
+
}, 1024)], 10, en), m("div", tn, [g(w(k), { title: "复制页面" }, {
|
|
1487
|
+
default: T(() => [g(w(E), {
|
|
1488
|
+
size: "small",
|
|
1489
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1490
|
+
disabled: V.value || Da.value,
|
|
1491
|
+
"aria-label": "复制页面",
|
|
1492
|
+
onClick: (t) => wo(e)
|
|
1493
|
+
}, {
|
|
1494
|
+
default: T(() => [g(w(ee), { "aria-hidden": "true" })]),
|
|
1495
|
+
_: 1
|
|
1496
|
+
}, 8, ["disabled", "onClick"])]),
|
|
1497
|
+
_: 2
|
|
1498
|
+
}, 1024), g(w(k), { title: "删除页面" }, {
|
|
1499
|
+
default: T(() => [g(w(E), {
|
|
1500
|
+
size: "small",
|
|
1501
|
+
danger: "",
|
|
1502
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1503
|
+
disabled: V.value || j.value.pages.length <= 1,
|
|
1504
|
+
"aria-label": "删除页面",
|
|
1505
|
+
onClick: (t) => Eo(e)
|
|
1506
|
+
}, {
|
|
1507
|
+
default: T(() => [g(w(ne), { "aria-hidden": "true" })]),
|
|
1508
|
+
_: 1
|
|
1509
|
+
}, 8, ["disabled", "onClick"])]),
|
|
1510
|
+
_: 2
|
|
1511
|
+
}, 1024)])]))), 128)),
|
|
1512
|
+
W.value ? (b(), p("div", nn, [m("label", rn, [s[82] ||= m("span", null, "页面格式", -1), g(w(O), {
|
|
1513
|
+
value: ca.value.format,
|
|
1514
|
+
options: w(Sa),
|
|
1515
|
+
disabled: V.value,
|
|
1516
|
+
onChange: go
|
|
1517
|
+
}, null, 8, [
|
|
1518
|
+
"value",
|
|
1519
|
+
"options",
|
|
1520
|
+
"disabled"
|
|
1521
|
+
])]), m("div", an, C(ca.value.width) + " × " + C(ca.value.height), 1)])) : f("", !0)
|
|
1522
|
+
]),
|
|
1523
|
+
m("section", on, [
|
|
1524
|
+
m("div", sn, [s[83] ||= m("strong", null, "控件参数", -1), g(w(qt), null, {
|
|
1525
|
+
default: T(() => [h(C(j.value.variables.length), 1)]),
|
|
900
1526
|
_: 1
|
|
901
1527
|
})]),
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
}))]),
|
|
1528
|
+
j.value.variables.length ? f("", !0) : (b(), d(w(Ht), {
|
|
1529
|
+
key: 0,
|
|
1530
|
+
description: "暂无正文控件",
|
|
1531
|
+
image: w(Ht).PRESENTED_IMAGE_SIMPLE
|
|
1532
|
+
}, null, 8, ["image"])),
|
|
1533
|
+
(b(!0), p(l, null, S(j.value.variables, (e) => (b(), p("button", {
|
|
1534
|
+
key: e.id,
|
|
1535
|
+
type: "button",
|
|
1536
|
+
class: y(["gd-contract-template-designer__nav-item", { "is-active": M.value === e.key }]),
|
|
1537
|
+
onClick: (t) => Is(e)
|
|
1538
|
+
}, [m("span", null, C(e.label), 1), m("small", null, C(e.type || "text") + " · " + C(e.key), 1)], 10, cn))), 128))
|
|
1539
|
+
]),
|
|
1540
|
+
c.showSigningPlacementTools ? (b(), p("section", ln, [
|
|
1541
|
+
m("div", un, [s[84] ||= m("strong", null, "签署位置", -1), g(w(qt), null, {
|
|
1542
|
+
default: T(() => [h(C(oa.value.length), 1)]),
|
|
918
1543
|
_: 1
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
1544
|
+
})]),
|
|
1545
|
+
oa.value.length ? f("", !0) : (b(), d(w(Ht), {
|
|
1546
|
+
key: 0,
|
|
1547
|
+
description: "暂无签署位置",
|
|
1548
|
+
image: w(Ht).PRESENTED_IMAGE_SIMPLE
|
|
1549
|
+
}, null, 8, ["image"])),
|
|
1550
|
+
(b(!0), p(l, null, S(oa.value, (e) => (b(), p("button", {
|
|
1551
|
+
key: e.placement.id,
|
|
1552
|
+
type: "button",
|
|
1553
|
+
class: y(["gd-contract-template-designer__nav-item", { "is-active": N.value === e.placement.id }]),
|
|
1554
|
+
onClick: (t) => Rs(e.placement.id)
|
|
1555
|
+
}, [m("span", null, C(e.label), 1), m("small", null, C(e.detail) + " · x" + C(e.placement.x) + " y" + C(e.placement.y), 1)], 10, dn))), 128))
|
|
1556
|
+
])) : f("", !0)
|
|
1557
|
+
])], 2),
|
|
1558
|
+
m("main", {
|
|
1559
|
+
ref_key: "workspaceElement",
|
|
1560
|
+
ref: hi,
|
|
1561
|
+
class: "gd-contract-template-designer__workspace"
|
|
1562
|
+
}, [
|
|
1563
|
+
m("header", fn, [m("div", pn, [m("strong", null, C(da.value), 1), Qe.showDraftCacheStatus && fa.value ? (b(), p("small", {
|
|
924
1564
|
key: 0,
|
|
925
|
-
|
|
926
|
-
},
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
1565
|
+
class: y(["gd-contract-template-designer__draft-cache-status", pa.value])
|
|
1566
|
+
}, C(fa.value), 3)) : f("", !0)]), m("div", mn, [m("div", hn, [m("div", gn, [
|
|
1567
|
+
g(w(k), { title: "缩小" }, {
|
|
1568
|
+
default: T(() => [g(w(E), {
|
|
1569
|
+
size: "small",
|
|
1570
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1571
|
+
disabled: I.value <= ei,
|
|
1572
|
+
"aria-label": "缩小",
|
|
1573
|
+
onClick: Ts
|
|
1574
|
+
}, {
|
|
1575
|
+
default: T(() => [g(w(Te), { "aria-hidden": "true" })]),
|
|
1576
|
+
_: 1
|
|
1577
|
+
}, 8, ["disabled"])]),
|
|
936
1578
|
_: 1
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
1579
|
+
}),
|
|
1580
|
+
m("span", null, C(ma.value), 1),
|
|
1581
|
+
g(w(k), { title: "放大" }, {
|
|
1582
|
+
default: T(() => [g(w(E), {
|
|
1583
|
+
size: "small",
|
|
1584
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1585
|
+
disabled: I.value >= ti,
|
|
1586
|
+
"aria-label": "放大",
|
|
1587
|
+
onClick: ws
|
|
1588
|
+
}, {
|
|
1589
|
+
default: T(() => [g(w(we), { "aria-hidden": "true" })]),
|
|
1590
|
+
_: 1
|
|
1591
|
+
}, 8, ["disabled"])]),
|
|
948
1592
|
_: 1
|
|
949
|
-
})
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
default: S(() => [_(x(o), { "aria-hidden": "true" })]),
|
|
1593
|
+
}),
|
|
1594
|
+
g(w(k), { title: "适应宽度" }, {
|
|
1595
|
+
default: T(() => [g(w(E), {
|
|
1596
|
+
size: "small",
|
|
1597
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1598
|
+
"aria-label": "适应宽度",
|
|
1599
|
+
onClick: w(vs)
|
|
1600
|
+
}, {
|
|
1601
|
+
default: T(() => [g(w(o), { "aria-hidden": "true" })]),
|
|
1602
|
+
_: 1
|
|
1603
|
+
}, 8, ["onClick"])]),
|
|
961
1604
|
_: 1
|
|
962
|
-
})
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
onClick: bi
|
|
974
|
-
}, {
|
|
975
|
-
default: S(() => [_(x(i), { "aria-hidden": "true" })]),
|
|
1605
|
+
}),
|
|
1606
|
+
g(w(k), { title: "重置缩放" }, {
|
|
1607
|
+
default: T(() => [g(w(E), {
|
|
1608
|
+
size: "small",
|
|
1609
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1610
|
+
"aria-label": "重置缩放",
|
|
1611
|
+
onClick: Ss
|
|
1612
|
+
}, {
|
|
1613
|
+
default: T(() => [g(w(_e), { "aria-hidden": "true" })]),
|
|
1614
|
+
_: 1
|
|
1615
|
+
})]),
|
|
976
1616
|
_: 1
|
|
977
|
-
})
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
1617
|
+
}),
|
|
1618
|
+
g(w(k), { title: ki.value ? "退出全屏" : "全屏显示" }, {
|
|
1619
|
+
default: T(() => [g(w(E), {
|
|
1620
|
+
size: "small",
|
|
1621
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1622
|
+
"aria-label": ki.value ? "退出全屏" : "全屏显示",
|
|
1623
|
+
onClick: Ds
|
|
1624
|
+
}, {
|
|
1625
|
+
default: T(() => [ki.value ? (b(), d(w(ce), {
|
|
1626
|
+
key: 0,
|
|
1627
|
+
"aria-hidden": "true"
|
|
1628
|
+
})) : (b(), d(w(le), {
|
|
1629
|
+
key: 1,
|
|
1630
|
+
"aria-hidden": "true"
|
|
1631
|
+
}))]),
|
|
1632
|
+
_: 1
|
|
1633
|
+
}, 8, ["aria-label"])]),
|
|
991
1634
|
_: 1
|
|
992
|
-
}, 8, ["
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
class: "gd-contract-template-designer__icon-button",
|
|
998
|
-
disabled: B.value || !W.value.canRedo,
|
|
999
|
-
"aria-label": "重做",
|
|
1000
|
-
onClick: s[1] ||= (e) => q({ type: "redo" })
|
|
1635
|
+
}, 8, ["title"])
|
|
1636
|
+
])]), m("div", _n, [
|
|
1637
|
+
Qe.showClearButton ? (b(), d(w(k), {
|
|
1638
|
+
key: 0,
|
|
1639
|
+
title: "清空合同"
|
|
1001
1640
|
}, {
|
|
1002
|
-
default:
|
|
1641
|
+
default: T(() => [g(w(E), {
|
|
1642
|
+
size: "small",
|
|
1643
|
+
danger: "",
|
|
1644
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1645
|
+
disabled: V.value,
|
|
1646
|
+
"aria-label": "清空合同",
|
|
1647
|
+
onClick: Ps
|
|
1648
|
+
}, {
|
|
1649
|
+
default: T(() => [g(w(ne), { "aria-hidden": "true" })]),
|
|
1650
|
+
_: 1
|
|
1651
|
+
}, 8, ["disabled"])]),
|
|
1003
1652
|
_: 1
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
h("div", wt, [_(x(E), {
|
|
1008
|
-
value: qn.value,
|
|
1009
|
-
"onUpdate:value": s[2] ||= (e) => qn.value = e,
|
|
1010
|
-
class: "gd-contract-template-designer__toolbar-select",
|
|
1011
|
-
options: ir.value,
|
|
1012
|
-
placeholder: "合同样式",
|
|
1013
|
-
disabled: B.value,
|
|
1014
|
-
onChange: qi
|
|
1015
|
-
}, null, 8, [
|
|
1016
|
-
"value",
|
|
1017
|
-
"options",
|
|
1018
|
-
"disabled"
|
|
1019
|
-
]), _(x(E), {
|
|
1020
|
-
class: "gd-contract-template-designer__toolbar-select",
|
|
1021
|
-
value: hr.value,
|
|
1022
|
-
options: or,
|
|
1023
|
-
disabled: B.value,
|
|
1024
|
-
onChange: Ri
|
|
1025
|
-
}, null, 8, ["value", "disabled"])]),
|
|
1026
|
-
h("div", Tt, [
|
|
1027
|
-
_(x(D), { title: "加粗" }, {
|
|
1028
|
-
default: S(() => [_(x(C), {
|
|
1653
|
+
})) : f("", !0),
|
|
1654
|
+
g(w(k), { title: "校验" }, {
|
|
1655
|
+
default: T(() => [g(w(E), {
|
|
1029
1656
|
size: "small",
|
|
1030
1657
|
class: "gd-contract-template-designer__icon-button",
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
"aria-label": "加粗",
|
|
1034
|
-
onClick: s[3] ||= (e) => q({ type: "toggle-bold" })
|
|
1658
|
+
"aria-label": "校验",
|
|
1659
|
+
onClick: Us
|
|
1035
1660
|
}, {
|
|
1036
|
-
default:
|
|
1661
|
+
default: T(() => [g(w(r), { "aria-hidden": "true" })]),
|
|
1037
1662
|
_: 1
|
|
1038
|
-
}
|
|
1663
|
+
})]),
|
|
1039
1664
|
_: 1
|
|
1040
1665
|
}),
|
|
1041
|
-
|
|
1042
|
-
default:
|
|
1666
|
+
g(w(k), { title: "预览" }, {
|
|
1667
|
+
default: T(() => [g(w(E), {
|
|
1043
1668
|
size: "small",
|
|
1669
|
+
type: "primary",
|
|
1044
1670
|
class: "gd-contract-template-designer__icon-button",
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
"aria-label": "斜体",
|
|
1048
|
-
onClick: s[4] ||= (e) => q({ type: "toggle-italic" })
|
|
1671
|
+
"aria-label": "预览",
|
|
1672
|
+
onClick: Os
|
|
1049
1673
|
}, {
|
|
1050
|
-
default:
|
|
1674
|
+
default: T(() => [g(w(ae), { "aria-hidden": "true" })]),
|
|
1051
1675
|
_: 1
|
|
1052
|
-
}
|
|
1676
|
+
})]),
|
|
1053
1677
|
_: 1
|
|
1054
1678
|
}),
|
|
1055
|
-
|
|
1056
|
-
|
|
1679
|
+
Qe.showSubmitDataViewer ? (b(), d(w(k), {
|
|
1680
|
+
key: 1,
|
|
1681
|
+
title: "数据查看"
|
|
1682
|
+
}, {
|
|
1683
|
+
default: T(() => [g(w(E), {
|
|
1057
1684
|
size: "small",
|
|
1058
1685
|
class: "gd-contract-template-designer__icon-button",
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
"aria-label": "下划线",
|
|
1062
|
-
onClick: s[5] ||= (e) => q({ type: "toggle-underline" })
|
|
1686
|
+
"aria-label": "数据查看",
|
|
1687
|
+
onClick: js
|
|
1063
1688
|
}, {
|
|
1064
|
-
default:
|
|
1689
|
+
default: T(() => [g(w(te), { "aria-hidden": "true" })]),
|
|
1065
1690
|
_: 1
|
|
1066
|
-
}
|
|
1691
|
+
})]),
|
|
1067
1692
|
_: 1
|
|
1068
|
-
}),
|
|
1069
|
-
|
|
1070
|
-
|
|
1693
|
+
})) : f("", !0)
|
|
1694
|
+
])])]),
|
|
1695
|
+
m("header", vn, [m("div", {
|
|
1696
|
+
ref_key: "toolbarMainElement",
|
|
1697
|
+
ref: gi,
|
|
1698
|
+
class: "gd-contract-template-designer__toolbar-section gd-contract-template-designer__toolbar-section--main"
|
|
1699
|
+
}, [
|
|
1700
|
+
m("div", yn, [g(w(k), { title: "撤销" }, {
|
|
1701
|
+
default: T(() => [g(w(E), {
|
|
1071
1702
|
size: "small",
|
|
1072
1703
|
class: "gd-contract-template-designer__icon-button",
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
onClick: s[6] ||= (e) => q({ type: "toggle-ordered-list" })
|
|
1704
|
+
disabled: V.value || !G.value.canUndo,
|
|
1705
|
+
"aria-label": "撤销",
|
|
1706
|
+
onClick: s[1] ||= (e) => q({ type: "undo" })
|
|
1077
1707
|
}, {
|
|
1078
|
-
default:
|
|
1708
|
+
default: T(() => [g(w(Se), { "aria-hidden": "true" })]),
|
|
1079
1709
|
_: 1
|
|
1080
|
-
}, 8, ["
|
|
1710
|
+
}, 8, ["disabled"])]),
|
|
1081
1711
|
_: 1
|
|
1082
|
-
}),
|
|
1083
|
-
|
|
1084
|
-
default: S(() => [_(x(C), {
|
|
1712
|
+
}), g(w(k), { title: "重做" }, {
|
|
1713
|
+
default: T(() => [g(w(E), {
|
|
1085
1714
|
size: "small",
|
|
1086
1715
|
class: "gd-contract-template-designer__icon-button",
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
onClick: s[7] ||= (e) => q({ type: "toggle-bullet-list" })
|
|
1716
|
+
disabled: V.value || !G.value.canRedo,
|
|
1717
|
+
"aria-label": "重做",
|
|
1718
|
+
onClick: s[2] ||= (e) => q({ type: "redo" })
|
|
1091
1719
|
}, {
|
|
1092
|
-
default:
|
|
1720
|
+
default: T(() => [g(w(ge), { "aria-hidden": "true" })]),
|
|
1093
1721
|
_: 1
|
|
1094
|
-
}, 8, ["
|
|
1722
|
+
}, 8, ["disabled"])]),
|
|
1095
1723
|
_: 1
|
|
1096
|
-
})
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
class: "gd-contract-template-designer__toolbar-select is-wide",
|
|
1101
|
-
value: gr.value,
|
|
1102
|
-
options: rr.value,
|
|
1103
|
-
disabled: B.value,
|
|
1104
|
-
onChange: Bi
|
|
1105
|
-
}, null, 8, [
|
|
1106
|
-
"value",
|
|
1107
|
-
"options",
|
|
1108
|
-
"disabled"
|
|
1109
|
-
]),
|
|
1110
|
-
_(x(E), {
|
|
1724
|
+
})]),
|
|
1725
|
+
m("div", bn, [g(w(O), {
|
|
1726
|
+
value: Pi.value,
|
|
1727
|
+
"onUpdate:value": s[3] ||= (e) => Pi.value = e,
|
|
1111
1728
|
class: "gd-contract-template-designer__toolbar-select",
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
"search-value": F.value,
|
|
1117
|
-
disabled: B.value,
|
|
1118
|
-
onBlur: Wi,
|
|
1119
|
-
onChange: zi,
|
|
1120
|
-
onDropdownVisibleChange: Ki,
|
|
1121
|
-
onInputKeyDown: Gi,
|
|
1122
|
-
onSearch: Ui
|
|
1729
|
+
options: _a.value,
|
|
1730
|
+
placeholder: "合同样式",
|
|
1731
|
+
disabled: V.value,
|
|
1732
|
+
onChange: lc
|
|
1123
1733
|
}, null, 8, [
|
|
1124
1734
|
"value",
|
|
1125
1735
|
"options",
|
|
1126
|
-
"search-value",
|
|
1127
1736
|
"disabled"
|
|
1128
|
-
]),
|
|
1129
|
-
h("input", {
|
|
1130
|
-
class: "gd-contract-template-designer__color",
|
|
1131
|
-
type: "color",
|
|
1132
|
-
value: vr.value,
|
|
1133
|
-
disabled: B.value,
|
|
1134
|
-
onInput: Vi
|
|
1135
|
-
}, null, 40, Dt),
|
|
1136
|
-
_(x(E), {
|
|
1737
|
+
]), g(w(O), {
|
|
1137
1738
|
class: "gd-contract-template-designer__toolbar-select",
|
|
1138
|
-
value:
|
|
1139
|
-
options:
|
|
1140
|
-
disabled:
|
|
1141
|
-
onChange:
|
|
1142
|
-
}, null, 8, [
|
|
1143
|
-
|
|
1144
|
-
"
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1739
|
+
value: ja.value,
|
|
1740
|
+
options: ya,
|
|
1741
|
+
disabled: V.value,
|
|
1742
|
+
onChange: ec
|
|
1743
|
+
}, null, 8, ["value", "disabled"])]),
|
|
1744
|
+
m("div", xn, [
|
|
1745
|
+
g(w(k), { title: "加粗" }, {
|
|
1746
|
+
default: T(() => [g(w(E), {
|
|
1747
|
+
size: "small",
|
|
1748
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1749
|
+
type: G.value.isBold ? "primary" : "default",
|
|
1750
|
+
disabled: V.value,
|
|
1751
|
+
"aria-label": "加粗",
|
|
1752
|
+
onClick: s[4] ||= (e) => q({ type: "toggle-bold" })
|
|
1753
|
+
}, {
|
|
1754
|
+
default: T(() => [g(w(i), { "aria-hidden": "true" })]),
|
|
1755
|
+
_: 1
|
|
1756
|
+
}, 8, ["type", "disabled"])]),
|
|
1757
|
+
_: 1
|
|
1758
|
+
}),
|
|
1759
|
+
g(w(k), { title: "斜体" }, {
|
|
1760
|
+
default: T(() => [g(w(E), {
|
|
1761
|
+
size: "small",
|
|
1762
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1763
|
+
type: G.value.isItalic ? "primary" : "default",
|
|
1764
|
+
disabled: V.value,
|
|
1765
|
+
"aria-label": "斜体",
|
|
1766
|
+
onClick: s[5] ||= (e) => q({ type: "toggle-italic" })
|
|
1767
|
+
}, {
|
|
1768
|
+
default: T(() => [g(w(ue), { "aria-hidden": "true" })]),
|
|
1769
|
+
_: 1
|
|
1770
|
+
}, 8, ["type", "disabled"])]),
|
|
1771
|
+
_: 1
|
|
1772
|
+
}),
|
|
1773
|
+
g(w(k), { title: "下划线" }, {
|
|
1774
|
+
default: T(() => [g(w(E), {
|
|
1775
|
+
size: "small",
|
|
1776
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1777
|
+
type: G.value.isUnderline ? "primary" : "default",
|
|
1778
|
+
disabled: V.value,
|
|
1779
|
+
"aria-label": "下划线",
|
|
1780
|
+
onClick: s[6] ||= (e) => q({ type: "toggle-underline" })
|
|
1781
|
+
}, {
|
|
1782
|
+
default: T(() => [g(w(xe), { "aria-hidden": "true" })]),
|
|
1783
|
+
_: 1
|
|
1784
|
+
}, 8, ["type", "disabled"])]),
|
|
1785
|
+
_: 1
|
|
1786
|
+
}),
|
|
1787
|
+
g(w(k), { title: "编号列表" }, {
|
|
1788
|
+
default: T(() => [g(w(E), {
|
|
1789
|
+
size: "small",
|
|
1790
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1791
|
+
type: G.value.isOrderedList ? "primary" : "default",
|
|
1792
|
+
disabled: V.value,
|
|
1793
|
+
"aria-label": "编号列表",
|
|
1794
|
+
onClick: s[7] ||= (e) => q({ type: "toggle-ordered-list" })
|
|
1795
|
+
}, {
|
|
1796
|
+
default: T(() => [g(w(pe), { "aria-hidden": "true" })]),
|
|
1797
|
+
_: 1
|
|
1798
|
+
}, 8, ["type", "disabled"])]),
|
|
1799
|
+
_: 1
|
|
1800
|
+
}),
|
|
1801
|
+
g(w(k), { title: "项目列表" }, {
|
|
1802
|
+
default: T(() => [g(w(E), {
|
|
1803
|
+
size: "small",
|
|
1804
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1805
|
+
type: G.value.isBulletList ? "primary" : "default",
|
|
1806
|
+
disabled: V.value,
|
|
1807
|
+
"aria-label": "项目列表",
|
|
1808
|
+
onClick: s[8] ||= (e) => q({ type: "toggle-bullet-list" })
|
|
1809
|
+
}, {
|
|
1810
|
+
default: T(() => [g(w(Ce), { "aria-hidden": "true" })]),
|
|
1811
|
+
_: 1
|
|
1812
|
+
}, 8, ["type", "disabled"])]),
|
|
1813
|
+
_: 1
|
|
1814
|
+
})
|
|
1815
|
+
]),
|
|
1816
|
+
m("div", Sn, [
|
|
1817
|
+
g(w(Gt), {
|
|
1818
|
+
open: Li.value,
|
|
1819
|
+
"onUpdate:open": s[9] ||= (e) => Li.value = e,
|
|
1820
|
+
trigger: "click",
|
|
1821
|
+
placement: "bottom"
|
|
1822
|
+
}, {
|
|
1823
|
+
content: T(() => [m("div", Cn, [s[85] ||= m("strong", null, "插入正文控件", -1), m("div", wn, [(b(!0), p(l, null, S(Ta.value, (e) => (b(), d(w(k), {
|
|
1824
|
+
key: e.type,
|
|
1825
|
+
title: `插入${e.label}控件`
|
|
1826
|
+
}, {
|
|
1827
|
+
default: T(() => [m("button", {
|
|
1828
|
+
type: "button",
|
|
1829
|
+
class: "gd-contract-template-designer__text-menu-control-option",
|
|
1830
|
+
"aria-label": `插入${e.label}控件`,
|
|
1831
|
+
onClick: (t) => Vo(e.type)
|
|
1832
|
+
}, [(b(), d(It(e.icon), { "aria-hidden": "true" })), m("span", null, C(e.label), 1)], 8, Tn)]),
|
|
1833
|
+
_: 2
|
|
1834
|
+
}, 1032, ["title"]))), 128))])])]),
|
|
1835
|
+
default: T(() => [g(w(k), { title: "插入正文控件" }, {
|
|
1836
|
+
default: T(() => [g(w(E), {
|
|
1837
|
+
size: "small",
|
|
1838
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1839
|
+
disabled: V.value,
|
|
1840
|
+
"aria-label": "插入正文控件"
|
|
1841
|
+
}, {
|
|
1842
|
+
default: T(() => [g(w(he), { "aria-hidden": "true" })]),
|
|
1843
|
+
_: 1
|
|
1844
|
+
}, 8, ["disabled"])]),
|
|
1845
|
+
_: 1
|
|
1846
|
+
})]),
|
|
1847
|
+
_: 1
|
|
1848
|
+
}, 8, ["open"]),
|
|
1849
|
+
g(w(Gt), {
|
|
1850
|
+
open: Ri.value,
|
|
1851
|
+
"onUpdate:open": s[13] ||= (e) => Ri.value = e,
|
|
1852
|
+
trigger: "click",
|
|
1853
|
+
placement: "bottom"
|
|
1854
|
+
}, {
|
|
1855
|
+
content: T(() => [m("div", En, [
|
|
1856
|
+
s[90] ||= m("strong", null, "插入正文图片", -1),
|
|
1857
|
+
g(w(E), {
|
|
1858
|
+
block: "",
|
|
1859
|
+
loading: Ui.value,
|
|
1860
|
+
disabled: V.value,
|
|
1861
|
+
onClick: Ro
|
|
1862
|
+
}, {
|
|
1863
|
+
default: T(() => [g(w(me), { "aria-hidden": "true" }), s[86] ||= h(" 本地图片 ", -1)]),
|
|
1864
|
+
_: 1
|
|
1865
|
+
}, 8, ["loading", "disabled"]),
|
|
1866
|
+
g(w(D), {
|
|
1867
|
+
value: zi.value,
|
|
1868
|
+
"onUpdate:value": s[10] ||= (e) => zi.value = e,
|
|
1869
|
+
"allow-clear": "",
|
|
1870
|
+
disabled: V.value || Ui.value,
|
|
1871
|
+
placeholder: "https:// 或 data:image/...",
|
|
1872
|
+
"aria-label": "图片 URL",
|
|
1873
|
+
onPressEnter: Bo
|
|
1874
|
+
}, null, 8, ["value", "disabled"]),
|
|
1875
|
+
m("div", Dn, [m("label", null, [s[87] ||= m("span", null, "宽度", -1), g(w(Ut), {
|
|
1876
|
+
value: Bi.value,
|
|
1877
|
+
"onUpdate:value": s[11] ||= (e) => Bi.value = e,
|
|
1878
|
+
min: w(16),
|
|
1879
|
+
max: w(Me),
|
|
1880
|
+
disabled: V.value || Ui.value,
|
|
1881
|
+
placeholder: "自然",
|
|
1882
|
+
"aria-label": "图片宽度"
|
|
1883
|
+
}, null, 8, [
|
|
1884
|
+
"value",
|
|
1885
|
+
"min",
|
|
1886
|
+
"max",
|
|
1887
|
+
"disabled"
|
|
1888
|
+
])]), m("label", null, [s[88] ||= m("span", null, "高度", -1), g(w(Ut), {
|
|
1889
|
+
value: Vi.value,
|
|
1890
|
+
"onUpdate:value": s[12] ||= (e) => Vi.value = e,
|
|
1891
|
+
min: w(16),
|
|
1892
|
+
max: w(Me),
|
|
1893
|
+
disabled: V.value || Ui.value,
|
|
1894
|
+
placeholder: "自然",
|
|
1895
|
+
"aria-label": "图片高度"
|
|
1896
|
+
}, null, 8, [
|
|
1897
|
+
"value",
|
|
1898
|
+
"min",
|
|
1899
|
+
"max",
|
|
1900
|
+
"disabled"
|
|
1901
|
+
])])]),
|
|
1902
|
+
g(w(E), {
|
|
1903
|
+
type: "primary",
|
|
1904
|
+
block: "",
|
|
1905
|
+
disabled: V.value || Ui.value || !zi.value.trim(),
|
|
1906
|
+
onClick: Bo
|
|
1907
|
+
}, {
|
|
1908
|
+
default: T(() => [...s[89] ||= [h(" 插入 URL ", -1)]]),
|
|
1909
|
+
_: 1
|
|
1910
|
+
}, 8, ["disabled"]),
|
|
1911
|
+
Hi.value ? (b(), d(w(Vt), {
|
|
1912
|
+
key: 0,
|
|
1913
|
+
type: "error",
|
|
1914
|
+
"show-icon": "",
|
|
1915
|
+
message: Hi.value
|
|
1916
|
+
}, null, 8, ["message"])) : f("", !0)
|
|
1917
|
+
])]),
|
|
1918
|
+
default: T(() => [g(w(k), { title: "插入图片" }, {
|
|
1919
|
+
default: T(() => [g(w(E), {
|
|
1920
|
+
size: "small",
|
|
1921
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1922
|
+
disabled: V.value,
|
|
1923
|
+
"aria-label": "插入图片"
|
|
1924
|
+
}, {
|
|
1925
|
+
default: T(() => [g(w(me), { "aria-hidden": "true" })]),
|
|
1926
|
+
_: 1
|
|
1927
|
+
}, 8, ["disabled"])]),
|
|
1928
|
+
_: 1
|
|
1929
|
+
})]),
|
|
1930
|
+
_: 1
|
|
1931
|
+
}, 8, ["open"]),
|
|
1932
|
+
g(w(k), { title: "插入分隔线" }, {
|
|
1933
|
+
default: T(() => [g(w(E), {
|
|
1934
|
+
size: "small",
|
|
1935
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1936
|
+
disabled: V.value,
|
|
1937
|
+
"aria-label": "插入分隔线",
|
|
1938
|
+
onClick: s[14] ||= (e) => q({ type: "insert-horizontal-rule" })
|
|
1939
|
+
}, {
|
|
1940
|
+
default: T(() => [g(w(fe), { "aria-hidden": "true" })]),
|
|
1941
|
+
_: 1
|
|
1942
|
+
}, 8, ["disabled"])]),
|
|
1943
|
+
_: 1
|
|
1944
|
+
}),
|
|
1945
|
+
g(w(k), { title: Da.value ? `已达 ${Ea.value} 页上限` : "新增页面" }, {
|
|
1946
|
+
default: T(() => [g(w(E), {
|
|
1947
|
+
size: "small",
|
|
1948
|
+
class: "gd-contract-template-designer__icon-button",
|
|
1949
|
+
disabled: V.value || Da.value,
|
|
1950
|
+
"aria-label": "新增页面",
|
|
1951
|
+
onClick: Co
|
|
1952
|
+
}, {
|
|
1953
|
+
default: T(() => [g(w(oe), { "aria-hidden": "true" })]),
|
|
1954
|
+
_: 1
|
|
1955
|
+
}, 8, ["disabled"])]),
|
|
1956
|
+
_: 1
|
|
1957
|
+
}, 8, ["title"])
|
|
1958
|
+
]),
|
|
1959
|
+
zt(m("div", On, [g(w(k), { title: "更多工具" }, {
|
|
1960
|
+
default: T(() => [g(w(E), {
|
|
1961
|
+
size: "small",
|
|
1962
|
+
class: y(["gd-contract-template-designer__icon-button", { "is-selected": Mi.value }]),
|
|
1963
|
+
"aria-label": "更多工具",
|
|
1964
|
+
"aria-haspopup": "true",
|
|
1965
|
+
"aria-expanded": Mi.value,
|
|
1966
|
+
onClick: s[15] ||= Bt((e) => Mi.value = !Mi.value, ["stop"])
|
|
1967
|
+
}, {
|
|
1968
|
+
default: T(() => [g(w(ie), { "aria-hidden": "true" })]),
|
|
1969
|
+
_: 1
|
|
1970
|
+
}, 8, ["class", "aria-expanded"])]),
|
|
1971
|
+
_: 1
|
|
1972
|
+
}), zt(m("div", {
|
|
1973
|
+
ref_key: "toolbarExtraOverflowElement",
|
|
1974
|
+
ref: _i,
|
|
1975
|
+
class: "gd-contract-template-designer__toolbar-more-panel",
|
|
1976
|
+
role: "menu",
|
|
1977
|
+
"aria-label": "更多编辑工具"
|
|
1978
|
+
}, null, 512), [[Lt, Mi.value]])], 512), [[Lt, hs.value]]),
|
|
1979
|
+
(b(), d(Mt, {
|
|
1980
|
+
disabled: !hs.value || !_i.value,
|
|
1981
|
+
to: _i.value || "body"
|
|
1982
|
+
}, [m("div", kn, [
|
|
1983
|
+
m("div", An, [
|
|
1984
|
+
g(w(O), {
|
|
1985
|
+
class: "gd-contract-template-designer__toolbar-select is-wide",
|
|
1986
|
+
value: Ma.value,
|
|
1987
|
+
options: ga.value,
|
|
1988
|
+
disabled: V.value,
|
|
1989
|
+
onChange: nc
|
|
1990
|
+
}, null, 8, [
|
|
1991
|
+
"value",
|
|
1992
|
+
"options",
|
|
1993
|
+
"disabled"
|
|
1994
|
+
]),
|
|
1995
|
+
g(w(O), {
|
|
1996
|
+
class: "gd-contract-template-designer__toolbar-select",
|
|
1997
|
+
value: Na.value,
|
|
1998
|
+
options: Ia.value,
|
|
1999
|
+
"show-search": "",
|
|
2000
|
+
"filter-option": !1,
|
|
2001
|
+
"search-value": Fi.value,
|
|
2002
|
+
disabled: V.value,
|
|
2003
|
+
onBlur: oc,
|
|
2004
|
+
onChange: tc,
|
|
2005
|
+
onDropdownVisibleChange: cc,
|
|
2006
|
+
onInputKeyDown: sc,
|
|
2007
|
+
onSearch: ac
|
|
2008
|
+
}, null, 8, [
|
|
2009
|
+
"value",
|
|
2010
|
+
"options",
|
|
2011
|
+
"search-value",
|
|
2012
|
+
"disabled"
|
|
2013
|
+
]),
|
|
2014
|
+
m("input", {
|
|
2015
|
+
class: "gd-contract-template-designer__color",
|
|
2016
|
+
type: "color",
|
|
2017
|
+
value: Pa.value,
|
|
2018
|
+
disabled: V.value,
|
|
2019
|
+
onInput: rc
|
|
2020
|
+
}, null, 40, jn),
|
|
2021
|
+
g(w(k), { title: "左对齐" }, {
|
|
2022
|
+
default: T(() => [g(w(E), {
|
|
2023
|
+
size: "small",
|
|
2024
|
+
class: y(["gd-contract-template-designer__icon-button", { "is-selected": G.value.textAlign === "left" }]),
|
|
2025
|
+
type: G.value.textAlign === "left" ? "primary" : "default",
|
|
2026
|
+
disabled: V.value,
|
|
2027
|
+
"aria-label": "左对齐",
|
|
2028
|
+
onClick: s[16] ||= (e) => $s("left")
|
|
2029
|
+
}, {
|
|
2030
|
+
default: T(() => [g(w(t), { "aria-hidden": "true" })]),
|
|
2031
|
+
_: 1
|
|
2032
|
+
}, 8, [
|
|
2033
|
+
"class",
|
|
2034
|
+
"type",
|
|
2035
|
+
"disabled"
|
|
2036
|
+
])]),
|
|
2037
|
+
_: 1
|
|
2038
|
+
}),
|
|
2039
|
+
g(w(k), { title: "居中对齐" }, {
|
|
2040
|
+
default: T(() => [g(w(E), {
|
|
2041
|
+
size: "small",
|
|
2042
|
+
class: y(["gd-contract-template-designer__icon-button", { "is-selected": G.value.textAlign === "center" }]),
|
|
2043
|
+
type: G.value.textAlign === "center" ? "primary" : "default",
|
|
2044
|
+
disabled: V.value,
|
|
2045
|
+
"aria-label": "居中对齐",
|
|
2046
|
+
onClick: s[17] ||= (e) => $s("center")
|
|
2047
|
+
}, {
|
|
2048
|
+
default: T(() => [g(w(e), { "aria-hidden": "true" })]),
|
|
2049
|
+
_: 1
|
|
2050
|
+
}, 8, [
|
|
2051
|
+
"class",
|
|
2052
|
+
"type",
|
|
2053
|
+
"disabled"
|
|
2054
|
+
])]),
|
|
2055
|
+
_: 1
|
|
2056
|
+
}),
|
|
2057
|
+
g(w(k), { title: "右对齐" }, {
|
|
2058
|
+
default: T(() => [g(w(E), {
|
|
2059
|
+
size: "small",
|
|
2060
|
+
class: y(["gd-contract-template-designer__icon-button", { "is-selected": G.value.textAlign === "right" }]),
|
|
2061
|
+
type: G.value.textAlign === "right" ? "primary" : "default",
|
|
2062
|
+
disabled: V.value,
|
|
2063
|
+
"aria-label": "右对齐",
|
|
2064
|
+
onClick: s[18] ||= (e) => $s("right")
|
|
2065
|
+
}, {
|
|
2066
|
+
default: T(() => [g(w(n), { "aria-hidden": "true" })]),
|
|
2067
|
+
_: 1
|
|
2068
|
+
}, 8, [
|
|
2069
|
+
"class",
|
|
2070
|
+
"type",
|
|
2071
|
+
"disabled"
|
|
2072
|
+
])]),
|
|
2073
|
+
_: 1
|
|
2074
|
+
})
|
|
2075
|
+
]),
|
|
2076
|
+
m("div", Mn, [g(w(k), { title: "清文字" }, {
|
|
2077
|
+
default: T(() => [g(w(E), {
|
|
2078
|
+
size: "small",
|
|
2079
|
+
class: "gd-contract-template-designer__icon-button",
|
|
2080
|
+
disabled: V.value,
|
|
2081
|
+
"aria-label": "清文字",
|
|
2082
|
+
onClick: s[19] ||= (e) => q({ type: "clear-text-format" })
|
|
2083
|
+
}, {
|
|
2084
|
+
default: T(() => [g(w(a), { "aria-hidden": "true" })]),
|
|
2085
|
+
_: 1
|
|
2086
|
+
}, 8, ["disabled"])]),
|
|
2087
|
+
_: 1
|
|
2088
|
+
}), g(w(k), { title: "清段落" }, {
|
|
2089
|
+
default: T(() => [g(w(E), {
|
|
2090
|
+
size: "small",
|
|
2091
|
+
class: "gd-contract-template-designer__icon-button",
|
|
2092
|
+
disabled: V.value,
|
|
2093
|
+
"aria-label": "清段落",
|
|
2094
|
+
onClick: s[20] ||= (e) => q({ type: "clear-block-format" })
|
|
2095
|
+
}, {
|
|
2096
|
+
default: T(() => [g(w(se), { "aria-hidden": "true" })]),
|
|
2097
|
+
_: 1
|
|
2098
|
+
}, 8, ["disabled"])]),
|
|
2099
|
+
_: 1
|
|
2100
|
+
})]),
|
|
2101
|
+
m("div", Nn, [g(w(Gt), {
|
|
2102
|
+
open: L.value,
|
|
2103
|
+
"onUpdate:open": s[24] ||= (e) => L.value = e,
|
|
2104
|
+
trigger: "click",
|
|
2105
|
+
placement: "bottom"
|
|
2106
|
+
}, {
|
|
2107
|
+
content: T(() => [m("div", Pn, [
|
|
2108
|
+
s[92] ||= m("strong", null, "插入表格", -1),
|
|
2109
|
+
g(yt, {
|
|
2110
|
+
disabled: V.value,
|
|
2111
|
+
onSelect: s[21] ||= (e) => Sc(e.rows, e.cols),
|
|
2112
|
+
onClose: s[22] ||= (e) => L.value = !1
|
|
2113
|
+
}, null, 8, ["disabled"]),
|
|
2114
|
+
m("label", Fn, [s[91] ||= m("span", null, "表头行", -1), g(w(Kt), {
|
|
2115
|
+
checked: $i.value.withHeaderRow,
|
|
2116
|
+
"onUpdate:checked": s[23] ||= (e) => $i.value.withHeaderRow = e,
|
|
2117
|
+
disabled: V.value
|
|
2118
|
+
}, null, 8, ["checked", "disabled"])])
|
|
2119
|
+
])]),
|
|
2120
|
+
default: T(() => [g(w(k), { title: "插入表格" }, {
|
|
2121
|
+
default: T(() => [g(w(E), {
|
|
2122
|
+
size: "small",
|
|
2123
|
+
class: "gd-contract-template-designer__icon-button",
|
|
2124
|
+
disabled: V.value,
|
|
2125
|
+
"aria-label": "插入表格"
|
|
2126
|
+
}, {
|
|
2127
|
+
default: T(() => [g(w(be), { "aria-hidden": "true" })]),
|
|
2128
|
+
_: 1
|
|
2129
|
+
}, 8, ["disabled"])]),
|
|
2130
|
+
_: 1
|
|
2131
|
+
})]),
|
|
2132
|
+
_: 1
|
|
2133
|
+
}, 8, ["open"]), g(w(Gt), {
|
|
2134
|
+
open: Ii.value,
|
|
2135
|
+
"onUpdate:open": s[34] ||= (e) => Ii.value = e,
|
|
2136
|
+
trigger: "click",
|
|
2137
|
+
placement: "bottom"
|
|
2138
|
+
}, {
|
|
2139
|
+
content: T(() => [m("div", In, [s[102] ||= m("strong", null, "表格操作", -1), m("div", Ln, [
|
|
2140
|
+
g(w(E), {
|
|
2141
|
+
size: "small",
|
|
2142
|
+
disabled: V.value,
|
|
2143
|
+
onClick: s[25] ||= (e) => Oc("add-table-row-before")
|
|
2144
|
+
}, {
|
|
2145
|
+
default: T(() => [...s[93] ||= [h(" 上方插行 ", -1)]]),
|
|
2146
|
+
_: 1
|
|
2147
|
+
}, 8, ["disabled"]),
|
|
2148
|
+
g(w(E), {
|
|
2149
|
+
size: "small",
|
|
2150
|
+
disabled: V.value,
|
|
2151
|
+
onClick: s[26] ||= (e) => Oc("add-table-row-after")
|
|
2152
|
+
}, {
|
|
2153
|
+
default: T(() => [...s[94] ||= [h(" 下方插行 ", -1)]]),
|
|
2154
|
+
_: 1
|
|
2155
|
+
}, 8, ["disabled"]),
|
|
2156
|
+
g(w(E), {
|
|
2157
|
+
size: "small",
|
|
2158
|
+
disabled: V.value,
|
|
2159
|
+
onClick: s[27] ||= (e) => Oc("add-table-column-before")
|
|
2160
|
+
}, {
|
|
2161
|
+
default: T(() => [...s[95] ||= [h(" 左侧插列 ", -1)]]),
|
|
2162
|
+
_: 1
|
|
2163
|
+
}, 8, ["disabled"]),
|
|
2164
|
+
g(w(E), {
|
|
2165
|
+
size: "small",
|
|
2166
|
+
disabled: V.value,
|
|
2167
|
+
onClick: s[28] ||= (e) => Oc("add-table-column-after")
|
|
2168
|
+
}, {
|
|
2169
|
+
default: T(() => [...s[96] ||= [h(" 右侧插列 ", -1)]]),
|
|
2170
|
+
_: 1
|
|
2171
|
+
}, 8, ["disabled"]),
|
|
2172
|
+
g(w(E), {
|
|
2173
|
+
size: "small",
|
|
2174
|
+
disabled: V.value,
|
|
2175
|
+
onClick: s[29] ||= (e) => Oc("delete-table-row")
|
|
2176
|
+
}, {
|
|
2177
|
+
default: T(() => [...s[97] ||= [h(" 删除当前行 ", -1)]]),
|
|
2178
|
+
_: 1
|
|
2179
|
+
}, 8, ["disabled"]),
|
|
2180
|
+
g(w(E), {
|
|
2181
|
+
size: "small",
|
|
2182
|
+
disabled: V.value,
|
|
2183
|
+
onClick: s[30] ||= (e) => Oc("delete-table-column")
|
|
2184
|
+
}, {
|
|
2185
|
+
default: T(() => [...s[98] ||= [h(" 删除当前列 ", -1)]]),
|
|
2186
|
+
_: 1
|
|
2187
|
+
}, 8, ["disabled"]),
|
|
2188
|
+
g(w(E), {
|
|
2189
|
+
size: "small",
|
|
2190
|
+
disabled: V.value,
|
|
2191
|
+
onClick: s[31] ||= (e) => Oc("toggle-table-header-row")
|
|
2192
|
+
}, {
|
|
2193
|
+
default: T(() => [...s[99] ||= [h(" 切换表头行 ", -1)]]),
|
|
2194
|
+
_: 1
|
|
2195
|
+
}, 8, ["disabled"]),
|
|
2196
|
+
g(w(E), {
|
|
2197
|
+
size: "small",
|
|
2198
|
+
disabled: V.value,
|
|
2199
|
+
onClick: s[32] ||= (e) => Oc("toggle-table-header-column")
|
|
2200
|
+
}, {
|
|
2201
|
+
default: T(() => [...s[100] ||= [h(" 切换表头列 ", -1)]]),
|
|
2202
|
+
_: 1
|
|
2203
|
+
}, 8, ["disabled"]),
|
|
2204
|
+
g(w(E), {
|
|
2205
|
+
danger: "",
|
|
2206
|
+
size: "small",
|
|
2207
|
+
disabled: V.value,
|
|
2208
|
+
onClick: s[33] ||= (e) => Oc("delete-table")
|
|
2209
|
+
}, {
|
|
2210
|
+
default: T(() => [...s[101] ||= [h(" 删除表格 ", -1)]]),
|
|
2211
|
+
_: 1
|
|
2212
|
+
}, 8, ["disabled"])
|
|
2213
|
+
])])]),
|
|
2214
|
+
default: T(() => [g(w(k), { title: "表格操作" }, {
|
|
2215
|
+
default: T(() => [g(w(E), {
|
|
2216
|
+
size: "small",
|
|
2217
|
+
class: "gd-contract-template-designer__icon-button",
|
|
2218
|
+
disabled: V.value || !G.value.isTableActive,
|
|
2219
|
+
"aria-label": "表格操作"
|
|
2220
|
+
}, {
|
|
2221
|
+
default: T(() => [g(w(be), { "aria-hidden": "true" })]),
|
|
2222
|
+
_: 1
|
|
2223
|
+
}, 8, ["disabled"])]),
|
|
2224
|
+
_: 1
|
|
2225
|
+
})]),
|
|
2226
|
+
_: 1
|
|
2227
|
+
}, 8, ["open"])])
|
|
2228
|
+
])], 8, ["disabled", "to"]))
|
|
2229
|
+
], 512)]),
|
|
2230
|
+
xi.value ? (b(), p("section", Rn, [g(w(Vt), {
|
|
2231
|
+
type: la.value ? "success" : "error",
|
|
2232
|
+
message: ua.value,
|
|
2233
|
+
"show-icon": ""
|
|
2234
|
+
}, null, 8, ["type", "message"]), Si.value.length ? (b(), p("div", zn, [(b(!0), p(l, null, S(Si.value, (e) => (b(), p("button", {
|
|
2235
|
+
key: `${e.id}-${e.message}`,
|
|
2236
|
+
type: "button",
|
|
2237
|
+
class: "gd-contract-template-designer__validation-item",
|
|
2238
|
+
onClick: (t) => Ws(e)
|
|
2239
|
+
}, [m("span", null, C(e.message), 1), m("small", null, C(e.type === "signing-placement" ? "签署位置" : e.type === "variable" ? "变量" : "字段"), 1)], 8, Bn))), 128))])) : f("", !0)])) : f("", !0),
|
|
2240
|
+
m("div", {
|
|
2241
|
+
ref_key: "canvasElement",
|
|
2242
|
+
ref: mi,
|
|
2243
|
+
class: "gd-contract-template-designer__canvas"
|
|
2244
|
+
}, [(b(!0), p(l, null, S(j.value.pages, (e, t) => (b(), d(gt, {
|
|
2245
|
+
key: e.id,
|
|
2246
|
+
ref_for: !0,
|
|
2247
|
+
ref: (t) => Qa(e.id, t),
|
|
2248
|
+
page: e,
|
|
2249
|
+
"page-index": t,
|
|
2250
|
+
"page-size": Y(e),
|
|
2251
|
+
variables: j.value.variables,
|
|
2252
|
+
"selected-variable-key": M.value,
|
|
2253
|
+
"signing-placements": c.showSigningPlacementTools ? no(e.id) : [],
|
|
2254
|
+
"selected-signing-placement-id": N.value,
|
|
2255
|
+
active: P.value === e.id,
|
|
2256
|
+
readonly: Qe.readonly,
|
|
2257
|
+
disabled: Qe.disabled,
|
|
2258
|
+
zoom: I.value,
|
|
2259
|
+
"process-image-file": Io,
|
|
2260
|
+
onPageUpdate: to,
|
|
2261
|
+
onVariableDrop: Uo,
|
|
2262
|
+
onVariableSelect: Wo,
|
|
2263
|
+
onSigningPlacementDrop: co,
|
|
2264
|
+
onSigningPlacementSelect: ro,
|
|
2265
|
+
onSigningPlacementMove: fo,
|
|
2266
|
+
onSigningPlacementRemove: ho,
|
|
2267
|
+
onEditorFocus: s[35] ||= (e) => zs(e, !1),
|
|
2268
|
+
onEditorStateChange: xc,
|
|
2269
|
+
onEditorContextMenu: _c,
|
|
2270
|
+
onVariableMoveBlocked: s[36] ||= (e) => Zi.value = "变量只能在当前页内移动,跨页移动尚未支持。"
|
|
2271
|
+
}, null, 8, [
|
|
2272
|
+
"page",
|
|
2273
|
+
"page-index",
|
|
2274
|
+
"page-size",
|
|
2275
|
+
"variables",
|
|
2276
|
+
"selected-variable-key",
|
|
2277
|
+
"signing-placements",
|
|
2278
|
+
"selected-signing-placement-id",
|
|
2279
|
+
"active",
|
|
2280
|
+
"readonly",
|
|
2281
|
+
"disabled",
|
|
2282
|
+
"zoom"
|
|
2283
|
+
]))), 128))], 512)
|
|
2284
|
+
], 512),
|
|
2285
|
+
m("aside", { class: y(["gd-contract-template-designer__inspector", { "is-collapsed": ji.value }]) }, [g(w(k), { title: ji.value ? "展开属性栏" : "收起属性栏" }, {
|
|
2286
|
+
default: T(() => [m("button", {
|
|
2287
|
+
type: "button",
|
|
2288
|
+
class: "gd-contract-template-designer__panel-handle",
|
|
2289
|
+
"aria-label": ji.value ? "展开属性栏" : "收起属性栏",
|
|
2290
|
+
"aria-expanded": !ji.value,
|
|
2291
|
+
onClick: s[37] ||= (e) => ji.value = !ji.value
|
|
2292
|
+
}, [ji.value ? (b(), d(w(de), {
|
|
2293
|
+
key: 0,
|
|
2294
|
+
"aria-hidden": "true"
|
|
2295
|
+
})) : (b(), d(w(ve), {
|
|
2296
|
+
key: 1,
|
|
2297
|
+
"aria-hidden": "true"
|
|
2298
|
+
}))], 8, Vn)]),
|
|
2299
|
+
_: 1
|
|
2300
|
+
}, 8, ["title"]), m("div", Hn, [
|
|
2301
|
+
m("section", Un, [s[104] ||= m("div", { class: "gd-contract-template-designer__panel-head" }, [m("strong", null, "正文控件"), m("span", null, "拖到正文")], -1), (b(!0), p(l, null, S(Ta.value, (e) => (b(), p("button", {
|
|
2302
|
+
key: e.type,
|
|
2303
|
+
type: "button",
|
|
2304
|
+
draggable: "true",
|
|
2305
|
+
class: "gd-contract-template-designer__tool-item",
|
|
2306
|
+
disabled: V.value,
|
|
2307
|
+
onDragstart: (t) => us(t, e.type),
|
|
2308
|
+
onClick: (t) => is(e.type)
|
|
2309
|
+
}, [m("span", Gn, [(b(), d(It(e.icon)))]), m("span", Kn, [m("span", null, C(e.label), 1), s[103] ||= m("small", null, "模板变量", -1)])], 40, Wn))), 128))]),
|
|
2310
|
+
c.showSigningPlacementTools ? (b(), p("section", qn, [m("div", Jn, [s[105] ||= m("strong", null, "签署位置", -1), m("div", Yn, [g(w(qt), null, {
|
|
2311
|
+
default: T(() => [h(C(U.value.length), 1)]),
|
|
2312
|
+
_: 1
|
|
2313
|
+
})])]), (b(!0), p(l, null, S(Ca.value, (e) => (b(), p("button", {
|
|
2314
|
+
key: e.key,
|
|
2315
|
+
type: "button",
|
|
2316
|
+
draggable: "true",
|
|
2317
|
+
class: "gd-contract-template-designer__tool-item gd-contract-template-designer__signing-tool",
|
|
2318
|
+
disabled: V.value,
|
|
2319
|
+
onDragstart: (t) => uo(t, e),
|
|
2320
|
+
onClick: (t) => lo(e)
|
|
2321
|
+
}, [m("span", Zn, [(b(), d(It(w(jt)(e.type))))]), m("span", Qn, [m("span", $n, C(e.label), 1), m("small", null, C(w(Be)[e.type]) + " · 页面坐标", 1)])], 40, Xn))), 128))])) : f("", !0),
|
|
2322
|
+
c.showSigningPlacementTools && aa.value ? (b(), d(kt, {
|
|
2323
|
+
key: 1,
|
|
2324
|
+
placement: aa.value,
|
|
2325
|
+
"page-size": sa.value,
|
|
2326
|
+
readonly: Qe.readonly,
|
|
2327
|
+
disabled: Qe.disabled,
|
|
2328
|
+
onUpdate: po,
|
|
2329
|
+
onDuplicate: s[38] ||= (e) => mo(),
|
|
2330
|
+
onRemove: s[39] ||= (e) => ho()
|
|
2331
|
+
}, null, 8, [
|
|
2332
|
+
"placement",
|
|
2333
|
+
"page-size",
|
|
2334
|
+
"readonly",
|
|
2335
|
+
"disabled"
|
|
2336
|
+
])) : (b(), p("section", er, [m("div", tr, [s[106] ||= m("strong", null, "属性", -1), H.value ? (b(), p("div", nr, [g(w(k), { title: "复制变量" }, {
|
|
2337
|
+
default: T(() => [g(w(E), {
|
|
1150
2338
|
size: "small",
|
|
2339
|
+
type: "primary",
|
|
1151
2340
|
class: "gd-contract-template-designer__icon-button",
|
|
1152
|
-
disabled:
|
|
1153
|
-
"aria-label": "
|
|
1154
|
-
onClick: s[
|
|
2341
|
+
disabled: V.value,
|
|
2342
|
+
"aria-label": "复制变量",
|
|
2343
|
+
onClick: s[40] ||= (e) => ns(H.value)
|
|
1155
2344
|
}, {
|
|
1156
|
-
default:
|
|
2345
|
+
default: T(() => [g(w(ee), { "aria-hidden": "true" })]),
|
|
1157
2346
|
_: 1
|
|
1158
2347
|
}, 8, ["disabled"])]),
|
|
1159
2348
|
_: 1
|
|
1160
|
-
}),
|
|
1161
|
-
default:
|
|
2349
|
+
}), g(w(k), { title: "删除变量" }, {
|
|
2350
|
+
default: T(() => [g(w(E), {
|
|
2351
|
+
danger: "",
|
|
2352
|
+
type: "primary",
|
|
1162
2353
|
size: "small",
|
|
1163
2354
|
class: "gd-contract-template-designer__icon-button",
|
|
1164
|
-
disabled:
|
|
1165
|
-
"aria-label": "
|
|
1166
|
-
onClick: s[
|
|
2355
|
+
disabled: V.value,
|
|
2356
|
+
"aria-label": "删除变量",
|
|
2357
|
+
onClick: s[41] ||= (e) => es(H.value)
|
|
1167
2358
|
}, {
|
|
1168
|
-
default:
|
|
2359
|
+
default: T(() => [g(w(ne), { "aria-hidden": "true" })]),
|
|
1169
2360
|
_: 1
|
|
1170
2361
|
}, 8, ["disabled"])]),
|
|
1171
2362
|
_: 1
|
|
1172
|
-
})]),
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
}), _(x(C), {
|
|
1203
|
-
size: "small",
|
|
1204
|
-
type: "primary",
|
|
1205
|
-
onClick: $i
|
|
1206
|
-
}, {
|
|
1207
|
-
default: S(() => [...s[63] ||= [g(" 插入 ", -1)]]),
|
|
1208
|
-
_: 1
|
|
1209
|
-
})])
|
|
2363
|
+
})])) : f("", !0)]), H.value ? (b(), p(l, { key: 1 }, [
|
|
2364
|
+
m("label", rr, [s[107] ||= m("span", null, "名称", -1), g(w(D), {
|
|
2365
|
+
value: H.value.label,
|
|
2366
|
+
disabled: V.value,
|
|
2367
|
+
onChange: s[42] ||= (e) => Q({ label: e.target.value })
|
|
2368
|
+
}, null, 8, ["value", "disabled"])]),
|
|
2369
|
+
m("label", ir, [s[108] ||= m("span", null, "变量标识", -1), g(w(D), {
|
|
2370
|
+
value: H.value.key,
|
|
2371
|
+
disabled: ""
|
|
2372
|
+
}, null, 8, ["value"])]),
|
|
2373
|
+
m("label", ar, [s[109] ||= m("span", null, "占位文案", -1), g(w(D), {
|
|
2374
|
+
value: H.value.placeholder,
|
|
2375
|
+
disabled: V.value,
|
|
2376
|
+
onChange: s[43] ||= (e) => Q({ placeholder: e.target.value })
|
|
2377
|
+
}, null, 8, ["value", "disabled"])]),
|
|
2378
|
+
m("label", or, [s[110] ||= m("span", null, "默认值", -1), g(w(D), {
|
|
2379
|
+
value: H.value.defaultValue,
|
|
2380
|
+
disabled: V.value,
|
|
2381
|
+
onChange: s[44] ||= (e) => Q({ defaultValue: e.target.value })
|
|
2382
|
+
}, null, 8, ["value", "disabled"])]),
|
|
2383
|
+
m("label", sr, [s[111] ||= m("span", null, "宽度", -1), g(w(Ut), {
|
|
2384
|
+
value: H.value.width,
|
|
2385
|
+
min: ai,
|
|
2386
|
+
max: ka.value,
|
|
2387
|
+
disabled: V.value,
|
|
2388
|
+
onChange: s[45] ||= (e) => Q({ width: Number(e || ai) })
|
|
2389
|
+
}, null, 8, [
|
|
2390
|
+
"value",
|
|
2391
|
+
"max",
|
|
2392
|
+
"disabled"
|
|
1210
2393
|
])]),
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
2394
|
+
m("label", cr, [s[112] ||= m("span", null, "高度", -1), g(w(Ut), {
|
|
2395
|
+
value: H.value.height,
|
|
2396
|
+
min: oi,
|
|
2397
|
+
max: Aa.value,
|
|
2398
|
+
disabled: V.value,
|
|
2399
|
+
onChange: s[46] ||= (e) => Q({ height: Number(e || oi) })
|
|
2400
|
+
}, null, 8, [
|
|
2401
|
+
"value",
|
|
2402
|
+
"max",
|
|
2403
|
+
"disabled"
|
|
2404
|
+
])]),
|
|
2405
|
+
H.value.type === "text" ? (b(), p("div", lr, [m("label", ur, [s[113] ||= m("span", null, "多行", -1), g(w(Kt), {
|
|
2406
|
+
checked: !!H.value.multiline,
|
|
2407
|
+
disabled: V.value,
|
|
2408
|
+
onChange: s[47] ||= (e) => Qo(!!e)
|
|
2409
|
+
}, null, 8, ["checked", "disabled"])]), H.value.multiline ? (b(), p("label", dr, [s[114] ||= m("span", null, "行数", -1), g(w(Ut), {
|
|
2410
|
+
value: H.value.rows || w(3),
|
|
2411
|
+
min: 2,
|
|
2412
|
+
max: 12,
|
|
2413
|
+
disabled: V.value,
|
|
2414
|
+
onChange: $o
|
|
2415
|
+
}, null, 8, ["value", "disabled"])])) : f("", !0)])) : f("", !0),
|
|
2416
|
+
H.value.type === "date" ? (b(), p("label", fr, [s[115] ||= m("span", null, "日期格式", -1), g(w(D), {
|
|
2417
|
+
value: H.value.format,
|
|
2418
|
+
disabled: V.value,
|
|
2419
|
+
onChange: s[48] ||= (e) => Q({ format: e.target.value })
|
|
2420
|
+
}, null, 8, ["value", "disabled"])])) : f("", !0),
|
|
2421
|
+
H.value.type === "number" ? (b(), p(l, { key: 2 }, [m("label", pr, [s[116] ||= m("span", null, "数字格式", -1), g(w(D), {
|
|
2422
|
+
value: H.value.format,
|
|
2423
|
+
disabled: V.value,
|
|
2424
|
+
onChange: s[49] ||= (e) => Q({ format: e.target.value })
|
|
2425
|
+
}, null, 8, ["value", "disabled"])]), m("label", mr, [s[117] ||= m("span", null, "小数位", -1), g(w(Ut), {
|
|
2426
|
+
value: H.value.precision,
|
|
2427
|
+
min: 0,
|
|
2428
|
+
max: 6,
|
|
2429
|
+
disabled: V.value,
|
|
2430
|
+
onChange: s[50] ||= (e) => Q({ precision: typeof e == "number" ? e : void 0 })
|
|
2431
|
+
}, null, 8, ["value", "disabled"])])], 64)) : f("", !0),
|
|
2432
|
+
H.value.type === "checkbox" ? (b(), p(l, { key: 3 }, [m("label", hr, [s[118] ||= m("span", null, "勾选文本", -1), g(w(D), {
|
|
2433
|
+
value: H.value.checkedText,
|
|
2434
|
+
disabled: V.value,
|
|
2435
|
+
onChange: s[51] ||= (e) => Q({ checkedText: e.target.value })
|
|
2436
|
+
}, null, 8, ["value", "disabled"])]), m("label", gr, [s[119] ||= m("span", null, "未选文本", -1), g(w(D), {
|
|
2437
|
+
value: H.value.uncheckedText,
|
|
2438
|
+
disabled: V.value,
|
|
2439
|
+
onChange: s[52] ||= (e) => Q({ uncheckedText: e.target.value })
|
|
2440
|
+
}, null, 8, ["value", "disabled"])])], 64)) : f("", !0),
|
|
2441
|
+
m("div", _r, [
|
|
2442
|
+
m("label", vr, [s[120] ||= m("span", null, "必填", -1), g(w(Kt), {
|
|
2443
|
+
checked: H.value.required,
|
|
2444
|
+
disabled: V.value,
|
|
2445
|
+
onChange: s[53] ||= (e) => Q({ required: !!e })
|
|
2446
|
+
}, null, 8, ["checked", "disabled"])]),
|
|
2447
|
+
m("label", yr, [s[121] ||= m("span", null, "边框", -1), g(w(Kt), {
|
|
2448
|
+
checked: !!H.value.style?.border,
|
|
2449
|
+
disabled: V.value,
|
|
2450
|
+
onChange: s[54] ||= (e) => Yo({ border: !!e })
|
|
2451
|
+
}, null, 8, ["checked", "disabled"])]),
|
|
2452
|
+
m("label", br, [s[122] ||= m("span", null, "下划线", -1), g(w(Kt), {
|
|
2453
|
+
checked: !!H.value.style?.underline,
|
|
2454
|
+
disabled: V.value,
|
|
2455
|
+
onChange: s[55] ||= (e) => Yo({ underline: !!e })
|
|
2456
|
+
}, null, 8, ["checked", "disabled"])]),
|
|
2457
|
+
H.value.type === "number" ? (b(), p("label", xr, [s[123] ||= m("span", null, "千分位", -1), g(w(Kt), {
|
|
2458
|
+
checked: H.value.useGrouping !== !1,
|
|
2459
|
+
disabled: V.value,
|
|
2460
|
+
onChange: s[56] ||= (e) => Q({ useGrouping: !!e })
|
|
2461
|
+
}, null, 8, ["checked", "disabled"])])) : f("", !0)
|
|
2462
|
+
]),
|
|
2463
|
+
m("label", Sr, [s[124] ||= m("span", null, "字体", -1), g(w(O), {
|
|
2464
|
+
value: Fa.value,
|
|
2465
|
+
options: ga.value,
|
|
2466
|
+
disabled: V.value,
|
|
2467
|
+
onChange: Xo
|
|
2468
|
+
}, null, 8, [
|
|
2469
|
+
"value",
|
|
2470
|
+
"options",
|
|
2471
|
+
"disabled"
|
|
2472
|
+
])]),
|
|
2473
|
+
m("label", Cr, [s[125] ||= m("span", null, "字号", -1), g(w(Ut), {
|
|
2474
|
+
value: H.value.style?.fontSize,
|
|
2475
|
+
min: si,
|
|
2476
|
+
max: ci,
|
|
2477
|
+
disabled: V.value,
|
|
2478
|
+
onChange: Zo
|
|
2479
|
+
}, null, 8, ["value", "disabled"])]),
|
|
2480
|
+
m("label", wr, [s[126] ||= m("span", null, "颜色", -1), m("input", {
|
|
2481
|
+
type: "color",
|
|
2482
|
+
value: H.value.style?.color || "#1f2937",
|
|
2483
|
+
disabled: V.value,
|
|
2484
|
+
onInput: s[57] ||= (e) => Yo({ color: e.target.value })
|
|
2485
|
+
}, null, 40, Tr)]),
|
|
2486
|
+
m("label", Er, [s[127] ||= m("span", null, "占位颜色", -1), m("input", {
|
|
2487
|
+
type: "color",
|
|
2488
|
+
value: H.value.style?.placeholderColor || "#7a818b",
|
|
2489
|
+
disabled: V.value,
|
|
2490
|
+
onInput: s[58] ||= (e) => Yo({ placeholderColor: e.target.value })
|
|
2491
|
+
}, null, 40, Dr)]),
|
|
2492
|
+
m("label", Or, [s[128] ||= m("span", null, "线条颜色", -1), m("input", {
|
|
2493
|
+
type: "color",
|
|
2494
|
+
value: H.value.style?.lineColor || "#565b66",
|
|
2495
|
+
disabled: V.value,
|
|
2496
|
+
onInput: s[59] ||= (e) => Yo({ lineColor: e.target.value })
|
|
2497
|
+
}, null, 40, kr)]),
|
|
2498
|
+
m("label", Ar, [s[129] ||= m("span", null, "文字对齐", -1), g(w(O), {
|
|
2499
|
+
value: H.value.style?.textAlign || "left",
|
|
2500
|
+
options: w(va),
|
|
2501
|
+
disabled: V.value,
|
|
2502
|
+
onChange: Ko
|
|
2503
|
+
}, null, 8, [
|
|
2504
|
+
"value",
|
|
2505
|
+
"options",
|
|
2506
|
+
"disabled"
|
|
2507
|
+
])]),
|
|
2508
|
+
H.value.type === "image" ? (b(), p(l, { key: 4 }, [m("label", jr, [s[130] ||= m("span", null, "边框样式", -1), g(w(O), {
|
|
2509
|
+
value: H.value.style?.borderStyle || "dashed",
|
|
2510
|
+
options: ba,
|
|
2511
|
+
disabled: V.value,
|
|
2512
|
+
onChange: qo
|
|
2513
|
+
}, null, 8, ["value", "disabled"])]), m("label", Mr, [s[131] ||= m("span", null, "图片适配", -1), g(w(O), {
|
|
2514
|
+
value: H.value.style?.objectFit || "contain",
|
|
2515
|
+
options: xa,
|
|
2516
|
+
disabled: V.value,
|
|
2517
|
+
onChange: Jo
|
|
2518
|
+
}, null, 8, ["value", "disabled"])])], 64)) : f("", !0)
|
|
2519
|
+
], 64)) : (b(), d(w(Ht), {
|
|
2520
|
+
key: 0,
|
|
2521
|
+
description: "请选择模板变量",
|
|
2522
|
+
image: w(Ht).PRESENTED_IMAGE_SIMPLE
|
|
2523
|
+
}, null, 8, ["image"]))]))
|
|
2524
|
+
])], 2)
|
|
2525
|
+
], 2),
|
|
2526
|
+
(b(), d(Mt, { to: "body" }, [
|
|
2527
|
+
z.value ? (b(), d(vt, {
|
|
2528
|
+
key: 0,
|
|
2529
|
+
ref_key: "tableContextMenuElement",
|
|
2530
|
+
ref: qi,
|
|
2531
|
+
capabilities: z.value.capabilities,
|
|
2532
|
+
"active-alignment": z.value.activeAlignment,
|
|
2533
|
+
style: Nt({
|
|
2534
|
+
left: `${z.value.x}px`,
|
|
2535
|
+
top: `${z.value.y}px`
|
|
2536
|
+
}),
|
|
2537
|
+
onExecute: wc,
|
|
2538
|
+
onKeydown: Tc
|
|
2539
|
+
}, null, 8, [
|
|
2540
|
+
"capabilities",
|
|
2541
|
+
"active-alignment",
|
|
2542
|
+
"style"
|
|
2543
|
+
])) : f("", !0),
|
|
2544
|
+
B.value ? (b(), p("div", {
|
|
2545
|
+
key: 1,
|
|
2546
|
+
ref_key: "imageContextMenuElement",
|
|
2547
|
+
ref: Ji,
|
|
2548
|
+
class: "gd-contract-template-designer__context-menu gd-contract-template-designer__image-context-menu",
|
|
2549
|
+
style: Nt({
|
|
2550
|
+
left: `${B.value.x}px`,
|
|
2551
|
+
top: `${B.value.y}px`
|
|
2552
|
+
}),
|
|
2553
|
+
role: "dialog",
|
|
2554
|
+
"aria-label": "图片尺寸",
|
|
2555
|
+
onKeydown: Dc
|
|
2556
|
+
}, [
|
|
2557
|
+
s[136] ||= m("div", { class: "gd-contract-template-designer__image-context-title" }, [m("strong", null, "图片尺寸"), m("span", null, "单位:px;留空可恢复自然尺寸")], -1),
|
|
2558
|
+
m("div", Nr, [m("label", null, [s[132] ||= m("span", null, "宽度", -1), g(w(Ut), {
|
|
2559
|
+
value: Yi.value,
|
|
2560
|
+
"onUpdate:value": s[60] ||= (e) => Yi.value = e,
|
|
2561
|
+
min: w(16),
|
|
2562
|
+
max: w(Me),
|
|
2563
|
+
disabled: V.value,
|
|
2564
|
+
placeholder: "自然",
|
|
2565
|
+
"aria-label": "图片宽度"
|
|
2566
|
+
}, null, 8, [
|
|
2567
|
+
"value",
|
|
2568
|
+
"min",
|
|
2569
|
+
"max",
|
|
2570
|
+
"disabled"
|
|
2571
|
+
])]), m("label", null, [s[133] ||= m("span", null, "高度", -1), g(w(Ut), {
|
|
2572
|
+
value: Xi.value,
|
|
2573
|
+
"onUpdate:value": s[61] ||= (e) => Xi.value = e,
|
|
2574
|
+
min: w(16),
|
|
2575
|
+
max: w(Me),
|
|
2576
|
+
disabled: V.value,
|
|
2577
|
+
placeholder: "自然",
|
|
2578
|
+
"aria-label": "图片高度"
|
|
2579
|
+
}, null, 8, [
|
|
2580
|
+
"value",
|
|
2581
|
+
"min",
|
|
2582
|
+
"max",
|
|
2583
|
+
"disabled"
|
|
2584
|
+
])])]),
|
|
2585
|
+
m("div", Pr, [g(w(E), {
|
|
2586
|
+
size: "small",
|
|
2587
|
+
onClick: gc
|
|
2588
|
+
}, {
|
|
2589
|
+
default: T(() => [...s[134] ||= [h("恢复自然尺寸", -1)]]),
|
|
1223
2590
|
_: 1
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
placement: "bottom"
|
|
2591
|
+
}), g(w(E), {
|
|
2592
|
+
size: "small",
|
|
2593
|
+
type: "primary",
|
|
2594
|
+
onClick: hc
|
|
1229
2595
|
}, {
|
|
1230
|
-
|
|
1231
|
-
|
|
2596
|
+
default: T(() => [...s[135] ||= [h("应用", -1)]]),
|
|
2597
|
+
_: 1
|
|
2598
|
+
})])
|
|
2599
|
+
], 36)) : f("", !0),
|
|
2600
|
+
R.value ? (b(), p("div", {
|
|
2601
|
+
key: 2,
|
|
2602
|
+
ref_key: "textContextMenuElement",
|
|
2603
|
+
ref: Wi,
|
|
2604
|
+
class: "gd-contract-template-designer__context-menu gd-contract-template-designer__text-context-menu",
|
|
2605
|
+
style: Nt({
|
|
2606
|
+
left: `${R.value.x}px`,
|
|
2607
|
+
top: `${R.value.y}px`
|
|
2608
|
+
}),
|
|
2609
|
+
role: "toolbar",
|
|
2610
|
+
"aria-label": "正文快捷操作",
|
|
2611
|
+
onKeydown: Ec
|
|
2612
|
+
}, [
|
|
2613
|
+
m("div", Fr, [
|
|
2614
|
+
g(w(k), { title: "撤销" }, {
|
|
2615
|
+
default: T(() => [g(w(E), {
|
|
1232
2616
|
size: "small",
|
|
1233
|
-
|
|
2617
|
+
class: "gd-contract-template-designer__text-menu-icon-button",
|
|
2618
|
+
disabled: !G.value.canUndo,
|
|
2619
|
+
"aria-label": "撤销",
|
|
2620
|
+
onClick: s[62] ||= (e) => J({ type: "undo" })
|
|
1234
2621
|
}, {
|
|
1235
|
-
default:
|
|
2622
|
+
default: T(() => [g(w(Se), { "aria-hidden": "true" })]),
|
|
1236
2623
|
_: 1
|
|
1237
|
-
}),
|
|
1238
|
-
_
|
|
2624
|
+
}, 8, ["disabled"])]),
|
|
2625
|
+
_: 1
|
|
2626
|
+
}),
|
|
2627
|
+
g(w(k), { title: "重做" }, {
|
|
2628
|
+
default: T(() => [g(w(E), {
|
|
1239
2629
|
size: "small",
|
|
1240
|
-
|
|
2630
|
+
class: "gd-contract-template-designer__text-menu-icon-button",
|
|
2631
|
+
disabled: !G.value.canRedo,
|
|
2632
|
+
"aria-label": "重做",
|
|
2633
|
+
onClick: s[63] ||= (e) => J({ type: "redo" })
|
|
1241
2634
|
}, {
|
|
1242
|
-
default:
|
|
2635
|
+
default: T(() => [g(w(ge), { "aria-hidden": "true" })]),
|
|
1243
2636
|
_: 1
|
|
1244
|
-
}),
|
|
1245
|
-
_
|
|
2637
|
+
}, 8, ["disabled"])]),
|
|
2638
|
+
_: 1
|
|
2639
|
+
}),
|
|
2640
|
+
s[137] ||= m("span", {
|
|
2641
|
+
class: "gd-contract-template-designer__text-menu-divider",
|
|
2642
|
+
"aria-hidden": "true"
|
|
2643
|
+
}, null, -1),
|
|
2644
|
+
R.value.hasSelection ? (b(), d(w(k), {
|
|
2645
|
+
key: 0,
|
|
2646
|
+
title: "复制"
|
|
2647
|
+
}, {
|
|
2648
|
+
default: T(() => [g(w(E), {
|
|
1246
2649
|
size: "small",
|
|
1247
|
-
|
|
2650
|
+
class: "gd-contract-template-designer__text-menu-icon-button",
|
|
2651
|
+
"aria-label": "复制",
|
|
2652
|
+
onClick: s[64] ||= (e) => $a("copy")
|
|
1248
2653
|
}, {
|
|
1249
|
-
default:
|
|
2654
|
+
default: T(() => [g(w(ee), { "aria-hidden": "true" })]),
|
|
1250
2655
|
_: 1
|
|
1251
|
-
}),
|
|
1252
|
-
_
|
|
2656
|
+
})]),
|
|
2657
|
+
_: 1
|
|
2658
|
+
})) : f("", !0),
|
|
2659
|
+
R.value.hasSelection ? (b(), d(w(k), {
|
|
2660
|
+
key: 1,
|
|
2661
|
+
title: "剪切"
|
|
2662
|
+
}, {
|
|
2663
|
+
default: T(() => [g(w(E), {
|
|
1253
2664
|
size: "small",
|
|
1254
|
-
|
|
2665
|
+
class: "gd-contract-template-designer__text-menu-icon-button",
|
|
2666
|
+
"aria-label": "剪切",
|
|
2667
|
+
onClick: s[65] ||= (e) => $a("cut")
|
|
1255
2668
|
}, {
|
|
1256
|
-
default:
|
|
2669
|
+
default: T(() => [g(w(ye), { "aria-hidden": "true" })]),
|
|
1257
2670
|
_: 1
|
|
1258
|
-
}),
|
|
1259
|
-
_
|
|
2671
|
+
})]),
|
|
2672
|
+
_: 1
|
|
2673
|
+
})) : f("", !0),
|
|
2674
|
+
g(w(k), { title: "粘贴" }, {
|
|
2675
|
+
default: T(() => [g(w(E), {
|
|
1260
2676
|
size: "small",
|
|
1261
|
-
|
|
2677
|
+
class: "gd-contract-template-designer__text-menu-icon-button",
|
|
2678
|
+
"aria-label": "粘贴",
|
|
2679
|
+
onClick: s[66] ||= (e) => $a("paste")
|
|
1262
2680
|
}, {
|
|
1263
|
-
default:
|
|
2681
|
+
default: T(() => [g(w(ee), { "aria-hidden": "true" })]),
|
|
1264
2682
|
_: 1
|
|
1265
|
-
}),
|
|
1266
|
-
_
|
|
2683
|
+
})]),
|
|
2684
|
+
_: 1
|
|
2685
|
+
})
|
|
2686
|
+
]),
|
|
2687
|
+
R.value.hasSelection ? f("", !0) : (b(), p("div", Ir, [
|
|
2688
|
+
g(w(E), {
|
|
2689
|
+
size: "small",
|
|
2690
|
+
onClick: Ro
|
|
2691
|
+
}, {
|
|
2692
|
+
default: T(() => [g(w(me), { "aria-hidden": "true" }), s[138] ||= m("span", null, "图片", -1)]),
|
|
2693
|
+
_: 1
|
|
2694
|
+
}),
|
|
2695
|
+
g(w(E), {
|
|
2696
|
+
size: "small",
|
|
2697
|
+
onClick: s[67] ||= (e) => J({
|
|
2698
|
+
type: "insert-table",
|
|
2699
|
+
options: $i.value
|
|
2700
|
+
})
|
|
2701
|
+
}, {
|
|
2702
|
+
default: T(() => [g(w(be), { "aria-hidden": "true" }), s[139] ||= m("span", null, "表格", -1)]),
|
|
2703
|
+
_: 1
|
|
2704
|
+
}),
|
|
2705
|
+
g(w(E), {
|
|
2706
|
+
size: "small",
|
|
2707
|
+
onClick: s[68] ||= (e) => J({ type: "insert-horizontal-rule" })
|
|
2708
|
+
}, {
|
|
2709
|
+
default: T(() => [g(w(fe), { "aria-hidden": "true" }), s[140] ||= m("span", null, "分隔线", -1)]),
|
|
2710
|
+
_: 1
|
|
2711
|
+
}),
|
|
2712
|
+
g(w(E), {
|
|
2713
|
+
size: "small",
|
|
2714
|
+
disabled: Da.value,
|
|
2715
|
+
onClick: Ho
|
|
2716
|
+
}, {
|
|
2717
|
+
default: T(() => [g(w(oe), { "aria-hidden": "true" }), s[141] ||= m("span", null, "新页面", -1)]),
|
|
2718
|
+
_: 1
|
|
2719
|
+
}, 8, ["disabled"]),
|
|
2720
|
+
g(w(E), {
|
|
2721
|
+
size: "small",
|
|
2722
|
+
onClick: s[69] ||= (e) => J({ type: "select-all" })
|
|
2723
|
+
}, {
|
|
2724
|
+
default: T(() => [...s[142] ||= [m("span", null, "全选正文", -1)]]),
|
|
2725
|
+
_: 1
|
|
2726
|
+
})
|
|
2727
|
+
])),
|
|
2728
|
+
m("div", Lr, [
|
|
2729
|
+
g(w(O), {
|
|
2730
|
+
class: "gd-contract-template-designer__context-menu-field gd-contract-template-designer__text-menu-font-size",
|
|
2731
|
+
value: Na.value,
|
|
2732
|
+
options: Ia.value,
|
|
2733
|
+
"show-search": "",
|
|
2734
|
+
"filter-option": !1,
|
|
2735
|
+
"search-value": Fi.value,
|
|
2736
|
+
onBlur: oc,
|
|
2737
|
+
onChange: tc,
|
|
2738
|
+
onDropdownVisibleChange: cc,
|
|
2739
|
+
onInputKeyDown: sc,
|
|
2740
|
+
onSearch: ac
|
|
2741
|
+
}, null, 8, [
|
|
2742
|
+
"value",
|
|
2743
|
+
"options",
|
|
2744
|
+
"search-value"
|
|
2745
|
+
]),
|
|
2746
|
+
g(w(O), {
|
|
2747
|
+
class: "gd-contract-template-designer__context-menu-field gd-contract-template-designer__text-menu-alignment",
|
|
2748
|
+
value: G.value.textAlign,
|
|
2749
|
+
options: w(va),
|
|
2750
|
+
onChange: $s
|
|
2751
|
+
}, null, 8, ["value", "options"]),
|
|
2752
|
+
g(w(k), { title: "文字颜色" }, {
|
|
2753
|
+
default: T(() => [m("input", {
|
|
2754
|
+
class: "gd-contract-template-designer__context-menu-color",
|
|
2755
|
+
type: "color",
|
|
2756
|
+
"aria-label": "文字颜色",
|
|
2757
|
+
value: Pa.value,
|
|
2758
|
+
onInput: s[70] ||= (e) => ic(e.target.value)
|
|
2759
|
+
}, null, 40, Rr)]),
|
|
2760
|
+
_: 1
|
|
2761
|
+
})
|
|
2762
|
+
]),
|
|
2763
|
+
m("div", {
|
|
2764
|
+
class: "gd-contract-template-designer__text-menu-control-group",
|
|
2765
|
+
role: "group",
|
|
2766
|
+
"aria-label": R.value.hasSelection ? "转换为正文控件" : "插入正文控件"
|
|
2767
|
+
}, [
|
|
2768
|
+
m("div", Br, [m("strong", null, C(R.value.hasSelection ? "转换为正文控件" : "插入正文控件"), 1), m("span", null, C(R.value.hasSelection ? "替换选中内容" : "在光标处插入"), 1)]),
|
|
2769
|
+
m("div", Vr, [(b(!0), p(l, null, S(Ta.value, (e) => (b(), d(w(k), {
|
|
2770
|
+
key: e.type,
|
|
2771
|
+
title: R.value.hasSelection ? `转换为${e.label}控件` : `插入${e.label}控件`
|
|
2772
|
+
}, {
|
|
2773
|
+
default: T(() => [m("button", {
|
|
2774
|
+
type: "button",
|
|
2775
|
+
class: "gd-contract-template-designer__text-menu-control-option",
|
|
2776
|
+
"aria-label": R.value.hasSelection ? `转换为${e.label}控件` : `插入${e.label}控件`,
|
|
2777
|
+
onClick: (t) => as(e.type)
|
|
2778
|
+
}, [(b(), d(It(e.icon), { "aria-hidden": "true" })), m("span", null, C(e.label), 1)], 8, Hr)]),
|
|
2779
|
+
_: 2
|
|
2780
|
+
}, 1032, ["title"]))), 128))]),
|
|
2781
|
+
Gi.value ? (b(), p(l, { key: 1 }, [g(w(D), {
|
|
2782
|
+
value: Ki.value,
|
|
2783
|
+
"onUpdate:value": s[71] ||= (e) => Ki.value = e,
|
|
2784
|
+
class: "gd-contract-template-designer__text-menu-bind-search",
|
|
2785
|
+
size: "small",
|
|
2786
|
+
"allow-clear": "",
|
|
2787
|
+
placeholder: "搜索已有控件",
|
|
2788
|
+
"aria-label": "搜索已有控件"
|
|
2789
|
+
}, null, 8, ["value"]), m("div", Wr, [(b(!0), p(l, null, S(Oa.value, (e) => (b(), p("button", {
|
|
2790
|
+
key: e.id,
|
|
2791
|
+
type: "button",
|
|
2792
|
+
class: "gd-contract-template-designer__text-menu-bind-item",
|
|
2793
|
+
role: "option",
|
|
2794
|
+
onClick: (t) => ss(e)
|
|
2795
|
+
}, [m("span", Kr, C(e.label), 1), m("span", qr, C(cs(e)) + " · " + C(e.key), 1)], 8, Gr))), 128)), Oa.value.length ? f("", !0) : (b(), p("p", Jr, " 暂无已有控件 "))])], 64)) : (b(), p("button", {
|
|
2796
|
+
key: 0,
|
|
2797
|
+
type: "button",
|
|
2798
|
+
class: "gd-contract-template-designer__text-menu-bind-toggle",
|
|
2799
|
+
disabled: !j.value.variables.length,
|
|
2800
|
+
"aria-expanded": !1,
|
|
2801
|
+
"aria-label": "绑定已有控件",
|
|
2802
|
+
onClick: ls
|
|
2803
|
+
}, [s[143] ||= m("span", null, "绑定已有", -1), g(w(re), { "aria-hidden": "true" })], 8, Ur))
|
|
2804
|
+
], 8, zr),
|
|
2805
|
+
m("div", Yr, [
|
|
2806
|
+
g(w(k), { title: "加粗" }, {
|
|
2807
|
+
default: T(() => [g(w(E), {
|
|
1267
2808
|
size: "small",
|
|
1268
|
-
|
|
2809
|
+
class: y(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": G.value.isBold }]),
|
|
2810
|
+
"aria-pressed": G.value.isBold,
|
|
2811
|
+
"aria-label": "加粗",
|
|
2812
|
+
onClick: s[72] ||= (e) => J({ type: "toggle-bold" })
|
|
1269
2813
|
}, {
|
|
1270
|
-
default:
|
|
2814
|
+
default: T(() => [g(w(i), { "aria-hidden": "true" })]),
|
|
1271
2815
|
_: 1
|
|
1272
|
-
}),
|
|
1273
|
-
_
|
|
2816
|
+
}, 8, ["class", "aria-pressed"])]),
|
|
2817
|
+
_: 1
|
|
2818
|
+
}),
|
|
2819
|
+
g(w(k), { title: "斜体" }, {
|
|
2820
|
+
default: T(() => [g(w(E), {
|
|
1274
2821
|
size: "small",
|
|
1275
|
-
|
|
2822
|
+
class: y(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": G.value.isItalic }]),
|
|
2823
|
+
"aria-pressed": G.value.isItalic,
|
|
2824
|
+
"aria-label": "斜体",
|
|
2825
|
+
onClick: s[73] ||= (e) => J({ type: "toggle-italic" })
|
|
1276
2826
|
}, {
|
|
1277
|
-
default:
|
|
2827
|
+
default: T(() => [g(w(ue), { "aria-hidden": "true" })]),
|
|
1278
2828
|
_: 1
|
|
1279
|
-
}),
|
|
1280
|
-
_
|
|
2829
|
+
}, 8, ["class", "aria-pressed"])]),
|
|
2830
|
+
_: 1
|
|
2831
|
+
}),
|
|
2832
|
+
g(w(k), { title: "下划线" }, {
|
|
2833
|
+
default: T(() => [g(w(E), {
|
|
1281
2834
|
size: "small",
|
|
1282
|
-
|
|
2835
|
+
class: y(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": G.value.isUnderline }]),
|
|
2836
|
+
"aria-pressed": G.value.isUnderline,
|
|
2837
|
+
"aria-label": "下划线",
|
|
2838
|
+
onClick: s[74] ||= (e) => J({ type: "toggle-underline" })
|
|
1283
2839
|
}, {
|
|
1284
|
-
default:
|
|
2840
|
+
default: T(() => [g(w(xe), { "aria-hidden": "true" })]),
|
|
1285
2841
|
_: 1
|
|
1286
|
-
}),
|
|
1287
|
-
_
|
|
1288
|
-
|
|
2842
|
+
}, 8, ["class", "aria-pressed"])]),
|
|
2843
|
+
_: 1
|
|
2844
|
+
}),
|
|
2845
|
+
s[144] ||= m("span", {
|
|
2846
|
+
class: "gd-contract-template-designer__text-menu-divider",
|
|
2847
|
+
"aria-hidden": "true"
|
|
2848
|
+
}, null, -1),
|
|
2849
|
+
g(w(k), { title: "有序列表" }, {
|
|
2850
|
+
default: T(() => [g(w(E), {
|
|
1289
2851
|
size: "small",
|
|
1290
|
-
|
|
2852
|
+
class: y(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": G.value.isOrderedList }]),
|
|
2853
|
+
"aria-pressed": G.value.isOrderedList,
|
|
2854
|
+
"aria-label": "有序列表",
|
|
2855
|
+
onClick: s[75] ||= (e) => J({ type: "toggle-ordered-list" })
|
|
1291
2856
|
}, {
|
|
1292
|
-
default:
|
|
2857
|
+
default: T(() => [g(w(pe), { "aria-hidden": "true" })]),
|
|
1293
2858
|
_: 1
|
|
1294
|
-
})
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
2859
|
+
}, 8, ["class", "aria-pressed"])]),
|
|
2860
|
+
_: 1
|
|
2861
|
+
}),
|
|
2862
|
+
g(w(k), { title: "无序列表" }, {
|
|
2863
|
+
default: T(() => [g(w(E), {
|
|
1298
2864
|
size: "small",
|
|
1299
|
-
class: "gd-contract-template-
|
|
1300
|
-
|
|
1301
|
-
"aria-label": "
|
|
2865
|
+
class: y(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": G.value.isBulletList }]),
|
|
2866
|
+
"aria-pressed": G.value.isBulletList,
|
|
2867
|
+
"aria-label": "无序列表",
|
|
2868
|
+
onClick: s[76] ||= (e) => J({ type: "toggle-bullet-list" })
|
|
1302
2869
|
}, {
|
|
1303
|
-
default:
|
|
2870
|
+
default: T(() => [g(w(Ce), { "aria-hidden": "true" })]),
|
|
1304
2871
|
_: 1
|
|
1305
|
-
}, 8, ["
|
|
2872
|
+
}, 8, ["class", "aria-pressed"])]),
|
|
1306
2873
|
_: 1
|
|
1307
|
-
})
|
|
1308
|
-
_: 1
|
|
1309
|
-
}, 8, ["open"])])
|
|
1310
|
-
])]),
|
|
1311
|
-
zn.value ? (v(), m("section", It, [_(x(Qe), {
|
|
1312
|
-
type: Xn.value ? "success" : "error",
|
|
1313
|
-
message: Zn.value,
|
|
1314
|
-
"show-icon": ""
|
|
1315
|
-
}, null, 8, ["type", "message"]), j.value.length ? (v(), m("div", Lt, [(v(!0), m(u, null, Xe(j.value, (e) => (v(), m("button", {
|
|
1316
|
-
key: `${e.id}-${e.message}`,
|
|
1317
|
-
type: "button",
|
|
1318
|
-
class: "gd-contract-template-designer__validation-item",
|
|
1319
|
-
onClick: (t) => Mi(e)
|
|
1320
|
-
}, [h("span", null, b(e.message), 1), h("small", null, b(e.type === "variable" ? "变量" : "字段"), 1)], 8, Rt))), 128))])) : p("", !0)])) : p("", !0),
|
|
1321
|
-
h("div", zt, [(v(!0), m(u, null, Xe(O.value.pages, (e, t) => (v(), f(Pe, {
|
|
1322
|
-
key: e.id,
|
|
1323
|
-
ref_for: !0,
|
|
1324
|
-
ref: (t) => Ir(e.id, t),
|
|
1325
|
-
page: e,
|
|
1326
|
-
"page-index": t,
|
|
1327
|
-
"page-size": zr(e),
|
|
1328
|
-
variables: O.value.variables,
|
|
1329
|
-
"selected-variable-key": k.value,
|
|
1330
|
-
active: A.value === e.id,
|
|
1331
|
-
readonly: c.readonly,
|
|
1332
|
-
disabled: c.disabled,
|
|
1333
|
-
zoom: N.value,
|
|
1334
|
-
onPageUpdate: Rr,
|
|
1335
|
-
onVariableDrop: Yr,
|
|
1336
|
-
onVariableSelect: Xr,
|
|
1337
|
-
onEditorFocus: s[25] ||= (e) => Di(e, !1),
|
|
1338
|
-
onEditorStateChange: Qi,
|
|
1339
|
-
onEditorContextMenu: Ji
|
|
1340
|
-
}, null, 8, [
|
|
1341
|
-
"page",
|
|
1342
|
-
"page-index",
|
|
1343
|
-
"page-size",
|
|
1344
|
-
"variables",
|
|
1345
|
-
"selected-variable-key",
|
|
1346
|
-
"active",
|
|
1347
|
-
"readonly",
|
|
1348
|
-
"disabled",
|
|
1349
|
-
"zoom"
|
|
1350
|
-
]))), 128))])
|
|
1351
|
-
]),
|
|
1352
|
-
h("aside", Bt, [h("section", Vt, [s[76] ||= h("div", { class: "gd-contract-template-designer__panel-head" }, [h("strong", null, "控件"), h("span", null, "拖到正文")], -1), (v(!0), m(u, null, Xe(c.variableTypes, (e) => (v(), m("button", {
|
|
1353
|
-
key: e.type,
|
|
1354
|
-
type: "button",
|
|
1355
|
-
draggable: "true",
|
|
1356
|
-
class: "gd-contract-template-designer__tool-item",
|
|
1357
|
-
disabled: B.value,
|
|
1358
|
-
onDragstart: (t) => ui(t, e.type),
|
|
1359
|
-
onClick: (t) => li(e.type)
|
|
1360
|
-
}, [h("span", null, b(e.label), 1), s[75] ||= h("small", null, "模板变量", -1)], 40, Ht))), 128))]), h("section", Ut, [h("div", Wt, [s[77] ||= h("strong", null, "属性", -1), V.value ? (v(), m("div", Gt, [_(x(D), { title: "复制变量" }, {
|
|
1361
|
-
default: S(() => [_(x(C), {
|
|
1362
|
-
size: "small",
|
|
1363
|
-
type: "primary",
|
|
1364
|
-
class: "gd-contract-template-designer__icon-button",
|
|
1365
|
-
disabled: B.value,
|
|
1366
|
-
"aria-label": "复制变量",
|
|
1367
|
-
onClick: s[26] ||= (e) => si(V.value)
|
|
1368
|
-
}, {
|
|
1369
|
-
default: S(() => [_(x(r), { "aria-hidden": "true" })]),
|
|
1370
|
-
_: 1
|
|
1371
|
-
}, 8, ["disabled"])]),
|
|
1372
|
-
_: 1
|
|
1373
|
-
}), _(x(D), { title: "删除变量" }, {
|
|
1374
|
-
default: S(() => [_(x(C), {
|
|
1375
|
-
danger: "",
|
|
1376
|
-
type: "primary",
|
|
1377
|
-
size: "small",
|
|
1378
|
-
class: "gd-contract-template-designer__icon-button",
|
|
1379
|
-
disabled: B.value,
|
|
1380
|
-
"aria-label": "删除变量",
|
|
1381
|
-
onClick: s[27] ||= (e) => ai(V.value)
|
|
1382
|
-
}, {
|
|
1383
|
-
default: S(() => [_(x(a), { "aria-hidden": "true" })]),
|
|
1384
|
-
_: 1
|
|
1385
|
-
}, 8, ["disabled"])]),
|
|
1386
|
-
_: 1
|
|
1387
|
-
})])) : p("", !0)]), V.value ? (v(), m(u, { key: 1 }, [
|
|
1388
|
-
h("label", Kt, [s[78] ||= h("span", null, "名称", -1), _(x(w), {
|
|
1389
|
-
value: V.value.label,
|
|
1390
|
-
disabled: B.value,
|
|
1391
|
-
onChange: s[28] ||= (e) => X({ label: e.target.value })
|
|
1392
|
-
}, null, 8, ["value", "disabled"])]),
|
|
1393
|
-
h("label", qt, [s[79] ||= h("span", null, "变量标识", -1), _(x(w), {
|
|
1394
|
-
value: V.value.key,
|
|
1395
|
-
disabled: ""
|
|
1396
|
-
}, null, 8, ["value"])]),
|
|
1397
|
-
h("label", Jt, [s[80] ||= h("span", null, "占位文案", -1), _(x(w), {
|
|
1398
|
-
value: V.value.placeholder,
|
|
1399
|
-
disabled: B.value,
|
|
1400
|
-
onChange: s[29] ||= (e) => X({ placeholder: e.target.value })
|
|
1401
|
-
}, null, 8, ["value", "disabled"])]),
|
|
1402
|
-
h("label", Yt, [s[81] ||= h("span", null, "默认值", -1), _(x(w), {
|
|
1403
|
-
value: V.value.defaultValue,
|
|
1404
|
-
disabled: B.value,
|
|
1405
|
-
onChange: s[30] ||= (e) => X({ defaultValue: e.target.value })
|
|
1406
|
-
}, null, 8, ["value", "disabled"])]),
|
|
1407
|
-
h("label", Xt, [s[82] ||= h("span", null, "宽度", -1), _(x(T), {
|
|
1408
|
-
value: V.value.width,
|
|
1409
|
-
min: Pn,
|
|
1410
|
-
max: pr.value,
|
|
1411
|
-
disabled: B.value,
|
|
1412
|
-
onChange: s[31] ||= (e) => X({ width: Number(e || Pn) })
|
|
1413
|
-
}, null, 8, [
|
|
1414
|
-
"value",
|
|
1415
|
-
"max",
|
|
1416
|
-
"disabled"
|
|
1417
|
-
])]),
|
|
1418
|
-
h("label", Zt, [s[83] ||= h("span", null, "高度", -1), _(x(T), {
|
|
1419
|
-
value: V.value.height,
|
|
1420
|
-
min: Fn,
|
|
1421
|
-
max: mr.value,
|
|
1422
|
-
disabled: B.value,
|
|
1423
|
-
onChange: s[32] ||= (e) => X({ height: Number(e || Fn) })
|
|
1424
|
-
}, null, 8, [
|
|
1425
|
-
"value",
|
|
1426
|
-
"max",
|
|
1427
|
-
"disabled"
|
|
1428
|
-
])]),
|
|
1429
|
-
V.value.type === "text" ? (v(), m("div", Qt, [h("label", $t, [s[84] ||= h("span", null, "多行", -1), _(x(nt), {
|
|
1430
|
-
checked: !!V.value.multiline,
|
|
1431
|
-
disabled: B.value,
|
|
1432
|
-
onChange: s[33] ||= (e) => ri(!!e)
|
|
1433
|
-
}, null, 8, ["checked", "disabled"])]), V.value.multiline ? (v(), m("label", en, [s[85] ||= h("span", null, "行数", -1), _(x(T), {
|
|
1434
|
-
value: V.value.rows || x(3),
|
|
1435
|
-
min: 2,
|
|
1436
|
-
max: 12,
|
|
1437
|
-
disabled: B.value,
|
|
1438
|
-
onChange: ii
|
|
1439
|
-
}, null, 8, ["value", "disabled"])])) : p("", !0)])) : p("", !0),
|
|
1440
|
-
V.value.type === "date" ? (v(), m("label", tn, [s[86] ||= h("span", null, "日期格式", -1), _(x(w), {
|
|
1441
|
-
value: V.value.format,
|
|
1442
|
-
disabled: B.value,
|
|
1443
|
-
onChange: s[34] ||= (e) => X({ format: e.target.value })
|
|
1444
|
-
}, null, 8, ["value", "disabled"])])) : p("", !0),
|
|
1445
|
-
V.value.type === "number" ? (v(), m(u, { key: 2 }, [h("label", nn, [s[87] ||= h("span", null, "数字格式", -1), _(x(w), {
|
|
1446
|
-
value: V.value.format,
|
|
1447
|
-
disabled: B.value,
|
|
1448
|
-
onChange: s[35] ||= (e) => X({ format: e.target.value })
|
|
1449
|
-
}, null, 8, ["value", "disabled"])]), h("label", rn, [s[88] ||= h("span", null, "小数位", -1), _(x(T), {
|
|
1450
|
-
value: V.value.precision,
|
|
1451
|
-
min: 0,
|
|
1452
|
-
max: 6,
|
|
1453
|
-
disabled: B.value,
|
|
1454
|
-
onChange: s[36] ||= (e) => X({ precision: typeof e == "number" ? e : void 0 })
|
|
1455
|
-
}, null, 8, ["value", "disabled"])])], 64)) : p("", !0),
|
|
1456
|
-
V.value.type === "checkbox" ? (v(), m(u, { key: 3 }, [h("label", an, [s[89] ||= h("span", null, "勾选文本", -1), _(x(w), {
|
|
1457
|
-
value: V.value.checkedText,
|
|
1458
|
-
disabled: B.value,
|
|
1459
|
-
onChange: s[37] ||= (e) => X({ checkedText: e.target.value })
|
|
1460
|
-
}, null, 8, ["value", "disabled"])]), h("label", on, [s[90] ||= h("span", null, "未选文本", -1), _(x(w), {
|
|
1461
|
-
value: V.value.uncheckedText,
|
|
1462
|
-
disabled: B.value,
|
|
1463
|
-
onChange: s[38] ||= (e) => X({ uncheckedText: e.target.value })
|
|
1464
|
-
}, null, 8, ["value", "disabled"])])], 64)) : p("", !0),
|
|
1465
|
-
h("div", sn, [
|
|
1466
|
-
h("label", cn, [s[91] ||= h("span", null, "必填", -1), _(x(nt), {
|
|
1467
|
-
checked: V.value.required,
|
|
1468
|
-
disabled: B.value,
|
|
1469
|
-
onChange: s[39] ||= (e) => X({ required: !!e })
|
|
1470
|
-
}, null, 8, ["checked", "disabled"])]),
|
|
1471
|
-
h("label", ln, [s[92] ||= h("span", null, "边框", -1), _(x(nt), {
|
|
1472
|
-
checked: !!V.value.style?.border,
|
|
1473
|
-
disabled: B.value,
|
|
1474
|
-
onChange: s[40] ||= (e) => Z({ border: !!e })
|
|
1475
|
-
}, null, 8, ["checked", "disabled"])]),
|
|
1476
|
-
h("label", un, [s[93] ||= h("span", null, "下划线", -1), _(x(nt), {
|
|
1477
|
-
checked: !!V.value.style?.underline,
|
|
1478
|
-
disabled: B.value,
|
|
1479
|
-
onChange: s[41] ||= (e) => Z({ underline: !!e })
|
|
1480
|
-
}, null, 8, ["checked", "disabled"])]),
|
|
1481
|
-
V.value.type === "number" ? (v(), m("label", dn, [s[94] ||= h("span", null, "千分位", -1), _(x(nt), {
|
|
1482
|
-
checked: V.value.useGrouping !== !1,
|
|
1483
|
-
disabled: B.value,
|
|
1484
|
-
onChange: s[42] ||= (e) => X({ useGrouping: !!e })
|
|
1485
|
-
}, null, 8, ["checked", "disabled"])])) : p("", !0)
|
|
1486
|
-
]),
|
|
1487
|
-
h("label", fn, [s[95] ||= h("span", null, "字体", -1), _(x(E), {
|
|
1488
|
-
value: yr.value,
|
|
1489
|
-
options: rr.value,
|
|
1490
|
-
disabled: B.value,
|
|
1491
|
-
onChange: ti
|
|
1492
|
-
}, null, 8, [
|
|
1493
|
-
"value",
|
|
1494
|
-
"options",
|
|
1495
|
-
"disabled"
|
|
1496
|
-
])]),
|
|
1497
|
-
h("label", pn, [s[96] ||= h("span", null, "字号", -1), _(x(T), {
|
|
1498
|
-
value: V.value.style?.fontSize,
|
|
1499
|
-
min: In,
|
|
1500
|
-
max: Ln,
|
|
1501
|
-
disabled: B.value,
|
|
1502
|
-
onChange: ni
|
|
1503
|
-
}, null, 8, ["value", "disabled"])]),
|
|
1504
|
-
h("label", mn, [s[97] ||= h("span", null, "颜色", -1), h("input", {
|
|
1505
|
-
type: "color",
|
|
1506
|
-
value: V.value.style?.color || "#1f2937",
|
|
1507
|
-
disabled: B.value,
|
|
1508
|
-
onInput: s[43] ||= (e) => Z({ color: e.target.value })
|
|
1509
|
-
}, null, 40, hn)]),
|
|
1510
|
-
h("label", gn, [s[98] ||= h("span", null, "占位颜色", -1), h("input", {
|
|
1511
|
-
type: "color",
|
|
1512
|
-
value: V.value.style?.placeholderColor || "#7a818b",
|
|
1513
|
-
disabled: B.value,
|
|
1514
|
-
onInput: s[44] ||= (e) => Z({ placeholderColor: e.target.value })
|
|
1515
|
-
}, null, 40, _n)]),
|
|
1516
|
-
h("label", vn, [s[99] ||= h("span", null, "线条颜色", -1), h("input", {
|
|
1517
|
-
type: "color",
|
|
1518
|
-
value: V.value.style?.lineColor || "#565b66",
|
|
1519
|
-
disabled: B.value,
|
|
1520
|
-
onInput: s[45] ||= (e) => Z({ lineColor: e.target.value })
|
|
1521
|
-
}, null, 40, yn)]),
|
|
1522
|
-
h("label", bn, [s[100] ||= h("span", null, "文字对齐", -1), _(x(E), {
|
|
1523
|
-
value: V.value.style?.textAlign || "left",
|
|
1524
|
-
options: x(ar),
|
|
1525
|
-
disabled: B.value,
|
|
1526
|
-
onChange: Qr
|
|
1527
|
-
}, null, 8, [
|
|
1528
|
-
"value",
|
|
1529
|
-
"options",
|
|
1530
|
-
"disabled"
|
|
1531
|
-
])]),
|
|
1532
|
-
V.value.type === "image" ? (v(), m(u, { key: 4 }, [h("label", xn, [s[101] ||= h("span", null, "边框样式", -1), _(x(E), {
|
|
1533
|
-
value: V.value.style?.borderStyle || "dashed",
|
|
1534
|
-
options: sr,
|
|
1535
|
-
disabled: B.value,
|
|
1536
|
-
onChange: $r
|
|
1537
|
-
}, null, 8, ["value", "disabled"])]), h("label", Sn, [s[102] ||= h("span", null, "图片适配", -1), _(x(E), {
|
|
1538
|
-
value: V.value.style?.objectFit || "contain",
|
|
1539
|
-
options: cr,
|
|
1540
|
-
disabled: B.value,
|
|
1541
|
-
onChange: ei
|
|
1542
|
-
}, null, 8, ["value", "disabled"])])], 64)) : p("", !0)
|
|
1543
|
-
], 64)) : (v(), f(x($e), {
|
|
1544
|
-
key: 0,
|
|
1545
|
-
description: "请选择模板变量",
|
|
1546
|
-
image: x($e).PRESENTED_IMAGE_SIMPLE
|
|
1547
|
-
}, null, 8, ["image"]))])]),
|
|
1548
|
-
Jn.value ? (v(), m("div", {
|
|
1549
|
-
key: 0,
|
|
1550
|
-
class: "gd-contract-template-designer__context-menu",
|
|
1551
|
-
style: qe({
|
|
1552
|
-
left: `${Jn.value.x}px`,
|
|
1553
|
-
top: `${Jn.value.y}px`
|
|
1554
|
-
})
|
|
1555
|
-
}, [
|
|
1556
|
-
h("div", Cn, [
|
|
1557
|
-
_(x(E), {
|
|
1558
|
-
class: "gd-contract-template-designer__context-menu-field",
|
|
1559
|
-
value: _r.value,
|
|
1560
|
-
options: br.value,
|
|
1561
|
-
"show-search": "",
|
|
1562
|
-
"filter-option": !1,
|
|
1563
|
-
"search-value": F.value,
|
|
1564
|
-
onBlur: Wi,
|
|
1565
|
-
onChange: zi,
|
|
1566
|
-
onDropdownVisibleChange: Ki,
|
|
1567
|
-
onInputKeyDown: Gi,
|
|
1568
|
-
onSearch: Ui
|
|
1569
|
-
}, null, 8, [
|
|
1570
|
-
"value",
|
|
1571
|
-
"options",
|
|
1572
|
-
"search-value"
|
|
2874
|
+
})
|
|
1573
2875
|
]),
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
onInput: s[46] ||= (e) => Hi(e.target.value)
|
|
1585
|
-
}, null, 40, wn)
|
|
1586
|
-
]),
|
|
1587
|
-
h("div", Tn, [
|
|
1588
|
-
_(x(C), {
|
|
1589
|
-
size: "small",
|
|
1590
|
-
type: W.value.isBold ? "primary" : "default",
|
|
1591
|
-
onClick: s[47] ||= (e) => J({ type: "toggle-bold" })
|
|
1592
|
-
}, {
|
|
1593
|
-
default: S(() => [...s[103] ||= [g(" 加粗 ", -1)]]),
|
|
1594
|
-
_: 1
|
|
1595
|
-
}, 8, ["type"]),
|
|
1596
|
-
_(x(C), {
|
|
1597
|
-
size: "small",
|
|
1598
|
-
type: W.value.isItalic ? "primary" : "default",
|
|
1599
|
-
onClick: s[48] ||= (e) => J({ type: "toggle-italic" })
|
|
1600
|
-
}, {
|
|
1601
|
-
default: S(() => [...s[104] ||= [g(" 斜体 ", -1)]]),
|
|
1602
|
-
_: 1
|
|
1603
|
-
}, 8, ["type"]),
|
|
1604
|
-
_(x(C), {
|
|
1605
|
-
size: "small",
|
|
1606
|
-
type: W.value.isUnderline ? "primary" : "default",
|
|
1607
|
-
onClick: s[49] ||= (e) => J({ type: "toggle-underline" })
|
|
1608
|
-
}, {
|
|
1609
|
-
default: S(() => [...s[105] ||= [g(" 下划线 ", -1)]]),
|
|
1610
|
-
_: 1
|
|
1611
|
-
}, 8, ["type"])
|
|
1612
|
-
]),
|
|
1613
|
-
h("div", En, [
|
|
1614
|
-
_(x(C), {
|
|
1615
|
-
size: "small",
|
|
1616
|
-
type: W.value.isOrderedList ? "primary" : "default",
|
|
1617
|
-
onClick: s[50] ||= (e) => J({ type: "toggle-ordered-list" })
|
|
1618
|
-
}, {
|
|
1619
|
-
default: S(() => [...s[106] ||= [g(" 有序列表 ", -1)]]),
|
|
1620
|
-
_: 1
|
|
1621
|
-
}, 8, ["type"]),
|
|
1622
|
-
_(x(C), {
|
|
1623
|
-
size: "small",
|
|
1624
|
-
type: W.value.isBulletList ? "primary" : "default",
|
|
1625
|
-
onClick: s[51] ||= (e) => J({ type: "toggle-bullet-list" })
|
|
1626
|
-
}, {
|
|
1627
|
-
default: S(() => [...s[107] ||= [g(" 无序列表 ", -1)]]),
|
|
1628
|
-
_: 1
|
|
1629
|
-
}, 8, ["type"]),
|
|
1630
|
-
_(x(C), {
|
|
1631
|
-
size: "small",
|
|
1632
|
-
onClick: s[52] ||= (e) => J({ type: "clear-text-format" })
|
|
1633
|
-
}, {
|
|
1634
|
-
default: S(() => [...s[108] ||= [g(" 清除文字格式 ", -1)]]),
|
|
2876
|
+
m("div", Xr, [g(w(k), { title: "清除文字格式" }, {
|
|
2877
|
+
default: T(() => [g(w(E), {
|
|
2878
|
+
size: "small",
|
|
2879
|
+
class: "gd-contract-template-designer__text-menu-clear-action",
|
|
2880
|
+
"aria-label": "清除文字格式",
|
|
2881
|
+
onClick: s[77] ||= (e) => J({ type: "clear-text-format" })
|
|
2882
|
+
}, {
|
|
2883
|
+
default: T(() => [g(w(a), { "aria-hidden": "true" }), s[145] ||= m("span", null, "清文字", -1)]),
|
|
2884
|
+
_: 1
|
|
2885
|
+
})]),
|
|
1635
2886
|
_: 1
|
|
1636
|
-
}),
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
2887
|
+
}), g(w(k), { title: "清除段落格式" }, {
|
|
2888
|
+
default: T(() => [g(w(E), {
|
|
2889
|
+
size: "small",
|
|
2890
|
+
class: "gd-contract-template-designer__text-menu-clear-action",
|
|
2891
|
+
"aria-label": "清除段落格式",
|
|
2892
|
+
onClick: s[78] ||= (e) => J({ type: "clear-block-format" })
|
|
2893
|
+
}, {
|
|
2894
|
+
default: T(() => [g(w(se), { "aria-hidden": "true" }), s[146] ||= m("span", null, "清段落", -1)]),
|
|
2895
|
+
_: 1
|
|
2896
|
+
})]),
|
|
1642
2897
|
_: 1
|
|
1643
|
-
})
|
|
1644
|
-
])
|
|
1645
|
-
]
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
2898
|
+
})])
|
|
2899
|
+
], 36)) : f("", !0)
|
|
2900
|
+
])),
|
|
2901
|
+
m("input", {
|
|
2902
|
+
ref_key: "imageFileInputElement",
|
|
2903
|
+
ref: vi,
|
|
2904
|
+
class: "gd-contract-template-designer__hidden-file-input",
|
|
2905
|
+
type: "file",
|
|
2906
|
+
accept: "image/png,image/jpeg,image/webp,image/gif,image/bmp",
|
|
2907
|
+
tabindex: "-1",
|
|
2908
|
+
"aria-hidden": "true",
|
|
2909
|
+
onChange: zo
|
|
2910
|
+
}, null, 544),
|
|
2911
|
+
m("span", Zr, C(Zi.value), 1),
|
|
2912
|
+
g(w(Wt), {
|
|
2913
|
+
open: Ti.value,
|
|
2914
|
+
"onUpdate:open": s[79] ||= (e) => Ti.value = e,
|
|
1649
2915
|
title: "模板预览",
|
|
1650
2916
|
width: "min(1440px, calc(100vw - 32px))",
|
|
1651
2917
|
centered: "",
|
|
1652
2918
|
footer: null,
|
|
1653
2919
|
"wrap-class-name": "gd-contract-template-designer__preview-modal",
|
|
1654
|
-
onCancel:
|
|
2920
|
+
onCancel: ks
|
|
1655
2921
|
}, {
|
|
1656
|
-
default:
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
2922
|
+
default: T(() => [m("div", Qr, [(b(!0), p(l, null, S(ia.value, (e) => (b(), d(_t, {
|
|
2923
|
+
key: e.page.id,
|
|
2924
|
+
page: e.page,
|
|
2925
|
+
"fallback-page-size": Ei.value?.pageSize ?? w($e),
|
|
2926
|
+
"content-html": e.contentHtml,
|
|
2927
|
+
"signing-placements": e.signingPlacements
|
|
2928
|
+
}, null, 8, [
|
|
2929
|
+
"page",
|
|
2930
|
+
"fallback-page-size",
|
|
2931
|
+
"content-html",
|
|
2932
|
+
"signing-placements"
|
|
2933
|
+
]))), 128))])]),
|
|
1660
2934
|
_: 1
|
|
1661
2935
|
}, 8, ["open"]),
|
|
1662
|
-
|
|
1663
|
-
open:
|
|
1664
|
-
"onUpdate:open": s[
|
|
2936
|
+
g(w(Wt), {
|
|
2937
|
+
open: Di.value,
|
|
2938
|
+
"onUpdate:open": s[80] ||= (e) => Di.value = e,
|
|
1665
2939
|
title: "提交数据查看",
|
|
1666
2940
|
width: "min(960px, calc(100vw - 48px))",
|
|
1667
2941
|
centered: "",
|
|
1668
2942
|
footer: null,
|
|
1669
2943
|
"wrap-class-name": "gd-contract-template-designer__submit-data-modal",
|
|
1670
|
-
onCancel:
|
|
2944
|
+
onCancel: Ms
|
|
1671
2945
|
}, {
|
|
1672
|
-
default:
|
|
2946
|
+
default: T(() => [m("pre", $r, C(Oi.value), 1)]),
|
|
1673
2947
|
_: 1
|
|
1674
2948
|
}, 8, ["open"])
|
|
1675
2949
|
], 2));
|
|
1676
2950
|
}
|
|
1677
2951
|
});
|
|
1678
2952
|
//#endregion
|
|
1679
|
-
export {
|
|
2953
|
+
export { pi as default };
|