@guodun/antdv 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/contract-signing-location/index.mjs +1 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +304 -289
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +337 -326
- 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 +128 -125
- 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 +135 -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/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 +3 -1
- package/dist/types/components/contract-signing-location/src/ContractSigningLocationInspector.vue.d.ts +2 -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 +47 -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 +12 -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 +2 -1
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import { CONTRACT_SIGNING_SEAL_TYPE_OPTIONS as e } from "./constants.mjs";
|
|
2
2
|
import { clampContractSigningPlacement as t, clampContractSigningZoom as n, normalizeContractSigningCoordinateScale as r, resolveContractSigningSealSizeLimit as i } from "./coordinates.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { isContractSigningTemplateFile as a } from "./template-source.mjs";
|
|
4
|
+
import { ContractSigningLocationBuildError as o, buildContractSigningLocationOutput as ee, cloneContractSigningLocationValue as s, createContractSigningLocationValue as c, createContractSigningPlacement as te, findContractSigningPage as l, getContractSigningHomePage as ne, isContractSigningPageUsable as re, normalizeContractSigningLocationValue as u, normalizeContractSigningProviderValue as ie, patchContractSigningPlacement as ae, resolveContractSigningPreviewPageSize as oe, validateContractSigningLocationValue as se } from "./location-rules.mjs";
|
|
4
5
|
import ce from "./ContractSigningLocationCanvas.mjs";
|
|
5
6
|
import le from "./ContractSigningLocationInspector.mjs";
|
|
6
7
|
import ue from "./ContractSigningLocationNavigator.mjs";
|
|
7
8
|
import { ContractSigningPreviewRequests as de } from "./preview-requests.mjs";
|
|
8
|
-
import { computed as
|
|
9
|
-
import { Button as
|
|
9
|
+
import { computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as fe, createVNode as g, defineComponent as pe, nextTick as _, normalizeClass as v, normalizeStyle as me, onBeforeUnmount as he, openBlock as y, ref as b, shallowRef as x, toDisplayString as ge, unref as S, watch as C, withCtx as w } from "vue";
|
|
10
|
+
import { Button as T, Tooltip as _e } from "ant-design-vue";
|
|
10
11
|
import { LeftOutlined as ve, ReloadOutlined as ye, RightOutlined as be } from "@ant-design/icons-vue";
|
|
11
12
|
//#region src/components/contract-signing-location/src/ContractSigningLocation.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "gd-ant-contract-signing-location__header-actions" },
|
|
13
|
+
var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "gd-ant-contract-signing-location__title" }, Ce = { class: "gd-ant-contract-signing-location__header-actions" }, we = { class: "gd-ant-contract-signing-location__placement-count" }, Te = {
|
|
13
14
|
key: 0,
|
|
14
15
|
class: "gd-ant-contract-signing-location__error",
|
|
15
16
|
role: "alert"
|
|
16
|
-
},
|
|
17
|
+
}, Ee = ["aria-label", "aria-expanded"], De = { class: "gd-ant-contract-signing-location__panel-stack" }, Oe = ["aria-label", "aria-expanded"], ke = { class: "gd-ant-contract-signing-location__panel-stack" }, Ae = /* @__PURE__ */ pe({
|
|
17
18
|
name: "ContractSigningLocation",
|
|
18
19
|
__name: "ContractSigningLocation",
|
|
19
20
|
props: {
|
|
20
21
|
modelValue: { default: void 0 },
|
|
22
|
+
mode: { default: "placement" },
|
|
21
23
|
contractId: { default: "" },
|
|
22
24
|
dataProvider: { default: void 0 },
|
|
23
25
|
sealTypeOptions: { default: () => e.map((e) => ({ ...e })) },
|
|
@@ -47,6 +49,10 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
47
49
|
showSubmitButton: {
|
|
48
50
|
type: Boolean,
|
|
49
51
|
default: !0
|
|
52
|
+
},
|
|
53
|
+
showInspector: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: void 0
|
|
50
56
|
}
|
|
51
57
|
},
|
|
52
58
|
emits: [
|
|
@@ -59,191 +65,192 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
59
65
|
"submit",
|
|
60
66
|
"error"
|
|
61
67
|
],
|
|
62
|
-
setup(e, { expose: pe, emit:
|
|
63
|
-
let
|
|
64
|
-
sealSizeLimit:
|
|
65
|
-
sealTypeOptions:
|
|
66
|
-
}),
|
|
67
|
-
let e = J.value;
|
|
68
|
-
return e ? k.value.placements.filter((t) => t.fileId === e.fileId) : [];
|
|
69
|
-
}), Y = u(() => k.value.placements.find((e) => e.id === M.value)), Fe = u(() => {
|
|
68
|
+
setup(e, { expose: pe, emit: Ae }) {
|
|
69
|
+
let E = e, D = Ae, O = d(() => i(E.sealMinSize, E.sealMaxSize)), k = u(E.modelValue ?? c(E.contractId), {
|
|
70
|
+
sealSizeLimit: O.value,
|
|
71
|
+
sealTypeOptions: E.sealTypeOptions
|
|
72
|
+
}), A = b(k), je = x(s(k)), j = x(k.files[0]?.fileId ?? ""), M = x(k.files[0]?.pages[0]?.pageIndex ?? 0), N = x(""), P = x(!1), F = x(""), I = b([]), L = b({}), R = x(We(E.zoom)), z = b(null), B = b(!1), V = b(!1), H = 0, U = !1, Me, W = [], G = 0, K = new de(), q = d(() => E.mode === "preview"), J = d(() => q.value || E.readonly || E.disabled), Ne = d(() => E.showInspector ?? !q.value), Pe = d(() => !q.value && E.showSubmitButton), Fe = d(() => A.value.files.length <= 1), Ie = d(() => St(E.height)), Y = d(() => A.value.files.find((e) => e.fileId === j.value) ?? A.value.files[0]), Le = d(() => Y.value?.pages.find((e) => e.pageIndex === M.value) ?? Y.value?.pages[0]), Re = d(() => {
|
|
70
73
|
let e = Y.value;
|
|
71
|
-
return e ?
|
|
72
|
-
}),
|
|
74
|
+
return e ? A.value.placements.filter((t) => t.fileId === e.fileId) : [];
|
|
75
|
+
}), X = d(() => A.value.placements.find((e) => e.id === N.value)), ze = d(() => {
|
|
76
|
+
let e = X.value;
|
|
77
|
+
return e ? l(A.value, e.fileId, e.pageIndex) ?? Le.value : Le.value;
|
|
78
|
+
}), Be = d(() => I.value.filter((e) => e.endsWith(":thumbnail")).map((e) => e.slice(0, -10))), Ve = d(() => Object.keys(L.value).filter((e) => e.endsWith(":thumbnail")).map((e) => e.slice(0, -10))), He = d(() => I.value.filter((e) => e.endsWith(":preview")).map((e) => e.slice(0, -8))), Ue = d(() => {
|
|
73
79
|
let e = {};
|
|
74
|
-
return Object.entries(
|
|
80
|
+
return Object.entries(L.value).forEach(([t, n]) => {
|
|
75
81
|
t.endsWith(":preview") && (e[t.slice(0, -8)] = n);
|
|
76
82
|
}), e;
|
|
77
83
|
});
|
|
78
|
-
|
|
84
|
+
C(() => E.modelValue, (e) => {
|
|
79
85
|
if (!e) return;
|
|
80
|
-
let t =
|
|
81
|
-
sealSizeLimit:
|
|
82
|
-
sealTypeOptions:
|
|
86
|
+
let t = u(e, {
|
|
87
|
+
sealSizeLimit: O.value,
|
|
88
|
+
sealTypeOptions: E.sealTypeOptions
|
|
83
89
|
});
|
|
84
|
-
|
|
85
|
-
}, { deep: !0 }),
|
|
86
|
-
|
|
87
|
-
sealSizeLimit:
|
|
88
|
-
sealTypeOptions:
|
|
89
|
-
})) !==
|
|
90
|
-
}),
|
|
91
|
-
|
|
92
|
-
}),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
bt(t) !== bt(A.value) && (gt(), A.value = t, je.value = s(t), dt(), _(() => z.value?.scrollToPage(M.value)));
|
|
91
|
+
}, { deep: !0 }), C(O, () => {
|
|
92
|
+
bt(u(A.value, {
|
|
93
|
+
sealSizeLimit: O.value,
|
|
94
|
+
sealTypeOptions: E.sealTypeOptions
|
|
95
|
+
})) !== bt(A.value) && Z(A.value);
|
|
96
|
+
}), C(() => E.zoom, (e) => {
|
|
97
|
+
R.value = We(e);
|
|
98
|
+
}), C(() => [
|
|
99
|
+
E.contractId,
|
|
100
|
+
E.dataProvider,
|
|
101
|
+
E.autoLoad
|
|
96
102
|
], ([e, t, n], r) => {
|
|
97
|
-
!n || !t || !e || (!r || e !== r[0] || t !== r[1]) &&
|
|
103
|
+
!n || !t || !e || (!r || e !== r[0] || t !== r[1]) && Q();
|
|
98
104
|
}, { immediate: !0 }), he(() => {
|
|
99
|
-
|
|
105
|
+
U = !0, H += 1, ht(), gt();
|
|
100
106
|
});
|
|
101
|
-
function
|
|
102
|
-
return n(e, Math.min(
|
|
103
|
-
}
|
|
104
|
-
function
|
|
105
|
-
let t =
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
function
|
|
109
|
-
return
|
|
110
|
-
}
|
|
111
|
-
function
|
|
112
|
-
|
|
113
|
-
sealSizeLimit:
|
|
114
|
-
sealTypeOptions:
|
|
115
|
-
}), t.clearError !== !1 && (
|
|
116
|
-
let n = s(
|
|
117
|
-
return
|
|
118
|
-
}
|
|
119
|
-
async function
|
|
120
|
-
let e = String(
|
|
121
|
-
if (!
|
|
107
|
+
function We(e) {
|
|
108
|
+
return n(e, Math.min(E.minZoom, E.maxZoom), Math.max(E.minZoom, E.maxZoom));
|
|
109
|
+
}
|
|
110
|
+
function Ge(e) {
|
|
111
|
+
let t = We(e);
|
|
112
|
+
R.value = t, D("update:zoom", t);
|
|
113
|
+
}
|
|
114
|
+
function Ke() {
|
|
115
|
+
return z.value?.fitWidth() ?? R.value;
|
|
116
|
+
}
|
|
117
|
+
function Z(e, t = {}) {
|
|
118
|
+
A.value = u(e, {
|
|
119
|
+
sealSizeLimit: O.value,
|
|
120
|
+
sealTypeOptions: E.sealTypeOptions
|
|
121
|
+
}), t.clearError !== !1 && (F.value = ""), dt();
|
|
122
|
+
let n = s(A.value);
|
|
123
|
+
return D("update:modelValue", n), D("change", n), n;
|
|
124
|
+
}
|
|
125
|
+
async function Q() {
|
|
126
|
+
let e = String(E.contractId || A.value.contractId || "").trim();
|
|
127
|
+
if (!E.dataProvider) return $({
|
|
122
128
|
code: "CONTRACT_PROVIDER_MISSING",
|
|
123
129
|
message: "未配置合同数据提供器,请由宿主传入文件数据"
|
|
124
130
|
}), !1;
|
|
125
|
-
if (!e) return
|
|
131
|
+
if (!e) return $({
|
|
126
132
|
code: "CONTRACT_ID_MISSING",
|
|
127
133
|
message: "缺少用于加载合同的 PaaS contractId"
|
|
128
134
|
}), !1;
|
|
129
|
-
let t = ++
|
|
130
|
-
|
|
135
|
+
let t = ++H;
|
|
136
|
+
gt(), P.value = !0, F.value = "";
|
|
131
137
|
try {
|
|
132
|
-
let n = await
|
|
133
|
-
if (
|
|
134
|
-
let i = ie(n, r(
|
|
138
|
+
let n = await E.dataProvider.loadContract({ contractId: e });
|
|
139
|
+
if (U || t !== H) return !1;
|
|
140
|
+
let i = ie(n, r(E.dataProvider.coordinateScale)), a = u({
|
|
135
141
|
...i,
|
|
136
142
|
contractId: e,
|
|
137
|
-
placements: i.placements.length ? i.placements :
|
|
143
|
+
placements: i.placements.length ? i.placements : A.value.contractId === e ? A.value.placements : []
|
|
138
144
|
}, {
|
|
139
|
-
sealSizeLimit:
|
|
140
|
-
sealTypeOptions:
|
|
145
|
+
sealSizeLimit: O.value,
|
|
146
|
+
sealTypeOptions: E.sealTypeOptions
|
|
141
147
|
});
|
|
142
|
-
|
|
148
|
+
A.value = a, je.value = s(a), N.value = "", dt();
|
|
143
149
|
let o = s(a);
|
|
144
|
-
return
|
|
150
|
+
return D("update:modelValue", o), D("change", o), D("ready", o), qe(), _(() => z.value?.scrollToPage(M.value)), o;
|
|
145
151
|
} catch (e) {
|
|
146
|
-
return
|
|
152
|
+
return U || t !== H || $(ft(e, "CONTRACT_LOAD_FAILED", "合同加载失败,请检查授权后重试")), !1;
|
|
147
153
|
} finally {
|
|
148
|
-
!
|
|
154
|
+
!U && t === H && (P.value = !1);
|
|
149
155
|
}
|
|
150
156
|
}
|
|
151
|
-
async function
|
|
152
|
-
|
|
157
|
+
async function qe() {
|
|
158
|
+
E.dataProvider?.loadPagePreview && await Promise.allSettled(A.value.files.map((e) => {
|
|
159
|
+
if (a(e)) return Promise.resolve();
|
|
153
160
|
let t = ne(e.pages);
|
|
154
|
-
return t && !t.thumbnailUrl ?
|
|
161
|
+
return t && !t.thumbnailUrl ? Je(e.fileId, t.pageIndex, !0) : Promise.resolve();
|
|
155
162
|
}));
|
|
156
163
|
}
|
|
157
|
-
async function
|
|
158
|
-
let i =
|
|
159
|
-
if (!i ||
|
|
160
|
-
|
|
161
|
-
let
|
|
164
|
+
async function Je(e, t, n) {
|
|
165
|
+
let i = E.dataProvider?.loadPagePreview, o = A.value.files.find((t) => t.fileId === e), ee = l(A.value, e, t), s = pt(e, t, n);
|
|
166
|
+
if (!i || a(o) || !ee || I.value.includes(s)) return;
|
|
167
|
+
mt(s), I.value = [...I.value, s];
|
|
168
|
+
let c = K.start(s);
|
|
162
169
|
try {
|
|
163
170
|
let a = await i({
|
|
164
|
-
contractId:
|
|
171
|
+
contractId: A.value.contractId || E.contractId,
|
|
165
172
|
fileId: e,
|
|
166
173
|
pageIndex: t,
|
|
167
174
|
thumbnail: n,
|
|
168
|
-
signal:
|
|
175
|
+
signal: c.signal
|
|
169
176
|
});
|
|
170
|
-
if (
|
|
171
|
-
let
|
|
177
|
+
if (U || !K.isCurrent(s, c) || !l(A.value, e, t)) return;
|
|
178
|
+
let o = oe(l(A.value, e, t), a, r(E.dataProvider?.coordinateScale), n), ee = A.value.files.map((r) => r.fileId === e ? {
|
|
172
179
|
...r,
|
|
173
180
|
pages: r.pages.map((e) => e.pageIndex === t ? {
|
|
174
181
|
...e,
|
|
175
|
-
...
|
|
182
|
+
...o || {},
|
|
176
183
|
...n ? { thumbnailUrl: a.url } : { previewUrl: a.url }
|
|
177
184
|
} : e)
|
|
178
185
|
} : r);
|
|
179
|
-
|
|
180
|
-
...
|
|
181
|
-
files:
|
|
186
|
+
Z({
|
|
187
|
+
...A.value,
|
|
188
|
+
files: ee
|
|
182
189
|
}, { clearError: !1 });
|
|
183
190
|
} catch (n) {
|
|
184
|
-
if (!K.isCurrent(
|
|
185
|
-
let r =
|
|
191
|
+
if (!K.isCurrent(s, c) || _t(n)) return;
|
|
192
|
+
let r = ft(n, "CONTRACT_PREVIEW_FAILED", "合同页面预览加载失败,可切换页面或重试", {
|
|
186
193
|
fileId: e,
|
|
187
194
|
pageIndex: t
|
|
188
195
|
});
|
|
189
|
-
|
|
190
|
-
...
|
|
191
|
-
[
|
|
196
|
+
D("error", r), L.value = {
|
|
197
|
+
...L.value,
|
|
198
|
+
[s]: r.message
|
|
192
199
|
};
|
|
193
200
|
} finally {
|
|
194
|
-
K.finish(
|
|
201
|
+
K.finish(s, c) && (I.value = I.value.filter((e) => e !== s));
|
|
195
202
|
}
|
|
196
203
|
}
|
|
197
|
-
function
|
|
198
|
-
if (e ===
|
|
199
|
-
let t =
|
|
200
|
-
|
|
204
|
+
function Ye(e) {
|
|
205
|
+
if (e === j.value) return;
|
|
206
|
+
let t = j.value;
|
|
207
|
+
ht(), t && (gt((e) => e.startsWith(`${t}:`) && e.endsWith(":preview")), W = W.filter((t) => t.fileId === e)), j.value = e, M.value = ne(A.value.files.find((t) => t.fileId === e)?.pages)?.pageIndex ?? 0, N.value = "", D("file-change", e), D("page-change", e, M.value), _(() => z.value?.scrollToPage(M.value));
|
|
201
208
|
}
|
|
202
|
-
function
|
|
203
|
-
|
|
209
|
+
function Xe(e) {
|
|
210
|
+
M.value = e;
|
|
204
211
|
}
|
|
205
|
-
function
|
|
206
|
-
|
|
212
|
+
function Ze(e) {
|
|
213
|
+
M.value !== e && (M.value = e), D("page-change", j.value, e);
|
|
207
214
|
}
|
|
208
|
-
function
|
|
209
|
-
|
|
210
|
-
let t =
|
|
211
|
-
|
|
212
|
-
|
|
215
|
+
function Qe(e) {
|
|
216
|
+
ht();
|
|
217
|
+
let t = j.value;
|
|
218
|
+
Me = setTimeout(() => {
|
|
219
|
+
Me = void 0, j.value === t && $e(t, e);
|
|
213
220
|
}, 150);
|
|
214
221
|
}
|
|
215
|
-
function
|
|
216
|
-
let n =
|
|
217
|
-
!n || e !==
|
|
222
|
+
function $e(e, t) {
|
|
223
|
+
let n = A.value.files.find((t) => t.fileId === e);
|
|
224
|
+
!n || a(n) || e !== j.value || (t.forEach((e) => {
|
|
218
225
|
let t = n.pages.find((t) => t.pageIndex === e);
|
|
219
|
-
!t || t.previewUrl ||
|
|
226
|
+
!t || t.previewUrl || I.value.includes(pt(n.fileId, e, !1)) || W.some((t) => t.fileId === n.fileId && t.pageIndex === e) || W.push({
|
|
220
227
|
fileId: n.fileId,
|
|
221
228
|
pageIndex: e
|
|
222
229
|
});
|
|
223
|
-
}),
|
|
230
|
+
}), et());
|
|
224
231
|
}
|
|
225
|
-
async function
|
|
226
|
-
let e =
|
|
232
|
+
async function et() {
|
|
233
|
+
let e = j.value;
|
|
227
234
|
for (W = W.filter((t) => t.fileId === e); G < 3 && W.length;) {
|
|
228
235
|
let t = W.shift();
|
|
229
236
|
if (!t || t.fileId !== e) continue;
|
|
230
|
-
let n =
|
|
231
|
-
!n || n.previewUrl ||
|
|
232
|
-
G = Math.max(0, G - 1),
|
|
237
|
+
let n = l(A.value, t.fileId, t.pageIndex), r = A.value.files.find((e) => e.fileId === t.fileId);
|
|
238
|
+
!n || a(r) || n.previewUrl || I.value.includes(pt(t.fileId, t.pageIndex, !1)) || (G += 1, Je(t.fileId, t.pageIndex, !1).finally(() => {
|
|
239
|
+
G = Math.max(0, G - 1), et();
|
|
233
240
|
}));
|
|
234
241
|
}
|
|
235
242
|
}
|
|
236
|
-
function
|
|
237
|
-
let t =
|
|
238
|
-
t && (t.fileId !==
|
|
243
|
+
function tt(e) {
|
|
244
|
+
let t = A.value.placements.find((t) => t.id === e);
|
|
245
|
+
t && (t.fileId !== j.value && Ye(t.fileId), N.value = e, _(() => z.value?.scrollToPlacement(e)));
|
|
239
246
|
}
|
|
240
|
-
function
|
|
241
|
-
if (
|
|
242
|
-
let n = t.fileId ??
|
|
247
|
+
function nt(e, t = {}) {
|
|
248
|
+
if (J.value) return;
|
|
249
|
+
let n = t.fileId ?? Y.value?.fileId, r = t.pageIndex ?? Le.value?.pageIndex;
|
|
243
250
|
if (!n || r === void 0) return;
|
|
244
|
-
let i =
|
|
251
|
+
let i = l(A.value, n, r);
|
|
245
252
|
if (!i || !re(i)) {
|
|
246
|
-
|
|
253
|
+
$({
|
|
247
254
|
code: "CONTRACT_PAGE_SIZE_INVALID",
|
|
248
255
|
message: "当前页面缺少有效的原始宽高,暂时不能添加签署位置",
|
|
249
256
|
fileId: n,
|
|
@@ -251,9 +258,9 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
251
258
|
});
|
|
252
259
|
return;
|
|
253
260
|
}
|
|
254
|
-
let a =
|
|
261
|
+
let a = E.sealTypeOptions.find((e) => String(e.value).trim())?.value;
|
|
255
262
|
if (e === "seal" && !a) {
|
|
256
|
-
|
|
263
|
+
$({
|
|
257
264
|
code: "CONTRACT_SEAL_TYPES_MISSING",
|
|
258
265
|
message: "当前未配置可用的印章类型,暂时不能添加印章位置",
|
|
259
266
|
fileId: n,
|
|
@@ -264,83 +271,83 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
264
271
|
let o = te(e, n, i, {
|
|
265
272
|
signLeft: t.signLeft,
|
|
266
273
|
signTop: t.signTop,
|
|
267
|
-
sizeProfile:
|
|
268
|
-
sealSizeLimit:
|
|
269
|
-
sealTypeOptions:
|
|
274
|
+
sizeProfile: E.sizeProfile,
|
|
275
|
+
sealSizeLimit: O.value,
|
|
276
|
+
sealTypeOptions: E.sealTypeOptions,
|
|
270
277
|
...e === "seal" ? { sealType: [String(a)] } : {}
|
|
271
278
|
});
|
|
272
|
-
return
|
|
273
|
-
...
|
|
274
|
-
placements: [...
|
|
275
|
-
}),
|
|
276
|
-
}
|
|
277
|
-
function
|
|
278
|
-
|
|
279
|
-
...
|
|
280
|
-
placements:
|
|
279
|
+
return Z({
|
|
280
|
+
...A.value,
|
|
281
|
+
placements: [...A.value.placements, o]
|
|
282
|
+
}), j.value = n, M.value = r, N.value = o.id, yt(o);
|
|
283
|
+
}
|
|
284
|
+
function rt(e, t) {
|
|
285
|
+
J.value || Z({
|
|
286
|
+
...A.value,
|
|
287
|
+
placements: A.value.placements.map((n) => {
|
|
281
288
|
if (n.id !== e) return n;
|
|
282
289
|
let r = t.pageIndex === void 0 ? n.pageIndex : t.pageIndex;
|
|
283
|
-
return ae(n, t,
|
|
284
|
-
sealSizeLimit:
|
|
285
|
-
sealTypeOptions:
|
|
290
|
+
return ae(n, t, l(A.value, n.fileId, r), {
|
|
291
|
+
sealSizeLimit: O.value,
|
|
292
|
+
sealTypeOptions: E.sealTypeOptions
|
|
286
293
|
});
|
|
287
294
|
})
|
|
288
295
|
});
|
|
289
296
|
}
|
|
290
|
-
function
|
|
291
|
-
let e =
|
|
292
|
-
if (!e ||
|
|
293
|
-
let n =
|
|
297
|
+
function it() {
|
|
298
|
+
let e = X.value;
|
|
299
|
+
if (!e || J.value) return;
|
|
300
|
+
let n = l(A.value, e.fileId, e.pageIndex);
|
|
294
301
|
if (!n) return;
|
|
295
302
|
let r = t({
|
|
296
|
-
...
|
|
297
|
-
id:
|
|
303
|
+
...yt(e),
|
|
304
|
+
id: xt(),
|
|
298
305
|
signLeft: e.signLeft + 16,
|
|
299
306
|
signTop: e.signTop + 16
|
|
300
|
-
}, n, { sealSizeLimit:
|
|
301
|
-
|
|
302
|
-
...
|
|
303
|
-
placements: [...
|
|
304
|
-
}),
|
|
305
|
-
}
|
|
306
|
-
function
|
|
307
|
-
|
|
308
|
-
...
|
|
309
|
-
placements:
|
|
310
|
-
}),
|
|
307
|
+
}, n, { sealSizeLimit: O.value });
|
|
308
|
+
Z({
|
|
309
|
+
...A.value,
|
|
310
|
+
placements: [...A.value.placements, r]
|
|
311
|
+
}), N.value = r.id;
|
|
312
|
+
}
|
|
313
|
+
function at(e) {
|
|
314
|
+
J.value || (Z({
|
|
315
|
+
...A.value,
|
|
316
|
+
placements: A.value.placements.filter((t) => t.id !== e)
|
|
317
|
+
}), N.value === e && (N.value = ""));
|
|
311
318
|
}
|
|
312
|
-
function
|
|
313
|
-
return se(
|
|
319
|
+
function ot() {
|
|
320
|
+
return se(A.value, { allowedSealTypes: E.sealTypeOptions.map((e) => e.value) });
|
|
314
321
|
}
|
|
315
|
-
function
|
|
316
|
-
return s(
|
|
322
|
+
function st() {
|
|
323
|
+
return s(A.value);
|
|
317
324
|
}
|
|
318
|
-
function
|
|
319
|
-
return
|
|
325
|
+
function ct() {
|
|
326
|
+
return ee(st(), { allowedSealTypes: E.sealTypeOptions.map((e) => e.value) });
|
|
320
327
|
}
|
|
321
|
-
function
|
|
328
|
+
function lt() {
|
|
322
329
|
try {
|
|
323
|
-
let e =
|
|
324
|
-
return
|
|
330
|
+
let e = ct();
|
|
331
|
+
return F.value = "", D("submit", e), e;
|
|
325
332
|
} catch (e) {
|
|
326
|
-
return
|
|
333
|
+
return $(e instanceof o ? {
|
|
327
334
|
...e.errors[0],
|
|
328
335
|
cause: e
|
|
329
|
-
} :
|
|
336
|
+
} : ft(e, "CONTRACT_SIGNING_LOCATION_INVALID", "指定签署位置数据不完整")), !1;
|
|
330
337
|
}
|
|
331
338
|
}
|
|
332
|
-
function
|
|
333
|
-
let e =
|
|
334
|
-
return
|
|
339
|
+
function ut() {
|
|
340
|
+
let e = Z(s(je.value));
|
|
341
|
+
return N.value = "", dt(!0), _(() => z.value?.scrollToPage(M.value)), e;
|
|
335
342
|
}
|
|
336
|
-
function
|
|
337
|
-
let t = (e ? void 0 :
|
|
338
|
-
|
|
343
|
+
function dt(e = !1) {
|
|
344
|
+
let t = (e ? void 0 : A.value.files.find((e) => e.fileId === j.value)) ?? A.value.files[0];
|
|
345
|
+
j.value = t?.fileId ?? "", M.value = ((e ? void 0 : t?.pages.find((e) => e.pageIndex === M.value)) ?? t?.pages[0])?.pageIndex ?? 0, A.value.placements.some((e) => e.id === N.value) || (N.value = "");
|
|
339
346
|
}
|
|
340
|
-
function
|
|
341
|
-
|
|
347
|
+
function $(e) {
|
|
348
|
+
F.value = e.message, D("error", e);
|
|
342
349
|
}
|
|
343
|
-
function
|
|
350
|
+
function ft(e, t, n, r = {}) {
|
|
344
351
|
let i = typeof e == "object" && e && "status" in e ? Number(e.status) : void 0;
|
|
345
352
|
return {
|
|
346
353
|
code: t,
|
|
@@ -349,162 +356,167 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
349
356
|
cause: e
|
|
350
357
|
};
|
|
351
358
|
}
|
|
352
|
-
function
|
|
359
|
+
function pt(e, t, n) {
|
|
353
360
|
return `${e}:${t}:${n ? "thumbnail" : "preview"}`;
|
|
354
361
|
}
|
|
355
|
-
function
|
|
356
|
-
if (!(e in
|
|
357
|
-
let t = { ...
|
|
358
|
-
delete t[e],
|
|
362
|
+
function mt(e) {
|
|
363
|
+
if (!(e in L.value)) return;
|
|
364
|
+
let t = { ...L.value };
|
|
365
|
+
delete t[e], L.value = t;
|
|
359
366
|
}
|
|
360
|
-
function
|
|
361
|
-
|
|
367
|
+
function ht() {
|
|
368
|
+
Me &&= (clearTimeout(Me), void 0);
|
|
362
369
|
}
|
|
363
|
-
function
|
|
370
|
+
function gt(e) {
|
|
364
371
|
let t = e ?? (() => !0), n = new Set(K.abort(t));
|
|
365
|
-
n.size && (
|
|
372
|
+
n.size && (I.value = I.value.filter((e) => !n.has(e))), e || (W = []);
|
|
366
373
|
}
|
|
367
|
-
function
|
|
374
|
+
function _t(e) {
|
|
368
375
|
return !!(e && typeof e == "object" && "cancelled" in e && e.cancelled) || e instanceof DOMException && e.name === "AbortError";
|
|
369
376
|
}
|
|
370
|
-
function
|
|
371
|
-
let t =
|
|
372
|
-
t &&
|
|
377
|
+
function vt(e) {
|
|
378
|
+
let t = Y.value;
|
|
379
|
+
t && Je(t.fileId, e, !1);
|
|
373
380
|
}
|
|
374
|
-
function
|
|
381
|
+
function yt(e) {
|
|
375
382
|
return {
|
|
376
383
|
...e,
|
|
377
384
|
sealType: e.sealType ? [...e.sealType] : void 0
|
|
378
385
|
};
|
|
379
386
|
}
|
|
380
|
-
function
|
|
387
|
+
function bt(e) {
|
|
381
388
|
return JSON.stringify(e);
|
|
382
389
|
}
|
|
383
|
-
function
|
|
390
|
+
function xt() {
|
|
384
391
|
return typeof crypto < "u" && "randomUUID" in crypto ? `contract-signing-placement-${crypto.randomUUID()}` : `contract-signing-placement-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
385
392
|
}
|
|
386
|
-
function
|
|
393
|
+
function St(e) {
|
|
387
394
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return { "--gd-ant-contract-signing-location-height": `${e}px` };
|
|
388
395
|
if (typeof e == "string" && e.trim()) return { "--gd-ant-contract-signing-location-height": e.trim() };
|
|
389
396
|
}
|
|
390
397
|
return pe({
|
|
391
|
-
load:
|
|
392
|
-
validate:
|
|
393
|
-
getValue:
|
|
394
|
-
getOutput:
|
|
395
|
-
submit:
|
|
396
|
-
reset:
|
|
397
|
-
addPlacement:
|
|
398
|
-
removePlacement:
|
|
399
|
-
fitWidth:
|
|
400
|
-
}), (t, n) => (
|
|
401
|
-
class:
|
|
402
|
-
"is-readonly":
|
|
403
|
-
"is-disabled": e.disabled
|
|
398
|
+
load: Q,
|
|
399
|
+
validate: ot,
|
|
400
|
+
getValue: st,
|
|
401
|
+
getOutput: ct,
|
|
402
|
+
submit: lt,
|
|
403
|
+
reset: ut,
|
|
404
|
+
addPlacement: nt,
|
|
405
|
+
removePlacement: at,
|
|
406
|
+
fitWidth: Ke
|
|
407
|
+
}), (t, n) => (y(), m("section", {
|
|
408
|
+
class: v(["gd-ant-contract-signing-location", {
|
|
409
|
+
"is-readonly": J.value,
|
|
410
|
+
"is-disabled": e.disabled,
|
|
411
|
+
"is-preview": q.value
|
|
404
412
|
}]),
|
|
405
|
-
style: me(
|
|
413
|
+
style: me(Ie.value)
|
|
406
414
|
}, [
|
|
407
|
-
|
|
415
|
+
h("header", xe, [h("div", Se, [n[6] ||= h("span", {
|
|
408
416
|
class: "gd-ant-contract-signing-location__title-bar",
|
|
409
417
|
"aria-hidden": "true"
|
|
410
|
-
}),
|
|
411
|
-
|
|
412
|
-
e.dataProvider ? (
|
|
418
|
+
}, null, -1), h("div", null, [h("strong", null, ge(q.value ? "合同预览" : "指定合同签署位置"), 1)])]), h("div", Ce, [
|
|
419
|
+
h("span", we, ge(A.value.placements.length) + " 个位置", 1),
|
|
420
|
+
e.dataProvider ? (y(), f(S(T), {
|
|
413
421
|
key: 0,
|
|
414
|
-
loading:
|
|
415
|
-
onClick:
|
|
422
|
+
loading: P.value,
|
|
423
|
+
onClick: Q
|
|
416
424
|
}, {
|
|
417
|
-
default:
|
|
425
|
+
default: w(() => [g(S(ye), { "aria-hidden": "true" }), n[7] ||= fe(" 重新加载 ", -1)]),
|
|
418
426
|
_: 1
|
|
419
|
-
}, 8, ["loading"])) :
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
427
|
+
}, 8, ["loading"])) : p("", !0),
|
|
428
|
+
q.value ? p("", !0) : (y(), f(S(T), {
|
|
429
|
+
key: 1,
|
|
430
|
+
disabled: J.value,
|
|
431
|
+
onClick: ut
|
|
423
432
|
}, {
|
|
424
|
-
default:
|
|
433
|
+
default: w(() => [...n[8] ||= [fe("重置", -1)]]),
|
|
425
434
|
_: 1
|
|
426
|
-
}, 8, ["disabled"]),
|
|
427
|
-
|
|
428
|
-
key:
|
|
435
|
+
}, 8, ["disabled"])),
|
|
436
|
+
Pe.value ? (y(), f(S(T), {
|
|
437
|
+
key: 2,
|
|
429
438
|
type: "primary",
|
|
430
|
-
loading:
|
|
439
|
+
loading: P.value,
|
|
431
440
|
disabled: e.disabled,
|
|
432
|
-
onClick:
|
|
441
|
+
onClick: lt
|
|
433
442
|
}, {
|
|
434
|
-
default:
|
|
443
|
+
default: w(() => [...n[9] ||= [fe("确认并生成规则", -1)]]),
|
|
435
444
|
_: 1
|
|
436
|
-
}, 8, ["loading", "disabled"])) :
|
|
445
|
+
}, 8, ["loading", "disabled"])) : p("", !0)
|
|
437
446
|
])]),
|
|
438
|
-
|
|
447
|
+
F.value ? (y(), m("div", Te, [h("span", null, ge(F.value), 1), e.dataProvider && e.contractId ? (y(), f(S(T), {
|
|
439
448
|
key: 0,
|
|
440
449
|
type: "link",
|
|
441
450
|
size: "small",
|
|
442
|
-
onClick:
|
|
451
|
+
onClick: Q
|
|
443
452
|
}, {
|
|
444
|
-
default:
|
|
453
|
+
default: w(() => [...n[10] ||= [fe("重试", -1)]]),
|
|
445
454
|
_: 1
|
|
446
|
-
})) :
|
|
447
|
-
|
|
448
|
-
|
|
455
|
+
})) : p("", !0)])) : p("", !0),
|
|
456
|
+
h("div", { class: v(["gd-ant-contract-signing-location__body", {
|
|
457
|
+
"is-single-file": Fe.value,
|
|
458
|
+
"is-inspector-hidden": !Ne.value
|
|
459
|
+
}]) }, [
|
|
460
|
+
Fe.value ? p("", !0) : (y(), m("div", {
|
|
449
461
|
key: 0,
|
|
450
|
-
class:
|
|
451
|
-
}, [
|
|
452
|
-
default:
|
|
462
|
+
class: v(["gd-ant-contract-signing-location__navigator-wrap", { "is-collapsed": V.value }])
|
|
463
|
+
}, [g(S(_e), { title: V.value ? "展开页面栏" : "收起页面栏" }, {
|
|
464
|
+
default: w(() => [h("button", {
|
|
453
465
|
type: "button",
|
|
454
466
|
class: "gd-ant-contract-signing-location__panel-handle",
|
|
455
|
-
"aria-label":
|
|
456
|
-
"aria-expanded": !
|
|
457
|
-
onClick: n[0] ||= (e) =>
|
|
458
|
-
}, [
|
|
467
|
+
"aria-label": V.value ? "展开页面栏" : "收起页面栏",
|
|
468
|
+
"aria-expanded": !V.value,
|
|
469
|
+
onClick: n[0] ||= (e) => V.value = !V.value
|
|
470
|
+
}, [V.value ? (y(), f(S(be), {
|
|
459
471
|
key: 0,
|
|
460
472
|
"aria-hidden": "true"
|
|
461
|
-
})) : (
|
|
473
|
+
})) : (y(), f(S(ve), {
|
|
462
474
|
key: 1,
|
|
463
475
|
"aria-hidden": "true"
|
|
464
|
-
}))], 8,
|
|
476
|
+
}))], 8, Ee)]),
|
|
465
477
|
_: 1
|
|
466
|
-
}, 8, ["title"]),
|
|
467
|
-
files:
|
|
468
|
-
"active-file-id":
|
|
469
|
-
"loading-preview-keys":
|
|
470
|
-
"error-preview-keys":
|
|
471
|
-
onSelect:
|
|
478
|
+
}, 8, ["title"]), h("div", De, [g(ue, {
|
|
479
|
+
files: A.value.files,
|
|
480
|
+
"active-file-id": j.value,
|
|
481
|
+
"loading-preview-keys": Be.value,
|
|
482
|
+
"error-preview-keys": Ve.value,
|
|
483
|
+
onSelect: Ye
|
|
472
484
|
}, null, 8, [
|
|
473
485
|
"files",
|
|
474
486
|
"active-file-id",
|
|
475
487
|
"loading-preview-keys",
|
|
476
488
|
"error-preview-keys"
|
|
477
489
|
])])], 2)),
|
|
478
|
-
|
|
490
|
+
g(ce, {
|
|
479
491
|
ref_key: "canvasRef",
|
|
480
|
-
ref:
|
|
481
|
-
file:
|
|
482
|
-
pages:
|
|
483
|
-
placements:
|
|
484
|
-
"selected-placement-id":
|
|
485
|
-
readonly:
|
|
492
|
+
ref: z,
|
|
493
|
+
file: Y.value,
|
|
494
|
+
pages: Y.value?.pages ?? [],
|
|
495
|
+
placements: Re.value,
|
|
496
|
+
"selected-placement-id": N.value,
|
|
497
|
+
readonly: J.value,
|
|
486
498
|
resizable: e.resizable,
|
|
487
|
-
"seal-size-limit":
|
|
499
|
+
"seal-size-limit": O.value,
|
|
488
500
|
"seal-type-options": e.sealTypeOptions,
|
|
489
|
-
zoom:
|
|
490
|
-
"preview-loading-keys":
|
|
491
|
-
"preview-error-map":
|
|
492
|
-
"active-page-index":
|
|
501
|
+
zoom: R.value,
|
|
502
|
+
"preview-loading-keys": He.value,
|
|
503
|
+
"preview-error-map": Ue.value,
|
|
504
|
+
"active-page-index": M.value,
|
|
493
505
|
"min-zoom": e.minZoom,
|
|
494
506
|
"max-zoom": e.maxZoom,
|
|
495
|
-
onSelect: n[1] ||= (e) =>
|
|
496
|
-
onRetry:
|
|
497
|
-
onAdd: n[2] ||= (e, t, n, r) =>
|
|
507
|
+
onSelect: n[1] ||= (e) => N.value = e,
|
|
508
|
+
onRetry: vt,
|
|
509
|
+
onAdd: n[2] ||= (e, t, n, r) => nt(e, {
|
|
498
510
|
signLeft: t,
|
|
499
511
|
signTop: n,
|
|
500
512
|
pageIndex: r
|
|
501
513
|
}),
|
|
502
|
-
onUpdate: n[3] ||= (e) =>
|
|
503
|
-
onRemove:
|
|
504
|
-
onVisiblePages:
|
|
505
|
-
onViewPage:
|
|
506
|
-
onPageChange:
|
|
507
|
-
onZoomChange:
|
|
514
|
+
onUpdate: n[3] ||= (e) => rt(e.id, e),
|
|
515
|
+
onRemove: at,
|
|
516
|
+
onVisiblePages: Qe,
|
|
517
|
+
onViewPage: Xe,
|
|
518
|
+
onPageChange: Ze,
|
|
519
|
+
onZoomChange: Ge
|
|
508
520
|
}, null, 8, [
|
|
509
521
|
"file",
|
|
510
522
|
"pages",
|
|
@@ -521,36 +533,39 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
521
533
|
"min-zoom",
|
|
522
534
|
"max-zoom"
|
|
523
535
|
]),
|
|
524
|
-
|
|
525
|
-
|
|
536
|
+
Ne.value ? (y(), m("div", {
|
|
537
|
+
key: 1,
|
|
538
|
+
class: v(["gd-ant-contract-signing-location__inspector-wrap", { "is-collapsed": B.value }])
|
|
539
|
+
}, [g(S(_e), { title: B.value ? "展开属性栏" : "收起属性栏" }, {
|
|
540
|
+
default: w(() => [h("button", {
|
|
526
541
|
type: "button",
|
|
527
542
|
class: "gd-ant-contract-signing-location__panel-handle",
|
|
528
|
-
"aria-label":
|
|
529
|
-
"aria-expanded": !
|
|
530
|
-
onClick: n[4] ||= (e) =>
|
|
531
|
-
}, [
|
|
543
|
+
"aria-label": B.value ? "展开属性栏" : "收起属性栏",
|
|
544
|
+
"aria-expanded": !B.value,
|
|
545
|
+
onClick: n[4] ||= (e) => B.value = !B.value
|
|
546
|
+
}, [B.value ? (y(), f(S(ve), {
|
|
532
547
|
key: 0,
|
|
533
548
|
"aria-hidden": "true"
|
|
534
|
-
})) : (
|
|
549
|
+
})) : (y(), f(S(be), {
|
|
535
550
|
key: 1,
|
|
536
551
|
"aria-hidden": "true"
|
|
537
|
-
}))], 8,
|
|
552
|
+
}))], 8, Oe)]),
|
|
538
553
|
_: 1
|
|
539
|
-
}, 8, ["title"]),
|
|
540
|
-
placement:
|
|
541
|
-
page:
|
|
542
|
-
pages:
|
|
543
|
-
placements:
|
|
544
|
-
readonly:
|
|
554
|
+
}, 8, ["title"]), h("div", ke, [g(le, {
|
|
555
|
+
placement: X.value,
|
|
556
|
+
page: ze.value,
|
|
557
|
+
pages: Y.value?.pages ?? [],
|
|
558
|
+
placements: Re.value,
|
|
559
|
+
readonly: J.value,
|
|
545
560
|
resizable: e.resizable,
|
|
546
|
-
"seal-size-limit":
|
|
561
|
+
"seal-size-limit": O.value,
|
|
547
562
|
"seal-type-options": e.sealTypeOptions,
|
|
548
563
|
"size-profile": e.sizeProfile,
|
|
549
|
-
onAdd:
|
|
550
|
-
onUpdate: n[5] ||= (e) =>
|
|
551
|
-
onDuplicate:
|
|
552
|
-
onRemove:
|
|
553
|
-
onLocate:
|
|
564
|
+
onAdd: nt,
|
|
565
|
+
onUpdate: n[5] ||= (e) => X.value && rt(X.value.id, e),
|
|
566
|
+
onDuplicate: it,
|
|
567
|
+
onRemove: at,
|
|
568
|
+
onLocate: tt
|
|
554
569
|
}, null, 8, [
|
|
555
570
|
"placement",
|
|
556
571
|
"page",
|
|
@@ -561,10 +576,10 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
561
576
|
"seal-size-limit",
|
|
562
577
|
"seal-type-options",
|
|
563
578
|
"size-profile"
|
|
564
|
-
])])], 2)
|
|
579
|
+
])])], 2)) : p("", !0)
|
|
565
580
|
], 2)
|
|
566
581
|
], 6));
|
|
567
582
|
}
|
|
568
583
|
});
|
|
569
584
|
//#endregion
|
|
570
|
-
export {
|
|
585
|
+
export { Ae as default };
|