yc-vep-ui 0.2.1 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Filter/type.d.ts +1 -0
- package/dist/components/utils/index.d.ts +3 -7
- package/dist/directives/card/index.d.ts +2 -0
- package/dist/directives/index.d.ts +2 -0
- package/dist/directives/sticky/index.d.ts +17 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useFetch.d.ts +37 -0
- package/dist/hooks/useTable/common.d.ts +3 -0
- package/dist/hooks/useTable/default.d.ts +4 -0
- package/dist/hooks/useTable/index.d.ts +3 -0
- package/dist/{yc-vep-ui.css → index.css} +6 -6
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/request.d.ts +9 -0
- package/dist/vep-ui.es.js +689 -444
- package/dist/vep-ui.umd.js +1 -1
- package/package.json +14 -10
package/dist/vep-ui.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createPropsRestProxy as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, getCurrentInstance as d, h as f,
|
|
2
|
-
import { AiEditor as
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createPropsRestProxy as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, getCurrentInstance as d, h as f, isRef as p, mergeModels as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeStyle as v, onMounted as y, onUnmounted as b, openBlock as x, reactive as S, ref as C, renderList as w, renderSlot as T, resolveComponent as E, resolveDirective as D, resolveDynamicComponent as O, setBlockTracking as k, shallowRef as A, toDisplayString as j, toRaw as M, toValue as N, unref as P, useAttrs as F, useCssVars as ee, useModel as te, watch as I, watchEffect as L, withCtx as R, withDirectives as ne, withKeys as re, withModifiers as ie } from "vue";
|
|
2
|
+
import { AiEditor as ae } from "aieditor";
|
|
3
3
|
//#region \0rolldown/runtime.js
|
|
4
|
-
var
|
|
4
|
+
var z = Object.defineProperty, B = (e, t) => {
|
|
5
5
|
let n = {};
|
|
6
|
-
for (var r in e)
|
|
6
|
+
for (var r in e) z(n, r, {
|
|
7
7
|
get: e[r],
|
|
8
8
|
enumerable: !0
|
|
9
9
|
});
|
|
10
|
-
return t ||
|
|
11
|
-
},
|
|
10
|
+
return t || z(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
11
|
+
}, oe = { class: /* @__PURE__ */ _({ bodyClass: !0 }) }, se = /* @__PURE__ */ u({
|
|
12
12
|
__name: "index",
|
|
13
13
|
props: {
|
|
14
14
|
title: {},
|
|
@@ -24,19 +24,19 @@ var R = Object.defineProperty, z = (e, t) => {
|
|
|
24
24
|
borderBottom: e.hideBorder ? "1px solid #e5e7eb" : "none"
|
|
25
25
|
}));
|
|
26
26
|
return (t, o) => {
|
|
27
|
-
let l =
|
|
28
|
-
return
|
|
27
|
+
let l = E("el-icon"), u = E("el-card");
|
|
28
|
+
return x(), n(u, h(t.$attrs, { class: {
|
|
29
29
|
"ui-card": !0,
|
|
30
30
|
hideBorder: e.hideBorder
|
|
31
31
|
} }), s({
|
|
32
|
-
default:
|
|
32
|
+
default: R(() => [a("div", oe, [T(t.$slots, "default", {}, void 0, !0)])]),
|
|
33
33
|
_: 2
|
|
34
34
|
}, [e.title && e.title?.length > 0 ? {
|
|
35
35
|
name: "header",
|
|
36
|
-
fn:
|
|
37
|
-
default:
|
|
36
|
+
fn: R(() => [a("div", { style: v(i.value) }, [e.icon ? (x(), n(l, { key: 0 }, {
|
|
37
|
+
default: R(() => [(x(), n(O(e.icon), { color: "#2563eb" }))]),
|
|
38
38
|
_: 1
|
|
39
|
-
})) : r("", !0), o[0] || (
|
|
39
|
+
})) : r("", !0), o[0] || (k(-1, !0), (o[0] = a("h4", null, [c(j(e.title), 1)])).cacheIndex = 0, k(1), o[0])], 4)]),
|
|
40
40
|
key: "0"
|
|
41
41
|
} : void 0]), 1040, ["class"]);
|
|
42
42
|
};
|
|
@@ -45,7 +45,7 @@ var R = Object.defineProperty, z = (e, t) => {
|
|
|
45
45
|
let n = e.__vccOpts || e;
|
|
46
46
|
for (let [e, r] of t) n[e] = r;
|
|
47
47
|
return n;
|
|
48
|
-
},
|
|
48
|
+
}, ce = /* @__PURE__ */ B({ default: () => le }), le = /* @__PURE__ */ V(se, [["__scopeId", "data-v-6ebb01d7"]]), H = {
|
|
49
49
|
get Button() {
|
|
50
50
|
return $()?.resolveComponent?.("el-button") || "el-button";
|
|
51
51
|
},
|
|
@@ -146,7 +146,7 @@ function U() {
|
|
|
146
146
|
return console.warn("[yc-vep-ui] Vue not initialized. Call setHostVue(Vue) before using components."), null;
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function ue(e) {
|
|
150
150
|
let t = U();
|
|
151
151
|
return t ? t("div", { style: {
|
|
152
152
|
display: "flex",
|
|
@@ -163,7 +163,7 @@ function se(e) {
|
|
|
163
163
|
}, () => n);
|
|
164
164
|
})) : null;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function de(e) {
|
|
167
167
|
let t = U();
|
|
168
168
|
return t ? Array.isArray(e) ? t("div", { style: {
|
|
169
169
|
display: "flex",
|
|
@@ -184,7 +184,7 @@ function ce(e) {
|
|
|
184
184
|
type: e.type || "primary"
|
|
185
185
|
}, () => e.prop)) : null;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function fe(e) {
|
|
188
188
|
let t = U();
|
|
189
189
|
return t ? t("div", { style: {
|
|
190
190
|
display: "flex",
|
|
@@ -193,11 +193,11 @@ function le(e) {
|
|
|
193
193
|
flexWrap: "wrap"
|
|
194
194
|
} }, (Array.isArray(e.prop) ? e.prop : [e.prop]).map((n) => t(H.Tag, e, () => n))) : null;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function pe(e) {
|
|
197
197
|
let t = U();
|
|
198
198
|
return t ? t(H.Tag, { ...e }) : null;
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function me(e) {
|
|
201
201
|
let t = U();
|
|
202
202
|
return t ? t(H.Select, {
|
|
203
203
|
style: { minWidth: "160px" },
|
|
@@ -206,7 +206,7 @@ function de(e) {
|
|
|
206
206
|
filterable: !0
|
|
207
207
|
}) : null;
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function he(e) {
|
|
210
210
|
let t = U();
|
|
211
211
|
if (!t) return null;
|
|
212
212
|
let n = e?.type === "datetime" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
@@ -220,7 +220,7 @@ function fe(e) {
|
|
|
220
220
|
"onUpdate:modelValue": (t) => e?.onChange?.(t)
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function ge(e) {
|
|
224
224
|
let t = U();
|
|
225
225
|
if (!t) return null;
|
|
226
226
|
let { start: n = "00:00", end: r = "23:30", ...i } = e;
|
|
@@ -232,14 +232,14 @@ function pe(e) {
|
|
|
232
232
|
filterable: !0
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function _e(e) {
|
|
236
236
|
let t = U();
|
|
237
237
|
return t ? t(H.Input, {
|
|
238
238
|
...e,
|
|
239
239
|
placeholder: "请输入"
|
|
240
240
|
}) : null;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function ve(e) {
|
|
243
243
|
let t = U();
|
|
244
244
|
if (!t) return null;
|
|
245
245
|
let { align: n = "left", controlsPosition: r = "right", ...i } = e, a = {
|
|
@@ -254,7 +254,7 @@ function he(e) {
|
|
|
254
254
|
...i
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function ye(e) {
|
|
258
258
|
let t = U();
|
|
259
259
|
if (!t) return null;
|
|
260
260
|
let { rows: n = 1, ...r } = e;
|
|
@@ -265,7 +265,7 @@ function ge(e) {
|
|
|
265
265
|
type: "textarea"
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function be(e) {
|
|
269
269
|
let t = U();
|
|
270
270
|
return t ? t(H.InputTag, {
|
|
271
271
|
placeholder: "请输入",
|
|
@@ -273,52 +273,52 @@ function _e(e) {
|
|
|
273
273
|
clearable: !1
|
|
274
274
|
}) : null;
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function xe(e) {
|
|
277
277
|
let t = U();
|
|
278
|
-
return t ? t(
|
|
278
|
+
return t ? t(ht || mt, e) : null;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function Se(e) {
|
|
281
281
|
let t = U();
|
|
282
282
|
return t ? t(H.RadioGroup, e) : null;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function Ce(e) {
|
|
285
285
|
let t = U();
|
|
286
286
|
return t ? t(H.Text, e, () => e.prop) : null;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function we(e) {
|
|
289
289
|
let t = U();
|
|
290
|
-
return t ? t(
|
|
290
|
+
return t ? t(tn || en, {
|
|
291
291
|
placeholder: "请选择",
|
|
292
292
|
...e,
|
|
293
293
|
searchable: !0
|
|
294
294
|
}) : null;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function Te(e) {
|
|
297
297
|
let t = U();
|
|
298
|
-
return t ? t(
|
|
298
|
+
return t ? t(cn || sn, {
|
|
299
299
|
...e,
|
|
300
|
-
|
|
300
|
+
fileList: e.modelValue || e.fileList,
|
|
301
301
|
"onUpdate:fileList": (t, n) => e.onChange?.(n, t)
|
|
302
302
|
}) : null;
|
|
303
303
|
}
|
|
304
304
|
var W = {
|
|
305
|
-
button:
|
|
306
|
-
link:
|
|
307
|
-
tag:
|
|
308
|
-
switch:
|
|
309
|
-
select:
|
|
310
|
-
datePicker:
|
|
311
|
-
timeSelect:
|
|
312
|
-
input:
|
|
313
|
-
inputNumber:
|
|
314
|
-
textarea:
|
|
315
|
-
inputTag:
|
|
316
|
-
editor:
|
|
317
|
-
radio:
|
|
318
|
-
text:
|
|
319
|
-
staffSelect:
|
|
320
|
-
upload:
|
|
321
|
-
},
|
|
305
|
+
button: ue,
|
|
306
|
+
link: de,
|
|
307
|
+
tag: fe,
|
|
308
|
+
switch: pe,
|
|
309
|
+
select: me,
|
|
310
|
+
datePicker: he,
|
|
311
|
+
timeSelect: ge,
|
|
312
|
+
input: _e,
|
|
313
|
+
inputNumber: ve,
|
|
314
|
+
textarea: ye,
|
|
315
|
+
inputTag: be,
|
|
316
|
+
editor: xe,
|
|
317
|
+
radio: Se,
|
|
318
|
+
text: Ce,
|
|
319
|
+
staffSelect: we,
|
|
320
|
+
upload: Te
|
|
321
|
+
}, Ee = /* @__PURE__ */ u({
|
|
322
322
|
name: "UiColumn",
|
|
323
323
|
__name: "UiColumn",
|
|
324
324
|
props: {
|
|
@@ -357,13 +357,13 @@ var W = {
|
|
|
357
357
|
return i ? typeof i == "object" ? i : f("div", { innerHTML: String(i) }) : null;
|
|
358
358
|
}
|
|
359
359
|
return (r, a) => {
|
|
360
|
-
let l =
|
|
361
|
-
return t.column?.children && t.column?.children?.length > 0 ? (
|
|
360
|
+
let l = E("UiColumn", !0), u = E("el-table-column"), d = E("el-text");
|
|
361
|
+
return t.column?.children && t.column?.children?.length > 0 ? (x(), n(u, {
|
|
362
362
|
key: 0,
|
|
363
363
|
label: t.column.label,
|
|
364
364
|
align: o.align
|
|
365
365
|
}, {
|
|
366
|
-
default:
|
|
366
|
+
default: R(() => [(x(!0), i(e, null, w(t.column.children, (e) => (x(), n(l, h({
|
|
367
367
|
column: e,
|
|
368
368
|
data: o.data
|
|
369
369
|
}, { ref_for: !0 }, r.$attrs, { align: o.align }), null, 16, [
|
|
@@ -372,7 +372,7 @@ var W = {
|
|
|
372
372
|
"align"
|
|
373
373
|
]))), 256))]),
|
|
374
374
|
_: 1
|
|
375
|
-
}, 8, ["label", "align"])) : (
|
|
375
|
+
}, 8, ["label", "align"])) : (x(), n(u, {
|
|
376
376
|
key: 1,
|
|
377
377
|
prop: String(t.column.prop),
|
|
378
378
|
label: t.column.label,
|
|
@@ -381,15 +381,15 @@ var W = {
|
|
|
381
381
|
width: t.column.width,
|
|
382
382
|
"show-overflow-tooltip": t.column.showOverflowTooltip
|
|
383
383
|
}, {
|
|
384
|
-
default:
|
|
384
|
+
default: R(({ row: e, $index: r }) => [t.column.render ? (x(), n(O(s(e, r, t.column)), {
|
|
385
385
|
key: 0,
|
|
386
386
|
align: o.align,
|
|
387
387
|
size: o.size
|
|
388
|
-
}, null, 8, ["align", "size"])) : (
|
|
388
|
+
}, null, 8, ["align", "size"])) : (x(), n(d, {
|
|
389
389
|
key: 1,
|
|
390
390
|
"line-clamp": t.column?.lineClamp || 2
|
|
391
391
|
}, {
|
|
392
|
-
default:
|
|
392
|
+
default: R(() => [c(j(e[t.column.prop]), 1)]),
|
|
393
393
|
_: 2
|
|
394
394
|
}, 1032, ["line-clamp"]))]),
|
|
395
395
|
_: 1
|
|
@@ -403,7 +403,7 @@ var W = {
|
|
|
403
403
|
]));
|
|
404
404
|
};
|
|
405
405
|
}
|
|
406
|
-
}),
|
|
406
|
+
}), De = /* @__PURE__ */ u({
|
|
407
407
|
__name: "index",
|
|
408
408
|
props: {
|
|
409
409
|
loading: {
|
|
@@ -415,14 +415,14 @@ var W = {
|
|
|
415
415
|
default: !1
|
|
416
416
|
},
|
|
417
417
|
size: { default: "default" },
|
|
418
|
-
data: { default: () =>
|
|
418
|
+
data: { default: () => S([]) },
|
|
419
419
|
columns: {},
|
|
420
420
|
align: { default: "left" },
|
|
421
421
|
hidePagination: {
|
|
422
422
|
type: Boolean,
|
|
423
423
|
default: !1
|
|
424
424
|
},
|
|
425
|
-
pagination: { default: () =>
|
|
425
|
+
pagination: { default: () => S({
|
|
426
426
|
page: 1,
|
|
427
427
|
pageSize: 10,
|
|
428
428
|
total: 0,
|
|
@@ -448,16 +448,16 @@ var W = {
|
|
|
448
448
|
"pagination",
|
|
449
449
|
"data",
|
|
450
450
|
"size"
|
|
451
|
-
]), u =
|
|
452
|
-
|
|
453
|
-
!e?.length || !t?.length ||
|
|
451
|
+
]), u = C(), d = t(() => N(l.columns)?.some((e) => e.type === "index")), f = t(() => N(l.columns)?.some((e) => e.type === "selection")), p = t(() => !l.columns || !l.columns.length ? [] : l.columns.filter((e) => e.type !== "index" && e.type !== "selection"));
|
|
452
|
+
I(() => [l.defaultCheckedKeys, a.data], ([e, t]) => {
|
|
453
|
+
!e?.length || !t?.length || g(() => {
|
|
454
454
|
if (!u.value) return;
|
|
455
455
|
let n = t.filter((t) => e.includes(t.id));
|
|
456
456
|
u.value.clearSelection(), n.forEach((e) => u.value?.toggleRowSelection(e, !0));
|
|
457
457
|
});
|
|
458
458
|
}, { immediate: !0 });
|
|
459
|
-
function
|
|
460
|
-
a.pagination.page = e || a.pagination.page, a.pagination.pageSize = t || a.pagination.pageSize, c("pagination",
|
|
459
|
+
function m(e, t) {
|
|
460
|
+
a.pagination.page = e || a.pagination.page, a.pagination.pageSize = t || a.pagination.pageSize, c("pagination", N(a.pagination));
|
|
461
461
|
}
|
|
462
462
|
function _(e, t, n) {
|
|
463
463
|
a.data[e] && (a.data[e] = {
|
|
@@ -466,9 +466,9 @@ var W = {
|
|
|
466
466
|
});
|
|
467
467
|
}
|
|
468
468
|
return (t, o) => {
|
|
469
|
-
let s =
|
|
470
|
-
return
|
|
471
|
-
|
|
469
|
+
let s = E("el-table-column"), c = E("el-table"), g = E("el-pagination"), v = D("loading");
|
|
470
|
+
return x(), i("div", null, [
|
|
471
|
+
ne((x(), n(c, h({ border: a.border }, t.$attrs, {
|
|
472
472
|
data: a.data,
|
|
473
473
|
lazy: !0,
|
|
474
474
|
class: "ui-table",
|
|
@@ -476,8 +476,8 @@ var W = {
|
|
|
476
476
|
ref_key: "tableRef",
|
|
477
477
|
ref: u
|
|
478
478
|
}), {
|
|
479
|
-
default:
|
|
480
|
-
f.value ? (
|
|
479
|
+
default: R(() => [
|
|
480
|
+
f.value ? (x(), n(s, {
|
|
481
481
|
key: 0,
|
|
482
482
|
type: "selection",
|
|
483
483
|
selectable: l.selectable,
|
|
@@ -485,7 +485,7 @@ var W = {
|
|
|
485
485
|
align: a.align,
|
|
486
486
|
fixed: "left"
|
|
487
487
|
}, null, 8, ["selectable", "align"])) : r("", !0),
|
|
488
|
-
d.value ? (
|
|
488
|
+
d.value ? (x(), n(s, {
|
|
489
489
|
key: 1,
|
|
490
490
|
fixed: "left",
|
|
491
491
|
type: "index",
|
|
@@ -494,7 +494,7 @@ var W = {
|
|
|
494
494
|
"column-key": "index_1",
|
|
495
495
|
align: a.align
|
|
496
496
|
}, null, 8, ["align"])) : r("", !0),
|
|
497
|
-
(
|
|
497
|
+
(x(!0), i(e, null, w(p.value, (e, t) => (x(), n(Ee, {
|
|
498
498
|
key: t + "column_" + e?.prop?.toString(),
|
|
499
499
|
column: e,
|
|
500
500
|
data: a.data,
|
|
@@ -510,7 +510,7 @@ var W = {
|
|
|
510
510
|
]),
|
|
511
511
|
_: 1
|
|
512
512
|
}, 16, ["border", "data"])), [[v, a.loading]]),
|
|
513
|
-
a.hidePagination ? r("", !0) : (
|
|
513
|
+
a.hidePagination ? r("", !0) : (x(), n(g, {
|
|
514
514
|
key: 0,
|
|
515
515
|
class: "ui-pagination",
|
|
516
516
|
size: "small",
|
|
@@ -527,18 +527,18 @@ var W = {
|
|
|
527
527
|
"onUpdate:currentPage": o[1] ||= (e) => a.pagination.page = e,
|
|
528
528
|
total: a.pagination.total,
|
|
529
529
|
"onUpdate:total": o[2] ||= (e) => a.pagination.total = e,
|
|
530
|
-
onChange:
|
|
530
|
+
onChange: m
|
|
531
531
|
}, null, 8, [
|
|
532
532
|
"page-sizes",
|
|
533
533
|
"page-size",
|
|
534
534
|
"current-page",
|
|
535
535
|
"total"
|
|
536
536
|
])),
|
|
537
|
-
|
|
537
|
+
T(t.$slots, "default", {}, void 0, !0)
|
|
538
538
|
]);
|
|
539
539
|
};
|
|
540
540
|
}
|
|
541
|
-
}),
|
|
541
|
+
}), Oe = /* @__PURE__ */ B({ default: () => ke }), ke = /* @__PURE__ */ V(De, [["__scopeId", "data-v-adf869c1"]]), Ae = ["src"], je = /* @__PURE__ */ u({
|
|
542
542
|
__name: "Icon",
|
|
543
543
|
props: {
|
|
544
544
|
name: {},
|
|
@@ -546,19 +546,19 @@ var W = {
|
|
|
546
546
|
size: {}
|
|
547
547
|
},
|
|
548
548
|
setup(e) {
|
|
549
|
-
return (t, a) => e.name ? (
|
|
549
|
+
return (t, a) => e.name ? (x(), n(O(t.$attrs.component || e.name), h({ key: 0 }, t.$attrs, { style: {
|
|
550
550
|
width: "100%",
|
|
551
551
|
height: "100%"
|
|
552
|
-
} }), null, 16)) : e.url ? (
|
|
552
|
+
} }), null, 16)) : e.url ? (x(), i("img", {
|
|
553
553
|
key: 1,
|
|
554
554
|
src: e.url,
|
|
555
|
-
style:
|
|
555
|
+
style: v({
|
|
556
556
|
width: e.size,
|
|
557
557
|
height: e.size
|
|
558
558
|
})
|
|
559
|
-
}, null, 12,
|
|
559
|
+
}, null, 12, Ae)) : r("", !0);
|
|
560
560
|
}
|
|
561
|
-
}),
|
|
561
|
+
}), Me = {
|
|
562
562
|
style: {
|
|
563
563
|
width: "100%",
|
|
564
564
|
height: "100%"
|
|
@@ -572,27 +572,27 @@ var W = {
|
|
|
572
572
|
}, G = /* @__PURE__ */ u({
|
|
573
573
|
__name: "Search",
|
|
574
574
|
setup(e) {
|
|
575
|
-
return (e, t) => (
|
|
575
|
+
return (e, t) => (x(), i("svg", Me, [...t[0] ||= [a("path", {
|
|
576
576
|
d: "M896 870.4l-128-128c55.467-68.267 89.6-149.333 89.6-238.933 0-98.134-38.4-192-110.933-264.534-149.334-149.333-384-149.333-533.334-4.266-145.066 145.066-145.066 384 0 529.066 72.534 72.534 166.4 110.934 264.534 110.934 89.6 0 174.933-29.867 238.933-89.6l128 128c4.267 4.266 12.8 8.533 21.333 8.533s17.067-4.267 21.334-8.533c17.066-8.534 17.066-29.867 8.533-42.667zM260.267 721.067c-119.467-123.734-119.467-320 0-439.467 59.733-59.733 140.8-89.6 217.6-89.6 81.066 0 157.866 29.867 217.6 89.6 59.733 59.733 89.6 136.533 89.6 217.6 0 81.067-34.134 162.133-89.6 217.6-55.467 59.733-132.267 93.867-217.6 93.867-81.067 0-157.867-34.134-217.6-89.6z",
|
|
577
577
|
"p-id": "8980"
|
|
578
578
|
}, null, -1)]]));
|
|
579
579
|
}
|
|
580
|
-
}),
|
|
580
|
+
}), Ne = {
|
|
581
581
|
style: {
|
|
582
582
|
width: "100%",
|
|
583
583
|
height: "100%"
|
|
584
584
|
},
|
|
585
585
|
viewBox: "0 0 1024 1024",
|
|
586
586
|
xmlns: "http://www.w3.org/2000/svg"
|
|
587
|
-
},
|
|
587
|
+
}, Pe = /* @__PURE__ */ u({
|
|
588
588
|
__name: "CloseBold",
|
|
589
589
|
setup(e) {
|
|
590
|
-
return (e, t) => (
|
|
590
|
+
return (e, t) => (x(), i("svg", Ne, [...t[0] ||= [a("path", {
|
|
591
591
|
d: "M512 476.25l256-256 33.75 33.75-256 256 256 256-33.75 33.75-256-256-256 256-33.75-33.75 256-256-256-256L256 220.25l256 256z",
|
|
592
592
|
fill: "currentColor"
|
|
593
593
|
}, null, -1)]]));
|
|
594
594
|
}
|
|
595
|
-
}),
|
|
595
|
+
}), Fe = {
|
|
596
596
|
style: {
|
|
597
597
|
width: "100%",
|
|
598
598
|
height: "100%"
|
|
@@ -606,7 +606,7 @@ var W = {
|
|
|
606
606
|
}, K = /* @__PURE__ */ u({
|
|
607
607
|
__name: "User",
|
|
608
608
|
setup(e) {
|
|
609
|
-
return (e, t) => (
|
|
609
|
+
return (e, t) => (x(), i("svg", Fe, [...t[0] ||= [a("path", {
|
|
610
610
|
d: "M512 512c141.385 0 256-114.615 256-256S653.385 0 512 0 256 114.615 256 256s114.615 256 256 256zM366.336 110.336C405.244 71.428 456.976 50 512 50s106.756 21.428 145.664 60.336S718 200.976 718 256s-21.428 106.756-60.336 145.664S567.024 462 512 462s-106.756-21.428-145.664-60.336S306 311.024 306 256s21.428-106.756 60.336-145.664z",
|
|
611
611
|
fill: "#999999",
|
|
612
612
|
"p-id": "10093"
|
|
@@ -616,7 +616,7 @@ var W = {
|
|
|
616
616
|
"p-id": "10094"
|
|
617
617
|
}, null, -1)]]));
|
|
618
618
|
}
|
|
619
|
-
}),
|
|
619
|
+
}), Ie = {
|
|
620
620
|
style: {
|
|
621
621
|
width: "100%",
|
|
622
622
|
height: "100%"
|
|
@@ -627,16 +627,16 @@ var W = {
|
|
|
627
627
|
version: "1.1",
|
|
628
628
|
xmlns: "http://www.w3.org/2000/svg",
|
|
629
629
|
"p-id": "11055"
|
|
630
|
-
},
|
|
630
|
+
}, Le = /* @__PURE__ */ u({
|
|
631
631
|
__name: "Plus",
|
|
632
632
|
setup(e) {
|
|
633
|
-
return (e, t) => (
|
|
633
|
+
return (e, t) => (x(), i("svg", Ie, [...t[0] ||= [a("path", {
|
|
634
634
|
d: "M489.244444 489.244444v295.822223c0 18.850702-15.282631 34.133333-34.133333 34.133333s-34.133333-15.282631-34.133333-34.133333v-295.822223h-295.822222c-18.850702 0-34.133333-15.282631-34.133334-34.133333s15.282631-34.133333 34.133334-34.133333h295.822222v-295.822222c0-18.850702 15.282631-34.133333 34.133333-34.133334s34.133333 15.282631 34.133333 34.133334v295.822222h295.822223c18.850702 0 34.133333 15.282631 34.133333 34.133333s-15.282631 34.133333-34.133333 34.133333h-295.822223z",
|
|
635
635
|
fill: "#323233",
|
|
636
636
|
"p-id": "11056"
|
|
637
637
|
}, null, -1)]]));
|
|
638
638
|
}
|
|
639
|
-
}),
|
|
639
|
+
}), Re = {}, ze = {
|
|
640
640
|
style: {
|
|
641
641
|
width: "100%",
|
|
642
642
|
height: "100%"
|
|
@@ -648,14 +648,14 @@ var W = {
|
|
|
648
648
|
xmlns: "http://www.w3.org/2000/svg",
|
|
649
649
|
"p-id": "4859"
|
|
650
650
|
};
|
|
651
|
-
function
|
|
652
|
-
return
|
|
651
|
+
function Be(e, t) {
|
|
652
|
+
return x(), i("svg", ze, [...t[0] ||= [a("path", {
|
|
653
653
|
d: "M731.733333 480l-384-341.333333c-17.066667-14.933333-44.8-14.933333-59.733333 4.266666-14.933333 17.066667-14.933333 44.8 4.266667 59.733334L640 512 292.266667 821.333333c-17.066667 14.933333-19.2 42.666667-4.266667 59.733334 8.533333 8.533333 19.2 14.933333 32 14.933333 10.666667 0 19.2-4.266667 27.733333-10.666667l384-341.333333c8.533333-8.533333 14.933333-19.2 14.933334-32s-4.266667-23.466667-14.933334-32z",
|
|
654
654
|
fill: "#666666",
|
|
655
655
|
"p-id": "4860"
|
|
656
656
|
}, null, -1)]]);
|
|
657
657
|
}
|
|
658
|
-
var
|
|
658
|
+
var Ve = /* @__PURE__ */ V(Re, [["render", Be]]), He = {}, Ue = {
|
|
659
659
|
style: {
|
|
660
660
|
width: "100%",
|
|
661
661
|
height: "100%"
|
|
@@ -667,13 +667,13 @@ var Re = /* @__PURE__ */ V(Fe, [["render", Le]]), ze = {}, Be = {
|
|
|
667
667
|
xmlns: "http://www.w3.org/2000/svg",
|
|
668
668
|
"p-id": "6029"
|
|
669
669
|
};
|
|
670
|
-
function
|
|
671
|
-
return
|
|
670
|
+
function We(e, t) {
|
|
671
|
+
return x(), i("svg", Ue, [...t[0] ||= [a("path", {
|
|
672
672
|
d: "M897.96 728.3c-18.8 18.8-49.1 18.801-67.901 0l-318-318-318 318c-18.8 18.8-49.2 18.8-67.901 0-18.8-18.8-18.801-49.1 0-67.901l352-352c18.8-18.8 49.2-18.8 67.901 0l352 352c9.4 9.4 14 21.7 14 34-0.1 12.2-4.7 24.501-14.1 33.9z",
|
|
673
673
|
"p-id": "6030"
|
|
674
674
|
}, null, -1)]]);
|
|
675
675
|
}
|
|
676
|
-
var
|
|
676
|
+
var Ge = /* @__PURE__ */ V(He, [["render", We]]), Ke = {}, qe = {
|
|
677
677
|
style: {
|
|
678
678
|
width: "100%",
|
|
679
679
|
height: "100%"
|
|
@@ -685,8 +685,8 @@ var He = /* @__PURE__ */ V(ze, [["render", Ve]]), Ue = {}, We = {
|
|
|
685
685
|
xmlns: "http://www.w3.org/2000/svg",
|
|
686
686
|
"p-id": "6997"
|
|
687
687
|
};
|
|
688
|
-
function
|
|
689
|
-
return
|
|
688
|
+
function Je(e, t) {
|
|
689
|
+
return x(), i("svg", qe, [...t[0] ||= [a("path", {
|
|
690
690
|
d: "M512.34133333 931.38488889c-49.94844445 0-98.87288889-8.64711111-145.29422222-25.82755556-44.94222222-16.61155555-86.35733333-40.61866667-123.22133333-71.45244444-74.29688889-61.89511111-125.15555555-148.02488889-143.24622223-242.34666667l71.45244445-13.76711111c31.28888889 162.58844445 174.42133333 280.576 340.30933333 280.576 70.08711111 0 137.55733333-20.82133333 195.12888889-60.07466666 56.32-38.45688889 99.66933333-91.93244445 125.49688889-154.73777778l67.35644444 27.648c-31.28888889 76.00355555-83.74044445 140.74311111-151.77955555 187.16444444-69.85955555 47.67288889-151.43822222 72.81777778-236.20266667 72.81777778zM846.848 421.43288889C827.392 349.29777778 783.92888889 284.33066667 724.65066667 238.13688889c-61.21244445-47.55911111-134.59911111-72.704-212.30933334-72.704-69.97333333 0-137.44355555 20.70755555-194.90133333 59.96088889-56.32 38.57066667-99.78311111 91.93244445-125.61066667 154.624l-67.35644444-27.76177778c31.28888889-75.88977778 83.74044445-140.40177778 151.77955556-186.82311111 69.74577778-47.55911111 151.32444445-72.704 235.9751111-72.704 47.33155555 0 93.86666667 7.85066667 138.12622223 23.32444444 42.89422222 14.90488889 82.83022222 36.75022222 118.784 64.62577778 35.61244445 27.648 66.33244445 60.64355555 91.47733333 98.07644444 25.48622222 38.00177778 44.48711111 79.64444445 56.32 123.67644445l-70.08711111 19.00088889z",
|
|
691
691
|
"p-id": "6998"
|
|
692
692
|
}, null, -1), a("path", {
|
|
@@ -694,7 +694,7 @@ function Ge(e, t) {
|
|
|
694
694
|
"p-id": "6999"
|
|
695
695
|
}, null, -1)]]);
|
|
696
696
|
}
|
|
697
|
-
var q = /* @__PURE__ */ V(
|
|
697
|
+
var q = /* @__PURE__ */ V(Ke, [["render", Je]]), Ye = {}, Xe = {
|
|
698
698
|
style: {
|
|
699
699
|
width: "100%",
|
|
700
700
|
height: "100%"
|
|
@@ -706,32 +706,32 @@ var q = /* @__PURE__ */ V(Ue, [["render", Ge]]), Ke = {}, qe = {
|
|
|
706
706
|
xmlns: "http://www.w3.org/2000/svg",
|
|
707
707
|
"p-id": "9850"
|
|
708
708
|
};
|
|
709
|
-
function
|
|
710
|
-
return
|
|
709
|
+
function Ze(e, t) {
|
|
710
|
+
return x(), i("svg", Xe, [...t[0] ||= [a("path", {
|
|
711
711
|
d: "M64 448l832-320-128 704-446.016-243.008L832 192 243.008 544.96 64 448z m256 512v-303.04L512 768l-192 192z",
|
|
712
712
|
"p-id": "9851"
|
|
713
713
|
}, null, -1)]]);
|
|
714
714
|
}
|
|
715
|
-
var
|
|
716
|
-
ArrowRight: () =>
|
|
717
|
-
ArrowUp: () =>
|
|
718
|
-
CloseBold: () =>
|
|
719
|
-
Plus: () =>
|
|
720
|
-
Promotion: () =>
|
|
715
|
+
var Qe = /* @__PURE__ */ V(Ye, [["render", Ze]]), $e = /* @__PURE__ */ B({
|
|
716
|
+
ArrowRight: () => Ve,
|
|
717
|
+
ArrowUp: () => Ge,
|
|
718
|
+
CloseBold: () => Pe,
|
|
719
|
+
Plus: () => Le,
|
|
720
|
+
Promotion: () => Qe,
|
|
721
721
|
Refresh: () => q,
|
|
722
722
|
Search: () => G,
|
|
723
723
|
User: () => K,
|
|
724
|
-
YcIcon: () =>
|
|
724
|
+
YcIcon: () => je
|
|
725
725
|
});
|
|
726
726
|
//#endregion
|
|
727
727
|
//#region src/components/utils/tools.ts
|
|
728
|
-
function
|
|
728
|
+
function et(e) {
|
|
729
729
|
return typeof e == "number" ? e + "px" : e || "100px";
|
|
730
730
|
}
|
|
731
|
-
function
|
|
731
|
+
function tt(e) {
|
|
732
732
|
return typeof e == "number" ? e + "px" : e || "180px";
|
|
733
733
|
}
|
|
734
|
-
function
|
|
734
|
+
function J(e, t) {
|
|
735
735
|
let n = {};
|
|
736
736
|
return Object.keys(W).forEach((r) => {
|
|
737
737
|
let i = r;
|
|
@@ -747,11 +747,12 @@ function Y(e, t) {
|
|
|
747
747
|
});
|
|
748
748
|
}), ((n) => typeof e.render == "function" ? e.render({
|
|
749
749
|
h: n,
|
|
750
|
-
data: t
|
|
750
|
+
data: t,
|
|
751
|
+
modelValue: t[e.prop]
|
|
751
752
|
}) : n.input(n.props || {}))(n);
|
|
752
753
|
}
|
|
753
|
-
function
|
|
754
|
-
let n =
|
|
754
|
+
function Y(e, t) {
|
|
755
|
+
let n = J(e, t);
|
|
755
756
|
return typeof n == "object" ? n.type && typeof n.type == "object" ? {
|
|
756
757
|
component: n.type,
|
|
757
758
|
props: n.props
|
|
@@ -759,12 +760,12 @@ function X(e, t) {
|
|
|
759
760
|
}
|
|
760
761
|
//#endregion
|
|
761
762
|
//#region src/components/Filter/index.vue?vue&type=script&setup=true&lang.ts
|
|
762
|
-
var
|
|
763
|
+
var nt = { style: {
|
|
763
764
|
display: "flex",
|
|
764
765
|
"justify-content": "end",
|
|
765
766
|
"align-items": "center",
|
|
766
767
|
width: "100%"
|
|
767
|
-
} },
|
|
768
|
+
} }, rt = /* @__PURE__ */ u({
|
|
768
769
|
name: "UiDefaultFilter",
|
|
769
770
|
__name: "index",
|
|
770
771
|
props: {
|
|
@@ -794,21 +795,21 @@ var Qe = { style: {
|
|
|
794
795
|
"column",
|
|
795
796
|
"size",
|
|
796
797
|
"filterFixedValues"
|
|
797
|
-
]), p =
|
|
798
|
+
]), p = S({
|
|
798
799
|
expandNum: 0,
|
|
799
800
|
expand: !1
|
|
800
|
-
}),
|
|
801
|
-
|
|
801
|
+
}), m = S({}), g = t(() => s.fields.slice(0, p.expand ? s.fields.length : p.expandNum)), _ = t(() => 24 - g.value?.reduce((e, t) => e + (t.span || 24 / s.column), 0) % 24 - 24 / s.column);
|
|
802
|
+
y(() => {
|
|
802
803
|
p.expandNum = f?.expandNum ?? 2 * s.column - 1, s.fields.forEach((e) => {
|
|
803
|
-
let t =
|
|
804
|
-
t !== void 0 && (
|
|
804
|
+
let t = J(e, m)?.props?.defaultValue;
|
|
805
|
+
t !== void 0 && (m[e.prop] = t);
|
|
805
806
|
});
|
|
806
807
|
});
|
|
807
|
-
function
|
|
808
|
+
function b() {
|
|
808
809
|
let e = {};
|
|
809
|
-
Object.keys(
|
|
810
|
-
if (
|
|
811
|
-
let n =
|
|
810
|
+
Object.keys(m).forEach((t) => {
|
|
811
|
+
if (m[t] !== void 0) {
|
|
812
|
+
let n = N(m[t]);
|
|
812
813
|
e[t] = typeof n == "string" ? n.trim() : n;
|
|
813
814
|
}
|
|
814
815
|
}), d("submit", {
|
|
@@ -819,47 +820,47 @@ var Qe = { style: {
|
|
|
819
820
|
...s.filterFixedValues
|
|
820
821
|
});
|
|
821
822
|
}
|
|
822
|
-
function
|
|
823
|
-
Object.keys(
|
|
824
|
-
s.omitFields.includes(e) || (
|
|
825
|
-
}), d("reset",
|
|
823
|
+
function C() {
|
|
824
|
+
Object.keys(m).forEach((e) => {
|
|
825
|
+
s.omitFields.includes(e) || (m[e] = void 0);
|
|
826
|
+
}), d("reset", m);
|
|
826
827
|
}
|
|
827
828
|
return (t, o) => {
|
|
828
|
-
let u =
|
|
829
|
-
return
|
|
830
|
-
model:
|
|
829
|
+
let u = E("el-input"), d = E("el-form-item"), f = E("el-col"), y = E("el-button"), S = E("el-row"), D = E("el-form");
|
|
830
|
+
return x(), n(D, h({
|
|
831
|
+
model: m,
|
|
831
832
|
class: "ui-filter",
|
|
832
833
|
size: s.size
|
|
833
834
|
}, t.$attrs), {
|
|
834
|
-
default:
|
|
835
|
+
default: R(() => [l(S, {
|
|
835
836
|
gutter: 20,
|
|
836
837
|
style: { "margin-bottom": "-15px" }
|
|
837
838
|
}, {
|
|
838
|
-
default:
|
|
839
|
-
default:
|
|
839
|
+
default: R(() => [(x(!0), i(e, null, w(g.value, (e) => (x(), n(f, { span: e.span || 24 / s.column }, {
|
|
840
|
+
default: R(() => [(x(), n(d, {
|
|
840
841
|
key: e.prop,
|
|
841
842
|
label: e.label,
|
|
842
|
-
"label-width":
|
|
843
|
-
"value-width":
|
|
843
|
+
"label-width": P(et)(e?.labelWidth || s.labelWidth),
|
|
844
|
+
"value-width": P(tt)(e?.valueWidth || s.valueWidth)
|
|
844
845
|
}, {
|
|
845
|
-
default:
|
|
846
|
+
default: R(() => [e.render ? (x(), n(O(P(J)(e, m).component), h({
|
|
846
847
|
key: 0,
|
|
847
|
-
modelValue:
|
|
848
|
-
"onUpdate:modelValue": (t) =>
|
|
849
|
-
}, { ref_for: !0 },
|
|
848
|
+
modelValue: m[e.prop],
|
|
849
|
+
"onUpdate:modelValue": (t) => m[e.prop] = t
|
|
850
|
+
}, { ref_for: !0 }, P(J)(e, m).props, {
|
|
850
851
|
clearable: !0,
|
|
851
|
-
style: { width:
|
|
852
|
+
style: { width: P(tt)(e?.valueWidth || s.valueWidth) }
|
|
852
853
|
}), null, 16, [
|
|
853
854
|
"modelValue",
|
|
854
855
|
"onUpdate:modelValue",
|
|
855
856
|
"style"
|
|
856
|
-
])) : (
|
|
857
|
+
])) : (x(), n(u, {
|
|
857
858
|
key: 1,
|
|
858
|
-
modelValue:
|
|
859
|
-
"onUpdate:modelValue": (t) =>
|
|
859
|
+
modelValue: m[e.prop],
|
|
860
|
+
"onUpdate:modelValue": (t) => m[e.prop] = t,
|
|
860
861
|
placeholder: "请输入",
|
|
861
862
|
clearable: !0,
|
|
862
|
-
style:
|
|
863
|
+
style: v({ width: P(tt)(e?.valueWidth || s.valueWidth) })
|
|
863
864
|
}, null, 8, [
|
|
864
865
|
"modelValue",
|
|
865
866
|
"onUpdate:modelValue",
|
|
@@ -874,40 +875,40 @@ var Qe = { style: {
|
|
|
874
875
|
_: 2
|
|
875
876
|
}, 1032, ["span"]))), 256)), l(f, {
|
|
876
877
|
span: 24 / s.column,
|
|
877
|
-
offset:
|
|
878
|
+
offset: _.value
|
|
878
879
|
}, {
|
|
879
|
-
default:
|
|
880
|
+
default: R(() => [l(d, {
|
|
880
881
|
label: "",
|
|
881
882
|
"label-width": "30px"
|
|
882
883
|
}, {
|
|
883
|
-
default:
|
|
884
|
-
|
|
885
|
-
s.fields.length >= 2 * s.column ? (
|
|
884
|
+
default: R(() => [a("div", nt, [
|
|
885
|
+
T(t.$slots, "left", { form: m }, void 0, !0),
|
|
886
|
+
s.fields.length >= 2 * s.column ? (x(), n(y, {
|
|
886
887
|
key: 0,
|
|
887
888
|
text: "",
|
|
888
|
-
icon: p.expand ?
|
|
889
|
+
icon: p.expand ? P(Ge) : P(Ve),
|
|
889
890
|
onClick: o[0] ||= (e) => p.expand = !p.expand
|
|
890
891
|
}, {
|
|
891
|
-
default:
|
|
892
|
+
default: R(() => [c(j(p.expand ? "收起" : "展开"), 1)]),
|
|
892
893
|
_: 1
|
|
893
894
|
}, 8, ["icon"])) : r("", !0),
|
|
894
|
-
l(
|
|
895
|
-
icon:
|
|
895
|
+
l(y, {
|
|
896
|
+
icon: P(G),
|
|
896
897
|
type: "primary",
|
|
897
|
-
onClick:
|
|
898
|
+
onClick: b
|
|
898
899
|
}, {
|
|
899
|
-
default:
|
|
900
|
+
default: R(() => [...o[1] ||= [c("查询", -1)]]),
|
|
900
901
|
_: 1
|
|
901
902
|
}, 8, ["icon"]),
|
|
902
|
-
l(
|
|
903
|
-
icon:
|
|
904
|
-
onClick:
|
|
903
|
+
l(y, {
|
|
904
|
+
icon: P(q),
|
|
905
|
+
onClick: C
|
|
905
906
|
}, {
|
|
906
|
-
default:
|
|
907
|
+
default: R(() => [...o[2] ||= [c("重置", -1)]]),
|
|
907
908
|
_: 1
|
|
908
909
|
}, 8, ["icon"]),
|
|
909
|
-
|
|
910
|
-
|
|
910
|
+
T(t.$slots, "handle", { form: m }, void 0, !0),
|
|
911
|
+
T(t.$slots, "right", { form: m }, void 0, !0)
|
|
911
912
|
])]),
|
|
912
913
|
_: 3
|
|
913
914
|
})]),
|
|
@@ -919,16 +920,16 @@ var Qe = { style: {
|
|
|
919
920
|
}, 16, ["model", "size"]);
|
|
920
921
|
};
|
|
921
922
|
}
|
|
922
|
-
}),
|
|
923
|
+
}), it = /* @__PURE__ */ B({ default: () => at }), at = /* @__PURE__ */ V(rt, [["__scopeId", "data-v-0e3c7086"]]), ot = {
|
|
923
924
|
key: 0,
|
|
924
925
|
style: { display: "inline-block" }
|
|
925
|
-
},
|
|
926
|
+
}, st = {
|
|
926
927
|
key: 0,
|
|
927
928
|
style: { display: "inline-block" }
|
|
928
|
-
},
|
|
929
|
+
}, ct = {
|
|
929
930
|
key: 0,
|
|
930
931
|
class: "ui-form-buttons"
|
|
931
|
-
},
|
|
932
|
+
}, lt = /* @__PURE__ */ u({
|
|
932
933
|
__name: "index",
|
|
933
934
|
props: {
|
|
934
935
|
fields: {},
|
|
@@ -937,7 +938,7 @@ var Qe = { style: {
|
|
|
937
938
|
labelWidth: { default: "100px" },
|
|
938
939
|
labelPosition: { default: "top" },
|
|
939
940
|
omitFields: { default: () => [] },
|
|
940
|
-
rules: { default: () =>
|
|
941
|
+
rules: { default: () => S({}) },
|
|
941
942
|
required: { type: Boolean },
|
|
942
943
|
column: { default: 24 },
|
|
943
944
|
defaultValues: {},
|
|
@@ -951,7 +952,7 @@ var Qe = { style: {
|
|
|
951
952
|
"update:model"
|
|
952
953
|
],
|
|
953
954
|
setup(a, { expose: s, emit: u }) {
|
|
954
|
-
|
|
955
|
+
ee((e) => ({ fc2b2f2a: e.column / 2 }));
|
|
955
956
|
let d = u;
|
|
956
957
|
o(a, [
|
|
957
958
|
"fields",
|
|
@@ -964,19 +965,19 @@ var Qe = { style: {
|
|
|
964
965
|
"column",
|
|
965
966
|
"model"
|
|
966
967
|
]);
|
|
967
|
-
let f =
|
|
968
|
-
let e =
|
|
968
|
+
let f = C(0), p = C(), m = S({}), g = t(() => {
|
|
969
|
+
let e = N(m);
|
|
969
970
|
return a.fields.forEach((t) => {
|
|
970
|
-
let n = t.prop ? e?.[t.prop] : void 0, r =
|
|
971
|
-
|
|
972
|
-
let n = t.prop ? e?.[t.prop] : void 0, r =
|
|
973
|
-
|
|
971
|
+
let n = t.prop ? e?.[t.prop] : void 0, r = Y(t, m)?.props?.defaultValue;
|
|
972
|
+
m[t.prop] = n ?? r ?? void 0, t?.slots && t?.slots?.length > 0 && t.slots.forEach((t) => {
|
|
973
|
+
let n = t.prop ? e?.[t.prop] : void 0, r = Y(t, m)?.props?.defaultValue;
|
|
974
|
+
m[t.prop] = n ?? r ?? void 0;
|
|
974
975
|
});
|
|
975
976
|
}), a.fields.filter((e) => typeof e.prop == "string");
|
|
976
977
|
}), y = t(() => {
|
|
977
978
|
if (a.rules && Object.keys(a.rules).length) return a.rules;
|
|
978
979
|
let e = {};
|
|
979
|
-
return
|
|
980
|
+
return g.value.forEach((t) => {
|
|
980
981
|
t.rules && Object.keys(t.rules).length ? e[t.prop] = t.rules : t.required && (e[t.prop] = [{
|
|
981
982
|
required: !0,
|
|
982
983
|
message: "请输入" + t.label,
|
|
@@ -984,52 +985,52 @@ var Qe = { style: {
|
|
|
984
985
|
}]);
|
|
985
986
|
}), e;
|
|
986
987
|
});
|
|
987
|
-
|
|
988
|
-
Object.assign(
|
|
988
|
+
L(() => {
|
|
989
|
+
Object.assign(m, a.model);
|
|
989
990
|
});
|
|
990
|
-
async function
|
|
991
|
+
async function b(e) {
|
|
991
992
|
let t = !0;
|
|
992
993
|
if (await e.validate((e) => {
|
|
993
994
|
t = e;
|
|
994
995
|
}), !t) return;
|
|
995
996
|
let n = {};
|
|
996
|
-
Object.keys(
|
|
997
|
-
|
|
997
|
+
Object.keys(m).forEach((e) => {
|
|
998
|
+
m[e] !== void 0 && (n[e] = N(m[e]));
|
|
998
999
|
}), d("submit", n);
|
|
999
1000
|
}
|
|
1000
|
-
function
|
|
1001
|
+
function D() {
|
|
1001
1002
|
p && p.value?.clearValidate();
|
|
1002
1003
|
}
|
|
1003
|
-
function
|
|
1004
|
-
Object.keys(
|
|
1005
|
-
a.omitFields.includes(e) || (
|
|
1006
|
-
}), f.value += 1, d("reset",
|
|
1004
|
+
function k(e) {
|
|
1005
|
+
Object.keys(m).forEach((e) => {
|
|
1006
|
+
a.omitFields.includes(e) || (m[e] = void 0);
|
|
1007
|
+
}), f.value += 1, d("reset", m);
|
|
1007
1008
|
}
|
|
1008
|
-
function
|
|
1009
|
-
return
|
|
1009
|
+
function A() {
|
|
1010
|
+
return m;
|
|
1010
1011
|
}
|
|
1011
|
-
function
|
|
1012
|
+
function M(e) {
|
|
1012
1013
|
Object.keys(e).forEach((t) => {
|
|
1013
|
-
|
|
1014
|
+
m[t] = e[t];
|
|
1014
1015
|
});
|
|
1015
1016
|
}
|
|
1016
|
-
async function
|
|
1017
|
+
async function F() {
|
|
1017
1018
|
return new Promise((e) => {
|
|
1018
1019
|
p.value?.validate((t, n) => e(n));
|
|
1019
1020
|
});
|
|
1020
1021
|
}
|
|
1021
1022
|
return s({
|
|
1022
|
-
getValues:
|
|
1023
|
-
setValues:
|
|
1024
|
-
clearValidate:
|
|
1025
|
-
onSubmit:
|
|
1026
|
-
validate:
|
|
1023
|
+
getValues: A,
|
|
1024
|
+
setValues: M,
|
|
1025
|
+
clearValidate: D,
|
|
1026
|
+
onSubmit: b,
|
|
1027
|
+
validate: F
|
|
1027
1028
|
}), (t, o) => {
|
|
1028
|
-
let s =
|
|
1029
|
-
return
|
|
1029
|
+
let s = E("el-input"), u = E("el-form-item"), d = E("el-form"), S = E("el-button");
|
|
1030
|
+
return x(), i(e, null, [l(d, h({
|
|
1030
1031
|
ref_key: "uiFormRef",
|
|
1031
1032
|
ref: p,
|
|
1032
|
-
model:
|
|
1033
|
+
model: m
|
|
1033
1034
|
}, t.$attrs, {
|
|
1034
1035
|
rules: y.value,
|
|
1035
1036
|
inline: a.labelPosition !== "top",
|
|
@@ -1040,22 +1041,22 @@ var Qe = { style: {
|
|
|
1040
1041
|
},
|
|
1041
1042
|
"validate-on-rule-change": !1
|
|
1042
1043
|
}), {
|
|
1043
|
-
default:
|
|
1044
|
+
default: R(() => [(x(!0), i(e, null, w(g.value, (r) => (x(), n(u, {
|
|
1044
1045
|
key: r.prop,
|
|
1045
1046
|
label: r.label,
|
|
1046
1047
|
"label-width": a.labelWidth,
|
|
1047
1048
|
"value-width": a.valueWidth,
|
|
1048
1049
|
prop: r.prop,
|
|
1049
|
-
style:
|
|
1050
|
+
style: v({
|
|
1050
1051
|
width: `${r?.width ? r?.width + "px" : "100%"}`,
|
|
1051
1052
|
gridColumn: `span ${(r?.span || a.column) / 2 || 1}`
|
|
1052
1053
|
})
|
|
1053
1054
|
}, {
|
|
1054
|
-
default:
|
|
1055
|
+
default: R(() => [r.render ? (x(), i(e, { key: 0 }, [P(Y)(r, m).component ? (x(), n(O(P(Y)(r, m).component), h({
|
|
1055
1056
|
key: 1,
|
|
1056
|
-
modelValue:
|
|
1057
|
-
"onUpdate:modelValue": (e) =>
|
|
1058
|
-
}, { ref_for: !0 },
|
|
1057
|
+
modelValue: m[r.prop],
|
|
1058
|
+
"onUpdate:modelValue": (e) => m[r.prop] = e
|
|
1059
|
+
}, { ref_for: !0 }, P(Y)(r, m).props, {
|
|
1059
1060
|
clearable: !0,
|
|
1060
1061
|
key: `${r.prop}-${f.value}`,
|
|
1061
1062
|
style: { display: "inline-block" },
|
|
@@ -1064,13 +1065,13 @@ var Qe = { style: {
|
|
|
1064
1065
|
"modelValue",
|
|
1065
1066
|
"onUpdate:modelValue",
|
|
1066
1067
|
"class"
|
|
1067
|
-
])) : (
|
|
1068
|
+
])) : (x(), i("span", ot, j(P(Y)(r, m) || "-"), 1)), (x(!0), i(e, null, w(r.slots, (e) => T(t.$slots, "default", { form: m }, () => [P(Y)(e, m).component ? (x(), n(O(P(Y)(e, m).component), h({
|
|
1068
1069
|
key: 1,
|
|
1069
|
-
modelValue:
|
|
1070
|
-
"onUpdate:modelValue": (t) =>
|
|
1070
|
+
modelValue: m[e.prop],
|
|
1071
|
+
"onUpdate:modelValue": (t) => m[e.prop] = t,
|
|
1071
1072
|
"default-value": e.defaultValue,
|
|
1072
1073
|
placeholder: e.placeholder
|
|
1073
|
-
}, { ref_for: !0 },
|
|
1074
|
+
}, { ref_for: !0 }, P(Y)(e, m).props, {
|
|
1074
1075
|
style: {
|
|
1075
1076
|
display: "inline-block",
|
|
1076
1077
|
marginLeft: "10px",
|
|
@@ -1086,13 +1087,13 @@ var Qe = { style: {
|
|
|
1086
1087
|
"placeholder",
|
|
1087
1088
|
"style",
|
|
1088
1089
|
"class"
|
|
1089
|
-
])) : (
|
|
1090
|
+
])) : (x(), i("span", st, j(P(Y)(e, m) || "-"), 1))], !0)), 256))], 64)) : (x(), n(s, {
|
|
1090
1091
|
key: 1,
|
|
1091
|
-
modelValue:
|
|
1092
|
-
"onUpdate:modelValue": (e) =>
|
|
1092
|
+
modelValue: m[r.prop],
|
|
1093
|
+
"onUpdate:modelValue": (e) => m[r.prop] = e,
|
|
1093
1094
|
placeholder: "请输入",
|
|
1094
1095
|
clearable: !0,
|
|
1095
|
-
class:
|
|
1096
|
+
class: _({ underline: a.valueModel === "underline" })
|
|
1096
1097
|
}, null, 8, [
|
|
1097
1098
|
"modelValue",
|
|
1098
1099
|
"onUpdate:modelValue",
|
|
@@ -1113,31 +1114,31 @@ var Qe = { style: {
|
|
|
1113
1114
|
"inline",
|
|
1114
1115
|
"label-position",
|
|
1115
1116
|
"class"
|
|
1116
|
-
]), t.$attrs?.hideHandle ? r("", !0) : (
|
|
1117
|
-
|
|
1118
|
-
l(
|
|
1119
|
-
icon:
|
|
1120
|
-
onClick: o[0] ||= (e) => p.value &&
|
|
1117
|
+
]), t.$attrs?.hideHandle ? r("", !0) : (x(), i("div", ct, [
|
|
1118
|
+
T(t.$slots, "handle", { form: m }, void 0, !0),
|
|
1119
|
+
l(S, {
|
|
1120
|
+
icon: P(q),
|
|
1121
|
+
onClick: o[0] ||= (e) => p.value && k(p.value),
|
|
1121
1122
|
size: t.$props.size
|
|
1122
1123
|
}, {
|
|
1123
|
-
default:
|
|
1124
|
+
default: R(() => [...o[2] ||= [c("重置", -1)]]),
|
|
1124
1125
|
_: 1
|
|
1125
1126
|
}, 8, ["icon", "size"]),
|
|
1126
|
-
l(
|
|
1127
|
-
icon:
|
|
1127
|
+
l(S, {
|
|
1128
|
+
icon: P(Qe),
|
|
1128
1129
|
type: "primary",
|
|
1129
|
-
onClick: o[1] ||= (e) => p.value &&
|
|
1130
|
+
onClick: o[1] ||= (e) => p.value && b(p.value),
|
|
1130
1131
|
size: t.$props.size
|
|
1131
1132
|
}, {
|
|
1132
|
-
default:
|
|
1133
|
+
default: R(() => [...o[3] ||= [c("提交", -1)]]),
|
|
1133
1134
|
_: 1
|
|
1134
1135
|
}, 8, ["icon", "size"])
|
|
1135
1136
|
]))], 64);
|
|
1136
1137
|
};
|
|
1137
1138
|
}
|
|
1138
|
-
}),
|
|
1139
|
+
}), ut = /* @__PURE__ */ B({ default: () => dt }), dt = /* @__PURE__ */ V(lt, [["__scopeId", "data-v-5e602fff"]]), ft = ["disabled"], pt = /* @__PURE__ */ u({
|
|
1139
1140
|
__name: "index",
|
|
1140
|
-
props: /* @__PURE__ */
|
|
1141
|
+
props: /* @__PURE__ */ m({
|
|
1141
1142
|
defaultValue: { default: "" },
|
|
1142
1143
|
disabled: {
|
|
1143
1144
|
type: Boolean,
|
|
@@ -1150,11 +1151,11 @@ var Qe = { style: {
|
|
|
1150
1151
|
},
|
|
1151
1152
|
modelModifiers: {}
|
|
1152
1153
|
}),
|
|
1153
|
-
emits: /* @__PURE__ */
|
|
1154
|
+
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
1154
1155
|
setup(e, { emit: t }) {
|
|
1155
|
-
let n =
|
|
1156
|
-
return
|
|
1157
|
-
o = new
|
|
1156
|
+
let n = C(), r = te(e, "modelValue"), a = C(r.value || e.defaultValue || ""), o = null, s = t;
|
|
1157
|
+
return y(() => {
|
|
1158
|
+
o = new ae({
|
|
1158
1159
|
element: n.value,
|
|
1159
1160
|
placeholder: "点击输入内容...",
|
|
1160
1161
|
content: r.value || e.defaultValue || "",
|
|
@@ -1164,18 +1165,18 @@ var Qe = { style: {
|
|
|
1164
1165
|
r.value = t, a.value = t, s("change", t);
|
|
1165
1166
|
}
|
|
1166
1167
|
}), o.setEditable(!e.disabled);
|
|
1167
|
-
}),
|
|
1168
|
+
}), I(r, (e) => {
|
|
1168
1169
|
o && e !== o.getHtml() && o.setContent(e);
|
|
1169
|
-
}),
|
|
1170
|
+
}), b(() => {
|
|
1170
1171
|
o && o.destroy();
|
|
1171
|
-
}), (t, r) => (
|
|
1172
|
+
}), (t, r) => (x(), i("div", {
|
|
1172
1173
|
ref_key: "editorRef",
|
|
1173
1174
|
ref: n,
|
|
1174
1175
|
style: { height: "500px" },
|
|
1175
1176
|
disabled: e.disabled
|
|
1176
|
-
}, null, 8,
|
|
1177
|
+
}, null, 8, ft));
|
|
1177
1178
|
}
|
|
1178
|
-
}),
|
|
1179
|
+
}), mt = /* @__PURE__ */ B({ default: () => ht }), ht = pt, gt = { class: "ui-tree-wrapper" }, _t = {
|
|
1179
1180
|
key: 0,
|
|
1180
1181
|
style: {
|
|
1181
1182
|
display: "flex",
|
|
@@ -1184,10 +1185,10 @@ var Qe = { style: {
|
|
|
1184
1185
|
"align-items": "center",
|
|
1185
1186
|
gap: "10px"
|
|
1186
1187
|
}
|
|
1187
|
-
},
|
|
1188
|
+
}, vt = {
|
|
1188
1189
|
key: 0,
|
|
1189
1190
|
class: "custom-tree-node"
|
|
1190
|
-
},
|
|
1191
|
+
}, yt = { class: "node-label" }, bt = { key: 0 }, xt = ["onClick"], St = /* @__PURE__ */ u({
|
|
1191
1192
|
__name: "index",
|
|
1192
1193
|
props: {
|
|
1193
1194
|
id: {},
|
|
@@ -1213,23 +1214,23 @@ var Qe = { style: {
|
|
|
1213
1214
|
"delete"
|
|
1214
1215
|
],
|
|
1215
1216
|
setup(e, { emit: s }) {
|
|
1216
|
-
let u = s, f =
|
|
1217
|
+
let u = s, f = F(), p = o(e, [
|
|
1217
1218
|
"filterable",
|
|
1218
1219
|
"placeholder",
|
|
1219
1220
|
"data",
|
|
1220
1221
|
"props"
|
|
1221
|
-
]),
|
|
1222
|
-
|
|
1222
|
+
]), m = C(""), g = C(), _ = C(), v = d()?.appContext.config.globalProperties.$messageBox;
|
|
1223
|
+
I(m, (t) => {
|
|
1223
1224
|
e.filterable && _.value?.filter(t);
|
|
1224
1225
|
});
|
|
1225
1226
|
let y = t(() => f?.["show-total"] ?? p?.showTotal ?? !0);
|
|
1226
|
-
function
|
|
1227
|
+
function b(t, n) {
|
|
1227
1228
|
return t ? n?.[e.props?.label || "label"]?.includes(t) ?? !1 : !0;
|
|
1228
1229
|
}
|
|
1229
|
-
function
|
|
1230
|
+
function S(e, t) {
|
|
1230
1231
|
e?.stopPropagation(), g.value = t.id;
|
|
1231
1232
|
}
|
|
1232
|
-
function
|
|
1233
|
+
function w(e) {
|
|
1233
1234
|
v?.prompt("请输入新的名称", "添加节点", {
|
|
1234
1235
|
confirmButtonText: "确定",
|
|
1235
1236
|
cancelButtonText: "取消"
|
|
@@ -1256,27 +1257,27 @@ var Qe = { style: {
|
|
|
1256
1257
|
e.id && u("delete", e);
|
|
1257
1258
|
}
|
|
1258
1259
|
return (t, o) => {
|
|
1259
|
-
let s =
|
|
1260
|
-
return
|
|
1261
|
-
e.filterable ? (
|
|
1262
|
-
modelValue:
|
|
1263
|
-
"onUpdate:modelValue": o[0] ||= (e) =>
|
|
1260
|
+
let s = E("el-input"), u = E("el-button"), d = E("el-dropdown-item"), f = E("el-dropdown-menu"), g = E("el-dropdown"), v = E("el-tree-v2");
|
|
1261
|
+
return x(), i("div", gt, [
|
|
1262
|
+
e.filterable ? (x(), i("div", _t, [l(s, {
|
|
1263
|
+
modelValue: m.value,
|
|
1264
|
+
"onUpdate:modelValue": o[0] ||= (e) => m.value = e,
|
|
1264
1265
|
placeholder: e.placeholder ?? "请输入",
|
|
1265
1266
|
clearable: ""
|
|
1266
|
-
}, null, 8, ["modelValue", "placeholder"]), p?.hidePlusHandle ? r("", !0) : (
|
|
1267
|
+
}, null, 8, ["modelValue", "placeholder"]), p?.hidePlusHandle ? r("", !0) : (x(), n(u, {
|
|
1267
1268
|
key: 0,
|
|
1268
1269
|
style: {
|
|
1269
1270
|
margin: "0px",
|
|
1270
1271
|
padding: "0px"
|
|
1271
1272
|
},
|
|
1272
1273
|
link: "",
|
|
1273
|
-
onClick: o[1] ||= (e) =>
|
|
1274
|
+
onClick: o[1] ||= (e) => w()
|
|
1274
1275
|
}, {
|
|
1275
|
-
default:
|
|
1276
|
+
default: R(() => [...o[2] ||= [a("span", { style: { padding: "4px" } }, "+", -1)]]),
|
|
1276
1277
|
_: 1
|
|
1277
1278
|
}))])) : r("", !0),
|
|
1278
|
-
|
|
1279
|
-
l(v,
|
|
1279
|
+
T(t.$slots, "handle", { style: "margin-top: 8px" }, void 0, !0),
|
|
1280
|
+
l(v, h({
|
|
1280
1281
|
ref_key: "treeRef",
|
|
1281
1282
|
ref: _,
|
|
1282
1283
|
style: { "margin-top": "8px" }
|
|
@@ -1286,46 +1287,46 @@ var Qe = { style: {
|
|
|
1286
1287
|
}, {
|
|
1287
1288
|
"node-key": p?.nodeKey || "id",
|
|
1288
1289
|
"highlight-current": !0,
|
|
1289
|
-
"filter-method":
|
|
1290
|
+
"filter-method": b
|
|
1290
1291
|
}), {
|
|
1291
|
-
default:
|
|
1292
|
+
default: R((s) => [s?.data ? (x(), i("div", vt, [a("div", yt, [s.data?.children?.length ? (x(), i("span", bt, "📁")) : r("", !0), c(" " + j(s.data?.[e.props?.label || "label"]) + " " + j(y.value && s.data?.children?.length ? `(${s.data.children.length})` : ""), 1)]), p.hideNodeHandle ? r("", !0) : (x(), n(g, {
|
|
1292
1293
|
key: 0,
|
|
1293
1294
|
trigger: "click"
|
|
1294
1295
|
}, {
|
|
1295
|
-
dropdown:
|
|
1296
|
-
default:
|
|
1297
|
-
p?.hideNodeAdd ? r("", !0) : (
|
|
1296
|
+
dropdown: R(() => [l(f, null, {
|
|
1297
|
+
default: R(() => [
|
|
1298
|
+
p?.hideNodeAdd ? r("", !0) : (x(), n(d, {
|
|
1298
1299
|
key: 0,
|
|
1299
|
-
onClick: (e) =>
|
|
1300
|
+
onClick: (e) => w(s.data)
|
|
1300
1301
|
}, {
|
|
1301
|
-
default:
|
|
1302
|
+
default: R(() => [...o[3] ||= [c(" 添加 ", -1)]]),
|
|
1302
1303
|
_: 1
|
|
1303
1304
|
}, 8, ["onClick"])),
|
|
1304
|
-
p?.hideNodeEdit ? r("", !0) : (
|
|
1305
|
+
p?.hideNodeEdit ? r("", !0) : (x(), n(d, {
|
|
1305
1306
|
key: 1,
|
|
1306
1307
|
onClick: (e) => D(s.data)
|
|
1307
1308
|
}, {
|
|
1308
|
-
default:
|
|
1309
|
+
default: R(() => [...o[4] ||= [c(" 编辑 ", -1)]]),
|
|
1309
1310
|
_: 1
|
|
1310
1311
|
}, 8, ["onClick"])),
|
|
1311
|
-
p?.hideNodeDel ? r("", !0) : (
|
|
1312
|
+
p?.hideNodeDel ? r("", !0) : (x(), n(d, {
|
|
1312
1313
|
key: 2,
|
|
1313
1314
|
onClick: (e) => O(s.data)
|
|
1314
1315
|
}, {
|
|
1315
|
-
default:
|
|
1316
|
+
default: R(() => [...o[5] ||= [a("span", { style: { color: "#ef4444" } }, "删除", -1)]]),
|
|
1316
1317
|
_: 1
|
|
1317
1318
|
}, 8, ["onClick"])),
|
|
1318
|
-
|
|
1319
|
+
T(t.$slots, "node-handle", { data: s.data }, void 0, !0)
|
|
1319
1320
|
]),
|
|
1320
1321
|
_: 2
|
|
1321
1322
|
}, 1024)]),
|
|
1322
|
-
default:
|
|
1323
|
-
onClick: (e) =>
|
|
1323
|
+
default: R(() => [a("span", {
|
|
1324
|
+
onClick: (e) => S(e, s.data),
|
|
1324
1325
|
style: {
|
|
1325
1326
|
padding: "4px",
|
|
1326
1327
|
"font-weight": "bold"
|
|
1327
1328
|
}
|
|
1328
|
-
}, "⋮", 8,
|
|
1329
|
+
}, "⋮", 8, xt)]),
|
|
1329
1330
|
_: 2
|
|
1330
1331
|
}, 1024))])) : r("", !0)]),
|
|
1331
1332
|
_: 3
|
|
@@ -1333,16 +1334,16 @@ var Qe = { style: {
|
|
|
1333
1334
|
]);
|
|
1334
1335
|
};
|
|
1335
1336
|
}
|
|
1336
|
-
}),
|
|
1337
|
+
}), Ct = /* @__PURE__ */ B({ default: () => wt }), wt = /* @__PURE__ */ V(St, [["__scopeId", "data-v-7858d79e"]]), Tt = { style: { height: "100%" } }, Et = { style: {
|
|
1337
1338
|
display: "flex",
|
|
1338
1339
|
"flex-direction": "row",
|
|
1339
1340
|
"justify-content": "space-between",
|
|
1340
1341
|
"align-items": "center",
|
|
1341
1342
|
gap: "10px"
|
|
1342
|
-
} },
|
|
1343
|
+
} }, Dt = { style: { margin: "10px 0px" } }, Ot = ["onClick"], kt = { key: 0 }, At = /* @__PURE__ */ u({
|
|
1343
1344
|
__name: "index",
|
|
1344
1345
|
props: {
|
|
1345
|
-
loading: { default: () =>
|
|
1346
|
+
loading: { default: () => C(!1) },
|
|
1346
1347
|
data: {},
|
|
1347
1348
|
placeholder: {},
|
|
1348
1349
|
props: {},
|
|
@@ -1351,46 +1352,46 @@ var Qe = { style: {
|
|
|
1351
1352
|
},
|
|
1352
1353
|
emits: ["node-click"],
|
|
1353
1354
|
setup(o, { emit: s }) {
|
|
1354
|
-
let c = s, l =
|
|
1355
|
-
|
|
1355
|
+
let c = s, l = C(""), u = C(), d = t(() => l.value ? o.data.filter((e) => e[o.props?.label || "label"]?.includes(l.value)) : o.data);
|
|
1356
|
+
I(() => [u.value, o.data?.[0]], (e) => {
|
|
1356
1357
|
!e[0] && e[1] && (u.value = o.data?.[0]);
|
|
1357
1358
|
}, { immediate: !0 });
|
|
1358
1359
|
function f(e) {
|
|
1359
1360
|
u.value = e, c("node-click", e);
|
|
1360
1361
|
}
|
|
1361
1362
|
return (t, s) => {
|
|
1362
|
-
let c =
|
|
1363
|
-
return
|
|
1364
|
-
a("div",
|
|
1363
|
+
let c = E("el-input");
|
|
1364
|
+
return x(), i("div", Tt, [
|
|
1365
|
+
a("div", Et, [o.filterable ? (x(), n(c, {
|
|
1365
1366
|
key: 0,
|
|
1366
1367
|
modelValue: l.value,
|
|
1367
1368
|
"onUpdate:modelValue": s[0] ||= (e) => l.value = e,
|
|
1368
1369
|
placeholder: o.placeholder ?? "请输入"
|
|
1369
|
-
}, null, 8, ["modelValue", "placeholder"])) : r("", !0),
|
|
1370
|
-
a("div",
|
|
1371
|
-
|
|
1370
|
+
}, null, 8, ["modelValue", "placeholder"])) : r("", !0), T(t.$slots, "plus", {}, void 0, !0)]),
|
|
1371
|
+
a("div", Dt, [T(t.$slots, "handle", {}, void 0, !0)]),
|
|
1372
|
+
ne((x(), i("ul", h({
|
|
1372
1373
|
class: "infinite-list",
|
|
1373
1374
|
"infinite-scroll-immediate": !1
|
|
1374
|
-
}, t.$attrs), [(
|
|
1375
|
+
}, t.$attrs), [(x(!0), i(e, null, w(d.value, (e, n) => (x(), i("li", {
|
|
1375
1376
|
key: "infinite-list-" + n,
|
|
1376
|
-
class:
|
|
1377
|
+
class: _({
|
|
1377
1378
|
"infinite-list-item": !0,
|
|
1378
1379
|
active: e === u.value
|
|
1379
1380
|
}),
|
|
1380
1381
|
onClick: (t) => f(e)
|
|
1381
|
-
}, [a("span", null,
|
|
1382
|
-
o.loading.value ? (
|
|
1382
|
+
}, [a("span", null, j(e[o.props?.label || "label"]), 1), T(t.$slots, "itemHandle", { data: e }, void 0, !0)], 10, Ot))), 128))], 16)), [[P(o.vInfiniteScroll), o.vInfiniteScroll]]),
|
|
1383
|
+
o.loading.value ? (x(), i("p", kt, "loading...")) : r("", !0)
|
|
1383
1384
|
]);
|
|
1384
1385
|
};
|
|
1385
1386
|
}
|
|
1386
|
-
}),
|
|
1387
|
+
}), jt = /* @__PURE__ */ B({ default: () => Mt }), Mt = /* @__PURE__ */ V(At, [["__scopeId", "data-v-0ab5cd97"]]), Nt = {
|
|
1387
1388
|
key: 0,
|
|
1388
1389
|
style: {
|
|
1389
1390
|
padding: "10px 0px",
|
|
1390
1391
|
"margin-bottom": "10px",
|
|
1391
1392
|
"border-bottom": "1px solid #e5e5e5"
|
|
1392
1393
|
}
|
|
1393
|
-
},
|
|
1394
|
+
}, Pt = { key: 1 }, Ft = /* @__PURE__ */ u({
|
|
1394
1395
|
__name: "index",
|
|
1395
1396
|
props: {
|
|
1396
1397
|
data: {},
|
|
@@ -1406,25 +1407,25 @@ var Qe = { style: {
|
|
|
1406
1407
|
"data"
|
|
1407
1408
|
]);
|
|
1408
1409
|
return (o, s) => {
|
|
1409
|
-
let c =
|
|
1410
|
-
return
|
|
1411
|
-
t.title ? (
|
|
1412
|
-
|
|
1413
|
-
l(u,
|
|
1414
|
-
default:
|
|
1410
|
+
let c = E("el-descriptions-item"), u = E("el-descriptions");
|
|
1411
|
+
return x(), i(e, null, [
|
|
1412
|
+
t.title ? (x(), i("h4", Nt, j(t.title), 1)) : r("", !0),
|
|
1413
|
+
T(o.$slots, "title", {}, void 0, !0),
|
|
1414
|
+
l(u, h({ column: t.column }, a, { class: "ui-descriptions" }), {
|
|
1415
|
+
default: R(() => [(x(!0), i(e, null, w(t.fields, (e) => (x(), n(c, {
|
|
1415
1416
|
key: e.prop,
|
|
1416
1417
|
label: e.label,
|
|
1417
1418
|
span: e.span || 2
|
|
1418
1419
|
}, {
|
|
1419
|
-
default:
|
|
1420
|
+
default: R(() => [e.render ? (x(), n(O(P(J)(e, t.data).component), h({
|
|
1420
1421
|
key: 0,
|
|
1421
1422
|
modelValue: t.data[e.prop],
|
|
1422
1423
|
"onUpdate:modelValue": (n) => t.data[e.prop] = n
|
|
1423
|
-
}, { ref_for: !0 },
|
|
1424
|
+
}, { ref_for: !0 }, P(J)(e, t.data).props, {
|
|
1424
1425
|
clearable: !0,
|
|
1425
1426
|
key: e.prop,
|
|
1426
1427
|
style: { display: "inline-block" }
|
|
1427
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : (
|
|
1428
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : (x(), i("span", Pt, j(t.data[e.prop] || "-"), 1))]),
|
|
1428
1429
|
_: 2
|
|
1429
1430
|
}, 1032, ["label", "span"]))), 128))]),
|
|
1430
1431
|
_: 1
|
|
@@ -1432,14 +1433,14 @@ var Qe = { style: {
|
|
|
1432
1433
|
], 64);
|
|
1433
1434
|
};
|
|
1434
1435
|
}
|
|
1435
|
-
}),
|
|
1436
|
+
}), It = /* @__PURE__ */ B({ default: () => Lt }), Lt = /* @__PURE__ */ V(Ft, [["__scopeId", "data-v-f02c30f9"]]), Rt = {
|
|
1436
1437
|
key: 0,
|
|
1437
1438
|
style: {
|
|
1438
1439
|
display: "flex",
|
|
1439
1440
|
"margin-top": "12px",
|
|
1440
1441
|
"justify-content": "end"
|
|
1441
1442
|
}
|
|
1442
|
-
},
|
|
1443
|
+
}, zt = /* @__PURE__ */ u({
|
|
1443
1444
|
__name: "index",
|
|
1444
1445
|
props: {
|
|
1445
1446
|
visible: { type: Boolean },
|
|
@@ -1454,16 +1455,16 @@ var Qe = { style: {
|
|
|
1454
1455
|
"submit"
|
|
1455
1456
|
],
|
|
1456
1457
|
setup(e, { emit: t }) {
|
|
1457
|
-
let a = t, o = e, s =
|
|
1458
|
+
let a = t, o = e, s = C();
|
|
1458
1459
|
function u() {
|
|
1459
1460
|
a("close"), a("update:visible", !1);
|
|
1460
1461
|
}
|
|
1461
1462
|
function d() {
|
|
1462
|
-
a("submit",
|
|
1463
|
+
a("submit", N(s?.value || {})), a("update:visible", !1);
|
|
1463
1464
|
}
|
|
1464
1465
|
return (e, t) => {
|
|
1465
|
-
let a =
|
|
1466
|
-
return
|
|
1466
|
+
let a = E("el-button"), f = E("el-dialog");
|
|
1467
|
+
return x(), n(f, h(e.$attrs, {
|
|
1467
1468
|
"model-value": o.visible,
|
|
1468
1469
|
"show-close": o.disabled,
|
|
1469
1470
|
fullscreen: !o.width,
|
|
@@ -1473,20 +1474,20 @@ var Qe = { style: {
|
|
|
1473
1474
|
"onUpdate:modelValue": t[0] ||= (e) => !e && u(),
|
|
1474
1475
|
onClose: u
|
|
1475
1476
|
}), {
|
|
1476
|
-
default:
|
|
1477
|
+
default: R(() => [(x(), n(O(o.component), h({
|
|
1477
1478
|
ref_key: "slotRef",
|
|
1478
1479
|
ref: s
|
|
1479
1480
|
}, o.componentProps, {
|
|
1480
1481
|
onClose: u,
|
|
1481
1482
|
onSubmit: d
|
|
1482
|
-
}), null, 16)), o.disabled ? r("", !0) : (
|
|
1483
|
-
default:
|
|
1483
|
+
}), null, 16)), o.disabled ? r("", !0) : (x(), i("div", Rt, [l(a, { onClick: u }, {
|
|
1484
|
+
default: R(() => [...t[1] ||= [c("取消", -1)]]),
|
|
1484
1485
|
_: 1
|
|
1485
1486
|
}), l(a, {
|
|
1486
1487
|
type: "primary",
|
|
1487
1488
|
onClick: d
|
|
1488
1489
|
}, {
|
|
1489
|
-
default:
|
|
1490
|
+
default: R(() => [...t[2] ||= [c("确定", -1)]]),
|
|
1490
1491
|
_: 1
|
|
1491
1492
|
})]))]),
|
|
1492
1493
|
_: 1
|
|
@@ -1497,11 +1498,11 @@ var Qe = { style: {
|
|
|
1497
1498
|
]);
|
|
1498
1499
|
};
|
|
1499
1500
|
}
|
|
1500
|
-
}),
|
|
1501
|
-
function
|
|
1501
|
+
}), Bt = /* @__PURE__ */ B({ default: () => Vt }), Vt = zt, X = window.origin?.includes("localhost") || window.origin?.includes("127.0.0.1") ? "/api" : "/intellicit-service";
|
|
1502
|
+
function Ht(e) {
|
|
1502
1503
|
return Array.from(new Set(e));
|
|
1503
1504
|
}
|
|
1504
|
-
function
|
|
1505
|
+
function Ut(e, t) {
|
|
1505
1506
|
let n = /* @__PURE__ */ new Set();
|
|
1506
1507
|
return e.filter((e) => {
|
|
1507
1508
|
let r = typeof t == "function" ? t(e) : e[t];
|
|
@@ -1510,7 +1511,7 @@ function Rt(e, t) {
|
|
|
1510
1511
|
}
|
|
1511
1512
|
//#endregion
|
|
1512
1513
|
//#region src/components/StaffSelect/default.vue
|
|
1513
|
-
var
|
|
1514
|
+
var Wt = /* @__PURE__ */ u({
|
|
1514
1515
|
__name: "default",
|
|
1515
1516
|
props: {
|
|
1516
1517
|
multiple: { type: Boolean },
|
|
@@ -1529,12 +1530,12 @@ var zt = /* @__PURE__ */ u({
|
|
|
1529
1530
|
}), d = t({
|
|
1530
1531
|
get: () => o.modelValue || "",
|
|
1531
1532
|
set: (e) => s("update:modelValue", e)
|
|
1532
|
-
}), f =
|
|
1533
|
-
|
|
1533
|
+
}), f = C([]);
|
|
1534
|
+
y(() => {
|
|
1534
1535
|
o.modelValue && p(o.modelValue);
|
|
1535
1536
|
});
|
|
1536
1537
|
async function p(e = "") {
|
|
1537
|
-
f.value = ((await fetch(
|
|
1538
|
+
f.value = ((await fetch(X + "/user/pageQueryUser", {
|
|
1538
1539
|
method: "POST",
|
|
1539
1540
|
headers: u,
|
|
1540
1541
|
body: JSON.stringify({
|
|
@@ -1551,23 +1552,23 @@ var zt = /* @__PURE__ */ u({
|
|
|
1551
1552
|
};
|
|
1552
1553
|
});
|
|
1553
1554
|
}
|
|
1554
|
-
async function
|
|
1555
|
+
async function m(e) {
|
|
1555
1556
|
e.length < 1 || (d.value = e, await p(e));
|
|
1556
1557
|
}
|
|
1557
1558
|
return (t, r) => {
|
|
1558
|
-
let a =
|
|
1559
|
-
return
|
|
1559
|
+
let a = E("el-icon"), o = E("el-option"), s = E("el-select");
|
|
1560
|
+
return x(), n(s, h({
|
|
1560
1561
|
remote: "",
|
|
1561
1562
|
filterable: "",
|
|
1562
1563
|
modelValue: d.value,
|
|
1563
1564
|
"onUpdate:modelValue": r[0] ||= (e) => d.value = e,
|
|
1564
|
-
"remote-method":
|
|
1565
|
+
"remote-method": m
|
|
1565
1566
|
}, t.$attrs), {
|
|
1566
|
-
prefix:
|
|
1567
|
-
default:
|
|
1567
|
+
prefix: R(() => [l(a, null, {
|
|
1568
|
+
default: R(() => [l(P(K))]),
|
|
1568
1569
|
_: 1
|
|
1569
1570
|
})]),
|
|
1570
|
-
default:
|
|
1571
|
+
default: R(() => [(x(!0), i(e, null, w(f.value, (e) => (x(), n(o, {
|
|
1571
1572
|
key: `${e.employeeCode}-${e.employeeName}`,
|
|
1572
1573
|
label: e.label,
|
|
1573
1574
|
value: e.value
|
|
@@ -1576,26 +1577,26 @@ var zt = /* @__PURE__ */ u({
|
|
|
1576
1577
|
}, 16, ["modelValue"]);
|
|
1577
1578
|
};
|
|
1578
1579
|
}
|
|
1579
|
-
}),
|
|
1580
|
+
}), Gt = { style: {
|
|
1580
1581
|
display: "flex",
|
|
1581
1582
|
"max-width": "100%",
|
|
1582
1583
|
gap: "20px",
|
|
1583
1584
|
"overflow-y": "scroll",
|
|
1584
1585
|
height: "400px"
|
|
1585
|
-
} },
|
|
1586
|
+
} }, Kt = { style: { flex: "1" } }, qt = { style: { width: "320px" } }, Jt = { style: {
|
|
1586
1587
|
display: "flex",
|
|
1587
1588
|
"justify-content": "space-between",
|
|
1588
1589
|
"align-items": "center",
|
|
1589
1590
|
"margin-bottom": "8px",
|
|
1590
1591
|
height: "30px"
|
|
1591
|
-
} },
|
|
1592
|
+
} }, Yt = { key: 0 }, Xt = { style: {
|
|
1592
1593
|
"overflow-y": "auto",
|
|
1593
1594
|
height: "90%"
|
|
1594
|
-
} },
|
|
1595
|
+
} }, Zt = { style: {
|
|
1595
1596
|
display: "flex",
|
|
1596
1597
|
"justify-content": "end",
|
|
1597
1598
|
"align-items": "center"
|
|
1598
|
-
} },
|
|
1599
|
+
} }, Qt = /* @__PURE__ */ V(/* @__PURE__ */ u({
|
|
1599
1600
|
__name: "dialog",
|
|
1600
1601
|
props: {
|
|
1601
1602
|
modelValue: {},
|
|
@@ -1609,40 +1610,40 @@ var zt = /* @__PURE__ */ u({
|
|
|
1609
1610
|
},
|
|
1610
1611
|
emits: ["update:modelValue", "change"],
|
|
1611
1612
|
setup(n, { expose: o, emit: s }) {
|
|
1612
|
-
let u = s, d =
|
|
1613
|
+
let u = s, d = F(), f = n, p = f.valueAt ?? "all", m = C(), _ = C(!1), v = new Headers({
|
|
1613
1614
|
"Content-Type": "application/json",
|
|
1614
1615
|
"X-Requested-With": "XMLHttpRequest",
|
|
1615
1616
|
token: localStorage.getItem("TOKEN") ?? "",
|
|
1616
1617
|
Accept: "application/json"
|
|
1617
|
-
}), y =
|
|
1618
|
+
}), y = S({
|
|
1618
1619
|
searchData: [],
|
|
1619
1620
|
staffData: [],
|
|
1620
1621
|
loading: !1,
|
|
1621
1622
|
filterText: "",
|
|
1622
1623
|
requiredVisible: !1
|
|
1623
|
-
}),
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
}),
|
|
1627
|
-
_.value &&
|
|
1624
|
+
}), b = C([]), T = C([]), D = t(() => y.searchData?.length ? y.searchData : y.staffData), O = t(() => f.required ?? d?.required ?? !1);
|
|
1625
|
+
L(() => {
|
|
1626
|
+
T.value = Ht(f.modelValue || []);
|
|
1627
|
+
}), L(() => {
|
|
1628
|
+
_.value && k();
|
|
1628
1629
|
});
|
|
1629
|
-
async function
|
|
1630
|
-
let e = await fetch(
|
|
1630
|
+
async function k() {
|
|
1631
|
+
let e = await fetch(X + "/department/queryDepartmentTree", {
|
|
1631
1632
|
method: "GET",
|
|
1632
1633
|
headers: v
|
|
1633
1634
|
}).then((e) => e.json());
|
|
1634
|
-
y.staffData = e.data || [], e.data?.[0] &&
|
|
1635
|
+
y.staffData = e.data || [], e.data?.[0] && M(e.data?.[0]);
|
|
1635
1636
|
}
|
|
1636
|
-
async function
|
|
1637
|
-
return fetch(
|
|
1637
|
+
async function A(e) {
|
|
1638
|
+
return fetch(X + "/user/pageQueryUser", {
|
|
1638
1639
|
method: "POST",
|
|
1639
1640
|
headers: v,
|
|
1640
1641
|
body: JSON.stringify(e)
|
|
1641
1642
|
}).then((e) => e.json());
|
|
1642
1643
|
}
|
|
1643
|
-
async function
|
|
1644
|
+
async function M(e, t) {
|
|
1644
1645
|
let n = !!e?.data?.code, r = e?.data?.code || e?.code;
|
|
1645
|
-
return !r || e?.data?.account ? t?.([]) : (y.loading = !0,
|
|
1646
|
+
return !r || e?.data?.account ? t?.([]) : (y.loading = !0, A({
|
|
1646
1647
|
page: 1,
|
|
1647
1648
|
pageSize: 9999,
|
|
1648
1649
|
departmentCode: r
|
|
@@ -1652,27 +1653,27 @@ var zt = /* @__PURE__ */ u({
|
|
|
1652
1653
|
...e,
|
|
1653
1654
|
code: e.account
|
|
1654
1655
|
}));
|
|
1655
|
-
n ? e.data.children =
|
|
1656
|
+
n ? e.data.children = Ut([...r, ...e.data.children || []], "code") : e.children = Ut([...r, ...e.children || []], "code"), y.loading = !1;
|
|
1656
1657
|
}), t?.(e?.children || []));
|
|
1657
1658
|
}
|
|
1658
|
-
function
|
|
1659
|
+
function N(e, { data: t }) {
|
|
1659
1660
|
let n = y.searchData?.length > 0;
|
|
1660
1661
|
return t?.account ? e("div", { style: { display: "flex" } }, [e("el-icon", { style: {
|
|
1661
1662
|
width: "14px",
|
|
1662
1663
|
height: "14px"
|
|
1663
1664
|
} }, e(K)), n ? t.fullName : t.name]) : n ? t.fullName : t.name;
|
|
1664
1665
|
}
|
|
1665
|
-
function
|
|
1666
|
-
if (
|
|
1666
|
+
function ee(e) {
|
|
1667
|
+
if (T.value = T.value.filter((t) => t !== e), m.value) {
|
|
1667
1668
|
let t = e.match(/\((.*?)\)/)?.[1];
|
|
1668
|
-
|
|
1669
|
-
|
|
1669
|
+
g(() => {
|
|
1670
|
+
m.value?.setChecked(t, !1);
|
|
1670
1671
|
});
|
|
1671
1672
|
}
|
|
1672
1673
|
}
|
|
1673
|
-
async function
|
|
1674
|
+
async function te() {
|
|
1674
1675
|
if (!y.filterText?.trim()) return y.searchData = [];
|
|
1675
|
-
let e = await
|
|
1676
|
+
let e = await A({
|
|
1676
1677
|
page: 1,
|
|
1677
1678
|
pageSize: 9999,
|
|
1678
1679
|
name: y.filterText?.trim()
|
|
@@ -1683,39 +1684,39 @@ var zt = /* @__PURE__ */ u({
|
|
|
1683
1684
|
code: e.account
|
|
1684
1685
|
}));
|
|
1685
1686
|
}
|
|
1686
|
-
function
|
|
1687
|
+
function I(e, t) {
|
|
1687
1688
|
let n = (t?.checkedNodes.filter((e) => e.account)).map((e) => `${e.name}(${e.account})`);
|
|
1688
|
-
|
|
1689
|
+
T.value = Ht(T.value.concat(n));
|
|
1689
1690
|
}
|
|
1690
|
-
function
|
|
1691
|
-
let e = p === "all" ?
|
|
1691
|
+
function ne() {
|
|
1692
|
+
let e = p === "all" ? T.value : T.value?.map((e) => {
|
|
1692
1693
|
let [t, n] = e.split("(");
|
|
1693
1694
|
return {
|
|
1694
1695
|
name: t.trim(),
|
|
1695
1696
|
account: n?.replace(")", "")
|
|
1696
1697
|
}[p] || e.trim();
|
|
1697
1698
|
});
|
|
1698
|
-
u("change", e), u("update:modelValue", e), _.value = !1,
|
|
1699
|
+
u("change", e), u("update:modelValue", e), _.value = !1, z();
|
|
1699
1700
|
}
|
|
1700
|
-
function
|
|
1701
|
+
function ae() {
|
|
1701
1702
|
u("update:modelValue", void 0), _.value = !1;
|
|
1702
1703
|
}
|
|
1703
|
-
function
|
|
1704
|
-
return y.requiredVisible = O.value &&
|
|
1704
|
+
function z() {
|
|
1705
|
+
return y.requiredVisible = O.value && T.value.length === 0, y.requiredVisible;
|
|
1705
1706
|
}
|
|
1706
|
-
return o({ validate:
|
|
1707
|
-
let o =
|
|
1708
|
-
return
|
|
1707
|
+
return o({ validate: z }), (t, n) => {
|
|
1708
|
+
let o = E("el-select"), s = E("el-input"), u = E("el-tree"), d = E("el-icon"), p = E("el-button"), g = E("el-dialog");
|
|
1709
|
+
return x(), i(e, null, [a("div", {
|
|
1709
1710
|
class: "staff-select-trigger",
|
|
1710
1711
|
onClick: n[1] ||= (e) => !f.disabled && (_.value = !0)
|
|
1711
|
-
}, [l(o,
|
|
1712
|
+
}, [l(o, h({
|
|
1712
1713
|
...t.$attrs,
|
|
1713
1714
|
...t.$props
|
|
1714
1715
|
}, {
|
|
1715
|
-
modelValue:
|
|
1716
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
1716
|
+
modelValue: T.value,
|
|
1717
|
+
"onUpdate:modelValue": n[0] ||= (e) => T.value = e,
|
|
1717
1718
|
class: { "is-required": y.requiredVisible },
|
|
1718
|
-
options:
|
|
1719
|
+
options: b.value,
|
|
1719
1720
|
placeholder: "请选择",
|
|
1720
1721
|
multiple: "",
|
|
1721
1722
|
disabled: f.disabled,
|
|
@@ -1728,7 +1729,7 @@ var zt = /* @__PURE__ */ u({
|
|
|
1728
1729
|
"class",
|
|
1729
1730
|
"options",
|
|
1730
1731
|
"disabled"
|
|
1731
|
-
])]), l(
|
|
1732
|
+
])]), l(g, {
|
|
1732
1733
|
modelValue: _.value,
|
|
1733
1734
|
"onUpdate:modelValue": n[3] ||= (e) => _.value = e,
|
|
1734
1735
|
style: {
|
|
@@ -1740,51 +1741,51 @@ var zt = /* @__PURE__ */ u({
|
|
|
1740
1741
|
"append-to-body": "",
|
|
1741
1742
|
"close-on-click-modal": !1
|
|
1742
1743
|
}, {
|
|
1743
|
-
default:
|
|
1744
|
+
default: R(() => [a("div", Gt, [a("div", Kt, [l(s, {
|
|
1744
1745
|
placeholder: "请输入",
|
|
1745
1746
|
modelValue: y.filterText,
|
|
1746
1747
|
"onUpdate:modelValue": n[2] ||= (e) => y.filterText = e,
|
|
1747
1748
|
clearable: "",
|
|
1748
|
-
"prefix-icon":
|
|
1749
|
-
onKeydown: te
|
|
1749
|
+
"prefix-icon": P(G),
|
|
1750
|
+
onKeydown: re(te, ["enter"])
|
|
1750
1751
|
}, null, 8, ["modelValue", "prefix-icon"]), l(u, {
|
|
1751
1752
|
loading: y.loading,
|
|
1752
1753
|
data: D.value,
|
|
1753
1754
|
props: { label: "fullName" },
|
|
1754
1755
|
"highlight-current": !0,
|
|
1755
|
-
"render-content":
|
|
1756
|
-
load:
|
|
1757
|
-
onCheck:
|
|
1756
|
+
"render-content": N,
|
|
1757
|
+
load: M,
|
|
1758
|
+
onCheck: I,
|
|
1758
1759
|
"show-checkbox": "",
|
|
1759
1760
|
lazy: "",
|
|
1760
1761
|
class: "staff-tree",
|
|
1761
1762
|
ref_key: "staffDialogRef",
|
|
1762
|
-
ref:
|
|
1763
|
+
ref: m,
|
|
1763
1764
|
"node-key": "code"
|
|
1764
|
-
}, null, 8, ["loading", "data"])]), a("div",
|
|
1765
|
+
}, null, 8, ["loading", "data"])]), a("div", qt, [a("div", Jt, [n[4] ||= a("h3", null, "已选择", -1), T.value.length ? (x(), i("span", Yt, "已选择" + j(T.value.length) + "个用户", 1)) : r("", !0)]), a("div", Xt, [(x(!0), i(e, null, w(T.value, (e) => (x(), i("li", {
|
|
1765
1766
|
key: e,
|
|
1766
1767
|
class: "staff-item"
|
|
1767
|
-
}, [a("span", null,
|
|
1768
|
+
}, [a("span", null, j(e), 1), l(d, {
|
|
1768
1769
|
color: "red",
|
|
1769
|
-
onClick:
|
|
1770
|
+
onClick: ie((t) => ee(e), ["stop"])
|
|
1770
1771
|
}, {
|
|
1771
|
-
default:
|
|
1772
|
+
default: R(() => [l(P(Pe))]),
|
|
1772
1773
|
_: 1
|
|
1773
|
-
}, 8, ["onClick"])]))), 128))])])]), a("div",
|
|
1774
|
-
default:
|
|
1774
|
+
}, 8, ["onClick"])]))), 128))])])]), a("div", Zt, [l(p, { onClick: ae }, {
|
|
1775
|
+
default: R(() => [...n[5] ||= [c("取消", -1)]]),
|
|
1775
1776
|
_: 1
|
|
1776
1777
|
}), l(p, {
|
|
1777
1778
|
type: "primary",
|
|
1778
|
-
onClick:
|
|
1779
|
+
onClick: ne
|
|
1779
1780
|
}, {
|
|
1780
|
-
default:
|
|
1781
|
+
default: R(() => [...n[6] ||= [c("确定", -1)]]),
|
|
1781
1782
|
_: 1
|
|
1782
1783
|
})])]),
|
|
1783
1784
|
_: 1
|
|
1784
1785
|
}, 8, ["modelValue"])], 64);
|
|
1785
1786
|
};
|
|
1786
1787
|
}
|
|
1787
|
-
}), [["__scopeId", "data-v-
|
|
1788
|
+
}), [["__scopeId", "data-v-5c901fff"]]), $t = /* @__PURE__ */ u({
|
|
1788
1789
|
__name: "index",
|
|
1789
1790
|
props: {
|
|
1790
1791
|
multiple: { type: Boolean },
|
|
@@ -1794,8 +1795,8 @@ var zt = /* @__PURE__ */ u({
|
|
|
1794
1795
|
token: {}
|
|
1795
1796
|
},
|
|
1796
1797
|
setup(e, { expose: t }) {
|
|
1797
|
-
let r = e, i =
|
|
1798
|
-
return t({ validate: () => i.value?.validate?.() }), (e, t) => (
|
|
1798
|
+
let r = e, i = C();
|
|
1799
|
+
return t({ validate: () => i.value?.validate?.() }), (e, t) => (x(), n(O(r?.type === "dialog" ? Qt : Wt), h({
|
|
1799
1800
|
ref_key: "staffSelectRef",
|
|
1800
1801
|
ref: i
|
|
1801
1802
|
}, {
|
|
@@ -1803,7 +1804,7 @@ var zt = /* @__PURE__ */ u({
|
|
|
1803
1804
|
...r
|
|
1804
1805
|
}), null, 16));
|
|
1805
1806
|
}
|
|
1806
|
-
}),
|
|
1807
|
+
}), en = /* @__PURE__ */ B({ default: () => tn }), tn = $t, nn = /* @__PURE__ */ V(/* @__PURE__ */ u({
|
|
1807
1808
|
__name: "file",
|
|
1808
1809
|
props: {
|
|
1809
1810
|
icon: {},
|
|
@@ -1819,31 +1820,31 @@ var zt = /* @__PURE__ */ u({
|
|
|
1819
1820
|
},
|
|
1820
1821
|
emits: ["change"],
|
|
1821
1822
|
setup(e, { emit: r }) {
|
|
1822
|
-
let i = e, { text: a = "选择文件", icon: o = void 0, size: u = "default" } = i, d = i, f =
|
|
1823
|
+
let i = e, { text: a = "选择文件", icon: o = void 0, size: u = "default" } = i, d = i, f = F(), p = f.disabled, m = t(() => d.limit && f.count < d?.limit), g = t(() => d.limit && f.count >= d?.limit), _ = t(() => d.limit === void 0 ? !1 : !m.value);
|
|
1823
1824
|
return (e, t) => {
|
|
1824
|
-
let r =
|
|
1825
|
-
return
|
|
1825
|
+
let r = E("el-button"), i = E("el-upload");
|
|
1826
|
+
return x(), n(i, h(e.$attrs, {
|
|
1826
1827
|
style: { width: "100%" },
|
|
1827
|
-
action:
|
|
1828
|
-
"file-list":
|
|
1829
|
-
limit:
|
|
1828
|
+
action: P(d).action,
|
|
1829
|
+
"file-list": P(d).fileList,
|
|
1830
|
+
limit: P(d).limit,
|
|
1830
1831
|
class: {
|
|
1831
|
-
"hide-upload-list":
|
|
1832
|
+
"hide-upload-list": m.value,
|
|
1832
1833
|
"hide-upload-text": g.value
|
|
1833
1834
|
}
|
|
1834
1835
|
}), s({
|
|
1835
|
-
default:
|
|
1836
|
+
default: R(() => [T(e.$slots, "tip", {}, void 0, !0)]),
|
|
1836
1837
|
_: 2
|
|
1837
1838
|
}, [_.value ? void 0 : {
|
|
1838
1839
|
name: "trigger",
|
|
1839
|
-
fn:
|
|
1840
|
+
fn: R(() => [l(r, {
|
|
1840
1841
|
type: "primary",
|
|
1841
1842
|
plain: "",
|
|
1842
|
-
icon:
|
|
1843
|
-
size:
|
|
1844
|
-
disabled:
|
|
1843
|
+
icon: P(o),
|
|
1844
|
+
size: P(u),
|
|
1845
|
+
disabled: P(p)
|
|
1845
1846
|
}, {
|
|
1846
|
-
default:
|
|
1847
|
+
default: R(() => [c(j(P(a)), 1)]),
|
|
1847
1848
|
_: 1
|
|
1848
1849
|
}, 8, [
|
|
1849
1850
|
"icon",
|
|
@@ -1859,7 +1860,7 @@ var zt = /* @__PURE__ */ u({
|
|
|
1859
1860
|
]);
|
|
1860
1861
|
};
|
|
1861
1862
|
}
|
|
1862
|
-
}), [["__scopeId", "data-v-ee74ad23"]]),
|
|
1863
|
+
}), [["__scopeId", "data-v-ee74ad23"]]), rn = ["src"], an = /* @__PURE__ */ u({
|
|
1863
1864
|
__name: "image",
|
|
1864
1865
|
props: {
|
|
1865
1866
|
icon: {},
|
|
@@ -1874,13 +1875,13 @@ var zt = /* @__PURE__ */ u({
|
|
|
1874
1875
|
onChange: { type: Function }
|
|
1875
1876
|
},
|
|
1876
1877
|
setup(t) {
|
|
1877
|
-
let n = t, r =
|
|
1878
|
+
let n = t, r = C({}), o = C(!1);
|
|
1878
1879
|
function s(e) {
|
|
1879
1880
|
r.value = e, o.value = !0;
|
|
1880
1881
|
}
|
|
1881
1882
|
return (t, c) => {
|
|
1882
|
-
let u =
|
|
1883
|
-
return
|
|
1883
|
+
let u = E("el-icon"), d = E("el-upload"), f = E("el-dialog");
|
|
1884
|
+
return x(), i(e, null, [l(d, h({
|
|
1884
1885
|
accept: "image/*",
|
|
1885
1886
|
action: n.action,
|
|
1886
1887
|
"auto-upload": !1
|
|
@@ -1888,8 +1889,8 @@ var zt = /* @__PURE__ */ u({
|
|
|
1888
1889
|
"list-type": "picture-card",
|
|
1889
1890
|
"on-preview": s
|
|
1890
1891
|
}), {
|
|
1891
|
-
default:
|
|
1892
|
-
default:
|
|
1892
|
+
default: R(() => [l(u, null, {
|
|
1893
|
+
default: R(() => [l(P(Le))]),
|
|
1893
1894
|
_: 1
|
|
1894
1895
|
})]),
|
|
1895
1896
|
_: 1
|
|
@@ -1897,16 +1898,16 @@ var zt = /* @__PURE__ */ u({
|
|
|
1897
1898
|
modelValue: o.value,
|
|
1898
1899
|
"onUpdate:modelValue": c[0] ||= (e) => o.value = e
|
|
1899
1900
|
}, {
|
|
1900
|
-
default:
|
|
1901
|
+
default: R(() => [a("img", {
|
|
1901
1902
|
"w-full": "",
|
|
1902
1903
|
src: r.value.url,
|
|
1903
1904
|
alt: "预览"
|
|
1904
|
-
}, null, 8,
|
|
1905
|
+
}, null, 8, rn)]),
|
|
1905
1906
|
_: 1
|
|
1906
1907
|
}, 8, ["modelValue"])], 64);
|
|
1907
1908
|
};
|
|
1908
1909
|
}
|
|
1909
|
-
}),
|
|
1910
|
+
}), on = /* @__PURE__ */ u({
|
|
1910
1911
|
__name: "index",
|
|
1911
1912
|
props: {
|
|
1912
1913
|
icon: {},
|
|
@@ -1937,27 +1938,27 @@ var zt = /* @__PURE__ */ u({
|
|
|
1937
1938
|
"fileList",
|
|
1938
1939
|
"limit",
|
|
1939
1940
|
"action"
|
|
1940
|
-
]), s =
|
|
1941
|
-
get: () =>
|
|
1941
|
+
]), s = X + "/attachment/uploadAttachment", c = e.action || s, l = C(), u = C(0), d = { token: localStorage.getItem("TOKEN") || "" }, f = t({
|
|
1942
|
+
get: () => N(e.fileList) || [],
|
|
1942
1943
|
set: (e) => i("update:fileList", e)
|
|
1943
1944
|
});
|
|
1944
|
-
|
|
1945
|
-
u.value =
|
|
1945
|
+
y(async () => {
|
|
1946
|
+
u.value = N(e.fileList)?.length || 0;
|
|
1946
1947
|
});
|
|
1947
1948
|
function p(t, n) {
|
|
1948
1949
|
let r = Array.isArray(n) ? n : [];
|
|
1949
1950
|
e.onChange?.(r, t), f.value = r, i("update:modelValue", r), i("change", r), u.value = r.length;
|
|
1950
1951
|
}
|
|
1951
|
-
function
|
|
1952
|
+
function m() {
|
|
1952
1953
|
e.limit && H.Message.warning(`最多只能上传 ${e.limit} 个文件`);
|
|
1953
1954
|
}
|
|
1954
1955
|
function g(e, t) {
|
|
1955
|
-
i("update:modelValue",
|
|
1956
|
+
i("update:modelValue", N(t)), i("remove", N(t)), u.value = t.length;
|
|
1956
1957
|
}
|
|
1957
1958
|
function _(e, t) {
|
|
1958
|
-
let n =
|
|
1959
|
+
let n = N(f);
|
|
1959
1960
|
if (e?.code !== "ok") return H.Message.error(e?.message);
|
|
1960
|
-
let r =
|
|
1961
|
+
let r = X + `/attachment/downloadAttachment?objectKey=${e.data?.objectKey}&fileName=${e.data?.fileName}&token=${d.token}`;
|
|
1961
1962
|
n?.some((t) => t?.objectKey === e.data?.objectKey) || n.push({
|
|
1962
1963
|
name: t.name,
|
|
1963
1964
|
uid: t.uid,
|
|
@@ -1965,22 +1966,22 @@ var zt = /* @__PURE__ */ u({
|
|
|
1965
1966
|
status: "success",
|
|
1966
1967
|
...e.data,
|
|
1967
1968
|
url: r
|
|
1968
|
-
}), f.value = [...n], i("update:modelValue",
|
|
1969
|
+
}), f.value = [...n], i("update:modelValue", N(f)), i("success", N(f)), u.value = n.length;
|
|
1969
1970
|
}
|
|
1970
|
-
function
|
|
1971
|
+
function v(e, t, n) {
|
|
1971
1972
|
i("update:modelValue", n);
|
|
1972
1973
|
}
|
|
1973
|
-
return (t, r) => (
|
|
1974
|
+
return (t, r) => (x(), n(O(e.type === "image" ? an : nn), h({
|
|
1974
1975
|
ref_key: "uploadInstance",
|
|
1975
1976
|
ref: l,
|
|
1976
1977
|
name: "file",
|
|
1977
|
-
action:
|
|
1978
|
+
action: P(c),
|
|
1978
1979
|
headers: d,
|
|
1979
1980
|
"on-change": p,
|
|
1980
|
-
"on-exceed":
|
|
1981
|
+
"on-exceed": m,
|
|
1981
1982
|
"on-remove": g,
|
|
1982
1983
|
"on-success": _,
|
|
1983
|
-
"on-error":
|
|
1984
|
+
"on-error": v,
|
|
1984
1985
|
"file-list": f.value,
|
|
1985
1986
|
count: u.value,
|
|
1986
1987
|
limit: e.limit
|
|
@@ -1991,7 +1992,7 @@ var zt = /* @__PURE__ */ u({
|
|
|
1991
1992
|
"limit"
|
|
1992
1993
|
]));
|
|
1993
1994
|
}
|
|
1994
|
-
}),
|
|
1995
|
+
}), sn = /* @__PURE__ */ B({ default: () => cn }), cn = on, ln = {
|
|
1995
1996
|
mounted(e, t) {
|
|
1996
1997
|
let n = t.value || {}, r = n.target || "body", i = n.top || 0;
|
|
1997
1998
|
e._stickyOriginalStyles = {
|
|
@@ -2016,46 +2017,290 @@ var zt = /* @__PURE__ */ u({
|
|
|
2016
2017
|
unmounted(e) {
|
|
2017
2018
|
e._stickyScrollListener && window.removeEventListener("scroll", e._stickyScrollListener), e._stickyOriginalStyles && (e.style.position = e._stickyOriginalStyles.position, e.style.top = e._stickyOriginalStyles.top, e.style.zIndex = e._stickyOriginalStyles.zIndex, e.style.width = e._stickyOriginalStyles.width);
|
|
2018
2019
|
}
|
|
2019
|
-
},
|
|
2020
|
+
}, un = { mounted(e) {
|
|
2020
2021
|
e.style.boxShadow = "0px 0px 12px rgba(0, 0, 0, 0.12)", e.style.padding = "20px", e.style.borderRadius = "4px", e.style.border = "1px solid #e4e7ed", e.style.backgroundColor = "#fff";
|
|
2021
|
-
} },
|
|
2022
|
-
card: () =>
|
|
2023
|
-
sticky: () =>
|
|
2024
|
-
}),
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2022
|
+
} }, dn = /* @__PURE__ */ B({
|
|
2023
|
+
card: () => un,
|
|
2024
|
+
sticky: () => ln
|
|
2025
|
+
}), Z = window.origin?.includes("localhost") || window.origin?.includes("127.0.0.1") ? "/api" : "/intellicit-service";
|
|
2026
|
+
//#endregion
|
|
2027
|
+
//#region src/hooks/useFetch.ts
|
|
2028
|
+
function fn(e, t = {}) {
|
|
2029
|
+
let { immediate: n = !0, method: r = "GET", onBefore: i, onSuccess: a, onError: o, onFinally: s, ...c } = t, l = localStorage.getItem("TOKEN"), u = {
|
|
2030
|
+
method: r,
|
|
2031
|
+
headers: new Headers({
|
|
2032
|
+
"Content-Type": "application/json",
|
|
2033
|
+
token: l ?? "",
|
|
2034
|
+
...c.headers || {}
|
|
2035
|
+
})
|
|
2036
|
+
}, d = C(!1), f = C(null), m = C(null), h = S({}), _ = !1;
|
|
2037
|
+
async function v() {
|
|
2038
|
+
if (_) return Promise.reject(/* @__PURE__ */ Error("请求正在进行中,请勿重复触发"));
|
|
2039
|
+
_ = !0, d.value = !0, m.value = null;
|
|
2040
|
+
try {
|
|
2041
|
+
let t = Z + e;
|
|
2042
|
+
if (i?.(u) === !1) return Promise.reject(/* @__PURE__ */ Error("请求被 onBefore 钩子取消"));
|
|
2043
|
+
if (r === "GET") {
|
|
2044
|
+
let e = new URLSearchParams(M(h)).toString();
|
|
2045
|
+
e && (t = `${t}?${e}`);
|
|
2046
|
+
} else u.body = JSON.stringify(M(h));
|
|
2047
|
+
let n = await (await fetch(t, u)).json();
|
|
2048
|
+
return n.code ? ["return.optSuccess", "ok"].includes(n.code) || H.Message.error(n.message || "未知错误!") : n.data?.success || H.Message.error(n.message || "未知错误!"), f.value = n, a?.(n), n;
|
|
2049
|
+
} catch (e) {
|
|
2050
|
+
let t = e instanceof Error ? e : Error(String(e));
|
|
2051
|
+
throw m.value = t, console.error("请求发生错误:", t), o?.(t), t;
|
|
2052
|
+
} finally {
|
|
2053
|
+
d.value = !1, _ = !1, s?.();
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
let y = null;
|
|
2057
|
+
L(() => {
|
|
2058
|
+
Object.assign(h, N(c.defaultParams) || {}), y && clearTimeout(y), y = setTimeout(() => {
|
|
2059
|
+
let e = p(t.ready) ? t.ready.value : t.ready ?? !0;
|
|
2060
|
+
n && e && !_ && g(() => v());
|
|
2061
|
+
}, 10);
|
|
2062
|
+
});
|
|
2063
|
+
function b(e) {
|
|
2064
|
+
for (let e in h) h[e] = void 0;
|
|
2065
|
+
Object.assign(h, e);
|
|
2066
|
+
}
|
|
2067
|
+
return {
|
|
2068
|
+
execute: v,
|
|
2069
|
+
loading: d,
|
|
2070
|
+
data: f,
|
|
2071
|
+
error: m,
|
|
2072
|
+
params: h,
|
|
2073
|
+
setParams: b
|
|
2074
|
+
};
|
|
2075
|
+
}
|
|
2076
|
+
//#endregion
|
|
2077
|
+
//#region src/hooks/useTable/default.ts
|
|
2078
|
+
function pn(e, t) {
|
|
2079
|
+
let n = S({
|
|
2080
|
+
ignoreAttrs: [
|
|
2081
|
+
"tableName",
|
|
2082
|
+
"sort",
|
|
2083
|
+
...t?.ignoreAttrs || []
|
|
2084
|
+
],
|
|
2085
|
+
replaceAttrs: t?.replaceAttrs || {
|
|
2086
|
+
table: "table",
|
|
2087
|
+
total: "total"
|
|
2088
|
+
}
|
|
2089
|
+
}), r = A([]), i = S({
|
|
2090
|
+
total: 0,
|
|
2091
|
+
page: 1,
|
|
2092
|
+
pageSize: 10
|
|
2093
|
+
}), a = C([]), o = S({
|
|
2094
|
+
page: 1,
|
|
2095
|
+
pageSize: 10
|
|
2096
|
+
});
|
|
2097
|
+
if (t?.onBefore?.(o) === !1) return {
|
|
2098
|
+
loading: C(!1),
|
|
2099
|
+
data: r,
|
|
2100
|
+
pagination: i
|
|
2101
|
+
};
|
|
2102
|
+
let s = fn(e, {
|
|
2103
|
+
...t,
|
|
2104
|
+
defaultParams: o,
|
|
2105
|
+
onSuccess: (e) => {
|
|
2106
|
+
t?.onSuccess?.(e), i.total = e[n?.replaceAttrs?.total] || 0, r.value = e[n?.replaceAttrs?.table] || [];
|
|
2107
|
+
}
|
|
2108
|
+
});
|
|
2109
|
+
L(() => {
|
|
2110
|
+
let e = N(t.defaultParams || {});
|
|
2111
|
+
i.page = 1, i.pageSize = 10, Object.assign(o, {
|
|
2112
|
+
...e,
|
|
2113
|
+
page: 1,
|
|
2114
|
+
pageSize: 10
|
|
2115
|
+
});
|
|
2116
|
+
});
|
|
2117
|
+
function c(e = {}) {
|
|
2118
|
+
i.page = 1, i.pageSize = 10, e && (Object.keys(o).forEach((t) => {
|
|
2119
|
+
n.ignoreAttrs?.includes(t) || Object.keys(e).includes(t) || delete o[t];
|
|
2120
|
+
}), Object.assign(o, {
|
|
2121
|
+
...e,
|
|
2122
|
+
page: 1,
|
|
2123
|
+
pageSize: 10
|
|
2124
|
+
}));
|
|
2125
|
+
}
|
|
2126
|
+
function l({ page: e, pageSize: t }) {
|
|
2127
|
+
i.page = e, i.pageSize = t, Object.assign(o, {
|
|
2128
|
+
page: e,
|
|
2129
|
+
pageSize: t
|
|
2130
|
+
});
|
|
2131
|
+
}
|
|
2132
|
+
function u(e) {
|
|
2133
|
+
a.value = e;
|
|
2134
|
+
}
|
|
2135
|
+
return S({
|
|
2136
|
+
...s,
|
|
2137
|
+
data: r,
|
|
2138
|
+
pagination: i,
|
|
2139
|
+
selection: a,
|
|
2140
|
+
reset: c,
|
|
2141
|
+
updatePagination: l,
|
|
2142
|
+
selectionChange: u
|
|
2143
|
+
});
|
|
2144
|
+
}
|
|
2145
|
+
//#endregion
|
|
2146
|
+
//#region src/utils/request.ts
|
|
2147
|
+
var mn = new Headers({
|
|
2148
|
+
"Content-Type": "application/json",
|
|
2149
|
+
token: localStorage.getItem("TOKEN") || ""
|
|
2150
|
+
});
|
|
2151
|
+
async function hn(e, t) {
|
|
2152
|
+
let n = `${Z}${e}`;
|
|
2153
|
+
if (t) {
|
|
2154
|
+
let e = new URLSearchParams(t).toString();
|
|
2155
|
+
e && (n = `${n}?${e}`);
|
|
2156
|
+
}
|
|
2157
|
+
return (await fetch(n, {
|
|
2158
|
+
headers: mn,
|
|
2159
|
+
method: "GET"
|
|
2160
|
+
})).json();
|
|
2161
|
+
}
|
|
2162
|
+
async function gn(e, t) {
|
|
2163
|
+
return (await fetch(`${Z}${e}`, {
|
|
2164
|
+
headers: mn,
|
|
2165
|
+
method: "POST",
|
|
2166
|
+
body: JSON.stringify(t)
|
|
2167
|
+
})).json();
|
|
2168
|
+
}
|
|
2169
|
+
async function _n(e, t) {
|
|
2170
|
+
return (await fetch(`${Z}${e}`, {
|
|
2171
|
+
headers: mn,
|
|
2172
|
+
method: "POST",
|
|
2173
|
+
body: JSON.stringify(t)
|
|
2174
|
+
})).blob();
|
|
2175
|
+
}
|
|
2176
|
+
var Q = {
|
|
2177
|
+
get: hn,
|
|
2178
|
+
post: gn,
|
|
2179
|
+
blob: _n
|
|
2180
|
+
};
|
|
2181
|
+
//#endregion
|
|
2182
|
+
//#region src/hooks/useTable/common.ts
|
|
2183
|
+
function vn(e, n) {
|
|
2184
|
+
let { defaultParams: r, ...i } = n, a = (e) => {
|
|
2185
|
+
let { tableId: t, page: n, pageSize: r, sort: i, ...a } = JSON.parse(JSON.stringify(e || {}));
|
|
2186
|
+
return {
|
|
2187
|
+
tableId: t,
|
|
2188
|
+
page: n || 1,
|
|
2189
|
+
pageSize: r || 10,
|
|
2190
|
+
params: {
|
|
2191
|
+
...a,
|
|
2192
|
+
sort: i
|
|
2193
|
+
}
|
|
2194
|
+
};
|
|
2195
|
+
}, o = pn(e, {
|
|
2196
|
+
...i,
|
|
2197
|
+
ready: t(() => {
|
|
2198
|
+
let e = p(n.ready) ? n.ready.value : n.ready, t = !!N(r)?.tableId;
|
|
2199
|
+
return (e === void 0 || e) && t;
|
|
2200
|
+
}),
|
|
2201
|
+
defaultParams: t(() => a(N(r))),
|
|
2202
|
+
ignoreAttrs: [
|
|
2203
|
+
"tableName",
|
|
2204
|
+
"sort",
|
|
2205
|
+
...n?.ignoreAttrs || []
|
|
2206
|
+
]
|
|
2207
|
+
});
|
|
2208
|
+
function s(e = {}) {
|
|
2209
|
+
if (e) {
|
|
2210
|
+
let e = N(r), t = e?.sort ? { sort: e.sort } : {};
|
|
2211
|
+
Object.assign(e, {
|
|
2212
|
+
...t,
|
|
2213
|
+
page: 1,
|
|
2214
|
+
pageSize: 10
|
|
2215
|
+
});
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
async function c(e) {
|
|
2219
|
+
let t = N(r);
|
|
2220
|
+
return Q.post("/common/insert", {
|
|
2221
|
+
params: { ...e },
|
|
2222
|
+
tableId: t?.tableId
|
|
2223
|
+
});
|
|
2224
|
+
}
|
|
2225
|
+
async function l(e) {
|
|
2226
|
+
let t = N(r);
|
|
2227
|
+
return Q.post("/common/update", {
|
|
2228
|
+
params: { ...e },
|
|
2229
|
+
tableId: t?.tableId
|
|
2230
|
+
});
|
|
2231
|
+
}
|
|
2232
|
+
async function u(e) {
|
|
2233
|
+
let t = N(r);
|
|
2234
|
+
return Q.post("/common/delete", {
|
|
2235
|
+
idList: e,
|
|
2236
|
+
tableId: t?.tableId
|
|
2237
|
+
});
|
|
2238
|
+
}
|
|
2239
|
+
async function d(e, t) {
|
|
2240
|
+
let { title: n = "export" } = e || {}, i = N(r), a = await Q.blob(t ?? "/common/exportExcel", {
|
|
2241
|
+
tableId: i?.tableId,
|
|
2242
|
+
type: "all"
|
|
2243
|
+
}), o = document.createElement("a");
|
|
2244
|
+
o.href = window.URL.createObjectURL(a), o.download = `${n}.xlsx`, o.click(), H.Message.success("导出成功"), window.URL.revokeObjectURL(o.href);
|
|
2245
|
+
}
|
|
2246
|
+
let f = S({
|
|
2247
|
+
loading: !1,
|
|
2248
|
+
data: [],
|
|
2249
|
+
insert: c,
|
|
2250
|
+
update: l,
|
|
2251
|
+
remove: u,
|
|
2252
|
+
delete: u,
|
|
2253
|
+
exportData: d
|
|
2254
|
+
});
|
|
2255
|
+
return L(() => {
|
|
2256
|
+
Object.assign(f, o, { reset: s });
|
|
2257
|
+
}), f;
|
|
2258
|
+
}
|
|
2259
|
+
//#endregion
|
|
2260
|
+
//#region src/hooks/useTable/index.ts
|
|
2261
|
+
function yn(e, t) {
|
|
2262
|
+
return e?.includes("/common/pageQuery") ? vn(e, t) : pn(e, t);
|
|
2263
|
+
}
|
|
2264
|
+
//#endregion
|
|
2265
|
+
//#region src/hooks/index.ts
|
|
2266
|
+
var bn = /* @__PURE__ */ B({
|
|
2267
|
+
useFetch: () => fn,
|
|
2268
|
+
useTable: () => yn
|
|
2269
|
+
}), xn = "Yc", Sn = {
|
|
2270
|
+
UiCard: ce,
|
|
2271
|
+
UiTable: Oe,
|
|
2272
|
+
UiFilter: it,
|
|
2273
|
+
UiForm: ut,
|
|
2274
|
+
UiEditor: mt,
|
|
2275
|
+
UiTree: Ct,
|
|
2276
|
+
UiInfiniteScroll: jt,
|
|
2277
|
+
UiDescriptions: It,
|
|
2278
|
+
UiDialog: Bt,
|
|
2279
|
+
UiStaffSelect: en,
|
|
2280
|
+
UiUpload: sn
|
|
2281
|
+
}, Cn = null;
|
|
2282
|
+
function wn(e) {
|
|
2283
|
+
Cn = e;
|
|
2039
2284
|
}
|
|
2040
2285
|
function $() {
|
|
2041
|
-
return
|
|
2286
|
+
return Cn;
|
|
2042
2287
|
}
|
|
2043
|
-
var
|
|
2044
|
-
t?.elementPlus && t.elementPlus.install(e),
|
|
2288
|
+
var Tn = { install(e, t) {
|
|
2289
|
+
t?.elementPlus && t.elementPlus.install(e), Cn ||= {
|
|
2045
2290
|
...e,
|
|
2046
2291
|
h: f
|
|
2047
2292
|
};
|
|
2048
|
-
for (let [t, n] of Object.entries(
|
|
2293
|
+
for (let [t, n] of Object.entries(Sn)) {
|
|
2049
2294
|
let r = n?.default || n;
|
|
2050
2295
|
if (r && (typeof r == "function" || typeof r == "object")) {
|
|
2051
|
-
let n = t.replace(/^Ui/,
|
|
2296
|
+
let n = t.replace(/^Ui/, xn);
|
|
2052
2297
|
e.component(n, r);
|
|
2053
2298
|
let i = n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2054
2299
|
i !== n && e.component(i, r);
|
|
2055
2300
|
}
|
|
2056
2301
|
}
|
|
2057
|
-
for (let [t, n] of Object.entries(
|
|
2058
|
-
for (let [t, n] of Object.entries(
|
|
2302
|
+
for (let [t, n] of Object.entries($e)) e.component(t, n), e.component(t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), n);
|
|
2303
|
+
for (let [t, n] of Object.entries(dn)) (typeof n == "function" || typeof n == "object") && e.directive(t, n);
|
|
2059
2304
|
} };
|
|
2060
2305
|
//#endregion
|
|
2061
|
-
export {
|
|
2306
|
+
export { ce as UiCard, It as UiDescriptions, Bt as UiDialog, mt as UiEditor, it as UiFilter, ut as UiForm, jt as UiInfiniteScroll, en as UiStaffSelect, Oe as UiTable, Ct as UiTree, sn as UiUpload, Tn as default, Tn as ycPlugin, $ as getHostVue, bn as hooks, wn as setHostVue };
|