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