@shaonq/vue 1.4.2 → 1.4.3
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/lib/index.d.ts +37 -39
- package/lib/index.js +1 -4150
- package/lib/style.css +630 -1
- package/package.json +37 -35
package/lib/index.js
CHANGED
|
@@ -1,4150 +1 @@
|
|
|
1
|
-
import Yt from "vxe-table";
|
|
2
|
-
import "vxe-table/lib/style.css";
|
|
3
|
-
import { ref as N, inject as bt, defineComponent as ve, computed as de, shallowRef as Zt, watch as Ae, onUnmounted as tt, resolveComponent as b, openBlock as _, createElementBlock as q, createBlock as R, withCtx as c, renderSlot as Q, createElementVNode as o, toDisplayString as oe, createVNode as s, createTextVNode as $, unref as w, createCommentVNode as ae, mergeProps as I, Fragment as _e, renderList as $e, resolveDynamicComponent as Ve, normalizeStyle as ye, normalizeProps as He, guardReactiveProps as ht, toRefs as Ft, normalizeClass as Xt, onMounted as Ne, reactive as Ct, provide as Et, useAttrs as Qt, createSlots as ot, Teleport as wt, isRef as eo, markRaw as to, defineAsyncComponent as oo, toRef as no, Transition as lo, withDirectives as kt, vShow as At, withModifiers as dt, h as ct, nextTick as uo } from "vue";
|
|
4
|
-
import Ie from "xe-utils";
|
|
5
|
-
import io from "vuedraggable";
|
|
6
|
-
import { Message as so, Modal as xt, Button as ao, useFormItem as ro, Icon as co } from "@arco-design/web-vue";
|
|
7
|
-
import fo from "quill";
|
|
8
|
-
import "quill/dist/quill.core.css";
|
|
9
|
-
import "quill/dist/quill.snow.css";
|
|
10
|
-
import po from "bwip-js";
|
|
11
|
-
import mo from "jspdf";
|
|
12
|
-
import { snapdom as go } from "@zumer/snapdom";
|
|
13
|
-
import { formItemInjectionKey as ft } from "@arco-design/web-vue/es/form/context";
|
|
14
|
-
import { hiprint as Se, hinnn as Be } from "@shaonq/hiprint";
|
|
15
|
-
import { hiprint as fu } from "@shaonq/hiprint";
|
|
16
|
-
import "@shaonq/hiprint/dist/style.css";
|
|
17
|
-
import Oe from "jquery";
|
|
18
|
-
import pt from "@scena/guides";
|
|
19
|
-
import { defineStore as vo } from "pinia";
|
|
20
|
-
function we(e) {
|
|
21
|
-
return typeof e == "function";
|
|
22
|
-
}
|
|
23
|
-
function je(e, l) {
|
|
24
|
-
var n;
|
|
25
|
-
const t = (n = e[l.dataIndex]) != null ? n : "";
|
|
26
|
-
return l.format && we(l.format) ? l.format(t, e) : t;
|
|
27
|
-
}
|
|
28
|
-
function Je(e, l) {
|
|
29
|
-
return we(l.style) ? l.style(e) : { ...l.style };
|
|
30
|
-
}
|
|
31
|
-
function Xe(e) {
|
|
32
|
-
return (e == null ? void 0 : e.rowKey) || "_X_ROW_KEY";
|
|
33
|
-
}
|
|
34
|
-
function _o(e, l) {
|
|
35
|
-
return { disabledList: N({
|
|
36
|
-
highlight: !0,
|
|
37
|
-
reserve: e.option.reserve,
|
|
38
|
-
trigger: e.option.selectedTrigger,
|
|
39
|
-
checkMethod: ({ row: r }) => !r.disabled
|
|
40
|
-
}), selectChangeEvent: ({ $table: r, checked: i, row: f }) => {
|
|
41
|
-
if (e.option.selectedType !== "checkbox")
|
|
42
|
-
return;
|
|
43
|
-
const { option: E } = e, { fullData: y } = r.getTableData();
|
|
44
|
-
if (f && E.checkboxKey) {
|
|
45
|
-
const h = E.checkboxKey, S = y.filter((M) => M[h] && M[h] === f[h]);
|
|
46
|
-
S.length && r.setCheckboxRow(S, i);
|
|
47
|
-
}
|
|
48
|
-
const d = r.getCheckboxRecords().concat(r.getCheckboxReserveRecords()), x = Xe(e.option);
|
|
49
|
-
x && l(
|
|
50
|
-
"update:selectedKeys",
|
|
51
|
-
d.map((h) => h[x])
|
|
52
|
-
);
|
|
53
|
-
}, radioChangeEvent: ({ row: r }) => {
|
|
54
|
-
if (e.option.selectedType !== "radio")
|
|
55
|
-
return;
|
|
56
|
-
const i = [r], f = Xe(e.option);
|
|
57
|
-
f && l(
|
|
58
|
-
"update:selectedKeys",
|
|
59
|
-
i.map((E) => E[f])
|
|
60
|
-
);
|
|
61
|
-
} };
|
|
62
|
-
}
|
|
63
|
-
const Z = N(/* @__PURE__ */ Object.create({}));
|
|
64
|
-
function Bt(e) {
|
|
65
|
-
const l = {
|
|
66
|
-
...e,
|
|
67
|
-
ref: (n) => {
|
|
68
|
-
n && (Z.value = n);
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
return {
|
|
72
|
-
tableOption: l,
|
|
73
|
-
$grid: Z,
|
|
74
|
-
$gridTwo: {
|
|
75
|
-
getRowKey() {
|
|
76
|
-
return Xe(e);
|
|
77
|
-
},
|
|
78
|
-
getRowIndex(n) {
|
|
79
|
-
return Z.value.getRowIndex(n);
|
|
80
|
-
},
|
|
81
|
-
getRowSeq(n) {
|
|
82
|
-
return Z.value.getRowSeq(n);
|
|
83
|
-
},
|
|
84
|
-
getTableData() {
|
|
85
|
-
var n, u;
|
|
86
|
-
return Z.value ? (u = (n = Z.value) == null ? void 0 : n.getTableData().fullData) != null ? u : [] : [];
|
|
87
|
-
},
|
|
88
|
-
setSelectionRow(n, u = !0) {
|
|
89
|
-
Z.value && (l.selectedType === "checkbox" && Z.value.setCheckboxRow(n, u), l.selectedType === "radio" && Z.value.setRadioRow(n));
|
|
90
|
-
},
|
|
91
|
-
getSelection() {
|
|
92
|
-
return Z.value ? l.selectedType === "checkbox" ? Z.value.getCheckboxRecords() : l.selectedType === "radio" ? [Z.value.getRadioRecord()] : [] : [];
|
|
93
|
-
},
|
|
94
|
-
getReserveSelection() {
|
|
95
|
-
if (Z.value) {
|
|
96
|
-
if (l.selectedType === "checkbox") {
|
|
97
|
-
const n = Z.value.getCheckboxRecords();
|
|
98
|
-
return e.reserve ? n.concat(Z.value.getCheckboxReserveRecords()) : n;
|
|
99
|
-
}
|
|
100
|
-
if (l.selectedType === "radio") {
|
|
101
|
-
let n = Z.value.getRadioRecord();
|
|
102
|
-
return e.reserve && !n && (n = Z.value.getRadioReserveRecord()), n ? [n] : [];
|
|
103
|
-
}
|
|
104
|
-
return [];
|
|
105
|
-
}
|
|
106
|
-
return [];
|
|
107
|
-
},
|
|
108
|
-
getCheckboxKeySelection(n) {
|
|
109
|
-
const u = e.checkboxKey;
|
|
110
|
-
return n || (n = this.getSelection().map((i) => i[u])), this.getTableData().filter((i) => n && n.includes(i[u]));
|
|
111
|
-
},
|
|
112
|
-
clearSelection() {
|
|
113
|
-
Z.value && (l.selectedType === "checkbox" && (e.reserve && Z.value.clearCheckboxReserve(), Z.value.clearCheckboxRow()), l.selectedType === "radio" && (e.reserve && Z.value.clearRadioReserve(), Z.value.clearRadioRow()));
|
|
114
|
-
},
|
|
115
|
-
insertRow(n, u, r = !0) {
|
|
116
|
-
var E;
|
|
117
|
-
const i = this.getRowKey();
|
|
118
|
-
if (u && typeof u == "object" && r) {
|
|
119
|
-
const y = Z.value.getRowIndex(u);
|
|
120
|
-
y >= 0 && (u = (E = this.getTableData()[y + 1]) != null ? E : -1);
|
|
121
|
-
}
|
|
122
|
-
return n[i] && delete n[i], Z.value.insertAt(n, u);
|
|
123
|
-
},
|
|
124
|
-
removeRows() {
|
|
125
|
-
Z.value && (l.selectedType === "checkbox" && Z.value.removeCheckboxRow(), l.selectedType === "radio" && Z.value.removeRadioRow());
|
|
126
|
-
},
|
|
127
|
-
removerRowIndex(n) {
|
|
128
|
-
if (Z.value) {
|
|
129
|
-
const u = this.getTableData();
|
|
130
|
-
u.splice(n, 1), Z.value.reloadData(u);
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
async validate(n = void 0) {
|
|
134
|
-
n = n != null ? n : this.getSelection();
|
|
135
|
-
let u = "";
|
|
136
|
-
const r = await Z.value.validate(n);
|
|
137
|
-
return r && Object.values(r).forEach((i) => {
|
|
138
|
-
i.forEach(({ rowIndex: f, column: E, rules: y }) => {
|
|
139
|
-
y.forEach((d) => {
|
|
140
|
-
u = `\u5E8F\u53F7${f + 1} ${E.title} ${d.message}`;
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
}), [u, n];
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
const Dt = Symbol("OrcConfigProvider");
|
|
149
|
-
function yo() {
|
|
150
|
-
return bt(Dt, {
|
|
151
|
-
useErrData: void 0
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
const mt = {
|
|
155
|
-
"zh-CN": {
|
|
156
|
-
stripedTable: "\u8868\u683C\u6591\u9A6C\u7EB9",
|
|
157
|
-
refresh: "\u5237\u65B0",
|
|
158
|
-
settings: "\u8BBE\u7F6E",
|
|
159
|
-
reset: "\u91CD\u7F6E",
|
|
160
|
-
cancel: "\u53D6\u6D88",
|
|
161
|
-
confirm: "\u786E\u8BA4",
|
|
162
|
-
selection: "\u9009 {0}",
|
|
163
|
-
totalItems: "\u5171 {0} \u6761",
|
|
164
|
-
open: "\u5F00",
|
|
165
|
-
close: "\u5173"
|
|
166
|
-
},
|
|
167
|
-
"en-US": {
|
|
168
|
-
stripedTable: "Striped Table",
|
|
169
|
-
refresh: "Refresh",
|
|
170
|
-
settings: "Settings",
|
|
171
|
-
reset: "Reset",
|
|
172
|
-
cancel: "Cancel",
|
|
173
|
-
confirm: "Confirm",
|
|
174
|
-
selection: "Selected {0}",
|
|
175
|
-
totalItems: "Total {0} items",
|
|
176
|
-
open: "On",
|
|
177
|
-
close: "Off"
|
|
178
|
-
},
|
|
179
|
-
"ja-JP": {
|
|
180
|
-
stripedTable: "\u30C6\u30FC\u30D6\u30EB\u306E\u7E1E\u6A21\u69D8",
|
|
181
|
-
refresh: "\u66F4\u65B0",
|
|
182
|
-
settings: "\u8A2D\u5B9A",
|
|
183
|
-
reset: "\u30EA\u30BB\u30C3\u30C8",
|
|
184
|
-
cancel: "\u30AD\u30E3\u30F3\u30BB\u30EB",
|
|
185
|
-
confirm: "\u78BA\u8A8D",
|
|
186
|
-
selection: "{0}\u3092\u9078\u629E",
|
|
187
|
-
totalItems: "\u5408\u8A08{0}\u4EF6",
|
|
188
|
-
open: "\u5165",
|
|
189
|
-
close: "\u5207"
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
function bo(e) {
|
|
193
|
-
let l = null;
|
|
194
|
-
return typeof e == "string" && (l = mt[e] || mt["zh-CN"]), l || e;
|
|
195
|
-
}
|
|
196
|
-
function ho(e, l, t) {
|
|
197
|
-
const n = Array.isArray(t) ? t : [t], u = String(bo(e)[l]);
|
|
198
|
-
return t ? u.replace(/{(\d+)}/g, (r, i) => n[i] || "") : u;
|
|
199
|
-
}
|
|
200
|
-
const Fo = { class: "orc-table" }, Co = { class: "arco-card-header-title" }, Eo = { class: "u-card orc-table__setting" }, wo = {
|
|
201
|
-
class: "u-card__hd",
|
|
202
|
-
style: { height: "auto", padding: "4px 12px", "line-height": "28px" }
|
|
203
|
-
}, ko = { style: { "font-size": "14px" } }, Ao = {
|
|
204
|
-
class: "u-card__floor",
|
|
205
|
-
style: { padding: "0" }
|
|
206
|
-
}, xo = { class: "orc-table__draggable" }, Bo = { class: "orc-table__draggable-item" }, Do = {
|
|
207
|
-
key: 0,
|
|
208
|
-
class: "u-flex"
|
|
209
|
-
}, $o = ["title"], So = { style: { padding: "0 0.75em" } }, zo = {
|
|
210
|
-
key: 1,
|
|
211
|
-
class: "orc-table__draggable-moving"
|
|
212
|
-
}, Vo = {
|
|
213
|
-
class: "u-card__floor u-flex",
|
|
214
|
-
style: { padding: "6px 12px" }
|
|
215
|
-
}, Oo = {
|
|
216
|
-
key: 0,
|
|
217
|
-
class: "not-light-text"
|
|
218
|
-
}, Ro = {
|
|
219
|
-
key: 1,
|
|
220
|
-
class: "orc-table__pagination"
|
|
221
|
-
}, Po = { class: "u-flex u-flex--start" }, To = { class: "u-flex__item" }, Mo = { style: { width: "500px" } }, nt = /* @__PURE__ */ ve({
|
|
222
|
-
__name: "table",
|
|
223
|
-
props: {
|
|
224
|
-
title: {},
|
|
225
|
-
height: {},
|
|
226
|
-
locale: { default: "zh-CN" },
|
|
227
|
-
hideToolbar: { type: Boolean },
|
|
228
|
-
hideSetting: { type: Boolean },
|
|
229
|
-
hidePagination: { type: Boolean },
|
|
230
|
-
isHover: { type: Boolean, default: !0 },
|
|
231
|
-
size: { default: "mini" },
|
|
232
|
-
selectedKeys: { default: () => [] },
|
|
233
|
-
data: { default: () => [] },
|
|
234
|
-
option: { default: () => ({ columns: [] }) },
|
|
235
|
-
hook: {}
|
|
236
|
-
},
|
|
237
|
-
emits: ["update:selectedKeys", "cellClick", "onReset", "change", "confirm", "cellDblclick"],
|
|
238
|
-
setup(e, { expose: l, emit: t }) {
|
|
239
|
-
var ut;
|
|
240
|
-
const n = yo(), u = de(() => n.useErrData);
|
|
241
|
-
function r(C) {
|
|
242
|
-
return !!(C && typeof C == "object" && ["setup", "props"].some((B) => B in C));
|
|
243
|
-
}
|
|
244
|
-
const i = e, f = (C, B) => ho(i.locale, C, B), E = de(() => {
|
|
245
|
-
const C = i.size;
|
|
246
|
-
return C ? C === "large" ? "medium" : i.size : "mini";
|
|
247
|
-
});
|
|
248
|
-
function y(C) {
|
|
249
|
-
return we(C) ? C() : C;
|
|
250
|
-
}
|
|
251
|
-
const d = t;
|
|
252
|
-
function x(C, B) {
|
|
253
|
-
return (J) => {
|
|
254
|
-
J && typeof J == "object" && !Array.isArray(J) ? Object.assign(C, J) : C[B] = J;
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
function h(C, B, J, U) {
|
|
258
|
-
const { dataIndex: Y } = C, ge = B[Y];
|
|
259
|
-
return { record: B, dataIndex: Y, rowIndex: J, columnIndex: U, value: ge, updateValue: x(B, Y), formatValue: je(B, C) };
|
|
260
|
-
}
|
|
261
|
-
function S(C, B, J, U) {
|
|
262
|
-
const Y = { ...C.cellAttr }, ge = h(C, B, J, U);
|
|
263
|
-
return Object.keys(Y).forEach((Fe) => {
|
|
264
|
-
const ke = Y[Fe];
|
|
265
|
-
if (typeof ke == "function")
|
|
266
|
-
try {
|
|
267
|
-
Y[Fe] = ke(ge);
|
|
268
|
-
} catch {
|
|
269
|
-
}
|
|
270
|
-
}), Y;
|
|
271
|
-
}
|
|
272
|
-
const M = de(() => {
|
|
273
|
-
var C, B;
|
|
274
|
-
return (B = (C = i.option) == null ? void 0 : C.pageSize) != null ? B : 20;
|
|
275
|
-
}), T = de(() => {
|
|
276
|
-
var C, B;
|
|
277
|
-
return (B = (C = i.option) == null ? void 0 : C.pageSizeOptions) != null ? B : [10, 20, 50, 100, 200];
|
|
278
|
-
}), v = N({ page: 1, size: M.value }), { disabledList: A, selectChangeEvent: k, radioChangeEvent: D } = _o(i, d), { $grid: K, $gridTwo: H } = Bt(i.option);
|
|
279
|
-
function P(C, B, J) {
|
|
280
|
-
var ge, Fe;
|
|
281
|
-
const U = (ge = C[B]) != null ? ge : {}, Y = (Fe = C[B - 1]) != null ? Fe : {};
|
|
282
|
-
return ["string", "number"].includes(typeof U[J]) ? i.option.skinRow && typeof i.option.skinRow == "string" ? U[i.option.skinRow] === Y[i.option.skinRow] && U[J] === Y[J] : U[J] === Y[J] : !1;
|
|
283
|
-
}
|
|
284
|
-
function re(C, B, J) {
|
|
285
|
-
let U = {};
|
|
286
|
-
if (i.option.skinRowStyle)
|
|
287
|
-
try {
|
|
288
|
-
U = B > 0 && !P(C, B, J) && i.option.skinRow && C[B][String(i.option.skinRow)] === C[B - 1][String(i.option.skinRow)] ? i.option.skinRowStyle : {};
|
|
289
|
-
} catch {
|
|
290
|
-
}
|
|
291
|
-
return U;
|
|
292
|
-
}
|
|
293
|
-
const F = N([]);
|
|
294
|
-
function a() {
|
|
295
|
-
const C = [...i.option.columns], B = i.option.resolveColumns && we(i.option.resolveColumns) ? i.option.resolveColumns(C) : C;
|
|
296
|
-
return Object.assign([], B).filter((U) => Boolean(U)).map((U) => {
|
|
297
|
-
var Y;
|
|
298
|
-
return U.show = (Y = U.show) != null ? Y : !0, U.tooltip && (U.ellipsis = !0), U;
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
const z = de(() => {
|
|
302
|
-
const C = a(), B = Object.assign([], F.value);
|
|
303
|
-
return [
|
|
304
|
-
...new Set(
|
|
305
|
-
[...B].map((U) => U.dataIndex).filter((U) => C.find((Y) => Y.dataIndex === U)).concat([...C].map((U) => U.dataIndex)).filter((U) => !!U)
|
|
306
|
-
)
|
|
307
|
-
].map((U) => {
|
|
308
|
-
var Fe;
|
|
309
|
-
const Y = C.find((ke) => ke.dataIndex === U), ge = (Fe = B.find((ke) => ke.dataIndex === U)) != null ? Fe : /* @__PURE__ */ Object.create({});
|
|
310
|
-
return { ...Y, ...ge };
|
|
311
|
-
});
|
|
312
|
-
}), L = de(() => i.option.resolvePage && we(i.option.resolvePage) ? i.option.resolvePage(v.value) : i.option.resolvePage), X = de(() => Boolean(i.option.url)), m = N(!1), g = N(!1), p = N(0), W = Zt((ut = i.data) != null ? ut : []);
|
|
313
|
-
Ae(
|
|
314
|
-
() => i.data,
|
|
315
|
-
() => {
|
|
316
|
-
X.value || (W.value = Object.assign([], i.data));
|
|
317
|
-
},
|
|
318
|
-
{ deep: !0 }
|
|
319
|
-
);
|
|
320
|
-
const ce = new AbortController();
|
|
321
|
-
function pe() {
|
|
322
|
-
var Y, ge;
|
|
323
|
-
const C = (Y = i.option.useErrData) != null ? Y : u.value;
|
|
324
|
-
if (typeof C != "function")
|
|
325
|
-
return console.error("useErrData not declared"), [!0, { rows: [] }];
|
|
326
|
-
let B = /* @__PURE__ */ Object.create({});
|
|
327
|
-
L.value ? we(i.option.resolvePage) ? B = { ...L.value } : B = { page: v.value } : B = {};
|
|
328
|
-
const J = {
|
|
329
|
-
[String(i.option.method).toUpperCase() === "GET" ? "params" : "data"]: { ...B, ...i.option.data }
|
|
330
|
-
}, U = { url: i.option.url, method: (ge = i.option.method) != null ? ge : "GET", ...J, signal: ce.signal };
|
|
331
|
-
return i.option.timeout && (U.timeout = i.option.timeout), C(U);
|
|
332
|
-
}
|
|
333
|
-
const te = de({
|
|
334
|
-
get: () => i.selectedKeys,
|
|
335
|
-
set: (C) => {
|
|
336
|
-
d("update:selectedKeys", C);
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
|
-
function G(C = !0) {
|
|
340
|
-
m.value = C;
|
|
341
|
-
}
|
|
342
|
-
const fe = async () => {
|
|
343
|
-
var C, B, J, U, Y, ge, Fe;
|
|
344
|
-
if (X.value) {
|
|
345
|
-
G(!0);
|
|
346
|
-
const [ke, be] = await pe();
|
|
347
|
-
if (G(!1), ke)
|
|
348
|
-
we(i.option.error) && ((Fe = (ge = i.option).error) == null || Fe.call(ge, be));
|
|
349
|
-
else {
|
|
350
|
-
const qe = i.option.resolveData && we(i.option.resolveData) ? i.option.resolveData(be, { ...v.value }) : (B = (C = be == null ? void 0 : be.rows) != null ? C : be) != null ? B : [];
|
|
351
|
-
Object.prototype.toString.call(qe).slice(8, -1) !== "Array" && console.warn(new Error("[orc-table] :Not in Array format data ")), W.value = Object.assign([], qe), p.value = i.option.resolveTotal && we(i.option.resolveTotal) ? i.option.resolveTotal(be) : (J = be == null ? void 0 : be.total) != null ? J : 0, we(i.option.success) && ((Y = (U = i.option).success) == null || Y.call(U, be));
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
};
|
|
355
|
-
async function O() {
|
|
356
|
-
m.value || (d("onReset"), X.value ? await fe() : (G(!0), await new Promise((C) => {
|
|
357
|
-
setTimeout(C, 99);
|
|
358
|
-
}), G(!1)));
|
|
359
|
-
}
|
|
360
|
-
function xe(C, B = !1) {
|
|
361
|
-
C && (v.value.page = C), (!i.option.reserve || B) && (te.value = [], H.clearSelection()), fe();
|
|
362
|
-
}
|
|
363
|
-
async function me(C) {
|
|
364
|
-
v.value.size = C, xe(1, !0);
|
|
365
|
-
}
|
|
366
|
-
const ue = N(/* @__PURE__ */ Object.create({})), ne = N({
|
|
367
|
-
loading: !1,
|
|
368
|
-
columns: [],
|
|
369
|
-
tempWidth: /* @__PURE__ */ Object.create({})
|
|
370
|
-
});
|
|
371
|
-
async function he() {
|
|
372
|
-
var C;
|
|
373
|
-
if (typeof ((C = i.hook) == null ? void 0 : C.getColumn) == "function") {
|
|
374
|
-
const [B, J] = await i.hook.getColumn();
|
|
375
|
-
!B && J && (F.value = J);
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
he();
|
|
379
|
-
const Ce = (C = !1) => {
|
|
380
|
-
var B, J;
|
|
381
|
-
!ue.value || (C ? (B = ue.value) == null || B.togglePanel() : (J = ue.value) == null || J.showPanel(), ne.value.columns = Object.assign([], [...z.value]).map((U) => {
|
|
382
|
-
const Y = ne.value.tempWidth[U.dataIndex];
|
|
383
|
-
return Y && (U.width = Y), U;
|
|
384
|
-
}));
|
|
385
|
-
}, j = () => {
|
|
386
|
-
var B;
|
|
387
|
-
const C = (B = ue.value) == null ? void 0 : B.hidePanel;
|
|
388
|
-
typeof C == "function" && C();
|
|
389
|
-
};
|
|
390
|
-
function le() {
|
|
391
|
-
ne.value.loading = !0, F.value = [], ne.value.tempWidth = /* @__PURE__ */ Object.create({}), ne.value.columns = a(), Ce(), setTimeout(() => {
|
|
392
|
-
ne.value.loading = !1;
|
|
393
|
-
}, 500);
|
|
394
|
-
}
|
|
395
|
-
function Pe(C) {
|
|
396
|
-
let B = C.column.property;
|
|
397
|
-
!B && C.column.type === "seq" && (B = "index"), B && C.column.resizeWidth > 0 && (ne.value.tempWidth[B] = C.column.resizeWidth, j());
|
|
398
|
-
}
|
|
399
|
-
const ie = () => {
|
|
400
|
-
var C;
|
|
401
|
-
!ue.value || (F.value = ne.value.columns, d("confirm", z.value), typeof ((C = i.hook) == null ? void 0 : C.setColumn) == "function" && i.hook.setColumn(z.value), ne.value.tempWidth = /* @__PURE__ */ Object.create({}), j());
|
|
402
|
-
};
|
|
403
|
-
return i.option.firstLoad !== !1 && fe(), Ae(
|
|
404
|
-
() => i.option.firstLoad,
|
|
405
|
-
(C) => {
|
|
406
|
-
C === !0 && fe();
|
|
407
|
-
}
|
|
408
|
-
), tt(() => {
|
|
409
|
-
ce.abort();
|
|
410
|
-
}), l({
|
|
411
|
-
loading: m,
|
|
412
|
-
setLoading: G,
|
|
413
|
-
dataInit(C) {
|
|
414
|
-
return C !== !1 && (v.value.page = 1), te.value = [], H.clearSelection(), fe();
|
|
415
|
-
},
|
|
416
|
-
loadData(C) {
|
|
417
|
-
K.value && (K.value.reloadData(C), W.value = C);
|
|
418
|
-
},
|
|
419
|
-
...H
|
|
420
|
-
}), (C, B) => {
|
|
421
|
-
var at, rt;
|
|
422
|
-
const J = b("a-switch"), U = b("a-tooltip"), Y = b("icon-refresh"), ge = b("a-button"), Fe = b("icon-settings"), ke = b("icon-drag-dot-vertical"), be = b("a-checkbox"), qe = b("a-input-number"), Nt = b("a-divider"), it = b("vxe-button"), qt = b("vxe-pulldown"), st = b("a-space"), Kt = b("vxe-toolbar"), Ke = b("vxe-column"), Lt = b("a-empty"), Wt = b("a-spin"), Ht = b("vxe-table"), Gt = b("a-pagination");
|
|
423
|
-
return _(), q("div", Fo, [
|
|
424
|
-
i.hideToolbar ? ae("", !0) : (_(), R(Kt, {
|
|
425
|
-
key: 0,
|
|
426
|
-
size: "mini",
|
|
427
|
-
"class-name": "orc-table__toolbar"
|
|
428
|
-
}, {
|
|
429
|
-
buttons: c(() => [
|
|
430
|
-
Q(C.$slots, "default", {}, () => [
|
|
431
|
-
o("div", Co, oe(i.title), 1)
|
|
432
|
-
])
|
|
433
|
-
]),
|
|
434
|
-
tools: c(() => [
|
|
435
|
-
s(st, { size: "mini" }, {
|
|
436
|
-
default: c(() => [
|
|
437
|
-
Q(C.$slots, "tools"),
|
|
438
|
-
s(U, {
|
|
439
|
-
content: f("stripedTable"),
|
|
440
|
-
mini: ""
|
|
441
|
-
}, {
|
|
442
|
-
default: c(() => [
|
|
443
|
-
s(J, {
|
|
444
|
-
modelValue: g.value,
|
|
445
|
-
"onUpdate:modelValue": B[0] || (B[0] = (se) => g.value = se),
|
|
446
|
-
size: "small"
|
|
447
|
-
}, {
|
|
448
|
-
checked: c(() => [
|
|
449
|
-
$(oe(f("open")), 1)
|
|
450
|
-
]),
|
|
451
|
-
unchecked: c(() => [
|
|
452
|
-
$(oe(f("close")), 1)
|
|
453
|
-
]),
|
|
454
|
-
_: 1
|
|
455
|
-
}, 8, ["modelValue"])
|
|
456
|
-
]),
|
|
457
|
-
_: 1
|
|
458
|
-
}, 8, ["content"]),
|
|
459
|
-
s(U, {
|
|
460
|
-
content: f("refresh"),
|
|
461
|
-
mini: ""
|
|
462
|
-
}, {
|
|
463
|
-
default: c(() => [
|
|
464
|
-
s(ge, {
|
|
465
|
-
loading: m.value,
|
|
466
|
-
size: "small",
|
|
467
|
-
class: "orc-table__btn",
|
|
468
|
-
style: { border: "0" },
|
|
469
|
-
onClick: B[1] || (B[1] = (se) => O())
|
|
470
|
-
}, {
|
|
471
|
-
icon: c(() => [
|
|
472
|
-
s(Y, { size: 16 })
|
|
473
|
-
]),
|
|
474
|
-
_: 1
|
|
475
|
-
}, 8, ["loading"])
|
|
476
|
-
]),
|
|
477
|
-
_: 1
|
|
478
|
-
}, 8, ["content"]),
|
|
479
|
-
i.hideSetting ? ae("", !0) : (_(), R(qt, {
|
|
480
|
-
key: 0,
|
|
481
|
-
ref_key: "settingRef",
|
|
482
|
-
ref: ue,
|
|
483
|
-
transfer: ""
|
|
484
|
-
}, {
|
|
485
|
-
default: c(() => [
|
|
486
|
-
s(U, {
|
|
487
|
-
content: f("settings"),
|
|
488
|
-
mini: ""
|
|
489
|
-
}, {
|
|
490
|
-
default: c(() => [
|
|
491
|
-
s(ge, {
|
|
492
|
-
size: "small",
|
|
493
|
-
class: "orc-table__btn",
|
|
494
|
-
style: { border: "0" }
|
|
495
|
-
}, {
|
|
496
|
-
icon: c(() => [
|
|
497
|
-
s(Fe, {
|
|
498
|
-
size: 16,
|
|
499
|
-
onClick: B[2] || (B[2] = (se) => Ce(!0))
|
|
500
|
-
})
|
|
501
|
-
]),
|
|
502
|
-
_: 1
|
|
503
|
-
})
|
|
504
|
-
]),
|
|
505
|
-
_: 1
|
|
506
|
-
}, 8, ["content"])
|
|
507
|
-
]),
|
|
508
|
-
dropdown: c(() => [
|
|
509
|
-
o("div", Eo, [
|
|
510
|
-
o("div", wo, [
|
|
511
|
-
o("span", ko, oe(f("settings")), 1),
|
|
512
|
-
s(U, {
|
|
513
|
-
content: f("reset"),
|
|
514
|
-
mini: ""
|
|
515
|
-
}, {
|
|
516
|
-
default: c(() => [
|
|
517
|
-
s(ge, {
|
|
518
|
-
size: "small",
|
|
519
|
-
class: "orc-table__btn",
|
|
520
|
-
style: { border: "0" },
|
|
521
|
-
loading: ne.value.loading,
|
|
522
|
-
onClick: B[3] || (B[3] = (se) => le())
|
|
523
|
-
}, {
|
|
524
|
-
icon: c(() => [
|
|
525
|
-
s(Y)
|
|
526
|
-
]),
|
|
527
|
-
_: 1
|
|
528
|
-
}, 8, ["loading"])
|
|
529
|
-
]),
|
|
530
|
-
_: 1
|
|
531
|
-
}, 8, ["content"])
|
|
532
|
-
]),
|
|
533
|
-
o("div", Ao, [
|
|
534
|
-
o("div", xo, [
|
|
535
|
-
s(w(io), {
|
|
536
|
-
list: ne.value.columns,
|
|
537
|
-
style: { "user-select": "none" },
|
|
538
|
-
class: "orc-table__draggable-list",
|
|
539
|
-
group: "toolsGroup",
|
|
540
|
-
animation: "300",
|
|
541
|
-
"drag-class": "orc-table__draggable-drag",
|
|
542
|
-
"ghost-class": "orc-table__draggable-ghost",
|
|
543
|
-
"chosen-class": "orc-table__draggable-chosen",
|
|
544
|
-
"item-key": "id",
|
|
545
|
-
handle: ".orc-table__draggable-moving"
|
|
546
|
-
}, {
|
|
547
|
-
item: c(({ element: se }) => {
|
|
548
|
-
var Te;
|
|
549
|
-
return [
|
|
550
|
-
o("div", Bo, [
|
|
551
|
-
se.title ? (_(), q("div", Do, [
|
|
552
|
-
s(ke, { class: "orc-table__draggable-moving" }),
|
|
553
|
-
s(be, {
|
|
554
|
-
modelValue: se.show,
|
|
555
|
-
"onUpdate:modelValue": (V) => se.show = V
|
|
556
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
557
|
-
o("label", {
|
|
558
|
-
class: "u-flex__item u-clamp",
|
|
559
|
-
title: se.title
|
|
560
|
-
}, [
|
|
561
|
-
o("span", So, oe(se.title), 1)
|
|
562
|
-
], 8, $o),
|
|
563
|
-
(Te = i.hook) != null && Te.setColumn ? (_(), R(qe, {
|
|
564
|
-
key: 0,
|
|
565
|
-
modelValue: se.width,
|
|
566
|
-
"onUpdate:modelValue": (V) => se.width = V,
|
|
567
|
-
size: "mini",
|
|
568
|
-
style: { width: "50px" }
|
|
569
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : ae("", !0)
|
|
570
|
-
])) : (_(), q("div", zo, [
|
|
571
|
-
s(Nt, {
|
|
572
|
-
margin: 6,
|
|
573
|
-
type: "dashed"
|
|
574
|
-
})
|
|
575
|
-
]))
|
|
576
|
-
])
|
|
577
|
-
];
|
|
578
|
-
}),
|
|
579
|
-
_: 1
|
|
580
|
-
}, 8, ["list"])
|
|
581
|
-
])
|
|
582
|
-
]),
|
|
583
|
-
o("div", Vo, [
|
|
584
|
-
s(it, {
|
|
585
|
-
size: "mini",
|
|
586
|
-
class: "u-flex__item",
|
|
587
|
-
type: "text",
|
|
588
|
-
status: "info",
|
|
589
|
-
onClick: B[4] || (B[4] = (se) => j())
|
|
590
|
-
}, {
|
|
591
|
-
default: c(() => [
|
|
592
|
-
$(oe(f("cancel")), 1)
|
|
593
|
-
]),
|
|
594
|
-
_: 1
|
|
595
|
-
}),
|
|
596
|
-
s(it, {
|
|
597
|
-
size: "mini",
|
|
598
|
-
class: "u-flex__item",
|
|
599
|
-
type: "text",
|
|
600
|
-
status: "primary",
|
|
601
|
-
onClick: B[5] || (B[5] = (se) => ie())
|
|
602
|
-
}, {
|
|
603
|
-
default: c(() => [
|
|
604
|
-
$(oe(f("confirm")), 1)
|
|
605
|
-
]),
|
|
606
|
-
_: 1
|
|
607
|
-
})
|
|
608
|
-
])
|
|
609
|
-
])
|
|
610
|
-
]),
|
|
611
|
-
_: 1
|
|
612
|
-
}, 512))
|
|
613
|
-
]),
|
|
614
|
-
_: 3
|
|
615
|
-
})
|
|
616
|
-
]),
|
|
617
|
-
_: 3
|
|
618
|
-
})),
|
|
619
|
-
s(Ht, I({
|
|
620
|
-
ref: i.option.ref,
|
|
621
|
-
data: W.value,
|
|
622
|
-
height: i.height,
|
|
623
|
-
stripe: g.value,
|
|
624
|
-
"keep-source": !1,
|
|
625
|
-
"edit-config": { trigger: "click", mode: "row", showIcon: !1, autoClear: !1, showStatus: !1 },
|
|
626
|
-
"column-config": { isCurrent: !1, resizable: !0 },
|
|
627
|
-
"row-config": { isHover: i.isHover, isCurrent: !1, keyField: i.option.rowKey },
|
|
628
|
-
"show-overflow": i.option.tooltip || "tooltip",
|
|
629
|
-
"show-header-overflow": i.option.tooltip || "tooltip",
|
|
630
|
-
size: E.value,
|
|
631
|
-
loading: m.value,
|
|
632
|
-
"radio-config": w(A),
|
|
633
|
-
"checkbox-config": { ...w(A), checkField: i.option.checkKey },
|
|
634
|
-
"header-cell-style": i.option.headerStyle,
|
|
635
|
-
border: i.option.border,
|
|
636
|
-
"show-footer": w(we)(i.option.footerMethod),
|
|
637
|
-
"footer-method": i.option.footerMethod,
|
|
638
|
-
"footer-cell-style": i.option.footerStyle,
|
|
639
|
-
"cell-style": i.option.cellStyle,
|
|
640
|
-
"merge-footer-items": i.option.mergeFooter,
|
|
641
|
-
"show-footer-overflow": (at = i.option) == null ? void 0 : at.footerTooltip,
|
|
642
|
-
"filter-config": i.option.filterConfig,
|
|
643
|
-
"edit-rules": y(i.option.rules),
|
|
644
|
-
"scroll-y": i.option.scrollY,
|
|
645
|
-
"scroll-x": i.option.scrollX
|
|
646
|
-
}, (rt = i.option.tableProps) != null ? rt : {}, {
|
|
647
|
-
onCheckboxChange: w(k),
|
|
648
|
-
onCheckboxAll: w(k),
|
|
649
|
-
onRadioChange: w(D),
|
|
650
|
-
onResizableChange: Pe,
|
|
651
|
-
onCellClick: B[6] || (B[6] = (se) => d("cellClick", se)),
|
|
652
|
-
onCellDblclick: B[7] || (B[7] = (se) => d("cellDblclick", se)),
|
|
653
|
-
onFooterCellClick: i.option.onFooterCellClick
|
|
654
|
-
}), {
|
|
655
|
-
empty: c(() => [
|
|
656
|
-
s(Lt)
|
|
657
|
-
]),
|
|
658
|
-
loading: c(() => [
|
|
659
|
-
s(Wt)
|
|
660
|
-
]),
|
|
661
|
-
default: c(() => [
|
|
662
|
-
Q(C.$slots, "columns", {}, () => {
|
|
663
|
-
var se, Te;
|
|
664
|
-
return [
|
|
665
|
-
["checkbox"].includes((se = i.option.selectedType) != null ? se : "") ? (_(), R(Ke, {
|
|
666
|
-
key: 0,
|
|
667
|
-
type: "checkbox",
|
|
668
|
-
width: "30",
|
|
669
|
-
fixed: "left",
|
|
670
|
-
align: i.option.selectedAlign
|
|
671
|
-
}, null, 8, ["align"])) : ["radio"].includes((Te = i.option.selectedType) != null ? Te : "") ? (_(), R(Ke, {
|
|
672
|
-
key: 1,
|
|
673
|
-
type: "radio",
|
|
674
|
-
width: "30",
|
|
675
|
-
fixed: "left",
|
|
676
|
-
align: i.option.selectedAlign
|
|
677
|
-
}, null, 8, ["align"])) : ae("", !0),
|
|
678
|
-
(_(!0), q(_e, null, $e(z.value.filter((V) => V.show), (V, Jt) => (_(), q(_e, { key: Jt }, [
|
|
679
|
-
["index"].includes(V.dataIndex) ? (_(), R(Ke, {
|
|
680
|
-
key: 0,
|
|
681
|
-
type: "seq",
|
|
682
|
-
field: V.dataIndex,
|
|
683
|
-
width: V.width,
|
|
684
|
-
title: V.title,
|
|
685
|
-
sortable: V.sort,
|
|
686
|
-
"header-align": V.headerAlign,
|
|
687
|
-
"footer-align": V.footerAlign,
|
|
688
|
-
align: V.align,
|
|
689
|
-
"show-header-overflow": V.tooltip,
|
|
690
|
-
"show-overflow": V.tooltip,
|
|
691
|
-
fixed: V.fixed,
|
|
692
|
-
"title-prefix": V.help,
|
|
693
|
-
filters: V.filters,
|
|
694
|
-
"filter-multiple": V.filterMultiple,
|
|
695
|
-
"filter-method": V.filterMethod
|
|
696
|
-
}, null, 8, ["field", "width", "title", "sortable", "header-align", "footer-align", "align", "show-header-overflow", "show-overflow", "fixed", "title-prefix", "filters", "filter-multiple", "filter-method"])) : (_(), R(Ke, {
|
|
697
|
-
key: 1,
|
|
698
|
-
field: V.dataIndex,
|
|
699
|
-
width: V.width,
|
|
700
|
-
title: V.title,
|
|
701
|
-
sortable: V.sort,
|
|
702
|
-
"header-align": V.headerAlign,
|
|
703
|
-
"footer-align": V.footerAlign,
|
|
704
|
-
align: V.align,
|
|
705
|
-
"show-header-overflow": V.tooltip,
|
|
706
|
-
"show-overflow": V.tooltip,
|
|
707
|
-
fixed: V.fixed,
|
|
708
|
-
"title-prefix": V.help,
|
|
709
|
-
filters: V.filters,
|
|
710
|
-
"filter-multiple": V.filterMultiple,
|
|
711
|
-
"filter-method": V.filterMethod,
|
|
712
|
-
"edit-render": { enabled: Boolean(V.cell), placeholder: V.placeholder }
|
|
713
|
-
}, {
|
|
714
|
-
edit: c(({ row: Ee, rowIndex: De, columnIndex: Me }) => [
|
|
715
|
-
Boolean(V.cell) ? Q(C.$slots, "cell", I({
|
|
716
|
-
key: 0,
|
|
717
|
-
ref_for: !0
|
|
718
|
-
}, h(V, Ee, De, Me)), () => [
|
|
719
|
-
r(V.cell) ? (_(), R(Ve(V.cell), I({
|
|
720
|
-
key: 0,
|
|
721
|
-
ref_for: !0
|
|
722
|
-
}, S(V, Ee, De, Me)), null, 16)) : (_(), q("span", {
|
|
723
|
-
key: 1,
|
|
724
|
-
style: ye(w(Je)(Ee, V))
|
|
725
|
-
}, oe(w(je)(Ee, V)), 5))
|
|
726
|
-
]) : ae("", !0)
|
|
727
|
-
]),
|
|
728
|
-
default: c(({ row: Ee, rowIndex: De, columnIndex: Me }) => [
|
|
729
|
-
V.cell && V.div ? Q(C.$slots, "cell", I({
|
|
730
|
-
key: 0,
|
|
731
|
-
ref_for: !0
|
|
732
|
-
}, h(V, Ee, De, Me)), () => [
|
|
733
|
-
r(V.cell) ? (_(), R(Ve(V.cell), I({
|
|
734
|
-
key: 0,
|
|
735
|
-
ref_for: !0
|
|
736
|
-
}, S(V, Ee, De, Me)), null, 16)) : (_(), q("span", {
|
|
737
|
-
key: 1,
|
|
738
|
-
style: ye(w(Je)(Ee, V))
|
|
739
|
-
}, oe(w(je)(Ee, V)), 5))
|
|
740
|
-
]) : (_(), q(_e, { key: 1 }, [
|
|
741
|
-
i.option.skinRow && !V.cell ? (_(), q(_e, { key: 0 }, [
|
|
742
|
-
De > 0 && P(W.value, De, V.dataIndex) && V.width ? (_(), q("span", Oo, oe(i.option.skinRowText), 1)) : (_(), q("span", {
|
|
743
|
-
key: 1,
|
|
744
|
-
style: ye(re(W.value, De, V.dataIndex))
|
|
745
|
-
}, oe(w(je)(Ee, V)), 5))
|
|
746
|
-
], 64)) : (_(), q("span", {
|
|
747
|
-
key: 1,
|
|
748
|
-
style: ye(w(Je)(Ee, V))
|
|
749
|
-
}, oe(w(je)(Ee, V)), 5))
|
|
750
|
-
], 64))
|
|
751
|
-
]),
|
|
752
|
-
_: 2
|
|
753
|
-
}, 1032, ["field", "width", "title", "sortable", "header-align", "footer-align", "align", "show-header-overflow", "show-overflow", "fixed", "title-prefix", "filters", "filter-multiple", "filter-method", "edit-render"]))
|
|
754
|
-
], 64))), 128))
|
|
755
|
-
];
|
|
756
|
-
})
|
|
757
|
-
]),
|
|
758
|
-
_: 3
|
|
759
|
-
}, 16, ["data", "height", "stripe", "row-config", "show-overflow", "show-header-overflow", "size", "loading", "radio-config", "checkbox-config", "header-cell-style", "border", "show-footer", "footer-method", "footer-cell-style", "cell-style", "merge-footer-items", "show-footer-overflow", "filter-config", "edit-rules", "scroll-y", "scroll-x", "onCheckboxChange", "onCheckboxAll", "onRadioChange", "onFooterCellClick"]),
|
|
760
|
-
X.value && !i.hidePagination ? (_(), q("div", Ro, [
|
|
761
|
-
o("div", Po, [
|
|
762
|
-
o("div", To, [
|
|
763
|
-
Q(C.$slots, "footer")
|
|
764
|
-
]),
|
|
765
|
-
o("div", Mo, [
|
|
766
|
-
s(st, {
|
|
767
|
-
fill: "",
|
|
768
|
-
direction: "vertical",
|
|
769
|
-
align: "end"
|
|
770
|
-
}, {
|
|
771
|
-
default: c(() => [
|
|
772
|
-
s(Gt, {
|
|
773
|
-
current: v.value.page,
|
|
774
|
-
"default-page-size": v.value.size,
|
|
775
|
-
total: p.value,
|
|
776
|
-
"auto-adjust": !1,
|
|
777
|
-
size: i.size,
|
|
778
|
-
"show-total": "",
|
|
779
|
-
"show-page-size": "",
|
|
780
|
-
"page-size-options": T.value,
|
|
781
|
-
"page-size-props": {
|
|
782
|
-
triggerProps: { autoFitPopupMinWidth: !0, contentClass: "arco-trigger-content-size-small" }
|
|
783
|
-
},
|
|
784
|
-
onPageSizeChange: me,
|
|
785
|
-
onChange: xe
|
|
786
|
-
}, {
|
|
787
|
-
total: c(() => [
|
|
788
|
-
te.value.length ? (_(), q(_e, { key: 0 }, [
|
|
789
|
-
$(oe(f("selection", te.value.length)), 1)
|
|
790
|
-
], 64)) : ae("", !0),
|
|
791
|
-
p.value ? (_(), q(_e, { key: 1 }, [
|
|
792
|
-
$(oe(f("totalItems", p.value)), 1)
|
|
793
|
-
], 64)) : ae("", !0)
|
|
794
|
-
]),
|
|
795
|
-
_: 1
|
|
796
|
-
}, 8, ["current", "default-page-size", "total", "size", "page-size-options"])
|
|
797
|
-
]),
|
|
798
|
-
_: 1
|
|
799
|
-
})
|
|
800
|
-
])
|
|
801
|
-
])
|
|
802
|
-
])) : ae("", !0)
|
|
803
|
-
]);
|
|
804
|
-
};
|
|
805
|
-
}
|
|
806
|
-
});
|
|
807
|
-
const jo = {
|
|
808
|
-
tf: (e, l) => {
|
|
809
|
-
if (typeof e != "number")
|
|
810
|
-
return e;
|
|
811
|
-
if (typeof l != "number") {
|
|
812
|
-
const t = String(e).split(".");
|
|
813
|
-
t.length === 2 && (l = t[1].length);
|
|
814
|
-
}
|
|
815
|
-
return Ie.commafy(e, { digits: l });
|
|
816
|
-
},
|
|
817
|
-
t: (e) => Ie.toDateString(e, "yyyy-MM-dd"),
|
|
818
|
-
time: (e, l = "yyyy-MM-dd HH:mm:ss") => Ie.toDateString(e, l),
|
|
819
|
-
p: (e, l, t = "%") => typeof e != "number" ? e : (typeof l != "number" && (l = 2), (e * 100).toFixed(l) + t)
|
|
820
|
-
}, Io = (e) => {
|
|
821
|
-
const l = N(/* @__PURE__ */ Object.create({})), t = N([]), { tableOption: n, $grid: u, $gridTwo: r } = Bt(e), i = {
|
|
822
|
-
rowKey: r.getRowKey(),
|
|
823
|
-
addKey(f) {
|
|
824
|
-
var d;
|
|
825
|
-
const y = r.getTableData()[f];
|
|
826
|
-
if (!y.disabled && u.value) {
|
|
827
|
-
const x = r.getRowKey();
|
|
828
|
-
if (n.selectedType === "checkbox") {
|
|
829
|
-
const h = u.value, { fullData: S } = h.getTableData();
|
|
830
|
-
if (e.checkboxKey) {
|
|
831
|
-
const M = e.checkboxKey, T = S.filter((v) => v[M] && v[M] === y[M]);
|
|
832
|
-
T.length && h.setCheckboxRow(T, !0);
|
|
833
|
-
} else
|
|
834
|
-
u.value.setCheckboxRow(y, !0);
|
|
835
|
-
x && (t.value = ((d = u.value.getCheckboxRecords()) != null ? d : []).map((M) => M[x]));
|
|
836
|
-
}
|
|
837
|
-
n.selectedType === "radio" && (u.value.setRadioRow(y), u.value.getRadioRecord() && x && (t.value = [u.value.getRadioRecord()].map((h) => h[x])));
|
|
838
|
-
}
|
|
839
|
-
},
|
|
840
|
-
setTableData(f) {
|
|
841
|
-
u.value && u.value.reloadData(f);
|
|
842
|
-
},
|
|
843
|
-
setTableRow(f, E, y) {
|
|
844
|
-
if (u.value) {
|
|
845
|
-
const d = r.getTableData();
|
|
846
|
-
typeof E == "string" ? d[f][E] = y : Object.keys({ ...E }).forEach((x) => {
|
|
847
|
-
d[f][x] = E[x];
|
|
848
|
-
}), i.addKey(f), typeof e.footerMethod == "function" && u.value.updateFooter();
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
};
|
|
852
|
-
return {
|
|
853
|
-
tableRef: l,
|
|
854
|
-
tableOptions: n,
|
|
855
|
-
tableUtils: {
|
|
856
|
-
...i,
|
|
857
|
-
...r
|
|
858
|
-
},
|
|
859
|
-
$grid: u,
|
|
860
|
-
selectedKeys: t
|
|
861
|
-
};
|
|
862
|
-
};
|
|
863
|
-
function Nl(e, l) {
|
|
864
|
-
const { total: t = "\u5408\u8BA1", affixIndex: n = 1, ignoreIndex: u = 2 } = { ...l };
|
|
865
|
-
return {
|
|
866
|
-
footerStyle: { fontWeight: "bold" },
|
|
867
|
-
footerMethod({ columns: r, data: i }) {
|
|
868
|
-
return [
|
|
869
|
-
r.map((f, E) => {
|
|
870
|
-
if (E === n)
|
|
871
|
-
return t;
|
|
872
|
-
if (E < u)
|
|
873
|
-
return null;
|
|
874
|
-
const y = i.reduce((d, x) => (e != null && e.length ? e.includes(f.field) : typeof x[f.field] == "number") ? (d || (d = 0), d = Ie.add(d, x[f.field]), d) : null, null);
|
|
875
|
-
return y !== null ? jo.tf(y) : null;
|
|
876
|
-
})
|
|
877
|
-
];
|
|
878
|
-
}
|
|
879
|
-
};
|
|
880
|
-
}
|
|
881
|
-
function ql(...e) {
|
|
882
|
-
e.forEach((l, t) => console.log(`%c#${t + 1}: %o`, "color: #1672f6 ;", l));
|
|
883
|
-
}
|
|
884
|
-
function Re(e) {
|
|
885
|
-
return Object.prototype.toString.call(e).slice(8, -1);
|
|
886
|
-
}
|
|
887
|
-
function Uo(e) {
|
|
888
|
-
return Array.isArray(e);
|
|
889
|
-
}
|
|
890
|
-
function gt(e) {
|
|
891
|
-
return Re(e) === "Object";
|
|
892
|
-
}
|
|
893
|
-
function No(e) {
|
|
894
|
-
return Re(e) === "Number" && String(e) !== "NaN";
|
|
895
|
-
}
|
|
896
|
-
function Kl(e) {
|
|
897
|
-
return Re(e) === "Object" && Object.keys(e).length === 0;
|
|
898
|
-
}
|
|
899
|
-
function Ll(e) {
|
|
900
|
-
return Re(e) === "Array" && e.length === 0;
|
|
901
|
-
}
|
|
902
|
-
function Qe(e) {
|
|
903
|
-
return Array.isArray(e) ? e : [e];
|
|
904
|
-
}
|
|
905
|
-
const Wl = (e) => {
|
|
906
|
-
try {
|
|
907
|
-
const l = /* @__PURE__ */ new WeakSet(), t = JSON.stringify(e, (n, u) => {
|
|
908
|
-
if (typeof u == "object" && u !== null) {
|
|
909
|
-
if (l.has(u))
|
|
910
|
-
return;
|
|
911
|
-
l.add(u);
|
|
912
|
-
}
|
|
913
|
-
return u;
|
|
914
|
-
});
|
|
915
|
-
return JSON.parse(t);
|
|
916
|
-
} catch {
|
|
917
|
-
return Re(e) !== "Array" ? {} : [];
|
|
918
|
-
}
|
|
919
|
-
};
|
|
920
|
-
function $t(e, l = []) {
|
|
921
|
-
typeof l == "string" && (l = [l]);
|
|
922
|
-
const t = /* @__PURE__ */ Object.create({});
|
|
923
|
-
return Object.keys(e).forEach((n) => {
|
|
924
|
-
l.includes(n) || (t[n] = e[n]);
|
|
925
|
-
}), t;
|
|
926
|
-
}
|
|
927
|
-
function St(e, l = []) {
|
|
928
|
-
typeof l == "string" && (l = [l]);
|
|
929
|
-
const t = /* @__PURE__ */ Object.create({});
|
|
930
|
-
return Object.keys(e).forEach((n) => {
|
|
931
|
-
l.includes(n) && (t[n] = e[n]);
|
|
932
|
-
}), t;
|
|
933
|
-
}
|
|
934
|
-
const Hl = () => (Number(new Date()) + Number(String(Math.random()).slice(2, 15))).toString(32);
|
|
935
|
-
function zt(e) {
|
|
936
|
-
return Array.isArray(e) ? e : e.replace(/\[/g, ".").replace(/\]/g, "").split(".");
|
|
937
|
-
}
|
|
938
|
-
function Gl(e, l, t) {
|
|
939
|
-
return typeof e != "object" ? t : zt(l).reduce((n, u) => (n || {})[u], e) || t;
|
|
940
|
-
}
|
|
941
|
-
function Jl(e, l, t) {
|
|
942
|
-
return typeof e != "object" || zt(l).reduce((n, u, r, i) => r === i.length - 1 ? (n[u] = t, null) : (u in n || (n[u] = /^[0-9]{1,}$/.test(i[r + 1]) ? [] : {}), n[u]), e), e;
|
|
943
|
-
}
|
|
944
|
-
const Yl = (e, l = "") => {
|
|
945
|
-
if (/(chrome|safari|firefox)/g.test(navigator.userAgent.toLowerCase())) {
|
|
946
|
-
const t = document.createElement("a");
|
|
947
|
-
if (t.href = e, t.download !== void 0 && (l = l || e.substring(e.lastIndexOf("/") + 1, e.length), t.download = l), console.log(`download: ${l}`), document.createEvent) {
|
|
948
|
-
const n = document.createEvent("MouseEvents");
|
|
949
|
-
return n.initEvent("click", !0, !0), t.dispatchEvent(n), !0;
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
return ~e.indexOf("?") || (e += "?download"), window.open(e, "_self"), !0;
|
|
953
|
-
};
|
|
954
|
-
function Le(e) {
|
|
955
|
-
return e.multiple && (e.defaultValue ? Re(e.defaultValue) !== "Array" && (e.defaultValue = String(e.defaultValue).split(",")) : e.defaultValue = []), e;
|
|
956
|
-
}
|
|
957
|
-
const lt = (e, l) => {
|
|
958
|
-
const t = e.__vccOpts || e;
|
|
959
|
-
for (const [n, u] of l)
|
|
960
|
-
t[n] = u;
|
|
961
|
-
return t;
|
|
962
|
-
}, qo = {};
|
|
963
|
-
function Ko(e, l) {
|
|
964
|
-
const t = b("a-date-picker"), n = b("a-range-picker");
|
|
965
|
-
return _(), q("div", null, [
|
|
966
|
-
e.$attrs.multiple !== !0 ? (_(), R(t, He(I({ key: 0 }, e.$attrs)), null, 16)) : (_(), R(n, He(I({ key: 1 }, e.$attrs)), null, 16))
|
|
967
|
-
]);
|
|
968
|
-
}
|
|
969
|
-
const Lo = /* @__PURE__ */ lt(qo, [["render", Ko]]), Wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
970
|
-
__proto__: null,
|
|
971
|
-
default: Lo
|
|
972
|
-
}, Symbol.toStringTag, { value: "Module" })), Ho = {};
|
|
973
|
-
function Go(e, l) {
|
|
974
|
-
const t = b("a-input");
|
|
975
|
-
return _(), R(t, He(ht(e.$attrs)), null, 16);
|
|
976
|
-
}
|
|
977
|
-
const et = /* @__PURE__ */ lt(Ho, [["render", Go]]), Jo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
978
|
-
__proto__: null,
|
|
979
|
-
default: et
|
|
980
|
-
}, Symbol.toStringTag, { value: "Module" })), Yo = {
|
|
981
|
-
key: 0,
|
|
982
|
-
class: "u-flex"
|
|
983
|
-
}, Zo = /* @__PURE__ */ ve({
|
|
984
|
-
__name: "Number",
|
|
985
|
-
props: {
|
|
986
|
-
modelValue: [Number, Array],
|
|
987
|
-
multiple: Boolean
|
|
988
|
-
},
|
|
989
|
-
emits: ["update:model-value"],
|
|
990
|
-
setup(e, { emit: l }) {
|
|
991
|
-
const t = l, n = e, { modelValue: u } = Ft(n);
|
|
992
|
-
function r(E) {
|
|
993
|
-
const y = Qe(u == null ? void 0 : u.value), d = Number(y == null ? void 0 : y[E]);
|
|
994
|
-
return No(d) ? d : void 0;
|
|
995
|
-
}
|
|
996
|
-
const i = de(() => r(0)), f = de(() => r(1));
|
|
997
|
-
return (E, y) => {
|
|
998
|
-
const d = b("a-input-number");
|
|
999
|
-
return _(), q("span", null, [
|
|
1000
|
-
e.multiple === !0 ? (_(), q("div", Yo, [
|
|
1001
|
-
s(d, I(E.$attrs, {
|
|
1002
|
-
style: { width: "auto" },
|
|
1003
|
-
"model-value": i.value,
|
|
1004
|
-
"onUpdate:modelValue": y[0] || (y[0] = (x) => t("update:model-value", [x, f.value]))
|
|
1005
|
-
}), null, 16, ["model-value"]),
|
|
1006
|
-
y[3] || (y[3] = o("span", {
|
|
1007
|
-
class: "arco-picker-separator",
|
|
1008
|
-
style: { "min-width": "8px" }
|
|
1009
|
-
}, "-", -1)),
|
|
1010
|
-
s(d, I(E.$attrs, {
|
|
1011
|
-
style: { width: "auto" },
|
|
1012
|
-
"model-value": f.value,
|
|
1013
|
-
"onUpdate:modelValue": y[1] || (y[1] = (x) => t("update:model-value", [i.value, x]))
|
|
1014
|
-
}), null, 16, ["model-value"])
|
|
1015
|
-
])) : (_(), R(d, I({ key: 1 }, E.$attrs, {
|
|
1016
|
-
"model-value": Number(n.modelValue),
|
|
1017
|
-
"onUpdate:modelValue": y[2] || (y[2] = (x) => t("update:model-value", x))
|
|
1018
|
-
}), null, 16, ["model-value"]))
|
|
1019
|
-
]);
|
|
1020
|
-
};
|
|
1021
|
-
}
|
|
1022
|
-
}), Xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1023
|
-
__proto__: null,
|
|
1024
|
-
default: Zo
|
|
1025
|
-
}, Symbol.toStringTag, { value: "Module" })), Qo = {};
|
|
1026
|
-
function en(e, l) {
|
|
1027
|
-
const t = b("a-select");
|
|
1028
|
-
return _(), R(t, I(e.$attrs, { "trigger-props": { autoFitPopupMinWidth: !0, contentClass: "arco-trigger-content-size-small" } }), null, 16);
|
|
1029
|
-
}
|
|
1030
|
-
const tn = /* @__PURE__ */ lt(Qo, [["render", en]]), on = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1031
|
-
__proto__: null,
|
|
1032
|
-
default: tn
|
|
1033
|
-
}, Symbol.toStringTag, { value: "Module" })), Ye = /* @__PURE__ */ Object.assign({ "./Date.vue": Wo, "./Input.vue": Jo, "./Number.vue": Xo, "./Select.vue": on });
|
|
1034
|
-
function nn(e) {
|
|
1035
|
-
if (!e)
|
|
1036
|
-
return et;
|
|
1037
|
-
const l = Object.keys(Ye).find((t) => String(t).toLowerCase().slice(2, -4) === e);
|
|
1038
|
-
return l && Ye[l] ? Ye[l].default : et;
|
|
1039
|
-
}
|
|
1040
|
-
const vt = {
|
|
1041
|
-
"zh-CN": {
|
|
1042
|
-
resetSearch: "\u91CD\u7F6E\u641C\u7D22\u6761\u4EF6",
|
|
1043
|
-
fieldName: "\u5B57\u6BB5\u540D\u79F0",
|
|
1044
|
-
add: "\u6DFB\u52A0",
|
|
1045
|
-
delete: "\u5220\u9664",
|
|
1046
|
-
search: "\u641C\u7D22"
|
|
1047
|
-
},
|
|
1048
|
-
"en-US": {
|
|
1049
|
-
resetSearch: "Reset Search Criteria",
|
|
1050
|
-
fieldName: "Field Name",
|
|
1051
|
-
add: "Add",
|
|
1052
|
-
delete: "Delete",
|
|
1053
|
-
search: "Search"
|
|
1054
|
-
},
|
|
1055
|
-
"ja-JP": {
|
|
1056
|
-
resetSearch: "\u691C\u7D22\u6761\u4EF6\u3092\u30EA\u30BB\u30C3\u30C8",
|
|
1057
|
-
fieldName: "\u30D5\u30A3\u30FC\u30EB\u30C9\u540D",
|
|
1058
|
-
add: "\u8FFD\u52A0",
|
|
1059
|
-
delete: "\u524A\u9664",
|
|
1060
|
-
search: "\u691C\u7D22"
|
|
1061
|
-
}
|
|
1062
|
-
};
|
|
1063
|
-
function ln(e) {
|
|
1064
|
-
let l = null;
|
|
1065
|
-
return typeof e == "string" && (l = vt[e] || vt["zh-CN"]), l || e;
|
|
1066
|
-
}
|
|
1067
|
-
function un(e, l, t) {
|
|
1068
|
-
const n = Array.isArray(t) ? t : [t], u = String(ln(e)[l]);
|
|
1069
|
-
return t ? u.replace(/{(\d+)}/g, (r, i) => n[i] || "") : u;
|
|
1070
|
-
}
|
|
1071
|
-
const sn = { class: "u-flex u-flex--start" }, an = { class: "u-flex__item" }, rn = /* @__PURE__ */ ve({
|
|
1072
|
-
__name: "search",
|
|
1073
|
-
props: {
|
|
1074
|
-
loading: { type: Boolean },
|
|
1075
|
-
readonly: { type: Boolean },
|
|
1076
|
-
options: { default: () => [] },
|
|
1077
|
-
modelValue: { default: () => ({}) },
|
|
1078
|
-
size: { default: "small" },
|
|
1079
|
-
labelWidth: { default: "76px" },
|
|
1080
|
-
inputWidth: { default: "163px" },
|
|
1081
|
-
locale: { default: "zh-CN" }
|
|
1082
|
-
},
|
|
1083
|
-
emits: ["onSearch", "update:modelValue"],
|
|
1084
|
-
setup(e, { emit: l }) {
|
|
1085
|
-
const t = l, n = e, u = (F, a) => un(n.locale, F, a), r = N();
|
|
1086
|
-
function i() {
|
|
1087
|
-
return Object.assign([], n.options).map(Le);
|
|
1088
|
-
}
|
|
1089
|
-
function f() {
|
|
1090
|
-
return i().filter((F) => F.show !== !1);
|
|
1091
|
-
}
|
|
1092
|
-
function E() {
|
|
1093
|
-
const F = {};
|
|
1094
|
-
return f().forEach((a) => {
|
|
1095
|
-
F[a.name] = Le(a).defaultValue;
|
|
1096
|
-
}), F;
|
|
1097
|
-
}
|
|
1098
|
-
const y = de(() => n.size), d = N({ ...E(), ...n.modelValue });
|
|
1099
|
-
function x() {
|
|
1100
|
-
return { "shaonq--search": !0, [`shaonq--search-${y.value}`]: !0 };
|
|
1101
|
-
}
|
|
1102
|
-
const h = N(f());
|
|
1103
|
-
function S() {
|
|
1104
|
-
return Object.assign([], h.value);
|
|
1105
|
-
}
|
|
1106
|
-
function M() {
|
|
1107
|
-
h.value.push({ type: "input", name: "", label: "" });
|
|
1108
|
-
}
|
|
1109
|
-
function T(F, a) {
|
|
1110
|
-
h.value.splice(F, 1), delete d.value[a];
|
|
1111
|
-
}
|
|
1112
|
-
const v = N(!1);
|
|
1113
|
-
function A() {
|
|
1114
|
-
r.value && r.value.clearValidate();
|
|
1115
|
-
}
|
|
1116
|
-
function k() {
|
|
1117
|
-
v.value = !0, h.value = f(), d.value = { ...E() }, setTimeout(() => {
|
|
1118
|
-
A(), v.value = !1;
|
|
1119
|
-
}, 200);
|
|
1120
|
-
}
|
|
1121
|
-
const D = de(() => i().map((F) => ({
|
|
1122
|
-
label: F.label,
|
|
1123
|
-
value: F.name,
|
|
1124
|
-
disabled: S().some((a) => a.name === F.name)
|
|
1125
|
-
})));
|
|
1126
|
-
function K(F, a) {
|
|
1127
|
-
const z = i().find((L) => L.name === a);
|
|
1128
|
-
z && (h.value[F] = Le(z), d.value[z.name] = h.value[F].defaultValue), d.value = St(
|
|
1129
|
-
d.value,
|
|
1130
|
-
S().map((L) => L.name)
|
|
1131
|
-
), A();
|
|
1132
|
-
}
|
|
1133
|
-
function H() {
|
|
1134
|
-
return Object.keys(d.value).reduce((F, a) => {
|
|
1135
|
-
const z = d.value[a];
|
|
1136
|
-
return Uo(z) ? F[a] = z.some((L) => !!L) ? z.join(",") : "" : F[a] = z, F;
|
|
1137
|
-
}, {});
|
|
1138
|
-
}
|
|
1139
|
-
function P() {
|
|
1140
|
-
const F = H();
|
|
1141
|
-
return t("update:modelValue", F), F;
|
|
1142
|
-
}
|
|
1143
|
-
async function re() {
|
|
1144
|
-
r.value && await new Promise((a) => {
|
|
1145
|
-
var z;
|
|
1146
|
-
(z = r.value) == null || z.validate((L) => {
|
|
1147
|
-
var m, g;
|
|
1148
|
-
const X = (g = (m = Object.values({ ...L })) == null ? void 0 : m[0]) == null ? void 0 : g.label;
|
|
1149
|
-
X && so.warning(`\u8BF7\u8F93\u5165${X}`), a(!L);
|
|
1150
|
-
});
|
|
1151
|
-
}) && t("onSearch", P());
|
|
1152
|
-
}
|
|
1153
|
-
return (F, a) => {
|
|
1154
|
-
const z = b("icon-refresh"), L = b("a-button"), X = b("a-select"), m = b("a-form-item"), g = b("icon-plus-circle"), p = b("icon-delete"), W = b("a-space"), ce = b("a-input-group"), pe = b("icon-search"), te = b("a-form");
|
|
1155
|
-
return _(), q("div", {
|
|
1156
|
-
class: Xt(x())
|
|
1157
|
-
}, [
|
|
1158
|
-
Q(F.$slots, "head"),
|
|
1159
|
-
o("div", sn, [
|
|
1160
|
-
o("div", an, [
|
|
1161
|
-
s(W, {
|
|
1162
|
-
size: 1,
|
|
1163
|
-
align: "start"
|
|
1164
|
-
}, {
|
|
1165
|
-
default: c(() => [
|
|
1166
|
-
n.readonly ? ae("", !0) : (_(), R(L, {
|
|
1167
|
-
key: 0,
|
|
1168
|
-
type: "outline",
|
|
1169
|
-
class: "arco-btn-light",
|
|
1170
|
-
size: y.value,
|
|
1171
|
-
title: u("resetSearch"),
|
|
1172
|
-
loading: v.value,
|
|
1173
|
-
onClick: a[0] || (a[0] = (G) => k())
|
|
1174
|
-
}, {
|
|
1175
|
-
icon: c(() => [
|
|
1176
|
-
s(z)
|
|
1177
|
-
]),
|
|
1178
|
-
_: 1
|
|
1179
|
-
}, 8, ["size", "title", "loading"])),
|
|
1180
|
-
s(te, {
|
|
1181
|
-
ref_key: "formRef",
|
|
1182
|
-
ref: r,
|
|
1183
|
-
model: d.value
|
|
1184
|
-
}, {
|
|
1185
|
-
default: c(() => [
|
|
1186
|
-
s(W, {
|
|
1187
|
-
size: y.value,
|
|
1188
|
-
wrap: ""
|
|
1189
|
-
}, {
|
|
1190
|
-
default: c(() => [
|
|
1191
|
-
(_(!0), q(_e, null, $e(h.value, (G, fe) => (_(), R(ce, {
|
|
1192
|
-
key: fe,
|
|
1193
|
-
size: y.value
|
|
1194
|
-
}, {
|
|
1195
|
-
default: c(() => [
|
|
1196
|
-
s(W, { size: 1 }, {
|
|
1197
|
-
default: c(() => [
|
|
1198
|
-
n.readonly ? (_(), q("div", {
|
|
1199
|
-
key: 1,
|
|
1200
|
-
style: ye({ width: n.labelWidth })
|
|
1201
|
-
}, oe(G.label), 5)) : (_(), R(X, {
|
|
1202
|
-
key: 0,
|
|
1203
|
-
"model-value": G.name,
|
|
1204
|
-
options: D.value,
|
|
1205
|
-
style: ye({ width: n.labelWidth }),
|
|
1206
|
-
placeholder: u("fieldName"),
|
|
1207
|
-
"allow-search": "",
|
|
1208
|
-
size: y.value,
|
|
1209
|
-
"trigger-props": { autoFitPopupMinWidth: !0, contentClass: "arco-trigger-content-size-small" },
|
|
1210
|
-
onChange: (O) => K(fe, O)
|
|
1211
|
-
}, null, 8, ["model-value", "options", "style", "placeholder", "size", "onChange"])),
|
|
1212
|
-
s(m, {
|
|
1213
|
-
"no-style": "",
|
|
1214
|
-
field: G.name,
|
|
1215
|
-
label: G.label,
|
|
1216
|
-
required: G.required,
|
|
1217
|
-
rules: G.rules
|
|
1218
|
-
}, {
|
|
1219
|
-
default: c(() => [
|
|
1220
|
-
(_(), R(Ve(w(nn)(G.type)), I({
|
|
1221
|
-
modelValue: d.value[G.name],
|
|
1222
|
-
"onUpdate:modelValue": (O) => d.value[G.name] = O,
|
|
1223
|
-
size: y.value,
|
|
1224
|
-
style: { width: n.inputWidth },
|
|
1225
|
-
autocomplete: "off",
|
|
1226
|
-
readonly: !G.name,
|
|
1227
|
-
"allow-clear": ""
|
|
1228
|
-
}, { ref_for: !0 }, w($t)(G, ["label", "defaultValue", "type", "show"]), {
|
|
1229
|
-
onChange: a[1] || (a[1] = (O) => P()),
|
|
1230
|
-
onPressEnter: a[2] || (a[2] = (O) => re())
|
|
1231
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "size", "style", "readonly"]))
|
|
1232
|
-
]),
|
|
1233
|
-
_: 2
|
|
1234
|
-
}, 1032, ["field", "label", "required", "rules"]),
|
|
1235
|
-
n.readonly ? ae("", !0) : (_(), q(_e, { key: 2 }, [
|
|
1236
|
-
fe ? (_(), R(L, {
|
|
1237
|
-
key: 1,
|
|
1238
|
-
type: "primary",
|
|
1239
|
-
class: "arco-btn-light",
|
|
1240
|
-
title: u("delete"),
|
|
1241
|
-
size: y.value,
|
|
1242
|
-
onClick: (O) => T(fe, G.name)
|
|
1243
|
-
}, {
|
|
1244
|
-
icon: c(() => [
|
|
1245
|
-
s(p)
|
|
1246
|
-
]),
|
|
1247
|
-
_: 2
|
|
1248
|
-
}, 1032, ["title", "size", "onClick"])) : (_(), R(L, {
|
|
1249
|
-
key: 0,
|
|
1250
|
-
type: "primary",
|
|
1251
|
-
class: "arco-btn-light",
|
|
1252
|
-
title: u("add"),
|
|
1253
|
-
size: y.value,
|
|
1254
|
-
onClick: a[3] || (a[3] = (O) => M())
|
|
1255
|
-
}, {
|
|
1256
|
-
icon: c(() => [
|
|
1257
|
-
s(g)
|
|
1258
|
-
]),
|
|
1259
|
-
_: 1
|
|
1260
|
-
}, 8, ["title", "size"]))
|
|
1261
|
-
], 64))
|
|
1262
|
-
]),
|
|
1263
|
-
_: 2
|
|
1264
|
-
}, 1024)
|
|
1265
|
-
]),
|
|
1266
|
-
_: 2
|
|
1267
|
-
}, 1032, ["size"]))), 128)),
|
|
1268
|
-
Q(F.$slots, "default"),
|
|
1269
|
-
s(W, { size: y.value }, {
|
|
1270
|
-
default: c(() => [
|
|
1271
|
-
s(L, {
|
|
1272
|
-
type: "primary",
|
|
1273
|
-
loading: n.loading,
|
|
1274
|
-
title: u("search"),
|
|
1275
|
-
size: y.value,
|
|
1276
|
-
onClick: a[4] || (a[4] = (G) => re())
|
|
1277
|
-
}, {
|
|
1278
|
-
icon: c(() => [
|
|
1279
|
-
s(pe)
|
|
1280
|
-
]),
|
|
1281
|
-
default: c(() => [
|
|
1282
|
-
$(" " + oe(u("search")), 1)
|
|
1283
|
-
]),
|
|
1284
|
-
_: 1
|
|
1285
|
-
}, 8, ["loading", "title", "size"])
|
|
1286
|
-
]),
|
|
1287
|
-
_: 1
|
|
1288
|
-
}, 8, ["size"])
|
|
1289
|
-
]),
|
|
1290
|
-
_: 3
|
|
1291
|
-
}, 8, ["size"])
|
|
1292
|
-
]),
|
|
1293
|
-
_: 3
|
|
1294
|
-
}, 8, ["model"])
|
|
1295
|
-
]),
|
|
1296
|
-
_: 3
|
|
1297
|
-
})
|
|
1298
|
-
])
|
|
1299
|
-
])
|
|
1300
|
-
], 2);
|
|
1301
|
-
};
|
|
1302
|
-
}
|
|
1303
|
-
});
|
|
1304
|
-
function Zl(e, l) {
|
|
1305
|
-
const t = typeof e == "function", n = t ? e() : e, u = N(n), r = N({});
|
|
1306
|
-
return u.value.forEach((i) => {
|
|
1307
|
-
i.show !== !1 && (r.value[i.name] = Le(i).defaultValue);
|
|
1308
|
-
}), l && t && Ae(l, () => {
|
|
1309
|
-
u.value = t ? e() : e;
|
|
1310
|
-
}), [u, r];
|
|
1311
|
-
}
|
|
1312
|
-
const dn = {
|
|
1313
|
-
textarea: [
|
|
1314
|
-
[{ header: 1 }, { header: 2 }],
|
|
1315
|
-
["bold", "italic", "underline"],
|
|
1316
|
-
[{ list: "ordered" }, { list: "bullet" }, { align: [] }],
|
|
1317
|
-
["blockquote", "code-block", "link"],
|
|
1318
|
-
[{ color: [] }, "clean"]
|
|
1319
|
-
],
|
|
1320
|
-
mini: [
|
|
1321
|
-
[{ header: 1 }, { header: 2 }],
|
|
1322
|
-
["bold", "italic", "underline"],
|
|
1323
|
-
[{ list: "ordered" }, { list: "bullet" }, { align: [] }]
|
|
1324
|
-
],
|
|
1325
|
-
full: [
|
|
1326
|
-
["bold", "italic", "underline", "strike"],
|
|
1327
|
-
["blockquote", "code-block"],
|
|
1328
|
-
[{ header: 1 }, { header: 2 }],
|
|
1329
|
-
[{ list: "ordered" }, { list: "bullet" }],
|
|
1330
|
-
[{ script: "sub" }, { script: "super" }],
|
|
1331
|
-
[{ indent: "-1" }, { indent: "+1" }],
|
|
1332
|
-
[{ direction: "rtl" }],
|
|
1333
|
-
[{ color: [] }, { background: [] }],
|
|
1334
|
-
[{ font: [] }],
|
|
1335
|
-
[{ align: [] }],
|
|
1336
|
-
["link", "video", "image"],
|
|
1337
|
-
["clean"]
|
|
1338
|
-
]
|
|
1339
|
-
}, Xl = /* @__PURE__ */ ve({
|
|
1340
|
-
__name: "index",
|
|
1341
|
-
props: {
|
|
1342
|
-
modelValue: { type: String, default: "" },
|
|
1343
|
-
toolbar: { type: [Array, String], default: "textarea" }
|
|
1344
|
-
},
|
|
1345
|
-
emits: ["update:modelValue"],
|
|
1346
|
-
setup(e, { emit: l }) {
|
|
1347
|
-
const t = e, n = l, u = N();
|
|
1348
|
-
let r;
|
|
1349
|
-
const i = () => {
|
|
1350
|
-
var E, y;
|
|
1351
|
-
return String((y = (E = r == null ? void 0 : r.root) == null ? void 0 : E.innerHTML) != null ? y : "");
|
|
1352
|
-
};
|
|
1353
|
-
function f() {
|
|
1354
|
-
return {
|
|
1355
|
-
container: dn.textarea,
|
|
1356
|
-
handlers: {
|
|
1357
|
-
link(E) {
|
|
1358
|
-
if (E) {
|
|
1359
|
-
const y = prompt("Enter the URL");
|
|
1360
|
-
r && r.format("link", y);
|
|
1361
|
-
} else
|
|
1362
|
-
r && r.format("link", !1);
|
|
1363
|
-
}
|
|
1364
|
-
}
|
|
1365
|
-
};
|
|
1366
|
-
}
|
|
1367
|
-
return Ne(() => {
|
|
1368
|
-
u.value && !r && (r = new fo(u.value, { modules: { toolbar: f() }, theme: "snow" }), r.root.innerHTML = t.modelValue, r.on("text-change", () => {
|
|
1369
|
-
n("update:modelValue", i());
|
|
1370
|
-
}));
|
|
1371
|
-
}), tt(() => {
|
|
1372
|
-
r = null;
|
|
1373
|
-
}), (E, y) => (_(), q("div", {
|
|
1374
|
-
ref_key: "divRef",
|
|
1375
|
-
ref: u
|
|
1376
|
-
}, null, 512));
|
|
1377
|
-
}
|
|
1378
|
-
});
|
|
1379
|
-
const Ql = /* @__PURE__ */ ve({
|
|
1380
|
-
__name: "index",
|
|
1381
|
-
props: {
|
|
1382
|
-
useErrData: {}
|
|
1383
|
-
},
|
|
1384
|
-
setup(e) {
|
|
1385
|
-
const l = e, { useErrData: t } = Ft(l), n = Ct({ useErrData: t });
|
|
1386
|
-
return Et(Dt, n), (u, r) => Q(u.$slots, "default");
|
|
1387
|
-
}
|
|
1388
|
-
});
|
|
1389
|
-
function ze(e, l) {
|
|
1390
|
-
const t = N(e != null ? e : {});
|
|
1391
|
-
return [t, (u) => {
|
|
1392
|
-
var r;
|
|
1393
|
-
t.value = { ...e, ...u != null ? u : {} }, (r = l == null ? void 0 : l.value) != null && r.resetFields && l.value.resetFields();
|
|
1394
|
-
}];
|
|
1395
|
-
}
|
|
1396
|
-
function eu(e, l, t = "warning") {
|
|
1397
|
-
const n = l != null ? l : { okButtonProps: { status: "danger" }, okText: "\u5220\u9664" };
|
|
1398
|
-
xt[t]({
|
|
1399
|
-
title: "\u5220\u9664\u63D0\u793A",
|
|
1400
|
-
simple: !1,
|
|
1401
|
-
width: 360,
|
|
1402
|
-
titleAlign: "start",
|
|
1403
|
-
content: "\u786E\u5B9A\u5220\u9664\u6B64\u6570\u636E\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",
|
|
1404
|
-
hideCancel: !1,
|
|
1405
|
-
...n,
|
|
1406
|
-
async onOk(u) {
|
|
1407
|
-
typeof n.onOk == "function" && n.onOk(u), e && e();
|
|
1408
|
-
}
|
|
1409
|
-
});
|
|
1410
|
-
}
|
|
1411
|
-
function Vt(e, l) {
|
|
1412
|
-
const t = { ...e };
|
|
1413
|
-
return Object.keys(l).forEach((n) => {
|
|
1414
|
-
const u = l[n];
|
|
1415
|
-
if (u == null)
|
|
1416
|
-
return;
|
|
1417
|
-
const r = t[n];
|
|
1418
|
-
if (r == null) {
|
|
1419
|
-
t[n] = u;
|
|
1420
|
-
return;
|
|
1421
|
-
}
|
|
1422
|
-
if (Array.isArray(r) || Array.isArray(u)) {
|
|
1423
|
-
t[n] = [...Qe(r), ...Qe(u)];
|
|
1424
|
-
return;
|
|
1425
|
-
}
|
|
1426
|
-
if (gt(r) && gt(u)) {
|
|
1427
|
-
t[n] = Vt(r, u);
|
|
1428
|
-
return;
|
|
1429
|
-
}
|
|
1430
|
-
t[n] = u;
|
|
1431
|
-
}), t;
|
|
1432
|
-
}
|
|
1433
|
-
function tu(e, l) {
|
|
1434
|
-
if (typeof e == "function" || typeof l == "function")
|
|
1435
|
-
throw new Error("Cannot merge config in form of callback");
|
|
1436
|
-
return Vt(e, l);
|
|
1437
|
-
}
|
|
1438
|
-
function ou(e) {
|
|
1439
|
-
return new Promise((l) => {
|
|
1440
|
-
setTimeout(l, e);
|
|
1441
|
-
});
|
|
1442
|
-
}
|
|
1443
|
-
function _t(e, l = 5) {
|
|
1444
|
-
const t = new Array(e.length);
|
|
1445
|
-
let n = 0, u = 0;
|
|
1446
|
-
return new Promise((r) => {
|
|
1447
|
-
function i() {
|
|
1448
|
-
for (; u < l && n < e.length; ) {
|
|
1449
|
-
const f = n, E = e[f];
|
|
1450
|
-
n += 1, u += 1, setTimeout(() => {
|
|
1451
|
-
Promise.resolve().then(() => E()).then((y) => {
|
|
1452
|
-
t[f] = y;
|
|
1453
|
-
}).catch((y) => {
|
|
1454
|
-
console.error(`Task ${f} failed:`, y), t[f] = null;
|
|
1455
|
-
}).finally(() => {
|
|
1456
|
-
u -= 1, i(), n >= e.length && u === 0 && r(t);
|
|
1457
|
-
});
|
|
1458
|
-
}, 0);
|
|
1459
|
-
}
|
|
1460
|
-
}
|
|
1461
|
-
i();
|
|
1462
|
-
});
|
|
1463
|
-
}
|
|
1464
|
-
async function cn(e, l, t, n) {
|
|
1465
|
-
var M;
|
|
1466
|
-
if (!l)
|
|
1467
|
-
throw new Error("downLoadPdf not element");
|
|
1468
|
-
const u = `${e || "\u65B0\u5EFA PDF\u6587\u6863"}.pdf`;
|
|
1469
|
-
let r = t != null && t.className ? Array.from(l.querySelectorAll(t.className)) : [l];
|
|
1470
|
-
r.length || (r = [l]);
|
|
1471
|
-
const i = new mo({ unit: "mm", format: "a4", orientation: "portrait", putOnlyUsedFonts: !0, compress: !0, floatPrecision: "smart", ...n }), f = r.map((T) => () => {
|
|
1472
|
-
var v;
|
|
1473
|
-
return go.toCanvas(T, { scale: (v = t == null ? void 0 : t.scale) != null ? v : 1.3 });
|
|
1474
|
-
}), E = await _t(f);
|
|
1475
|
-
if (E.some((T) => T === null))
|
|
1476
|
-
throw new Error("\u751F\u6210\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u662F\u5426\u6709\u4E0D\u53EF\u8BBF\u95EE\u7684\u7F51\u7EDC\u8D44\u6E90");
|
|
1477
|
-
const y = E.filter((T) => !!T);
|
|
1478
|
-
console.log(`Create a ${y.length}-page file named ${u}`);
|
|
1479
|
-
let d = 0;
|
|
1480
|
-
function x() {
|
|
1481
|
-
d += 1, typeof (t == null ? void 0 : t.progress) == "function" && t.progress(d, y.length);
|
|
1482
|
-
}
|
|
1483
|
-
const h = (M = t == null ? void 0 : t.paddingBuffer) != null ? M : 5, S = y.map((T, v) => async () => {
|
|
1484
|
-
v > 0 && i.addPage();
|
|
1485
|
-
const A = T.width / 210, k = T.height / A;
|
|
1486
|
-
if (k <= 297)
|
|
1487
|
-
i.addImage(T, "PNG", 0, 0, 210, k);
|
|
1488
|
-
else {
|
|
1489
|
-
let D = k, K = 0;
|
|
1490
|
-
for (; D > 0; )
|
|
1491
|
-
D > h && i.addImage(T, "PNG", 0, K, 210, k), D -= 297, K -= 297, D > 0 && i.addPage();
|
|
1492
|
-
}
|
|
1493
|
-
x();
|
|
1494
|
-
});
|
|
1495
|
-
await _t(S), i.save(u);
|
|
1496
|
-
}
|
|
1497
|
-
function nu(e) {
|
|
1498
|
-
var t, n, u, r, i, f;
|
|
1499
|
-
if (!e.bcid)
|
|
1500
|
-
return "";
|
|
1501
|
-
const l = document.createElement("canvas");
|
|
1502
|
-
return l.height = 1, l.width = 1, po.toCanvas(l, {
|
|
1503
|
-
bcid: e.bcid,
|
|
1504
|
-
text: (t = e.defaultValue) != null ? t : "Unknown",
|
|
1505
|
-
height: e.height,
|
|
1506
|
-
scaleX: (u = (n = e.scaleX) != null ? n : e.scale) != null ? u : 2,
|
|
1507
|
-
scaleY: (i = (r = e.scaleY) != null ? r : e.scale) != null ? i : 2,
|
|
1508
|
-
width: e.width,
|
|
1509
|
-
padding: (f = e.padding) != null ? f : 0,
|
|
1510
|
-
...e.bcid === "qrcode" ? { eclevel: "H" } : {}
|
|
1511
|
-
}), l.toDataURL();
|
|
1512
|
-
}
|
|
1513
|
-
function Ge(e, l, t) {
|
|
1514
|
-
const n = { ...e.componentAttr };
|
|
1515
|
-
return typeof e.type != "string" && !("modelValue" in n) && (n.modelValue = (u) => {
|
|
1516
|
-
var r;
|
|
1517
|
-
return (r = u.getModel(u.model)) != null ? r : e.defaultValue;
|
|
1518
|
-
}, n.updateModelValue = (u) => (r) => u.setModel(u.model, r)), Object.entries(n).forEach(([u, r]) => {
|
|
1519
|
-
if (typeof r == "function")
|
|
1520
|
-
try {
|
|
1521
|
-
n[u] = r(l, t);
|
|
1522
|
-
} catch {
|
|
1523
|
-
}
|
|
1524
|
-
}), n;
|
|
1525
|
-
}
|
|
1526
|
-
function Ot(e) {
|
|
1527
|
-
return e ? typeof e == "string" ? e.split(",") : [...e] : [];
|
|
1528
|
-
}
|
|
1529
|
-
function Rt(e) {
|
|
1530
|
-
return Ot(e).join(",");
|
|
1531
|
-
}
|
|
1532
|
-
const Pt = /* @__PURE__ */ ve({
|
|
1533
|
-
__name: "form",
|
|
1534
|
-
props: {
|
|
1535
|
-
config: { default: () => [] },
|
|
1536
|
-
labelWidth: { default: "110px" },
|
|
1537
|
-
labelAlign: { default: "right" },
|
|
1538
|
-
loading: { type: Boolean, default: !1 },
|
|
1539
|
-
disabled: { type: Boolean, default: !1 },
|
|
1540
|
-
hideSubmit: { type: Boolean, default: !1 },
|
|
1541
|
-
modelValue: { default: void 0 },
|
|
1542
|
-
gutter: { default: 8 },
|
|
1543
|
-
span: { default: 24 },
|
|
1544
|
-
formAttr: { default: void 0 },
|
|
1545
|
-
grid: { default: void 0 }
|
|
1546
|
-
},
|
|
1547
|
-
emits: ["update:modelValue", "submit", "error"],
|
|
1548
|
-
setup(e, { expose: l, emit: t }) {
|
|
1549
|
-
const n = e;
|
|
1550
|
-
function u(m) {
|
|
1551
|
-
const g = { ...m };
|
|
1552
|
-
return n.config.forEach((p) => {
|
|
1553
|
-
p.dotNotation && p.model && (g[p.model] = Ot(g[p.model]));
|
|
1554
|
-
}), g;
|
|
1555
|
-
}
|
|
1556
|
-
function r(m) {
|
|
1557
|
-
const g = { ...m };
|
|
1558
|
-
return n.config.forEach((p) => {
|
|
1559
|
-
p.dotNotation && p.model && (g[p.model] = Rt(g[p.model]));
|
|
1560
|
-
}), g;
|
|
1561
|
-
}
|
|
1562
|
-
const i = t, f = N(), E = (m) => typeof m == "string" && ["a-input", "a-textarea"].includes(m) ? { autocomplete: "new-password" } : null;
|
|
1563
|
-
function y(m) {
|
|
1564
|
-
return Object.fromEntries(
|
|
1565
|
-
Object.values(n.config).filter((g) => g.model).map((g) => {
|
|
1566
|
-
var p;
|
|
1567
|
-
return [g.model, m ? m(g) : (p = g.defaultValue) != null ? p : null];
|
|
1568
|
-
})
|
|
1569
|
-
);
|
|
1570
|
-
}
|
|
1571
|
-
const [d, x] = ze(
|
|
1572
|
-
y((m) => {
|
|
1573
|
-
var g, p;
|
|
1574
|
-
return (p = (g = m == null ? void 0 : m.options) == null ? void 0 : g.options) != null ? p : [];
|
|
1575
|
-
})
|
|
1576
|
-
), [h] = ze(y((m) => (m == null ? void 0 : m.show) !== !1)), [S, M] = ze(u({ ...y(), ...n.modelValue }), f);
|
|
1577
|
-
function T(m) {
|
|
1578
|
-
return m.model ? h.value[m.model] : m.show !== !1;
|
|
1579
|
-
}
|
|
1580
|
-
function v() {
|
|
1581
|
-
var m, g;
|
|
1582
|
-
typeof ((m = f.value) == null ? void 0 : m.resetFields) == "function" && ((g = f.value) == null || g.resetFields());
|
|
1583
|
-
}
|
|
1584
|
-
function A() {
|
|
1585
|
-
var g, p;
|
|
1586
|
-
const m = r(S.value);
|
|
1587
|
-
i("update:modelValue", { ...y(), ...m }), typeof ((g = f.value) == null ? void 0 : g.validate) == "function" && ((p = f.value) == null || p.validate());
|
|
1588
|
-
}
|
|
1589
|
-
A();
|
|
1590
|
-
function k(m) {
|
|
1591
|
-
if (m.customClass)
|
|
1592
|
-
return typeof m.customClass == "function" ? m.customClass(m, S.value) : m;
|
|
1593
|
-
}
|
|
1594
|
-
const D = {
|
|
1595
|
-
getModelOption(m, g) {
|
|
1596
|
-
const p = d.value[m];
|
|
1597
|
-
return g ? p == null ? void 0 : p.find((W) => W.value === g) : p;
|
|
1598
|
-
},
|
|
1599
|
-
getModels() {
|
|
1600
|
-
return S.value;
|
|
1601
|
-
},
|
|
1602
|
-
getModel(m) {
|
|
1603
|
-
return S.value[m];
|
|
1604
|
-
},
|
|
1605
|
-
getShow(m) {
|
|
1606
|
-
return h.value[m];
|
|
1607
|
-
},
|
|
1608
|
-
setModelOption(m, g) {
|
|
1609
|
-
d.value[m] = g;
|
|
1610
|
-
},
|
|
1611
|
-
setModel(m, g) {
|
|
1612
|
-
!m || (typeof m == "string" ? S.value[m] = g : S.value = { ...S.value, ...m }, A());
|
|
1613
|
-
},
|
|
1614
|
-
setShow(m, g) {
|
|
1615
|
-
(Array.isArray(m) ? m : [m]).forEach((W) => {
|
|
1616
|
-
h.value[W] = g;
|
|
1617
|
-
});
|
|
1618
|
-
}
|
|
1619
|
-
}, K = (m) => ({ ...D, model: m.model, ...m.events, getFormItem: () => m }), H = ({ options: m }) => n.disabled || !!(m != null && m.disabled), P = (m) => {
|
|
1620
|
-
const { options: g, rules: p, name: W } = m;
|
|
1621
|
-
if (typeof p == "function")
|
|
1622
|
-
return p({ ...m }, K(m));
|
|
1623
|
-
const ce = typeof m.type == "string" ? `\u8BF7${/^(a-input|a-textarea)/.test(m.type) ? "\u8F93\u5165" : "\u9009\u62E9"}${W}` : `${W}\u5FC5\u586B`;
|
|
1624
|
-
return p || (g != null && g.required ? [{ required: !0, message: ce }] : []);
|
|
1625
|
-
}, { setModel: re, setModelOption: F } = D;
|
|
1626
|
-
function a(m) {
|
|
1627
|
-
return (g) => re(m, g);
|
|
1628
|
-
}
|
|
1629
|
-
function z() {
|
|
1630
|
-
n.config.forEach(async (m) => {
|
|
1631
|
-
var g;
|
|
1632
|
-
if (typeof ((g = m == null ? void 0 : m.events) == null ? void 0 : g.onMounted) == "function") {
|
|
1633
|
-
const p = await m.events.onMounted(K(m));
|
|
1634
|
-
p && m.model && F(m.model, p);
|
|
1635
|
-
}
|
|
1636
|
-
});
|
|
1637
|
-
}
|
|
1638
|
-
async function L(m, g) {
|
|
1639
|
-
var p;
|
|
1640
|
-
typeof ((p = g.events) == null ? void 0 : p.onChange) == "function" && await g.events.onChange(m, K(g));
|
|
1641
|
-
}
|
|
1642
|
-
Ae(
|
|
1643
|
-
() => n.modelValue,
|
|
1644
|
-
() => {
|
|
1645
|
-
S.value = u(n.modelValue);
|
|
1646
|
-
},
|
|
1647
|
-
{ deep: !1, immediate: !0 }
|
|
1648
|
-
), Ae(
|
|
1649
|
-
() => n.config,
|
|
1650
|
-
() => {
|
|
1651
|
-
h.value = y((m) => (m == null ? void 0 : m.show) !== !1);
|
|
1652
|
-
}
|
|
1653
|
-
);
|
|
1654
|
-
async function X() {
|
|
1655
|
-
return new Promise((m) => {
|
|
1656
|
-
f.value.validate((g) => {
|
|
1657
|
-
if (g)
|
|
1658
|
-
m([!0, g]), i("error", g);
|
|
1659
|
-
else {
|
|
1660
|
-
const p = r(S.value);
|
|
1661
|
-
m([!1, p]), i("update:modelValue", p), i("submit", p);
|
|
1662
|
-
}
|
|
1663
|
-
});
|
|
1664
|
-
});
|
|
1665
|
-
}
|
|
1666
|
-
return Ne(() => {
|
|
1667
|
-
M(), x(), z();
|
|
1668
|
-
}), l({
|
|
1669
|
-
onSubmit: X,
|
|
1670
|
-
onReset: M,
|
|
1671
|
-
resetFields: v
|
|
1672
|
-
}), (m, g) => {
|
|
1673
|
-
const p = b("a-form-item"), W = b("a-col"), ce = b("a-row"), pe = b("icon-save"), te = b("a-button"), G = b("a-space"), fe = b("a-form");
|
|
1674
|
-
return _(), R(fe, I({
|
|
1675
|
-
ref_key: "formRef",
|
|
1676
|
-
ref: f,
|
|
1677
|
-
model: w(S),
|
|
1678
|
-
"label-col-props": { flex: n.labelWidth },
|
|
1679
|
-
"label-col-style": { paddingRight: "8px" },
|
|
1680
|
-
disabled: n.disabled,
|
|
1681
|
-
"label-align": n.labelAlign,
|
|
1682
|
-
class: "orc-form"
|
|
1683
|
-
}, n.formAttr, { size: "small" }), {
|
|
1684
|
-
default: c(() => [
|
|
1685
|
-
s(ce, {
|
|
1686
|
-
gutter: n.gutter
|
|
1687
|
-
}, {
|
|
1688
|
-
default: c(() => [
|
|
1689
|
-
(_(!0), q(_e, null, $e(n.config, (O, xe) => {
|
|
1690
|
-
var me, ue;
|
|
1691
|
-
return _(), q(_e, { key: xe }, [
|
|
1692
|
-
T(O) ? (_(), R(W, I({
|
|
1693
|
-
key: 0,
|
|
1694
|
-
ref_for: !0
|
|
1695
|
-
}, n.grid, {
|
|
1696
|
-
span: ((me = O.options) == null ? void 0 : me.span) || n.span,
|
|
1697
|
-
offset: (ue = O.options) == null ? void 0 : ue.offset
|
|
1698
|
-
}), {
|
|
1699
|
-
default: c(() => {
|
|
1700
|
-
var ne, he;
|
|
1701
|
-
return [
|
|
1702
|
-
s(p, I({
|
|
1703
|
-
field: O.model,
|
|
1704
|
-
"row-class": k(O),
|
|
1705
|
-
label: O.name,
|
|
1706
|
-
"validate-trigger": O.validateTrigger,
|
|
1707
|
-
rules: P(O),
|
|
1708
|
-
disabled: H(O),
|
|
1709
|
-
help: (ne = O.options) == null ? void 0 : ne.help,
|
|
1710
|
-
tooltip: (he = O.options) == null ? void 0 : he.tooltip,
|
|
1711
|
-
"label-col-flex": n.labelWidth,
|
|
1712
|
-
"asterisk-position": n.labelAlign === "right" ? "start" : "end"
|
|
1713
|
-
}, { ref_for: !0 }, O.itemAttr), {
|
|
1714
|
-
default: c(() => [
|
|
1715
|
-
Q(m.$slots, O.model, I({
|
|
1716
|
-
utils: K(O),
|
|
1717
|
-
componentAttr: w(Ge)(O, K(O))
|
|
1718
|
-
}, { ref_for: !0 }, { ...O.model ? { value: w(S)[O.model], setValue: a(O.model), options: w(d)[O.model] } : {} }, {
|
|
1719
|
-
disabled: H(O)
|
|
1720
|
-
}), () => {
|
|
1721
|
-
var Ce;
|
|
1722
|
-
return [
|
|
1723
|
-
(_(), R(Ve(O.type), I({
|
|
1724
|
-
size: "small",
|
|
1725
|
-
"input-attrs": E(O),
|
|
1726
|
-
placeholder: (Ce = O == null ? void 0 : O.options) == null ? void 0 : Ce.placeholder,
|
|
1727
|
-
disabled: H(O),
|
|
1728
|
-
style: { width: "100%" }
|
|
1729
|
-
}, { ref_for: !0 }, {
|
|
1730
|
-
...O.model ? { modelValue: w(S)[O.model], options: w(d)[O.model] } : {},
|
|
1731
|
-
...w(Ge)(O, K(O)),
|
|
1732
|
-
...typeof O.type != "string" ? { utils: K(O) } : {}
|
|
1733
|
-
}, {
|
|
1734
|
-
onChange: (j) => L(j, O),
|
|
1735
|
-
"onUpdate:modelValue": (j) => w(re)(`${O.model}`, j)
|
|
1736
|
-
}), null, 16, ["input-attrs", "placeholder", "disabled", "onChange", "onUpdate:modelValue"]))
|
|
1737
|
-
];
|
|
1738
|
-
})
|
|
1739
|
-
]),
|
|
1740
|
-
_: 2
|
|
1741
|
-
}, 1040, ["field", "row-class", "label", "validate-trigger", "rules", "disabled", "help", "tooltip", "label-col-flex", "asterisk-position"])
|
|
1742
|
-
];
|
|
1743
|
-
}),
|
|
1744
|
-
_: 2
|
|
1745
|
-
}, 1040, ["span", "offset"])) : ae("", !0)
|
|
1746
|
-
], 64);
|
|
1747
|
-
}), 128)),
|
|
1748
|
-
Q(m.$slots, "row", { onSubmit: X })
|
|
1749
|
-
]),
|
|
1750
|
-
_: 3
|
|
1751
|
-
}, 8, ["gutter"]),
|
|
1752
|
-
Q(m.$slots, "default", { onSubmit: X }, () => [
|
|
1753
|
-
n.hideSubmit ? ae("", !0) : (_(), R(p, { key: 0 }, {
|
|
1754
|
-
default: c(() => [
|
|
1755
|
-
s(G, null, {
|
|
1756
|
-
default: c(() => [
|
|
1757
|
-
s(te, {
|
|
1758
|
-
type: "primary",
|
|
1759
|
-
loading: n.loading,
|
|
1760
|
-
onClick: g[0] || (g[0] = (O) => X())
|
|
1761
|
-
}, {
|
|
1762
|
-
icon: c(() => [
|
|
1763
|
-
s(pe)
|
|
1764
|
-
]),
|
|
1765
|
-
default: c(() => [
|
|
1766
|
-
g[1] || (g[1] = $(" \u4FDD\u5B58 "))
|
|
1767
|
-
]),
|
|
1768
|
-
_: 1,
|
|
1769
|
-
__: [1]
|
|
1770
|
-
}, 8, ["loading"])
|
|
1771
|
-
]),
|
|
1772
|
-
_: 1
|
|
1773
|
-
})
|
|
1774
|
-
]),
|
|
1775
|
-
_: 1
|
|
1776
|
-
}))
|
|
1777
|
-
])
|
|
1778
|
-
]),
|
|
1779
|
-
_: 3
|
|
1780
|
-
}, 16, ["model", "label-col-props", "disabled", "label-align"]);
|
|
1781
|
-
};
|
|
1782
|
-
}
|
|
1783
|
-
}), fn = /* @__PURE__ */ ve({
|
|
1784
|
-
__name: "modal-form",
|
|
1785
|
-
props: {
|
|
1786
|
-
isView: { type: Boolean },
|
|
1787
|
-
disabled: { type: Boolean },
|
|
1788
|
-
title: { default: "\u4FE1\u606F" },
|
|
1789
|
-
span: {},
|
|
1790
|
-
gutter: { default: 8 },
|
|
1791
|
-
size: { default: "small" },
|
|
1792
|
-
config: {},
|
|
1793
|
-
modelValue: { default: void 0 },
|
|
1794
|
-
labelWidth: {},
|
|
1795
|
-
buttonAttrs: {},
|
|
1796
|
-
modalAttrs: {}
|
|
1797
|
-
},
|
|
1798
|
-
emits: ["update:modelValue", "submit", "error"],
|
|
1799
|
-
setup(e, { expose: l, emit: t }) {
|
|
1800
|
-
const n = e, u = t, [r, i] = ze({}), f = () => i({ visible: !0, loading: !1 }), E = () => i({ visible: !1 }), y = Qt(), d = de(() => {
|
|
1801
|
-
const M = St(y, ["class", "style"]);
|
|
1802
|
-
return n.isView ? M : { ...M, disabled: n.disabled, type: "primary", size: n.size, ...n.buttonAttrs, onClick: f };
|
|
1803
|
-
}), x = de(() => $t(n, ["buttonAttrs", "modalAttrs", "title"])), h = N();
|
|
1804
|
-
async function S() {
|
|
1805
|
-
const [M, T] = await h.value.onSubmit();
|
|
1806
|
-
M || u("submit", {
|
|
1807
|
-
data: T,
|
|
1808
|
-
utils: {
|
|
1809
|
-
setVisible(v) {
|
|
1810
|
-
r.value.visible = v;
|
|
1811
|
-
},
|
|
1812
|
-
setLoading(v) {
|
|
1813
|
-
r.value.loading = v;
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1816
|
-
});
|
|
1817
|
-
}
|
|
1818
|
-
return l({
|
|
1819
|
-
openModal: f,
|
|
1820
|
-
hideModal: E,
|
|
1821
|
-
onSubmit: S
|
|
1822
|
-
}), (M, T) => {
|
|
1823
|
-
const v = b("a-button"), A = b("a-modal");
|
|
1824
|
-
return _(), R(Ve(n.isView ? "div" : w(ao)), He(ht(d.value)), ot({
|
|
1825
|
-
default: c(() => [
|
|
1826
|
-
Q(M.$slots, "default", {
|
|
1827
|
-
onSubmit: S,
|
|
1828
|
-
onShow: f
|
|
1829
|
-
}, () => [
|
|
1830
|
-
$(oe(n.title), 1)
|
|
1831
|
-
]),
|
|
1832
|
-
(_(), R(wt, { to: "body" }, [
|
|
1833
|
-
s(A, I({
|
|
1834
|
-
visible: w(r).visible,
|
|
1835
|
-
title: n.title,
|
|
1836
|
-
"title-align": "start",
|
|
1837
|
-
"mask-closable": !1,
|
|
1838
|
-
class: "orc-form--modal",
|
|
1839
|
-
"body-style": { minHeight: "280px" },
|
|
1840
|
-
"unmount-on-close": ""
|
|
1841
|
-
}, n.modalAttrs, { onCancel: E }), {
|
|
1842
|
-
footer: c(() => [
|
|
1843
|
-
Q(M.$slots, "footer", {
|
|
1844
|
-
onShow: f,
|
|
1845
|
-
onHide: E
|
|
1846
|
-
}, () => [
|
|
1847
|
-
s(v, {
|
|
1848
|
-
size: n.size,
|
|
1849
|
-
onClick: E
|
|
1850
|
-
}, {
|
|
1851
|
-
default: c(() => T[2] || (T[2] = [
|
|
1852
|
-
$("\u53D6\u6D88")
|
|
1853
|
-
])),
|
|
1854
|
-
_: 1,
|
|
1855
|
-
__: [2]
|
|
1856
|
-
}, 8, ["size"]),
|
|
1857
|
-
s(v, {
|
|
1858
|
-
type: "primary",
|
|
1859
|
-
size: n.size,
|
|
1860
|
-
loading: w(r).loading,
|
|
1861
|
-
onClick: S
|
|
1862
|
-
}, {
|
|
1863
|
-
default: c(() => T[3] || (T[3] = [
|
|
1864
|
-
$("\u786E\u8BA4")
|
|
1865
|
-
])),
|
|
1866
|
-
_: 1,
|
|
1867
|
-
__: [3]
|
|
1868
|
-
}, 8, ["size", "loading"])
|
|
1869
|
-
])
|
|
1870
|
-
]),
|
|
1871
|
-
default: c(() => [
|
|
1872
|
-
s(Pt, I({
|
|
1873
|
-
ref_key: "formRef",
|
|
1874
|
-
ref: h,
|
|
1875
|
-
"hide-submit": "",
|
|
1876
|
-
"label-align": "left"
|
|
1877
|
-
}, x.value, {
|
|
1878
|
-
onError: T[0] || (T[0] = (k) => u("error", k)),
|
|
1879
|
-
"onUpdate:modelValue": T[1] || (T[1] = (k) => u("update:modelValue", k))
|
|
1880
|
-
}), {
|
|
1881
|
-
row: c(() => [
|
|
1882
|
-
Q(M.$slots, "row", { onShow: f })
|
|
1883
|
-
]),
|
|
1884
|
-
_: 3
|
|
1885
|
-
}, 16)
|
|
1886
|
-
]),
|
|
1887
|
-
_: 3
|
|
1888
|
-
}, 16, ["visible", "title"])
|
|
1889
|
-
]))
|
|
1890
|
-
]),
|
|
1891
|
-
_: 2
|
|
1892
|
-
}, [
|
|
1893
|
-
!n.isView && M.$slots.icon ? {
|
|
1894
|
-
name: "icon",
|
|
1895
|
-
fn: c(() => [
|
|
1896
|
-
Q(M.$slots, "icon")
|
|
1897
|
-
]),
|
|
1898
|
-
key: "0"
|
|
1899
|
-
} : void 0
|
|
1900
|
-
]), 1040);
|
|
1901
|
-
};
|
|
1902
|
-
}
|
|
1903
|
-
}), pn = /* @__PURE__ */ ve({
|
|
1904
|
-
__name: "space",
|
|
1905
|
-
setup(e) {
|
|
1906
|
-
return Et(ft, { ...bt(ft), error: !1 }), (l, t) => (_(), q("div", null, [
|
|
1907
|
-
Q(l.$slots, "default")
|
|
1908
|
-
]));
|
|
1909
|
-
}
|
|
1910
|
-
}), mn = "_X_ROW_KEY", gn = /* @__PURE__ */ ve({
|
|
1911
|
-
__name: "table",
|
|
1912
|
-
props: {
|
|
1913
|
-
modelValue: { default: void 0 },
|
|
1914
|
-
updateModelValue: {},
|
|
1915
|
-
height: { default: 180 },
|
|
1916
|
-
options: { default: void 0 },
|
|
1917
|
-
hideTools: { type: Boolean, default: !1 },
|
|
1918
|
-
hideSeq: { type: Boolean },
|
|
1919
|
-
disabled: { type: Boolean },
|
|
1920
|
-
selectedKeys: { default: void 0 },
|
|
1921
|
-
rowKey: { default: mn },
|
|
1922
|
-
tableOptions: { default: void 0 },
|
|
1923
|
-
utils: {}
|
|
1924
|
-
},
|
|
1925
|
-
emits: ["reset", "cellClick", "update:selectedKeys"],
|
|
1926
|
-
setup(e, { emit: l }) {
|
|
1927
|
-
var T;
|
|
1928
|
-
const t = e, n = l, u = N((T = t.selectedKeys) != null ? T : []), r = Ct({}), i = de(() => {
|
|
1929
|
-
var v;
|
|
1930
|
-
return (v = t.options) != null ? v : [];
|
|
1931
|
-
});
|
|
1932
|
-
function f() {
|
|
1933
|
-
i.value.forEach(async (v) => {
|
|
1934
|
-
var A;
|
|
1935
|
-
if (typeof ((A = v == null ? void 0 : v.events) == null ? void 0 : A.onMounted) == "function" && v.model && t.utils) {
|
|
1936
|
-
const k = await v.events.onMounted(t.utils);
|
|
1937
|
-
k && (r[v.model] = k);
|
|
1938
|
-
}
|
|
1939
|
-
});
|
|
1940
|
-
}
|
|
1941
|
-
function E() {
|
|
1942
|
-
var v;
|
|
1943
|
-
return (v = t.modelValue) != null ? v : [];
|
|
1944
|
-
}
|
|
1945
|
-
function y(v) {
|
|
1946
|
-
typeof t.updateModelValue == "function" && t.updateModelValue(v);
|
|
1947
|
-
}
|
|
1948
|
-
const d = (v) => {
|
|
1949
|
-
var A;
|
|
1950
|
-
return t.disabled || !!((A = v == null ? void 0 : v.options) != null && A.disabled);
|
|
1951
|
-
}, x = () => {
|
|
1952
|
-
const v = i.value.reduce((k, D) => {
|
|
1953
|
-
var K;
|
|
1954
|
-
return D.model && (k[D.model] = (K = D.defaultValue) != null ? K : null), k;
|
|
1955
|
-
}, {}), A = [...E()];
|
|
1956
|
-
A.push(v), y(A);
|
|
1957
|
-
}, h = () => {
|
|
1958
|
-
const v = E();
|
|
1959
|
-
y([...v].filter((A) => !u.value.includes(A[t.rowKey]))), u.value = [], n("update:selectedKeys", u.value);
|
|
1960
|
-
};
|
|
1961
|
-
async function S(v, A) {
|
|
1962
|
-
var k;
|
|
1963
|
-
t.utils && typeof ((k = A.events) == null ? void 0 : k.onChange) == "function" && await A.events.onChange(v, t.utils);
|
|
1964
|
-
}
|
|
1965
|
-
async function M(v, A, k) {
|
|
1966
|
-
if (A) {
|
|
1967
|
-
const { rowIndex: D } = v, K = i.value.find((P) => P.model === A);
|
|
1968
|
-
K && await S([k, v], K);
|
|
1969
|
-
const H = [...E()];
|
|
1970
|
-
H[D] = { ...H[D], [A]: k }, y(H);
|
|
1971
|
-
}
|
|
1972
|
-
}
|
|
1973
|
-
return Ne(() => {
|
|
1974
|
-
f();
|
|
1975
|
-
}), (v, A) => {
|
|
1976
|
-
const k = b("a-button"), D = b("a-button-group"), K = b("a-space"), H = b("vxe-column");
|
|
1977
|
-
return _(), R(w(nt), {
|
|
1978
|
-
ref: "tableRef",
|
|
1979
|
-
"selected-keys": u.value,
|
|
1980
|
-
"onUpdate:selectedKeys": A[2] || (A[2] = (P) => u.value = P),
|
|
1981
|
-
class: "orc-vxe--static",
|
|
1982
|
-
data: E(),
|
|
1983
|
-
height: t.height,
|
|
1984
|
-
option: {
|
|
1985
|
-
rowKey: t.rowKey,
|
|
1986
|
-
selectedType: "checkbox",
|
|
1987
|
-
scrollX: { enabled: !0 },
|
|
1988
|
-
scrollY: { enabled: !0 },
|
|
1989
|
-
columns: [],
|
|
1990
|
-
...t.tableOptions
|
|
1991
|
-
},
|
|
1992
|
-
"hide-setting": "",
|
|
1993
|
-
"hide-pagination": "",
|
|
1994
|
-
onCellClick: A[3] || (A[3] = (P) => n("cellClick", P)),
|
|
1995
|
-
onOnReset: A[4] || (A[4] = (P) => n("reset"))
|
|
1996
|
-
}, {
|
|
1997
|
-
columns: c(() => [
|
|
1998
|
-
t.hideTools !== !0 ? (_(), R(H, {
|
|
1999
|
-
key: 0,
|
|
2000
|
-
type: "checkbox",
|
|
2001
|
-
width: "28"
|
|
2002
|
-
})) : ae("", !0),
|
|
2003
|
-
t.hideSeq !== !0 ? (_(), R(H, {
|
|
2004
|
-
key: 1,
|
|
2005
|
-
type: "seq",
|
|
2006
|
-
title: "\u5E8F",
|
|
2007
|
-
width: "28",
|
|
2008
|
-
align: t.hideTools === !0 ? "center" : "left",
|
|
2009
|
-
"show-overflow": ""
|
|
2010
|
-
}, null, 8, ["align"])) : ae("", !0),
|
|
2011
|
-
(_(!0), q(_e, null, $e(i.value, (P, re) => {
|
|
2012
|
-
var F;
|
|
2013
|
-
return _(), q(_e, { key: re }, [
|
|
2014
|
-
P.show !== !1 ? (_(), R(H, {
|
|
2015
|
-
key: 0,
|
|
2016
|
-
field: P.model,
|
|
2017
|
-
title: P.name,
|
|
2018
|
-
width: P.width,
|
|
2019
|
-
align: P.align,
|
|
2020
|
-
"show-overflow": P.tooltip,
|
|
2021
|
-
"title-prefix": (F = P.options) != null && F.required ? { icon: "vxe-cell--required-icon" } : void 0
|
|
2022
|
-
}, ot({ _: 2 }, [
|
|
2023
|
-
t.utils && P.div !== !1 ? {
|
|
2024
|
-
name: "default",
|
|
2025
|
-
fn: c((a) => [
|
|
2026
|
-
Q(v.$slots, P.model, {
|
|
2027
|
-
row: a.row,
|
|
2028
|
-
model: P.model
|
|
2029
|
-
}, () => [
|
|
2030
|
-
!P.type && P.model ? (_(), q("span", I({
|
|
2031
|
-
key: 0,
|
|
2032
|
-
ref_for: !0
|
|
2033
|
-
}, w(Ge)(P, t.utils, a)), oe(typeof P.format == "function" ? P.format(a.row[P.model], a.row) : a.row[P.model]), 17)) : (_(), R(Ve(P.type), I({
|
|
2034
|
-
key: 1,
|
|
2035
|
-
size: "mini"
|
|
2036
|
-
}, { ref_for: !0 }, {
|
|
2037
|
-
...P.model ? { "model-value": a.row[P.model], options: r[P.model] } : {},
|
|
2038
|
-
...w(Ge)(P, t.utils, a)
|
|
2039
|
-
}, {
|
|
2040
|
-
disabled: d(P),
|
|
2041
|
-
"onUpdate:modelValue": (z) => M(a, P.model, z)
|
|
2042
|
-
}), null, 16, ["disabled", "onUpdate:modelValue"]))
|
|
2043
|
-
])
|
|
2044
|
-
]),
|
|
2045
|
-
key: "0"
|
|
2046
|
-
} : void 0
|
|
2047
|
-
]), 1032, ["field", "title", "width", "align", "show-overflow", "title-prefix"])) : ae("", !0)
|
|
2048
|
-
], 64);
|
|
2049
|
-
}), 128)),
|
|
2050
|
-
i.value.some((P) => P.model === "other") ? ae("", !0) : (_(), R(H, {
|
|
2051
|
-
key: 2,
|
|
2052
|
-
field: "other"
|
|
2053
|
-
}))
|
|
2054
|
-
]),
|
|
2055
|
-
default: c(() => [
|
|
2056
|
-
s(K, { size: "mini" }, {
|
|
2057
|
-
default: c(() => [
|
|
2058
|
-
t.hideTools !== !0 ? Q(v.$slots, "default", { key: 0 }, () => [
|
|
2059
|
-
d() ? ae("", !0) : (_(), R(D, {
|
|
2060
|
-
key: 0,
|
|
2061
|
-
size: "mini"
|
|
2062
|
-
}, {
|
|
2063
|
-
default: c(() => [
|
|
2064
|
-
s(k, {
|
|
2065
|
-
type: "text",
|
|
2066
|
-
onClick: A[0] || (A[0] = (P) => x())
|
|
2067
|
-
}, {
|
|
2068
|
-
default: c(() => A[5] || (A[5] = [
|
|
2069
|
-
$("\u65B0\u589E")
|
|
2070
|
-
])),
|
|
2071
|
-
_: 1,
|
|
2072
|
-
__: [5]
|
|
2073
|
-
}),
|
|
2074
|
-
s(k, {
|
|
2075
|
-
type: "text",
|
|
2076
|
-
status: "danger",
|
|
2077
|
-
disabled: !u.value.length,
|
|
2078
|
-
onClick: A[1] || (A[1] = (P) => h())
|
|
2079
|
-
}, {
|
|
2080
|
-
default: c(() => A[6] || (A[6] = [
|
|
2081
|
-
$("\u5220\u9664")
|
|
2082
|
-
])),
|
|
2083
|
-
_: 1,
|
|
2084
|
-
__: [6]
|
|
2085
|
-
}, 8, ["disabled"])
|
|
2086
|
-
]),
|
|
2087
|
-
_: 1
|
|
2088
|
-
}))
|
|
2089
|
-
]) : ae("", !0),
|
|
2090
|
-
Q(v.$slots, "title")
|
|
2091
|
-
]),
|
|
2092
|
-
_: 3
|
|
2093
|
-
})
|
|
2094
|
-
]),
|
|
2095
|
-
_: 3
|
|
2096
|
-
}, 8, ["selected-keys", "data", "height", "option"]);
|
|
2097
|
-
};
|
|
2098
|
-
}
|
|
2099
|
-
});
|
|
2100
|
-
const vn = /* @__PURE__ */ ve({
|
|
2101
|
-
__name: "popup",
|
|
2102
|
-
props: {
|
|
2103
|
-
disabled: { type: Boolean, default: void 0 },
|
|
2104
|
-
title: { default: "\u8BF7\u9009\u62E9" },
|
|
2105
|
-
size: { default: "small" },
|
|
2106
|
-
modelValue: { default: void 0 },
|
|
2107
|
-
nameKey: {},
|
|
2108
|
-
options: {},
|
|
2109
|
-
pagination: { type: Boolean },
|
|
2110
|
-
keyword: { default: "keyword" },
|
|
2111
|
-
tableData: {},
|
|
2112
|
-
modalAttrs: {},
|
|
2113
|
-
tableAttrs: {},
|
|
2114
|
-
inputAttrs: {}
|
|
2115
|
-
},
|
|
2116
|
-
emits: ["update:modelValue", "change"],
|
|
2117
|
-
setup(e, { emit: l }) {
|
|
2118
|
-
const t = e, { mergedDisabled: n, eventHandlers: u } = ro(), r = de(() => {
|
|
2119
|
-
var k;
|
|
2120
|
-
return (k = t.disabled) != null ? k : n.value;
|
|
2121
|
-
}), i = l, [f, E] = ze({ visible: !1, keyword: "" });
|
|
2122
|
-
function y() {
|
|
2123
|
-
r.value || E({ visible: !0 });
|
|
2124
|
-
}
|
|
2125
|
-
const d = () => E({ visible: !1 }), { tableRef: x, selectedKeys: h, tableOptions: S } = Io(t.options);
|
|
2126
|
-
function M(k) {
|
|
2127
|
-
const D = { [t.keyword]: f.value.keyword, page: k };
|
|
2128
|
-
return typeof (S == null ? void 0 : S.resolvePage) == "function" && S.resolvePage(D) ? S.resolvePage(D) : D;
|
|
2129
|
-
}
|
|
2130
|
-
function T() {
|
|
2131
|
-
var k;
|
|
2132
|
-
(k = x.value) == null || k.dataInit();
|
|
2133
|
-
}
|
|
2134
|
-
function v(k) {
|
|
2135
|
-
var H, P;
|
|
2136
|
-
const D = k.map((re) => {
|
|
2137
|
-
var F;
|
|
2138
|
-
return re[(F = t.nameKey) != null ? F : "name"];
|
|
2139
|
-
}), K = Rt(D);
|
|
2140
|
-
i("update:modelValue", K), i("change", { name: K, data: [...k] }), (P = (H = u.value) == null ? void 0 : H.onChange) == null || P.call(H), d();
|
|
2141
|
-
}
|
|
2142
|
-
function A({ row: k }) {
|
|
2143
|
-
t.options.selectedType === "radio" && v([k]);
|
|
2144
|
-
}
|
|
2145
|
-
return (k, D) => {
|
|
2146
|
-
const K = b("a-input-search"), H = b("a-button");
|
|
2147
|
-
return _(), R(pn, null, {
|
|
2148
|
-
default: c(() => [
|
|
2149
|
-
Q(k.$slots, "default", {
|
|
2150
|
-
value: t.modelValue,
|
|
2151
|
-
disabled: r.value,
|
|
2152
|
-
onShow: y
|
|
2153
|
-
}, () => [
|
|
2154
|
-
s(K, {
|
|
2155
|
-
size: t.size,
|
|
2156
|
-
"model-value": t.modelValue,
|
|
2157
|
-
readonly: "",
|
|
2158
|
-
style: { cursor: "pointer" },
|
|
2159
|
-
onClick: y
|
|
2160
|
-
}, null, 8, ["size", "model-value"])
|
|
2161
|
-
]),
|
|
2162
|
-
(_(), R(wt, { to: "body" }, [
|
|
2163
|
-
s(w(xt), I({
|
|
2164
|
-
visible: w(f).visible,
|
|
2165
|
-
title: k.title,
|
|
2166
|
-
"title-align": "start",
|
|
2167
|
-
"mask-closable": !1,
|
|
2168
|
-
size: t.size,
|
|
2169
|
-
"body-style": { padding: "0 0 12px 0" },
|
|
2170
|
-
width: 750,
|
|
2171
|
-
footer: !0,
|
|
2172
|
-
"unmount-on-close": ""
|
|
2173
|
-
}, t.modalAttrs, {
|
|
2174
|
-
onCancel: d,
|
|
2175
|
-
onClose: d
|
|
2176
|
-
}), {
|
|
2177
|
-
footer: c(() => [
|
|
2178
|
-
s(H, {
|
|
2179
|
-
size: t.size,
|
|
2180
|
-
onClick: D[2] || (D[2] = (P) => d())
|
|
2181
|
-
}, {
|
|
2182
|
-
default: c(() => D[4] || (D[4] = [
|
|
2183
|
-
$("\u53D6\u6D88")
|
|
2184
|
-
])),
|
|
2185
|
-
_: 1,
|
|
2186
|
-
__: [4]
|
|
2187
|
-
}, 8, ["size"]),
|
|
2188
|
-
s(H, {
|
|
2189
|
-
type: "primary",
|
|
2190
|
-
size: t.size,
|
|
2191
|
-
disabled: !w(h).length,
|
|
2192
|
-
onClick: D[3] || (D[3] = (P) => v(w(x).getSelection()))
|
|
2193
|
-
}, {
|
|
2194
|
-
default: c(() => D[5] || (D[5] = [
|
|
2195
|
-
$("\u786E\u8BA4")
|
|
2196
|
-
])),
|
|
2197
|
-
_: 1,
|
|
2198
|
-
__: [5]
|
|
2199
|
-
}, 8, ["size", "disabled"])
|
|
2200
|
-
]),
|
|
2201
|
-
default: c(() => {
|
|
2202
|
-
var P;
|
|
2203
|
-
return [
|
|
2204
|
-
s(w(nt), I({
|
|
2205
|
-
ref_key: "tableRef",
|
|
2206
|
-
ref: x,
|
|
2207
|
-
"selected-keys": w(h),
|
|
2208
|
-
"onUpdate:selectedKeys": D[1] || (D[1] = (re) => eo(h) ? h.value = re : null),
|
|
2209
|
-
data: (P = t.tableData) != null ? P : [],
|
|
2210
|
-
"hide-setting": "",
|
|
2211
|
-
option: { ...w(S), resolvePage: M },
|
|
2212
|
-
height: 330,
|
|
2213
|
-
size: t.size,
|
|
2214
|
-
"hide-pagination": !t.pagination
|
|
2215
|
-
}, t.tableAttrs, { onCellDblclick: A }), {
|
|
2216
|
-
default: c(() => [
|
|
2217
|
-
t.pagination ? (_(), R(K, I({
|
|
2218
|
-
key: 0,
|
|
2219
|
-
modelValue: w(f).keyword,
|
|
2220
|
-
"onUpdate:modelValue": D[0] || (D[0] = (re) => w(f).keyword = re),
|
|
2221
|
-
style: { width: "192px" },
|
|
2222
|
-
placeholder: "\u6A21\u7CCA\u641C\u7D22",
|
|
2223
|
-
"allow-clear": "",
|
|
2224
|
-
size: t.size
|
|
2225
|
-
}, t.inputAttrs, { onSearch: T }), null, 16, ["modelValue", "size"])) : ae("", !0)
|
|
2226
|
-
]),
|
|
2227
|
-
_: 1
|
|
2228
|
-
}, 16, ["selected-keys", "data", "option", "size", "hide-pagination"])
|
|
2229
|
-
];
|
|
2230
|
-
}),
|
|
2231
|
-
_: 1
|
|
2232
|
-
}, 16, ["visible", "title", "size"])
|
|
2233
|
-
]))
|
|
2234
|
-
]),
|
|
2235
|
-
_: 3
|
|
2236
|
-
});
|
|
2237
|
-
};
|
|
2238
|
-
}
|
|
2239
|
-
});
|
|
2240
|
-
function Tt(e) {
|
|
2241
|
-
return to(e);
|
|
2242
|
-
}
|
|
2243
|
-
const lu = Tt(gn), uu = Tt(vn), iu = /* @__PURE__ */ ve({
|
|
2244
|
-
__name: "index",
|
|
2245
|
-
props: {
|
|
2246
|
-
isShow: { type: Boolean },
|
|
2247
|
-
isDirection: { type: Boolean },
|
|
2248
|
-
formProps: {}
|
|
2249
|
-
},
|
|
2250
|
-
setup(e) {
|
|
2251
|
-
return (l, t) => (_(), q("div", {
|
|
2252
|
-
style: ye(l.isShow ? { display: "block" } : { position: "absolute", clip: "rect(0px, 0px, 0px, 0px)", height: "0px", overflow: "auto" })
|
|
2253
|
-
}, [
|
|
2254
|
-
o("div", I({
|
|
2255
|
-
ref: "print$",
|
|
2256
|
-
style: [{ position: "relative", width: "100%" }, { maxWidth: l.isDirection ? "297mm" : "210mm" }]
|
|
2257
|
-
}, l.formProps), [
|
|
2258
|
-
Q(l.$slots, "default")
|
|
2259
|
-
], 16)
|
|
2260
|
-
], 4));
|
|
2261
|
-
}
|
|
2262
|
-
}), _n = "//at.alicdn.com/t/c/font_4872361_n3qs21vht0f.js";
|
|
2263
|
-
function Mt(e) {
|
|
2264
|
-
var t;
|
|
2265
|
-
const l = "icon-danhangshuru";
|
|
2266
|
-
return ((t = [
|
|
2267
|
-
{ tid: "text", type: l },
|
|
2268
|
-
{ tid: "number", type: "icon-shuzishuru" },
|
|
2269
|
-
{ tid: "table", type: "icon-24gl-table" },
|
|
2270
|
-
{ tid: "image", type: "icon-24gl-picture" },
|
|
2271
|
-
{ tid: "longText", type: "icon-duohangshuru" },
|
|
2272
|
-
{ tid: "hline", type: "icon-horizontalLine" },
|
|
2273
|
-
{ tid: "vline", type: "icon-verticalLine" },
|
|
2274
|
-
{ tid: "rect", type: "icon-24gl-rectangle" },
|
|
2275
|
-
{ tid: "oval", type: "icon-24gl-circle" },
|
|
2276
|
-
{ tid: "barcode", type: "icon-bar-code" },
|
|
2277
|
-
{ tid: "qrcode", type: "icon-qrcode" },
|
|
2278
|
-
{ tid: "object", type: "icon-qrcode" }
|
|
2279
|
-
].find((n) => n.tid === e)) == null ? void 0 : t.type) || l;
|
|
2280
|
-
}
|
|
2281
|
-
const yn = () => new Promise((e) => {
|
|
2282
|
-
const l = co.addFromIconFontCn({ src: `https:${_n}` });
|
|
2283
|
-
e(l);
|
|
2284
|
-
}), ee = oo(yn), bn = { class: "u-nos" }, hn = {
|
|
2285
|
-
class: "u-card__bd u-aside__bd u-cl",
|
|
2286
|
-
style: { "padding-top": "0", "border-bottom": "1px solid var(--color-neutral-2)" }
|
|
2287
|
-
}, Ze = /* @__PURE__ */ ve({
|
|
2288
|
-
__name: "card",
|
|
2289
|
-
props: { title: String, isFirst: Boolean, show: { type: Boolean, default: !0 } },
|
|
2290
|
-
setup(e) {
|
|
2291
|
-
const l = e, t = no(l.show), n = () => {
|
|
2292
|
-
t.value = !t.value;
|
|
2293
|
-
};
|
|
2294
|
-
return (u, r) => {
|
|
2295
|
-
const i = b("icon-down"), f = b("icon-right");
|
|
2296
|
-
return _(), q("div", bn, [
|
|
2297
|
-
o("div", {
|
|
2298
|
-
class: "u-card__hd u-aside__hd",
|
|
2299
|
-
style: ye([{ borderBottomWidth: t.value ? "0px" : "1px" }, { height: "36px", "line-height": "36px", "border-bottom-color": "var(--color-neutral-2)" }])
|
|
2300
|
-
}, [
|
|
2301
|
-
o("div", null, [
|
|
2302
|
-
Q(u.$slots, "title", {}, () => [
|
|
2303
|
-
o("strong", null, oe(l.title), 1)
|
|
2304
|
-
])
|
|
2305
|
-
]),
|
|
2306
|
-
o("span", {
|
|
2307
|
-
style: { cursor: "pointer" },
|
|
2308
|
-
onClick: r[0] || (r[0] = (E) => n())
|
|
2309
|
-
}, [
|
|
2310
|
-
t.value ? (_(), R(i, { key: 0 })) : (_(), R(f, { key: 1 }))
|
|
2311
|
-
])
|
|
2312
|
-
], 4),
|
|
2313
|
-
s(lo, null, {
|
|
2314
|
-
default: c(() => [
|
|
2315
|
-
kt(o("div", hn, [
|
|
2316
|
-
Q(u.$slots, "default")
|
|
2317
|
-
], 512), [
|
|
2318
|
-
[At, t.value]
|
|
2319
|
-
])
|
|
2320
|
-
]),
|
|
2321
|
-
_: 3
|
|
2322
|
-
})
|
|
2323
|
-
]);
|
|
2324
|
-
};
|
|
2325
|
-
}
|
|
2326
|
-
}), Fn = /* @__PURE__ */ ve({
|
|
2327
|
-
__name: "guides",
|
|
2328
|
-
props: {
|
|
2329
|
-
show: { type: Boolean, default: !0 },
|
|
2330
|
-
zoom: { default: 1 },
|
|
2331
|
-
mainContainer: {},
|
|
2332
|
-
warpContainer: {},
|
|
2333
|
-
leftOffset: { default: 0 },
|
|
2334
|
-
topOffset: { default: -24 }
|
|
2335
|
-
},
|
|
2336
|
-
setup(e, { expose: l }) {
|
|
2337
|
-
const t = e, n = t.mainContainer;
|
|
2338
|
-
let u = null, r = null;
|
|
2339
|
-
function i() {
|
|
2340
|
-
u == null || u.destroy(), r == null || r.destroy(), u = null, r = null;
|
|
2341
|
-
}
|
|
2342
|
-
const f = Ie.debounce(y, 1e3 / 30);
|
|
2343
|
-
function E() {
|
|
2344
|
-
if (!t.show) {
|
|
2345
|
-
i();
|
|
2346
|
-
return;
|
|
2347
|
-
}
|
|
2348
|
-
const d = {
|
|
2349
|
-
backgroundColor: "#f9f9fa",
|
|
2350
|
-
lineColor: "#bec2c7",
|
|
2351
|
-
textColor: "#999999",
|
|
2352
|
-
displayDragPos: !0,
|
|
2353
|
-
dragPosFormat: (h) => `${h}px`
|
|
2354
|
-
}, x = document.querySelector(n);
|
|
2355
|
-
!x || (u = new pt(x, {
|
|
2356
|
-
...d,
|
|
2357
|
-
type: "horizontal",
|
|
2358
|
-
className: "comp-horizontal"
|
|
2359
|
-
}).on("changeGuides", () => {
|
|
2360
|
-
}), r = new pt(x, {
|
|
2361
|
-
...d,
|
|
2362
|
-
type: "vertical",
|
|
2363
|
-
className: "comp-vertical"
|
|
2364
|
-
}).on("changeGuides", () => {
|
|
2365
|
-
}), f());
|
|
2366
|
-
}
|
|
2367
|
-
function y() {
|
|
2368
|
-
var d, x, h, S, M, T;
|
|
2369
|
-
if (u && r) {
|
|
2370
|
-
const v = Math.min(2, Math.max(0.5, t.zoom * 1));
|
|
2371
|
-
u.zoom = v, r.zoom = v;
|
|
2372
|
-
let A = 50;
|
|
2373
|
-
if (v > 1.2 && (A = 25), v < 0.8 && (A = 100), u.unit = A, r.unit = A, u && r && t.warpContainer) {
|
|
2374
|
-
const k = document.querySelector(t.warpContainer);
|
|
2375
|
-
if (!k)
|
|
2376
|
-
return;
|
|
2377
|
-
const D = t.leftOffset + ((d = k == null ? void 0 : k.offsetLeft) != null ? d : 0) - ((x = k.scrollLeft) != null ? x : 0), K = t.topOffset + ((h = k == null ? void 0 : k.offsetTop) != null ? h : 0) - ((S = k.scrollTop) != null ? S : 0);
|
|
2378
|
-
u.scroll(-D / v), u.scrollGuides(-K / v), r.scroll(-K / v);
|
|
2379
|
-
const H = (T = (M = document.querySelector(`${n} .${r.className}`)) == null ? void 0 : M.clientWidth) != null ? T : 30;
|
|
2380
|
-
r.scrollGuides(-(D - H) / v);
|
|
2381
|
-
}
|
|
2382
|
-
}
|
|
2383
|
-
}
|
|
2384
|
-
return Ae(() => t.show, E), Ae(() => t.zoom, f), Ne(() => {
|
|
2385
|
-
E(), window.addEventListener("resize", f, !1), Oe(t.warpContainer).on("scroll", f);
|
|
2386
|
-
}), tt(() => {
|
|
2387
|
-
window.removeEventListener("resize", f, !1), Oe(t.warpContainer).off("scroll", f);
|
|
2388
|
-
}), l({ onResize: f }), (d, x) => (_(), q("div"));
|
|
2389
|
-
}
|
|
2390
|
-
});
|
|
2391
|
-
const Cn = {
|
|
2392
|
-
class: "u-flex",
|
|
2393
|
-
style: { width: "calc(100% - 60px)" }
|
|
2394
|
-
}, En = /* @__PURE__ */ ve({
|
|
2395
|
-
__name: "preview",
|
|
2396
|
-
setup(e, { expose: l }) {
|
|
2397
|
-
const t = N(!1), n = N(!0), u = N(!1), r = N(0), i = N({}), f = N({}), E = () => {
|
|
2398
|
-
t.value = !1;
|
|
2399
|
-
}, y = (h, S, M = "210") => {
|
|
2400
|
-
t.value = !0, n.value = !0, r.value = h.editingPanel ? h.editingPanel.width : Number(M), i.value = h, f.value = S, setTimeout(() => {
|
|
2401
|
-
Oe("#preview_content_design").html(h.getHtml(S)), n.value = !1;
|
|
2402
|
-
}, 500);
|
|
2403
|
-
}, d = () => {
|
|
2404
|
-
var h;
|
|
2405
|
-
u.value = !0, (h = i.value) == null || h.print(
|
|
2406
|
-
f.value,
|
|
2407
|
-
{},
|
|
2408
|
-
{
|
|
2409
|
-
callback: () => {
|
|
2410
|
-
u.value = !1;
|
|
2411
|
-
}
|
|
2412
|
-
}
|
|
2413
|
-
);
|
|
2414
|
-
}, x = () => {
|
|
2415
|
-
const h = document.getElementById("preview_content_design");
|
|
2416
|
-
h && cn("\u6253\u5370\u9884\u89C8", h, { className: ".hiprint-printPaper", scale: 2 });
|
|
2417
|
-
};
|
|
2418
|
-
return l({ show: y, hideModal: E }), (h, S) => {
|
|
2419
|
-
const M = b("a-spin"), T = b("icon-printer"), v = b("a-button"), A = b("icon-download"), k = b("ASpace"), D = b("AModal");
|
|
2420
|
-
return _(), R(D, {
|
|
2421
|
-
title: "\u6253\u5370\u9884\u89C8",
|
|
2422
|
-
visible: t.value,
|
|
2423
|
-
"body-style": { padding: 0, height: "100%" },
|
|
2424
|
-
"mask-closable": !1,
|
|
2425
|
-
width: Math.max(r.value, 210) + "mm",
|
|
2426
|
-
footer: !1,
|
|
2427
|
-
fullscreen: "",
|
|
2428
|
-
onCancel: E
|
|
2429
|
-
}, {
|
|
2430
|
-
title: c(() => [
|
|
2431
|
-
o("div", Cn, [
|
|
2432
|
-
S[3] || (S[3] = o("div", { class: "u-flex__item" }, [
|
|
2433
|
-
o("strong", null, "\u6253\u5370\u9884\u89C8")
|
|
2434
|
-
], -1)),
|
|
2435
|
-
o("div", null, [
|
|
2436
|
-
s(k, null, {
|
|
2437
|
-
default: c(() => [
|
|
2438
|
-
s(v, {
|
|
2439
|
-
loading: u.value,
|
|
2440
|
-
type: "primary",
|
|
2441
|
-
icon: "printer",
|
|
2442
|
-
onClick: dt(d, ["stop"])
|
|
2443
|
-
}, {
|
|
2444
|
-
icon: c(() => [
|
|
2445
|
-
s(T)
|
|
2446
|
-
]),
|
|
2447
|
-
default: c(() => [
|
|
2448
|
-
S[1] || (S[1] = $(" \u6253\u5370 "))
|
|
2449
|
-
]),
|
|
2450
|
-
_: 1,
|
|
2451
|
-
__: [1]
|
|
2452
|
-
}, 8, ["loading"]),
|
|
2453
|
-
s(v, {
|
|
2454
|
-
type: "primary",
|
|
2455
|
-
icon: "printer",
|
|
2456
|
-
onClick: dt(x, ["stop"])
|
|
2457
|
-
}, {
|
|
2458
|
-
icon: c(() => [
|
|
2459
|
-
s(A)
|
|
2460
|
-
]),
|
|
2461
|
-
default: c(() => [
|
|
2462
|
-
S[2] || (S[2] = $(" \u4E0B\u8F7DPDF "))
|
|
2463
|
-
]),
|
|
2464
|
-
_: 1,
|
|
2465
|
-
__: [2]
|
|
2466
|
-
})
|
|
2467
|
-
]),
|
|
2468
|
-
_: 1
|
|
2469
|
-
})
|
|
2470
|
-
])
|
|
2471
|
-
])
|
|
2472
|
-
]),
|
|
2473
|
-
footer: c(() => [
|
|
2474
|
-
s(v, {
|
|
2475
|
-
key: "close",
|
|
2476
|
-
type: "primary",
|
|
2477
|
-
onClick: E
|
|
2478
|
-
}, {
|
|
2479
|
-
default: c(() => S[4] || (S[4] = [
|
|
2480
|
-
$("\u5173\u95ED")
|
|
2481
|
-
])),
|
|
2482
|
-
_: 1,
|
|
2483
|
-
__: [4]
|
|
2484
|
-
})
|
|
2485
|
-
]),
|
|
2486
|
-
default: c(() => [
|
|
2487
|
-
s(M, {
|
|
2488
|
-
class: "u-main",
|
|
2489
|
-
loading: n.value,
|
|
2490
|
-
style: { width: "100%", "min-height": "100%", display: "block" }
|
|
2491
|
-
}, {
|
|
2492
|
-
default: c(() => [
|
|
2493
|
-
o("div", {
|
|
2494
|
-
style: ye([{ width: r.value + "mm", overflow: "hidden" }, { margin: "0 auto", background: "#fff", "box-shadow": "rgba(0, 0, 0, 0.12) 0 0 20px" }])
|
|
2495
|
-
}, S[0] || (S[0] = [
|
|
2496
|
-
o("div", { id: "preview_content_design" }, null, -1)
|
|
2497
|
-
]), 4)
|
|
2498
|
-
]),
|
|
2499
|
-
_: 1
|
|
2500
|
-
}, 8, ["loading"])
|
|
2501
|
-
]),
|
|
2502
|
-
_: 1
|
|
2503
|
-
}, 8, ["visible", "width"]);
|
|
2504
|
-
};
|
|
2505
|
-
}
|
|
2506
|
-
}), wn = { class: "u-quill-body" }, kn = {
|
|
2507
|
-
class: "u-flex",
|
|
2508
|
-
style: { width: "calc(100% - 60px)" }
|
|
2509
|
-
}, An = { class: "u-flex__item" }, xn = { style: { color: "var(--color-border-4)" } }, Bn = /* @__PURE__ */ ve({
|
|
2510
|
-
__name: "kbd",
|
|
2511
|
-
setup(e, { expose: l }) {
|
|
2512
|
-
const t = N(!1), n = N(210), u = N({}), r = N({}), { version: i } = Se, f = () => {
|
|
2513
|
-
t.value = !1;
|
|
2514
|
-
};
|
|
2515
|
-
return l({ show: (y, d) => {
|
|
2516
|
-
t.value = !0, u.value = y, r.value = d;
|
|
2517
|
-
}, hideModal: f }), (y, d) => {
|
|
2518
|
-
const x = b("icon-lock"), h = b("icon-to-top"), S = b("icon-to-bottom"), M = b("ACard"), T = b("a-spin"), v = b("a-button"), A = b("AModal");
|
|
2519
|
-
return _(), R(A, {
|
|
2520
|
-
title: "\u5E2E\u52A9\u6587\u6863",
|
|
2521
|
-
visible: t.value,
|
|
2522
|
-
"body-style": { padding: 0, height: "100%" },
|
|
2523
|
-
"mask-closable": !1,
|
|
2524
|
-
width: Math.max(n.value, 210) + "mm",
|
|
2525
|
-
footer: !1,
|
|
2526
|
-
fullscreen: "",
|
|
2527
|
-
onCancel: f
|
|
2528
|
-
}, {
|
|
2529
|
-
title: c(() => [
|
|
2530
|
-
o("div", kn, [
|
|
2531
|
-
o("div", An, [
|
|
2532
|
-
d[23] || (d[23] = o("strong", null, "\u5E2E\u52A9\u6587\u6863", -1)),
|
|
2533
|
-
o("small", xn, "v " + oe(w(i)), 1)
|
|
2534
|
-
]),
|
|
2535
|
-
d[24] || (d[24] = o("div", null, null, -1))
|
|
2536
|
-
])
|
|
2537
|
-
]),
|
|
2538
|
-
footer: c(() => [
|
|
2539
|
-
s(v, {
|
|
2540
|
-
key: "close",
|
|
2541
|
-
type: "primary",
|
|
2542
|
-
onClick: f
|
|
2543
|
-
}, {
|
|
2544
|
-
default: c(() => d[25] || (d[25] = [
|
|
2545
|
-
$("\u5173\u95ED")
|
|
2546
|
-
])),
|
|
2547
|
-
_: 1,
|
|
2548
|
-
__: [25]
|
|
2549
|
-
})
|
|
2550
|
-
]),
|
|
2551
|
-
default: c(() => [
|
|
2552
|
-
s(T, {
|
|
2553
|
-
class: "u-main comp-kbd",
|
|
2554
|
-
style: { width: "100%", "min-height": "100%", display: "block" }
|
|
2555
|
-
}, {
|
|
2556
|
-
default: c(() => [
|
|
2557
|
-
o("div", {
|
|
2558
|
-
style: ye([{ width: n.value + "mm", overflow: "hidden" }, { margin: "0 auto" }])
|
|
2559
|
-
}, [
|
|
2560
|
-
s(M, null, {
|
|
2561
|
-
default: c(() => [
|
|
2562
|
-
o("div", wn, [
|
|
2563
|
-
d[10] || (d[10] = o("h1", null, "\u6253\u5370\u8BBE\u8BA1\u5668\u5E2E\u52A9\u6587\u6863", -1)),
|
|
2564
|
-
d[11] || (d[11] = o("p", null, "\u5728\u4F7F\u7528\u6253\u5370\u8BBE\u8BA1\u5668\u65F6\uFF0C\u719F\u7EC3\u638C\u63E1\u5FEB\u6377\u952E\u80FD\u591F\u663E\u8457\u63D0\u5347\u60A8\u7684\u5DE5\u4F5C\u6548\u7387\u3002\u672C\u6587\u6863\u8BE6\u7EC6\u4ECB\u7ECD\u4E86\u5E38\u7528\u64CD\u4F5C\u7684\u5FEB\u6377\u65B9\u5F0F\u53CA\u5176\u529F\u80FD\u63CF\u8FF0\uFF0C\u52A9\u60A8\u66F4\u9AD8\u6548\u5730\u5B8C\u6210\u8BBE\u8BA1\u4EFB\u52A1\u3002", -1)),
|
|
2565
|
-
d[12] || (d[12] = o("h2", null, "\u4E00\u3001\u57FA\u7840\u64CD\u4F5C\u5FEB\u6377\u952E", -1)),
|
|
2566
|
-
d[13] || (d[13] = o("table", null, [
|
|
2567
|
-
o("tbody", null, [
|
|
2568
|
-
o("tr", null, [
|
|
2569
|
-
o("th", { style: { width: "12em" } }, "\u5FEB\u6377\u952E"),
|
|
2570
|
-
o("th", null, "\u529F\u80FD\u8BF4\u660E")
|
|
2571
|
-
]),
|
|
2572
|
-
o("tr", null, [
|
|
2573
|
-
o("td", null, [
|
|
2574
|
-
o("kbd", null, "Ctrl"),
|
|
2575
|
-
$(" + "),
|
|
2576
|
-
o("kbd", null, "C")
|
|
2577
|
-
]),
|
|
2578
|
-
o("td", null, "\u590D\u5236\u5F53\u524D\u9009\u4E2D\u7684\u5185\u5BB9\uFF08\u6587\u672C\uFF09\u6216\u7EC4\u4EF6\u3002")
|
|
2579
|
-
]),
|
|
2580
|
-
o("tr", null, [
|
|
2581
|
-
o("td", null, [
|
|
2582
|
-
o("kbd", null, "Ctrl"),
|
|
2583
|
-
$(" + "),
|
|
2584
|
-
o("kbd", null, "V")
|
|
2585
|
-
]),
|
|
2586
|
-
o("td", null, "\u7C98\u8D34\u526A\u8D34\u677F\u4E2D\u7684\u5185\u5BB9\u5230\u5F53\u524D\u5149\u6807\u4F4D\u7F6E\u6216\u753B\u5E03\u4E0A\u3002")
|
|
2587
|
-
]),
|
|
2588
|
-
o("tr", null, [
|
|
2589
|
-
o("td", null, [
|
|
2590
|
-
o("kbd", null, "Ctrl"),
|
|
2591
|
-
$(" + "),
|
|
2592
|
-
o("kbd", null, "Z")
|
|
2593
|
-
]),
|
|
2594
|
-
o("td", null, "\u64A4\u9500\u4E0A\u4E00\u6B65\u64CD\u4F5C\u3002\u53EF\u7528\u4E8E\u56DE\u9000\u9519\u8BEF\u7684\u64CD\u4F5C\uFF0C\u4F8B\u5982\u8BEF\u5220\u3001\u8BEF\u6539\u5185\u5BB9\u7B49\u3002\u652F\u6301\u591A\u6B21\u64A4\u9500\u3002")
|
|
2595
|
-
]),
|
|
2596
|
-
o("tr", null, [
|
|
2597
|
-
o("td", null, [
|
|
2598
|
-
o("kbd", null, "Ctrl"),
|
|
2599
|
-
$(" + "),
|
|
2600
|
-
o("kbd", null, "Shift"),
|
|
2601
|
-
$(" + "),
|
|
2602
|
-
o("kbd", null, "Z")
|
|
2603
|
-
]),
|
|
2604
|
-
o("td", null, "\u91CD\u505A\u4E0A\u4E00\u6B21\u88AB\u64A4\u9500\u7684\u64CD\u4F5C\u3002\u4E0E\u64A4\u9500\u5F62\u6210\u4E92\u8865\uFF0C\u53EF\u6062\u590D\u64A4\u9500\u540E\u7684\u5185\u5BB9\u3002")
|
|
2605
|
-
]),
|
|
2606
|
-
o("tr", null, [
|
|
2607
|
-
o("td", null, [
|
|
2608
|
-
o("kbd", null, "Del")
|
|
2609
|
-
]),
|
|
2610
|
-
o("td", null, "\u5220\u9664\u5F53\u524D\u9009\u4E2D\u7684\u7EC4\u4EF6\u3002\u5E38\u7528\u4E8E\u6E05\u9664\u4E0D\u9700\u8981\u7684\u5143\u7D20\uFF0C\u5982\u6587\u672C\u3001\u56FE\u7247\u7B49\u3002")
|
|
2611
|
-
])
|
|
2612
|
-
])
|
|
2613
|
-
], -1)),
|
|
2614
|
-
d[14] || (d[14] = o("h2", null, "\u4E8C\u3001\u9009\u62E9\u4E0E\u591A\u9009\u64CD\u4F5C", -1)),
|
|
2615
|
-
d[15] || (d[15] = o("table", null, [
|
|
2616
|
-
o("tbody", null, [
|
|
2617
|
-
o("tr", null, [
|
|
2618
|
-
o("th", { style: { width: "12em" } }, "\u5FEB\u6377\u952E"),
|
|
2619
|
-
o("th", null, "\u529F\u80FD\u8BF4\u660E")
|
|
2620
|
-
]),
|
|
2621
|
-
o("tr", null, [
|
|
2622
|
-
o("td", null, [
|
|
2623
|
-
o("kbd", null, "Ctrl"),
|
|
2624
|
-
$(" + "),
|
|
2625
|
-
o("kbd", null, "\u{1F5B1}\uFE0F")
|
|
2626
|
-
]),
|
|
2627
|
-
o("td", null, [
|
|
2628
|
-
$(" \u591A\u9009\u529F\u80FD\u3002\u6309\u4E0B "),
|
|
2629
|
-
o("kbd", null, "Ctrl"),
|
|
2630
|
-
$(" \u952E\u7684\u540C\u65F6\u70B9\u51FB\u9F20\u6807 "),
|
|
2631
|
-
o("kbd", null, "\u{1F5B1}\uFE0F"),
|
|
2632
|
-
$(" \u5DE6\u952E\u53EF\u4EE5\u9009\u62E9\u591A\u4E2A\u4E0D\u8FDE\u7EED\u7684\u7EC4\u4EF6\u3002\u8FD9\u5BF9\u4E8E\u540C\u65F6\u8C03\u6574\u591A\u4E2A\u5143\u7D20\u975E\u5E38\u6709\u7528\u3002 ")
|
|
2633
|
-
])
|
|
2634
|
-
])
|
|
2635
|
-
])
|
|
2636
|
-
], -1)),
|
|
2637
|
-
d[16] || (d[16] = o("h2", null, "\u4E09\u3001\u79FB\u52A8\u4E0E\u5B9A\u4F4D\u64CD\u4F5C", -1)),
|
|
2638
|
-
d[17] || (d[17] = o("table", null, [
|
|
2639
|
-
o("tbody", null, [
|
|
2640
|
-
o("tr", null, [
|
|
2641
|
-
o("th", { style: { width: "12em" } }, "\u5FEB\u6377\u952E"),
|
|
2642
|
-
o("th", null, "\u529F\u80FD\u8BF4\u660E")
|
|
2643
|
-
]),
|
|
2644
|
-
o("tr", null, [
|
|
2645
|
-
o("td", null, [
|
|
2646
|
-
o("kbd", null, "\u2191"),
|
|
2647
|
-
$(" / "),
|
|
2648
|
-
o("kbd", null, "\u2193"),
|
|
2649
|
-
$(" / "),
|
|
2650
|
-
o("kbd", null, "\u2190"),
|
|
2651
|
-
$(" / "),
|
|
2652
|
-
o("kbd", null, "\u2192")
|
|
2653
|
-
]),
|
|
2654
|
-
o("td", null, "\u79FB\u52A8\u5F53\u524D\u9009\u4E2D\u7684\u7EC4\u4EF6\u3002\u6BCF\u6B21\u6309\u4E0B\u65B9\u5411\u952E\uFF0C\u9009\u4E2D\u7EC4\u4EF6\u4F1A\u5411\u5BF9\u5E94\u65B9\u5411\u5FAE\u8C03\u4E00\u4E2A\u5355\u4F4D\uFF0C\u9002\u5408\u8FDB\u884C\u7CBE\u786E\u7684\u4F4D\u7F6E\u8C03\u6574\u3002")
|
|
2655
|
-
])
|
|
2656
|
-
])
|
|
2657
|
-
], -1)),
|
|
2658
|
-
d[18] || (d[18] = o("h2", null, "\u56DB\u3001\u5DE5\u5177\u680F\u64CD\u4F5C", -1)),
|
|
2659
|
-
o("table", null, [
|
|
2660
|
-
o("tbody", null, [
|
|
2661
|
-
d[9] || (d[9] = o("tr", null, [
|
|
2662
|
-
o("th", { style: { width: "12em" } }, "\u56FE\u6807"),
|
|
2663
|
-
o("th", null, "\u529F\u80FD\u63CF\u8FF0")
|
|
2664
|
-
], -1)),
|
|
2665
|
-
o("tr", null, [
|
|
2666
|
-
o("td", null, [
|
|
2667
|
-
o("kbd", null, [
|
|
2668
|
-
s(x, { title: "\u9501\u5B9A" })
|
|
2669
|
-
])
|
|
2670
|
-
]),
|
|
2671
|
-
d[0] || (d[0] = o("td", null, "\u9501\u5B9A\u6216\u89E3\u9501 \u3002\u9501\u5B9A\u7684\u7EC4\u4EF6\uFF0C\u4E0D\u652F\u6301\u9F20\u6807\u79FB\u52A8\u64CD\u4F5C\uFF0C\u53EA\u652F\u6301\u952E\u76D8\u65B9\u5411\u952E\u5FAE\u8C03\u3002", -1))
|
|
2672
|
-
]),
|
|
2673
|
-
o("tr", null, [
|
|
2674
|
-
o("td", null, [
|
|
2675
|
-
o("kbd", null, [
|
|
2676
|
-
s(h, { title: "\u7F6E\u4E0E\u9876\u5C42" })
|
|
2677
|
-
])
|
|
2678
|
-
]),
|
|
2679
|
-
d[1] || (d[1] = o("td", null, "\u7B49\u6548\u8BBE\u7F6E \u6837\u5F0F-\u5143\u7D20\u5C42\u7EA7 = 9", -1))
|
|
2680
|
-
]),
|
|
2681
|
-
o("tr", null, [
|
|
2682
|
-
o("td", null, [
|
|
2683
|
-
o("kbd", null, [
|
|
2684
|
-
s(S, { title: "\u7F6E\u4E8E\u5E95\u5C42" })
|
|
2685
|
-
])
|
|
2686
|
-
]),
|
|
2687
|
-
d[2] || (d[2] = o("td", null, "\u7B49\u6548\u8BBE\u7F6E \u6837\u5F0F-\u5143\u7D20\u5C42\u7EA7 = 1", -1))
|
|
2688
|
-
]),
|
|
2689
|
-
o("tr", null, [
|
|
2690
|
-
o("td", null, [
|
|
2691
|
-
o("kbd", null, [
|
|
2692
|
-
s(w(ee), {
|
|
2693
|
-
type: "icon-24gl-textAlignLeft",
|
|
2694
|
-
title: "\u9760\u5DE6\u5BF9\u9F50"
|
|
2695
|
-
})
|
|
2696
|
-
])
|
|
2697
|
-
]),
|
|
2698
|
-
d[3] || (d[3] = o("td", null, "\u5355\u9009\u65F6\u6587\u5B57\u5DE6\u5BF9\u9F50\uFF0C\u591A\u9009\u65F6\u6309\u7167\u591A\u9009\u7684\u8282\u70B9\u7684\u6700\u5DE6\u4FA7\u5BF9\u9F50", -1))
|
|
2699
|
-
]),
|
|
2700
|
-
o("tr", null, [
|
|
2701
|
-
o("td", null, [
|
|
2702
|
-
o("kbd", null, [
|
|
2703
|
-
s(w(ee), {
|
|
2704
|
-
type: "icon-24gl-textAlignCenter",
|
|
2705
|
-
title: "\u5C45\u4E2D\u5BF9\u9F50"
|
|
2706
|
-
})
|
|
2707
|
-
])
|
|
2708
|
-
]),
|
|
2709
|
-
d[4] || (d[4] = o("td", null, "\u5355\u9009\u65F6\u6587\u5B57\u5C45\u4E2D\u5BF9\u9F50\uFF0C\u591A\u9009\u65F6\u6309\u7167\u591A\u9009\u7684\u8282\u70B9\u7684\u4E2D\u5FC3\u5BF9\u9F50", -1))
|
|
2710
|
-
]),
|
|
2711
|
-
o("tr", null, [
|
|
2712
|
-
o("td", null, [
|
|
2713
|
-
o("kbd", null, [
|
|
2714
|
-
s(w(ee), {
|
|
2715
|
-
type: "icon-24gl-textAlignRight",
|
|
2716
|
-
title: "\u9760\u53F3\u5BF9\u9F50"
|
|
2717
|
-
})
|
|
2718
|
-
])
|
|
2719
|
-
]),
|
|
2720
|
-
d[5] || (d[5] = o("td", null, "\u5355\u9009\u65F6\u6587\u5B57\u53F3\u5BF9\u9F50\uFF0C\u591A\u9009\u65F6\u6309\u7167\u591A\u9009\u7684\u8282\u70B9\u7684\u6700\u53F3\u4FA7\u5BF9\u9F50", -1))
|
|
2721
|
-
]),
|
|
2722
|
-
o("tr", null, [
|
|
2723
|
-
o("td", null, [
|
|
2724
|
-
o("kbd", null, [
|
|
2725
|
-
s(w(ee), {
|
|
2726
|
-
type: "icon-v-textAlignTop",
|
|
2727
|
-
title: "\u9876\u7AEF\u5BF9\u9F50"
|
|
2728
|
-
})
|
|
2729
|
-
])
|
|
2730
|
-
]),
|
|
2731
|
-
d[6] || (d[6] = o("td", null, "\u5355\u9009\u65F6\u6587\u5B57\u9876\u7AEF\u5BF9\u9F50\uFF0C\u591A\u9009\u65F6\u6309\u7167\u591A\u9009\u7684\u8282\u70B9\u7684\u6700\u9876\u7AEF\u5BF9\u9F50", -1))
|
|
2732
|
-
]),
|
|
2733
|
-
o("tr", null, [
|
|
2734
|
-
o("td", null, [
|
|
2735
|
-
o("kbd", null, [
|
|
2736
|
-
s(w(ee), {
|
|
2737
|
-
type: "icon-v-textAlignCenter",
|
|
2738
|
-
title: "\u5782\u76F4\u5C45\u4E2D\u5BF9\u9F50"
|
|
2739
|
-
})
|
|
2740
|
-
])
|
|
2741
|
-
]),
|
|
2742
|
-
d[7] || (d[7] = o("td", null, "\u5355\u9009\u65F6\u6587\u5B57\u9876\u7AEF\u5C45\u4E2D\u5BF9\u9F50\uFF0C\u591A\u9009\u65F6\u6309\u7167\u591A\u9009\u7684\u8282\u70B9\u7684\u9876\u7AEF\u4E2D\u5FC3\u5BF9\u9F50", -1))
|
|
2743
|
-
]),
|
|
2744
|
-
o("tr", null, [
|
|
2745
|
-
o("td", null, [
|
|
2746
|
-
o("kbd", null, [
|
|
2747
|
-
s(w(ee), {
|
|
2748
|
-
type: "icon-v-textAlignBottom",
|
|
2749
|
-
title: "\u5E95\u90E8\u5BF9\u9F50"
|
|
2750
|
-
})
|
|
2751
|
-
])
|
|
2752
|
-
]),
|
|
2753
|
-
d[8] || (d[8] = o("td", null, "\u5355\u9009\u65F6\u6587\u5B57\u5E95\u90E8\u5BF9\u9F50\uFF0C\u591A\u9009\u65F6\u6309\u7167\u591A\u9009\u7684\u8282\u70B9\u7684\u6700\u5E95\u7AEF\u5BF9\u9F50", -1))
|
|
2754
|
-
])
|
|
2755
|
-
])
|
|
2756
|
-
]),
|
|
2757
|
-
d[19] || (d[19] = o("h2", null, "\u4E94\u3001\u7EC4\u5408\u64CD\u4F5C\u5EFA\u8BAE", -1)),
|
|
2758
|
-
d[20] || (d[20] = o("ul", null, [
|
|
2759
|
-
o("li", null, [
|
|
2760
|
-
o("strong", null, "\u590D\u5236\u4E0E\u7C98\u8D34\u914D\u5408\u4F7F\u7528\uFF1A"),
|
|
2761
|
-
$(" \u5F53\u4F60\u9700\u8981\u91CD\u590D\u4F7F\u7528\u67D0\u4E2A\u7EC4\u4EF6\u6216\u6837\u5F0F\u65F6\uFF0C\u53EF\u4EE5\u5148\u4F7F\u7528 "),
|
|
2762
|
-
o("kbd", null, "Ctrl"),
|
|
2763
|
-
$(" + "),
|
|
2764
|
-
o("kbd", null, "C"),
|
|
2765
|
-
$(" \u590D\u5236\uFF0C\u7136\u540E\u5728\u9700\u8981\u7684\u4F4D\u7F6E\u4F7F\u7528 "),
|
|
2766
|
-
o("kbd", null, "Ctrl"),
|
|
2767
|
-
$(" + "),
|
|
2768
|
-
o("kbd", null, "V"),
|
|
2769
|
-
$(" \u7C98\u8D34\u3002 ")
|
|
2770
|
-
]),
|
|
2771
|
-
o("li", null, [
|
|
2772
|
-
o("strong", null, "\u64A4\u9500\u4E0E\u91CD\u505A\u4EA4\u66FF\u4F7F\u7528\uFF1A"),
|
|
2773
|
-
$(" \u5728\u4FEE\u6539\u8FC7\u7A0B\u4E2D\uFF0C\u82E5\u53D1\u73B0\u64A4\u9500\u8FC7\u591A\u6216\u8FC7\u5C11\uFF0C\u53EF\u4EE5\u901A\u8FC7 "),
|
|
2774
|
-
o("kbd", null, "Ctrl"),
|
|
2775
|
-
$(" + "),
|
|
2776
|
-
o("kbd", null, "Z"),
|
|
2777
|
-
$(" \u548C "),
|
|
2778
|
-
o("kbd", null, "Ctrl"),
|
|
2779
|
-
$(" + "),
|
|
2780
|
-
o("kbd", null, "Shift"),
|
|
2781
|
-
$(" + "),
|
|
2782
|
-
o("kbd", null, "Z"),
|
|
2783
|
-
$(" \u6765\u53CD\u590D\u8C03\u6574\u7248\u672C\u3002 ")
|
|
2784
|
-
]),
|
|
2785
|
-
o("li", null, [
|
|
2786
|
-
o("strong", null, "\u591A\u9009\u4E0E\u5220\u9664\u7ED3\u5408\uFF1A"),
|
|
2787
|
-
$(" \u5982\u679C\u9700\u8981\u4E00\u6B21\u6027\u5220\u9664\u591A\u4E2A\u4E0D\u76F8\u5173\u7684\u7EC4\u4EF6\uFF0C\u53EF\u4EE5\u4F7F\u7528 "),
|
|
2788
|
-
o("kbd", null, "Ctrl"),
|
|
2789
|
-
$(" + \u9F20\u6807\u5DE6\u952E\u591A\u9009\u540E\uFF0C\u518D\u6309\u4E0B "),
|
|
2790
|
-
o("kbd", null, "Del"),
|
|
2791
|
-
$(" \u952E\u6279\u91CF\u5220\u9664\u3002 ")
|
|
2792
|
-
])
|
|
2793
|
-
], -1)),
|
|
2794
|
-
d[21] || (d[21] = o("h2", null, "\u516D\u3001\u6CE8\u610F\u4E8B\u9879", -1)),
|
|
2795
|
-
d[22] || (d[22] = o("ol", null, [
|
|
2796
|
-
o("li", null, [
|
|
2797
|
-
o("strong", null, "Mac \u7528\u6237\u6CE8\u610F\uFF1A"),
|
|
2798
|
-
$(" \u5728 macOS \u7CFB\u7EDF\u4E2D\uFF0C "),
|
|
2799
|
-
o("kbd", null, "Ctrl"),
|
|
2800
|
-
$(" \u952E\u901A\u5E38\u7531 "),
|
|
2801
|
-
o("kbd", null, "Command"),
|
|
2802
|
-
$(" \u952E\u66FF\u4EE3\uFF0C\u4F8B\u5982\u590D\u5236\u4E3A "),
|
|
2803
|
-
o("kbd", null, "Command"),
|
|
2804
|
-
$(" + "),
|
|
2805
|
-
o("kbd", null, "C"),
|
|
2806
|
-
$(" \uFF0C\u7C98\u8D34\u4E3A "),
|
|
2807
|
-
o("kbd", null, "Command"),
|
|
2808
|
-
$(" + "),
|
|
2809
|
-
o("kbd", null, "V"),
|
|
2810
|
-
$(" \uFF0C\u64A4\u9500\u4E3A "),
|
|
2811
|
-
o("kbd", null, "Command"),
|
|
2812
|
-
$(" + "),
|
|
2813
|
-
o("kbd", null, "Z"),
|
|
2814
|
-
$(" \u7B49\u3002 ")
|
|
2815
|
-
])
|
|
2816
|
-
], -1))
|
|
2817
|
-
])
|
|
2818
|
-
]),
|
|
2819
|
-
_: 1
|
|
2820
|
-
})
|
|
2821
|
-
], 4)
|
|
2822
|
-
]),
|
|
2823
|
-
_: 1
|
|
2824
|
-
})
|
|
2825
|
-
]),
|
|
2826
|
-
_: 1
|
|
2827
|
-
}, 8, ["visible", "width"]);
|
|
2828
|
-
};
|
|
2829
|
-
}
|
|
2830
|
-
});
|
|
2831
|
-
function Dn(e) {
|
|
2832
|
-
return {
|
|
2833
|
-
clearPaper() {
|
|
2834
|
-
try {
|
|
2835
|
-
e == null || e.clear();
|
|
2836
|
-
} catch (t) {
|
|
2837
|
-
console.error("Failed to clear paper:", t);
|
|
2838
|
-
}
|
|
2839
|
-
},
|
|
2840
|
-
toPdf(t, n = "\u5BFC\u51FAPDF") {
|
|
2841
|
-
e == null || e.toPdf(t, n);
|
|
2842
|
-
},
|
|
2843
|
-
toPrint(t) {
|
|
2844
|
-
e == null || e.print(t);
|
|
2845
|
-
},
|
|
2846
|
-
updateJson(t) {
|
|
2847
|
-
if (e)
|
|
2848
|
-
try {
|
|
2849
|
-
e.update(JSON.parse(t));
|
|
2850
|
-
} catch (n) {
|
|
2851
|
-
console.error("Failed to update template with JSON:", n);
|
|
2852
|
-
}
|
|
2853
|
-
},
|
|
2854
|
-
exportJson() {
|
|
2855
|
-
return e ? JSON.stringify(e.getJson() || {}) : "";
|
|
2856
|
-
},
|
|
2857
|
-
setElsAlign(t) {
|
|
2858
|
-
t && (e == null || e.setElsAlign(t));
|
|
2859
|
-
},
|
|
2860
|
-
setElsSpace(t = !0, n = 10) {
|
|
2861
|
-
e == null || e.setElsSpace(n, t);
|
|
2862
|
-
},
|
|
2863
|
-
setEleSelectByField() {
|
|
2864
|
-
e == null || e.selectElementsByField(["name"]);
|
|
2865
|
-
},
|
|
2866
|
-
getSelectEls() {
|
|
2867
|
-
var t;
|
|
2868
|
-
return (t = e == null ? void 0 : e.getSelectEls()) != null ? t : [];
|
|
2869
|
-
},
|
|
2870
|
-
updateOption(t, n) {
|
|
2871
|
-
e == null || e.updateOption(t, n);
|
|
2872
|
-
}
|
|
2873
|
-
};
|
|
2874
|
-
}
|
|
2875
|
-
function $n(e, l) {
|
|
2876
|
-
var u;
|
|
2877
|
-
const t = (u = Be) == null ? void 0 : u.event;
|
|
2878
|
-
if (!e || !t || !l)
|
|
2879
|
-
return;
|
|
2880
|
-
const n = {
|
|
2881
|
-
onData: `hiprintTemplateDataChanged_${e.id}`,
|
|
2882
|
-
onSetting: `BuildCustomOptionSettingEventKey_${e.id}`,
|
|
2883
|
-
onSelect: `PrintElementSelectEventKey_${e.id}`
|
|
2884
|
-
};
|
|
2885
|
-
Object.keys(l).forEach((r) => t.on(n[r], l[r]));
|
|
2886
|
-
}
|
|
2887
|
-
const Sn = { class: "comp-hiprint-toolbar u-flex u-w" }, zn = { class: "u-flex" }, Vn = { class: "u-flex__item" }, On = { class: "u-flex" }, Rn = { class: "u-flex" }, Pn = { class: "u-flex__item" }, Tn = {
|
|
2888
|
-
key: 0,
|
|
2889
|
-
class: "u-flex__item u-flex"
|
|
2890
|
-
}, Mn = { class: "u-flex__item u-flex" }, jn = {
|
|
2891
|
-
class: "u-flex",
|
|
2892
|
-
style: { width: "8em" }
|
|
2893
|
-
}, In = { class: "u-flex u-flex__item" }, Un = { class: "u-flex__item" }, Nn = { class: "u-flex__item" }, qn = {
|
|
2894
|
-
class: "u-flex",
|
|
2895
|
-
style: { width: "10em" }
|
|
2896
|
-
}, Kn = { class: "u-flex__item" }, Ln = {
|
|
2897
|
-
class: "u-flex",
|
|
2898
|
-
style: { width: "10em" }
|
|
2899
|
-
}, Wn = { class: "u-flex__item" }, Hn = {
|
|
2900
|
-
key: 1,
|
|
2901
|
-
class: "u-flex__item u-flex"
|
|
2902
|
-
}, Gn = { class: "u-flex__item" }, Jn = { style: { "padding-left": "0.5em" } }, Yn = { style: { "padding-left": "0.5em" } }, Zn = {
|
|
2903
|
-
class: "comp-hiprint-toolbar-answer",
|
|
2904
|
-
title: "\u7ED3\u679C\u793A\u4F8B"
|
|
2905
|
-
}, Xn = {
|
|
2906
|
-
class: "u-flex u-center",
|
|
2907
|
-
style: { padding: "42px 72px 72px", "justify-content": "space-between" }
|
|
2908
|
-
}, Qn = {
|
|
2909
|
-
class: "comp-hiprint-toolbar-answer",
|
|
2910
|
-
style: { border: "0" }
|
|
2911
|
-
}, el = {
|
|
2912
|
-
class: "comp-hiprint-toolbar-answer",
|
|
2913
|
-
style: { border: "0" }
|
|
2914
|
-
}, tl = {
|
|
2915
|
-
class: "comp-hiprint-toolbar-answer",
|
|
2916
|
-
style: { border: "0" }
|
|
2917
|
-
}, ol = /* @__PURE__ */ ve({
|
|
2918
|
-
__name: "toolbar",
|
|
2919
|
-
props: {
|
|
2920
|
-
tpl: { default: void 0 },
|
|
2921
|
-
selectedId: { default: null },
|
|
2922
|
-
updateTime: { default: 0 },
|
|
2923
|
-
zoom: {},
|
|
2924
|
-
setZoom: {}
|
|
2925
|
-
},
|
|
2926
|
-
setup(e) {
|
|
2927
|
-
const l = e, t = N(null), n = de(() => Dn(l.tpl));
|
|
2928
|
-
function u() {
|
|
2929
|
-
return l.tpl ? l.tpl.getSelectEls() : [];
|
|
2930
|
-
}
|
|
2931
|
-
const r = {
|
|
2932
|
-
width: 960,
|
|
2933
|
-
titleAlign: "start",
|
|
2934
|
-
modalClass: "comp-hiprint-toolbar",
|
|
2935
|
-
bodyStyle: { padding: "12px 24px" },
|
|
2936
|
-
unmountOnClose: !0
|
|
2937
|
-
}, i = () => u().length, f = () => Boolean(i() && t.value);
|
|
2938
|
-
function E() {
|
|
2939
|
-
var F, a;
|
|
2940
|
-
return f() ? String((a = (F = t.value) == null ? void 0 : F.printElementType) == null ? void 0 : a.type) === "text" : !1;
|
|
2941
|
-
}
|
|
2942
|
-
function y(F = !1) {
|
|
2943
|
-
var z, L, X, m, g, p, W, ce, pe;
|
|
2944
|
-
const a = u();
|
|
2945
|
-
if (a.length > 1) {
|
|
2946
|
-
const te = F ? "top" : "left", G = F ? "height" : "width", fe = a.reduce((ue, ne) => {
|
|
2947
|
-
var he, Ce;
|
|
2948
|
-
return ue += (Ce = (he = ne == null ? void 0 : ne.options) == null ? void 0 : he[G]) != null ? Ce : 0, ue;
|
|
2949
|
-
}, 0), O = a.length - 1, me = ((X = (L = (z = a[O]) == null ? void 0 : z.options) == null ? void 0 : L[te]) != null ? X : 0) + ((p = (g = (m = a[O]) == null ? void 0 : m.options) == null ? void 0 : g[G]) != null ? p : 0) - ((pe = (ce = (W = a[0]) == null ? void 0 : W.options) == null ? void 0 : ce[te]) != null ? pe : 0);
|
|
2950
|
-
return Math.max(0, +((me - fe) / O).toFixed(2));
|
|
2951
|
-
}
|
|
2952
|
-
}
|
|
2953
|
-
const d = () => {
|
|
2954
|
-
const F = u();
|
|
2955
|
-
if (!F.length) {
|
|
2956
|
-
t.value = null;
|
|
2957
|
-
return;
|
|
2958
|
-
}
|
|
2959
|
-
t.value = F.find((a) => a.id === l.selectedId) || F[F.length - 1] || null;
|
|
2960
|
-
};
|
|
2961
|
-
function x(F, a, z = !0) {
|
|
2962
|
-
n.value.updateOption(F, a), z && d();
|
|
2963
|
-
}
|
|
2964
|
-
function h(F, a) {
|
|
2965
|
-
var X;
|
|
2966
|
-
const z = { shape: "square", size: "small" }, L = (X = t.value) == null ? void 0 : X.options;
|
|
2967
|
-
return F && L && L[F] === a ? { ...z, style: { color: "rgb(var(--primary-6))" } } : z;
|
|
2968
|
-
}
|
|
2969
|
-
Ae(() => l.updateTime, d);
|
|
2970
|
-
function S() {
|
|
2971
|
-
var a, z;
|
|
2972
|
-
const F = ((z = (a = t.value) == null ? void 0 : a.options) == null ? void 0 : z.draggable) === !1;
|
|
2973
|
-
x("draggable", F);
|
|
2974
|
-
}
|
|
2975
|
-
function M() {
|
|
2976
|
-
x("fontWeight", "line-through", !1), x("textDecoration", "none", !1), x("fontSize", "", !1), x("fontWeight", "400");
|
|
2977
|
-
}
|
|
2978
|
-
function T(F) {
|
|
2979
|
-
if (u().length === 1) {
|
|
2980
|
-
let a = F;
|
|
2981
|
-
F === "vertical" && (a = "center"), ["left", "vertical", "right"].includes(F) ? x("textAlign", a, !1) : x("textContentVerticalAlign", a, !1);
|
|
2982
|
-
} else
|
|
2983
|
-
l.tpl && l.tpl.setElsAlign(F);
|
|
2984
|
-
d();
|
|
2985
|
-
}
|
|
2986
|
-
const [v] = ze({
|
|
2987
|
-
visible: !1,
|
|
2988
|
-
fields: [],
|
|
2989
|
-
list: [],
|
|
2990
|
-
types: [
|
|
2991
|
-
{ value: "field", label: "\u5B57\u6BB5\u540D" },
|
|
2992
|
-
{ value: "string", label: "\u56FA\u5B9A\u503C " }
|
|
2993
|
-
]
|
|
2994
|
-
}), [A] = ze({ visible: !1, px: null, mm: null, pt: null }), k = (F, a) => {
|
|
2995
|
-
switch (a) {
|
|
2996
|
-
case "pt":
|
|
2997
|
-
A.value.mm = +Be.pt.toMm(F).toFixed(3), A.value.px = +Be.pt.toPx(F).toFixed(3);
|
|
2998
|
-
break;
|
|
2999
|
-
case "mm":
|
|
3000
|
-
A.value.pt = +Be.mm.toPt(F).toFixed(3), A.value.px = +Be.mm.toPx(F).toFixed(3);
|
|
3001
|
-
break;
|
|
3002
|
-
default:
|
|
3003
|
-
A.value.pt = +Be.px.toPt(F).toFixed(3), A.value.mm = +Be.px.toMm(F).toFixed(3);
|
|
3004
|
-
break;
|
|
3005
|
-
}
|
|
3006
|
-
}, D = de(() => {
|
|
3007
|
-
const F = v.value.list;
|
|
3008
|
-
return { key: "test", source: Object.fromEntries(
|
|
3009
|
-
[...F].filter((z) => z.field).map((z) => {
|
|
3010
|
-
let L = "";
|
|
3011
|
-
switch (z.dataType) {
|
|
3012
|
-
case "datetime":
|
|
3013
|
-
L = new Date().toLocaleString();
|
|
3014
|
-
break;
|
|
3015
|
-
case "boolean":
|
|
3016
|
-
L = Math.random() >= 0.5 ? 1 : 0;
|
|
3017
|
-
break;
|
|
3018
|
-
}
|
|
3019
|
-
return [z.field, L];
|
|
3020
|
-
})
|
|
3021
|
-
), format: F };
|
|
3022
|
-
}), K = (F) => {
|
|
3023
|
-
v.value.list.length > 1 && v.value.list.splice(F, 1);
|
|
3024
|
-
}, H = (F = 0) => {
|
|
3025
|
-
v.value.list.splice(F + 1, 0, { type: "string", field: "", value: "", start: void 0, length: void 0, dataType: void 0, format: void 0 });
|
|
3026
|
-
}, P = () => {
|
|
3027
|
-
const F = JSON.stringify(v.value.list);
|
|
3028
|
-
x("dataType", "format", !1), x("format", F), Oe(".hiprint-option-item-datatype-input-format").addClass("hiprint-option-item-datatype-format").val(F).trigger("change").show().siblings().hide().removeClass("hiprint-option-item-datatype-format");
|
|
3029
|
-
};
|
|
3030
|
-
function re() {
|
|
3031
|
-
var z, L, X, m;
|
|
3032
|
-
if (!E())
|
|
3033
|
-
return;
|
|
3034
|
-
const F = (X = (L = (z = t.value) == null ? void 0 : z.options) == null ? void 0 : L.format) != null ? X : "[]";
|
|
3035
|
-
v.value.visible = !0;
|
|
3036
|
-
function a(g = []) {
|
|
3037
|
-
return g.filter((p) => p.field && p.type !== "table").map((p) => {
|
|
3038
|
-
var te, G;
|
|
3039
|
-
const W = p.field, pe = { label: (te = p.text) != null ? te : W, value: W };
|
|
3040
|
-
return p.type === "object" && ((G = p.fields) == null ? void 0 : G.length) && (pe.children = a(p.fields)), pe;
|
|
3041
|
-
});
|
|
3042
|
-
}
|
|
3043
|
-
v.value.fields = a((m = l.tpl) == null ? void 0 : m.fields), v.value.list = [];
|
|
3044
|
-
try {
|
|
3045
|
-
if (v.value.list = JSON.parse(F), !Array.isArray(v.value.list))
|
|
3046
|
-
throw new Error("not array");
|
|
3047
|
-
} catch (g) {
|
|
3048
|
-
console.warn(g), v.value.list = [];
|
|
3049
|
-
}
|
|
3050
|
-
v.value.list.length || H();
|
|
3051
|
-
}
|
|
3052
|
-
return (F, a) => {
|
|
3053
|
-
const z = b("AButton"), L = b("AButtonGroup"), X = b("ADivider"), m = b("icon-lock"), g = b("icon-to-top"), p = b("icon-to-bottom"), W = b("icon-zoom-in"), ce = b("icon-original-size"), pe = b("ASpace"), te = b("a-select"), G = b("a-cascader"), fe = b("a-input"), O = b("a-input-number"), xe = b("icon-plus"), me = b("a-button"), ue = b("icon-minus"), ne = b("AForm"), he = b("AModal"), Ce = b("AInputNumber");
|
|
3054
|
-
return _(), q("div", Sn, [
|
|
3055
|
-
o("div", zn, [
|
|
3056
|
-
Q(F.$slots, "left", {
|
|
3057
|
-
tools: n.value,
|
|
3058
|
-
options: t.value
|
|
3059
|
-
})
|
|
3060
|
-
]),
|
|
3061
|
-
o("div", Vn, [
|
|
3062
|
-
s(pe, { size: "mini" }, {
|
|
3063
|
-
default: c(() => [
|
|
3064
|
-
s(L, { size: "mini" }, {
|
|
3065
|
-
default: c(() => [
|
|
3066
|
-
s(z, I({ title: "\u9760\u5DE6\u5BF9\u9F50" }, h(), {
|
|
3067
|
-
onClick: a[0] || (a[0] = (j) => T("left"))
|
|
3068
|
-
}), {
|
|
3069
|
-
icon: c(() => [
|
|
3070
|
-
s(w(ee), { type: "icon-24gl-textAlignLeft" })
|
|
3071
|
-
]),
|
|
3072
|
-
_: 1
|
|
3073
|
-
}, 16),
|
|
3074
|
-
s(z, I({ title: "\u5C45\u4E2D\u5BF9\u9F50" }, h(), {
|
|
3075
|
-
onClick: a[1] || (a[1] = (j) => T("vertical"))
|
|
3076
|
-
}), {
|
|
3077
|
-
icon: c(() => [
|
|
3078
|
-
s(w(ee), { type: "icon-24gl-textAlignCenter" })
|
|
3079
|
-
]),
|
|
3080
|
-
_: 1
|
|
3081
|
-
}, 16),
|
|
3082
|
-
s(z, I({ title: "\u9760\u5DE6\u5BF9\u9F50" }, h(), {
|
|
3083
|
-
onClick: a[2] || (a[2] = (j) => T("right"))
|
|
3084
|
-
}), {
|
|
3085
|
-
icon: c(() => [
|
|
3086
|
-
s(w(ee), { type: "icon-24gl-textAlignRight" })
|
|
3087
|
-
]),
|
|
3088
|
-
_: 1
|
|
3089
|
-
}, 16),
|
|
3090
|
-
s(z, I({ title: "\u9876\u7AEF\u5BF9\u9F50" }, h(), {
|
|
3091
|
-
onClick: a[3] || (a[3] = (j) => T("top"))
|
|
3092
|
-
}), {
|
|
3093
|
-
icon: c(() => [
|
|
3094
|
-
s(w(ee), { type: "icon-v-textAlignTop" })
|
|
3095
|
-
]),
|
|
3096
|
-
_: 1
|
|
3097
|
-
}, 16),
|
|
3098
|
-
s(z, I({ title: "\u5C45\u4E2D\u5BF9\u9F50" }, h(), {
|
|
3099
|
-
onClick: a[4] || (a[4] = (j) => T("horizontal"))
|
|
3100
|
-
}), {
|
|
3101
|
-
icon: c(() => [
|
|
3102
|
-
s(w(ee), { type: "icon-v-textAlignCenter" })
|
|
3103
|
-
]),
|
|
3104
|
-
_: 1
|
|
3105
|
-
}, 16),
|
|
3106
|
-
s(z, I({ title: "\u5E95\u90E8\u5BF9\u9F50" }, h(), {
|
|
3107
|
-
onClick: a[5] || (a[5] = (j) => T("bottom"))
|
|
3108
|
-
}), {
|
|
3109
|
-
icon: c(() => [
|
|
3110
|
-
s(w(ee), { type: "icon-v-textAlignBottom" })
|
|
3111
|
-
]),
|
|
3112
|
-
_: 1
|
|
3113
|
-
}, 16),
|
|
3114
|
-
s(z, I({ title: "\u6C34\u5E73\u7B49\u5206" }, h(), {
|
|
3115
|
-
onClick: a[6] || (a[6] = (j) => n.value.setElsSpace(!0, y()))
|
|
3116
|
-
}), {
|
|
3117
|
-
icon: c(() => [
|
|
3118
|
-
s(w(ee), { type: "icon-v-lineSpacing" })
|
|
3119
|
-
]),
|
|
3120
|
-
_: 1
|
|
3121
|
-
}, 16),
|
|
3122
|
-
s(z, I({ title: "\u5782\u76F4\u7B49\u5206" }, h(), {
|
|
3123
|
-
onClick: a[7] || (a[7] = (j) => n.value.setElsSpace(!1, y(!0)))
|
|
3124
|
-
}), {
|
|
3125
|
-
icon: c(() => [
|
|
3126
|
-
s(w(ee), { type: "icon-24gl-lineSpacing" })
|
|
3127
|
-
]),
|
|
3128
|
-
_: 1
|
|
3129
|
-
}, 16)
|
|
3130
|
-
]),
|
|
3131
|
-
_: 1
|
|
3132
|
-
}),
|
|
3133
|
-
s(X, {
|
|
3134
|
-
direction: "vertical",
|
|
3135
|
-
margin: 2
|
|
3136
|
-
}),
|
|
3137
|
-
s(L, { size: "mini" }, {
|
|
3138
|
-
default: c(() => [
|
|
3139
|
-
s(z, I({ title: "\u6807\u9898" }, h("fontSize", "19"), {
|
|
3140
|
-
onClick: a[8] || (a[8] = (j) => x("fontSize", "19"))
|
|
3141
|
-
}), {
|
|
3142
|
-
icon: c(() => [
|
|
3143
|
-
s(w(ee), { type: "icon-24gl-title" })
|
|
3144
|
-
]),
|
|
3145
|
-
_: 1
|
|
3146
|
-
}, 16),
|
|
3147
|
-
s(z, I({ title: "\u6B63\u6587" }, h("fontSize", "9"), {
|
|
3148
|
-
onClick: a[9] || (a[9] = (j) => x("fontSize", "9"))
|
|
3149
|
-
}), {
|
|
3150
|
-
icon: c(() => [
|
|
3151
|
-
s(w(ee), { type: "icon-24gl-fontSize" })
|
|
3152
|
-
]),
|
|
3153
|
-
_: 1
|
|
3154
|
-
}, 16),
|
|
3155
|
-
s(z, I({ title: "\u52A0\u7C97" }, h("fontWeight", "bold"), {
|
|
3156
|
-
onClick: a[10] || (a[10] = (j) => x("fontWeight", "bold"))
|
|
3157
|
-
}), {
|
|
3158
|
-
icon: c(() => [
|
|
3159
|
-
s(w(ee), { type: "icon-24gl-bold" })
|
|
3160
|
-
]),
|
|
3161
|
-
_: 1
|
|
3162
|
-
}, 16),
|
|
3163
|
-
s(z, I({ title: "\u4E0B\u5212\u7EBF" }, h("textDecoration", "underline"), {
|
|
3164
|
-
onClick: a[11] || (a[11] = (j) => x("textDecoration", "underline"))
|
|
3165
|
-
}), {
|
|
3166
|
-
icon: c(() => [
|
|
3167
|
-
s(w(ee), { type: "icon-24gl-underline" })
|
|
3168
|
-
]),
|
|
3169
|
-
_: 1
|
|
3170
|
-
}, 16),
|
|
3171
|
-
s(z, I({ title: "\u5220\u9664\u7EBF" }, h("textDecoration", "line-through"), {
|
|
3172
|
-
onClick: a[12] || (a[12] = (j) => x("textDecoration", "line-through"))
|
|
3173
|
-
}), {
|
|
3174
|
-
icon: c(() => [
|
|
3175
|
-
s(w(ee), { type: "icon-24gl-strikethrough2" })
|
|
3176
|
-
]),
|
|
3177
|
-
_: 1
|
|
3178
|
-
}, 16),
|
|
3179
|
-
s(z, I({ title: "\u6E05\u9664\u683C\u5F0F" }, h(), {
|
|
3180
|
-
onClick: a[13] || (a[13] = (j) => M())
|
|
3181
|
-
}), {
|
|
3182
|
-
icon: c(() => [
|
|
3183
|
-
s(w(ee), { type: "icon-24gl-formatClear" })
|
|
3184
|
-
]),
|
|
3185
|
-
_: 1
|
|
3186
|
-
}, 16)
|
|
3187
|
-
]),
|
|
3188
|
-
_: 1
|
|
3189
|
-
}),
|
|
3190
|
-
s(X, {
|
|
3191
|
-
direction: "vertical",
|
|
3192
|
-
margin: 2
|
|
3193
|
-
}),
|
|
3194
|
-
s(L, {
|
|
3195
|
-
disabled: 1 > i()
|
|
3196
|
-
}, {
|
|
3197
|
-
default: c(() => [
|
|
3198
|
-
s(z, I(h("draggable", !1), {
|
|
3199
|
-
title: "\u9501\u5B9A/\u53D6\u6D88",
|
|
3200
|
-
onClick: a[14] || (a[14] = (j) => S())
|
|
3201
|
-
}), {
|
|
3202
|
-
icon: c(() => [
|
|
3203
|
-
s(m)
|
|
3204
|
-
]),
|
|
3205
|
-
_: 1
|
|
3206
|
-
}, 16),
|
|
3207
|
-
s(z, I(h("zIndex", "9"), {
|
|
3208
|
-
title: "\u7F6E\u4E8E\u9876\u5C42",
|
|
3209
|
-
onClick: a[15] || (a[15] = (j) => x("zIndex", "9"))
|
|
3210
|
-
}), {
|
|
3211
|
-
icon: c(() => [
|
|
3212
|
-
s(g)
|
|
3213
|
-
]),
|
|
3214
|
-
_: 1
|
|
3215
|
-
}, 16),
|
|
3216
|
-
s(z, I(h("zIndex", "1"), {
|
|
3217
|
-
title: "\u7F6E\u4E8E\u5E95\u5C42",
|
|
3218
|
-
onClick: a[16] || (a[16] = (j) => x("zIndex", "1"))
|
|
3219
|
-
}), {
|
|
3220
|
-
icon: c(() => [
|
|
3221
|
-
s(p)
|
|
3222
|
-
]),
|
|
3223
|
-
_: 1
|
|
3224
|
-
}, 16)
|
|
3225
|
-
]),
|
|
3226
|
-
_: 1
|
|
3227
|
-
}, 8, ["disabled"]),
|
|
3228
|
-
s(X, {
|
|
3229
|
-
direction: "vertical",
|
|
3230
|
-
margin: 2
|
|
3231
|
-
}),
|
|
3232
|
-
s(z, I(h(), {
|
|
3233
|
-
onClick: a[17] || (a[17] = (j) => F.setZoom(l.zoom === 1 ? 2 : 1))
|
|
3234
|
-
}), {
|
|
3235
|
-
icon: c(() => [
|
|
3236
|
-
l.zoom === 1 ? (_(), R(W, { key: 0 })) : (_(), R(ce, { key: 1 }))
|
|
3237
|
-
]),
|
|
3238
|
-
_: 1
|
|
3239
|
-
}, 16),
|
|
3240
|
-
s(z, I(h(), {
|
|
3241
|
-
title: "\u5355\u4F4D\u8F6C\u6362",
|
|
3242
|
-
onClick: a[18] || (a[18] = (j) => w(A).visible = !0)
|
|
3243
|
-
}), {
|
|
3244
|
-
icon: c(() => [
|
|
3245
|
-
s(w(ee), { type: "icon-scale" })
|
|
3246
|
-
]),
|
|
3247
|
-
_: 1
|
|
3248
|
-
}, 16),
|
|
3249
|
-
s(z, I(h(), {
|
|
3250
|
-
title: "\u81EA\u5B9A\u4E49\u683C\u5F0F",
|
|
3251
|
-
disabled: !E(),
|
|
3252
|
-
onClick: a[19] || (a[19] = (j) => re())
|
|
3253
|
-
}), {
|
|
3254
|
-
icon: c(() => [
|
|
3255
|
-
s(w(ee), { type: "icon-zidingyi" })
|
|
3256
|
-
]),
|
|
3257
|
-
_: 1
|
|
3258
|
-
}, 16, ["disabled"])
|
|
3259
|
-
]),
|
|
3260
|
-
_: 1
|
|
3261
|
-
})
|
|
3262
|
-
]),
|
|
3263
|
-
o("div", On, [
|
|
3264
|
-
Q(F.$slots, "right", {
|
|
3265
|
-
tools: n.value,
|
|
3266
|
-
options: t.value
|
|
3267
|
-
})
|
|
3268
|
-
]),
|
|
3269
|
-
s(he, I({
|
|
3270
|
-
visible: w(v).visible,
|
|
3271
|
-
"onUpdate:visible": a[20] || (a[20] = (j) => w(v).visible = j)
|
|
3272
|
-
}, r, {
|
|
3273
|
-
title: "\u81EA\u5B9A\u4E49\u683C\u5F0F",
|
|
3274
|
-
onOk: a[21] || (a[21] = (j) => P())
|
|
3275
|
-
}), {
|
|
3276
|
-
default: c(() => {
|
|
3277
|
-
var j;
|
|
3278
|
-
return [
|
|
3279
|
-
s(ne, {
|
|
3280
|
-
model: {},
|
|
3281
|
-
size: "small",
|
|
3282
|
-
class: "comp-hiprint-toolbar-form"
|
|
3283
|
-
}, {
|
|
3284
|
-
default: c(() => [
|
|
3285
|
-
(_(!0), q(_e, null, $e(w(v).list, (le, Pe) => (_(), q("div", {
|
|
3286
|
-
key: Pe,
|
|
3287
|
-
class: "u-flex u-mt"
|
|
3288
|
-
}, [
|
|
3289
|
-
o("div", Rn, [
|
|
3290
|
-
a[29] || (a[29] = o("span", { class: "comp-hiprint-toolbar-label" }, "\u7C7B\u578B", -1)),
|
|
3291
|
-
o("div", Pn, [
|
|
3292
|
-
s(te, {
|
|
3293
|
-
modelValue: le.type,
|
|
3294
|
-
"onUpdate:modelValue": (ie) => le.type = ie,
|
|
3295
|
-
options: w(v).types
|
|
3296
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "options"])
|
|
3297
|
-
])
|
|
3298
|
-
]),
|
|
3299
|
-
le.type === "field" ? (_(), q("div", Tn, [
|
|
3300
|
-
a[34] || (a[34] = o("span", { class: "comp-hiprint-toolbar-label" }, "\u5B57\u6BB5", -1)),
|
|
3301
|
-
o("div", Mn, [
|
|
3302
|
-
o("div", jn, [
|
|
3303
|
-
s(G, {
|
|
3304
|
-
"model-value": Array.isArray(le.field) ? le.field : String(le.field || "").split("."),
|
|
3305
|
-
options: w(v).fields,
|
|
3306
|
-
"allow-search": "",
|
|
3307
|
-
"allow-create": "",
|
|
3308
|
-
"path-mode": "",
|
|
3309
|
-
placeholder: "\u8BF7\u9009\u62E9",
|
|
3310
|
-
"trigger-props": { autoFitPopupMinWidth: !0, contentClass: "arco-empty-body" },
|
|
3311
|
-
"onUpdate:modelValue": (ie) => le.field = Array.isArray(ie) ? ie.join(".") : ie
|
|
3312
|
-
}, null, 8, ["model-value", "options", "onUpdate:modelValue"])
|
|
3313
|
-
]),
|
|
3314
|
-
o("div", In, [
|
|
3315
|
-
a[30] || (a[30] = o("label", { class: "comp-hiprint-toolbar-label" }, "\u683C\u5F0F\u7C7B\u578B", -1)),
|
|
3316
|
-
o("div", Un, [
|
|
3317
|
-
s(te, {
|
|
3318
|
-
modelValue: le.dataType,
|
|
3319
|
-
"onUpdate:modelValue": (ie) => le.dataType = ie,
|
|
3320
|
-
style: { width: "100%" },
|
|
3321
|
-
"allow-clear": "",
|
|
3322
|
-
"trigger-props": { autoFitPopupMinWidth: !0, contentClass: "arco-empty-body" },
|
|
3323
|
-
options: [
|
|
3324
|
-
{ label: "\u65E5\u671F\u683C\u5F0F", value: "datetime" },
|
|
3325
|
-
{ label: "\u5E03\u5C14\u503C", value: "boolean" }
|
|
3326
|
-
],
|
|
3327
|
-
placeholder: "\u9ED8\u8BA4"
|
|
3328
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
3329
|
-
]),
|
|
3330
|
-
a[31] || (a[31] = o("span", { class: "comp-hiprint-toolbar-label" }, "\u683C\u5F0F", -1)),
|
|
3331
|
-
o("div", Nn, [
|
|
3332
|
-
le.dataType === "datetime" ? (_(), R(te, {
|
|
3333
|
-
key: 0,
|
|
3334
|
-
modelValue: le.format,
|
|
3335
|
-
"onUpdate:modelValue": (ie) => le.format = ie,
|
|
3336
|
-
style: { width: "100%" },
|
|
3337
|
-
"allow-clear": "",
|
|
3338
|
-
"trigger-props": { autoFitPopupMinWidth: !0, contentClass: "arco-empty-body" },
|
|
3339
|
-
options: w(Be).configs.DATE_TYPES,
|
|
3340
|
-
placeholder: "\u9ED8\u8BA4"
|
|
3341
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : (_(), R(fe, {
|
|
3342
|
-
key: 1,
|
|
3343
|
-
modelValue: le.format,
|
|
3344
|
-
"onUpdate:modelValue": (ie) => le.format = ie,
|
|
3345
|
-
"allow-clear": ""
|
|
3346
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]))
|
|
3347
|
-
])
|
|
3348
|
-
]),
|
|
3349
|
-
o("div", qn, [
|
|
3350
|
-
a[32] || (a[32] = o("label", { class: "comp-hiprint-toolbar-label" }, "\u56FA\u5B9A\u957F\u5EA6", -1)),
|
|
3351
|
-
o("div", Kn, [
|
|
3352
|
-
s(O, {
|
|
3353
|
-
modelValue: le.length,
|
|
3354
|
-
"onUpdate:modelValue": (ie) => le.length = ie,
|
|
3355
|
-
"allow-clear": "",
|
|
3356
|
-
"trigger-props": { autoFitPopupMinWidth: !0, contentClass: "arco-empty-body" },
|
|
3357
|
-
placeholder: "\u9ED8\u8BA4"
|
|
3358
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
3359
|
-
])
|
|
3360
|
-
]),
|
|
3361
|
-
o("div", Ln, [
|
|
3362
|
-
a[33] || (a[33] = o("label", { class: "comp-hiprint-toolbar-label" }, "\u5F00\u59CB\u4F4D\u7F6E", -1)),
|
|
3363
|
-
o("div", Wn, [
|
|
3364
|
-
s(O, {
|
|
3365
|
-
modelValue: le.start,
|
|
3366
|
-
"onUpdate:modelValue": (ie) => le.start = ie,
|
|
3367
|
-
"allow-clear": "",
|
|
3368
|
-
placeholder: "\u9ED8\u8BA4"
|
|
3369
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
3370
|
-
])
|
|
3371
|
-
])
|
|
3372
|
-
])
|
|
3373
|
-
])) : (_(), q("div", Hn, [
|
|
3374
|
-
a[35] || (a[35] = o("span", { class: "comp-hiprint-toolbar-label" }, "\u5185\u5BB9", -1)),
|
|
3375
|
-
o("div", Gn, [
|
|
3376
|
-
s(fe, {
|
|
3377
|
-
modelValue: le.value,
|
|
3378
|
-
"onUpdate:modelValue": (ie) => le.value = ie
|
|
3379
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
3380
|
-
])
|
|
3381
|
-
])),
|
|
3382
|
-
o("div", Jn, [
|
|
3383
|
-
s(me, {
|
|
3384
|
-
shape: "circle",
|
|
3385
|
-
onClick: (ie) => H(Pe)
|
|
3386
|
-
}, {
|
|
3387
|
-
icon: c(() => [
|
|
3388
|
-
s(xe)
|
|
3389
|
-
]),
|
|
3390
|
-
_: 2
|
|
3391
|
-
}, 1032, ["onClick"])
|
|
3392
|
-
]),
|
|
3393
|
-
o("div", Yn, [
|
|
3394
|
-
s(me, {
|
|
3395
|
-
shape: "circle",
|
|
3396
|
-
onClick: (ie) => K(Pe)
|
|
3397
|
-
}, {
|
|
3398
|
-
icon: c(() => [
|
|
3399
|
-
s(ue)
|
|
3400
|
-
]),
|
|
3401
|
-
_: 2
|
|
3402
|
-
}, 1032, ["onClick"])
|
|
3403
|
-
])
|
|
3404
|
-
]))), 128))
|
|
3405
|
-
]),
|
|
3406
|
-
_: 1
|
|
3407
|
-
}),
|
|
3408
|
-
a[36] || (a[36] = o("div", { style: { "padding-bottom": "12px", "margin-bottom": "24px", "border-bottom": "1px dashed #d2d2d2" } }, null, -1)),
|
|
3409
|
-
o("div", Zn, oe((j = w(Be).utils) == null ? void 0 : j.executeCustomFormat(D.value)), 1)
|
|
3410
|
-
];
|
|
3411
|
-
}),
|
|
3412
|
-
_: 1,
|
|
3413
|
-
__: [36]
|
|
3414
|
-
}, 16, ["visible"]),
|
|
3415
|
-
s(he, I({
|
|
3416
|
-
visible: w(A).visible,
|
|
3417
|
-
"onUpdate:visible": a[28] || (a[28] = (j) => w(A).visible = j)
|
|
3418
|
-
}, r, { title: "\u5355\u4F4D\u8F6C\u6362" }), {
|
|
3419
|
-
default: c(() => [
|
|
3420
|
-
o("div", Xn, [
|
|
3421
|
-
o("div", Qn, [
|
|
3422
|
-
s(Ce, {
|
|
3423
|
-
modelValue: w(A).mm,
|
|
3424
|
-
"onUpdate:modelValue": [
|
|
3425
|
-
a[22] || (a[22] = (j) => w(A).mm = j),
|
|
3426
|
-
a[23] || (a[23] = (j) => k(j, "mm"))
|
|
3427
|
-
],
|
|
3428
|
-
size: "large",
|
|
3429
|
-
mode: "button"
|
|
3430
|
-
}, null, 8, ["modelValue"]),
|
|
3431
|
-
a[37] || (a[37] = o("div", null, "mm", -1))
|
|
3432
|
-
]),
|
|
3433
|
-
a[40] || (a[40] = o("div", { style: { width: "2em" } }, null, -1)),
|
|
3434
|
-
o("div", el, [
|
|
3435
|
-
s(Ce, {
|
|
3436
|
-
modelValue: w(A).pt,
|
|
3437
|
-
"onUpdate:modelValue": [
|
|
3438
|
-
a[24] || (a[24] = (j) => w(A).pt = j),
|
|
3439
|
-
a[25] || (a[25] = (j) => k(j, "pt"))
|
|
3440
|
-
],
|
|
3441
|
-
size: "large",
|
|
3442
|
-
mode: "button"
|
|
3443
|
-
}, null, 8, ["modelValue"]),
|
|
3444
|
-
a[38] || (a[38] = o("div", null, "pt", -1))
|
|
3445
|
-
]),
|
|
3446
|
-
a[41] || (a[41] = o("div", { style: { width: "2em" } }, null, -1)),
|
|
3447
|
-
o("div", tl, [
|
|
3448
|
-
s(Ce, {
|
|
3449
|
-
modelValue: w(A).px,
|
|
3450
|
-
"onUpdate:modelValue": [
|
|
3451
|
-
a[26] || (a[26] = (j) => w(A).px = j),
|
|
3452
|
-
a[27] || (a[27] = (j) => k(j, "px"))
|
|
3453
|
-
],
|
|
3454
|
-
size: "large",
|
|
3455
|
-
mode: "button"
|
|
3456
|
-
}, null, 8, ["modelValue"]),
|
|
3457
|
-
a[39] || (a[39] = o("div", null, "px", -1))
|
|
3458
|
-
])
|
|
3459
|
-
])
|
|
3460
|
-
]),
|
|
3461
|
-
_: 1
|
|
3462
|
-
}, 16, ["visible"])
|
|
3463
|
-
]);
|
|
3464
|
-
};
|
|
3465
|
-
}
|
|
3466
|
-
});
|
|
3467
|
-
const nl = { class: "comp-toolbar-ext__ul" }, ll = ["onClick"], ul = { class: "comp-toolbar-ext__ul" }, il = ["onClick", "onMouseover", "onMouseout"], sl = /* @__PURE__ */ ve({
|
|
3468
|
-
__name: "toolbar-ext",
|
|
3469
|
-
props: {
|
|
3470
|
-
tpl: { default: void 0 },
|
|
3471
|
-
updateTime: { default: 0 }
|
|
3472
|
-
},
|
|
3473
|
-
setup(e) {
|
|
3474
|
-
const l = e;
|
|
3475
|
-
function t() {
|
|
3476
|
-
var f;
|
|
3477
|
-
if (typeof ((f = l.tpl) == null ? void 0 : f.update) == "function")
|
|
3478
|
-
return l.tpl;
|
|
3479
|
-
throw new Error("[hi-print]: mounted error");
|
|
3480
|
-
}
|
|
3481
|
-
const n = de(() => {
|
|
3482
|
-
const f = t();
|
|
3483
|
-
return f.updateTime = l.updateTime, [...f.getPanel().printElements].map((E) => {
|
|
3484
|
-
var y, d, x, h;
|
|
3485
|
-
return {
|
|
3486
|
-
id: E.id,
|
|
3487
|
-
title: ((y = E.options) == null ? void 0 : y.title) || "\u672A\u547D\u540D",
|
|
3488
|
-
locked: ((d = E.options) == null ? void 0 : d.draggable) === !1,
|
|
3489
|
-
type: (x = E.printElementType) == null ? void 0 : x.type,
|
|
3490
|
-
_sourceType: (h = E.options) == null ? void 0 : h._sourceType
|
|
3491
|
-
};
|
|
3492
|
-
});
|
|
3493
|
-
}), u = de(() => {
|
|
3494
|
-
const f = t();
|
|
3495
|
-
return f.updateTime = l.updateTime, f.historyList;
|
|
3496
|
-
});
|
|
3497
|
-
function r(f, E) {
|
|
3498
|
-
const y = t(), d = [...y.getPanel().printElements].find((h) => h.id === f.id);
|
|
3499
|
-
if (!d)
|
|
3500
|
-
return;
|
|
3501
|
-
const x = d == null ? void 0 : d.designTarget;
|
|
3502
|
-
E === "click" && y.selectElementsId(d.id), E === "mouseover" && y.hoverElementsId(d.id), E === "mouseout" && y.hoverElementsId(d.id, !0), x.focus();
|
|
3503
|
-
}
|
|
3504
|
-
function i(f) {
|
|
3505
|
-
t().update(f.json);
|
|
3506
|
-
}
|
|
3507
|
-
return (f, E) => {
|
|
3508
|
-
const y = b("icon-history"), d = b("AButton"), x = b("icon-drag-arrow"), h = b("icon-expand"), S = b("icon-file"), M = b("a-popover"), T = b("icon-folder"), v = b("icon-lock"), A = b("AButtonGroup");
|
|
3509
|
-
return _(), R(A, { class: "comp-toolbar-ext" }, {
|
|
3510
|
-
default: c(() => [
|
|
3511
|
-
s(M, {
|
|
3512
|
-
title: "\u5386\u53F2\u8BB0\u5F55",
|
|
3513
|
-
position: "br",
|
|
3514
|
-
trigger: "click"
|
|
3515
|
-
}, {
|
|
3516
|
-
content: c(() => [
|
|
3517
|
-
o("ul", nl, [
|
|
3518
|
-
(_(!0), q(_e, null, $e(u.value, (k, D) => (_(), q("li", {
|
|
3519
|
-
key: D,
|
|
3520
|
-
onClick: (K) => i(k)
|
|
3521
|
-
}, [
|
|
3522
|
-
k.type === "\u521D\u59CB" ? (_(), R(y, { key: 0 })) : k.type === "\u79FB\u52A8" ? (_(), R(x, { key: 1 })) : k.type === "\u5927\u5C0F" ? (_(), R(h, { key: 2 })) : (_(), R(S, { key: 3 })),
|
|
3523
|
-
$(" " + oe(k.type), 1)
|
|
3524
|
-
], 8, ll))), 128))
|
|
3525
|
-
])
|
|
3526
|
-
]),
|
|
3527
|
-
default: c(() => [
|
|
3528
|
-
s(d, {
|
|
3529
|
-
title: "\u5386\u53F2\u8BB0\u5F55",
|
|
3530
|
-
size: "small",
|
|
3531
|
-
shape: "square"
|
|
3532
|
-
}, {
|
|
3533
|
-
icon: c(() => [
|
|
3534
|
-
s(y)
|
|
3535
|
-
]),
|
|
3536
|
-
_: 1
|
|
3537
|
-
})
|
|
3538
|
-
]),
|
|
3539
|
-
_: 1
|
|
3540
|
-
}),
|
|
3541
|
-
s(M, {
|
|
3542
|
-
title: "\u7EC4\u4EF6\u5217\u8868",
|
|
3543
|
-
position: "br",
|
|
3544
|
-
trigger: "click"
|
|
3545
|
-
}, {
|
|
3546
|
-
content: c(() => [
|
|
3547
|
-
o("ul", ul, [
|
|
3548
|
-
(_(!0), q(_e, null, $e(n.value, (k, D) => (_(), q("li", {
|
|
3549
|
-
key: D,
|
|
3550
|
-
onClick: (K) => r(k, "click"),
|
|
3551
|
-
onMouseover: (K) => r(k, "mouseover"),
|
|
3552
|
-
onMouseout: (K) => r(k, "mouseout")
|
|
3553
|
-
}, [
|
|
3554
|
-
k.locked ? (_(), R(v, {
|
|
3555
|
-
key: 0,
|
|
3556
|
-
style: { right: "0", left: "auto" }
|
|
3557
|
-
})) : ae("", !0),
|
|
3558
|
-
$(" " + oe(k.title) + " ", 1),
|
|
3559
|
-
k._sourceType === "object" ? (_(), R(T, { key: 1 })) : (_(), R(w(ee), {
|
|
3560
|
-
key: 2,
|
|
3561
|
-
type: w(Mt)(k.type)
|
|
3562
|
-
}, null, 8, ["type"]))
|
|
3563
|
-
], 40, il))), 128))
|
|
3564
|
-
])
|
|
3565
|
-
]),
|
|
3566
|
-
default: c(() => [
|
|
3567
|
-
s(d, {
|
|
3568
|
-
title: "\u7EC4\u4EF6\u5217\u8868",
|
|
3569
|
-
size: "small",
|
|
3570
|
-
shape: "square"
|
|
3571
|
-
}, {
|
|
3572
|
-
icon: c(() => [
|
|
3573
|
-
s(T)
|
|
3574
|
-
]),
|
|
3575
|
-
_: 1
|
|
3576
|
-
})
|
|
3577
|
-
]),
|
|
3578
|
-
_: 1
|
|
3579
|
-
})
|
|
3580
|
-
]),
|
|
3581
|
-
_: 1
|
|
3582
|
-
});
|
|
3583
|
-
};
|
|
3584
|
-
}
|
|
3585
|
-
});
|
|
3586
|
-
function yt(e) {
|
|
3587
|
-
return Array.isArray(e) ? Object.assign([], e) : [];
|
|
3588
|
-
}
|
|
3589
|
-
function jt(e) {
|
|
3590
|
-
return [
|
|
3591
|
-
{ tid: `${e}.text`, title: "\u6587\u672C", type: "text", options: { height: 13 } },
|
|
3592
|
-
{ tid: `${e}.longText`, title: "\u957F\u6587\u672C", type: "text", options: { width: 200, height: 40 } },
|
|
3593
|
-
{ tid: `${e}.number`, title: "\u6570\u503C", type: "text", options: { height: 13 } },
|
|
3594
|
-
{
|
|
3595
|
-
tid: `${e}.table`,
|
|
3596
|
-
title: "\u8868\u683C",
|
|
3597
|
-
type: "table",
|
|
3598
|
-
columns: [
|
|
3599
|
-
[
|
|
3600
|
-
{ title: "", align: "center", field: "", width: 100 },
|
|
3601
|
-
{ title: "", align: "center", field: "", width: 100 },
|
|
3602
|
-
{ title: "", align: "center", field: "", width: 100 }
|
|
3603
|
-
]
|
|
3604
|
-
],
|
|
3605
|
-
editable: !0,
|
|
3606
|
-
columnDisplayEditable: !0,
|
|
3607
|
-
columnDisplayIndexEditable: !0,
|
|
3608
|
-
columnTitleEditable: !0,
|
|
3609
|
-
columnResizable: !0,
|
|
3610
|
-
columnAlignEditable: !0,
|
|
3611
|
-
options: { width: 300 }
|
|
3612
|
-
},
|
|
3613
|
-
{
|
|
3614
|
-
tid: `${e}.image`,
|
|
3615
|
-
data: "data:image/gif;base64,R0lGODdhAQABAIABAAAAAOjo6CwAAAAAAQABAAACAkwBADs=",
|
|
3616
|
-
title: "\u56FE\u7247",
|
|
3617
|
-
type: "image",
|
|
3618
|
-
options: { width: 60, height: 60 }
|
|
3619
|
-
},
|
|
3620
|
-
{
|
|
3621
|
-
tid: `${e}.barcode`,
|
|
3622
|
-
title: "\u6761\u5F62\u7801",
|
|
3623
|
-
type: "text",
|
|
3624
|
-
options: { field: "barcode", testData: "123456789", height: 32, textAlign: "center", textType: "barcode" }
|
|
3625
|
-
},
|
|
3626
|
-
{
|
|
3627
|
-
tid: `${e}.qrcode`,
|
|
3628
|
-
title: "\u4E8C\u7EF4\u7801",
|
|
3629
|
-
type: "text",
|
|
3630
|
-
options: { field: "qrcode", testData: "123456789", height: 60, width: 60, textAlign: "center", textType: "qrcode" }
|
|
3631
|
-
},
|
|
3632
|
-
{ tid: `${e}.hline`, title: "\u6C34\u5E73\u7EBF", type: "hline" },
|
|
3633
|
-
{ tid: `${e}.vline`, title: "\u5782\u76F4\u7EBF\u7EBF", type: "vline" },
|
|
3634
|
-
{ tid: `${e}.rect`, title: "\u77E9\u5F62", type: "rect" },
|
|
3635
|
-
{ tid: `${e}.oval`, title: "\u692D\u5706", type: "oval" }
|
|
3636
|
-
];
|
|
3637
|
-
}
|
|
3638
|
-
const It = "\u901A\u7528\u63A7\u4EF6", Ue = "defaultModule", al = () => {
|
|
3639
|
-
const e = jt(Ue);
|
|
3640
|
-
return { list: e, addElementTypes: (t) => {
|
|
3641
|
-
t.removePrintElementTypes(Ue), t.addPrintElementTypes(Ue, [new Se.PrintElementTypeGroup(It, e)]);
|
|
3642
|
-
} };
|
|
3643
|
-
}, Ut = "\u6570\u636E\u63A7\u4EF6", We = "dataModule", rl = (e) => {
|
|
3644
|
-
const l = jt(We), t = yt(e).map((u) => {
|
|
3645
|
-
const { field: r } = u, i = l.find((d) => d.type === u.type) || l[0], { type: f, options: E } = i, y = {
|
|
3646
|
-
...i,
|
|
3647
|
-
tid: `${Ue}.${r}`,
|
|
3648
|
-
title: u.text,
|
|
3649
|
-
options: { ...E, field: r, _sourceType: u.type }
|
|
3650
|
-
};
|
|
3651
|
-
if (f === "table") {
|
|
3652
|
-
const d = [yt(u.fields).map((x, h) => ({ title: x.text, align: "center", field: x.field, width: 100, checked: h < 8 }))];
|
|
3653
|
-
y.columns = d, y.options.width = null;
|
|
3654
|
-
}
|
|
3655
|
-
return y;
|
|
3656
|
-
});
|
|
3657
|
-
return {
|
|
3658
|
-
list: t,
|
|
3659
|
-
addElementTypes: (u) => {
|
|
3660
|
-
u.removePrintElementTypes(We), u.addPrintElementTypes(We, [new Se.PrintElementTypeGroup(Ut, t)]);
|
|
3661
|
-
}
|
|
3662
|
-
};
|
|
3663
|
-
}, dl = (e) => [
|
|
3664
|
-
{
|
|
3665
|
-
name: It,
|
|
3666
|
-
type: 1,
|
|
3667
|
-
value: Ue,
|
|
3668
|
-
...al()
|
|
3669
|
-
},
|
|
3670
|
-
{
|
|
3671
|
-
name: Ut,
|
|
3672
|
-
type: 2,
|
|
3673
|
-
value: We,
|
|
3674
|
-
...rl(e)
|
|
3675
|
-
}
|
|
3676
|
-
], cl = { class: "u-aside comp-hiprint-design" }, fl = { class: "u-page u-page--row" }, pl = { class: "u-card u-h" }, ml = {
|
|
3677
|
-
class: "u-card__bd u-aside__bd",
|
|
3678
|
-
style: { padding: "0", "overflow-y": "auto" }
|
|
3679
|
-
}, gl = { id: "HI_sideContainer" }, vl = {
|
|
3680
|
-
class: "u-main",
|
|
3681
|
-
style: { padding: "0" }
|
|
3682
|
-
}, _l = { class: "u-card u-h" }, yl = { class: "u-card__hd u-aside__hd" }, bl = {
|
|
3683
|
-
class: "u-main u-aside__bd",
|
|
3684
|
-
style: { padding: "0" }
|
|
3685
|
-
}, hl = { id: "HI_bodyContainer" }, Fl = {
|
|
3686
|
-
class: "u-card__bd u-aside__bd comp-hiprint-scrollbar",
|
|
3687
|
-
style: { "overflow-x": "hidden", "overflow-y": "auto" }
|
|
3688
|
-
}, Cl = { id: "HI_panelContainer" }, El = "ep-draggable-item arco-btn arco-btn-secondary arco-btn-shape-square arco-btn-size-mini arco-btn-status-normal", su = /* @__PURE__ */ ve({
|
|
3689
|
-
__name: "index",
|
|
3690
|
-
props: {
|
|
3691
|
-
template: { default: void 0 },
|
|
3692
|
-
fields: { default: void 0 },
|
|
3693
|
-
printData: { default: void 0 }
|
|
3694
|
-
},
|
|
3695
|
-
emits: ["onSave", "onChange"],
|
|
3696
|
-
setup(e, { expose: l, emit: t }) {
|
|
3697
|
-
const n = N(!0), u = N(!0), r = e, i = t, f = (g, { slots: p }) => {
|
|
3698
|
-
var te;
|
|
3699
|
-
const W = (te = g.tid) != null ? te : `defaultModule.${g.type}`, ce = p.default ? p.default() : "", pe = p.icon ? p.icon() : ct(ee, { type: Mt(g.type) });
|
|
3700
|
-
return ct("a", { class: El, tid: W }, [pe, ce]);
|
|
3701
|
-
}, E = N(0), y = N();
|
|
3702
|
-
function d() {
|
|
3703
|
-
var g;
|
|
3704
|
-
typeof ((g = y.value) == null ? void 0 : g.onResize) == "function" && y.value.onResize();
|
|
3705
|
-
}
|
|
3706
|
-
function x() {
|
|
3707
|
-
u.value = !u.value, d();
|
|
3708
|
-
}
|
|
3709
|
-
function h() {
|
|
3710
|
-
n.value = !n.value, d();
|
|
3711
|
-
}
|
|
3712
|
-
let S;
|
|
3713
|
-
const M = {
|
|
3714
|
-
sideContainer: "#HI_sideContainer",
|
|
3715
|
-
mainContainer: "#HI_mainContainer",
|
|
3716
|
-
panelContainer: "#HI_panelContainer"
|
|
3717
|
-
};
|
|
3718
|
-
async function T() {
|
|
3719
|
-
await uo(), Se.PrintElementTypeManager.buildByHtml(Oe(".ep-draggable-item"));
|
|
3720
|
-
}
|
|
3721
|
-
function v() {
|
|
3722
|
-
const g = dl(r.fields);
|
|
3723
|
-
return Se.init({ providers: g }), T(), Se.setConfig({ optionItems: [] }), Oe(M.mainContainer).empty(), S = new Se.PrintTemplate({
|
|
3724
|
-
template: r.template,
|
|
3725
|
-
fields: r.fields,
|
|
3726
|
-
fontList: [
|
|
3727
|
-
{ title: "\u5FAE\u8F6F\u96C5\u9ED1", value: "Microsoft YaHei" },
|
|
3728
|
-
{ title: "\u9ED1\u4F53", value: "STHeitiSC-Light" },
|
|
3729
|
-
{ title: "\u5B8B\u4F53", value: "SimSun" },
|
|
3730
|
-
{ title: "cursive", value: "cursive" }
|
|
3731
|
-
],
|
|
3732
|
-
dataMode: 1,
|
|
3733
|
-
history: !0,
|
|
3734
|
-
willOutOfBounds: !0,
|
|
3735
|
-
qtDesigner: !0,
|
|
3736
|
-
paperNumberDisabled: !0,
|
|
3737
|
-
onUpdateError: (p) => {
|
|
3738
|
-
console.log("[hi-print] Error: update error", p);
|
|
3739
|
-
},
|
|
3740
|
-
settingContainer: M.panelContainer
|
|
3741
|
-
}), S.design(M.mainContainer, { grid: !1 }), { hiprintTemplate: S, providers: g };
|
|
3742
|
-
}
|
|
3743
|
-
const A = N(), k = N(), D = N(), K = N(), H = N();
|
|
3744
|
-
function P() {
|
|
3745
|
-
E.value = +new Date();
|
|
3746
|
-
}
|
|
3747
|
-
function re() {
|
|
3748
|
-
const { hiprintTemplate: g, providers: p } = v();
|
|
3749
|
-
K.value = p[1].list, T(), D.value = g, $n(g, {
|
|
3750
|
-
onSelect: (W) => {
|
|
3751
|
-
H.value = W.printElement.id, P();
|
|
3752
|
-
},
|
|
3753
|
-
onSetting: () => {
|
|
3754
|
-
H.value = null, P();
|
|
3755
|
-
},
|
|
3756
|
-
onData(W) {
|
|
3757
|
-
i("onChange", W), W === "\u8C03\u6574\u5927\u5C0F" && d(), P();
|
|
3758
|
-
}
|
|
3759
|
-
}), d();
|
|
3760
|
-
}
|
|
3761
|
-
Ae(() => r.fields, re), Ne(re), Ae(
|
|
3762
|
-
() => r.template,
|
|
3763
|
-
() => {
|
|
3764
|
-
D.value && D.value.update(r.template);
|
|
3765
|
-
}
|
|
3766
|
-
);
|
|
3767
|
-
function F() {
|
|
3768
|
-
return D.value ? D.value.getJson() : null;
|
|
3769
|
-
}
|
|
3770
|
-
const a = N(1);
|
|
3771
|
-
function z(g = 1) {
|
|
3772
|
-
!D.value || (g < 0.5 && (g = 0.5), g > 2 && (g = 2), a.value = g, D.value.zoom(g));
|
|
3773
|
-
}
|
|
3774
|
-
function L() {
|
|
3775
|
-
D.value && A.value.show(D.value, r.printData);
|
|
3776
|
-
}
|
|
3777
|
-
function X() {
|
|
3778
|
-
var g, p;
|
|
3779
|
-
(p = (g = k.value) == null ? void 0 : g.show) == null || p.call(g, D.value, r.printData);
|
|
3780
|
-
}
|
|
3781
|
-
function m() {
|
|
3782
|
-
!D.value || i("onSave", F());
|
|
3783
|
-
}
|
|
3784
|
-
return l({
|
|
3785
|
-
getRef: () => D.value,
|
|
3786
|
-
getJson: F,
|
|
3787
|
-
setJson(g) {
|
|
3788
|
-
D.value && D.value.update(typeof g == "object" ? JSON.stringify(g) : g);
|
|
3789
|
-
}
|
|
3790
|
-
}), (g, p) => {
|
|
3791
|
-
const W = b("icon-folder"), ce = b("AEmpty"), pe = b("icon-right"), te = b("icon-left"), G = b("a-button"), fe = b("icon-question-circle"), O = b("AButton"), xe = b("AButtonGroup");
|
|
3792
|
-
return _(), q("div", cl, [
|
|
3793
|
-
o("div", fl, [
|
|
3794
|
-
o("div", {
|
|
3795
|
-
class: "u-page__side",
|
|
3796
|
-
style: ye({ width: u.value ? "219px" : "0px" })
|
|
3797
|
-
}, [
|
|
3798
|
-
kt(o("div", pl, [
|
|
3799
|
-
p[14] || (p[14] = o("div", { class: "u-card__hd u-aside__hd" }, [
|
|
3800
|
-
o("strong", { style: { "font-size": "14px" } }, "\u7EC4\u4EF6\u5E93")
|
|
3801
|
-
], -1)),
|
|
3802
|
-
o("div", ml, [
|
|
3803
|
-
o("div", gl, [
|
|
3804
|
-
s(Ze, { title: "\u57FA\u7840" }, {
|
|
3805
|
-
default: c(() => [
|
|
3806
|
-
s(f, { type: "text" }, {
|
|
3807
|
-
default: c(() => p[2] || (p[2] = [
|
|
3808
|
-
$("\u6587\u672C")
|
|
3809
|
-
])),
|
|
3810
|
-
_: 1,
|
|
3811
|
-
__: [2]
|
|
3812
|
-
}),
|
|
3813
|
-
s(f, { type: "number" }, {
|
|
3814
|
-
default: c(() => p[3] || (p[3] = [
|
|
3815
|
-
$("\u6570\u503C")
|
|
3816
|
-
])),
|
|
3817
|
-
_: 1,
|
|
3818
|
-
__: [3]
|
|
3819
|
-
}),
|
|
3820
|
-
s(f, { type: "image" }, {
|
|
3821
|
-
default: c(() => p[4] || (p[4] = [
|
|
3822
|
-
$("\u56FE\u7247")
|
|
3823
|
-
])),
|
|
3824
|
-
_: 1,
|
|
3825
|
-
__: [4]
|
|
3826
|
-
}),
|
|
3827
|
-
s(f, { type: "longText" }, {
|
|
3828
|
-
default: c(() => p[5] || (p[5] = [
|
|
3829
|
-
$("\u957F\u6587\u672C")
|
|
3830
|
-
])),
|
|
3831
|
-
_: 1,
|
|
3832
|
-
__: [5]
|
|
3833
|
-
}),
|
|
3834
|
-
s(f, { type: "table" }, {
|
|
3835
|
-
default: c(() => p[6] || (p[6] = [
|
|
3836
|
-
$("\u6570\u636E\u8868\u683C")
|
|
3837
|
-
])),
|
|
3838
|
-
_: 1,
|
|
3839
|
-
__: [6]
|
|
3840
|
-
}),
|
|
3841
|
-
s(f, { type: "hline" }, {
|
|
3842
|
-
default: c(() => p[7] || (p[7] = [
|
|
3843
|
-
$("\u6C34\u5E73\u7EBF")
|
|
3844
|
-
])),
|
|
3845
|
-
_: 1,
|
|
3846
|
-
__: [7]
|
|
3847
|
-
}),
|
|
3848
|
-
s(f, { type: "vline" }, {
|
|
3849
|
-
default: c(() => p[8] || (p[8] = [
|
|
3850
|
-
$("\u5782\u76F4\u7EBF")
|
|
3851
|
-
])),
|
|
3852
|
-
_: 1,
|
|
3853
|
-
__: [8]
|
|
3854
|
-
}),
|
|
3855
|
-
s(f, { type: "rect" }, {
|
|
3856
|
-
default: c(() => p[9] || (p[9] = [
|
|
3857
|
-
$("\u77E9\u5F62")
|
|
3858
|
-
])),
|
|
3859
|
-
_: 1,
|
|
3860
|
-
__: [9]
|
|
3861
|
-
}),
|
|
3862
|
-
s(f, { type: "oval" }, {
|
|
3863
|
-
default: c(() => p[10] || (p[10] = [
|
|
3864
|
-
$("\u692D\u5706")
|
|
3865
|
-
])),
|
|
3866
|
-
_: 1,
|
|
3867
|
-
__: [10]
|
|
3868
|
-
})
|
|
3869
|
-
]),
|
|
3870
|
-
_: 1
|
|
3871
|
-
}),
|
|
3872
|
-
s(Ze, { title: "\u6761\u7801" }, {
|
|
3873
|
-
default: c(() => [
|
|
3874
|
-
s(f, { type: "barcode" }, {
|
|
3875
|
-
default: c(() => p[11] || (p[11] = [
|
|
3876
|
-
$("\u6761\u5F62\u7801")
|
|
3877
|
-
])),
|
|
3878
|
-
_: 1,
|
|
3879
|
-
__: [11]
|
|
3880
|
-
}),
|
|
3881
|
-
s(f, { type: "qrcode" }, {
|
|
3882
|
-
default: c(() => p[12] || (p[12] = [
|
|
3883
|
-
$("\u4E8C\u7EF4\u7801")
|
|
3884
|
-
])),
|
|
3885
|
-
_: 1,
|
|
3886
|
-
__: [12]
|
|
3887
|
-
})
|
|
3888
|
-
]),
|
|
3889
|
-
_: 1
|
|
3890
|
-
}),
|
|
3891
|
-
s(Ze, { title: "\u4E1A\u52A1\u7EC4\u4EF6" }, {
|
|
3892
|
-
default: c(() => {
|
|
3893
|
-
var me;
|
|
3894
|
-
return [
|
|
3895
|
-
(_(!0), q(_e, null, $e(K.value, (ue) => {
|
|
3896
|
-
var ne, he;
|
|
3897
|
-
return _(), R(f, {
|
|
3898
|
-
key: ue.tid,
|
|
3899
|
-
tid: ue.tid,
|
|
3900
|
-
type: ue.type,
|
|
3901
|
-
style: ye(`font-weight: ${((ne = ue.options) == null ? void 0 : ne._sourceType) === "object" ? "bold" : "normal"}`)
|
|
3902
|
-
}, ot({
|
|
3903
|
-
default: c(() => [
|
|
3904
|
-
$(" " + oe(ue.title), 1)
|
|
3905
|
-
]),
|
|
3906
|
-
_: 2
|
|
3907
|
-
}, [
|
|
3908
|
-
((he = ue.options) == null ? void 0 : he._sourceType) === "object" ? {
|
|
3909
|
-
name: "icon",
|
|
3910
|
-
fn: c(() => [
|
|
3911
|
-
s(W)
|
|
3912
|
-
]),
|
|
3913
|
-
key: "0"
|
|
3914
|
-
} : void 0
|
|
3915
|
-
]), 1032, ["tid", "type", "style"]);
|
|
3916
|
-
}), 128)),
|
|
3917
|
-
(me = K.value) != null && me.length ? ae("", !0) : (_(), R(ce, { key: 0 }, {
|
|
3918
|
-
default: c(() => p[13] || (p[13] = [
|
|
3919
|
-
o("small", null, "\u6682\u65E0\u6570\u636E", -1)
|
|
3920
|
-
])),
|
|
3921
|
-
_: 1,
|
|
3922
|
-
__: [13]
|
|
3923
|
-
}))
|
|
3924
|
-
];
|
|
3925
|
-
}),
|
|
3926
|
-
_: 1
|
|
3927
|
-
})
|
|
3928
|
-
])
|
|
3929
|
-
])
|
|
3930
|
-
], 512), [
|
|
3931
|
-
[At, u.value]
|
|
3932
|
-
]),
|
|
3933
|
-
s(G, {
|
|
3934
|
-
type: "secondary",
|
|
3935
|
-
status: "normal",
|
|
3936
|
-
size: "mini",
|
|
3937
|
-
class: "arco-btn-light u-page__arrow",
|
|
3938
|
-
style: ye([{ "z-index": "999" }, { borderLeftWidth: u.value ? "0" : "1px" }]),
|
|
3939
|
-
onClick: p[0] || (p[0] = (me) => x())
|
|
3940
|
-
}, {
|
|
3941
|
-
icon: c(() => [
|
|
3942
|
-
u.value ? (_(), R(te, { key: 1 })) : (_(), R(pe, { key: 0 }))
|
|
3943
|
-
]),
|
|
3944
|
-
_: 1
|
|
3945
|
-
}, 8, ["style"])
|
|
3946
|
-
], 4),
|
|
3947
|
-
o("div", vl, [
|
|
3948
|
-
o("div", _l, [
|
|
3949
|
-
o("div", yl, [
|
|
3950
|
-
s(ol, {
|
|
3951
|
-
tpl: D.value,
|
|
3952
|
-
"selected-id": H.value,
|
|
3953
|
-
"update-time": E.value,
|
|
3954
|
-
zoom: a.value,
|
|
3955
|
-
"set-zoom": z
|
|
3956
|
-
}, {
|
|
3957
|
-
left: c(({ options: me }) => [
|
|
3958
|
-
Q(g.$slots, "toolbar-left", {
|
|
3959
|
-
tpl: D.value,
|
|
3960
|
-
options: me,
|
|
3961
|
-
updateTime: E.value
|
|
3962
|
-
})
|
|
3963
|
-
]),
|
|
3964
|
-
right: c(({ options: me }) => [
|
|
3965
|
-
Q(g.$slots, "toolbar-right", {
|
|
3966
|
-
tpl: D.value,
|
|
3967
|
-
options: me,
|
|
3968
|
-
updateTime: E.value
|
|
3969
|
-
}, () => [
|
|
3970
|
-
s(sl, {
|
|
3971
|
-
tpl: D.value,
|
|
3972
|
-
"update-time": E.value
|
|
3973
|
-
}, null, 8, ["tpl", "update-time"])
|
|
3974
|
-
]),
|
|
3975
|
-
s(xe, { size: "small" }, {
|
|
3976
|
-
default: c(() => [
|
|
3977
|
-
s(O, {
|
|
3978
|
-
shape: "square",
|
|
3979
|
-
title: "\u5E2E\u52A9",
|
|
3980
|
-
onClick: X
|
|
3981
|
-
}, {
|
|
3982
|
-
icon: c(() => [
|
|
3983
|
-
s(fe)
|
|
3984
|
-
]),
|
|
3985
|
-
_: 1
|
|
3986
|
-
}),
|
|
3987
|
-
s(O, {
|
|
3988
|
-
shape: "square",
|
|
3989
|
-
title: "\u9884\u89C8",
|
|
3990
|
-
onClick: L
|
|
3991
|
-
}, {
|
|
3992
|
-
icon: c(() => [
|
|
3993
|
-
s(w(ee), { type: "icon-24gl-eye" })
|
|
3994
|
-
]),
|
|
3995
|
-
_: 1
|
|
3996
|
-
}),
|
|
3997
|
-
s(O, {
|
|
3998
|
-
shape: "square",
|
|
3999
|
-
title: "\u4FDD\u5B58",
|
|
4000
|
-
onClick: m
|
|
4001
|
-
}, {
|
|
4002
|
-
icon: c(() => [
|
|
4003
|
-
s(w(ee), {
|
|
4004
|
-
type: "icon-baocun",
|
|
4005
|
-
size: "16"
|
|
4006
|
-
})
|
|
4007
|
-
]),
|
|
4008
|
-
_: 1
|
|
4009
|
-
})
|
|
4010
|
-
]),
|
|
4011
|
-
_: 1
|
|
4012
|
-
})
|
|
4013
|
-
]),
|
|
4014
|
-
_: 3
|
|
4015
|
-
}, 8, ["tpl", "selected-id", "update-time", "zoom"])
|
|
4016
|
-
]),
|
|
4017
|
-
o("div", bl, [
|
|
4018
|
-
o("div", hl, [
|
|
4019
|
-
p[15] || (p[15] = o("div", { id: "HI_scrollContainer" }, [
|
|
4020
|
-
o("div", {
|
|
4021
|
-
id: "HI_mainContainer",
|
|
4022
|
-
class: "hiprint-printTemplate"
|
|
4023
|
-
})
|
|
4024
|
-
], -1)),
|
|
4025
|
-
s(Fn, {
|
|
4026
|
-
ref_key: "guidesRef",
|
|
4027
|
-
ref: y,
|
|
4028
|
-
zoom: a.value,
|
|
4029
|
-
"main-container": "#HI_bodyContainer",
|
|
4030
|
-
"warp-container": "#HI_scrollContainer"
|
|
4031
|
-
}, null, 8, ["zoom"])
|
|
4032
|
-
])
|
|
4033
|
-
])
|
|
4034
|
-
])
|
|
4035
|
-
]),
|
|
4036
|
-
o("div", {
|
|
4037
|
-
class: "u-page__panel u-card",
|
|
4038
|
-
style: ye({ width: n.value ? "219px" : "0px" })
|
|
4039
|
-
}, [
|
|
4040
|
-
p[17] || (p[17] = o("div", { class: "u-card__hd u-aside__hd" }, [
|
|
4041
|
-
o("strong", { style: { "font-size": "14px" } }, "\u5C5E\u6027\u914D\u7F6E")
|
|
4042
|
-
], -1)),
|
|
4043
|
-
o("div", Fl, [
|
|
4044
|
-
o("div", Cl, [
|
|
4045
|
-
s(ce, { style: { "padding-top": "32px" } }, {
|
|
4046
|
-
default: c(() => p[16] || (p[16] = [
|
|
4047
|
-
o("small", null, "\u6682\u65E0\u6570\u636E", -1)
|
|
4048
|
-
])),
|
|
4049
|
-
_: 1,
|
|
4050
|
-
__: [16]
|
|
4051
|
-
})
|
|
4052
|
-
])
|
|
4053
|
-
]),
|
|
4054
|
-
s(G, {
|
|
4055
|
-
type: "secondary",
|
|
4056
|
-
status: "normal",
|
|
4057
|
-
size: "mini",
|
|
4058
|
-
style: ye([{ "z-index": "999" }, { borderRightWidth: n.value ? "0" : "1px" }]),
|
|
4059
|
-
class: "arco-btn-light u-page__arrow",
|
|
4060
|
-
onClick: p[1] || (p[1] = (me) => h())
|
|
4061
|
-
}, {
|
|
4062
|
-
icon: c(() => [
|
|
4063
|
-
n.value ? (_(), R(pe, { key: 0 })) : (_(), R(te, { key: 1 }))
|
|
4064
|
-
]),
|
|
4065
|
-
_: 1
|
|
4066
|
-
}, 8, ["style"])
|
|
4067
|
-
], 4)
|
|
4068
|
-
]),
|
|
4069
|
-
s(En, {
|
|
4070
|
-
ref_key: "preViewRef",
|
|
4071
|
-
ref: A
|
|
4072
|
-
}, null, 512),
|
|
4073
|
-
s(Bn, {
|
|
4074
|
-
ref_key: "kbdRef",
|
|
4075
|
-
ref: k
|
|
4076
|
-
}, null, 512)
|
|
4077
|
-
]);
|
|
4078
|
-
};
|
|
4079
|
-
}
|
|
4080
|
-
});
|
|
4081
|
-
const au = vo("orc-dict", () => {
|
|
4082
|
-
const e = N({});
|
|
4083
|
-
let l = null;
|
|
4084
|
-
function t(r) {
|
|
4085
|
-
l = r;
|
|
4086
|
-
}
|
|
4087
|
-
async function n(r, i = !1) {
|
|
4088
|
-
if (!i && e.value[r])
|
|
4089
|
-
return e.value[r];
|
|
4090
|
-
if (!l)
|
|
4091
|
-
throw new Error("[DictStore] \u5B57\u5178\u52A0\u8F7D\u51FD\u6570\u672A\u8BBE\u7F6E\uFF0C\u8BF7\u5148\u8C03\u7528 init");
|
|
4092
|
-
const f = await l(r);
|
|
4093
|
-
return e.value[r] = f, e.value[r];
|
|
4094
|
-
}
|
|
4095
|
-
function u(r) {
|
|
4096
|
-
r ? delete e.value[r] : e.value = {};
|
|
4097
|
-
}
|
|
4098
|
-
return {
|
|
4099
|
-
dicts: e,
|
|
4100
|
-
registerLoadFn: t,
|
|
4101
|
-
getDict: n,
|
|
4102
|
-
clearCache: u
|
|
4103
|
-
};
|
|
4104
|
-
}), ru = {
|
|
4105
|
-
install(e) {
|
|
4106
|
-
e.use(Yt), e.component("OrcTable", nt), e.component("OrcSearch", rn), e.component("OrcForm", Pt), e.component("OrcFormButton", fn);
|
|
4107
|
-
}
|
|
4108
|
-
};
|
|
4109
|
-
export {
|
|
4110
|
-
Pt as OrcForm,
|
|
4111
|
-
fn as OrcFormButton,
|
|
4112
|
-
uu as OrcFormLayer,
|
|
4113
|
-
pn as OrcFormSpace,
|
|
4114
|
-
lu as OrcFormTable,
|
|
4115
|
-
su as OrcHiPrint,
|
|
4116
|
-
iu as OrcHiddenView,
|
|
4117
|
-
Ql as OrcProvider,
|
|
4118
|
-
Xl as OrcQuill,
|
|
4119
|
-
rn as OrcSearch,
|
|
4120
|
-
nt as OrcTable,
|
|
4121
|
-
Wl as deepClone,
|
|
4122
|
-
ru as default,
|
|
4123
|
-
ou as delay,
|
|
4124
|
-
cn as downLoadPdf,
|
|
4125
|
-
Yl as download,
|
|
4126
|
-
St as findObject,
|
|
4127
|
-
jo as formatTable,
|
|
4128
|
-
nu as generateQRcodeBase64,
|
|
4129
|
-
Gl as getData,
|
|
4130
|
-
Hl as getUniqueId,
|
|
4131
|
-
fu as hiprint,
|
|
4132
|
-
Uo as isArray,
|
|
4133
|
-
Ll as isEmptyArray,
|
|
4134
|
-
Kl as isEmptyObject,
|
|
4135
|
-
No as isNumber,
|
|
4136
|
-
gt as isObject,
|
|
4137
|
-
ql as log,
|
|
4138
|
-
tu as mergeConfig,
|
|
4139
|
-
$t as omitObject,
|
|
4140
|
-
eu as onConfirm,
|
|
4141
|
-
_t as queueMap,
|
|
4142
|
-
Jl as setData,
|
|
4143
|
-
Qe as toArray,
|
|
4144
|
-
Re as typeName,
|
|
4145
|
-
au as useDictStore,
|
|
4146
|
-
Zl as useOrcSearch,
|
|
4147
|
-
Io as useOrcTable,
|
|
4148
|
-
Nl as useOrcTableFooter,
|
|
4149
|
-
ze as useState
|
|
4150
|
-
};
|
|
1
|
+
import e from"vxe-table";import"vxe-table/lib/style.css";import{computed as t,ref as l,inject as o,defineComponent as n,resolveComponent as i,openBlock as a,createElementBlock as r,Fragment as u,createBlock as s,createCommentVNode as d,renderList as c,withCtx as p,renderSlot as f,mergeProps as m,unref as v,resolveDynamicComponent as h,normalizeStyle as y,toDisplayString as g,shallowRef as b,watch as _,onUnmounted as w,createElementVNode as k,createVNode as x,createTextVNode as C,normalizeProps as z,guardReactiveProps as S,toRefs as A,normalizeClass as V,onMounted as T,reactive as R,provide as E,useAttrs as O,createSlots as $,Teleport as P,isRef as D,markRaw as M,defineAsyncComponent as I,toRef as j,Transition as B,withDirectives as q,vShow as F,withModifiers as U,h as N,nextTick as K}from"vue";import W from"xe-utils";import L from"vuedraggable";import{Message as H,Modal as G,Button as J,useFormItem as Y,Icon as Z}from"@arco-design/web-vue";import X from"quill";import"quill/dist/quill.core.css";import"quill/dist/quill.snow.css";import Q from"bwip-js";import ee from"jspdf";import{snapdom as te}from"@zumer/snapdom";import{formItemInjectionKey as le}from"@arco-design/web-vue/es/form/context";import{hiprint as oe,hinnn as ne}from"@shaonq/hiprint";import{hiprint as ie}from"@shaonq/hiprint";import"@shaonq/hiprint/dist/style.css";import ae from"jquery";import re from"@scena/guides";import{defineStore as ue}from"pinia";const se="";function de(e){return"function"==typeof e}function ce(e){return!(!e||"object"!=typeof e||!["setup","props"].some(t=>t in e))}const pe={tf:(e,t)=>{if("number"!=typeof e)return e;if("number"!=typeof t){const l=String(e).split(".");2===l.length&&(t=l[1].length)}return W.commafy(e,{digits:t})},t:e=>W.toDateString(e,"yyyy-MM-dd"),time:(e,t="yyyy-MM-dd HH:mm:ss")=>W.toDateString(e,t),p:(e,t,l="%")=>"number"!=typeof e?e:("number"!=typeof t&&(t=2),(100*e).toFixed(t)+l)};function fe(e,t){var l;const o=null!=(l=e[t.dataIndex])?l:"";if(t.format&&de(t.format))return t.format(o,e);if(t.dataType)switch(t.dataType){case"number":return"number"!=typeof o?o:pe.tf(o);case"date":return pe.t(o);case"time":return pe.time(o);default:return o}return o}function me(e,t){return de(t.style)?t.style(e):{...t.style}}function ve(e){return(null==e?void 0:e.rowKey)||"_X_ROW_KEY"}function he(e,l){return{disabledList:t(()=>({highlight:!0,reserve:e.option.reserve,trigger:e.option.selectedTrigger,checkMethod:({row:e})=>!e.disabled})),selectChangeEvent:({$table:t,checked:o,row:n})=>{if("checkbox"!==e.option.selectedType)return;const{option:i}=e,{fullData:a}=t.getTableData();if(n&&i.checkboxKey){const e=i.checkboxKey,l=a.filter(t=>t[e]&&t[e]===n[e]);l.length&&t.setCheckboxRow(l,o)}const r=t.getCheckboxRecords().concat(t.getCheckboxReserveRecords()),u=ve(e.option);u&&l("update:selectedKeys",r.map(e=>e[u]))},radioChangeEvent:({row:t})=>{if("radio"!==e.option.selectedType)return;const o=[t],n=ve(e.option);n&&l("update:selectedKeys",o.map(e=>e[n]))}}}function ye(e){const t=l(Object.create({})),o=e.ref,n={...e,ref:e=>{e&&(t.value=e),"function"==typeof o&&o(e)}},i={getRowKey:()=>ve(e),getRowIndex:e=>t.value.getRowIndex(e),getRowSeq:e=>t.value.getRowSeq(e),getTableData(){var e,l;return t.value&&null!=(l=null==(e=t.value)?void 0:e.getTableData().fullData)?l:[]},setSelectionRow(e,l=!0){t.value&&("checkbox"===n.selectedType&&t.value.setCheckboxRow(e,l),"radio"===n.selectedType&&t.value.setRadioRow(e))},getSelection:()=>t.value?"checkbox"===n.selectedType?t.value.getCheckboxRecords():"radio"===n.selectedType?[t.value.getRadioRecord()]:[]:[],getReserveSelection(){if(t.value){if("checkbox"===n.selectedType){const l=t.value.getCheckboxRecords();return e.reserve?l.concat(t.value.getCheckboxReserveRecords()):l}if("radio"===n.selectedType){let l=t.value.getRadioRecord();return e.reserve&&!l&&(l=t.value.getRadioReserveRecord()),l?[l]:[]}return[]}return[]},getCheckboxKeySelection(t){const l=e.checkboxKey;t||(t=this.getSelection().map(e=>e[l]));return this.getTableData().filter(e=>t&&t.includes(e[l]))},clearSelection(){t.value&&("checkbox"===n.selectedType&&(e.reserve&&t.value.clearCheckboxReserve(),t.value.clearCheckboxRow()),"radio"===n.selectedType&&(e.reserve&&t.value.clearRadioReserve(),t.value.clearRadioRow()))},insertRow(e,l,o=!0){var n;const i=this.getRowKey();if(l&&"object"==typeof l&&o){const e=t.value.getRowIndex(l);e>=0&&(l=null!=(n=this.getTableData()[e+1])?n:-1)}const a={...e};a[i]&&delete a[i];return t.value.insertAt(a,l)},removeRows(){t.value&&("checkbox"===n.selectedType&&t.value.removeCheckboxRow(),"radio"===n.selectedType&&t.value.removeRadioRow())},removerRowIndex(e){if(t.value){const l=this.getTableData();l.splice(e,1),t.value.reloadData(l)}},async validate(e=void 0){e=null!=e?e:this.getSelection();let l="";const o=await t.value.validate(e);return o&&Object.values(o).forEach(e=>{e.forEach(({rowIndex:e,column:t,rules:o})=>{o.forEach(o=>{l=`\u5e8f\u53f7${e+1} ${t.title} ${o.message}`})})}),[l,e]}};return{tableOption:n,$grid:t,$gridTwo:i}}const ge=Symbol("OrcConfigProvider");function be(){return o(ge,{useErrData:void 0})}const _e={"zh-CN":{stripedTable:"\u8868\u683c\u6591\u9a6c\u7eb9",refresh:"\u5237\u65b0",settings:"\u8bbe\u7f6e",reset:"\u91cd\u7f6e",cancel:"\u53d6\u6d88",confirm:"\u786e\u8ba4",selection:"\u9009 {0} ",totalItems:"\u5171 {0} \u6761",open:"\u5f00",close:"\u5173"},"en-US":{stripedTable:"Striped Table",refresh:"Refresh",settings:"Settings",reset:"Reset",cancel:"Cancel",confirm:"Confirm",selection:"Selected {0} ",totalItems:"Total {0} items",open:"On",close:"Off"},"ja-JP":{stripedTable:"\u30c6\u30fc\u30d6\u30eb\u306e\u7e1e\u6a21\u69d8",refresh:"\u66f4\u65b0",settings:"\u8a2d\u5b9a",reset:"\u30ea\u30bb\u30c3\u30c8",cancel:"\u30ad\u30e3\u30f3\u30bb\u30eb",confirm:"\u78ba\u8a8d",selection:"{0}\u3092\u9078\u629e ",totalItems:"\u5408\u8a08{0}\u4ef6",open:"\u5165",close:"\u5207"}};function we(e){let t=null;return"string"==typeof e&&(t=_e[e]||_e["zh-CN"]),t||e}function ke(e,t,l){const o=Array.isArray(l)?l:[l],n=String(we(e)[t]);return l?n.replace(/{(\d+)}/g,(e,t)=>o[t]||""):n}const xe={key:0,class:"not-light-text"},Ce=n({__name:"columns",props:{columns:{},option:{},tableData:{}},setup(e){const t=e;function l(e,t,l,o){const{dataIndex:n}=e,i=t[n];return{record:t,dataIndex:n,rowIndex:l,columnIndex:o,value:i,updateValue:e=>{e&&"object"==typeof e&&!Array.isArray(e)?Object.assign(t,e):t[n]=e},formatValue:fe(t,e)}}function o(e,t,o,n){const i={...e.cellAttr},a=l(e,t,o,n);return Object.keys(i).forEach(e=>{const t=i[e];if("function"==typeof t)try{i[e]=t(a)}catch(e){}}),i}function n(e,t){return fe(e,t)}function b(e,t){return me(e,t)}function _(e,l,o){var n,i;const a=null!=(n=e[l])?n:{},r=null!=(i=e[l-1])?i:{};return("string"==typeof a[o]||"number"==typeof a[o])&&(t.option.skinRow&&"string"==typeof t.option.skinRow?a[t.option.skinRow]===r[t.option.skinRow]&&a[o]===r[o]:a[o]===r[o])}function w(e,l,o){let n={};if(t.option.skinRowStyle)try{n=l>0&&!_(e,l,o)&&t.option.skinRow&&e[l][String(t.option.skinRow)]===e[l-1][String(t.option.skinRow)]?t.option.skinRowStyle:{}}catch(e){}return n}return(t,k)=>{const x=i("vxe-column");return a(),r(u,null,["checkbox"===e.option.selectedType?(a(),s(x,{key:0,type:"checkbox",width:"30",fixed:"left",align:e.option.selectedAlign},null,8,["align"])):"radio"===e.option.selectedType?(a(),s(x,{key:1,type:"radio",width:"30",fixed:"left",align:e.option.selectedAlign},null,8,["align"])):d("",!0),(a(!0),r(u,null,c(e.columns.filter(e=>e.show),(i,c)=>(a(),r(u,{key:c},["index"===i.dataIndex?(a(),s(x,{key:0,type:"seq",field:i.dataIndex,width:i.width,title:i.title,sortable:i.sort,"header-align":i.headerAlign,"footer-align":i.footerAlign,align:i.align,"show-header-overflow":i.tooltip,"show-overflow":i.tooltip,fixed:i.fixed,"title-prefix":i.help,filters:i.filters,"filter-multiple":i.filterMultiple,"filter-method":i.filterMethod},null,8,["field","width","title","sortable","header-align","footer-align","align","show-header-overflow","show-overflow","fixed","title-prefix","filters","filter-multiple","filter-method"])):(a(),s(x,{key:1,field:i.dataIndex,width:i.width,title:i.title,sortable:i.sort,"header-align":i.headerAlign,"footer-align":i.footerAlign,align:i.align,"show-header-overflow":i.tooltip,"show-overflow":i.tooltip,fixed:i.fixed,"title-prefix":i.help,filters:i.filters,"filter-multiple":i.filterMultiple,"filter-method":i.filterMethod,"edit-render":{enabled:Boolean(i.cell),placeholder:i.placeholder}},{edit:p(({row:e,rowIndex:u,columnIndex:c})=>[Boolean(i.cell)?f(t.$slots,"cell",m({key:0,ref_for:!0},l(i,e,u,c)),()=>[v(ce)(i.cell)?(a(),s(h(i.cell),m({key:0,ref_for:!0},o(i,e,u,c)),null,16)):(a(),r("span",{key:1,style:y(b(e,i))},g(n(e,i)),5))]):d("",!0)]),default:p(({row:d,rowIndex:c,columnIndex:p})=>[i.cell&&i.div?f(t.$slots,"cell",m({key:0,ref_for:!0},l(i,d,c,p)),()=>[v(ce)(i.cell)?(a(),s(h(i.cell),m({key:0,ref_for:!0},o(i,d,c,p)),null,16)):(a(),r("span",{key:1,style:y(b(d,i))},g(n(d,i)),5))]):(a(),r(u,{key:1},[e.option.skinRow&&!i.cell?(a(),r(u,{key:0},[c>0&&_(e.tableData,c,i.dataIndex)&&i.width?(a(),r("span",xe,g(e.option.skinRowText),1)):(a(),r("span",{key:1,style:y(w(e.tableData,c,i.dataIndex))},g(n(d,i)),5))],64)):(a(),r("span",{key:1,style:y(b(d,i))},g(n(d,i)),5))],64))]),_:2},1032,["field","width","title","sortable","header-align","footer-align","align","show-header-overflow","show-overflow","fixed","title-prefix","filters","filter-multiple","filter-method","edit-render"]))],64))),128))],64)}}}),ze={class:"orc-table"},Se={class:"arco-card-header-title"},Ae={class:"u-card orc-table__setting"},Ve={class:"u-card__hd orc-table__setting-header"},Te={class:"u-card__floor orc-table__setting-body"},Re={class:"orc-table__draggable"},Ee={class:"orc-table__draggable-item"},Oe={key:0,class:"u-flex"},$e=["title"],Pe={key:1,class:"orc-table__draggable-moving"},De={class:"u-card__floor u-flex orc-table__setting-footer"},Me={key:1,class:"orc-table__pagination"},Ie={class:"u-flex u-flex--start"},je={class:"u-flex__item"},Be={class:"orc-table__pagination-inner"},qe=n({__name:"table",props:{title:{},height:{},locale:{default:"zh-CN"},hideToolbar:{type:Boolean},hideSetting:{type:Boolean},hidePagination:{type:Boolean},isHover:{type:Boolean,default:!0},size:{default:"mini"},selectedKeys:{default:()=>[]},data:{default:()=>[]},option:{default:()=>({columns:[]})},hook:{}},emits:["update:selectedKeys","cellClick","onReset","change","confirm","cellDblclick"],setup(e,{expose:o,emit:n}){var c;const h=be(),y=t(()=>h.useErrData),A=e,V=n,T=(e,t)=>ke(A.locale,e,t),R=t(()=>{const e=A.size;return e?"large"===e?"medium":e:"mini"}),E=t(()=>{var e,t;return null!=(t=null==(e=A.option)?void 0:e.pageSize)?t:20}),O=t(()=>{var e,t;return null!=(t=null==(e=A.option)?void 0:e.pageSizeOptions)?t:[10,20,50,100,200]}),$=l({page:1,size:E.value}),P=l(!1),D=l(!1),M=l(0),I=b(null!=(c=A.data)?c:[]),j=l([]),B=l({}),q=l({loading:!1,columns:[],tempWidth:{}}),{disabledList:F,selectChangeEvent:U,radioChangeEvent:N}=he(A,V),{$grid:K,$gridTwo:W,tableOption:H}=ye(A.option);function G(){const e=[...A.option.columns];return[...de(A.option.resolveColumns)?A.option.resolveColumns(e):e].filter(Boolean).map(e=>{var t;return e.show=null==(t=e.show)||t,e.tooltip&&(e.ellipsis=!0),e})}const J=t({get:()=>A.selectedKeys,set:e=>V("update:selectedKeys",e)}),Y=t(()=>Boolean(A.option.url)),Z=t(()=>{var e,t,l;return null!=(l=null==(t=(e=A.option).resolvePage)?void 0:t.call(e,$.value))?l:void 0}),X=t(()=>{const e=G(),t=[...j.value],l=new Map(e.map(e=>[e.dataIndex,e])),o=new Map(t.map(e=>[e.dataIndex,e])),n=t.map(e=>e.dataIndex).filter(e=>l.has(e)),i=e.map(e=>e.dataIndex).filter(Boolean);return[...new Set([...n,...i])].map(e=>{var t;return{...l.get(e),...null!=(t=o.get(e))?t:{}}})});function Q(e=!0){P.value=e}const ee=new AbortController;async function te(){var e,t,l,o,n,i,a,r;if(!Y.value)return;Q(!0);const[u,s]=await function(){var e,t;const l=null!=(e=A.option.useErrData)?e:y.value;if("function"!=typeof l)return[!0,{rows:[]}];let o={};Z.value&&(o={...Z.value});const n={["GET"===String(A.option.method).toUpperCase()?"params":"data"]:{...o,...A.option.data}},i={url:A.option.url,method:null!=(t=A.option.method)?t:"GET",...n,signal:ee.signal};return A.option.timeout&&(i.timeout=A.option.timeout),l(i)}();if(Q(!1),u)de(A.option.error)&&(null==(r=(a=A.option).error)||r.call(a,s));else{const a=de(null==(e=A.option)?void 0:e.resolveData)?A.option.resolveData(s,{...$.value}):null!=(l=null!=(t=null==s?void 0:s.rows)?t:s)?l:[];Array.isArray(a),I.value=[...a],M.value=de(A.option.resolveTotal)?A.option.resolveTotal(s):null!=(o=null==s?void 0:s.total)?o:0,de(A.option.success)&&(null==(i=(n=A.option).success)||i.call(n,s))}}async function le(){P.value||(V("onReset"),Y.value?await te():(Q(!0),await new Promise(e=>{setTimeout(e,99)}),Q(!1)))}function oe(e,t=!1){e&&($.value.page=e),A.option.reserve&&!t||(J.value=[],W.clearSelection()),te()}async function ne(e){$.value.size=e,oe(1,!0)}function ie(e=!1){B.value&&(e?B.value.togglePanel():B.value.showPanel(),q.value.columns=[...X.value].map(e=>{const t=q.value.tempWidth[e.dataIndex];return t&&(e.width=t),e}))}function ae(){var e;const t=null==(e=B.value)?void 0:e.hidePanel;"function"==typeof t&&t()}function re(){q.value.loading=!0,j.value=[],q.value.tempWidth={},q.value.columns=G(),ie(),setTimeout(()=>{q.value.loading=!1},500)}function ue(e){let t=e.column.property;t||"seq"!==e.column.type||(t="index"),t&&e.column.resizeWidth>0&&(q.value.tempWidth[t]=e.column.resizeWidth,ae())}function se(){var e;B.value&&(j.value=q.value.columns,V("confirm",X.value),"function"==typeof(null==(e=A.hook)?void 0:e.setColumn)&&A.hook.setColumn(X.value),q.value.tempWidth={},ae())}return _(()=>A.data,()=>{Y.value||(I.value=[...A.data])},{deep:!0}),_(()=>A.option.firstLoad,e=>{!0===e&&te()}),!1!==A.option.firstLoad&&te(),async function(){var e;if("function"==typeof(null==(e=A.hook)?void 0:e.getColumn)){const[e,t]=await A.hook.getColumn();!e&&t&&(j.value=t)}}(),w(()=>{ee.abort()}),o({loading:P,setLoading:Q,dataInit:e=>(!1!==e&&($.value.page=1),J.value=[],W.clearSelection(),te()),loadData(e){K.value&&(K.value.reloadData(e),I.value=e)},...W}),(e,t)=>{var l;const o=i("a-switch"),n=i("a-tooltip"),c=i("icon-refresh"),h=i("a-button"),y=i("icon-settings"),b=i("icon-drag-dot-vertical"),_=i("a-checkbox"),w=i("a-input-number"),E=i("a-divider"),j=i("vxe-button"),K=i("vxe-pulldown"),W=i("a-space"),G=i("vxe-toolbar"),Z=i("a-empty"),Q=i("a-spin"),ee=i("vxe-table"),te=i("a-pagination");return a(),r("div",ze,[A.hideToolbar?d("",!0):(a(),s(G,{key:0,size:"mini","class-name":"orc-table__toolbar"},{buttons:p(()=>[f(e.$slots,"default",{},()=>[k("div",Se,g(A.title),1)])]),tools:p(()=>[x(W,{size:"mini"},{default:p(()=>[f(e.$slots,"tools"),x(n,{content:T("stripedTable"),mini:""},{default:p(()=>[x(o,{modelValue:D.value,"onUpdate:modelValue":t[0]||(t[0]=e=>D.value=e),size:"small"},{checked:p(()=>[C(g(T("open")),1)]),unchecked:p(()=>[C(g(T("close")),1)]),_:1},8,["modelValue"])]),_:1},8,["content"]),x(n,{content:T("refresh"),mini:""},{default:p(()=>[x(h,{loading:P.value,size:"small",class:"orc-table__btn orc-table__btn--borderless",onClick:le},{icon:p(()=>[x(c,{size:16})]),_:1},8,["loading"])]),_:1},8,["content"]),A.hideSetting?d("",!0):(a(),s(K,{key:0,ref_key:"settingRef",ref:B,transfer:""},{default:p(()=>[x(n,{content:T("settings"),mini:""},{default:p(()=>[x(h,{size:"small",class:"orc-table__btn orc-table__btn--borderless"},{icon:p(()=>[x(y,{size:16,onClick:t[1]||(t[1]=e=>ie(!0))})]),_:1})]),_:1},8,["content"])]),dropdown:p(()=>[k("div",Ae,[k("div",Ve,[k("span",null,g(T("settings")),1),x(n,{content:T("reset"),mini:""},{default:p(()=>[x(h,{size:"small",class:"orc-table__btn orc-table__btn--borderless",loading:q.value.loading,onClick:re},{icon:p(()=>[x(c)]),_:1},8,["loading"])]),_:1},8,["content"])]),k("div",Te,[k("div",Re,[x(v(L),{list:q.value.columns,class:"orc-table__draggable-list",group:"toolsGroup",animation:"300","drag-class":"orc-table__draggable-drag","ghost-class":"orc-table__draggable-ghost","chosen-class":"orc-table__draggable-chosen","item-key":"id",handle:".orc-table__draggable-moving"},{item:p(({element:e})=>{var t;return[k("div",Ee,[e.title?(a(),r("div",Oe,[x(b,{class:"orc-table__draggable-moving"}),x(_,{modelValue:e.show,"onUpdate:modelValue":t=>e.show=t},null,8,["modelValue","onUpdate:modelValue"]),k("label",{class:"u-flex__item u-clamp orc-table__draggable-label",title:e.title},g(e.title),9,$e),(null==(t=A.hook)?void 0:t.setColumn)?(a(),s(w,{key:0,modelValue:e.width,"onUpdate:modelValue":t=>e.width=t,size:"mini",class:"orc-table__width-input"},null,8,["modelValue","onUpdate:modelValue"])):d("",!0)])):(a(),r("div",Pe,[x(E,{margin:6,type:"dashed"})]))])]}),_:1},8,["list"])])]),k("div",De,[x(j,{size:"mini",class:"u-flex__item",type:"text",status:"info",onClick:ae},{default:p(()=>[C(g(T("cancel")),1)]),_:1}),x(j,{size:"mini",class:"u-flex__item",type:"text",status:"primary",onClick:se},{default:p(()=>[C(g(T("confirm")),1)]),_:1})])])]),_:1},512))]),_:3})]),_:3})),x(ee,m({ref:v(H).ref,data:I.value,height:A.height,stripe:D.value,"keep-source":!1,"edit-config":{trigger:"click",mode:"row",showIcon:!1,autoClear:!1,showStatus:!1},"column-config":{isCurrent:!1,resizable:!0},"row-config":{isHover:A.isHover,isCurrent:!1,keyField:A.option.rowKey},"show-overflow":A.option.tooltip||"tooltip","show-header-overflow":A.option.tooltip||"tooltip",size:R.value,loading:P.value,"radio-config":v(F),"checkbox-config":{...v(F),checkField:A.option.checkKey},"header-cell-style":A.option.headerStyle,border:A.option.border,"show-footer":v(de)(A.option.footerMethod),"footer-method":A.option.footerMethod,"footer-cell-style":A.option.footerStyle,"cell-style":A.option.cellStyle,"merge-footer-items":A.option.mergeFooter,"show-footer-overflow":null==(l=A.option)?void 0:l.footerTooltip,"filter-config":A.option.filterConfig,"edit-rules":v(de)(A.option.rules)?A.option.rules():A.option.rules,"scroll-y":A.option.scrollY,"scroll-x":A.option.scrollX},A.option.tableProps,{onCheckboxChange:v(U),onCheckboxAll:v(U),onRadioChange:v(N),onResizableChange:ue,onCellClick:t[2]||(t[2]=e=>V("cellClick",e)),onCellDblclick:t[3]||(t[3]=e=>V("cellDblclick",e)),onFooterCellClick:A.option.onFooterCellClick}),{empty:p(()=>[x(Z)]),loading:p(()=>[x(Q)]),default:p(()=>[f(e.$slots,"columns",{},()=>[x(Ce,{columns:X.value,option:A.option,"table-data":I.value},{cell:p(t=>[f(e.$slots,"cell",z(S(t)))]),_:3},8,["columns","option","table-data"])])]),_:3},16,["data","height","stripe","row-config","show-overflow","show-header-overflow","size","loading","radio-config","checkbox-config","header-cell-style","border","show-footer","footer-method","footer-cell-style","cell-style","merge-footer-items","show-footer-overflow","filter-config","edit-rules","scroll-y","scroll-x","onCheckboxChange","onCheckboxAll","onRadioChange","onFooterCellClick"]),Y.value&&!A.hidePagination?(a(),r("div",Me,[k("div",Ie,[k("div",je,[f(e.$slots,"footer")]),k("div",Be,[x(W,{fill:"",direction:"vertical",align:"end"},{default:p(()=>[x(te,{current:$.value.page,"default-page-size":$.value.size,total:M.value,"auto-adjust":!1,size:A.size,"show-total":"","show-page-size":"","page-size-options":O.value,"page-size-props":{triggerProps:{autoFitPopupMinWidth:!0,contentClass:"arco-trigger-content-size-small"}},onPageSizeChange:ne,onChange:oe},{total:p(()=>[J.value.length?(a(),r(u,{key:0},[C(g(T("selection",J.value.length)),1)],64)):d("",!0),M.value?(a(),r(u,{key:1},[C(g(T("totalItems",M.value)),1)],64)):d("",!0)]),_:1},8,["current","default-page-size","total","size","page-size-options"])]),_:1})])])])):d("",!0)])}}}),Fe="",Ue=e=>{const t=l({}),o=l([]),{tableOption:n,$grid:i,$gridTwo:a}=ye(e),r={rowKey:a.getRowKey(),addKey(t){var l;const r=a.getTableData()[t];if(!r.disabled&&i.value){const t=a.getRowKey();if("checkbox"===n.selectedType){const n=i.value,{fullData:a}=n.getTableData();if(e.checkboxKey){const t=e.checkboxKey,l=a.filter(e=>e[t]&&e[t]===r[t]);l.length&&n.setCheckboxRow(l,!0)}else i.value.setCheckboxRow(r,!0);t&&(o.value=(null!=(l=i.value.getCheckboxRecords())?l:[]).map(e=>e[t]))}"radio"===n.selectedType&&(i.value.setRadioRow(r),i.value.getRadioRecord()&&t&&(o.value=[i.value.getRadioRecord()].map(e=>e[t])))}},setTableData(e){i.value&&i.value.reloadData(e)},setTableRow(t,l,o){if(i.value){const n=a.getTableData();"string"==typeof l?n[t][l]=o:Object.keys({...l}).forEach(e=>{n[t][e]=l[e]}),r.addKey(t),"function"==typeof e.footerMethod&&i.value.updateFooter()}}};return{tableRef:t,tableOptions:n,tableUtils:{...r,...a},$grid:i,selectedKeys:o}};function Ne(e,t){const{total:l="\u5408\u8ba1",affixIndex:o=1,ignoreIndex:n=2}={...t};return{footerStyle:{fontWeight:"bold"},footerMethod:({columns:t,data:i})=>[t.map((t,a)=>{if(a===o)return l;if(a<n)return null;const r=i.reduce((l,o)=>((null==e?void 0:e.length)?e.includes(t.field):"number"==typeof o[t.field])?(l||(l=0),l=W.add(l,o[t.field])):null,null);return null!==r?pe.tf(r):null})]}}function Ke(...e){e.forEach((e,t)=>{})}function We(e){return Object.prototype.toString.call(e).slice(8,-1)}function Le(e){return Array.isArray(e)}function He(e){return"Object"===We(e)}function Ge(e){return"Number"===We(e)&&"NaN"!==String(e)}function Je(e){return"Object"===We(e)&&0===Object.keys(e).length}function Ye(e){return"Array"===We(e)&&0===e.length}function Ze(e){return Array.isArray(e)?e:[e]}const Xe=e=>{try{const t=new WeakSet,l=JSON.stringify(e,(e,l)=>{if("object"==typeof l&&null!==l){if(t.has(l))return;t.add(l)}return l});return JSON.parse(l)}catch{return"Array"!==We(e)?{}:[]}};function Qe(e,t=[]){"string"==typeof t&&(t=[t]);const l=Object.create({});return Object.keys(e).forEach(o=>{t.includes(o)||(l[o]=e[o])}),l}function et(e,t=[]){"string"==typeof t&&(t=[t]);const l=Object.create({});return Object.keys(e).forEach(o=>{t.includes(o)&&(l[o]=e[o])}),l}const tt=()=>(Number(new Date)+Number(String(Math.random()).slice(2,15))).toString(32);function lt(e){return Array.isArray(e)?e:e.replace(/\[/g,".").replace(/\]/g,"").split(".")}function ot(e,t,l){return"object"!=typeof e?l:lt(t).reduce((e,t)=>(e||{})[t],e)||l}function nt(e,t,l){return"object"!=typeof e||lt(t).reduce((e,t,o,n)=>o===n.length-1?(e[t]=l,null):(t in e||(e[t]=/^[0-9]{1,}$/.test(n[o+1])?[]:{}),e[t]),e),e}const it=(e,t="")=>{if(/(chrome|safari|firefox)/g.test(navigator.userAgent.toLowerCase())){const l=document.createElement("a");if(l.href=e,void 0!==l.download&&(t=t||e.substring(e.lastIndexOf("/")+1,e.length),l.download=t),document.createEvent){const e=document.createEvent("MouseEvents");return e.initEvent("click",!0,!0),l.dispatchEvent(e),!0}}return~e.indexOf("?")||(e+="?download"),window.open(e,"_self"),!0};function at(e){if(e.multiple){const t={...e};return t.defaultValue?"Array"!==We(t.defaultValue)&&(t.defaultValue=String(t.defaultValue).split(",")):t.defaultValue=[],t}return e}const rt=(e,t)=>{const l=e.__vccOpts||e;for(const[e,o]of t)l[e]=o;return l},ut={};function st(e,t){const l=i("a-date-picker"),o=i("a-range-picker");return a(),r("div",null,[!0!==e.$attrs.multiple?(a(),s(l,z(m({key:0},e.$attrs)),null,16)):(a(),s(o,z(m({key:1},e.$attrs)),null,16))])}const dt=rt(ut,[["render",st]]),ct=Object.freeze(Object.defineProperty({__proto__:null,default:dt},Symbol.toStringTag,{value:"Module"})),pt={};function ft(e,t){const l=i("a-input");return a(),s(l,z(S(e.$attrs)),null,16)}const mt=rt(pt,[["render",ft]]),vt=Object.freeze(Object.defineProperty({__proto__:null,default:mt},Symbol.toStringTag,{value:"Module"})),ht={key:0,class:"u-flex"},yt=n({__name:"Number",props:{modelValue:[Number,Array],multiple:Boolean},emits:["update:model-value"],setup(e,{emit:l}){const o=l,n=e,{modelValue:u}=A(n);function d(e){const t=Ze(null==u?void 0:u.value),l=Number(null==t?void 0:t[e]);return Ge(l)?l:void 0}const c=t(()=>d(0)),p=t(()=>d(1));return(t,l)=>{const u=i("a-input-number");return a(),r("span",null,[!0===e.multiple?(a(),r("div",ht,[x(u,m(t.$attrs,{style:{width:"auto"},"model-value":c.value,"onUpdate:modelValue":l[0]||(l[0]=e=>o("update:model-value",[e,p.value]))}),null,16,["model-value"]),l[3]||(l[3]=k("span",{class:"arco-picker-separator",style:{"min-width":"8px"}},"-",-1)),x(u,m(t.$attrs,{style:{width:"auto"},"model-value":p.value,"onUpdate:modelValue":l[1]||(l[1]=e=>o("update:model-value",[c.value,e]))}),null,16,["model-value"])])):(a(),s(u,m({key:1},t.$attrs,{"model-value":Number(n.modelValue),"onUpdate:modelValue":l[2]||(l[2]=e=>o("update:model-value",e))}),null,16,["model-value"]))])}}}),gt=Object.freeze(Object.defineProperty({__proto__:null,default:yt},Symbol.toStringTag,{value:"Module"})),bt={};function _t(e,t){const l=i("a-select");return a(),s(l,m(e.$attrs,{"trigger-props":{autoFitPopupMinWidth:!0,contentClass:"arco-trigger-content-size-small"}}),null,16)}const wt=rt(bt,[["render",_t]]),kt=Object.freeze(Object.defineProperty({__proto__:null,default:wt},Symbol.toStringTag,{value:"Module"})),xt=Object.assign({"./Date.vue":ct,"./Input.vue":vt,"./Number.vue":gt,"./Select.vue":kt});function Ct(e){if(!e)return mt;const t=Object.keys(xt).find(t=>String(t).toLowerCase().slice(2,-4)===e);return t&&xt[t]?xt[t].default:mt}const zt={"zh-CN":{resetSearch:"\u91cd\u7f6e\u641c\u7d22\u6761\u4ef6",fieldName:"\u5b57\u6bb5\u540d\u79f0",add:"\u6dfb\u52a0",delete:"\u5220\u9664",search:"\u641c\u7d22"},"en-US":{resetSearch:"Reset Search Criteria",fieldName:"Field Name",add:"Add",delete:"Delete",search:"Search"},"ja-JP":{resetSearch:"\u691c\u7d22\u6761\u4ef6\u3092\u30ea\u30bb\u30c3\u30c8",fieldName:"\u30d5\u30a3\u30fc\u30eb\u30c9\u540d",add:"\u8ffd\u52a0",delete:"\u524a\u9664",search:"\u691c\u7d22"}};function St(e){let t=null;return"string"==typeof e&&(t=zt[e]||zt["zh-CN"]),t||e}function At(e,t,l){const o=Array.isArray(l)?l:[l],n=String(St(e)[t]);return l?n.replace(/{(\d+)}/g,(e,t)=>o[t]||""):n}const Vt={class:"u-flex u-flex--start"},Tt={class:"u-flex__item"},Rt=n({__name:"search",props:{loading:{type:Boolean},readonly:{type:Boolean},options:{default:()=>[]},modelValue:{default:()=>({})},size:{default:"small"},labelWidth:{default:"76px"},inputWidth:{default:"163px"},locale:{default:"zh-CN"}},emits:["onSearch","update:modelValue"],setup(e,{emit:o}){const n=o,b=e,_=(e,t)=>At(b.locale,e,t),w=l();function z(){return Object.assign([],b.options).map(at)}function S(){return z().filter(e=>!1!==e.show)}function A(){const e={};return S().forEach(t=>{e[t.name]=at(t).defaultValue}),e}const T=t(()=>b.size),R=l({...A(),...b.modelValue});const E=l(S());function O(){return Object.assign([],E.value)}const $=l(!1);function P(){w.value&&w.value.clearValidate()}const D=t(()=>z().map(e=>({label:e.label,value:e.name,disabled:O().some(t=>t.name===e.name)})));function M(){const e=Object.keys(R.value).reduce((e,t)=>{const l=R.value[t];return Le(l)?e[t]=l.some(e=>!!e)?l.join(","):"":e[t]=l,e},{});return n("update:modelValue",e),e}async function I(){if(w.value){await new Promise(e=>{var t;null==(t=w.value)||t.validate(t=>{var l,o;const n=null==(o=null==(l=Object.values({...t}))?void 0:l[0])?void 0:o.label;n&&H.warning(`\u8bf7\u8f93\u5165${n}`),e(!t)})})&&n("onSearch",M())}}return(e,t)=>{const l=i("icon-refresh"),o=i("a-button"),n=i("a-select"),j=i("a-form-item"),B=i("icon-plus-circle"),q=i("icon-delete"),F=i("a-space"),U=i("a-input-group"),N=i("icon-search"),K=i("a-form");return a(),r("div",{class:V({"shaonq--search":!0,[`shaonq--search-${T.value}`]:!0})},[f(e.$slots,"head"),k("div",Vt,[k("div",Tt,[x(F,{size:1,align:"start"},{default:p(()=>[b.readonly?d("",!0):(a(),s(o,{key:0,type:"outline",class:"arco-btn-light",size:T.value,title:_("resetSearch"),loading:$.value,onClick:t[0]||(t[0]=e=>($.value=!0,E.value=S(),R.value={...A()},void setTimeout(()=>{P(),$.value=!1},200)))},{icon:p(()=>[x(l)]),_:1},8,["size","title","loading"])),x(K,{ref_key:"formRef",ref:w,model:R.value},{default:p(()=>[x(F,{size:T.value,wrap:""},{default:p(()=>[(a(!0),r(u,null,c(E.value,(e,l)=>(a(),s(U,{key:l,size:T.value},{default:p(()=>[x(F,{size:1},{default:p(()=>[b.readonly?(a(),r("div",{key:1,style:y({width:b.labelWidth})},g(e.label),5)):(a(),s(n,{key:0,"model-value":e.name,options:D.value,style:y({width:b.labelWidth}),placeholder:_("fieldName"),"allow-search":"",size:T.value,"trigger-props":{autoFitPopupMinWidth:!0,contentClass:"arco-trigger-content-size-small"},onChange:e=>function(e,t){const l=z().find(e=>e.name===t);l&&(E.value[e]=at(l),R.value[l.name]=E.value[e].defaultValue),R.value=et(R.value,O().map(e=>e.name)),P()}(l,e)},null,8,["model-value","options","style","placeholder","size","onChange"])),x(j,{"no-style":"",field:e.name,label:e.label,required:e.required,rules:e.rules},{default:p(()=>[(a(),s(h(v(Ct)(e.type)),m({modelValue:R.value[e.name],"onUpdate:modelValue":t=>R.value[e.name]=t,size:T.value,style:{width:b.inputWidth},autocomplete:"off",readonly:!e.name,"allow-clear":""},{ref_for:!0},v(Qe)(e,["label","defaultValue","type","show"]),{onChange:t[1]||(t[1]=e=>M()),onPressEnter:t[2]||(t[2]=e=>I())}),null,16,["modelValue","onUpdate:modelValue","size","style","readonly"]))]),_:2},1032,["field","label","required","rules"]),b.readonly?d("",!0):(a(),r(u,{key:2},[l?(a(),s(o,{key:1,type:"primary",class:"arco-btn-light",title:_("delete"),size:T.value,onClick:t=>function(e,t){E.value.splice(e,1),delete R.value[t]}(l,e.name)},{icon:p(()=>[x(q)]),_:1},8,["title","size","onClick"])):(a(),s(o,{key:0,type:"primary",class:"arco-btn-light",title:_("add"),size:T.value,onClick:t[3]||(t[3]=e=>{E.value.push({type:"input",name:"",label:""})})},{icon:p(()=>[x(B)]),_:1},8,["title","size"]))],64))]),_:2},1024)]),_:2},1032,["size"]))),128)),f(e.$slots,"default"),x(F,{size:T.value},{default:p(()=>[x(o,{type:"primary",loading:b.loading,title:_("search"),size:T.value,onClick:t[4]||(t[4]=e=>I())},{icon:p(()=>[x(N)]),default:p(()=>[C(" "+g(_("search")),1)]),_:1},8,["loading","title","size"])]),_:1},8,["size"])]),_:3},8,["size"])]),_:3},8,["model"])]),_:3})])])],2)}}}),Et="";function Ot(e,t){const o="function"==typeof e,n=o?e():e,i=l(n),a=l({});return i.value.forEach(e=>{!1!==e.show&&(a.value[e.name]=at(e).defaultValue)}),t&&o&&_(t,()=>{i.value=o?e():e}),[i,a]}const $t={textarea:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],mini:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]},Pt=n({__name:"index",props:{modelValue:{type:String,default:""},toolbar:{type:[Array,String],default:"textarea"}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,n=t,i=l();let u;return T(()=>{i.value&&!u&&(u=new X(i.value,{modules:{toolbar:{container:"string"==typeof o.toolbar?$t[o.toolbar]||$t.textarea:o.toolbar,handlers:{link(e){if(e){const e=prompt("Enter the URL");u&&u.format("link",e)}else u&&u.format("link",!1)}}}},theme:"snow"}),u.root.innerHTML=o.modelValue,u.on("text-change",()=>{var e,t;n("update:modelValue",String(null!=(t=null==(e=null==u?void 0:u.root)?void 0:e.innerHTML)?t:""))}))}),w(()=>{u=null}),(e,t)=>(a(),r("div",{ref_key:"divRef",ref:i},null,512))}}),Dt="",Mt=n({__name:"index",props:{useErrData:{}},setup(e){const t=e,{useErrData:l}=A(t),o=R({useErrData:l});return E(ge,o),(e,t)=>f(e.$slots,"default")}});function It(e,t){const o=l(null!=e?e:{});return[o,l=>{var n;o.value={...e,...null!=l?l:{}},(null==(n=null==t?void 0:t.value)?void 0:n.resetFields)&&t.value.resetFields()}]}function jt(e,t,l="warning"){const o=null!=t?t:{okButtonProps:{status:"danger"},okText:"\u5220\u9664"};G[l]({title:"\u5220\u9664\u63d0\u793a",simple:!1,width:360,titleAlign:"start",content:"\u786e\u5b9a\u5220\u9664\u6b64\u6570\u636e\uff1f\u6b64\u64cd\u4f5c\u4e0d\u53ef\u64a4\u9500\u3002",hideCancel:!1,...o,async onOk(t){try{"function"==typeof o.onOk&&await o.onOk(t)}finally{e&&e()}}})}function Bt(e,t){const l={...e};return Object.keys(t).forEach(e=>{const o=t[e];if(null==o)return;const n=l[e];null!=n?Array.isArray(n)||Array.isArray(o)?l[e]=[...Ze(n),...Ze(o)]:He(n)&&He(o)?l[e]=Bt(n,o):l[e]=o:l[e]=o}),l}function qt(e,t){if("function"==typeof e||"function"==typeof t)throw new Error("Cannot merge config in form of callback");return Bt(e,t)}function Ft(e){return new Promise(t=>{setTimeout(t,e)})}function Ut(e,t=5){if(!e.length)return Promise.resolve([]);const l=new Array(e.length);let o=0,n=0;return new Promise(i=>{!function a(){for(;n<t&&o<e.length;){const t=o,r=e[t];o+=1,n+=1,setTimeout(()=>{Promise.resolve().then(()=>r()).then(e=>{l[t]=e}).catch(e=>{l[t]=null}).finally(()=>{n-=1,a(),o>=e.length&&0===n&&i(l)})},0)}}()})}async function Nt(e,t,l,o){var n;if(!t)throw new Error("downLoadPdf not element");const i=`${e||"\u65b0\u5efa PDF\u6587\u6863"}.pdf`;let a=(null==l?void 0:l.className)?Array.from(t.querySelectorAll(l.className)):[t];a.length||(a=[t]);const r=new ee({unit:"mm",format:"a4",orientation:"portrait",putOnlyUsedFonts:!0,compress:!0,floatPrecision:"smart",...o}),u=a.map(e=>()=>{var t;return te.toCanvas(e,{scale:null!=(t=null==l?void 0:l.scale)?t:1.3})}),s=await Ut(u);if(s.some(e=>null===e))throw new Error("\u751f\u6210\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u662f\u5426\u6709\u4e0d\u53ef\u8bbf\u95ee\u7684\u7f51\u7edc\u8d44\u6e90");const d=s.filter(e=>!!e);let c=0;const p=null!=(n=null==l?void 0:l.paddingBuffer)?n:5,f=d.map((e,t)=>async()=>{t>0&&r.addPage();const o=e.width/210,n=e.height/o;if(n<=297)r.addImage(e,"PNG",0,0,210,n);else{let t=n,l=0;for(;t>0;)t>p&&r.addImage(e,"PNG",0,l,210,n),t-=297,l-=297,t>0&&r.addPage()}c+=1,"function"==typeof(null==l?void 0:l.progress)&&l.progress(c,d.length)});await Ut(f),r.save(i)}function Kt(e){var t,l,o,n,i,a;if(!e.bcid)return"";const r=document.createElement("canvas");return r.height=1,r.width=1,Q.toCanvas(r,{bcid:e.bcid,text:null!=(t=e.defaultValue)?t:"Unknown",height:e.height,scaleX:null!=(o=null!=(l=e.scaleX)?l:e.scale)?o:2,scaleY:null!=(i=null!=(n=e.scaleY)?n:e.scale)?i:2,width:e.width,padding:null!=(a=e.padding)?a:0,..."qrcode"===e.bcid?{eclevel:"H"}:{}}),r.toDataURL()}function Wt(e,t,l){const o={...e.componentAttr};return"string"==typeof e.type||"modelValue"in o||(o.modelValue=t=>{var l;return null!=(l=t.getModel(t.model))?l:e.defaultValue},o.updateModelValue=e=>t=>e.setModel(e.model,t)),Object.entries(o).forEach(([e,n])=>{if("function"==typeof n)try{o[e]=n(t,l)}catch{}}),o}function Lt(e){return e?"string"==typeof e?e.split(","):[...e]:[]}function Ht(e){return Lt(e).join(",")}const Gt=n({__name:"form",props:{config:{default:()=>[]},labelWidth:{default:"110px"},labelAlign:{default:"right"},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},hideSubmit:{type:Boolean,default:!1},modelValue:{default:void 0},gutter:{default:8},span:{default:24},formAttr:{default:void 0},grid:{default:void 0}},emits:["update:modelValue","submit","error"],setup(e,{expose:t,emit:o}){const n=e;function y(e){const t={...e};return n.config.forEach(e=>{e.dotNotation&&e.model&&(t[e.model]=Lt(t[e.model]))}),t}function g(e){const t={...e};return n.config.forEach(e=>{e.dotNotation&&e.model&&(t[e.model]=Ht(t[e.model]))}),t}const b=o,w=l();function k(e){return Object.fromEntries(Object.values(n.config).filter(e=>e.model).map(t=>{var l;return[t.model,e?e(t):null!=(l=t.defaultValue)?l:null]}))}const[z,S]=It(k(e=>{var t,l;return null!=(l=null==(t=null==e?void 0:e.options)?void 0:t.options)?l:[]})),[A]=It(k(e=>!1!==(null==e?void 0:e.show))),[V,R]=It(y({...k(),...n.modelValue}),w);function E(e){return e.model?A.value[e.model]:!1!==e.show}function O(){var e,t;const l=g(V.value);b("update:modelValue",{...k(),...l}),"function"==typeof(null==(e=w.value)?void 0:e.validate)&&(null==(t=w.value)||t.validate())}function $(e){if(e.customClass)return"function"==typeof e.customClass?e.customClass(e,V.value):e}O();const P={getModelOption(e,t){const l=z.value[e];return t?null==l?void 0:l.find(e=>e.value===t):l},getModels:()=>V.value,getModel:e=>V.value[e],getShow:e=>A.value[e],setModelOption(e,t){z.value[e]=t},setModel(e,t){e&&("string"==typeof e?V.value[e]=t:V.value={...V.value,...e},O())},setShow(e,t){(Array.isArray(e)?e:[e]).forEach(e=>{A.value[e]=t})}},D=e=>({...P,model:e.model,...e.events,getFormItem:()=>e}),M=({options:e})=>n.disabled||!!(null==e?void 0:e.disabled),I=e=>{const{options:t,rules:l,name:o}=e;if("function"==typeof l)return l({...e},D(e));const n="string"==typeof e.type?`\u8bf7${/^(a-input|a-textarea)/.test(e.type)?"\u8f93\u5165":"\u9009\u62e9"}${o}`:`${o}\u5fc5\u586b`;return l||((null==t?void 0:t.required)?[{required:!0,message:n}]:[])},{setModel:j,setModelOption:B}=P;async function q(){return new Promise(e=>{w.value.validate(t=>{if(t)e([!0,t]),b("error",t);else{const t=g(V.value);e([!1,t]),b("update:modelValue",t),b("submit",t)}})})}return _(()=>n.modelValue,()=>{V.value=y(n.modelValue)},{deep:!1,immediate:!0}),_(()=>n.config,()=>{A.value=k(e=>!1!==(null==e?void 0:e.show))}),T(()=>{R(),S(),n.config.forEach(async e=>{var t;if("function"==typeof(null==(t=null==e?void 0:e.events)?void 0:t.onMounted)){const t=await e.events.onMounted(D(e));t&&e.model&&B(e.model,t)}})}),t({onSubmit:q,onReset:R,resetFields:function(){var e,t;"function"==typeof(null==(e=w.value)?void 0:e.resetFields)&&(null==(t=w.value)||t.resetFields())}}),(e,t)=>{const l=i("a-form-item"),o=i("a-col"),y=i("a-row"),g=i("icon-save"),b=i("a-button"),_=i("a-space"),k=i("a-form");return a(),s(k,m({ref_key:"formRef",ref:w,model:v(V),"label-col-props":{flex:n.labelWidth},"label-col-style":{paddingRight:"8px"},disabled:n.disabled,"label-align":n.labelAlign,class:"orc-form"},n.formAttr,{size:"small"}),{default:p(()=>[x(y,{gutter:n.gutter},{default:p(()=>[(a(!0),r(u,null,c(n.config,(t,i)=>{var c,y;return a(),r(u,{key:i},[E(t)?(a(),s(o,m({key:0,ref_for:!0},n.grid,{span:(null==(c=t.options)?void 0:c.span)||n.span,offset:null==(y=t.options)?void 0:y.offset}),{default:p(()=>{var o,i;return[x(l,m({field:t.model,"row-class":$(t),label:t.name,"validate-trigger":t.validateTrigger,rules:I(t),disabled:M(t),help:null==(o=t.options)?void 0:o.help,tooltip:null==(i=t.options)?void 0:i.tooltip,"label-col-flex":n.labelWidth,"asterisk-position":"right"===n.labelAlign?"start":"end"},{ref_for:!0},t.itemAttr),{default:p(()=>{return[f(e.$slots,t.model,m({utils:D(t),componentAttr:v(Wt)(t,D(t))},{ref_for:!0},{...t.model?{value:v(V)[t.model],setValue:(l=t.model,e=>j(l,e)),options:v(z)[t.model]}:{}},{disabled:M(t)}),()=>{var e,l;return[(a(),s(h(t.type),m({size:"small","input-attrs":(l=t,"string"==typeof l&&["a-input","a-textarea"].includes(l)?{autocomplete:"new-password"}:null),placeholder:null==(e=null==t?void 0:t.options)?void 0:e.placeholder,disabled:M(t),style:{width:"100%"}},{ref_for:!0},{...t.model?{modelValue:v(V)[t.model],options:v(z)[t.model]}:{},...v(Wt)(t,D(t)),..."string"!=typeof t.type?{utils:D(t)}:{}},{onChange:e=>async function(e,t){var l;"function"==typeof(null==(l=t.events)?void 0:l.onChange)&&await t.events.onChange(e,D(t))}(e,t),"onUpdate:modelValue":e=>v(j)(`${t.model}`,e)}),null,16,["input-attrs","placeholder","disabled","onChange","onUpdate:modelValue"]))]})];var l}),_:2},1040,["field","row-class","label","validate-trigger","rules","disabled","help","tooltip","label-col-flex","asterisk-position"])]}),_:2},1040,["span","offset"])):d("",!0)],64)}),128)),f(e.$slots,"row",{onSubmit:q})]),_:3},8,["gutter"]),f(e.$slots,"default",{onSubmit:q},()=>[n.hideSubmit?d("",!0):(a(),s(l,{key:0},{default:p(()=>[x(_,null,{default:p(()=>[x(b,{type:"primary",loading:n.loading,onClick:t[0]||(t[0]=e=>q())},{icon:p(()=>[x(g)]),default:p(()=>[t[1]||(t[1]=C(" \u4fdd\u5b58 ",-1))]),_:1},8,["loading"])]),_:1})]),_:1}))])]),_:3},16,["model","label-col-props","disabled","label-align"])}}}),Jt=n({__name:"modal-form",props:{isView:{type:Boolean},disabled:{type:Boolean},title:{default:"\u4fe1\u606f"},span:{},gutter:{default:8},size:{default:"small"},config:{},modelValue:{default:void 0},labelWidth:{},buttonAttrs:{},modalAttrs:{}},emits:["update:modelValue","submit","error"],setup(e,{expose:o,emit:n}){const r=e,u=n,[d,c]=It({}),y=()=>c({visible:!0,loading:!1}),b=()=>c({visible:!1}),_=O(),w=t(()=>{const e=et(_,["class","style"]);return r.isView?e:{...e,disabled:r.disabled,type:"primary",size:r.size,...r.buttonAttrs,onClick:y}}),k=t(()=>Qe(r,["buttonAttrs","modalAttrs","title"])),A=l();async function V(){const[e,t]=await A.value.onSubmit();e||u("submit",{data:t,utils:{setVisible(e){d.value.visible=e},setLoading(e){d.value.loading=e}}})}return o({openModal:y,hideModal:b,onSubmit:V}),(e,t)=>{const l=i("a-button"),o=i("a-modal");return a(),s(h(r.isView?"div":v(J)),z(S(w.value)),$({default:p(()=>[f(e.$slots,"default",{onSubmit:V,onShow:y},()=>[C(g(r.title),1)]),(a(),s(P,{to:"body"},[x(o,m({visible:v(d).visible,title:r.title,"title-align":"start","mask-closable":!1,class:"orc-form--modal","body-style":{minHeight:"280px"},"unmount-on-close":""},r.modalAttrs,{onCancel:b}),{footer:p(()=>[f(e.$slots,"footer",{onShow:y,onHide:b},()=>[x(l,{size:r.size,onClick:b},{default:p(()=>[...t[2]||(t[2]=[C("\u53d6\u6d88",-1)])]),_:1},8,["size"]),x(l,{type:"primary",size:r.size,loading:v(d).loading,onClick:V},{default:p(()=>[...t[3]||(t[3]=[C("\u786e\u8ba4",-1)])]),_:1},8,["size","loading"])])]),default:p(()=>[x(Gt,m({ref_key:"formRef",ref:A,"hide-submit":"","label-align":"left"},k.value,{onError:t[0]||(t[0]=e=>u("error",e)),"onUpdate:modelValue":t[1]||(t[1]=e=>u("update:modelValue",e))}),{row:p(()=>[f(e.$slots,"row",{onShow:y})]),_:3},16)]),_:3},16,["visible","title"])]))]),_:2},[!r.isView&&e.$slots.icon?{name:"icon",fn:p(()=>[f(e.$slots,"icon")]),key:"0"}:void 0]),1040)}}}),Yt=n({__name:"space",setup:e=>(E(le,{...o(le),error:!1}),(e,t)=>(a(),r("div",null,[f(e.$slots,"default")])))}),Zt="_X_ROW_KEY",Xt=n({__name:"table",props:{modelValue:{default:void 0},updateModelValue:{},height:{default:180},options:{default:void 0},hideTools:{type:Boolean,default:!1},hideSeq:{type:Boolean},disabled:{type:Boolean},selectedKeys:{default:void 0},rowKey:{default:Zt},tableOptions:{default:void 0},utils:{}},emits:["reset","cellClick","update:selectedKeys"],setup(e,{emit:o}){var n;const y=e,b=o,_=l(null!=(n=y.selectedKeys)?n:[]),w=R({}),k=t(()=>{var e;return(null!=(e=y.options)?e:[]).map(e=>{var t,l,o,n;return{...e,dataIndex:null!=(l=null!=(t=e.dataIndex)?t:e.model)?l:"",model:null!=(n=null!=(o=e.model)?o:e.dataIndex)?n:""}})});function z(){var e;return null!=(e=y.modelValue)?e:[]}function S(e){"function"==typeof y.updateModelValue&&y.updateModelValue(e)}const A=e=>{var t;return y.disabled||!!(null==(t=null==e?void 0:e.options)?void 0:t.disabled)};async function V(e,t,l){if(t){const{rowIndex:o}=e,n=k.value.find(e=>e.model===t);n&&await async function(e,t){var l;y.utils&&"function"==typeof(null==(l=t.events)?void 0:l.onChange)&&await t.events.onChange(e,y.utils)}([l,e],n);const i=[...z()];i[o]={...i[o],[t]:l},S(i)}}return T(()=>{k.value.forEach(async e=>{var t;if("function"==typeof(null==(t=null==e?void 0:e.events)?void 0:t.onMounted)&&e.model&&y.utils){const t=await e.events.onMounted(y.utils);t&&(w[e.model]=t)}})}),(e,t)=>{const l=i("a-button"),o=i("a-button-group"),n=i("a-space"),T=i("vxe-column");return a(),s(v(qe),{ref:"tableRef","selected-keys":_.value,"onUpdate:selectedKeys":t[2]||(t[2]=e=>_.value=e),class:"orc-vxe--static",data:z(),height:y.height,option:{rowKey:y.rowKey,selectedType:"checkbox",scrollX:{enabled:!0},scrollY:{enabled:!0},columns:[],...y.tableOptions},"hide-setting":"","hide-pagination":"",onCellClick:t[3]||(t[3]=e=>b("cellClick",e)),onOnReset:t[4]||(t[4]=e=>b("reset"))},{columns:p(()=>[!0!==y.hideTools?(a(),s(T,{key:0,type:"checkbox",width:"28"})):d("",!0),!0!==y.hideSeq?(a(),s(T,{key:1,type:"seq",title:"\u5e8f",width:"28",align:!0===y.hideTools?"center":"left","show-overflow":""},null,8,["align"])):d("",!0),(a(!0),r(u,null,c(k.value,(t,l)=>{var o;return a(),r(u,{key:l},[!1!==t.show?(a(),s(T,{key:0,field:t.model,title:t.name,width:t.width,align:t.align,"show-overflow":t.tooltip,"show-header-overflow":t.tooltip,"title-prefix":(null==(o=t.options)?void 0:o.required)?{icon:"vxe-cell--required-icon"}:void 0,sortable:t.sort,fixed:t.fixed},$({_:2},[y.utils&&!1!==t.div?{name:"default",fn:p(l=>[f(e.$slots,t.model,{row:l.row,model:t.model},()=>[!t.type&&t.model?(a(),r("span",m({key:0,style:v(me)(l.row,t)},{ref_for:!0},v(Wt)(t,y.utils,l)),g(v(fe)(l.row,t)),17)):(a(),s(h(t.type),m({key:1,size:"mini"},{ref_for:!0},{...t.model?{"model-value":l.row[t.model],options:w[t.model]}:{},...v(Wt)(t,y.utils,l)},{disabled:A(t),"onUpdate:modelValue":e=>V(l,t.model,e)}),null,16,["disabled","onUpdate:modelValue"]))])]),key:"0"}:void 0]),1032,["field","title","width","align","show-overflow","show-header-overflow","title-prefix","sortable","fixed"])):d("",!0)],64)}),128)),k.value.some(e=>"other"===e.model)?d("",!0):(a(),s(T,{key:2,field:"other"}))]),default:p(()=>[x(n,{size:"mini"},{default:p(()=>[!0!==y.hideTools?f(e.$slots,"default",{key:0},()=>[A()?d("",!0):(a(),s(o,{key:0,size:"mini"},{default:p(()=>[x(l,{type:"text",onClick:t[0]||(t[0]=e=>(()=>{const e=k.value.reduce((e,t)=>{var l;return t.model&&(e[t.model]=null!=(l=t.defaultValue)?l:null),e},{}),t=[...z()];t.push(e),S(t)})())},{default:p(()=>[...t[5]||(t[5]=[C("\u65b0\u589e",-1)])]),_:1}),x(l,{type:"text",status:"danger",disabled:!_.value.length,onClick:t[1]||(t[1]=e=>(S([...z()].filter(e=>!_.value.includes(e[y.rowKey]))),_.value=[],void b("update:selectedKeys",_.value)))},{default:p(()=>[...t[6]||(t[6]=[C("\u5220\u9664",-1)])]),_:1},8,["disabled"])]),_:1}))]):d("",!0),f(e.$slots,"title")]),_:3})]),_:3},8,["selected-keys","data","height","option"])}}}),Qt="",el=n({__name:"popup",props:{disabled:{type:Boolean,default:void 0},title:{default:"\u8bf7\u9009\u62e9"},size:{default:"small"},modelValue:{default:void 0},nameKey:{},options:{},pagination:{type:Boolean},keyword:{default:"keyword"},tableData:{},modalAttrs:{},tableAttrs:{},inputAttrs:{}},emits:["update:modelValue","change"],setup(e,{emit:l}){const o=e,{mergedDisabled:n,eventHandlers:r}=Y(),u=t(()=>{var e;return null!=(e=o.disabled)?e:n.value}),c=l,[h,y]=It({visible:!1,keyword:""});function g(){u.value||y({visible:!0})}const b=()=>y({visible:!1}),{tableRef:_,selectedKeys:w,tableOptions:k}=Ue(o.options);function z(e){const t={[o.keyword]:h.value.keyword,page:e};return"function"==typeof(null==k?void 0:k.resolvePage)&&k.resolvePage(t)?k.resolvePage(t):t}function S(){var e;null==(e=_.value)||e.dataInit()}function A(e){var t,l;const n=Ht(e.map(e=>{var t;return e[null!=(t=o.nameKey)?t:"name"]}));c("update:modelValue",n),c("change",{name:n,data:[...e]}),null==(l=null==(t=r.value)?void 0:t.onChange)||l.call(t),b()}function V({row:e}){"radio"===o.options.selectedType&&A([e])}return(t,l)=>{const n=i("a-input-search"),r=i("a-button");return a(),s(Yt,null,{default:p(()=>[f(t.$slots,"default",{value:o.modelValue,disabled:u.value,onShow:g},()=>[x(n,{size:o.size,"model-value":o.modelValue,readonly:"",style:{cursor:"pointer"},onClick:g},null,8,["size","model-value"])]),(a(),s(P,{to:"body"},[x(v(G),m({visible:v(h).visible,title:e.title,"title-align":"start","mask-closable":!1,size:o.size,"body-style":{padding:"0 0 12px 0"},width:750,footer:!0,"unmount-on-close":""},o.modalAttrs,{onCancel:b,onClose:b}),{footer:p(()=>[x(r,{size:o.size,onClick:l[2]||(l[2]=e=>b())},{default:p(()=>[...l[4]||(l[4]=[C("\u53d6\u6d88",-1)])]),_:1},8,["size"]),x(r,{type:"primary",size:o.size,disabled:!v(w).length,onClick:l[3]||(l[3]=e=>A(v(_).getSelection()))},{default:p(()=>[...l[5]||(l[5]=[C("\u786e\u8ba4",-1)])]),_:1},8,["size","disabled"])]),default:p(()=>{var e;return[x(v(qe),m({ref_key:"tableRef",ref:_,"selected-keys":v(w),"onUpdate:selectedKeys":l[1]||(l[1]=e=>D(w)?w.value=e:null),data:null!=(e=o.tableData)?e:[],"hide-setting":"",option:{...v(k),resolvePage:z},height:330,size:o.size,"hide-pagination":!o.pagination},o.tableAttrs,{onCellDblclick:V}),{default:p(()=>[o.pagination?(a(),s(n,m({key:0,modelValue:v(h).keyword,"onUpdate:modelValue":l[0]||(l[0]=e=>v(h).keyword=e),style:{width:"192px"},placeholder:"\u6a21\u7cca\u641c\u7d22","allow-clear":"",size:o.size},o.inputAttrs,{onSearch:S}),null,16,["modelValue","size"])):d("",!0)]),_:1},16,["selected-keys","data","option","size","hide-pagination"])]}),_:1},16,["visible","title","size"])]))]),_:3})}}});function tl(e){return M(e)}const ll=tl(Xt),ol=tl(el),nl=n({__name:"index",props:{isShow:{type:Boolean},isDirection:{type:Boolean},formProps:{}},setup(e){const t=l();return(l,o)=>(a(),r("div",{style:y(e.isShow?{display:"block"}:{position:"absolute",clip:"rect(0px, 0px, 0px, 0px)",height:"0px",overflow:"auto"})},[k("div",m({ref_key:"print$",ref:t,style:[{position:"relative",width:"100%"},{maxWidth:e.isDirection?"297mm":"210mm"}]},e.formProps),[f(l.$slots,"default")],16)],4))}}),il="//at.alicdn.com/t/c/font_4872361_n3qs21vht0f.js";function al(e){var t;const l="icon-danhangshuru";return(null==(t=[{tid:"text",type:l},{tid:"number",type:"icon-shuzishuru"},{tid:"table",type:"icon-24gl-table"},{tid:"image",type:"icon-24gl-picture"},{tid:"longText",type:"icon-duohangshuru"},{tid:"hline",type:"icon-horizontalLine"},{tid:"vline",type:"icon-verticalLine"},{tid:"rect",type:"icon-24gl-rectangle"},{tid:"oval",type:"icon-24gl-circle"},{tid:"barcode",type:"icon-bar-code"},{tid:"qrcode",type:"icon-qrcode"},{tid:"object",type:"icon-qrcode"}].find(t=>t.tid===e))?void 0:t.type)||l}const rl=()=>new Promise(e=>{e(Z.addFromIconFontCn({src:`https:${il}`}))}),ul=I(rl),sl={class:"u-nos"},dl={class:"u-card__bd u-aside__bd u-cl",style:{"padding-top":"0","border-bottom":"1px solid var(--color-neutral-2)"}},cl=n({__name:"card",props:{title:String,isFirst:Boolean,show:{type:Boolean,default:!0}},setup(e){const t=e,l=j(t.show);return(e,o)=>{const n=i("icon-down"),u=i("icon-right");return a(),r("div",sl,[k("div",{class:"u-card__hd u-aside__hd",style:y([{borderBottomWidth:l.value?"0px":"1px"},{height:"36px","line-height":"36px","border-bottom-color":"var(--color-neutral-2)"}])},[k("div",null,[f(e.$slots,"title",{},()=>[k("strong",null,g(t.title),1)])]),k("span",{style:{cursor:"pointer"},onClick:o[0]||(o[0]=e=>{l.value=!l.value})},[l.value?(a(),s(n,{key:0})):(a(),s(u,{key:1}))])],4),x(B,null,{default:p(()=>[q(k("div",dl,[f(e.$slots,"default")],512),[[F,l.value]])]),_:3})])}}}),pl=n({__name:"guides",props:{show:{type:Boolean,default:!0},zoom:{default:1},mainContainer:{},warpContainer:{},leftOffset:{default:0},topOffset:{default:-24}},setup(e,{expose:t}){const l=e,o=l.mainContainer;let n=null,i=null;const u=W.debounce(function(){var e,t,a,r,u,s;if(n&&i){const d=Math.min(2,Math.max(.5,1*l.zoom));n.zoom=d,i.zoom=d;let c=50;if(d>1.2&&(c=25),d<.8&&(c=100),n.unit=c,i.unit=c,n&&i&&l.warpContainer){const c=document.querySelector(l.warpContainer);if(!c)return;const p=l.leftOffset+(null!=(e=null==c?void 0:c.offsetLeft)?e:0)-(null!=(t=c.scrollLeft)?t:0),f=l.topOffset+(null!=(a=null==c?void 0:c.offsetTop)?a:0)-(null!=(r=c.scrollTop)?r:0);n.scroll(-p/d),n.scrollGuides(-f/d),i.scroll(-f/d);const m=null!=(s=null==(u=document.querySelector(`${o} .${i.className}`))?void 0:u.clientWidth)?s:30;i.scrollGuides(-(p-m)/d)}}},1e3/30);function s(){if(!l.show)return null==n||n.destroy(),null==i||i.destroy(),n=null,void(i=null);const e={backgroundColor:"#f9f9fa",lineColor:"#bec2c7",textColor:"#999999",displayDragPos:!0,dragPosFormat:e=>`${e}px`},t=document.querySelector(o);t&&(n=new re(t,{...e,type:"horizontal",className:"comp-horizontal"}).on("changeGuides",()=>{}),i=new re(t,{...e,type:"vertical",className:"comp-vertical"}).on("changeGuides",()=>{}),u())}return _(()=>l.show,s),_(()=>l.zoom,u),T(()=>{s(),window.addEventListener("resize",u,!1),ae(l.warpContainer).on("scroll",u)}),w(()=>{window.removeEventListener("resize",u,!1),ae(l.warpContainer).off("scroll",u)}),t({onResize:u}),(e,t)=>(a(),r("div"))}}),fl="",ml={class:"u-flex",style:{width:"calc(100% - 60px)"}},vl=n({__name:"preview",setup(e,{expose:t}){const o=l(!1),n=l(!0),r=l(!1),u=l(0),d=l({}),c=l({}),f=()=>{o.value=!1},m=()=>{var e;r.value=!0,null==(e=d.value)||e.print(c.value,{},{callback:()=>{r.value=!1}})},v=()=>{const e=document.getElementById("preview_content_design");e&&Nt("\u6253\u5370\u9884\u89c8",e,{className:".hiprint-printPaper",scale:2})};return t({show:(e,t,l="210")=>{o.value=!0,n.value=!0,u.value=e.editingPanel?e.editingPanel.width:Number(l),d.value=e,c.value=t,setTimeout(()=>{ae("#preview_content_design").html(e.getHtml(t)),n.value=!1},500)},hideModal:f}),(e,t)=>{const l=i("a-spin"),d=i("icon-printer"),c=i("a-button"),h=i("icon-download"),g=i("ASpace"),b=i("AModal");return a(),s(b,{title:"\u6253\u5370\u9884\u89c8",visible:o.value,"body-style":{padding:0,height:"100%"},"mask-closable":!1,width:Math.max(u.value,210)+"mm",footer:!1,fullscreen:"",onCancel:f},{title:p(()=>[k("div",ml,[t[3]||(t[3]=k("div",{class:"u-flex__item"},[k("strong",null,"\u6253\u5370\u9884\u89c8")],-1)),k("div",null,[x(g,null,{default:p(()=>[x(c,{loading:r.value,type:"primary",icon:"printer",onClick:U(m,["stop"])},{icon:p(()=>[x(d)]),default:p(()=>[t[1]||(t[1]=C(" \u6253\u5370 ",-1))]),_:1},8,["loading"]),x(c,{type:"primary",icon:"printer",onClick:U(v,["stop"])},{icon:p(()=>[x(h)]),default:p(()=>[t[2]||(t[2]=C(" \u4e0b\u8f7dPDF ",-1))]),_:1})]),_:1})])])]),footer:p(()=>[x(c,{key:"close",type:"primary",onClick:f},{default:p(()=>[...t[4]||(t[4]=[C("\u5173\u95ed",-1)])]),_:1})]),default:p(()=>[x(l,{class:"u-main",loading:n.value,style:{width:"100%","min-height":"100%",display:"block"}},{default:p(()=>[k("div",{style:y([{width:u.value+"mm",overflow:"hidden"},{margin:"0 auto",background:"#fff","box-shadow":"rgba(0, 0, 0, 0.12) 0 0 20px"}])},[...t[0]||(t[0]=[k("div",{id:"preview_content_design"},null,-1)])],4)]),_:1},8,["loading"])]),_:1},8,["visible","width"])}}}),hl={class:"u-quill-body"},yl={class:"u-flex",style:{width:"calc(100% - 60px)"}},gl={class:"u-flex__item"},bl={style:{color:"var(--color-border-4)"}},_l=n({__name:"kbd",setup(e,{expose:t}){const o=l(!1),n=l(210),r=l({}),u=l({}),{version:d}=oe,c=()=>{o.value=!1};return t({show:(e,t)=>{o.value=!0,r.value=e,u.value=t},hideModal:c}),(e,t)=>{const l=i("icon-lock"),r=i("icon-to-top"),u=i("icon-to-bottom"),f=i("ACard"),m=i("a-spin"),h=i("a-button"),b=i("AModal");return a(),s(b,{title:"\u5e2e\u52a9\u6587\u6863",visible:o.value,"body-style":{padding:0,height:"100%"},"mask-closable":!1,width:Math.max(n.value,210)+"mm",footer:!1,fullscreen:"",onCancel:c},{title:p(()=>[k("div",yl,[k("div",gl,[t[23]||(t[23]=k("strong",null,"\u5e2e\u52a9\u6587\u6863",-1)),k("small",bl,"v "+g(v(d)),1)]),t[24]||(t[24]=k("div",null,null,-1))])]),footer:p(()=>[x(h,{key:"close",type:"primary",onClick:c},{default:p(()=>[...t[25]||(t[25]=[C("\u5173\u95ed",-1)])]),_:1})]),default:p(()=>[x(m,{class:"u-main comp-kbd",style:{width:"100%","min-height":"100%",display:"block"}},{default:p(()=>[k("div",{style:y([{width:n.value+"mm",overflow:"hidden"},{margin:"0 auto"}])},[x(f,null,{default:p(()=>[k("div",hl,[t[10]||(t[10]=k("h1",null,"\u6253\u5370\u8bbe\u8ba1\u5668\u5e2e\u52a9\u6587\u6863",-1)),t[11]||(t[11]=k("p",null,"\u5728\u4f7f\u7528\u6253\u5370\u8bbe\u8ba1\u5668\u65f6\uff0c\u719f\u7ec3\u638c\u63e1\u5feb\u6377\u952e\u80fd\u591f\u663e\u8457\u63d0\u5347\u60a8\u7684\u5de5\u4f5c\u6548\u7387\u3002\u672c\u6587\u6863\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5e38\u7528\u64cd\u4f5c\u7684\u5feb\u6377\u65b9\u5f0f\u53ca\u5176\u529f\u80fd\u63cf\u8ff0\uff0c\u52a9\u60a8\u66f4\u9ad8\u6548\u5730\u5b8c\u6210\u8bbe\u8ba1\u4efb\u52a1\u3002",-1)),t[12]||(t[12]=k("h2",null,"\u4e00\u3001\u57fa\u7840\u64cd\u4f5c\u5feb\u6377\u952e",-1)),t[13]||(t[13]=k("table",null,[k("tbody",null,[k("tr",null,[k("th",{style:{width:"12em"}},"\u5feb\u6377\u952e"),k("th",null,"\u529f\u80fd\u8bf4\u660e")]),k("tr",null,[k("td",null,[k("kbd",null,"Ctrl"),C(" + "),k("kbd",null,"C")]),k("td",null,"\u590d\u5236\u5f53\u524d\u9009\u4e2d\u7684\u5185\u5bb9\uff08\u6587\u672c\uff09\u6216\u7ec4\u4ef6\u3002")]),k("tr",null,[k("td",null,[k("kbd",null,"Ctrl"),C(" + "),k("kbd",null,"V")]),k("td",null,"\u7c98\u8d34\u526a\u8d34\u677f\u4e2d\u7684\u5185\u5bb9\u5230\u5f53\u524d\u5149\u6807\u4f4d\u7f6e\u6216\u753b\u5e03\u4e0a\u3002")]),k("tr",null,[k("td",null,[k("kbd",null,"Ctrl"),C(" + "),k("kbd",null,"Z")]),k("td",null,"\u64a4\u9500\u4e0a\u4e00\u6b65\u64cd\u4f5c\u3002\u53ef\u7528\u4e8e\u56de\u9000\u9519\u8bef\u7684\u64cd\u4f5c\uff0c\u4f8b\u5982\u8bef\u5220\u3001\u8bef\u6539\u5185\u5bb9\u7b49\u3002\u652f\u6301\u591a\u6b21\u64a4\u9500\u3002")]),k("tr",null,[k("td",null,[k("kbd",null,"Ctrl"),C(" + "),k("kbd",null,"Shift"),C(" + "),k("kbd",null,"Z")]),k("td",null,"\u91cd\u505a\u4e0a\u4e00\u6b21\u88ab\u64a4\u9500\u7684\u64cd\u4f5c\u3002\u4e0e\u64a4\u9500\u5f62\u6210\u4e92\u8865\uff0c\u53ef\u6062\u590d\u64a4\u9500\u540e\u7684\u5185\u5bb9\u3002")]),k("tr",null,[k("td",null,[k("kbd",null,"Del")]),k("td",null,"\u5220\u9664\u5f53\u524d\u9009\u4e2d\u7684\u7ec4\u4ef6\u3002\u5e38\u7528\u4e8e\u6e05\u9664\u4e0d\u9700\u8981\u7684\u5143\u7d20\uff0c\u5982\u6587\u672c\u3001\u56fe\u7247\u7b49\u3002")])])],-1)),t[14]||(t[14]=k("h2",null,"\u4e8c\u3001\u9009\u62e9\u4e0e\u591a\u9009\u64cd\u4f5c",-1)),t[15]||(t[15]=k("table",null,[k("tbody",null,[k("tr",null,[k("th",{style:{width:"12em"}},"\u5feb\u6377\u952e"),k("th",null,"\u529f\u80fd\u8bf4\u660e")]),k("tr",null,[k("td",null,[k("kbd",null,"Ctrl"),C(" + "),k("kbd",null,"\ud83d\uddb1\ufe0f")]),k("td",null,[C(" \u591a\u9009\u529f\u80fd\u3002\u6309\u4e0b "),k("kbd",null,"Ctrl"),C(" \u952e\u7684\u540c\u65f6\u70b9\u51fb\u9f20\u6807 "),k("kbd",null,"\ud83d\uddb1\ufe0f"),C(" \u5de6\u952e\u53ef\u4ee5\u9009\u62e9\u591a\u4e2a\u4e0d\u8fde\u7eed\u7684\u7ec4\u4ef6\u3002\u8fd9\u5bf9\u4e8e\u540c\u65f6\u8c03\u6574\u591a\u4e2a\u5143\u7d20\u975e\u5e38\u6709\u7528\u3002 ")])])])],-1)),t[16]||(t[16]=k("h2",null,"\u4e09\u3001\u79fb\u52a8\u4e0e\u5b9a\u4f4d\u64cd\u4f5c",-1)),t[17]||(t[17]=k("table",null,[k("tbody",null,[k("tr",null,[k("th",{style:{width:"12em"}},"\u5feb\u6377\u952e"),k("th",null,"\u529f\u80fd\u8bf4\u660e")]),k("tr",null,[k("td",null,[k("kbd",null,"\u2191"),C(" / "),k("kbd",null,"\u2193"),C(" / "),k("kbd",null,"\u2190"),C(" / "),k("kbd",null,"\u2192")]),k("td",null,"\u79fb\u52a8\u5f53\u524d\u9009\u4e2d\u7684\u7ec4\u4ef6\u3002\u6bcf\u6b21\u6309\u4e0b\u65b9\u5411\u952e\uff0c\u9009\u4e2d\u7ec4\u4ef6\u4f1a\u5411\u5bf9\u5e94\u65b9\u5411\u5fae\u8c03\u4e00\u4e2a\u5355\u4f4d\uff0c\u9002\u5408\u8fdb\u884c\u7cbe\u786e\u7684\u4f4d\u7f6e\u8c03\u6574\u3002")])])],-1)),t[18]||(t[18]=k("h2",null,"\u56db\u3001\u5de5\u5177\u680f\u64cd\u4f5c",-1)),k("table",null,[k("tbody",null,[t[9]||(t[9]=k("tr",null,[k("th",{style:{width:"12em"}},"\u56fe\u6807"),k("th",null,"\u529f\u80fd\u63cf\u8ff0")],-1)),k("tr",null,[k("td",null,[k("kbd",null,[x(l,{title:"\u9501\u5b9a"})])]),t[0]||(t[0]=k("td",null,"\u9501\u5b9a\u6216\u89e3\u9501 \u3002\u9501\u5b9a\u7684\u7ec4\u4ef6\uff0c\u4e0d\u652f\u6301\u9f20\u6807\u79fb\u52a8\u64cd\u4f5c\uff0c\u53ea\u652f\u6301\u952e\u76d8\u65b9\u5411\u952e\u5fae\u8c03\u3002",-1))]),k("tr",null,[k("td",null,[k("kbd",null,[x(r,{title:"\u7f6e\u4e0e\u9876\u5c42"})])]),t[1]||(t[1]=k("td",null,"\u7b49\u6548\u8bbe\u7f6e \u6837\u5f0f-\u5143\u7d20\u5c42\u7ea7 = 9",-1))]),k("tr",null,[k("td",null,[k("kbd",null,[x(u,{title:"\u7f6e\u4e8e\u5e95\u5c42"})])]),t[2]||(t[2]=k("td",null,"\u7b49\u6548\u8bbe\u7f6e \u6837\u5f0f-\u5143\u7d20\u5c42\u7ea7 = 1",-1))]),k("tr",null,[k("td",null,[k("kbd",null,[x(v(ul),{type:"icon-24gl-textAlignLeft",title:"\u9760\u5de6\u5bf9\u9f50"})])]),t[3]||(t[3]=k("td",null,"\u5355\u9009\u65f6\u6587\u5b57\u5de6\u5bf9\u9f50\uff0c\u591a\u9009\u65f6\u6309\u7167\u591a\u9009\u7684\u8282\u70b9\u7684\u6700\u5de6\u4fa7\u5bf9\u9f50",-1))]),k("tr",null,[k("td",null,[k("kbd",null,[x(v(ul),{type:"icon-24gl-textAlignCenter",title:"\u5c45\u4e2d\u5bf9\u9f50"})])]),t[4]||(t[4]=k("td",null,"\u5355\u9009\u65f6\u6587\u5b57\u5c45\u4e2d\u5bf9\u9f50\uff0c\u591a\u9009\u65f6\u6309\u7167\u591a\u9009\u7684\u8282\u70b9\u7684\u4e2d\u5fc3\u5bf9\u9f50",-1))]),k("tr",null,[k("td",null,[k("kbd",null,[x(v(ul),{type:"icon-24gl-textAlignRight",title:"\u9760\u53f3\u5bf9\u9f50"})])]),t[5]||(t[5]=k("td",null,"\u5355\u9009\u65f6\u6587\u5b57\u53f3\u5bf9\u9f50\uff0c\u591a\u9009\u65f6\u6309\u7167\u591a\u9009\u7684\u8282\u70b9\u7684\u6700\u53f3\u4fa7\u5bf9\u9f50",-1))]),k("tr",null,[k("td",null,[k("kbd",null,[x(v(ul),{type:"icon-v-textAlignTop",title:"\u9876\u7aef\u5bf9\u9f50"})])]),t[6]||(t[6]=k("td",null,"\u5355\u9009\u65f6\u6587\u5b57\u9876\u7aef\u5bf9\u9f50\uff0c\u591a\u9009\u65f6\u6309\u7167\u591a\u9009\u7684\u8282\u70b9\u7684\u6700\u9876\u7aef\u5bf9\u9f50",-1))]),k("tr",null,[k("td",null,[k("kbd",null,[x(v(ul),{type:"icon-v-textAlignCenter",title:"\u5782\u76f4\u5c45\u4e2d\u5bf9\u9f50"})])]),t[7]||(t[7]=k("td",null,"\u5355\u9009\u65f6\u6587\u5b57\u9876\u7aef\u5c45\u4e2d\u5bf9\u9f50\uff0c\u591a\u9009\u65f6\u6309\u7167\u591a\u9009\u7684\u8282\u70b9\u7684\u9876\u7aef\u4e2d\u5fc3\u5bf9\u9f50",-1))]),k("tr",null,[k("td",null,[k("kbd",null,[x(v(ul),{type:"icon-v-textAlignBottom",title:"\u5e95\u90e8\u5bf9\u9f50"})])]),t[8]||(t[8]=k("td",null,"\u5355\u9009\u65f6\u6587\u5b57\u5e95\u90e8\u5bf9\u9f50\uff0c\u591a\u9009\u65f6\u6309\u7167\u591a\u9009\u7684\u8282\u70b9\u7684\u6700\u5e95\u7aef\u5bf9\u9f50",-1))])])]),t[19]||(t[19]=k("h2",null,"\u4e94\u3001\u7ec4\u5408\u64cd\u4f5c\u5efa\u8bae",-1)),t[20]||(t[20]=k("ul",null,[k("li",null,[k("strong",null,"\u590d\u5236\u4e0e\u7c98\u8d34\u914d\u5408\u4f7f\u7528\uff1a"),C(" \u5f53\u4f60\u9700\u8981\u91cd\u590d\u4f7f\u7528\u67d0\u4e2a\u7ec4\u4ef6\u6216\u6837\u5f0f\u65f6\uff0c\u53ef\u4ee5\u5148\u4f7f\u7528 "),k("kbd",null,"Ctrl"),C(" + "),k("kbd",null,"C"),C(" \u590d\u5236\uff0c\u7136\u540e\u5728\u9700\u8981\u7684\u4f4d\u7f6e\u4f7f\u7528 "),k("kbd",null,"Ctrl"),C(" + "),k("kbd",null,"V"),C(" \u7c98\u8d34\u3002 ")]),k("li",null,[k("strong",null,"\u64a4\u9500\u4e0e\u91cd\u505a\u4ea4\u66ff\u4f7f\u7528\uff1a"),C(" \u5728\u4fee\u6539\u8fc7\u7a0b\u4e2d\uff0c\u82e5\u53d1\u73b0\u64a4\u9500\u8fc7\u591a\u6216\u8fc7\u5c11\uff0c\u53ef\u4ee5\u901a\u8fc7 "),k("kbd",null,"Ctrl"),C(" + "),k("kbd",null,"Z"),C(" \u548c "),k("kbd",null,"Ctrl"),C(" + "),k("kbd",null,"Shift"),C(" + "),k("kbd",null,"Z"),C(" \u6765\u53cd\u590d\u8c03\u6574\u7248\u672c\u3002 ")]),k("li",null,[k("strong",null,"\u591a\u9009\u4e0e\u5220\u9664\u7ed3\u5408\uff1a"),C(" \u5982\u679c\u9700\u8981\u4e00\u6b21\u6027\u5220\u9664\u591a\u4e2a\u4e0d\u76f8\u5173\u7684\u7ec4\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528 "),k("kbd",null,"Ctrl"),C(" + \u9f20\u6807\u5de6\u952e\u591a\u9009\u540e\uff0c\u518d\u6309\u4e0b "),k("kbd",null,"Del"),C(" \u952e\u6279\u91cf\u5220\u9664\u3002 ")])],-1)),t[21]||(t[21]=k("h2",null,"\u516d\u3001\u6ce8\u610f\u4e8b\u9879",-1)),t[22]||(t[22]=k("ol",null,[k("li",null,[k("strong",null,"Mac \u7528\u6237\u6ce8\u610f\uff1a"),C(" \u5728 macOS \u7cfb\u7edf\u4e2d\uff0c "),k("kbd",null,"Ctrl"),C(" \u952e\u901a\u5e38\u7531 "),k("kbd",null,"Command"),C(" \u952e\u66ff\u4ee3\uff0c\u4f8b\u5982\u590d\u5236\u4e3a "),k("kbd",null,"Command"),C(" + "),k("kbd",null,"C"),C(" \uff0c\u7c98\u8d34\u4e3a "),k("kbd",null,"Command"),C(" + "),k("kbd",null,"V"),C(" \uff0c\u64a4\u9500\u4e3a "),k("kbd",null,"Command"),C(" + "),k("kbd",null,"Z"),C(" \u7b49\u3002 ")])],-1))])]),_:1})],4)]),_:1})]),_:1},8,["visible","width"])}}}),wl="";function kl(e){return{clearPaper(){try{null==e||e.clear()}catch(e){}},toPdf(t,l="\u5bfc\u51faPDF"){null==e||e.toPdf(t,l)},toPrint(t){null==e||e.print(t)},updateJson(t){if(e)try{e.update(JSON.parse(t))}catch(e){}},exportJson:()=>e?JSON.stringify(e.getJson()||{}):"",setElsAlign(t){t&&(null==e||e.setElsAlign(t))},setElsSpace(t=!0,l=10){null==e||e.setElsSpace(l,t)},setEleSelectByField(){null==e||e.selectElementsByField(["name"])},getSelectEls(){var t;return null!=(t=null==e?void 0:e.getSelectEls())?t:[]},updateOption(t,l){null==e||e.updateOption(t,l)}}}function xl(e,t){var l;const o=null==(l=ne)?void 0:l.event;if(!e||!o||!t)return;const n={onData:`hiprintTemplateDataChanged_${e.id}`,onSetting:`BuildCustomOptionSettingEventKey_${e.id}`,onSelect:`PrintElementSelectEventKey_${e.id}`};Object.keys(t).forEach(e=>o.on(n[e],t[e]))}const Cl={class:"comp-hiprint-toolbar u-flex u-w"},zl={class:"u-flex"},Sl={class:"u-flex__item"},Al={class:"u-flex"},Vl={class:"u-flex"},Tl={class:"u-flex__item"},Rl={key:0,class:"u-flex__item u-flex"},El={class:"u-flex__item u-flex"},Ol={class:"u-flex",style:{width:"8em"}},$l={class:"u-flex u-flex__item"},Pl={class:"u-flex__item"},Dl={class:"u-flex__item"},Ml={class:"u-flex",style:{width:"10em"}},Il={class:"u-flex__item"},jl={class:"u-flex",style:{width:"10em"}},Bl={class:"u-flex__item"},ql={key:1,class:"u-flex__item u-flex"},Fl={class:"u-flex__item"},Ul={style:{"padding-left":"0.5em"}},Nl={style:{"padding-left":"0.5em"}},Kl={class:"comp-hiprint-toolbar-answer",title:"\u7ed3\u679c\u793a\u4f8b"},Wl={class:"u-flex u-center",style:{padding:"42px 72px 72px","justify-content":"space-between"}},Ll={class:"comp-hiprint-toolbar-answer",style:{border:"0"}},Hl={class:"comp-hiprint-toolbar-answer",style:{border:"0"}},Gl={class:"comp-hiprint-toolbar-answer",style:{border:"0"}},Jl=n({__name:"toolbar",props:{tpl:{default:void 0},selectedId:{default:null},updateTime:{default:0},zoom:{},setZoom:{}},setup(e){const o=e,n=l(null),d=t(()=>kl(o.tpl));function h(){return o.tpl?o.tpl.getSelectEls():[]}const y={width:960,titleAlign:"start",modalClass:"comp-hiprint-toolbar",bodyStyle:{padding:"12px 24px"},unmountOnClose:!0},b=()=>h().length;function w(){var e,t;return!!Boolean(b()&&n.value)&&"text"===String(null==(t=null==(e=n.value)?void 0:e.printElementType)?void 0:t.type)}function C(e=!1){var t,l,o,n,i,a,r,u,s;const d=h();if(d.length>1){const c=e?"top":"left",p=e?"height":"width",f=d.reduce((e,t)=>{var l,o;return e+=null!=(o=null==(l=null==t?void 0:t.options)?void 0:l[p])?o:0},0),m=d.length-1,v=(null!=(o=null==(l=null==(t=d[m])?void 0:t.options)?void 0:l[c])?o:0)+(null!=(a=null==(i=null==(n=d[m])?void 0:n.options)?void 0:i[p])?a:0)-(null!=(s=null==(u=null==(r=d[0])?void 0:r.options)?void 0:u[c])?s:0);return Math.max(0,+((v-f)/m).toFixed(2))}}const z=()=>{const e=h();e.length?n.value=e.find(e=>e.id===o.selectedId)||e[e.length-1]||null:n.value=null};function S(e,t,l=!0){d.value.updateOption(e,t),l&&z()}function A(e,t){var l;const o={shape:"square",size:"small"},i=null==(l=n.value)?void 0:l.options;if(e&&i){if(i[e]===t)return{...o,style:{color:"rgb(var(--primary-6))"}}}return o}function V(e){if(1===h().length){let t=e;"vertical"===e&&(t="center"),["left","vertical","right"].includes(e)?S("textAlign",t,!1):S("textContentVerticalAlign",t,!1)}else o.tpl&&o.tpl.setElsAlign(e);z()}_(()=>o.updateTime,z);const[T]=It({visible:!1,fields:[],list:[],types:[{value:"field",label:"\u5b57\u6bb5\u540d"},{value:"string",label:"\u56fa\u5b9a\u503c "}]}),[R]=It({visible:!1,px:void 0,mm:void 0,pt:void 0}),E=(e,t)=>{const l=Number(e);switch(t){case"pt":R.value.mm=+ne.pt.toMm(l).toFixed(3),R.value.px=+ne.pt.toPx(l).toFixed(3);break;case"mm":R.value.pt=+ne.mm.toPt(l).toFixed(3),R.value.px=+ne.mm.toPx(l).toFixed(3);break;default:R.value.pt=+ne.px.toPt(l).toFixed(3),R.value.mm=+ne.px.toMm(l).toFixed(3)}},O=t(()=>{const e=T.value.list;return{key:"test",source:Object.fromEntries([...e].filter(e=>e.field).map(e=>{let t="";switch(e.dataType){case"datetime":t=(new Date).toLocaleString();break;case"boolean":t=Math.random()>=.5?1:0}return[e.field,t]})),format:e}}),$=(e=0)=>{T.value.list.splice(e+1,0,{type:"string",field:"",value:"",start:void 0,length:void 0,dataType:void 0,format:void 0})};return(t,l)=>{const h=i("AButton"),_=i("AButtonGroup"),z=i("ADivider"),P=i("icon-lock"),D=i("icon-to-top"),M=i("icon-to-bottom"),I=i("icon-zoom-in"),j=i("icon-original-size"),B=i("ASpace"),q=i("a-select"),F=i("a-cascader"),U=i("a-input"),N=i("a-input-number"),K=i("icon-plus"),W=i("a-button"),L=i("icon-minus"),H=i("AForm"),G=i("AModal"),J=i("AInputNumber");return a(),r("div",Cl,[k("div",zl,[f(t.$slots,"left",{tools:d.value,options:n.value})]),k("div",Sl,[x(B,{size:"mini"},{default:p(()=>[x(_,{size:"mini"},{default:p(()=>[x(h,m({title:"\u9760\u5de6\u5bf9\u9f50"},A(),{onClick:l[0]||(l[0]=e=>V("left"))}),{icon:p(()=>[x(v(ul),{type:"icon-24gl-textAlignLeft"})]),_:1},16),x(h,m({title:"\u5c45\u4e2d\u5bf9\u9f50"},A(),{onClick:l[1]||(l[1]=e=>V("vertical"))}),{icon:p(()=>[x(v(ul),{type:"icon-24gl-textAlignCenter"})]),_:1},16),x(h,m({title:"\u9760\u5de6\u5bf9\u9f50"},A(),{onClick:l[2]||(l[2]=e=>V("right"))}),{icon:p(()=>[x(v(ul),{type:"icon-24gl-textAlignRight"})]),_:1},16),x(h,m({title:"\u9876\u7aef\u5bf9\u9f50"},A(),{onClick:l[3]||(l[3]=e=>V("top"))}),{icon:p(()=>[x(v(ul),{type:"icon-v-textAlignTop"})]),_:1},16),x(h,m({title:"\u5c45\u4e2d\u5bf9\u9f50"},A(),{onClick:l[4]||(l[4]=e=>V("horizontal"))}),{icon:p(()=>[x(v(ul),{type:"icon-v-textAlignCenter"})]),_:1},16),x(h,m({title:"\u5e95\u90e8\u5bf9\u9f50"},A(),{onClick:l[5]||(l[5]=e=>V("bottom"))}),{icon:p(()=>[x(v(ul),{type:"icon-v-textAlignBottom"})]),_:1},16),x(h,m({title:"\u6c34\u5e73\u7b49\u5206"},A(),{onClick:l[6]||(l[6]=e=>d.value.setElsSpace(!0,C()))}),{icon:p(()=>[x(v(ul),{type:"icon-v-lineSpacing"})]),_:1},16),x(h,m({title:"\u5782\u76f4\u7b49\u5206"},A(),{onClick:l[7]||(l[7]=e=>d.value.setElsSpace(!1,C(!0)))}),{icon:p(()=>[x(v(ul),{type:"icon-24gl-lineSpacing"})]),_:1},16)]),_:1}),x(z,{direction:"vertical",margin:2}),x(_,{size:"mini"},{default:p(()=>[x(h,m({title:"\u6807\u9898"},A("fontSize","19"),{onClick:l[8]||(l[8]=e=>S("fontSize","19"))}),{icon:p(()=>[x(v(ul),{type:"icon-24gl-title"})]),_:1},16),x(h,m({title:"\u6b63\u6587"},A("fontSize","9"),{onClick:l[9]||(l[9]=e=>S("fontSize","9"))}),{icon:p(()=>[x(v(ul),{type:"icon-24gl-fontSize"})]),_:1},16),x(h,m({title:"\u52a0\u7c97"},A("fontWeight","bold"),{onClick:l[10]||(l[10]=e=>S("fontWeight","bold"))}),{icon:p(()=>[x(v(ul),{type:"icon-24gl-bold"})]),_:1},16),x(h,m({title:"\u4e0b\u5212\u7ebf"},A("textDecoration","underline"),{onClick:l[11]||(l[11]=e=>S("textDecoration","underline"))}),{icon:p(()=>[x(v(ul),{type:"icon-24gl-underline"})]),_:1},16),x(h,m({title:"\u5220\u9664\u7ebf"},A("textDecoration","line-through"),{onClick:l[12]||(l[12]=e=>S("textDecoration","line-through"))}),{icon:p(()=>[x(v(ul),{type:"icon-24gl-strikethrough2"})]),_:1},16),x(h,m({title:"\u6e05\u9664\u683c\u5f0f"},A(),{onClick:l[13]||(l[13]=e=>(S("textDecoration","none",!1),S("fontSize","",!1),void S("fontWeight","400")))}),{icon:p(()=>[x(v(ul),{type:"icon-24gl-formatClear"})]),_:1},16)]),_:1}),x(z,{direction:"vertical",margin:2}),x(_,{disabled:1>b()},{default:p(()=>[x(h,m(A("draggable",!1),{title:"\u9501\u5b9a/\u53d6\u6d88",onClick:l[14]||(l[14]=e=>{var t,l;S("draggable",!1===(null==(l=null==(t=n.value)?void 0:t.options)?void 0:l.draggable))})}),{icon:p(()=>[x(P)]),_:1},16),x(h,m(A("zIndex","9"),{title:"\u7f6e\u4e8e\u9876\u5c42",onClick:l[15]||(l[15]=e=>S("zIndex","9"))}),{icon:p(()=>[x(D)]),_:1},16),x(h,m(A("zIndex","1"),{title:"\u7f6e\u4e8e\u5e95\u5c42",onClick:l[16]||(l[16]=e=>S("zIndex","1"))}),{icon:p(()=>[x(M)]),_:1},16)]),_:1},8,["disabled"]),x(z,{direction:"vertical",margin:2}),x(h,m(A(),{onClick:l[17]||(l[17]=t=>e.setZoom(1===o.zoom?2:1))}),{icon:p(()=>[1===o.zoom?(a(),s(I,{key:0})):(a(),s(j,{key:1}))]),_:1},16),x(h,m(A(),{title:"\u5355\u4f4d\u8f6c\u6362",onClick:l[18]||(l[18]=e=>v(R).visible=!0)}),{icon:p(()=>[x(v(ul),{type:"icon-scale"})]),_:1},16),x(h,m(A(),{title:"\u81ea\u5b9a\u4e49\u683c\u5f0f",disabled:!w(),onClick:l[19]||(l[19]=e=>function(){var e,t,l,i;if(!w())return;const a=null!=(l=null==(t=null==(e=n.value)?void 0:e.options)?void 0:t.format)?l:"[]";T.value.visible=!0,T.value.fields=function e(t=[]){return t.filter(e=>e.field&&"table"!==e.type).map(t=>{var l,o;const n=t.field,i={label:null!=(l=t.text)?l:n,value:n};return"object"===t.type&&(null==(o=t.fields)?void 0:o.length)&&(i.children=e(t.fields)),i})}(null==(i=o.tpl)?void 0:i.fields),T.value.list=[];try{if(T.value.list=JSON.parse(a),!Array.isArray(T.value.list))throw new Error("not array")}catch(e){T.value.list=[]}T.value.list.length||$()}())}),{icon:p(()=>[x(v(ul),{type:"icon-zidingyi"})]),_:1},16,["disabled"])]),_:1})]),k("div",Al,[f(t.$slots,"right",{tools:d.value,options:n.value})]),x(G,m({visible:v(T).visible,"onUpdate:visible":l[20]||(l[20]=e=>v(T).visible=e)},y,{title:"\u81ea\u5b9a\u4e49\u683c\u5f0f",onOk:l[21]||(l[21]=e=>(()=>{const e=JSON.stringify(T.value.list);S("dataType","format",!1),S("format",e),ae(".hiprint-option-item-datatype-input-format").addClass("hiprint-option-item-datatype-format").val(e).trigger("change").show().siblings().hide().removeClass("hiprint-option-item-datatype-format")})())}),{default:p(()=>{var e;return[x(H,{model:{},size:"small",class:"comp-hiprint-toolbar-form"},{default:p(()=>[(a(!0),r(u,null,c(v(T).list,(e,t)=>(a(),r("div",{key:t,class:"u-flex u-mt"},[k("div",Vl,[l[29]||(l[29]=k("span",{class:"comp-hiprint-toolbar-label"},"\u7c7b\u578b",-1)),k("div",Tl,[x(q,{modelValue:e.type,"onUpdate:modelValue":t=>e.type=t,options:v(T).types},null,8,["modelValue","onUpdate:modelValue","options"])])]),"field"===e.type?(a(),r("div",Rl,[l[34]||(l[34]=k("span",{class:"comp-hiprint-toolbar-label"},"\u5b57\u6bb5",-1)),k("div",El,[k("div",Ol,[x(F,{"model-value":Array.isArray(e.field)?e.field:String(e.field||"").split("."),options:v(T).fields,"allow-search":"","allow-create":"","path-mode":"",placeholder:"\u8bf7\u9009\u62e9","trigger-props":{autoFitPopupMinWidth:!0,contentClass:"arco-empty-body"},"onUpdate:modelValue":t=>e.field=Array.isArray(t)?t.join("."):t},null,8,["model-value","options","onUpdate:modelValue"])]),k("div",$l,[l[30]||(l[30]=k("label",{class:"comp-hiprint-toolbar-label"},"\u683c\u5f0f\u7c7b\u578b",-1)),k("div",Pl,[x(q,{modelValue:e.dataType,"onUpdate:modelValue":t=>e.dataType=t,style:{width:"100%"},"allow-clear":"","trigger-props":{autoFitPopupMinWidth:!0,contentClass:"arco-empty-body"},options:[{label:"\u65e5\u671f\u683c\u5f0f",value:"datetime"},{label:"\u5e03\u5c14\u503c",value:"boolean"}],placeholder:"\u9ed8\u8ba4"},null,8,["modelValue","onUpdate:modelValue"])]),l[31]||(l[31]=k("span",{class:"comp-hiprint-toolbar-label"},"\u683c\u5f0f",-1)),k("div",Dl,["datetime"===e.dataType?(a(),s(q,{key:0,modelValue:e.format,"onUpdate:modelValue":t=>e.format=t,style:{width:"100%"},"allow-clear":"","trigger-props":{autoFitPopupMinWidth:!0,contentClass:"arco-empty-body"},options:v(ne).configs.DATE_TYPES,placeholder:"\u9ed8\u8ba4"},null,8,["modelValue","onUpdate:modelValue","options"])):(a(),s(U,{key:1,modelValue:e.format,"onUpdate:modelValue":t=>e.format=t,"allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]))])]),k("div",Ml,[l[32]||(l[32]=k("label",{class:"comp-hiprint-toolbar-label"},"\u56fa\u5b9a\u957f\u5ea6",-1)),k("div",Il,[x(N,{modelValue:e.length,"onUpdate:modelValue":t=>e.length=t,"allow-clear":"","trigger-props":{autoFitPopupMinWidth:!0,contentClass:"arco-empty-body"},placeholder:"\u9ed8\u8ba4"},null,8,["modelValue","onUpdate:modelValue"])])]),k("div",jl,[l[33]||(l[33]=k("label",{class:"comp-hiprint-toolbar-label"},"\u5f00\u59cb\u4f4d\u7f6e",-1)),k("div",Bl,[x(N,{modelValue:e.start,"onUpdate:modelValue":t=>e.start=t,"allow-clear":"",placeholder:"\u9ed8\u8ba4"},null,8,["modelValue","onUpdate:modelValue"])])])])])):(a(),r("div",ql,[l[35]||(l[35]=k("span",{class:"comp-hiprint-toolbar-label"},"\u5185\u5bb9",-1)),k("div",Fl,[x(U,{modelValue:e.value,"onUpdate:modelValue":t=>e.value=t},null,8,["modelValue","onUpdate:modelValue"])])])),k("div",Ul,[x(W,{shape:"circle",onClick:e=>$(t)},{icon:p(()=>[x(K)]),_:1},8,["onClick"])]),k("div",Nl,[x(W,{shape:"circle",onClick:e=>(e=>{T.value.list.length>1&&T.value.list.splice(e,1)})(t)},{icon:p(()=>[x(L)]),_:1},8,["onClick"])])]))),128))]),_:1}),l[36]||(l[36]=k("div",{style:{"padding-bottom":"12px","margin-bottom":"24px","border-bottom":"1px dashed #d2d2d2"}},null,-1)),k("div",Kl,g(null==(e=v(ne).utils)?void 0:e.executeCustomFormat(O.value)),1)]}),_:1},16,["visible"]),x(G,m({visible:v(R).visible,"onUpdate:visible":l[28]||(l[28]=e=>v(R).visible=e)},y,{title:"\u5355\u4f4d\u8f6c\u6362"}),{default:p(()=>[k("div",Wl,[k("div",Ll,[x(J,{modelValue:v(R).mm,"onUpdate:modelValue":[l[22]||(l[22]=e=>v(R).mm=e),l[23]||(l[23]=e=>E(e,"mm"))],size:"large",mode:"button"},null,8,["modelValue"]),l[37]||(l[37]=k("div",null,"mm",-1))]),l[40]||(l[40]=k("div",{style:{width:"2em"}},null,-1)),k("div",Hl,[x(J,{modelValue:v(R).pt,"onUpdate:modelValue":[l[24]||(l[24]=e=>v(R).pt=e),l[25]||(l[25]=e=>E(e,"pt"))],size:"large",mode:"button"},null,8,["modelValue"]),l[38]||(l[38]=k("div",null,"pt",-1))]),l[41]||(l[41]=k("div",{style:{width:"2em"}},null,-1)),k("div",Gl,[x(J,{modelValue:v(R).px,"onUpdate:modelValue":[l[26]||(l[26]=e=>v(R).px=e),l[27]||(l[27]=e=>E(e,"px"))],size:"large",mode:"button"},null,8,["modelValue"]),l[39]||(l[39]=k("div",null,"px",-1))])])]),_:1},16,["visible"])])}}}),Yl="",Zl={class:"comp-toolbar-ext__ul"},Xl=["onClick"],Ql={class:"comp-toolbar-ext__ul"},eo=["onClick","onMouseover","onMouseout"],to=n({__name:"toolbar-ext",props:{tpl:{default:void 0},updateTime:{default:0}},setup(e){const l=e;function o(){var e;if("function"==typeof(null==(e=l.tpl)?void 0:e.update))return l.tpl;throw new Error("[hi-print]: mounted error")}const n=t(()=>{const e=o();return e.updateTime=l.updateTime,[...e.getPanel().printElements].map(e=>{var t,l,o,n;return{id:e.id,title:(null==(t=e.options)?void 0:t.title)||"\u672a\u547d\u540d",locked:!1===(null==(l=e.options)?void 0:l.draggable),type:null==(o=e.printElementType)?void 0:o.type,_sourceType:null==(n=e.options)?void 0:n._sourceType}})}),f=t(()=>{const e=o();return e.updateTime=l.updateTime,e.historyList});function m(e,t){const l=o(),n=[...l.getPanel().printElements].find(t=>t.id===e.id);if(!n)return;const i=null==n?void 0:n.designTarget;"click"===t&&l.selectElementsId(n.id),"mouseover"===t&&l.hoverElementsId(n.id),"mouseout"===t&&l.hoverElementsId(n.id,!0),i.focus()}return(e,t)=>{const l=i("icon-history"),h=i("AButton"),y=i("icon-drag-arrow"),b=i("icon-expand"),_=i("icon-file"),w=i("a-popover"),z=i("icon-folder"),S=i("icon-lock"),A=i("AButtonGroup");return a(),s(A,{class:"comp-toolbar-ext"},{default:p(()=>[x(w,{title:"\u5386\u53f2\u8bb0\u5f55",position:"br",trigger:"click"},{content:p(()=>[k("ul",Zl,[(a(!0),r(u,null,c(f.value,(e,t)=>(a(),r("li",{key:t,onClick:t=>{return l=e,void o().update(l.json);var l}},["\u521d\u59cb"===e.type?(a(),s(l,{key:0})):"\u79fb\u52a8"===e.type?(a(),s(y,{key:1})):"\u5927\u5c0f"===e.type?(a(),s(b,{key:2})):(a(),s(_,{key:3})),C(" "+g(e.type),1)],8,Xl))),128))])]),default:p(()=>[x(h,{title:"\u5386\u53f2\u8bb0\u5f55",size:"small",shape:"square"},{icon:p(()=>[x(l)]),_:1})]),_:1}),x(w,{title:"\u7ec4\u4ef6\u5217\u8868",position:"br",trigger:"click"},{content:p(()=>[k("ul",Ql,[(a(!0),r(u,null,c(n.value,(e,t)=>(a(),r("li",{key:t,onClick:t=>m(e,"click"),onMouseover:t=>m(e,"mouseover"),onMouseout:t=>m(e,"mouseout")},[e.locked?(a(),s(S,{key:0,style:{right:"0",left:"auto"}})):d("",!0),C(" "+g(e.title)+" ",1),"object"===e._sourceType?(a(),s(z,{key:1})):(a(),s(v(ul),{key:2,type:v(al)(e.type)},null,8,["type"]))],40,eo))),128))])]),default:p(()=>[x(h,{title:"\u7ec4\u4ef6\u5217\u8868",size:"small",shape:"square"},{icon:p(()=>[x(z)]),_:1})]),_:1})]),_:1})}}}),lo="";function oo(e){return Array.isArray(e)?[...e]:[]}function no(e){return[{tid:`${e}.text`,title:"\u6587\u672c",type:"text",options:{height:13}},{tid:`${e}.longText`,title:"\u957f\u6587\u672c",type:"text",options:{width:200,height:40}},{tid:`${e}.number`,title:"\u6570\u503c",type:"text",options:{height:13}},{tid:`${e}.table`,title:"\u8868\u683c",type:"table",columns:[[{title:"",align:"center",field:"",width:100},{title:"",align:"center",field:"",width:100},{title:"",align:"center",field:"",width:100}]],editable:!0,columnDisplayEditable:!0,columnDisplayIndexEditable:!0,columnTitleEditable:!0,columnResizable:!0,columnAlignEditable:!0,options:{width:300}},{tid:`${e}.image`,data:"data:image/gif;base64,R0lGODdhAQABAIABAAAAAOjo6CwAAAAAAQABAAACAkwBADs=",title:"\u56fe\u7247",type:"image",options:{width:60,height:60}},{tid:`${e}.barcode`,title:"\u6761\u5f62\u7801",type:"text",options:{field:"barcode",testData:"123456789",height:32,textAlign:"center",textType:"barcode"}},{tid:`${e}.qrcode`,title:"\u4e8c\u7ef4\u7801",type:"text",options:{field:"qrcode",testData:"123456789",height:60,width:60,textAlign:"center",textType:"qrcode"}},{tid:`${e}.hline`,title:"\u6c34\u5e73\u7ebf",type:"hline"},{tid:`${e}.vline`,title:"\u5782\u76f4\u7ebf",type:"vline"},{tid:`${e}.rect`,title:"\u77e9\u5f62",type:"rect"},{tid:`${e}.oval`,title:"\u692d\u5706",type:"oval"}]}const io="\u901a\u7528\u63a7\u4ef6",ao="defaultModule",ro=()=>{const e=no(ao);return{list:e,addElementTypes:t=>{t.removePrintElementTypes(ao),t.addPrintElementTypes(ao,[new oe.PrintElementTypeGroup(io,e)])}}},uo="\u6570\u636e\u63a7\u4ef6",so="dataModule",co=e=>{const t=no(so),l=oo(e).map(e=>{const{field:l}=e,o=t.find(t=>t.type===e.type)||t[0],{type:n,options:i}=o,a={...o,tid:`${ao}.${l}`,title:e.text,options:{...i,field:l,_sourceType:e.type}};if("table"===n){const t=[oo(e.fields).map((e,t)=>({title:e.text,align:"center",field:e.field,width:100,checked:t<8}))];a.columns=t,a.options.width=null}return a});return{list:l,addElementTypes:e=>{e.removePrintElementTypes(so),e.addPrintElementTypes(so,[new oe.PrintElementTypeGroup(uo,l)])}}},po=e=>[{name:io,type:1,value:ao,...ro()},{name:uo,type:2,value:so,...co(e)}],fo={class:"u-aside comp-hiprint-design"},mo={class:"u-page u-page--row"},vo={class:"u-card u-h"},ho={class:"u-card__bd u-aside__bd",style:{padding:"0","overflow-y":"auto"}},yo={id:"HI_sideContainer"},go={class:"u-main",style:{padding:"0"}},bo={class:"u-card u-h"},_o={class:"u-card__hd u-aside__hd"},wo={class:"u-main u-aside__bd",style:{padding:"0"}},ko={id:"HI_bodyContainer"},xo={class:"u-card__bd u-aside__bd comp-hiprint-scrollbar",style:{"overflow-x":"hidden","overflow-y":"auto"}},Co={id:"HI_panelContainer"},zo=219,So="ep-draggable-item arco-btn arco-btn-secondary arco-btn-shape-square arco-btn-size-mini arco-btn-status-normal",Ao=n({__name:"index",props:{template:{default:void 0},fields:{default:void 0},printData:{default:void 0}},emits:["onSave","onChange"],setup(e,{expose:t,emit:o}){const n=l(!0),m=l(!0),h=e,b=o,w=(e,{slots:t})=>{var l;const o=null!=(l=e.tid)?l:`defaultModule.${e.type}`,n=t.default?t.default():"",i=t.icon?t.icon():N(ul,{type:al(e.type)});return N("a",{class:So,tid:o},[i,n])},z=l(0),S=l();function A(){var e;"function"==typeof(null==(e=S.value)?void 0:e.onResize)&&S.value.onResize()}let V;const R="#HI_mainContainer",E="#HI_panelContainer";async function O(){await K(),oe.PrintElementTypeManager.buildByHtml(ae(".ep-draggable-item"))}const P=l(),D=l(),M=l(),I=l([]),j=l();function B(){z.value=Date.now()}function U(){const{hiprintTemplate:e,providers:t}=function(){const e=po(h.fields);return oe.init({providers:e}),O(),oe.setConfig({optionItems:[]}),ae(R).empty(),V=new oe.PrintTemplate({template:h.template,fields:h.fields,fontList:[{title:"\u5fae\u8f6f\u96c5\u9ed1",value:"Microsoft YaHei"},{title:"\u9ed1\u4f53",value:"STHeitiSC-Light"},{title:"\u5b8b\u4f53",value:"SimSun"},{title:"cursive",value:"cursive"}],dataMode:1,history:!0,willOutOfBounds:!0,qtDesigner:!0,paperNumberDisabled:!0,onUpdateError:e=>{},settingContainer:E}),V.design(R,{grid:!1}),{hiprintTemplate:V,providers:e}}();I.value=t[1].list,O(),M.value=e,xl(e,{onSelect:e=>{j.value=e.printElement.id,B()},onSetting:()=>{j.value=null,B()},onData(e){b("onChange",e),"\u8c03\u6574\u5927\u5c0f"===e&&A(),B()}}),A()}function W(){return M.value?M.value.getJson():null}_(()=>h.fields,U),T(U),_(()=>h.template,()=>{M.value&&M.value.update(h.template)});const L=l(1);function H(e=1){M.value&&(e<.5&&(e=.5),e>2&&(e=2),L.value=e,M.value.zoom(e))}function G(){M.value&&P.value.show(M.value,h.printData)}function J(){var e,t;null==(t=null==(e=D.value)?void 0:e.show)||t.call(e,M.value,h.printData)}function Y(){M.value&&b("onSave",W())}return t({getRef:()=>M.value,getJson:W,setJson(e){M.value&&M.value.update("object"==typeof e?JSON.stringify(e):e)}}),(e,t)=>{const l=i("icon-folder"),o=i("AEmpty"),h=i("icon-right"),b=i("icon-left"),_=i("a-button"),V=i("icon-question-circle"),T=i("AButton"),R=i("AButtonGroup");return a(),r("div",fo,[k("div",mo,[k("div",{class:"u-page__side",style:y({width:m.value?zo+"px":"0px"})},[q(k("div",vo,[t[14]||(t[14]=k("div",{class:"u-card__hd u-aside__hd"},[k("strong",{class:"comp-hiprint-title"},"\u7ec4\u4ef6\u5e93")],-1)),k("div",ho,[k("div",yo,[x(cl,{title:"\u57fa\u7840"},{default:p(()=>[x(w,{type:"text"},{default:p(()=>[...t[2]||(t[2]=[C("\u6587\u672c",-1)])]),_:1}),x(w,{type:"number"},{default:p(()=>[...t[3]||(t[3]=[C("\u6570\u503c",-1)])]),_:1}),x(w,{type:"image"},{default:p(()=>[...t[4]||(t[4]=[C("\u56fe\u7247",-1)])]),_:1}),x(w,{type:"longText"},{default:p(()=>[...t[5]||(t[5]=[C("\u957f\u6587\u672c",-1)])]),_:1}),x(w,{type:"table"},{default:p(()=>[...t[6]||(t[6]=[C("\u6570\u636e\u8868\u683c",-1)])]),_:1}),x(w,{type:"hline"},{default:p(()=>[...t[7]||(t[7]=[C("\u6c34\u5e73\u7ebf",-1)])]),_:1}),x(w,{type:"vline"},{default:p(()=>[...t[8]||(t[8]=[C("\u5782\u76f4\u7ebf",-1)])]),_:1}),x(w,{type:"rect"},{default:p(()=>[...t[9]||(t[9]=[C("\u77e9\u5f62",-1)])]),_:1}),x(w,{type:"oval"},{default:p(()=>[...t[10]||(t[10]=[C("\u692d\u5706",-1)])]),_:1})]),_:1}),x(cl,{title:"\u6761\u7801"},{default:p(()=>[x(w,{type:"barcode"},{default:p(()=>[...t[11]||(t[11]=[C("\u6761\u5f62\u7801",-1)])]),_:1}),x(w,{type:"qrcode"},{default:p(()=>[...t[12]||(t[12]=[C("\u4e8c\u7ef4\u7801",-1)])]),_:1})]),_:1}),x(cl,{title:"\u4e1a\u52a1\u7ec4\u4ef6"},{default:p(()=>{var e;return[(a(!0),r(u,null,c(I.value,e=>{var t,o;return a(),s(w,{key:e.tid,tid:e.tid,type:e.type,style:y("font-weight: "+("object"===(null==(t=e.options)?void 0:t._sourceType)?"bold":"normal"))},$({default:p(()=>[C(" "+g(e.title),1)]),_:2},["object"===(null==(o=e.options)?void 0:o._sourceType)?{name:"icon",fn:p(()=>[x(l)]),key:"0"}:void 0]),1032,["tid","type","style"])}),128)),(null==(e=I.value)?void 0:e.length)?d("",!0):(a(),s(o,{key:0},{default:p(()=>[...t[13]||(t[13]=[k("small",null,"\u6682\u65e0\u6570\u636e",-1)])]),_:1}))]}),_:1})])])],512),[[F,m.value]]),x(_,{type:"secondary",status:"normal",size:"mini",class:"arco-btn-light u-page__arrow",style:y({zIndex:999,borderLeftWidth:m.value?"0":"1px"}),onClick:t[0]||(t[0]=e=>(m.value=!m.value,void A()))},{icon:p(()=>[m.value?(a(),s(b,{key:1})):(a(),s(h,{key:0}))]),_:1},8,["style"])],4),k("div",go,[k("div",bo,[k("div",_o,[x(Jl,{tpl:M.value,"selected-id":j.value,"update-time":z.value,zoom:L.value,"set-zoom":H},{left:p(({options:t})=>[f(e.$slots,"toolbar-left",{tpl:M.value,options:t,updateTime:z.value})]),right:p(({options:t})=>[f(e.$slots,"toolbar-right",{tpl:M.value,options:t,updateTime:z.value},()=>[x(to,{tpl:M.value,"update-time":z.value},null,8,["tpl","update-time"])]),x(R,{size:"small"},{default:p(()=>[x(T,{shape:"square",title:"\u5e2e\u52a9",onClick:J},{icon:p(()=>[x(V)]),_:1}),x(T,{shape:"square",title:"\u9884\u89c8",onClick:G},{icon:p(()=>[x(v(ul),{type:"icon-24gl-eye"})]),_:1}),x(T,{shape:"square",title:"\u4fdd\u5b58",onClick:Y},{icon:p(()=>[x(v(ul),{type:"icon-baocun",size:"16"})]),_:1})]),_:1})]),_:3},8,["tpl","selected-id","update-time","zoom"])]),k("div",wo,[k("div",ko,[t[15]||(t[15]=k("div",{id:"HI_scrollContainer"},[k("div",{id:"HI_mainContainer",class:"hiprint-printTemplate"})],-1)),x(pl,{ref_key:"guidesRef",ref:S,zoom:L.value,"main-container":"#HI_bodyContainer","warp-container":"#HI_scrollContainer"},null,8,["zoom"])])])])]),k("div",{class:"u-page__panel u-card",style:y({width:n.value?zo+"px":"0px"})},[t[17]||(t[17]=k("div",{class:"u-card__hd u-aside__hd"},[k("strong",{class:"comp-hiprint-title"},"\u5c5e\u6027\u914d\u7f6e")],-1)),k("div",xo,[k("div",Co,[x(o,{style:{"padding-top":"32px"}},{default:p(()=>[...t[16]||(t[16]=[k("small",null,"\u6682\u65e0\u6570\u636e",-1)])]),_:1})])]),x(_,{type:"secondary",status:"normal",size:"mini",class:"arco-btn-light u-page__arrow",style:y({zIndex:999,borderRightWidth:n.value?"0":"1px"}),onClick:t[1]||(t[1]=e=>(n.value=!n.value,void A()))},{icon:p(()=>[n.value?(a(),s(h,{key:0})):(a(),s(b,{key:1}))]),_:1},8,["style"])],4)]),x(vl,{ref_key:"preViewRef",ref:P},null,512),x(_l,{ref_key:"kbdRef",ref:D},null,512)])}}}),Vo="",To=ue("orc-dict",()=>{const e=l({});let t=null;return{dicts:e,registerLoadFn:function(e){t=e},getDict:async function(l,o=!1){if(!o&&e.value[l])return e.value[l];if(!t)throw new Error("[DictStore] \u5b57\u5178\u52a0\u8f7d\u51fd\u6570\u672a\u8bbe\u7f6e\uff0c\u8bf7\u5148\u8c03\u7528 registerLoadFn");const n=await t(l);return e.value[l]=n,e.value[l]},clearCache:function(t){t?delete e.value[t]:e.value={}}}}),Ro={install(t){t.use(e),t.component("OrcTable",qe),t.component("OrcSearch",Rt),t.component("OrcForm",Gt),t.component("OrcFormButton",Jt)}};export{Gt as OrcForm,Jt as OrcFormButton,ol as OrcFormLayer,Yt as OrcFormSpace,ll as OrcFormTable,Ao as OrcHiPrint,nl as OrcHiddenView,Mt as OrcProvider,Pt as OrcQuill,Rt as OrcSearch,qe as OrcTable,Xe as deepClone,Ro as default,Ft as delay,Nt as downLoadPdf,it as download,et as findObject,pe as formatTable,Kt as generateQRcodeBase64,ot as getData,tt as getUniqueId,ie as hiprint,Le as isArray,Ye as isEmptyArray,Je as isEmptyObject,Ge as isNumber,He as isObject,Ke as log,qt as mergeConfig,Qe as omitObject,jt as onConfirm,Ut as queueMap,nt as setData,Ze as toArray,We as typeName,To as useDictStore,Ot as useOrcSearch,Ue as useOrcTable,Ne as useOrcTableFooter,It as useState};
|