@guodun/antdv 1.7.0 → 1.7.2
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/src/ContractSigningLocation.vue.mjs +295 -288
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +269 -250
- package/dist/es/components/contract-signing-location/src/location-rules.mjs +66 -60
- package/dist/es/components/contract-signing-location/style/index.css +1 -1
- package/dist/es/index.mjs +17 -17
- 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/location-rules.cjs +1 -1
- package/dist/lib/components/contract-signing-location/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/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +10 -2
- package/dist/types/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.d.ts +5 -2
- package/dist/types/components/contract-signing-location/src/location-rules.d.ts +1 -0
- package/dist/types/components/contract-signing-location/src/types.d.ts +14 -0
- package/package.json +4 -14
package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { isContractSigningPageUsable as d } from "./location-rules.mjs";
|
|
|
6
6
|
import { CONTRACT_SIGNING_FALLBACK_PAGE_SIZE as f, buildPageLayouts as p, contentPointToPagePoint as m, findPageAtOffset as h, getContractSigningAutoScrollDelta as g, getPageLayoutScrollTop as _, getPageLayoutsContentSize as ee, getVisibleRange as te } from "./page-layout.mjs";
|
|
7
7
|
import { useFitWidthZoom as ne } from "../../pro-contract-template-designer/src/composables/use-fit-width-zoom.mjs";
|
|
8
8
|
import { getContractSigningPlacementVisual as re } from "./signing-visuals.mjs";
|
|
9
|
-
import { Fragment as v, computed as y, createBlock as ie, createCommentVNode as
|
|
9
|
+
import { Fragment as v, computed as y, createBlock as ie, createCommentVNode as ae, createElementBlock as b, createElementVNode as x, createTextVNode as oe, createVNode as S, defineComponent as C, nextTick as se, normalizeClass as w, normalizeStyle as T, onBeforeUnmount as ce, onMounted as le, openBlock as E, ref as ue, renderList as D, shallowRef as O, toDisplayString as k, unref as A, watch as de, withCtx as j, withKeys as fe, withModifiers as M } from "vue";
|
|
10
10
|
import { Button as N } from "ant-design-vue";
|
|
11
11
|
import { useElementSize as pe } from "@vueuse/core";
|
|
12
12
|
import { ColumnWidthOutlined as me, LeftOutlined as he, RightOutlined as ge, ZoomInOutlined as _e, ZoomOutOutlined as ve } from "@ant-design/icons-vue";
|
|
@@ -38,13 +38,14 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
|
|
|
38
38
|
], Be = { class: "gd-ant-contract-signing-location__placement-body" }, Ve = ["src", "alt"], He = {
|
|
39
39
|
key: 0,
|
|
40
40
|
class: "gd-ant-contract-signing-location__placement-badge"
|
|
41
|
-
}, Ue = ["onPointerdown"], We = /* @__PURE__ */
|
|
41
|
+
}, Ue = ["onPointerdown"], We = ["title", "aria-label"], Ge = { class: "gd-ant-contract-signing-location__placement-body" }, Ke = ["src"], qe = { class: "gd-ant-contract-signing-location__placement-reference-badge" }, Je = /* @__PURE__ */ C({
|
|
42
42
|
name: "ContractSigningLocationCanvas",
|
|
43
43
|
__name: "ContractSigningLocationCanvas",
|
|
44
44
|
props: {
|
|
45
45
|
file: {},
|
|
46
46
|
pages: {},
|
|
47
47
|
placements: {},
|
|
48
|
+
referencePlacements: { default: () => [] },
|
|
48
49
|
selectedPlacementId: {},
|
|
49
50
|
readonly: { type: Boolean },
|
|
50
51
|
resizable: { type: Boolean },
|
|
@@ -71,8 +72,8 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
|
|
|
71
72
|
"scroll-to-ready",
|
|
72
73
|
"template-status"
|
|
73
74
|
],
|
|
74
|
-
setup(
|
|
75
|
-
let
|
|
75
|
+
setup(C, { expose: Je, emit: Ye }) {
|
|
76
|
+
let Xe = [
|
|
76
77
|
"nw",
|
|
77
78
|
"n",
|
|
78
79
|
"ne",
|
|
@@ -81,111 +82,113 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
|
|
|
81
82
|
"s",
|
|
82
83
|
"sw",
|
|
83
84
|
"w"
|
|
84
|
-
], P =
|
|
85
|
+
], P = C, F = Ye, I = ue(null), L = ue(null), Ze = O(1), R = O(P.activePageIndex), Qe = O({
|
|
85
86
|
start: 0,
|
|
86
87
|
end: -1
|
|
87
|
-
}), { width:
|
|
88
|
-
viewportWidth:
|
|
88
|
+
}), { width: $e } = pe(I), { fitWidth: et, markUserAdjusted: tt } = ne({
|
|
89
|
+
viewportWidth: $e,
|
|
89
90
|
widestPageWidth: y(() => Math.max(...P.pages.map((e) => e.displayWidth || e.width || f.width), f.width)),
|
|
90
91
|
padding: 48,
|
|
91
92
|
minZoom: () => P.minZoom,
|
|
92
93
|
maxZoom: () => P.maxZoom,
|
|
93
94
|
getZoom: () => P.zoom,
|
|
94
95
|
applyZoom: (e) => (F("zoom-change", e), e)
|
|
95
|
-
}),
|
|
96
|
-
let e =
|
|
97
|
-
return
|
|
98
|
-
}),
|
|
99
|
-
let t =
|
|
96
|
+
}), nt = O([]), rt = O(), z = O(), B, V = 0, H, it, at, ot, U = y(() => p(P.pages, P.zoom, 16)), st = y(() => ee(U.value)), W = y(() => u(P.file)), ct = y(() => c(P.file?.source)), lt = y(() => new Map(ct.value.map((e) => [e.pageIndex, e]))), ut = y(() => l(P.file)), dt = y(() => {
|
|
97
|
+
let e = Qe.value;
|
|
98
|
+
return U.value.length ? e.end < e.start ? U.value.slice(0, 2) : U.value.slice(e.start, e.end + 1) : [];
|
|
99
|
+
}), ft = y(() => dt.value.flatMap((e) => {
|
|
100
|
+
let t = K(e.pageIndex);
|
|
100
101
|
return t ? [{
|
|
101
102
|
layout: e,
|
|
102
103
|
page: t,
|
|
103
|
-
logical:
|
|
104
|
-
templatePage:
|
|
104
|
+
logical: q(t),
|
|
105
|
+
templatePage: lt.value.get(e.pageIndex)
|
|
105
106
|
}] : [];
|
|
106
|
-
})),
|
|
107
|
-
function
|
|
107
|
+
})), pt = y(() => P.pages.find((e) => e.pageIndex === R.value) ?? P.pages[0]), mt = y(() => Math.min(P.minZoom, P.maxZoom)), ht = y(() => Math.max(P.minZoom, P.maxZoom)), gt = y(() => P.placements.find((e) => e.id === P.selectedPlacementId)), _t = /* @__PURE__ */ new Date(), G = /* @__PURE__ */ new Map(), vt = O({});
|
|
108
|
+
function yt(e) {
|
|
108
109
|
return JSON.stringify([
|
|
109
110
|
e.signType,
|
|
110
111
|
e.sealType ?? [],
|
|
111
112
|
P.sealTypeOptions ?? []
|
|
112
113
|
]);
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
-
let t =
|
|
115
|
+
function bt(e) {
|
|
116
|
+
let t = yt(e), n = G.get(t);
|
|
116
117
|
if (n) return n;
|
|
117
118
|
let r = re(e, {
|
|
118
119
|
sealTypeOptions: P.sealTypeOptions,
|
|
119
|
-
date:
|
|
120
|
+
date: _t
|
|
120
121
|
});
|
|
121
|
-
if (
|
|
122
|
-
let e =
|
|
123
|
-
e !== void 0 &&
|
|
122
|
+
if (G.size >= 128) {
|
|
123
|
+
let e = G.keys().next().value;
|
|
124
|
+
e !== void 0 && G.delete(e);
|
|
124
125
|
}
|
|
125
|
-
return
|
|
126
|
+
return G.set(t, r), r;
|
|
126
127
|
}
|
|
127
|
-
let
|
|
128
|
+
let xt = y(() => {
|
|
128
129
|
let e = /* @__PURE__ */ new WeakMap();
|
|
129
130
|
return P.placements.forEach((t) => {
|
|
130
|
-
e.set(t,
|
|
131
|
+
e.set(t, bt(t));
|
|
132
|
+
}), P.referencePlacements.forEach((t) => {
|
|
133
|
+
e.set(t, bt(t));
|
|
131
134
|
}), e;
|
|
132
135
|
});
|
|
133
136
|
de(() => P.activePageIndex, (e) => {
|
|
134
|
-
R.value = e,
|
|
137
|
+
R.value = e, Rt() || Q(e);
|
|
135
138
|
}), de(() => P.pages.map((e) => e.pageIndex).join(","), () => {
|
|
136
|
-
|
|
139
|
+
vt.value = {}, F("template-status", W.value ? "loading" : "ready"), se(() => {
|
|
137
140
|
X(), Z(), F("scroll-to-ready");
|
|
138
141
|
});
|
|
139
|
-
}), de(() =>
|
|
140
|
-
|
|
142
|
+
}), de(() => ft.value.map((e) => e.layout.pageIndex).join(","), () => {
|
|
143
|
+
Ct();
|
|
141
144
|
}), de(() => P.zoom, (e, t) => {
|
|
142
145
|
if (!I.value || t == null || e === t) return;
|
|
143
|
-
let n =
|
|
146
|
+
let n = It(), r = p(P.pages, t, 16), i = h(r, n.layoutScrollTop + 1) ?? r[0];
|
|
144
147
|
if (!i) return;
|
|
145
|
-
|
|
148
|
+
at = {
|
|
146
149
|
pageIndex: i.pageIndex,
|
|
147
150
|
offsetInPage: n.layoutScrollTop - i.top
|
|
148
151
|
};
|
|
149
152
|
let a = e / Math.max(.01, t);
|
|
150
|
-
|
|
153
|
+
se(() => Bt(a));
|
|
151
154
|
}), le(() => {
|
|
152
|
-
X(), Z(), F("scroll-to-ready"), !(typeof ResizeObserver > "u" || !I.value) && (
|
|
155
|
+
X(), Z(), F("scroll-to-ready"), !(typeof ResizeObserver > "u" || !I.value) && (ot = new ResizeObserver(() => {
|
|
153
156
|
X(), Z();
|
|
154
|
-
}),
|
|
157
|
+
}), ot.observe(I.value));
|
|
155
158
|
}), ce(() => {
|
|
156
|
-
|
|
159
|
+
rn(), Jt(), H && clearTimeout(H), ot?.disconnect(), ot = void 0;
|
|
157
160
|
});
|
|
158
|
-
function
|
|
161
|
+
function K(e) {
|
|
159
162
|
return P.pages.find((t) => t.pageIndex === e);
|
|
160
163
|
}
|
|
161
|
-
function
|
|
162
|
-
|
|
163
|
-
...
|
|
164
|
+
function St(e, t, n) {
|
|
165
|
+
vt.value = {
|
|
166
|
+
...vt.value,
|
|
164
167
|
[e]: {
|
|
165
168
|
status: t,
|
|
166
169
|
detail: n
|
|
167
170
|
}
|
|
168
|
-
},
|
|
171
|
+
}, Ct();
|
|
169
172
|
}
|
|
170
|
-
function
|
|
171
|
-
if (!
|
|
173
|
+
function Ct() {
|
|
174
|
+
if (!W.value) {
|
|
172
175
|
F("template-status", "ready");
|
|
173
176
|
return;
|
|
174
177
|
}
|
|
175
|
-
let e =
|
|
178
|
+
let e = ft.value.filter((e) => e.templatePage).map((e) => vt.value[e.layout.pageIndex]), t = e.find((e) => e?.status === "error");
|
|
176
179
|
if (t) {
|
|
177
180
|
F("template-status", "error", t.detail);
|
|
178
181
|
return;
|
|
179
182
|
}
|
|
180
183
|
F("template-status", e.length > 0 && e.every((e) => e?.status === "ready") ? "ready" : "loading");
|
|
181
184
|
}
|
|
182
|
-
function
|
|
185
|
+
function q(e) {
|
|
183
186
|
return e && d(e) ? {
|
|
184
187
|
width: e.width,
|
|
185
188
|
height: e.height
|
|
186
189
|
} : { ...f };
|
|
187
190
|
}
|
|
188
|
-
function
|
|
191
|
+
function J(e) {
|
|
189
192
|
if (!e || !d(e)) return { ...f };
|
|
190
193
|
let t = Number(e.displayWidth), n = Number(e.displayHeight);
|
|
191
194
|
return {
|
|
@@ -193,24 +196,27 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
|
|
|
193
196
|
height: Number.isFinite(n) && n > 0 ? n : e.height
|
|
194
197
|
};
|
|
195
198
|
}
|
|
196
|
-
function
|
|
199
|
+
function wt(e) {
|
|
197
200
|
return `${P.file?.fileId ?? ""}:${e}`;
|
|
198
201
|
}
|
|
199
|
-
function
|
|
200
|
-
return P.previewLoadingKeys.includes(
|
|
202
|
+
function Tt(e) {
|
|
203
|
+
return P.previewLoadingKeys.includes(wt(e));
|
|
201
204
|
}
|
|
202
|
-
function
|
|
203
|
-
return P.previewErrorMap[
|
|
205
|
+
function Et(e) {
|
|
206
|
+
return P.previewErrorMap[wt(e)] || "";
|
|
204
207
|
}
|
|
205
|
-
function
|
|
208
|
+
function Dt(e) {
|
|
206
209
|
return P.placements.filter((t) => t.pageIndex === e);
|
|
207
210
|
}
|
|
208
|
-
function
|
|
209
|
-
|
|
211
|
+
function Ot(e) {
|
|
212
|
+
return P.referencePlacements.filter((t) => t.pageIndex === e);
|
|
213
|
+
}
|
|
214
|
+
function kt(e) {
|
|
215
|
+
let t = gt.value;
|
|
210
216
|
return t && t.pageIndex === e.pageIndex ? r(t, e) : void 0;
|
|
211
217
|
}
|
|
212
|
-
function
|
|
213
|
-
let t = i(e), n =
|
|
218
|
+
function At(e) {
|
|
219
|
+
let t = i(e), n = K(e.pageIndex), r = J(n), a = q(n);
|
|
214
220
|
return {
|
|
215
221
|
left: `${t.signLeft * r.width / Math.max(1, a.width)}px`,
|
|
216
222
|
top: `${t.signTop * r.height / Math.max(1, a.height)}px`,
|
|
@@ -218,8 +224,8 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
|
|
|
218
224
|
height: `${t.signHeight * r.height / Math.max(1, a.height)}px`
|
|
219
225
|
};
|
|
220
226
|
}
|
|
221
|
-
function
|
|
222
|
-
let t = i(e), n =
|
|
227
|
+
function jt(e) {
|
|
228
|
+
let t = i(e), n = K(e.pageIndex), r = J(n), a = q(n), o = r.width / Math.max(1, a.width), s = r.height / Math.max(1, a.height);
|
|
223
229
|
return {
|
|
224
230
|
"--gd-contract-sign-left": `${t.signLeft * o}px`,
|
|
225
231
|
"--gd-contract-sign-top": `${t.signTop * s}px`,
|
|
@@ -227,30 +233,30 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
|
|
|
227
233
|
"--gd-contract-sign-bottom": `${(t.signTop + t.signHeight) * s}px`
|
|
228
234
|
};
|
|
229
235
|
}
|
|
230
|
-
function
|
|
231
|
-
let n =
|
|
236
|
+
function Mt(e, t) {
|
|
237
|
+
let n = J(t), r = q(t), i = e.axis === "x" ? n.width / Math.max(1, r.width) : n.height / Math.max(1, r.height);
|
|
232
238
|
return e.axis === "x" ? { left: `${e.position * i}px` } : { top: `${e.position * i}px` };
|
|
233
239
|
}
|
|
234
|
-
function
|
|
240
|
+
function Nt(e, t) {
|
|
235
241
|
return n(e, t, {
|
|
236
242
|
sealSizeLimit: P.sealSizeLimit,
|
|
237
243
|
sealTypes: e.sealType,
|
|
238
244
|
sealTypeOptions: P.sealTypeOptions
|
|
239
245
|
});
|
|
240
246
|
}
|
|
241
|
-
function
|
|
242
|
-
return
|
|
247
|
+
function Y(e) {
|
|
248
|
+
return xt.value.get(e) ?? bt(e);
|
|
243
249
|
}
|
|
244
|
-
function
|
|
250
|
+
function Pt(e) {
|
|
245
251
|
return t(e, P.resizable, P.readonly) && e.id === P.selectedPlacementId;
|
|
246
252
|
}
|
|
247
|
-
function
|
|
253
|
+
function Ft(e) {
|
|
248
254
|
return {
|
|
249
255
|
...e,
|
|
250
256
|
sealType: e.sealType ? [...e.sealType] : void 0
|
|
251
257
|
};
|
|
252
258
|
}
|
|
253
|
-
function
|
|
259
|
+
function It() {
|
|
254
260
|
let e = I.value, t = L.value;
|
|
255
261
|
if (!e) return {
|
|
256
262
|
layoutScrollTop: 0,
|
|
@@ -262,7 +268,7 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
|
|
|
262
268
|
viewportHeight: e.clientHeight
|
|
263
269
|
};
|
|
264
270
|
}
|
|
265
|
-
function
|
|
271
|
+
function Lt(e, t) {
|
|
266
272
|
let n = L.value;
|
|
267
273
|
if (n) {
|
|
268
274
|
let r = n.getBoundingClientRect();
|
|
@@ -282,147 +288,147 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
|
|
|
282
288
|
y: t - i.top + r.scrollTop - o
|
|
283
289
|
};
|
|
284
290
|
}
|
|
285
|
-
function
|
|
291
|
+
function Rt() {
|
|
286
292
|
return !!(document.activeElement && document.activeElement.tagName === "INPUT");
|
|
287
293
|
}
|
|
288
294
|
function X() {
|
|
289
|
-
let e =
|
|
290
|
-
|
|
291
|
-
let t = h(
|
|
295
|
+
let e = It();
|
|
296
|
+
Qe.value = te(U.value, e.layoutScrollTop, e.viewportHeight, 1);
|
|
297
|
+
let t = h(U.value, e.layoutScrollTop + 1);
|
|
292
298
|
if (t) {
|
|
293
299
|
let e = R.value !== t.pageIndex;
|
|
294
|
-
R.value = t.pageIndex,
|
|
300
|
+
R.value = t.pageIndex, Rt() || Q(t.pageIndex), e && F("view-page", t.pageIndex);
|
|
295
301
|
}
|
|
296
302
|
}
|
|
297
303
|
function Z() {
|
|
298
|
-
let e =
|
|
299
|
-
F("visible-pages",
|
|
304
|
+
let e = Qe.value;
|
|
305
|
+
F("visible-pages", U.value.slice(Math.max(0, e.start), e.end + 1).map((e) => e.pageIndex));
|
|
300
306
|
}
|
|
301
|
-
function
|
|
302
|
-
X(),
|
|
303
|
-
Z(), R.value !==
|
|
307
|
+
function zt() {
|
|
308
|
+
X(), H && clearTimeout(H), H = setTimeout(() => {
|
|
309
|
+
Z(), R.value !== it && (it = R.value, F("page-change", R.value));
|
|
304
310
|
}, 80);
|
|
305
311
|
}
|
|
306
|
-
function
|
|
307
|
-
let t = I.value, n = L.value, r =
|
|
308
|
-
if (
|
|
309
|
-
let i =
|
|
312
|
+
function Bt(e) {
|
|
313
|
+
let t = I.value, n = L.value, r = at;
|
|
314
|
+
if (at = void 0, !t || !n || !r) return;
|
|
315
|
+
let i = U.value.find((e) => e.pageIndex === r.pageIndex);
|
|
310
316
|
i && (t.scrollTop = n.offsetTop + i.top + r.offsetInPage * e, X());
|
|
311
317
|
}
|
|
312
|
-
function
|
|
318
|
+
function Vt(e) {
|
|
313
319
|
let t = I.value, n = L.value;
|
|
314
|
-
t && (R.value = e, Q(e), F("page-change", e),
|
|
315
|
-
let r = _(
|
|
320
|
+
t && (R.value = e, Q(e), F("page-change", e), it = e, se(() => {
|
|
321
|
+
let r = _(U.value, e);
|
|
316
322
|
t.scrollTop = (n?.offsetTop ?? 0) + r, X(), Z();
|
|
317
323
|
}));
|
|
318
324
|
}
|
|
319
|
-
function
|
|
325
|
+
function Ht(e) {
|
|
320
326
|
let t = P.placements.find((t) => t.id === e), n = I.value, r = L.value;
|
|
321
327
|
if (!t || !n) return;
|
|
322
|
-
let a =
|
|
323
|
-
a && (R.value = t.pageIndex, Q(t.pageIndex),
|
|
324
|
-
let e =
|
|
328
|
+
let a = U.value.find((e) => e.pageIndex === t.pageIndex);
|
|
329
|
+
a && (R.value = t.pageIndex, Q(t.pageIndex), se(() => {
|
|
330
|
+
let e = It(), o = K(t.pageIndex), s = J(o), c = q(o), l = a.top + i(t).signTop * s.height / Math.max(1, c.height) * P.zoom, u = l + i(t).signHeight * s.height / Math.max(1, c.height) * P.zoom, d = e.layoutScrollTop, f = d + e.viewportHeight;
|
|
325
331
|
(l < d || u > f) && (n.scrollTop = (r?.offsetTop ?? 0) + Math.max(0, l - 24)), X(), Z(), F("page-change", t.pageIndex);
|
|
326
332
|
}));
|
|
327
333
|
}
|
|
328
334
|
function Q(e) {
|
|
329
335
|
let t = P.pages.findIndex((t) => t.pageIndex === e);
|
|
330
|
-
|
|
336
|
+
Ze.value = t >= 0 ? t + 1 : 1;
|
|
331
337
|
}
|
|
332
|
-
function
|
|
338
|
+
function Ut(e) {
|
|
333
339
|
let t = P.pages.findIndex((e) => e.pageIndex === R.value), n = Math.min(P.pages.length - 1, Math.max(0, (t < 0 ? 0 : t) + e)), r = P.pages[n];
|
|
334
|
-
r &&
|
|
340
|
+
r && Vt(r.pageIndex);
|
|
335
341
|
}
|
|
336
|
-
function
|
|
342
|
+
function Wt(e) {
|
|
337
343
|
let t = Number(e.target.value);
|
|
338
344
|
if (!Number.isFinite(t)) {
|
|
339
345
|
Q(R.value);
|
|
340
346
|
return;
|
|
341
347
|
}
|
|
342
348
|
let n = Math.min(P.pages.length, Math.max(1, Math.round(t))) - 1, r = P.pages[n];
|
|
343
|
-
r ?
|
|
349
|
+
r ? Vt(r.pageIndex) : Q(R.value);
|
|
344
350
|
}
|
|
345
|
-
function
|
|
346
|
-
t === "user" &&
|
|
351
|
+
function Gt(e, t = "user") {
|
|
352
|
+
t === "user" && tt(), F("zoom-change", e);
|
|
347
353
|
}
|
|
348
|
-
function
|
|
354
|
+
function Kt(e) {
|
|
349
355
|
e.target.closest(".gd-ant-contract-signing-location__placement") || F("select", "");
|
|
350
356
|
}
|
|
351
|
-
function
|
|
352
|
-
window.addEventListener("pointermove",
|
|
357
|
+
function qt() {
|
|
358
|
+
window.addEventListener("pointermove", Zt, { passive: !1 }), window.addEventListener("pointerup", $), window.addEventListener("pointercancel", $);
|
|
353
359
|
}
|
|
354
|
-
function
|
|
355
|
-
window.removeEventListener("pointermove",
|
|
360
|
+
function Jt() {
|
|
361
|
+
window.removeEventListener("pointermove", Zt), window.removeEventListener("pointerup", $), window.removeEventListener("pointercancel", $);
|
|
356
362
|
}
|
|
357
|
-
function
|
|
363
|
+
function Yt(e, t, n) {
|
|
358
364
|
e.stopPropagation(), F("select", t.id);
|
|
359
|
-
let r =
|
|
365
|
+
let r = K(t.pageIndex);
|
|
360
366
|
if (P.readonly || !r || !d(r) || e.button !== 0) return;
|
|
361
|
-
let i =
|
|
362
|
-
o.focus({ preventScroll: !0 }),
|
|
367
|
+
let i = Lt(e.clientX, e.clientY), a = m(U.value, P.pages, i.x, i.y), o = e.currentTarget;
|
|
368
|
+
o.focus({ preventScroll: !0 }), z.value = {
|
|
363
369
|
pointerId: e.pointerId,
|
|
364
370
|
mode: n ? "resize" : "move",
|
|
365
371
|
handle: n,
|
|
366
372
|
placementId: t.id,
|
|
367
373
|
startX: e.clientX,
|
|
368
374
|
startY: e.clientY,
|
|
369
|
-
origin:
|
|
375
|
+
origin: Ft(t),
|
|
370
376
|
grabOffsetX: (a?.x ?? t.signLeft) - t.signLeft,
|
|
371
377
|
grabOffsetY: (a?.y ?? t.signTop) - t.signTop
|
|
372
|
-
},
|
|
378
|
+
}, B = {
|
|
373
379
|
clientX: e.clientX,
|
|
374
380
|
clientY: e.clientY,
|
|
375
381
|
pointerId: e.pointerId
|
|
376
|
-
},
|
|
382
|
+
}, qt(), nn();
|
|
377
383
|
try {
|
|
378
384
|
o.setPointerCapture(e.pointerId);
|
|
379
385
|
} catch {}
|
|
380
386
|
}
|
|
381
|
-
function
|
|
382
|
-
|
|
387
|
+
function Xt(e, t, n) {
|
|
388
|
+
Yt(e, t, n);
|
|
383
389
|
}
|
|
384
|
-
function
|
|
385
|
-
let t =
|
|
386
|
-
!t || t.pointerId !== e.pointerId || (e.preventDefault(),
|
|
390
|
+
function Zt(e) {
|
|
391
|
+
let t = z.value;
|
|
392
|
+
!t || t.pointerId !== e.pointerId || (e.preventDefault(), B = {
|
|
387
393
|
clientX: e.clientX,
|
|
388
394
|
clientY: e.clientY,
|
|
389
395
|
pointerId: e.pointerId
|
|
390
|
-
},
|
|
396
|
+
}, Qt(B));
|
|
391
397
|
}
|
|
392
398
|
function $(e) {
|
|
393
|
-
|
|
399
|
+
z.value?.pointerId === e.pointerId && (z.value = void 0, B = void 0, nt.value = [], rt.value = void 0, rn(), Jt());
|
|
394
400
|
}
|
|
395
|
-
function
|
|
396
|
-
let t =
|
|
401
|
+
function Qt(e) {
|
|
402
|
+
let t = z.value;
|
|
397
403
|
if (!t) return;
|
|
398
404
|
if (t.mode === "resize") {
|
|
399
|
-
|
|
405
|
+
$t(t, e);
|
|
400
406
|
return;
|
|
401
407
|
}
|
|
402
|
-
let n =
|
|
408
|
+
let n = Lt(e.clientX, e.clientY), r = m(U.value, P.pages, n.x, n.y);
|
|
403
409
|
if (!r) return;
|
|
404
|
-
let i =
|
|
410
|
+
let i = tn(r.pageIndex, t.origin.pageIndex);
|
|
405
411
|
if (!i || !d(i)) return;
|
|
406
|
-
let a = s(
|
|
412
|
+
let a = s(Nt({
|
|
407
413
|
...t.origin,
|
|
408
414
|
pageIndex: i.pageIndex,
|
|
409
415
|
signLeft: r.x - t.grabOffsetX,
|
|
410
416
|
signTop: r.y - t.grabOffsetY
|
|
411
|
-
}, i),
|
|
412
|
-
|
|
417
|
+
}, i), Dt(i.pageIndex), P.zoom, void 0, i), o = Nt(a.placement, i);
|
|
418
|
+
nt.value = a.guides, rt.value = i.pageIndex, F("update", o);
|
|
413
419
|
}
|
|
414
|
-
function
|
|
415
|
-
let n =
|
|
420
|
+
function $t(e, t) {
|
|
421
|
+
let n = K(e.origin.pageIndex), r = e.handle;
|
|
416
422
|
if (!n || !r || !d(n)) return;
|
|
417
|
-
let a =
|
|
423
|
+
let a = U.value.find((e) => e.pageIndex === n.pageIndex);
|
|
418
424
|
if (!a) return;
|
|
419
|
-
let o =
|
|
425
|
+
let o = Lt(t.clientX, t.clientY), s = J(n), c = n.width / Math.max(1, s.width * P.zoom), l = n.height / Math.max(1, s.height * P.zoom), u = (o.x - a.left) * c, f = (o.y - a.top) * l;
|
|
420
426
|
if (e.origin.signType === "seal") {
|
|
421
|
-
|
|
427
|
+
en(e, n, r, u, f);
|
|
422
428
|
return;
|
|
423
429
|
}
|
|
424
430
|
let p = i(e.origin), m = p.signLeft, h = p.signTop, g = p.signLeft + p.signWidth, _ = p.signTop + p.signHeight;
|
|
425
|
-
r.includes("w") && (m = u), r.includes("e") && (g = u), r.includes("n") && (h = f), r.includes("s") && (_ = f), g - m < 8 && (r.includes("w") ? m = g - 8 : g = m + 8), _ - h < 8 && (r.includes("n") ? h = _ - 8 : _ = h + 8), F("update",
|
|
431
|
+
r.includes("w") && (m = u), r.includes("e") && (g = u), r.includes("n") && (h = f), r.includes("s") && (_ = f), g - m < 8 && (r.includes("w") ? m = g - 8 : g = m + 8), _ - h < 8 && (r.includes("n") ? h = _ - 8 : _ = h + 8), F("update", Nt({
|
|
426
432
|
...e.origin,
|
|
427
433
|
signLeft: m,
|
|
428
434
|
signTop: h,
|
|
@@ -430,35 +436,35 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
|
|
|
430
436
|
signHeight: _ - h
|
|
431
437
|
}, n));
|
|
432
438
|
}
|
|
433
|
-
function
|
|
439
|
+
function en(e, t, n, r, i) {
|
|
434
440
|
let a = o(e.origin, n, r, i, t, P.sealSizeLimit);
|
|
435
|
-
F("update",
|
|
441
|
+
F("update", Nt({
|
|
436
442
|
...e.origin,
|
|
437
443
|
...a
|
|
438
444
|
}, t));
|
|
439
445
|
}
|
|
440
|
-
function
|
|
441
|
-
let n =
|
|
442
|
-
return n && d(n) ? n :
|
|
446
|
+
function tn(e, t) {
|
|
447
|
+
let n = K(e);
|
|
448
|
+
return n && d(n) ? n : K(t);
|
|
443
449
|
}
|
|
444
|
-
function
|
|
445
|
-
|
|
450
|
+
function nn() {
|
|
451
|
+
rn();
|
|
446
452
|
let e = () => {
|
|
447
|
-
let t =
|
|
448
|
-
if (!t || !n || !
|
|
449
|
-
|
|
453
|
+
let t = z.value, n = I.value;
|
|
454
|
+
if (!t || !n || !B) {
|
|
455
|
+
V = 0;
|
|
450
456
|
return;
|
|
451
457
|
}
|
|
452
|
-
let r = n.getBoundingClientRect(), i = g(
|
|
453
|
-
i !== 0 && (n.scrollTop += i, X(),
|
|
458
|
+
let r = n.getBoundingClientRect(), i = g(B.clientY, r);
|
|
459
|
+
i !== 0 && (n.scrollTop += i, X(), Qt(B)), V = requestAnimationFrame(e);
|
|
454
460
|
};
|
|
455
|
-
|
|
461
|
+
V = requestAnimationFrame(e);
|
|
456
462
|
}
|
|
457
|
-
function
|
|
458
|
-
|
|
463
|
+
function rn() {
|
|
464
|
+
V &&= (cancelAnimationFrame(V), 0);
|
|
459
465
|
}
|
|
460
|
-
function
|
|
461
|
-
let n =
|
|
466
|
+
function an(e, t) {
|
|
467
|
+
let n = K(t.pageIndex);
|
|
462
468
|
if (P.readonly || !n || !d(n)) return;
|
|
463
469
|
if (e.key === "Delete" || e.key === "Backspace") {
|
|
464
470
|
e.preventDefault(), F("remove", t.id);
|
|
@@ -471,114 +477,114 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
|
|
|
471
477
|
else if (e.key === "ArrowDown") o = r;
|
|
472
478
|
else return;
|
|
473
479
|
e.preventDefault();
|
|
474
|
-
let s =
|
|
475
|
-
F("update", a(t, i * s.width / Math.max(1, c.width), o * s.height / Math.max(1, c.height), n,
|
|
480
|
+
let s = J(n), c = q(n);
|
|
481
|
+
F("update", a(t, i * s.width / Math.max(1, c.width), o * s.height / Math.max(1, c.height), n, J(n), { sealSizeLimit: P.sealSizeLimit }));
|
|
476
482
|
}
|
|
477
|
-
function
|
|
483
|
+
function on(e) {
|
|
478
484
|
let t = e.dataTransfer?.getData("application/x-gd-contract-signing-location") || e.dataTransfer?.getData("text/plain");
|
|
479
485
|
if (t) try {
|
|
480
486
|
let e = JSON.parse(t);
|
|
481
|
-
return
|
|
487
|
+
return cn(e.type) ? e.type : void 0;
|
|
482
488
|
} catch {
|
|
483
|
-
return
|
|
489
|
+
return cn(t) ? t : void 0;
|
|
484
490
|
}
|
|
485
491
|
}
|
|
486
|
-
function
|
|
492
|
+
function sn(e) {
|
|
487
493
|
if (P.readonly) return;
|
|
488
|
-
let t =
|
|
494
|
+
let t = on(e);
|
|
489
495
|
if (!t) return;
|
|
490
496
|
e.preventDefault();
|
|
491
|
-
let n =
|
|
497
|
+
let n = Lt(e.clientX, e.clientY), r = m(U.value, P.pages, n.x, n.y);
|
|
492
498
|
r && F("add", t, r.x, r.y, r.pageIndex);
|
|
493
499
|
}
|
|
494
|
-
function
|
|
500
|
+
function cn(e) {
|
|
495
501
|
return e === "seal" || e === "signature" || e === "date";
|
|
496
502
|
}
|
|
497
|
-
return
|
|
498
|
-
scrollToPage:
|
|
499
|
-
scrollToPlacement:
|
|
500
|
-
fitWidth:
|
|
501
|
-
}), (t, n) => (E(),
|
|
502
|
-
|
|
503
|
+
return Je({
|
|
504
|
+
scrollToPage: Vt,
|
|
505
|
+
scrollToPlacement: Ht,
|
|
506
|
+
fitWidth: et
|
|
507
|
+
}), (t, n) => (E(), b("main", ye, [x("header", be, [x("div", null, [x("strong", null, k(C.file?.fileName || "合同页面"), 1), pt.value ? (E(), b("span", xe, "第 " + k(pt.value.displayPageNumber) + " 页 · " + k(W.value ? "HTML" : "PDF") + " " + k(pt.value.width) + " × " + k(pt.value.height), 1)) : ae("", !0)]), x("div", Se, [x("div", Ce, [
|
|
508
|
+
S(A(N), {
|
|
503
509
|
size: "small",
|
|
504
|
-
disabled:
|
|
510
|
+
disabled: Ze.value <= 1,
|
|
505
511
|
"aria-label": "上一页",
|
|
506
|
-
onClick: n[0] ||= (e) =>
|
|
512
|
+
onClick: n[0] ||= (e) => Ut(-1)
|
|
507
513
|
}, {
|
|
508
|
-
default: j(() => [
|
|
514
|
+
default: j(() => [S(A(he), { "aria-hidden": "true" })]),
|
|
509
515
|
_: 1
|
|
510
516
|
}, 8, ["disabled"]),
|
|
511
|
-
|
|
512
|
-
n[6] ||=
|
|
513
|
-
|
|
514
|
-
value:
|
|
517
|
+
x("label", null, [
|
|
518
|
+
n[6] ||= oe(" 第 ", -1),
|
|
519
|
+
x("input", {
|
|
520
|
+
value: Ze.value,
|
|
515
521
|
type: "number",
|
|
516
522
|
min: "1",
|
|
517
|
-
max: Math.max(1,
|
|
518
|
-
onChange:
|
|
519
|
-
onKeydown: fe(
|
|
523
|
+
max: Math.max(1, C.pages.length),
|
|
524
|
+
onChange: Wt,
|
|
525
|
+
onKeydown: fe(Wt, ["enter"])
|
|
520
526
|
}, null, 40, we),
|
|
521
|
-
|
|
527
|
+
oe(" / " + k(C.pages.length) + " 页 ", 1)
|
|
522
528
|
]),
|
|
523
|
-
|
|
529
|
+
S(A(N), {
|
|
524
530
|
size: "small",
|
|
525
|
-
disabled:
|
|
531
|
+
disabled: Ze.value >= C.pages.length,
|
|
526
532
|
"aria-label": "下一页",
|
|
527
|
-
onClick: n[1] ||= (e) =>
|
|
533
|
+
onClick: n[1] ||= (e) => Ut(1)
|
|
528
534
|
}, {
|
|
529
|
-
default: j(() => [
|
|
535
|
+
default: j(() => [S(A(ge), { "aria-hidden": "true" })]),
|
|
530
536
|
_: 1
|
|
531
537
|
}, 8, ["disabled"])
|
|
532
|
-
]),
|
|
533
|
-
|
|
538
|
+
]), x("div", Te, [
|
|
539
|
+
S(A(N), {
|
|
534
540
|
size: "small",
|
|
535
|
-
disabled:
|
|
541
|
+
disabled: C.zoom <= mt.value,
|
|
536
542
|
"aria-label": "缩小页面",
|
|
537
|
-
onClick: n[2] ||= (e) =>
|
|
543
|
+
onClick: n[2] ||= (e) => Gt(C.zoom - .1)
|
|
538
544
|
}, {
|
|
539
|
-
default: j(() => [
|
|
545
|
+
default: j(() => [S(A(ve), { "aria-hidden": "true" })]),
|
|
540
546
|
_: 1
|
|
541
547
|
}, 8, ["disabled"]),
|
|
542
|
-
|
|
548
|
+
x("button", {
|
|
543
549
|
type: "button",
|
|
544
|
-
onClick: n[3] ||= (e) =>
|
|
545
|
-
}, k(Math.round(
|
|
546
|
-
|
|
550
|
+
onClick: n[3] ||= (e) => Gt(1)
|
|
551
|
+
}, k(Math.round(C.zoom * 100)) + "%", 1),
|
|
552
|
+
S(A(N), {
|
|
547
553
|
size: "small",
|
|
548
|
-
disabled:
|
|
554
|
+
disabled: C.zoom >= ht.value,
|
|
549
555
|
"aria-label": "放大页面",
|
|
550
|
-
onClick: n[4] ||= (e) =>
|
|
556
|
+
onClick: n[4] ||= (e) => Gt(C.zoom + .1)
|
|
551
557
|
}, {
|
|
552
|
-
default: j(() => [
|
|
558
|
+
default: j(() => [S(A(_e), { "aria-hidden": "true" })]),
|
|
553
559
|
_: 1
|
|
554
560
|
}, 8, ["disabled"]),
|
|
555
|
-
|
|
561
|
+
S(A(N), {
|
|
556
562
|
size: "small",
|
|
557
563
|
"aria-label": "适应宽度",
|
|
558
564
|
title: "适应宽度",
|
|
559
|
-
onClick: A(
|
|
565
|
+
onClick: A(et)
|
|
560
566
|
}, {
|
|
561
|
-
default: j(() => [
|
|
567
|
+
default: j(() => [S(A(me), { "aria-hidden": "true" })]),
|
|
562
568
|
_: 1
|
|
563
569
|
}, 8, ["onClick"])
|
|
564
|
-
])])]),
|
|
570
|
+
])])]), x("div", {
|
|
565
571
|
ref_key: "scrollRef",
|
|
566
572
|
ref: I,
|
|
567
573
|
class: "gd-ant-contract-signing-location__canvas-scroll",
|
|
568
|
-
onScrollPassive:
|
|
569
|
-
onClick:
|
|
574
|
+
onScrollPassive: zt,
|
|
575
|
+
onClick: Kt,
|
|
570
576
|
onDragover: n[5] ||= M(() => {}, ["prevent"]),
|
|
571
|
-
onDrop:
|
|
572
|
-
}, [
|
|
577
|
+
onDrop: sn
|
|
578
|
+
}, [C.pages.length ? (E(), b("div", {
|
|
573
579
|
key: 1,
|
|
574
580
|
ref_key: "stackRef",
|
|
575
581
|
ref: L,
|
|
576
582
|
class: "gd-ant-contract-signing-location__page-stack",
|
|
577
583
|
style: T({
|
|
578
|
-
width: `${
|
|
579
|
-
height: `${
|
|
584
|
+
width: `${st.value.width}px`,
|
|
585
|
+
height: `${st.value.height}px`
|
|
580
586
|
})
|
|
581
|
-
}, [(E(!0),
|
|
587
|
+
}, [(E(!0), b(v, null, D(ft.value, (t) => (E(), b("div", {
|
|
582
588
|
key: t.layout.pageIndex,
|
|
583
589
|
class: "gd-ant-contract-signing-location__page-shell",
|
|
584
590
|
style: T({
|
|
@@ -587,95 +593,108 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
|
|
|
587
593
|
width: `${t.layout.width}px`,
|
|
588
594
|
height: `${t.layout.height}px`
|
|
589
595
|
})
|
|
590
|
-
}, [
|
|
596
|
+
}, [x("div", {
|
|
591
597
|
class: "gd-ant-contract-signing-location__page",
|
|
592
598
|
style: T({
|
|
593
|
-
width: `${
|
|
594
|
-
height: `${
|
|
595
|
-
transform: `scale(${
|
|
599
|
+
width: `${J(t.page).width}px`,
|
|
600
|
+
height: `${J(t.page).height}px`,
|
|
601
|
+
transform: `scale(${C.zoom})`
|
|
596
602
|
}),
|
|
597
|
-
"aria-label": `${
|
|
598
|
-
}, [
|
|
603
|
+
"aria-label": `${C.file?.fileName || "合同"}第 ${t.page.displayPageNumber} 页`
|
|
604
|
+
}, [W.value && t.templatePage ? (E(), ie(e, {
|
|
599
605
|
key: 0,
|
|
600
606
|
page: t.templatePage,
|
|
601
|
-
"font-base-url":
|
|
602
|
-
onStatus: (e, n) =>
|
|
607
|
+
"font-base-url": C.fontBaseUrl,
|
|
608
|
+
onStatus: (e, n) => St(t.layout.pageIndex, e, n)
|
|
603
609
|
}, null, 8, [
|
|
604
610
|
"page",
|
|
605
611
|
"font-base-url",
|
|
606
612
|
"onStatus"
|
|
607
|
-
])) :
|
|
613
|
+
])) : W.value ? (E(), b("div", De, [n[8] ||= x("strong", null, "模板页面无法渲染", -1), x("span", null, k(ut.value || "页面结构无效,请回到模板设计器修复后重试。"), 1)])) : t.page.previewUrl ? (E(), b("img", {
|
|
608
614
|
key: 2,
|
|
609
615
|
class: "gd-ant-contract-signing-location__page-image",
|
|
610
616
|
src: t.page.previewUrl,
|
|
611
617
|
alt: "合同页面预览"
|
|
612
|
-
}, null, 8, Oe)) : (E(),
|
|
613
|
-
n[9] ||=
|
|
614
|
-
|
|
615
|
-
|
|
618
|
+
}, null, 8, Oe)) : (E(), b("div", ke, [Tt(t.layout.pageIndex) ? (E(), b(v, { key: 0 }, [x("strong", null, "第 " + k(t.page.displayPageNumber) + " 页加载中…", 1), x("span", null, k(t.page.width) + " × " + k(t.page.height), 1)], 64)) : Et(t.layout.pageIndex) ? (E(), b(v, { key: 1 }, [
|
|
619
|
+
n[9] ||= x("strong", null, "合同页面预览加载失败", -1),
|
|
620
|
+
x("span", null, k(Et(t.layout.pageIndex)), 1),
|
|
621
|
+
x("button", {
|
|
616
622
|
type: "button",
|
|
617
623
|
onClick: M((e) => F("retry", t.layout.pageIndex), ["stop"])
|
|
618
624
|
}, "重试当前页", 8, Ae)
|
|
619
|
-
], 64)) : A(d)(t.page) ? (E(),
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
n[12] ||=
|
|
623
|
-
], 64)) : (E(),
|
|
624
|
-
n[10] ||=
|
|
625
|
-
n[11] ||=
|
|
626
|
-
|
|
625
|
+
], 64)) : A(d)(t.page) ? (E(), b(v, { key: 3 }, [
|
|
626
|
+
x("strong", null, "第 " + k(t.page.displayPageNumber) + " 页", 1),
|
|
627
|
+
x("span", null, k(t.page.width) + " × " + k(t.page.height), 1),
|
|
628
|
+
n[12] ||= x("small", null, "等待 dataProvider 返回页面预览图", -1)
|
|
629
|
+
], 64)) : (E(), b(v, { key: 2 }, [
|
|
630
|
+
n[10] ||= x("strong", null, "页面元数据不完整", -1),
|
|
631
|
+
n[11] ||= x("span", null, "缺少有效的原始宽高,无法安全计算签署坐标。", -1),
|
|
632
|
+
x("button", {
|
|
627
633
|
type: "button",
|
|
628
634
|
onClick: M((e) => F("retry", t.layout.pageIndex), ["stop"])
|
|
629
635
|
}, "重新加载页面", 8, je)
|
|
630
|
-
], 64))])),
|
|
631
|
-
|
|
636
|
+
], 64))])), x("div", Me, [x("div", Ne, [
|
|
637
|
+
gt.value && gt.value.pageIndex === t.layout.pageIndex ? (E(), b("div", {
|
|
632
638
|
key: 0,
|
|
633
639
|
class: "gd-ant-contract-signing-location__coordinate-guides",
|
|
634
|
-
style: T(
|
|
640
|
+
style: T(jt(gt.value)),
|
|
635
641
|
"aria-hidden": "true"
|
|
636
642
|
}, [
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
], 4)) :
|
|
642
|
-
|
|
643
|
+
x("span", Pe, [x("small", null, "上 " + k(kt(t.page)?.top), 1)]),
|
|
644
|
+
x("span", Fe, [x("small", null, "下 " + k(kt(t.page)?.bottom), 1)]),
|
|
645
|
+
x("span", Ie, [x("small", null, "左 " + k(kt(t.page)?.left), 1)]),
|
|
646
|
+
x("span", Le, [x("small", null, "右 " + k(kt(t.page)?.right), 1)])
|
|
647
|
+
], 4)) : ae("", !0),
|
|
648
|
+
nt.value.length && rt.value === t.layout.pageIndex ? (E(), b("div", Re, [(E(!0), b(v, null, D(nt.value, (e, n) => (E(), b("span", {
|
|
643
649
|
key: `${e.axis}-${n}`,
|
|
644
|
-
class:
|
|
645
|
-
style: T(
|
|
646
|
-
}, null, 6))), 128))])) :
|
|
647
|
-
(E(!0),
|
|
650
|
+
class: w(e.axis === "x" ? "is-vertical" : "is-horizontal"),
|
|
651
|
+
style: T(Mt(e, t.page))
|
|
652
|
+
}, null, 6))), 128))])) : ae("", !0),
|
|
653
|
+
(E(!0), b(v, null, D(Dt(t.layout.pageIndex), (e) => (E(), b("button", {
|
|
648
654
|
key: e.id,
|
|
649
655
|
type: "button",
|
|
650
|
-
class:
|
|
651
|
-
style: T(
|
|
652
|
-
title:
|
|
653
|
-
"aria-label":
|
|
654
|
-
"aria-pressed": e.id ===
|
|
656
|
+
class: w(["gd-ant-contract-signing-location__placement", [`is-${e.signType}`, { "is-selected": e.id === C.selectedPlacementId }]]),
|
|
657
|
+
style: T(At(e)),
|
|
658
|
+
title: Y(e).alt,
|
|
659
|
+
"aria-label": Y(e).alt,
|
|
660
|
+
"aria-pressed": e.id === C.selectedPlacementId,
|
|
655
661
|
onClick: M((t) => F("select", e.id), ["stop"]),
|
|
656
|
-
onPointerdown: (t) =>
|
|
662
|
+
onPointerdown: (t) => Yt(t, e),
|
|
657
663
|
onLostpointercapture: $,
|
|
658
|
-
onKeydown: (t) =>
|
|
664
|
+
onKeydown: (t) => an(t, e)
|
|
659
665
|
}, [
|
|
660
|
-
|
|
666
|
+
x("span", Be, [x("img", {
|
|
661
667
|
class: "gd-ant-contract-signing-location__placement-visual",
|
|
662
|
-
src:
|
|
663
|
-
alt:
|
|
668
|
+
src: Y(e).dataUrl,
|
|
669
|
+
alt: Y(e).alt,
|
|
664
670
|
draggable: "false"
|
|
665
671
|
}, null, 8, Ve)]),
|
|
666
|
-
e.mustSign ? (E(),
|
|
667
|
-
(E(!0),
|
|
672
|
+
e.mustSign ? (E(), b("span", He, "必签")) : ae("", !0),
|
|
673
|
+
(E(!0), b(v, null, D(Pt(e) ? Xe : [], (t) => (E(), b("i", {
|
|
668
674
|
key: t,
|
|
669
|
-
class:
|
|
670
|
-
onPointerdown: M((n) =>
|
|
675
|
+
class: w(["gd-ant-contract-signing-location__resize-handle", `is-${t}`]),
|
|
676
|
+
onPointerdown: M((n) => Xt(n, e, t), ["stop"])
|
|
671
677
|
}, null, 42, Ue))), 128))
|
|
672
|
-
], 46, ze))), 128))
|
|
673
|
-
|
|
678
|
+
], 46, ze))), 128)),
|
|
679
|
+
(E(!0), b(v, null, D(Ot(t.layout.pageIndex), (e) => (E(), b("div", {
|
|
680
|
+
key: `${e.ownerId}:${e.id}`,
|
|
681
|
+
class: w(["gd-ant-contract-signing-location__placement is-reference", `is-${e.signType}`]),
|
|
682
|
+
style: T(At(e)),
|
|
683
|
+
title: `${e.ownerName} · 只读 · ${Y(e).alt}`,
|
|
684
|
+
role: "img",
|
|
685
|
+
"aria-label": `${e.ownerName}的只读${Y(e).alt}`
|
|
686
|
+
}, [x("span", Ge, [x("img", {
|
|
687
|
+
class: "gd-ant-contract-signing-location__placement-visual",
|
|
688
|
+
src: Y(e).dataUrl,
|
|
689
|
+
alt: "",
|
|
690
|
+
draggable: "false"
|
|
691
|
+
}, null, 8, Ke)]), x("span", qe, k(e.ownerName) + " · 只读 ", 1)], 14, We))), 128))
|
|
692
|
+
])])], 12, Ee)], 4))), 128))], 4)) : (E(), b("div", {
|
|
674
693
|
key: 0,
|
|
675
|
-
class:
|
|
694
|
+
class: w(["gd-ant-contract-signing-location__canvas-state", { "is-error": W.value && ut.value }]),
|
|
676
695
|
role: "status"
|
|
677
|
-
}, [
|
|
696
|
+
}, [W.value && ut.value ? (E(), b(v, { key: 0 }, [n[7] ||= x("strong", null, "合同模板无法渲染", -1), x("span", null, k(ut.value), 1)], 64)) : (E(), b(v, { key: 1 }, [oe("请选择可用的合同页面")], 64))], 2))], 544)]));
|
|
678
697
|
}
|
|
679
698
|
});
|
|
680
699
|
//#endregion
|
|
681
|
-
export {
|
|
700
|
+
export { Je as default };
|