el-plus-crud 0.1.48 → 0.1.49
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/CHANGELOG.md +3 -5
- package/dist/el-plus-crud.mjs +1348 -1336
- package/lib/components/el-plus-form/ElPlusFormGroup.vue +8 -1
- package/lib/components/el-plus-form/components/ElPlusFormFormula.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormPercentinput.vue +26 -3
- package/lib/components/el-plus-form/components/ElPlusFormUpload.vue +1 -1
- package/package.json +1 -1
package/dist/el-plus-crud.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nextTick as we, defineComponent as G, inject as ae, ref as p, onBeforeMount as fe, useAttrs as ue, onMounted as at, resolveComponent as C, openBlock as g, createBlock as O, mergeProps as R, toHandlers as pe, createCommentVNode as V, useSlots as Ue, createSlots as Je, withCtx as x, renderSlot as me, renderList as ce, computed as X, watch as
|
|
1
|
+
import { nextTick as we, defineComponent as G, inject as ae, ref as p, onBeforeMount as fe, useAttrs as ue, onMounted as at, resolveComponent as C, openBlock as g, createBlock as O, mergeProps as R, toHandlers as pe, createCommentVNode as V, useSlots as Ue, createSlots as Je, withCtx as x, renderSlot as me, renderList as ce, computed as X, watch as ne, createElementBlock as w, Fragment as q, createVNode as K, createTextVNode as ye, toDisplayString as de, createElementVNode as ee, unref as Le, pushScopeId as Xt, popScopeId as el, normalizeStyle as Se, getCurrentInstance as En, reactive as Ee, isRef as nt, normalizeClass as dt, onUnmounted as Cn, withModifiers as Bt, resolveDynamicComponent as Pt, normalizeProps as xn, provide as On, resolveDirective as Sn, withDirectives as kn } from "vue";
|
|
2
2
|
import { ElMessageBox as tl, ElMessage as Ge } from "element-plus";
|
|
3
3
|
const Ne = async (e, t) => {
|
|
4
4
|
var n, r, c, a, u, i;
|
|
@@ -87,14 +87,14 @@ const Vn = {
|
|
|
87
87
|
a.value = await Ne(n, { props: { value: "id", label: "name", children: "childs", checkStrictly: !!n.desc.checkStrictly }, clearable: !0, filterable: !0, ...ue() }), u.value = !0;
|
|
88
88
|
}), at(async () => {
|
|
89
89
|
c.value = l.areaList || [];
|
|
90
|
-
}), (s,
|
|
91
|
-
const
|
|
92
|
-
return u.value ? (g(), O(
|
|
90
|
+
}), (s, d) => {
|
|
91
|
+
const N = C("el-cascader");
|
|
92
|
+
return u.value ? (g(), O(N, R({
|
|
93
93
|
key: 0,
|
|
94
94
|
class: "ElPlusFormArea-panel"
|
|
95
95
|
}, a.value, { disabled: s.disabled }, pe(i.value), {
|
|
96
96
|
modelValue: o.value,
|
|
97
|
-
"onUpdate:modelValue":
|
|
97
|
+
"onUpdate:modelValue": d[0] || (d[0] = (m) => o.value = m),
|
|
98
98
|
options: c.value
|
|
99
99
|
}), null, 16, ["disabled", "modelValue", "options"])) : V("", !0);
|
|
100
100
|
};
|
|
@@ -129,17 +129,17 @@ const Ie = (e, t) => {
|
|
|
129
129
|
const s = C("el-autocomplete");
|
|
130
130
|
return g(), O(s, R({ class: "ElPlusFormAutocomplete-panel" }, a.value, { disabled: i.disabled }, pe(u.value), {
|
|
131
131
|
modelValue: r.value,
|
|
132
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
132
|
+
"onUpdate:modelValue": o[0] || (o[0] = (d) => r.value = d)
|
|
133
133
|
}), Je({
|
|
134
|
-
default: x((
|
|
135
|
-
me(i.$slots, "default", { data:
|
|
134
|
+
default: x((d) => [
|
|
135
|
+
me(i.$slots, "default", { data: d }, void 0, !0)
|
|
136
136
|
]),
|
|
137
137
|
_: 2
|
|
138
138
|
}, [
|
|
139
|
-
ce(c.value, (
|
|
140
|
-
name:
|
|
141
|
-
fn: x((
|
|
142
|
-
me(i.$slots,
|
|
139
|
+
ce(c.value, (d, N, m) => ({
|
|
140
|
+
name: N,
|
|
141
|
+
fn: x((A) => [
|
|
142
|
+
me(i.$slots, N, { data: A }, void 0, !0)
|
|
143
143
|
])
|
|
144
144
|
}))
|
|
145
145
|
]), 1040, ["disabled", "modelValue"]);
|
|
@@ -178,50 +178,50 @@ const sa = /* @__PURE__ */ Ie(Fn, [["__scopeId", "data-v-77717260"]]), $n = /* @
|
|
|
178
178
|
if (n.desc && n.desc.on)
|
|
179
179
|
for (const s in n.desc.on)
|
|
180
180
|
s === "click" && n.desc.mask ? o[s] = function() {
|
|
181
|
-
var
|
|
182
|
-
r.value = !0, (
|
|
181
|
+
var d;
|
|
182
|
+
r.value = !0, (d = n.desc) == null || d.on[s]({
|
|
183
183
|
row: n.formData || {},
|
|
184
|
-
callBack: (
|
|
185
|
-
setTimeout(() => r.value = !1,
|
|
184
|
+
callBack: (N) => {
|
|
185
|
+
setTimeout(() => r.value = !1, N || 50);
|
|
186
186
|
},
|
|
187
187
|
field: n.field,
|
|
188
188
|
rowIndex: n.rowIndex
|
|
189
189
|
});
|
|
190
190
|
} : o[s] = function() {
|
|
191
|
-
var
|
|
192
|
-
(
|
|
191
|
+
var d;
|
|
192
|
+
(d = n.desc) == null || d.on[s]({ row: t.cloneDeep(n.formData || {}), field: n.field, rowIndex: n.rowIndex });
|
|
193
193
|
};
|
|
194
194
|
return o;
|
|
195
195
|
}), i = X(() => {
|
|
196
196
|
var o, s;
|
|
197
197
|
return (o = n.desc) != null && o.btnLabel ? typeof n.desc.btnLabel == "function" ? n.desc.btnLabel(n.formData || {}) : n.desc.btnLabel : (s = n.desc) != null && s.label ? typeof n.desc.label == "function" ? n.desc.label(n.formData || {}) : n.desc.label : "";
|
|
198
198
|
});
|
|
199
|
-
return
|
|
199
|
+
return ne(
|
|
200
200
|
() => n.loading,
|
|
201
201
|
(o) => {
|
|
202
202
|
r.value = o;
|
|
203
203
|
}
|
|
204
204
|
), (o, s) => {
|
|
205
|
-
var
|
|
206
|
-
const
|
|
207
|
-
return c.value ? (g(),
|
|
208
|
-
(
|
|
205
|
+
var m, A, S, E, M;
|
|
206
|
+
const d = C("el-button"), N = C("el-popconfirm");
|
|
207
|
+
return c.value ? (g(), w(q, { key: 0 }, [
|
|
208
|
+
(m = n.desc) != null && m.confirm ? (g(), O(N, {
|
|
209
209
|
key: 0,
|
|
210
210
|
onConfirm: u.value.click,
|
|
211
|
-
title: (
|
|
211
|
+
title: (A = n.desc) == null ? void 0 : A.confirm
|
|
212
212
|
}, {
|
|
213
213
|
reference: x(() => {
|
|
214
|
-
var
|
|
214
|
+
var _;
|
|
215
215
|
return [
|
|
216
|
-
K(
|
|
216
|
+
K(d, R({
|
|
217
217
|
loading: r.value,
|
|
218
|
-
size: ((
|
|
218
|
+
size: ((_ = n.desc) == null ? void 0 : _.size) || "default"
|
|
219
219
|
}, a.value), {
|
|
220
220
|
default: x(() => [
|
|
221
221
|
me(o.$slots, "default", {}, () => {
|
|
222
|
-
var
|
|
222
|
+
var v;
|
|
223
223
|
return [
|
|
224
|
-
(
|
|
224
|
+
(v = n.desc) != null && v.label ? (g(), w(q, { key: 0 }, [
|
|
225
225
|
ye(de(i.value), 1)
|
|
226
226
|
], 64)) : V("", !0)
|
|
227
227
|
];
|
|
@@ -232,19 +232,19 @@ const sa = /* @__PURE__ */ Ie(Fn, [["__scopeId", "data-v-77717260"]]), $n = /* @
|
|
|
232
232
|
];
|
|
233
233
|
}),
|
|
234
234
|
_: 3
|
|
235
|
-
}, 8, ["onConfirm", "title"])) : (g(), O(
|
|
235
|
+
}, 8, ["onConfirm", "title"])) : (g(), O(d, R({
|
|
236
236
|
key: 1,
|
|
237
237
|
loading: r.value,
|
|
238
|
-
size: ((
|
|
238
|
+
size: ((S = n.desc) == null ? void 0 : S.size) || "default"
|
|
239
239
|
}, a.value, pe(u.value), {
|
|
240
|
-
style: { pointerEvents: (
|
|
241
|
-
class: { "no-label": !((
|
|
240
|
+
style: { pointerEvents: (E = o.desc) != null && E.isTag ? "none" : "all" },
|
|
241
|
+
class: { "no-label": !((M = n.desc) != null && M.label) }
|
|
242
242
|
}), {
|
|
243
243
|
default: x(() => [
|
|
244
244
|
me(o.$slots, "default", {}, () => {
|
|
245
|
-
var
|
|
245
|
+
var _;
|
|
246
246
|
return [
|
|
247
|
-
(
|
|
247
|
+
(_ = n.desc) != null && _.label ? (g(), w(q, { key: 0 }, [
|
|
248
248
|
ye(de(i.value), 1)
|
|
249
249
|
], 64)) : V("", !0)
|
|
250
250
|
];
|
|
@@ -262,7 +262,7 @@ var Zn = /* @__PURE__ */ G({
|
|
|
262
262
|
name: "Loading",
|
|
263
263
|
__name: "loading",
|
|
264
264
|
setup(e) {
|
|
265
|
-
return (t, l) => (g(),
|
|
265
|
+
return (t, l) => (g(), w("svg", {
|
|
266
266
|
xmlns: "http://www.w3.org/2000/svg",
|
|
267
267
|
viewBox: "0 0 1024 1024"
|
|
268
268
|
}, [
|
|
@@ -276,7 +276,7 @@ var Zn = /* @__PURE__ */ G({
|
|
|
276
276
|
name: "Plus",
|
|
277
277
|
__name: "plus",
|
|
278
278
|
setup(e) {
|
|
279
|
-
return (t, l) => (g(),
|
|
279
|
+
return (t, l) => (g(), w("svg", {
|
|
280
280
|
xmlns: "http://www.w3.org/2000/svg",
|
|
281
281
|
viewBox: "0 0 1024 1024"
|
|
282
282
|
}, [
|
|
@@ -290,7 +290,7 @@ var Zn = /* @__PURE__ */ G({
|
|
|
290
290
|
name: "Share",
|
|
291
291
|
__name: "share",
|
|
292
292
|
setup(e) {
|
|
293
|
-
return (t, l) => (g(),
|
|
293
|
+
return (t, l) => (g(), w("svg", {
|
|
294
294
|
xmlns: "http://www.w3.org/2000/svg",
|
|
295
295
|
viewBox: "0 0 1024 1024"
|
|
296
296
|
}, [
|
|
@@ -304,7 +304,7 @@ var Zn = /* @__PURE__ */ G({
|
|
|
304
304
|
name: "Upload",
|
|
305
305
|
__name: "upload",
|
|
306
306
|
setup(e) {
|
|
307
|
-
return (t, l) => (g(),
|
|
307
|
+
return (t, l) => (g(), w("svg", {
|
|
308
308
|
xmlns: "http://www.w3.org/2000/svg",
|
|
309
309
|
viewBox: "0 0 1024 1024"
|
|
310
310
|
}, [
|
|
@@ -318,7 +318,7 @@ var Zn = /* @__PURE__ */ G({
|
|
|
318
318
|
name: "UserFilled",
|
|
319
319
|
__name: "user-filled",
|
|
320
320
|
setup(e) {
|
|
321
|
-
return (t, l) => (g(),
|
|
321
|
+
return (t, l) => (g(), w("svg", {
|
|
322
322
|
xmlns: "http://www.w3.org/2000/svg",
|
|
323
323
|
viewBox: "0 0 1024 1024"
|
|
324
324
|
}, [
|
|
@@ -332,7 +332,7 @@ var Zn = /* @__PURE__ */ G({
|
|
|
332
332
|
name: "WarningFilled",
|
|
333
333
|
__name: "warning-filled",
|
|
334
334
|
setup(e) {
|
|
335
|
-
return (t, l) => (g(),
|
|
335
|
+
return (t, l) => (g(), w("svg", {
|
|
336
336
|
xmlns: "http://www.w3.org/2000/svg",
|
|
337
337
|
viewBox: "0 0 1024 1024"
|
|
338
338
|
}, [
|
|
@@ -365,16 +365,16 @@ const ao = (e) => (Xt("data-v-730c5737"), e = e(), el(), e), no = { class: "el-b
|
|
|
365
365
|
listType: "text",
|
|
366
366
|
accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel",
|
|
367
367
|
beforeUpload: async (o) => {
|
|
368
|
-
var
|
|
368
|
+
var d, N;
|
|
369
369
|
l.value = !0;
|
|
370
|
-
let s = ((
|
|
371
|
-
return s && typeof ((
|
|
370
|
+
let s = ((d = t.desc) == null ? void 0 : d.confirm) || "";
|
|
371
|
+
return s && typeof ((N = t.desc) == null ? void 0 : N.confirm) == "function" && (s = t.desc.confirm()), s ? new Promise((m) => {
|
|
372
372
|
tl.confirm(s, "提示", {
|
|
373
373
|
type: "warning",
|
|
374
374
|
confirmButtonText: "确定",
|
|
375
375
|
cancelButtonText: "取消"
|
|
376
|
-
}).then(() =>
|
|
377
|
-
|
|
376
|
+
}).then(() => m(!0)).catch(() => {
|
|
377
|
+
m(!1), l.value = !1;
|
|
378
378
|
});
|
|
379
379
|
}) : await i(o);
|
|
380
380
|
},
|
|
@@ -383,17 +383,17 @@ const ao = (e) => (Xt("data-v-730c5737"), e = e(), el(), e), no = { class: "el-b
|
|
|
383
383
|
}
|
|
384
384
|
}, u = X(() => t.desc.btnLabel ? typeof t.desc.btnLabel == "function" ? t.desc.btnLabel(t.formData || {}) : t.desc.btnLabel : t.desc.label ? typeof t.desc.label == "function" ? t.desc.label(t.formData || {}) : t.desc.label : "");
|
|
385
385
|
function i(o) {
|
|
386
|
-
return new Promise((s,
|
|
386
|
+
return new Promise((s, d) => {
|
|
387
387
|
l.value = !0;
|
|
388
|
-
const
|
|
389
|
-
if (
|
|
390
|
-
return Ge.warning(`请上传后缀为${
|
|
388
|
+
const N = o.name.substring(o.name.lastIndexOf(".")), m = t.desc.accept || t.desc.attrs.accept || [".xlsx", ".xls"];
|
|
389
|
+
if (m.indexOf(N) < 0)
|
|
390
|
+
return Ge.warning(`请上传后缀为${m.join(",")}格式的文件!`), l.value = !1, d(!1), !1;
|
|
391
391
|
if (o.size > 20 * 1024 * 1024)
|
|
392
|
-
return Ge.warning("超出文件大小限制(最大为20M)!"), l.value = !1,
|
|
392
|
+
return Ge.warning("超出文件大小限制(最大为20M)!"), l.value = !1, d(!1), !1;
|
|
393
393
|
s(!0);
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
|
-
return
|
|
396
|
+
return ne(
|
|
397
397
|
() => t.loading,
|
|
398
398
|
(o) => {
|
|
399
399
|
l.value = o;
|
|
@@ -401,8 +401,8 @@ const ao = (e) => (Xt("data-v-730c5737"), e = e(), el(), e), no = { class: "el-b
|
|
|
401
401
|
{ immediate: !0 }
|
|
402
402
|
), fe(async () => {
|
|
403
403
|
r.value = await Ne(t, { ...a, ...ue() }), r.value.action || console.warn("上传组件未填写action..."), r.value.onSuccess = (o) => {
|
|
404
|
-
var s,
|
|
405
|
-
(
|
|
404
|
+
var s, d;
|
|
405
|
+
(d = (s = t.desc) == null ? void 0 : s.on) != null && d.success && t.desc.on.success({
|
|
406
406
|
row: o,
|
|
407
407
|
callBack: () => {
|
|
408
408
|
setTimeout(() => l.value = !1, 500);
|
|
@@ -412,21 +412,21 @@ const ao = (e) => (Xt("data-v-730c5737"), e = e(), el(), e), no = { class: "el-b
|
|
|
412
412
|
});
|
|
413
413
|
}, c.value = !0;
|
|
414
414
|
}), (o, s) => {
|
|
415
|
-
const
|
|
416
|
-
return g(),
|
|
417
|
-
K(
|
|
415
|
+
const d = C("el-button"), N = C("el-upload");
|
|
416
|
+
return g(), w("div", no, [
|
|
417
|
+
K(N, R({
|
|
418
418
|
class: "upload-demo",
|
|
419
419
|
style: { display: "flex" }
|
|
420
420
|
}, r.value, {
|
|
421
421
|
disabled: l.value || r.value.disabled,
|
|
422
422
|
modelValue: n.value,
|
|
423
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
423
|
+
"onUpdate:modelValue": s[0] || (s[0] = (m) => n.value = m)
|
|
424
424
|
}), {
|
|
425
425
|
file: x(() => [
|
|
426
426
|
oo
|
|
427
427
|
]),
|
|
428
428
|
default: x(() => [
|
|
429
|
-
K(
|
|
429
|
+
K(d, {
|
|
430
430
|
type: "primary",
|
|
431
431
|
icon: Le(Xn),
|
|
432
432
|
loading: l.value
|
|
@@ -471,56 +471,56 @@ const Ct = /* @__PURE__ */ Ie(uo, [["__scopeId", "data-v-730c5737"]]), ro = /* @
|
|
|
471
471
|
return "flex-start";
|
|
472
472
|
}
|
|
473
473
|
}), a = X(() => (s) => {
|
|
474
|
-
const
|
|
474
|
+
const d = {};
|
|
475
475
|
if (s && s.on)
|
|
476
|
-
for (const
|
|
477
|
-
|
|
476
|
+
for (const N in s.on)
|
|
477
|
+
N === "click" && s.confirm ? d[N] = function() {
|
|
478
478
|
tl.confirm(s.confirm, "提示", {
|
|
479
479
|
type: "warning",
|
|
480
480
|
confirmButtonText: "确定",
|
|
481
481
|
cancelButtonText: "取消"
|
|
482
482
|
}).then(() => {
|
|
483
|
-
s.on[
|
|
483
|
+
s.on[N]({ row: l.formData || {}, field: l.field, rowIndex: l.rowIndex });
|
|
484
484
|
});
|
|
485
|
-
} :
|
|
486
|
-
s.on[
|
|
485
|
+
} : d[N] = function() {
|
|
486
|
+
s.on[N]({ row: l.formData || {}, field: l.field, rowIndex: l.rowIndex });
|
|
487
487
|
};
|
|
488
|
-
return
|
|
488
|
+
return d;
|
|
489
489
|
}), u = () => {
|
|
490
490
|
const s = [];
|
|
491
|
-
r.value = [], l.desc.btns.length > 0 && l.desc.btns.map((
|
|
492
|
-
i(
|
|
491
|
+
r.value = [], l.desc.btns.length > 0 && l.desc.btns.map((N) => {
|
|
492
|
+
i(N) && s.push(N);
|
|
493
493
|
}), n.value = s;
|
|
494
|
-
const
|
|
495
|
-
n.value.length >
|
|
494
|
+
const d = l.desc.limit || 3;
|
|
495
|
+
n.value.length > d && (r.value = n.value.splice(d - 1));
|
|
496
496
|
}, i = (s) => {
|
|
497
|
-
let
|
|
498
|
-
return typeof s.vif == "function" ?
|
|
497
|
+
let d = !0;
|
|
498
|
+
return typeof s.vif == "function" ? d = !!o(s.vif) : typeof s.vif == "boolean" && (d = s.vif), d && s != null && s.auth && (t.auth ? d = t.auth(s.auth) : console.warn("使用auth属性,请在crud注册时传入auth校验方法~")), d;
|
|
499
499
|
}, o = (s) => s(l.formData || {});
|
|
500
|
-
return
|
|
500
|
+
return ne(
|
|
501
501
|
() => l.desc,
|
|
502
502
|
() => u()
|
|
503
|
-
),
|
|
503
|
+
), ne(
|
|
504
504
|
() => l.formData,
|
|
505
505
|
() => u()
|
|
506
506
|
), at(() => {
|
|
507
507
|
u();
|
|
508
|
-
}), (s,
|
|
509
|
-
const
|
|
510
|
-
return g(),
|
|
508
|
+
}), (s, d) => {
|
|
509
|
+
const N = C("el-button"), m = C("el-dropdown-item"), A = C("el-dropdown-menu"), S = C("el-dropdown");
|
|
510
|
+
return g(), w("div", {
|
|
511
511
|
class: "el-plus-form-btn-group",
|
|
512
512
|
style: Se({ "justify-content": c.value })
|
|
513
513
|
}, [
|
|
514
|
-
(g(!0),
|
|
515
|
-
key:
|
|
514
|
+
(g(!0), w(q, null, ce(n.value, (E, M) => (g(), w(q, {
|
|
515
|
+
key: M + (E.label || E.title || "")
|
|
516
516
|
}, [
|
|
517
|
-
|
|
517
|
+
E.elType === "upload" ? (g(), O(Ct, {
|
|
518
518
|
key: 0,
|
|
519
519
|
type: "primary",
|
|
520
520
|
field: s.field,
|
|
521
|
-
desc:
|
|
521
|
+
desc: E || {},
|
|
522
522
|
formData: s.formData,
|
|
523
|
-
plain: (
|
|
523
|
+
plain: (E && E.plain) ?? s.desc.plain ?? !0,
|
|
524
524
|
disabled: s.disabled || s.desc.disabled,
|
|
525
525
|
text: s.desc.text,
|
|
526
526
|
rowIndex: s.rowIndex
|
|
@@ -528,28 +528,28 @@ const Ct = /* @__PURE__ */ Ie(uo, [["__scopeId", "data-v-730c5737"]]), ro = /* @
|
|
|
528
528
|
key: 1,
|
|
529
529
|
type: "primary",
|
|
530
530
|
field: s.field,
|
|
531
|
-
desc:
|
|
531
|
+
desc: E || {},
|
|
532
532
|
formData: s.formData,
|
|
533
|
-
plain: (
|
|
533
|
+
plain: (E && E.plain) ?? s.desc.plain ?? !0,
|
|
534
534
|
disabled: s.disabled || s.desc.disabled,
|
|
535
535
|
text: s.desc.text,
|
|
536
536
|
rowIndex: s.rowIndex
|
|
537
537
|
}, null, 8, ["field", "desc", "formData", "plain", "disabled", "text", "rowIndex"]))
|
|
538
538
|
], 64))), 128)),
|
|
539
|
-
r.value && r.value.length > 0 ? (g(), O(
|
|
539
|
+
r.value && r.value.length > 0 ? (g(), O(S, {
|
|
540
540
|
key: 0,
|
|
541
541
|
class: "group-menu-btn",
|
|
542
542
|
size: s.desc.size || "default",
|
|
543
543
|
disabled: s.disabled || s.desc.disabled
|
|
544
544
|
}, {
|
|
545
545
|
dropdown: x(() => [
|
|
546
|
-
K(
|
|
546
|
+
K(A, null, {
|
|
547
547
|
default: x(() => [
|
|
548
|
-
(g(!0),
|
|
549
|
-
key:
|
|
550
|
-
}, pe(a.value(
|
|
548
|
+
(g(!0), w(q, null, ce(r.value, (E, M) => (g(), O(m, R({
|
|
549
|
+
key: M + (E.label || E.title)
|
|
550
|
+
}, pe(a.value(E))), {
|
|
551
551
|
default: x(() => [
|
|
552
|
-
ye(de(
|
|
552
|
+
ye(de(E.label || E.title), 1)
|
|
553
553
|
]),
|
|
554
554
|
_: 2
|
|
555
555
|
}, 1040))), 128))
|
|
@@ -558,7 +558,7 @@ const Ct = /* @__PURE__ */ Ie(uo, [["__scopeId", "data-v-730c5737"]]), ro = /* @
|
|
|
558
558
|
})
|
|
559
559
|
]),
|
|
560
560
|
default: x(() => [
|
|
561
|
-
K(
|
|
561
|
+
K(N, {
|
|
562
562
|
type: "primary",
|
|
563
563
|
size: s.desc.size || "default",
|
|
564
564
|
plain: s.desc.plain ?? !0
|
|
@@ -753,23 +753,23 @@ function Xe(e, t, l, n = {}) {
|
|
|
753
753
|
passive: i = !1,
|
|
754
754
|
eventName: o,
|
|
755
755
|
deep: s = !1,
|
|
756
|
-
defaultValue:
|
|
757
|
-
} = n,
|
|
758
|
-
let
|
|
759
|
-
t || (t = "modelValue"),
|
|
760
|
-
const
|
|
756
|
+
defaultValue: d
|
|
757
|
+
} = n, N = En(), m = l || (N == null ? void 0 : N.emit) || ((r = N == null ? void 0 : N.$emit) == null ? void 0 : r.bind(N)) || ((a = (c = N == null ? void 0 : N.proxy) == null ? void 0 : c.$emit) == null ? void 0 : a.bind(N == null ? void 0 : N.proxy));
|
|
758
|
+
let A = o;
|
|
759
|
+
t || (t = "modelValue"), A = o || A || `update:${t.toString()}`;
|
|
760
|
+
const S = (M) => u ? vo(u) ? u(M) : Io(M) : M, E = () => Do(e[t]) ? S(e[t]) : d;
|
|
761
761
|
if (i) {
|
|
762
|
-
const
|
|
763
|
-
return
|
|
764
|
-
(
|
|
765
|
-
}, { deep: s }),
|
|
762
|
+
const M = E(), _ = p(M);
|
|
763
|
+
return ne(() => e[t], (v) => _.value = S(v)), ne(_, (v) => {
|
|
764
|
+
(v !== e[t] || s) && m(A, v);
|
|
765
|
+
}, { deep: s }), _;
|
|
766
766
|
} else
|
|
767
767
|
return X({
|
|
768
768
|
get() {
|
|
769
|
-
return
|
|
769
|
+
return E();
|
|
770
770
|
},
|
|
771
|
-
set(
|
|
772
|
-
|
|
771
|
+
set(M) {
|
|
772
|
+
m(A, M);
|
|
773
773
|
}
|
|
774
774
|
});
|
|
775
775
|
}
|
|
@@ -792,21 +792,21 @@ const ho = {
|
|
|
792
792
|
const l = ae("globalData"), n = e, c = Xe(n, "modelValue", t), a = p(!1), u = p({}), i = p(De(n)), o = Ee([]);
|
|
793
793
|
return fe(async () => {
|
|
794
794
|
u.value = await Ne(n, { clearable: !0, props: { value: "value", label: "label", children: "children", checkStrictly: !!n.desc.checkStrictly }, ...ue() }), a.value = !0;
|
|
795
|
-
}),
|
|
795
|
+
}), ne(
|
|
796
796
|
() => n.desc.options,
|
|
797
797
|
async (s) => {
|
|
798
798
|
typeof s == "string" ? o.splice(0, o.length, ...l[s] || []) : typeof s == "function" ? o.splice(0, o.length, ...await s(n.formData || {})) : Array.isArray(s) ? s && o && !Ke(s, o) && o.splice(0, o.length, ...s) : o.splice(0, o.length);
|
|
799
799
|
},
|
|
800
800
|
{ immediate: !0 }
|
|
801
|
-
), (s,
|
|
802
|
-
const
|
|
803
|
-
return a.value ? (g(), O(
|
|
801
|
+
), (s, d) => {
|
|
802
|
+
const N = C("el-cascader");
|
|
803
|
+
return a.value ? (g(), O(N, R({
|
|
804
804
|
key: 0,
|
|
805
805
|
class: "ElPlusFormCascader-panel"
|
|
806
806
|
}, u.value, { disabled: s.disabled }, pe(i.value), {
|
|
807
807
|
options: o,
|
|
808
808
|
modelValue: Le(c),
|
|
809
|
-
"onUpdate:modelValue":
|
|
809
|
+
"onUpdate:modelValue": d[0] || (d[0] = (m) => nt(c) ? c.value = m : null)
|
|
810
810
|
}), null, 16, ["disabled", "options", "modelValue"])) : V("", !0);
|
|
811
811
|
};
|
|
812
812
|
}
|
|
@@ -833,26 +833,26 @@ const ca = /* @__PURE__ */ Ie(Lo, [["__scopeId", "data-v-030a7b69"]]), Eo = /* @
|
|
|
833
833
|
return fe(async () => {
|
|
834
834
|
a.value = await Ne(n, {
|
|
835
835
|
props: { value: "value", label: "label", children: "children" },
|
|
836
|
-
fetchSuggestions(s,
|
|
837
|
-
|
|
836
|
+
fetchSuggestions(s, d) {
|
|
837
|
+
d([]);
|
|
838
838
|
},
|
|
839
839
|
...ue()
|
|
840
840
|
}), u.value = !0;
|
|
841
|
-
}),
|
|
841
|
+
}), ne(
|
|
842
842
|
() => n.desc.options,
|
|
843
843
|
async (s) => {
|
|
844
844
|
typeof s == "string" ? o.splice(0, o.length, ...l[s] || []) : typeof s == "function" ? o.splice(0, o.length, ...await s(n.formData || {})) : Array.isArray(s) ? s && o && !Ke(s, o) && o.splice(0, o.length, ...s) : o.splice(0, o.length);
|
|
845
845
|
},
|
|
846
846
|
{ immediate: !0 }
|
|
847
|
-
), (s,
|
|
848
|
-
const
|
|
849
|
-
return u.value ? (g(), O(
|
|
847
|
+
), (s, d) => {
|
|
848
|
+
const N = C("el-cascader-panel");
|
|
849
|
+
return u.value ? (g(), O(N, R({
|
|
850
850
|
key: 0,
|
|
851
851
|
class: "ElPlusFormCascaderPanel-panel"
|
|
852
852
|
}, a.value, { disabled: s.disabled }, pe(i.value), {
|
|
853
853
|
options: o,
|
|
854
854
|
modelValue: c.value,
|
|
855
|
-
"onUpdate:modelValue":
|
|
855
|
+
"onUpdate:modelValue": d[0] || (d[0] = (m) => c.value = m)
|
|
856
856
|
}), null, 16, ["disabled", "options", "modelValue"])) : V("", !0);
|
|
857
857
|
};
|
|
858
858
|
}
|
|
@@ -879,42 +879,42 @@ const Ma = /* @__PURE__ */ Ie(xo, [["__scopeId", "data-v-22454ba3"]]), Oo = /* @
|
|
|
879
879
|
const l = ae("globalData"), n = e, c = Xe(n, "modelValue", t), a = Ee([]), u = p(!1), i = p({}), o = p(De(n));
|
|
880
880
|
return fe(async () => {
|
|
881
881
|
i.value = await Ne(n, { ...ue() }), u.value = !0;
|
|
882
|
-
}),
|
|
882
|
+
}), ne(
|
|
883
883
|
() => n.desc.options,
|
|
884
884
|
async (s) => {
|
|
885
885
|
typeof s == "string" ? a.splice(0, a.length, ...l[s] || []) : typeof s == "function" ? a.splice(0, a.length, ...await s(n.formData || {})) : Array.isArray(s) ? s && a && !Ke(s, a) && a.splice(0, a.length, ...s) : a.splice(0, a.length);
|
|
886
886
|
},
|
|
887
887
|
{ immediate: !0 }
|
|
888
|
-
),
|
|
888
|
+
), ne(
|
|
889
889
|
() => n.modelValue,
|
|
890
890
|
(s) => {
|
|
891
891
|
s ? c.value = Array.isArray(s) ? s : [s] : c.value = [];
|
|
892
892
|
},
|
|
893
893
|
{ immediate: !0 }
|
|
894
|
-
), (s,
|
|
895
|
-
const
|
|
896
|
-
return u.value ? (g(),
|
|
897
|
-
a != null && a.length ? (g(), O(
|
|
894
|
+
), (s, d) => {
|
|
895
|
+
const N = C("el-checkbox"), m = C("el-checkbox-group");
|
|
896
|
+
return u.value ? (g(), w(q, { key: 0 }, [
|
|
897
|
+
a != null && a.length ? (g(), O(m, R({
|
|
898
898
|
key: 0,
|
|
899
899
|
class: "ElPlusFormCheckbox-panel"
|
|
900
900
|
}, i.value, { disabled: s.disabled }, pe(o.value), {
|
|
901
901
|
modelValue: Le(c),
|
|
902
|
-
"onUpdate:modelValue":
|
|
902
|
+
"onUpdate:modelValue": d[0] || (d[0] = (A) => nt(c) ? c.value = A : null)
|
|
903
903
|
}), {
|
|
904
904
|
default: x(() => [
|
|
905
|
-
(g(!0),
|
|
906
|
-
key:
|
|
907
|
-
label:
|
|
905
|
+
(g(!0), w(q, null, ce(a, (A) => (g(), O(N, R({
|
|
906
|
+
key: A.value,
|
|
907
|
+
label: A.value,
|
|
908
908
|
ref_for: !0
|
|
909
|
-
},
|
|
909
|
+
}, A.attrs), {
|
|
910
910
|
default: x(() => [
|
|
911
|
-
ye(de(
|
|
911
|
+
ye(de(A.text || A.label), 1)
|
|
912
912
|
]),
|
|
913
913
|
_: 2
|
|
914
914
|
}, 1040, ["label"]))), 128))
|
|
915
915
|
]),
|
|
916
916
|
_: 1
|
|
917
|
-
}, 16, ["disabled", "modelValue"])) : (g(),
|
|
917
|
+
}, 16, ["disabled", "modelValue"])) : (g(), w("div", So, "暂无选项"))
|
|
918
918
|
], 64)) : V("", !0);
|
|
919
919
|
};
|
|
920
920
|
}
|
|
@@ -941,22 +941,22 @@ const da = /* @__PURE__ */ Ie(Bo, [["__scopeId", "data-v-d5ecbd1d"]]), Vo = /* @
|
|
|
941
941
|
return fe(async () => {
|
|
942
942
|
c.value = await Ne(l, { ...ue() }), a.value = !0;
|
|
943
943
|
}), (i, o) => {
|
|
944
|
-
const s = C("el-checkbox-button"),
|
|
945
|
-
return a.value ? (g(), O(
|
|
944
|
+
const s = C("el-checkbox-button"), d = C("el-checkbox-group");
|
|
945
|
+
return a.value ? (g(), O(d, R({
|
|
946
946
|
key: 0,
|
|
947
947
|
class: "ElPlusFormCheckboxButton-panel"
|
|
948
948
|
}, c.value, { disabled: i.disabled }, pe(u.value), {
|
|
949
949
|
modelValue: r.value,
|
|
950
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
950
|
+
"onUpdate:modelValue": o[0] || (o[0] = (N) => r.value = N)
|
|
951
951
|
}), {
|
|
952
952
|
default: x(() => [
|
|
953
|
-
(g(!0),
|
|
954
|
-
key:
|
|
955
|
-
label:
|
|
953
|
+
(g(!0), w(q, null, ce(i.desc.options, (N) => (g(), O(s, R({
|
|
954
|
+
key: N.value,
|
|
955
|
+
label: N.value,
|
|
956
956
|
ref_for: !0
|
|
957
|
-
},
|
|
957
|
+
}, N.attrs), {
|
|
958
958
|
default: x(() => [
|
|
959
|
-
ye(de(
|
|
959
|
+
ye(de(N.text), 1)
|
|
960
960
|
]),
|
|
961
961
|
_: 2
|
|
962
962
|
}, 1040, ["label"]))), 128))
|
|
@@ -1020,7 +1020,7 @@ const pa = /* @__PURE__ */ Ie($o, [["__scopeId", "data-v-f1a9c235"]]), Ro = /* @
|
|
|
1020
1020
|
class: "ElPlusFormDate-panel"
|
|
1021
1021
|
}, c.value, { disabled: i.disabled }, pe(a.value), {
|
|
1022
1022
|
modelValue: Le(u),
|
|
1023
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
1023
|
+
"onUpdate:modelValue": o[0] || (o[0] = (d) => nt(u) ? u.value = d : null)
|
|
1024
1024
|
}), null, 16, ["disabled", "modelValue"])) : V("", !0);
|
|
1025
1025
|
};
|
|
1026
1026
|
}
|
|
@@ -1045,18 +1045,18 @@ const Na = /* @__PURE__ */ Ie(Zo, [["__scopeId", "data-v-9e53a749"]]), Wo = /* @
|
|
|
1045
1045
|
return n("update:modelValue", r), fe(async () => {
|
|
1046
1046
|
u.value = await Ne(l, { type: "daterange", format: "YYYY-MM-DD", valueFormat: "x", editable: !1, ...ue() }), a.value = !0;
|
|
1047
1047
|
}), (o, s) => {
|
|
1048
|
-
const
|
|
1049
|
-
return a.value ? (g(), O(
|
|
1048
|
+
const d = C("el-date-picker");
|
|
1049
|
+
return a.value ? (g(), O(d, R({
|
|
1050
1050
|
key: 0,
|
|
1051
1051
|
class: "el-plusF-form-daterange-panel"
|
|
1052
1052
|
}, u.value, { disabled: o.disabled }, pe(i.value), {
|
|
1053
1053
|
modelValue: r.value,
|
|
1054
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
1054
|
+
"onUpdate:modelValue": s[0] || (s[0] = (N) => r.value = N)
|
|
1055
1055
|
}), Je({ _: 2 }, [
|
|
1056
|
-
ce(c.value, (
|
|
1057
|
-
name:
|
|
1058
|
-
fn: x((
|
|
1059
|
-
me(o.$slots,
|
|
1056
|
+
ce(c.value, (N, m, A) => ({
|
|
1057
|
+
name: m,
|
|
1058
|
+
fn: x((S) => [
|
|
1059
|
+
me(o.$slots, m, { data: S }, void 0, !0)
|
|
1060
1060
|
])
|
|
1061
1061
|
}))
|
|
1062
1062
|
]), 1040, ["disabled", "modelValue"])) : V("", !0);
|
|
@@ -1090,7 +1090,7 @@ const ga = /* @__PURE__ */ Ie(Ho, [["__scopeId", "data-v-45408465"]]), qo = /* @
|
|
|
1090
1090
|
}, c.value, { disabled: i.disabled }, pe(u.value), {
|
|
1091
1091
|
type: "datetime",
|
|
1092
1092
|
modelValue: r.value,
|
|
1093
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
1093
|
+
"onUpdate:modelValue": o[0] || (o[0] = (d) => r.value = d)
|
|
1094
1094
|
}), null, 16, ["disabled", "modelValue"])) : V("", !0);
|
|
1095
1095
|
};
|
|
1096
1096
|
}
|
|
@@ -1115,18 +1115,18 @@ const ja = /* @__PURE__ */ Ie(Xo, [["__scopeId", "data-v-9e22537f"]]), es = /* @
|
|
|
1115
1115
|
return n("update:modelValue", r), fe(async () => {
|
|
1116
1116
|
a.value = await Ne(l, { type: "datetimerange", format: "YYYY-MM-DD HH:mm:ss", valueFormat: "x", editable: !1, ...ue() }), u.value = !0;
|
|
1117
1117
|
}), (o, s) => {
|
|
1118
|
-
const
|
|
1119
|
-
return u.value ? (g(), O(
|
|
1118
|
+
const d = C("el-date-picker");
|
|
1119
|
+
return u.value ? (g(), O(d, R({
|
|
1120
1120
|
key: 0,
|
|
1121
1121
|
class: "el-plusF-form-datetimerange-panel"
|
|
1122
1122
|
}, a.value, { disabled: o.disabled }, pe(i.value), {
|
|
1123
1123
|
modelValue: r.value,
|
|
1124
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
1124
|
+
"onUpdate:modelValue": s[0] || (s[0] = (N) => r.value = N)
|
|
1125
1125
|
}), Je({ _: 2 }, [
|
|
1126
|
-
ce(c.value, (
|
|
1127
|
-
name:
|
|
1128
|
-
fn: x((
|
|
1129
|
-
me(o.$slots,
|
|
1126
|
+
ce(c.value, (N, m, A) => ({
|
|
1127
|
+
name: m,
|
|
1128
|
+
fn: x((S) => [
|
|
1129
|
+
me(o.$slots, m, { data: S }, void 0, !0)
|
|
1130
1130
|
])
|
|
1131
1131
|
}))
|
|
1132
1132
|
]), 1040, ["disabled", "modelValue"])) : V("", !0);
|
|
@@ -1177,28 +1177,28 @@ const ya = /* @__PURE__ */ Ie(ls, [["__scopeId", "data-v-880db21d"]]), as = /* @
|
|
|
1177
1177
|
t.preview && (Rt.indexOf(i.suffix || "") >= 0 ? (n.value = r.value.indexOf(i.shareUrl || i.furl), l.value = !0) : window.open(i.previewUrl || i.shareUrl || i.furl, "_blank"));
|
|
1178
1178
|
}
|
|
1179
1179
|
return (i, o) => {
|
|
1180
|
-
const s = C("el-image"),
|
|
1181
|
-
return g(),
|
|
1182
|
-
i.files && i.files.length ? (g(),
|
|
1180
|
+
const s = C("el-image"), d = C("el-image-viewer");
|
|
1181
|
+
return g(), w("div", is, [
|
|
1182
|
+
i.files && i.files.length ? (g(), w("div", {
|
|
1183
1183
|
key: 0,
|
|
1184
1184
|
class: dt([i.isCard ? "card-list" : "file-list"])
|
|
1185
1185
|
}, [
|
|
1186
|
-
(g(!0),
|
|
1187
|
-
key:
|
|
1186
|
+
(g(!0), w(q, null, ce(i.files, (N, m) => (g(), w("div", {
|
|
1187
|
+
key: m,
|
|
1188
1188
|
class: "file-item",
|
|
1189
|
-
onClick: (
|
|
1189
|
+
onClick: (A) => u(N)
|
|
1190
1190
|
}, [
|
|
1191
1191
|
K(s, {
|
|
1192
|
-
src: a(
|
|
1192
|
+
src: a(N),
|
|
1193
1193
|
style: Se(c.value),
|
|
1194
1194
|
fit: "cover"
|
|
1195
1195
|
}, null, 8, ["src", "style"]),
|
|
1196
|
-
i.showName ? (g(),
|
|
1196
|
+
i.showName ? (g(), w("div", Ms, de(Le(fo)(N.name, 50)), 1)) : V("", !0)
|
|
1197
1197
|
], 8, cs))), 128))
|
|
1198
1198
|
], 2)) : V("", !0),
|
|
1199
|
-
l.value ? (g(), O(
|
|
1199
|
+
l.value ? (g(), O(d, {
|
|
1200
1200
|
key: 1,
|
|
1201
|
-
onClose: o[0] || (o[0] = (
|
|
1201
|
+
onClose: o[0] || (o[0] = (N) => l.value = !1),
|
|
1202
1202
|
teleported: "",
|
|
1203
1203
|
initialIndex: n.value,
|
|
1204
1204
|
"url-list": r.value
|
|
@@ -1226,7 +1226,7 @@ const ps = /* @__PURE__ */ Ie(fs, [["__scopeId", "data-v-fdcd5762"]]), Ns = {
|
|
|
1226
1226
|
},
|
|
1227
1227
|
setup(e) {
|
|
1228
1228
|
const t = e;
|
|
1229
|
-
return (l, n) => (g(),
|
|
1229
|
+
return (l, n) => (g(), w("div", {
|
|
1230
1230
|
class: "ele-form-file",
|
|
1231
1231
|
style: Se({ marginTop: t.modelValue && t.modelValue.length > 0 ? "10px" : "0" })
|
|
1232
1232
|
}, [
|
|
@@ -1235,7 +1235,7 @@ const ps = /* @__PURE__ */ Ie(fs, [["__scopeId", "data-v-fdcd5762"]]), Ns = {
|
|
|
1235
1235
|
files: t.modelValue,
|
|
1236
1236
|
showName: "",
|
|
1237
1237
|
preview: ""
|
|
1238
|
-
}, null, 8, ["files"])) : (g(),
|
|
1238
|
+
}, null, 8, ["files"])) : (g(), w("span", Ns, "暂无内容"))
|
|
1239
1239
|
], 4));
|
|
1240
1240
|
}
|
|
1241
1241
|
});
|
|
@@ -1261,109 +1261,109 @@ const js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1261
1261
|
},
|
|
1262
1262
|
emits: ["update:modelValue", "validateThis"],
|
|
1263
1263
|
setup(e, { emit: t }) {
|
|
1264
|
-
const l = ae("globalData"), n = e, r = t, c = Ee([]), a = p({}), u = p(!1), i = p(!1), o = p(!1), s = p(""),
|
|
1265
|
-
function
|
|
1264
|
+
const l = ae("globalData"), n = e, r = t, c = Ee([]), a = p({}), u = p(!1), i = p(!1), o = p(!1), s = p(""), d = p(), N = p(), m = p("="), A = p(""), S = X(() => s.value ? c.filter(({ label: j }) => j.includes(s.value)) : c);
|
|
1265
|
+
function E() {
|
|
1266
1266
|
i.value = !0, we(() => {
|
|
1267
|
-
var j,
|
|
1268
|
-
|
|
1267
|
+
var j, L, B;
|
|
1268
|
+
m.value = ((j = n.modelValue) == null ? void 0 : j.value) || "=", d.value && (d.value.innerHTML = ((L = n.modelValue) == null ? void 0 : L.domStr) || "=", A.value = (B = d.value) == null ? void 0 : B.innerHTML);
|
|
1269
1269
|
});
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1271
|
+
function M(j) {
|
|
1272
1272
|
o.value = !1;
|
|
1273
|
-
const
|
|
1274
|
-
|
|
1273
|
+
const L = `<div contenteditable="true">${j.label}<span>${j.value}</span></div>`;
|
|
1274
|
+
_("@", L), Z();
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1276
|
+
function _(j, L = "") {
|
|
1277
1277
|
var W;
|
|
1278
|
-
let B = ((W =
|
|
1279
|
-
B && B.includes(j) && (B = B.replace(new RegExp(j, "g"),
|
|
1278
|
+
let B = ((W = d.value) == null ? void 0 : W.innerHTML) || "";
|
|
1279
|
+
B && B.includes(j) && (B = B.replace(new RegExp(j, "g"), L), d.value.innerHTML = B + " ");
|
|
1280
1280
|
}
|
|
1281
|
-
function
|
|
1282
|
-
const { key:
|
|
1283
|
-
switch (
|
|
1281
|
+
function v(j) {
|
|
1282
|
+
const { key: L } = j;
|
|
1283
|
+
switch (L) {
|
|
1284
1284
|
case "Enter":
|
|
1285
1285
|
j.preventDefault();
|
|
1286
1286
|
break;
|
|
1287
1287
|
case "@":
|
|
1288
|
-
|
|
1288
|
+
h();
|
|
1289
1289
|
break;
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1292
|
+
function y(j) {
|
|
1293
1293
|
var re, je;
|
|
1294
|
-
const
|
|
1295
|
-
let B = ((je = (re =
|
|
1296
|
-
if (
|
|
1297
|
-
for (let
|
|
1298
|
-
if (
|
|
1299
|
-
W =
|
|
1294
|
+
const L = A.value.split(/<div\b[^>]*>(.*?)<\/div>/g) || [];
|
|
1295
|
+
let B = ((je = (re = d.value) == null ? void 0 : re.innerHTML) == null ? void 0 : je.split(/<div\b[^>]*>(.*?)<\/div>/g)) || [], W = -1;
|
|
1296
|
+
if (L.length === B.length) {
|
|
1297
|
+
for (let oe = 0; oe < L.length; oe++)
|
|
1298
|
+
if (L[oe] !== B[oe]) {
|
|
1299
|
+
W = oe;
|
|
1300
1300
|
break;
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
|
-
W >= 0 &&
|
|
1303
|
+
W >= 0 && L[W].indexOf("</span>") > 0 && (j.key === "Backspace" ? B.splice(W, 1) : B[W] = L[W], B = B.map((oe) => oe.indexOf("</span>") > 0 ? `<div contenteditable="true">${oe}</div>` : oe), d.value.innerHTML = B.join(""), j.key === "Backspace" && T(d.value, W - 1)), Z();
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1305
|
+
function T(j, L) {
|
|
1306
1306
|
const B = document.createRange(), W = window.getSelection();
|
|
1307
|
-
B.selectNodeContents(j), B.collapse(!1), j.childNodes[
|
|
1307
|
+
B.selectNodeContents(j), B.collapse(!1), j.childNodes[L] && B.setStart(j.childNodes[L], 0), B.collapse(!0), W == null || W.removeAllRanges(), W == null || W.addRange(B);
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1310
|
-
window.addEventListener("click",
|
|
1309
|
+
function I() {
|
|
1310
|
+
window.addEventListener("click", D);
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1313
|
-
window.removeEventListener("click",
|
|
1312
|
+
function b() {
|
|
1313
|
+
window.removeEventListener("click", D);
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1315
|
+
function P() {
|
|
1316
1316
|
var j;
|
|
1317
|
-
r("update:modelValue", { value:
|
|
1317
|
+
r("update:modelValue", { value: m.value, domStr: ((j = d.value) == null ? void 0 : j.innerHTML) || "" }), i.value = !1, we(() => {
|
|
1318
1318
|
r("validateThis");
|
|
1319
1319
|
});
|
|
1320
1320
|
}
|
|
1321
1321
|
function Z() {
|
|
1322
1322
|
var W;
|
|
1323
|
-
|
|
1324
|
-
let j =
|
|
1325
|
-
const
|
|
1323
|
+
A.value = d.value.innerHTML;
|
|
1324
|
+
let j = d.value.innerHTML;
|
|
1325
|
+
const L = ((W = j.match(/<span[^>]*>([\s\S]*?)<\/span>/g)) == null ? void 0 : W.map((re) => (re.match(/<span[^>]*>([\s\S]*?)<\/span>/) || [])[1])) || [];
|
|
1326
1326
|
(j.match(/<div[^>]*>([\s\S]*?)<\/div>/g) || []).map((re, je) => {
|
|
1327
|
-
j = j.replace(re, "${" +
|
|
1328
|
-
}),
|
|
1327
|
+
j = j.replace(re, "${" + L[je] + "}");
|
|
1328
|
+
}), m.value = j.replaceAll(" ", "").replaceAll("<", "<").replaceAll(">", ">");
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1331
|
-
o.value = !1, j &&
|
|
1330
|
+
function D(j) {
|
|
1331
|
+
o.value = !1, j && _("@");
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1333
|
+
function h() {
|
|
1334
1334
|
s.value = "", o.value = !0, setTimeout(() => {
|
|
1335
|
-
|
|
1335
|
+
I(), N.value.focus();
|
|
1336
1336
|
}, 0);
|
|
1337
1337
|
}
|
|
1338
1338
|
return fe(async () => {
|
|
1339
|
-
|
|
1340
|
-
}),
|
|
1339
|
+
b(), a.value = await Ne(n, { clearable: !0, ...ue() }), u.value = !0;
|
|
1340
|
+
}), ne(
|
|
1341
1341
|
() => n.desc.options,
|
|
1342
1342
|
async (j) => {
|
|
1343
1343
|
if (typeof j == "string")
|
|
1344
1344
|
c.splice(0, c.length, ...l[j] || []);
|
|
1345
1345
|
else if (typeof j == "function") {
|
|
1346
|
-
const
|
|
1347
|
-
lt(
|
|
1346
|
+
const L = j(n.formData || {});
|
|
1347
|
+
lt(L) ? c.splice(0, c.length, ...await L) : c.splice(0, c.length, ...L);
|
|
1348
1348
|
} else
|
|
1349
1349
|
Array.isArray(j) ? j && c && !Ke(j, c) && c.splice(0, c.length, ...j) : c.splice(0, c.length);
|
|
1350
1350
|
},
|
|
1351
1351
|
{ immediate: !0 }
|
|
1352
|
-
),
|
|
1352
|
+
), ne(
|
|
1353
1353
|
() => n.modelValue,
|
|
1354
1354
|
(j) => {
|
|
1355
|
-
|
|
1355
|
+
m.value = (j == null ? void 0 : j.value) || "=", d.value && (d.value.innerHTML = (j == null ? void 0 : j.domStr) || "=");
|
|
1356
1356
|
},
|
|
1357
1357
|
{ immediate: !0 }
|
|
1358
1358
|
), Cn(() => {
|
|
1359
|
-
|
|
1360
|
-
}), (j,
|
|
1359
|
+
b();
|
|
1360
|
+
}), (j, L) => {
|
|
1361
1361
|
const B = C("el-button"), W = C("el-input"), re = C("el-dialog");
|
|
1362
|
-
return g(),
|
|
1362
|
+
return g(), w("div", ys, [
|
|
1363
1363
|
ee("div", zs, [
|
|
1364
1364
|
K(B, {
|
|
1365
1365
|
class: "formula-btn",
|
|
1366
|
-
onClick:
|
|
1366
|
+
onClick: E,
|
|
1367
1367
|
type: "warning",
|
|
1368
1368
|
plain: "",
|
|
1369
1369
|
text: ""
|
|
@@ -1385,7 +1385,7 @@ const js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1385
1385
|
closeOnClickModal: !1,
|
|
1386
1386
|
showCancel: "",
|
|
1387
1387
|
modelValue: i.value,
|
|
1388
|
-
"onUpdate:modelValue":
|
|
1388
|
+
"onUpdate:modelValue": L[3] || (L[3] = (je) => i.value = je),
|
|
1389
1389
|
"append-to-body": "",
|
|
1390
1390
|
"destroy-on-close": ""
|
|
1391
1391
|
}, {
|
|
@@ -1393,7 +1393,7 @@ const js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1393
1393
|
ee("div", null, [
|
|
1394
1394
|
K(B, {
|
|
1395
1395
|
type: "primary",
|
|
1396
|
-
onClick:
|
|
1396
|
+
onClick: P
|
|
1397
1397
|
}, {
|
|
1398
1398
|
default: x(() => [
|
|
1399
1399
|
ye("确定")
|
|
@@ -1401,7 +1401,7 @@ const js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1401
1401
|
_: 1
|
|
1402
1402
|
}),
|
|
1403
1403
|
K(B, {
|
|
1404
|
-
onClick:
|
|
1404
|
+
onClick: L[2] || (L[2] = (je) => i.value = !1)
|
|
1405
1405
|
}, {
|
|
1406
1406
|
default: x(() => [
|
|
1407
1407
|
ye("取消")
|
|
@@ -1414,40 +1414,40 @@ const js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1414
1414
|
var je;
|
|
1415
1415
|
return [
|
|
1416
1416
|
ee("div", ms, [
|
|
1417
|
-
ee("h2", null, de(
|
|
1417
|
+
ee("h2", null, de(m.value), 1)
|
|
1418
1418
|
]),
|
|
1419
1419
|
ee("div", Ds, de(j.desc.tip || "请在下面输入框中输入您的公式,输入@符号,可以调出引用项"), 1),
|
|
1420
1420
|
ee("div", R({
|
|
1421
1421
|
ref_key: "formulaRef",
|
|
1422
|
-
ref:
|
|
1422
|
+
ref: d,
|
|
1423
1423
|
class: "formula-input",
|
|
1424
1424
|
contenteditable: j.disabled ? "false" : "plaintext-only"
|
|
1425
1425
|
}, a.value, {
|
|
1426
1426
|
style: { "ime-mode": "disabled" },
|
|
1427
|
-
onKeydown: Bt(
|
|
1428
|
-
onKeyup: Bt(
|
|
1427
|
+
onKeydown: Bt(v, ["stop"]),
|
|
1428
|
+
onKeyup: Bt(y, ["stop"])
|
|
1429
1429
|
}), null, 16, vs),
|
|
1430
|
-
o.value ? (g(),
|
|
1430
|
+
o.value ? (g(), w("div", {
|
|
1431
1431
|
key: 0,
|
|
1432
1432
|
class: "formula-input-selection",
|
|
1433
1433
|
ref: "selection",
|
|
1434
|
-
onClick:
|
|
1434
|
+
onClick: L[1] || (L[1] = Bt(() => {
|
|
1435
1435
|
}, ["stop"]))
|
|
1436
1436
|
}, [
|
|
1437
1437
|
K(W, {
|
|
1438
1438
|
modelValue: s.value,
|
|
1439
|
-
"onUpdate:modelValue":
|
|
1439
|
+
"onUpdate:modelValue": L[0] || (L[0] = (oe) => s.value = oe),
|
|
1440
1440
|
ref_key: "inputRef",
|
|
1441
|
-
ref:
|
|
1441
|
+
ref: N,
|
|
1442
1442
|
placeholder: "输入关键字筛选"
|
|
1443
1443
|
}, null, 8, ["modelValue"]),
|
|
1444
|
-
(je =
|
|
1445
|
-
(g(!0),
|
|
1444
|
+
(je = S.value) != null && je.length ? (g(), w("div", Ys, [
|
|
1445
|
+
(g(!0), w(q, null, ce(S.value, (oe, f) => (g(), w("span", {
|
|
1446
1446
|
class: "option",
|
|
1447
1447
|
key: f,
|
|
1448
|
-
onClick: (
|
|
1449
|
-
}, de(
|
|
1450
|
-
])) : (g(),
|
|
1448
|
+
onClick: (z) => M(oe)
|
|
1449
|
+
}, de(oe.label), 9, Is))), 128))
|
|
1450
|
+
])) : (g(), w("div", _s, "暂无数据"))
|
|
1451
1451
|
], 512)) : V("", !0)
|
|
1452
1452
|
];
|
|
1453
1453
|
}),
|
|
@@ -1498,8 +1498,8 @@ const ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1498
1498
|
});
|
|
1499
1499
|
return (a, u) => {
|
|
1500
1500
|
const i = C("el-image");
|
|
1501
|
-
return g(),
|
|
1502
|
-
r.value && r.value.length > 0 ? (g(!0),
|
|
1501
|
+
return g(), w("div", Ts, [
|
|
1502
|
+
r.value && r.value.length > 0 ? (g(!0), w(q, { key: 0 }, ce(r.value, (o, s) => (g(), O(i, R({
|
|
1503
1503
|
key: o + s,
|
|
1504
1504
|
class: a.desc.class,
|
|
1505
1505
|
src: o,
|
|
@@ -1508,7 +1508,7 @@ const ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1508
1508
|
ref_for: !0
|
|
1509
1509
|
}, l.value, { style: c.value }, pe(n.value), {
|
|
1510
1510
|
fit: l.value.fit || "cover"
|
|
1511
|
-
}), null, 16, ["class", "src", "preview-src-list", "initial-index", "style", "fit"]))), 128)) : (g(),
|
|
1511
|
+
}), null, 16, ["class", "src", "preview-src-list", "initial-index", "style", "fit"]))), 128)) : (g(), w("div", bs, Ls))
|
|
1512
1512
|
]);
|
|
1513
1513
|
};
|
|
1514
1514
|
}
|
|
@@ -1531,32 +1531,32 @@ const Cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1531
1531
|
setup(e, { emit: t }) {
|
|
1532
1532
|
const l = ae("defaultConf"), n = e, r = t, c = p(Object.assign({}, Ue(), n.desc.slots)), a = p({}), u = p(!1), i = p(De(n)), o = p();
|
|
1533
1533
|
return r("update:modelValue", o), fe(async () => {
|
|
1534
|
-
var s,
|
|
1535
|
-
a.value = await Ne(n, { autocomplete: "new-password", maxlength: ((
|
|
1536
|
-
}),
|
|
1534
|
+
var s, d;
|
|
1535
|
+
a.value = await Ne(n, { autocomplete: "new-password", maxlength: ((d = (s = l.form) == null ? void 0 : s.leng) == null ? void 0 : d.input) || 0, clearable: !0, ...ue() }), u.value = !0;
|
|
1536
|
+
}), ne(
|
|
1537
1537
|
() => n.modelValue,
|
|
1538
1538
|
(s) => {
|
|
1539
1539
|
s && s.length > a.value.maxlength && (s = s.substring(0, a.value.maxlength)), o.value = s;
|
|
1540
1540
|
},
|
|
1541
1541
|
{ immediate: !0 }
|
|
1542
|
-
),
|
|
1542
|
+
), ne(
|
|
1543
1543
|
() => o.value,
|
|
1544
1544
|
() => {
|
|
1545
1545
|
r("validateThis");
|
|
1546
1546
|
}
|
|
1547
|
-
), (s,
|
|
1548
|
-
const
|
|
1549
|
-
return u.value ? (g(), O(
|
|
1547
|
+
), (s, d) => {
|
|
1548
|
+
const N = C("el-input");
|
|
1549
|
+
return u.value ? (g(), O(N, R({
|
|
1550
1550
|
key: 0,
|
|
1551
1551
|
style: { display: "flex" }
|
|
1552
1552
|
}, a.value, { disabled: s.disabled }, pe(i.value), {
|
|
1553
1553
|
modelValue: o.value,
|
|
1554
|
-
"onUpdate:modelValue":
|
|
1554
|
+
"onUpdate:modelValue": d[0] || (d[0] = (m) => o.value = m)
|
|
1555
1555
|
}), Je({ _: 2 }, [
|
|
1556
|
-
ce(c.value, (
|
|
1557
|
-
name:
|
|
1556
|
+
ce(c.value, (m, A, S) => ({
|
|
1557
|
+
name: A,
|
|
1558
1558
|
fn: x(() => [
|
|
1559
|
-
me(s.$slots,
|
|
1559
|
+
me(s.$slots, A)
|
|
1560
1560
|
])
|
|
1561
1561
|
}))
|
|
1562
1562
|
]), 1040, ["disabled", "modelValue"])) : V("", !0);
|
|
@@ -1585,133 +1585,133 @@ const Cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1585
1585
|
},
|
|
1586
1586
|
emits: ["update:modelValue", "change", "input", "validateThis"],
|
|
1587
1587
|
setup(e, { emit: t }) {
|
|
1588
|
-
var
|
|
1589
|
-
const l = ae("lodash"), n = e, r = p(((
|
|
1588
|
+
var D;
|
|
1589
|
+
const l = ae("lodash"), n = e, r = p(((D = n.desc) == null ? void 0 : D.on) || {}), c = t, a = p(n.modelValue);
|
|
1590
1590
|
c("update:modelValue", a);
|
|
1591
|
-
const u = p(), i = Ee([]), o = Ee([]), s = p([]),
|
|
1591
|
+
const u = p(), i = Ee([]), o = Ee([]), s = p([]), d = Ee({
|
|
1592
1592
|
multiple: !0,
|
|
1593
1593
|
size: n.desc.size,
|
|
1594
1594
|
collapseTags: !0,
|
|
1595
1595
|
collapseTagsTooltip: !0,
|
|
1596
1596
|
clearable: !1,
|
|
1597
1597
|
placeholder: n.desc.placeholder || "请选择" + n.desc.label
|
|
1598
|
-
}),
|
|
1599
|
-
function
|
|
1600
|
-
|
|
1598
|
+
}), N = p(!1), m = p({}), A = X(() => n.desc.vkey || "id"), S = p(!1), E = p(), M = Ee([]), _ = Ee([]);
|
|
1599
|
+
function v(h) {
|
|
1600
|
+
h && (u.value.blur(), N.value = !0, s.value = l.cloneDeep(M.map((j) => j.dataItem)), _.splice(0, _.length, ...M));
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1603
|
-
|
|
1602
|
+
function y() {
|
|
1603
|
+
M.splice(0, M.length), Z();
|
|
1604
1604
|
}
|
|
1605
|
-
function
|
|
1606
|
-
|
|
1607
|
-
|
|
1605
|
+
function T(h) {
|
|
1606
|
+
M.splice(0, M.length), h.map((j) => {
|
|
1607
|
+
M.push({ label: j[n.desc.lkey || "name"], value: j[A.value], dataItem: j });
|
|
1608
1608
|
});
|
|
1609
1609
|
}
|
|
1610
|
-
function
|
|
1611
|
-
|
|
1610
|
+
function I({ row: h }) {
|
|
1611
|
+
M.splice(0, M.length), M.push({ label: h[n.desc.lkey || "name"], value: h[A.value], dataItem: h }), Z();
|
|
1612
1612
|
}
|
|
1613
|
-
function
|
|
1614
|
-
|
|
1615
|
-
|
|
1613
|
+
function b(h) {
|
|
1614
|
+
M.splice(
|
|
1615
|
+
M.findIndex((j) => j.value === h.value),
|
|
1616
1616
|
1
|
|
1617
|
-
),
|
|
1617
|
+
), E.value.changeSelect([{ [A.value]: h.value }]);
|
|
1618
1618
|
}
|
|
1619
|
-
function
|
|
1620
|
-
|
|
1619
|
+
function P() {
|
|
1620
|
+
N.value = !1, M.splice(0, M.length, ..._);
|
|
1621
1621
|
}
|
|
1622
1622
|
function Z() {
|
|
1623
|
-
o.splice(0, o.length, ...
|
|
1624
|
-
const
|
|
1625
|
-
i.splice(0, i.length),
|
|
1626
|
-
i.push(
|
|
1627
|
-
}), a.value =
|
|
1623
|
+
o.splice(0, o.length, ...M);
|
|
1624
|
+
const h = [], j = [];
|
|
1625
|
+
i.splice(0, i.length), M.map((L) => {
|
|
1626
|
+
i.push(L.value), h.push(L.value), j.push(L.label);
|
|
1627
|
+
}), a.value = M.length > 0 ? [h, j] : [], r.value.change && r.value.change(l.cloneDeep(M)), N.value = !1, c("validateThis");
|
|
1628
1628
|
}
|
|
1629
|
-
return
|
|
1629
|
+
return ne(
|
|
1630
1630
|
() => n.desc.tableConfig,
|
|
1631
|
-
(
|
|
1631
|
+
(h) => {
|
|
1632
1632
|
let j = {};
|
|
1633
|
-
|
|
1633
|
+
h && (j = l.cloneDeep(h), typeof n.desc.multiple == "function" ? S.value = n.desc.multiple(n.formData || {}) : S.value = n.desc.multiple, S.value || !S.value && j.column && j.column[j.column.length - 1].label !== "操作" && j.column.push({ label: "操作", width: "120px", fixed: "right", type: "btns", btns: [{ label: "选中", on: { click: I } }] }), j.maxHeight = 400), m.value = j;
|
|
1634
1634
|
},
|
|
1635
1635
|
{ deep: !0, immediate: !0 }
|
|
1636
|
-
),
|
|
1636
|
+
), ne(
|
|
1637
1637
|
() => n.modelValue,
|
|
1638
1638
|
() => {
|
|
1639
|
-
if (
|
|
1640
|
-
const [
|
|
1641
|
-
|
|
1642
|
-
|
|
1639
|
+
if (M.splice(0, M.length), i.splice(0, i.length), n.modelValue && Array.isArray(n.modelValue) && Array.isArray(n.modelValue[0])) {
|
|
1640
|
+
const [h, j] = n.modelValue || [[], []];
|
|
1641
|
+
h.length > 0 && h.length === j.length && h.map((L, B) => {
|
|
1642
|
+
M.push({ label: j[B], value: L, dataItem: { [n.desc.lkey]: j[B], [A.value]: L } }), i.push(L);
|
|
1643
1643
|
});
|
|
1644
1644
|
}
|
|
1645
|
-
o.splice(0, o.length, ...
|
|
1645
|
+
o.splice(0, o.length, ...M);
|
|
1646
1646
|
},
|
|
1647
1647
|
{ deep: !0, immediate: !0 }
|
|
1648
1648
|
), at(async () => {
|
|
1649
|
-
}), (
|
|
1650
|
-
const
|
|
1651
|
-
return g(),
|
|
1649
|
+
}), (h, j) => {
|
|
1650
|
+
const L = C("el-option"), B = C("el-select"), W = C("ElPlusTable"), re = C("el-tag"), je = C("el-scrollbar"), oe = C("el-button"), f = C("el-dialog");
|
|
1651
|
+
return g(), w("div", ks, [
|
|
1652
1652
|
K(B, R({
|
|
1653
1653
|
ref_key: "selectRef",
|
|
1654
1654
|
ref: u,
|
|
1655
|
-
style: [{ width: "100%" },
|
|
1656
|
-
class:
|
|
1657
|
-
},
|
|
1658
|
-
disabled:
|
|
1655
|
+
style: [{ width: "100%" }, h.desc.style],
|
|
1656
|
+
class: h.desc.class
|
|
1657
|
+
}, d, {
|
|
1658
|
+
disabled: h.disabled || h.desc.disabled,
|
|
1659
1659
|
teleported: !1,
|
|
1660
|
-
loading:
|
|
1660
|
+
loading: h.loading,
|
|
1661
1661
|
modelValue: i,
|
|
1662
|
-
onVisibleChange:
|
|
1663
|
-
onClear:
|
|
1662
|
+
onVisibleChange: v,
|
|
1663
|
+
onClear: y
|
|
1664
1664
|
}, pe(r.value)), {
|
|
1665
1665
|
default: x(() => [
|
|
1666
|
-
(g(!0),
|
|
1667
|
-
key:
|
|
1666
|
+
(g(!0), w(q, null, ce(o, (z) => (g(), O(L, R({
|
|
1667
|
+
key: z.value,
|
|
1668
1668
|
ref_for: !0
|
|
1669
|
-
},
|
|
1669
|
+
}, z), null, 16))), 128))
|
|
1670
1670
|
]),
|
|
1671
1671
|
_: 1
|
|
1672
1672
|
}, 16, ["class", "style", "disabled", "loading", "modelValue"]),
|
|
1673
1673
|
K(f, {
|
|
1674
|
-
width:
|
|
1675
|
-
title:
|
|
1674
|
+
width: h.desc.dialogWidth || "1000px",
|
|
1675
|
+
title: h.desc.title || h.desc.placeholder || "请选择" + h.desc.label,
|
|
1676
1676
|
draggable: "",
|
|
1677
1677
|
closeOnClickModal: !1,
|
|
1678
1678
|
showCancel: "",
|
|
1679
|
-
modelValue:
|
|
1680
|
-
"onUpdate:modelValue": j[0] || (j[0] = (
|
|
1679
|
+
modelValue: N.value,
|
|
1680
|
+
"onUpdate:modelValue": j[0] || (j[0] = (z) => N.value = z),
|
|
1681
1681
|
"append-to-body": "",
|
|
1682
1682
|
"destroy-on-close": ""
|
|
1683
1683
|
}, {
|
|
1684
1684
|
default: x(() => [
|
|
1685
1685
|
ee("div", Bs, [
|
|
1686
1686
|
ee("div", Vs, [
|
|
1687
|
-
|
|
1687
|
+
m.value ? (g(), O(W, {
|
|
1688
1688
|
key: 0,
|
|
1689
1689
|
ref_key: "multipleTableRef",
|
|
1690
|
-
ref:
|
|
1690
|
+
ref: E,
|
|
1691
1691
|
selectList: s.value,
|
|
1692
|
-
tableConfig:
|
|
1693
|
-
type:
|
|
1692
|
+
tableConfig: m.value,
|
|
1693
|
+
type: S.value ? "selection" : "index",
|
|
1694
1694
|
isIndex: !1,
|
|
1695
|
-
rowKey:
|
|
1696
|
-
onSelection:
|
|
1695
|
+
rowKey: A.value,
|
|
1696
|
+
onSelection: T
|
|
1697
1697
|
}, null, 8, ["selectList", "tableConfig", "type", "rowKey"])) : V("", !0)
|
|
1698
1698
|
]),
|
|
1699
|
-
|
|
1699
|
+
S.value ? (g(), w("div", Ps, [
|
|
1700
1700
|
Qs,
|
|
1701
1701
|
K(je, {
|
|
1702
1702
|
height: "480px",
|
|
1703
1703
|
class: "tag-list"
|
|
1704
1704
|
}, {
|
|
1705
1705
|
default: x(() => [
|
|
1706
|
-
(g(!0),
|
|
1706
|
+
(g(!0), w(q, null, ce(M, (z) => (g(), O(re, {
|
|
1707
1707
|
class: "tag-item",
|
|
1708
1708
|
style: { "margin-right": "10px", "margin-bottom": "10px" },
|
|
1709
|
-
key:
|
|
1709
|
+
key: z.value,
|
|
1710
1710
|
closable: "",
|
|
1711
|
-
onClose: () =>
|
|
1711
|
+
onClose: () => b(z)
|
|
1712
1712
|
}, {
|
|
1713
1713
|
default: x(() => [
|
|
1714
|
-
ye(de(
|
|
1714
|
+
ye(de(z.label), 1)
|
|
1715
1715
|
]),
|
|
1716
1716
|
_: 2
|
|
1717
1717
|
}, 1032, ["onClose"]))), 128))
|
|
@@ -1719,13 +1719,13 @@ const Cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1719
1719
|
_: 1
|
|
1720
1720
|
}),
|
|
1721
1721
|
ee("div", Us, [
|
|
1722
|
-
K(
|
|
1722
|
+
K(oe, { onClick: P }, {
|
|
1723
1723
|
default: x(() => [
|
|
1724
1724
|
ye("取消")
|
|
1725
1725
|
]),
|
|
1726
1726
|
_: 1
|
|
1727
1727
|
}),
|
|
1728
|
-
K(
|
|
1728
|
+
K(oe, {
|
|
1729
1729
|
type: "primary",
|
|
1730
1730
|
onClick: Z
|
|
1731
1731
|
}, {
|
|
@@ -1765,163 +1765,163 @@ const Ya = /* @__PURE__ */ Ie($s, [["__scopeId", "data-v-74927f20"]]), Rs = /* @
|
|
|
1765
1765
|
emits: ["update:modelValue", "change", "input", "validateThis", "close"],
|
|
1766
1766
|
setup(e, { emit: t }) {
|
|
1767
1767
|
var gt, st, St, kt, jt, wt;
|
|
1768
|
-
const l = ae("lodash"), n = ae("globalData"), r = ae("defaultConf"), c = e, a = p(
|
|
1768
|
+
const l = ae("lodash"), n = ae("globalData"), r = ae("defaultConf"), c = e, a = p(L(c)), u = t, i = p(c.modelValue || []);
|
|
1769
1769
|
u("update:modelValue", i);
|
|
1770
|
-
const o = p(), s = Ee([]),
|
|
1770
|
+
const o = p(), s = Ee([]), d = Ee([]), N = Ee({
|
|
1771
1771
|
multiple: !0,
|
|
1772
1772
|
size: c.desc.size,
|
|
1773
1773
|
collapseTags: !1,
|
|
1774
1774
|
collapseTagsTooltip: !1,
|
|
1775
1775
|
clearable: !0
|
|
1776
|
-
}),
|
|
1777
|
-
async function
|
|
1778
|
-
|
|
1776
|
+
}), m = p(!1), A = Ee([]), S = Ee([]), E = p({}), M = p(((gt = c.desc) == null ? void 0 : gt.lIdKey) || "id"), _ = p(((st = c.desc) == null ? void 0 : st.lNameKey) || "name"), v = p(((St = c.desc) == null ? void 0 : St.rIdKey) || "userId"), y = p(((kt = c.desc) == null ? void 0 : kt.rNameKey) || "nickname"), T = p(((jt = c.desc) == null ? void 0 : jt.lQueryIdKey) || "deptId"), I = p(((wt = c.desc) == null ? void 0 : wt.deptDataList) || []);
|
|
1777
|
+
async function b(Q) {
|
|
1778
|
+
S.splice(0, S.length, ...await je(Q));
|
|
1779
1779
|
}
|
|
1780
|
-
const
|
|
1780
|
+
const P = p([]), Z = p([]), D = p([]), h = p(), j = X(() => {
|
|
1781
1781
|
var te, _e;
|
|
1782
|
-
const
|
|
1782
|
+
const Q = [];
|
|
1783
1783
|
let H = [];
|
|
1784
|
-
return
|
|
1784
|
+
return I.value.length ? H = I.value : H = l.cloneDeep(n[((_e = (te = r.form) == null ? void 0 : te.linkUser) == null ? void 0 : _e.deptListKey) || ""]), P.value && P.value.length > 0 && P.value.map((ze) => {
|
|
1785
1785
|
H = H[ze].children || [];
|
|
1786
|
-
}), H.map((ze) =>
|
|
1786
|
+
}), H.map((ze) => Q.push({ type: 2, label: ze[_.value], value: ze[M.value] })), D.value.map((ze) => Q.push({ type: 1, label: ze[y.value], value: ze[v.value] })), we(() => {
|
|
1787
1787
|
setTimeout(() => {
|
|
1788
|
-
|
|
1788
|
+
Q.map((ze) => {
|
|
1789
1789
|
var Re;
|
|
1790
|
-
(Re =
|
|
1790
|
+
(Re = h.value) == null || Re.toggleRowSelection(
|
|
1791
1791
|
ze,
|
|
1792
|
-
|
|
1792
|
+
A.some((qe) => qe.value === ze.value)
|
|
1793
1793
|
);
|
|
1794
1794
|
});
|
|
1795
1795
|
}, 10);
|
|
1796
|
-
}),
|
|
1796
|
+
}), Q;
|
|
1797
1797
|
});
|
|
1798
|
-
function
|
|
1798
|
+
function L(Q) {
|
|
1799
1799
|
var te;
|
|
1800
1800
|
const H = {};
|
|
1801
|
-
return (te =
|
|
1801
|
+
return (te = Q.desc) != null && te.on && Object.keys(Q.desc.on).map((_e) => {
|
|
1802
1802
|
H[_e] = (ze) => {
|
|
1803
1803
|
we(() => {
|
|
1804
|
-
|
|
1804
|
+
Q.desc.on[_e](Q.formData || {}, Q.rowIndex, ze);
|
|
1805
1805
|
});
|
|
1806
1806
|
};
|
|
1807
1807
|
}), H;
|
|
1808
1808
|
}
|
|
1809
|
-
function B(
|
|
1810
|
-
|
|
1809
|
+
function B(Q) {
|
|
1810
|
+
Q && (o.value.blur(), m.value = !0);
|
|
1811
1811
|
}
|
|
1812
1812
|
function W() {
|
|
1813
|
-
|
|
1813
|
+
A.splice(0, A.length), j.value.map((Q) => {
|
|
1814
1814
|
var H;
|
|
1815
|
-
(H =
|
|
1816
|
-
|
|
1817
|
-
|
|
1815
|
+
(H = h.value) == null || H.toggleRowSelection(
|
|
1816
|
+
Q,
|
|
1817
|
+
A.some((te) => te.value === Q.value)
|
|
1818
1818
|
);
|
|
1819
1819
|
}), Me();
|
|
1820
1820
|
}
|
|
1821
|
-
function re(
|
|
1822
|
-
le({ ...
|
|
1821
|
+
function re(Q) {
|
|
1822
|
+
le({ ...S.find((H) => H.value === Q), type: 1 });
|
|
1823
1823
|
}
|
|
1824
|
-
async function je(
|
|
1824
|
+
async function je(Q) {
|
|
1825
1825
|
var H, te, _e;
|
|
1826
|
-
return
|
|
1826
|
+
return Q.length > 0 ? (_e = (await ((te = (H = r.form) == null ? void 0 : H.linkUser) == null ? void 0 : te.getUserList({ nickname: Q, current: 1, size: 10, enabled: 1 }))).records) == null ? void 0 : _e.map((ze) => ({ value: ze[v.value], label: ze[y.value] })) : [];
|
|
1827
1827
|
}
|
|
1828
|
-
async function
|
|
1828
|
+
async function oe(Q, H) {
|
|
1829
1829
|
var te, _e;
|
|
1830
|
-
|
|
1830
|
+
D.value = (await ((_e = (te = r.form) == null ? void 0 : te.linkUser) == null ? void 0 : _e.getUserList({ [T.value]: Q.value, size: 999 }))).records, P.value.push(H), Z.value.push(Q);
|
|
1831
1831
|
}
|
|
1832
|
-
async function f(
|
|
1832
|
+
async function f(Q) {
|
|
1833
1833
|
var H, te;
|
|
1834
|
-
|
|
1834
|
+
D.value = Q >= 0 ? (await ((te = (H = r.form) == null ? void 0 : H.linkUser) == null ? void 0 : te.getUserList({ [T.value]: Z.value[Q].value, size: 999 }))).records : [], P.value.splice(Q + 1), Z.value.splice(Q + 1);
|
|
1835
1835
|
}
|
|
1836
|
-
function
|
|
1837
|
-
return c.desc.onlyUser ?
|
|
1836
|
+
function z(Q) {
|
|
1837
|
+
return c.desc.onlyUser ? Q.type === 1 : !0;
|
|
1838
1838
|
}
|
|
1839
|
-
function k(
|
|
1840
|
-
le(H, !
|
|
1839
|
+
function k(Q, H) {
|
|
1840
|
+
le(H, !Q.some((te) => te.value === H.value));
|
|
1841
1841
|
}
|
|
1842
|
-
function $(
|
|
1843
|
-
const H = !(
|
|
1842
|
+
function $(Q) {
|
|
1843
|
+
const H = !(Q && Q.length > 0);
|
|
1844
1844
|
j.value.map((te) => {
|
|
1845
1845
|
(!c.desc.onlyUser || c.desc.onlyUser && te.type === 1) && le(te, H);
|
|
1846
1846
|
});
|
|
1847
1847
|
}
|
|
1848
|
-
function ge(
|
|
1848
|
+
function ge(Q) {
|
|
1849
1849
|
var H;
|
|
1850
|
-
j.value.some((te) => te.value ===
|
|
1850
|
+
j.value.some((te) => te.value === Q.value) && ((H = h.value) == null || H.toggleRowSelection(Q, !1)), le(Q, !0);
|
|
1851
1851
|
}
|
|
1852
|
-
function le(
|
|
1853
|
-
const te =
|
|
1854
|
-
H ? te >= 0 &&
|
|
1852
|
+
function le(Q, H = !1) {
|
|
1853
|
+
const te = A.findIndex((_e) => _e.value === Q.value);
|
|
1854
|
+
H ? te >= 0 && A.splice(te, 1) : te < 0 && A.push(Q);
|
|
1855
1855
|
}
|
|
1856
1856
|
function ke() {
|
|
1857
|
-
|
|
1857
|
+
m.value = !1;
|
|
1858
1858
|
}
|
|
1859
1859
|
function Ve() {
|
|
1860
1860
|
it(), f(-1);
|
|
1861
1861
|
}
|
|
1862
1862
|
function Me() {
|
|
1863
|
-
|
|
1864
|
-
const
|
|
1865
|
-
s.splice(0, s.length),
|
|
1866
|
-
s.push(ze.value), ze.type === 1 ? (
|
|
1867
|
-
}),
|
|
1863
|
+
d.splice(0, d.length, ...A);
|
|
1864
|
+
const Q = [], H = [], te = [], _e = [];
|
|
1865
|
+
s.splice(0, s.length), A.map((ze) => {
|
|
1866
|
+
s.push(ze.value), ze.type === 1 ? (Q.push(ze.value), te.push(ze.label)) : (H.push(ze.value), _e.push(ze.label));
|
|
1867
|
+
}), m.value = !1, i.value = A.length > 0 ? [Q, H, te, _e] : [], a.value.change && a.value.change(c.formData || {}, null, i.value), u("validateThis");
|
|
1868
1868
|
}
|
|
1869
1869
|
function Ze() {
|
|
1870
|
-
const
|
|
1870
|
+
const Q = [];
|
|
1871
1871
|
if (c.modelValue) {
|
|
1872
1872
|
let [H, te, _e, ze] = c.modelValue;
|
|
1873
1873
|
te && ze && te.length === ze.length && te.map((Re, qe) => {
|
|
1874
|
-
|
|
1874
|
+
Q.push({ type: 2, value: Re, label: ze[qe] });
|
|
1875
1875
|
}), H && _e && H.length === _e.length && H.map((Re, qe) => {
|
|
1876
|
-
|
|
1876
|
+
Q.push({ type: 1, value: Re, label: _e[qe] });
|
|
1877
1877
|
});
|
|
1878
1878
|
}
|
|
1879
|
-
return
|
|
1879
|
+
return Q;
|
|
1880
1880
|
}
|
|
1881
1881
|
function Pe() {
|
|
1882
|
-
const
|
|
1882
|
+
const Q = [];
|
|
1883
1883
|
if (c.modelValue) {
|
|
1884
1884
|
let [H, te] = c.modelValue;
|
|
1885
|
-
|
|
1885
|
+
Q.push(...te || []), Q.push(...H || []);
|
|
1886
1886
|
}
|
|
1887
|
-
return
|
|
1887
|
+
return Q;
|
|
1888
1888
|
}
|
|
1889
1889
|
function it() {
|
|
1890
|
-
|
|
1890
|
+
A.splice(0, A.length, ...Ze()), d.splice(0, d.length, ...Ze()), s.splice(0, s.length, ...Pe());
|
|
1891
1891
|
}
|
|
1892
1892
|
return fe(async () => {
|
|
1893
|
-
|
|
1893
|
+
E.value = await Ne(c, {
|
|
1894
1894
|
remote: !0,
|
|
1895
1895
|
filterable: !0,
|
|
1896
1896
|
remoteShowSuffix: !0,
|
|
1897
1897
|
loadingText: "远程查询中...",
|
|
1898
|
-
remoteMethod:
|
|
1898
|
+
remoteMethod: b,
|
|
1899
1899
|
...ue()
|
|
1900
1900
|
});
|
|
1901
|
-
}),
|
|
1901
|
+
}), ne(
|
|
1902
1902
|
() => c.modelValue,
|
|
1903
1903
|
() => it(),
|
|
1904
1904
|
{ deep: !0 }
|
|
1905
1905
|
), at(async () => {
|
|
1906
1906
|
it();
|
|
1907
|
-
}), (
|
|
1908
|
-
const te = C("el-option"), _e = C("el-select"), ze = C("el-divider"), Re = C("el-breadcrumb-item"), qe = C("el-breadcrumb"),
|
|
1909
|
-
return g(),
|
|
1907
|
+
}), (Q, H) => {
|
|
1908
|
+
const te = C("el-option"), _e = C("el-select"), ze = C("el-divider"), Re = C("el-breadcrumb-item"), qe = C("el-breadcrumb"), Y = C("el-table-column"), U = C("el-icon"), F = C("el-button"), se = C("el-table"), ve = C("el-tag"), Te = C("el-scrollbar"), ie = C("el-dialog");
|
|
1909
|
+
return g(), w("div", Zs, [
|
|
1910
1910
|
K(_e, R({
|
|
1911
1911
|
ref_key: "selectRef",
|
|
1912
1912
|
ref: o,
|
|
1913
|
-
style: [{ width: "100%" },
|
|
1914
|
-
class:
|
|
1915
|
-
},
|
|
1913
|
+
style: [{ width: "100%" }, Q.desc.style],
|
|
1914
|
+
class: Q.desc.class
|
|
1915
|
+
}, N, {
|
|
1916
1916
|
teleported: !1,
|
|
1917
|
-
disabled:
|
|
1918
|
-
loading:
|
|
1917
|
+
disabled: Q.disabled || Q.desc.disabled,
|
|
1918
|
+
loading: Q.loading,
|
|
1919
1919
|
modelValue: s,
|
|
1920
1920
|
onVisibleChange: B,
|
|
1921
1921
|
onClear: W
|
|
1922
1922
|
}), {
|
|
1923
1923
|
default: x(() => [
|
|
1924
|
-
(g(!0),
|
|
1924
|
+
(g(!0), w(q, null, ce(d, (J) => (g(), O(te, R({
|
|
1925
1925
|
key: J.value,
|
|
1926
1926
|
ref_for: !0
|
|
1927
1927
|
}, J), null, 16))), 128))
|
|
@@ -1929,13 +1929,13 @@ const Ya = /* @__PURE__ */ Ie($s, [["__scopeId", "data-v-74927f20"]]), Rs = /* @
|
|
|
1929
1929
|
_: 1
|
|
1930
1930
|
}, 16, ["class", "style", "disabled", "loading", "modelValue"]),
|
|
1931
1931
|
K(ie, {
|
|
1932
|
-
width:
|
|
1933
|
-
title:
|
|
1932
|
+
width: Q.desc.dialogWidth || "900px",
|
|
1933
|
+
title: Q.desc.placeholder || "选择" + Q.desc.label,
|
|
1934
1934
|
draggable: "",
|
|
1935
1935
|
closeOnClickModal: !1,
|
|
1936
1936
|
showCancel: "",
|
|
1937
|
-
modelValue:
|
|
1938
|
-
"onUpdate:modelValue": H[1] || (H[1] = (J) =>
|
|
1937
|
+
modelValue: m.value,
|
|
1938
|
+
"onUpdate:modelValue": H[1] || (H[1] = (J) => m.value = J),
|
|
1939
1939
|
"append-to-body": "",
|
|
1940
1940
|
"destroy-on-close": "",
|
|
1941
1941
|
onClose: Ve
|
|
@@ -1946,9 +1946,9 @@ const Ya = /* @__PURE__ */ Ie($s, [["__scopeId", "data-v-74927f20"]]), Rs = /* @
|
|
|
1946
1946
|
K(_e, R({
|
|
1947
1947
|
style: { width: "300px" },
|
|
1948
1948
|
placeholder: "输入用户名进行搜索"
|
|
1949
|
-
},
|
|
1949
|
+
}, E.value, { onChange: re }), {
|
|
1950
1950
|
default: x(() => [
|
|
1951
|
-
(g(!0),
|
|
1951
|
+
(g(!0), w(q, null, ce(S, (J) => (g(), O(te, R({
|
|
1952
1952
|
key: J.value,
|
|
1953
1953
|
ref_for: !0
|
|
1954
1954
|
}, J), null, 16))), 128))
|
|
@@ -1967,7 +1967,7 @@ const Ya = /* @__PURE__ */ Ie($s, [["__scopeId", "data-v-74927f20"]]), Rs = /* @
|
|
|
1967
1967
|
]),
|
|
1968
1968
|
_: 1
|
|
1969
1969
|
}),
|
|
1970
|
-
(g(!0),
|
|
1970
|
+
(g(!0), w(q, null, ce(Z.value, (J, be) => (g(), O(Re, {
|
|
1971
1971
|
key: be,
|
|
1972
1972
|
onClick: (Ye) => f(be)
|
|
1973
1973
|
}, {
|
|
@@ -1980,9 +1980,9 @@ const Ya = /* @__PURE__ */ Ie($s, [["__scopeId", "data-v-74927f20"]]), Rs = /* @
|
|
|
1980
1980
|
_: 1
|
|
1981
1981
|
})
|
|
1982
1982
|
]),
|
|
1983
|
-
K(
|
|
1983
|
+
K(se, {
|
|
1984
1984
|
ref_key: "multipleTableRef",
|
|
1985
|
-
ref:
|
|
1985
|
+
ref: h,
|
|
1986
1986
|
data: j.value,
|
|
1987
1987
|
style: { width: "100%", height: "500px" },
|
|
1988
1988
|
"max-height": "500px",
|
|
@@ -1990,18 +1990,18 @@ const Ya = /* @__PURE__ */ Ie($s, [["__scopeId", "data-v-74927f20"]]), Rs = /* @
|
|
|
1990
1990
|
onSelectAll: $
|
|
1991
1991
|
}, {
|
|
1992
1992
|
default: x(() => [
|
|
1993
|
-
K(
|
|
1993
|
+
K(Y, {
|
|
1994
1994
|
type: "selection",
|
|
1995
1995
|
width: "55",
|
|
1996
|
-
selectable:
|
|
1996
|
+
selectable: z
|
|
1997
1997
|
}),
|
|
1998
|
-
K(
|
|
1998
|
+
K(Y, {
|
|
1999
1999
|
label: "组织/部门/人员",
|
|
2000
2000
|
prop: "label"
|
|
2001
2001
|
}, {
|
|
2002
2002
|
default: x(({ row: J }) => [
|
|
2003
2003
|
ee("div", qs, [
|
|
2004
|
-
K(
|
|
2004
|
+
K(U, { style: { "margin-right": "5px" } }, {
|
|
2005
2005
|
default: x(() => [
|
|
2006
2006
|
J.type === 2 ? (g(), O(Le(Dl), { key: 0 })) : (g(), O(Le(vl), { key: 1 }))
|
|
2007
2007
|
]),
|
|
@@ -2012,18 +2012,18 @@ const Ya = /* @__PURE__ */ Ie($s, [["__scopeId", "data-v-74927f20"]]), Rs = /* @
|
|
|
2012
2012
|
]),
|
|
2013
2013
|
_: 1
|
|
2014
2014
|
}),
|
|
2015
|
-
K(
|
|
2015
|
+
K(Y, {
|
|
2016
2016
|
label: "操作",
|
|
2017
2017
|
width: "80"
|
|
2018
2018
|
}, {
|
|
2019
2019
|
default: x(({ row: J, $index: be }) => [
|
|
2020
2020
|
J.type === 2 ? (g(), O(F, {
|
|
2021
2021
|
key: 0,
|
|
2022
|
-
disabled:
|
|
2022
|
+
disabled: A.some((Ye) => Ye.value === J.value),
|
|
2023
2023
|
type: "primary",
|
|
2024
2024
|
text: "",
|
|
2025
2025
|
plain: "",
|
|
2026
|
-
onClick: (Ye) =>
|
|
2026
|
+
onClick: (Ye) => oe(J, be)
|
|
2027
2027
|
}, {
|
|
2028
2028
|
default: x(() => [
|
|
2029
2029
|
ye("进入")
|
|
@@ -2044,14 +2044,14 @@ const Ya = /* @__PURE__ */ Ie($s, [["__scopeId", "data-v-74927f20"]]), Rs = /* @
|
|
|
2044
2044
|
class: "tag-list"
|
|
2045
2045
|
}, {
|
|
2046
2046
|
default: x(() => [
|
|
2047
|
-
(g(!0),
|
|
2047
|
+
(g(!0), w(q, null, ce(A, (J) => (g(), O(ve, {
|
|
2048
2048
|
style: { "margin-right": "10px", "margin-bottom": "10px" },
|
|
2049
2049
|
key: J.value,
|
|
2050
2050
|
closable: "",
|
|
2051
2051
|
onClose: () => ge(J)
|
|
2052
2052
|
}, {
|
|
2053
2053
|
default: x(() => [
|
|
2054
|
-
K(
|
|
2054
|
+
K(U, { style: { "margin-right": "5px" } }, {
|
|
2055
2055
|
default: x(() => [
|
|
2056
2056
|
J.type === 2 ? (g(), O(Le(Dl), { key: 0 })) : (g(), O(Le(vl), { key: 1 }))
|
|
2057
2057
|
]),
|
|
@@ -2114,8 +2114,8 @@ const Ia = /* @__PURE__ */ Ie(lu, [["__scopeId", "data-v-c2cf0aee"]]), au = /* @
|
|
|
2114
2114
|
return fe(async () => {
|
|
2115
2115
|
a.value = await Ne(l, { ...ue() }), u.value = !0;
|
|
2116
2116
|
}), (o, s) => {
|
|
2117
|
-
const
|
|
2118
|
-
return u.value ? (g(), O(
|
|
2117
|
+
const d = C("el-input");
|
|
2118
|
+
return u.value ? (g(), O(d, R({
|
|
2119
2119
|
key: 0,
|
|
2120
2120
|
class: o.desc.class,
|
|
2121
2121
|
style: o.desc.style,
|
|
@@ -2123,13 +2123,13 @@ const Ia = /* @__PURE__ */ Ie(lu, [["__scopeId", "data-v-c2cf0aee"]]), au = /* @
|
|
|
2123
2123
|
type: "number"
|
|
2124
2124
|
}, a.value, { disabled: o.disabled }, pe(i.value), {
|
|
2125
2125
|
modelValue: r.value,
|
|
2126
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
2126
|
+
"onUpdate:modelValue": s[0] || (s[0] = (N) => r.value = N),
|
|
2127
2127
|
onkeypress: "return( /[-\\d\\.]/.test(String.fromCharCode(event.keyCode)))"
|
|
2128
2128
|
}), Je({ _: 2 }, [
|
|
2129
|
-
ce(c.value, (
|
|
2130
|
-
name:
|
|
2129
|
+
ce(c.value, (N, m, A) => ({
|
|
2130
|
+
name: m,
|
|
2131
2131
|
fn: x(() => [
|
|
2132
|
-
me(o.$slots,
|
|
2132
|
+
me(o.$slots, m)
|
|
2133
2133
|
])
|
|
2134
2134
|
})),
|
|
2135
2135
|
o.desc.rtext ? {
|
|
@@ -2165,51 +2165,51 @@ const ou = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2165
2165
|
r("update:modelValue", c);
|
|
2166
2166
|
const a = p({}), u = p(!1), i = p(De(n)), o = p(!1);
|
|
2167
2167
|
fe(async () => {
|
|
2168
|
-
var
|
|
2169
|
-
a.value = await Ne(n, { ...(
|
|
2168
|
+
var S, E;
|
|
2169
|
+
a.value = await Ne(n, { ...(E = (S = l.form) == null ? void 0 : S.leng) == null ? void 0 : E.nbinput, ...ue() }), delete a.value.min, delete a.value.max, u.value = !0;
|
|
2170
2170
|
});
|
|
2171
2171
|
function s() {
|
|
2172
2172
|
o.value = !1;
|
|
2173
2173
|
}
|
|
2174
|
-
function
|
|
2174
|
+
function d() {
|
|
2175
2175
|
o.value || (c.value !== 0 && !c.value ? we(() => {
|
|
2176
2176
|
c.value = 0, c.value === 0 && we(() => {
|
|
2177
|
-
c.value = null,
|
|
2177
|
+
c.value = null, m && m();
|
|
2178
2178
|
});
|
|
2179
|
-
}) :
|
|
2179
|
+
}) : A(c.value, 0)), we(() => {
|
|
2180
2180
|
r("validateThis");
|
|
2181
2181
|
});
|
|
2182
2182
|
}
|
|
2183
|
-
const
|
|
2184
|
-
var
|
|
2185
|
-
let { min:
|
|
2186
|
-
(
|
|
2187
|
-
const { min:
|
|
2188
|
-
return
|
|
2183
|
+
const N = X(() => {
|
|
2184
|
+
var P, Z, D, h;
|
|
2185
|
+
let { min: S = 0, max: E = 999999999, precision: M = 0, controlsPosition: _ = "right" } = ((Z = (P = l.form) == null ? void 0 : P.leng) == null ? void 0 : Z.nbinput) || {}, v = ((D = n.desc) == null ? void 0 : D.attrs) || n.desc;
|
|
2186
|
+
(h = n.desc) != null && h.attrs && typeof n.desc.attrs == "function" && (v = n.desc.attrs(n.formData || {}));
|
|
2187
|
+
const { min: y, max: T, precision: I, controlsPosition: b } = v || {};
|
|
2188
|
+
return y != null && y !== "" && (S = y), T != null && T !== "" && (E = T), I != null && I !== "" && (M = I), b != null && b !== "" && (_ = b), S > E ? S = E : E < S && (E = S), { min: S, max: E, precision: M, controlsPosition: _ };
|
|
2189
2189
|
});
|
|
2190
|
-
c.value !== void 0 && c.value !== null && (c.value <
|
|
2191
|
-
const
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
} : i.value.change =
|
|
2195
|
-
function
|
|
2196
|
-
var
|
|
2197
|
-
o.value = !0,
|
|
2198
|
-
c.value =
|
|
2199
|
-
})) :
|
|
2200
|
-
c.value =
|
|
2201
|
-
})) :
|
|
2190
|
+
c.value !== void 0 && c.value !== null && (c.value < N.value.min ? c.value = N.value.min : c.value > N.value.max && (c.value = N.value.max));
|
|
2191
|
+
const m = i.value.change;
|
|
2192
|
+
m ? i.value.change = (S, E) => {
|
|
2193
|
+
A(S, E);
|
|
2194
|
+
} : i.value.change = A;
|
|
2195
|
+
function A(S, E) {
|
|
2196
|
+
var M, _;
|
|
2197
|
+
o.value = !0, S !== E && (S < N.value.min ? (Ge.warning(`${((M = n.desc) == null ? void 0 : M.label) || ""}最少不能低于${N.value.min}`), we(() => {
|
|
2198
|
+
c.value = N.value.min, m && m();
|
|
2199
|
+
})) : S > N.value.max ? (Ge.warning(`${((_ = n.desc) == null ? void 0 : _.label) || ""}最多不能大于${N.value.max}`), we(() => {
|
|
2200
|
+
c.value = N.value.max, m && m();
|
|
2201
|
+
})) : m && m());
|
|
2202
2202
|
}
|
|
2203
|
-
return (
|
|
2204
|
-
const
|
|
2205
|
-
return u.value ? (g(), O(
|
|
2203
|
+
return (S, E) => {
|
|
2204
|
+
const M = C("el-input-number");
|
|
2205
|
+
return u.value ? (g(), O(M, R({
|
|
2206
2206
|
key: 0,
|
|
2207
2207
|
class: "ElPlusFormNumber-panel"
|
|
2208
|
-
}, a.value, { disabled:
|
|
2208
|
+
}, a.value, { disabled: S.disabled }, pe(i.value), {
|
|
2209
2209
|
modelValue: c.value,
|
|
2210
|
-
"onUpdate:modelValue":
|
|
2210
|
+
"onUpdate:modelValue": E[0] || (E[0] = (_) => c.value = _),
|
|
2211
2211
|
onFocus: s,
|
|
2212
|
-
onBlur:
|
|
2212
|
+
onBlur: d,
|
|
2213
2213
|
onkeypress: "return( /[-\\d\\.]/.test(String.fromCharCode(event.keyCode)))"
|
|
2214
2214
|
}), null, 16, ["disabled", "modelValue"])) : V("", !0);
|
|
2215
2215
|
};
|
|
@@ -2234,22 +2234,22 @@ const Aa = /* @__PURE__ */ Ie(uu, [["__scopeId", "data-v-78e3c52a"]]), ru = /* @
|
|
|
2234
2234
|
setup(e, { emit: t }) {
|
|
2235
2235
|
const l = ae("defaultConf"), n = e, c = Xe(n, "modelValue", t), a = p(Object.assign({}, Ue(), n.desc.slots)), u = p({}), i = p(!1), o = p(De(n));
|
|
2236
2236
|
return fe(async () => {
|
|
2237
|
-
var s,
|
|
2238
|
-
u.value = await Ne(n, { autocomplete: "new-password", maxlength: ((
|
|
2239
|
-
}), (s,
|
|
2240
|
-
const
|
|
2241
|
-
return i.value ? (g(), O(
|
|
2237
|
+
var s, d;
|
|
2238
|
+
u.value = await Ne(n, { autocomplete: "new-password", maxlength: ((d = (s = l.form) == null ? void 0 : s.leng) == null ? void 0 : d.input) || 0, ...ue() }), i.value = !0;
|
|
2239
|
+
}), (s, d) => {
|
|
2240
|
+
const N = C("el-input");
|
|
2241
|
+
return i.value ? (g(), O(N, R({
|
|
2242
2242
|
key: 0,
|
|
2243
2243
|
class: s.desc.class,
|
|
2244
2244
|
"show-password": !0
|
|
2245
2245
|
}, u.value, { disabled: s.disabled }, pe(o.value), {
|
|
2246
2246
|
modelValue: Le(c),
|
|
2247
|
-
"onUpdate:modelValue":
|
|
2247
|
+
"onUpdate:modelValue": d[0] || (d[0] = (m) => nt(c) ? c.value = m : null)
|
|
2248
2248
|
}), Je({ _: 2 }, [
|
|
2249
|
-
ce(a.value, (
|
|
2250
|
-
name:
|
|
2251
|
-
fn: x((
|
|
2252
|
-
me(s.$slots,
|
|
2249
|
+
ce(a.value, (m, A, S) => ({
|
|
2250
|
+
name: A,
|
|
2251
|
+
fn: x((E) => [
|
|
2252
|
+
me(s.$slots, A, { data: E })
|
|
2253
2253
|
])
|
|
2254
2254
|
}))
|
|
2255
2255
|
]), 1040, ["class", "disabled", "modelValue"])) : V("", !0);
|
|
@@ -2266,53 +2266,62 @@ const Aa = /* @__PURE__ */ Ie(uu, [["__scopeId", "data-v-78e3c52a"]]), ru = /* @
|
|
|
2266
2266
|
modelValue: {},
|
|
2267
2267
|
field: {},
|
|
2268
2268
|
desc: {},
|
|
2269
|
+
disabled: { type: Boolean },
|
|
2269
2270
|
formData: {}
|
|
2270
2271
|
},
|
|
2271
2272
|
emits: ["update:modelValue", "validateThis"],
|
|
2272
|
-
setup(e, {
|
|
2273
|
-
const
|
|
2274
|
-
|
|
2275
|
-
|
|
2273
|
+
setup(e, { expose: t, emit: l }) {
|
|
2274
|
+
const n = e, r = l, c = p(Object.assign({}, Ue(), n.desc.slots)), a = p({}), u = p(De(n)), i = p(!1), o = p(), s = p();
|
|
2275
|
+
r("update:modelValue", s), fe(async () => {
|
|
2276
|
+
a.value = await Ne(n, { autocomplete: "new-password", maxlength: 10, clearable: !0, ...ue() });
|
|
2276
2277
|
});
|
|
2277
|
-
function
|
|
2278
|
-
|
|
2278
|
+
function d() {
|
|
2279
|
+
i.value = !1;
|
|
2279
2280
|
}
|
|
2280
|
-
function
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2281
|
+
function N() {
|
|
2282
|
+
i.value || (o.value !== 0 && !o.value ? we(() => {
|
|
2283
|
+
o.value = 0, o.value === 0 && we(() => {
|
|
2284
|
+
o.value = null, s.value = null, A && A();
|
|
2284
2285
|
});
|
|
2285
|
-
}) :
|
|
2286
|
-
|
|
2286
|
+
}) : S(o.value, 0)), we(() => {
|
|
2287
|
+
r("validateThis");
|
|
2287
2288
|
});
|
|
2288
2289
|
}
|
|
2289
|
-
const
|
|
2290
|
-
var
|
|
2291
|
-
let
|
|
2292
|
-
(
|
|
2293
|
-
const { min:
|
|
2294
|
-
return
|
|
2290
|
+
const m = X(() => {
|
|
2291
|
+
var P, Z;
|
|
2292
|
+
let M = 0, _ = 100, v = 5, y = ((P = n.desc) == null ? void 0 : P.attrs) || n.desc;
|
|
2293
|
+
(Z = n.desc) != null && Z.attrs && typeof n.desc.attrs == "function" && (y = n.desc.attrs(n.formData || {}));
|
|
2294
|
+
const { min: T, max: I, precision: b } = y || {};
|
|
2295
|
+
return T != null && T !== "" && (M = T), I != null && I !== "" && (_ = I), b != null && b !== "" && b >= 2 && (v = b), M > _ ? M = _ : _ < M && (_ = M), { min: M, max: _, precision: v };
|
|
2295
2296
|
});
|
|
2296
|
-
|
|
2297
|
-
const
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
} :
|
|
2301
|
-
function
|
|
2302
|
-
var
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
})) :
|
|
2306
|
-
|
|
2307
|
-
})) : (
|
|
2297
|
+
o.value !== void 0 && o.value !== null && (o.value < m.value.min ? o.value = m.value.min : o.value > m.value.max && (o.value = m.value.max));
|
|
2298
|
+
const A = u.value.change;
|
|
2299
|
+
A ? u.value.change = (M, _) => {
|
|
2300
|
+
S(M, _);
|
|
2301
|
+
} : u.value.change = S;
|
|
2302
|
+
function S(M, _) {
|
|
2303
|
+
var v, y;
|
|
2304
|
+
i.value = !0, M !== _ && (M < m.value.min ? (Ge.warning(`${((v = n.desc) == null ? void 0 : v.label) || ""}最少不能低于${m.value.min}`), we(() => {
|
|
2305
|
+
o.value = m.value.min, s.value = +(o.value / 100).toFixed(m.value.precision), A && A();
|
|
2306
|
+
})) : M > m.value.max ? (Ge.warning(`${((y = n.desc) == null ? void 0 : y.label) || ""}最多不能大于${m.value.max}`), we(() => {
|
|
2307
|
+
o.value = m.value.max, s.value = +(o.value / 100).toFixed(m.value.precision), A && A();
|
|
2308
|
+
})) : (M.indexOf(".") > 0 && M.length - M.indexOf(".") > m.value.precision - 2 ? o.value = (+M).toFixed(m.value.precision - 2) : o.value = M, s.value = +(M / 100).toFixed(m.value.precision), A && A()));
|
|
2308
2309
|
}
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2310
|
+
function E() {
|
|
2311
|
+
o.value = null, s.value = null, i.value = !1;
|
|
2312
|
+
}
|
|
2313
|
+
return ne(
|
|
2314
|
+
() => n.modelValue,
|
|
2315
|
+
(M) => {
|
|
2316
|
+
M != null && M !== "" && S((M * 100).toFixed(m.value.precision - 2), null);
|
|
2317
|
+
}
|
|
2318
|
+
), t({ clear: E, field: n.field }), (M, _) => {
|
|
2319
|
+
const v = C("el-input");
|
|
2320
|
+
return g(), O(v, R({ style: { display: "flex" } }, a.value, { disabled: M.disabled }, pe(u.value), {
|
|
2321
|
+
modelValue: o.value,
|
|
2322
|
+
"onUpdate:modelValue": _[0] || (_[0] = (y) => o.value = y),
|
|
2323
|
+
onFocus: d,
|
|
2324
|
+
onBlur: N,
|
|
2316
2325
|
onkeypress: "return event.target.value === '' || event.target.value === undefined || event.target.value?.indexOf('.') >= 0 ? /[-\\d]/.test(String.fromCharCode(event.keyCode)): /[-\\d\\.]/.test(String.fromCharCode(event.keyCode))"
|
|
2317
2326
|
}), Je({
|
|
2318
2327
|
append: x(() => [
|
|
@@ -2320,13 +2329,13 @@ const Aa = /* @__PURE__ */ Ie(uu, [["__scopeId", "data-v-78e3c52a"]]), ru = /* @
|
|
|
2320
2329
|
]),
|
|
2321
2330
|
_: 2
|
|
2322
2331
|
}, [
|
|
2323
|
-
ce(
|
|
2324
|
-
name:
|
|
2332
|
+
ce(c.value, (y, T, I) => ({
|
|
2333
|
+
name: T,
|
|
2325
2334
|
fn: x(() => [
|
|
2326
|
-
me(
|
|
2335
|
+
me(M.$slots, T)
|
|
2327
2336
|
])
|
|
2328
2337
|
}))
|
|
2329
|
-
]), 1040, ["modelValue"]);
|
|
2338
|
+
]), 1040, ["disabled", "modelValue"]);
|
|
2330
2339
|
};
|
|
2331
2340
|
}
|
|
2332
2341
|
}), du = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Ta }, Symbol.toStringTag, { value: "Module" })), fu = { class: "el-plus-form-quick-input" }, pu = {
|
|
@@ -2348,47 +2357,47 @@ const Aa = /* @__PURE__ */ Ie(uu, [["__scopeId", "data-v-78e3c52a"]]), ru = /* @
|
|
|
2348
2357
|
setup(e, { emit: t }) {
|
|
2349
2358
|
const l = ae("globalData"), n = ae("defaultConf"), r = e, c = t, a = p({}), u = p(!1), i = p(De(r)), o = Ee([]), s = p(r.modelValue);
|
|
2350
2359
|
c("update:modelValue", s), fe(async () => {
|
|
2351
|
-
var
|
|
2352
|
-
a.value = await Ne(r, { maxlength: (
|
|
2360
|
+
var N, m;
|
|
2361
|
+
a.value = await Ne(r, { maxlength: (m = (N = n.form) == null ? void 0 : N.leng) == null ? void 0 : m.textare, showWordLimit: !0, rows: 3, ...ue() }), u.value = !0;
|
|
2353
2362
|
});
|
|
2354
|
-
function
|
|
2363
|
+
function d(N) {
|
|
2355
2364
|
if (r.disabled)
|
|
2356
2365
|
return !1;
|
|
2357
|
-
s.value =
|
|
2366
|
+
s.value = N, c("validateThis");
|
|
2358
2367
|
}
|
|
2359
|
-
return
|
|
2368
|
+
return ne(
|
|
2360
2369
|
() => r.modelValue,
|
|
2361
|
-
(
|
|
2362
|
-
|
|
2370
|
+
(N) => {
|
|
2371
|
+
N && N.length > a.value.maxlength && (N = N.substring(0, a.value.maxlength)), s.value = N;
|
|
2363
2372
|
},
|
|
2364
2373
|
{ immediate: !0 }
|
|
2365
|
-
),
|
|
2374
|
+
), ne(
|
|
2366
2375
|
() => r.desc.options,
|
|
2367
|
-
async (
|
|
2368
|
-
typeof
|
|
2376
|
+
async (N) => {
|
|
2377
|
+
typeof N == "string" ? o.splice(0, o.length, ...l[N] || []) : typeof N == "function" ? o.splice(0, o.length, ...await N(r.formData || {})) : Array.isArray(N) ? N && o && !Ke(N, o) && o.splice(0, o.length, ...N) : o.splice(0, o.length);
|
|
2369
2378
|
},
|
|
2370
2379
|
{ immediate: !0 }
|
|
2371
|
-
), (
|
|
2372
|
-
const
|
|
2373
|
-
return g(),
|
|
2374
|
-
u.value ? (g(), O(
|
|
2380
|
+
), (N, m) => {
|
|
2381
|
+
const A = C("el-input"), S = C("el-tag");
|
|
2382
|
+
return g(), w(q, null, [
|
|
2383
|
+
u.value ? (g(), O(A, R({
|
|
2375
2384
|
key: 0,
|
|
2376
|
-
class:
|
|
2377
|
-
style:
|
|
2385
|
+
class: N.desc.class,
|
|
2386
|
+
style: N.desc.style,
|
|
2378
2387
|
type: "textarea"
|
|
2379
2388
|
}, a.value, {
|
|
2380
|
-
disabled:
|
|
2389
|
+
disabled: N.disabled,
|
|
2381
2390
|
modelValue: s.value,
|
|
2382
|
-
"onUpdate:modelValue":
|
|
2391
|
+
"onUpdate:modelValue": m[0] || (m[0] = (E) => s.value = E)
|
|
2383
2392
|
}, pe(i.value)), null, 16, ["class", "style", "disabled", "modelValue"])) : V("", !0),
|
|
2384
2393
|
ee("div", fu, [
|
|
2385
|
-
(g(!0),
|
|
2386
|
-
key:
|
|
2394
|
+
(g(!0), w(q, null, ce(o, (E, M) => (g(), O(S, {
|
|
2395
|
+
key: M,
|
|
2387
2396
|
type: "info",
|
|
2388
|
-
onClick: (
|
|
2397
|
+
onClick: (_) => d(E.label)
|
|
2389
2398
|
}, {
|
|
2390
2399
|
default: x(() => [
|
|
2391
|
-
ye(de(
|
|
2400
|
+
ye(de(E.label), 1)
|
|
2392
2401
|
]),
|
|
2393
2402
|
_: 2
|
|
2394
2403
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -2416,28 +2425,28 @@ const Nu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2416
2425
|
const l = ae("globalData"), n = e, c = Xe(n, "modelValue", t), a = Ee([]), u = p(!1), i = p({}), o = p(De(n));
|
|
2417
2426
|
return fe(async () => {
|
|
2418
2427
|
i.value = await Ne(n, { ...ue() }), u.value = !0;
|
|
2419
|
-
}),
|
|
2428
|
+
}), ne(
|
|
2420
2429
|
() => n.desc.options,
|
|
2421
2430
|
async (s) => {
|
|
2422
2431
|
typeof s == "string" ? a.splice(0, a.length, ...l[s] || []) : typeof s == "function" ? a.splice(0, a.length, ...await s(n.formData || {})) : Array.isArray(s) ? s && a && !Ke(s, a) && a.splice(0, a.length, ...s) : a.splice(0, a.length);
|
|
2423
2432
|
},
|
|
2424
2433
|
{ immediate: !0 }
|
|
2425
|
-
), (s,
|
|
2426
|
-
const
|
|
2427
|
-
return u.value ? (g(), O(
|
|
2434
|
+
), (s, d) => {
|
|
2435
|
+
const N = C("el-radio"), m = C("el-radio-group");
|
|
2436
|
+
return u.value ? (g(), O(m, R({
|
|
2428
2437
|
key: 0,
|
|
2429
2438
|
class: "ElPlusFormRadio-panel"
|
|
2430
2439
|
}, i.value, { disabled: s.disabled }, pe(o.value), {
|
|
2431
2440
|
modelValue: Le(c),
|
|
2432
|
-
"onUpdate:modelValue":
|
|
2441
|
+
"onUpdate:modelValue": d[0] || (d[0] = (A) => nt(c) ? c.value = A : null)
|
|
2433
2442
|
}), {
|
|
2434
2443
|
default: x(() => [
|
|
2435
|
-
(g(!0),
|
|
2436
|
-
key:
|
|
2437
|
-
label:
|
|
2444
|
+
(g(!0), w(q, null, ce(a, (A) => (g(), O(N, {
|
|
2445
|
+
key: A.value,
|
|
2446
|
+
label: A.value
|
|
2438
2447
|
}, {
|
|
2439
2448
|
default: x(() => [
|
|
2440
|
-
ye(de(
|
|
2449
|
+
ye(de(A.l || A.label), 1)
|
|
2441
2450
|
]),
|
|
2442
2451
|
_: 2
|
|
2443
2452
|
}, 1032, ["label"]))), 128))
|
|
@@ -2466,13 +2475,13 @@ const ha = /* @__PURE__ */ Ie(ju, [["__scopeId", "data-v-98c6f944"]]), yu = /* @
|
|
|
2466
2475
|
const l = t, n = e, r = Xe(n, "modelValue", l), c = p({}), a = p(De(n));
|
|
2467
2476
|
return fe(async () => {
|
|
2468
2477
|
c.value = await Ne(n, { ...ue() });
|
|
2469
|
-
}),
|
|
2478
|
+
}), ne(
|
|
2470
2479
|
() => n.modelValue,
|
|
2471
2480
|
(u) => {
|
|
2472
2481
|
r.value = u;
|
|
2473
2482
|
},
|
|
2474
2483
|
{ immediate: !0 }
|
|
2475
|
-
),
|
|
2484
|
+
), ne(
|
|
2476
2485
|
() => r.value,
|
|
2477
2486
|
() => {
|
|
2478
2487
|
l("validateThis");
|
|
@@ -2504,101 +2513,101 @@ const La = /* @__PURE__ */ Ie(mu, [["__scopeId", "data-v-45863775"]]), Du = /* @
|
|
|
2504
2513
|
},
|
|
2505
2514
|
emits: ["update:modelValue"],
|
|
2506
2515
|
setup(e, { expose: t, emit: l }) {
|
|
2507
|
-
const n = ae("lodash"), r = ae("defaultConf"), c = ae("globalData"), a = e, i = Xe(a, "modelValue", l), o = p({}), s = Ee([]),
|
|
2508
|
-
a.desc.allowCreate && (
|
|
2509
|
-
|
|
2516
|
+
const n = ae("lodash"), r = ae("defaultConf"), c = ae("globalData"), a = e, i = Xe(a, "modelValue", l), o = p({}), s = Ee([]), d = p(null), N = { clearable: !0, ...ue() }, m = p(!1), A = p(!1);
|
|
2517
|
+
a.desc.allowCreate && (N.filterable = !0), a.desc.remote && (N.remote = !0, N.filterable = !0, N.remoteShowSuffix = !0, N.loadingText = "远程查询中...", N.remoteMethod = async (y) => {
|
|
2518
|
+
y != null && y !== "" && await M(y);
|
|
2510
2519
|
});
|
|
2511
|
-
const
|
|
2512
|
-
var
|
|
2513
|
-
const
|
|
2514
|
-
(
|
|
2515
|
-
|
|
2520
|
+
const S = X(() => {
|
|
2521
|
+
var I;
|
|
2522
|
+
const y = {};
|
|
2523
|
+
(I = a.desc) != null && I.on && Object.keys(a.desc.on).map((b) => {
|
|
2524
|
+
y[b] = () => {
|
|
2516
2525
|
we(() => {
|
|
2517
|
-
a.desc.on[
|
|
2526
|
+
a.desc.on[b](
|
|
2518
2527
|
a.formData || {},
|
|
2519
|
-
s.find((
|
|
2528
|
+
s.find((P) => P.value === i.value),
|
|
2520
2529
|
a.rowIndex
|
|
2521
2530
|
);
|
|
2522
2531
|
});
|
|
2523
2532
|
};
|
|
2524
|
-
}),
|
|
2525
|
-
const
|
|
2526
|
-
var
|
|
2527
|
-
|
|
2533
|
+
}), y.clear = v;
|
|
2534
|
+
const T = () => {
|
|
2535
|
+
var b, P, Z, D;
|
|
2536
|
+
A.value = !0, (P = (b = a.desc) == null ? void 0 : b.on) != null && P.focus && typeof ((D = (Z = a.desc) == null ? void 0 : Z.on) == null ? void 0 : D.focus) == "function" && a.desc.on.focus(), d.value = null, a.desc.remote && M("");
|
|
2528
2537
|
};
|
|
2529
|
-
return
|
|
2530
|
-
}),
|
|
2531
|
-
async function
|
|
2532
|
-
|
|
2538
|
+
return y.focus = T, y;
|
|
2539
|
+
}), E = X(() => (y) => a.desc.optionTip(y));
|
|
2540
|
+
async function M(y) {
|
|
2541
|
+
d.value !== y && (d.value = y, s.splice(0, s.length, ...await a.desc.remote(y)), y === "" && (A.value || _()));
|
|
2533
2542
|
}
|
|
2534
|
-
function
|
|
2535
|
-
if (
|
|
2536
|
-
let
|
|
2537
|
-
Array.isArray(
|
|
2538
|
-
let
|
|
2539
|
-
if (Array.isArray(
|
|
2543
|
+
function _() {
|
|
2544
|
+
if (d.value === null && a.desc.defaultKey) {
|
|
2545
|
+
let y = a.formData[a.desc.defaultKey.value];
|
|
2546
|
+
Array.isArray(y) || (y = [y]);
|
|
2547
|
+
let T = a.formData[a.desc.defaultKey.label];
|
|
2548
|
+
if (Array.isArray(T) || (T = [T]), y.length <= 0 || y.length !== T.length)
|
|
2540
2549
|
return;
|
|
2541
|
-
|
|
2542
|
-
if (
|
|
2543
|
-
const
|
|
2544
|
-
|
|
2550
|
+
y.map((I, b) => {
|
|
2551
|
+
if (I) {
|
|
2552
|
+
const P = s.findIndex((Z) => Z.value === I);
|
|
2553
|
+
P >= 0 && s.splice(P, 1), s.unshift({ value: I, label: T[b], dataItem: n.cloneDeep(a.formData) });
|
|
2545
2554
|
}
|
|
2546
2555
|
});
|
|
2547
2556
|
}
|
|
2548
2557
|
}
|
|
2549
|
-
function
|
|
2550
|
-
var
|
|
2551
|
-
|
|
2558
|
+
function v() {
|
|
2559
|
+
var y, T, I, b;
|
|
2560
|
+
A.value = !0, (T = (y = a.desc) == null ? void 0 : y.on) != null && T.clear && typeof ((b = (I = a.desc) == null ? void 0 : I.on) == null ? void 0 : b.clear) == "function" && a.desc.on.clear(), d.value = null, a.desc.remote && s.splice(0, s.length);
|
|
2552
2561
|
}
|
|
2553
2562
|
return fe(async () => {
|
|
2554
|
-
|
|
2555
|
-
}),
|
|
2563
|
+
N.remote = !!a.desc.remote, o.value = await Ne(a, N), o.value.remote = !!a.desc.remote, delete o.value.disabled, m.value = !0;
|
|
2564
|
+
}), ne(
|
|
2556
2565
|
() => a.desc.options,
|
|
2557
|
-
async (
|
|
2558
|
-
if (typeof
|
|
2559
|
-
s.splice(0, s.length, ...c[
|
|
2560
|
-
else if (typeof
|
|
2561
|
-
const
|
|
2562
|
-
lt(
|
|
2566
|
+
async (y) => {
|
|
2567
|
+
if (typeof y == "string")
|
|
2568
|
+
s.splice(0, s.length, ...c[y] || []);
|
|
2569
|
+
else if (typeof y == "function") {
|
|
2570
|
+
const T = y(a.formData || {});
|
|
2571
|
+
lt(T) ? s.splice(0, s.length, ...await T) : s.splice(0, s.length, ...T);
|
|
2563
2572
|
} else
|
|
2564
|
-
Array.isArray(
|
|
2573
|
+
Array.isArray(y) ? y && s && !Ke(y, s) && s.splice(0, s.length, ...y) : s.splice(0, s.length);
|
|
2565
2574
|
},
|
|
2566
2575
|
{ immediate: !0 }
|
|
2567
|
-
),
|
|
2576
|
+
), ne(
|
|
2568
2577
|
() => i.value,
|
|
2569
|
-
(
|
|
2570
|
-
var
|
|
2571
|
-
o.value.allowCreate &&
|
|
2572
|
-
var
|
|
2573
|
-
return typeof
|
|
2574
|
-
}) && (Ge.warning("最大长度为: " + (((
|
|
2575
|
-
var
|
|
2576
|
-
return typeof
|
|
2577
|
-
})),
|
|
2578
|
+
(y) => {
|
|
2579
|
+
var T, I;
|
|
2580
|
+
o.value.allowCreate && y && Array.isArray(y) && y.some((b) => {
|
|
2581
|
+
var P, Z;
|
|
2582
|
+
return typeof b == "string" && b.length > (((Z = (P = r.form) == null ? void 0 : P.leng) == null ? void 0 : Z.input) || 20);
|
|
2583
|
+
}) && (Ge.warning("最大长度为: " + (((I = (T = r.form) == null ? void 0 : T.leng) == null ? void 0 : I.input) || 20)), i.value = y.filter((b) => {
|
|
2584
|
+
var P, Z;
|
|
2585
|
+
return typeof b != "string" || b.length <= (((Z = (P = r.form) == null ? void 0 : P.leng) == null ? void 0 : Z.input) || 20);
|
|
2586
|
+
})), _();
|
|
2578
2587
|
},
|
|
2579
2588
|
{ immediate: !0 }
|
|
2580
|
-
), t({ field: a.field, clear:
|
|
2581
|
-
const
|
|
2582
|
-
return
|
|
2589
|
+
), t({ field: a.field, clear: v }), (y, T) => {
|
|
2590
|
+
const I = C("el-option"), b = C("el-select");
|
|
2591
|
+
return m.value ? (g(), O(b, R({
|
|
2583
2592
|
key: 0,
|
|
2584
|
-
class: ["el-plus-form-select",
|
|
2585
|
-
style:
|
|
2586
|
-
disabled:
|
|
2593
|
+
class: ["el-plus-form-select", y.desc.class],
|
|
2594
|
+
style: y.desc.style,
|
|
2595
|
+
disabled: y.disabled
|
|
2587
2596
|
}, o.value, {
|
|
2588
2597
|
modelValue: Le(i),
|
|
2589
|
-
"onUpdate:modelValue":
|
|
2590
|
-
loading:
|
|
2591
|
-
}, pe(
|
|
2598
|
+
"onUpdate:modelValue": T[0] || (T[0] = (P) => nt(i) ? i.value = P : null),
|
|
2599
|
+
loading: y.loading
|
|
2600
|
+
}, pe(S.value)), {
|
|
2592
2601
|
default: x(() => [
|
|
2593
|
-
(g(!0),
|
|
2594
|
-
|
|
2602
|
+
(g(!0), w(q, null, ce(s, (P, Z) => (g(), w(q, { key: Z }, [
|
|
2603
|
+
P && P.value ? (g(), O(I, R({
|
|
2595
2604
|
key: 0,
|
|
2596
2605
|
ref_for: !0
|
|
2597
|
-
},
|
|
2606
|
+
}, P), {
|
|
2598
2607
|
default: x(() => [
|
|
2599
2608
|
ee("div", vu, [
|
|
2600
|
-
ee("span", null, de(
|
|
2601
|
-
|
|
2609
|
+
ee("span", null, de(P.label || P.l), 1),
|
|
2610
|
+
y.desc.optionTip ? (g(), w("div", Yu, de(E.value(P)), 1)) : V("", !0)
|
|
2602
2611
|
])
|
|
2603
2612
|
]),
|
|
2604
2613
|
_: 2
|
|
@@ -2658,22 +2667,22 @@ const Ca = /* @__PURE__ */ Ie(wu, [["__scopeId", "data-v-c1eeda28"]]), Tu = /* @
|
|
|
2658
2667
|
const l = ae("globalData"), n = ae("format"), r = e, a = Xe(r, "modelValue", t), u = Ee([]), i = p(""), o = X(() => {
|
|
2659
2668
|
if (r.desc.icolor)
|
|
2660
2669
|
return typeof r.desc.icolor == "function" ? { background: r.desc.icolor(r.formData || {}) || "#909399" } : { background: r.desc.icolor || "#909399" };
|
|
2661
|
-
const s = u.find((
|
|
2670
|
+
const s = u.find((d) => (d.value || d.v) == a.value) || {};
|
|
2662
2671
|
return { background: s.c || s.color || "#909399" };
|
|
2663
2672
|
});
|
|
2664
|
-
return
|
|
2673
|
+
return ne(
|
|
2665
2674
|
() => r.desc.options,
|
|
2666
2675
|
async (s) => {
|
|
2667
2676
|
typeof s == "string" ? u.splice(0, u.length, ...l[s] || []) : typeof s == "function" ? u.splice(0, u.length, ...await s(r.formData || {})) : Array.isArray(s) ? s && u && !Ke(s, u) && u.splice(0, u.length, ...s) : u.splice(0, u.length);
|
|
2668
2677
|
},
|
|
2669
2678
|
{ immediate: !0 }
|
|
2670
|
-
),
|
|
2679
|
+
), ne(
|
|
2671
2680
|
() => r.modelValue,
|
|
2672
2681
|
async () => {
|
|
2673
2682
|
r.desc.format ? typeof r.desc.format == "function" ? i.value = await r.desc.format(r.modelValue, r.formData || {}, r.field) : typeof r.desc.format == "string" ? i.value = n[r.desc.format] ? n[r.desc.format](r.modelValue, r.formData || {}, r.field) : "--" : i.value = r.modelValue || "-" : i.value = r.modelValue === "" ? r.desc.default ?? "-" : r.modelValue ?? r.desc.default ?? "-";
|
|
2674
2683
|
},
|
|
2675
2684
|
{ immediate: !0 }
|
|
2676
|
-
), (s,
|
|
2685
|
+
), (s, d) => (g(), w("div", bu, [
|
|
2677
2686
|
ee("i", {
|
|
2678
2687
|
style: Se(o.value)
|
|
2679
2688
|
}, null, 4),
|
|
@@ -2703,16 +2712,16 @@ const xa = /* @__PURE__ */ Ie(Lu, [["__scopeId", "data-v-955da518"]]), Eu = /* @
|
|
|
2703
2712
|
setup(e, { emit: t }) {
|
|
2704
2713
|
const l = t, n = e, r = p(!1), c = Xe(n, "modelValue", l), a = p(!1), u = p({}), i = p(De(n));
|
|
2705
2714
|
function o() {
|
|
2706
|
-
var
|
|
2707
|
-
let s = (
|
|
2708
|
-
return typeof s == "function" && (s = s(c.value, n.formData || {})), s ? (r.value = !0, new Promise((
|
|
2715
|
+
var d;
|
|
2716
|
+
let s = (d = n.desc) == null ? void 0 : d.confirm;
|
|
2717
|
+
return typeof s == "function" && (s = s(c.value, n.formData || {})), s ? (r.value = !0, new Promise((N, m) => {
|
|
2709
2718
|
tl({
|
|
2710
2719
|
title: "提示",
|
|
2711
2720
|
message: s || "",
|
|
2712
2721
|
showCancelButton: !0,
|
|
2713
2722
|
confirmButtonText: "确定",
|
|
2714
2723
|
cancelButtonText: "取消"
|
|
2715
|
-
}).then(() =>
|
|
2724
|
+
}).then(() => N(!0)).catch(() => m()).finally(() => {
|
|
2716
2725
|
setTimeout(() => {
|
|
2717
2726
|
r.value = !1;
|
|
2718
2727
|
}, 200);
|
|
@@ -2721,13 +2730,13 @@ const xa = /* @__PURE__ */ Ie(Lu, [["__scopeId", "data-v-955da518"]]), Eu = /* @
|
|
|
2721
2730
|
}
|
|
2722
2731
|
return fe(async () => {
|
|
2723
2732
|
u.value = await Ne(n, { activeValue: 1, inactiveValue: 0, clearable: !0, ...ue() }), a.value = !0;
|
|
2724
|
-
}), (s,
|
|
2725
|
-
const
|
|
2726
|
-
return g(),
|
|
2727
|
-
a.value ? (g(), O(
|
|
2733
|
+
}), (s, d) => {
|
|
2734
|
+
const N = C("el-switch");
|
|
2735
|
+
return g(), w("div", Cu, [
|
|
2736
|
+
a.value ? (g(), O(N, R({ key: 0 }, u.value, { disabled: s.disabled }, pe(i.value), {
|
|
2728
2737
|
loading: n.loading || r.value,
|
|
2729
2738
|
modelValue: Le(c),
|
|
2730
|
-
"onUpdate:modelValue":
|
|
2739
|
+
"onUpdate:modelValue": d[0] || (d[0] = (m) => nt(c) ? c.value = m : null),
|
|
2731
2740
|
"before-change": o
|
|
2732
2741
|
}), null, 16, ["disabled", "loading", "modelValue"])) : V("", !0)
|
|
2733
2742
|
]);
|
|
@@ -2752,13 +2761,13 @@ const xa = /* @__PURE__ */ Ie(Lu, [["__scopeId", "data-v-955da518"]]), Eu = /* @
|
|
|
2752
2761
|
const t = ae("format"), l = e, n = p({}), r = p(De(l)), c = p(""), a = p("");
|
|
2753
2762
|
return fe(async () => {
|
|
2754
2763
|
n.value = await Ne(l, { ...ue() });
|
|
2755
|
-
}),
|
|
2764
|
+
}), ne(
|
|
2756
2765
|
() => l.modelValue,
|
|
2757
2766
|
async () => {
|
|
2758
2767
|
l.desc.tagType ? typeof l.desc.tagType == "function" ? a.value = await l.desc.tagType(l.modelValue, l.formData || {}, l.field) : typeof l.desc.tagType == "string" ? a.value = (await t)[l.desc.tagType](l.modelValue, l.formData || {}, l.field) : a.value = "" : a.value = "";
|
|
2759
2768
|
},
|
|
2760
2769
|
{ immediate: !0 }
|
|
2761
|
-
),
|
|
2770
|
+
), ne(
|
|
2762
2771
|
() => l.modelValue,
|
|
2763
2772
|
async () => {
|
|
2764
2773
|
l.desc.format ? typeof l.desc.format == "function" ? c.value = await l.desc.format(l.modelValue, l.formData || {}, l.field) : typeof l.desc.format == "string" ? c.value = (await t)[l.desc.format](l.modelValue, l.formData || {}, l.field) : c.value = l.modelValue || "-" : c.value = l.modelValue === "" ? "-" : l.modelValue ?? "-";
|
|
@@ -2766,7 +2775,7 @@ const xa = /* @__PURE__ */ Ie(Lu, [["__scopeId", "data-v-955da518"]]), Eu = /* @
|
|
|
2766
2775
|
{ immediate: !0 }
|
|
2767
2776
|
), (u, i) => {
|
|
2768
2777
|
const o = C("el-tag");
|
|
2769
|
-
return g(),
|
|
2778
|
+
return g(), w("div", null, [
|
|
2770
2779
|
K(o, R(n.value, {
|
|
2771
2780
|
disabled: u.disabled,
|
|
2772
2781
|
size: n.value.size || "default",
|
|
@@ -2812,7 +2821,7 @@ const xa = /* @__PURE__ */ Ie(Lu, [["__scopeId", "data-v-955da518"]]), Eu = /* @
|
|
|
2812
2821
|
}), a = p("");
|
|
2813
2822
|
return fe(async () => {
|
|
2814
2823
|
r.value = await Ne(n, ue());
|
|
2815
|
-
}),
|
|
2824
|
+
}), ne(
|
|
2816
2825
|
() => n.modelValue,
|
|
2817
2826
|
async () => {
|
|
2818
2827
|
if (!n.desc.format)
|
|
@@ -2824,12 +2833,12 @@ const xa = /* @__PURE__ */ Ie(Lu, [["__scopeId", "data-v-955da518"]]), Eu = /* @
|
|
|
2824
2833
|
typeof n.desc.format == "string" ? a.value = l[n.desc.format] ? l[n.desc.format](n.modelValue, n.formData, n.field) : "--" : a.value = n.modelValue || "-";
|
|
2825
2834
|
},
|
|
2826
2835
|
{ immediate: !0 }
|
|
2827
|
-
), (u, i) => (g(),
|
|
2836
|
+
), (u, i) => (g(), w("div", R({
|
|
2828
2837
|
class: ["ele-form-text", [...u.desc.class || [], u.desc.linkType ? "ele-form-text-click" : ""]],
|
|
2829
2838
|
style: u.desc.style
|
|
2830
2839
|
}, r.value, pe(c.value, !0)), [
|
|
2831
|
-
u.desc.title ? (g(),
|
|
2832
|
-
u.desc.icon ? (g(),
|
|
2840
|
+
u.desc.title ? (g(), w("span", Bu, de(u.desc.title + ": "), 1)) : V("", !0),
|
|
2841
|
+
u.desc.icon ? (g(), w("i", {
|
|
2833
2842
|
key: 1,
|
|
2834
2843
|
class: dt([(u.formData || {}).icon])
|
|
2835
2844
|
}, null, 2)) : V("", !0),
|
|
@@ -2858,15 +2867,15 @@ const ka = /* @__PURE__ */ Ie(Pu, [["__scopeId", "data-v-0bb52ac9"]]), Qu = /* @
|
|
|
2858
2867
|
return r("update:modelValue", i), fe(async () => {
|
|
2859
2868
|
var o, s;
|
|
2860
2869
|
c.value = await Ne(n, { maxlength: (s = (o = l.form) == null ? void 0 : o.leng) == null ? void 0 : s.textare, showWordLimit: !0, rows: 3, ...ue() }), a.value = !0;
|
|
2861
|
-
}),
|
|
2870
|
+
}), ne(
|
|
2862
2871
|
() => n.modelValue,
|
|
2863
2872
|
(o) => {
|
|
2864
2873
|
o && o.length > c.value.maxlength && (o = o.substring(0, c.value.maxlength)), i.value = o;
|
|
2865
2874
|
},
|
|
2866
2875
|
{ immediate: !0 }
|
|
2867
2876
|
), (o, s) => {
|
|
2868
|
-
const
|
|
2869
|
-
return a.value ? (g(), O(
|
|
2877
|
+
const d = C("el-input");
|
|
2878
|
+
return a.value ? (g(), O(d, R({
|
|
2870
2879
|
key: 0,
|
|
2871
2880
|
class: o.desc.class,
|
|
2872
2881
|
style: o.desc.style,
|
|
@@ -2874,7 +2883,7 @@ const ka = /* @__PURE__ */ Ie(Pu, [["__scopeId", "data-v-0bb52ac9"]]), Qu = /* @
|
|
|
2874
2883
|
}, c.value, {
|
|
2875
2884
|
disabled: o.disabled,
|
|
2876
2885
|
modelValue: i.value,
|
|
2877
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
2886
|
+
"onUpdate:modelValue": s[0] || (s[0] = (N) => i.value = N)
|
|
2878
2887
|
}, pe(u.value)), null, 16, ["class", "style", "disabled", "modelValue"])) : V("", !0);
|
|
2879
2888
|
};
|
|
2880
2889
|
}
|
|
@@ -2901,13 +2910,13 @@ const ka = /* @__PURE__ */ Ie(Pu, [["__scopeId", "data-v-0bb52ac9"]]), Qu = /* @
|
|
|
2901
2910
|
return fe(async () => {
|
|
2902
2911
|
c.value = await Ne(l, { editable: !1, ...ue() }), a.value = !0;
|
|
2903
2912
|
}), (o, s) => {
|
|
2904
|
-
const
|
|
2905
|
-
return a.value ? (g(), O(
|
|
2913
|
+
const d = C("el-time-picker");
|
|
2914
|
+
return a.value ? (g(), O(d, R({
|
|
2906
2915
|
key: 0,
|
|
2907
2916
|
class: "ElPlusFormTime-panel"
|
|
2908
2917
|
}, c.value, { disabled: o.disabled }, pe(u.value), {
|
|
2909
2918
|
modelValue: r.value,
|
|
2910
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
2919
|
+
"onUpdate:modelValue": s[0] || (s[0] = (N) => r.value = N)
|
|
2911
2920
|
}), null, 16, ["disabled", "modelValue"])) : V("", !0);
|
|
2912
2921
|
};
|
|
2913
2922
|
}
|
|
@@ -2932,19 +2941,19 @@ const Va = /* @__PURE__ */ Ie(Ru, [["__scopeId", "data-v-937cba1a"]]), Gu = /* @
|
|
|
2932
2941
|
return n("update:modelValue", r), fe(async () => {
|
|
2933
2942
|
a.value = await Ne(l, { format: "HH:mm:ss", editable: !1, ...ue() }), u.value = !0;
|
|
2934
2943
|
}), (o, s) => {
|
|
2935
|
-
const
|
|
2936
|
-
return u.value ? (g(), O(
|
|
2944
|
+
const d = C("el-time-picker");
|
|
2945
|
+
return u.value ? (g(), O(d, R({
|
|
2937
2946
|
key: 0,
|
|
2938
2947
|
isRange: "",
|
|
2939
2948
|
class: "el-plusF-form-timerange-panel"
|
|
2940
2949
|
}, a.value, { disabled: o.disabled }, pe(i.value), {
|
|
2941
2950
|
modelValue: r.value,
|
|
2942
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
2951
|
+
"onUpdate:modelValue": s[0] || (s[0] = (N) => r.value = N)
|
|
2943
2952
|
}), Je({ _: 2 }, [
|
|
2944
|
-
ce(c.value, (
|
|
2945
|
-
name:
|
|
2946
|
-
fn: x((
|
|
2947
|
-
me(o.$slots,
|
|
2953
|
+
ce(c.value, (N, m, A) => ({
|
|
2954
|
+
name: m,
|
|
2955
|
+
fn: x((S) => [
|
|
2956
|
+
me(o.$slots, m, { data: S }, void 0, !0)
|
|
2948
2957
|
])
|
|
2949
2958
|
}))
|
|
2950
2959
|
]), 1040, ["disabled", "modelValue"])) : V("", !0);
|
|
@@ -2982,12 +2991,12 @@ const Pa = /* @__PURE__ */ Ie(Wu, [["__scopeId", "data-v-32e2a1cb"]]), Ku = /* @
|
|
|
2982
2991
|
}, a.value, {
|
|
2983
2992
|
disabled: i.disabled,
|
|
2984
2993
|
modelValue: r.value,
|
|
2985
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
2994
|
+
"onUpdate:modelValue": o[0] || (o[0] = (d) => r.value = d)
|
|
2986
2995
|
}, pe(u.value)), Je({ _: 2 }, [
|
|
2987
|
-
ce(c.value, (
|
|
2988
|
-
name:
|
|
2989
|
-
fn: x((
|
|
2990
|
-
me(i.$slots,
|
|
2996
|
+
ce(c.value, (d, N, m) => ({
|
|
2997
|
+
name: N,
|
|
2998
|
+
fn: x((A) => [
|
|
2999
|
+
me(i.$slots, N, { data: A }, void 0, !0)
|
|
2991
3000
|
])
|
|
2992
3001
|
}))
|
|
2993
3002
|
]), 1040, ["class", "data", "style", "disabled", "modelValue"]);
|
|
@@ -3014,65 +3023,65 @@ const Qa = /* @__PURE__ */ Ie(qu, [["__scopeId", "data-v-2fec4270"]]), Ju = /* @
|
|
|
3014
3023
|
},
|
|
3015
3024
|
emits: ["update:modelValue", "validateThis"],
|
|
3016
3025
|
setup(e, { emit: t }) {
|
|
3017
|
-
const l = ae("lodash"), n = ae("globalData"), r = e, c = t, a = Xe(r, "modelValue", c), u = Ee([]), i = p(!1), o = p({}), s = p(De(r)),
|
|
3026
|
+
const l = ae("lodash"), n = ae("globalData"), r = e, c = t, a = Xe(r, "modelValue", c), u = Ee([]), i = p(!1), o = p({}), s = p(De(r)), d = p(), N = p(!1), m = p([]);
|
|
3018
3027
|
fe(async () => {
|
|
3019
|
-
o.value = await Ne(r, { checkStrictly: !0, showCheckbox: !0, accordion: !0, noSelectAll: !1, props: { label: "label", children: "children" }, ...ue() }), o.value.showCheckbox && !o.value.noSelectAll && u.length && (
|
|
3028
|
+
o.value = await Ne(r, { checkStrictly: !0, showCheckbox: !0, accordion: !0, noSelectAll: !1, props: { label: "label", children: "children" }, ...ue() }), o.value.showCheckbox && !o.value.noSelectAll && u.length && (m.value = E(u)), i.value = !0;
|
|
3020
3029
|
});
|
|
3021
|
-
function
|
|
3022
|
-
a.value =
|
|
3023
|
-
var
|
|
3024
|
-
|
|
3030
|
+
function A(M, _) {
|
|
3031
|
+
a.value = d.value.getCheckedKeys(!(r.desc.isPId ?? !0)), we(() => {
|
|
3032
|
+
var v;
|
|
3033
|
+
N.value = _ && m.value.length === ((v = a.value) == null ? void 0 : v.length), c("validateThis");
|
|
3025
3034
|
});
|
|
3026
3035
|
}
|
|
3027
|
-
function
|
|
3028
|
-
let
|
|
3029
|
-
|
|
3036
|
+
function S() {
|
|
3037
|
+
let M = [];
|
|
3038
|
+
N.value && (M = l.cloneDeep(m.value)), a.value = M, d.value.setCheckedKeys(a.value);
|
|
3030
3039
|
}
|
|
3031
|
-
function
|
|
3032
|
-
const
|
|
3033
|
-
return
|
|
3034
|
-
var
|
|
3035
|
-
(
|
|
3036
|
-
}),
|
|
3040
|
+
function E(M) {
|
|
3041
|
+
const _ = [];
|
|
3042
|
+
return M != null && M.length && M.map((v) => {
|
|
3043
|
+
var y;
|
|
3044
|
+
(y = v[o.value.props.children]) != null && y.length && _.push(...E(v[o.value.props.children])), _.push(v.id);
|
|
3045
|
+
}), _;
|
|
3037
3046
|
}
|
|
3038
|
-
return
|
|
3047
|
+
return ne(
|
|
3039
3048
|
() => r.desc.options,
|
|
3040
|
-
async (
|
|
3041
|
-
typeof
|
|
3049
|
+
async (M) => {
|
|
3050
|
+
typeof M == "string" ? u.splice(0, u.length, ...n[M] || []) : typeof M == "function" ? u.splice(0, u.length, ...await M(r.formData || {})) : Array.isArray(M) ? M && u && !Ke(M, u) && u.splice(0, u.length, ...M) : u.splice(0, u.length), o.value.showCheckbox && !o.value.noSelectAll && (m.value = E(u));
|
|
3042
3051
|
},
|
|
3043
3052
|
{ immediate: !0 }
|
|
3044
|
-
),
|
|
3053
|
+
), ne(
|
|
3045
3054
|
() => r.modelValue,
|
|
3046
|
-
(
|
|
3047
|
-
|
|
3055
|
+
(M) => {
|
|
3056
|
+
d.value.setCheckedKeys(M || []);
|
|
3048
3057
|
}
|
|
3049
|
-
), (
|
|
3050
|
-
const
|
|
3051
|
-
return g(),
|
|
3052
|
-
o.value.showCheckbox && !o.value.noSelectAll ? (g(),
|
|
3053
|
-
K(
|
|
3054
|
-
modelValue:
|
|
3055
|
-
"onUpdate:modelValue":
|
|
3056
|
-
onChange:
|
|
3058
|
+
), (M, _) => {
|
|
3059
|
+
const v = C("el-checkbox"), y = C("el-tree");
|
|
3060
|
+
return g(), w("div", Xu, [
|
|
3061
|
+
o.value.showCheckbox && !o.value.noSelectAll ? (g(), w("div", er, [
|
|
3062
|
+
K(v, {
|
|
3063
|
+
modelValue: N.value,
|
|
3064
|
+
"onUpdate:modelValue": _[0] || (_[0] = (T) => N.value = T),
|
|
3065
|
+
onChange: S,
|
|
3057
3066
|
label: "全部勾选",
|
|
3058
3067
|
border: ""
|
|
3059
3068
|
}, null, 8, ["modelValue"])
|
|
3060
3069
|
])) : V("", !0),
|
|
3061
|
-
i.value ? (g(), O(
|
|
3070
|
+
i.value ? (g(), O(y, R({
|
|
3062
3071
|
key: 1,
|
|
3063
3072
|
ref_key: "treeRef",
|
|
3064
|
-
ref:
|
|
3065
|
-
class:
|
|
3066
|
-
style:
|
|
3073
|
+
ref: d,
|
|
3074
|
+
class: M.desc.class,
|
|
3075
|
+
style: M.desc.style
|
|
3067
3076
|
}, o.value, {
|
|
3068
|
-
disabled:
|
|
3077
|
+
disabled: M.disabled,
|
|
3069
3078
|
"default-checked-keys": Le(a),
|
|
3070
|
-
loading:
|
|
3079
|
+
loading: M.loading,
|
|
3071
3080
|
"node-key": "id",
|
|
3072
3081
|
data: u
|
|
3073
3082
|
}, pe(s.value), {
|
|
3074
3083
|
class: "el-plus-form-tree",
|
|
3075
|
-
onCheckChange:
|
|
3084
|
+
onCheckChange: A
|
|
3076
3085
|
}), null, 16, ["class", "style", "disabled", "default-checked-keys", "loading", "data"])) : V("", !0)
|
|
3077
3086
|
]);
|
|
3078
3087
|
};
|
|
@@ -3100,22 +3109,22 @@ const Ua = /* @__PURE__ */ Ie(lr, [["__scopeId", "data-v-040847c8"]]), ar = /* @
|
|
|
3100
3109
|
const a = Ee([]), u = p(!1), i = p({}), o = p(De(n));
|
|
3101
3110
|
return fe(async () => {
|
|
3102
3111
|
i.value = await Ne(n, { filterable: !0, clearable: !0, props: { label: "name", value: "id", children: "children" }, ...ue() }), u.value = !0;
|
|
3103
|
-
}),
|
|
3112
|
+
}), ne(
|
|
3104
3113
|
() => n.desc.options,
|
|
3105
3114
|
async (s) => {
|
|
3106
3115
|
typeof s == "string" ? a.splice(0, a.length, ...l[s] || []) : typeof s == "function" ? a.splice(0, a.length, ...await s(n.formData || {})) : Array.isArray(s) ? s && a && !Ke(s, a) && a.splice(0, a.length, ...s) : a.splice(0, a.length);
|
|
3107
3116
|
},
|
|
3108
3117
|
{ immediate: !0 }
|
|
3109
|
-
), (s,
|
|
3110
|
-
const
|
|
3111
|
-
return u.value ? (g(), O(
|
|
3118
|
+
), (s, d) => {
|
|
3119
|
+
const N = C("el-tree-select");
|
|
3120
|
+
return u.value ? (g(), O(N, R({
|
|
3112
3121
|
key: 0,
|
|
3113
3122
|
class: s.desc.class,
|
|
3114
3123
|
style: s.desc.style
|
|
3115
3124
|
}, i.value, {
|
|
3116
3125
|
disabled: s.disabled,
|
|
3117
3126
|
modelValue: c.value,
|
|
3118
|
-
"onUpdate:modelValue":
|
|
3127
|
+
"onUpdate:modelValue": d[0] || (d[0] = (m) => c.value = m),
|
|
3119
3128
|
data: a,
|
|
3120
3129
|
loading: s.loading
|
|
3121
3130
|
}, pe(o.value), { "render-after-expand": !1 }), null, 16, ["class", "style", "disabled", "modelValue", "data", "loading"])) : V("", !0);
|
|
@@ -3156,189 +3165,189 @@ const Ua = /* @__PURE__ */ Ie(lr, [["__scopeId", "data-v-040847c8"]]), ar = /* @
|
|
|
3156
3165
|
setup(e, { emit: t }) {
|
|
3157
3166
|
const l = ae("defaultConf"), n = { excel: rr, pdf: ir, file: cr, txt: Mr, word: dr, zip: fr, ppt: pr }, r = e, c = t, a = p((typeof r.modelValue == "string" ? [{ url: r.modelValue }] : r.modelValue) || []);
|
|
3158
3167
|
c("update:modelValue", a);
|
|
3159
|
-
const u = p({}), i = p(!1), o = p(De(r)), s = p(""),
|
|
3160
|
-
const
|
|
3161
|
-
return a.value.map((
|
|
3168
|
+
const u = p({}), i = p(!1), o = p(De(r)), s = p(""), d = p(!1), N = p(0), m = X(() => {
|
|
3169
|
+
const D = [];
|
|
3170
|
+
return a.value.map((h) => {
|
|
3162
3171
|
var j;
|
|
3163
|
-
Lt.indexOf(((j =
|
|
3164
|
-
}),
|
|
3172
|
+
Lt.indexOf(((j = h.raw) == null ? void 0 : j.suffix) || h.suffix) >= 0 && D.push(h.url);
|
|
3173
|
+
}), D;
|
|
3165
3174
|
});
|
|
3166
3175
|
fe(async () => {
|
|
3167
|
-
var
|
|
3168
|
-
!((
|
|
3176
|
+
var D, h, j, L, B, W, re;
|
|
3177
|
+
!((D = l.upload) != null && D.sign) && !((h = r.desc) != null && h.sign) && l.debug && console.warn("上传私有加密仓库必须在config或desc中配置sign方法进行图片/文件签名鉴权,否则图片将无法显示和预览!"), u.value = await Ne(r, {
|
|
3169
3178
|
drag: !0,
|
|
3170
3179
|
listType: r.desc.upType === "file" ? "text" : "picture-card",
|
|
3171
3180
|
multiple: !!r.desc.multiple,
|
|
3172
3181
|
limit: r.desc.multiple ? r.desc.limit || 20 : 1,
|
|
3173
3182
|
autoUpload: r.desc.autoUpload ?? !0,
|
|
3174
3183
|
accept: r.desc.accept || Ll[`${r.desc.upType || "image"}Types`].join(","),
|
|
3175
|
-
maxSize: r.desc.maxSize || (r.desc.upType === "file" ? (j = l.upload) == null ? void 0 : j.maxFSize : (
|
|
3176
|
-
beforeUpload:
|
|
3177
|
-
onRemove:
|
|
3178
|
-
onSuccess:
|
|
3179
|
-
onExceed:
|
|
3180
|
-
onPreview:
|
|
3184
|
+
maxSize: r.desc.maxSize || (r.desc.upType === "file" ? (j = l.upload) == null ? void 0 : j.maxFSize : (L = l.upload) == null ? void 0 : L.maxISize),
|
|
3185
|
+
beforeUpload: A,
|
|
3186
|
+
onRemove: v,
|
|
3187
|
+
onSuccess: M,
|
|
3188
|
+
onExceed: I,
|
|
3189
|
+
onPreview: T,
|
|
3181
3190
|
...ue()
|
|
3182
|
-
}), (B = r.desc) != null && B.uploadFn || (W = l.upload) != null && W.uploadFn ? u.value.httpRequest =
|
|
3191
|
+
}), (B = r.desc) != null && B.uploadFn || (W = l.upload) != null && W.uploadFn ? u.value.httpRequest = b : (((re = l.upload) == null ? void 0 : re.type) === "minio" && (u.value.method = "PUT"), u.value.action = s), i.value = !0;
|
|
3183
3192
|
});
|
|
3184
|
-
async function
|
|
3185
|
-
var j,
|
|
3186
|
-
|
|
3187
|
-
const
|
|
3188
|
-
if (
|
|
3189
|
-
return Ge.warning(
|
|
3193
|
+
async function A(D) {
|
|
3194
|
+
var j, L, B, W, re, je, oe, f, z;
|
|
3195
|
+
D.suffix = D.name.substring(D.name.lastIndexOf("."));
|
|
3196
|
+
const h = Z(D, Ll[`${r.desc.upType || "image"}Suffixes`], u.value.maxSize);
|
|
3197
|
+
if (h !== !0)
|
|
3198
|
+
return Ge.warning(h), !1;
|
|
3190
3199
|
try {
|
|
3191
|
-
|
|
3200
|
+
D.url = URL.createObjectURL(D);
|
|
3192
3201
|
let k = {};
|
|
3193
|
-
(j = r.desc) != null && j.action && (k = await
|
|
3194
|
-
"Content-Type":
|
|
3202
|
+
(j = r.desc) != null && j.action && (k = await S((L = r.desc) == null ? void 0 : L.action, { fileName: D.name })), k.action || (k = await S((B = l.upload) == null ? void 0 : B.action, { fileName: D.name })), s.value = k.action, D.uploadId = k.uploadId || "", D.furl = k.furl, ((W = r.desc) != null && W.token || (re = l.upload) != null && re.token) && (u.value.data = { token: await E(((je = r.desc) == null ? void 0 : je.token) || ((oe = l.upload) == null ? void 0 : oe.token), D) }), !((f = r.desc) != null && f.uploadFn) && ((z = l.upload) == null ? void 0 : z.type) === "minio" && (u.value.data = D, u.value.headers = {
|
|
3203
|
+
"Content-Type": D.type
|
|
3195
3204
|
});
|
|
3196
3205
|
} catch (k) {
|
|
3197
3206
|
l.debug && console.log("获取action出错: ", k);
|
|
3198
3207
|
}
|
|
3199
3208
|
}
|
|
3200
|
-
async function
|
|
3201
|
-
var
|
|
3209
|
+
async function S(D, h) {
|
|
3210
|
+
var L, B, W, re, je, oe, f, z, k, $, ge, le, ke, Ve, Me;
|
|
3202
3211
|
const j = { action: "", uploadId: void 0, token: void 0, furl: "" };
|
|
3203
|
-
if (typeof
|
|
3204
|
-
const Ze =
|
|
3205
|
-
typeof Pe == "object" ? (j.action = ut(((W = (B = r.desc) == null ? void 0 : B.actionMap) == null ? void 0 : W.actionKey) || ((je = (re = l.upload) == null ? void 0 : re.actionMap) == null ? void 0 : je.actionKey) || [], Pe), j.uploadId = ut(((f = (
|
|
3212
|
+
if (typeof D == "function") {
|
|
3213
|
+
const Ze = D({ ...h || {}, type: (L = l.upload) == null ? void 0 : L.type }), Pe = lt(Ze) ? await Ze : Ze;
|
|
3214
|
+
typeof Pe == "object" ? (j.action = ut(((W = (B = r.desc) == null ? void 0 : B.actionMap) == null ? void 0 : W.actionKey) || ((je = (re = l.upload) == null ? void 0 : re.actionMap) == null ? void 0 : je.actionKey) || [], Pe), j.uploadId = ut(((f = (oe = r.desc) == null ? void 0 : oe.actionMap) == null ? void 0 : f.uploadIdKey) || ((k = (z = l.upload) == null ? void 0 : z.actionMap) == null ? void 0 : k.uploadIdKey) || [], Pe), j.token = ut((($ = r.desc) == null ? void 0 : $.tokenKey) || ((ge = l.upload) == null ? void 0 : ge.tokenKey) || [], Pe), j.furl = ut(((ke = (le = r.desc) == null ? void 0 : le.actionMap) == null ? void 0 : ke.objectUrlKey) || ((Me = (Ve = l.upload) == null ? void 0 : Ve.actionMap) == null ? void 0 : Me.objectUrlKey) || [], Pe)) : j.action = Pe;
|
|
3206
3215
|
} else
|
|
3207
|
-
|
|
3216
|
+
D !== void 0 && (j.action = D);
|
|
3208
3217
|
return j;
|
|
3209
3218
|
}
|
|
3210
|
-
async function
|
|
3211
|
-
var
|
|
3219
|
+
async function E(D, h) {
|
|
3220
|
+
var L, B;
|
|
3212
3221
|
let j = "";
|
|
3213
|
-
if (typeof
|
|
3214
|
-
const W =
|
|
3215
|
-
typeof re == "object" ? j = ut(((
|
|
3222
|
+
if (typeof D == "function") {
|
|
3223
|
+
const W = D(h), re = lt(W) ? await W : W;
|
|
3224
|
+
typeof re == "object" ? j = ut(((L = r.desc) == null ? void 0 : L.tokenKey) || ((B = l.upload) == null ? void 0 : B.tokenKey) || [], re) : j = re;
|
|
3216
3225
|
}
|
|
3217
3226
|
return j;
|
|
3218
3227
|
}
|
|
3219
|
-
async function
|
|
3220
|
-
var j,
|
|
3221
|
-
if (
|
|
3222
|
-
const
|
|
3223
|
-
|
|
3228
|
+
async function M(D, h) {
|
|
3229
|
+
var j, L, B, W, re, je;
|
|
3230
|
+
if (D && Object.keys(D).length > 0) {
|
|
3231
|
+
const oe = ut(((L = (j = l.upload) == null ? void 0 : j.actionMap) == null ? void 0 : L.objectUrlKey) || [], D.request || D);
|
|
3232
|
+
oe && (h.raw.furl = oe);
|
|
3224
3233
|
}
|
|
3225
3234
|
if ((B = l.upload) != null && B.sign) {
|
|
3226
|
-
let
|
|
3227
|
-
const f = (W = l.upload) == null ? void 0 : W.sign(
|
|
3228
|
-
lt(f) ?
|
|
3235
|
+
let oe = {};
|
|
3236
|
+
const f = (W = l.upload) == null ? void 0 : W.sign(h.raw.uploadId);
|
|
3237
|
+
lt(f) ? oe = await f : oe = f, h.raw.previewUrl = ut(((re = l.upload.signMap) == null ? void 0 : re.previewUrlKey) || [], oe), h.raw.shareUrl = ut(((je = l.upload.signMap) == null ? void 0 : je.objectUrlKey) || [], oe), h.raw.url = h.raw.shareUrl;
|
|
3229
3238
|
} else
|
|
3230
|
-
|
|
3231
|
-
r.desc.upType !== "file" ?
|
|
3239
|
+
h.raw.previewUrl = h.raw.furl, h.raw.shareUrl = h.raw.furl;
|
|
3240
|
+
r.desc.upType !== "file" ? h.url = _(h.raw) : h.url = h.raw.furl, y(h, 1);
|
|
3232
3241
|
}
|
|
3233
|
-
function
|
|
3234
|
-
const
|
|
3242
|
+
function _(D) {
|
|
3243
|
+
const h = D.shareUrl || D.furl || D.url, j = ((D == null ? void 0 : D.suffix) || h.substring(h.lastIndexOf(".")) || "").toLocaleLowerCase();
|
|
3235
3244
|
if (j) {
|
|
3236
3245
|
if (Lt.indexOf(j) >= 0)
|
|
3237
|
-
return
|
|
3238
|
-
for (let
|
|
3239
|
-
for (let B = 0; B < ht[
|
|
3240
|
-
if (ht[
|
|
3241
|
-
return n[ht[
|
|
3246
|
+
return h;
|
|
3247
|
+
for (let L = 0; L < ht.length; L++)
|
|
3248
|
+
for (let B = 0; B < ht[L].suffixes.length; B++)
|
|
3249
|
+
if (ht[L].suffixes[B] === j)
|
|
3250
|
+
return n[ht[L].type];
|
|
3242
3251
|
}
|
|
3243
3252
|
return n.file;
|
|
3244
3253
|
}
|
|
3245
|
-
function
|
|
3246
|
-
|
|
3254
|
+
function v(D) {
|
|
3255
|
+
y(D, 0);
|
|
3247
3256
|
}
|
|
3248
|
-
function
|
|
3249
|
-
var j,
|
|
3250
|
-
if (
|
|
3257
|
+
function y(D, h) {
|
|
3258
|
+
var j, L, B;
|
|
3259
|
+
if (h === 1)
|
|
3251
3260
|
a.value.push({
|
|
3252
|
-
name:
|
|
3253
|
-
furl:
|
|
3254
|
-
url: r.desc.upType !== "file" ?
|
|
3255
|
-
fsize:
|
|
3256
|
-
uid:
|
|
3257
|
-
mimeType: (
|
|
3258
|
-
suffix: ((B =
|
|
3261
|
+
name: D.name,
|
|
3262
|
+
furl: D.raw.furl || D.furl || D.url,
|
|
3263
|
+
url: r.desc.upType !== "file" ? _(D.raw) : ((j = D == null ? void 0 : D.raw) == null ? void 0 : j.shareUrl) || D.url,
|
|
3264
|
+
fsize: D.size,
|
|
3265
|
+
uid: D.uid,
|
|
3266
|
+
mimeType: (L = D.raw) == null ? void 0 : L.type,
|
|
3267
|
+
suffix: ((B = D.raw.suffix) == null ? void 0 : B.toLocaleLowerCase()) || "",
|
|
3259
3268
|
busId: r.desc.busId,
|
|
3260
3269
|
busType: r.desc.busType
|
|
3261
3270
|
});
|
|
3262
3271
|
else {
|
|
3263
|
-
const W = a.value.findIndex((re) => re.uid ===
|
|
3272
|
+
const W = a.value.findIndex((re) => re.uid === D.uid);
|
|
3264
3273
|
W >= 0 && a.value.splice(W, 1);
|
|
3265
3274
|
}
|
|
3266
3275
|
c("validateThis");
|
|
3267
3276
|
}
|
|
3268
|
-
function
|
|
3269
|
-
var
|
|
3270
|
-
Lt.indexOf((((
|
|
3277
|
+
function T(D) {
|
|
3278
|
+
var h, j;
|
|
3279
|
+
Lt.indexOf((((h = D.raw) == null ? void 0 : h.suffix) || D.suffix || "").toLocaleLowerCase()) >= 0 ? (N.value = m.value.findIndex((L) => {
|
|
3271
3280
|
var B;
|
|
3272
|
-
return
|
|
3273
|
-
}),
|
|
3281
|
+
return L === (((B = D.raw) == null ? void 0 : B.shareUrl) || D.furl);
|
|
3282
|
+
}), N.value < 0 && (N.value = 0), d.value = !0) : window.open(((j = D.raw) == null ? void 0 : j.previewUrl) || D.previewUrl, "_blank");
|
|
3274
3283
|
}
|
|
3275
|
-
function
|
|
3284
|
+
function I() {
|
|
3276
3285
|
Ge.error("数量最多只能上传" + u.value.limit + "个图片/文件!!!");
|
|
3277
3286
|
}
|
|
3278
|
-
function
|
|
3279
|
-
var j,
|
|
3280
|
-
return
|
|
3287
|
+
function b(D) {
|
|
3288
|
+
var j, L;
|
|
3289
|
+
return D.action = s.value, (((j = r.desc) == null ? void 0 : j.uploadFn) || ((L = l.upload) == null ? void 0 : L.uploadFn))(D);
|
|
3281
3290
|
}
|
|
3282
|
-
function
|
|
3291
|
+
function P() {
|
|
3283
3292
|
}
|
|
3284
|
-
function Z(
|
|
3285
|
-
return
|
|
3293
|
+
function Z(D, h, j) {
|
|
3294
|
+
return D.size > j ? "上传文件大小不能超过 " + (j / 1024 / 1024).toFixed(2) + "M~" : h && h.length > 0 && h.every((L) => L !== (D.suffix || "").toLocaleLowerCase()) ? "上传文件类型错误,请重新选择~" : !0;
|
|
3286
3295
|
}
|
|
3287
|
-
return
|
|
3296
|
+
return ne(
|
|
3288
3297
|
() => r.modelValue,
|
|
3289
|
-
(
|
|
3290
|
-
JSON.stringify(
|
|
3291
|
-
var
|
|
3292
|
-
return r.desc.upType !== "file" && (j.url =
|
|
3298
|
+
(D, h) => {
|
|
3299
|
+
JSON.stringify(D) !== JSON.stringify(h) && (typeof D == "string" ? D !== "" ? a.value = [{ url: D, furl: D, suffix: D.substring(D.lastIndexOf(".")).toLocaleLowerCase() }] : a.value = [] : a.value = (D == null ? void 0 : D.map((j) => {
|
|
3300
|
+
var L, B;
|
|
3301
|
+
return r.desc.upType !== "file" && (j.url = _(j), j.furl = _(j)), j.suffix = (j.suffix || ((B = j.url) == null ? void 0 : B.substring(((L = j.url) == null ? void 0 : L.lastIndexOf(".")) || 0)) || "").toLocaleLowerCase(), j.previewUrl = j.furl || j.url, j;
|
|
3293
3302
|
})) || []);
|
|
3294
3303
|
},
|
|
3295
3304
|
{ immediate: !0 }
|
|
3296
|
-
), (
|
|
3305
|
+
), (D, h) => {
|
|
3297
3306
|
var re;
|
|
3298
|
-
const j = C("el-icon"),
|
|
3299
|
-
return i.value ? (g(),
|
|
3307
|
+
const j = C("el-icon"), L = C("el-upload"), B = C("el-image-viewer"), W = C("el-button");
|
|
3308
|
+
return i.value ? (g(), w("div", {
|
|
3300
3309
|
key: 0,
|
|
3301
|
-
class: dt(["ele-form-upload-image", { "ele-form-upload-file":
|
|
3310
|
+
class: dt(["ele-form-upload-image", { "ele-form-upload-file": D.desc.upType === "file" }])
|
|
3302
3311
|
}, [
|
|
3303
|
-
K(
|
|
3304
|
-
disabled:
|
|
3312
|
+
K(L, R({ class: "ele-image-upload" }, u.value, pe(o.value), {
|
|
3313
|
+
disabled: D.disabled,
|
|
3305
3314
|
fileList: a.value || [],
|
|
3306
3315
|
class: { "over-limit": ((re = a.value) == null ? void 0 : re.length) >= u.value.limit, "upload-disabled": u.value.disabled }
|
|
3307
3316
|
}), {
|
|
3308
3317
|
default: x(() => [
|
|
3309
3318
|
ee("div", Nr, [
|
|
3310
|
-
|
|
3319
|
+
D.desc.icon ? (g(), w("i", {
|
|
3311
3320
|
key: 0,
|
|
3312
|
-
class: dt(
|
|
3313
|
-
style: Se({ fontSize:
|
|
3321
|
+
class: dt(D.desc.icon),
|
|
3322
|
+
style: Se({ fontSize: D.desc.fontSize || "14px", color: D.desc.color || "#C0C4CC" })
|
|
3314
3323
|
}, null, 6)) : (g(), O(j, {
|
|
3315
3324
|
key: 1,
|
|
3316
|
-
style: Se({ fontSize:
|
|
3325
|
+
style: Se({ fontSize: D.desc.fontSize || "14px", color: D.desc.color || "#C0C4CC" })
|
|
3317
3326
|
}, {
|
|
3318
3327
|
default: x(() => [
|
|
3319
3328
|
K(Le(Hn))
|
|
3320
3329
|
]),
|
|
3321
3330
|
_: 1
|
|
3322
3331
|
}, 8, ["style"])),
|
|
3323
|
-
|
|
3324
|
-
|
|
3332
|
+
D.desc.upType === "file" && D.desc.text2 ? (g(), w("div", gr, de(D.desc.text2), 1)) : V("", !0),
|
|
3333
|
+
D.desc.upType === "file" ? (g(), w("div", jr, de(D.desc.text || "拖拽/点击上传"), 1)) : V("", !0)
|
|
3325
3334
|
])
|
|
3326
3335
|
]),
|
|
3327
3336
|
_: 1
|
|
3328
3337
|
}, 16, ["disabled", "fileList", "class"]),
|
|
3329
|
-
|
|
3338
|
+
d.value ? (g(), O(B, {
|
|
3330
3339
|
key: 0,
|
|
3331
|
-
onClose:
|
|
3340
|
+
onClose: h[0] || (h[0] = (je) => d.value = !1),
|
|
3332
3341
|
teleported: "",
|
|
3333
|
-
initialIndex:
|
|
3334
|
-
"url-list":
|
|
3342
|
+
initialIndex: N.value,
|
|
3343
|
+
"url-list": m.value
|
|
3335
3344
|
}, null, 8, ["initialIndex", "url-list"])) : V("", !0),
|
|
3336
|
-
u.value.autoUpload ? V("", !0) : (g(),
|
|
3345
|
+
u.value.autoUpload ? V("", !0) : (g(), w("div", yr, [
|
|
3337
3346
|
K(W, {
|
|
3338
3347
|
style: { "margin-left": "10px" },
|
|
3339
3348
|
size: "small",
|
|
3340
3349
|
type: "success",
|
|
3341
|
-
onClick:
|
|
3350
|
+
onClick: P,
|
|
3342
3351
|
disabled: u.value.disabled
|
|
3343
3352
|
}, {
|
|
3344
3353
|
default: x(() => [
|
|
@@ -3490,43 +3499,43 @@ const ei = { class: "required-dot" }, ti = ["innerHTML"], li = {
|
|
|
3490
3499
|
},
|
|
3491
3500
|
emits: ["request", "reset", "cancel"],
|
|
3492
3501
|
setup(e, { expose: t, emit: l }) {
|
|
3493
|
-
var
|
|
3494
|
-
const n = ae("lodash"), r = ae("defaultConf"), c = l, a = e, u = p(), i = p(!1), o = ue(), s = p([]),
|
|
3495
|
-
let
|
|
3502
|
+
var oe;
|
|
3503
|
+
const n = ae("lodash"), r = ae("defaultConf"), c = l, a = e, u = p(), i = p(!1), o = ue(), s = p([]), d = p(!1);
|
|
3504
|
+
let N = null;
|
|
3496
3505
|
p([]);
|
|
3497
|
-
const
|
|
3506
|
+
const m = X(() => a.size || r.size), A = [...nn, ...((oe = r.form) == null ? void 0 : oe.comList) || []], S = X(() => ({ display: "flex", flexDirection: a.isTable ? "row" : "column" })), E = X(() => {
|
|
3498
3507
|
var f;
|
|
3499
3508
|
return {
|
|
3500
3509
|
...a.formAttrs,
|
|
3501
3510
|
_labelWidth: a.isTable ? "auto" : a.labelWidth === "auto" ? a.isDialog ? "100px" : "120px" : parseInt(a.labelWidth + "") + "px",
|
|
3502
3511
|
// validateOnRuleChange: false,
|
|
3503
|
-
disabled: a.disabled ||
|
|
3504
|
-
rules:
|
|
3512
|
+
disabled: a.disabled || d.value,
|
|
3513
|
+
rules: M,
|
|
3505
3514
|
labelPosition: ia() ? "top" : ((f = a.formAttrs) == null ? void 0 : f.labelPosition) || "right",
|
|
3506
3515
|
style: {
|
|
3507
3516
|
width: a.maxWidth || (a.isTable ? "100%" : a.isDialog ? "80%" : "1000px"),
|
|
3508
3517
|
paddingRight: a.isTable ? "0" : "20px"
|
|
3509
3518
|
}
|
|
3510
3519
|
};
|
|
3511
|
-
}),
|
|
3520
|
+
}), M = X(() => {
|
|
3512
3521
|
const f = a.rules || {};
|
|
3513
|
-
return a.formDesc && Object.keys(a.formDesc).map((
|
|
3514
|
-
f[
|
|
3522
|
+
return a.formDesc && Object.keys(a.formDesc).map((z) => {
|
|
3523
|
+
f[z] || (f[z] = []);
|
|
3515
3524
|
let k = !1;
|
|
3516
|
-
if (a.formDesc && a.formDesc[
|
|
3517
|
-
if (a.formDesc[
|
|
3518
|
-
typeof a.formDesc[
|
|
3519
|
-
f[
|
|
3520
|
-
}), f[
|
|
3525
|
+
if (a.formDesc && a.formDesc[z] && (k = a.formDesc && a.formDesc[z].required || !1), typeof k == "function" && (k = k(n.cloneDeep(a.modelValue))), a.formDesc) {
|
|
3526
|
+
if (a.formDesc[z].rules)
|
|
3527
|
+
typeof a.formDesc[z].rules == "string" ? f[z].push(...El[a.formDesc[z].rules]) : po(a.formDesc[z].rules).map(($) => {
|
|
3528
|
+
f[z].push($);
|
|
3529
|
+
}), f[z].find(($) => $.required) && (a.formDesc[z].required = !0);
|
|
3521
3530
|
else if (k) {
|
|
3522
3531
|
let $ = "notAllBlank";
|
|
3523
|
-
switch (a.formDesc[
|
|
3532
|
+
switch (a.formDesc[z].type) {
|
|
3524
3533
|
case "upload":
|
|
3525
3534
|
case "select":
|
|
3526
3535
|
case "password":
|
|
3527
3536
|
case "textarea":
|
|
3528
3537
|
case "editor":
|
|
3529
|
-
$ = a.formDesc[
|
|
3538
|
+
$ = a.formDesc[z].type || "";
|
|
3530
3539
|
break;
|
|
3531
3540
|
case "cascader":
|
|
3532
3541
|
case "tselect":
|
|
@@ -3541,22 +3550,22 @@ const ei = { class: "required-dot" }, ti = ["innerHTML"], li = {
|
|
|
3541
3550
|
$ = "cascader";
|
|
3542
3551
|
break;
|
|
3543
3552
|
}
|
|
3544
|
-
f[
|
|
3553
|
+
f[z].push(...El[$]);
|
|
3545
3554
|
}
|
|
3546
3555
|
}
|
|
3547
3556
|
}), we(() => {
|
|
3548
3557
|
setTimeout(() => {
|
|
3549
|
-
|
|
3558
|
+
L();
|
|
3550
3559
|
}, 50);
|
|
3551
3560
|
}), f;
|
|
3552
|
-
}),
|
|
3561
|
+
}), _ = X(() => {
|
|
3553
3562
|
const f = [];
|
|
3554
3563
|
if (a.formDesc) {
|
|
3555
|
-
|
|
3556
|
-
const
|
|
3564
|
+
v();
|
|
3565
|
+
const z = n.cloneDeep(a.formDesc);
|
|
3557
3566
|
let k = [];
|
|
3558
|
-
for (const le in
|
|
3559
|
-
k.push({ ...
|
|
3567
|
+
for (const le in z)
|
|
3568
|
+
k.push({ ...z[le], field: le });
|
|
3560
3569
|
let $ = [], ge = 0;
|
|
3561
3570
|
k.map((le) => {
|
|
3562
3571
|
if (le._vif && ($.push(le), ge++, le.colspan && (ge += le.colspan - 1), ge >= a.column)) {
|
|
@@ -3566,10 +3575,10 @@ const ei = { class: "required-dot" }, ti = ["innerHTML"], li = {
|
|
|
3566
3575
|
}), $.length > 0 && f.push($);
|
|
3567
3576
|
}
|
|
3568
3577
|
if (f != null && f.length && a.disabledTab && (!a.isGroupForm || a.isGroupForm && a.groupFormDesc))
|
|
3569
|
-
for (let
|
|
3570
|
-
const k = f[f.length - 1][
|
|
3578
|
+
for (let z = f[f.length - 1].length - 1; z >= 0; z--) {
|
|
3579
|
+
const k = f[f.length - 1][z].type || "";
|
|
3571
3580
|
if (["image", "link", "rate", "status", "tag", "text"].indexOf(k) < 0) {
|
|
3572
|
-
const $ = f[f.length - 1][
|
|
3581
|
+
const $ = f[f.length - 1][z].on || {}, ge = $.focus, le = $.blur;
|
|
3573
3582
|
$.focus = function() {
|
|
3574
3583
|
document.onkeydown = (ke) => {
|
|
3575
3584
|
if (ke.keyCode == 9)
|
|
@@ -3578,35 +3587,35 @@ const ei = { class: "required-dot" }, ti = ["innerHTML"], li = {
|
|
|
3578
3587
|
}, $.blur = function() {
|
|
3579
3588
|
document.onkeydown = function() {
|
|
3580
3589
|
}, le && le();
|
|
3581
|
-
}, f[f.length - 1][
|
|
3590
|
+
}, f[f.length - 1][z].on = $;
|
|
3582
3591
|
break;
|
|
3583
3592
|
}
|
|
3584
3593
|
}
|
|
3585
3594
|
return f;
|
|
3586
|
-
}),
|
|
3595
|
+
}), v = n.debounce(
|
|
3587
3596
|
() => {
|
|
3588
3597
|
a.formDesc && Object.keys(a.formDesc).forEach((f) => {
|
|
3589
3598
|
if (a.formDesc) {
|
|
3590
|
-
const
|
|
3591
|
-
if (
|
|
3592
|
-
|
|
3599
|
+
const z = a.formDesc[f];
|
|
3600
|
+
if (z && z.type) {
|
|
3601
|
+
z._type = A.includes(z.type.toLowerCase()) ? "el-plus-form-" + z.type : z.type, z._vif = T(z, "vif", f, !z.isBlank), z._disabled = T(z, "disabled", f, a.disabled ?? !1);
|
|
3593
3602
|
const k = {};
|
|
3594
|
-
|
|
3603
|
+
z._attrs = Object.assign({}, T(z, "attrs", f), k), z._label = T(z, "label", f), typeof z.label != "string" && (z.label = z._label), z._tip = T(z, "tip", f), !z._tip && !z.noTip && z.type === "upload" && (z._tip = `最多上传${z.multiple ? z.limit || 20 : 1}${z.upType === "file" ? "个文件" : "张图片"}`), z.default !== void 0 && z.default !== null && a.modelValue[f] === void 0 && (a.modelValue[f] = z.default), z.auth && (r.auth ? z._vif = r.auth(z.auth) : console.warn("使用auth属性,请在crud注册时传入auth校验方法~"));
|
|
3595
3604
|
} else
|
|
3596
|
-
|
|
3605
|
+
z && z.isBlank && (z._vif = T(z, "vif", "", !0));
|
|
3597
3606
|
}
|
|
3598
3607
|
});
|
|
3599
3608
|
},
|
|
3600
3609
|
100,
|
|
3601
3610
|
{ leading: !0, trailing: !1 }
|
|
3602
|
-
),
|
|
3611
|
+
), y = X(() => {
|
|
3603
3612
|
let f = [];
|
|
3604
3613
|
return a.showBtns && (a.showCancel && f.push({
|
|
3605
3614
|
field: "_reset_btn",
|
|
3606
3615
|
desc: {
|
|
3607
3616
|
label: a.cancelBtnText || "取消",
|
|
3608
|
-
size:
|
|
3609
|
-
disabled:
|
|
3617
|
+
size: m.value,
|
|
3618
|
+
disabled: d.value,
|
|
3610
3619
|
on: { click: () => c("cancel") }
|
|
3611
3620
|
}
|
|
3612
3621
|
}), a.showReset && f.push({
|
|
@@ -3614,31 +3623,31 @@ const ei = { class: "required-dot" }, ti = ["innerHTML"], li = {
|
|
|
3614
3623
|
desc: {
|
|
3615
3624
|
label: a.resetBtnText || "重置",
|
|
3616
3625
|
confirm: `确定要${a.resetBtnText || "重置"}?`,
|
|
3617
|
-
size:
|
|
3618
|
-
disabled:
|
|
3626
|
+
size: m.value,
|
|
3627
|
+
disabled: d.value,
|
|
3619
3628
|
on: { click: j }
|
|
3620
3629
|
}
|
|
3621
3630
|
}), a.showSubmit && f.push({
|
|
3622
3631
|
field: "_reset_btn",
|
|
3623
3632
|
desc: {
|
|
3624
3633
|
label: a.submitBtnText || "提交",
|
|
3625
|
-
size:
|
|
3634
|
+
size: m.value,
|
|
3626
3635
|
type: "primary",
|
|
3627
3636
|
disabled: a.disabled,
|
|
3628
|
-
loading: a.isLoading ||
|
|
3629
|
-
on: { click:
|
|
3637
|
+
loading: a.isLoading || d.value,
|
|
3638
|
+
on: { click: h }
|
|
3630
3639
|
}
|
|
3631
3640
|
})), f;
|
|
3632
|
-
}),
|
|
3633
|
-
|
|
3634
|
-
k ? f() :
|
|
3641
|
+
}), T = (f, z, k, $ = null) => typeof f[z] == "function" ? (i.value = !0, f[z](a.modelValue, a.modelValue[k])) : typeof f[z] == "boolean" ? f[z] ?? !1 : typeof f[z] == "string" ? f[z] ?? "" : f[z] ?? $, I = () => new Promise((f, z) => {
|
|
3642
|
+
M.value ? u.value.validate((k, $) => {
|
|
3643
|
+
k ? f() : z($);
|
|
3635
3644
|
}) : f();
|
|
3636
|
-
}),
|
|
3637
|
-
f && (s.value.some((
|
|
3638
|
-
},
|
|
3645
|
+
}), b = (f) => {
|
|
3646
|
+
f && (s.value.some((z) => z.field === f.field) || s.value.push(f));
|
|
3647
|
+
}, P = (f, z, k) => {
|
|
3639
3648
|
const $ = {};
|
|
3640
3649
|
if (!f)
|
|
3641
|
-
return { [
|
|
3650
|
+
return { [z]: k };
|
|
3642
3651
|
if (!f._vif || k === void 0 || k === null)
|
|
3643
3652
|
return $;
|
|
3644
3653
|
if (f.type === "category")
|
|
@@ -3650,7 +3659,7 @@ const ei = { class: "required-dot" }, ti = ["innerHTML"], li = {
|
|
|
3650
3659
|
else if (f.type === "area") {
|
|
3651
3660
|
k === null && (k = [null, null, null, null]);
|
|
3652
3661
|
const [ge, le, ke, Ve] = k;
|
|
3653
|
-
f.checkStrictly ? $[
|
|
3662
|
+
f.checkStrictly ? $[z] = Ve || ke || le || ge || null : ($[f.propPrefix ? f.propPrefix + "ProvinceId" : "provinceId"] = ge || -1, $[f.propPrefix ? f.propPrefix + "CityId" : "cityId"] = le || -1, $[f.propPrefix ? f.propPrefix + "ZoneId" : "zoneId"] = ke || -1, $[f.propPrefix ? f.propPrefix + "StreetId" : "streetId"] = Ve || -1);
|
|
3654
3663
|
} else if (f.type === "daterange") {
|
|
3655
3664
|
if (k && k.length === 2) {
|
|
3656
3665
|
const ge = f.startTimeKey ? f.startTimeKey : f.propPrefix ? f.propPrefix + "StartTime" : "startTime", le = f.endTimeKey ? f.endTimeKey : f.propPrefix ? f.propPrefix + "EndTime" : "endTime";
|
|
@@ -3675,131 +3684,131 @@ const ei = { class: "required-dot" }, ti = ["innerHTML"], li = {
|
|
|
3675
3684
|
Array.isArray(k) && (k = k.join(","));
|
|
3676
3685
|
break;
|
|
3677
3686
|
}
|
|
3678
|
-
$[
|
|
3687
|
+
$[z] = k;
|
|
3679
3688
|
}
|
|
3680
3689
|
return $;
|
|
3681
3690
|
}, Z = () => {
|
|
3682
3691
|
const f = {};
|
|
3683
|
-
return (a.groupFormDesc || a.formDesc) && Object.keys(a.modelValue).map((
|
|
3684
|
-
["provinceId", "cityId", "zoneId", "streetId", "startTime", "endTime"].indexOf(
|
|
3692
|
+
return (a.groupFormDesc || a.formDesc) && Object.keys(a.modelValue).map((z) => {
|
|
3693
|
+
["provinceId", "cityId", "zoneId", "streetId", "startTime", "endTime"].indexOf(z) >= 0 || (a.groupFormDesc || a.formDesc) && Object.assign(f, P((a.groupFormDesc || a.formDesc || {})[z], z, a.modelValue[z]));
|
|
3685
3694
|
}), f;
|
|
3686
|
-
},
|
|
3695
|
+
}, D = () => {
|
|
3687
3696
|
s.value.map((f) => {
|
|
3688
3697
|
f.CID && f.changeValidImg();
|
|
3689
3698
|
});
|
|
3690
|
-
},
|
|
3699
|
+
}, h = async () => {
|
|
3691
3700
|
let f = Z();
|
|
3692
3701
|
try {
|
|
3693
3702
|
if (o.beforeValidate) {
|
|
3694
|
-
const
|
|
3695
|
-
if (!(lt(
|
|
3703
|
+
const z = o.beforeValidate(f);
|
|
3704
|
+
if (!(lt(z) ? await z : z))
|
|
3696
3705
|
return;
|
|
3697
3706
|
}
|
|
3698
|
-
a.groupFormDesc || await
|
|
3699
|
-
for (const
|
|
3700
|
-
if (
|
|
3701
|
-
delete f[
|
|
3707
|
+
a.groupFormDesc || await I();
|
|
3708
|
+
for (const z in f) {
|
|
3709
|
+
if (z.indexOf("_") === 0) {
|
|
3710
|
+
delete f[z];
|
|
3702
3711
|
continue;
|
|
3703
3712
|
}
|
|
3704
3713
|
if (a.formDesc) {
|
|
3705
|
-
const k = a.formDesc[
|
|
3706
|
-
k && k.valueFormat && typeof k.valueFormat == "function" && (f[
|
|
3714
|
+
const k = a.formDesc[z];
|
|
3715
|
+
k && k.valueFormat && typeof k.valueFormat == "function" && (f[z] = k.valueFormat(f[z], f));
|
|
3707
3716
|
}
|
|
3708
3717
|
}
|
|
3709
3718
|
if (o.beforeRequest) {
|
|
3710
|
-
const
|
|
3719
|
+
const z = o.beforeRequest(f), k = lt(z) ? await z : z;
|
|
3711
3720
|
if (k === !1)
|
|
3712
3721
|
return;
|
|
3713
3722
|
typeof k == "object" && (f = k);
|
|
3714
3723
|
}
|
|
3715
|
-
if (
|
|
3724
|
+
if (d.value)
|
|
3716
3725
|
return;
|
|
3717
|
-
|
|
3726
|
+
d.value = !0;
|
|
3718
3727
|
try {
|
|
3719
|
-
let
|
|
3720
|
-
a.requestFn && (a.updateFn && f && f[a.idKey] ?
|
|
3728
|
+
let z = {};
|
|
3729
|
+
a.requestFn && (a.updateFn && f && f[a.idKey] ? z = await a.updateFn(f) : z = await a.requestFn(f)), we(() => {
|
|
3721
3730
|
o.success && typeof o.success == "function" && o.success({
|
|
3722
|
-
response:
|
|
3731
|
+
response: z,
|
|
3723
3732
|
formData: f,
|
|
3724
|
-
callBack: () =>
|
|
3733
|
+
callBack: () => d.value = !1
|
|
3725
3734
|
});
|
|
3726
3735
|
});
|
|
3727
|
-
} catch (
|
|
3728
|
-
if (console.log("error: ",
|
|
3729
|
-
o.requestError(
|
|
3736
|
+
} catch (z) {
|
|
3737
|
+
if (console.log("error: ", z), o.requestError && typeof o.requestError == "function")
|
|
3738
|
+
o.requestError(z);
|
|
3730
3739
|
else {
|
|
3731
|
-
if (
|
|
3740
|
+
if (z instanceof Error)
|
|
3732
3741
|
try {
|
|
3733
|
-
JSON.parse(
|
|
3742
|
+
JSON.parse(z.message) instanceof Object;
|
|
3734
3743
|
} catch {
|
|
3735
3744
|
}
|
|
3736
3745
|
else
|
|
3737
|
-
|
|
3746
|
+
z instanceof Object;
|
|
3738
3747
|
o.requestError && typeof o.requestError == "function" && o.requestError();
|
|
3739
3748
|
}
|
|
3740
|
-
|
|
3749
|
+
d.value = !1;
|
|
3741
3750
|
} finally {
|
|
3742
|
-
a.isDialog || (
|
|
3751
|
+
a.isDialog || (d.value = !1), o.requestEnd && typeof o.requestEnd == "function" && o.requestEnd();
|
|
3743
3752
|
}
|
|
3744
|
-
} catch (
|
|
3745
|
-
console.log("error: ",
|
|
3753
|
+
} catch (z) {
|
|
3754
|
+
console.log("error: ", z);
|
|
3746
3755
|
}
|
|
3747
3756
|
}, j = () => {
|
|
3748
3757
|
a.modelValue && Object.keys(a.modelValue).map((f) => {
|
|
3749
|
-
|
|
3758
|
+
N && N[f] !== void 0 && N[f] !== null ? a.modelValue[f] = N[f] : a.groupFormDesc ? a.modelValue[f] = a.groupFormDesc && a.groupFormDesc[f] && a.groupFormDesc[f].default || null : a.modelValue[f] = a.formDesc && a.formDesc[f] && a.formDesc[f].default || null;
|
|
3750
3759
|
}), setTimeout(() => {
|
|
3751
|
-
|
|
3760
|
+
L();
|
|
3752
3761
|
}, 100), c("reset");
|
|
3753
|
-
},
|
|
3762
|
+
}, L = () => {
|
|
3754
3763
|
var f;
|
|
3755
3764
|
(f = u.value) == null || f.clearValidate();
|
|
3756
3765
|
}, B = () => {
|
|
3757
3766
|
var f;
|
|
3758
|
-
a.modelValue && (Object.keys(a.modelValue).map((
|
|
3759
|
-
a.formDesc && a.formDesc[
|
|
3760
|
-
}), (f = s.value) == null || f.map((
|
|
3761
|
-
|
|
3767
|
+
a.modelValue && (Object.keys(a.modelValue).map((z) => {
|
|
3768
|
+
a.formDesc && a.formDesc[z] ? a.modelValue[z] = a.formDesc[z].default ?? null : a.modelValue[z] = null;
|
|
3769
|
+
}), (f = s.value) == null || f.map((z) => {
|
|
3770
|
+
z != null && z.clear && typeof (z == null ? void 0 : z.clear) == "function" && z.clear();
|
|
3762
3771
|
})), we(() => {
|
|
3763
3772
|
setTimeout(() => {
|
|
3764
|
-
|
|
3773
|
+
L();
|
|
3765
3774
|
}, 50);
|
|
3766
3775
|
});
|
|
3767
3776
|
};
|
|
3768
3777
|
function W() {
|
|
3769
3778
|
var f;
|
|
3770
|
-
(f = s.value) == null || f.map((
|
|
3771
|
-
|
|
3779
|
+
(f = s.value) == null || f.map((z) => {
|
|
3780
|
+
z != null && z.init && typeof (z == null ? void 0 : z.init) == "function" && z.init();
|
|
3772
3781
|
});
|
|
3773
3782
|
}
|
|
3774
3783
|
function re(f) {
|
|
3775
|
-
var
|
|
3776
|
-
(
|
|
3784
|
+
var z;
|
|
3785
|
+
(z = u.value) == null || z.validateField(f, (k) => {
|
|
3777
3786
|
});
|
|
3778
3787
|
}
|
|
3779
3788
|
function je() {
|
|
3780
|
-
|
|
3781
|
-
|
|
3789
|
+
v(), we(() => {
|
|
3790
|
+
L();
|
|
3782
3791
|
});
|
|
3783
3792
|
}
|
|
3784
|
-
return
|
|
3793
|
+
return ne(
|
|
3785
3794
|
() => a.formDesc,
|
|
3786
3795
|
(f) => {
|
|
3787
|
-
f &&
|
|
3796
|
+
f && v();
|
|
3788
3797
|
}
|
|
3789
|
-
),
|
|
3798
|
+
), ne(
|
|
3790
3799
|
() => a.modelValue,
|
|
3791
3800
|
(f) => {
|
|
3792
|
-
(!
|
|
3801
|
+
(!N || i.value && f) && (N || (N = n.cloneDeep(f)), v());
|
|
3793
3802
|
},
|
|
3794
3803
|
{ deep: !0 }
|
|
3795
3804
|
), at(async () => {
|
|
3796
|
-
i.value ||
|
|
3797
|
-
|
|
3805
|
+
i.value || v(), we(() => {
|
|
3806
|
+
L();
|
|
3798
3807
|
});
|
|
3799
|
-
}), t({ fid: a.fid, formRef: u, submit:
|
|
3808
|
+
}), t({ fid: a.fid, formRef: u, submit: h, getData: Z, validate: I, reset: j, clearValid: L, clear: B, changeValidImg: D, refresh: je, init: W }), (f, z) => {
|
|
3800
3809
|
const k = C("el-form-item"), $ = C("el-col"), ge = C("el-row"), le = C("el-form");
|
|
3801
|
-
return g(),
|
|
3802
|
-
style: Se(
|
|
3810
|
+
return g(), w("div", {
|
|
3811
|
+
style: Se(S.value),
|
|
3803
3812
|
class: "crud-form-panel"
|
|
3804
3813
|
}, [
|
|
3805
3814
|
me(f.$slots, "top", {
|
|
@@ -3813,16 +3822,16 @@ const ei = { class: "required-dot" }, ti = ["innerHTML"], li = {
|
|
|
3813
3822
|
ref_key: "refElPlusForm",
|
|
3814
3823
|
ref: u,
|
|
3815
3824
|
model: a.modelValue,
|
|
3816
|
-
onSubmit: Bt(
|
|
3817
|
-
},
|
|
3825
|
+
onSubmit: Bt(h, ["prevent"])
|
|
3826
|
+
}, E.value), {
|
|
3818
3827
|
default: x(() => [
|
|
3819
|
-
(g(!0),
|
|
3828
|
+
(g(!0), w(q, null, ce(_.value, (ke, Ve) => (g(), O(ge, {
|
|
3820
3829
|
gutter: 10,
|
|
3821
3830
|
key: Ve,
|
|
3822
3831
|
style: Se({ marginRight: f.isTable ? "20px" : 0 })
|
|
3823
3832
|
}, {
|
|
3824
3833
|
default: x(() => [
|
|
3825
|
-
(g(!0),
|
|
3834
|
+
(g(!0), w(q, null, ce(ke, (Me, Ze) => (g(), O($, {
|
|
3826
3835
|
key: Ve + "-" + Ze + "-" + Me.field,
|
|
3827
3836
|
xs: 24,
|
|
3828
3837
|
sm: 24,
|
|
@@ -3833,7 +3842,7 @@ const ei = { class: "required-dot" }, ti = ["innerHTML"], li = {
|
|
|
3833
3842
|
default: x(() => {
|
|
3834
3843
|
var Pe;
|
|
3835
3844
|
return [
|
|
3836
|
-
Me._vif ? (g(),
|
|
3845
|
+
Me._vif ? (g(), w("div", {
|
|
3837
3846
|
key: 0,
|
|
3838
3847
|
class: "el-plus-form-column-panel",
|
|
3839
3848
|
style: Se({ "justify-content": f.isTable ? "flex-end" : "flex-start" })
|
|
@@ -3843,10 +3852,10 @@ const ei = { class: "required-dot" }, ti = ["innerHTML"], li = {
|
|
|
3843
3852
|
prop: Me.field
|
|
3844
3853
|
}, {
|
|
3845
3854
|
label: x(() => [
|
|
3846
|
-
f.showLabel && Me.showLabel !== !1 ? (g(),
|
|
3855
|
+
f.showLabel && Me.showLabel !== !1 ? (g(), w("div", {
|
|
3847
3856
|
key: 0,
|
|
3848
3857
|
class: "crud-form-label",
|
|
3849
|
-
style: Se({ width: Me.labelWidth ||
|
|
3858
|
+
style: Se({ width: Me.labelWidth || E.value._labelWidth || (f.isDialog ? "100px" : "120px"), justifyContent: E.value.labelPosition === "right" ? "flex-end" : "flex-start" })
|
|
3850
3859
|
}, [
|
|
3851
3860
|
ee("span", ei, de(Me.required ? "*" : " "), 1),
|
|
3852
3861
|
ee("span", null, de(Me._label), 1)
|
|
@@ -3861,14 +3870,14 @@ const ei = { class: "required-dot" }, ti = ["innerHTML"], li = {
|
|
|
3861
3870
|
}, Me._attrs, {
|
|
3862
3871
|
desc: Me,
|
|
3863
3872
|
ref_for: !0,
|
|
3864
|
-
ref:
|
|
3873
|
+
ref: b,
|
|
3865
3874
|
field: Me.field,
|
|
3866
3875
|
modelValue: a.modelValue[Me.field || ""],
|
|
3867
3876
|
"onUpdate:modelValue": (it) => a.modelValue[Me.field || ""] = it,
|
|
3868
3877
|
isTable: f.isTable,
|
|
3869
3878
|
onValidateThis: () => re(Me.field || "")
|
|
3870
3879
|
}), null, 16, ["formData", "disabled", "desc", "field", "modelValue", "onUpdate:modelValue", "isTable", "onValidateThis"])),
|
|
3871
|
-
Me._tip ? (g(),
|
|
3880
|
+
Me._tip ? (g(), w("div", {
|
|
3872
3881
|
key: 0,
|
|
3873
3882
|
class: "el-plus-form-tip",
|
|
3874
3883
|
innerHTML: Me._tip
|
|
@@ -3895,8 +3904,8 @@ const ei = { class: "required-dot" }, ti = ["innerHTML"], li = {
|
|
|
3895
3904
|
me(f.$slots, "form-btn", {
|
|
3896
3905
|
data: a.modelValue
|
|
3897
3906
|
}, () => [
|
|
3898
|
-
|
|
3899
|
-
(g(!0),
|
|
3907
|
+
y.value && y.value.length > 0 ? (g(), w("div", li, [
|
|
3908
|
+
(g(!0), w(q, null, ce(y.value, (ke, Ve) => (g(), O(tt, R({
|
|
3900
3909
|
key: Ve,
|
|
3901
3910
|
ref_for: !0
|
|
3902
3911
|
}, ke), null, 16))), 128))
|
|
@@ -3935,48 +3944,48 @@ const ni = {
|
|
|
3935
3944
|
setup(e, { emit: t }) {
|
|
3936
3945
|
const l = t, n = e, r = X({
|
|
3937
3946
|
get: () => n.modelValue,
|
|
3938
|
-
set(
|
|
3939
|
-
l("update:modelValue",
|
|
3947
|
+
set(y) {
|
|
3948
|
+
l("update:modelValue", y);
|
|
3940
3949
|
}
|
|
3941
3950
|
}), c = X({
|
|
3942
3951
|
get() {
|
|
3943
|
-
var
|
|
3944
|
-
return (
|
|
3952
|
+
var y;
|
|
3953
|
+
return (y = a.value) == null || y.refresh(), n.show;
|
|
3945
3954
|
},
|
|
3946
|
-
set(
|
|
3947
|
-
l("update:show",
|
|
3955
|
+
set(y) {
|
|
3956
|
+
l("update:show", y);
|
|
3948
3957
|
}
|
|
3949
|
-
}), a = p(null), { width: u, top: i, modal: o, appendToBody: s, showClose:
|
|
3950
|
-
function
|
|
3951
|
-
var
|
|
3952
|
-
n.success ? n.success(
|
|
3953
|
-
|
|
3958
|
+
}), a = p(null), { width: u, top: i, modal: o, appendToBody: s, showClose: d, draggable: N, closeOnClickModal: m, destroyOnClose: A, ...S } = Object.assign({ width: "700px", draggable: !0, top: "15vh", closeOnClickModal: !1, showCancel: !0, destroyOnClose: !0 }, ue()), E = { width: u, top: i, modal: o, appendToBody: s, showClose: d, draggable: N, closeOnClickModal: m };
|
|
3959
|
+
function M(y) {
|
|
3960
|
+
var T, I;
|
|
3961
|
+
n.success ? n.success(y) : n.tableRef && (Ge.success(typeof n.successTip == "function" ? n.successTip() : n.successTip), typeof ((T = n.tableRef) == null ? void 0 : T.reload) == "function" && ((I = n.tableRef) == null || I.reload()), c.value = !1, setTimeout(() => {
|
|
3962
|
+
y.callBack();
|
|
3954
3963
|
}, 200));
|
|
3955
3964
|
}
|
|
3956
|
-
function
|
|
3957
|
-
var
|
|
3958
|
-
(
|
|
3965
|
+
function _() {
|
|
3966
|
+
var y;
|
|
3967
|
+
(y = a.value) == null || y.clear();
|
|
3959
3968
|
}
|
|
3960
|
-
function
|
|
3961
|
-
var
|
|
3962
|
-
(
|
|
3969
|
+
function v() {
|
|
3970
|
+
var y;
|
|
3971
|
+
(y = a.value) == null || y.init();
|
|
3963
3972
|
}
|
|
3964
|
-
return (
|
|
3965
|
-
const
|
|
3966
|
-
return g(), O(
|
|
3973
|
+
return (y, T) => {
|
|
3974
|
+
const I = C("el-dialog");
|
|
3975
|
+
return g(), O(I, R({
|
|
3967
3976
|
class: "el-plus-form-dialog",
|
|
3968
3977
|
modelValue: c.value,
|
|
3969
|
-
"onUpdate:modelValue":
|
|
3978
|
+
"onUpdate:modelValue": T[2] || (T[2] = (b) => c.value = b),
|
|
3970
3979
|
title: n.title
|
|
3971
|
-
},
|
|
3972
|
-
onClose:
|
|
3973
|
-
onOpened:
|
|
3980
|
+
}, E, {
|
|
3981
|
+
onClose: _,
|
|
3982
|
+
onOpened: v
|
|
3974
3983
|
}), {
|
|
3975
3984
|
header: x(() => [
|
|
3976
|
-
me(
|
|
3985
|
+
me(y.$slots, "header")
|
|
3977
3986
|
]),
|
|
3978
3987
|
footer: x(() => [
|
|
3979
|
-
me(
|
|
3988
|
+
me(y.$slots, "footer")
|
|
3980
3989
|
]),
|
|
3981
3990
|
default: x(() => [
|
|
3982
3991
|
K(al, R({
|
|
@@ -3986,17 +3995,17 @@ const ni = {
|
|
|
3986
3995
|
isLoading: n.isLoading,
|
|
3987
3996
|
isDialog: !0,
|
|
3988
3997
|
modelValue: r.value,
|
|
3989
|
-
"onUpdate:modelValue":
|
|
3990
|
-
formDesc:
|
|
3991
|
-
},
|
|
3992
|
-
success:
|
|
3993
|
-
onCancel:
|
|
3998
|
+
"onUpdate:modelValue": T[0] || (T[0] = (b) => r.value = b),
|
|
3999
|
+
formDesc: y.formDesc
|
|
4000
|
+
}, S, {
|
|
4001
|
+
success: M,
|
|
4002
|
+
onCancel: T[1] || (T[1] = (b) => c.value = !1)
|
|
3994
4003
|
}), {
|
|
3995
4004
|
top: x(() => [
|
|
3996
|
-
me(
|
|
4005
|
+
me(y.$slots, "top")
|
|
3997
4006
|
]),
|
|
3998
4007
|
default: x(() => [
|
|
3999
|
-
me(
|
|
4008
|
+
me(y.$slots, "default")
|
|
4000
4009
|
]),
|
|
4001
4010
|
_: 3
|
|
4002
4011
|
}, 16, ["isLoading", "modelValue", "formDesc"])
|
|
@@ -4024,86 +4033,89 @@ const ni = {
|
|
|
4024
4033
|
setup(e, { expose: t, emit: l }) {
|
|
4025
4034
|
const n = ae("lodash"), r = l, c = e, a = p([]), u = p([]), i = X({
|
|
4026
4035
|
get: () => c.modelValue,
|
|
4027
|
-
set(
|
|
4028
|
-
r("update:modelValue",
|
|
4036
|
+
set(M) {
|
|
4037
|
+
r("update:modelValue", M);
|
|
4029
4038
|
}
|
|
4030
4039
|
}), o = X(() => {
|
|
4031
|
-
const
|
|
4040
|
+
const M = [];
|
|
4032
4041
|
a.value = [], u.value = [];
|
|
4033
|
-
const
|
|
4034
|
-
c.formGroup.group.map((
|
|
4035
|
-
|
|
4042
|
+
const _ = (/* @__PURE__ */ new Date()).getTime();
|
|
4043
|
+
c.formGroup.group.map((I, b) => {
|
|
4044
|
+
I.fid = I.fid || `${_ + b}`, I._vif = s.value(I.vif);
|
|
4036
4045
|
});
|
|
4037
|
-
const
|
|
4038
|
-
return delete
|
|
4046
|
+
const v = c.formGroup.group.filter((I, b) => (I._vif && u.value.push(b), I._vif)), y = n.cloneDeep(c.formGroup), T = c.formGroup.column || 1;
|
|
4047
|
+
return delete y.group, delete y.column, y.beforeValidate = async (I) => {
|
|
4039
4048
|
if (c.formGroup.beforeValidate) {
|
|
4040
|
-
const
|
|
4041
|
-
if (!(lt(
|
|
4049
|
+
const b = c.formGroup.beforeValidate(I);
|
|
4050
|
+
if (!(lt(b) ? await b : b))
|
|
4042
4051
|
return !1;
|
|
4043
4052
|
}
|
|
4044
|
-
return await Promise.all(a.value.map((
|
|
4045
|
-
},
|
|
4046
|
-
Object.assign(
|
|
4047
|
-
}),
|
|
4048
|
-
|
|
4049
|
-
title:
|
|
4050
|
-
formProps: Object.assign({ column:
|
|
4053
|
+
return await Promise.all(a.value.map((b) => b.validate()));
|
|
4054
|
+
}, y.groupFormDesc = {}, v.map((I) => {
|
|
4055
|
+
Object.assign(y.groupFormDesc, I.formDesc);
|
|
4056
|
+
}), y.disabledTab = c.disabledTab, v.map((I, b) => {
|
|
4057
|
+
M.push({
|
|
4058
|
+
title: I.title,
|
|
4059
|
+
formProps: Object.assign({ column: I.column || T }, b === v.length - 1 ? y : { showBtns: !1 }, I || {})
|
|
4051
4060
|
});
|
|
4052
|
-
}),
|
|
4053
|
-
}), s = X(() => (
|
|
4054
|
-
function M
|
|
4055
|
-
|
|
4061
|
+
}), M;
|
|
4062
|
+
}), s = X(() => (M) => typeof M == "function" ? M(c.modelValue) : typeof M == "boolean" ? M : !0);
|
|
4063
|
+
function d(M) {
|
|
4064
|
+
M && (a.value.find((_) => _.fid === M.fid) || a.value.push(M));
|
|
4056
4065
|
}
|
|
4057
|
-
function
|
|
4066
|
+
function N(M) {
|
|
4058
4067
|
setTimeout(() => {
|
|
4059
|
-
a.value.map((
|
|
4060
|
-
|
|
4068
|
+
a.value.map((_) => {
|
|
4069
|
+
_.fid !== M && _.clearValid();
|
|
4061
4070
|
});
|
|
4062
4071
|
}, 100);
|
|
4063
4072
|
}
|
|
4064
|
-
async function
|
|
4065
|
-
return await Promise.all(a.value.map((
|
|
4073
|
+
async function m() {
|
|
4074
|
+
return await Promise.all(a.value.map((M) => M.validate()));
|
|
4066
4075
|
}
|
|
4067
|
-
async function
|
|
4068
|
-
return await Promise.all(a.value.map((
|
|
4076
|
+
async function A() {
|
|
4077
|
+
return await Promise.all(a.value.map((M) => M.clearValid()));
|
|
4069
4078
|
}
|
|
4070
|
-
function
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
}
|
|
4079
|
+
async function S() {
|
|
4080
|
+
return await Promise.all(a.value.map((M) => M.clear()));
|
|
4081
|
+
}
|
|
4082
|
+
function E() {
|
|
4083
|
+
const M = {};
|
|
4084
|
+
return a.value.map((_) => {
|
|
4085
|
+
Object.assign(M, _.getData());
|
|
4086
|
+
}), M;
|
|
4075
4087
|
}
|
|
4076
|
-
return t({ validate:
|
|
4077
|
-
(g(!0),
|
|
4078
|
-
var
|
|
4079
|
-
return g(),
|
|
4080
|
-
key:
|
|
4088
|
+
return t({ validate: m, getData: E, clearValid: A, clear: S }), (M, _) => (g(), w("div", si, [
|
|
4089
|
+
(g(!0), w(q, null, ce(o.value, (v, y) => {
|
|
4090
|
+
var T;
|
|
4091
|
+
return g(), w(q, {
|
|
4092
|
+
key: y + ((T = v.formProps) == null ? void 0 : T.fid)
|
|
4081
4093
|
}, [
|
|
4082
|
-
Ue()["top" + u.value[
|
|
4083
|
-
me(
|
|
4084
|
-
|
|
4094
|
+
Ue()["top" + u.value[y]] ? me(M.$slots, "top" + u.value[y], { key: 0 }) : V("", !0),
|
|
4095
|
+
me(M.$slots, "title" + u.value[y], {}, () => [
|
|
4096
|
+
v.title ? (g(), w("div", ui, de(v.title), 1)) : V("", !0)
|
|
4085
4097
|
]),
|
|
4086
4098
|
K(al, R({
|
|
4087
4099
|
modelValue: i.value,
|
|
4088
|
-
"onUpdate:modelValue":
|
|
4100
|
+
"onUpdate:modelValue": _[0] || (_[0] = (I) => i.value = I),
|
|
4089
4101
|
ref_for: !0
|
|
4090
|
-
},
|
|
4102
|
+
}, v.formProps, {
|
|
4091
4103
|
isGroupForm: "",
|
|
4092
4104
|
ref_for: !0,
|
|
4093
|
-
ref:
|
|
4094
|
-
onReset: (
|
|
4095
|
-
var
|
|
4096
|
-
return
|
|
4105
|
+
ref: d,
|
|
4106
|
+
onReset: (I) => {
|
|
4107
|
+
var b;
|
|
4108
|
+
return N(((b = v.formProps) == null ? void 0 : b.fid) || "");
|
|
4097
4109
|
}
|
|
4098
4110
|
}), {
|
|
4099
4111
|
default: x(() => [
|
|
4100
|
-
Ue()["default" + u.value[
|
|
4112
|
+
Ue()["default" + u.value[y]] ? me(M.$slots, "default" + u.value[y], { key: 0 }) : V("", !0)
|
|
4101
4113
|
]),
|
|
4102
4114
|
_: 2
|
|
4103
4115
|
}, 1040, ["modelValue", "onReset"])
|
|
4104
4116
|
], 64);
|
|
4105
4117
|
}), 128)),
|
|
4106
|
-
me(
|
|
4118
|
+
me(M.$slots, "default")
|
|
4107
4119
|
]));
|
|
4108
4120
|
}
|
|
4109
4121
|
});
|
|
@@ -4125,69 +4137,69 @@ const ci = { class: "el-plus-table-edit-column" }, Mi = { class: "dialog-footer"
|
|
|
4125
4137
|
label: "label",
|
|
4126
4138
|
disabled: "disabledcheckd"
|
|
4127
4139
|
};
|
|
4128
|
-
function
|
|
4129
|
-
return
|
|
4130
|
-
var
|
|
4131
|
-
|
|
4132
|
-
}),
|
|
4140
|
+
function d(_, v) {
|
|
4141
|
+
return _.map((y, T) => {
|
|
4142
|
+
var I;
|
|
4143
|
+
y.idx = v !== void 0 ? `${v}-${T}` : `${T}`, (y.required || y.noHide || y.disabled) && (y.disabledcheckd = !0, o.value.splice(o.value.indexOf(y.idx), 1)), y.children && y.children.every((b) => b.disabled) ? y.disabled = !0 : y.children && y.disabled && y.children.map((b) => b.disabled = !0), ((I = y.children) == null ? void 0 : I.length) > 0 && d(y.children, `${y.idx}`), y.children || u.value.push(y.idx);
|
|
4144
|
+
}), _;
|
|
4133
4145
|
}
|
|
4134
|
-
function
|
|
4146
|
+
function N() {
|
|
4135
4147
|
r.value = !0;
|
|
4136
4148
|
}
|
|
4137
|
-
function
|
|
4138
|
-
|
|
4149
|
+
function m(_, v) {
|
|
4150
|
+
v.checkedAllKeys = Array.from(/* @__PURE__ */ new Set([...v.checkedKeys, ...v.halfCheckedKeys])), o.value = u.value.filter((y) => v.checkedAllKeys.indexOf(y) < 0);
|
|
4139
4151
|
}
|
|
4140
|
-
function
|
|
4141
|
-
for (let
|
|
4142
|
-
|
|
4152
|
+
function A(_) {
|
|
4153
|
+
for (let v = 0; v < _.length; v++)
|
|
4154
|
+
_[v].children && A(_[v].children), o.value.indexOf(_[v].idx) < 0 ? _[v].scShow = !0 : _[v].scShow = !1;
|
|
4143
4155
|
}
|
|
4144
|
-
function
|
|
4156
|
+
function S() {
|
|
4145
4157
|
if (u.value.length === o.value.length)
|
|
4146
4158
|
return Ge.warning("请至少选择一列!"), !1;
|
|
4147
|
-
|
|
4159
|
+
A(n.column), o.value.length > 0 ? localStorage.setItem(l.storagePrefix + "hideColumnsList_" + n.tbName, o.value.join("__")) : localStorage.removeItem(l.storagePrefix + "hideColumnsList_" + n.tbName), r.value = !1;
|
|
4148
4160
|
}
|
|
4149
|
-
function
|
|
4150
|
-
const
|
|
4151
|
-
|
|
4161
|
+
function E() {
|
|
4162
|
+
const _ = localStorage.getItem(l.storagePrefix + "hideColumnsList_" + n.tbName);
|
|
4163
|
+
_ != null && _.length > 0 && (o.value = _.split("__")), a.value = d(n.column), A(n.column), i.value = u.value.filter((v) => o.value.indexOf(v) < 0);
|
|
4152
4164
|
}
|
|
4153
|
-
function
|
|
4165
|
+
function M() {
|
|
4154
4166
|
c.value.setCheckedKeys(i.value), r.value = !1;
|
|
4155
4167
|
}
|
|
4156
4168
|
return at(() => {
|
|
4157
|
-
n.tbName &&
|
|
4158
|
-
}), t({ initCol:
|
|
4159
|
-
const
|
|
4160
|
-
return g(),
|
|
4161
|
-
|
|
4169
|
+
n.tbName && E();
|
|
4170
|
+
}), t({ initCol: E }), (_, v) => {
|
|
4171
|
+
const y = C("el-button"), T = C("el-tree"), I = C("el-dialog");
|
|
4172
|
+
return g(), w("div", ci, [
|
|
4173
|
+
_.showText ? (g(), O(y, {
|
|
4162
4174
|
key: 0,
|
|
4163
4175
|
type: "primary",
|
|
4164
|
-
onClick:
|
|
4165
|
-
size:
|
|
4176
|
+
onClick: N,
|
|
4177
|
+
size: _.size,
|
|
4166
4178
|
plain: ""
|
|
4167
4179
|
}, {
|
|
4168
4180
|
default: x(() => [
|
|
4169
4181
|
ye("编辑显示列")
|
|
4170
4182
|
]),
|
|
4171
4183
|
_: 1
|
|
4172
|
-
}, 8, ["size"])) : (g(), O(
|
|
4184
|
+
}, 8, ["size"])) : (g(), O(y, {
|
|
4173
4185
|
key: 1,
|
|
4174
4186
|
type: "primary",
|
|
4175
4187
|
icon: "ele-Setting",
|
|
4176
|
-
onClick:
|
|
4177
|
-
size:
|
|
4188
|
+
onClick: N,
|
|
4189
|
+
size: _.size,
|
|
4178
4190
|
title: "编辑显示列",
|
|
4179
4191
|
plain: "",
|
|
4180
4192
|
circle: ""
|
|
4181
4193
|
}, null, 8, ["size"])),
|
|
4182
|
-
K(
|
|
4194
|
+
K(I, {
|
|
4183
4195
|
title: "编辑显示列",
|
|
4184
4196
|
modelValue: r.value,
|
|
4185
|
-
"onUpdate:modelValue":
|
|
4197
|
+
"onUpdate:modelValue": v[0] || (v[0] = (b) => r.value = b),
|
|
4186
4198
|
draggable: "",
|
|
4187
4199
|
width: "40%"
|
|
4188
4200
|
}, {
|
|
4189
4201
|
default: x(() => [
|
|
4190
|
-
K(
|
|
4202
|
+
K(T, {
|
|
4191
4203
|
ref_key: "treeRef",
|
|
4192
4204
|
ref: c,
|
|
4193
4205
|
data: Le(a),
|
|
@@ -4196,24 +4208,24 @@ const ci = { class: "el-plus-table-edit-column" }, Mi = { class: "dialog-footer"
|
|
|
4196
4208
|
"default-expand-all": !0,
|
|
4197
4209
|
"default-checked-keys": i.value,
|
|
4198
4210
|
props: s,
|
|
4199
|
-
onCheck:
|
|
4211
|
+
onCheck: m
|
|
4200
4212
|
}, null, 8, ["data", "default-checked-keys"])
|
|
4201
4213
|
]),
|
|
4202
4214
|
footer: x(() => [
|
|
4203
4215
|
ee("div", Mi, [
|
|
4204
|
-
K(
|
|
4205
|
-
size:
|
|
4206
|
-
onClick:
|
|
4216
|
+
K(y, {
|
|
4217
|
+
size: _.size,
|
|
4218
|
+
onClick: M
|
|
4207
4219
|
}, {
|
|
4208
4220
|
default: x(() => [
|
|
4209
4221
|
ye(" 取 消 ")
|
|
4210
4222
|
]),
|
|
4211
4223
|
_: 1
|
|
4212
4224
|
}, 8, ["size"]),
|
|
4213
|
-
K(
|
|
4214
|
-
size:
|
|
4225
|
+
K(y, {
|
|
4226
|
+
size: _.size,
|
|
4215
4227
|
type: "primary",
|
|
4216
|
-
onClick:
|
|
4228
|
+
onClick: S
|
|
4217
4229
|
}, {
|
|
4218
4230
|
default: x(() => [
|
|
4219
4231
|
ye(" 确 定 ")
|
|
@@ -4253,184 +4265,184 @@ const xl = /* @__PURE__ */ Ie(di, [["__scopeId", "data-v-fd8b68ee"]]), fi = { cl
|
|
|
4253
4265
|
emits: ["query", "reset"],
|
|
4254
4266
|
setup(e, { expose: t, emit: l }) {
|
|
4255
4267
|
const n = ae("defaultConf"), r = l, c = e, a = p(), u = p(), i = X(() => {
|
|
4256
|
-
const
|
|
4257
|
-
return c.toolbar && c.toolbar.btns && c.toolbar.btns.map((
|
|
4258
|
-
|
|
4259
|
-
}),
|
|
4268
|
+
const M = [];
|
|
4269
|
+
return c.toolbar && c.toolbar.btns && c.toolbar.btns.map((_) => {
|
|
4270
|
+
M.push({ ...jo(_), size: _.size || c.size });
|
|
4271
|
+
}), M;
|
|
4260
4272
|
}), o = X(() => {
|
|
4261
|
-
var
|
|
4262
|
-
const
|
|
4263
|
-
return
|
|
4264
|
-
if (
|
|
4273
|
+
var _;
|
|
4274
|
+
const M = (_ = c.toolbar) == null ? void 0 : _.formConfig;
|
|
4275
|
+
return M != null && M.formDesc && Object.values(M == null ? void 0 : M.formDesc).map((v) => {
|
|
4276
|
+
if (v.width)
|
|
4265
4277
|
return;
|
|
4266
|
-
let
|
|
4267
|
-
switch (
|
|
4278
|
+
let y = 300;
|
|
4279
|
+
switch (v.type) {
|
|
4268
4280
|
case "daterange":
|
|
4269
4281
|
case "input":
|
|
4270
4282
|
case "area":
|
|
4271
|
-
|
|
4283
|
+
y = 300;
|
|
4272
4284
|
break;
|
|
4273
4285
|
}
|
|
4274
|
-
|
|
4275
|
-
}),
|
|
4286
|
+
v.width = y + "px";
|
|
4287
|
+
}), M;
|
|
4276
4288
|
}), s = X(() => {
|
|
4277
|
-
var
|
|
4278
|
-
let
|
|
4279
|
-
return
|
|
4280
|
-
|
|
4281
|
-
}),
|
|
4289
|
+
var _;
|
|
4290
|
+
let M = ((_ = c.toolbar) == null ? void 0 : _.export) || [];
|
|
4291
|
+
return M && !Array.isArray(M) && (M = [M]), M != null && M.length && M.map((v, y) => {
|
|
4292
|
+
v.label = v.label || `导出Excel ${y > 0 ? y : ""}`, v.size = c.size, v.mask = v.mask ?? !0, v.on = { click: (T) => N(T, y) };
|
|
4293
|
+
}), M;
|
|
4282
4294
|
});
|
|
4283
|
-
function
|
|
4295
|
+
function d() {
|
|
4284
4296
|
r("query");
|
|
4285
4297
|
}
|
|
4286
|
-
async function
|
|
4287
|
-
var
|
|
4288
|
-
const
|
|
4289
|
-
if (
|
|
4290
|
-
const
|
|
4291
|
-
let
|
|
4292
|
-
const
|
|
4293
|
-
let Z = Object.assign({}, c.queryDataFn ? await c.queryDataFn() : {}, (
|
|
4294
|
-
(
|
|
4298
|
+
async function N({ callBack: M }, _) {
|
|
4299
|
+
var y, T;
|
|
4300
|
+
const v = s.value[_];
|
|
4301
|
+
if (v) {
|
|
4302
|
+
const I = new XMLHttpRequest();
|
|
4303
|
+
let b = v.url || "";
|
|
4304
|
+
const P = v.method || "get";
|
|
4305
|
+
let Z = Object.assign({}, c.queryDataFn ? await c.queryDataFn() : {}, (v == null ? void 0 : v.data) || { size: 1e3 });
|
|
4306
|
+
(T = (y = c.toolbar) == null ? void 0 : y.formConfig) != null && T.beforeRequest && (Z = await c.toolbar.formConfig.beforeRequest(Z));
|
|
4295
4307
|
for (let j in Z)
|
|
4296
4308
|
(Z[j] === void 0 || Z[j] === null || Z[j] === "") && delete Z[j];
|
|
4297
|
-
if (
|
|
4309
|
+
if (v.fetch)
|
|
4298
4310
|
try {
|
|
4299
|
-
let j = await
|
|
4300
|
-
if (
|
|
4301
|
-
let
|
|
4302
|
-
|
|
4311
|
+
let j = await v.fetch(Z);
|
|
4312
|
+
if (v.urlKey) {
|
|
4313
|
+
let L = typeof v.urlKey == "string" ? [v.urlKey] : v.urlKey;
|
|
4314
|
+
L == null || L.map((B) => j = j[B]);
|
|
4303
4315
|
}
|
|
4304
|
-
|
|
4316
|
+
b = j;
|
|
4305
4317
|
} finally {
|
|
4306
|
-
|
|
4318
|
+
M && M();
|
|
4307
4319
|
}
|
|
4308
4320
|
else
|
|
4309
|
-
!
|
|
4310
|
-
if (
|
|
4321
|
+
!v.noQuery && P === "get" && (b += (b.indexOf("?") >= 0 ? "&" : "?") + zo(Z));
|
|
4322
|
+
if (v.beforeRequest && typeof v.beforeRequest == "function" && (Z = v.beforeRequest(Z)), I.open(P, b, !0), I.responseType = "blob", v.isAuth !== !1 && n.token) {
|
|
4311
4323
|
let j = n.token;
|
|
4312
|
-
typeof n.token == "function" && (j = n.token()),
|
|
4324
|
+
typeof n.token == "function" && (j = n.token()), I.setRequestHeader(v.tokenKey || "Authorization", "" + j);
|
|
4313
4325
|
}
|
|
4314
|
-
let
|
|
4315
|
-
|
|
4316
|
-
const
|
|
4317
|
-
|
|
4326
|
+
let D = v.name || b.split("?")[0] || `${(/* @__PURE__ */ new Date()).getTime()}`;
|
|
4327
|
+
D.length > 0 && (D = D.substring(D.lastIndexOf("/") + 1));
|
|
4328
|
+
const h = v.suffix || D.indexOf(".") > 0 ? D.substring(D.lastIndexOf(".")) : ".xlsx";
|
|
4329
|
+
I.onload = function() {
|
|
4318
4330
|
if (this.status == 200) {
|
|
4319
4331
|
const j = document.createElement("a");
|
|
4320
|
-
window.navigator.msSaveOrOpenBlob && typeof window.navigator.msSaveOrOpenBlob == "function" ? j.href = window.navigator.msSaveOrOpenBlob(this.response,
|
|
4321
|
-
|
|
4332
|
+
window.navigator.msSaveOrOpenBlob && typeof window.navigator.msSaveOrOpenBlob == "function" ? j.href = window.navigator.msSaveOrOpenBlob(this.response, D + h) : (j.href = window.URL.createObjectURL(this.response), j.download = D + h), j.click(), window.URL.revokeObjectURL(b), setTimeout(() => {
|
|
4333
|
+
M && M();
|
|
4322
4334
|
}, 1e3);
|
|
4323
4335
|
}
|
|
4324
|
-
},
|
|
4325
|
-
const
|
|
4326
|
-
|
|
4327
|
-
|
|
4336
|
+
}, I.onerror = function(j) {
|
|
4337
|
+
const L = document.createElement("a");
|
|
4338
|
+
L.href = b, L.download = D + h, L.click(), setTimeout(() => {
|
|
4339
|
+
M && M();
|
|
4328
4340
|
}, 1e3);
|
|
4329
|
-
},
|
|
4341
|
+
}, P === "post" ? (I.setRequestHeader("content-type", "application/json; charset=UTF-8"), I.send(JSON.stringify(Z))) : I.send();
|
|
4330
4342
|
}
|
|
4331
4343
|
}
|
|
4332
|
-
function
|
|
4333
|
-
var
|
|
4334
|
-
(
|
|
4344
|
+
function m() {
|
|
4345
|
+
var M;
|
|
4346
|
+
(M = a.value) == null || M.submit();
|
|
4335
4347
|
}
|
|
4336
|
-
function
|
|
4348
|
+
function A() {
|
|
4337
4349
|
a.value.clear(), r("reset"), we(() => {
|
|
4338
|
-
var
|
|
4339
|
-
(
|
|
4350
|
+
var M;
|
|
4351
|
+
(M = a.value) == null || M.submit();
|
|
4340
4352
|
});
|
|
4341
4353
|
}
|
|
4342
|
-
function
|
|
4343
|
-
if (
|
|
4344
|
-
return typeof
|
|
4345
|
-
if (
|
|
4354
|
+
function S(M) {
|
|
4355
|
+
if (M != null && M.vif)
|
|
4356
|
+
return typeof M.vif == "function" ? M.vif(M) : !!M.vif;
|
|
4357
|
+
if (M != null && M.auth)
|
|
4346
4358
|
if (!n.auth)
|
|
4347
4359
|
console.warn("使用auth属性,请在crud注册时传入auth校验方法~");
|
|
4348
4360
|
else
|
|
4349
|
-
return n.auth(
|
|
4361
|
+
return n.auth(M.auth);
|
|
4350
4362
|
return !0;
|
|
4351
4363
|
}
|
|
4352
|
-
function
|
|
4353
|
-
var
|
|
4354
|
-
c.tbName ? (
|
|
4355
|
-
|
|
4364
|
+
function E() {
|
|
4365
|
+
var M, _;
|
|
4366
|
+
c.tbName ? (M = u.value) == null || M.initCol() : (_ = c.column) == null || _.map((v) => {
|
|
4367
|
+
v.vif !== void 0 && v.vif !== null ? typeof v.vif == "function" ? v._vif = v.vif(v) : v._vif = !!v.vif : v._vif = !0, v.auth && (n.auth ? v._vif = n.auth(v.auth) : console.warn("使用auth属性,请在crud注册时传入auth校验方法~"));
|
|
4356
4368
|
});
|
|
4357
4369
|
}
|
|
4358
4370
|
return at(() => {
|
|
4359
4371
|
we(() => {
|
|
4360
4372
|
setTimeout(() => {
|
|
4361
|
-
|
|
4373
|
+
m();
|
|
4362
4374
|
}, 200);
|
|
4363
4375
|
});
|
|
4364
4376
|
}), t({ getData: () => {
|
|
4365
|
-
var
|
|
4366
|
-
return (
|
|
4367
|
-
}, initCol:
|
|
4368
|
-
const
|
|
4369
|
-
return g(),
|
|
4370
|
-
c.toolbar && Object.keys(c.toolbar || {}).length ? (g(), O(
|
|
4377
|
+
var M;
|
|
4378
|
+
return (M = a.value) == null ? void 0 : M.getData();
|
|
4379
|
+
}, initCol: E }), (M, _) => {
|
|
4380
|
+
const v = C("ElPlusForm"), y = C("el-form");
|
|
4381
|
+
return g(), w("div", fi, [
|
|
4382
|
+
c.toolbar && Object.keys(c.toolbar || {}).length ? (g(), O(y, {
|
|
4371
4383
|
key: 0,
|
|
4372
4384
|
inline: !0,
|
|
4373
4385
|
class: "el-plus-table-header-form",
|
|
4374
4386
|
style: Se({ justifyContent: !c.toolbar.formConfig && c.toolbar.btnRight ? "flex-end" : "space-between" })
|
|
4375
4387
|
}, {
|
|
4376
4388
|
default: x(() => [
|
|
4377
|
-
c.toolbar.formConfig ? (g(),
|
|
4378
|
-
K(
|
|
4389
|
+
c.toolbar.formConfig ? (g(), w("div", pi, [
|
|
4390
|
+
K(v, R({
|
|
4379
4391
|
ref_key: "elPlusFormRef",
|
|
4380
4392
|
ref: a
|
|
4381
4393
|
}, o.value, {
|
|
4382
4394
|
modelValue: c.modelValue,
|
|
4383
|
-
"onUpdate:modelValue":
|
|
4384
|
-
requestFn:
|
|
4395
|
+
"onUpdate:modelValue": _[0] || (_[0] = (T) => c.modelValue = T),
|
|
4396
|
+
requestFn: d,
|
|
4385
4397
|
showBtns: !1,
|
|
4386
4398
|
isTable: !0
|
|
4387
4399
|
}), {
|
|
4388
4400
|
row: x(() => {
|
|
4389
|
-
var
|
|
4401
|
+
var T, I;
|
|
4390
4402
|
return [
|
|
4391
4403
|
ee("div", Ni, [
|
|
4392
|
-
Object.keys(((
|
|
4404
|
+
Object.keys(((T = o.value) == null ? void 0 : T.formDesc) || {}).length ? (g(), O(tt, {
|
|
4393
4405
|
key: 0,
|
|
4394
4406
|
type: "primary",
|
|
4395
4407
|
icon: "ele-Search",
|
|
4396
|
-
loading:
|
|
4397
|
-
desc: { label: "查询", on: { click:
|
|
4408
|
+
loading: M.loading,
|
|
4409
|
+
desc: { label: "查询", on: { click: m }, size: M.size }
|
|
4398
4410
|
}, null, 8, ["loading", "desc"])) : V("", !0),
|
|
4399
|
-
Object.keys(((
|
|
4411
|
+
Object.keys(((I = o.value) == null ? void 0 : I.formDesc) || {}).length ? (g(), O(tt, {
|
|
4400
4412
|
key: 1,
|
|
4401
|
-
desc: { label: "重置", on: { click:
|
|
4413
|
+
desc: { label: "重置", on: { click: A }, size: M.size }
|
|
4402
4414
|
}, null, 8, ["desc"])) : V("", !0),
|
|
4403
|
-
|
|
4415
|
+
M.tbName ? (g(), O(xl, {
|
|
4404
4416
|
key: 2,
|
|
4405
4417
|
ref_key: "settingColumnRef",
|
|
4406
4418
|
ref: u,
|
|
4407
|
-
tbName:
|
|
4408
|
-
column:
|
|
4409
|
-
size:
|
|
4419
|
+
tbName: M.tbName,
|
|
4420
|
+
column: M.column || [],
|
|
4421
|
+
size: M.size
|
|
4410
4422
|
}, null, 8, ["tbName", "column", "size"])) : V("", !0),
|
|
4411
|
-
(g(!0),
|
|
4412
|
-
|
|
4413
|
-
|
|
4423
|
+
(g(!0), w(q, null, ce(i.value, (b, P) => (g(), w(q, { key: P }, [
|
|
4424
|
+
S(b) ? (g(), w(q, { key: 0 }, [
|
|
4425
|
+
b.customize ? (g(), O(Pt(b.elType), R({
|
|
4414
4426
|
key: 0,
|
|
4415
4427
|
ref_for: !0
|
|
4416
|
-
},
|
|
4417
|
-
|
|
4428
|
+
}, b), null, 16)) : (g(), w(q, { key: 1 }, [
|
|
4429
|
+
b.elType === "upload" ? (g(), O(Ct, {
|
|
4418
4430
|
key: 0,
|
|
4419
|
-
desc:
|
|
4420
|
-
loading:
|
|
4431
|
+
desc: b,
|
|
4432
|
+
loading: M.loading
|
|
4421
4433
|
}, null, 8, ["desc", "loading"])) : (g(), O(tt, {
|
|
4422
4434
|
key: 1,
|
|
4423
|
-
desc:
|
|
4424
|
-
loading:
|
|
4435
|
+
desc: b,
|
|
4436
|
+
loading: M.loading
|
|
4425
4437
|
}, null, 8, ["desc", "loading"]))
|
|
4426
4438
|
], 64))
|
|
4427
4439
|
], 64)) : V("", !0)
|
|
4428
4440
|
], 64))), 128)),
|
|
4429
|
-
s.value && s.value.length ? (g(!0),
|
|
4430
|
-
|
|
4441
|
+
s.value && s.value.length ? (g(!0), w(q, { key: 3 }, ce(s.value, (b, P) => (g(), w(q, { key: P }, [
|
|
4442
|
+
S(b) ? (g(), O(tt, {
|
|
4431
4443
|
key: 0,
|
|
4432
4444
|
type: "primary",
|
|
4433
|
-
desc:
|
|
4445
|
+
desc: b
|
|
4434
4446
|
}, null, 8, ["desc"])) : V("", !0)
|
|
4435
4447
|
], 64))), 128)) : V("", !0)
|
|
4436
4448
|
])
|
|
@@ -4438,25 +4450,25 @@ const xl = /* @__PURE__ */ Ie(di, [["__scopeId", "data-v-fd8b68ee"]]), fi = { cl
|
|
|
4438
4450
|
}),
|
|
4439
4451
|
_: 1
|
|
4440
4452
|
}, 16, ["modelValue"])
|
|
4441
|
-
])) : (g(),
|
|
4453
|
+
])) : (g(), w("div", {
|
|
4442
4454
|
key: 1,
|
|
4443
4455
|
class: "el-plus-table-header-btns",
|
|
4444
4456
|
style: Se({ "min-width": Le(ia)() ? "100%" : i.value && i.value.length > 0 ? i.value.length * 110 + "px" : "10px" })
|
|
4445
4457
|
}, [
|
|
4446
4458
|
ee("div", gi, [
|
|
4447
|
-
(g(!0),
|
|
4448
|
-
|
|
4459
|
+
(g(!0), w(q, null, ce(i.value, (T, I) => (g(), w(q, { key: I }, [
|
|
4460
|
+
T.customize ? (g(), O(Pt(T.elType), R({
|
|
4449
4461
|
key: 0,
|
|
4450
4462
|
ref_for: !0
|
|
4451
|
-
},
|
|
4452
|
-
|
|
4463
|
+
}, T), null, 16)) : (g(), w(q, { key: 1 }, [
|
|
4464
|
+
T.elType === "upload" ? (g(), O(Ct, {
|
|
4453
4465
|
key: 0,
|
|
4454
|
-
desc:
|
|
4455
|
-
loading:
|
|
4466
|
+
desc: T,
|
|
4467
|
+
loading: M.loading
|
|
4456
4468
|
}, null, 8, ["desc", "loading"])) : (g(), O(tt, {
|
|
4457
4469
|
key: 1,
|
|
4458
|
-
desc:
|
|
4459
|
-
loading:
|
|
4470
|
+
desc: T,
|
|
4471
|
+
loading: M.loading
|
|
4460
4472
|
}, null, 8, ["desc", "loading"]))
|
|
4461
4473
|
], 64))
|
|
4462
4474
|
], 64))), 128))
|
|
@@ -4464,15 +4476,15 @@ const xl = /* @__PURE__ */ Ie(di, [["__scopeId", "data-v-fd8b68ee"]]), fi = { cl
|
|
|
4464
4476
|
], 4))
|
|
4465
4477
|
]),
|
|
4466
4478
|
_: 1
|
|
4467
|
-
}, 8, ["style"])) :
|
|
4479
|
+
}, 8, ["style"])) : M.tbName ? (g(), w("div", ji, [
|
|
4468
4480
|
ee("div", yi, [
|
|
4469
|
-
|
|
4481
|
+
M.tbName ? (g(), O(xl, {
|
|
4470
4482
|
key: 0,
|
|
4471
4483
|
ref_key: "settingColumnRef",
|
|
4472
4484
|
ref: u,
|
|
4473
|
-
tbName:
|
|
4474
|
-
column:
|
|
4475
|
-
size:
|
|
4485
|
+
tbName: M.tbName,
|
|
4486
|
+
column: M.column || [],
|
|
4487
|
+
size: M.size,
|
|
4476
4488
|
showText: !0
|
|
4477
4489
|
}, null, 8, ["tbName", "column", "size"])) : V("", !0)
|
|
4478
4490
|
])
|
|
@@ -4495,17 +4507,17 @@ const mi = /* @__PURE__ */ Ie(zi, [["__scopeId", "data-v-5341de7d"]]), Di = /* @
|
|
|
4495
4507
|
const t = e, l = p(((u = t.scope) == null ? void 0 : u.$index) || 0), n = X(() => {
|
|
4496
4508
|
var o, s;
|
|
4497
4509
|
const i = [];
|
|
4498
|
-
return t.desc.label === "操作" && ((s = (o = t.scope) == null ? void 0 : o.row) != null && s.isSumRow) ? [] : (t.desc.nodes ? t.desc.nodes.map((
|
|
4499
|
-
i.push(c(
|
|
4500
|
-
}) : ((typeof t.field == "function" ? t.field() : t.field) || "").split(",").map((
|
|
4501
|
-
i.push(c(
|
|
4510
|
+
return t.desc.label === "操作" && ((s = (o = t.scope) == null ? void 0 : o.row) != null && s.isSumRow) ? [] : (t.desc.nodes ? t.desc.nodes.map((d, N) => {
|
|
4511
|
+
i.push(c(d.field || t.field, d, N));
|
|
4512
|
+
}) : ((typeof t.field == "function" ? t.field() : t.field) || "").split(",").map((m, A) => {
|
|
4513
|
+
i.push(c(m, t.desc, A));
|
|
4502
4514
|
}), i.length <= 0 && i.push(c("", t.desc, 0)), i);
|
|
4503
4515
|
}), r = X(() => {
|
|
4504
4516
|
var i;
|
|
4505
4517
|
return typeof t.desc.content == "function" ? t.desc.content(t.modelValue, (i = t.scope) == null ? void 0 : i.row, t.field) : t.desc.content || "";
|
|
4506
4518
|
}), c = (i, o, s) => {
|
|
4507
|
-
var
|
|
4508
|
-
const
|
|
4519
|
+
var N, m, A;
|
|
4520
|
+
const d = {
|
|
4509
4521
|
field: i,
|
|
4510
4522
|
desc: {
|
|
4511
4523
|
prop: i,
|
|
@@ -4513,29 +4525,29 @@ const mi = /* @__PURE__ */ Ie(zi, [["__scopeId", "data-v-5341de7d"]]), Di = /* @
|
|
|
4513
4525
|
size: o.size || t.size || "default"
|
|
4514
4526
|
}
|
|
4515
4527
|
};
|
|
4516
|
-
if (Object.assign(
|
|
4517
|
-
if (
|
|
4518
|
-
const
|
|
4519
|
-
|
|
4528
|
+
if (Object.assign(d.desc, o), o.type === "btn" && (d.desc.btnType = o.btnType || "primary", d.desc.btnLabel = o.btnLabel || o.label, d.desc.plain = o.plain || !0, d.desc.text = !0), o.type ? (o.type === "text" && (d.desc.default = o.default || "-"), o.type, typeof o.type == "string" ? d.desc.type = o.type : d.desc.type = o.type[s] || o.type[0], o.format && (typeof o.format == "string" || typeof o.format == "function" ? d.desc.format = o.format : d.desc.format = o.format[s] === null ? null : o.format[s] || o.format[0]), o.title && (typeof o.title == "string" ? d.desc.title = o.title : d.desc.title = o.title[s] || o.title[0])) : d.desc.type = "text", o.elType && (d.desc.elType = o.elType), o.linkType && (d.desc.linkType = o.linkType), o.linkId && (d.desc.linkId = o.linkId), o.color)
|
|
4529
|
+
if (d.desc.style = o.style || {}, typeof o.color == "function") {
|
|
4530
|
+
const S = (typeof t.field == "function" ? t.field() : t.field) || "";
|
|
4531
|
+
d.desc.style.color = o.color((N = t.scope) == null ? void 0 : N.row[S], (m = t.scope) == null ? void 0 : m.row, t.field);
|
|
4520
4532
|
} else
|
|
4521
|
-
typeof o.color == "string" ?
|
|
4522
|
-
return o.on && (Object.prototype.toString.call(o.on) === "[object Array]" ?
|
|
4533
|
+
typeof o.color == "string" ? d.desc.style.color = o.color : d.desc.style.color = o.color[s] === null ? null : o.color[s] || o.color[0];
|
|
4534
|
+
return o.on && (Object.prototype.toString.call(o.on) === "[object Array]" ? d.desc.on = o.on[s] === null ? null : o.on[s] || o.on[0] : d.desc.on = o.on), o.disabled && (d.disabled = !0), typeof o.options == "function" && (d.desc.options = o.options(t.scope)), d.vshow = a(o), o.attrs && (typeof o.attrs == "function" ? d.desc = { ...d.desc, ...o.attrs((A = t.scope) == null ? void 0 : A.row) } : d.desc = { ...d.desc, ...o.attrs }), d.align = o.align, d.desc._label = o.label, d;
|
|
4523
4535
|
}, a = (i) => {
|
|
4524
4536
|
var o;
|
|
4525
4537
|
return i.vshow !== void 0 && i.vshow !== null && i.vshow !== "" ? typeof i.vshow == "boolean" ? i.vshow : typeof i.vshow == "function" ? i.vshow((o = t.scope) == null ? void 0 : o.row) : !!i.vshow : !0;
|
|
4526
4538
|
};
|
|
4527
4539
|
return at(() => {
|
|
4528
4540
|
}), (i, o) => {
|
|
4529
|
-
const s = C("el-icon"),
|
|
4530
|
-
return g(),
|
|
4541
|
+
const s = C("el-icon"), d = C("el-popover");
|
|
4542
|
+
return g(), w("div", {
|
|
4531
4543
|
class: dt(["el-plus-table-column-item", [i.desc.inline ? "el-plus-table-column-row" : "el-plus-table-column-column"]])
|
|
4532
4544
|
}, [
|
|
4533
|
-
(g(!0),
|
|
4534
|
-
var
|
|
4535
|
-
return g(),
|
|
4536
|
-
key:
|
|
4545
|
+
(g(!0), w(q, null, ce(n.value, (N, m) => {
|
|
4546
|
+
var A;
|
|
4547
|
+
return g(), w(q, {
|
|
4548
|
+
key: m + (N.options && N.options.length > 0 ? N.options[0].value || N.options[0].v : "0")
|
|
4537
4549
|
}, [
|
|
4538
|
-
i.desc.content && r.value ? (g(), O(
|
|
4550
|
+
i.desc.content && r.value ? (g(), O(d, {
|
|
4539
4551
|
key: 0,
|
|
4540
4552
|
placement: "left",
|
|
4541
4553
|
width: 200,
|
|
@@ -4554,18 +4566,18 @@ const mi = /* @__PURE__ */ Ie(zi, [["__scopeId", "data-v-5341de7d"]]), Di = /* @
|
|
|
4554
4566
|
_: 1
|
|
4555
4567
|
}, 8, ["content"])) : V("", !0),
|
|
4556
4568
|
ee("div", {
|
|
4557
|
-
style: Se([{ width: "100%", display: "flex" }, { "justify-content":
|
|
4569
|
+
style: Se([{ width: "100%", display: "flex" }, { "justify-content": N.align || "flex-start" }])
|
|
4558
4570
|
}, [
|
|
4559
|
-
|
|
4571
|
+
N.vshow === void 0 || N.vshow ? (g(), O(Pt("el-plus-form-" + N.desc.type), R({
|
|
4560
4572
|
key: 0,
|
|
4561
4573
|
ref_for: !0
|
|
4562
|
-
},
|
|
4574
|
+
}, N, {
|
|
4563
4575
|
isTable: !0,
|
|
4564
|
-
formData: (
|
|
4565
|
-
size:
|
|
4576
|
+
formData: (A = t.scope) == null ? void 0 : A.row,
|
|
4577
|
+
size: N.size || i.size,
|
|
4566
4578
|
rowIndex: l.value,
|
|
4567
|
-
modelValue: t.scope.row[
|
|
4568
|
-
"onUpdate:modelValue": (
|
|
4579
|
+
modelValue: t.scope.row[N.field],
|
|
4580
|
+
"onUpdate:modelValue": (S) => t.scope.row[N.field] = S
|
|
4569
4581
|
}), null, 16, ["formData", "size", "rowIndex", "modelValue", "onUpdate:modelValue"])) : V("", !0)
|
|
4570
4582
|
], 4)
|
|
4571
4583
|
], 64);
|
|
@@ -4601,11 +4613,11 @@ const vi = /* @__PURE__ */ Ie(Di, [["__scopeId", "data-v-7550a821"]]), Yi = {
|
|
|
4601
4613
|
default: x((i) => {
|
|
4602
4614
|
var o;
|
|
4603
4615
|
return [
|
|
4604
|
-
(o = r.item.children) != null && o.length ? (g(!0),
|
|
4616
|
+
(o = r.item.children) != null && o.length ? (g(!0), w(q, { key: 0 }, ce(r.item.children, (s, d) => (g(), O(a, {
|
|
4605
4617
|
item: s,
|
|
4606
4618
|
size: r.size,
|
|
4607
|
-
key:
|
|
4608
|
-
}, null, 8, ["item", "size"]))), 128)) : (g(),
|
|
4619
|
+
key: d
|
|
4620
|
+
}, null, 8, ["item", "size"]))), 128)) : (g(), w(q, { key: 1 }, [
|
|
4609
4621
|
i.$index >= 0 ? (g(), O(vi, {
|
|
4610
4622
|
key: 0,
|
|
4611
4623
|
field: r.item.prop,
|
|
@@ -4656,169 +4668,169 @@ const vi = /* @__PURE__ */ Ie(Di, [["__scopeId", "data-v-7550a821"]]), Yi = {
|
|
|
4656
4668
|
},
|
|
4657
4669
|
emits: ["getUrlConsumerIds", "selection", "select", "selectAll", "update:modelValue", "tabChange", "queryChange", "expandChange", "inited", "headerReset"],
|
|
4658
4670
|
setup(e, { expose: t, emit: l }) {
|
|
4659
|
-
var wt,
|
|
4660
|
-
const n = ae("lodash"), r = ae("defaultConf"), c = ae("format"), a = l, u = e, i = p([]), o = p(null), s = p(),
|
|
4661
|
-
var F,
|
|
4662
|
-
return typeof ((
|
|
4663
|
-
}),
|
|
4664
|
-
let
|
|
4665
|
-
const
|
|
4671
|
+
var wt, Q, H, te, _e, ze, Re, qe;
|
|
4672
|
+
const n = ae("lodash"), r = ae("defaultConf"), c = ae("format"), a = l, u = e, i = p([]), o = p(null), s = p(), d = p({}), N = p(((te = (wt = u.tableConfig) == null ? void 0 : wt.tabConf) == null ? void 0 : te.tabs[((H = (Q = u.tableConfig) == null ? void 0 : Q.tabConf) == null ? void 0 : H.default) || 0].value) ?? ""), m = X(() => (Y) => Y.key ? d.value[Y.key] || 0 : ""), A = X(() => (Y, U) => {
|
|
4673
|
+
var F, se, ve, Te;
|
|
4674
|
+
return typeof ((se = (F = u.tableConfig) == null ? void 0 : F.tableAttr) == null ? void 0 : se.selectable) == "function" ? (Te = (ve = u.tableConfig) == null ? void 0 : ve.tableAttr) == null ? void 0 : Te.selectable(Y, U) : !0;
|
|
4675
|
+
}), S = p(), E = p(!1), M = p(!!((ze = (_e = u.tableConfig) == null ? void 0 : _e.tabConf) != null && ze.fetch)), _ = p(!1), v = r.size || "default", y = X(() => u.loading || E.value);
|
|
4676
|
+
let T = Ee({});
|
|
4677
|
+
const I = p(u.modelValue || []);
|
|
4666
4678
|
Ee([]);
|
|
4667
|
-
const
|
|
4668
|
-
current: !u.isDialog &&
|
|
4679
|
+
const b = p(0), P = Ee(n.cloneDeep(u.selectList) || []), Z = Ee([]), D = Ee({
|
|
4680
|
+
current: !u.isDialog && T.current ? parseInt(T.current) : 1,
|
|
4669
4681
|
total: 0,
|
|
4670
|
-
size: !u.isDialog &&
|
|
4671
|
-
}),
|
|
4672
|
-
var
|
|
4673
|
-
const
|
|
4682
|
+
size: !u.isDialog && T.size ? parseInt(T.size) : u.pageSize
|
|
4683
|
+
}), h = ((qe = (Re = u.tableConfig) == null ? void 0 : Re.explan) == null ? void 0 : qe.treeProps) || { children: "children", hasChildren: "hasChildren" }, j = X(() => {
|
|
4684
|
+
var se, ve, Te;
|
|
4685
|
+
const Y = ra(n.cloneDeep((se = u.tableConfig) == null ? void 0 : se.column), r, ((ve = u.tableConfig) == null ? void 0 : ve.tbName) || "", u.headerAlign, u.isDialog ? "auto" : u.colMinWidth), U = W(Y);
|
|
4674
4686
|
i.value = [];
|
|
4675
|
-
const F =
|
|
4687
|
+
const F = U.map((ie, J) => {
|
|
4676
4688
|
var be;
|
|
4677
4689
|
if (ie.isRowSpan) {
|
|
4678
4690
|
i.value.push(J);
|
|
4679
4691
|
let Ye, Oe = 0, Ce = 1;
|
|
4680
|
-
(be =
|
|
4692
|
+
(be = I.value) == null || be.map((xe, Qe) => {
|
|
4681
4693
|
var $e;
|
|
4682
|
-
let Fe = ($e = ie.rsProps) != null && $e.length ?
|
|
4683
|
-
Ye !== Fe + xe[ie.prop] ? (Ce > 1 && Qe > 0 && (
|
|
4694
|
+
let Fe = ($e = ie.rsProps) != null && $e.length ? L(xe, ie.rsProps) : "";
|
|
4695
|
+
Ye !== Fe + xe[ie.prop] ? (Ce > 1 && Qe > 0 && (I.value[Oe]["rowSpan_" + J] = Ce), Oe = Qe, Ce = 1, Ye = Fe + xe[ie.prop]) : (Ce += 1, xe["rowSpan_" + J] = 0), Qe === I.value.length - 1 && (I.value[Oe]["rowSpan_" + J] = Ce);
|
|
4684
4696
|
});
|
|
4685
4697
|
}
|
|
4686
4698
|
return ie.isColSpan ? J : null;
|
|
4687
4699
|
}).filter((ie) => ie !== null);
|
|
4688
|
-
return F.length && ((Te =
|
|
4700
|
+
return F.length && ((Te = I.value) == null || Te.map((ie, J) => {
|
|
4689
4701
|
let be, Ye = 0, Oe = 1;
|
|
4690
4702
|
F.map((Ce, xe) => {
|
|
4691
|
-
i.value.includes(Ce) || i.value.push(Ce), be !== ie[
|
|
4703
|
+
i.value.includes(Ce) || i.value.push(Ce), be !== ie[U[Ce].prop] || xe > 0 && Ce - 1 !== F[xe - 1] ? (Oe > 1 && (ie["colSpan_" + Ye] = Oe), Ye = Ce, Oe = 1, be = ie[U[Ce].prop]) : (Oe += 1, ie["colSpan_" + Ce] = 0), xe === F.length - 1 && (ie["colSpan_" + Ye] = Oe);
|
|
4692
4704
|
});
|
|
4693
4705
|
})), i.value.length > 0 && (o.value = ({ row: ie, column: J, columnIndex: be }) => {
|
|
4694
4706
|
let Ye = be;
|
|
4695
4707
|
if (u.type === "selection" && (Ye -= 1), u.isIndex && (Ye -= 1), Ue().firstColumn && (Ye -= 1), i.value.includes(Ye))
|
|
4696
4708
|
return { rowspan: ie["rowSpan_" + Ye] ?? 1, colspan: ie["colSpan_" + Ye] ?? 1 };
|
|
4697
|
-
}),
|
|
4709
|
+
}), Y;
|
|
4698
4710
|
});
|
|
4699
|
-
function
|
|
4700
|
-
return
|
|
4711
|
+
function L(Y, U) {
|
|
4712
|
+
return Y && (U != null && U.length) ? U.reduce((F, se) => F += Y[se] || "", "") : "";
|
|
4701
4713
|
}
|
|
4702
4714
|
const B = X(() => {
|
|
4703
|
-
var
|
|
4704
|
-
const
|
|
4705
|
-
if ((
|
|
4715
|
+
var U, F, se, ve, Te, ie, J;
|
|
4716
|
+
const Y = [];
|
|
4717
|
+
if ((U = u.tableConfig.summaryConf) != null && U.vif) {
|
|
4706
4718
|
if (typeof ((F = u.tableConfig.summaryConf) == null ? void 0 : F.vif) == "boolean") {
|
|
4707
|
-
if (!((
|
|
4708
|
-
return
|
|
4719
|
+
if (!((se = u.tableConfig.summaryConf) != null && se.vif))
|
|
4720
|
+
return Y;
|
|
4709
4721
|
} else if (!((ve = u.tableConfig.summaryConf) != null && ve.vif()))
|
|
4710
|
-
return
|
|
4722
|
+
return Y;
|
|
4711
4723
|
}
|
|
4712
4724
|
if ((Te = u.tableConfig.summaryConf) != null && Te.prop) {
|
|
4713
4725
|
const be = u.tableConfig.summaryConf.prop.split(","), Ye = ((J = (ie = u.tableConfig.summaryConf) == null ? void 0 : ie.label) == null ? void 0 : J.split(",")) || [];
|
|
4714
4726
|
be.map((Oe, Ce) => {
|
|
4715
4727
|
var Qe, Fe;
|
|
4716
4728
|
let xe = "";
|
|
4717
|
-
(Qe = u.tableConfig.summaryConf) != null && Qe.sumFn ? xe = (Fe = u.tableConfig.summaryConf) == null ? void 0 : Fe.sumFn(
|
|
4729
|
+
(Qe = u.tableConfig.summaryConf) != null && Qe.sumFn ? xe = (Fe = u.tableConfig.summaryConf) == null ? void 0 : Fe.sumFn(I.value, P) : xe = c.yuan(I.value.reduce(($e, Be) => $e += Be[Oe], 0)), Y.push({ label: Ye[Ce], value: xe });
|
|
4718
4730
|
});
|
|
4719
4731
|
}
|
|
4720
|
-
return
|
|
4732
|
+
return Y;
|
|
4721
4733
|
});
|
|
4722
|
-
function W(
|
|
4723
|
-
const
|
|
4724
|
-
return
|
|
4725
|
-
var
|
|
4726
|
-
(
|
|
4727
|
-
}),
|
|
4734
|
+
function W(Y) {
|
|
4735
|
+
const U = [];
|
|
4736
|
+
return Y == null || Y.map((F) => {
|
|
4737
|
+
var se;
|
|
4738
|
+
(se = F.children) != null && se.length ? U.push(...W(F.children)) : F.__vif && U.push(F);
|
|
4739
|
+
}), U;
|
|
4728
4740
|
}
|
|
4729
|
-
async function re(
|
|
4730
|
-
st(!0), await a("tabChange",
|
|
4741
|
+
async function re(Y) {
|
|
4742
|
+
st(!0), await a("tabChange", Y, jt), we(() => {
|
|
4731
4743
|
jt();
|
|
4732
4744
|
});
|
|
4733
4745
|
}
|
|
4734
|
-
async function je(
|
|
4746
|
+
async function je(Y, U, F) {
|
|
4735
4747
|
var ve, Te;
|
|
4736
|
-
const
|
|
4737
|
-
|
|
4748
|
+
const se = await le();
|
|
4749
|
+
se[((Te = (ve = u.tableConfig) == null ? void 0 : ve.explan) == null ? void 0 : Te.idName) || "parentId"] = Y.id, u.tableConfig.fetch && u.tableConfig.fetch(se).then((ie) => {
|
|
4738
4750
|
var J, be, Ye;
|
|
4739
4751
|
F(ie == null ? void 0 : ie[((J = r.table) == null ? void 0 : J.list) || ((Ye = (be = u.tableConfig) == null ? void 0 : be.fetchMap) == null ? void 0 : Ye.list) || "records"]);
|
|
4740
4752
|
});
|
|
4741
4753
|
}
|
|
4742
|
-
function
|
|
4743
|
-
k(
|
|
4754
|
+
function oe(Y, U) {
|
|
4755
|
+
k(U, !Y.some((F) => F[u.rowKey] === U[u.rowKey])), a("select", Y, U), a("selection", n.cloneDeep(P));
|
|
4744
4756
|
}
|
|
4745
|
-
function f(
|
|
4746
|
-
const
|
|
4747
|
-
(
|
|
4748
|
-
k(F,
|
|
4749
|
-
}), a("selectAll",
|
|
4757
|
+
function f(Y) {
|
|
4758
|
+
const U = !(Y && Y.length > 0);
|
|
4759
|
+
(U ? I.value : Y).map((F) => {
|
|
4760
|
+
k(F, U);
|
|
4761
|
+
}), a("selectAll", Y, U), a("selection", n.cloneDeep(P));
|
|
4750
4762
|
}
|
|
4751
|
-
function
|
|
4752
|
-
a("expandChange",
|
|
4763
|
+
function z(Y, U) {
|
|
4764
|
+
a("expandChange", Y, U);
|
|
4753
4765
|
}
|
|
4754
|
-
function k(
|
|
4755
|
-
const F =
|
|
4756
|
-
|
|
4766
|
+
function k(Y, U = !1) {
|
|
4767
|
+
const F = P.findIndex((se) => se[u.rowKey] === Y[u.rowKey]);
|
|
4768
|
+
U ? F >= 0 && P.splice(F, 1) : F < 0 && P.push(Y);
|
|
4757
4769
|
}
|
|
4758
|
-
function $(
|
|
4759
|
-
|
|
4770
|
+
function $(Y, U = !1) {
|
|
4771
|
+
Y && Y.length && Y.map((F) => {
|
|
4760
4772
|
k(
|
|
4761
|
-
|
|
4762
|
-
!
|
|
4773
|
+
P.find((se) => se[u.rowKey] === F[u.rowKey]),
|
|
4774
|
+
!U
|
|
4763
4775
|
);
|
|
4764
4776
|
}), gt();
|
|
4765
4777
|
}
|
|
4766
4778
|
function ge() {
|
|
4767
|
-
|
|
4779
|
+
P.splice(0, P.length, ...u.selectList);
|
|
4768
4780
|
}
|
|
4769
4781
|
async function le() {
|
|
4770
|
-
var
|
|
4771
|
-
let
|
|
4782
|
+
var U, F, se, ve, Te, ie, J, be, Ye, Oe, Ce, xe, Qe, Fe, $e;
|
|
4783
|
+
let Y = {
|
|
4772
4784
|
// 封装查询条件
|
|
4773
4785
|
// ...route.query,
|
|
4774
4786
|
// ...topQueryData.value,
|
|
4775
|
-
...((
|
|
4787
|
+
...((U = S.value) == null ? void 0 : U.getData()) || {},
|
|
4776
4788
|
...typeof u.tableConfig.queryMap == "function" ? await u.tableConfig.queryMap() : u.tableConfig.queryMap,
|
|
4777
4789
|
t_: (/* @__PURE__ */ new Date()).getTime()
|
|
4778
4790
|
};
|
|
4779
|
-
return u.isPager && (
|
|
4791
|
+
return u.isPager && (Y[((se = (F = r.table) == null ? void 0 : F.page) == null ? void 0 : se.current) || ((ie = (Te = (ve = u.tableConfig) == null ? void 0 : ve.fetchMap) == null ? void 0 : Te.page) == null ? void 0 : ie.current) || "current"] = D.current, Y[((be = (J = r.table) == null ? void 0 : J.page) == null ? void 0 : be.pageSize) || ((Ce = (Oe = (Ye = u.tableConfig) == null ? void 0 : Ye.fetchMap) == null ? void 0 : Oe.page) == null ? void 0 : Ce.pageSize) || "size"] = D.size), (xe = u.tableConfig) != null && xe.tabConf && ((Fe = (Qe = u.tableConfig) == null ? void 0 : Qe.tabConf) != null && Fe.prop) && (Y[($e = u.tableConfig) == null ? void 0 : $e.tabConf.prop] = N.value), Y = ke(Y), u.isDialog, Y;
|
|
4780
4792
|
}
|
|
4781
|
-
function ke(
|
|
4782
|
-
if (!
|
|
4793
|
+
function ke(Y) {
|
|
4794
|
+
if (!Y)
|
|
4783
4795
|
return {};
|
|
4784
|
-
const
|
|
4785
|
-
return Object.keys(
|
|
4786
|
-
|
|
4787
|
-
}),
|
|
4796
|
+
const U = {};
|
|
4797
|
+
return Object.keys(Y).map((F) => {
|
|
4798
|
+
Y[F] !== void 0 && Y[F] !== null && Y[F] !== "" && (U[F] = Y[F]);
|
|
4799
|
+
}), U;
|
|
4788
4800
|
}
|
|
4789
|
-
function Ve(
|
|
4790
|
-
|
|
4801
|
+
function Ve(Y) {
|
|
4802
|
+
D.current = 1, D.size = Y, Pe(!0);
|
|
4791
4803
|
}
|
|
4792
|
-
function Me(
|
|
4793
|
-
|
|
4804
|
+
function Me(Y) {
|
|
4805
|
+
D.current !== Y && (D.current = Y, Pe(!1));
|
|
4794
4806
|
}
|
|
4795
|
-
function Ze(
|
|
4807
|
+
function Ze(Y, U) {
|
|
4796
4808
|
let F = [];
|
|
4797
|
-
|
|
4798
|
-
Z.push([...
|
|
4809
|
+
Y && Y.length > 0 && Y.map((se, ve) => {
|
|
4810
|
+
Z.push([...U, ve]), F = se[h.children], F && F.length > 0 && Ze(F, [ve]);
|
|
4799
4811
|
});
|
|
4800
4812
|
}
|
|
4801
|
-
async function Pe(
|
|
4802
|
-
var F,
|
|
4813
|
+
async function Pe(Y) {
|
|
4814
|
+
var F, se, ve, Te, ie, J, be, Ye, Oe, Ce, xe, Qe, Fe, $e, Be, We, yt, dl, fl, pl, Nl, gl, jl, yl, zl;
|
|
4803
4815
|
if (!u.tableConfig.fetch)
|
|
4804
|
-
return
|
|
4805
|
-
if (
|
|
4816
|
+
return b.value = 2, !1;
|
|
4817
|
+
if (b.value === 1 || E.value)
|
|
4806
4818
|
return !1;
|
|
4807
|
-
|
|
4808
|
-
let
|
|
4809
|
-
(ve = (
|
|
4819
|
+
b.value = 1, E.value = !0, Y && (D.current = 1);
|
|
4820
|
+
let U = await le();
|
|
4821
|
+
(ve = (se = (F = u.tableConfig) == null ? void 0 : F.toolbar) == null ? void 0 : se.formConfig) != null && ve.beforeRequest && (U = ((J = (ie = (Te = u.tableConfig) == null ? void 0 : Te.toolbar) == null ? void 0 : ie.formConfig) == null ? void 0 : J.beforeRequest(n.cloneDeep(U))) || U);
|
|
4810
4822
|
try {
|
|
4811
|
-
let et = await u.tableConfig.fetch(
|
|
4823
|
+
let et = await u.tableConfig.fetch(U) || {};
|
|
4812
4824
|
Array.isArray(et) && (et = { [((be = r.table) == null ? void 0 : be.list) || ((Oe = (Ye = u.tableConfig) == null ? void 0 : Ye.fetchMap) == null ? void 0 : Oe.list) || "records"]: et });
|
|
4813
4825
|
try {
|
|
4814
4826
|
let ct = [];
|
|
4815
|
-
if (u.isPager ? (
|
|
4827
|
+
if (u.isPager ? (D.total = et[((xe = (Ce = r.table) == null ? void 0 : Ce.page) == null ? void 0 : xe.total) || (($e = (Fe = (Qe = u.tableConfig) == null ? void 0 : Qe.fetchMap) == null ? void 0 : Fe.page) == null ? void 0 : $e.total) || "total"] * 1 || 0, D.current = et[((We = (Be = r.table) == null ? void 0 : Be.page) == null ? void 0 : We.current) || ((fl = (dl = (yt = u.tableConfig) == null ? void 0 : yt.fetchMap) == null ? void 0 : dl.page) == null ? void 0 : fl.current) || "current"] || 1, ct = et[((pl = r.table) == null ? void 0 : pl.list) || ((gl = (Nl = u.tableConfig) == null ? void 0 : Nl.fetchMap) == null ? void 0 : gl.list) || "records"] || null) : ct = et[((jl = r.table) == null ? void 0 : jl.list) || ((zl = (yl = u.tableConfig) == null ? void 0 : yl.fetchMap) == null ? void 0 : zl.list) || "records"] || null, u.type !== "expand" && u.isTempId && Array.isArray(ct)) {
|
|
4816
4828
|
const hn = (/* @__PURE__ */ new Date()).getTime();
|
|
4817
4829
|
ct.map((ml, Ln) => {
|
|
4818
4830
|
ml.tempId = ml[u.rowKey] || `${hn + Ln}`;
|
|
4819
4831
|
});
|
|
4820
4832
|
}
|
|
4821
|
-
|
|
4833
|
+
I.value = ct, u.type === "expand" && (Z.splice(0, Z.length), Ze(I.value, [])), _.value = !1, it(), we(() => {
|
|
4822
4834
|
gt();
|
|
4823
4835
|
});
|
|
4824
4836
|
} catch (ct) {
|
|
@@ -4827,95 +4839,95 @@ const vi = /* @__PURE__ */ Ie(Di, [["__scopeId", "data-v-7550a821"]]), Yi = {
|
|
|
4827
4839
|
} catch (et) {
|
|
4828
4840
|
console.log("fetch error: ", et);
|
|
4829
4841
|
}
|
|
4830
|
-
|
|
4842
|
+
b.value = 2, E.value = !1;
|
|
4831
4843
|
}
|
|
4832
4844
|
const it = n.debounce(
|
|
4833
4845
|
() => {
|
|
4834
|
-
a("inited",
|
|
4846
|
+
a("inited", I.value);
|
|
4835
4847
|
},
|
|
4836
4848
|
400,
|
|
4837
4849
|
{ leading: !0, trailing: !1 }
|
|
4838
4850
|
);
|
|
4839
4851
|
function gt() {
|
|
4840
|
-
|
|
4852
|
+
I.value && I.value.length > 0 && u.type === "selection" && I.value.map((Y) => {
|
|
4841
4853
|
s.value.toggleRowSelection(
|
|
4842
|
-
|
|
4843
|
-
|
|
4854
|
+
Y,
|
|
4855
|
+
P.some((U) => U[u.rowKey] === Y[u.rowKey])
|
|
4844
4856
|
);
|
|
4845
4857
|
});
|
|
4846
4858
|
}
|
|
4847
|
-
async function st(
|
|
4848
|
-
var
|
|
4849
|
-
return await Pe(!0), !
|
|
4859
|
+
async function st(Y = !1) {
|
|
4860
|
+
var U, F, se, ve;
|
|
4861
|
+
return await Pe(!0), !Y && ((U = u.tableConfig) != null && U.tabConf) && ((F = u.tableConfig) != null && F.tabConf.fetch) && (d.value = await ((ve = u.tableConfig) == null ? void 0 : ve.tabConf.fetch(Object.assign({}, await le(), (se = u.tableConfig) == null ? void 0 : se.tabConf.queryMap))), M.value = !1), I.value;
|
|
4850
4862
|
}
|
|
4851
4863
|
async function St() {
|
|
4852
|
-
var
|
|
4853
|
-
let
|
|
4854
|
-
(
|
|
4864
|
+
var U, F, se, ve, Te, ie;
|
|
4865
|
+
let Y = await le();
|
|
4866
|
+
(se = (F = (U = u.tableConfig) == null ? void 0 : U.toolbar) == null ? void 0 : F.formConfig) != null && se.beforeRequest && (Y = ((ie = (Te = (ve = u.tableConfig) == null ? void 0 : ve.toolbar) == null ? void 0 : Te.formConfig) == null ? void 0 : ie.beforeRequest(n.cloneDeep(Y))) || Y), Y && a("queryChange", Y), st();
|
|
4855
4867
|
}
|
|
4856
4868
|
function kt() {
|
|
4857
|
-
a("headerReset",
|
|
4869
|
+
a("headerReset", T);
|
|
4858
4870
|
}
|
|
4859
4871
|
function jt() {
|
|
4860
|
-
var
|
|
4861
|
-
(
|
|
4872
|
+
var Y;
|
|
4873
|
+
(Y = S.value) == null || Y.initCol();
|
|
4862
4874
|
}
|
|
4863
|
-
return
|
|
4875
|
+
return ne(
|
|
4864
4876
|
() => u.modelValue,
|
|
4865
|
-
(
|
|
4866
|
-
var
|
|
4867
|
-
u.tableConfig.fetch || Ke(
|
|
4877
|
+
(Y) => {
|
|
4878
|
+
var U;
|
|
4879
|
+
u.tableConfig.fetch || Ke(Y, I.value) || (b.value = 2, (U = I.value) == null || U.splice(0, I.value.length, ...Y || []));
|
|
4868
4880
|
},
|
|
4869
4881
|
{ deep: !0 }
|
|
4870
|
-
),
|
|
4882
|
+
), ne(
|
|
4871
4883
|
() => u.selectList,
|
|
4872
|
-
(
|
|
4873
|
-
|
|
4884
|
+
(Y) => {
|
|
4885
|
+
P.splice(0, P.length, ...Y), gt();
|
|
4874
4886
|
},
|
|
4875
4887
|
{ deep: !0 }
|
|
4876
4888
|
), u.isDIYMain && On("reloadTable", st), at(() => {
|
|
4877
|
-
var
|
|
4878
|
-
Object.keys(((
|
|
4879
|
-
}), t({ tableRef: s, reload: st, tableData:
|
|
4889
|
+
var Y, U, F;
|
|
4890
|
+
Object.keys(((U = (Y = u.tableConfig) == null ? void 0 : Y.toolbar) == null ? void 0 : U.formConfig) || {}).length || (F = u.tableConfig) != null && F.tbName || st();
|
|
4891
|
+
}), t({ tableRef: s, reload: st, tableData: I, changeSelect: $, resetSelect: ge, initCol: jt }), (Y, U) => {
|
|
4880
4892
|
var Oe, Ce, xe, Qe, Fe, $e;
|
|
4881
|
-
const F = C("el-icon"),
|
|
4882
|
-
return g(),
|
|
4883
|
-
Object.keys(((Oe =
|
|
4893
|
+
const F = C("el-icon"), se = C("el-radio-button"), ve = C("el-radio-group"), Te = C("el-table-column"), ie = C("el-empty"), J = C("el-table"), be = C("el-pagination"), Ye = Sn("loading");
|
|
4894
|
+
return g(), w("div", _i, [
|
|
4895
|
+
Object.keys(((Oe = Y.tableConfig) == null ? void 0 : Oe.toolbar) || {}).length || Y.tableConfig.tbName ? (g(), O(mi, {
|
|
4884
4896
|
key: 0,
|
|
4885
4897
|
ref_key: "tableHeaderRef",
|
|
4886
|
-
ref:
|
|
4887
|
-
modelValue: Le(
|
|
4888
|
-
"onUpdate:modelValue":
|
|
4889
|
-
tbName:
|
|
4890
|
-
column: ((Ce =
|
|
4891
|
-
size: Le(
|
|
4892
|
-
isShowRefresh:
|
|
4893
|
-
loading:
|
|
4894
|
-
toolbar:
|
|
4895
|
-
isDialog:
|
|
4898
|
+
ref: S,
|
|
4899
|
+
modelValue: Le(T),
|
|
4900
|
+
"onUpdate:modelValue": U[0] || (U[0] = (Be) => nt(T) ? T.value = Be : T = Be),
|
|
4901
|
+
tbName: Y.tableConfig.tbName,
|
|
4902
|
+
column: ((Ce = Y.tableConfig) == null ? void 0 : Ce.column) || [],
|
|
4903
|
+
size: Le(v),
|
|
4904
|
+
isShowRefresh: Y.isShowRefresh,
|
|
4905
|
+
loading: y.value,
|
|
4906
|
+
toolbar: Y.tableConfig.toolbar,
|
|
4907
|
+
isDialog: Y.isDialog,
|
|
4896
4908
|
onQuery: St,
|
|
4897
4909
|
queryDataFn: le,
|
|
4898
4910
|
onReset: kt
|
|
4899
4911
|
}, null, 8, ["modelValue", "tbName", "column", "size", "isShowRefresh", "loading", "toolbar", "isDialog"])) : V("", !0),
|
|
4900
|
-
Ue().tabTop ? me(
|
|
4901
|
-
|
|
4912
|
+
Ue().tabTop ? me(Y.$slots, "tabTop", { key: 1 }) : V("", !0),
|
|
4913
|
+
Y.tableConfig.tabConf ? (g(), w("div", Ai, [
|
|
4902
4914
|
K(ve, {
|
|
4903
|
-
modelValue:
|
|
4904
|
-
"onUpdate:modelValue":
|
|
4915
|
+
modelValue: N.value,
|
|
4916
|
+
"onUpdate:modelValue": U[1] || (U[1] = (Be) => N.value = Be),
|
|
4905
4917
|
size: "default",
|
|
4906
4918
|
onChange: re
|
|
4907
4919
|
}, {
|
|
4908
4920
|
default: x(() => {
|
|
4909
4921
|
var Be;
|
|
4910
4922
|
return [
|
|
4911
|
-
(g(!0),
|
|
4923
|
+
(g(!0), w(q, null, ce((Be = Y.tableConfig.tabConf) == null ? void 0 : Be.tabs, (We, yt) => (g(), O(se, {
|
|
4912
4924
|
key: yt,
|
|
4913
4925
|
label: We.value,
|
|
4914
4926
|
loading: !0
|
|
4915
4927
|
}, {
|
|
4916
4928
|
default: x(() => [
|
|
4917
4929
|
ye(de(We.label) + " ", 1),
|
|
4918
|
-
|
|
4930
|
+
M.value ? (g(), O(F, {
|
|
4919
4931
|
key: 0,
|
|
4920
4932
|
class: "is-loading"
|
|
4921
4933
|
}, {
|
|
@@ -4923,8 +4935,8 @@ const vi = /* @__PURE__ */ Ie(Di, [["__scopeId", "data-v-7550a821"]]), Yi = {
|
|
|
4923
4935
|
K(Le(Wn))
|
|
4924
4936
|
]),
|
|
4925
4937
|
_: 1
|
|
4926
|
-
})) : (g(),
|
|
4927
|
-
ye(de(
|
|
4938
|
+
})) : (g(), w(q, { key: 1 }, [
|
|
4939
|
+
ye(de(m.value(We)), 1)
|
|
4928
4940
|
], 64))
|
|
4929
4941
|
]),
|
|
4930
4942
|
_: 2
|
|
@@ -4934,78 +4946,78 @@ const vi = /* @__PURE__ */ Ie(Di, [["__scopeId", "data-v-7550a821"]]), Yi = {
|
|
|
4934
4946
|
_: 1
|
|
4935
4947
|
}, 8, ["modelValue"])
|
|
4936
4948
|
])) : V("", !0),
|
|
4937
|
-
Ue().default ? me(
|
|
4938
|
-
kn((g(),
|
|
4939
|
-
|
|
4949
|
+
Ue().default ? me(Y.$slots, "default", { key: 3 }) : V("", !0),
|
|
4950
|
+
kn((g(), w("div", wi, [
|
|
4951
|
+
Y.isDIYMain ? me(Y.$slots, "main", {
|
|
4940
4952
|
key: 0,
|
|
4941
|
-
tableData:
|
|
4953
|
+
tableData: I.value
|
|
4942
4954
|
}) : (g(), O(J, R({
|
|
4943
4955
|
key: 1,
|
|
4944
4956
|
ref_key: "elPlusTableRef",
|
|
4945
4957
|
ref: s,
|
|
4946
4958
|
style: { width: "100%" },
|
|
4947
|
-
maxHeight:
|
|
4948
|
-
},
|
|
4949
|
-
class: { "big-h-bar": (Qe = (xe =
|
|
4950
|
-
data:
|
|
4951
|
-
"row-key":
|
|
4959
|
+
maxHeight: Y.tableConfig.maxHeight || "auto"
|
|
4960
|
+
}, Y.tableConfig.tableAttr, {
|
|
4961
|
+
class: { "big-h-bar": (Qe = (xe = Y.tableConfig) == null ? void 0 : xe.tableAttr) == null ? void 0 : Qe.bigHBar, "big-v-bar": (Fe = Y.tableConfig.tableAttr) == null ? void 0 : Fe.bigVBar },
|
|
4962
|
+
data: I.value,
|
|
4963
|
+
"row-key": Y.type !== "expand" && Y.isTempId ? "tempId" : Y.rowKey,
|
|
4952
4964
|
lazy: "",
|
|
4953
4965
|
load: je,
|
|
4954
|
-
size: Le(
|
|
4955
|
-
onSelect:
|
|
4966
|
+
size: Le(v),
|
|
4967
|
+
onSelect: oe,
|
|
4956
4968
|
onSelectAll: f,
|
|
4957
|
-
onExpandChange:
|
|
4958
|
-
treeProps: Le(
|
|
4969
|
+
onExpandChange: z,
|
|
4970
|
+
treeProps: Le(h),
|
|
4959
4971
|
"span-method": o.value
|
|
4960
4972
|
}), Je({
|
|
4961
4973
|
default: x(() => [
|
|
4962
|
-
|
|
4974
|
+
Y.type === "selection" ? (g(), O(Te, {
|
|
4963
4975
|
key: 0,
|
|
4964
4976
|
type: "selection",
|
|
4965
4977
|
fixed: "left",
|
|
4966
4978
|
width: "55px",
|
|
4967
|
-
selectable:
|
|
4979
|
+
selectable: A.value,
|
|
4968
4980
|
"header-align": "center",
|
|
4969
4981
|
align: "center"
|
|
4970
4982
|
}, null, 8, ["selectable"])) : V("", !0),
|
|
4971
|
-
|
|
4983
|
+
Y.isIndex ? (g(), O(Te, {
|
|
4972
4984
|
key: 1,
|
|
4973
4985
|
type: "index",
|
|
4974
4986
|
width: "60",
|
|
4975
4987
|
fixed: "left",
|
|
4976
4988
|
label: "序号",
|
|
4977
|
-
headerAlign:
|
|
4989
|
+
headerAlign: Y.headerAlign
|
|
4978
4990
|
}, null, 8, ["headerAlign"])) : V("", !0),
|
|
4979
|
-
Ue().firstColumn ? me(
|
|
4980
|
-
(g(!0),
|
|
4991
|
+
Ue().firstColumn ? me(Y.$slots, "firstColumn", { key: 2 }) : V("", !0),
|
|
4992
|
+
(g(!0), w(q, null, ce(j.value, (Be, We) => (g(), O(Ii, {
|
|
4981
4993
|
key: We,
|
|
4982
4994
|
item: Be,
|
|
4983
|
-
size: Le(
|
|
4995
|
+
size: Le(v)
|
|
4984
4996
|
}, null, 8, ["item", "size"]))), 128))
|
|
4985
4997
|
]),
|
|
4986
4998
|
_: 2
|
|
4987
4999
|
}, [
|
|
4988
|
-
!
|
|
5000
|
+
!y.value && b.value === 2 ? {
|
|
4989
5001
|
name: "empty",
|
|
4990
5002
|
fn: x(() => [
|
|
4991
|
-
|
|
5003
|
+
Y.isEmptyImg ? (g(), O(ie, {
|
|
4992
5004
|
key: 0,
|
|
4993
|
-
description:
|
|
4994
|
-
}, null, 8, ["description"])) : (g(),
|
|
5005
|
+
description: Y.nullText
|
|
5006
|
+
}, null, 8, ["description"])) : (g(), w("span", Ti, de(Y.nullText), 1))
|
|
4995
5007
|
]),
|
|
4996
5008
|
key: "0"
|
|
4997
5009
|
} : void 0,
|
|
4998
|
-
($e =
|
|
5010
|
+
($e = Y.tableConfig.summaryConf) != null && $e.prop ? {
|
|
4999
5011
|
name: "append",
|
|
5000
5012
|
fn: x(() => {
|
|
5001
5013
|
var Be;
|
|
5002
5014
|
return [
|
|
5003
|
-
B.value && B.value.length > 0 ? (g(),
|
|
5015
|
+
B.value && B.value.length > 0 ? (g(), w("div", {
|
|
5004
5016
|
key: 0,
|
|
5005
|
-
style: Se((Be =
|
|
5017
|
+
style: Se((Be = Y.tableConfig.summaryConf) == null ? void 0 : Be.hstyle),
|
|
5006
5018
|
class: "summary-row"
|
|
5007
5019
|
}, [
|
|
5008
|
-
(g(!0),
|
|
5020
|
+
(g(!0), w(q, null, ce(B.value, (We, yt) => (g(), w("div", {
|
|
5009
5021
|
class: "summary-item",
|
|
5010
5022
|
key: yt
|
|
5011
5023
|
}, [
|
|
@@ -5019,22 +5031,22 @@ const vi = /* @__PURE__ */ Ie(Di, [["__scopeId", "data-v-7550a821"]]), Yi = {
|
|
|
5019
5031
|
} : void 0
|
|
5020
5032
|
]), 1040, ["maxHeight", "class", "data", "row-key", "size", "treeProps", "span-method"]))
|
|
5021
5033
|
])), [
|
|
5022
|
-
[Ye,
|
|
5034
|
+
[Ye, y.value]
|
|
5023
5035
|
]),
|
|
5024
|
-
|
|
5036
|
+
Y.isPager || Y.tableConfig.statistic ? (g(), w("div", bi, [
|
|
5025
5037
|
K(be, {
|
|
5026
5038
|
class: "page-info",
|
|
5027
5039
|
small: "",
|
|
5028
5040
|
onSizeChange: Ve,
|
|
5029
5041
|
onCurrentChange: Me,
|
|
5030
|
-
"current-page": +
|
|
5031
|
-
"page-sizes":
|
|
5032
|
-
"page-size":
|
|
5042
|
+
"current-page": +D.current,
|
|
5043
|
+
"page-sizes": Y.pageSizes || [5, 10, 20, 50, 100],
|
|
5044
|
+
"page-size": D.size,
|
|
5033
5045
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
5034
|
-
total:
|
|
5046
|
+
total: D.total
|
|
5035
5047
|
}, null, 8, ["current-page", "page-sizes", "page-size", "total"])
|
|
5036
5048
|
])) : V("", !0),
|
|
5037
|
-
me(
|
|
5049
|
+
me(Y.$slots, "bottom")
|
|
5038
5050
|
]);
|
|
5039
5051
|
};
|
|
5040
5052
|
}
|
|
@@ -5708,30 +5720,30 @@ function Vt(e, t, l, n, r, c) {
|
|
|
5708
5720
|
if (a = Ld(e), !u)
|
|
5709
5721
|
return Dc(e, a);
|
|
5710
5722
|
} else {
|
|
5711
|
-
var
|
|
5723
|
+
var d = cl(e), N = d == wn || d == Df;
|
|
5712
5724
|
if (gn(e))
|
|
5713
5725
|
return id(e, u);
|
|
5714
|
-
if (
|
|
5715
|
-
if (a = i ||
|
|
5726
|
+
if (d == Tn || d == An || N && !r) {
|
|
5727
|
+
if (a = i || N ? {} : nf(e), !u)
|
|
5716
5728
|
return i ? jd(e, ud(a, e)) : pd(e, sd(a, e));
|
|
5717
5729
|
} else {
|
|
5718
|
-
if (!Ae[
|
|
5730
|
+
if (!Ae[d])
|
|
5719
5731
|
return r ? e : {};
|
|
5720
|
-
a = af(e,
|
|
5732
|
+
a = af(e, d, u);
|
|
5721
5733
|
}
|
|
5722
5734
|
}
|
|
5723
5735
|
c || (c = new At());
|
|
5724
|
-
var
|
|
5725
|
-
if (
|
|
5726
|
-
return
|
|
5727
|
-
c.set(e, a), ff(e) ? e.forEach(function(
|
|
5728
|
-
a.add(Vt(
|
|
5729
|
-
}) : rf(e) && e.forEach(function(
|
|
5730
|
-
a.set(
|
|
5736
|
+
var m = c.get(e);
|
|
5737
|
+
if (m)
|
|
5738
|
+
return m;
|
|
5739
|
+
c.set(e, a), ff(e) ? e.forEach(function(E) {
|
|
5740
|
+
a.add(Vt(E, t, l, E, e, c));
|
|
5741
|
+
}) : rf(e) && e.forEach(function(E, M) {
|
|
5742
|
+
a.set(M, Vt(E, t, l, M, e, c));
|
|
5731
5743
|
});
|
|
5732
|
-
var
|
|
5733
|
-
return Yc(
|
|
5734
|
-
|
|
5744
|
+
var A = o ? i ? zd : yd : i ? rl : ul, S = s ? void 0 : A(e);
|
|
5745
|
+
return Yc(S || e, function(E, M) {
|
|
5746
|
+
S && (M = E, E = e[M]), Mn(a, M, Vt(E, t, l, M, e, c));
|
|
5735
5747
|
}), a;
|
|
5736
5748
|
}
|
|
5737
5749
|
var Pf = 1, Qf = 4;
|
|
@@ -5744,51 +5756,51 @@ var Ff = function() {
|
|
|
5744
5756
|
const Wt = Ff;
|
|
5745
5757
|
var $f = "Expected a function", Rf = Math.max, Gf = Math.min;
|
|
5746
5758
|
function Zf(e, t, l) {
|
|
5747
|
-
var n, r, c, a, u, i, o = 0, s = !1,
|
|
5759
|
+
var n, r, c, a, u, i, o = 0, s = !1, d = !1, N = !0;
|
|
5748
5760
|
if (typeof e != "function")
|
|
5749
5761
|
throw new TypeError($f);
|
|
5750
|
-
t = kl(t) || 0, rt(l) && (s = !!l.leading,
|
|
5751
|
-
function
|
|
5752
|
-
var
|
|
5753
|
-
return n = r = void 0, o =
|
|
5762
|
+
t = kl(t) || 0, rt(l) && (s = !!l.leading, d = "maxWait" in l, c = d ? Rf(kl(l.maxWait) || 0, t) : c, N = "trailing" in l ? !!l.trailing : N);
|
|
5763
|
+
function m(I) {
|
|
5764
|
+
var b = n, P = r;
|
|
5765
|
+
return n = r = void 0, o = I, a = e.apply(P, b), a;
|
|
5754
5766
|
}
|
|
5755
|
-
function
|
|
5756
|
-
return o =
|
|
5767
|
+
function A(I) {
|
|
5768
|
+
return o = I, u = setTimeout(M, t), s ? m(I) : a;
|
|
5757
5769
|
}
|
|
5758
|
-
function
|
|
5759
|
-
var
|
|
5760
|
-
return
|
|
5770
|
+
function S(I) {
|
|
5771
|
+
var b = I - i, P = I - o, Z = t - b;
|
|
5772
|
+
return d ? Gf(Z, c - P) : Z;
|
|
5761
5773
|
}
|
|
5762
|
-
function
|
|
5763
|
-
var
|
|
5764
|
-
return i === void 0 ||
|
|
5774
|
+
function E(I) {
|
|
5775
|
+
var b = I - i, P = I - o;
|
|
5776
|
+
return i === void 0 || b >= t || b < 0 || d && P >= c;
|
|
5765
5777
|
}
|
|
5766
|
-
function
|
|
5767
|
-
var
|
|
5768
|
-
if (
|
|
5769
|
-
return
|
|
5770
|
-
u = setTimeout(
|
|
5778
|
+
function M() {
|
|
5779
|
+
var I = Wt();
|
|
5780
|
+
if (E(I))
|
|
5781
|
+
return _(I);
|
|
5782
|
+
u = setTimeout(M, S(I));
|
|
5771
5783
|
}
|
|
5772
|
-
function
|
|
5773
|
-
return u = void 0,
|
|
5784
|
+
function _(I) {
|
|
5785
|
+
return u = void 0, N && n ? m(I) : (n = r = void 0, a);
|
|
5774
5786
|
}
|
|
5775
|
-
function
|
|
5787
|
+
function v() {
|
|
5776
5788
|
u !== void 0 && clearTimeout(u), o = 0, n = i = r = u = void 0;
|
|
5777
5789
|
}
|
|
5778
|
-
function
|
|
5779
|
-
return u === void 0 ? a :
|
|
5790
|
+
function y() {
|
|
5791
|
+
return u === void 0 ? a : _(Wt());
|
|
5780
5792
|
}
|
|
5781
|
-
function
|
|
5782
|
-
var
|
|
5783
|
-
if (n = arguments, r = this, i =
|
|
5793
|
+
function T() {
|
|
5794
|
+
var I = Wt(), b = E(I);
|
|
5795
|
+
if (n = arguments, r = this, i = I, b) {
|
|
5784
5796
|
if (u === void 0)
|
|
5785
|
-
return
|
|
5786
|
-
if (
|
|
5787
|
-
return clearTimeout(u), u = setTimeout(
|
|
5797
|
+
return A(i);
|
|
5798
|
+
if (d)
|
|
5799
|
+
return clearTimeout(u), u = setTimeout(M, t), m(i);
|
|
5788
5800
|
}
|
|
5789
|
-
return u === void 0 && (u = setTimeout(
|
|
5801
|
+
return u === void 0 && (u = setTimeout(M, t)), a;
|
|
5790
5802
|
}
|
|
5791
|
-
return
|
|
5803
|
+
return T.cancel = v, T.flush = y, T;
|
|
5792
5804
|
}
|
|
5793
5805
|
const Hf = {
|
|
5794
5806
|
install: (e, t, l, n) => {
|