@jt-home/mfe-components 1.0.39 → 1.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/JtAttachmentPreview/index.cjs +1 -1
- package/dist/JtAttachmentPreview/index.mjs +1 -1
- package/dist/index-c8YlthVt.cjs +1 -0
- package/dist/{index-C6AyqKhk.js → index-moF0d2Ee.js} +170 -154
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +1097 -1067
- package/dist/style.css +1 -1
- package/dist/types/components/form/item/JtCascader/cascaderProps.d.ts +0 -1
- package/dist/types/components/form/item/JtCascader/index.vue.d.ts +0 -1
- package/dist/types/components/form/item/JtDatePicker/index.vue.d.ts +4 -2
- package/dist/types/components/form/item/JtInput/index.vue.d.ts +5 -3
- package/dist/types/components/form/item/JtSelect/index.vue.d.ts +0 -1
- package/dist/types/components/form/item/JtSelect/types.d.ts +1 -0
- package/package.json +1 -1
- package/dist/index-poi8lPme.cjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
import { t as Z, J as Dt, i as Un } from "./index-
|
|
3
|
-
import { a as ms, g as vs, n as hs, r as gs, s as ys, b as bs } from "./index-
|
|
4
|
-
import { defineComponent as pe, useAttrs as Hn, computed as O, openBlock as
|
|
2
|
+
import { t as Z, J as Dt, i as Un } from "./index-moF0d2Ee.js";
|
|
3
|
+
import { a as ms, g as vs, n as hs, r as gs, s as ys, b as bs } from "./index-moF0d2Ee.js";
|
|
4
|
+
import { defineComponent as pe, useAttrs as Hn, computed as O, openBlock as $, createBlock as H, mergeProps as ae, toHandlers as et, withCtx as U, renderSlot as te, resolveDynamicComponent as Kt, createCommentVNode as fe, ref as ge, watch as Ee, mergeDefaults as Jn, withKeys as Wn, createElementBlock as G, Fragment as Se, renderList as ye, normalizeStyle as Yt, nextTick as Zn, useSlots as Le, normalizeClass as We, createVNode as Ie, withModifiers as Ut, unref as J, createSlots as Re, createElementVNode as ne, toDisplayString as oe, normalizeProps as Oe, guardReactiveProps as Be, useModel as vt, withDirectives as Qn, mergeModels as Ft, shallowRef as je, onMounted as Ht, onBeforeUnmount as Xn, createTextVNode as He, resolveComponent as eo, onErrorCaptured as to } from "vue";
|
|
5
5
|
import { ElButton as $t, ElIcon as Jt, ElCascader as no, ElDatePicker as Wt, ElInput as Zt, ElSelect as Qt, ElOption as Xt, ElFormItem as en, ElForm as tn, ElTable as nn, ElTableColumn as on, ElPagination as oo, ElLoadingDirective as ro, ElInputNumber as ao, ElSwitch as so, ElRow as lo, ElCol as io, ElPopconfirm as co } from "element-plus/es";
|
|
6
6
|
import { cascaderEmits as uo, inputEmits as Bt, selectEmits as Et } from "element-plus";
|
|
7
7
|
const bt = 2, fo = 3;
|
|
@@ -56,17 +56,17 @@ const vo = /* @__PURE__ */ pe({
|
|
|
56
56
|
},
|
|
57
57
|
setup(e) {
|
|
58
58
|
const t = e, n = Hn(), o = O(() => {
|
|
59
|
-
const { icon: c, ...
|
|
59
|
+
const { icon: c, ...r } = t;
|
|
60
60
|
return {
|
|
61
61
|
...sn(n),
|
|
62
|
-
...
|
|
62
|
+
...r
|
|
63
63
|
};
|
|
64
|
-
}),
|
|
65
|
-
return (c,
|
|
66
|
-
const
|
|
67
|
-
return
|
|
64
|
+
}), l = O(() => an(n));
|
|
65
|
+
return (c, r) => {
|
|
66
|
+
const a = Jt, s = $t;
|
|
67
|
+
return $(), H(s, ae({ class: "jt-button" }, o.value, et(l.value)), {
|
|
68
68
|
default: U(() => [
|
|
69
|
-
c.$slots.icon ? (
|
|
69
|
+
c.$slots.icon ? ($(), H(a, {
|
|
70
70
|
key: 0,
|
|
71
71
|
class: "jt-button__icon"
|
|
72
72
|
}, {
|
|
@@ -74,12 +74,12 @@ const vo = /* @__PURE__ */ pe({
|
|
|
74
74
|
te(c.$slots, "icon", {}, void 0, !0)
|
|
75
75
|
]),
|
|
76
76
|
_: 3
|
|
77
|
-
})) : t.icon ? (
|
|
77
|
+
})) : t.icon ? ($(), H(a, {
|
|
78
78
|
key: 1,
|
|
79
79
|
class: "jt-button__icon"
|
|
80
80
|
}, {
|
|
81
81
|
default: U(() => [
|
|
82
|
-
(
|
|
82
|
+
($(), H(Kt(t.icon)))
|
|
83
83
|
]),
|
|
84
84
|
_: 1
|
|
85
85
|
})) : fe("", !0),
|
|
@@ -91,13 +91,12 @@ const vo = /* @__PURE__ */ pe({
|
|
|
91
91
|
}
|
|
92
92
|
}), be = (e, t) => {
|
|
93
93
|
const n = e.__vccOpts || e;
|
|
94
|
-
for (const [o,
|
|
95
|
-
n[o] =
|
|
94
|
+
for (const [o, l] of t)
|
|
95
|
+
n[o] = l;
|
|
96
96
|
return n;
|
|
97
97
|
}, rt = /* @__PURE__ */ be(vo, [["__scopeId", "data-v-28dbb12d"]]), ho = {
|
|
98
98
|
// 默认值只补组件缺省体验,显式传入的 false、null 和空字符串仍由归一化逻辑保留。
|
|
99
99
|
options: () => [],
|
|
100
|
-
placeholder: Z("common.请选择"),
|
|
101
100
|
clearable: !0,
|
|
102
101
|
persistent: !0
|
|
103
102
|
};
|
|
@@ -159,54 +158,54 @@ const yo = /* @__PURE__ */ pe({
|
|
|
159
158
|
const n = e, o = O(() => {
|
|
160
159
|
const f = go(n);
|
|
161
160
|
if (!f.disabled) return f;
|
|
162
|
-
const { placeholder:
|
|
163
|
-
return
|
|
164
|
-
}),
|
|
161
|
+
const { placeholder: _, ...M } = f;
|
|
162
|
+
return M;
|
|
163
|
+
}), l = ge(n.modelValue);
|
|
165
164
|
Ee(
|
|
166
165
|
() => n.modelValue,
|
|
167
166
|
(f) => {
|
|
168
|
-
|
|
167
|
+
l.value = f;
|
|
169
168
|
},
|
|
170
169
|
{ deep: !0 }
|
|
171
170
|
);
|
|
172
171
|
const c = t;
|
|
173
|
-
function
|
|
174
|
-
c(f, ...
|
|
172
|
+
function r(f, ..._) {
|
|
173
|
+
c(f, ..._);
|
|
175
174
|
}
|
|
176
|
-
function
|
|
177
|
-
|
|
175
|
+
function a(f) {
|
|
176
|
+
l.value = f, r("update:modelValue", f);
|
|
178
177
|
}
|
|
179
178
|
function s(f) {
|
|
180
|
-
|
|
179
|
+
r("change", f);
|
|
181
180
|
}
|
|
182
181
|
function i(f) {
|
|
183
|
-
|
|
182
|
+
r("focus", f);
|
|
184
183
|
}
|
|
185
|
-
function
|
|
186
|
-
|
|
184
|
+
function v(f) {
|
|
185
|
+
r("blur", f);
|
|
187
186
|
}
|
|
188
|
-
function
|
|
189
|
-
|
|
187
|
+
function S() {
|
|
188
|
+
r("clear");
|
|
190
189
|
}
|
|
191
|
-
function
|
|
192
|
-
|
|
190
|
+
function I(f) {
|
|
191
|
+
r("visibleChange", f);
|
|
193
192
|
}
|
|
194
193
|
function L(f) {
|
|
195
|
-
|
|
194
|
+
r("expandChange", f);
|
|
196
195
|
}
|
|
197
196
|
function V(f) {
|
|
198
|
-
|
|
197
|
+
r("removeTag", f);
|
|
199
198
|
}
|
|
200
|
-
return (f,
|
|
201
|
-
const
|
|
202
|
-
return
|
|
203
|
-
"model-value":
|
|
204
|
-
"onUpdate:modelValue":
|
|
199
|
+
return (f, _) => {
|
|
200
|
+
const M = no;
|
|
201
|
+
return $(), H(M, ae({ class: "jt-cascader" }, o.value, {
|
|
202
|
+
"model-value": l.value,
|
|
203
|
+
"onUpdate:modelValue": a,
|
|
205
204
|
onChange: s,
|
|
206
205
|
onFocus: i,
|
|
207
|
-
onBlur:
|
|
208
|
-
onClear:
|
|
209
|
-
onVisibleChange:
|
|
206
|
+
onBlur: v,
|
|
207
|
+
onClear: S,
|
|
208
|
+
onVisibleChange: I,
|
|
210
209
|
onExpandChange: L,
|
|
211
210
|
onRemoveTag: V
|
|
212
211
|
}), null, 16, ["model-value"]);
|
|
@@ -254,7 +253,7 @@ const yo = /* @__PURE__ */ pe({
|
|
|
254
253
|
size: {},
|
|
255
254
|
readonly: { type: Boolean },
|
|
256
255
|
disabled: { type: Boolean },
|
|
257
|
-
placeholder: {
|
|
256
|
+
placeholder: {},
|
|
258
257
|
popperOptions: {},
|
|
259
258
|
modelValue: {},
|
|
260
259
|
rangeSeparator: {},
|
|
@@ -262,36 +261,51 @@ const yo = /* @__PURE__ */ pe({
|
|
|
262
261
|
endPlaceholder: {},
|
|
263
262
|
defaultValue: {},
|
|
264
263
|
defaultTime: {},
|
|
265
|
-
isRange: { type: Boolean }
|
|
264
|
+
isRange: { type: Boolean },
|
|
265
|
+
preservePlaceholderWhenDisabled: { type: Boolean }
|
|
266
266
|
},
|
|
267
267
|
setup(e) {
|
|
268
268
|
const t = e, n = O(() => {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
}
|
|
278
|
-
return {
|
|
279
|
-
...t,
|
|
269
|
+
const { preservePlaceholderWhenDisabled: r, ...a } = t, s = l(
|
|
270
|
+
"jt-date-picker-popper",
|
|
271
|
+
a.popperClass
|
|
272
|
+
), i = {
|
|
273
|
+
...a,
|
|
274
|
+
popperClass: s,
|
|
275
|
+
// 默认日期 placeholder 依赖当前语言,放在 computed 中保证切换语言后重新计算。
|
|
276
|
+
placeholder: t.placeholder ?? Z("common.请选择日期"),
|
|
280
277
|
startPlaceholder: t.startPlaceholder ?? (o(t.type) ? Z("common.开始日期") : void 0),
|
|
281
278
|
endPlaceholder: t.endPlaceholder ?? (o(t.type) ? Z("common.结束日期") : void 0)
|
|
282
279
|
};
|
|
280
|
+
if (t.disabled && !r) {
|
|
281
|
+
const {
|
|
282
|
+
placeholder: v,
|
|
283
|
+
startPlaceholder: S,
|
|
284
|
+
endPlaceholder: I,
|
|
285
|
+
...L
|
|
286
|
+
} = i;
|
|
287
|
+
return L;
|
|
288
|
+
}
|
|
289
|
+
return i;
|
|
283
290
|
});
|
|
284
291
|
function o(r) {
|
|
285
292
|
return r?.includes("range") ?? !1;
|
|
286
293
|
}
|
|
287
|
-
|
|
288
|
-
const
|
|
289
|
-
return
|
|
290
|
-
|
|
294
|
+
function l(r, a) {
|
|
295
|
+
const s = Array.isArray(a) ? a.flatMap((i) => c(i)) : c(a);
|
|
296
|
+
return [r, ...s].filter(Boolean).join(" ");
|
|
297
|
+
}
|
|
298
|
+
function c(r) {
|
|
299
|
+
return r ? typeof r == "string" ? [r] : Array.isArray(r) ? r.flatMap((a) => c(a)) : typeof r == "object" ? Object.entries(r).filter(([, a]) => !!a).map(([a]) => a) : [] : [];
|
|
300
|
+
}
|
|
301
|
+
return (r, a) => {
|
|
302
|
+
const s = Wt;
|
|
303
|
+
return $(), H(s, ae({ class: "jt-date-picker" }, n.value, {
|
|
304
|
+
"onUpdate:modelValue": a[0] || (a[0] = (i) => r.$emit("update:modelValue", i))
|
|
291
305
|
}), null, 16);
|
|
292
306
|
};
|
|
293
307
|
}
|
|
294
|
-
}), So = /* @__PURE__ */ be(bo, [["__scopeId", "data-v-
|
|
308
|
+
}), So = /* @__PURE__ */ be(bo, [["__scopeId", "data-v-32c2dc63"]]), _o = /* @__PURE__ */ pe({
|
|
295
309
|
name: "JtInput",
|
|
296
310
|
__name: "index",
|
|
297
311
|
props: {
|
|
@@ -308,7 +322,7 @@ const yo = /* @__PURE__ */ pe({
|
|
|
308
322
|
autocomplete: {},
|
|
309
323
|
formatter: {},
|
|
310
324
|
parser: {},
|
|
311
|
-
placeholder: {
|
|
325
|
+
placeholder: {},
|
|
312
326
|
form: {},
|
|
313
327
|
readonly: { type: Boolean },
|
|
314
328
|
clearable: { type: Boolean, default: !0 },
|
|
@@ -327,7 +341,8 @@ const yo = /* @__PURE__ */ pe({
|
|
|
327
341
|
ariaLabel: {},
|
|
328
342
|
inputmode: {},
|
|
329
343
|
name: {},
|
|
330
|
-
countGraphemes: {}
|
|
344
|
+
countGraphemes: {},
|
|
345
|
+
preservePlaceholderWhenDisabled: { type: Boolean }
|
|
331
346
|
},
|
|
332
347
|
emits: {
|
|
333
348
|
...Bt,
|
|
@@ -335,27 +350,33 @@ const yo = /* @__PURE__ */ pe({
|
|
|
335
350
|
},
|
|
336
351
|
setup(e, { emit: t }) {
|
|
337
352
|
const n = e, o = O(() => {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
(
|
|
353
|
+
const { preservePlaceholderWhenDisabled: r, placeholder: a, ...s } = n, i = {
|
|
354
|
+
...s,
|
|
355
|
+
// 未显式配置 placeholder 时,每次渲染按当前语言重新读取默认文案。
|
|
356
|
+
placeholder: a ?? Z("common.请输入")
|
|
357
|
+
};
|
|
358
|
+
return !n.disabled || r ? i : Object.fromEntries(
|
|
359
|
+
Object.entries(i).filter(([v]) => v !== "placeholder")
|
|
360
|
+
);
|
|
361
|
+
}), l = t, c = O(() => Object.fromEntries(
|
|
362
|
+
Object.keys(Bt).map((r) => [
|
|
363
|
+
r,
|
|
364
|
+
(...a) => l(r, ...a)
|
|
345
365
|
])
|
|
346
366
|
));
|
|
347
|
-
return (
|
|
367
|
+
return (r, a) => {
|
|
348
368
|
const s = Zt;
|
|
349
|
-
return
|
|
350
|
-
onKeyup:
|
|
369
|
+
return $(), H(s, ae({ class: "jt-input" }, o.value, et(c.value), {
|
|
370
|
+
onKeyup: a[0] || (a[0] = Wn((i) => l("enter"), ["enter"]))
|
|
351
371
|
}), null, 16);
|
|
352
372
|
};
|
|
353
373
|
}
|
|
354
|
-
}), ht = /* @__PURE__ */ be(_o, [["__scopeId", "data-v-
|
|
374
|
+
}), ht = /* @__PURE__ */ be(_o, [["__scopeId", "data-v-14966118"]]), wo = /* @__PURE__ */ pe({
|
|
355
375
|
name: "JtSelect",
|
|
356
376
|
__name: "index",
|
|
357
377
|
props: {
|
|
358
378
|
options: {},
|
|
379
|
+
preservePlaceholderWhenDisabled: { type: Boolean },
|
|
359
380
|
ariaLabel: {},
|
|
360
381
|
emptyValues: {},
|
|
361
382
|
valueOnClear: {},
|
|
@@ -383,7 +404,7 @@ const yo = /* @__PURE__ */ pe({
|
|
|
383
404
|
filterMethod: {},
|
|
384
405
|
multiple: { type: Boolean },
|
|
385
406
|
multipleLimit: {},
|
|
386
|
-
placeholder: {
|
|
407
|
+
placeholder: {},
|
|
387
408
|
defaultFirstOption: { type: Boolean },
|
|
388
409
|
reserveKeyword: { type: Boolean },
|
|
389
410
|
valueKey: {},
|
|
@@ -411,31 +432,39 @@ const yo = /* @__PURE__ */ pe({
|
|
|
411
432
|
emits: Et,
|
|
412
433
|
setup(e, { emit: t }) {
|
|
413
434
|
const n = e, o = O(() => {
|
|
414
|
-
const { options: a, placeholder:
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
placeholder: l
|
|
435
|
+
const { options: a, placeholder: s, preservePlaceholderWhenDisabled: i, ...v } = n, S = l("jt-select-popper", v.popperClass), I = {
|
|
436
|
+
...v,
|
|
437
|
+
popperClass: S
|
|
418
438
|
};
|
|
419
|
-
|
|
439
|
+
return n.disabled && !i ? I : {
|
|
440
|
+
...I,
|
|
441
|
+
// 未显式配置 placeholder 时,每次渲染按当前语言重新读取默认文案。
|
|
442
|
+
placeholder: s ?? Z("common.请选择")
|
|
443
|
+
};
|
|
444
|
+
});
|
|
445
|
+
function l(a, s) {
|
|
446
|
+
return [a, s].flat().filter(Boolean).join(" ");
|
|
447
|
+
}
|
|
448
|
+
const c = t, r = O(() => Object.fromEntries(
|
|
420
449
|
Object.keys(Et).map((a) => [
|
|
421
450
|
a,
|
|
422
|
-
(...
|
|
451
|
+
(...s) => c(a, ...s)
|
|
423
452
|
])
|
|
424
453
|
));
|
|
425
|
-
return (a,
|
|
426
|
-
const
|
|
427
|
-
return
|
|
454
|
+
return (a, s) => {
|
|
455
|
+
const i = Xt, v = Qt;
|
|
456
|
+
return $(), H(v, ae({ class: "jt-select" }, o.value, et(r.value)), {
|
|
428
457
|
default: U(() => [
|
|
429
|
-
(
|
|
430
|
-
key:
|
|
458
|
+
($(!0), G(Se, null, ye(a.options ?? [], (S) => ($(), H(i, ae({
|
|
459
|
+
key: S.value,
|
|
431
460
|
ref_for: !0
|
|
432
|
-
},
|
|
461
|
+
}, S), null, 16))), 128))
|
|
433
462
|
]),
|
|
434
463
|
_: 1
|
|
435
464
|
}, 16);
|
|
436
465
|
};
|
|
437
466
|
}
|
|
438
|
-
}), Io = /* @__PURE__ */ be(wo, [["__scopeId", "data-v-
|
|
467
|
+
}), Io = /* @__PURE__ */ be(wo, [["__scopeId", "data-v-adab2b3a"]]), $o = { class: "jt-form-items" }, gt = 4, Co = /* @__PURE__ */ pe({
|
|
439
468
|
name: "JTFormItems",
|
|
440
469
|
__name: "JtFormItems",
|
|
441
470
|
props: {
|
|
@@ -455,100 +484,100 @@ const yo = /* @__PURE__ */ pe({
|
|
|
455
484
|
daterange: "date-picker",
|
|
456
485
|
"date-range": "date-picker",
|
|
457
486
|
dateRange: "date-picker"
|
|
458
|
-
},
|
|
459
|
-
const { itemType:
|
|
460
|
-
if (!
|
|
461
|
-
if (typeof
|
|
462
|
-
const F = o[
|
|
487
|
+
}, l = /* @__PURE__ */ new Set(["prop", "label", "itemType", "span", "options", "rules", "formItemProps", "showSlot", "show"]), c = Object.keys(n), r = /* @__PURE__ */ new Map(), a = O(() => t.configs.filter((g) => g.show !== !1)), s = (g) => {
|
|
488
|
+
const { itemType: h } = g;
|
|
489
|
+
if (!h) return ht;
|
|
490
|
+
if (typeof h != "string") return h;
|
|
491
|
+
const F = o[h] ?? h;
|
|
463
492
|
return c.includes(F) ? n[F] : (console.error(
|
|
464
|
-
`[JtFormItems] 不支持的 itemType: "${
|
|
493
|
+
`[JtFormItems] 不支持的 itemType: "${h}",支持的类型: ${c.join(", ")}`
|
|
465
494
|
), ht);
|
|
466
|
-
}, i = (
|
|
467
|
-
const
|
|
468
|
-
return
|
|
469
|
-
...
|
|
470
|
-
options:
|
|
471
|
-
} : z(
|
|
472
|
-
...
|
|
495
|
+
}, i = (g) => {
|
|
496
|
+
const h = sn(g, l);
|
|
497
|
+
return g.itemType === "select" || g.itemType === "remote-select" || g.itemType === "cascader" ? {
|
|
498
|
+
...h,
|
|
499
|
+
options: g.options
|
|
500
|
+
} : z(g.itemType) ? {
|
|
501
|
+
...h,
|
|
473
502
|
type: "daterange"
|
|
474
|
-
} :
|
|
475
|
-
},
|
|
476
|
-
rules:
|
|
477
|
-
...
|
|
478
|
-
}),
|
|
479
|
-
t.formData[
|
|
503
|
+
} : h;
|
|
504
|
+
}, v = (g) => an(g, l), S = (g) => ({
|
|
505
|
+
rules: g.rules,
|
|
506
|
+
...g.formItemProps
|
|
507
|
+
}), I = (g, h) => {
|
|
508
|
+
t.formData[g] = h;
|
|
480
509
|
};
|
|
481
|
-
function L(
|
|
482
|
-
return (
|
|
483
|
-
if (
|
|
484
|
-
|
|
510
|
+
function L(g) {
|
|
511
|
+
return (h) => {
|
|
512
|
+
if (h) {
|
|
513
|
+
r.set(g, h);
|
|
485
514
|
return;
|
|
486
515
|
}
|
|
487
|
-
|
|
516
|
+
r.delete(g);
|
|
488
517
|
};
|
|
489
518
|
}
|
|
490
|
-
function V(
|
|
519
|
+
function V(g, h) {
|
|
491
520
|
Zn(() => {
|
|
492
|
-
|
|
521
|
+
r.get(g)?.validate(h).catch(() => {
|
|
493
522
|
});
|
|
494
523
|
});
|
|
495
524
|
}
|
|
496
|
-
const f = (
|
|
497
|
-
const
|
|
525
|
+
const f = (g) => Math.min(Math.max(Math.trunc(g || 1), 1), 4), _ = O(() => {
|
|
526
|
+
const h = a.value.reduce(
|
|
498
527
|
(F, y) => F + f(t.span || y.span),
|
|
499
528
|
0
|
|
500
529
|
) % gt;
|
|
501
|
-
return
|
|
530
|
+
return h === 0 ? {
|
|
502
531
|
gridColumn: `1 / span ${gt}`
|
|
503
532
|
} : {
|
|
504
|
-
gridColumn: `${
|
|
533
|
+
gridColumn: `${h + 1} / span ${gt - h}`
|
|
505
534
|
};
|
|
506
|
-
}),
|
|
507
|
-
gridColumn: `span ${f(t.span ||
|
|
535
|
+
}), M = (g) => ({
|
|
536
|
+
gridColumn: `span ${f(t.span || g.span)}`
|
|
508
537
|
});
|
|
509
|
-
function z(
|
|
510
|
-
return
|
|
538
|
+
function z(g) {
|
|
539
|
+
return g === "daterange" || g === "date-range" || g === "dateRange";
|
|
511
540
|
}
|
|
512
|
-
return (
|
|
541
|
+
return (g, h) => {
|
|
513
542
|
const F = en;
|
|
514
|
-
return
|
|
515
|
-
(
|
|
543
|
+
return $(), G("div", $o, [
|
|
544
|
+
($(!0), G(Se, null, ye(a.value, (y) => ($(), H(F, ae({
|
|
516
545
|
key: y.prop,
|
|
517
546
|
ref_for: !0,
|
|
518
547
|
ref: L(y.prop),
|
|
519
548
|
class: "jt-form-items__item",
|
|
520
|
-
style:
|
|
549
|
+
style: M(y),
|
|
521
550
|
label: y.label,
|
|
522
551
|
prop: y.prop
|
|
523
|
-
},
|
|
552
|
+
}, S(y)), {
|
|
524
553
|
default: U(() => [
|
|
525
|
-
y.showSlot ? te(
|
|
554
|
+
y.showSlot ? te(g.$slots, y.prop, { key: 0 }, void 0, !0) : ($(), H(Kt(s(y)), ae({
|
|
526
555
|
key: 1,
|
|
527
|
-
"model-value":
|
|
556
|
+
"model-value": g.formData[y.prop],
|
|
528
557
|
ref_for: !0
|
|
529
|
-
}, i(y), et(
|
|
530
|
-
"onUpdate:modelValue": (A) =>
|
|
558
|
+
}, i(y), et(v(y)), {
|
|
559
|
+
"onUpdate:modelValue": (A) => I(y.prop, A),
|
|
531
560
|
onChange: () => V(y.prop, "change"),
|
|
532
561
|
onBlur: () => V(y.prop, "blur")
|
|
533
562
|
}), null, 16, ["model-value", "onUpdate:modelValue", "onChange", "onBlur"]))
|
|
534
563
|
]),
|
|
535
564
|
_: 2
|
|
536
565
|
}, 1040, ["style", "label", "prop"]))), 128)),
|
|
537
|
-
|
|
566
|
+
g.$slots.actions ? ($(), H(F, {
|
|
538
567
|
key: 0,
|
|
539
568
|
class: "jt-form-items__actions",
|
|
540
|
-
style: Yt(
|
|
569
|
+
style: Yt(_.value)
|
|
541
570
|
}, {
|
|
542
571
|
default: U(() => [
|
|
543
|
-
te(
|
|
572
|
+
te(g.$slots, "actions", {}, void 0, !0)
|
|
544
573
|
]),
|
|
545
574
|
_: 3
|
|
546
575
|
}, 8, ["style"])) : fe("", !0)
|
|
547
576
|
]);
|
|
548
577
|
};
|
|
549
578
|
}
|
|
550
|
-
}), ko = /* @__PURE__ */ be(Co, [["__scopeId", "data-v-
|
|
551
|
-
function
|
|
579
|
+
}), ko = /* @__PURE__ */ be(Co, [["__scopeId", "data-v-08413520"]]);
|
|
580
|
+
function Mo() {
|
|
552
581
|
const e = ge(!1);
|
|
553
582
|
function t() {
|
|
554
583
|
e.value = !0;
|
|
@@ -562,7 +591,7 @@ function To() {
|
|
|
562
591
|
searchDone: n
|
|
563
592
|
};
|
|
564
593
|
}
|
|
565
|
-
const
|
|
594
|
+
const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='-0.5'%20width='11'%20height='11'%20rx='5.5'%20transform='matrix(1%200%200%20-1%201%2012)'%20stroke='%23999999'/%3e%3cpath%20d='M10%208.16064L7%205.16064L4%208.16064'%20stroke='%23999999'/%3e%3c/svg%3e", Oo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.375%207.00017C2.375%207.27631%202.59886%207.50017%202.875%207.50017C3.15114%207.50017%203.375%207.27631%203.375%207.00017H2.875H2.375ZM2.875%207.00017H3.375C3.375%204.46334%205.41801%202.41406%207.93713%202.41406V1.91406V1.41406C4.86127%201.41406%202.375%203.91551%202.375%207.00017H2.875ZM7.93713%201.91406V2.41406C10.4563%202.41406%2012.4993%204.46334%2012.4993%207.00017H12.9993H13.4993C13.4993%203.91551%2011.013%201.41406%207.93713%201.41406V1.91406ZM12.9993%207.00017H12.4993C12.4993%209.537%2010.4563%2011.5863%207.93713%2011.5863V12.0863V12.5863C11.013%2012.5863%2013.4993%2010.0848%2013.4993%207.00017H12.9993ZM7.93713%2012.0863V11.5863C6.68975%2011.5863%205.55663%2011.0806%204.72892%2010.2635L4.37765%2010.6193L4.02638%2010.9752C5.0317%2011.9676%206.41366%2012.5863%207.93713%2012.5863V12.0863Z'%20fill='%23999999'/%3e%3cpath%20d='M4.75131%206.0102L2.88631%207.88403L1%205.99414'%20stroke='%23999999'%20stroke-miterlimit='10'/%3e%3c/svg%3e", Do = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.60938%2012.1099C9.64694%2012.1099%2012.1094%209.64743%2012.1094%206.60986C12.1094%203.5723%209.64694%201.10986%206.60938%201.10986C3.57181%201.10986%201.10938%203.5723%201.10938%206.60986C1.10938%209.64743%203.57181%2012.1099%206.60938%2012.1099Z'%20stroke='white'%20stroke-miterlimit='10'/%3e%3cpath%20d='M12.4993%2012.5002L10.2832%2010.3301'%20stroke='white'%20stroke-miterlimit='10'/%3e%3c/svg%3e", Fo = { class: "jt-filter-bar__btns" }, Bo = ["src"], Eo = ["src"], Lo = ["src"], Po = /* @__PURE__ */ pe({
|
|
566
595
|
name: "JtFilterBar",
|
|
567
596
|
__name: "JtFilterBar",
|
|
568
597
|
props: {
|
|
@@ -572,78 +601,79 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
572
601
|
},
|
|
573
602
|
emits: ["update:modelValue", "search", "reset"],
|
|
574
603
|
setup(e, { expose: t, emit: n }) {
|
|
575
|
-
const o = e,
|
|
576
|
-
() => o.columns.filter((
|
|
604
|
+
const o = e, l = n, c = ge(), r = Le(), a = ge({}), { searchDisabled: s, searchLoading: i, searchDone: v } = Mo(), S = O(() => o.option), I = ge(S.value.searchCollapsed ?? !0), L = O(
|
|
605
|
+
() => o.columns.filter((T) => T.search === !0)
|
|
577
606
|
), V = O(
|
|
578
|
-
() => Math.max(1,
|
|
607
|
+
() => Math.max(1, S.value.searchSpan ?? 4)
|
|
579
608
|
), f = O(
|
|
580
|
-
() => Math.max(1,
|
|
581
|
-
),
|
|
582
|
-
() => Math.max(1,
|
|
583
|
-
), z = O(() => V.value),
|
|
609
|
+
() => Math.max(1, S.value.searchCollapsedRows ?? 1)
|
|
610
|
+
), _ = O(() => V.value), M = O(
|
|
611
|
+
() => Math.max(1, _.value * f.value)
|
|
612
|
+
), z = O(() => V.value), g = O(
|
|
584
613
|
() => j.value ? "264px" : "174px"
|
|
585
|
-
),
|
|
586
|
-
() => K(
|
|
614
|
+
), h = O(
|
|
615
|
+
() => K(S.value.searchLabelWidth ?? 84)
|
|
587
616
|
), F = O(
|
|
588
|
-
() =>
|
|
617
|
+
() => S.value.searchLabelPosition ?? "top"
|
|
589
618
|
), y = O(
|
|
590
|
-
() => q(
|
|
619
|
+
() => q(S.value.searchGutter, 16)
|
|
591
620
|
), A = O(
|
|
592
|
-
() => q(
|
|
621
|
+
() => q(S.value.searchRowGap, 10)
|
|
593
622
|
), b = O(
|
|
594
|
-
() => Q(
|
|
595
|
-
), j = O(() =>
|
|
596
|
-
if (!j.value ||
|
|
597
|
-
let
|
|
623
|
+
() => Q(S.value.searchPadding ?? "18px 4px 0")
|
|
624
|
+
), j = O(() => S.value.searchCollapse === !1 ? !1 : x(L.value) > M.value), C = O(() => {
|
|
625
|
+
if (!j.value || !I.value) return L.value;
|
|
626
|
+
let T = 0;
|
|
598
627
|
return L.value.filter((X) => {
|
|
599
628
|
const ue = P(X);
|
|
600
|
-
return
|
|
629
|
+
return T + ue > M.value ? !1 : (T += ue, !0);
|
|
601
630
|
});
|
|
602
631
|
}), N = O(
|
|
603
|
-
() => C.value.filter((
|
|
632
|
+
() => C.value.filter((T) => !!r[`${T.prop}-search`])
|
|
604
633
|
), re = O(() => {
|
|
605
|
-
const
|
|
606
|
-
return C.value.length > 0 && C.value.length <= 2 &&
|
|
634
|
+
const T = x(C.value);
|
|
635
|
+
return C.value.length > 0 && C.value.length <= 2 && T < V.value;
|
|
607
636
|
}), le = O(() => {
|
|
608
|
-
const
|
|
609
|
-
return `${Math.min(V.value,
|
|
637
|
+
const T = x(C.value);
|
|
638
|
+
return `${Math.min(V.value, T + 1)}`;
|
|
610
639
|
}), R = O(
|
|
611
|
-
() => C.value.map((
|
|
640
|
+
() => C.value.map((T) => E(T))
|
|
612
641
|
);
|
|
613
642
|
Ee(
|
|
614
|
-
() =>
|
|
615
|
-
(
|
|
616
|
-
typeof
|
|
643
|
+
() => S.value.searchCollapsed,
|
|
644
|
+
(T) => {
|
|
645
|
+
typeof T == "boolean" && (I.value = T);
|
|
617
646
|
}
|
|
618
647
|
), Ee(
|
|
619
648
|
() => o.modelValue,
|
|
620
|
-
(
|
|
621
|
-
|
|
649
|
+
(T) => {
|
|
650
|
+
a.value = { ...T };
|
|
622
651
|
},
|
|
623
652
|
{ deep: !0, immediate: !0 }
|
|
624
653
|
);
|
|
625
|
-
function B(
|
|
654
|
+
function B(T, X) {
|
|
626
655
|
if (s.value) return;
|
|
627
|
-
const ue = { ...
|
|
628
|
-
|
|
656
|
+
const ue = { ...a.value, [T]: X };
|
|
657
|
+
a.value = ue, l("update:modelValue", ue);
|
|
629
658
|
}
|
|
630
|
-
function E(
|
|
631
|
-
const X =
|
|
659
|
+
function E(T) {
|
|
660
|
+
const X = T.searchProps ?? {}, ue = T.searchType ?? "input";
|
|
632
661
|
return {
|
|
633
662
|
...X,
|
|
634
|
-
prop:
|
|
635
|
-
label:
|
|
636
|
-
span: P(
|
|
663
|
+
prop: T.prop,
|
|
664
|
+
label: T.searchLabel ?? T.label,
|
|
665
|
+
span: P(T),
|
|
637
666
|
itemType: ue,
|
|
638
667
|
// 外部提供 `${prop}-search` 时交给插槽渲染,保持旧版 JtFilterBar 的自定义能力。
|
|
639
|
-
showSlot: !!
|
|
640
|
-
options: X.options ??
|
|
641
|
-
placeholder: X.placeholder ??
|
|
642
|
-
valueFormat: X.valueFormat ??
|
|
668
|
+
showSlot: !!r[`${T.prop}-search`],
|
|
669
|
+
options: X.options ?? T.searchOptions ?? T.dicData,
|
|
670
|
+
placeholder: X.placeholder ?? T.searchPlaceholder,
|
|
671
|
+
valueFormat: X.valueFormat ?? T.searchValueFormat,
|
|
643
672
|
disabled: s.value || X.disabled === !0,
|
|
673
|
+
preservePlaceholderWhenDisabled: s.value,
|
|
644
674
|
formItemProps: {
|
|
645
|
-
required:
|
|
646
|
-
class: ["jt-filter-bar__item", { "is-required":
|
|
675
|
+
required: T.searchRequired,
|
|
676
|
+
class: ["jt-filter-bar__item", { "is-required": T.searchRequired }]
|
|
647
677
|
},
|
|
648
678
|
// 保留原来输入框回车触发查询的行为,同时不吞掉使用方在 searchProps 中传入的 onEnter。
|
|
649
679
|
onEnter: (...de) => {
|
|
@@ -651,16 +681,16 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
651
681
|
},
|
|
652
682
|
// JtFormItems 内部会修改 filterModel,这里继续按旧接口向外 emit update:modelValue。
|
|
653
683
|
"onUpdate:modelValue": (de) => {
|
|
654
|
-
d(X["onUpdate:modelValue"], de), B(
|
|
684
|
+
d(X["onUpdate:modelValue"], de), B(T.prop, de);
|
|
655
685
|
}
|
|
656
686
|
};
|
|
657
687
|
}
|
|
658
|
-
function d(
|
|
659
|
-
if (Array.isArray(
|
|
660
|
-
|
|
688
|
+
function d(T, ...X) {
|
|
689
|
+
if (Array.isArray(T)) {
|
|
690
|
+
T.forEach((ue) => d(ue, ...X));
|
|
661
691
|
return;
|
|
662
692
|
}
|
|
663
|
-
typeof
|
|
693
|
+
typeof T == "function" && T(...X);
|
|
664
694
|
}
|
|
665
695
|
async function u() {
|
|
666
696
|
if (!s.value) {
|
|
@@ -670,29 +700,29 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
670
700
|
} catch {
|
|
671
701
|
return;
|
|
672
702
|
}
|
|
673
|
-
|
|
703
|
+
l("search");
|
|
674
704
|
}
|
|
675
705
|
}
|
|
676
|
-
function
|
|
677
|
-
s.value ||
|
|
706
|
+
function w() {
|
|
707
|
+
s.value || l("reset");
|
|
678
708
|
}
|
|
679
709
|
function D() {
|
|
680
|
-
|
|
710
|
+
I.value = !I.value;
|
|
681
711
|
}
|
|
682
|
-
function P(
|
|
683
|
-
return Math.min(V.value, Math.max(1,
|
|
712
|
+
function P(T) {
|
|
713
|
+
return Math.min(V.value, Math.max(1, T.searchSpan ?? 1));
|
|
684
714
|
}
|
|
685
|
-
function x(
|
|
686
|
-
return
|
|
715
|
+
function x(T) {
|
|
716
|
+
return T.reduce((X, ue) => X + P(ue), 0);
|
|
687
717
|
}
|
|
688
|
-
function K(
|
|
689
|
-
return typeof
|
|
718
|
+
function K(T) {
|
|
719
|
+
return typeof T == "number" ? `${T}px` : T;
|
|
690
720
|
}
|
|
691
|
-
function q(
|
|
692
|
-
return typeof
|
|
721
|
+
function q(T, X) {
|
|
722
|
+
return typeof T == "number" ? T : X;
|
|
693
723
|
}
|
|
694
|
-
function Q(
|
|
695
|
-
return typeof
|
|
724
|
+
function Q(T) {
|
|
725
|
+
return typeof T == "number" ? `${T}px` : T;
|
|
696
726
|
}
|
|
697
727
|
return t({
|
|
698
728
|
/** 内部 Element Plus Form 实例,保留给业务侧做校验、重置等原生表单操作。 */
|
|
@@ -702,10 +732,10 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
702
732
|
/** 开启筛选表单禁用。 */
|
|
703
733
|
searchLoading: i,
|
|
704
734
|
/** 关闭筛选表单禁用。 */
|
|
705
|
-
searchDone:
|
|
706
|
-
}), (
|
|
735
|
+
searchDone: v
|
|
736
|
+
}), (T, X) => {
|
|
707
737
|
const ue = tn;
|
|
708
|
-
return
|
|
738
|
+
return $(), G("div", {
|
|
709
739
|
class: We(["jt-filter-bar", [
|
|
710
740
|
`is-label-${F.value}`,
|
|
711
741
|
{ "is-single-filter": re.value }
|
|
@@ -713,9 +743,9 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
713
743
|
style: Yt({
|
|
714
744
|
"--jt-filter-columns": V.value,
|
|
715
745
|
"--jt-filter-field-columns": z.value,
|
|
716
|
-
"--jt-filter-btns-width":
|
|
746
|
+
"--jt-filter-btns-width": g.value,
|
|
717
747
|
"--jt-filter-actions-start": le.value,
|
|
718
|
-
"--jt-filter-label-width":
|
|
748
|
+
"--jt-filter-label-width": h.value,
|
|
719
749
|
"--jt-filter-column-gap": `${y.value}px`,
|
|
720
750
|
"--jt-filter-row-gap": `${A.value}px`,
|
|
721
751
|
"--jt-filter-padding": b.value
|
|
@@ -725,9 +755,9 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
725
755
|
ref_key: "formRef",
|
|
726
756
|
ref: c,
|
|
727
757
|
class: "jt-filter-bar__form",
|
|
728
|
-
model:
|
|
758
|
+
model: a.value,
|
|
729
759
|
"label-position": F.value,
|
|
730
|
-
"label-width":
|
|
760
|
+
"label-width": h.value,
|
|
731
761
|
disabled: J(s),
|
|
732
762
|
onSubmit: X[0] || (X[0] = Ut(() => {
|
|
733
763
|
}, ["prevent"]))
|
|
@@ -735,19 +765,19 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
735
765
|
default: U(() => [
|
|
736
766
|
Ie(J(ko), {
|
|
737
767
|
configs: R.value,
|
|
738
|
-
"form-data":
|
|
768
|
+
"form-data": a.value,
|
|
739
769
|
style: { "--jt-form-label-gap": "6px", "--jt-form-column-gap": "16px", "--jt-form-row-gap": "10px" }
|
|
740
770
|
}, Re({
|
|
741
771
|
actions: U(() => [
|
|
742
772
|
ne("div", Fo, [
|
|
743
|
-
te(
|
|
773
|
+
te(T.$slots, "search-menu", {
|
|
744
774
|
search: u,
|
|
745
|
-
reset:
|
|
775
|
+
reset: w,
|
|
746
776
|
disabled: J(s),
|
|
747
|
-
collapsed:
|
|
777
|
+
collapsed: I.value,
|
|
748
778
|
toggleCollapse: D
|
|
749
779
|
}, () => [
|
|
750
|
-
j.value ? (
|
|
780
|
+
j.value ? ($(), H(J(rt), {
|
|
751
781
|
key: 0,
|
|
752
782
|
class: "jt-filter-bar__btn-collapse",
|
|
753
783
|
size: "small",
|
|
@@ -755,13 +785,13 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
755
785
|
}, {
|
|
756
786
|
icon: U(() => [
|
|
757
787
|
ne("img", {
|
|
758
|
-
class: We(["jt-filter-bar__icon-arrow", { "is-collapsed":
|
|
759
|
-
src: J(
|
|
788
|
+
class: We(["jt-filter-bar__icon-arrow", { "is-collapsed": I.value }]),
|
|
789
|
+
src: J(To),
|
|
760
790
|
alt: ""
|
|
761
791
|
}, null, 10, Bo)
|
|
762
792
|
]),
|
|
763
793
|
default: U(() => [
|
|
764
|
-
ne("span", null, oe(
|
|
794
|
+
ne("span", null, oe(I.value ? J(Z)("common.展开") : J(Z)("common.收起")), 1)
|
|
765
795
|
]),
|
|
766
796
|
_: 1
|
|
767
797
|
})) : fe("", !0),
|
|
@@ -769,7 +799,7 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
769
799
|
class: "jt-filter-bar__btn-reset",
|
|
770
800
|
size: "small",
|
|
771
801
|
disabled: J(s),
|
|
772
|
-
onClick:
|
|
802
|
+
onClick: w
|
|
773
803
|
}, {
|
|
774
804
|
icon: U(() => [
|
|
775
805
|
ne("img", {
|
|
@@ -778,7 +808,7 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
778
808
|
}, null, 8, Eo)
|
|
779
809
|
]),
|
|
780
810
|
default: U(() => [
|
|
781
|
-
ne("span", null, oe(
|
|
811
|
+
ne("span", null, oe(S.value.resetBtnText ?? J(Z)("common.重置")), 1)
|
|
782
812
|
]),
|
|
783
813
|
_: 1
|
|
784
814
|
}, 8, ["disabled"]),
|
|
@@ -796,7 +826,7 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
796
826
|
}, null, 8, Lo)
|
|
797
827
|
]),
|
|
798
828
|
default: U(() => [
|
|
799
|
-
ne("span", null, oe(
|
|
829
|
+
ne("span", null, oe(S.value.searchBtnText ?? J(Z)("common.查询")), 1)
|
|
800
830
|
]),
|
|
801
831
|
_: 1
|
|
802
832
|
}, 8, ["disabled"])
|
|
@@ -808,12 +838,12 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
808
838
|
ye(N.value, (de) => ({
|
|
809
839
|
name: de.prop,
|
|
810
840
|
fn: U(() => [
|
|
811
|
-
te(
|
|
812
|
-
value:
|
|
841
|
+
te(T.$slots, `${de.prop}-search`, {
|
|
842
|
+
value: a.value[de.prop],
|
|
813
843
|
column: de,
|
|
814
844
|
setValue: (me) => B(de.prop, me),
|
|
815
845
|
search: u,
|
|
816
|
-
reset:
|
|
846
|
+
reset: w,
|
|
817
847
|
disabled: J(s)
|
|
818
848
|
}, void 0, !0)
|
|
819
849
|
])
|
|
@@ -825,7 +855,7 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
825
855
|
], 6);
|
|
826
856
|
};
|
|
827
857
|
}
|
|
828
|
-
}), Vo = /* @__PURE__ */ be(Po, [["__scopeId", "data-v-
|
|
858
|
+
}), Vo = /* @__PURE__ */ be(Po, [["__scopeId", "data-v-9c4fccf9"]]), jo = { key: 1 }, Ao = { key: 2 }, Ro = { key: 3 }, zo = /* @__PURE__ */ pe({
|
|
829
859
|
name: "JtTable",
|
|
830
860
|
__name: "JtTable",
|
|
831
861
|
props: {
|
|
@@ -835,100 +865,100 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
835
865
|
tableEvents: {}
|
|
836
866
|
},
|
|
837
867
|
setup(e, { expose: t }) {
|
|
838
|
-
const n = e, o = Le(),
|
|
868
|
+
const n = e, o = Le(), l = ge(), c = O(() => n.option ?? {}), r = O(() => n.columns.filter((f) => !f.hide)), a = O(() => c.value.menuFixed ?? "right");
|
|
839
869
|
function s(f) {
|
|
840
870
|
return !!o[`${f}-header`];
|
|
841
871
|
}
|
|
842
872
|
function i(f) {
|
|
843
873
|
return !!o[`${f}-data`];
|
|
844
874
|
}
|
|
845
|
-
function
|
|
875
|
+
function v(f) {
|
|
846
876
|
return {
|
|
847
877
|
width: f.width,
|
|
848
878
|
minWidth: f.minWidth,
|
|
849
879
|
align: f.align || "center",
|
|
850
880
|
fixed: f.fixed,
|
|
851
881
|
sortable: f.sortable,
|
|
852
|
-
showOverflowTooltip: f.showOverflowTooltip ??
|
|
882
|
+
showOverflowTooltip: f.showOverflowTooltip ?? S(f),
|
|
853
883
|
...f.columnOptions
|
|
854
884
|
};
|
|
855
885
|
}
|
|
856
|
-
function
|
|
886
|
+
function S(f) {
|
|
857
887
|
return !i(f.prop) && !L(f.columnOptions?.type);
|
|
858
888
|
}
|
|
859
|
-
function
|
|
889
|
+
function I(f) {
|
|
860
890
|
return !L(f.columnOptions?.type);
|
|
861
891
|
}
|
|
862
892
|
function L(f) {
|
|
863
893
|
return f === "selection" || f === "index" || f === "expand";
|
|
864
894
|
}
|
|
865
|
-
function V(f,
|
|
866
|
-
return f.find((
|
|
895
|
+
function V(f, _) {
|
|
896
|
+
return f.find((M) => M.value === _)?.label ?? String(_ ?? "");
|
|
867
897
|
}
|
|
868
|
-
return t({ tableRef:
|
|
869
|
-
const
|
|
870
|
-
return
|
|
898
|
+
return t({ tableRef: l }), (f, _) => {
|
|
899
|
+
const M = on, z = nn;
|
|
900
|
+
return $(), H(z, ae({
|
|
871
901
|
ref_key: "tableRef",
|
|
872
|
-
ref:
|
|
902
|
+
ref: l,
|
|
873
903
|
data: f.data,
|
|
874
904
|
"row-key": c.value.rowKey ?? "id",
|
|
875
905
|
"empty-text": c.value.emptyText,
|
|
876
906
|
class: "jt-table"
|
|
877
907
|
}, c.value.tableProps, et(f.tableEvents)), {
|
|
878
908
|
default: U(() => [
|
|
879
|
-
c.value.selection ? (
|
|
909
|
+
c.value.selection ? ($(), H(M, {
|
|
880
910
|
key: 0,
|
|
881
911
|
type: "selection",
|
|
882
912
|
width: "55",
|
|
883
913
|
align: "center"
|
|
884
914
|
})) : fe("", !0),
|
|
885
|
-
c.value.index ? (
|
|
915
|
+
c.value.index ? ($(), H(M, {
|
|
886
916
|
key: 1,
|
|
887
917
|
type: "index",
|
|
888
918
|
label: c.value.indexLabel ?? J(Z)("common.序号"),
|
|
889
919
|
width: "60",
|
|
890
920
|
align: "center"
|
|
891
921
|
}, null, 8, ["label"])) : fe("", !0),
|
|
892
|
-
(
|
|
893
|
-
key:
|
|
894
|
-
prop:
|
|
895
|
-
label:
|
|
896
|
-
formatter: !i(
|
|
922
|
+
($(!0), G(Se, null, ye(r.value, (g) => ($(), H(M, ae({
|
|
923
|
+
key: g.prop,
|
|
924
|
+
prop: g.prop,
|
|
925
|
+
label: g.label,
|
|
926
|
+
formatter: !i(g.prop) && !g.dicData ? g.formatter : void 0,
|
|
897
927
|
ref_for: !0
|
|
898
|
-
}, g
|
|
899
|
-
s(
|
|
928
|
+
}, v(g)), Re({ _: 2 }, [
|
|
929
|
+
s(g.prop) ? {
|
|
900
930
|
name: "header",
|
|
901
|
-
fn: U((
|
|
902
|
-
te(f.$slots, `${
|
|
931
|
+
fn: U((h) => [
|
|
932
|
+
te(f.$slots, `${g.prop}-header`, ae({ ref_for: !0 }, h), void 0, !0)
|
|
903
933
|
]),
|
|
904
934
|
key: "0"
|
|
905
935
|
} : void 0,
|
|
906
|
-
|
|
936
|
+
I(g) ? {
|
|
907
937
|
name: "default",
|
|
908
|
-
fn: U((
|
|
909
|
-
i(
|
|
938
|
+
fn: U((h) => [
|
|
939
|
+
i(g.prop) ? te(f.$slots, `${g.prop}-data`, ae({
|
|
910
940
|
key: 0,
|
|
911
941
|
ref_for: !0
|
|
912
|
-
},
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
)), 1)) : (
|
|
942
|
+
}, h), void 0, !0) : g.dicData ? ($(), G("span", jo, oe(V(g.dicData, h.row[g.prop])), 1)) : g.formatter ? ($(), G("span", Ao, oe(g.formatter(
|
|
943
|
+
h.row,
|
|
944
|
+
h.column,
|
|
945
|
+
h.row[g.prop],
|
|
946
|
+
h.$index
|
|
947
|
+
)), 1)) : ($(), G("span", Ro, oe(h.row[g.prop]), 1))
|
|
918
948
|
]),
|
|
919
949
|
key: "1"
|
|
920
950
|
} : void 0
|
|
921
951
|
]), 1040, ["prop", "label", "formatter"]))), 128)),
|
|
922
|
-
c.value.menu ? (
|
|
952
|
+
c.value.menu ? ($(), H(M, {
|
|
923
953
|
key: 2,
|
|
924
954
|
label: c.value.menuLabel ?? J(Z)("common.操作"),
|
|
925
955
|
width: c.value.menuWidth,
|
|
926
956
|
"min-width": c.value.menuMinWidth,
|
|
927
957
|
align: c.value.menuAlign ?? "center",
|
|
928
|
-
fixed:
|
|
958
|
+
fixed: a.value
|
|
929
959
|
}, {
|
|
930
|
-
default: U((
|
|
931
|
-
te(f.$slots, "menu", Oe(Be(
|
|
960
|
+
default: U((g) => [
|
|
961
|
+
te(f.$slots, "menu", Oe(Be(g)), void 0, !0)
|
|
932
962
|
]),
|
|
933
963
|
_: 3
|
|
934
964
|
}, 8, ["label", "width", "min-width", "align", "fixed"])) : fe("", !0)
|
|
@@ -937,7 +967,7 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
937
967
|
}, 16, ["data", "row-key", "empty-text"]);
|
|
938
968
|
};
|
|
939
969
|
}
|
|
940
|
-
}), No = /* @__PURE__ */ be(zo, [["__scopeId", "data-v-
|
|
970
|
+
}), No = /* @__PURE__ */ be(zo, [["__scopeId", "data-v-cc0e0da1"]]), xo = { class: "jt-pagination" }, qo = { class: "jt-pagination__count" }, Go = /* @__PURE__ */ pe({
|
|
941
971
|
name: "JtPagination",
|
|
942
972
|
__name: "JtPagination",
|
|
943
973
|
props: {
|
|
@@ -948,25 +978,25 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
948
978
|
},
|
|
949
979
|
emits: ["update:currentPage", "update:pageSize", "current-change", "page-change", "size-change"],
|
|
950
980
|
setup(e, { emit: t }) {
|
|
951
|
-
const n = e, o = O(() => n.option ?? {}),
|
|
952
|
-
function c(
|
|
953
|
-
|
|
981
|
+
const n = e, o = O(() => n.option ?? {}), l = t;
|
|
982
|
+
function c(r) {
|
|
983
|
+
l("current-change", r), l("page-change", r);
|
|
954
984
|
}
|
|
955
|
-
return (
|
|
985
|
+
return (r, a) => {
|
|
956
986
|
const s = oo;
|
|
957
|
-
return
|
|
987
|
+
return $(), G("div", xo, [
|
|
958
988
|
Ie(s, {
|
|
959
|
-
"current-page":
|
|
960
|
-
"page-size":
|
|
989
|
+
"current-page": r.currentPage,
|
|
990
|
+
"page-size": r.pageSize,
|
|
961
991
|
"page-sizes": o.value.pageSizes ?? [10, 20, 50, 100],
|
|
962
|
-
total:
|
|
992
|
+
total: r.total,
|
|
963
993
|
layout: o.value.paginationLayout ?? "sizes, prev, pager, next, jumper",
|
|
964
|
-
"onUpdate:currentPage":
|
|
965
|
-
"onUpdate:pageSize":
|
|
994
|
+
"onUpdate:currentPage": a[0] || (a[0] = (i) => r.$emit("update:currentPage", i)),
|
|
995
|
+
"onUpdate:pageSize": a[1] || (a[1] = (i) => r.$emit("update:pageSize", i)),
|
|
966
996
|
onCurrentChange: c,
|
|
967
|
-
onSizeChange:
|
|
997
|
+
onSizeChange: a[2] || (a[2] = (i) => r.$emit("size-change", i))
|
|
968
998
|
}, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout"]),
|
|
969
|
-
ne("span", qo, oe(J(Z)("common.共")) + oe(
|
|
999
|
+
ne("span", qo, oe(J(Z)("common.共")) + oe(r.total) + oe(J(Z)("common.条记录")), 1)
|
|
970
1000
|
]);
|
|
971
1001
|
};
|
|
972
1002
|
}
|
|
@@ -994,57 +1024,57 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
994
1024
|
}),
|
|
995
1025
|
emits: /* @__PURE__ */ Ft(["search", "reset", "page-change", "size-change"], ["update:currentPage", "update:pageSize", "update:searchModel"]),
|
|
996
1026
|
setup(e, { expose: t, emit: n }) {
|
|
997
|
-
const o = e,
|
|
998
|
-
() =>
|
|
1027
|
+
const o = e, l = n, c = vt(e, "currentPage"), r = vt(e, "pageSize"), a = vt(e, "searchModel"), s = Le(), i = ge(), v = ge(), S = O(() => o.option), I = O(() => S.value.searchShow !== !1), L = O(
|
|
1028
|
+
() => S.value.paginationShow !== !1
|
|
999
1029
|
), V = O(
|
|
1000
1030
|
() => o.columns.filter((y) => y.search && !!s[`${y.prop}-search`])
|
|
1001
1031
|
), f = O(
|
|
1002
1032
|
() => o.columns.filter((y) => !y.hide && !!s[`${y.prop}-header`])
|
|
1003
|
-
),
|
|
1033
|
+
), _ = O(
|
|
1004
1034
|
() => o.columns.filter((y) => !y.hide && !!s[`${y.prop}-data`])
|
|
1005
1035
|
);
|
|
1006
|
-
function
|
|
1036
|
+
function M() {
|
|
1007
1037
|
const y = {};
|
|
1008
1038
|
return o.columns.forEach((A) => {
|
|
1009
1039
|
A.search && (y[A.prop] = void 0);
|
|
1010
1040
|
}), y;
|
|
1011
1041
|
}
|
|
1012
1042
|
function z() {
|
|
1013
|
-
|
|
1043
|
+
l("search", { ...a.value });
|
|
1014
1044
|
}
|
|
1015
|
-
function
|
|
1016
|
-
|
|
1045
|
+
function g() {
|
|
1046
|
+
a.value = M(), l("reset");
|
|
1017
1047
|
}
|
|
1018
|
-
function
|
|
1019
|
-
|
|
1048
|
+
function h() {
|
|
1049
|
+
v.value?.searchLoading();
|
|
1020
1050
|
}
|
|
1021
1051
|
function F() {
|
|
1022
|
-
|
|
1052
|
+
v.value?.searchDone();
|
|
1023
1053
|
}
|
|
1024
1054
|
return t({
|
|
1025
1055
|
/** 获取内部 el-table 实例 */
|
|
1026
1056
|
tableRef: O(() => i.value?.tableRef),
|
|
1027
1057
|
/** 获取内部筛选条实例 */
|
|
1028
|
-
filterBarRef:
|
|
1058
|
+
filterBarRef: v,
|
|
1029
1059
|
/** 开启筛选表单禁用。 */
|
|
1030
|
-
searchLoading:
|
|
1060
|
+
searchLoading: h,
|
|
1031
1061
|
/** 关闭筛选表单禁用。 */
|
|
1032
1062
|
searchDone: F
|
|
1033
1063
|
}), (y, A) => {
|
|
1034
1064
|
const b = ro;
|
|
1035
|
-
return
|
|
1065
|
+
return $(), G("div", Yo, [
|
|
1036
1066
|
te(y.$slots, "header", {}, void 0, !0),
|
|
1037
1067
|
ne("div", Uo, [
|
|
1038
|
-
|
|
1068
|
+
I.value ? ($(), H(Vo, {
|
|
1039
1069
|
key: 0,
|
|
1040
1070
|
ref_key: "filterBarRef",
|
|
1041
|
-
ref:
|
|
1042
|
-
modelValue:
|
|
1043
|
-
"onUpdate:modelValue": A[0] || (A[0] = (j) =>
|
|
1071
|
+
ref: v,
|
|
1072
|
+
modelValue: a.value,
|
|
1073
|
+
"onUpdate:modelValue": A[0] || (A[0] = (j) => a.value = j),
|
|
1044
1074
|
columns: y.columns,
|
|
1045
|
-
option:
|
|
1075
|
+
option: S.value,
|
|
1046
1076
|
onSearch: z,
|
|
1047
|
-
onReset:
|
|
1077
|
+
onReset: g
|
|
1048
1078
|
}, Re({ _: 2 }, [
|
|
1049
1079
|
ye(V.value, (j) => ({
|
|
1050
1080
|
name: `${j.prop}-search`,
|
|
@@ -1056,15 +1086,15 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1056
1086
|
]),
|
|
1057
1087
|
ne("div", Ho, [
|
|
1058
1088
|
ne("div", Jo, [
|
|
1059
|
-
J(s).toolbar ? (
|
|
1089
|
+
J(s).toolbar ? ($(), G("div", Wo, [
|
|
1060
1090
|
te(y.$slots, "toolbar", {}, void 0, !0)
|
|
1061
1091
|
])) : fe("", !0),
|
|
1062
|
-
Qn((
|
|
1092
|
+
Qn(($(), H(No, {
|
|
1063
1093
|
ref_key: "jtTableRef",
|
|
1064
1094
|
ref: i,
|
|
1065
1095
|
data: y.data,
|
|
1066
1096
|
columns: y.columns,
|
|
1067
|
-
option:
|
|
1097
|
+
option: S.value,
|
|
1068
1098
|
"table-events": y.tableEvents
|
|
1069
1099
|
}, Re({ _: 2 }, [
|
|
1070
1100
|
ye(f.value, (j) => ({
|
|
@@ -1073,13 +1103,13 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1073
1103
|
te(y.$slots, `${j.prop}-header`, Oe(Be(C)), void 0, !0)
|
|
1074
1104
|
])
|
|
1075
1105
|
})),
|
|
1076
|
-
ye(
|
|
1106
|
+
ye(_.value, (j) => ({
|
|
1077
1107
|
name: `${j.prop}-data`,
|
|
1078
1108
|
fn: U((C) => [
|
|
1079
1109
|
te(y.$slots, `${j.prop}-data`, Oe(Be(C)), void 0, !0)
|
|
1080
1110
|
])
|
|
1081
1111
|
})),
|
|
1082
|
-
|
|
1112
|
+
S.value.menu ? {
|
|
1083
1113
|
name: "menu",
|
|
1084
1114
|
fn: U((j) => [
|
|
1085
1115
|
te(y.$slots, "menu", Oe(Be(j)), void 0, !0)
|
|
@@ -1087,17 +1117,17 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1087
1117
|
key: "0"
|
|
1088
1118
|
} : void 0
|
|
1089
1119
|
]), 1032, ["data", "columns", "option", "table-events"])), [
|
|
1090
|
-
[b,
|
|
1120
|
+
[b, S.value.loading]
|
|
1091
1121
|
])
|
|
1092
1122
|
]),
|
|
1093
|
-
L.value ? (
|
|
1123
|
+
L.value ? ($(), H(Ko, {
|
|
1094
1124
|
key: 0,
|
|
1095
1125
|
"current-page": c.value,
|
|
1096
1126
|
"onUpdate:currentPage": A[1] || (A[1] = (j) => c.value = j),
|
|
1097
|
-
"page-size":
|
|
1098
|
-
"onUpdate:pageSize": A[2] || (A[2] = (j) =>
|
|
1127
|
+
"page-size": r.value,
|
|
1128
|
+
"onUpdate:pageSize": A[2] || (A[2] = (j) => r.value = j),
|
|
1099
1129
|
total: y.total,
|
|
1100
|
-
option:
|
|
1130
|
+
option: S.value,
|
|
1101
1131
|
onPageChange: A[3] || (A[3] = (j) => y.$emit("page-change", j)),
|
|
1102
1132
|
onSizeChange: A[4] || (A[4] = (j) => y.$emit("size-change", j))
|
|
1103
1133
|
}, null, 8, ["current-page", "page-size", "total", "option"])) : fe("", !0)
|
|
@@ -1118,21 +1148,21 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1118
1148
|
},
|
|
1119
1149
|
emits: ["operate-click"],
|
|
1120
1150
|
setup(e, { emit: t }) {
|
|
1121
|
-
const n = e, o = t,
|
|
1122
|
-
function a
|
|
1123
|
-
|
|
1151
|
+
const n = e, o = t, l = Le(), c = O(() => n.operates.length > 0 || !!l.operates);
|
|
1152
|
+
function r(a, s) {
|
|
1153
|
+
a.onClick?.(a, s), o("operate-click", a, s);
|
|
1124
1154
|
}
|
|
1125
|
-
return (
|
|
1126
|
-
class: ["jt-page-header", `jt-page-header--${
|
|
1127
|
-
},
|
|
1155
|
+
return (a, s) => ($(), G("div", ae({
|
|
1156
|
+
class: ["jt-page-header", `jt-page-header--${a.type}`]
|
|
1157
|
+
}, a.$attrs), [
|
|
1128
1158
|
ne("div", Qo, [
|
|
1129
|
-
te(
|
|
1130
|
-
|
|
1159
|
+
te(a.$slots, "title", {}, () => [
|
|
1160
|
+
a.title ? ($(), G("span", Xo, oe(a.title), 1)) : fe("", !0)
|
|
1131
1161
|
], !0)
|
|
1132
1162
|
]),
|
|
1133
|
-
c.value ? (
|
|
1134
|
-
te(
|
|
1135
|
-
(
|
|
1163
|
+
c.value ? ($(), G("div", er, [
|
|
1164
|
+
te(a.$slots, "operates", { operates: a.operates }, () => [
|
|
1165
|
+
($(!0), G(Se, null, ye(a.operates, (i) => ($(), H(J(rt), ae({
|
|
1136
1166
|
key: i.key ?? i.label,
|
|
1137
1167
|
ref_for: !0
|
|
1138
1168
|
}, i.buttonProps, {
|
|
@@ -1143,7 +1173,7 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1143
1173
|
text: i.text,
|
|
1144
1174
|
link: i.link,
|
|
1145
1175
|
icon: i.icon,
|
|
1146
|
-
onClick: (
|
|
1176
|
+
onClick: (v) => r(i, v)
|
|
1147
1177
|
}), {
|
|
1148
1178
|
default: U(() => [
|
|
1149
1179
|
ne("span", null, oe(i.label), 1)
|
|
@@ -1158,17 +1188,17 @@ const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1158
1188
|
function nr(e, t) {
|
|
1159
1189
|
t = t || (() => "default-use-once-sync");
|
|
1160
1190
|
const n = /* @__PURE__ */ new Map();
|
|
1161
|
-
async function o(...
|
|
1162
|
-
const c = t(...
|
|
1191
|
+
async function o(...l) {
|
|
1192
|
+
const c = t(...l);
|
|
1163
1193
|
if (n.get(c))
|
|
1164
1194
|
return n.get(c);
|
|
1165
1195
|
try {
|
|
1166
|
-
const
|
|
1167
|
-
throw
|
|
1196
|
+
const r = e(...l).then((a) => a).catch((a) => {
|
|
1197
|
+
throw a;
|
|
1168
1198
|
});
|
|
1169
|
-
return n.set(c,
|
|
1170
|
-
} catch (
|
|
1171
|
-
throw n.set(c, null),
|
|
1199
|
+
return n.set(c, r), r;
|
|
1200
|
+
} catch (r) {
|
|
1201
|
+
throw n.set(c, null), r;
|
|
1172
1202
|
}
|
|
1173
1203
|
}
|
|
1174
1204
|
return o.bind(e);
|
|
@@ -1176,13 +1206,13 @@ function nr(e, t) {
|
|
|
1176
1206
|
function ln(e, t) {
|
|
1177
1207
|
t = t || (() => "default-use-queue-sync");
|
|
1178
1208
|
const n = /* @__PURE__ */ new Map();
|
|
1179
|
-
async function o(...
|
|
1180
|
-
const c = t(...
|
|
1181
|
-
return n.set(c,
|
|
1182
|
-
e(...
|
|
1183
|
-
n.get(c) ===
|
|
1209
|
+
async function o(...l) {
|
|
1210
|
+
const c = t(...l), r = Symbol("single");
|
|
1211
|
+
return n.set(c, r), new Promise((a, s) => {
|
|
1212
|
+
e(...l).then((i) => {
|
|
1213
|
+
n.get(c) === r && a(i);
|
|
1184
1214
|
}).catch((i) => {
|
|
1185
|
-
n.get(c) ===
|
|
1215
|
+
n.get(c) === r && s(i);
|
|
1186
1216
|
});
|
|
1187
1217
|
});
|
|
1188
1218
|
}
|
|
@@ -1197,23 +1227,23 @@ var cn = { exports: {} };
|
|
|
1197
1227
|
(function(n, o) {
|
|
1198
1228
|
e.exports = o();
|
|
1199
1229
|
})(it, function() {
|
|
1200
|
-
var n = 1e3, o = 6e4,
|
|
1230
|
+
var n = 1e3, o = 6e4, l = 36e5, c = "millisecond", r = "second", a = "minute", s = "hour", i = "day", v = "week", S = "month", I = "quarter", L = "year", V = "date", f = "Invalid Date", _ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, M = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, z = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(R) {
|
|
1201
1231
|
var B = ["th", "st", "nd", "rd"], E = R % 100;
|
|
1202
1232
|
return "[" + R + (B[(E - 20) % 10] || B[E] || B[0]) + "]";
|
|
1203
|
-
} },
|
|
1233
|
+
} }, g = function(R, B, E) {
|
|
1204
1234
|
var d = String(R);
|
|
1205
1235
|
return !d || d.length >= B ? R : "" + Array(B + 1 - d.length).join(E) + R;
|
|
1206
|
-
},
|
|
1236
|
+
}, h = { s: g, z: function(R) {
|
|
1207
1237
|
var B = -R.utcOffset(), E = Math.abs(B), d = Math.floor(E / 60), u = E % 60;
|
|
1208
|
-
return (B <= 0 ? "+" : "-") +
|
|
1238
|
+
return (B <= 0 ? "+" : "-") + g(d, 2, "0") + ":" + g(u, 2, "0");
|
|
1209
1239
|
}, m: function R(B, E) {
|
|
1210
1240
|
if (B.date() < E.date()) return -R(E, B);
|
|
1211
|
-
var d = 12 * (E.year() - B.year()) + (E.month() - B.month()), u = B.clone().add(d,
|
|
1212
|
-
return +(-(d + (E - u) / (
|
|
1241
|
+
var d = 12 * (E.year() - B.year()) + (E.month() - B.month()), u = B.clone().add(d, S), w = E - u < 0, D = B.clone().add(d + (w ? -1 : 1), S);
|
|
1242
|
+
return +(-(d + (E - u) / (w ? u - D : D - u)) || 0);
|
|
1213
1243
|
}, a: function(R) {
|
|
1214
1244
|
return R < 0 ? Math.ceil(R) || 0 : Math.floor(R);
|
|
1215
1245
|
}, p: function(R) {
|
|
1216
|
-
return { M:
|
|
1246
|
+
return { M: S, y: L, w: v, d: i, D: V, h: s, m: a, s: r, ms: c, Q: I }[R] || String(R || "").toLowerCase().replace(/s$/, "");
|
|
1217
1247
|
}, u: function(R) {
|
|
1218
1248
|
return R === void 0;
|
|
1219
1249
|
} }, F = "en", y = {};
|
|
@@ -1224,8 +1254,8 @@ var cn = { exports: {} };
|
|
|
1224
1254
|
var u;
|
|
1225
1255
|
if (!B) return F;
|
|
1226
1256
|
if (typeof B == "string") {
|
|
1227
|
-
var
|
|
1228
|
-
y[
|
|
1257
|
+
var w = B.toLowerCase();
|
|
1258
|
+
y[w] && (u = w), E && (y[w] = E, u = w);
|
|
1229
1259
|
var D = B.split("-");
|
|
1230
1260
|
if (!u && D.length > 1) return R(D[0]);
|
|
1231
1261
|
} else {
|
|
@@ -1237,7 +1267,7 @@ var cn = { exports: {} };
|
|
|
1237
1267
|
if (b(R)) return R.clone();
|
|
1238
1268
|
var E = typeof B == "object" ? B : {};
|
|
1239
1269
|
return E.date = R, E.args = arguments, new re(E);
|
|
1240
|
-
}, N =
|
|
1270
|
+
}, N = h;
|
|
1241
1271
|
N.l = j, N.i = b, N.w = function(R, B) {
|
|
1242
1272
|
return C(R, { locale: B.$L, utc: B.$u, x: B.$x, $offset: B.$offset });
|
|
1243
1273
|
};
|
|
@@ -1248,15 +1278,15 @@ var cn = { exports: {} };
|
|
|
1248
1278
|
var B = R.prototype;
|
|
1249
1279
|
return B.parse = function(E) {
|
|
1250
1280
|
this.$d = function(d) {
|
|
1251
|
-
var u = d.date,
|
|
1281
|
+
var u = d.date, w = d.utc;
|
|
1252
1282
|
if (u === null) return /* @__PURE__ */ new Date(NaN);
|
|
1253
1283
|
if (N.u(u)) return /* @__PURE__ */ new Date();
|
|
1254
1284
|
if (u instanceof Date) return new Date(u);
|
|
1255
1285
|
if (typeof u == "string" && !/Z$/i.test(u)) {
|
|
1256
|
-
var D = u.match(
|
|
1286
|
+
var D = u.match(_);
|
|
1257
1287
|
if (D) {
|
|
1258
1288
|
var P = D[2] - 1 || 0, x = (D[7] || "0").substring(0, 3);
|
|
1259
|
-
return
|
|
1289
|
+
return w ? new Date(Date.UTC(D[1], P, D[3] || 1, D[4] || 0, D[5] || 0, D[6] || 0, x)) : new Date(D[1], P, D[3] || 1, D[4] || 0, D[5] || 0, D[6] || 0, x);
|
|
1260
1290
|
}
|
|
1261
1291
|
}
|
|
1262
1292
|
return new Date(u);
|
|
@@ -1282,37 +1312,37 @@ var cn = { exports: {} };
|
|
|
1282
1312
|
}, B.valueOf = function() {
|
|
1283
1313
|
return this.$d.getTime();
|
|
1284
1314
|
}, B.startOf = function(E, d) {
|
|
1285
|
-
var u = this,
|
|
1315
|
+
var u = this, w = !!N.u(d) || d, D = N.p(E), P = function(de, me) {
|
|
1286
1316
|
var we = N.w(u.$u ? Date.UTC(u.$y, me, de) : new Date(u.$y, me, de), u);
|
|
1287
|
-
return
|
|
1317
|
+
return w ? we : we.endOf(i);
|
|
1288
1318
|
}, x = function(de, me) {
|
|
1289
|
-
return N.w(u.toDate()[de].apply(u.toDate("s"), (
|
|
1290
|
-
}, K = this.$W, q = this.$M, Q = this.$D,
|
|
1319
|
+
return N.w(u.toDate()[de].apply(u.toDate("s"), (w ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(me)), u);
|
|
1320
|
+
}, K = this.$W, q = this.$M, Q = this.$D, T = "set" + (this.$u ? "UTC" : "");
|
|
1291
1321
|
switch (D) {
|
|
1292
1322
|
case L:
|
|
1293
|
-
return
|
|
1294
|
-
case
|
|
1295
|
-
return
|
|
1296
|
-
case
|
|
1323
|
+
return w ? P(1, 0) : P(31, 11);
|
|
1324
|
+
case S:
|
|
1325
|
+
return w ? P(1, q) : P(0, q + 1);
|
|
1326
|
+
case v:
|
|
1297
1327
|
var X = this.$locale().weekStart || 0, ue = (K < X ? K + 7 : K) - X;
|
|
1298
|
-
return P(
|
|
1328
|
+
return P(w ? Q - ue : Q + (6 - ue), q);
|
|
1299
1329
|
case i:
|
|
1300
1330
|
case V:
|
|
1301
|
-
return x(
|
|
1331
|
+
return x(T + "Hours", 0);
|
|
1302
1332
|
case s:
|
|
1303
|
-
return x(
|
|
1304
|
-
case l:
|
|
1305
|
-
return x(M + "Seconds", 2);
|
|
1333
|
+
return x(T + "Minutes", 1);
|
|
1306
1334
|
case a:
|
|
1307
|
-
return x(
|
|
1335
|
+
return x(T + "Seconds", 2);
|
|
1336
|
+
case r:
|
|
1337
|
+
return x(T + "Milliseconds", 3);
|
|
1308
1338
|
default:
|
|
1309
1339
|
return this.clone();
|
|
1310
1340
|
}
|
|
1311
1341
|
}, B.endOf = function(E) {
|
|
1312
1342
|
return this.startOf(E, !1);
|
|
1313
1343
|
}, B.$set = function(E, d) {
|
|
1314
|
-
var u,
|
|
1315
|
-
if (
|
|
1344
|
+
var u, w = N.p(E), D = "set" + (this.$u ? "UTC" : ""), P = (u = {}, u[i] = D + "Date", u[V] = D + "Date", u[S] = D + "Month", u[L] = D + "FullYear", u[s] = D + "Hours", u[a] = D + "Minutes", u[r] = D + "Seconds", u[c] = D + "Milliseconds", u)[w], x = w === i ? this.$D + (d - this.$W) : d;
|
|
1345
|
+
if (w === S || w === L) {
|
|
1316
1346
|
var K = this.clone().set(V, 1);
|
|
1317
1347
|
K.$d[P](x), K.init(), this.$d = K.set(V, Math.min(this.$D, K.daysInMonth())).$d;
|
|
1318
1348
|
} else P && this.$d[P](x);
|
|
@@ -1322,32 +1352,32 @@ var cn = { exports: {} };
|
|
|
1322
1352
|
}, B.get = function(E) {
|
|
1323
1353
|
return this[N.p(E)]();
|
|
1324
1354
|
}, B.add = function(E, d) {
|
|
1325
|
-
var u,
|
|
1355
|
+
var u, w = this;
|
|
1326
1356
|
E = Number(E);
|
|
1327
1357
|
var D = N.p(d), P = function(q) {
|
|
1328
|
-
var Q = C(
|
|
1329
|
-
return N.w(Q.date(Q.date() + Math.round(q * E)),
|
|
1358
|
+
var Q = C(w);
|
|
1359
|
+
return N.w(Q.date(Q.date() + Math.round(q * E)), w);
|
|
1330
1360
|
};
|
|
1331
|
-
if (D ===
|
|
1361
|
+
if (D === S) return this.set(S, this.$M + E);
|
|
1332
1362
|
if (D === L) return this.set(L, this.$y + E);
|
|
1333
1363
|
if (D === i) return P(1);
|
|
1334
|
-
if (D ===
|
|
1335
|
-
var x = (u = {}, u[
|
|
1364
|
+
if (D === v) return P(7);
|
|
1365
|
+
var x = (u = {}, u[a] = o, u[s] = l, u[r] = n, u)[D] || 1, K = this.$d.getTime() + E * x;
|
|
1336
1366
|
return N.w(K, this);
|
|
1337
1367
|
}, B.subtract = function(E, d) {
|
|
1338
1368
|
return this.add(-1 * E, d);
|
|
1339
1369
|
}, B.format = function(E) {
|
|
1340
1370
|
var d = this, u = this.$locale();
|
|
1341
1371
|
if (!this.isValid()) return u.invalidDate || f;
|
|
1342
|
-
var
|
|
1343
|
-
return me && (me[we] || me(d,
|
|
1372
|
+
var w = E || "YYYY-MM-DDTHH:mm:ssZ", D = N.z(this), P = this.$H, x = this.$m, K = this.$M, q = u.weekdays, Q = u.months, T = u.meridiem, X = function(me, we, De, $e) {
|
|
1373
|
+
return me && (me[we] || me(d, w)) || De[we].slice(0, $e);
|
|
1344
1374
|
}, ue = function(me) {
|
|
1345
1375
|
return N.s(P % 12 || 12, me, "0");
|
|
1346
|
-
}, de =
|
|
1376
|
+
}, de = T || function(me, we, De) {
|
|
1347
1377
|
var $e = me < 12 ? "AM" : "PM";
|
|
1348
1378
|
return De ? $e.toLowerCase() : $e;
|
|
1349
1379
|
};
|
|
1350
|
-
return
|
|
1380
|
+
return w.replace(M, function(me, we) {
|
|
1351
1381
|
return we || function(De) {
|
|
1352
1382
|
switch (De) {
|
|
1353
1383
|
case "YY":
|
|
@@ -1405,46 +1435,46 @@ var cn = { exports: {} };
|
|
|
1405
1435
|
}, B.utcOffset = function() {
|
|
1406
1436
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1407
1437
|
}, B.diff = function(E, d, u) {
|
|
1408
|
-
var
|
|
1438
|
+
var w, D = this, P = N.p(d), x = C(E), K = (x.utcOffset() - this.utcOffset()) * o, q = this - x, Q = function() {
|
|
1409
1439
|
return N.m(D, x);
|
|
1410
1440
|
};
|
|
1411
1441
|
switch (P) {
|
|
1412
1442
|
case L:
|
|
1413
|
-
|
|
1443
|
+
w = Q() / 12;
|
|
1414
1444
|
break;
|
|
1415
|
-
case
|
|
1416
|
-
|
|
1445
|
+
case S:
|
|
1446
|
+
w = Q();
|
|
1417
1447
|
break;
|
|
1418
|
-
case
|
|
1419
|
-
|
|
1448
|
+
case I:
|
|
1449
|
+
w = Q() / 3;
|
|
1420
1450
|
break;
|
|
1421
|
-
case
|
|
1422
|
-
|
|
1451
|
+
case v:
|
|
1452
|
+
w = (q - K) / 6048e5;
|
|
1423
1453
|
break;
|
|
1424
1454
|
case i:
|
|
1425
|
-
|
|
1455
|
+
w = (q - K) / 864e5;
|
|
1426
1456
|
break;
|
|
1427
1457
|
case s:
|
|
1428
|
-
|
|
1429
|
-
break;
|
|
1430
|
-
case l:
|
|
1431
|
-
_ = q / o;
|
|
1458
|
+
w = q / l;
|
|
1432
1459
|
break;
|
|
1433
1460
|
case a:
|
|
1434
|
-
|
|
1461
|
+
w = q / o;
|
|
1462
|
+
break;
|
|
1463
|
+
case r:
|
|
1464
|
+
w = q / n;
|
|
1435
1465
|
break;
|
|
1436
1466
|
default:
|
|
1437
|
-
|
|
1467
|
+
w = q;
|
|
1438
1468
|
}
|
|
1439
|
-
return u ?
|
|
1469
|
+
return u ? w : N.a(w);
|
|
1440
1470
|
}, B.daysInMonth = function() {
|
|
1441
|
-
return this.endOf(
|
|
1471
|
+
return this.endOf(S).$D;
|
|
1442
1472
|
}, B.$locale = function() {
|
|
1443
1473
|
return y[this.$L];
|
|
1444
1474
|
}, B.locale = function(E, d) {
|
|
1445
1475
|
if (!E) return this.$L;
|
|
1446
|
-
var u = this.clone(),
|
|
1447
|
-
return
|
|
1476
|
+
var u = this.clone(), w = j(E, d, !0);
|
|
1477
|
+
return w && (u.$L = w), u;
|
|
1448
1478
|
}, B.clone = function() {
|
|
1449
1479
|
return N.w(this.$d, this);
|
|
1450
1480
|
}, B.toDate = function() {
|
|
@@ -1457,7 +1487,7 @@ var cn = { exports: {} };
|
|
|
1457
1487
|
return this.$d.toUTCString();
|
|
1458
1488
|
}, R;
|
|
1459
1489
|
}(), le = re.prototype;
|
|
1460
|
-
return C.prototype = le, [["$ms", c], ["$s",
|
|
1490
|
+
return C.prototype = le, [["$ms", c], ["$s", r], ["$m", a], ["$H", s], ["$W", i], ["$M", S], ["$y", L], ["$D", V]].forEach(function(R) {
|
|
1461
1491
|
le[R[1]] = function(B) {
|
|
1462
1492
|
return this.$g(B, R[0], R[1]);
|
|
1463
1493
|
};
|
|
@@ -1475,104 +1505,104 @@ var un = { exports: {} };
|
|
|
1475
1505
|
(function(n, o) {
|
|
1476
1506
|
e.exports = o();
|
|
1477
1507
|
})(it, function() {
|
|
1478
|
-
var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, o = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,
|
|
1479
|
-
return (
|
|
1480
|
-
},
|
|
1481
|
-
return function(
|
|
1482
|
-
this[
|
|
1508
|
+
var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, o = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, l = /\d/, c = /\d\d/, r = /\d\d?/, a = /\d*[^-_:/,()\s\d]+/, s = {}, i = function(_) {
|
|
1509
|
+
return (_ = +_) + (_ > 68 ? 1900 : 2e3);
|
|
1510
|
+
}, v = function(_) {
|
|
1511
|
+
return function(M) {
|
|
1512
|
+
this[_] = +M;
|
|
1483
1513
|
};
|
|
1484
|
-
},
|
|
1485
|
-
(this.zone || (this.zone = {})).offset = function(
|
|
1486
|
-
if (!
|
|
1487
|
-
var z =
|
|
1488
|
-
return
|
|
1489
|
-
}(
|
|
1490
|
-
}],
|
|
1491
|
-
var
|
|
1492
|
-
return
|
|
1493
|
-
}, L = function(
|
|
1494
|
-
var z,
|
|
1495
|
-
if (
|
|
1496
|
-
for (var
|
|
1497
|
-
z =
|
|
1514
|
+
}, S = [/[+-]\d\d:?(\d\d)?|Z/, function(_) {
|
|
1515
|
+
(this.zone || (this.zone = {})).offset = function(M) {
|
|
1516
|
+
if (!M || M === "Z") return 0;
|
|
1517
|
+
var z = M.match(/([+-]|\d\d)/g), g = 60 * z[1] + (+z[2] || 0);
|
|
1518
|
+
return g === 0 ? 0 : z[0] === "+" ? -g : g;
|
|
1519
|
+
}(_);
|
|
1520
|
+
}], I = function(_) {
|
|
1521
|
+
var M = s[_];
|
|
1522
|
+
return M && (M.indexOf ? M : M.s.concat(M.f));
|
|
1523
|
+
}, L = function(_, M) {
|
|
1524
|
+
var z, g = s.meridiem;
|
|
1525
|
+
if (g) {
|
|
1526
|
+
for (var h = 1; h <= 24; h += 1) if (_.indexOf(g(h, 0, M)) > -1) {
|
|
1527
|
+
z = h > 12;
|
|
1498
1528
|
break;
|
|
1499
1529
|
}
|
|
1500
|
-
} else z =
|
|
1530
|
+
} else z = _ === (M ? "pm" : "PM");
|
|
1501
1531
|
return z;
|
|
1502
|
-
}, V = { A: [
|
|
1503
|
-
this.afternoon = L(
|
|
1504
|
-
}], a: [
|
|
1505
|
-
this.afternoon = L(
|
|
1506
|
-
}], Q: [
|
|
1507
|
-
this.month = 3 * (
|
|
1508
|
-
}], S: [
|
|
1509
|
-
this.milliseconds = 100 * +
|
|
1510
|
-
}], SS: [c, function(
|
|
1511
|
-
this.milliseconds = 10 * +
|
|
1512
|
-
}], SSS: [/\d{3}/, function(
|
|
1513
|
-
this.milliseconds = +
|
|
1514
|
-
}], s: [
|
|
1515
|
-
var
|
|
1516
|
-
if (this.day = z[0],
|
|
1517
|
-
}], w: [
|
|
1518
|
-
var
|
|
1519
|
-
return
|
|
1520
|
-
})).indexOf(
|
|
1532
|
+
}, V = { A: [a, function(_) {
|
|
1533
|
+
this.afternoon = L(_, !1);
|
|
1534
|
+
}], a: [a, function(_) {
|
|
1535
|
+
this.afternoon = L(_, !0);
|
|
1536
|
+
}], Q: [l, function(_) {
|
|
1537
|
+
this.month = 3 * (_ - 1) + 1;
|
|
1538
|
+
}], S: [l, function(_) {
|
|
1539
|
+
this.milliseconds = 100 * +_;
|
|
1540
|
+
}], SS: [c, function(_) {
|
|
1541
|
+
this.milliseconds = 10 * +_;
|
|
1542
|
+
}], SSS: [/\d{3}/, function(_) {
|
|
1543
|
+
this.milliseconds = +_;
|
|
1544
|
+
}], s: [r, v("seconds")], ss: [r, v("seconds")], m: [r, v("minutes")], mm: [r, v("minutes")], H: [r, v("hours")], h: [r, v("hours")], HH: [r, v("hours")], hh: [r, v("hours")], D: [r, v("day")], DD: [c, v("day")], Do: [a, function(_) {
|
|
1545
|
+
var M = s.ordinal, z = _.match(/\d+/);
|
|
1546
|
+
if (this.day = z[0], M) for (var g = 1; g <= 31; g += 1) M(g).replace(/\[|\]/g, "") === _ && (this.day = g);
|
|
1547
|
+
}], w: [r, v("week")], ww: [c, v("week")], M: [r, v("month")], MM: [c, v("month")], MMM: [a, function(_) {
|
|
1548
|
+
var M = I("months"), z = (I("monthsShort") || M.map(function(g) {
|
|
1549
|
+
return g.slice(0, 3);
|
|
1550
|
+
})).indexOf(_) + 1;
|
|
1521
1551
|
if (z < 1) throw new Error();
|
|
1522
1552
|
this.month = z % 12 || z;
|
|
1523
|
-
}], MMMM: [
|
|
1524
|
-
var
|
|
1525
|
-
if (
|
|
1526
|
-
this.month =
|
|
1527
|
-
}], Y: [/[+-]?\d+/,
|
|
1528
|
-
this.year = i(
|
|
1529
|
-
}], YYYY: [/\d{4}/,
|
|
1530
|
-
function f(
|
|
1531
|
-
var
|
|
1532
|
-
|
|
1533
|
-
for (var
|
|
1553
|
+
}], MMMM: [a, function(_) {
|
|
1554
|
+
var M = I("months").indexOf(_) + 1;
|
|
1555
|
+
if (M < 1) throw new Error();
|
|
1556
|
+
this.month = M % 12 || M;
|
|
1557
|
+
}], Y: [/[+-]?\d+/, v("year")], YY: [c, function(_) {
|
|
1558
|
+
this.year = i(_);
|
|
1559
|
+
}], YYYY: [/\d{4}/, v("year")], Z: S, ZZ: S };
|
|
1560
|
+
function f(_) {
|
|
1561
|
+
var M, z;
|
|
1562
|
+
M = _, z = s && s.formats;
|
|
1563
|
+
for (var g = (_ = M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(C, N, re) {
|
|
1534
1564
|
var le = re && re.toUpperCase();
|
|
1535
1565
|
return N || z[re] || n[re] || z[le].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(R, B, E) {
|
|
1536
1566
|
return B || E.slice(1);
|
|
1537
1567
|
});
|
|
1538
|
-
})).match(o),
|
|
1539
|
-
var y =
|
|
1540
|
-
|
|
1568
|
+
})).match(o), h = g.length, F = 0; F < h; F += 1) {
|
|
1569
|
+
var y = g[F], A = V[y], b = A && A[0], j = A && A[1];
|
|
1570
|
+
g[F] = j ? { regex: b, parser: j } : y.replace(/^\[|\]$/g, "");
|
|
1541
1571
|
}
|
|
1542
1572
|
return function(C) {
|
|
1543
|
-
for (var N = {}, re = 0, le = 0; re <
|
|
1544
|
-
var R =
|
|
1573
|
+
for (var N = {}, re = 0, le = 0; re < h; re += 1) {
|
|
1574
|
+
var R = g[re];
|
|
1545
1575
|
if (typeof R == "string") le += R.length;
|
|
1546
1576
|
else {
|
|
1547
1577
|
var B = R.regex, E = R.parser, d = C.slice(le), u = B.exec(d)[0];
|
|
1548
1578
|
E.call(N, u), C = C.replace(u, "");
|
|
1549
1579
|
}
|
|
1550
1580
|
}
|
|
1551
|
-
return function(
|
|
1552
|
-
var D =
|
|
1581
|
+
return function(w) {
|
|
1582
|
+
var D = w.afternoon;
|
|
1553
1583
|
if (D !== void 0) {
|
|
1554
|
-
var P =
|
|
1555
|
-
D ? P < 12 && (
|
|
1584
|
+
var P = w.hours;
|
|
1585
|
+
D ? P < 12 && (w.hours += 12) : P === 12 && (w.hours = 0), delete w.afternoon;
|
|
1556
1586
|
}
|
|
1557
1587
|
}(N), N;
|
|
1558
1588
|
};
|
|
1559
1589
|
}
|
|
1560
|
-
return function(
|
|
1561
|
-
z.p.customParseFormat = !0,
|
|
1562
|
-
var
|
|
1563
|
-
|
|
1590
|
+
return function(_, M, z) {
|
|
1591
|
+
z.p.customParseFormat = !0, _ && _.parseTwoDigitYear && (i = _.parseTwoDigitYear);
|
|
1592
|
+
var g = M.prototype, h = g.parse;
|
|
1593
|
+
g.parse = function(F) {
|
|
1564
1594
|
var y = F.date, A = F.utc, b = F.args;
|
|
1565
1595
|
this.$u = A;
|
|
1566
1596
|
var j = b[1];
|
|
1567
1597
|
if (typeof j == "string") {
|
|
1568
1598
|
var C = b[2] === !0, N = b[3] === !0, re = C || N, le = b[2];
|
|
1569
|
-
N && (le = b[2]), s = this.$locale(), !C && le && (s = z.Ls[le]), this.$d = function(d, u,
|
|
1599
|
+
N && (le = b[2]), s = this.$locale(), !C && le && (s = z.Ls[le]), this.$d = function(d, u, w, D) {
|
|
1570
1600
|
try {
|
|
1571
1601
|
if (["x", "X"].indexOf(u) > -1) return new Date((u === "X" ? 1e3 : 1) * d);
|
|
1572
|
-
var P = f(u)(d), x = P.year, K = P.month, q = P.day, Q = P.hours,
|
|
1602
|
+
var P = f(u)(d), x = P.year, K = P.month, q = P.day, Q = P.hours, T = P.minutes, X = P.seconds, ue = P.milliseconds, de = P.zone, me = P.week, we = /* @__PURE__ */ new Date(), De = q || (x || K ? 1 : we.getDate()), $e = x || we.getFullYear(), xe = 0;
|
|
1573
1603
|
x && !K || (xe = K > 0 ? K - 1 : we.getMonth());
|
|
1574
|
-
var qe, nt = Q || 0, Ge =
|
|
1575
|
-
return de ? new Date(Date.UTC($e, xe, De, nt, Ge, m, p + 60 * de.offset * 1e3)) :
|
|
1604
|
+
var qe, nt = Q || 0, Ge = T || 0, m = X || 0, p = ue || 0;
|
|
1605
|
+
return de ? new Date(Date.UTC($e, xe, De, nt, Ge, m, p + 60 * de.offset * 1e3)) : w ? new Date(Date.UTC($e, xe, De, nt, Ge, m, p)) : (qe = new Date($e, xe, De, nt, Ge, m, p), me && (qe = D(qe).week(me).toDate()), qe);
|
|
1576
1606
|
} catch {
|
|
1577
1607
|
return /* @__PURE__ */ new Date("");
|
|
1578
1608
|
}
|
|
@@ -1586,7 +1616,7 @@ var un = { exports: {} };
|
|
|
1586
1616
|
}
|
|
1587
1617
|
B === R && (this.$d = /* @__PURE__ */ new Date(""));
|
|
1588
1618
|
}
|
|
1589
|
-
else
|
|
1619
|
+
else h.call(this, F);
|
|
1590
1620
|
};
|
|
1591
1621
|
};
|
|
1592
1622
|
});
|
|
@@ -1599,57 +1629,57 @@ var dn = { exports: {} };
|
|
|
1599
1629
|
e.exports = o();
|
|
1600
1630
|
})(it, function() {
|
|
1601
1631
|
var n = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, o = {};
|
|
1602
|
-
return function(
|
|
1603
|
-
var
|
|
1632
|
+
return function(l, c, r) {
|
|
1633
|
+
var a, s = function(I, L, V) {
|
|
1604
1634
|
V === void 0 && (V = {});
|
|
1605
|
-
var f = new Date(
|
|
1635
|
+
var f = new Date(I), _ = function(M, z) {
|
|
1606
1636
|
z === void 0 && (z = {});
|
|
1607
|
-
var
|
|
1608
|
-
return F || (F = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone:
|
|
1637
|
+
var g = z.timeZoneName || "short", h = M + "|" + g, F = o[h];
|
|
1638
|
+
return F || (F = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: M, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: g }), o[h] = F), F;
|
|
1609
1639
|
}(L, V);
|
|
1610
|
-
return
|
|
1611
|
-
}, i = function(
|
|
1612
|
-
for (var V = s(
|
|
1613
|
-
var
|
|
1614
|
-
|
|
1640
|
+
return _.formatToParts(f);
|
|
1641
|
+
}, i = function(I, L) {
|
|
1642
|
+
for (var V = s(I, L), f = [], _ = 0; _ < V.length; _ += 1) {
|
|
1643
|
+
var M = V[_], z = M.type, g = M.value, h = n[z];
|
|
1644
|
+
h >= 0 && (f[h] = parseInt(g, 10));
|
|
1615
1645
|
}
|
|
1616
|
-
var F = f[3], y = F === 24 ? 0 : F, A = f[0] + "-" + f[1] + "-" + f[2] + " " + y + ":" + f[4] + ":" + f[5] + ":000", b =
|
|
1617
|
-
return (
|
|
1618
|
-
},
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
var V, f = this.utcOffset(),
|
|
1622
|
-
if (!Number(
|
|
1623
|
-
else if (V =
|
|
1624
|
-
var
|
|
1625
|
-
V = V.add(f -
|
|
1646
|
+
var F = f[3], y = F === 24 ? 0 : F, A = f[0] + "-" + f[1] + "-" + f[2] + " " + y + ":" + f[4] + ":" + f[5] + ":000", b = +I;
|
|
1647
|
+
return (r.utc(A).valueOf() - (b -= b % 1e3)) / 6e4;
|
|
1648
|
+
}, v = c.prototype;
|
|
1649
|
+
v.tz = function(I, L) {
|
|
1650
|
+
I === void 0 && (I = a);
|
|
1651
|
+
var V, f = this.utcOffset(), _ = this.toDate(), M = _.toLocaleString("en-US", { timeZone: I }), z = Math.round((_ - new Date(M)) / 1e3 / 60), g = 15 * -Math.round(_.getTimezoneOffset() / 15) - z;
|
|
1652
|
+
if (!Number(g)) V = this.utcOffset(0, L);
|
|
1653
|
+
else if (V = r(M, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(g, !0), L) {
|
|
1654
|
+
var h = V.utcOffset();
|
|
1655
|
+
V = V.add(f - h, "minute");
|
|
1626
1656
|
}
|
|
1627
|
-
return V.$x.$timezone =
|
|
1628
|
-
},
|
|
1629
|
-
var L = this.$x.$timezone ||
|
|
1657
|
+
return V.$x.$timezone = I, V;
|
|
1658
|
+
}, v.offsetName = function(I) {
|
|
1659
|
+
var L = this.$x.$timezone || r.tz.guess(), V = s(this.valueOf(), L, { timeZoneName: I }).find(function(f) {
|
|
1630
1660
|
return f.type.toLowerCase() === "timezonename";
|
|
1631
1661
|
});
|
|
1632
1662
|
return V && V.value;
|
|
1633
1663
|
};
|
|
1634
|
-
var
|
|
1635
|
-
|
|
1636
|
-
if (!this.$x || !this.$x.$timezone) return
|
|
1637
|
-
var V =
|
|
1638
|
-
return
|
|
1639
|
-
},
|
|
1640
|
-
var f = V && L,
|
|
1641
|
-
if (typeof
|
|
1664
|
+
var S = v.startOf;
|
|
1665
|
+
v.startOf = function(I, L) {
|
|
1666
|
+
if (!this.$x || !this.$x.$timezone) return S.call(this, I, L);
|
|
1667
|
+
var V = r(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
1668
|
+
return S.call(V, I, L).tz(this.$x.$timezone, !0);
|
|
1669
|
+
}, r.tz = function(I, L, V) {
|
|
1670
|
+
var f = V && L, _ = V || L || a, M = i(+r(), _);
|
|
1671
|
+
if (typeof I != "string") return r(I).tz(_);
|
|
1642
1672
|
var z = function(y, A, b) {
|
|
1643
1673
|
var j = y - 60 * A * 1e3, C = i(j, b);
|
|
1644
1674
|
if (A === C) return [j, A];
|
|
1645
1675
|
var N = i(j -= 60 * (C - A) * 1e3, b);
|
|
1646
1676
|
return C === N ? [j, C] : [y - 60 * Math.min(C, N) * 1e3, Math.max(C, N)];
|
|
1647
|
-
}(
|
|
1648
|
-
return F.$x.$timezone =
|
|
1649
|
-
},
|
|
1677
|
+
}(r.utc(I, f).valueOf(), M, _), g = z[0], h = z[1], F = r(g).utcOffset(h);
|
|
1678
|
+
return F.$x.$timezone = _, F;
|
|
1679
|
+
}, r.tz.guess = function() {
|
|
1650
1680
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1651
|
-
},
|
|
1652
|
-
|
|
1681
|
+
}, r.tz.setDefault = function(I) {
|
|
1682
|
+
a = I;
|
|
1653
1683
|
};
|
|
1654
1684
|
};
|
|
1655
1685
|
});
|
|
@@ -1661,51 +1691,51 @@ var fn = { exports: {} };
|
|
|
1661
1691
|
(function(n, o) {
|
|
1662
1692
|
e.exports = o();
|
|
1663
1693
|
})(it, function() {
|
|
1664
|
-
var n = "minute", o = /[+-]\d\d(?::?\d\d)?/g,
|
|
1665
|
-
return function(c,
|
|
1666
|
-
var s =
|
|
1667
|
-
|
|
1668
|
-
var
|
|
1669
|
-
return new
|
|
1694
|
+
var n = "minute", o = /[+-]\d\d(?::?\d\d)?/g, l = /([+-]|\d\d)/g;
|
|
1695
|
+
return function(c, r, a) {
|
|
1696
|
+
var s = r.prototype;
|
|
1697
|
+
a.utc = function(f) {
|
|
1698
|
+
var _ = { date: f, utc: !0, args: arguments };
|
|
1699
|
+
return new r(_);
|
|
1670
1700
|
}, s.utc = function(f) {
|
|
1671
|
-
var
|
|
1672
|
-
return f ?
|
|
1701
|
+
var _ = a(this.toDate(), { locale: this.$L, utc: !0 });
|
|
1702
|
+
return f ? _.add(this.utcOffset(), n) : _;
|
|
1673
1703
|
}, s.local = function() {
|
|
1674
|
-
return
|
|
1704
|
+
return a(this.toDate(), { locale: this.$L, utc: !1 });
|
|
1675
1705
|
};
|
|
1676
1706
|
var i = s.parse;
|
|
1677
1707
|
s.parse = function(f) {
|
|
1678
1708
|
f.utc && (this.$u = !0), this.$utils().u(f.$offset) || (this.$offset = f.$offset), i.call(this, f);
|
|
1679
1709
|
};
|
|
1680
|
-
var
|
|
1710
|
+
var v = s.init;
|
|
1681
1711
|
s.init = function() {
|
|
1682
1712
|
if (this.$u) {
|
|
1683
1713
|
var f = this.$d;
|
|
1684
1714
|
this.$y = f.getUTCFullYear(), this.$M = f.getUTCMonth(), this.$D = f.getUTCDate(), this.$W = f.getUTCDay(), this.$H = f.getUTCHours(), this.$m = f.getUTCMinutes(), this.$s = f.getUTCSeconds(), this.$ms = f.getUTCMilliseconds();
|
|
1685
|
-
} else
|
|
1715
|
+
} else v.call(this);
|
|
1686
1716
|
};
|
|
1687
|
-
var
|
|
1688
|
-
s.utcOffset = function(f,
|
|
1689
|
-
var
|
|
1690
|
-
if (
|
|
1717
|
+
var S = s.utcOffset;
|
|
1718
|
+
s.utcOffset = function(f, _) {
|
|
1719
|
+
var M = this.$utils().u;
|
|
1720
|
+
if (M(f)) return this.$u ? 0 : M(this.$offset) ? S.call(this) : this.$offset;
|
|
1691
1721
|
if (typeof f == "string" && (f = function(F) {
|
|
1692
1722
|
F === void 0 && (F = "");
|
|
1693
1723
|
var y = F.match(o);
|
|
1694
1724
|
if (!y) return null;
|
|
1695
|
-
var A = ("" + y[0]).match(
|
|
1725
|
+
var A = ("" + y[0]).match(l) || ["-", 0, 0], b = A[0], j = 60 * +A[1] + +A[2];
|
|
1696
1726
|
return j === 0 ? 0 : b === "+" ? j : -j;
|
|
1697
1727
|
}(f), f === null)) return this;
|
|
1698
1728
|
var z = Math.abs(f) <= 16 ? 60 * f : f;
|
|
1699
|
-
if (z === 0) return this.utc(
|
|
1700
|
-
var
|
|
1701
|
-
if (
|
|
1702
|
-
var
|
|
1703
|
-
return (
|
|
1729
|
+
if (z === 0) return this.utc(_);
|
|
1730
|
+
var g = this.clone();
|
|
1731
|
+
if (_) return g.$offset = z, g.$u = !1, g;
|
|
1732
|
+
var h = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
1733
|
+
return (g = this.local().add(z + h, n)).$offset = z, g.$x.$localOffset = h, g;
|
|
1704
1734
|
};
|
|
1705
|
-
var
|
|
1735
|
+
var I = s.format;
|
|
1706
1736
|
s.format = function(f) {
|
|
1707
|
-
var
|
|
1708
|
-
return
|
|
1737
|
+
var _ = f || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
1738
|
+
return I.call(this, _);
|
|
1709
1739
|
}, s.valueOf = function() {
|
|
1710
1740
|
var f = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
1711
1741
|
return this.$d.valueOf() - 6e4 * f;
|
|
@@ -1718,13 +1748,13 @@ var fn = { exports: {} };
|
|
|
1718
1748
|
};
|
|
1719
1749
|
var L = s.toDate;
|
|
1720
1750
|
s.toDate = function(f) {
|
|
1721
|
-
return f === "s" && this.$offset ?
|
|
1751
|
+
return f === "s" && this.$offset ? a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : L.call(this);
|
|
1722
1752
|
};
|
|
1723
1753
|
var V = s.diff;
|
|
1724
|
-
s.diff = function(f,
|
|
1725
|
-
if (f && this.$u === f.$u) return V.call(this, f,
|
|
1726
|
-
var z = this.local(),
|
|
1727
|
-
return V.call(z,
|
|
1754
|
+
s.diff = function(f, _, M) {
|
|
1755
|
+
if (f && this.$u === f.$u) return V.call(this, f, _, M);
|
|
1756
|
+
var z = this.local(), g = a(f).local();
|
|
1757
|
+
return V.call(z, g, _, M);
|
|
1728
1758
|
};
|
|
1729
1759
|
};
|
|
1730
1760
|
});
|
|
@@ -1778,7 +1808,7 @@ function kt(e) {
|
|
|
1778
1808
|
e.type || e.fieldType || e.frontInputType
|
|
1779
1809
|
) || jt(e.renderType) || "text";
|
|
1780
1810
|
}
|
|
1781
|
-
function
|
|
1811
|
+
function Mt(e) {
|
|
1782
1812
|
return At(
|
|
1783
1813
|
e.type || e.fieldType || e.frontInputType
|
|
1784
1814
|
) || At(e.renderType) || "text";
|
|
@@ -1816,7 +1846,7 @@ function pn(e) {
|
|
|
1816
1846
|
return typeof t.message == "string" && (typeof t.stack == "string" || t.name === "Error");
|
|
1817
1847
|
}
|
|
1818
1848
|
function mn(e, t, n = "-") {
|
|
1819
|
-
const o =
|
|
1849
|
+
const o = Mt(e);
|
|
1820
1850
|
return o === "empty" || _e(t) ? n : pn(t) ? (console.error("[globalInfo] field value render failed", t), n) : o === "select" ? Sr(e, t, n) : o === "switch" ? vn(t) ? Z("common.是") : Z("common.否") : o === "file" ? _r(t, n) : o === "multi-row" ? wr(t, n) : String(t);
|
|
1821
1851
|
}
|
|
1822
1852
|
function dt(e, t) {
|
|
@@ -1849,12 +1879,12 @@ function Ze(e, t) {
|
|
|
1849
1879
|
);
|
|
1850
1880
|
}
|
|
1851
1881
|
function ft(e, t, n, o = {}) {
|
|
1852
|
-
const
|
|
1882
|
+
const l = gr(o);
|
|
1853
1883
|
return e.filter((c) => c.visible ? !yr(
|
|
1854
1884
|
c,
|
|
1855
1885
|
t,
|
|
1856
1886
|
n,
|
|
1857
|
-
|
|
1887
|
+
l,
|
|
1858
1888
|
o.rows
|
|
1859
1889
|
) : !1);
|
|
1860
1890
|
}
|
|
@@ -1888,8 +1918,8 @@ function mr(e) {
|
|
|
1888
1918
|
}
|
|
1889
1919
|
function hn(e, t, n = "-") {
|
|
1890
1920
|
return !mr(e) || _e(t) ? [] : (Array.isArray(t) ? t : [t]).map(
|
|
1891
|
-
(
|
|
1892
|
-
).filter((
|
|
1921
|
+
(l, c) => vr(l, c, n)
|
|
1922
|
+
).filter((l) => !!l);
|
|
1893
1923
|
}
|
|
1894
1924
|
function vr(e, t, n) {
|
|
1895
1925
|
if (_e(e)) return null;
|
|
@@ -1910,31 +1940,31 @@ function vr(e, t, n) {
|
|
|
1910
1940
|
text: e.name || n
|
|
1911
1941
|
};
|
|
1912
1942
|
if (e && typeof e == "object") {
|
|
1913
|
-
const o = e,
|
|
1943
|
+
const o = e, l = hr(o, n), c = Fe(o.url);
|
|
1914
1944
|
if (c) {
|
|
1915
|
-
const
|
|
1916
|
-
return s && (
|
|
1945
|
+
const a = { url: c }, s = Fe(o.name), i = Fe(o.mimeType), v = Fe(o.extension);
|
|
1946
|
+
return s && (a.name = s), i && (a.mimeType = i), v && (a.extension = v), {
|
|
1917
1947
|
key: String(t),
|
|
1918
|
-
text:
|
|
1948
|
+
text: l,
|
|
1919
1949
|
action: {
|
|
1920
1950
|
type: "direct",
|
|
1921
|
-
options:
|
|
1951
|
+
options: a
|
|
1922
1952
|
}
|
|
1923
1953
|
};
|
|
1924
1954
|
}
|
|
1925
|
-
const
|
|
1926
|
-
return
|
|
1955
|
+
const r = Fe(o.fileId);
|
|
1956
|
+
return r ? {
|
|
1927
1957
|
key: String(t),
|
|
1928
|
-
text:
|
|
1958
|
+
text: l,
|
|
1929
1959
|
action: {
|
|
1930
1960
|
type: "params",
|
|
1931
1961
|
params: {
|
|
1932
|
-
fileId:
|
|
1962
|
+
fileId: r
|
|
1933
1963
|
}
|
|
1934
1964
|
}
|
|
1935
1965
|
} : {
|
|
1936
1966
|
key: String(t),
|
|
1937
|
-
text:
|
|
1967
|
+
text: l
|
|
1938
1968
|
};
|
|
1939
1969
|
}
|
|
1940
1970
|
return {
|
|
@@ -1959,22 +1989,22 @@ function At(e) {
|
|
|
1959
1989
|
function gr(e) {
|
|
1960
1990
|
return e.rows?.length ? e.rows : [e.values ?? {}];
|
|
1961
1991
|
}
|
|
1962
|
-
function yr(e, t, n, o,
|
|
1992
|
+
function yr(e, t, n, o, l) {
|
|
1963
1993
|
const c = n?.hiddenRule;
|
|
1964
|
-
return c ? o.some((
|
|
1994
|
+
return c ? o.some((r) => {
|
|
1965
1995
|
try {
|
|
1966
|
-
const
|
|
1996
|
+
const a = r[e.code];
|
|
1967
1997
|
return c({
|
|
1968
1998
|
field: e,
|
|
1969
1999
|
section: t,
|
|
1970
|
-
values:
|
|
1971
|
-
allValues:
|
|
1972
|
-
value:
|
|
1973
|
-
currentValue:
|
|
1974
|
-
rows:
|
|
2000
|
+
values: r,
|
|
2001
|
+
allValues: r,
|
|
2002
|
+
value: a,
|
|
2003
|
+
currentValue: a,
|
|
2004
|
+
rows: l
|
|
1975
2005
|
});
|
|
1976
|
-
} catch (
|
|
1977
|
-
return console.error("[globalInfo] hidden rule failed",
|
|
2006
|
+
} catch (a) {
|
|
2007
|
+
return console.error("[globalInfo] hidden rule failed", a), !1;
|
|
1978
2008
|
}
|
|
1979
2009
|
}) : !1;
|
|
1980
2010
|
}
|
|
@@ -1999,13 +2029,13 @@ function yn(e) {
|
|
|
1999
2029
|
function Sr(e, t, n) {
|
|
2000
2030
|
const o = pt(e);
|
|
2001
2031
|
if (Array.isArray(t) || o) {
|
|
2002
|
-
const
|
|
2003
|
-
return
|
|
2032
|
+
const l = dt(e, t).map((r) => Rt(e, r) || String(r ?? "").trim()).filter(Boolean), c = o ? "," : "、";
|
|
2033
|
+
return l.length > 0 ? l.join(c) : n;
|
|
2004
2034
|
}
|
|
2005
2035
|
return Rt(e, t) || String(t).trim() || n;
|
|
2006
2036
|
}
|
|
2007
2037
|
function pt(e) {
|
|
2008
|
-
return !!e.props?.multiple && (kt(e) === "select" ||
|
|
2038
|
+
return !!e.props?.multiple && (kt(e) === "select" || Mt(e) === "select");
|
|
2009
2039
|
}
|
|
2010
2040
|
function Rt(e, t) {
|
|
2011
2041
|
return e.options?.find(
|
|
@@ -2061,7 +2091,7 @@ function Ir(e = null) {
|
|
|
2061
2091
|
}
|
|
2062
2092
|
function Nt(e) {
|
|
2063
2093
|
const t = kn(e), n = Cn(t), o = Lr(t).flatMap(
|
|
2064
|
-
(
|
|
2094
|
+
(l) => $n(l, n)
|
|
2065
2095
|
);
|
|
2066
2096
|
return {
|
|
2067
2097
|
...Ir(e),
|
|
@@ -2077,18 +2107,18 @@ function Sn(e, t, n) {
|
|
|
2077
2107
|
});
|
|
2078
2108
|
}
|
|
2079
2109
|
function $r(e, t = {}, n = null) {
|
|
2080
|
-
const o = kn(e),
|
|
2081
|
-
c.map((
|
|
2110
|
+
const o = kn(e), l = Cn(o, t), c = Mr(o, t, n), r = Object.fromEntries(
|
|
2111
|
+
c.map((a) => [a.key, a])
|
|
2082
2112
|
);
|
|
2083
2113
|
return {
|
|
2084
|
-
scheme:
|
|
2114
|
+
scheme: l,
|
|
2085
2115
|
node: n,
|
|
2086
2116
|
topNodes: [],
|
|
2087
2117
|
treeNodes: [],
|
|
2088
2118
|
activeNode: n,
|
|
2089
2119
|
activeSection: c[0] ?? null,
|
|
2090
2120
|
sections: c,
|
|
2091
|
-
sectionMap:
|
|
2121
|
+
sectionMap: r,
|
|
2092
2122
|
raw: e
|
|
2093
2123
|
};
|
|
2094
2124
|
}
|
|
@@ -2098,14 +2128,14 @@ function Cr(e) {
|
|
|
2098
2128
|
function kr(e, t = {}) {
|
|
2099
2129
|
const n = e.renderType === "table" ? e.rows.map(
|
|
2100
2130
|
(s) => _t(wt(s))
|
|
2101
|
-
) : [_t(wt(e.model))], o = ce(e.operationInfo),
|
|
2131
|
+
) : [_t(wt(e.model))], o = ce(e.operationInfo), l = ce(o.editInfoSet), c = ce(l.params), r = ce(o.queryInfoSet), a = ce(r.params);
|
|
2102
2132
|
return {
|
|
2103
2133
|
...t,
|
|
2104
2134
|
infSchmId: t.infSchmId ?? se(e.raw.infSchmId),
|
|
2105
2135
|
emplid: t.emplid ?? se(e.raw.emplid),
|
|
2106
2136
|
// 保存优先使用接口出参里的信息集挂载 tagId,其次才回退到请求节点 tagId。
|
|
2107
2137
|
tagId: ee(
|
|
2108
|
-
e.tagId || c.tagId ||
|
|
2138
|
+
e.tagId || c.tagId || a.tagId || t.tagId || e.requestTagId
|
|
2109
2139
|
),
|
|
2110
2140
|
infSetId: t.infSetId ?? e.infSetId,
|
|
2111
2141
|
setId: t.setId ?? e.setId,
|
|
@@ -2130,59 +2160,59 @@ function is(e) {
|
|
|
2130
2160
|
return !!(t && typeof t == "object" && typeof t.key == "string" && typeof t.tagId == "string");
|
|
2131
2161
|
}
|
|
2132
2162
|
function wn(e) {
|
|
2133
|
-
const t =
|
|
2163
|
+
const t = Mn(e);
|
|
2134
2164
|
return (Array.isArray(t) ? t : Qe(ce(t), ["options", "list", "records", "data"])).map((o) => {
|
|
2135
|
-
const
|
|
2165
|
+
const l = ce(o), c = l.fieldvalue, r = c ?? l.value ?? l.code ?? l.emplid;
|
|
2136
2166
|
return {
|
|
2137
|
-
id:
|
|
2138
|
-
code: c ??
|
|
2167
|
+
id: l.id,
|
|
2168
|
+
code: c ?? l.value ?? l.code ?? l.emplid,
|
|
2139
2169
|
// fieldname 在 md-options 中是字段标识,不是用户可读文案;展示文案只接受明确的 label/descr/name。
|
|
2140
2170
|
label: ee(
|
|
2141
|
-
|
|
2171
|
+
l.label ?? l.descr ?? l.name
|
|
2142
2172
|
),
|
|
2143
|
-
labelDescr: se(
|
|
2144
|
-
name: se(
|
|
2145
|
-
value:
|
|
2173
|
+
labelDescr: se(l.labelDescr),
|
|
2174
|
+
name: se(l.name),
|
|
2175
|
+
value: r,
|
|
2146
2176
|
raw: o
|
|
2147
2177
|
};
|
|
2148
2178
|
});
|
|
2149
2179
|
}
|
|
2150
|
-
function
|
|
2180
|
+
function Mr(e, t, n) {
|
|
2151
2181
|
const o = Qe(e, ["sections", "sets", "list"]);
|
|
2152
2182
|
return o.length > 0 ? o.map(
|
|
2153
|
-
(
|
|
2183
|
+
(l) => xt(l, t, n, o.length === 1)
|
|
2154
2184
|
) : e.infSetMark || e.infSetFields || e.fields ? [xt(e, t, n, !0)] : [];
|
|
2155
2185
|
}
|
|
2156
2186
|
function xt(e, t, n, o) {
|
|
2157
|
-
const
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
), i = s[0] ? wt(s[0]) : In(
|
|
2162
|
-
|
|
2163
|
-
),
|
|
2187
|
+
const l = ce(e), c = Tr(l.infSetMark ?? l), r = Or(l.infSetFields ?? l.fields ?? []), a = Cr(c), s = Fr(
|
|
2188
|
+
l.infSetValues ?? l.rows ?? l.data,
|
|
2189
|
+
r,
|
|
2190
|
+
a
|
|
2191
|
+
), i = s[0] ? wt(s[0]) : In(r), v = ce(l.tag), S = ee(
|
|
2192
|
+
l.tagId ?? l.infTagId ?? v.tagId ?? v.infTagId ?? c.raw.tagId ?? c.raw.infTagId
|
|
2193
|
+
), I = ee(t.tagId ?? n?.tagId), L = ee(n?.key), V = o ? t.infSetId ?? n?.infSetId : void 0, f = o ? t.setId : void 0, _ = o ? n?.code : void 0, M = c.setId || ee(l.setId), z = ee(l.infSetId) || M || ee(V), g = M || ee(f ?? z), h = c.code || ee(l.code ?? _ ?? g), F = g || h || z || S, y = {
|
|
2164
2194
|
key: F,
|
|
2165
2195
|
id: F,
|
|
2166
|
-
setId:
|
|
2167
|
-
code:
|
|
2168
|
-
tagId:
|
|
2169
|
-
requestTagId:
|
|
2196
|
+
setId: g,
|
|
2197
|
+
code: h,
|
|
2198
|
+
tagId: S,
|
|
2199
|
+
requestTagId: I || void 0,
|
|
2170
2200
|
ownerNodeKey: L || void 0,
|
|
2171
2201
|
infSetId: z,
|
|
2172
|
-
title: c.name || ee(
|
|
2173
|
-
renderType:
|
|
2202
|
+
title: c.name || ee(l.name ?? n?.tagName ?? F),
|
|
2203
|
+
renderType: a,
|
|
2174
2204
|
mark: c,
|
|
2175
|
-
fields:
|
|
2205
|
+
fields: r,
|
|
2176
2206
|
model: i,
|
|
2177
2207
|
rows: s,
|
|
2178
2208
|
operationInfo: mt(
|
|
2179
|
-
t.operationInfo ??
|
|
2209
|
+
t.operationInfo ?? l.operationInfo
|
|
2180
2210
|
),
|
|
2181
|
-
raw:
|
|
2211
|
+
raw: l
|
|
2182
2212
|
};
|
|
2183
2213
|
return y.renderType === "form" && s.length === 0 && (y.rows = [{ ...i, __rowKey: `${F}-0` }]), y;
|
|
2184
2214
|
}
|
|
2185
|
-
function
|
|
2215
|
+
function Tr(e) {
|
|
2186
2216
|
const t = ce(e), n = ee(t.htmlDisplay || "F");
|
|
2187
2217
|
return {
|
|
2188
2218
|
name: ee(t.name ?? t.title),
|
|
@@ -2203,14 +2233,14 @@ function Or(e) {
|
|
|
2203
2233
|
function Dr(e, t) {
|
|
2204
2234
|
const n = ce(e), o = ee(
|
|
2205
2235
|
n.code ?? n.fieldCode ?? n.prop ?? n.key ?? `field_${t}`
|
|
2206
|
-
),
|
|
2236
|
+
), l = ee(n.label ?? n.name ?? n.tagName ?? o), c = Tn(
|
|
2207
2237
|
n.interface ?? n.interfaceField
|
|
2208
|
-
),
|
|
2238
|
+
), r = qt(n.cascadeDependFields);
|
|
2209
2239
|
return {
|
|
2210
2240
|
id: ee(n.id ?? n.key ?? n.prop ?? o),
|
|
2211
2241
|
key: ee(n.key ?? n.prop ?? o),
|
|
2212
2242
|
code: o,
|
|
2213
|
-
label:
|
|
2243
|
+
label: l,
|
|
2214
2244
|
value: n.value ?? n.defaultValue ?? "",
|
|
2215
2245
|
type: jr(n),
|
|
2216
2246
|
fieldType: se(n.fieldType),
|
|
@@ -2231,7 +2261,7 @@ function Dr(e, t) {
|
|
|
2231
2261
|
interface: c,
|
|
2232
2262
|
cascadeClearFields: qt(n.cascadeClearFields),
|
|
2233
2263
|
cascadeDependFields: Ne({
|
|
2234
|
-
cascadeDependFields:
|
|
2264
|
+
cascadeDependFields: r,
|
|
2235
2265
|
interface: c
|
|
2236
2266
|
}),
|
|
2237
2267
|
props: Ar(n),
|
|
@@ -2241,15 +2271,15 @@ function Dr(e, t) {
|
|
|
2241
2271
|
}
|
|
2242
2272
|
function Fr(e, t, n) {
|
|
2243
2273
|
if (Array.isArray(e) && e.some((c) => {
|
|
2244
|
-
const
|
|
2274
|
+
const r = ce(c);
|
|
2245
2275
|
return t.some(
|
|
2246
|
-
(
|
|
2276
|
+
(a) => r[a.code] !== void 0 || r[a.key] !== void 0
|
|
2247
2277
|
);
|
|
2248
2278
|
}))
|
|
2249
|
-
return e.map((c,
|
|
2279
|
+
return e.map((c, r) => ({
|
|
2250
2280
|
...ce(c),
|
|
2251
2281
|
__rowKey: ee(
|
|
2252
|
-
ce(c).__rowKey ?? ce(c).key ??
|
|
2282
|
+
ce(c).__rowKey ?? ce(c).key ?? r
|
|
2253
2283
|
)
|
|
2254
2284
|
}));
|
|
2255
2285
|
const o = In(t);
|
|
@@ -2259,23 +2289,23 @@ function In(e) {
|
|
|
2259
2289
|
return e.reduce((t, n) => (t[n.code || n.key] = n.value, t), {});
|
|
2260
2290
|
}
|
|
2261
2291
|
function $n(e, t, n = "") {
|
|
2262
|
-
const o = ce(e),
|
|
2263
|
-
(
|
|
2264
|
-
|
|
2292
|
+
const o = ce(e), l = Qe(o, ["children", "list", "tags"]).flatMap(
|
|
2293
|
+
(r) => $n(
|
|
2294
|
+
r,
|
|
2265
2295
|
t,
|
|
2266
2296
|
ee(o.tagId ?? o.id ?? o.key)
|
|
2267
2297
|
)
|
|
2268
2298
|
), c = Pr(o.infSetList);
|
|
2269
|
-
return
|
|
2270
|
-
(
|
|
2271
|
-
) : [Br(o, t, n,
|
|
2299
|
+
return l.length === 0 && c.length > 0 ? c.map(
|
|
2300
|
+
(r, a) => Er(o, r, t, n, a)
|
|
2301
|
+
) : [Br(o, t, n, l)];
|
|
2272
2302
|
}
|
|
2273
2303
|
function Br(e, t, n, o) {
|
|
2274
|
-
const
|
|
2304
|
+
const l = ee(e.tagId ?? e.id ?? e.key), c = ee(e.tagName ?? e.name ?? e.label ?? l);
|
|
2275
2305
|
return {
|
|
2276
|
-
key: ee(e.key ??
|
|
2277
|
-
id:
|
|
2278
|
-
tagId:
|
|
2306
|
+
key: ee(e.key ?? l),
|
|
2307
|
+
id: l,
|
|
2308
|
+
tagId: l,
|
|
2279
2309
|
tagName: c,
|
|
2280
2310
|
label: c,
|
|
2281
2311
|
tagLevel: se(e.tagLevel ?? e.level) ?? null,
|
|
@@ -2296,14 +2326,14 @@ function Br(e, t, n, o) {
|
|
|
2296
2326
|
raw: e
|
|
2297
2327
|
};
|
|
2298
2328
|
}
|
|
2299
|
-
function Er(e, t, n, o,
|
|
2300
|
-
const c = ee(e.tagId ?? e.id ?? e.key),
|
|
2329
|
+
function Er(e, t, n, o, l) {
|
|
2330
|
+
const c = ee(e.tagId ?? e.id ?? e.key), r = ee(e.tagName ?? e.name ?? e.label ?? c), a = t.infSetId || ee(t.setId), s = t.setId || a, i = a || `${c}-${l}`, v = t.code || se(e.code ?? a);
|
|
2301
2331
|
return {
|
|
2302
2332
|
key: i,
|
|
2303
2333
|
id: i,
|
|
2304
2334
|
tagId: c,
|
|
2305
|
-
tagName:
|
|
2306
|
-
label:
|
|
2335
|
+
tagName: r,
|
|
2336
|
+
label: r,
|
|
2307
2337
|
tagLevel: se(e.tagLevel ?? e.level) ?? null,
|
|
2308
2338
|
level: Dn(e.tagLevel ?? e.level),
|
|
2309
2339
|
parentTagId: se(
|
|
@@ -2312,16 +2342,16 @@ function Er(e, t, n, o, r) {
|
|
|
2312
2342
|
parentId: se(e.parentTagId ?? e.parentId ?? o) ?? null,
|
|
2313
2343
|
infSchmId: se(e.infSchmId ?? n?.infSchmId),
|
|
2314
2344
|
schemeId: ee(e.infSchmId ?? n?.infSchmId),
|
|
2315
|
-
infSetId:
|
|
2345
|
+
infSetId: a,
|
|
2316
2346
|
setId: s,
|
|
2317
|
-
code:
|
|
2347
|
+
code: v,
|
|
2318
2348
|
children: [],
|
|
2319
2349
|
infSetList: [t],
|
|
2320
2350
|
operationInfo: mt(e.operationInfo),
|
|
2321
2351
|
loaded: !0,
|
|
2322
2352
|
raw: {
|
|
2323
2353
|
...e,
|
|
2324
|
-
infSetId:
|
|
2354
|
+
infSetId: a,
|
|
2325
2355
|
setId: s,
|
|
2326
2356
|
infSetList: [t.raw]
|
|
2327
2357
|
}
|
|
@@ -2330,10 +2360,10 @@ function Er(e, t, n, o, r) {
|
|
|
2330
2360
|
function Cn(e, t = {}) {
|
|
2331
2361
|
const n = ce(
|
|
2332
2362
|
e.globalInfoSchmMark ?? e.scheme ?? e
|
|
2333
|
-
), o = ee(n.infSchmId ?? t.infSchmId),
|
|
2334
|
-
return !o && !
|
|
2363
|
+
), o = ee(n.infSchmId ?? t.infSchmId), l = ee(n.emplid ?? t.emplid);
|
|
2364
|
+
return !o && !l && Object.keys(n).length === 0 ? null : {
|
|
2335
2365
|
infSchmId: o,
|
|
2336
|
-
emplid:
|
|
2366
|
+
emplid: l,
|
|
2337
2367
|
id: o,
|
|
2338
2368
|
mark: ee(n.globalInfoSchmMark ?? e.globalInfoSchmMark),
|
|
2339
2369
|
config: Array.isArray(e.globalInfoSchmConfig) ? "" : ee(n.globalInfoSchmConfig ?? e.globalInfoSchmConfig),
|
|
@@ -2362,9 +2392,9 @@ function Pr(e) {
|
|
|
2362
2392
|
}) : [];
|
|
2363
2393
|
}
|
|
2364
2394
|
function kn(e) {
|
|
2365
|
-
return ce(
|
|
2395
|
+
return ce(Mn(e));
|
|
2366
2396
|
}
|
|
2367
|
-
function
|
|
2397
|
+
function Mn(e) {
|
|
2368
2398
|
const t = ce(e);
|
|
2369
2399
|
return t.data ?? t.result ?? e;
|
|
2370
2400
|
}
|
|
@@ -2380,7 +2410,7 @@ function wt(e) {
|
|
|
2380
2410
|
const t = { ...e };
|
|
2381
2411
|
return delete t.__rowKey, delete t.fields, t;
|
|
2382
2412
|
}
|
|
2383
|
-
function
|
|
2413
|
+
function Tn(e) {
|
|
2384
2414
|
const t = ce(e);
|
|
2385
2415
|
if (!(!t.method && !t.url && !t.params))
|
|
2386
2416
|
return {
|
|
@@ -2396,7 +2426,7 @@ function mt(e) {
|
|
|
2396
2426
|
return Object.fromEntries(
|
|
2397
2427
|
Object.entries(t).map(([n, o]) => [
|
|
2398
2428
|
n,
|
|
2399
|
-
|
|
2429
|
+
Tn(o) ?? o
|
|
2400
2430
|
])
|
|
2401
2431
|
);
|
|
2402
2432
|
}
|
|
@@ -2454,7 +2484,7 @@ function ke(e) {
|
|
|
2454
2484
|
e.toLowerCase()
|
|
2455
2485
|
) : !!e;
|
|
2456
2486
|
}
|
|
2457
|
-
const Ve = (e) => e.key || e.code,
|
|
2487
|
+
const Ve = (e) => e.key || e.code, Te = (e) => e.key || e.setId, Rr = (e) => String(e ?? "").trim(), tt = (e) => Array.from(new Set(e.map(Rr).filter(Boolean))), Ue = (e) => !!(e && typeof e == "object" && "children" in e), Xe = (e) => tt([
|
|
2458
2488
|
e?.key,
|
|
2459
2489
|
e?.id,
|
|
2460
2490
|
e?.setId,
|
|
@@ -2472,25 +2502,25 @@ const Ve = (e) => e.key || e.code, Me = (e) => e.key || e.setId, Rr = (e) => Str
|
|
|
2472
2502
|
e.code
|
|
2473
2503
|
]);
|
|
2474
2504
|
function Bn(e, t, n) {
|
|
2475
|
-
const o = zr(e),
|
|
2476
|
-
return
|
|
2505
|
+
const o = zr(e), l = tt([n, ...Xe(t)]);
|
|
2506
|
+
return l.length === 0 ? !1 : l.some((c) => o.includes(c));
|
|
2477
2507
|
}
|
|
2478
2508
|
function Nr(e, t, n) {
|
|
2479
|
-
return tt([n, ...Xe(t)]).length === 0 ? e : e.filter((
|
|
2509
|
+
return tt([n, ...Xe(t)]).length === 0 ? e : e.filter((l) => Bn(l, t, n));
|
|
2480
2510
|
}
|
|
2481
2511
|
function xr(e, t, n = {}) {
|
|
2482
|
-
const o = Object.keys(n).length > 0 ? n : e.model,
|
|
2512
|
+
const o = Object.keys(n).length > 0 ? n : e.model, l = typeof t == "string" ? t : Ve(t), c = typeof t == "string" ? e.fields.find((s) => Ve(s) === l || s.code === l) : t, a = Ne(c).some((s) => {
|
|
2483
2513
|
if (s === "searchText" && Object.prototype.hasOwnProperty.call(o, s) || s !== "searchText" && !Gr(e, s))
|
|
2484
2514
|
return !1;
|
|
2485
2515
|
const i = o[s];
|
|
2486
2516
|
return i == null || i === "";
|
|
2487
2517
|
});
|
|
2488
2518
|
return {
|
|
2489
|
-
fieldKey:
|
|
2519
|
+
fieldKey: l,
|
|
2490
2520
|
currentField: c,
|
|
2491
2521
|
sourceModel: o,
|
|
2492
2522
|
sourceRow: e.renderType === "table" ? o : void 0,
|
|
2493
|
-
missingDependField:
|
|
2523
|
+
missingDependField: a
|
|
2494
2524
|
};
|
|
2495
2525
|
}
|
|
2496
2526
|
function qr(e) {
|
|
@@ -2502,27 +2532,27 @@ function Gr(e, t) {
|
|
|
2502
2532
|
function Kr(e) {
|
|
2503
2533
|
return wn(e);
|
|
2504
2534
|
}
|
|
2505
|
-
const
|
|
2506
|
-
const t =
|
|
2535
|
+
const Me = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : {}, at = (e) => {
|
|
2536
|
+
const t = Me(e);
|
|
2507
2537
|
return !!(t.url || t.method || t.params);
|
|
2508
2538
|
};
|
|
2509
2539
|
function Yr(e) {
|
|
2510
|
-
const t =
|
|
2540
|
+
const t = Me(e.operationInfo).openTag;
|
|
2511
2541
|
return at(t) ? t : void 0;
|
|
2512
2542
|
}
|
|
2513
2543
|
function Ur(e, t, n) {
|
|
2514
|
-
const o =
|
|
2544
|
+
const o = Me(e?.operationInfo).queryInfoSet;
|
|
2515
2545
|
if (at(o))
|
|
2516
2546
|
return o;
|
|
2517
|
-
const
|
|
2547
|
+
const l = t?.infSetList.find((r) => r.infSetId === n), c = Me(l?.operationInfo).queryInfoSet;
|
|
2518
2548
|
return at(c) ? c : void 0;
|
|
2519
2549
|
}
|
|
2520
2550
|
function Hr(e) {
|
|
2521
|
-
const t =
|
|
2551
|
+
const t = Me(e.operationInfo).editInfoSet;
|
|
2522
2552
|
return at(t) ? t : void 0;
|
|
2523
2553
|
}
|
|
2524
2554
|
async function En(e) {
|
|
2525
|
-
const t = e.params === void 0 ? void 0 :
|
|
2555
|
+
const t = e.params === void 0 ? void 0 : Me(e.params);
|
|
2526
2556
|
return !e.formatter || !Jr(e) ? t : e.formatter({
|
|
2527
2557
|
operation: e.operation,
|
|
2528
2558
|
interfaceOperation: e.field?.interface,
|
|
@@ -2530,8 +2560,8 @@ async function En(e) {
|
|
|
2530
2560
|
requestSource: e.requestSource,
|
|
2531
2561
|
tagId: e.tagId,
|
|
2532
2562
|
model: {
|
|
2533
|
-
...
|
|
2534
|
-
...
|
|
2563
|
+
...Me(e.section?.model),
|
|
2564
|
+
...Me(e.model)
|
|
2535
2565
|
},
|
|
2536
2566
|
row: e.row,
|
|
2537
2567
|
section: e.section,
|
|
@@ -2551,7 +2581,7 @@ function Jr(e) {
|
|
|
2551
2581
|
async function Wr(e) {
|
|
2552
2582
|
if (!e.service.requestOperation)
|
|
2553
2583
|
throw new Error("[GlobalInfo] service.requestOperation is required for operationInfo");
|
|
2554
|
-
const t = e.operation.params === void 0 ? void 0 :
|
|
2584
|
+
const t = e.operation.params === void 0 ? void 0 : Me(e.operation.params), n = Zr(t, e.context), o = await En({
|
|
2555
2585
|
formatter: e.formatter,
|
|
2556
2586
|
params: n,
|
|
2557
2587
|
operation: e.operation,
|
|
@@ -2577,10 +2607,10 @@ async function Wr(e) {
|
|
|
2577
2607
|
function Zr(e, t) {
|
|
2578
2608
|
if (t?.params === void 0)
|
|
2579
2609
|
return e;
|
|
2580
|
-
const n =
|
|
2610
|
+
const n = Me(t.params);
|
|
2581
2611
|
return t.type === "openTag" && t.requestSource === "sidebar" ? {
|
|
2582
2612
|
...n,
|
|
2583
|
-
...
|
|
2613
|
+
...Me(e)
|
|
2584
2614
|
} : n;
|
|
2585
2615
|
}
|
|
2586
2616
|
function Je(e = {}) {
|
|
@@ -2600,28 +2630,28 @@ function Je(e = {}) {
|
|
|
2600
2630
|
};
|
|
2601
2631
|
}
|
|
2602
2632
|
function Qr(e) {
|
|
2603
|
-
const t = { ...e.currentMap }, n = { ...e.currentAliasMap }, o = [...e.currentOrder],
|
|
2633
|
+
const t = { ...e.currentMap }, n = { ...e.currentAliasMap }, o = [...e.currentOrder], l = { ...e.currentStatusMap }, c = Nr(e.nextViewModel.sections, e.node, e.targetKey), r = tt([e.targetKey, ...Xe(e.node)]).length > 0, a = c.find((s) => Bn(s, e.node, e.targetKey)) ?? (r ? null : e.nextViewModel.activeSection ?? c[0] ?? e.activeSection ?? null);
|
|
2604
2634
|
return c.forEach((s) => {
|
|
2605
|
-
const i =
|
|
2606
|
-
t[i] = s, o.includes(i) || o.push(i),
|
|
2607
|
-
...
|
|
2635
|
+
const i = Te(s);
|
|
2636
|
+
t[i] = s, o.includes(i) || o.push(i), l[i] = Je({
|
|
2637
|
+
...l[i],
|
|
2608
2638
|
loaded: !0,
|
|
2609
2639
|
loading: !1,
|
|
2610
2640
|
error: null,
|
|
2611
2641
|
editing: e.editingSectionKeys.includes(i)
|
|
2612
2642
|
});
|
|
2613
|
-
}), e.targetKey &&
|
|
2614
|
-
...
|
|
2643
|
+
}), e.targetKey && a ? n[e.targetKey] = Te(a) : e.targetKey && (n[e.targetKey] = ""), e.targetKey && (l[e.targetKey] = Je({
|
|
2644
|
+
...l[e.targetKey],
|
|
2615
2645
|
loaded: !0,
|
|
2616
2646
|
loading: !1,
|
|
2617
2647
|
error: null,
|
|
2618
|
-
editing: !!(
|
|
2648
|
+
editing: !!(a && e.editingSectionKeys.includes(Te(a)))
|
|
2619
2649
|
})), {
|
|
2620
2650
|
sectionMap: t,
|
|
2621
2651
|
sectionAliasMap: n,
|
|
2622
2652
|
sectionOrder: o,
|
|
2623
|
-
sectionStatusMap:
|
|
2624
|
-
matchedSection:
|
|
2653
|
+
sectionStatusMap: l,
|
|
2654
|
+
matchedSection: a,
|
|
2625
2655
|
targetSections: c
|
|
2626
2656
|
};
|
|
2627
2657
|
}
|
|
@@ -2640,15 +2670,15 @@ function ea(e, t) {
|
|
|
2640
2670
|
const ze = (e) => new Error(`[GlobalInfo] ${e}`), ta = (e) => [
|
|
2641
2671
|
String(e.method ?? "").toLowerCase(),
|
|
2642
2672
|
String(e.url ?? ""),
|
|
2643
|
-
It(
|
|
2673
|
+
It(Me(e.params))
|
|
2644
2674
|
].join("::");
|
|
2645
2675
|
function It(e) {
|
|
2646
2676
|
return Array.isArray(e) ? `[${e.map((t) => It(t)).join(",")}]` : e && typeof e == "object" ? `{${Object.entries(e).sort(([n], [o]) => n.localeCompare(o)).map(([n, o]) => `${JSON.stringify(n)}:${It(o)}`).join(",")}}` : JSON.stringify(e);
|
|
2647
2677
|
}
|
|
2648
2678
|
const na = (e) => {
|
|
2649
|
-
const t = ge(!1), n = ge(!1), o = ge(!1),
|
|
2679
|
+
const t = ge(!1), n = ge(!1), o = ge(!1), l = je(null), c = je([]), r = je(null), a = je(null), s = je(null), i = je({}), v = je({}), S = ge([]), I = je({}), L = ge([]), V = O(
|
|
2650
2680
|
() => {
|
|
2651
|
-
const m =
|
|
2681
|
+
const m = S.value.map((k) => i.value[k]).filter((k) => !!k), p = Object.entries(i.value).filter(([k]) => !S.value.includes(k)).map(([, k]) => k);
|
|
2652
2682
|
return [...m, ...p];
|
|
2653
2683
|
}
|
|
2654
2684
|
), f = O(() => ({
|
|
@@ -2664,28 +2694,28 @@ const na = (e) => {
|
|
|
2664
2694
|
sectionMap: i.value,
|
|
2665
2695
|
// section 状态映射;这里把 alias 后的编辑态也同步进去。
|
|
2666
2696
|
sectionStatusMap: Object.fromEntries(
|
|
2667
|
-
Object.entries(
|
|
2697
|
+
Object.entries(I.value).map(([m, p]) => [
|
|
2668
2698
|
m,
|
|
2669
2699
|
{
|
|
2670
2700
|
// 保留原状态字段。
|
|
2671
2701
|
...p,
|
|
2672
2702
|
// 编辑态以 editingSectionKeys 为准,避免状态对象里 editing 值残留。
|
|
2673
2703
|
editing: L.value.includes(
|
|
2674
|
-
|
|
2704
|
+
v.value[m] ?? m
|
|
2675
2705
|
)
|
|
2676
2706
|
}
|
|
2677
2707
|
])
|
|
2678
2708
|
),
|
|
2679
2709
|
// 最近一次全局错误。
|
|
2680
|
-
error:
|
|
2681
|
-
})),
|
|
2710
|
+
error: l.value
|
|
2711
|
+
})), _ = () => ({
|
|
2682
2712
|
// adaptScene 透传给新接口形态。
|
|
2683
2713
|
adaptScene: e.adaptScene,
|
|
2684
2714
|
// emplid 是当前人员标识,树和详情接口都需要它。
|
|
2685
2715
|
emplid: e.emplid
|
|
2686
|
-
}),
|
|
2716
|
+
}), M = (m) => ({
|
|
2687
2717
|
// 复用基础参数,保证人员和场景一致。
|
|
2688
|
-
...
|
|
2718
|
+
..._(),
|
|
2689
2719
|
// infSchmId 指定当前模板方案。
|
|
2690
2720
|
infSchmId: m.infSchmId,
|
|
2691
2721
|
// tagId 指定要展开的树节点。
|
|
@@ -2694,9 +2724,9 @@ const na = (e) => {
|
|
|
2694
2724
|
tagLevel: m.tagLevel,
|
|
2695
2725
|
// parentTagId 保留父子关系上下文。
|
|
2696
2726
|
parentTagId: m.parentTagId
|
|
2697
|
-
}), z = (m =
|
|
2727
|
+
}), z = (m = a.value, p = s.value) => ({
|
|
2698
2728
|
// 详情接口同样需要基础人员和场景参数。
|
|
2699
|
-
...
|
|
2729
|
+
..._(),
|
|
2700
2730
|
// 当前节点所属模板方案。
|
|
2701
2731
|
infSchmId: m?.infSchmId,
|
|
2702
2732
|
// 当前点击或加载的树节点 id。
|
|
@@ -2705,16 +2735,16 @@ const na = (e) => {
|
|
|
2705
2735
|
infSetId: p?.infSetId ?? m?.infSetId,
|
|
2706
2736
|
// setId 同样优先取 section,避免保存时拿错节点 setId。
|
|
2707
2737
|
setId: p?.setId ?? m?.setId
|
|
2708
|
-
}),
|
|
2738
|
+
}), g = async (m, p) => Wr({
|
|
2709
2739
|
service: e.service,
|
|
2710
2740
|
formatter: e.formatOperationParams,
|
|
2711
2741
|
operation: m,
|
|
2712
2742
|
context: p,
|
|
2713
|
-
viewModel:
|
|
2743
|
+
viewModel: r.value,
|
|
2714
2744
|
sections: V.value,
|
|
2715
|
-
activeNode:
|
|
2745
|
+
activeNode: a.value,
|
|
2716
2746
|
activeSection: s.value
|
|
2717
|
-
}),
|
|
2747
|
+
}), h = nr(
|
|
2718
2748
|
async (m, p) => {
|
|
2719
2749
|
if (!e.service.requestOperation)
|
|
2720
2750
|
throw ze("service.requestOperation is required");
|
|
@@ -2734,13 +2764,13 @@ const na = (e) => {
|
|
|
2734
2764
|
model: p?.model,
|
|
2735
2765
|
row: p?.row,
|
|
2736
2766
|
node: p?.node,
|
|
2737
|
-
viewModel:
|
|
2767
|
+
viewModel: r.value,
|
|
2738
2768
|
sections: V.value,
|
|
2739
|
-
activeNode:
|
|
2769
|
+
activeNode: a.value,
|
|
2740
2770
|
activeSection: s.value,
|
|
2741
2771
|
searchText: p?.searchText
|
|
2742
2772
|
}), Y = { ...m, params: k }, W = p && { ...p, params: k };
|
|
2743
|
-
return
|
|
2773
|
+
return h(Y, W);
|
|
2744
2774
|
}, y = (m, p) => {
|
|
2745
2775
|
if (!p)
|
|
2746
2776
|
return m[0] ?? null;
|
|
@@ -2754,20 +2784,20 @@ const na = (e) => {
|
|
|
2754
2784
|
return null;
|
|
2755
2785
|
}, A = (m = s.value) => {
|
|
2756
2786
|
if (m)
|
|
2757
|
-
return typeof m == "string" ? m : Ue(m) ? C(m) :
|
|
2787
|
+
return typeof m == "string" ? m : Ue(m) ? C(m) : Te(m);
|
|
2758
2788
|
}, b = (m = s.value) => {
|
|
2759
2789
|
const p = A(m);
|
|
2760
2790
|
if (!p)
|
|
2761
2791
|
return null;
|
|
2762
|
-
const k =
|
|
2792
|
+
const k = v.value[p] ?? p;
|
|
2763
2793
|
return i.value[k] ?? null;
|
|
2764
2794
|
}, j = (m = s.value) => {
|
|
2765
2795
|
const p = A(m);
|
|
2766
2796
|
if (p)
|
|
2767
|
-
return
|
|
2797
|
+
return v.value[p] ?? p;
|
|
2768
2798
|
}, C = (m = s.value) => {
|
|
2769
2799
|
if (m)
|
|
2770
|
-
return typeof m == "string" ? m : Ue(m) ? m.setId ?? m.infSetId ?? m.key :
|
|
2800
|
+
return typeof m == "string" ? m : Ue(m) ? m.setId ?? m.infSetId ?? m.key : Te(m);
|
|
2771
2801
|
}, N = (m = s.value) => {
|
|
2772
2802
|
if (Ue(m))
|
|
2773
2803
|
return m;
|
|
@@ -2776,17 +2806,17 @@ const na = (e) => {
|
|
|
2776
2806
|
if (p)
|
|
2777
2807
|
return p;
|
|
2778
2808
|
const k = b(m);
|
|
2779
|
-
return k?.ownerNodeKey ? y(c.value, k.ownerNodeKey) ??
|
|
2809
|
+
return k?.ownerNodeKey ? y(c.value, k.ownerNodeKey) ?? a.value : k || a.value && Xe(a.value).includes(m) ? a.value : null;
|
|
2780
2810
|
}
|
|
2781
|
-
return m?.ownerNodeKey ? y(c.value, m.ownerNodeKey) ??
|
|
2811
|
+
return m?.ownerNodeKey ? y(c.value, m.ownerNodeKey) ?? a.value : a.value;
|
|
2782
2812
|
}, re = (m = s.value) => !m || Ue(m) ? null : b(m), le = (m = s.value) => {
|
|
2783
2813
|
const p = C(m);
|
|
2784
2814
|
if (!p)
|
|
2785
2815
|
return Je();
|
|
2786
|
-
const k =
|
|
2816
|
+
const k = v.value[p] ?? p;
|
|
2787
2817
|
return Je({
|
|
2788
|
-
|
|
2789
|
-
|
|
2818
|
+
...I.value[p],
|
|
2819
|
+
...I.value[k],
|
|
2790
2820
|
// 编辑态始终从 editingSectionKeys 计算,避免状态对象过期。
|
|
2791
2821
|
editing: L.value.includes(
|
|
2792
2822
|
k
|
|
@@ -2794,24 +2824,24 @@ const na = (e) => {
|
|
|
2794
2824
|
});
|
|
2795
2825
|
}, R = (m, p) => {
|
|
2796
2826
|
const k = C(m);
|
|
2797
|
-
k && (
|
|
2798
|
-
|
|
2827
|
+
k && (I.value = {
|
|
2828
|
+
...I.value,
|
|
2799
2829
|
[k]: Je({
|
|
2800
2830
|
// 保留已有状态。
|
|
2801
|
-
|
|
2831
|
+
...I.value[k],
|
|
2802
2832
|
// 合并本次状态补丁。
|
|
2803
2833
|
...p,
|
|
2804
2834
|
// 编辑态仍以 editingSectionKeys 为准。
|
|
2805
2835
|
editing: L.value.includes(k)
|
|
2806
2836
|
})
|
|
2807
2837
|
});
|
|
2808
|
-
}, B = (m =
|
|
2838
|
+
}, B = (m = r.value?.raw ?? null, p = a.value) => {
|
|
2809
2839
|
const k = V.value, Y = s.value && k.find(
|
|
2810
|
-
(W) =>
|
|
2840
|
+
(W) => Te(W) === Te(s.value)
|
|
2811
2841
|
) ? s.value : null;
|
|
2812
|
-
|
|
2842
|
+
r.value = {
|
|
2813
2843
|
// 保留原 scheme。
|
|
2814
|
-
scheme:
|
|
2844
|
+
scheme: r.value?.scheme ?? null,
|
|
2815
2845
|
// 当前节点。
|
|
2816
2846
|
node: p,
|
|
2817
2847
|
// 顶层节点和树节点都来自 nodes。
|
|
@@ -2828,21 +2858,21 @@ const na = (e) => {
|
|
|
2828
2858
|
// 保留原始接口数据。
|
|
2829
2859
|
raw: m
|
|
2830
2860
|
}, s.value = Y;
|
|
2831
|
-
}, E = (m, p =
|
|
2861
|
+
}, E = (m, p = a.value, k) => {
|
|
2832
2862
|
const Y = Qr({
|
|
2833
2863
|
currentMap: i.value,
|
|
2834
|
-
currentAliasMap:
|
|
2835
|
-
currentOrder:
|
|
2836
|
-
currentStatusMap:
|
|
2864
|
+
currentAliasMap: v.value,
|
|
2865
|
+
currentOrder: S.value,
|
|
2866
|
+
currentStatusMap: I.value,
|
|
2837
2867
|
editingSectionKeys: L.value,
|
|
2838
2868
|
nextViewModel: m,
|
|
2839
2869
|
node: p,
|
|
2840
2870
|
targetKey: k,
|
|
2841
2871
|
activeSection: s.value
|
|
2842
2872
|
});
|
|
2843
|
-
return i.value = Y.sectionMap,
|
|
2873
|
+
return i.value = Y.sectionMap, v.value = Y.sectionAliasMap, S.value = Y.sectionOrder, I.value = Y.sectionStatusMap, r.value = {
|
|
2844
2874
|
...m,
|
|
2845
|
-
scheme: m.scheme ??
|
|
2875
|
+
scheme: m.scheme ?? r.value?.scheme ?? null,
|
|
2846
2876
|
topNodes: c.value,
|
|
2847
2877
|
treeNodes: c.value,
|
|
2848
2878
|
activeNode: p,
|
|
@@ -2858,14 +2888,14 @@ const na = (e) => {
|
|
|
2858
2888
|
i.value = {
|
|
2859
2889
|
...i.value,
|
|
2860
2890
|
[k]: W
|
|
2861
|
-
}, s.value =
|
|
2862
|
-
}, u = async (m = s.value ??
|
|
2863
|
-
const p = re(m), k = N(m) ??
|
|
2891
|
+
}, s.value = Te(s.value ?? W) === k ? W : s.value, B();
|
|
2892
|
+
}, u = async (m = s.value ?? a.value) => {
|
|
2893
|
+
const p = re(m), k = N(m) ?? a.value, Y = C(m);
|
|
2864
2894
|
if (!k)
|
|
2865
2895
|
return null;
|
|
2866
2896
|
if (!e.service.requestOperation)
|
|
2867
2897
|
throw ze("service.requestOperation is required");
|
|
2868
|
-
n.value = !0,
|
|
2898
|
+
n.value = !0, l.value = null, R(Y ?? k, { loading: !0, error: null });
|
|
2869
2899
|
try {
|
|
2870
2900
|
const W = p ? [{ infSetId: p.infSetId, setId: p.setId, operationInfo: p.operationInfo, raw: p.raw }] : k.infSetList;
|
|
2871
2901
|
if (W.length === 0)
|
|
@@ -2879,7 +2909,7 @@ const na = (e) => {
|
|
|
2879
2909
|
operationInfo: ie.operationInfo
|
|
2880
2910
|
};
|
|
2881
2911
|
if (he) {
|
|
2882
|
-
const Ke = await
|
|
2912
|
+
const Ke = await g(he, {
|
|
2883
2913
|
type: "queryInfoSet",
|
|
2884
2914
|
requestSource: "inner",
|
|
2885
2915
|
tagId: Ae,
|
|
@@ -2897,22 +2927,22 @@ const na = (e) => {
|
|
|
2897
2927
|
};
|
|
2898
2928
|
return E(ve, k, Y);
|
|
2899
2929
|
} catch (W) {
|
|
2900
|
-
throw
|
|
2930
|
+
throw l.value = W, R(Y ?? k, { loading: !1, error: W }), W;
|
|
2901
2931
|
} finally {
|
|
2902
2932
|
n.value = !1, R(Y ?? k, { loading: !1 });
|
|
2903
2933
|
}
|
|
2904
|
-
},
|
|
2934
|
+
}, w = (m = s.value) => u(m), D = (m = s.value) => {
|
|
2905
2935
|
if (!m)
|
|
2906
2936
|
return null;
|
|
2907
2937
|
if (!Ue(m) && typeof m != "string")
|
|
2908
2938
|
return b(m);
|
|
2909
2939
|
const p = C(m);
|
|
2910
|
-
return p ? i.value[
|
|
2911
|
-
}, P = async (m =
|
|
2940
|
+
return p ? i.value[v.value[p] ?? p] ?? null : null;
|
|
2941
|
+
}, P = async (m = a.value) => m ? (await u(m), r.value) : (r.value = null, s.value = null, i.value = {}, v.value = {}, S.value = [], I.value = {}, null), x = async (m) => {
|
|
2912
2942
|
const p = Yr(m);
|
|
2913
2943
|
if (!p)
|
|
2914
2944
|
return m.children;
|
|
2915
|
-
const k =
|
|
2945
|
+
const k = M(m), Y = await g(p, {
|
|
2916
2946
|
type: "openTag",
|
|
2917
2947
|
requestSource: "sidebar",
|
|
2918
2948
|
tagId: m.tagId,
|
|
@@ -2927,14 +2957,14 @@ const na = (e) => {
|
|
|
2927
2957
|
return p.length > 0 && (c.value = Sn(c.value, m.key, p)), p;
|
|
2928
2958
|
}, q = async (m) => {
|
|
2929
2959
|
const p = typeof m == "string" ? y(c.value, m) : m;
|
|
2930
|
-
return p ? (
|
|
2960
|
+
return p ? (a.value = p, s.value = null, L.value = [], await K(p), B(r.value?.raw, p), p) : null;
|
|
2931
2961
|
}, Q = async () => {
|
|
2932
2962
|
const m = e.service.templateTree;
|
|
2933
2963
|
if (!m)
|
|
2934
2964
|
throw ze("service.templateTree is required");
|
|
2935
|
-
t.value = !0,
|
|
2965
|
+
t.value = !0, l.value = null;
|
|
2936
2966
|
try {
|
|
2937
|
-
const p = await m(
|
|
2967
|
+
const p = await m(_()), k = Nt(p), Y = await Promise.all(
|
|
2938
2968
|
k.treeNodes.map(async (Ce) => {
|
|
2939
2969
|
const ve = await x(Ce);
|
|
2940
2970
|
return {
|
|
@@ -2944,9 +2974,9 @@ const na = (e) => {
|
|
|
2944
2974
|
};
|
|
2945
2975
|
})
|
|
2946
2976
|
);
|
|
2947
|
-
c.value = Y, s.value = null, i.value = {},
|
|
2977
|
+
c.value = Y, s.value = null, i.value = {}, v.value = {}, S.value = [], I.value = {}, L.value = [];
|
|
2948
2978
|
const W = y(Y, e.initialActiveNodeKey) ?? y(Y);
|
|
2949
|
-
return
|
|
2979
|
+
return a.value = W, r.value = {
|
|
2950
2980
|
...k,
|
|
2951
2981
|
treeNodes: Y,
|
|
2952
2982
|
activeNode: W,
|
|
@@ -2954,17 +2984,17 @@ const na = (e) => {
|
|
|
2954
2984
|
sections: V.value
|
|
2955
2985
|
}, c.value;
|
|
2956
2986
|
} catch (p) {
|
|
2957
|
-
throw
|
|
2987
|
+
throw l.value = p, p;
|
|
2958
2988
|
} finally {
|
|
2959
2989
|
t.value = !1;
|
|
2960
2990
|
}
|
|
2961
|
-
},
|
|
2991
|
+
}, T = async () => {
|
|
2962
2992
|
const m = A();
|
|
2963
|
-
await
|
|
2993
|
+
await w(s.value ?? a.value);
|
|
2964
2994
|
const p = V.value.find(
|
|
2965
|
-
(k) =>
|
|
2995
|
+
(k) => Te(k) === m
|
|
2966
2996
|
);
|
|
2967
|
-
return p && (s.value = p), B(),
|
|
2997
|
+
return p && (s.value = p), B(), r.value;
|
|
2968
2998
|
}, X = (m = s.value) => {
|
|
2969
2999
|
const p = j(m);
|
|
2970
3000
|
return !!(p && L.value.includes(p));
|
|
@@ -3035,7 +3065,7 @@ const na = (e) => {
|
|
|
3035
3065
|
node: N(W),
|
|
3036
3066
|
section: W,
|
|
3037
3067
|
field: ie,
|
|
3038
|
-
params:
|
|
3068
|
+
params: Me(Ke.params),
|
|
3039
3069
|
// searchText 参与本次查询时,需要一并透传到 model 上,避免被依赖检查视为缺失并提前截断请求。
|
|
3040
3070
|
model: he,
|
|
3041
3071
|
row: Ae,
|
|
@@ -3079,11 +3109,11 @@ const na = (e) => {
|
|
|
3079
3109
|
// 加载当前节点详情。
|
|
3080
3110
|
loadDetail: P,
|
|
3081
3111
|
// 刷新当前详情。
|
|
3082
|
-
reloadActiveSection:
|
|
3112
|
+
reloadActiveSection: T,
|
|
3083
3113
|
// 加载指定节点或 section。
|
|
3084
3114
|
loadSection: u,
|
|
3085
3115
|
// 重新加载指定节点或 section。
|
|
3086
|
-
reloadSection:
|
|
3116
|
+
reloadSection: w,
|
|
3087
3117
|
// 获取指定节点或 section 的缓存数据。
|
|
3088
3118
|
getSection: D,
|
|
3089
3119
|
// 获取指定节点或 section 的状态。
|
|
@@ -3120,12 +3150,12 @@ const na = (e) => {
|
|
|
3120
3150
|
const Y = Hr(k);
|
|
3121
3151
|
if (!Y)
|
|
3122
3152
|
throw ze("section.operationInfo.editInfoSet is required");
|
|
3123
|
-
o.value = !0,
|
|
3153
|
+
o.value = !0, l.value = null, p && p !== Te(k) && R(p, { saving: !0, error: null }), R(k, { saving: !0, error: null });
|
|
3124
3154
|
try {
|
|
3125
3155
|
const {
|
|
3126
3156
|
tagId: W,
|
|
3127
3157
|
...Ce
|
|
3128
|
-
} = z(
|
|
3158
|
+
} = z(a.value, k), ve = kr(k, Ce), ie = Xr(
|
|
3129
3159
|
k,
|
|
3130
3160
|
ve.infSetValues ?? [],
|
|
3131
3161
|
{
|
|
@@ -3134,24 +3164,24 @@ const na = (e) => {
|
|
|
3134
3164
|
);
|
|
3135
3165
|
if (ie)
|
|
3136
3166
|
throw new Error(ie);
|
|
3137
|
-
const he = await
|
|
3167
|
+
const he = await g(
|
|
3138
3168
|
// 保存时保留后端给的 method/url,但不再把 editOperation.params 混入实际提交数据。
|
|
3139
3169
|
Y,
|
|
3140
3170
|
{
|
|
3141
3171
|
type: "editInfoSet",
|
|
3142
3172
|
requestSource: "inner",
|
|
3143
3173
|
tagId: k.requestTagId ?? k.tagId,
|
|
3144
|
-
node:
|
|
3174
|
+
node: a.value,
|
|
3145
3175
|
section: k,
|
|
3146
3176
|
params: ve,
|
|
3147
3177
|
model: k.model
|
|
3148
3178
|
}
|
|
3149
3179
|
);
|
|
3150
|
-
return de(k), await
|
|
3180
|
+
return de(k), await w(k), he;
|
|
3151
3181
|
} catch (W) {
|
|
3152
|
-
throw
|
|
3182
|
+
throw l.value = W, p && p !== Te(k) && R(p, { saving: !1, error: W }), R(k, { saving: !1, error: W }), W;
|
|
3153
3183
|
} finally {
|
|
3154
|
-
o.value = !1, p && p !==
|
|
3184
|
+
o.value = !1, p && p !== Te(k) && R(p, { saving: !1 }), R(k, { saving: !1 });
|
|
3155
3185
|
}
|
|
3156
3186
|
},
|
|
3157
3187
|
// 判断编辑态。
|
|
@@ -3167,7 +3197,7 @@ const na = (e) => {
|
|
|
3167
3197
|
(e.autoLoad ?? !0) && Q();
|
|
3168
3198
|
}), {
|
|
3169
3199
|
// 当前 viewModel。
|
|
3170
|
-
viewModel:
|
|
3200
|
+
viewModel: r,
|
|
3171
3201
|
// 当前模板树节点。
|
|
3172
3202
|
nodes: c,
|
|
3173
3203
|
// 当前已加载 section 列表。
|
|
@@ -3175,9 +3205,9 @@ const na = (e) => {
|
|
|
3175
3205
|
// 当前 section 缓存。
|
|
3176
3206
|
sectionMap: i,
|
|
3177
3207
|
// 当前 section 状态缓存。
|
|
3178
|
-
sectionStatusMap:
|
|
3208
|
+
sectionStatusMap: I,
|
|
3179
3209
|
// 当前激活节点。
|
|
3180
|
-
activeNode:
|
|
3210
|
+
activeNode: a,
|
|
3181
3211
|
// 当前激活 section。
|
|
3182
3212
|
activeSection: s,
|
|
3183
3213
|
// 给页面消费的状态快照。
|
|
@@ -3198,13 +3228,13 @@ const na = (e) => {
|
|
|
3198
3228
|
formatOperationParams: {}
|
|
3199
3229
|
},
|
|
3200
3230
|
setup(e) {
|
|
3201
|
-
const t = e, n = na(t), { viewModel: o, nodes:
|
|
3202
|
-
return (
|
|
3231
|
+
const t = e, n = na(t), { viewModel: o, nodes: l, sections: c, activeNode: r, activeSection: a, state: s, actions: i } = n;
|
|
3232
|
+
return (v, S) => te(v.$slots, "default", Oe(Be({
|
|
3203
3233
|
viewModel: J(o),
|
|
3204
|
-
nodes: J(
|
|
3234
|
+
nodes: J(l),
|
|
3205
3235
|
sections: J(c),
|
|
3206
|
-
activeNode: J(
|
|
3207
|
-
activeSection: J(
|
|
3236
|
+
activeNode: J(r),
|
|
3237
|
+
activeSection: J(a),
|
|
3208
3238
|
state: J(s),
|
|
3209
3239
|
actions: J(i),
|
|
3210
3240
|
renderConfig: t.renderConfig
|
|
@@ -3251,23 +3281,23 @@ const oa = {
|
|
|
3251
3281
|
},
|
|
3252
3282
|
emits: ["update:modelValue", "change", "loadOptions"],
|
|
3253
3283
|
setup(e, { emit: t }) {
|
|
3254
|
-
const n = e, o = t,
|
|
3284
|
+
const n = e, o = t, l = [
|
|
3255
3285
|
"textarea",
|
|
3256
3286
|
"html",
|
|
3257
3287
|
"code",
|
|
3258
3288
|
"multi-row"
|
|
3259
|
-
], c = ge(null),
|
|
3289
|
+
], c = ge(null), r = O(
|
|
3260
3290
|
() => kt(n.field)
|
|
3261
|
-
),
|
|
3291
|
+
), a = O(
|
|
3262
3292
|
() => ut(n.field)
|
|
3263
3293
|
), s = O(
|
|
3264
3294
|
() => dr(n.field)
|
|
3265
3295
|
), i = O(
|
|
3266
3296
|
() => n.disabled || n.field.disabled || n.field.readonly
|
|
3267
|
-
),
|
|
3297
|
+
), v = O(() => !!n.field.props?.multiple), S = O(
|
|
3268
3298
|
() => n.modelValue === void 0 || n.modelValue === null ? "" : String(n.modelValue)
|
|
3269
|
-
),
|
|
3270
|
-
() =>
|
|
3299
|
+
), I = O(
|
|
3300
|
+
() => l.includes(r.value) ? n.field.props?.resize ?? "vertical" : void 0
|
|
3271
3301
|
), L = O(() => {
|
|
3272
3302
|
if (n.modelValue === void 0 || n.modelValue === null || n.modelValue === "")
|
|
3273
3303
|
return;
|
|
@@ -3280,19 +3310,19 @@ const oa = {
|
|
|
3280
3310
|
...u,
|
|
3281
3311
|
value: j(u)
|
|
3282
3312
|
}))
|
|
3283
|
-
),
|
|
3313
|
+
), _ = O(() => {
|
|
3284
3314
|
const u = n.field.props?.popperClass ?? n.field.props?.["popper-class"];
|
|
3285
3315
|
return s.value ? [u, "global-info-field-control__descr-popper"].filter(Boolean).join(" ") : u;
|
|
3286
|
-
}),
|
|
3316
|
+
}), M = O(
|
|
3287
3317
|
() => (
|
|
3288
3318
|
// select_remote_descr 的浮层样式受业务沙箱前缀约束,默认留在当前应用容器内,避免 teleport 到 body 后样式失效。
|
|
3289
3319
|
s.value ? !1 : n.field.props?.teleported
|
|
3290
3320
|
)
|
|
3291
3321
|
), z = O(() => {
|
|
3292
|
-
const u = n.field.props?.activeValue ?? n.field.props?.["active-value"],
|
|
3293
|
-
return u !== void 0 ||
|
|
3294
|
-
}),
|
|
3295
|
-
() =>
|
|
3322
|
+
const u = n.field.props?.activeValue ?? n.field.props?.["active-value"], w = n.field.props?.inactiveValue ?? n.field.props?.["inactive-value"];
|
|
3323
|
+
return u !== void 0 || w !== void 0 ? n.modelValue ?? w ?? !1 : vn(n.modelValue);
|
|
3324
|
+
}), g = O(() => r.value === "code" ? 5 : 1), h = O(
|
|
3325
|
+
() => r.value === "file" && !_e(n.modelValue)
|
|
3296
3326
|
), F = O(
|
|
3297
3327
|
() => mn(
|
|
3298
3328
|
n.field,
|
|
@@ -3305,14 +3335,14 @@ const oa = {
|
|
|
3305
3335
|
n.modelValue,
|
|
3306
3336
|
Z("common.请选择文件")
|
|
3307
3337
|
)
|
|
3308
|
-
), A = O(() => n.field.placeholder ? n.field.placeholder :
|
|
3338
|
+
), A = O(() => n.field.placeholder ? n.field.placeholder : a.value ? Z("common.请输入关键词") : r.value === "select" ? Z("common.请选择") : r.value === "date" ? Z("common.请选择日期") : r.value === "file" ? Z("common.请选择文件") : Z("common.请输入"));
|
|
3309
3339
|
let b;
|
|
3310
3340
|
function j(u) {
|
|
3311
3341
|
if (Array.isArray(V.value)) {
|
|
3312
|
-
const
|
|
3342
|
+
const w = V.value.find(
|
|
3313
3343
|
(D) => Ze(u, D)
|
|
3314
3344
|
);
|
|
3315
|
-
if (
|
|
3345
|
+
if (w !== void 0) return w;
|
|
3316
3346
|
}
|
|
3317
3347
|
return Ze(u, V.value) ? V.value : u.value;
|
|
3318
3348
|
}
|
|
@@ -3323,13 +3353,13 @@ const oa = {
|
|
|
3323
3353
|
o("change", re(u));
|
|
3324
3354
|
}
|
|
3325
3355
|
function re(u) {
|
|
3326
|
-
return
|
|
3356
|
+
return r.value === "select" || r.value === "select_remote" ? pr(n.field, u) : u;
|
|
3327
3357
|
}
|
|
3328
3358
|
function le(u) {
|
|
3329
|
-
u && o("loadOptions",
|
|
3359
|
+
u && o("loadOptions", a.value ? { searchText: "" } : void 0);
|
|
3330
3360
|
}
|
|
3331
3361
|
function R(u) {
|
|
3332
|
-
|
|
3362
|
+
a.value && (b && clearTimeout(b), b = setTimeout(() => {
|
|
3333
3363
|
o("loadOptions", { searchText: u });
|
|
3334
3364
|
}, 300));
|
|
3335
3365
|
}
|
|
@@ -3343,48 +3373,48 @@ const oa = {
|
|
|
3343
3373
|
b && clearTimeout(b);
|
|
3344
3374
|
});
|
|
3345
3375
|
function d(u) {
|
|
3346
|
-
const
|
|
3376
|
+
const w = u.target, D = Array.from(w.files ?? []), P = n.field.props?.multiple ? D : D[0] ?? null;
|
|
3347
3377
|
C(P), N(P);
|
|
3348
3378
|
}
|
|
3349
|
-
return (u,
|
|
3379
|
+
return (u, w) => {
|
|
3350
3380
|
const D = Xt, P = Qt, x = Wt, K = ao, q = so, Q = Zt;
|
|
3351
|
-
return
|
|
3381
|
+
return r.value === "select" || r.value === "select_remote" ? ($(), H(P, ae({
|
|
3352
3382
|
key: 0,
|
|
3353
3383
|
class: "global-info-field-control"
|
|
3354
3384
|
}, u.field.props, {
|
|
3355
|
-
"popper-class":
|
|
3356
|
-
teleported:
|
|
3385
|
+
"popper-class": _.value,
|
|
3386
|
+
teleported: M.value,
|
|
3357
3387
|
"model-value": V.value,
|
|
3358
3388
|
placeholder: A.value,
|
|
3359
3389
|
disabled: i.value,
|
|
3360
|
-
"collapse-tags":
|
|
3361
|
-
"collapse-tags-tooltip":
|
|
3390
|
+
"collapse-tags": v.value,
|
|
3391
|
+
"collapse-tags-tooltip": v.value,
|
|
3362
3392
|
"max-collapse-tags": 1,
|
|
3363
|
-
filterable:
|
|
3364
|
-
remote:
|
|
3365
|
-
"remote-method":
|
|
3393
|
+
filterable: a.value || !!u.field.props?.filterable,
|
|
3394
|
+
remote: a.value || !!u.field.props?.remote,
|
|
3395
|
+
"remote-method": a.value ? R : u.field.props?.remoteMethod,
|
|
3366
3396
|
clearable: "",
|
|
3367
3397
|
onVisibleChange: le,
|
|
3368
3398
|
"onUpdate:modelValue": C,
|
|
3369
3399
|
onChange: N
|
|
3370
3400
|
}), {
|
|
3371
3401
|
default: U(() => [
|
|
3372
|
-
(
|
|
3373
|
-
key: String(
|
|
3374
|
-
label:
|
|
3375
|
-
value:
|
|
3402
|
+
($(!0), G(Se, null, ye(f.value, (T) => ($(), H(D, {
|
|
3403
|
+
key: String(T.value),
|
|
3404
|
+
label: T.label,
|
|
3405
|
+
value: T.value
|
|
3376
3406
|
}, {
|
|
3377
3407
|
default: U(() => [
|
|
3378
|
-
s.value ? (
|
|
3379
|
-
ne("div", ra, oe(
|
|
3380
|
-
|
|
3408
|
+
s.value ? ($(), G("div", oa, [
|
|
3409
|
+
ne("div", ra, oe(T.label), 1),
|
|
3410
|
+
T.labelDescr ? ($(), G("div", aa, oe(T.labelDescr), 1)) : fe("", !0)
|
|
3381
3411
|
])) : fe("", !0)
|
|
3382
3412
|
]),
|
|
3383
3413
|
_: 2
|
|
3384
3414
|
}, 1032, ["label", "value"]))), 128))
|
|
3385
3415
|
]),
|
|
3386
3416
|
_: 1
|
|
3387
|
-
}, 16, ["popper-class", "teleported", "model-value", "placeholder", "disabled", "collapse-tags", "collapse-tags-tooltip", "filterable", "remote", "remote-method"])) :
|
|
3417
|
+
}, 16, ["popper-class", "teleported", "model-value", "placeholder", "disabled", "collapse-tags", "collapse-tags-tooltip", "filterable", "remote", "remote-method"])) : r.value === "date" ? ($(), H(x, ae({
|
|
3388
3418
|
key: 1,
|
|
3389
3419
|
class: "global-info-field-control"
|
|
3390
3420
|
}, u.field.props, {
|
|
@@ -3395,7 +3425,7 @@ const oa = {
|
|
|
3395
3425
|
"value-format": "YYYY-MM-DD",
|
|
3396
3426
|
"onUpdate:modelValue": C,
|
|
3397
3427
|
onChange: N
|
|
3398
|
-
}), null, 16, ["model-value", "placeholder", "disabled"])) :
|
|
3428
|
+
}), null, 16, ["model-value", "placeholder", "disabled"])) : r.value === "number" ? ($(), H(K, ae({
|
|
3399
3429
|
key: 2,
|
|
3400
3430
|
class: "global-info-field-control"
|
|
3401
3431
|
}, u.field.props, {
|
|
@@ -3405,7 +3435,7 @@ const oa = {
|
|
|
3405
3435
|
"controls-position": "right",
|
|
3406
3436
|
"onUpdate:modelValue": C,
|
|
3407
3437
|
onChange: N
|
|
3408
|
-
}), null, 16, ["model-value", "placeholder", "disabled"])) :
|
|
3438
|
+
}), null, 16, ["model-value", "placeholder", "disabled"])) : r.value === "switch" ? ($(), H(q, ae({
|
|
3409
3439
|
key: 3,
|
|
3410
3440
|
class: "global-info-field-control global-info-field-control--switch"
|
|
3411
3441
|
}, u.field.props, {
|
|
@@ -3413,12 +3443,12 @@ const oa = {
|
|
|
3413
3443
|
disabled: i.value,
|
|
3414
3444
|
"onUpdate:modelValue": C,
|
|
3415
3445
|
onChange: N
|
|
3416
|
-
}), null, 16, ["model-value", "disabled"])) :
|
|
3446
|
+
}), null, 16, ["model-value", "disabled"])) : r.value === "file" ? ($(), G("div", {
|
|
3417
3447
|
key: 4,
|
|
3418
3448
|
class: We(["global-info-field-control global-info-field-control--file", {
|
|
3419
3449
|
"is-disabled": i.value,
|
|
3420
|
-
"is-empty": !
|
|
3421
|
-
"is-filled":
|
|
3450
|
+
"is-empty": !h.value,
|
|
3451
|
+
"is-filled": h.value
|
|
3422
3452
|
}]),
|
|
3423
3453
|
onClick: B
|
|
3424
3454
|
}, [
|
|
@@ -3432,38 +3462,38 @@ const oa = {
|
|
|
3432
3462
|
multiple: !!u.field.props?.multiple,
|
|
3433
3463
|
onChange: d
|
|
3434
3464
|
}, null, 40, sa),
|
|
3435
|
-
y.value.length ? (
|
|
3436
|
-
(
|
|
3437
|
-
key:
|
|
3465
|
+
y.value.length ? ($(), G("span", la, [
|
|
3466
|
+
($(!0), G(Se, null, ye(y.value, (T, X) => ($(), G(Se, {
|
|
3467
|
+
key: T.key
|
|
3438
3468
|
}, [
|
|
3439
|
-
|
|
3469
|
+
T.action ? ($(), G("button", {
|
|
3440
3470
|
key: 0,
|
|
3441
3471
|
class: "global-info-field-control__file-preview",
|
|
3442
3472
|
type: "button",
|
|
3443
|
-
onClick: Ut((ue) => E(
|
|
3444
|
-
}, oe(
|
|
3445
|
-
X < y.value.length - 1 ? (
|
|
3473
|
+
onClick: Ut((ue) => E(T), ["stop", "prevent"])
|
|
3474
|
+
}, oe(T.text), 9, ia)) : ($(), G("span", ca, oe(T.text), 1)),
|
|
3475
|
+
X < y.value.length - 1 ? ($(), G("span", ua, "、")) : fe("", !0)
|
|
3446
3476
|
], 64))), 128))
|
|
3447
|
-
])) :
|
|
3448
|
-
], 2)) :
|
|
3477
|
+
])) : h.value ? ($(), G("span", da, oe(F.value), 1)) : ($(), G("span", fa, oe(J(Z)("common.上传")), 1))
|
|
3478
|
+
], 2)) : r.value === "empty" ? ($(), H(Q, {
|
|
3449
3479
|
key: 5,
|
|
3450
3480
|
class: "global-info-field-control",
|
|
3451
3481
|
"model-value": "",
|
|
3452
3482
|
disabled: "",
|
|
3453
3483
|
placeholder: "-"
|
|
3454
|
-
})) : (
|
|
3484
|
+
})) : ($(), H(Q, ae({
|
|
3455
3485
|
key: 6,
|
|
3456
3486
|
class: ["global-info-field-control", {
|
|
3457
|
-
"global-info-field-control--textarea":
|
|
3458
|
-
"global-info-field-control--code":
|
|
3487
|
+
"global-info-field-control--textarea": l.includes(r.value),
|
|
3488
|
+
"global-info-field-control--code": r.value === "code"
|
|
3459
3489
|
}]
|
|
3460
3490
|
}, u.field.props, {
|
|
3461
|
-
"model-value":
|
|
3491
|
+
"model-value": S.value,
|
|
3462
3492
|
placeholder: A.value,
|
|
3463
3493
|
disabled: i.value,
|
|
3464
|
-
type:
|
|
3465
|
-
rows:
|
|
3466
|
-
resize:
|
|
3494
|
+
type: l.includes(r.value) ? "textarea" : "text",
|
|
3495
|
+
rows: l.includes(r.value) ? g.value : void 0,
|
|
3496
|
+
resize: I.value,
|
|
3467
3497
|
"onUpdate:modelValue": C,
|
|
3468
3498
|
onChange: N
|
|
3469
3499
|
}), null, 16, ["class", "model-value", "placeholder", "disabled", "type", "rows", "resize"]));
|
|
@@ -3484,42 +3514,42 @@ const oa = {
|
|
|
3484
3514
|
emptyText: { default: "-" }
|
|
3485
3515
|
},
|
|
3486
3516
|
setup(e) {
|
|
3487
|
-
const t = e, n = O(() =>
|
|
3488
|
-
function a
|
|
3489
|
-
Pn(
|
|
3517
|
+
const t = e, n = O(() => Mt(t.field)), o = O(() => n.value === "empty" || _e(t.value)), l = O(() => mn(t.field, t.value, t.emptyText)), c = O(() => hn(t.field, t.value, t.emptyText));
|
|
3518
|
+
function r(a) {
|
|
3519
|
+
Pn(a);
|
|
3490
3520
|
}
|
|
3491
|
-
return (
|
|
3521
|
+
return (a, s) => n.value === "html" && !o.value ? ($(), G("span", {
|
|
3492
3522
|
key: 0,
|
|
3493
3523
|
class: "global-info-field-value global-info-field-value--html",
|
|
3494
|
-
innerHTML:
|
|
3495
|
-
}, null, 8, ma)) : n.value === "code" && !o.value ? (
|
|
3496
|
-
(
|
|
3524
|
+
innerHTML: l.value
|
|
3525
|
+
}, null, 8, ma)) : n.value === "code" && !o.value ? ($(), G("pre", va, oe(l.value), 1)) : c.value.length ? ($(), G("span", ha, [
|
|
3526
|
+
($(!0), G(Se, null, ye(c.value, (i, v) => ($(), G(Se, {
|
|
3497
3527
|
key: i.key
|
|
3498
3528
|
}, [
|
|
3499
|
-
i.action ? (
|
|
3529
|
+
i.action ? ($(), G("button", {
|
|
3500
3530
|
key: 0,
|
|
3501
3531
|
class: "global-info-field-value__attachment-preview",
|
|
3502
3532
|
type: "button",
|
|
3503
|
-
onClick: (
|
|
3504
|
-
}, oe(i.text), 9, ga)) : (
|
|
3505
|
-
|
|
3533
|
+
onClick: (S) => r(i)
|
|
3534
|
+
}, oe(i.text), 9, ga)) : ($(), G("span", ya, oe(i.text), 1)),
|
|
3535
|
+
v < c.value.length - 1 ? ($(), G("span", ba, "、")) : fe("", !0)
|
|
3506
3536
|
], 64))), 128))
|
|
3507
|
-
])) : (
|
|
3537
|
+
])) : ($(), G("span", {
|
|
3508
3538
|
key: 3,
|
|
3509
3539
|
class: We(["global-info-field-value", {
|
|
3510
3540
|
"global-info-field-value--multi-row": n.value === "multi-row",
|
|
3511
3541
|
"global-info-field-value--file": n.value === "file" && !o.value
|
|
3512
3542
|
}])
|
|
3513
|
-
}, oe(
|
|
3543
|
+
}, oe(l.value), 3));
|
|
3514
3544
|
}
|
|
3515
|
-
}), jn = /* @__PURE__ */ be(Sa, [["__scopeId", "data-v-
|
|
3545
|
+
}), jn = /* @__PURE__ */ be(Sa, [["__scopeId", "data-v-0b0c0bd4"]]);
|
|
3516
3546
|
function _a(e) {
|
|
3517
3547
|
const t = kt(e);
|
|
3518
3548
|
return (t === "select" || t === "select_remote") && !!e.interface;
|
|
3519
3549
|
}
|
|
3520
3550
|
function st(e, t, n = {}, o = "") {
|
|
3521
|
-
const
|
|
3522
|
-
return [e, o,
|
|
3551
|
+
const l = t.key || t.id || t.code, r = Ne(t).map((a) => `${a}:${String(n[a] ?? "")}`).join("|");
|
|
3552
|
+
return [e, o, l, r].join("::");
|
|
3523
3553
|
}
|
|
3524
3554
|
function lt(e, t, n) {
|
|
3525
3555
|
return Array.isArray(e.options) && e.options.length > 0 ? t === n ? !0 : !t && Ne(e).length === 0 : !1;
|
|
@@ -3561,35 +3591,35 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3561
3591
|
renderConfig: {}
|
|
3562
3592
|
},
|
|
3563
3593
|
setup(e) {
|
|
3564
|
-
const t = e, n = Le(), o = O(() => t.model ?? t.section.model),
|
|
3594
|
+
const t = e, n = Le(), o = O(() => t.model ?? t.section.model), l = /* @__PURE__ */ new Map(), c = O(() => ft(
|
|
3565
3595
|
t.section.fields,
|
|
3566
3596
|
t.section,
|
|
3567
3597
|
t.renderConfig,
|
|
3568
3598
|
{ values: o.value }
|
|
3569
|
-
)),
|
|
3570
|
-
async (
|
|
3571
|
-
(
|
|
3599
|
+
)), r = ln(
|
|
3600
|
+
async (h, F, y) => t.actions.loadFieldOptions(t.section, h, F, y),
|
|
3601
|
+
(h) => `${t.section.key}:${M(h)}`
|
|
3572
3602
|
);
|
|
3573
|
-
function
|
|
3574
|
-
const y = { ...o.value, [
|
|
3575
|
-
(
|
|
3603
|
+
function a(h, F) {
|
|
3604
|
+
const y = { ...o.value, [h.code]: F };
|
|
3605
|
+
(h.cascadeClearFields ?? []).forEach((A) => {
|
|
3576
3606
|
y[A] = "";
|
|
3577
|
-
}), t.onUpdateModel?.(y), t.onUpdateModel || t.actions.updateField(t.section,
|
|
3607
|
+
}), t.onUpdateModel?.(y), t.onUpdateModel || t.actions.updateField(t.section, h, F), s(h, F, y), L(y, h);
|
|
3578
3608
|
}
|
|
3579
|
-
function s(
|
|
3609
|
+
function s(h, F, y) {
|
|
3580
3610
|
const A = t.renderConfig?.onFieldBusinessChange;
|
|
3581
3611
|
if (A)
|
|
3582
3612
|
try {
|
|
3583
|
-
const b = i(
|
|
3584
|
-
field:
|
|
3613
|
+
const b = i(h, F), j = {
|
|
3614
|
+
field: h,
|
|
3585
3615
|
value: F,
|
|
3586
3616
|
section: t.section,
|
|
3587
3617
|
model: y,
|
|
3588
3618
|
values: y,
|
|
3589
3619
|
node: t.node,
|
|
3590
3620
|
activeNode: t.node,
|
|
3591
|
-
sections:
|
|
3592
|
-
sectionValues:
|
|
3621
|
+
sections: v(),
|
|
3622
|
+
sectionValues: S(t.section, y),
|
|
3593
3623
|
actions: t.actions,
|
|
3594
3624
|
selectedOption: b[0],
|
|
3595
3625
|
selectedOptions: b
|
|
@@ -3601,53 +3631,53 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3601
3631
|
console.error("[GlobalInfoFormRenderer] field business change failed", b);
|
|
3602
3632
|
}
|
|
3603
3633
|
}
|
|
3604
|
-
function i(
|
|
3605
|
-
const y = dt(
|
|
3606
|
-
return (
|
|
3634
|
+
function i(h, F) {
|
|
3635
|
+
const y = dt(h, F);
|
|
3636
|
+
return (h.options ?? []).filter((A) => y.some((b) => Ze(A, b)));
|
|
3607
3637
|
}
|
|
3608
|
-
function
|
|
3638
|
+
function v() {
|
|
3609
3639
|
return Object.values(t.state.sectionMap);
|
|
3610
3640
|
}
|
|
3611
|
-
function
|
|
3612
|
-
const A =
|
|
3613
|
-
const j = b.key ===
|
|
3641
|
+
function S(h, F) {
|
|
3642
|
+
const A = v().flatMap((b) => {
|
|
3643
|
+
const j = b.key === h.key ? F : b.renderType === "table" ? b.rows : b.model;
|
|
3614
3644
|
return [b.key, b.id, b.setId, b.infSetId, b.code].filter(Boolean).map((C) => [String(C), j]);
|
|
3615
3645
|
});
|
|
3616
3646
|
return Object.fromEntries(A);
|
|
3617
3647
|
}
|
|
3618
|
-
async function
|
|
3619
|
-
const A = y, b =
|
|
3620
|
-
if (!An(F) && lt(
|
|
3621
|
-
|
|
3648
|
+
async function I(h, F = {}, y = o.value) {
|
|
3649
|
+
const A = y, b = M(h), j = st(t.section.key, h, A), C = l.get(b);
|
|
3650
|
+
if (!An(F) && lt(h, C, j)) {
|
|
3651
|
+
l.set(b, j);
|
|
3622
3652
|
return;
|
|
3623
3653
|
}
|
|
3624
3654
|
try {
|
|
3625
3655
|
if (F.searchText !== void 0) {
|
|
3626
|
-
await
|
|
3656
|
+
await r(h, A, F);
|
|
3627
3657
|
return;
|
|
3628
3658
|
}
|
|
3629
|
-
await t.actions.loadFieldOptions(t.section,
|
|
3659
|
+
await t.actions.loadFieldOptions(t.section, h, A, F), l.set(b, j);
|
|
3630
3660
|
} catch (re) {
|
|
3631
3661
|
console.error("[GlobalInfoFormRenderer] load field options failed", re);
|
|
3632
3662
|
}
|
|
3633
3663
|
}
|
|
3634
|
-
async function L(
|
|
3664
|
+
async function L(h = o.value, F) {
|
|
3635
3665
|
for (const y of c.value) {
|
|
3636
3666
|
if (F && !Rn(y, F)) continue;
|
|
3637
|
-
const A = Nn(y,
|
|
3667
|
+
const A = Nn(y, h);
|
|
3638
3668
|
if (!z(y, A)) continue;
|
|
3639
|
-
const b = st(t.section.key, y,
|
|
3669
|
+
const b = st(t.section.key, y, h), j = M(y), C = l.get(j);
|
|
3640
3670
|
if (lt(y, C, b)) {
|
|
3641
|
-
|
|
3671
|
+
l.set(j, b);
|
|
3642
3672
|
continue;
|
|
3643
3673
|
}
|
|
3644
|
-
C !== b && await
|
|
3674
|
+
C !== b && await I(y, xn(y, A), h);
|
|
3645
3675
|
}
|
|
3646
3676
|
}
|
|
3647
3677
|
Ee(
|
|
3648
3678
|
() => t.section.key,
|
|
3649
3679
|
() => {
|
|
3650
|
-
|
|
3680
|
+
l.clear();
|
|
3651
3681
|
}
|
|
3652
3682
|
), Ee(
|
|
3653
3683
|
() => t.editing,
|
|
@@ -3656,10 +3686,10 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3656
3686
|
},
|
|
3657
3687
|
{ immediate: !0 }
|
|
3658
3688
|
);
|
|
3659
|
-
function V(
|
|
3660
|
-
const F = o.value[
|
|
3689
|
+
function V(h) {
|
|
3690
|
+
const F = o.value[h.code];
|
|
3661
3691
|
return {
|
|
3662
|
-
field:
|
|
3692
|
+
field: h,
|
|
3663
3693
|
section: t.section,
|
|
3664
3694
|
sectionView: t.section,
|
|
3665
3695
|
node: t.node,
|
|
@@ -3668,30 +3698,30 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3668
3698
|
value: F,
|
|
3669
3699
|
state: t.state,
|
|
3670
3700
|
actions: t.actions,
|
|
3671
|
-
updateModelValue: (y) =>
|
|
3701
|
+
updateModelValue: (y) => a(h, y)
|
|
3672
3702
|
};
|
|
3673
3703
|
}
|
|
3674
|
-
function f(
|
|
3675
|
-
const F = String(
|
|
3704
|
+
function f(h) {
|
|
3705
|
+
const F = String(h.code || "").trim(), y = F ? `field-${F}` : "";
|
|
3676
3706
|
if (y && n[y]) return y;
|
|
3677
3707
|
const A = y.toLowerCase();
|
|
3678
3708
|
return A !== y && n[A] ? A : "";
|
|
3679
3709
|
}
|
|
3680
|
-
function
|
|
3681
|
-
return
|
|
3710
|
+
function _(h) {
|
|
3711
|
+
return h.span ? Math.min(Math.max(h.span, 1), 24) : 6;
|
|
3682
3712
|
}
|
|
3683
|
-
function
|
|
3684
|
-
return
|
|
3713
|
+
function M(h) {
|
|
3714
|
+
return h.key || h.id || h.code;
|
|
3685
3715
|
}
|
|
3686
|
-
function z(
|
|
3687
|
-
return zn(
|
|
3716
|
+
function z(h, F) {
|
|
3717
|
+
return zn(h, F, t.editing);
|
|
3688
3718
|
}
|
|
3689
|
-
function h
|
|
3690
|
-
return
|
|
3719
|
+
function g(h) {
|
|
3720
|
+
return h.required || h.isRequired;
|
|
3691
3721
|
}
|
|
3692
|
-
return (
|
|
3722
|
+
return (h, F) => {
|
|
3693
3723
|
const y = en, A = io, b = lo, j = tn;
|
|
3694
|
-
return
|
|
3724
|
+
return $(), H(j, {
|
|
3695
3725
|
class: "global-info-form-renderer",
|
|
3696
3726
|
model: o.value,
|
|
3697
3727
|
"label-position": "top"
|
|
@@ -3699,9 +3729,9 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3699
3729
|
default: U(() => [
|
|
3700
3730
|
Ie(b, { gutter: 24 }, {
|
|
3701
3731
|
default: U(() => [
|
|
3702
|
-
(
|
|
3703
|
-
key:
|
|
3704
|
-
span:
|
|
3732
|
+
($(!0), G(Se, null, ye(c.value, (C) => ($(), H(A, {
|
|
3733
|
+
key: M(C),
|
|
3734
|
+
span: _(C)
|
|
3705
3735
|
}, {
|
|
3706
3736
|
default: U(() => [
|
|
3707
3737
|
Ie(y, ae({
|
|
@@ -3710,26 +3740,26 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3710
3740
|
}, C.formItemProps), {
|
|
3711
3741
|
label: U(() => [
|
|
3712
3742
|
ne("span", wa, [
|
|
3713
|
-
|
|
3743
|
+
g(C) ? ($(), G("span", Ia, "*")) : fe("", !0),
|
|
3714
3744
|
He(" " + oe(C.label), 1)
|
|
3715
3745
|
])
|
|
3716
3746
|
]),
|
|
3717
3747
|
default: U(() => [
|
|
3718
|
-
f(C) ? te(
|
|
3748
|
+
f(C) ? te(h.$slots, f(C), ae({
|
|
3719
3749
|
key: 0,
|
|
3720
3750
|
ref_for: !0
|
|
3721
|
-
}, V(C)), void 0, !0) :
|
|
3751
|
+
}, V(C)), void 0, !0) : h.editing && !C.readonly ? ($(), H(Vn, {
|
|
3722
3752
|
key: 1,
|
|
3723
3753
|
field: C,
|
|
3724
3754
|
"model-value": o.value[C.code],
|
|
3725
|
-
section:
|
|
3726
|
-
onLoadOptions: (N) =>
|
|
3727
|
-
"onUpdate:modelValue": (N) =>
|
|
3728
|
-
}, null, 8, ["field", "model-value", "section", "onLoadOptions", "onUpdate:modelValue"])) : (
|
|
3755
|
+
section: h.section,
|
|
3756
|
+
onLoadOptions: (N) => I(C, N),
|
|
3757
|
+
"onUpdate:modelValue": (N) => a(C, N)
|
|
3758
|
+
}, null, 8, ["field", "model-value", "section", "onLoadOptions", "onUpdate:modelValue"])) : ($(), H(jn, {
|
|
3729
3759
|
key: 2,
|
|
3730
3760
|
field: C,
|
|
3731
3761
|
value: o.value[C.code],
|
|
3732
|
-
section:
|
|
3762
|
+
section: h.section
|
|
3733
3763
|
}, null, 8, ["field", "value", "section"]))
|
|
3734
3764
|
]),
|
|
3735
3765
|
_: 2
|
|
@@ -3745,7 +3775,7 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3745
3775
|
}, 8, ["model"]);
|
|
3746
3776
|
};
|
|
3747
3777
|
}
|
|
3748
|
-
}), Ca = /* @__PURE__ */ be($a, [["__scopeId", "data-v-
|
|
3778
|
+
}), Ca = /* @__PURE__ */ be($a, [["__scopeId", "data-v-54b269f1"]]), ka = /* @__PURE__ */ pe({
|
|
3749
3779
|
name: "GlobalInfoDeleteConfirm",
|
|
3750
3780
|
__name: "GlobalInfoDeleteConfirm",
|
|
3751
3781
|
props: {
|
|
@@ -3757,14 +3787,14 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3757
3787
|
setup(e) {
|
|
3758
3788
|
return (t, n) => {
|
|
3759
3789
|
const o = co;
|
|
3760
|
-
return
|
|
3790
|
+
return $(), H(o, {
|
|
3761
3791
|
title: t.title,
|
|
3762
3792
|
"confirm-button-text": t.confirmText,
|
|
3763
3793
|
"cancel-button-text": t.cancelText,
|
|
3764
3794
|
width: "240",
|
|
3765
3795
|
"popper-class": "global-info-delete-confirm",
|
|
3766
|
-
onConfirm: n[0] || (n[0] = (
|
|
3767
|
-
onCancel: n[1] || (n[1] = (
|
|
3796
|
+
onConfirm: n[0] || (n[0] = (l) => t.$emit("confirm")),
|
|
3797
|
+
onCancel: n[1] || (n[1] = (l) => t.$emit("cancel"))
|
|
3768
3798
|
}, {
|
|
3769
3799
|
reference: U(() => [
|
|
3770
3800
|
te(t.$slots, "default")
|
|
@@ -3773,7 +3803,7 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3773
3803
|
}, 8, ["title", "confirm-button-text", "cancel-button-text"]);
|
|
3774
3804
|
};
|
|
3775
3805
|
}
|
|
3776
|
-
}),
|
|
3806
|
+
}), Ma = { class: "global-info-table-renderer__table-scroll" }, Ta = { class: "global-info-table-renderer__header" }, Oa = {
|
|
3777
3807
|
key: 0,
|
|
3778
3808
|
class: "global-info-table-renderer__required"
|
|
3779
3809
|
}, Da = /* @__PURE__ */ pe({
|
|
@@ -3792,11 +3822,11 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3792
3822
|
setup(e) {
|
|
3793
3823
|
const t = e, n = Le(), o = O(
|
|
3794
3824
|
() => t.section.fields.some((d) => Vt(d))
|
|
3795
|
-
),
|
|
3825
|
+
), l = O(() => o.value), c = O(
|
|
3796
3826
|
() => t.renderConfig?.sequenceLabel ?? Z("common.序号")
|
|
3797
|
-
),
|
|
3827
|
+
), r = O(
|
|
3798
3828
|
() => t.renderConfig?.sequenceWidth ?? 56
|
|
3799
|
-
),
|
|
3829
|
+
), a = O(() => {
|
|
3800
3830
|
const d = t.renderConfig?.sequenceStart;
|
|
3801
3831
|
return typeof d == "number" && Number.isFinite(d) ? d : 1;
|
|
3802
3832
|
}), s = O(() => {
|
|
@@ -3806,17 +3836,17 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3806
3836
|
t.renderConfig,
|
|
3807
3837
|
{ rows: t.section.rows, values: t.section.model }
|
|
3808
3838
|
);
|
|
3809
|
-
return
|
|
3810
|
-
}), i = /* @__PURE__ */ new Map(),
|
|
3811
|
-
async (d, u,
|
|
3839
|
+
return l.value ? d.filter((u) => !re(u)) : d;
|
|
3840
|
+
}), i = /* @__PURE__ */ new Map(), v = ln(
|
|
3841
|
+
async (d, u, w) => t.actions.loadFieldOptions(t.section, d, u, w),
|
|
3812
3842
|
(d, u) => `${t.section.key}:${B(u)}:${C(d)}`
|
|
3813
3843
|
);
|
|
3814
|
-
function
|
|
3844
|
+
function S(d) {
|
|
3815
3845
|
t.actions.deleteRow(t.section, d);
|
|
3816
3846
|
}
|
|
3817
|
-
function
|
|
3818
|
-
const
|
|
3819
|
-
return t.showDelete && (typeof
|
|
3847
|
+
function I(d, u) {
|
|
3848
|
+
const w = t.renderConfig?.rowDeleteVisibleRule;
|
|
3849
|
+
return t.showDelete && (typeof w == "function" ? w({
|
|
3820
3850
|
section: t.section,
|
|
3821
3851
|
row: d,
|
|
3822
3852
|
rowIndex: u,
|
|
@@ -3825,43 +3855,43 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3825
3855
|
actions: t.actions
|
|
3826
3856
|
}) : d.allowDelete !== !1);
|
|
3827
3857
|
}
|
|
3828
|
-
function L(d, u,
|
|
3829
|
-
const P = t.section.rows.slice(), x =
|
|
3858
|
+
function L(d, u, w, D) {
|
|
3859
|
+
const P = t.section.rows.slice(), x = w.cascadeClearFields ?? [], K = {
|
|
3830
3860
|
...d,
|
|
3831
3861
|
__rowKey: B(d),
|
|
3832
|
-
[
|
|
3862
|
+
[w.code]: D
|
|
3833
3863
|
};
|
|
3834
3864
|
x.forEach((q) => {
|
|
3835
3865
|
K[q] = "";
|
|
3836
3866
|
}), P[u] = {
|
|
3837
3867
|
...K
|
|
3838
|
-
}, t.actions.updateTableRows(t.section, P), V(
|
|
3868
|
+
}, t.actions.updateTableRows(t.section, P), V(w, D, K, u, P), g(w, K);
|
|
3839
3869
|
}
|
|
3840
|
-
function V(d, u,
|
|
3870
|
+
function V(d, u, w, D, P) {
|
|
3841
3871
|
const x = t.renderConfig?.onFieldBusinessChange;
|
|
3842
3872
|
if (x)
|
|
3843
3873
|
try {
|
|
3844
|
-
const K = f(d, u), q = { ...t.section.model, ...
|
|
3874
|
+
const K = f(d, u), q = { ...t.section.model, ...w }, Q = {
|
|
3845
3875
|
field: d,
|
|
3846
3876
|
value: u,
|
|
3847
3877
|
section: t.section,
|
|
3848
3878
|
model: q,
|
|
3849
3879
|
values: q,
|
|
3850
|
-
row:
|
|
3880
|
+
row: w,
|
|
3851
3881
|
rowIndex: D,
|
|
3852
3882
|
rows: P,
|
|
3853
3883
|
node: t.node,
|
|
3854
3884
|
activeNode: t.node,
|
|
3855
|
-
sections:
|
|
3856
|
-
sectionValues:
|
|
3885
|
+
sections: _(),
|
|
3886
|
+
sectionValues: M(t.section, P),
|
|
3857
3887
|
actions: t.actions,
|
|
3858
3888
|
selectedOption: K[0],
|
|
3859
3889
|
selectedOptions: K
|
|
3860
3890
|
};
|
|
3861
|
-
Promise.resolve(x(Q)).catch((
|
|
3891
|
+
Promise.resolve(x(Q)).catch((T) => {
|
|
3862
3892
|
console.error(
|
|
3863
3893
|
"[GlobalInfoTableRenderer] field business change failed",
|
|
3864
|
-
|
|
3894
|
+
T
|
|
3865
3895
|
);
|
|
3866
3896
|
});
|
|
3867
3897
|
} catch (K) {
|
|
@@ -3872,16 +3902,16 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3872
3902
|
}
|
|
3873
3903
|
}
|
|
3874
3904
|
function f(d, u) {
|
|
3875
|
-
const
|
|
3905
|
+
const w = dt(d, u);
|
|
3876
3906
|
return (d.options ?? []).filter(
|
|
3877
|
-
(D) =>
|
|
3907
|
+
(D) => w.some((P) => Ze(D, P))
|
|
3878
3908
|
);
|
|
3879
3909
|
}
|
|
3880
|
-
function
|
|
3910
|
+
function _() {
|
|
3881
3911
|
return Object.values(t.state.sectionMap);
|
|
3882
3912
|
}
|
|
3883
|
-
function
|
|
3884
|
-
const D =
|
|
3913
|
+
function M(d, u) {
|
|
3914
|
+
const D = _().flatMap((P) => {
|
|
3885
3915
|
const x = P.key === d.key ? u : P.renderType === "table" ? P.rows : P.model;
|
|
3886
3916
|
return [
|
|
3887
3917
|
P.key,
|
|
@@ -3893,35 +3923,35 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3893
3923
|
});
|
|
3894
3924
|
return Object.fromEntries(D);
|
|
3895
3925
|
}
|
|
3896
|
-
async function z(d, u,
|
|
3926
|
+
async function z(d, u, w = {}, D = u) {
|
|
3897
3927
|
const P = B(D), x = `${P}:${C(d)}`, K = st(
|
|
3898
3928
|
t.section.key,
|
|
3899
3929
|
d,
|
|
3900
3930
|
D,
|
|
3901
3931
|
P
|
|
3902
3932
|
), q = i.get(x);
|
|
3903
|
-
if (!An(
|
|
3933
|
+
if (!An(w) && lt(d, q, K)) {
|
|
3904
3934
|
i.set(x, K);
|
|
3905
3935
|
return;
|
|
3906
3936
|
}
|
|
3907
3937
|
try {
|
|
3908
|
-
if (
|
|
3909
|
-
await
|
|
3938
|
+
if (w.searchText !== void 0) {
|
|
3939
|
+
await v(d, D, w);
|
|
3910
3940
|
return;
|
|
3911
3941
|
}
|
|
3912
3942
|
await t.actions.loadFieldOptions(
|
|
3913
3943
|
t.section,
|
|
3914
3944
|
d,
|
|
3915
3945
|
D,
|
|
3916
|
-
|
|
3946
|
+
w
|
|
3917
3947
|
), i.set(x, K);
|
|
3918
|
-
} catch (
|
|
3919
|
-
console.error("[GlobalInfoTableRenderer] load field options failed",
|
|
3948
|
+
} catch (T) {
|
|
3949
|
+
console.error("[GlobalInfoTableRenderer] load field options failed", T);
|
|
3920
3950
|
}
|
|
3921
3951
|
}
|
|
3922
|
-
async function
|
|
3923
|
-
const
|
|
3924
|
-
for (const D of
|
|
3952
|
+
async function g(d, u) {
|
|
3953
|
+
const w = u ? [u] : t.section.rows;
|
|
3954
|
+
for (const D of w) {
|
|
3925
3955
|
const P = B(D);
|
|
3926
3956
|
for (const x of s.value) {
|
|
3927
3957
|
if (d && !Rn(x, d))
|
|
@@ -3933,12 +3963,12 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3933
3963
|
x,
|
|
3934
3964
|
D,
|
|
3935
3965
|
P
|
|
3936
|
-
), Q = `${P}:${C(x)}`,
|
|
3937
|
-
if (lt(x,
|
|
3966
|
+
), Q = `${P}:${C(x)}`, T = i.get(Q);
|
|
3967
|
+
if (lt(x, T, q)) {
|
|
3938
3968
|
i.set(Q, q);
|
|
3939
3969
|
continue;
|
|
3940
3970
|
}
|
|
3941
|
-
|
|
3971
|
+
T !== q && await z(
|
|
3942
3972
|
x,
|
|
3943
3973
|
D,
|
|
3944
3974
|
xn(x, K)
|
|
@@ -3946,7 +3976,7 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3946
3976
|
}
|
|
3947
3977
|
}
|
|
3948
3978
|
}
|
|
3949
|
-
function
|
|
3979
|
+
function h(d, u, w) {
|
|
3950
3980
|
const D = u[d.code];
|
|
3951
3981
|
return {
|
|
3952
3982
|
field: d,
|
|
@@ -3954,20 +3984,20 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3954
3984
|
sectionView: t.section,
|
|
3955
3985
|
node: t.node,
|
|
3956
3986
|
row: u,
|
|
3957
|
-
rowIndex:
|
|
3987
|
+
rowIndex: w,
|
|
3958
3988
|
editing: t.editing,
|
|
3959
3989
|
modelValue: D,
|
|
3960
3990
|
value: D,
|
|
3961
3991
|
state: t.state,
|
|
3962
3992
|
actions: t.actions,
|
|
3963
|
-
updateModelValue: (P) => L(u,
|
|
3993
|
+
updateModelValue: (P) => L(u, w, d, P)
|
|
3964
3994
|
};
|
|
3965
3995
|
}
|
|
3966
3996
|
function F(d) {
|
|
3967
|
-
const u = String(d.code || "").trim(),
|
|
3968
|
-
if (
|
|
3969
|
-
const D =
|
|
3970
|
-
return D !==
|
|
3997
|
+
const u = String(d.code || "").trim(), w = u ? `field-${u}` : "";
|
|
3998
|
+
if (w && n[w]) return w;
|
|
3999
|
+
const D = w.toLowerCase();
|
|
4000
|
+
return D !== w && n[D] ? D : "";
|
|
3971
4001
|
}
|
|
3972
4002
|
function y(d) {
|
|
3973
4003
|
return !d.readonly && !d.disabled;
|
|
@@ -3986,7 +4016,7 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3986
4016
|
return d.key || d.id || d.code;
|
|
3987
4017
|
}
|
|
3988
4018
|
function N(d) {
|
|
3989
|
-
return
|
|
4019
|
+
return a.value + d;
|
|
3990
4020
|
}
|
|
3991
4021
|
function re(d) {
|
|
3992
4022
|
return Vt(d);
|
|
@@ -3997,11 +4027,11 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3997
4027
|
const u = d.__rowKey ?? d.key ?? d.id ?? d.setId ?? d.infSetId;
|
|
3998
4028
|
if (u != null && u !== "")
|
|
3999
4029
|
return String(u);
|
|
4000
|
-
const
|
|
4030
|
+
const w = d, D = R.get(w);
|
|
4001
4031
|
if (D) return D;
|
|
4002
4032
|
le += 1;
|
|
4003
4033
|
const P = `local-${le}`;
|
|
4004
|
-
return R.set(
|
|
4034
|
+
return R.set(w, P), P;
|
|
4005
4035
|
}
|
|
4006
4036
|
function E(d) {
|
|
4007
4037
|
return d.required || d.isRequired;
|
|
@@ -4014,15 +4044,15 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
4014
4044
|
), Ee(
|
|
4015
4045
|
() => t.editing,
|
|
4016
4046
|
() => {
|
|
4017
|
-
|
|
4047
|
+
g();
|
|
4018
4048
|
},
|
|
4019
4049
|
{ immediate: !0 }
|
|
4020
4050
|
), (d, u) => {
|
|
4021
|
-
const
|
|
4022
|
-
return
|
|
4051
|
+
const w = on, D = eo("Delete"), P = Jt, x = $t, K = nn;
|
|
4052
|
+
return $(), G("div", {
|
|
4023
4053
|
class: We(["global-info-table-renderer", { "global-info-table-renderer--editing": d.editing }])
|
|
4024
4054
|
}, [
|
|
4025
|
-
ne("div",
|
|
4055
|
+
ne("div", Ma, [
|
|
4026
4056
|
Ie(K, {
|
|
4027
4057
|
class: "global-info-table-renderer__table",
|
|
4028
4058
|
data: d.section.rows,
|
|
@@ -4031,14 +4061,14 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
4031
4061
|
"row-key": B
|
|
4032
4062
|
}, {
|
|
4033
4063
|
default: U(() => [
|
|
4034
|
-
|
|
4064
|
+
l.value ? ($(), H(w, {
|
|
4035
4065
|
key: 0,
|
|
4036
4066
|
type: "index",
|
|
4037
4067
|
label: c.value,
|
|
4038
|
-
width:
|
|
4068
|
+
width: r.value,
|
|
4039
4069
|
index: N
|
|
4040
4070
|
}, null, 8, ["label", "width"])) : fe("", !0),
|
|
4041
|
-
(
|
|
4071
|
+
($(!0), G(Se, null, ye(s.value, (q) => ($(), H(w, {
|
|
4042
4072
|
key: C(q),
|
|
4043
4073
|
prop: q.code,
|
|
4044
4074
|
label: q.label,
|
|
@@ -4046,45 +4076,45 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
4046
4076
|
"min-width": j(q)
|
|
4047
4077
|
}, {
|
|
4048
4078
|
header: U(() => [
|
|
4049
|
-
ne("span",
|
|
4050
|
-
E(q) ? (
|
|
4079
|
+
ne("span", Ta, [
|
|
4080
|
+
E(q) ? ($(), G("span", Oa, "*")) : fe("", !0),
|
|
4051
4081
|
ne("span", null, oe(q.label), 1)
|
|
4052
4082
|
])
|
|
4053
4083
|
]),
|
|
4054
|
-
default: U(({ row: Q, $index:
|
|
4084
|
+
default: U(({ row: Q, $index: T }) => [
|
|
4055
4085
|
F(q) ? te(d.$slots, F(q), ae({
|
|
4056
4086
|
key: 0,
|
|
4057
4087
|
ref_for: !0
|
|
4058
|
-
},
|
|
4088
|
+
}, h(q, Q, T)), void 0, !0) : d.editing && y(q) ? ($(), H(Vn, {
|
|
4059
4089
|
key: 1,
|
|
4060
4090
|
field: q,
|
|
4061
4091
|
"model-value": Q[q.code],
|
|
4062
4092
|
section: d.section,
|
|
4063
4093
|
row: Q,
|
|
4064
|
-
"row-index":
|
|
4094
|
+
"row-index": T,
|
|
4065
4095
|
onLoadOptions: (X) => z(q, Q, X),
|
|
4066
|
-
"onUpdate:modelValue": (X) => L(Q,
|
|
4067
|
-
}, null, 8, ["field", "model-value", "section", "row", "row-index", "onLoadOptions", "onUpdate:modelValue"])) : (
|
|
4096
|
+
"onUpdate:modelValue": (X) => L(Q, T, q, X)
|
|
4097
|
+
}, null, 8, ["field", "model-value", "section", "row", "row-index", "onLoadOptions", "onUpdate:modelValue"])) : ($(), H(jn, {
|
|
4068
4098
|
key: 2,
|
|
4069
4099
|
field: q,
|
|
4070
4100
|
value: Q[q.code],
|
|
4071
4101
|
section: d.section,
|
|
4072
4102
|
row: Q,
|
|
4073
|
-
"row-index":
|
|
4103
|
+
"row-index": T
|
|
4074
4104
|
}, null, 8, ["field", "value", "section", "row", "row-index"]))
|
|
4075
4105
|
]),
|
|
4076
4106
|
_: 2
|
|
4077
4107
|
}, 1032, ["prop", "label", "width", "min-width"]))), 128)),
|
|
4078
|
-
d.editing ? (
|
|
4108
|
+
d.editing ? ($(), H(w, {
|
|
4079
4109
|
key: 1,
|
|
4080
4110
|
label: J(Z)("common.操作"),
|
|
4081
4111
|
width: "104",
|
|
4082
4112
|
fixed: "right"
|
|
4083
4113
|
}, {
|
|
4084
4114
|
default: U(({ row: q, $index: Q }) => [
|
|
4085
|
-
|
|
4115
|
+
I(q, Q) ? ($(), H(ka, {
|
|
4086
4116
|
key: 0,
|
|
4087
|
-
onConfirm: (
|
|
4117
|
+
onConfirm: (T) => S(Q)
|
|
4088
4118
|
}, {
|
|
4089
4119
|
default: U(() => [
|
|
4090
4120
|
Ie(x, {
|
|
@@ -4116,7 +4146,7 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
4116
4146
|
], 2);
|
|
4117
4147
|
};
|
|
4118
4148
|
}
|
|
4119
|
-
}), Fa = /* @__PURE__ */ be(Da, [["__scopeId", "data-v-
|
|
4149
|
+
}), Fa = /* @__PURE__ */ be(Da, [["__scopeId", "data-v-7dc68187"]]), Ba = /* @__PURE__ */ pe({
|
|
4120
4150
|
name: "GlobalInfoAutoRenderer",
|
|
4121
4151
|
__name: "GlobalInfoAutoRenderer",
|
|
4122
4152
|
props: {
|
|
@@ -4128,7 +4158,7 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
4128
4158
|
renderConfig: {}
|
|
4129
4159
|
},
|
|
4130
4160
|
setup(e) {
|
|
4131
|
-
return (t, n) => t.section.renderType === "table" ? (
|
|
4161
|
+
return (t, n) => t.section.renderType === "table" ? ($(), H(Fa, {
|
|
4132
4162
|
key: 0,
|
|
4133
4163
|
section: t.section,
|
|
4134
4164
|
node: t.node,
|
|
@@ -4136,7 +4166,7 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
4136
4166
|
state: t.state,
|
|
4137
4167
|
actions: t.actions,
|
|
4138
4168
|
"render-config": t.renderConfig
|
|
4139
|
-
}, null, 8, ["section", "node", "editing", "state", "actions", "render-config"])) : (
|
|
4169
|
+
}, null, 8, ["section", "node", "editing", "state", "actions", "render-config"])) : ($(), H(Ca, {
|
|
4140
4170
|
key: 1,
|
|
4141
4171
|
section: t.section,
|
|
4142
4172
|
node: t.node,
|
|
@@ -4153,12 +4183,12 @@ function qn(e) {
|
|
|
4153
4183
|
function Gn(e, t) {
|
|
4154
4184
|
return qn(e) || Kn(t?.code);
|
|
4155
4185
|
}
|
|
4156
|
-
function
|
|
4186
|
+
function Tt(e, t, n) {
|
|
4157
4187
|
if (!n) return "";
|
|
4158
4188
|
const o = `${t}-${n}`;
|
|
4159
4189
|
if (e[o]) return o;
|
|
4160
|
-
const
|
|
4161
|
-
return
|
|
4190
|
+
const l = o.toLowerCase();
|
|
4191
|
+
return l !== o && e[l] ? l : "";
|
|
4162
4192
|
}
|
|
4163
4193
|
function Kn(e) {
|
|
4164
4194
|
return typeof e == "string" ? e.trim() : "";
|
|
@@ -4183,38 +4213,38 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4183
4213
|
values: t.section.model,
|
|
4184
4214
|
rows: t.section.renderType === "table" ? t.section.rows : void 0
|
|
4185
4215
|
}
|
|
4186
|
-
)),
|
|
4187
|
-
const s =
|
|
4216
|
+
)), l = O(() => t.editing ?? t.actions.isEditing(t.section)), c = O(() => t.section.renderType === "table" && t.section.rows.length === 0 || o.value.length === 0), r = O(() => {
|
|
4217
|
+
const s = Tt(
|
|
4188
4218
|
n,
|
|
4189
4219
|
"section",
|
|
4190
4220
|
Gn(t.node ?? {}, t.section)
|
|
4191
|
-
), i =
|
|
4221
|
+
), i = a(t.section.renderType);
|
|
4192
4222
|
return [
|
|
4193
4223
|
s,
|
|
4194
4224
|
i,
|
|
4195
4225
|
"default"
|
|
4196
|
-
].find((
|
|
4226
|
+
].find((v) => !!(v && n[v])) ?? "";
|
|
4197
4227
|
});
|
|
4198
|
-
function
|
|
4228
|
+
function a(s) {
|
|
4199
4229
|
return s === "form" || s === "table" ? s : "";
|
|
4200
4230
|
}
|
|
4201
|
-
return (s, i) =>
|
|
4231
|
+
return (s, i) => r.value ? te(s.$slots, r.value, {
|
|
4202
4232
|
key: 0,
|
|
4203
4233
|
section: s.section,
|
|
4204
4234
|
sectionView: s.section,
|
|
4205
4235
|
node: s.node,
|
|
4206
|
-
editing:
|
|
4236
|
+
editing: l.value,
|
|
4207
4237
|
isEmpty: c.value,
|
|
4208
4238
|
empty: c.value,
|
|
4209
4239
|
fields: o.value,
|
|
4210
4240
|
renderConfig: s.renderConfig,
|
|
4211
4241
|
state: s.state,
|
|
4212
4242
|
actions: s.actions
|
|
4213
|
-
}) : (
|
|
4243
|
+
}) : ($(), H(Ba, {
|
|
4214
4244
|
key: 1,
|
|
4215
4245
|
section: s.section,
|
|
4216
4246
|
node: s.node,
|
|
4217
|
-
editing:
|
|
4247
|
+
editing: l.value,
|
|
4218
4248
|
state: s.state,
|
|
4219
4249
|
actions: s.actions,
|
|
4220
4250
|
"render-config": s.renderConfig
|
|
@@ -4242,8 +4272,8 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4242
4272
|
() => {
|
|
4243
4273
|
o.value = !1;
|
|
4244
4274
|
}
|
|
4245
|
-
), to((c) => (
|
|
4246
|
-
function
|
|
4275
|
+
), to((c) => (l(c), !1));
|
|
4276
|
+
function l(c) {
|
|
4247
4277
|
o.value = !0, console.error(`[GlobalInfoSlotErrorBoundary] ${e.label || "section"} slot render failed`, c), t("error", c);
|
|
4248
4278
|
}
|
|
4249
4279
|
return () => {
|
|
@@ -4252,7 +4282,7 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4252
4282
|
try {
|
|
4253
4283
|
return n.default?.() ?? null;
|
|
4254
4284
|
} catch (c) {
|
|
4255
|
-
return
|
|
4285
|
+
return l(c), n.fallback?.() ?? null;
|
|
4256
4286
|
}
|
|
4257
4287
|
};
|
|
4258
4288
|
}
|
|
@@ -4276,7 +4306,7 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4276
4306
|
onSave: { type: Function }
|
|
4277
4307
|
},
|
|
4278
4308
|
setup(e) {
|
|
4279
|
-
const t = e, n = Le(), o = ge(!1),
|
|
4309
|
+
const t = e, n = Le(), o = ge(!1), l = ge(null), c = ge(null), r = O(() => !!t.hideHeader), a = O(() => t.actions.getSectionStatus(t.node)), s = O(
|
|
4280
4310
|
() => t.actions.getSection(t.node) ?? c.value
|
|
4281
4311
|
), i = O(() => {
|
|
4282
4312
|
const b = s.value;
|
|
@@ -4289,51 +4319,51 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4289
4319
|
rows: b.renderType === "table" ? b.rows : void 0
|
|
4290
4320
|
}
|
|
4291
4321
|
) : [];
|
|
4292
|
-
}),
|
|
4322
|
+
}), v = O(
|
|
4293
4323
|
() => s.value?.title || t.node.tagName || t.node.label || "-"
|
|
4294
|
-
),
|
|
4324
|
+
), S = O(
|
|
4295
4325
|
() => !!(s.value && t.actions.isEditing(s.value))
|
|
4296
|
-
),
|
|
4326
|
+
), I = O(
|
|
4297
4327
|
() => s.value?.renderType === "table"
|
|
4298
|
-
), L = O(() => o.value ||
|
|
4299
|
-
() =>
|
|
4328
|
+
), L = O(() => o.value || a.value.loading), V = O(
|
|
4329
|
+
() => M(l.value || a.value.error)
|
|
4300
4330
|
), f = O(() => {
|
|
4301
4331
|
const b = s.value;
|
|
4302
4332
|
return b ? b.renderType === "table" && b.rows.length === 0 || i.value.length === 0 : !0;
|
|
4303
|
-
}),
|
|
4333
|
+
}), _ = O(() => ({
|
|
4304
4334
|
node: t.node,
|
|
4305
4335
|
section: s.value,
|
|
4306
4336
|
sectionView: s.value,
|
|
4307
4337
|
fields: i.value,
|
|
4308
4338
|
renderConfig: t.renderConfig,
|
|
4309
|
-
title:
|
|
4310
|
-
editing:
|
|
4339
|
+
title: v.value,
|
|
4340
|
+
editing: S.value,
|
|
4311
4341
|
loading: L.value,
|
|
4312
|
-
error:
|
|
4342
|
+
error: l.value || a.value.error,
|
|
4313
4343
|
errorMessage: V.value,
|
|
4314
4344
|
isEmpty: f.value,
|
|
4315
4345
|
empty: f.value,
|
|
4316
|
-
sectionStatus:
|
|
4346
|
+
sectionStatus: a.value,
|
|
4317
4347
|
state: t.state,
|
|
4318
4348
|
actions: t.actions,
|
|
4319
4349
|
reload: A,
|
|
4320
4350
|
handleEdit: z,
|
|
4321
|
-
handleCancel:
|
|
4322
|
-
handleAddTableRow:
|
|
4351
|
+
handleCancel: g,
|
|
4352
|
+
handleAddTableRow: h,
|
|
4323
4353
|
handleSave: F
|
|
4324
4354
|
}));
|
|
4325
|
-
function
|
|
4355
|
+
function M(b) {
|
|
4326
4356
|
return b ? b instanceof Error ? b.message : String(b) : "";
|
|
4327
4357
|
}
|
|
4328
4358
|
async function z() {
|
|
4329
4359
|
const b = s.value;
|
|
4330
4360
|
b && (await t.onEdit?.(b, t.node), t.onEdit || t.actions.startEdit(b));
|
|
4331
4361
|
}
|
|
4332
|
-
async function
|
|
4362
|
+
async function g() {
|
|
4333
4363
|
const b = s.value;
|
|
4334
4364
|
b && (await t.onCancel?.(b, t.node), t.onCancel || t.actions.cancelEdit(b));
|
|
4335
4365
|
}
|
|
4336
|
-
function
|
|
4366
|
+
function h() {
|
|
4337
4367
|
const b = s.value;
|
|
4338
4368
|
if (!b) return;
|
|
4339
4369
|
const j = b.fields.reduce(
|
|
@@ -4352,18 +4382,18 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4352
4382
|
}
|
|
4353
4383
|
await t.actions.saveSection(b);
|
|
4354
4384
|
} catch (j) {
|
|
4355
|
-
|
|
4385
|
+
l.value = j, console.error("[GlobalInfoSectionBlock] save section failed", j);
|
|
4356
4386
|
}
|
|
4357
4387
|
}
|
|
4358
4388
|
function y(b) {
|
|
4359
|
-
|
|
4389
|
+
l.value = b;
|
|
4360
4390
|
}
|
|
4361
4391
|
async function A() {
|
|
4362
|
-
o.value = !0,
|
|
4392
|
+
o.value = !0, l.value = null, c.value = null;
|
|
4363
4393
|
try {
|
|
4364
4394
|
c.value = await t.actions.loadSection(t.node);
|
|
4365
4395
|
} catch (b) {
|
|
4366
|
-
|
|
4396
|
+
l.value = b, console.error("[GlobalInfoSectionBlock] load section failed", b);
|
|
4367
4397
|
} finally {
|
|
4368
4398
|
o.value = !1;
|
|
4369
4399
|
}
|
|
@@ -4377,31 +4407,31 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4377
4407
|
}
|
|
4378
4408
|
), (b, j) => {
|
|
4379
4409
|
const C = $t;
|
|
4380
|
-
return
|
|
4381
|
-
|
|
4382
|
-
te(b.$slots, "header", Oe(Be(
|
|
4410
|
+
return $(), G("section", Pa, [
|
|
4411
|
+
r.value ? fe("", !0) : ($(), G("header", Va, [
|
|
4412
|
+
te(b.$slots, "header", Oe(Be(_.value)), () => [
|
|
4383
4413
|
ne("div", ja, [
|
|
4384
4414
|
j[0] || (j[0] = ne("span", { class: "global-info-section-block__marker" }, null, -1)),
|
|
4385
|
-
ne("h3", Aa, oe(
|
|
4415
|
+
ne("h3", Aa, oe(v.value), 1)
|
|
4386
4416
|
]),
|
|
4387
|
-
te(b.$slots, "actions", Oe(Be(
|
|
4388
|
-
s.value ? (
|
|
4389
|
-
|
|
4417
|
+
te(b.$slots, "actions", Oe(Be(_.value)), () => [
|
|
4418
|
+
s.value ? ($(), G("div", Ra, [
|
|
4419
|
+
S.value ? ($(), G(Se, { key: 1 }, [
|
|
4390
4420
|
Ie(C, {
|
|
4391
4421
|
class: "global-info-section-block__cancel",
|
|
4392
|
-
disabled:
|
|
4393
|
-
onClick:
|
|
4422
|
+
disabled: a.value.saving,
|
|
4423
|
+
onClick: g
|
|
4394
4424
|
}, {
|
|
4395
4425
|
default: U(() => [
|
|
4396
4426
|
He(oe(J(Z)("common.取消")), 1)
|
|
4397
4427
|
]),
|
|
4398
4428
|
_: 1
|
|
4399
4429
|
}, 8, ["disabled"]),
|
|
4400
|
-
|
|
4430
|
+
I.value ? ($(), H(C, {
|
|
4401
4431
|
key: 0,
|
|
4402
4432
|
class: "global-info-section-block__add",
|
|
4403
|
-
disabled:
|
|
4404
|
-
onClick:
|
|
4433
|
+
disabled: a.value.saving,
|
|
4434
|
+
onClick: h
|
|
4405
4435
|
}, {
|
|
4406
4436
|
default: U(() => [
|
|
4407
4437
|
He(oe(J(Z)("common.新增")), 1)
|
|
@@ -4410,18 +4440,18 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4410
4440
|
}, 8, ["disabled"])) : fe("", !0),
|
|
4411
4441
|
Ie(C, {
|
|
4412
4442
|
class: "global-info-section-block__confirm",
|
|
4413
|
-
loading:
|
|
4443
|
+
loading: a.value.saving,
|
|
4414
4444
|
onClick: F
|
|
4415
4445
|
}, {
|
|
4416
4446
|
default: U(() => [
|
|
4417
|
-
He(oe(
|
|
4447
|
+
He(oe(I.value ? J(Z)("common.确认") : J(Z)("common.保存")), 1)
|
|
4418
4448
|
]),
|
|
4419
4449
|
_: 1
|
|
4420
4450
|
}, 8, ["loading"])
|
|
4421
|
-
], 64)) : (
|
|
4451
|
+
], 64)) : ($(), H(C, {
|
|
4422
4452
|
key: 0,
|
|
4423
4453
|
class: "global-info-section-block__edit",
|
|
4424
|
-
disabled:
|
|
4454
|
+
disabled: a.value.saving || L.value,
|
|
4425
4455
|
onClick: z
|
|
4426
4456
|
}, {
|
|
4427
4457
|
default: U(() => [
|
|
@@ -4445,18 +4475,18 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4445
4475
|
], !0)
|
|
4446
4476
|
])),
|
|
4447
4477
|
ne("div", za, [
|
|
4448
|
-
L.value ? te(b.$slots, "loading", Oe(ae({ key: 0 },
|
|
4478
|
+
L.value ? te(b.$slots, "loading", Oe(ae({ key: 0 }, _.value)), () => [
|
|
4449
4479
|
ne("div", Na, oe(J(Z)("common.加载中___")), 1)
|
|
4450
|
-
], !0) : !s.value || f.value ? te(b.$slots, "empty", Oe(ae({ key: 1 },
|
|
4480
|
+
], !0) : !s.value || f.value ? te(b.$slots, "empty", Oe(ae({ key: 1 }, _.value)), () => [
|
|
4451
4481
|
ne("div", xa, oe(J(Z)("common.暂无数据")), 1)
|
|
4452
|
-
], !0) : (
|
|
4482
|
+
], !0) : ($(), H(La, {
|
|
4453
4483
|
key: 2,
|
|
4454
4484
|
"boundary-key": b.node.key,
|
|
4455
|
-
label:
|
|
4485
|
+
label: v.value,
|
|
4456
4486
|
onError: y
|
|
4457
4487
|
}, {
|
|
4458
4488
|
fallback: U(() => [
|
|
4459
|
-
te(b.$slots, "empty", Oe(Be(
|
|
4489
|
+
te(b.$slots, "empty", Oe(Be(_.value)), () => [
|
|
4460
4490
|
ne("div", qa, oe(J(Z)("common.暂无数据")), 1)
|
|
4461
4491
|
], !0)
|
|
4462
4492
|
]),
|
|
@@ -4464,7 +4494,7 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4464
4494
|
Ie(Ea, {
|
|
4465
4495
|
section: s.value,
|
|
4466
4496
|
node: b.node,
|
|
4467
|
-
editing:
|
|
4497
|
+
editing: S.value,
|
|
4468
4498
|
state: b.state,
|
|
4469
4499
|
actions: b.actions,
|
|
4470
4500
|
"render-config": b.renderConfig
|
|
@@ -4472,7 +4502,7 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4472
4502
|
ye(J(n), (N, re) => ({
|
|
4473
4503
|
name: re,
|
|
4474
4504
|
fn: U((le) => [
|
|
4475
|
-
te(b.$slots, re, Oe(Be({ ...
|
|
4505
|
+
te(b.$slots, re, Oe(Be({ ..._.value, ...le })), void 0, !0)
|
|
4476
4506
|
])
|
|
4477
4507
|
}))
|
|
4478
4508
|
]), 1032, ["section", "node", "editing", "state", "actions", "render-config"])
|
|
@@ -4483,7 +4513,7 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4483
4513
|
]);
|
|
4484
4514
|
};
|
|
4485
4515
|
}
|
|
4486
|
-
}), Ka = /* @__PURE__ */ be(Ga, [["__scopeId", "data-v-
|
|
4516
|
+
}), Ka = /* @__PURE__ */ be(Ga, [["__scopeId", "data-v-5ebfeec6"]]), Ya = { class: "global-info-group" }, Ua = { class: "global-info-group__header" }, Ha = { class: "global-info-group__title" }, Ja = { class: "global-info-group__body" }, Wa = ["id"], Za = { class: "global-info-group__empty" }, Qa = /* @__PURE__ */ pe({
|
|
4487
4517
|
name: "GlobalInfoGroup",
|
|
4488
4518
|
__name: "GlobalInfoGroup",
|
|
4489
4519
|
props: {
|
|
@@ -4497,42 +4527,42 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4497
4527
|
setup(e) {
|
|
4498
4528
|
const t = e, n = Le(), o = O(
|
|
4499
4529
|
() => t.group.tagName || t.group.label || "-"
|
|
4500
|
-
),
|
|
4501
|
-
function c(i,
|
|
4502
|
-
const
|
|
4530
|
+
), l = O(() => t.children.length <= 1);
|
|
4531
|
+
function c(i, v) {
|
|
4532
|
+
const S = t.actions.getSection(i);
|
|
4503
4533
|
return {
|
|
4504
4534
|
node: i,
|
|
4505
4535
|
group: t.group,
|
|
4506
4536
|
sectionNode: i,
|
|
4507
|
-
section:
|
|
4508
|
-
sectionView:
|
|
4537
|
+
section: S,
|
|
4538
|
+
sectionView: S,
|
|
4509
4539
|
state: t.state,
|
|
4510
4540
|
actions: t.actions,
|
|
4511
4541
|
renderConfig: t.renderConfig,
|
|
4512
|
-
index:
|
|
4513
|
-
editing: !!(
|
|
4542
|
+
index: v,
|
|
4543
|
+
editing: !!(S && t.actions.isEditing(S)),
|
|
4514
4544
|
sectionStatus: t.actions.getSectionStatus(i),
|
|
4515
|
-
isSelfSection:
|
|
4545
|
+
isSelfSection: a(i, 0) === a(t.group, 0),
|
|
4516
4546
|
handleEdit: () => t.actions.startEdit(i),
|
|
4517
4547
|
handleCancel: () => t.actions.cancelEdit(i),
|
|
4518
4548
|
handleSave: () => t.actions.saveSection(i.key)
|
|
4519
4549
|
};
|
|
4520
4550
|
}
|
|
4521
|
-
function
|
|
4522
|
-
const
|
|
4523
|
-
return
|
|
4551
|
+
function r(i) {
|
|
4552
|
+
const v = t.actions.getSection(i);
|
|
4553
|
+
return Tt(
|
|
4524
4554
|
n,
|
|
4525
4555
|
"section",
|
|
4526
|
-
Gn(i,
|
|
4556
|
+
Gn(i, v)
|
|
4527
4557
|
);
|
|
4528
4558
|
}
|
|
4529
|
-
function
|
|
4530
|
-
return i.key || i.id || i.infSetId || i.tagId || `${
|
|
4559
|
+
function a(i, v) {
|
|
4560
|
+
return i.key || i.id || i.infSetId || i.tagId || `${v}`;
|
|
4531
4561
|
}
|
|
4532
4562
|
function s(i) {
|
|
4533
|
-
return `global-info-section-${
|
|
4563
|
+
return `global-info-section-${a(i, 0)}`;
|
|
4534
4564
|
}
|
|
4535
|
-
return (i,
|
|
4565
|
+
return (i, v) => ($(), G("section", Ya, [
|
|
4536
4566
|
te(i.$slots, "header", {
|
|
4537
4567
|
group: i.group,
|
|
4538
4568
|
children: i.children,
|
|
@@ -4544,7 +4574,7 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4544
4574
|
isEmpty: i.children.length === 0
|
|
4545
4575
|
}, () => [
|
|
4546
4576
|
ne("header", Ua, [
|
|
4547
|
-
|
|
4577
|
+
v[0] || (v[0] = ne("span", { class: "global-info-group__marker" }, null, -1)),
|
|
4548
4578
|
ne("h2", Ha, oe(o.value), 1)
|
|
4549
4579
|
])
|
|
4550
4580
|
], !0),
|
|
@@ -4558,24 +4588,24 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4558
4588
|
renderConfig: i.renderConfig,
|
|
4559
4589
|
index: i.index,
|
|
4560
4590
|
isEmpty: i.children.length === 0
|
|
4561
|
-
}, void 0, !0) : (
|
|
4562
|
-
(
|
|
4563
|
-
id: s(
|
|
4564
|
-
key:
|
|
4591
|
+
}, void 0, !0) : ($(), G(Se, { key: 1 }, [
|
|
4592
|
+
($(!0), G(Se, null, ye(i.children, (S, I) => ($(), G("div", {
|
|
4593
|
+
id: s(S),
|
|
4594
|
+
key: a(S, I),
|
|
4565
4595
|
class: "global-info-group__section"
|
|
4566
4596
|
}, [
|
|
4567
|
-
|
|
4597
|
+
r(S) ? te(i.$slots, r(S), ae({
|
|
4568
4598
|
key: 0,
|
|
4569
4599
|
ref_for: !0
|
|
4570
|
-
}, c(
|
|
4600
|
+
}, c(S, I)), void 0, !0) : J(n).section ? te(i.$slots, "section", ae({
|
|
4571
4601
|
key: 1,
|
|
4572
4602
|
ref_for: !0
|
|
4573
|
-
}, c(
|
|
4603
|
+
}, c(S, I)), void 0, !0) : ($(), H(Ka, {
|
|
4574
4604
|
key: 2,
|
|
4575
|
-
node:
|
|
4605
|
+
node: S,
|
|
4576
4606
|
state: i.state,
|
|
4577
4607
|
actions: i.actions,
|
|
4578
|
-
"hide-header":
|
|
4608
|
+
"hide-header": l.value,
|
|
4579
4609
|
"render-config": i.renderConfig
|
|
4580
4610
|
}, Re({ _: 2 }, [
|
|
4581
4611
|
ye(J(n), (L, V) => ({
|
|
@@ -4602,7 +4632,7 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4602
4632
|
])
|
|
4603
4633
|
]));
|
|
4604
4634
|
}
|
|
4605
|
-
}), Xa = /* @__PURE__ */ be(Qa, [["__scopeId", "data-v-
|
|
4635
|
+
}), Xa = /* @__PURE__ */ be(Qa, [["__scopeId", "data-v-e16cde81"]]), es = { class: "global-info-sections" }, ts = /* @__PURE__ */ pe({
|
|
4606
4636
|
name: "GlobalInfoSections",
|
|
4607
4637
|
__name: "GlobalInfoSections",
|
|
4608
4638
|
props: {
|
|
@@ -4613,97 +4643,97 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4613
4643
|
},
|
|
4614
4644
|
setup(e) {
|
|
4615
4645
|
const t = e, n = Le(), o = O(() => {
|
|
4616
|
-
const
|
|
4617
|
-
(
|
|
4618
|
-
),
|
|
4619
|
-
group:
|
|
4620
|
-
children:
|
|
4621
|
-
})), f =
|
|
4622
|
-
group:
|
|
4623
|
-
children: [
|
|
4646
|
+
const v = t.nodes.filter(
|
|
4647
|
+
(M) => l(M).length > 0
|
|
4648
|
+
), S = t.nodes.filter((M) => l(M).length === 0), I = S.filter((M) => c(M)), L = S.filter((M) => !c(M)), V = v.map((M) => ({
|
|
4649
|
+
group: M,
|
|
4650
|
+
children: l(M)
|
|
4651
|
+
})), f = I.map((M) => ({
|
|
4652
|
+
group: M,
|
|
4653
|
+
children: [M]
|
|
4624
4654
|
}));
|
|
4625
4655
|
if (V.length === 0)
|
|
4626
|
-
return
|
|
4627
|
-
const
|
|
4628
|
-
return [...V, ...f, ...
|
|
4656
|
+
return I.length > 0 ? f : i(L);
|
|
4657
|
+
const _ = i(L);
|
|
4658
|
+
return [...V, ...f, ..._];
|
|
4629
4659
|
});
|
|
4630
|
-
function
|
|
4631
|
-
return
|
|
4660
|
+
function l(v) {
|
|
4661
|
+
return v.children ?? [];
|
|
4632
4662
|
}
|
|
4633
|
-
function c(
|
|
4634
|
-
return !String(
|
|
4663
|
+
function c(v) {
|
|
4664
|
+
return !String(v.parentId || v.parentTagId || "").trim();
|
|
4635
4665
|
}
|
|
4636
|
-
function
|
|
4637
|
-
return
|
|
4666
|
+
function r(v) {
|
|
4667
|
+
return Tt(n, "group", qn(v));
|
|
4638
4668
|
}
|
|
4639
|
-
function
|
|
4640
|
-
return
|
|
4669
|
+
function a(v, S) {
|
|
4670
|
+
return v.key || v.id || v.tagId || `${S}`;
|
|
4641
4671
|
}
|
|
4642
|
-
function s(
|
|
4643
|
-
const
|
|
4644
|
-
|
|
4672
|
+
function s(v) {
|
|
4673
|
+
const S = v[0], I = S?.raw ?? {}, L = String(
|
|
4674
|
+
I.parentTagName || I.parentName || I.parentLabel || S?.parentId || Z("common.信息")
|
|
4645
4675
|
);
|
|
4646
4676
|
return {
|
|
4647
|
-
...
|
|
4648
|
-
key: `${
|
|
4677
|
+
...S,
|
|
4678
|
+
key: `${S?.parentId || S?.parentTagId || S?.key || "global-info"}-group`,
|
|
4649
4679
|
id: String(
|
|
4650
|
-
|
|
4680
|
+
S?.parentId || S?.parentTagId || S?.id || "global-info-group"
|
|
4651
4681
|
),
|
|
4652
4682
|
tagId: String(
|
|
4653
|
-
|
|
4683
|
+
S?.parentTagId || S?.parentId || S?.tagId || "global-info-group"
|
|
4654
4684
|
),
|
|
4655
4685
|
tagName: L,
|
|
4656
4686
|
label: L,
|
|
4657
|
-
children:
|
|
4687
|
+
children: v
|
|
4658
4688
|
};
|
|
4659
4689
|
}
|
|
4660
|
-
function i(
|
|
4661
|
-
const
|
|
4662
|
-
return
|
|
4690
|
+
function i(v) {
|
|
4691
|
+
const S = /* @__PURE__ */ new Map();
|
|
4692
|
+
return v.forEach((I) => {
|
|
4663
4693
|
const L = String(
|
|
4664
|
-
|
|
4665
|
-
), V =
|
|
4666
|
-
V.push(
|
|
4667
|
-
}), Array.from(
|
|
4668
|
-
group: s(
|
|
4669
|
-
children:
|
|
4694
|
+
I.parentId || I.parentTagId || "global-info-flat"
|
|
4695
|
+
), V = S.get(L) ?? [];
|
|
4696
|
+
V.push(I), S.set(L, V);
|
|
4697
|
+
}), Array.from(S.values()).map((I) => ({
|
|
4698
|
+
group: s(I),
|
|
4699
|
+
children: I
|
|
4670
4700
|
}));
|
|
4671
4701
|
}
|
|
4672
|
-
return (
|
|
4673
|
-
(
|
|
4674
|
-
key:
|
|
4702
|
+
return (v, S) => ($(), G("div", es, [
|
|
4703
|
+
($(!0), G(Se, null, ye(o.value, (I, L) => ($(), G(Se, {
|
|
4704
|
+
key: a(I.group, L)
|
|
4675
4705
|
}, [
|
|
4676
|
-
|
|
4706
|
+
r(I.group) ? te(v.$slots, r(I.group), {
|
|
4677
4707
|
key: 0,
|
|
4678
|
-
group:
|
|
4679
|
-
children:
|
|
4680
|
-
state:
|
|
4681
|
-
actions:
|
|
4682
|
-
renderConfig:
|
|
4708
|
+
group: I.group,
|
|
4709
|
+
children: I.children,
|
|
4710
|
+
state: v.state,
|
|
4711
|
+
actions: v.actions,
|
|
4712
|
+
renderConfig: v.renderConfig,
|
|
4683
4713
|
index: L,
|
|
4684
|
-
isEmpty:
|
|
4685
|
-
}, void 0, !0) : J(n).group ? te(
|
|
4714
|
+
isEmpty: I.children.length === 0
|
|
4715
|
+
}, void 0, !0) : J(n).group ? te(v.$slots, "group", {
|
|
4686
4716
|
key: 1,
|
|
4687
|
-
group:
|
|
4688
|
-
children:
|
|
4689
|
-
state:
|
|
4690
|
-
actions:
|
|
4691
|
-
renderConfig:
|
|
4717
|
+
group: I.group,
|
|
4718
|
+
children: I.children,
|
|
4719
|
+
state: v.state,
|
|
4720
|
+
actions: v.actions,
|
|
4721
|
+
renderConfig: v.renderConfig,
|
|
4692
4722
|
index: L,
|
|
4693
|
-
isEmpty:
|
|
4694
|
-
}, void 0, !0) : (
|
|
4723
|
+
isEmpty: I.children.length === 0
|
|
4724
|
+
}, void 0, !0) : ($(), H(Xa, {
|
|
4695
4725
|
key: 2,
|
|
4696
|
-
group:
|
|
4697
|
-
children:
|
|
4698
|
-
state:
|
|
4699
|
-
actions:
|
|
4700
|
-
"render-config":
|
|
4726
|
+
group: I.group,
|
|
4727
|
+
children: I.children,
|
|
4728
|
+
state: v.state,
|
|
4729
|
+
actions: v.actions,
|
|
4730
|
+
"render-config": v.renderConfig,
|
|
4701
4731
|
index: L
|
|
4702
4732
|
}, Re({ _: 2 }, [
|
|
4703
4733
|
ye(J(n), (V, f) => ({
|
|
4704
4734
|
name: f,
|
|
4705
|
-
fn: U((
|
|
4706
|
-
te(
|
|
4735
|
+
fn: U((_) => [
|
|
4736
|
+
te(v.$slots, f, ae({ ref_for: !0 }, _), void 0, !0)
|
|
4707
4737
|
])
|
|
4708
4738
|
}))
|
|
4709
4739
|
]), 1032, ["group", "children", "state", "actions", "render-config", "index"]))
|