@guodun/antdv 1.7.12 → 1.7.13
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 +370 -294
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +219 -202
- package/dist/es/components/contract-signing-location/src/ContractSigningTemplatePage.vue.mjs +18 -18
- package/dist/es/components/contract-signing-location/src/template-source.mjs +62 -49
- 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/ContractTemplatePreviewPage.vue.mjs +37 -42
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.mjs +69 -55
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.mjs +278 -270
- package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +344 -343
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1046 -1000
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +120 -74
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +133 -132
- package/dist/es/components/pro-contract-template-designer/src/utils/contract-layout-check.mjs +239 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/contract-print-document.mjs +95 -71
- package/dist/es/components/pro-contract-template-designer/src/utils/page-decorations.mjs +67 -76
- package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +96 -83
- package/dist/es/components/pro-contract-template-designer/src/utils/template-variable-render.mjs +23 -15
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/contract-print-css/index.mjs +122 -25
- package/dist/es/contract-print.mjs +2 -0
- package/dist/es/index.mjs +21 -20
- 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/ContractSigningTemplatePage.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/template-source.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/ContractTemplatePreviewPage.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
- package/dist/lib/components/pro-contract-template-designer/src/utils/contract-layout-check.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/contract-print-document.cjs +50 -28
- package/dist/lib/components/pro-contract-template-designer/src/utils/page-decorations.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +5 -5
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-variable-render.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/lib/contract-print-css/index.cjs +62 -18
- package/dist/lib/contract-print.cjs +1 -0
- package/dist/lib/index.cjs +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 +9 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.d.ts +7 -0
- package/dist/types/components/contract-signing-location/src/template-source.d.ts +6 -0
- package/dist/types/components/pro-contract-template-designer/index.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.d.ts +2 -0
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +5 -1
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.d.ts +7 -2
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +2 -2
- package/dist/types/components/pro-contract-template-designer/src/types.d.ts +36 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/contract-layout-check.d.ts +104 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/contract-print-document.d.ts +4 -1
- package/dist/types/components/pro-contract-template-designer/src/utils/page-decorations.d.ts +2 -8
- package/dist/types/components/pro-contract-template-designer/src/utils/template-renderer.d.ts +6 -1
- package/dist/types/contract-print-css/index.d.ts +70 -0
- package/dist/types/contract-print.d.ts +2 -0
- package/package.json +14 -2
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import "../../pro-contract-template-designer/src/utils/contract-print-document.mjs";
|
|
2
2
|
import { CONTRACT_SIGNING_SEAL_TYPE_OPTIONS as e } from "./constants.mjs";
|
|
3
3
|
import { clampContractSigningPlacement as t, clampContractSigningZoom as n, normalizeContractSigningCoordinateScale as r, resolveContractSigningSealSizeLimit as i } from "./coordinates.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import le from "./
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
4
|
+
import { createContractTemplateLayoutChecker as a, describeContractTemplateLayoutIssue as o, isContractTemplateLayoutAbortError as s } from "../../pro-contract-template-designer/src/utils/contract-layout-check.mjs";
|
|
5
|
+
import { buildContractSigningLayoutPages as c, isContractSigningTemplateFile as l, isContractSigningTemplateSource as ee } from "./template-source.mjs";
|
|
6
|
+
import { ContractSigningLocationBuildError as te, buildContractSigningLocationOutput as ne, cloneContractSigningLocationValue as u, createContractSigningLocationValue as re, createContractSigningPlacement as ie, findContractSigningPage as d, getContractSigningHomePage as ae, isContractSigningPageUsable as oe, normalizeContractSigningLocationValue as f, normalizeContractSigningProviderValue as se, patchContractSigningPlacement as ce, resolveContractSigningDefaultSealTypes as le, resolveContractSigningPreviewPageSize as ue, validateContractSigningLocationValue as de } from "./location-rules.mjs";
|
|
7
|
+
import fe from "./ContractSigningLocationCanvas.mjs";
|
|
8
|
+
import pe from "./ContractSigningLocationInspector.mjs";
|
|
9
|
+
import me from "./ContractSigningLocationNavigator.mjs";
|
|
10
|
+
import { ContractSigningPreviewRequests as he } from "./preview-requests.mjs";
|
|
11
|
+
import { computed as p, createBlock as m, createCommentVNode as h, createElementBlock as ge, createElementVNode as g, createTextVNode as _e, createVNode as _, defineComponent as ve, nextTick as v, normalizeClass as ye, normalizeStyle as be, onBeforeUnmount as xe, openBlock as y, ref as b, shallowRef as x, toDisplayString as Se, unref as S, watch as C, withCtx as w } from "vue";
|
|
12
|
+
import { Button as Ce, Tooltip as we } from "ant-design-vue";
|
|
13
|
+
import { LeftOutlined as Te, ReloadOutlined as Ee, RightOutlined as De } from "@ant-design/icons-vue";
|
|
13
14
|
//#region src/components/contract-signing-location/src/ContractSigningLocation.vue?vue&type=script&setup=true&lang.ts
|
|
14
|
-
var
|
|
15
|
+
var Oe = { class: "gd-ant-contract-signing-location__header" }, ke = { class: "gd-ant-contract-signing-location__title" }, Ae = { class: "gd-ant-contract-signing-location__header-actions" }, je = { class: "gd-ant-contract-signing-location__placement-count" }, Me = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "gd-ant-contract-signing-location__error",
|
|
17
18
|
role: "alert"
|
|
18
|
-
},
|
|
19
|
+
}, Ne = ["aria-label", "aria-expanded"], Pe = { class: "gd-ant-contract-signing-location__panel-stack" }, Fe = ["aria-label", "aria-expanded"], Ie = { class: "gd-ant-contract-signing-location__panel-stack" }, Le = "正在校验排版,请稍后再确认签署位置", Re = /* @__PURE__ */ ve({
|
|
19
20
|
name: "ContractSigningLocation",
|
|
20
21
|
__name: "ContractSigningLocation",
|
|
21
22
|
props: {
|
|
@@ -74,71 +75,93 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
|
|
|
74
75
|
"submit",
|
|
75
76
|
"error"
|
|
76
77
|
],
|
|
77
|
-
setup(e, { expose:
|
|
78
|
-
let
|
|
79
|
-
sealSizeLimit:
|
|
80
|
-
sealTypeOptions:
|
|
81
|
-
}), O =
|
|
82
|
-
|
|
78
|
+
setup(e, { expose: ve, emit: Re }) {
|
|
79
|
+
let T = e, E = Re, D = p(() => i(T.sealMinSize, T.sealMaxSize)), ze = f(T.modelValue ?? re(T.contractId), {
|
|
80
|
+
sealSizeLimit: D.value,
|
|
81
|
+
sealTypeOptions: T.sealTypeOptions
|
|
82
|
+
}), O = x(ze), Be = x(u(ze)), k = x(ze.files[0]?.fileId ?? ""), A = x(ze.files[0]?.pages[0]?.pageIndex ?? 0), j = x(""), Ve = x(!1), M = x(""), N = b([]), P = b({}), He = x(ft(T.zoom)), F = b(null), I = b(!1), L = b(!1), R = x("loading"), Ue = x(""), We = a(), z = x({
|
|
83
|
+
status: "ready",
|
|
84
|
+
issues: [],
|
|
85
|
+
messages: []
|
|
86
|
+
}), Ge, Ke = 0, B = 0, V = !1, qe, H = [], Je = 0, U = new he(), W = p(() => T.mode === "preview"), Ye = p(() => W.value || T.readonly || T.disabled), Xe = p(() => T.showInspector ?? !W.value), Ze = p(() => !W.value && T.showSubmitButton), Qe = p(() => O.value.files.length <= 1), $e = p(() => Xt(T.height)), G = p(() => O.value.files.find((e) => e.fileId === k.value) ?? O.value.files[0]), K = p(() => l(G.value) && R.value !== "ready"), q = p(() => z.value.status === "checking"), et = p(() => {
|
|
87
|
+
let e = G.value?.fileId;
|
|
88
|
+
return z.value.issues.filter((t) => t.fileId === e);
|
|
89
|
+
}), J = p(() => {
|
|
90
|
+
let e = z.value;
|
|
91
|
+
return e.status === "ready" ? [] : e.status === "checking" ? [{
|
|
92
|
+
code: "CONTRACT_LAYOUT_CHECKING",
|
|
93
|
+
message: Le
|
|
94
|
+
}] : e.issues.length ? e.issues.map((e) => ({
|
|
95
|
+
code: e.kind === "measure-failed" ? "CONTRACT_PAGE_LAYOUT_UNVERIFIED" : "CONTRACT_PAGE_LAYOUT_OVERFLOW",
|
|
96
|
+
message: kt(e),
|
|
97
|
+
...e.fileId === void 0 ? {} : { fileId: e.fileId },
|
|
98
|
+
pageIndex: e.pageIndex
|
|
99
|
+
})) : [{
|
|
100
|
+
code: "CONTRACT_PAGE_LAYOUT_UNVERIFIED",
|
|
101
|
+
message: "合同排版校验失败,请刷新后重试"
|
|
102
|
+
}];
|
|
103
|
+
}), tt = p(() => z.value.status === "error" ? z.value.messages[0] ?? "" : ""), Y = p(() => !K.value || W.value ? "" : R.value === "loading" ? "合同排版校验中,暂不可指定签署位置" : It(Ue.value)), nt = p(() => R.value === "error" && Y.value ? Y.value : M.value || Y.value || tt.value), rt = p(() => !!(M.value && T.dataProvider && T.contractId) && !(R.value === "error" && Y.value)), X = p(() => Ye.value || K.value), it = p(() => G.value?.pages.find((e) => e.pageIndex === A.value) ?? G.value?.pages[0]), at = p(() => {
|
|
104
|
+
let e = G.value;
|
|
83
105
|
return e ? O.value.placements.filter((t) => t.fileId === e.fileId) : [];
|
|
84
|
-
}),
|
|
85
|
-
let e =
|
|
86
|
-
return e ?
|
|
87
|
-
}),
|
|
88
|
-
let e =
|
|
89
|
-
return e ?
|
|
90
|
-
}),
|
|
106
|
+
}), ot = p(() => {
|
|
107
|
+
let e = G.value;
|
|
108
|
+
return e ? T.referencePlacements.filter((t) => t.fileId === e.fileId) : [];
|
|
109
|
+
}), Z = p(() => O.value.placements.find((e) => e.id === j.value)), st = p(() => {
|
|
110
|
+
let e = Z.value;
|
|
111
|
+
return e ? d(O.value, e.fileId, e.pageIndex) ?? it.value : it.value;
|
|
112
|
+
}), ct = p(() => N.value.filter((e) => e.endsWith(":thumbnail")).map((e) => e.slice(0, -10))), lt = p(() => Object.keys(P.value).filter((e) => e.endsWith(":thumbnail")).map((e) => e.slice(0, -10))), ut = p(() => N.value.filter((e) => e.endsWith(":preview")).map((e) => e.slice(0, -8))), dt = p(() => {
|
|
91
113
|
let e = {};
|
|
92
|
-
return Object.entries(
|
|
114
|
+
return Object.entries(P.value).forEach(([t, n]) => {
|
|
93
115
|
t.endsWith(":preview") && (e[t.slice(0, -8)] = n);
|
|
94
116
|
}), e;
|
|
95
117
|
});
|
|
96
|
-
|
|
118
|
+
C(() => T.modelValue, (e) => {
|
|
97
119
|
if (!e) return;
|
|
98
|
-
let t =
|
|
99
|
-
sealSizeLimit:
|
|
100
|
-
sealTypeOptions:
|
|
120
|
+
let t = f(e, {
|
|
121
|
+
sealSizeLimit: D.value,
|
|
122
|
+
sealTypeOptions: T.sealTypeOptions
|
|
101
123
|
});
|
|
102
|
-
|
|
103
|
-
}, { deep: !0 }),
|
|
104
|
-
|
|
105
|
-
sealSizeLimit:
|
|
106
|
-
sealTypeOptions:
|
|
107
|
-
})) !==
|
|
108
|
-
}),
|
|
109
|
-
|
|
110
|
-
}),
|
|
111
|
-
|
|
112
|
-
}),
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
124
|
+
Jt(t) !== Jt(O.value) && (Wt(), O.value = t, Be.value = u(t), zt(), At(), v(() => F.value?.scrollToPage(A.value)));
|
|
125
|
+
}, { deep: !0 }), C(D, () => {
|
|
126
|
+
Jt(f(O.value, {
|
|
127
|
+
sealSizeLimit: D.value,
|
|
128
|
+
sealTypeOptions: T.sealTypeOptions
|
|
129
|
+
})) !== Jt(O.value) && Q(O.value);
|
|
130
|
+
}), C(() => T.zoom, (e) => {
|
|
131
|
+
He.value = ft(e);
|
|
132
|
+
}), C(() => G.value?.fileId, () => {
|
|
133
|
+
R.value = l(G.value) ? "loading" : "ready", Ue.value = "";
|
|
134
|
+
}), At(), C(() => [
|
|
135
|
+
T.contractId,
|
|
136
|
+
T.dataProvider,
|
|
137
|
+
T.autoLoad
|
|
116
138
|
], ([e, t, n], r) => {
|
|
117
|
-
!n || !t || !e || (!r || e !== r[0] || t !== r[1]) &&
|
|
118
|
-
}, { immediate: !0 }),
|
|
119
|
-
V = !0, B += 1,
|
|
139
|
+
!n || !t || !e || (!r || e !== r[0] || t !== r[1]) && ht();
|
|
140
|
+
}, { immediate: !0 }), xe(() => {
|
|
141
|
+
V = !0, B += 1, Ut(), Wt(), Ge?.abort(), We.dispose();
|
|
120
142
|
});
|
|
121
|
-
function
|
|
122
|
-
return n(e, Math.min(
|
|
123
|
-
}
|
|
124
|
-
function
|
|
125
|
-
let t =
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
function
|
|
129
|
-
return
|
|
130
|
-
}
|
|
131
|
-
function
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
143
|
+
function ft(e) {
|
|
144
|
+
return n(e, Math.min(T.minZoom, T.maxZoom), Math.max(T.minZoom, T.maxZoom));
|
|
145
|
+
}
|
|
146
|
+
function pt(e) {
|
|
147
|
+
let t = ft(e);
|
|
148
|
+
He.value = t, E("update:zoom", t);
|
|
149
|
+
}
|
|
150
|
+
function mt() {
|
|
151
|
+
return F.value?.fitWidth() ?? He.value;
|
|
152
|
+
}
|
|
153
|
+
function Q(e, t = {}) {
|
|
154
|
+
let n = e.files !== O.value.files;
|
|
155
|
+
O.value = f(e, {
|
|
156
|
+
sealSizeLimit: D.value,
|
|
157
|
+
sealTypeOptions: T.sealTypeOptions
|
|
158
|
+
}), t.clearError !== !1 && (M.value = ""), zt(), n && At();
|
|
159
|
+
let r = u(O.value);
|
|
160
|
+
return E("update:modelValue", r), E("change", r), r;
|
|
161
|
+
}
|
|
162
|
+
async function ht() {
|
|
163
|
+
let e = String(T.contractId || O.value.contractId || "").trim();
|
|
164
|
+
if (!T.dataProvider) return $({
|
|
142
165
|
code: "CONTRACT_PROVIDER_MISSING",
|
|
143
166
|
message: "未配置合同数据提供器,请由宿主传入文件数据"
|
|
144
167
|
}), !1;
|
|
@@ -147,49 +170,49 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
|
|
|
147
170
|
message: "缺少用于加载合同的 PaaS contractId"
|
|
148
171
|
}), !1;
|
|
149
172
|
let t = ++B;
|
|
150
|
-
|
|
173
|
+
Wt(), Ve.value = !0, M.value = "";
|
|
151
174
|
try {
|
|
152
|
-
let n = await
|
|
175
|
+
let n = await T.dataProvider.loadContract({ contractId: e });
|
|
153
176
|
if (V || t !== B) return !1;
|
|
154
|
-
let i =
|
|
177
|
+
let i = se(n, r(T.dataProvider.coordinateScale)), a = f({
|
|
155
178
|
...i,
|
|
156
179
|
contractId: e,
|
|
157
180
|
placements: i.placements.length ? i.placements : O.value.contractId === e ? O.value.placements : []
|
|
158
181
|
}, {
|
|
159
|
-
sealSizeLimit:
|
|
160
|
-
sealTypeOptions:
|
|
182
|
+
sealSizeLimit: D.value,
|
|
183
|
+
sealTypeOptions: T.sealTypeOptions
|
|
161
184
|
});
|
|
162
|
-
O.value = a,
|
|
163
|
-
let o =
|
|
164
|
-
return
|
|
185
|
+
O.value = a, Be.value = u(a), j.value = "", zt(), At();
|
|
186
|
+
let o = u(a);
|
|
187
|
+
return E("update:modelValue", o), E("change", o), E("ready", o), gt(), v(() => F.value?.scrollToPage(A.value)), o;
|
|
165
188
|
} catch (e) {
|
|
166
|
-
return V || t !== B || $(
|
|
189
|
+
return V || t !== B || $(Bt(e, "CONTRACT_LOAD_FAILED", "合同加载失败,请检查授权后重试")), !1;
|
|
167
190
|
} finally {
|
|
168
|
-
!V && t === B && (
|
|
191
|
+
!V && t === B && (Ve.value = !1);
|
|
169
192
|
}
|
|
170
193
|
}
|
|
171
|
-
async function
|
|
172
|
-
|
|
173
|
-
if (
|
|
174
|
-
let t =
|
|
175
|
-
return t && !t.thumbnailUrl ?
|
|
194
|
+
async function gt() {
|
|
195
|
+
T.dataProvider?.loadPagePreview && await Promise.allSettled(O.value.files.map((e) => {
|
|
196
|
+
if (l(e)) return Promise.resolve();
|
|
197
|
+
let t = ae(e.pages);
|
|
198
|
+
return t && !t.thumbnailUrl ? _t(e.fileId, t.pageIndex, !0) : Promise.resolve();
|
|
176
199
|
}));
|
|
177
200
|
}
|
|
178
|
-
async function
|
|
179
|
-
let i =
|
|
180
|
-
if (!i || a
|
|
181
|
-
|
|
182
|
-
let c =
|
|
201
|
+
async function _t(e, t, n) {
|
|
202
|
+
let i = T.dataProvider?.loadPagePreview, a = O.value.files.find((t) => t.fileId === e), o = d(O.value, e, t), s = Vt(e, t, n);
|
|
203
|
+
if (!i || l(a) || !o || N.value.includes(s)) return;
|
|
204
|
+
Ht(s), N.value = [...N.value, s];
|
|
205
|
+
let c = U.start(s);
|
|
183
206
|
try {
|
|
184
207
|
let a = await i({
|
|
185
|
-
contractId: O.value.contractId ||
|
|
208
|
+
contractId: O.value.contractId || T.contractId,
|
|
186
209
|
fileId: e,
|
|
187
210
|
pageIndex: t,
|
|
188
211
|
thumbnail: n,
|
|
189
212
|
signal: c.signal
|
|
190
213
|
});
|
|
191
|
-
if (V || !
|
|
192
|
-
let o =
|
|
214
|
+
if (V || !U.isCurrent(s, c) || !d(O.value, e, t)) return;
|
|
215
|
+
let o = ue(d(O.value, e, t), a, r(T.dataProvider?.coordinateScale), n), l = O.value.files.map((r) => r.fileId === e ? {
|
|
193
216
|
...r,
|
|
194
217
|
pages: r.pages.map((e) => e.pageIndex === t ? {
|
|
195
218
|
...e,
|
|
@@ -197,73 +220,73 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
|
|
|
197
220
|
...n ? { thumbnailUrl: a.url } : { previewUrl: a.url }
|
|
198
221
|
} : e)
|
|
199
222
|
} : r);
|
|
200
|
-
|
|
223
|
+
Q({
|
|
201
224
|
...O.value,
|
|
202
|
-
files:
|
|
225
|
+
files: l
|
|
203
226
|
}, { clearError: !1 });
|
|
204
227
|
} catch (n) {
|
|
205
|
-
if (!
|
|
206
|
-
let r =
|
|
228
|
+
if (!U.isCurrent(s, c) || Gt(n)) return;
|
|
229
|
+
let r = Bt(n, "CONTRACT_PREVIEW_FAILED", "合同页面预览加载失败,可切换页面或重试", {
|
|
207
230
|
fileId: e,
|
|
208
231
|
pageIndex: t
|
|
209
232
|
});
|
|
210
|
-
|
|
211
|
-
...
|
|
233
|
+
E("error", r), P.value = {
|
|
234
|
+
...P.value,
|
|
212
235
|
[s]: r.message
|
|
213
236
|
};
|
|
214
237
|
} finally {
|
|
215
|
-
|
|
238
|
+
U.finish(s, c) && (N.value = N.value.filter((e) => e !== s));
|
|
216
239
|
}
|
|
217
240
|
}
|
|
218
|
-
function
|
|
241
|
+
function vt(e) {
|
|
219
242
|
if (e === k.value) return;
|
|
220
243
|
let t = k.value;
|
|
221
|
-
|
|
244
|
+
Ut(), t && (Wt((e) => e.startsWith(`${t}:`) && e.endsWith(":preview")), H = H.filter((t) => t.fileId === e)), k.value = e, A.value = ae(O.value.files.find((t) => t.fileId === e)?.pages)?.pageIndex ?? 0, j.value = "", E("file-change", e), E("page-change", e, A.value), v(() => F.value?.scrollToPage(A.value));
|
|
222
245
|
}
|
|
223
|
-
function
|
|
246
|
+
function yt(e) {
|
|
224
247
|
A.value = e;
|
|
225
248
|
}
|
|
226
|
-
function
|
|
227
|
-
A.value !== e && (A.value = e),
|
|
249
|
+
function bt(e) {
|
|
250
|
+
A.value !== e && (A.value = e), E("page-change", k.value, e);
|
|
228
251
|
}
|
|
229
|
-
function
|
|
230
|
-
|
|
252
|
+
function xt(e) {
|
|
253
|
+
Ut();
|
|
231
254
|
let t = k.value;
|
|
232
|
-
|
|
233
|
-
|
|
255
|
+
qe = setTimeout(() => {
|
|
256
|
+
qe = void 0, k.value === t && St(t, e);
|
|
234
257
|
}, 150);
|
|
235
258
|
}
|
|
236
|
-
function
|
|
259
|
+
function St(e, t) {
|
|
237
260
|
let n = O.value.files.find((t) => t.fileId === e);
|
|
238
|
-
!n ||
|
|
261
|
+
!n || l(n) || e !== k.value || (t.forEach((e) => {
|
|
239
262
|
let t = n.pages.find((t) => t.pageIndex === e);
|
|
240
|
-
!t || t.previewUrl ||
|
|
263
|
+
!t || t.previewUrl || N.value.includes(Vt(n.fileId, e, !1)) || H.some((t) => t.fileId === n.fileId && t.pageIndex === e) || H.push({
|
|
241
264
|
fileId: n.fileId,
|
|
242
265
|
pageIndex: e
|
|
243
266
|
});
|
|
244
|
-
}),
|
|
267
|
+
}), Ct());
|
|
245
268
|
}
|
|
246
|
-
async function
|
|
269
|
+
async function Ct() {
|
|
247
270
|
let e = k.value;
|
|
248
|
-
for (
|
|
249
|
-
let t =
|
|
271
|
+
for (H = H.filter((t) => t.fileId === e); Je < 3 && H.length;) {
|
|
272
|
+
let t = H.shift();
|
|
250
273
|
if (!t || t.fileId !== e) continue;
|
|
251
|
-
let n =
|
|
252
|
-
!n ||
|
|
253
|
-
|
|
274
|
+
let n = d(O.value, t.fileId, t.pageIndex), r = O.value.files.find((e) => e.fileId === t.fileId);
|
|
275
|
+
!n || l(r) || n.previewUrl || N.value.includes(Vt(t.fileId, t.pageIndex, !1)) || (Je += 1, _t(t.fileId, t.pageIndex, !1).finally(() => {
|
|
276
|
+
Je = Math.max(0, Je - 1), Ct();
|
|
254
277
|
}));
|
|
255
278
|
}
|
|
256
279
|
}
|
|
257
|
-
function
|
|
280
|
+
function wt(e) {
|
|
258
281
|
let t = O.value.placements.find((t) => t.id === e);
|
|
259
|
-
t && (t.fileId !== k.value &&
|
|
282
|
+
t && (t.fileId !== k.value && vt(t.fileId), j.value = e, v(() => F.value?.scrollToPlacement(e)));
|
|
260
283
|
}
|
|
261
|
-
function
|
|
262
|
-
if (
|
|
263
|
-
let n = t.fileId ??
|
|
284
|
+
function Tt(e, t = {}) {
|
|
285
|
+
if (X.value || !T.allowedPlacementTypes.includes(e)) return;
|
|
286
|
+
let n = t.fileId ?? G.value?.fileId, r = t.pageIndex ?? it.value?.pageIndex;
|
|
264
287
|
if (!n || r === void 0) return;
|
|
265
|
-
let i =
|
|
266
|
-
if (!i || !
|
|
288
|
+
let i = d(O.value, n, r);
|
|
289
|
+
if (!i || !oe(i)) {
|
|
267
290
|
$({
|
|
268
291
|
code: "CONTRACT_PAGE_SIZE_INVALID",
|
|
269
292
|
message: "当前页面缺少有效的原始宽高,暂时不能添加签署位置",
|
|
@@ -272,7 +295,7 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
|
|
|
272
295
|
});
|
|
273
296
|
return;
|
|
274
297
|
}
|
|
275
|
-
let a =
|
|
298
|
+
let a = le(T.defaultSealTypes, T.sealTypeOptions);
|
|
276
299
|
if (e === "seal" && !a.length) {
|
|
277
300
|
$({
|
|
278
301
|
code: "CONTRACT_SEAL_TYPES_MISSING",
|
|
@@ -282,112 +305,161 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
|
|
|
282
305
|
});
|
|
283
306
|
return;
|
|
284
307
|
}
|
|
285
|
-
let o =
|
|
308
|
+
let o = ie(e, n, i, {
|
|
286
309
|
signLeft: t.signLeft,
|
|
287
310
|
signTop: t.signTop,
|
|
288
|
-
sizeProfile:
|
|
289
|
-
sealSizeLimit:
|
|
290
|
-
sealTypeOptions:
|
|
311
|
+
sizeProfile: T.sizeProfile,
|
|
312
|
+
sealSizeLimit: D.value,
|
|
313
|
+
sealTypeOptions: T.sealTypeOptions,
|
|
291
314
|
...e === "seal" ? { sealType: a } : {}
|
|
292
315
|
});
|
|
293
|
-
return
|
|
316
|
+
return Q({
|
|
294
317
|
...O.value,
|
|
295
318
|
placements: [...O.value.placements, o]
|
|
296
|
-
}), k.value = n, A.value = r, j.value = o.id,
|
|
319
|
+
}), k.value = n, A.value = r, j.value = o.id, qt(o);
|
|
297
320
|
}
|
|
298
|
-
function
|
|
299
|
-
|
|
321
|
+
function Et(e, t) {
|
|
322
|
+
X.value || Q({
|
|
300
323
|
...O.value,
|
|
301
324
|
placements: O.value.placements.map((n) => {
|
|
302
325
|
if (n.id !== e) return n;
|
|
303
326
|
let r = t.pageIndex === void 0 ? n.pageIndex : t.pageIndex;
|
|
304
|
-
return
|
|
305
|
-
sealSizeLimit:
|
|
306
|
-
sealTypeOptions:
|
|
327
|
+
return ce(n, t, d(O.value, n.fileId, r), {
|
|
328
|
+
sealSizeLimit: D.value,
|
|
329
|
+
sealTypeOptions: T.sealTypeOptions
|
|
307
330
|
});
|
|
308
331
|
})
|
|
309
332
|
});
|
|
310
333
|
}
|
|
311
|
-
function
|
|
312
|
-
let e =
|
|
313
|
-
if (!e ||
|
|
314
|
-
let n =
|
|
334
|
+
function Dt() {
|
|
335
|
+
let e = Z.value;
|
|
336
|
+
if (!e || X.value) return;
|
|
337
|
+
let n = d(O.value, e.fileId, e.pageIndex);
|
|
315
338
|
if (!n) return;
|
|
316
339
|
let r = t({
|
|
317
|
-
...
|
|
318
|
-
id:
|
|
340
|
+
...qt(e),
|
|
341
|
+
id: Yt(),
|
|
319
342
|
signLeft: e.signLeft + 16,
|
|
320
343
|
signTop: e.signTop + 16
|
|
321
|
-
}, n, { sealSizeLimit:
|
|
322
|
-
|
|
344
|
+
}, n, { sealSizeLimit: D.value });
|
|
345
|
+
Q({
|
|
323
346
|
...O.value,
|
|
324
347
|
placements: [...O.value.placements, r]
|
|
325
348
|
}), j.value = r.id;
|
|
326
349
|
}
|
|
327
|
-
function
|
|
328
|
-
|
|
350
|
+
function Ot(e) {
|
|
351
|
+
X.value || (Q({
|
|
329
352
|
...O.value,
|
|
330
353
|
placements: O.value.placements.filter((t) => t.id !== e)
|
|
331
354
|
}), j.value === e && (j.value = ""));
|
|
332
355
|
}
|
|
333
|
-
function
|
|
334
|
-
let
|
|
335
|
-
return
|
|
356
|
+
function kt(e) {
|
|
357
|
+
let t = O.value.files.find((t) => t.fileId === e.fileId)?.fileName, n = o(e, "generate")[0] ?? "合同排版校验未通过";
|
|
358
|
+
return t ? `${t}:${n}` : n;
|
|
359
|
+
}
|
|
360
|
+
function At() {
|
|
361
|
+
Ge?.abort();
|
|
362
|
+
let e = ++Ke, t = [];
|
|
363
|
+
for (let e of O.value.files) ee(e.source) && t.push({
|
|
364
|
+
fileId: e.fileId,
|
|
365
|
+
template: e.source.template,
|
|
366
|
+
...e.source.values ? { values: e.source.values } : {},
|
|
367
|
+
layoutPages: c(e.fileId, e.source)
|
|
368
|
+
});
|
|
369
|
+
if (!t.length) {
|
|
370
|
+
Ge = void 0, z.value = {
|
|
371
|
+
status: "ready",
|
|
372
|
+
issues: [],
|
|
373
|
+
messages: []
|
|
374
|
+
};
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
let n = new AbortController();
|
|
378
|
+
Ge = n, z.value = {
|
|
379
|
+
status: "checking",
|
|
380
|
+
issues: [],
|
|
381
|
+
messages: []
|
|
382
|
+
}, We.check(t, { signal: n.signal }).then((t) => {
|
|
383
|
+
V || e !== Ke || (z.value = t.length ? {
|
|
384
|
+
status: "error",
|
|
385
|
+
issues: t,
|
|
386
|
+
messages: t.map((e) => kt(e))
|
|
387
|
+
} : {
|
|
388
|
+
status: "ready",
|
|
389
|
+
issues: [],
|
|
390
|
+
messages: []
|
|
391
|
+
});
|
|
392
|
+
}, (t) => {
|
|
393
|
+
V || e !== Ke || s(t) || (z.value = {
|
|
394
|
+
status: "error",
|
|
395
|
+
issues: [],
|
|
396
|
+
messages: ["合同排版校验失败,请刷新后重试"]
|
|
397
|
+
});
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
function jt() {
|
|
401
|
+
let e = de(O.value, { allowedSealTypes: T.sealTypeOptions.map((e) => e.value) });
|
|
402
|
+
return [...K.value && !q.value ? [...e, {
|
|
336
403
|
code: "CONTRACT_TEMPLATE_FONT_UNAVAILABLE",
|
|
337
|
-
message:
|
|
338
|
-
}] : e;
|
|
404
|
+
message: Lt()
|
|
405
|
+
}] : e, ...J.value];
|
|
339
406
|
}
|
|
340
|
-
function
|
|
341
|
-
return
|
|
407
|
+
function Mt() {
|
|
408
|
+
return u(O.value);
|
|
342
409
|
}
|
|
343
|
-
function
|
|
344
|
-
if (q.value) throw new
|
|
410
|
+
function Nt() {
|
|
411
|
+
if (q.value) throw new te(J.value);
|
|
412
|
+
if (K.value) throw new te([{
|
|
345
413
|
code: "CONTRACT_TEMPLATE_FONT_UNAVAILABLE",
|
|
346
|
-
message:
|
|
414
|
+
message: Lt()
|
|
347
415
|
}]);
|
|
348
|
-
|
|
416
|
+
if (J.value.length) throw new te(J.value);
|
|
417
|
+
return ne(Mt(), { allowedSealTypes: T.sealTypeOptions.map((e) => e.value) });
|
|
349
418
|
}
|
|
350
|
-
function
|
|
351
|
-
if (q.value)
|
|
352
|
-
|
|
419
|
+
function Pt() {
|
|
420
|
+
if (q.value) return $(J.value[0]), !1;
|
|
421
|
+
if (K.value) {
|
|
422
|
+
let e = Lt();
|
|
353
423
|
return console.error("[GD-SIGN-COORD]", e), $({
|
|
354
424
|
code: "CONTRACT_TEMPLATE_FONT_UNAVAILABLE",
|
|
355
|
-
message:
|
|
425
|
+
message: Y.value || e
|
|
356
426
|
}), !1;
|
|
357
427
|
}
|
|
428
|
+
let e = J.value;
|
|
429
|
+
if (e.length) return e[0].code !== "CONTRACT_LAYOUT_CHECKING" && console.error("[GD-SIGN-COORD]", e.map((e) => e.message).join(";")), $(e[0]), !1;
|
|
358
430
|
try {
|
|
359
|
-
let e =
|
|
360
|
-
return
|
|
431
|
+
let e = Nt();
|
|
432
|
+
return M.value = "", E("submit", e), e;
|
|
361
433
|
} catch (e) {
|
|
362
|
-
return $(e instanceof
|
|
434
|
+
return $(e instanceof te ? {
|
|
363
435
|
...e.errors[0],
|
|
364
436
|
cause: e
|
|
365
|
-
} :
|
|
437
|
+
} : Bt(e, "CONTRACT_SIGNING_LOCATION_INVALID", "指定签署位置数据不完整")), !1;
|
|
366
438
|
}
|
|
367
439
|
}
|
|
368
|
-
function
|
|
369
|
-
|
|
440
|
+
function Ft(e, t) {
|
|
441
|
+
R.value = e, Ue.value = e === "error" ? t || "合同排版度量校验失败" : "";
|
|
370
442
|
}
|
|
371
|
-
function
|
|
443
|
+
function It(e) {
|
|
372
444
|
let t = e.match(/第\s*(\d+)\s*页正文超出纸张/);
|
|
373
|
-
return t ? `第 ${t[1]} 页正文超出纸张,请回模板设计器调整后重试` : e.includes("合同排版度量不一致") ? "当前浏览器的字体宽度与签署坐标要求不一致。请把缩放调回 100%,使用 Chrome 或 Edge,并确认已安装宋体和 Times New Roman(或 Liberation Serif)后刷新。缩放和字体都正常时,请联系管理员核对本机字体度量。" : e.includes("超时") ? "合同排版校验超时。请刷新后重试;仍失败时请关闭拦截字体的扩展,或改用 Chrome、Edge。" : e.includes("合同打印页节点不存在") ? "合同底图没有加载完整。请刷新后重新打开这份模板。" : "合同排版校验未通过。请刷新后重试;若反复出现,请让管理员查看控制台中以 [GD-SIGN-COORD] 开头的记录。";
|
|
445
|
+
return t ? `第 ${t[1]} 页正文超出纸张,请回模板设计器调整后重试` : e.includes("合同排版度量不一致") ? "当前浏览器的字体宽度与签署坐标要求不一致。请把缩放调回 100%,使用 Chrome 或 Edge,并确认已安装宋体和 Times New Roman(或 Liberation Serif)后刷新。缩放和字体都正常时,请联系管理员核对本机字体度量。" : e.includes("超时") ? "合同排版校验超时。请刷新后重试;仍失败时请关闭拦截字体的扩展,或改用 Chrome、Edge。" : e.includes("合同打印页节点不存在") ? "合同底图没有加载完整。请刷新后重新打开这份模板。" : e.includes("合同图片加载失败") ? "合同底图中有图片未能加载。请确认图片地址可以正常访问,刷新后重新打开这份模板。" : e.includes("无法确认排版") ? `${e}。请刷新后重试;仍失败时请让管理员查看控制台中以 [GD-SIGN-COORD] 开头的记录。` : "合同排版校验未通过。请刷新后重试;若反复出现,请让管理员查看控制台中以 [GD-SIGN-COORD] 开头的记录。";
|
|
374
446
|
}
|
|
375
|
-
function
|
|
376
|
-
return
|
|
447
|
+
function Lt() {
|
|
448
|
+
return R.value === "error" ? Ue.value || "合同排版度量校验失败,禁止生成签署坐标" : "合同排版度量校验中,请稍后再保存签署坐标";
|
|
377
449
|
}
|
|
378
|
-
function
|
|
379
|
-
if (
|
|
380
|
-
let e =
|
|
381
|
-
return j.value = "",
|
|
450
|
+
function Rt() {
|
|
451
|
+
if (X.value) return u(O.value);
|
|
452
|
+
let e = Q(u(Be.value));
|
|
453
|
+
return j.value = "", zt(!0), v(() => F.value?.scrollToPage(A.value)), e;
|
|
382
454
|
}
|
|
383
|
-
function
|
|
455
|
+
function zt(e = !1) {
|
|
384
456
|
let t = (e ? void 0 : O.value.files.find((e) => e.fileId === k.value)) ?? O.value.files[0];
|
|
385
457
|
k.value = t?.fileId ?? "", A.value = ((e ? void 0 : t?.pages.find((e) => e.pageIndex === A.value)) ?? t?.pages[0])?.pageIndex ?? 0, O.value.placements.some((e) => e.id === j.value) || (j.value = "");
|
|
386
458
|
}
|
|
387
459
|
function $(e) {
|
|
388
|
-
|
|
460
|
+
M.value = e.message, E("error", e);
|
|
389
461
|
}
|
|
390
|
-
function
|
|
462
|
+
function Bt(e, t, n, r = {}) {
|
|
391
463
|
let i = typeof e == "object" && e && "status" in e ? Number(e.status) : void 0;
|
|
392
464
|
return {
|
|
393
465
|
code: t,
|
|
@@ -396,170 +468,172 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
|
|
|
396
468
|
cause: e
|
|
397
469
|
};
|
|
398
470
|
}
|
|
399
|
-
function
|
|
471
|
+
function Vt(e, t, n) {
|
|
400
472
|
return `${e}:${t}:${n ? "thumbnail" : "preview"}`;
|
|
401
473
|
}
|
|
402
|
-
function
|
|
403
|
-
if (!(e in
|
|
404
|
-
let t = { ...
|
|
405
|
-
delete t[e],
|
|
474
|
+
function Ht(e) {
|
|
475
|
+
if (!(e in P.value)) return;
|
|
476
|
+
let t = { ...P.value };
|
|
477
|
+
delete t[e], P.value = t;
|
|
406
478
|
}
|
|
407
|
-
function
|
|
408
|
-
|
|
479
|
+
function Ut() {
|
|
480
|
+
qe &&= (clearTimeout(qe), void 0);
|
|
409
481
|
}
|
|
410
|
-
function
|
|
411
|
-
let t = e ?? (() => !0), n = new Set(
|
|
412
|
-
n.size && (
|
|
482
|
+
function Wt(e) {
|
|
483
|
+
let t = e ?? (() => !0), n = new Set(U.abort(t));
|
|
484
|
+
n.size && (N.value = N.value.filter((e) => !n.has(e))), e || (H = []);
|
|
413
485
|
}
|
|
414
|
-
function
|
|
486
|
+
function Gt(e) {
|
|
415
487
|
return !!(e && typeof e == "object" && "cancelled" in e && e.cancelled) || e instanceof DOMException && e.name === "AbortError";
|
|
416
488
|
}
|
|
417
|
-
function
|
|
418
|
-
let t =
|
|
419
|
-
t &&
|
|
489
|
+
function Kt(e) {
|
|
490
|
+
let t = G.value;
|
|
491
|
+
t && _t(t.fileId, e, !1);
|
|
420
492
|
}
|
|
421
|
-
function
|
|
493
|
+
function qt(e) {
|
|
422
494
|
return {
|
|
423
495
|
...e,
|
|
424
496
|
sealType: e.sealType ? [...e.sealType] : void 0
|
|
425
497
|
};
|
|
426
498
|
}
|
|
427
|
-
function
|
|
499
|
+
function Jt(e) {
|
|
428
500
|
return JSON.stringify(e);
|
|
429
501
|
}
|
|
430
|
-
function
|
|
502
|
+
function Yt() {
|
|
431
503
|
return typeof crypto < "u" && "randomUUID" in crypto ? `contract-signing-placement-${crypto.randomUUID()}` : `contract-signing-placement-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
432
504
|
}
|
|
433
|
-
function
|
|
505
|
+
function Xt(e) {
|
|
434
506
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return { "--gd-ant-contract-signing-location-height": `${e}px` };
|
|
435
507
|
if (typeof e == "string" && e.trim()) return { "--gd-ant-contract-signing-location-height": e.trim() };
|
|
436
508
|
}
|
|
437
|
-
return
|
|
438
|
-
load:
|
|
439
|
-
validate:
|
|
440
|
-
getValue:
|
|
441
|
-
getOutput:
|
|
442
|
-
submit:
|
|
443
|
-
reset:
|
|
444
|
-
addPlacement:
|
|
445
|
-
removePlacement:
|
|
446
|
-
fitWidth:
|
|
447
|
-
}), (t, n) => (
|
|
448
|
-
class:
|
|
449
|
-
"is-readonly":
|
|
509
|
+
return ve({
|
|
510
|
+
load: ht,
|
|
511
|
+
validate: jt,
|
|
512
|
+
getValue: Mt,
|
|
513
|
+
getOutput: Nt,
|
|
514
|
+
submit: Pt,
|
|
515
|
+
reset: Rt,
|
|
516
|
+
addPlacement: Tt,
|
|
517
|
+
removePlacement: Ot,
|
|
518
|
+
fitWidth: mt
|
|
519
|
+
}), (t, n) => (y(), ge("section", {
|
|
520
|
+
class: ye(["gd-ant-contract-signing-location", {
|
|
521
|
+
"is-readonly": Ye.value,
|
|
450
522
|
"is-disabled": e.disabled,
|
|
451
|
-
"is-preview":
|
|
523
|
+
"is-preview": W.value
|
|
452
524
|
}]),
|
|
453
|
-
style:
|
|
525
|
+
style: be($e.value)
|
|
454
526
|
}, [
|
|
455
|
-
|
|
527
|
+
g("header", Oe, [g("div", ke, [n[6] ||= g("span", {
|
|
456
528
|
class: "gd-ant-contract-signing-location__title-bar",
|
|
457
529
|
"aria-hidden": "true"
|
|
458
|
-
}, null, -1),
|
|
459
|
-
|
|
460
|
-
e.dataProvider ? (
|
|
530
|
+
}, null, -1), g("div", null, [g("strong", null, Se(W.value ? "合同预览" : "指定合同签署位置"), 1)])]), g("div", Ae, [
|
|
531
|
+
g("span", je, Se(O.value.placements.length) + " 个位置", 1),
|
|
532
|
+
e.dataProvider ? (y(), m(S(Ce), {
|
|
461
533
|
key: 0,
|
|
462
|
-
loading:
|
|
463
|
-
onClick:
|
|
534
|
+
loading: Ve.value,
|
|
535
|
+
onClick: ht
|
|
464
536
|
}, {
|
|
465
|
-
default:
|
|
537
|
+
default: w(() => [_(S(Ee), { "aria-hidden": "true" }), n[7] ||= _e(" 重新加载 ", -1)]),
|
|
466
538
|
_: 1
|
|
467
|
-
}, 8, ["loading"])) :
|
|
468
|
-
|
|
539
|
+
}, 8, ["loading"])) : h("", !0),
|
|
540
|
+
W.value ? h("", !0) : (y(), m(S(Ce), {
|
|
469
541
|
key: 1,
|
|
470
|
-
disabled:
|
|
471
|
-
onClick:
|
|
542
|
+
disabled: X.value,
|
|
543
|
+
onClick: Rt
|
|
472
544
|
}, {
|
|
473
|
-
default:
|
|
545
|
+
default: w(() => [...n[8] ||= [_e("重置", -1)]]),
|
|
474
546
|
_: 1
|
|
475
547
|
}, 8, ["disabled"])),
|
|
476
|
-
|
|
548
|
+
Ze.value ? (y(), m(S(Ce), {
|
|
477
549
|
key: 2,
|
|
478
550
|
type: "primary",
|
|
479
|
-
loading:
|
|
480
|
-
disabled: e.disabled || q.value,
|
|
481
|
-
onClick:
|
|
551
|
+
loading: Ve.value || q.value,
|
|
552
|
+
disabled: e.disabled || K.value || q.value,
|
|
553
|
+
onClick: Pt
|
|
482
554
|
}, {
|
|
483
|
-
default:
|
|
555
|
+
default: w(() => [...n[9] ||= [_e("确认并生成规则", -1)]]),
|
|
484
556
|
_: 1
|
|
485
|
-
}, 8, ["loading", "disabled"])) :
|
|
557
|
+
}, 8, ["loading", "disabled"])) : h("", !0)
|
|
486
558
|
])]),
|
|
487
|
-
|
|
559
|
+
nt.value ? (y(), ge("div", Me, [g("span", null, Se(nt.value), 1), rt.value ? (y(), m(S(Ce), {
|
|
488
560
|
key: 0,
|
|
489
561
|
type: "link",
|
|
490
562
|
size: "small",
|
|
491
|
-
onClick:
|
|
563
|
+
onClick: ht
|
|
492
564
|
}, {
|
|
493
|
-
default:
|
|
565
|
+
default: w(() => [...n[10] ||= [_e("重试", -1)]]),
|
|
494
566
|
_: 1
|
|
495
|
-
})) :
|
|
496
|
-
|
|
497
|
-
"is-single-file":
|
|
498
|
-
"is-inspector-hidden": !
|
|
567
|
+
})) : h("", !0)])) : h("", !0),
|
|
568
|
+
g("div", { class: ye(["gd-ant-contract-signing-location__body", {
|
|
569
|
+
"is-single-file": Qe.value,
|
|
570
|
+
"is-inspector-hidden": !Xe.value
|
|
499
571
|
}]) }, [
|
|
500
|
-
|
|
572
|
+
Qe.value ? h("", !0) : (y(), ge("div", {
|
|
501
573
|
key: 0,
|
|
502
|
-
class:
|
|
503
|
-
}, [
|
|
504
|
-
default:
|
|
574
|
+
class: ye(["gd-ant-contract-signing-location__navigator-wrap", { "is-collapsed": L.value }])
|
|
575
|
+
}, [_(S(we), { title: L.value ? "展开页面栏" : "收起页面栏" }, {
|
|
576
|
+
default: w(() => [g("button", {
|
|
505
577
|
type: "button",
|
|
506
578
|
class: "gd-ant-contract-signing-location__panel-handle",
|
|
507
|
-
"aria-label":
|
|
508
|
-
"aria-expanded": !
|
|
509
|
-
onClick: n[0] ||= (e) =>
|
|
510
|
-
}, [
|
|
579
|
+
"aria-label": L.value ? "展开页面栏" : "收起页面栏",
|
|
580
|
+
"aria-expanded": !L.value,
|
|
581
|
+
onClick: n[0] ||= (e) => L.value = !L.value
|
|
582
|
+
}, [L.value ? (y(), m(S(De), {
|
|
511
583
|
key: 0,
|
|
512
584
|
"aria-hidden": "true"
|
|
513
|
-
})) : (
|
|
585
|
+
})) : (y(), m(S(Te), {
|
|
514
586
|
key: 1,
|
|
515
587
|
"aria-hidden": "true"
|
|
516
|
-
}))], 8,
|
|
588
|
+
}))], 8, Ne)]),
|
|
517
589
|
_: 1
|
|
518
|
-
}, 8, ["title"]),
|
|
590
|
+
}, 8, ["title"]), g("div", Pe, [_(me, {
|
|
519
591
|
files: O.value.files,
|
|
520
592
|
"active-file-id": k.value,
|
|
521
|
-
"loading-preview-keys":
|
|
522
|
-
"error-preview-keys":
|
|
523
|
-
onSelect:
|
|
593
|
+
"loading-preview-keys": ct.value,
|
|
594
|
+
"error-preview-keys": lt.value,
|
|
595
|
+
onSelect: vt
|
|
524
596
|
}, null, 8, [
|
|
525
597
|
"files",
|
|
526
598
|
"active-file-id",
|
|
527
599
|
"loading-preview-keys",
|
|
528
600
|
"error-preview-keys"
|
|
529
601
|
])])], 2)),
|
|
530
|
-
|
|
602
|
+
_(fe, {
|
|
531
603
|
ref_key: "canvasRef",
|
|
532
|
-
ref:
|
|
533
|
-
file:
|
|
534
|
-
pages:
|
|
535
|
-
placements:
|
|
536
|
-
"reference-placements":
|
|
604
|
+
ref: F,
|
|
605
|
+
file: G.value,
|
|
606
|
+
pages: G.value?.pages ?? [],
|
|
607
|
+
placements: at.value,
|
|
608
|
+
"reference-placements": ot.value,
|
|
537
609
|
"selected-placement-id": j.value,
|
|
538
|
-
readonly:
|
|
610
|
+
readonly: X.value,
|
|
539
611
|
resizable: e.resizable,
|
|
540
|
-
"seal-size-limit":
|
|
612
|
+
"seal-size-limit": D.value,
|
|
541
613
|
"seal-type-options": e.sealTypeOptions,
|
|
542
|
-
zoom:
|
|
543
|
-
"preview-loading-keys":
|
|
544
|
-
"preview-error-map":
|
|
614
|
+
zoom: He.value,
|
|
615
|
+
"preview-loading-keys": ut.value,
|
|
616
|
+
"preview-error-map": dt.value,
|
|
545
617
|
"active-page-index": A.value,
|
|
546
618
|
"min-zoom": e.minZoom,
|
|
547
619
|
"max-zoom": e.maxZoom,
|
|
548
620
|
"font-base-url": e.contractFontBaseUrl,
|
|
621
|
+
"layout-issues": et.value,
|
|
622
|
+
"layout-checking": q.value,
|
|
549
623
|
onSelect: n[1] ||= (e) => j.value = e,
|
|
550
|
-
onRetry:
|
|
551
|
-
onAdd: n[2] ||= (e, t, n, r) =>
|
|
624
|
+
onRetry: Kt,
|
|
625
|
+
onAdd: n[2] ||= (e, t, n, r) => Tt(e, {
|
|
552
626
|
signLeft: t,
|
|
553
627
|
signTop: n,
|
|
554
628
|
pageIndex: r
|
|
555
629
|
}),
|
|
556
|
-
onUpdate: n[3] ||= (e) =>
|
|
557
|
-
onRemove:
|
|
558
|
-
onVisiblePages:
|
|
559
|
-
onViewPage:
|
|
560
|
-
onPageChange:
|
|
561
|
-
onZoomChange:
|
|
562
|
-
onTemplateStatus:
|
|
630
|
+
onUpdate: n[3] ||= (e) => Et(e.id, e),
|
|
631
|
+
onRemove: Ot,
|
|
632
|
+
onVisiblePages: xt,
|
|
633
|
+
onViewPage: yt,
|
|
634
|
+
onPageChange: bt,
|
|
635
|
+
onZoomChange: pt,
|
|
636
|
+
onTemplateStatus: Ft
|
|
563
637
|
}, null, 8, [
|
|
564
638
|
"file",
|
|
565
639
|
"pages",
|
|
@@ -576,42 +650,44 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
|
|
|
576
650
|
"active-page-index",
|
|
577
651
|
"min-zoom",
|
|
578
652
|
"max-zoom",
|
|
579
|
-
"font-base-url"
|
|
653
|
+
"font-base-url",
|
|
654
|
+
"layout-issues",
|
|
655
|
+
"layout-checking"
|
|
580
656
|
]),
|
|
581
|
-
|
|
657
|
+
Xe.value ? (y(), ge("div", {
|
|
582
658
|
key: 1,
|
|
583
|
-
class:
|
|
584
|
-
}, [
|
|
585
|
-
default:
|
|
659
|
+
class: ye(["gd-ant-contract-signing-location__inspector-wrap", { "is-collapsed": I.value }])
|
|
660
|
+
}, [_(S(we), { title: I.value ? "展开属性栏" : "收起属性栏" }, {
|
|
661
|
+
default: w(() => [g("button", {
|
|
586
662
|
type: "button",
|
|
587
663
|
class: "gd-ant-contract-signing-location__panel-handle",
|
|
588
|
-
"aria-label":
|
|
589
|
-
"aria-expanded": !
|
|
590
|
-
onClick: n[4] ||= (e) =>
|
|
591
|
-
}, [
|
|
664
|
+
"aria-label": I.value ? "展开属性栏" : "收起属性栏",
|
|
665
|
+
"aria-expanded": !I.value,
|
|
666
|
+
onClick: n[4] ||= (e) => I.value = !I.value
|
|
667
|
+
}, [I.value ? (y(), m(S(Te), {
|
|
592
668
|
key: 0,
|
|
593
669
|
"aria-hidden": "true"
|
|
594
|
-
})) : (
|
|
670
|
+
})) : (y(), m(S(De), {
|
|
595
671
|
key: 1,
|
|
596
672
|
"aria-hidden": "true"
|
|
597
|
-
}))], 8,
|
|
673
|
+
}))], 8, Fe)]),
|
|
598
674
|
_: 1
|
|
599
|
-
}, 8, ["title"]),
|
|
600
|
-
placement:
|
|
601
|
-
page:
|
|
602
|
-
pages:
|
|
603
|
-
placements:
|
|
604
|
-
readonly:
|
|
675
|
+
}, 8, ["title"]), g("div", Ie, [_(pe, {
|
|
676
|
+
placement: Z.value,
|
|
677
|
+
page: st.value,
|
|
678
|
+
pages: G.value?.pages ?? [],
|
|
679
|
+
placements: at.value,
|
|
680
|
+
readonly: X.value,
|
|
605
681
|
resizable: e.resizable,
|
|
606
|
-
"seal-size-limit":
|
|
682
|
+
"seal-size-limit": D.value,
|
|
607
683
|
"seal-type-options": e.sealTypeOptions,
|
|
608
684
|
"allowed-placement-types": e.allowedPlacementTypes,
|
|
609
685
|
"size-profile": e.sizeProfile,
|
|
610
|
-
onAdd:
|
|
611
|
-
onUpdate: n[5] ||= (e) =>
|
|
612
|
-
onDuplicate:
|
|
613
|
-
onRemove:
|
|
614
|
-
onLocate:
|
|
686
|
+
onAdd: Tt,
|
|
687
|
+
onUpdate: n[5] ||= (e) => Z.value && Et(Z.value.id, e),
|
|
688
|
+
onDuplicate: Dt,
|
|
689
|
+
onRemove: Ot,
|
|
690
|
+
onLocate: wt
|
|
615
691
|
}, null, 8, [
|
|
616
692
|
"placement",
|
|
617
693
|
"page",
|
|
@@ -623,10 +699,10 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
|
|
|
623
699
|
"seal-type-options",
|
|
624
700
|
"allowed-placement-types",
|
|
625
701
|
"size-profile"
|
|
626
|
-
])])], 2)) :
|
|
702
|
+
])])], 2)) : h("", !0)
|
|
627
703
|
], 2)
|
|
628
704
|
], 6));
|
|
629
705
|
}
|
|
630
706
|
});
|
|
631
707
|
//#endregion
|
|
632
|
-
export {
|
|
708
|
+
export { Re as default };
|