@guodun/antdv 1.4.4 → 1.4.6
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 +85 -85
- package/dist/es/components/contract-signing-location/src/template-source.mjs +63 -4
- package/dist/es/components/dept-selector/src/dept.mjs +170 -142
- package/dist/es/components/index.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/index.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.mjs +372 -185
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.mjs +59 -42
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.mjs +218 -85
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.mjs +97 -0
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +914 -853
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +550 -245
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +214 -139
- package/dist/es/components/pro-contract-template-designer/src/extensions/template-variable.mjs +53 -35
- package/dist/es/components/pro-contract-template-designer/src/types.mjs +15 -2
- package/dist/es/components/pro-contract-template-designer/src/utils/advanced-controls.mjs +91 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +96 -65
- package/dist/es/components/pro-contract-template-designer/src/utils/template-tool-icons.mjs +23 -16
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/components/pro-selector/src/components/org-tree.mjs +130 -89
- package/dist/es/components/pro-selector/src/components/user.mjs +34 -26
- package/dist/es/components/pro-selector/src/pro-user.mjs +86 -72
- package/dist/es/components/pro-selector/src/types.mjs +4 -1
- package/dist/es/components/pro-selector/src/utils/orgTree.mjs +5 -2
- package/dist/es/components/pro-selector-group/src/compoents/dept-tree.vue.mjs +92 -65
- package/dist/es/components/pro-selector-group/src/compoents/dept.vue.mjs +3 -3
- package/dist/es/components/pro-selector-group/src/compoents/role.vue.mjs +98 -73
- package/dist/es/components/pro-selector-group/src/compoents/select-box.vue.mjs +12 -9
- package/dist/es/components/pro-selector-group/src/compoents/user.vue.mjs +101 -72
- package/dist/es/components/pro-selector-group/src/hooks/useApi.mjs +39 -22
- package/dist/es/components/pro-selector-group/src/index.vue.mjs +105 -83
- package/dist/es/components/pro-selector-group/src/utils/index.mjs +36 -0
- package/dist/es/components/role-selector/src/role.mjs +134 -120
- package/dist/es/index.mjs +50 -49
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -1
- package/dist/lib/components/dept-selector/src/dept.cjs +1 -1
- package/dist/lib/components/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.cjs +2 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.cjs +1 -0
- 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/composables/use-template-designer.cjs +4 -4
- package/dist/lib/components/pro-contract-template-designer/src/extensions/template-variable.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/types.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/advanced-controls.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +3 -3
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-tool-icons.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/lib/components/pro-selector/src/components/org-tree.cjs +1 -1
- package/dist/lib/components/pro-selector/src/components/user.cjs +1 -1
- package/dist/lib/components/pro-selector/src/pro-user.cjs +1 -1
- package/dist/lib/components/pro-selector/src/types.cjs +1 -1
- package/dist/lib/components/pro-selector/src/utils/orgTree.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/compoents/dept-tree.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/compoents/dept.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/compoents/role.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/compoents/select-box.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/compoents/user.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/hooks/useApi.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/index.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/utils/index.cjs +1 -0
- package/dist/lib/components/role-selector/src/role.cjs +1 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/theme/dept-selector.css +1 -1
- package/dist/theme/icon.css +1 -1
- package/dist/theme/index.css +1 -1
- package/dist/theme/pro-selector-group.css +1 -1
- package/dist/theme/pro-selector.css +1 -1
- package/dist/theme/role-selector.css +1 -1
- package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +3 -3
- 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 +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.d.ts +3 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.d.ts +7 -1
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.d.ts +14 -0
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +13 -1
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.d.ts +11 -1
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +4 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/template-variable.d.ts +11 -1
- package/dist/types/components/pro-contract-template-designer/src/types.d.ts +131 -2
- package/dist/types/components/pro-contract-template-designer/src/utils/advanced-controls.d.ts +15 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/template-renderer.d.ts +10 -2
- package/dist/types/components/pro-selector/index.d.ts +9 -0
- package/dist/types/components/pro-selector/src/components/user.d.ts +9 -0
- package/dist/types/components/pro-selector/src/types.d.ts +2 -0
- package/dist/types/components/pro-selector/src/utils/orgTree.d.ts +4 -1
- package/dist/types/components/pro-selector-group/src/compoents/select-box.vue.d.ts +4 -4
- package/dist/types/components/pro-selector-group/src/hooks/useApi.d.ts +6 -1
- package/dist/types/components/pro-selector-group/src/utils/index.d.ts +8 -0
- package/package.json +5 -3
|
@@ -6,7 +6,7 @@ import ce from "./ContractSigningLocationCanvas.mjs";
|
|
|
6
6
|
import le from "./ContractSigningLocationInspector.mjs";
|
|
7
7
|
import ue from "./ContractSigningLocationNavigator.mjs";
|
|
8
8
|
import { ContractSigningPreviewRequests as de } from "./preview-requests.mjs";
|
|
9
|
-
import { computed as d, createBlock as f, createCommentVNode as p, createElementBlock as
|
|
9
|
+
import { computed as d, createBlock as f, createCommentVNode as p, createElementBlock as fe, createElementVNode as m, createTextVNode as h, 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
10
|
import { Button as T, Tooltip as _e } from "ant-design-vue";
|
|
11
11
|
import { LeftOutlined as ve, ReloadOutlined as ye, RightOutlined as be } from "@ant-design/icons-vue";
|
|
12
12
|
//#region src/components/contract-signing-location/src/ContractSigningLocation.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -74,13 +74,13 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
74
74
|
let E = e, D = Ae, O = d(() => i(E.sealMinSize, E.sealMaxSize)), k = u(E.modelValue ?? c(E.contractId), {
|
|
75
75
|
sealSizeLimit: O.value,
|
|
76
76
|
sealTypeOptions: E.sealTypeOptions
|
|
77
|
-
}), A =
|
|
78
|
-
let e = Y.value;
|
|
79
|
-
return e ? A.value.placements.filter((t) => t.fileId === e.fileId) : [];
|
|
80
|
-
}), X = d(() => A.value.placements.find((e) => e.id === N.value)), ze = d(() => {
|
|
77
|
+
}), A = x(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(Ue(E.zoom)), z = b(null), B = b(!1), V = b(!1), H = 0, U = !1, W, G = [], K = 0, q = new de(), J = d(() => E.mode === "preview"), Y = d(() => J.value || E.readonly || E.disabled), Me = d(() => E.showInspector ?? !J.value), Ne = d(() => !J.value && E.showSubmitButton), Pe = d(() => A.value.files.length <= 1), Fe = d(() => St(E.height)), X = d(() => A.value.files.find((e) => e.fileId === j.value) ?? A.value.files[0]), Ie = d(() => X.value?.pages.find((e) => e.pageIndex === M.value) ?? X.value?.pages[0]), Le = d(() => {
|
|
81
78
|
let e = X.value;
|
|
82
|
-
return e ?
|
|
83
|
-
}),
|
|
79
|
+
return e ? A.value.placements.filter((t) => t.fileId === e.fileId) : [];
|
|
80
|
+
}), Z = d(() => A.value.placements.find((e) => e.id === N.value)), Re = d(() => {
|
|
81
|
+
let e = Z.value;
|
|
82
|
+
return e ? l(A.value, e.fileId, e.pageIndex) ?? Ie.value : Ie.value;
|
|
83
|
+
}), ze = d(() => I.value.filter((e) => e.endsWith(":thumbnail")).map((e) => e.slice(0, -10))), Be = d(() => Object.keys(L.value).filter((e) => e.endsWith(":thumbnail")).map((e) => e.slice(0, -10))), Ve = d(() => I.value.filter((e) => e.endsWith(":preview")).map((e) => e.slice(0, -8))), He = d(() => {
|
|
84
84
|
let e = {};
|
|
85
85
|
return Object.entries(L.value).forEach(([t, n]) => {
|
|
86
86
|
t.endsWith(":preview") && (e[t.slice(0, -8)] = n);
|
|
@@ -97,29 +97,29 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
97
97
|
bt(u(A.value, {
|
|
98
98
|
sealSizeLimit: O.value,
|
|
99
99
|
sealTypeOptions: E.sealTypeOptions
|
|
100
|
-
})) !== bt(A.value) &&
|
|
100
|
+
})) !== bt(A.value) && Q(A.value);
|
|
101
101
|
}), C(() => E.zoom, (e) => {
|
|
102
|
-
R.value =
|
|
102
|
+
R.value = Ue(e);
|
|
103
103
|
}), C(() => [
|
|
104
104
|
E.contractId,
|
|
105
105
|
E.dataProvider,
|
|
106
106
|
E.autoLoad
|
|
107
107
|
], ([e, t, n], r) => {
|
|
108
|
-
!n || !t || !e || (!r || e !== r[0] || t !== r[1]) &&
|
|
108
|
+
!n || !t || !e || (!r || e !== r[0] || t !== r[1]) && Ke();
|
|
109
109
|
}, { immediate: !0 }), he(() => {
|
|
110
110
|
U = !0, H += 1, ht(), gt();
|
|
111
111
|
});
|
|
112
|
-
function
|
|
112
|
+
function Ue(e) {
|
|
113
113
|
return n(e, Math.min(E.minZoom, E.maxZoom), Math.max(E.minZoom, E.maxZoom));
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
let t =
|
|
115
|
+
function We(e) {
|
|
116
|
+
let t = Ue(e);
|
|
117
117
|
R.value = t, D("update:zoom", t);
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function Ge() {
|
|
120
120
|
return z.value?.fitWidth() ?? R.value;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function Q(e, t = {}) {
|
|
123
123
|
A.value = u(e, {
|
|
124
124
|
sealSizeLimit: O.value,
|
|
125
125
|
sealTypeOptions: E.sealTypeOptions
|
|
@@ -127,7 +127,7 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
127
127
|
let n = s(A.value);
|
|
128
128
|
return D("update:modelValue", n), D("change", n), n;
|
|
129
129
|
}
|
|
130
|
-
async function
|
|
130
|
+
async function Ke() {
|
|
131
131
|
let e = String(E.contractId || A.value.contractId || "").trim();
|
|
132
132
|
if (!E.dataProvider) return $({
|
|
133
133
|
code: "CONTRACT_PROVIDER_MISSING",
|
|
@@ -170,7 +170,7 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
170
170
|
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);
|
|
171
171
|
if (!i || a(o) || !ee || I.value.includes(s)) return;
|
|
172
172
|
mt(s), I.value = [...I.value, s];
|
|
173
|
-
let c =
|
|
173
|
+
let c = q.start(s);
|
|
174
174
|
try {
|
|
175
175
|
let a = await i({
|
|
176
176
|
contractId: A.value.contractId || E.contractId,
|
|
@@ -179,7 +179,7 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
179
179
|
thumbnail: n,
|
|
180
180
|
signal: c.signal
|
|
181
181
|
});
|
|
182
|
-
if (U || !
|
|
182
|
+
if (U || !q.isCurrent(s, c) || !l(A.value, e, t)) return;
|
|
183
183
|
let o = oe(l(A.value, e, t), a, r(E.dataProvider?.coordinateScale), n), ee = A.value.files.map((r) => r.fileId === e ? {
|
|
184
184
|
...r,
|
|
185
185
|
pages: r.pages.map((e) => e.pageIndex === t ? {
|
|
@@ -188,12 +188,12 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
188
188
|
...n ? { thumbnailUrl: a.url } : { previewUrl: a.url }
|
|
189
189
|
} : e)
|
|
190
190
|
} : r);
|
|
191
|
-
|
|
191
|
+
Q({
|
|
192
192
|
...A.value,
|
|
193
193
|
files: ee
|
|
194
194
|
}, { clearError: !1 });
|
|
195
195
|
} catch (n) {
|
|
196
|
-
if (!
|
|
196
|
+
if (!q.isCurrent(s, c) || _t(n)) return;
|
|
197
197
|
let r = ft(n, "CONTRACT_PREVIEW_FAILED", "合同页面预览加载失败,可切换页面或重试", {
|
|
198
198
|
fileId: e,
|
|
199
199
|
pageIndex: t
|
|
@@ -203,13 +203,13 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
203
203
|
[s]: r.message
|
|
204
204
|
};
|
|
205
205
|
} finally {
|
|
206
|
-
|
|
206
|
+
q.finish(s, c) && (I.value = I.value.filter((e) => e !== s));
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
function Ye(e) {
|
|
210
210
|
if (e === j.value) return;
|
|
211
211
|
let t = j.value;
|
|
212
|
-
ht(), t && (gt((e) => e.startsWith(`${t}:`) && e.endsWith(":preview")),
|
|
212
|
+
ht(), t && (gt((e) => e.startsWith(`${t}:`) && e.endsWith(":preview")), G = G.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));
|
|
213
213
|
}
|
|
214
214
|
function Xe(e) {
|
|
215
215
|
M.value = e;
|
|
@@ -220,15 +220,15 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
220
220
|
function Qe(e) {
|
|
221
221
|
ht();
|
|
222
222
|
let t = j.value;
|
|
223
|
-
|
|
224
|
-
|
|
223
|
+
W = setTimeout(() => {
|
|
224
|
+
W = void 0, j.value === t && $e(t, e);
|
|
225
225
|
}, 150);
|
|
226
226
|
}
|
|
227
227
|
function $e(e, t) {
|
|
228
228
|
let n = A.value.files.find((t) => t.fileId === e);
|
|
229
229
|
!n || a(n) || e !== j.value || (t.forEach((e) => {
|
|
230
230
|
let t = n.pages.find((t) => t.pageIndex === e);
|
|
231
|
-
!t || t.previewUrl || I.value.includes(pt(n.fileId, e, !1)) ||
|
|
231
|
+
!t || t.previewUrl || I.value.includes(pt(n.fileId, e, !1)) || G.some((t) => t.fileId === n.fileId && t.pageIndex === e) || G.push({
|
|
232
232
|
fileId: n.fileId,
|
|
233
233
|
pageIndex: e
|
|
234
234
|
});
|
|
@@ -236,12 +236,12 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
236
236
|
}
|
|
237
237
|
async function et() {
|
|
238
238
|
let e = j.value;
|
|
239
|
-
for (
|
|
240
|
-
let t =
|
|
239
|
+
for (G = G.filter((t) => t.fileId === e); K < 3 && G.length;) {
|
|
240
|
+
let t = G.shift();
|
|
241
241
|
if (!t || t.fileId !== e) continue;
|
|
242
242
|
let n = l(A.value, t.fileId, t.pageIndex), r = A.value.files.find((e) => e.fileId === t.fileId);
|
|
243
|
-
!n || a(r) || n.previewUrl || I.value.includes(pt(t.fileId, t.pageIndex, !1)) || (
|
|
244
|
-
|
|
243
|
+
!n || a(r) || n.previewUrl || I.value.includes(pt(t.fileId, t.pageIndex, !1)) || (K += 1, Je(t.fileId, t.pageIndex, !1).finally(() => {
|
|
244
|
+
K = Math.max(0, K - 1), et();
|
|
245
245
|
}));
|
|
246
246
|
}
|
|
247
247
|
}
|
|
@@ -250,8 +250,8 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
250
250
|
t && (t.fileId !== j.value && Ye(t.fileId), N.value = e, _(() => z.value?.scrollToPlacement(e)));
|
|
251
251
|
}
|
|
252
252
|
function nt(e, t = {}) {
|
|
253
|
-
if (
|
|
254
|
-
let n = t.fileId ??
|
|
253
|
+
if (Y.value || !E.allowedPlacementTypes.includes(e)) return;
|
|
254
|
+
let n = t.fileId ?? X.value?.fileId, r = t.pageIndex ?? Ie.value?.pageIndex;
|
|
255
255
|
if (!n || r === void 0) return;
|
|
256
256
|
let i = l(A.value, n, r);
|
|
257
257
|
if (!i || !re(i)) {
|
|
@@ -281,13 +281,13 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
281
281
|
sealTypeOptions: E.sealTypeOptions,
|
|
282
282
|
...e === "seal" ? { sealType: [String(a)] } : {}
|
|
283
283
|
});
|
|
284
|
-
return
|
|
284
|
+
return Q({
|
|
285
285
|
...A.value,
|
|
286
286
|
placements: [...A.value.placements, o]
|
|
287
287
|
}), j.value = n, M.value = r, N.value = o.id, yt(o);
|
|
288
288
|
}
|
|
289
289
|
function rt(e, t) {
|
|
290
|
-
|
|
290
|
+
Y.value || Q({
|
|
291
291
|
...A.value,
|
|
292
292
|
placements: A.value.placements.map((n) => {
|
|
293
293
|
if (n.id !== e) return n;
|
|
@@ -300,8 +300,8 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
300
300
|
});
|
|
301
301
|
}
|
|
302
302
|
function it() {
|
|
303
|
-
let e =
|
|
304
|
-
if (!e ||
|
|
303
|
+
let e = Z.value;
|
|
304
|
+
if (!e || Y.value) return;
|
|
305
305
|
let n = l(A.value, e.fileId, e.pageIndex);
|
|
306
306
|
if (!n) return;
|
|
307
307
|
let r = t({
|
|
@@ -310,13 +310,13 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
310
310
|
signLeft: e.signLeft + 16,
|
|
311
311
|
signTop: e.signTop + 16
|
|
312
312
|
}, n, { sealSizeLimit: O.value });
|
|
313
|
-
|
|
313
|
+
Q({
|
|
314
314
|
...A.value,
|
|
315
315
|
placements: [...A.value.placements, r]
|
|
316
316
|
}), N.value = r.id;
|
|
317
317
|
}
|
|
318
318
|
function at(e) {
|
|
319
|
-
|
|
319
|
+
Y.value || (Q({
|
|
320
320
|
...A.value,
|
|
321
321
|
placements: A.value.placements.filter((t) => t.id !== e)
|
|
322
322
|
}), N.value === e && (N.value = ""));
|
|
@@ -342,7 +342,7 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
function ut() {
|
|
345
|
-
let e =
|
|
345
|
+
let e = Q(s(je.value));
|
|
346
346
|
return N.value = "", dt(!0), _(() => z.value?.scrollToPage(M.value)), e;
|
|
347
347
|
}
|
|
348
348
|
function dt(e = !1) {
|
|
@@ -370,17 +370,17 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
370
370
|
delete t[e], L.value = t;
|
|
371
371
|
}
|
|
372
372
|
function ht() {
|
|
373
|
-
|
|
373
|
+
W &&= (clearTimeout(W), void 0);
|
|
374
374
|
}
|
|
375
375
|
function gt(e) {
|
|
376
|
-
let t = e ?? (() => !0), n = new Set(
|
|
377
|
-
n.size && (I.value = I.value.filter((e) => !n.has(e))), e || (
|
|
376
|
+
let t = e ?? (() => !0), n = new Set(q.abort(t));
|
|
377
|
+
n.size && (I.value = I.value.filter((e) => !n.has(e))), e || (G = []);
|
|
378
378
|
}
|
|
379
379
|
function _t(e) {
|
|
380
380
|
return !!(e && typeof e == "object" && "cancelled" in e && e.cancelled) || e instanceof DOMException && e.name === "AbortError";
|
|
381
381
|
}
|
|
382
382
|
function vt(e) {
|
|
383
|
-
let t =
|
|
383
|
+
let t = X.value;
|
|
384
384
|
t && Je(t.fileId, e, !1);
|
|
385
385
|
}
|
|
386
386
|
function yt(e) {
|
|
@@ -400,7 +400,7 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
400
400
|
if (typeof e == "string" && e.trim()) return { "--gd-ant-contract-signing-location-height": e.trim() };
|
|
401
401
|
}
|
|
402
402
|
return pe({
|
|
403
|
-
load:
|
|
403
|
+
load: Ke,
|
|
404
404
|
validate: ot,
|
|
405
405
|
getValue: st,
|
|
406
406
|
getOutput: ct,
|
|
@@ -408,65 +408,65 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
408
408
|
reset: ut,
|
|
409
409
|
addPlacement: nt,
|
|
410
410
|
removePlacement: at,
|
|
411
|
-
fitWidth:
|
|
412
|
-
}), (t, n) => (y(),
|
|
411
|
+
fitWidth: Ge
|
|
412
|
+
}), (t, n) => (y(), fe("section", {
|
|
413
413
|
class: v(["gd-ant-contract-signing-location", {
|
|
414
|
-
"is-readonly":
|
|
414
|
+
"is-readonly": Y.value,
|
|
415
415
|
"is-disabled": e.disabled,
|
|
416
|
-
"is-preview":
|
|
416
|
+
"is-preview": J.value
|
|
417
417
|
}]),
|
|
418
|
-
style: me(
|
|
418
|
+
style: me(Fe.value)
|
|
419
419
|
}, [
|
|
420
|
-
|
|
420
|
+
m("header", xe, [m("div", Se, [n[6] ||= m("span", {
|
|
421
421
|
class: "gd-ant-contract-signing-location__title-bar",
|
|
422
422
|
"aria-hidden": "true"
|
|
423
|
-
}, null, -1),
|
|
424
|
-
|
|
423
|
+
}, null, -1), m("div", null, [m("strong", null, ge(J.value ? "合同预览" : "指定合同签署位置"), 1)])]), m("div", Ce, [
|
|
424
|
+
m("span", we, ge(A.value.placements.length) + " 个位置", 1),
|
|
425
425
|
e.dataProvider ? (y(), f(S(T), {
|
|
426
426
|
key: 0,
|
|
427
427
|
loading: P.value,
|
|
428
|
-
onClick:
|
|
428
|
+
onClick: Ke
|
|
429
429
|
}, {
|
|
430
|
-
default: w(() => [g(S(ye), { "aria-hidden": "true" }), n[7] ||=
|
|
430
|
+
default: w(() => [g(S(ye), { "aria-hidden": "true" }), n[7] ||= h(" 重新加载 ", -1)]),
|
|
431
431
|
_: 1
|
|
432
432
|
}, 8, ["loading"])) : p("", !0),
|
|
433
|
-
|
|
433
|
+
J.value ? p("", !0) : (y(), f(S(T), {
|
|
434
434
|
key: 1,
|
|
435
|
-
disabled:
|
|
435
|
+
disabled: Y.value,
|
|
436
436
|
onClick: ut
|
|
437
437
|
}, {
|
|
438
|
-
default: w(() => [...n[8] ||= [
|
|
438
|
+
default: w(() => [...n[8] ||= [h("重置", -1)]]),
|
|
439
439
|
_: 1
|
|
440
440
|
}, 8, ["disabled"])),
|
|
441
|
-
|
|
441
|
+
Ne.value ? (y(), f(S(T), {
|
|
442
442
|
key: 2,
|
|
443
443
|
type: "primary",
|
|
444
444
|
loading: P.value,
|
|
445
445
|
disabled: e.disabled,
|
|
446
446
|
onClick: lt
|
|
447
447
|
}, {
|
|
448
|
-
default: w(() => [...n[9] ||= [
|
|
448
|
+
default: w(() => [...n[9] ||= [h("确认并生成规则", -1)]]),
|
|
449
449
|
_: 1
|
|
450
450
|
}, 8, ["loading", "disabled"])) : p("", !0)
|
|
451
451
|
])]),
|
|
452
|
-
F.value ? (y(),
|
|
452
|
+
F.value ? (y(), fe("div", Te, [m("span", null, ge(F.value), 1), e.dataProvider && e.contractId ? (y(), f(S(T), {
|
|
453
453
|
key: 0,
|
|
454
454
|
type: "link",
|
|
455
455
|
size: "small",
|
|
456
|
-
onClick:
|
|
456
|
+
onClick: Ke
|
|
457
457
|
}, {
|
|
458
|
-
default: w(() => [...n[10] ||= [
|
|
458
|
+
default: w(() => [...n[10] ||= [h("重试", -1)]]),
|
|
459
459
|
_: 1
|
|
460
460
|
})) : p("", !0)])) : p("", !0),
|
|
461
|
-
|
|
462
|
-
"is-single-file":
|
|
463
|
-
"is-inspector-hidden": !
|
|
461
|
+
m("div", { class: v(["gd-ant-contract-signing-location__body", {
|
|
462
|
+
"is-single-file": Pe.value,
|
|
463
|
+
"is-inspector-hidden": !Me.value
|
|
464
464
|
}]) }, [
|
|
465
|
-
|
|
465
|
+
Pe.value ? p("", !0) : (y(), fe("div", {
|
|
466
466
|
key: 0,
|
|
467
467
|
class: v(["gd-ant-contract-signing-location__navigator-wrap", { "is-collapsed": V.value }])
|
|
468
468
|
}, [g(S(_e), { title: V.value ? "展开页面栏" : "收起页面栏" }, {
|
|
469
|
-
default: w(() => [
|
|
469
|
+
default: w(() => [m("button", {
|
|
470
470
|
type: "button",
|
|
471
471
|
class: "gd-ant-contract-signing-location__panel-handle",
|
|
472
472
|
"aria-label": V.value ? "展开页面栏" : "收起页面栏",
|
|
@@ -480,11 +480,11 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
480
480
|
"aria-hidden": "true"
|
|
481
481
|
}))], 8, Ee)]),
|
|
482
482
|
_: 1
|
|
483
|
-
}, 8, ["title"]),
|
|
483
|
+
}, 8, ["title"]), m("div", De, [g(ue, {
|
|
484
484
|
files: A.value.files,
|
|
485
485
|
"active-file-id": j.value,
|
|
486
|
-
"loading-preview-keys":
|
|
487
|
-
"error-preview-keys":
|
|
486
|
+
"loading-preview-keys": ze.value,
|
|
487
|
+
"error-preview-keys": Be.value,
|
|
488
488
|
onSelect: Ye
|
|
489
489
|
}, null, 8, [
|
|
490
490
|
"files",
|
|
@@ -495,17 +495,17 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
495
495
|
g(ce, {
|
|
496
496
|
ref_key: "canvasRef",
|
|
497
497
|
ref: z,
|
|
498
|
-
file:
|
|
499
|
-
pages:
|
|
500
|
-
placements:
|
|
498
|
+
file: X.value,
|
|
499
|
+
pages: X.value?.pages ?? [],
|
|
500
|
+
placements: Le.value,
|
|
501
501
|
"selected-placement-id": N.value,
|
|
502
|
-
readonly:
|
|
502
|
+
readonly: Y.value,
|
|
503
503
|
resizable: e.resizable,
|
|
504
504
|
"seal-size-limit": O.value,
|
|
505
505
|
"seal-type-options": e.sealTypeOptions,
|
|
506
506
|
zoom: R.value,
|
|
507
|
-
"preview-loading-keys":
|
|
508
|
-
"preview-error-map":
|
|
507
|
+
"preview-loading-keys": Ve.value,
|
|
508
|
+
"preview-error-map": He.value,
|
|
509
509
|
"active-page-index": M.value,
|
|
510
510
|
"min-zoom": e.minZoom,
|
|
511
511
|
"max-zoom": e.maxZoom,
|
|
@@ -521,7 +521,7 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
521
521
|
onVisiblePages: Qe,
|
|
522
522
|
onViewPage: Xe,
|
|
523
523
|
onPageChange: Ze,
|
|
524
|
-
onZoomChange:
|
|
524
|
+
onZoomChange: We
|
|
525
525
|
}, null, 8, [
|
|
526
526
|
"file",
|
|
527
527
|
"pages",
|
|
@@ -538,11 +538,11 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
538
538
|
"min-zoom",
|
|
539
539
|
"max-zoom"
|
|
540
540
|
]),
|
|
541
|
-
|
|
541
|
+
Me.value ? (y(), fe("div", {
|
|
542
542
|
key: 1,
|
|
543
543
|
class: v(["gd-ant-contract-signing-location__inspector-wrap", { "is-collapsed": B.value }])
|
|
544
544
|
}, [g(S(_e), { title: B.value ? "展开属性栏" : "收起属性栏" }, {
|
|
545
|
-
default: w(() => [
|
|
545
|
+
default: w(() => [m("button", {
|
|
546
546
|
type: "button",
|
|
547
547
|
class: "gd-ant-contract-signing-location__panel-handle",
|
|
548
548
|
"aria-label": B.value ? "展开属性栏" : "收起属性栏",
|
|
@@ -556,19 +556,19 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
|
|
|
556
556
|
"aria-hidden": "true"
|
|
557
557
|
}))], 8, Oe)]),
|
|
558
558
|
_: 1
|
|
559
|
-
}, 8, ["title"]),
|
|
560
|
-
placement:
|
|
561
|
-
page:
|
|
562
|
-
pages:
|
|
563
|
-
placements:
|
|
564
|
-
readonly:
|
|
559
|
+
}, 8, ["title"]), m("div", ke, [g(le, {
|
|
560
|
+
placement: Z.value,
|
|
561
|
+
page: Re.value,
|
|
562
|
+
pages: X.value?.pages ?? [],
|
|
563
|
+
placements: Le.value,
|
|
564
|
+
readonly: Y.value,
|
|
565
565
|
resizable: e.resizable,
|
|
566
566
|
"seal-size-limit": O.value,
|
|
567
567
|
"seal-type-options": e.sealTypeOptions,
|
|
568
568
|
"allowed-placement-types": e.allowedPlacementTypes,
|
|
569
569
|
"size-profile": e.sizeProfile,
|
|
570
570
|
onAdd: nt,
|
|
571
|
-
onUpdate: n[5] ||= (e) =>
|
|
571
|
+
onUpdate: n[5] ||= (e) => Z.value && rt(Z.value.id, e),
|
|
572
572
|
onDuplicate: it,
|
|
573
573
|
onRemove: at,
|
|
574
574
|
onLocate: tt
|
|
@@ -90,12 +90,71 @@ function g(e) {
|
|
|
90
90
|
return !!(e && typeof e == "object");
|
|
91
91
|
}
|
|
92
92
|
function _(e, t, n) {
|
|
93
|
-
return {
|
|
94
|
-
width:
|
|
95
|
-
height:
|
|
93
|
+
return y(e) || y(t) || {
|
|
94
|
+
width: b(e?.width, b(t?.width, n.width)),
|
|
95
|
+
height: b(e?.height, b(t?.height, n.height))
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
var v = [
|
|
99
|
+
{
|
|
100
|
+
pointWidth: 595.5,
|
|
101
|
+
pointHeight: 842.25,
|
|
102
|
+
cssWidth: 794,
|
|
103
|
+
cssHeight: 1123
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
pointWidth: 842.25,
|
|
107
|
+
pointHeight: 595.5,
|
|
108
|
+
cssWidth: 1123,
|
|
109
|
+
cssHeight: 794
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
pointWidth: 419.25,
|
|
113
|
+
pointHeight: 595.5,
|
|
114
|
+
cssWidth: 559,
|
|
115
|
+
cssHeight: 794
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
pointWidth: 595.5,
|
|
119
|
+
pointHeight: 419.25,
|
|
120
|
+
cssWidth: 794,
|
|
121
|
+
cssHeight: 559
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
pointWidth: 842.25,
|
|
125
|
+
pointHeight: 1190.25,
|
|
126
|
+
cssWidth: 1123,
|
|
127
|
+
cssHeight: 1587
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
pointWidth: 1190.25,
|
|
131
|
+
pointHeight: 842.25,
|
|
132
|
+
cssWidth: 1587,
|
|
133
|
+
cssHeight: 1123
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
pointWidth: 612,
|
|
137
|
+
pointHeight: 792,
|
|
138
|
+
cssWidth: 816,
|
|
139
|
+
cssHeight: 1056
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
pointWidth: 612,
|
|
143
|
+
pointHeight: 1008,
|
|
144
|
+
cssWidth: 816,
|
|
145
|
+
cssHeight: 1344
|
|
146
|
+
}
|
|
147
|
+
];
|
|
148
|
+
function y(e) {
|
|
149
|
+
let t = Number(e?.width), n = Number(e?.height);
|
|
150
|
+
if (!Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0) return;
|
|
151
|
+
let r = v.find((e) => Math.abs(t - e.pointWidth) <= 1.1 && Math.abs(n - e.pointHeight) <= 1.1);
|
|
152
|
+
return r ? {
|
|
153
|
+
width: r.cssWidth,
|
|
154
|
+
height: r.cssHeight
|
|
155
|
+
} : void 0;
|
|
156
|
+
}
|
|
157
|
+
function b(e, t) {
|
|
99
158
|
let n = Number(e);
|
|
100
159
|
return Number.isFinite(n) && n > 0 ? n : t;
|
|
101
160
|
}
|