morghulis 4.3.5 → 4.3.6
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/index.cjs +4 -4
- package/dist/index.js +1724 -1730
- package/dist/style.css +1 -1
- package/dist/types/components/cell/MCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/char/CharCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/char/ColorCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/char/IconCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/char/MultiSetCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/char/SetCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/date/DateArrayCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/date/DateCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/date/DateRangeCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/date/TimeCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/date/TimeRangeCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/refer/AutoCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/refer/CascadeCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/refer/SelectCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/refer/TransferCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/refer/TreeCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/simple/BooleanCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/simple/DefaultCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/simple/NumberCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/special/FileCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/special/ObjectCell.vue.d.ts +2 -2
- package/dist/types/components/cell/instances/special/RichCell.vue.d.ts +2 -2
- package/dist/types/components/editor/MTransferEditor.vue.d.ts +2 -2
- package/dist/types/components/table/consts.d.ts +1 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,11 +4,11 @@ import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D
|
|
|
4
4
|
import { FontAwesomeIcon as Gt } from "@fortawesome/vue-fontawesome";
|
|
5
5
|
import { createGlobalState as Kt, useClipboard as qt, useElementSize as Jt, useInterval as Yt, useParentElement as Xt, useStorage as Zt, useVModel as W, useWebSocket as Qt, useWindowSize as $t } from "@vueuse/core";
|
|
6
6
|
import { createRouter as en, createWebHistory as tn, useRoute as nn, useRouter as rn } from "vue-router";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
7
|
+
import { cloneDeep as an, difference as on, intersection as sn, isEmpty as cn, isEqual as ln, mapValues as un, merge as dn, pick as fn, range as pn } from "lodash-es";
|
|
8
|
+
import { ElLoading as mn, ElMessage as hn, ElMessageBox as gn } from "element-plus";
|
|
9
|
+
import { nanoid as _n } from "nanoid";
|
|
10
|
+
import vn from "axios";
|
|
11
|
+
import yn from "nprogress";
|
|
12
12
|
import bn from "sortablejs";
|
|
13
13
|
//#region \0rolldown/runtime.js
|
|
14
14
|
var xn = Object.defineProperty, Sn = (e, t) => {
|
|
@@ -317,837 +317,10 @@ var Mn = /*#__PURE__*/ wn(An, [["render", jn]]), Nn = /* @__PURE__ */ M({
|
|
|
317
317
|
"before-init": s
|
|
318
318
|
}, null, 512), j(V($), { erf: "createRef" })], 64));
|
|
319
319
|
}
|
|
320
|
-
}), Pn =
|
|
321
|
-
let e = Ft([]), t = ["handler", "token"];
|
|
322
|
-
function n(n) {
|
|
323
|
-
let r = pn(n, t);
|
|
324
|
-
return e.findIndex((e) => un(pn(e, t), r));
|
|
325
|
-
}
|
|
326
|
-
function r(t) {
|
|
327
|
-
return e.filter((e) => e.handler === t);
|
|
328
|
-
}
|
|
329
|
-
function i(t) {
|
|
330
|
-
n(t) < 0 && e.push(t);
|
|
331
|
-
}
|
|
332
|
-
function a(t) {
|
|
333
|
-
let r = n(t);
|
|
334
|
-
r > -1 && e.splice(r, 1);
|
|
335
|
-
}
|
|
336
|
-
return {
|
|
337
|
-
mount: i,
|
|
338
|
-
unmount: a,
|
|
339
|
-
container: e,
|
|
340
|
-
findAll: r
|
|
341
|
-
};
|
|
342
|
-
});
|
|
343
|
-
//#endregion
|
|
344
|
-
//#region morghulis/library/use-feedback/index.ts
|
|
345
|
-
function J() {
|
|
346
|
-
let e = "body", t = {
|
|
347
|
-
confirmButtonText: "确认",
|
|
348
|
-
cancelButtonText: "取消"
|
|
349
|
-
}, n = {
|
|
350
|
-
info: (t) => vn.info({
|
|
351
|
-
message: t,
|
|
352
|
-
grouping: !0,
|
|
353
|
-
appendTo: e
|
|
354
|
-
}),
|
|
355
|
-
success: (t) => vn.success({
|
|
356
|
-
message: t,
|
|
357
|
-
grouping: !0,
|
|
358
|
-
appendTo: e
|
|
359
|
-
}),
|
|
360
|
-
warning: (t) => vn.warning({
|
|
361
|
-
message: t,
|
|
362
|
-
grouping: !0,
|
|
363
|
-
appendTo: e
|
|
364
|
-
}),
|
|
365
|
-
error: (t) => vn.error({
|
|
366
|
-
message: t,
|
|
367
|
-
grouping: !0,
|
|
368
|
-
appendTo: e
|
|
369
|
-
})
|
|
370
|
-
};
|
|
371
|
-
return {
|
|
372
|
-
$message: n,
|
|
373
|
-
$confirm: {
|
|
374
|
-
info: (e, n) => yn.confirm(e, {
|
|
375
|
-
type: "info",
|
|
376
|
-
...t
|
|
377
|
-
}),
|
|
378
|
-
success: (e, n) => yn.confirm(e, n, {
|
|
379
|
-
type: "success",
|
|
380
|
-
...t
|
|
381
|
-
}),
|
|
382
|
-
warning: (e, n) => yn.confirm(e, n, {
|
|
383
|
-
type: "warning",
|
|
384
|
-
...t
|
|
385
|
-
}),
|
|
386
|
-
error: (e, n) => yn.confirm(e, n, {
|
|
387
|
-
type: "error",
|
|
388
|
-
...t
|
|
389
|
-
})
|
|
390
|
-
},
|
|
391
|
-
$$message: (e, t) => n[t](e)
|
|
392
|
-
};
|
|
393
|
-
}
|
|
394
|
-
//#endregion
|
|
395
|
-
//#region morghulis/library/store-user/index.ts
|
|
396
|
-
var Fn = Kt(() => {
|
|
397
|
-
let e = rn(), t = I("account"), n = Zt("TOKEN", ""), r = Zt("CLIENT", "");
|
|
398
|
-
r.value ||= an().replace(/-/g, "_");
|
|
399
|
-
let i = I(""), a = T(() => !!n.value), o = T(() => In(n.value)), s = T(() => In(i.value));
|
|
400
|
-
function c(e) {
|
|
401
|
-
i.value = "", n.value = e;
|
|
402
|
-
}
|
|
403
|
-
function l() {
|
|
404
|
-
i.value = "", n.value = "", e.push("/").then();
|
|
405
|
-
}
|
|
406
|
-
function u(e) {
|
|
407
|
-
i.value = e;
|
|
408
|
-
}
|
|
409
|
-
return {
|
|
410
|
-
token: n,
|
|
411
|
-
is_login: a,
|
|
412
|
-
client: r,
|
|
413
|
-
account: o,
|
|
414
|
-
user: s,
|
|
415
|
-
system: t,
|
|
416
|
-
sign_in: c,
|
|
417
|
-
register: u,
|
|
418
|
-
sign_out: l
|
|
419
|
-
};
|
|
420
|
-
});
|
|
421
|
-
function In(e) {
|
|
422
|
-
if (!e) return {};
|
|
423
|
-
let t = e.split(".")[1];
|
|
424
|
-
if (!t) return {};
|
|
425
|
-
let n = t.replace(/-/g, "+").replace(/_/g, "/");
|
|
426
|
-
return JSON.parse(decodeURIComponent(atob(n).split("").map((e) => "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2)).join("")));
|
|
427
|
-
}
|
|
428
|
-
//#endregion
|
|
429
|
-
//#region morghulis/library/use-request/index.ts
|
|
430
|
-
function Y(e) {
|
|
431
|
-
let t = zt(e), { $$message: n } = J(), { base_url: r } = Q(), { client: i, token: a, sign_out: o, account: s } = Fn();
|
|
432
|
-
rn();
|
|
433
|
-
let c = I(!1);
|
|
434
|
-
console.log(r.value);
|
|
435
|
-
let l = hn.create({ baseURL: r.value });
|
|
436
|
-
l.interceptors.request.use((e) => (s.value?.is_admin && console.log("URL: ", e.url), gn.start(), c.value = !0, e.headers.Client = i.value, e.headers.Auth = t.value ? "Require Login" : "", e.headers.Authorization = `Bearer ${a.value}`, e)), l.interceptors.response.use((e) => {
|
|
437
|
-
gn.done(), c.value = !1;
|
|
438
|
-
let { payload: t, message: r, code: i } = e.data;
|
|
439
|
-
return r && n(r, i), t;
|
|
440
|
-
}, (e) => {
|
|
441
|
-
gn.done(), c.value = !1;
|
|
442
|
-
let { status: t, config: r, response: i } = e, { message: s } = i?.data || {};
|
|
443
|
-
return console.error("# Error URL: ", r?.url), console.error("# STATUS: ", t), t === 401 && r?.headers?.Authorization === `Bearer ${a.value}` && o(), n(s, "error"), Promise.reject(e);
|
|
444
|
-
});
|
|
445
|
-
function u(e, t = {}) {
|
|
446
|
-
return l.post(e, t);
|
|
447
|
-
}
|
|
448
|
-
return {
|
|
449
|
-
post: u,
|
|
450
|
-
loading: c
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
//#endregion
|
|
454
|
-
//#region morghulis/library/use-socket/url.ts
|
|
455
|
-
function Ln(e, t, n) {
|
|
456
|
-
let r = new URL(e, n);
|
|
457
|
-
if (r.protocol === "http:") r.protocol = "ws:";
|
|
458
|
-
else if (r.protocol === "https:") r.protocol = "wss:";
|
|
459
|
-
else if (r.protocol !== "ws:" && r.protocol !== "wss:") throw Error(`Unsupported WebSocket protocol: ${r.protocol}`);
|
|
460
|
-
return r.pathname = `${r.pathname.replace(/\/+$/, "")}/${encodeURIComponent(t)}/`, r.href;
|
|
461
|
-
}
|
|
462
|
-
//#endregion
|
|
463
|
-
//#region morghulis/library/use-socket/index.ts
|
|
464
|
-
var Rn = Kt(() => {
|
|
465
|
-
let { client: e } = Fn(), { base_url: t } = Q(), n = T(() => Ln(t.value, e.value, window.location.href)), r = Ft({
|
|
466
|
-
code: 0,
|
|
467
|
-
count: 0,
|
|
468
|
-
retries: 10
|
|
469
|
-
}), { data: i, open: a, send: o } = Qt(n, {
|
|
470
|
-
onDisconnected: () => {
|
|
471
|
-
r.code = 400, r.count = 0;
|
|
472
|
-
},
|
|
473
|
-
onConnected: () => {
|
|
474
|
-
r.code = 200, r.count = 0;
|
|
475
|
-
},
|
|
476
|
-
autoReconnect: {
|
|
477
|
-
retries: r.retries,
|
|
478
|
-
onFailed: () => r.code = 404,
|
|
479
|
-
delay: (e) => (r.count = e, 1e3)
|
|
480
|
-
}
|
|
481
|
-
});
|
|
482
|
-
function s(e) {
|
|
483
|
-
o(JSON.stringify(e));
|
|
484
|
-
}
|
|
485
|
-
return {
|
|
486
|
-
data: T(() => JSON.parse(i.value)),
|
|
487
|
-
open: a,
|
|
488
|
-
status: r,
|
|
489
|
-
send: s
|
|
490
|
-
};
|
|
491
|
-
});
|
|
492
|
-
//#endregion
|
|
493
|
-
//#region morghulis/library/use-socket-callback/index.ts
|
|
494
|
-
function zn(e, t) {
|
|
495
|
-
let { data: n } = Rn();
|
|
496
|
-
H(() => n, () => {
|
|
497
|
-
let r = on(n.value || {}), i = r.__tag__;
|
|
498
|
-
delete r.__tag__, delete r.__timestamp__, i === e && t(r);
|
|
499
|
-
}, { deep: !0 });
|
|
500
|
-
}
|
|
501
|
-
//#endregion
|
|
502
|
-
//#region morghulis/library/use-channel/index.ts
|
|
503
|
-
function Bn(e) {
|
|
504
|
-
let t = zt(e), { mount: n, unmount: r } = Pn();
|
|
505
|
-
P(() => n(t.value)), Pt(() => r(t.value));
|
|
506
|
-
let { post: i, loading: a } = Y(T(() => t.value.auth || !1)), { $message: o } = J(), s = I(null), c = I(!1), l = t.value.onError ?? ((e) => console.error(e));
|
|
507
|
-
function u(e) {
|
|
508
|
-
let { handler: n, token: r } = t.value, a = `valar/channel/${n}/${r}`;
|
|
509
|
-
c.value = !0, s.value = null, i(a, e).then().catch((e) => {
|
|
510
|
-
l(`Channel Error: ${e.code}`), c.value = !1, s.value = null;
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
|
-
return zn("channel", (e) => {
|
|
514
|
-
let n = ["handler", "token"];
|
|
515
|
-
if (!un(pn(e, n), pn(t.value, n))) return;
|
|
516
|
-
let r = e.callback;
|
|
517
|
-
c.value = [
|
|
518
|
-
"onStart",
|
|
519
|
-
"onProceed",
|
|
520
|
-
"onResponse"
|
|
521
|
-
].includes(r), r === "onStart" ? t.value.onStart?.() : r === "onError" ? l(e.data) : r === "onProceed" ? t.value.onProceed?.(e.data) : r === "onResponse" ? t.value.onResponse?.(e.data) : r === "onStop" && t.value.onStop?.(), s.value = e.data;
|
|
522
|
-
}), {
|
|
523
|
-
channel: t,
|
|
524
|
-
execute: u,
|
|
525
|
-
payload: s,
|
|
526
|
-
loading: T(() => a.value || c.value),
|
|
527
|
-
post: i
|
|
528
|
-
};
|
|
529
|
-
}
|
|
530
|
-
//#endregion
|
|
531
|
-
//#region morghulis/library/use-dao/consts.ts
|
|
532
|
-
var X = {
|
|
533
|
-
insert_one: "insert_one",
|
|
534
|
-
save_one: "save_one",
|
|
535
|
-
sync_save_many: "sync_save_many",
|
|
536
|
-
delete_one: "delete_one",
|
|
537
|
-
sync_delete_many: "sync_delete_many",
|
|
538
|
-
fetch: "fetch",
|
|
539
|
-
find_one: "find_one",
|
|
540
|
-
find: "find",
|
|
541
|
-
values: "values",
|
|
542
|
-
search: "search",
|
|
543
|
-
sync_update_many: "sync_update_many",
|
|
544
|
-
save_many: "save_many",
|
|
545
|
-
delete_many: "delete_many",
|
|
546
|
-
update_many: "update_many",
|
|
547
|
-
sorting: "sorting"
|
|
548
|
-
};
|
|
549
|
-
//#endregion
|
|
550
|
-
//#region morghulis/library/use-dao/methods.ts
|
|
551
|
-
function Vn(e, t = 0) {
|
|
552
|
-
let n = Object.fromEntries(e.map((e) => (e.children = [], [e.id, e]))), r = t || 0, i = n[r] ?? {
|
|
553
|
-
id: r,
|
|
554
|
-
children: []
|
|
555
|
-
};
|
|
556
|
-
return Object.values(n).forEach((e) => {
|
|
557
|
-
if (e === i) return;
|
|
558
|
-
let t = e.pid ?? 0;
|
|
559
|
-
(t === r ? i : n[t] ?? i).children?.push(e);
|
|
560
|
-
}), n[r] = i, Object.values(n).forEach((e) => e.children?.sort((e, t) => (t.sort || 0) - (e.sort || 0))), {
|
|
561
|
-
options: [i],
|
|
562
|
-
mapping: n,
|
|
563
|
-
rootNode: i
|
|
564
|
-
};
|
|
565
|
-
}
|
|
566
|
-
//#endregion
|
|
567
|
-
//#region morghulis/library/use-meta-query/methods.ts
|
|
568
|
-
function Hn(e) {
|
|
569
|
-
let t = Kn.find((t) => e.endsWith(`__${t}`));
|
|
570
|
-
return t ? {
|
|
571
|
-
prop: e.replace(`__${t}`, ""),
|
|
572
|
-
collation: t
|
|
573
|
-
} : {
|
|
574
|
-
prop: e,
|
|
575
|
-
collation: null
|
|
576
|
-
};
|
|
577
|
-
}
|
|
578
|
-
function Un(e = {}, t) {
|
|
579
|
-
let n = /\${(.*?)}/, r = Object.entries(e).map(([e, r]) => {
|
|
580
|
-
if (typeof r == "string") {
|
|
581
|
-
let e = r.match(n);
|
|
582
|
-
e && (r = t[e[1]]);
|
|
583
|
-
}
|
|
584
|
-
return [e, r];
|
|
585
|
-
});
|
|
586
|
-
return Object.fromEntries(r);
|
|
587
|
-
}
|
|
588
|
-
function Wn(e, t) {
|
|
589
|
-
return Object.keys(e || {}).filter((e) => {
|
|
590
|
-
let { prop: n } = Hn(e);
|
|
591
|
-
return n === t;
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
function Gn(e) {
|
|
595
|
-
if (!e) return {};
|
|
596
|
-
let t = Object.entries(e).map(([e, t]) => {
|
|
597
|
-
let { prop: n, collation: r } = Hn(e);
|
|
598
|
-
return r ? [e, t] : [`${n}__exact`, t];
|
|
599
|
-
});
|
|
600
|
-
return Object.fromEntries(t);
|
|
601
|
-
}
|
|
602
|
-
var Kn = [
|
|
603
|
-
"contains",
|
|
604
|
-
"exact",
|
|
605
|
-
"startswith",
|
|
606
|
-
"endswith",
|
|
607
|
-
"icontains",
|
|
608
|
-
"iexact",
|
|
609
|
-
"istartswith",
|
|
610
|
-
"iendswith",
|
|
611
|
-
"gt",
|
|
612
|
-
"lt",
|
|
613
|
-
"gte",
|
|
614
|
-
"lte",
|
|
615
|
-
"isnull",
|
|
616
|
-
"in",
|
|
617
|
-
"range"
|
|
618
|
-
];
|
|
619
|
-
function qn(e, t) {
|
|
620
|
-
let { code: n, $entity: r, $name: i, name: a, id: o, $tree: s, $$modes: c } = e, l = Jn(e, t);
|
|
621
|
-
return {
|
|
622
|
-
entity: r,
|
|
623
|
-
code: n,
|
|
624
|
-
view_id: o,
|
|
625
|
-
title: i,
|
|
626
|
-
name: a,
|
|
627
|
-
tree: s,
|
|
628
|
-
model: c,
|
|
629
|
-
control: l,
|
|
630
|
-
fields: Yn(e.$$fields, l, t)
|
|
631
|
-
};
|
|
632
|
-
}
|
|
633
|
-
function Jn(e, t) {
|
|
634
|
-
let n = t?.disabled || e.disabled, r = !n && !!e.allow_edit;
|
|
635
|
-
return {
|
|
636
|
-
disabled: n,
|
|
637
|
-
allow_edit: r,
|
|
638
|
-
allow_search: e.allow_search ?? !0,
|
|
639
|
-
allow_order: e.allow_order ?? !0,
|
|
640
|
-
allow_download: !n && !!e.allow_download,
|
|
641
|
-
allow_insert: !n && !!e.allow_insert,
|
|
642
|
-
allow_remove: !n && !!e.allow_remove,
|
|
643
|
-
allow_upload: !n && !!e.allow_upload,
|
|
644
|
-
allow_edit_on_form: r && !!e.allow_edit_on_form,
|
|
645
|
-
allow_edit_on_cell: r && !!e.allow_edit_on_cell,
|
|
646
|
-
allow_edit_on_sort: r && !!e.allow_edit_on_sort
|
|
647
|
-
};
|
|
648
|
-
}
|
|
649
|
-
function Yn(e, t, n) {
|
|
650
|
-
return e.map((e) => {
|
|
651
|
-
let r = { ...e }, i = !r.disabled && !t.disabled, a = !n?.restricted.uneditable.includes(r.prop), o = !n?.restricted.unsearchable.includes(r.prop), s = !n?.restricted.unorderable;
|
|
652
|
-
return r.disabled = !i, r.allow_edit &&= i && !!t.allow_edit && a, r.allow_search &&= i && !!t.allow_search && o, r.allow_order &&= i && !!t.allow_order && s, r.allow_download &&= i && !!t.allow_download, r.allow_upload &&= i && !!t.allow_upload, r.edit_on_table &&= r.allow_edit, r;
|
|
653
|
-
});
|
|
654
|
-
}
|
|
655
|
-
//#endregion
|
|
656
|
-
//#region morghulis/library/use-dao/index.ts
|
|
657
|
-
function Z(e, t) {
|
|
658
|
-
let n = zt(e), r = zt(t || {}), i = an(), { execute: a, payload: o, loading: s, post: c } = Bn(T(() => {
|
|
659
|
-
let { onStart: e, onError: t, onProceed: a, onResponse: o, onStop: s, auth: c } = r.value;
|
|
660
|
-
return {
|
|
661
|
-
handler: `batch/${n.value}`,
|
|
662
|
-
onStart: e,
|
|
663
|
-
onProceed: a,
|
|
664
|
-
onResponse: o,
|
|
665
|
-
onStop: s,
|
|
666
|
-
onError: t,
|
|
667
|
-
auth: c,
|
|
668
|
-
token: i
|
|
669
|
-
};
|
|
670
|
-
}));
|
|
671
|
-
function l(e, t) {
|
|
672
|
-
let r = `valar/${n.value}/${e}`;
|
|
673
|
-
return c(r, t);
|
|
674
|
-
}
|
|
675
|
-
function u(e, t) {
|
|
676
|
-
a({
|
|
677
|
-
method: e,
|
|
678
|
-
data: t
|
|
679
|
-
});
|
|
680
|
-
}
|
|
681
|
-
return {
|
|
682
|
-
config: r,
|
|
683
|
-
entity: n,
|
|
684
|
-
manager: {
|
|
685
|
-
insert_one(e) {
|
|
686
|
-
return l(X.insert_one, e);
|
|
687
|
-
},
|
|
688
|
-
save_one(e) {
|
|
689
|
-
return l(X.save_one, e);
|
|
690
|
-
},
|
|
691
|
-
sync_save_many(e) {
|
|
692
|
-
return l(X.sync_save_many, e);
|
|
693
|
-
},
|
|
694
|
-
delete_one(e) {
|
|
695
|
-
return l(X.delete_one, e);
|
|
696
|
-
},
|
|
697
|
-
sync_delete_many(e) {
|
|
698
|
-
return l(X.sync_delete_many, e);
|
|
699
|
-
},
|
|
700
|
-
fetch(e) {
|
|
701
|
-
return e ? l(X.fetch, e) : new Promise((e) => e(null));
|
|
702
|
-
},
|
|
703
|
-
find_one(e) {
|
|
704
|
-
return l(X.find_one, e);
|
|
705
|
-
},
|
|
706
|
-
find(e) {
|
|
707
|
-
return l(X.find, e);
|
|
708
|
-
},
|
|
709
|
-
values(e, t) {
|
|
710
|
-
return l(X.values, {
|
|
711
|
-
props: e,
|
|
712
|
-
...t
|
|
713
|
-
});
|
|
714
|
-
},
|
|
715
|
-
async search(e, t = 0, i = 1, a = "default") {
|
|
716
|
-
if (!n.value) return {
|
|
717
|
-
results: [],
|
|
718
|
-
mapping: {},
|
|
719
|
-
total: 0
|
|
720
|
-
};
|
|
721
|
-
let o = await l(`${X.search}/${a}`, {
|
|
722
|
-
...e,
|
|
723
|
-
size: t,
|
|
724
|
-
page: i,
|
|
725
|
-
type: "table"
|
|
726
|
-
}), s = r.value.convertor;
|
|
727
|
-
return s && o.results.forEach((e) => s(e)), o;
|
|
728
|
-
},
|
|
729
|
-
tree: (e, t = 0, n = "default") => {
|
|
730
|
-
e ||= {};
|
|
731
|
-
let i = `${X.search}/${n}`;
|
|
732
|
-
return new Promise((n, a) => {
|
|
733
|
-
l(i, {
|
|
734
|
-
...e,
|
|
735
|
-
root: t,
|
|
736
|
-
type: "tree"
|
|
737
|
-
}).then((e) => {
|
|
738
|
-
let i = Vn(e.results, t), a = r.value.convertor;
|
|
739
|
-
a && Object.values(i.mapping).forEach((e) => a(e)), n(i);
|
|
740
|
-
}).catch((e) => a(e));
|
|
741
|
-
});
|
|
742
|
-
},
|
|
743
|
-
sync_update_many(e, t) {
|
|
744
|
-
return l(X.sync_update_many, {
|
|
745
|
-
template: e,
|
|
746
|
-
...t
|
|
747
|
-
});
|
|
748
|
-
},
|
|
749
|
-
save_many: (e) => {
|
|
750
|
-
u(X.save_many, e);
|
|
751
|
-
},
|
|
752
|
-
delete_many: (e) => {
|
|
753
|
-
u(X.delete_many, e);
|
|
754
|
-
},
|
|
755
|
-
update_many: (e, t) => {
|
|
756
|
-
u(X.update_many, {
|
|
757
|
-
template: e,
|
|
758
|
-
...t
|
|
759
|
-
});
|
|
760
|
-
},
|
|
761
|
-
sorting: (e, t) => {
|
|
762
|
-
let n = {
|
|
763
|
-
currentId: t,
|
|
764
|
-
items: e
|
|
765
|
-
};
|
|
766
|
-
u(X.sorting, n);
|
|
767
|
-
},
|
|
768
|
-
async meta(e) {
|
|
769
|
-
if (!n.value) throw Error("未指定实体,无法读取元数据");
|
|
770
|
-
return qn(await c(`valar/${n.value}/${e || "default"}/meta_view`));
|
|
771
|
-
}
|
|
772
|
-
},
|
|
773
|
-
payload: o,
|
|
774
|
-
loading: s
|
|
775
|
-
};
|
|
776
|
-
}
|
|
777
|
-
//#endregion
|
|
778
|
-
//#region morghulis/library/use-meta-query/consts.ts
|
|
779
|
-
var Xn = [
|
|
780
|
-
".xls",
|
|
781
|
-
".xlsx",
|
|
782
|
-
".doc",
|
|
783
|
-
".docx",
|
|
784
|
-
".ppt",
|
|
785
|
-
".pptx",
|
|
786
|
-
".csv",
|
|
787
|
-
".txt",
|
|
788
|
-
".pdf",
|
|
789
|
-
".jpg",
|
|
790
|
-
".gif",
|
|
791
|
-
".png",
|
|
792
|
-
".jpeg",
|
|
793
|
-
".mp4",
|
|
794
|
-
".mp3",
|
|
795
|
-
".avi",
|
|
796
|
-
".zip",
|
|
797
|
-
".rar",
|
|
798
|
-
".exe"
|
|
799
|
-
], Zn = {
|
|
800
|
-
year: {
|
|
801
|
-
label: "年度",
|
|
802
|
-
value: "YYYY"
|
|
803
|
-
},
|
|
804
|
-
month: {
|
|
805
|
-
label: "月度",
|
|
806
|
-
value: "YYYY-MM-DD"
|
|
807
|
-
},
|
|
808
|
-
week: {
|
|
809
|
-
label: "周度",
|
|
810
|
-
value: "YYYY-MM-DD"
|
|
811
|
-
},
|
|
812
|
-
date: {
|
|
813
|
-
label: "日度",
|
|
814
|
-
value: "YYYY-MM-DD"
|
|
815
|
-
},
|
|
816
|
-
datetime: {
|
|
817
|
-
label: "高频",
|
|
818
|
-
value: "YYYY-MM-DD HH:mm:ss"
|
|
819
|
-
},
|
|
820
|
-
years: {
|
|
821
|
-
label: "多个年",
|
|
822
|
-
value: "YYYY"
|
|
823
|
-
},
|
|
824
|
-
months: {
|
|
825
|
-
label: "多个月",
|
|
826
|
-
value: "YYYY-MM-DD"
|
|
827
|
-
},
|
|
828
|
-
dates: {
|
|
829
|
-
label: "多个日",
|
|
830
|
-
value: "YYYY-MM-DD"
|
|
831
|
-
},
|
|
832
|
-
monthrange: {
|
|
833
|
-
label: "月区间",
|
|
834
|
-
value: "YYYY-MM-DD"
|
|
835
|
-
},
|
|
836
|
-
daterange: {
|
|
837
|
-
label: "日区间",
|
|
838
|
-
value: "YYYY-MM-DD"
|
|
839
|
-
},
|
|
840
|
-
datetimerange: {
|
|
841
|
-
label: "高频区间",
|
|
842
|
-
value: "YYYY-MM-DD HH:mm:ss"
|
|
843
|
-
},
|
|
844
|
-
time: {
|
|
845
|
-
label: "时间",
|
|
846
|
-
value: "HH:mm:ss"
|
|
847
|
-
}
|
|
848
|
-
}, Qn = {
|
|
849
|
-
multiple: [
|
|
850
|
-
"ManyToManyField",
|
|
851
|
-
"ManyToManyRel",
|
|
852
|
-
"ManyToOneRel"
|
|
853
|
-
],
|
|
854
|
-
linkage: [
|
|
855
|
-
"OneToOneField",
|
|
856
|
-
"OneToOneRel",
|
|
857
|
-
"ForeignKey"
|
|
858
|
-
],
|
|
859
|
-
referred: [
|
|
860
|
-
"ManyToManyField",
|
|
861
|
-
"ManyToManyRel",
|
|
862
|
-
"ManyToOneRel",
|
|
863
|
-
"OneToOneField",
|
|
864
|
-
"OneToOneRel",
|
|
865
|
-
"ForeignKey"
|
|
866
|
-
],
|
|
867
|
-
orderable: [
|
|
868
|
-
"CharField",
|
|
869
|
-
"TextField",
|
|
870
|
-
"IntegerField",
|
|
871
|
-
"FloatField",
|
|
872
|
-
"BigIntegerField",
|
|
873
|
-
"DecimalField",
|
|
874
|
-
"SmallIntegerField",
|
|
875
|
-
"DateField",
|
|
876
|
-
"DateTimeField",
|
|
877
|
-
"TimeField",
|
|
878
|
-
"BigAutoField",
|
|
879
|
-
"Custom"
|
|
880
|
-
],
|
|
881
|
-
editable: [
|
|
882
|
-
"CharField",
|
|
883
|
-
"TextField",
|
|
884
|
-
"BooleanField",
|
|
885
|
-
"IntegerField",
|
|
886
|
-
"FloatField",
|
|
887
|
-
"DateField",
|
|
888
|
-
"DateTimeField",
|
|
889
|
-
"TimeField",
|
|
890
|
-
"JSONField"
|
|
891
|
-
]
|
|
892
|
-
};
|
|
893
|
-
//#endregion
|
|
894
|
-
//#region morghulis/library/use-meta-query/index.ts
|
|
895
|
-
function $n(e) {
|
|
896
|
-
let t = I({}), n = I(e.value.orders ?? { sort: -1 }), r = T(() => {
|
|
897
|
-
let t = Object.entries(e.value.includes || {}).filter((e) => !e[0].includes("__"));
|
|
898
|
-
return Object.fromEntries(t);
|
|
899
|
-
}), { post: i } = Y(), a = I(), o = 0, s = !1;
|
|
900
|
-
Nt(() => {
|
|
901
|
-
s = !0, o++;
|
|
902
|
-
});
|
|
903
|
-
let c = T(() => {
|
|
904
|
-
let t = a.value;
|
|
905
|
-
if (!t || t.entity !== e.value.entity || t.code !== (e.value.code || "default")) return {
|
|
906
|
-
code: e.value.code || "default",
|
|
907
|
-
entity: e.value.entity || "",
|
|
908
|
-
name: "",
|
|
909
|
-
view_id: 0,
|
|
910
|
-
title: "",
|
|
911
|
-
tree: !1,
|
|
912
|
-
control: {},
|
|
913
|
-
fields: [],
|
|
914
|
-
model: {}
|
|
915
|
-
};
|
|
916
|
-
let i = {
|
|
917
|
-
disabled: !!e.value.disabled,
|
|
918
|
-
restricted: {
|
|
919
|
-
unsearchable: Object.keys(e.value.includes || {}).map((e) => Hn(e).prop),
|
|
920
|
-
uneditable: Object.keys(r.value),
|
|
921
|
-
unorderable: un(n, { sort: -1 })
|
|
922
|
-
}
|
|
923
|
-
};
|
|
924
|
-
return qn(t.data, i);
|
|
925
|
-
});
|
|
926
|
-
async function l() {
|
|
927
|
-
if (s) return;
|
|
928
|
-
let t = ++o, { entity: n, beforeInit: r } = e.value, c = e.value.code || "default", l = () => !s && t === o && e.value.entity === n && (e.value.code || "default") === c;
|
|
929
|
-
if ((!n || a.value?.entity !== n || a.value?.code !== c) && (a.value = void 0), n) try {
|
|
930
|
-
let e = await i(`valar/${n}/${c}/meta_view`);
|
|
931
|
-
if (!l()) return;
|
|
932
|
-
let t = r ? await r(e) : e;
|
|
933
|
-
l() && (a.value = {
|
|
934
|
-
entity: n,
|
|
935
|
-
code: c,
|
|
936
|
-
data: t
|
|
937
|
-
});
|
|
938
|
-
} catch (e) {
|
|
939
|
-
if (l()) throw e;
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
return H(() => [e.value.entity, e.value.code], (e, t) => {
|
|
943
|
-
un(e, t) || l().catch((e) => console.error("元数据加载失败", e));
|
|
944
|
-
}, {
|
|
945
|
-
deep: !0,
|
|
946
|
-
immediate: !0
|
|
947
|
-
}), {
|
|
948
|
-
finder: t,
|
|
949
|
-
orders: n,
|
|
950
|
-
core: r,
|
|
951
|
-
meta: c,
|
|
952
|
-
init: l,
|
|
953
|
-
conditions: T(() => {
|
|
954
|
-
let { includes: n, excludes: r } = e.value;
|
|
955
|
-
return n = Gn(n), r = Gn(r), [fn({
|
|
956
|
-
includes: n,
|
|
957
|
-
excludes: r
|
|
958
|
-
}, er(t.value, c.value?.fields)), ...e.value.conditions || []];
|
|
959
|
-
})
|
|
960
|
-
};
|
|
961
|
-
}
|
|
962
|
-
function er(e, t = []) {
|
|
963
|
-
let n = {
|
|
964
|
-
includes: {},
|
|
965
|
-
excludes: {}
|
|
966
|
-
};
|
|
967
|
-
return Object.entries(e).forEach(([e, r]) => {
|
|
968
|
-
let { type: i, collation: a, value: o } = r;
|
|
969
|
-
if (o == null) return;
|
|
970
|
-
let s = n[i], c = t.find((t) => t.prop === e);
|
|
971
|
-
if (!c) return;
|
|
972
|
-
let { domain: l, refer: { label: u } } = c;
|
|
973
|
-
if (Qn.linkage.includes(l)) {
|
|
974
|
-
let t = `${`${e.replace("_id", "")}__${u}`}__${a}`;
|
|
975
|
-
s[t] = o;
|
|
976
|
-
} else if (Qn.multiple.includes(l)) {
|
|
977
|
-
let t = `${`${e}__${u}`}__${a}`;
|
|
978
|
-
s[t] = o;
|
|
979
|
-
} else {
|
|
980
|
-
let t = `${e}__${a}`;
|
|
981
|
-
s[t] = o;
|
|
982
|
-
}
|
|
983
|
-
}), n;
|
|
984
|
-
}
|
|
985
|
-
//#endregion
|
|
986
|
-
//#region morghulis/library/use-valar/index.ts
|
|
987
|
-
function tr(e, t) {
|
|
988
|
-
let n = I(), r = I(), i = I({
|
|
989
|
-
results: [],
|
|
990
|
-
total: 0,
|
|
991
|
-
mapping: {}
|
|
992
|
-
}), a = I({
|
|
993
|
-
options: [],
|
|
994
|
-
mapping: {},
|
|
995
|
-
rootNode: { children: [] }
|
|
996
|
-
}), o = I(/* @__PURE__ */ new Set()), s = 0, c = !1;
|
|
997
|
-
Nt(() => {
|
|
998
|
-
c = !0, s++;
|
|
999
|
-
});
|
|
1000
|
-
let { finder: l, orders: u, core: d, meta: f, init: p, conditions: m } = $n(e), { loading: h, manager: g } = Z(T(() => f.value.entity), {
|
|
1001
|
-
convertor: e.value.convertor,
|
|
1002
|
-
onStart: () => {
|
|
1003
|
-
n.value = void 0, r.value = null;
|
|
1004
|
-
},
|
|
1005
|
-
onError: (e) => {
|
|
1006
|
-
n.value = void 0, r.value = e;
|
|
1007
|
-
},
|
|
1008
|
-
onProceed: (e) => {
|
|
1009
|
-
n.value = e, r.value = null;
|
|
1010
|
-
},
|
|
1011
|
-
onStop: () => {
|
|
1012
|
-
n.value = void 0, r.value = null;
|
|
1013
|
-
},
|
|
1014
|
-
onResponse: (e) => {
|
|
1015
|
-
n.value = void 0, r.value = null;
|
|
1016
|
-
let { method: t, response: i } = e;
|
|
1017
|
-
if (t === "sorting") {
|
|
1018
|
-
let { currentId: e } = i;
|
|
1019
|
-
y([e]);
|
|
1020
|
-
} else t === "save_many" ? y(i) : y();
|
|
1021
|
-
}
|
|
1022
|
-
}), _ = e.value.entity, v = e.value.code || "default";
|
|
1023
|
-
H(() => [
|
|
1024
|
-
e.value.entity,
|
|
1025
|
-
e.value.code,
|
|
1026
|
-
f.value.entity,
|
|
1027
|
-
f.value.code,
|
|
1028
|
-
u.value,
|
|
1029
|
-
m.value,
|
|
1030
|
-
t.value
|
|
1031
|
-
], () => {
|
|
1032
|
-
let { entity: t } = e.value, n = e.value.code || "default";
|
|
1033
|
-
(t !== _ || n !== v) && (i.value = {
|
|
1034
|
-
results: [],
|
|
1035
|
-
total: 0,
|
|
1036
|
-
mapping: {}
|
|
1037
|
-
}, a.value = {
|
|
1038
|
-
options: [],
|
|
1039
|
-
mapping: {},
|
|
1040
|
-
rootNode: { children: [] }
|
|
1041
|
-
}, o.value.clear(), _ = t, v = n), y();
|
|
1042
|
-
}, {
|
|
1043
|
-
deep: !0,
|
|
1044
|
-
immediate: !0
|
|
1045
|
-
});
|
|
1046
|
-
function y(e) {
|
|
1047
|
-
b(e).catch((e) => console.error("刷新数据失败", e));
|
|
1048
|
-
}
|
|
1049
|
-
async function b(n) {
|
|
1050
|
-
if (c) return;
|
|
1051
|
-
let l = ++s, d = f.value, p = e.value.entity, h = e.value.code || "default", _ = { ...t.value }, { size: v, page: y, type: b, root: ee } = _, te = on({
|
|
1052
|
-
orders: u.value,
|
|
1053
|
-
conditions: m.value
|
|
1054
|
-
}), S = () => !c && l === s && e.value.entity === p && (e.value.code || "default") === h && f.value === d && un(t.value, _) && un(u.value, te.orders) && un(m.value, te.conditions), ne = [...o.value];
|
|
1055
|
-
o.value.clear(), r.value = null;
|
|
1056
|
-
let { validator: re, beforeReload: ie } = e.value;
|
|
1057
|
-
if (!d.entity) i.value = {
|
|
1058
|
-
results: [],
|
|
1059
|
-
total: 0,
|
|
1060
|
-
mapping: {}
|
|
1061
|
-
}, a.value = {
|
|
1062
|
-
options: [],
|
|
1063
|
-
mapping: {},
|
|
1064
|
-
rootNode: { children: [] }
|
|
1065
|
-
};
|
|
1066
|
-
else try {
|
|
1067
|
-
if (b === "tree") {
|
|
1068
|
-
let e = await g.tree(te, ee, d.code);
|
|
1069
|
-
if (!S()) return;
|
|
1070
|
-
let t = Object.values(e.mapping), n = await ie?.(t, d) ?? !0;
|
|
1071
|
-
if (!S() || (n && re && t.forEach((e) => e.$message = re(e)), !S())) return;
|
|
1072
|
-
a.value = n ? e : {
|
|
1073
|
-
options: [],
|
|
1074
|
-
mapping: {},
|
|
1075
|
-
rootNode: { children: [] }
|
|
1076
|
-
};
|
|
1077
|
-
} else if (b === "table") {
|
|
1078
|
-
let e = await g.search(te, v, y, d.code);
|
|
1079
|
-
if (!S()) return;
|
|
1080
|
-
let t = e.results, n = await ie?.(t, d) ?? !0;
|
|
1081
|
-
if (!S() || (n && re && t.forEach((e) => e.$message = re(e)), !S())) return;
|
|
1082
|
-
e.mapping = Object.fromEntries(t.map((e) => [e.id, e])), i.value = n ? e : {
|
|
1083
|
-
results: [],
|
|
1084
|
-
total: 0,
|
|
1085
|
-
mapping: {}
|
|
1086
|
-
};
|
|
1087
|
-
}
|
|
1088
|
-
S() && x(n || ne);
|
|
1089
|
-
} catch (e) {
|
|
1090
|
-
if (!S()) return;
|
|
1091
|
-
throw r.value = e instanceof Error ? e.message : String(e), e;
|
|
1092
|
-
}
|
|
1093
|
-
}
|
|
1094
|
-
function x(e) {
|
|
1095
|
-
let n = (t.value.type === "table" ? i.value.results : Object.values(a.value.mapping)).map((e) => e.id);
|
|
1096
|
-
o.value = new Set(cn(n, e));
|
|
1097
|
-
}
|
|
1098
|
-
function ee(e) {
|
|
1099
|
-
let t = e.map((e) => ({
|
|
1100
|
-
...e,
|
|
1101
|
-
...d.value
|
|
1102
|
-
}));
|
|
1103
|
-
g.save_many(t);
|
|
1104
|
-
}
|
|
1105
|
-
function te(...e) {
|
|
1106
|
-
return g.find({ includes: { id__in: e } });
|
|
1107
|
-
}
|
|
1108
|
-
return {
|
|
1109
|
-
meta: f,
|
|
1110
|
-
response: i,
|
|
1111
|
-
orders: u,
|
|
1112
|
-
conditions: m,
|
|
1113
|
-
manager: {
|
|
1114
|
-
init: p,
|
|
1115
|
-
reload: b,
|
|
1116
|
-
save_many: ee,
|
|
1117
|
-
fetch: te,
|
|
1118
|
-
highlight: x,
|
|
1119
|
-
sorting: g.sorting,
|
|
1120
|
-
delete_many: (e) => {
|
|
1121
|
-
e.length ? g.delete_many({ includes: { id__in: e } }) : g.delete_many({});
|
|
1122
|
-
},
|
|
1123
|
-
delete_one: (e) => g.delete_one(e),
|
|
1124
|
-
save_one: (e) => ee([{
|
|
1125
|
-
...e,
|
|
1126
|
-
...d.value
|
|
1127
|
-
}]),
|
|
1128
|
-
insert_one: (e) => g.insert_one({
|
|
1129
|
-
...e,
|
|
1130
|
-
...d.value
|
|
1131
|
-
}),
|
|
1132
|
-
find: () => g.find({ conditions: m.value }),
|
|
1133
|
-
get: (e) => g.fetch(e)
|
|
1134
|
-
},
|
|
1135
|
-
api: g,
|
|
1136
|
-
loading: h,
|
|
1137
|
-
ticking: n,
|
|
1138
|
-
error: r,
|
|
1139
|
-
finder: l,
|
|
1140
|
-
collector: o,
|
|
1141
|
-
core: d,
|
|
1142
|
-
model: a
|
|
1143
|
-
};
|
|
1144
|
-
}
|
|
1145
|
-
//#endregion
|
|
1146
|
-
//#region morghulis/components/tree/tools/DTreeNode.vue?vue&type=script&setup=true&lang.ts
|
|
1147
|
-
var nr = {
|
|
320
|
+
}), Pn = {
|
|
1148
321
|
key: 0,
|
|
1149
322
|
class: "danger"
|
|
1150
|
-
},
|
|
323
|
+
}, Fn = /* @__PURE__ */ M({
|
|
1151
324
|
__name: "DTreeNode",
|
|
1152
325
|
props: {
|
|
1153
326
|
node: {},
|
|
@@ -1187,9 +360,9 @@ var nr = {
|
|
|
1187
360
|
"icon",
|
|
1188
361
|
"type",
|
|
1189
362
|
"shake"
|
|
1190
|
-
])), k("span", null, [(F(!0), O(w, null, L(i.value, (t, n) => (F(), O(w, { key: n }, [n > 0 ? (F(), O("u",
|
|
363
|
+
])), k("span", null, [(F(!0), O(w, null, L(i.value, (t, n) => (F(), O(w, { key: n }, [n > 0 ? (F(), O("u", Pn, B(e.queryString), 1)) : D("", !0), A(B(t), 1)], 64))), 128))])], 64));
|
|
1191
364
|
}
|
|
1192
|
-
}),
|
|
365
|
+
}), In = /* @__PURE__ */ M({
|
|
1193
366
|
__name: "MPopover",
|
|
1194
367
|
props: {
|
|
1195
368
|
title: {},
|
|
@@ -1211,7 +384,7 @@ var nr = {
|
|
|
1211
384
|
clientY: 0
|
|
1212
385
|
}), c = T(() => ({ getBoundingClientRect: () => o.value }));
|
|
1213
386
|
function l(e, t, c) {
|
|
1214
|
-
document.body.style.overflow = "hidden", i.value =
|
|
387
|
+
document.body.style.overflow = "hidden", i.value = an(t) ?? null, a.value = {
|
|
1215
388
|
title: c?.title ?? n.title,
|
|
1216
389
|
placement: c?.placement || n.placement || "bottom",
|
|
1217
390
|
width: c?.width ?? n.width ?? "auto",
|
|
@@ -1242,7 +415,7 @@ var nr = {
|
|
|
1242
415
|
visible: r.value,
|
|
1243
416
|
"virtual-ref": c.value,
|
|
1244
417
|
trigger: a.value.trigger,
|
|
1245
|
-
placement: a.value.placement,
|
|
418
|
+
placement: a.value.placement || void 0,
|
|
1246
419
|
"virtual-triggering": "",
|
|
1247
420
|
teleported: "",
|
|
1248
421
|
"hide-after": 0,
|
|
@@ -1264,7 +437,7 @@ var nr = {
|
|
|
1264
437
|
])], 64);
|
|
1265
438
|
};
|
|
1266
439
|
}
|
|
1267
|
-
}),
|
|
440
|
+
}), Ln = /* @__PURE__ */ M({
|
|
1268
441
|
__name: "CharCell",
|
|
1269
442
|
props: {
|
|
1270
443
|
modelValue: {},
|
|
@@ -1301,7 +474,7 @@ var nr = {
|
|
|
1301
474
|
]);
|
|
1302
475
|
};
|
|
1303
476
|
}
|
|
1304
|
-
}),
|
|
477
|
+
}), Rn = { class: "full" }, zn = /*#__PURE__*/ wn(/* @__PURE__ */ M({
|
|
1305
478
|
__name: "ColorCell",
|
|
1306
479
|
props: {
|
|
1307
480
|
modelValue: {},
|
|
@@ -1339,7 +512,7 @@ var nr = {
|
|
|
1339
512
|
span: 9,
|
|
1340
513
|
align: "center"
|
|
1341
514
|
}, {
|
|
1342
|
-
default: U(() => [k("div",
|
|
515
|
+
default: U(() => [k("div", Rn, [k("b", {
|
|
1343
516
|
class: "color-pick-label",
|
|
1344
517
|
style: jt({ color: V(n) || "#dddddd" }),
|
|
1345
518
|
onClick: a
|
|
@@ -1350,7 +523,7 @@ var nr = {
|
|
|
1350
523
|
});
|
|
1351
524
|
};
|
|
1352
525
|
}
|
|
1353
|
-
}), [["__scopeId", "data-v-b4e1f98e"]]), cr = /* @__PURE__ */ "0.1.2.3.4.5.6.7.8.9.a.ad.add.address-book.address-card.adjust.air-freshener.align-center.align-justify.align-left.align-right.allergies.ambulance.american-sign-language-interpreting.anchor.anchor-circle-check.anchor-circle-exclamation.anchor-circle-xmark.anchor-lock.angle-double-down.angle-double-left.angle-double-right.angle-double-up.angle-down.angle-left.angle-right.angle-up.angles-down.angles-left.angles-right.angles-up.angry.ankh.apple-alt.apple-whole.archive.archway.area-chart.arrow-alt-circle-down.arrow-alt-circle-left.arrow-alt-circle-right.arrow-alt-circle-up.arrow-circle-down.arrow-circle-left.arrow-circle-right.arrow-circle-up.arrow-down.arrow-down-1-9.arrow-down-9-1.arrow-down-a-z.arrow-down-long.arrow-down-short-wide.arrow-down-up-across-line.arrow-down-up-lock.arrow-down-wide-short.arrow-down-z-a.arrow-left.arrow-left-long.arrow-left-rotate.arrow-pointer.arrow-right.arrow-right-arrow-left.arrow-right-from-bracket.arrow-right-from-file.arrow-right-long.arrow-right-rotate.arrow-right-to-bracket.arrow-right-to-city.arrow-right-to-file.arrow-rotate-back.arrow-rotate-backward.arrow-rotate-forward.arrow-rotate-left.arrow-rotate-right.arrow-trend-down.arrow-trend-up.arrow-turn-down.arrow-turn-up.arrow-up.arrow-up-1-9.arrow-up-9-1.arrow-up-a-z.arrow-up-from-bracket.arrow-up-from-ground-water.arrow-up-from-water-pump.arrow-up-long.arrow-up-right-dots.arrow-up-right-from-square.arrow-up-short-wide.arrow-up-wide-short.arrow-up-z-a.arrows.arrows-alt.arrows-alt-h.arrows-alt-v.arrows-down-to-line.arrows-down-to-people.arrows-h.arrows-left-right.arrows-left-right-to-line.arrows-rotate.arrows-spin.arrows-split-up-and-left.arrows-to-circle.arrows-to-dot.arrows-to-eye.arrows-turn-right.arrows-turn-to-dots.arrows-up-down.arrows-up-down-left-right.arrows-up-to-line.arrows-v.asl-interpreting.assistive-listening-systems.asterisk.at.atlas.atom.audio-description.austral-sign.automobile.award.b.baby.baby-carriage.backspace.backward.backward-fast.backward-step.bacon.bacteria.bacterium.bag-shopping.bahai.baht-sign.balance-scale.balance-scale-left.balance-scale-right.ban.ban-smoking.band-aid.bandage.bangladeshi-taka-sign.bank.bar-chart.barcode.bars.bars-progress.bars-staggered.baseball.baseball-ball.baseball-bat-ball.basket-shopping.basketball.basketball-ball.bath.bathtub.battery.battery-0.battery-2.battery-3.battery-4.battery-5.battery-car.battery-empty.battery-full.battery-half.battery-quarter.battery-three-quarters.bed.bed-pulse.beer.beer-mug-empty.bell.bell-concierge.bell-slash.bezier-curve.bible.bicycle.biking.binoculars.biohazard.birthday-cake.bitcoin-sign.blackboard.blender.blender-phone.blind.blog.bold.bolt.bolt-lightning.bomb.bone.bong.book.book-atlas.book-bible.book-bookmark.book-dead.book-journal-whills.book-medical.book-open.book-open-reader.book-quran.book-reader.book-skull.book-tanakh.bookmark.border-all.border-none.border-style.border-top-left.bore-hole.bottle-droplet.bottle-water.bowl-food.bowl-rice.bowling-ball.box.box-archive.box-open.box-tissue.boxes.boxes-alt.boxes-packing.boxes-stacked.braille.brain.brazilian-real-sign.bread-slice.bridge.bridge-circle-check.bridge-circle-exclamation.bridge-circle-xmark.bridge-lock.bridge-water.briefcase.briefcase-clock.briefcase-medical.broadcast-tower.broom.broom-ball.brush.bucket.bug.bug-slash.bugs.building.building-circle-arrow-right.building-circle-check.building-circle-exclamation.building-circle-xmark.building-columns.building-flag.building-lock.building-ngo.building-shield.building-un.building-user.building-wheat.bullhorn.bullseye.burger.burn.burst.bus.bus-alt.bus-simple.business-time.c.cab.cable-car.cake.cake-candles.calculator.calendar.calendar-alt.calendar-check.calendar-day.calendar-days.calendar-minus.calendar-plus.calendar-times.calendar-week.calendar-xmark.camera.camera-alt.camera-retro.camera-rotate.campground.cancel.candy-cane.cannabis.capsules.car.car-alt.car-battery.car-burst.car-crash.car-on.car-rear.car-side.car-tunnel.caravan.caret-down.caret-left.caret-right.caret-square-down.caret-square-left.caret-square-right.caret-square-up.caret-up.carriage-baby.carrot.cart-arrow-down.cart-flatbed.cart-flatbed-suitcase.cart-plus.cart-shopping.cash-register.cat.cedi-sign.cent-sign.certificate.chain.chain-broken.chain-slash.chair.chalkboard.chalkboard-teacher.chalkboard-user.champagne-glasses.charging-station.chart-area.chart-bar.chart-column.chart-diagram.chart-gantt.chart-line.chart-pie.chart-simple.check.check-circle.check-double.check-square.check-to-slot.cheese.chess.chess-bishop.chess-board.chess-king.chess-knight.chess-pawn.chess-queen.chess-rook.chevron-circle-down.chevron-circle-left.chevron-circle-right.chevron-circle-up.chevron-down.chevron-left.chevron-right.chevron-up.child.child-combatant.child-dress.child-reaching.child-rifle.children.church.circle.circle-arrow-down.circle-arrow-left.circle-arrow-right.circle-arrow-up.circle-check.circle-chevron-down.circle-chevron-left.circle-chevron-right.circle-chevron-up.circle-dollar-to-slot.circle-dot.circle-down.circle-exclamation.circle-h.circle-half-stroke.circle-info.circle-left.circle-minus.circle-nodes.circle-notch.circle-pause.circle-play.circle-plus.circle-question.circle-radiation.circle-right.circle-stop.circle-up.circle-user.circle-xmark.city.clapperboard.clinic-medical.clipboard.clipboard-check.clipboard-list.clipboard-question.clipboard-user.clock.clock-four.clock-rotate-left.clone.close.closed-captioning.cloud.cloud-arrow-down.cloud-arrow-up.cloud-bolt.cloud-download.cloud-download-alt.cloud-meatball.cloud-moon.cloud-moon-rain.cloud-rain.cloud-showers-heavy.cloud-showers-water.cloud-sun.cloud-sun-rain.cloud-upload.cloud-upload-alt.clover.cny.cocktail.code.code-branch.code-commit.code-compare.code-fork.code-merge.code-pull-request.coffee.cog.cogs.coins.colon-sign.columns.comment.comment-alt.comment-dollar.comment-dots.comment-medical.comment-nodes.comment-slash.comment-sms.commenting.comments.comments-dollar.compact-disc.compass.compass-drafting.compress.compress-alt.compress-arrows-alt.computer.computer-mouse.concierge-bell.contact-book.contact-card.cookie.cookie-bite.copy.copyright.couch.cow.credit-card.credit-card-alt.crop.crop-alt.crop-simple.cross.crosshairs.crow.crown.crutch.cruzeiro-sign.cube.cubes.cubes-stacked.cut.cutlery.d.dashboard.database.deaf.deafness.dedent.delete-left.democrat.desktop.desktop-alt.dharmachakra.diagnoses.diagram-next.diagram-predecessor.diagram-project.diagram-successor.diamond.diamond-turn-right.dice.dice-d20.dice-d6.dice-five.dice-four.dice-one.dice-six.dice-three.dice-two.digging.digital-tachograph.directions.disease.display.divide.dizzy.dna.dog.dollar.dollar-sign.dolly.dolly-box.dolly-flatbed.donate.dong-sign.door-closed.door-open.dot-circle.dove.down-left-and-up-right-to-center.down-long.download.drafting-compass.dragon.draw-polygon.drivers-license.droplet.droplet-slash.drum.drum-steelpan.drumstick-bite.dumbbell.dumpster.dumpster-fire.dungeon.e.ear-deaf.ear-listen.earth.earth-africa.earth-america.earth-americas.earth-asia.earth-europe.earth-oceania.edit.egg.eject.elevator.ellipsis.ellipsis-h.ellipsis-v.ellipsis-vertical.envelope.envelope-circle-check.envelope-open.envelope-open-text.envelope-square.envelopes-bulk.equals.eraser.ethernet.eur.euro.euro-sign.exchange.exchange-alt.exclamation.exclamation-circle.exclamation-triangle.expand.expand-alt.expand-arrows-alt.explosion.external-link.external-link-alt.external-link-square.external-link-square-alt.eye.eye-dropper.eye-dropper-empty.eye-low-vision.eye-slash.eyedropper.f.face-angry.face-dizzy.face-flushed.face-frown.face-frown-open.face-grimace.face-grin.face-grin-beam.face-grin-beam-sweat.face-grin-hearts.face-grin-squint.face-grin-squint-tears.face-grin-stars.face-grin-tears.face-grin-tongue.face-grin-tongue-squint.face-grin-tongue-wink.face-grin-wide.face-grin-wink.face-kiss.face-kiss-beam.face-kiss-wink-heart.face-laugh.face-laugh-beam.face-laugh-squint.face-laugh-wink.face-meh.face-meh-blank.face-rolling-eyes.face-sad-cry.face-sad-tear.face-smile.face-smile-beam.face-smile-wink.face-surprise.face-tired.fan.faucet.faucet-drip.fax.feather.feather-alt.feather-pointed.feed.female.ferry.fighter-jet.file.file-alt.file-archive.file-arrow-down.file-arrow-up.file-audio.file-circle-check.file-circle-exclamation.file-circle-minus.file-circle-plus.file-circle-question.file-circle-xmark.file-clipboard.file-code.file-contract.file-csv.file-download.file-edit.file-excel.file-export.file-fragment.file-half-dashed.file-image.file-import.file-invoice.file-invoice-dollar.file-lines.file-medical.file-medical-alt.file-pdf.file-pen.file-powerpoint.file-prescription.file-shield.file-signature.file-text.file-upload.file-video.file-waveform.file-word.file-zipper.fill.fill-drip.film.filter.filter-circle-dollar.filter-circle-xmark.fingerprint.fire.fire-alt.fire-burner.fire-extinguisher.fire-flame-curved.fire-flame-simple.first-aid.fish.fish-fins.fist-raised.flag.flag-checkered.flag-usa.flask.flask-vial.floppy-disk.florin-sign.flushed.folder.folder-blank.folder-closed.folder-minus.folder-open.folder-plus.folder-tree.font.font-awesome.font-awesome-flag.font-awesome-logo-full.football.football-ball.forward.forward-fast.forward-step.franc-sign.frog.frown.frown-open.funnel-dollar.futbol.futbol-ball.g.gamepad.gas-pump.gauge.gauge-high.gauge-med.gauge-simple.gauge-simple-high.gauge-simple-med.gavel.gbp.gear.gears.gem.genderless.ghost.gift.gifts.glass-cheers.glass-martini.glass-martini-alt.glass-water.glass-water-droplet.glass-whiskey.glasses.globe.globe-africa.globe-americas.globe-asia.globe-europe.globe-oceania.golf-ball.golf-ball-tee.gopuram.graduation-cap.greater-than.greater-than-equal.grimace.grin.grin-alt.grin-beam.grin-beam-sweat.grin-hearts.grin-squint.grin-squint-tears.grin-stars.grin-tears.grin-tongue.grin-tongue-squint.grin-tongue-wink.grin-wink.grip.grip-horizontal.grip-lines.grip-lines-vertical.grip-vertical.group-arrows-rotate.guarani-sign.guitar.gun.h.h-square.hamburger.hammer.hamsa.hand.hand-back-fist.hand-dots.hand-fist.hand-holding.hand-holding-dollar.hand-holding-droplet.hand-holding-hand.hand-holding-heart.hand-holding-medical.hand-holding-usd.hand-holding-water.hand-lizard.hand-middle-finger.hand-paper.hand-peace.hand-point-down.hand-point-left.hand-point-right.hand-point-up.hand-pointer.hand-rock.hand-scissors.hand-sparkles.hand-spock.handcuffs.hands.hands-american-sign-language-interpreting.hands-asl-interpreting.hands-bound.hands-bubbles.hands-clapping.hands-helping.hands-holding.hands-holding-child.hands-holding-circle.hands-praying.hands-wash.handshake.handshake-alt.handshake-alt-slash.handshake-angle.handshake-simple.handshake-simple-slash.handshake-slash.hanukiah.hard-drive.hard-hat.hard-of-hearing.hashtag.hat-cowboy.hat-cowboy-side.hat-hard.hat-wizard.haykal.hdd.head-side-cough.head-side-cough-slash.head-side-mask.head-side-virus.header.heading.headphones.headphones-alt.headphones-simple.headset.heart.heart-broken.heart-circle-bolt.heart-circle-check.heart-circle-exclamation.heart-circle-minus.heart-circle-plus.heart-circle-xmark.heart-crack.heart-music-camera-bolt.heart-pulse.heartbeat.helicopter.helicopter-symbol.helmet-safety.helmet-un.hexagon-nodes.hexagon-nodes-bolt.highlighter.hiking.hill-avalanche.hill-rockslide.hippo.history.hockey-puck.holly-berry.home.home-alt.home-lg.home-lg-alt.home-user.horse.horse-head.hospital.hospital-alt.hospital-symbol.hospital-user.hospital-wide.hot-tub.hot-tub-person.hotdog.hotel.hourglass.hourglass-1.hourglass-2.hourglass-3.hourglass-empty.hourglass-end.hourglass-half.hourglass-start.house.house-chimney.house-chimney-crack.house-chimney-medical.house-chimney-user.house-chimney-window.house-circle-check.house-circle-exclamation.house-circle-xmark.house-crack.house-damage.house-fire.house-flag.house-flood-water.house-flood-water-circle-arrow-right.house-laptop.house-lock.house-medical.house-medical-circle-check.house-medical-circle-exclamation.house-medical-circle-xmark.house-medical-flag.house-signal.house-tsunami.house-user.hryvnia.hryvnia-sign.hurricane.i.i-cursor.ice-cream.icicles.icons.id-badge.id-card.id-card-alt.id-card-clip.igloo.ils.image.image-portrait.images.inbox.indent.indian-rupee.indian-rupee-sign.industry.infinity.info.info-circle.inr.institution.italic.j.jar.jar-wheat.jedi.jet-fighter.jet-fighter-up.joint.journal-whills.jpy.jug-detergent.k.kaaba.key.keyboard.khanda.kip-sign.kiss.kiss-beam.kiss-wink-heart.kit-medical.kitchen-set.kiwi-bird.krw.l.ladder-water.land-mine-on.landmark.landmark-alt.landmark-dome.landmark-flag.language.laptop.laptop-code.laptop-file.laptop-house.laptop-medical.lari-sign.laugh.laugh-beam.laugh-squint.laugh-wink.layer-group.leaf.left-long.left-right.legal.lemon.less-than.less-than-equal.level-down.level-down-alt.level-up.level-up-alt.life-ring.lightbulb.line-chart.lines-leaning.link.link-slash.lira-sign.list.list-1-2.list-alt.list-check.list-dots.list-numeric.list-ol.list-squares.list-ul.litecoin-sign.location.location-arrow.location-crosshairs.location-dot.location-pin.location-pin-lock.lock.lock-open.locust.long-arrow-alt-down.long-arrow-alt-left.long-arrow-alt-right.long-arrow-alt-up.long-arrow-down.long-arrow-left.long-arrow-right.long-arrow-up.low-vision.luggage-cart.lungs.lungs-virus.m.magic.magic-wand-sparkles.magnet.magnifying-glass.magnifying-glass-arrow-right.magnifying-glass-chart.magnifying-glass-dollar.magnifying-glass-location.magnifying-glass-minus.magnifying-glass-plus.mail-bulk.mail-forward.mail-reply.mail-reply-all.male.manat-sign.map.map-location.map-location-dot.map-marked.map-marked-alt.map-marker.map-marker-alt.map-pin.map-signs.marker.mars.mars-and-venus.mars-and-venus-burst.mars-double.mars-stroke.mars-stroke-h.mars-stroke-right.mars-stroke-up.mars-stroke-v.martini-glass.martini-glass-citrus.martini-glass-empty.mask.mask-face.mask-ventilator.masks-theater.mattress-pillow.maximize.medal.medkit.meh.meh-blank.meh-rolling-eyes.memory.menorah.mercury.message.meteor.microchip.microphone.microphone-alt.microphone-alt-slash.microphone-lines.microphone-lines-slash.microphone-slash.microscope.mill-sign.minimize.minus.minus-circle.minus-square.mitten.mobile.mobile-alt.mobile-android.mobile-android-alt.mobile-button.mobile-phone.mobile-retro.mobile-screen.mobile-screen-button.money-bill.money-bill-1.money-bill-1-wave.money-bill-alt.money-bill-transfer.money-bill-trend-up.money-bill-wave.money-bill-wave-alt.money-bill-wheat.money-bills.money-check.money-check-alt.money-check-dollar.monument.moon.mortar-board.mortar-pestle.mosque.mosquito.mosquito-net.motorcycle.mound.mountain.mountain-city.mountain-sun.mouse.mouse-pointer.mug-hot.mug-saucer.multiply.museum.music.n.naira-sign.navicon.network-wired.neuter.newspaper.not-equal.notdef.note-sticky.notes-medical.o.object-group.object-ungroup.oil-can.oil-well.om.otter.outdent.p.pager.paint-brush.paint-roller.paintbrush.palette.pallet.panorama.paper-plane.paperclip.parachute-box.paragraph.parking.passport.pastafarianism.paste.pause.pause-circle.paw.peace.pen.pen-alt.pen-clip.pen-fancy.pen-nib.pen-ruler.pen-square.pen-to-square.pencil.pencil-alt.pencil-ruler.pencil-square.people-arrows.people-arrows-left-right.people-carry.people-carry-box.people-group.people-line.people-pulling.people-robbery.people-roof.pepper-hot.percent.percentage.person.person-arrow-down-to-line.person-arrow-up-from-line.person-biking.person-booth.person-breastfeeding.person-burst.person-cane.person-chalkboard.person-circle-check.person-circle-exclamation.person-circle-minus.person-circle-plus.person-circle-question.person-circle-xmark.person-digging.person-dots-from-line.person-dress.person-dress-burst.person-drowning.person-falling.person-falling-burst.person-half-dress.person-harassing.person-hiking.person-military-pointing.person-military-rifle.person-military-to-person.person-praying.person-pregnant.person-rays.person-rifle.person-running.person-shelter.person-skating.person-skiing.person-skiing-nordic.person-snowboarding.person-swimming.person-through-window.person-walking.person-walking-arrow-loop-left.person-walking-arrow-right.person-walking-dashed-line-arrow-right.person-walking-luggage.person-walking-with-cane.peseta-sign.peso-sign.phone.phone-alt.phone-flip.phone-slash.phone-square.phone-square-alt.phone-volume.photo-film.photo-video.pie-chart.piggy-bank.pills.ping-pong-paddle-ball.pizza-slice.place-of-worship.plane.plane-arrival.plane-circle-check.plane-circle-exclamation.plane-circle-xmark.plane-departure.plane-lock.plane-slash.plane-up.plant-wilt.plate-wheat.play.play-circle.plug.plug-circle-bolt.plug-circle-check.plug-circle-exclamation.plug-circle-minus.plug-circle-plus.plug-circle-xmark.plus.plus-circle.plus-minus.plus-square.podcast.poll.poll-h.poo.poo-bolt.poo-storm.poop.portrait.pound-sign.power-off.pray.praying-hands.prescription.prescription-bottle.prescription-bottle-alt.prescription-bottle-medical.print.procedures.project-diagram.pump-medical.pump-soap.puzzle-piece.q.qrcode.question.question-circle.quidditch.quidditch-broom-ball.quote-left.quote-left-alt.quote-right.quote-right-alt.quran.r.radiation.radiation-alt.radio.rainbow.random.ranking-star.receipt.record-vinyl.rectangle-ad.rectangle-list.rectangle-times.rectangle-xmark.recycle.redo.redo-alt.refresh.registered.remove.remove-format.reorder.repeat.reply.reply-all.republican.restroom.retweet.ribbon.right-from-bracket.right-left.right-long.right-to-bracket.ring.rmb.road.road-barrier.road-bridge.road-circle-check.road-circle-exclamation.road-circle-xmark.road-lock.road-spikes.robot.rocket.rod-asclepius.rod-snake.rotate.rotate-back.rotate-backward.rotate-forward.rotate-left.rotate-right.rouble.route.rss.rss-square.rub.ruble.ruble-sign.rug.ruler.ruler-combined.ruler-horizontal.ruler-vertical.running.rupee.rupee-sign.rupiah-sign.s.sack-dollar.sack-xmark.sad-cry.sad-tear.sailboat.satellite.satellite-dish.save.scale-balanced.scale-unbalanced.scale-unbalanced-flip.school.school-circle-check.school-circle-exclamation.school-circle-xmark.school-flag.school-lock.scissors.screwdriver.screwdriver-wrench.scroll.scroll-torah.sd-card.search.search-dollar.search-location.search-minus.search-plus.section.seedling.server.shapes.share.share-alt.share-alt-square.share-from-square.share-nodes.share-square.sheet-plastic.shekel.shekel-sign.sheqel.sheqel-sign.shield.shield-alt.shield-blank.shield-cat.shield-dog.shield-halved.shield-heart.shield-virus.ship.shipping-fast.shirt.shoe-prints.shop.shop-lock.shop-slash.shopping-bag.shopping-basket.shopping-cart.shower.shrimp.shuffle.shuttle-space.shuttle-van.sign.sign-hanging.sign-in.sign-in-alt.sign-language.sign-out.sign-out-alt.signal.signal-5.signal-perfect.signature.signing.signs-post.sim-card.sink.sitemap.skating.skiing.skiing-nordic.skull.skull-crossbones.slash.sleigh.sliders.sliders-h.smile.smile-beam.smile-wink.smog.smoking.smoking-ban.sms.snowboarding.snowflake.snowman.snowplow.soap.soccer-ball.socks.solar-panel.sort.sort-alpha-asc.sort-alpha-desc.sort-alpha-down.sort-alpha-down-alt.sort-alpha-up.sort-alpha-up-alt.sort-amount-asc.sort-amount-desc.sort-amount-down.sort-amount-down-alt.sort-amount-up.sort-amount-up-alt.sort-asc.sort-desc.sort-down.sort-numeric-asc.sort-numeric-desc.sort-numeric-down.sort-numeric-down-alt.sort-numeric-up.sort-numeric-up-alt.sort-up.spa.space-shuttle.spaghetti-monster-flying.spell-check.spider.spinner.splotch.spoon.spray-can.spray-can-sparkles.sprout.square.square-arrow-up-right.square-binary.square-caret-down.square-caret-left.square-caret-right.square-caret-up.square-check.square-envelope.square-full.square-h.square-minus.square-nfi.square-parking.square-pen.square-person-confined.square-phone.square-phone-flip.square-plus.square-poll-horizontal.square-poll-vertical.square-root-alt.square-root-variable.square-rss.square-share-nodes.square-up-right.square-virus.square-xmark.staff-aesculapius.staff-snake.stairs.stamp.stapler.star.star-and-crescent.star-half.star-half-alt.star-half-stroke.star-of-david.star-of-life.step-backward.step-forward.sterling-sign.stethoscope.sticky-note.stop.stop-circle.stopwatch.stopwatch-20.store.store-alt.store-alt-slash.store-slash.stream.street-view.strikethrough.stroopwafel.subscript.subtract.subway.suitcase.suitcase-medical.suitcase-rolling.sun.sun-plant-wilt.superscript.surprise.swatchbook.swimmer.swimming-pool.synagogue.sync.sync-alt.syringe.t.t-shirt.table.table-cells.table-cells-column-lock.table-cells-large.table-cells-row-lock.table-cells-row-unlock.table-columns.table-list.table-tennis.table-tennis-paddle-ball.tablet.tablet-alt.tablet-android.tablet-button.tablet-screen-button.tablets.tachograph-digital.tachometer.tachometer-alt.tachometer-alt-average.tachometer-alt-fast.tachometer-average.tachometer-fast.tag.tags.tanakh.tape.tarp.tarp-droplet.tasks.tasks-alt.taxi.teeth.teeth-open.teletype.television.temperature-0.temperature-1.temperature-2.temperature-3.temperature-4.temperature-arrow-down.temperature-arrow-up.temperature-down.temperature-empty.temperature-full.temperature-half.temperature-high.temperature-low.temperature-quarter.temperature-three-quarters.temperature-up.tenge.tenge-sign.tent.tent-arrow-down-to-line.tent-arrow-left-right.tent-arrow-turn-left.tent-arrows-down.tents.terminal.text-height.text-slash.text-width.th.th-large.th-list.theater-masks.thermometer.thermometer-0.thermometer-1.thermometer-2.thermometer-3.thermometer-4.thermometer-empty.thermometer-full.thermometer-half.thermometer-quarter.thermometer-three-quarters.thumb-tack.thumb-tack-slash.thumbs-down.thumbs-up.thumbtack.thumbtack-slash.thunderstorm.ticket.ticket-alt.ticket-simple.timeline.times.times-circle.times-rectangle.times-square.tint.tint-slash.tired.toggle-off.toggle-on.toilet.toilet-paper.toilet-paper-slash.toilet-portable.toilets-portable.toolbox.tools.tooth.torah.torii-gate.tornado.tower-broadcast.tower-cell.tower-observation.tractor.trademark.traffic-light.trailer.train.train-subway.train-tram.tram.transgender.transgender-alt.trash.trash-alt.trash-arrow-up.trash-can.trash-can-arrow-up.trash-restore.trash-restore-alt.tree.tree-city.triangle-circle-square.triangle-exclamation.trophy.trowel.trowel-bricks.truck.truck-arrow-right.truck-droplet.truck-fast.truck-field.truck-field-un.truck-front.truck-loading.truck-medical.truck-monster.truck-moving.truck-pickup.truck-plane.truck-ramp-box.try.tshirt.tty.turkish-lira.turkish-lira-sign.turn-down.turn-up.tv.tv-alt.u.umbrella.umbrella-beach.underline.undo.undo-alt.universal-access.university.unlink.unlock.unlock-alt.unlock-keyhole.unsorted.up-down.up-down-left-right.up-long.up-right-and-down-left-from-center.up-right-from-square.upload.usd.user.user-alt.user-alt-slash.user-astronaut.user-check.user-circle.user-clock.user-cog.user-doctor.user-edit.user-friends.user-gear.user-graduate.user-group.user-injured.user-large.user-large-slash.user-lock.user-md.user-minus.user-ninja.user-nurse.user-pen.user-plus.user-secret.user-shield.user-slash.user-tag.user-tie.user-times.user-xmark.users.users-between-lines.users-cog.users-gear.users-line.users-rays.users-rectangle.users-slash.users-viewfinder.utensil-spoon.utensils.v.van-shuttle.vault.vcard.vector-square.venus.venus-double.venus-mars.vest.vest-patches.vial.vial-circle-check.vial-virus.vials.video.video-camera.video-slash.vihara.virus.virus-covid.virus-covid-slash.virus-slash.viruses.voicemail.volcano.volleyball.volleyball-ball.volume-control-phone.volume-down.volume-high.volume-low.volume-mute.volume-off.volume-times.volume-up.volume-xmark.vote-yea.vr-cardboard.w.walkie-talkie.walking.wallet.wand-magic.wand-magic-sparkles.wand-sparkles.warehouse.warning.water.water-ladder.wave-square.web-awesome.weight.weight-hanging.weight-scale.wheat-alt.wheat-awn.wheat-awn-circle-exclamation.wheelchair.wheelchair-alt.wheelchair-move.whiskey-glass.wifi.wifi-3.wifi-strong.wind.window-close.window-maximize.window-minimize.window-restore.wine-bottle.wine-glass.wine-glass-alt.wine-glass-empty.won.won-sign.worm.wrench.x.x-ray.xmark.xmark-circle.xmark-square.xmarks-lines.y.yen.yen-sign.yin-yang.z.zap".split("."), lr = { class: "justified" }, ur = /* @__PURE__ */ M({
|
|
526
|
+
}), [["__scopeId", "data-v-b4e1f98e"]]), Bn = /* @__PURE__ */ "0.1.2.3.4.5.6.7.8.9.a.ad.add.address-book.address-card.adjust.air-freshener.align-center.align-justify.align-left.align-right.allergies.ambulance.american-sign-language-interpreting.anchor.anchor-circle-check.anchor-circle-exclamation.anchor-circle-xmark.anchor-lock.angle-double-down.angle-double-left.angle-double-right.angle-double-up.angle-down.angle-left.angle-right.angle-up.angles-down.angles-left.angles-right.angles-up.angry.ankh.apple-alt.apple-whole.archive.archway.area-chart.arrow-alt-circle-down.arrow-alt-circle-left.arrow-alt-circle-right.arrow-alt-circle-up.arrow-circle-down.arrow-circle-left.arrow-circle-right.arrow-circle-up.arrow-down.arrow-down-1-9.arrow-down-9-1.arrow-down-a-z.arrow-down-long.arrow-down-short-wide.arrow-down-up-across-line.arrow-down-up-lock.arrow-down-wide-short.arrow-down-z-a.arrow-left.arrow-left-long.arrow-left-rotate.arrow-pointer.arrow-right.arrow-right-arrow-left.arrow-right-from-bracket.arrow-right-from-file.arrow-right-long.arrow-right-rotate.arrow-right-to-bracket.arrow-right-to-city.arrow-right-to-file.arrow-rotate-back.arrow-rotate-backward.arrow-rotate-forward.arrow-rotate-left.arrow-rotate-right.arrow-trend-down.arrow-trend-up.arrow-turn-down.arrow-turn-up.arrow-up.arrow-up-1-9.arrow-up-9-1.arrow-up-a-z.arrow-up-from-bracket.arrow-up-from-ground-water.arrow-up-from-water-pump.arrow-up-long.arrow-up-right-dots.arrow-up-right-from-square.arrow-up-short-wide.arrow-up-wide-short.arrow-up-z-a.arrows.arrows-alt.arrows-alt-h.arrows-alt-v.arrows-down-to-line.arrows-down-to-people.arrows-h.arrows-left-right.arrows-left-right-to-line.arrows-rotate.arrows-spin.arrows-split-up-and-left.arrows-to-circle.arrows-to-dot.arrows-to-eye.arrows-turn-right.arrows-turn-to-dots.arrows-up-down.arrows-up-down-left-right.arrows-up-to-line.arrows-v.asl-interpreting.assistive-listening-systems.asterisk.at.atlas.atom.audio-description.austral-sign.automobile.award.b.baby.baby-carriage.backspace.backward.backward-fast.backward-step.bacon.bacteria.bacterium.bag-shopping.bahai.baht-sign.balance-scale.balance-scale-left.balance-scale-right.ban.ban-smoking.band-aid.bandage.bangladeshi-taka-sign.bank.bar-chart.barcode.bars.bars-progress.bars-staggered.baseball.baseball-ball.baseball-bat-ball.basket-shopping.basketball.basketball-ball.bath.bathtub.battery.battery-0.battery-2.battery-3.battery-4.battery-5.battery-car.battery-empty.battery-full.battery-half.battery-quarter.battery-three-quarters.bed.bed-pulse.beer.beer-mug-empty.bell.bell-concierge.bell-slash.bezier-curve.bible.bicycle.biking.binoculars.biohazard.birthday-cake.bitcoin-sign.blackboard.blender.blender-phone.blind.blog.bold.bolt.bolt-lightning.bomb.bone.bong.book.book-atlas.book-bible.book-bookmark.book-dead.book-journal-whills.book-medical.book-open.book-open-reader.book-quran.book-reader.book-skull.book-tanakh.bookmark.border-all.border-none.border-style.border-top-left.bore-hole.bottle-droplet.bottle-water.bowl-food.bowl-rice.bowling-ball.box.box-archive.box-open.box-tissue.boxes.boxes-alt.boxes-packing.boxes-stacked.braille.brain.brazilian-real-sign.bread-slice.bridge.bridge-circle-check.bridge-circle-exclamation.bridge-circle-xmark.bridge-lock.bridge-water.briefcase.briefcase-clock.briefcase-medical.broadcast-tower.broom.broom-ball.brush.bucket.bug.bug-slash.bugs.building.building-circle-arrow-right.building-circle-check.building-circle-exclamation.building-circle-xmark.building-columns.building-flag.building-lock.building-ngo.building-shield.building-un.building-user.building-wheat.bullhorn.bullseye.burger.burn.burst.bus.bus-alt.bus-simple.business-time.c.cab.cable-car.cake.cake-candles.calculator.calendar.calendar-alt.calendar-check.calendar-day.calendar-days.calendar-minus.calendar-plus.calendar-times.calendar-week.calendar-xmark.camera.camera-alt.camera-retro.camera-rotate.campground.cancel.candy-cane.cannabis.capsules.car.car-alt.car-battery.car-burst.car-crash.car-on.car-rear.car-side.car-tunnel.caravan.caret-down.caret-left.caret-right.caret-square-down.caret-square-left.caret-square-right.caret-square-up.caret-up.carriage-baby.carrot.cart-arrow-down.cart-flatbed.cart-flatbed-suitcase.cart-plus.cart-shopping.cash-register.cat.cedi-sign.cent-sign.certificate.chain.chain-broken.chain-slash.chair.chalkboard.chalkboard-teacher.chalkboard-user.champagne-glasses.charging-station.chart-area.chart-bar.chart-column.chart-diagram.chart-gantt.chart-line.chart-pie.chart-simple.check.check-circle.check-double.check-square.check-to-slot.cheese.chess.chess-bishop.chess-board.chess-king.chess-knight.chess-pawn.chess-queen.chess-rook.chevron-circle-down.chevron-circle-left.chevron-circle-right.chevron-circle-up.chevron-down.chevron-left.chevron-right.chevron-up.child.child-combatant.child-dress.child-reaching.child-rifle.children.church.circle.circle-arrow-down.circle-arrow-left.circle-arrow-right.circle-arrow-up.circle-check.circle-chevron-down.circle-chevron-left.circle-chevron-right.circle-chevron-up.circle-dollar-to-slot.circle-dot.circle-down.circle-exclamation.circle-h.circle-half-stroke.circle-info.circle-left.circle-minus.circle-nodes.circle-notch.circle-pause.circle-play.circle-plus.circle-question.circle-radiation.circle-right.circle-stop.circle-up.circle-user.circle-xmark.city.clapperboard.clinic-medical.clipboard.clipboard-check.clipboard-list.clipboard-question.clipboard-user.clock.clock-four.clock-rotate-left.clone.close.closed-captioning.cloud.cloud-arrow-down.cloud-arrow-up.cloud-bolt.cloud-download.cloud-download-alt.cloud-meatball.cloud-moon.cloud-moon-rain.cloud-rain.cloud-showers-heavy.cloud-showers-water.cloud-sun.cloud-sun-rain.cloud-upload.cloud-upload-alt.clover.cny.cocktail.code.code-branch.code-commit.code-compare.code-fork.code-merge.code-pull-request.coffee.cog.cogs.coins.colon-sign.columns.comment.comment-alt.comment-dollar.comment-dots.comment-medical.comment-nodes.comment-slash.comment-sms.commenting.comments.comments-dollar.compact-disc.compass.compass-drafting.compress.compress-alt.compress-arrows-alt.computer.computer-mouse.concierge-bell.contact-book.contact-card.cookie.cookie-bite.copy.copyright.couch.cow.credit-card.credit-card-alt.crop.crop-alt.crop-simple.cross.crosshairs.crow.crown.crutch.cruzeiro-sign.cube.cubes.cubes-stacked.cut.cutlery.d.dashboard.database.deaf.deafness.dedent.delete-left.democrat.desktop.desktop-alt.dharmachakra.diagnoses.diagram-next.diagram-predecessor.diagram-project.diagram-successor.diamond.diamond-turn-right.dice.dice-d20.dice-d6.dice-five.dice-four.dice-one.dice-six.dice-three.dice-two.digging.digital-tachograph.directions.disease.display.divide.dizzy.dna.dog.dollar.dollar-sign.dolly.dolly-box.dolly-flatbed.donate.dong-sign.door-closed.door-open.dot-circle.dove.down-left-and-up-right-to-center.down-long.download.drafting-compass.dragon.draw-polygon.drivers-license.droplet.droplet-slash.drum.drum-steelpan.drumstick-bite.dumbbell.dumpster.dumpster-fire.dungeon.e.ear-deaf.ear-listen.earth.earth-africa.earth-america.earth-americas.earth-asia.earth-europe.earth-oceania.edit.egg.eject.elevator.ellipsis.ellipsis-h.ellipsis-v.ellipsis-vertical.envelope.envelope-circle-check.envelope-open.envelope-open-text.envelope-square.envelopes-bulk.equals.eraser.ethernet.eur.euro.euro-sign.exchange.exchange-alt.exclamation.exclamation-circle.exclamation-triangle.expand.expand-alt.expand-arrows-alt.explosion.external-link.external-link-alt.external-link-square.external-link-square-alt.eye.eye-dropper.eye-dropper-empty.eye-low-vision.eye-slash.eyedropper.f.face-angry.face-dizzy.face-flushed.face-frown.face-frown-open.face-grimace.face-grin.face-grin-beam.face-grin-beam-sweat.face-grin-hearts.face-grin-squint.face-grin-squint-tears.face-grin-stars.face-grin-tears.face-grin-tongue.face-grin-tongue-squint.face-grin-tongue-wink.face-grin-wide.face-grin-wink.face-kiss.face-kiss-beam.face-kiss-wink-heart.face-laugh.face-laugh-beam.face-laugh-squint.face-laugh-wink.face-meh.face-meh-blank.face-rolling-eyes.face-sad-cry.face-sad-tear.face-smile.face-smile-beam.face-smile-wink.face-surprise.face-tired.fan.faucet.faucet-drip.fax.feather.feather-alt.feather-pointed.feed.female.ferry.fighter-jet.file.file-alt.file-archive.file-arrow-down.file-arrow-up.file-audio.file-circle-check.file-circle-exclamation.file-circle-minus.file-circle-plus.file-circle-question.file-circle-xmark.file-clipboard.file-code.file-contract.file-csv.file-download.file-edit.file-excel.file-export.file-fragment.file-half-dashed.file-image.file-import.file-invoice.file-invoice-dollar.file-lines.file-medical.file-medical-alt.file-pdf.file-pen.file-powerpoint.file-prescription.file-shield.file-signature.file-text.file-upload.file-video.file-waveform.file-word.file-zipper.fill.fill-drip.film.filter.filter-circle-dollar.filter-circle-xmark.fingerprint.fire.fire-alt.fire-burner.fire-extinguisher.fire-flame-curved.fire-flame-simple.first-aid.fish.fish-fins.fist-raised.flag.flag-checkered.flag-usa.flask.flask-vial.floppy-disk.florin-sign.flushed.folder.folder-blank.folder-closed.folder-minus.folder-open.folder-plus.folder-tree.font.font-awesome.font-awesome-flag.font-awesome-logo-full.football.football-ball.forward.forward-fast.forward-step.franc-sign.frog.frown.frown-open.funnel-dollar.futbol.futbol-ball.g.gamepad.gas-pump.gauge.gauge-high.gauge-med.gauge-simple.gauge-simple-high.gauge-simple-med.gavel.gbp.gear.gears.gem.genderless.ghost.gift.gifts.glass-cheers.glass-martini.glass-martini-alt.glass-water.glass-water-droplet.glass-whiskey.glasses.globe.globe-africa.globe-americas.globe-asia.globe-europe.globe-oceania.golf-ball.golf-ball-tee.gopuram.graduation-cap.greater-than.greater-than-equal.grimace.grin.grin-alt.grin-beam.grin-beam-sweat.grin-hearts.grin-squint.grin-squint-tears.grin-stars.grin-tears.grin-tongue.grin-tongue-squint.grin-tongue-wink.grin-wink.grip.grip-horizontal.grip-lines.grip-lines-vertical.grip-vertical.group-arrows-rotate.guarani-sign.guitar.gun.h.h-square.hamburger.hammer.hamsa.hand.hand-back-fist.hand-dots.hand-fist.hand-holding.hand-holding-dollar.hand-holding-droplet.hand-holding-hand.hand-holding-heart.hand-holding-medical.hand-holding-usd.hand-holding-water.hand-lizard.hand-middle-finger.hand-paper.hand-peace.hand-point-down.hand-point-left.hand-point-right.hand-point-up.hand-pointer.hand-rock.hand-scissors.hand-sparkles.hand-spock.handcuffs.hands.hands-american-sign-language-interpreting.hands-asl-interpreting.hands-bound.hands-bubbles.hands-clapping.hands-helping.hands-holding.hands-holding-child.hands-holding-circle.hands-praying.hands-wash.handshake.handshake-alt.handshake-alt-slash.handshake-angle.handshake-simple.handshake-simple-slash.handshake-slash.hanukiah.hard-drive.hard-hat.hard-of-hearing.hashtag.hat-cowboy.hat-cowboy-side.hat-hard.hat-wizard.haykal.hdd.head-side-cough.head-side-cough-slash.head-side-mask.head-side-virus.header.heading.headphones.headphones-alt.headphones-simple.headset.heart.heart-broken.heart-circle-bolt.heart-circle-check.heart-circle-exclamation.heart-circle-minus.heart-circle-plus.heart-circle-xmark.heart-crack.heart-music-camera-bolt.heart-pulse.heartbeat.helicopter.helicopter-symbol.helmet-safety.helmet-un.hexagon-nodes.hexagon-nodes-bolt.highlighter.hiking.hill-avalanche.hill-rockslide.hippo.history.hockey-puck.holly-berry.home.home-alt.home-lg.home-lg-alt.home-user.horse.horse-head.hospital.hospital-alt.hospital-symbol.hospital-user.hospital-wide.hot-tub.hot-tub-person.hotdog.hotel.hourglass.hourglass-1.hourglass-2.hourglass-3.hourglass-empty.hourglass-end.hourglass-half.hourglass-start.house.house-chimney.house-chimney-crack.house-chimney-medical.house-chimney-user.house-chimney-window.house-circle-check.house-circle-exclamation.house-circle-xmark.house-crack.house-damage.house-fire.house-flag.house-flood-water.house-flood-water-circle-arrow-right.house-laptop.house-lock.house-medical.house-medical-circle-check.house-medical-circle-exclamation.house-medical-circle-xmark.house-medical-flag.house-signal.house-tsunami.house-user.hryvnia.hryvnia-sign.hurricane.i.i-cursor.ice-cream.icicles.icons.id-badge.id-card.id-card-alt.id-card-clip.igloo.ils.image.image-portrait.images.inbox.indent.indian-rupee.indian-rupee-sign.industry.infinity.info.info-circle.inr.institution.italic.j.jar.jar-wheat.jedi.jet-fighter.jet-fighter-up.joint.journal-whills.jpy.jug-detergent.k.kaaba.key.keyboard.khanda.kip-sign.kiss.kiss-beam.kiss-wink-heart.kit-medical.kitchen-set.kiwi-bird.krw.l.ladder-water.land-mine-on.landmark.landmark-alt.landmark-dome.landmark-flag.language.laptop.laptop-code.laptop-file.laptop-house.laptop-medical.lari-sign.laugh.laugh-beam.laugh-squint.laugh-wink.layer-group.leaf.left-long.left-right.legal.lemon.less-than.less-than-equal.level-down.level-down-alt.level-up.level-up-alt.life-ring.lightbulb.line-chart.lines-leaning.link.link-slash.lira-sign.list.list-1-2.list-alt.list-check.list-dots.list-numeric.list-ol.list-squares.list-ul.litecoin-sign.location.location-arrow.location-crosshairs.location-dot.location-pin.location-pin-lock.lock.lock-open.locust.long-arrow-alt-down.long-arrow-alt-left.long-arrow-alt-right.long-arrow-alt-up.long-arrow-down.long-arrow-left.long-arrow-right.long-arrow-up.low-vision.luggage-cart.lungs.lungs-virus.m.magic.magic-wand-sparkles.magnet.magnifying-glass.magnifying-glass-arrow-right.magnifying-glass-chart.magnifying-glass-dollar.magnifying-glass-location.magnifying-glass-minus.magnifying-glass-plus.mail-bulk.mail-forward.mail-reply.mail-reply-all.male.manat-sign.map.map-location.map-location-dot.map-marked.map-marked-alt.map-marker.map-marker-alt.map-pin.map-signs.marker.mars.mars-and-venus.mars-and-venus-burst.mars-double.mars-stroke.mars-stroke-h.mars-stroke-right.mars-stroke-up.mars-stroke-v.martini-glass.martini-glass-citrus.martini-glass-empty.mask.mask-face.mask-ventilator.masks-theater.mattress-pillow.maximize.medal.medkit.meh.meh-blank.meh-rolling-eyes.memory.menorah.mercury.message.meteor.microchip.microphone.microphone-alt.microphone-alt-slash.microphone-lines.microphone-lines-slash.microphone-slash.microscope.mill-sign.minimize.minus.minus-circle.minus-square.mitten.mobile.mobile-alt.mobile-android.mobile-android-alt.mobile-button.mobile-phone.mobile-retro.mobile-screen.mobile-screen-button.money-bill.money-bill-1.money-bill-1-wave.money-bill-alt.money-bill-transfer.money-bill-trend-up.money-bill-wave.money-bill-wave-alt.money-bill-wheat.money-bills.money-check.money-check-alt.money-check-dollar.monument.moon.mortar-board.mortar-pestle.mosque.mosquito.mosquito-net.motorcycle.mound.mountain.mountain-city.mountain-sun.mouse.mouse-pointer.mug-hot.mug-saucer.multiply.museum.music.n.naira-sign.navicon.network-wired.neuter.newspaper.not-equal.notdef.note-sticky.notes-medical.o.object-group.object-ungroup.oil-can.oil-well.om.otter.outdent.p.pager.paint-brush.paint-roller.paintbrush.palette.pallet.panorama.paper-plane.paperclip.parachute-box.paragraph.parking.passport.pastafarianism.paste.pause.pause-circle.paw.peace.pen.pen-alt.pen-clip.pen-fancy.pen-nib.pen-ruler.pen-square.pen-to-square.pencil.pencil-alt.pencil-ruler.pencil-square.people-arrows.people-arrows-left-right.people-carry.people-carry-box.people-group.people-line.people-pulling.people-robbery.people-roof.pepper-hot.percent.percentage.person.person-arrow-down-to-line.person-arrow-up-from-line.person-biking.person-booth.person-breastfeeding.person-burst.person-cane.person-chalkboard.person-circle-check.person-circle-exclamation.person-circle-minus.person-circle-plus.person-circle-question.person-circle-xmark.person-digging.person-dots-from-line.person-dress.person-dress-burst.person-drowning.person-falling.person-falling-burst.person-half-dress.person-harassing.person-hiking.person-military-pointing.person-military-rifle.person-military-to-person.person-praying.person-pregnant.person-rays.person-rifle.person-running.person-shelter.person-skating.person-skiing.person-skiing-nordic.person-snowboarding.person-swimming.person-through-window.person-walking.person-walking-arrow-loop-left.person-walking-arrow-right.person-walking-dashed-line-arrow-right.person-walking-luggage.person-walking-with-cane.peseta-sign.peso-sign.phone.phone-alt.phone-flip.phone-slash.phone-square.phone-square-alt.phone-volume.photo-film.photo-video.pie-chart.piggy-bank.pills.ping-pong-paddle-ball.pizza-slice.place-of-worship.plane.plane-arrival.plane-circle-check.plane-circle-exclamation.plane-circle-xmark.plane-departure.plane-lock.plane-slash.plane-up.plant-wilt.plate-wheat.play.play-circle.plug.plug-circle-bolt.plug-circle-check.plug-circle-exclamation.plug-circle-minus.plug-circle-plus.plug-circle-xmark.plus.plus-circle.plus-minus.plus-square.podcast.poll.poll-h.poo.poo-bolt.poo-storm.poop.portrait.pound-sign.power-off.pray.praying-hands.prescription.prescription-bottle.prescription-bottle-alt.prescription-bottle-medical.print.procedures.project-diagram.pump-medical.pump-soap.puzzle-piece.q.qrcode.question.question-circle.quidditch.quidditch-broom-ball.quote-left.quote-left-alt.quote-right.quote-right-alt.quran.r.radiation.radiation-alt.radio.rainbow.random.ranking-star.receipt.record-vinyl.rectangle-ad.rectangle-list.rectangle-times.rectangle-xmark.recycle.redo.redo-alt.refresh.registered.remove.remove-format.reorder.repeat.reply.reply-all.republican.restroom.retweet.ribbon.right-from-bracket.right-left.right-long.right-to-bracket.ring.rmb.road.road-barrier.road-bridge.road-circle-check.road-circle-exclamation.road-circle-xmark.road-lock.road-spikes.robot.rocket.rod-asclepius.rod-snake.rotate.rotate-back.rotate-backward.rotate-forward.rotate-left.rotate-right.rouble.route.rss.rss-square.rub.ruble.ruble-sign.rug.ruler.ruler-combined.ruler-horizontal.ruler-vertical.running.rupee.rupee-sign.rupiah-sign.s.sack-dollar.sack-xmark.sad-cry.sad-tear.sailboat.satellite.satellite-dish.save.scale-balanced.scale-unbalanced.scale-unbalanced-flip.school.school-circle-check.school-circle-exclamation.school-circle-xmark.school-flag.school-lock.scissors.screwdriver.screwdriver-wrench.scroll.scroll-torah.sd-card.search.search-dollar.search-location.search-minus.search-plus.section.seedling.server.shapes.share.share-alt.share-alt-square.share-from-square.share-nodes.share-square.sheet-plastic.shekel.shekel-sign.sheqel.sheqel-sign.shield.shield-alt.shield-blank.shield-cat.shield-dog.shield-halved.shield-heart.shield-virus.ship.shipping-fast.shirt.shoe-prints.shop.shop-lock.shop-slash.shopping-bag.shopping-basket.shopping-cart.shower.shrimp.shuffle.shuttle-space.shuttle-van.sign.sign-hanging.sign-in.sign-in-alt.sign-language.sign-out.sign-out-alt.signal.signal-5.signal-perfect.signature.signing.signs-post.sim-card.sink.sitemap.skating.skiing.skiing-nordic.skull.skull-crossbones.slash.sleigh.sliders.sliders-h.smile.smile-beam.smile-wink.smog.smoking.smoking-ban.sms.snowboarding.snowflake.snowman.snowplow.soap.soccer-ball.socks.solar-panel.sort.sort-alpha-asc.sort-alpha-desc.sort-alpha-down.sort-alpha-down-alt.sort-alpha-up.sort-alpha-up-alt.sort-amount-asc.sort-amount-desc.sort-amount-down.sort-amount-down-alt.sort-amount-up.sort-amount-up-alt.sort-asc.sort-desc.sort-down.sort-numeric-asc.sort-numeric-desc.sort-numeric-down.sort-numeric-down-alt.sort-numeric-up.sort-numeric-up-alt.sort-up.spa.space-shuttle.spaghetti-monster-flying.spell-check.spider.spinner.splotch.spoon.spray-can.spray-can-sparkles.sprout.square.square-arrow-up-right.square-binary.square-caret-down.square-caret-left.square-caret-right.square-caret-up.square-check.square-envelope.square-full.square-h.square-minus.square-nfi.square-parking.square-pen.square-person-confined.square-phone.square-phone-flip.square-plus.square-poll-horizontal.square-poll-vertical.square-root-alt.square-root-variable.square-rss.square-share-nodes.square-up-right.square-virus.square-xmark.staff-aesculapius.staff-snake.stairs.stamp.stapler.star.star-and-crescent.star-half.star-half-alt.star-half-stroke.star-of-david.star-of-life.step-backward.step-forward.sterling-sign.stethoscope.sticky-note.stop.stop-circle.stopwatch.stopwatch-20.store.store-alt.store-alt-slash.store-slash.stream.street-view.strikethrough.stroopwafel.subscript.subtract.subway.suitcase.suitcase-medical.suitcase-rolling.sun.sun-plant-wilt.superscript.surprise.swatchbook.swimmer.swimming-pool.synagogue.sync.sync-alt.syringe.t.t-shirt.table.table-cells.table-cells-column-lock.table-cells-large.table-cells-row-lock.table-cells-row-unlock.table-columns.table-list.table-tennis.table-tennis-paddle-ball.tablet.tablet-alt.tablet-android.tablet-button.tablet-screen-button.tablets.tachograph-digital.tachometer.tachometer-alt.tachometer-alt-average.tachometer-alt-fast.tachometer-average.tachometer-fast.tag.tags.tanakh.tape.tarp.tarp-droplet.tasks.tasks-alt.taxi.teeth.teeth-open.teletype.television.temperature-0.temperature-1.temperature-2.temperature-3.temperature-4.temperature-arrow-down.temperature-arrow-up.temperature-down.temperature-empty.temperature-full.temperature-half.temperature-high.temperature-low.temperature-quarter.temperature-three-quarters.temperature-up.tenge.tenge-sign.tent.tent-arrow-down-to-line.tent-arrow-left-right.tent-arrow-turn-left.tent-arrows-down.tents.terminal.text-height.text-slash.text-width.th.th-large.th-list.theater-masks.thermometer.thermometer-0.thermometer-1.thermometer-2.thermometer-3.thermometer-4.thermometer-empty.thermometer-full.thermometer-half.thermometer-quarter.thermometer-three-quarters.thumb-tack.thumb-tack-slash.thumbs-down.thumbs-up.thumbtack.thumbtack-slash.thunderstorm.ticket.ticket-alt.ticket-simple.timeline.times.times-circle.times-rectangle.times-square.tint.tint-slash.tired.toggle-off.toggle-on.toilet.toilet-paper.toilet-paper-slash.toilet-portable.toilets-portable.toolbox.tools.tooth.torah.torii-gate.tornado.tower-broadcast.tower-cell.tower-observation.tractor.trademark.traffic-light.trailer.train.train-subway.train-tram.tram.transgender.transgender-alt.trash.trash-alt.trash-arrow-up.trash-can.trash-can-arrow-up.trash-restore.trash-restore-alt.tree.tree-city.triangle-circle-square.triangle-exclamation.trophy.trowel.trowel-bricks.truck.truck-arrow-right.truck-droplet.truck-fast.truck-field.truck-field-un.truck-front.truck-loading.truck-medical.truck-monster.truck-moving.truck-pickup.truck-plane.truck-ramp-box.try.tshirt.tty.turkish-lira.turkish-lira-sign.turn-down.turn-up.tv.tv-alt.u.umbrella.umbrella-beach.underline.undo.undo-alt.universal-access.university.unlink.unlock.unlock-alt.unlock-keyhole.unsorted.up-down.up-down-left-right.up-long.up-right-and-down-left-from-center.up-right-from-square.upload.usd.user.user-alt.user-alt-slash.user-astronaut.user-check.user-circle.user-clock.user-cog.user-doctor.user-edit.user-friends.user-gear.user-graduate.user-group.user-injured.user-large.user-large-slash.user-lock.user-md.user-minus.user-ninja.user-nurse.user-pen.user-plus.user-secret.user-shield.user-slash.user-tag.user-tie.user-times.user-xmark.users.users-between-lines.users-cog.users-gear.users-line.users-rays.users-rectangle.users-slash.users-viewfinder.utensil-spoon.utensils.v.van-shuttle.vault.vcard.vector-square.venus.venus-double.venus-mars.vest.vest-patches.vial.vial-circle-check.vial-virus.vials.video.video-camera.video-slash.vihara.virus.virus-covid.virus-covid-slash.virus-slash.viruses.voicemail.volcano.volleyball.volleyball-ball.volume-control-phone.volume-down.volume-high.volume-low.volume-mute.volume-off.volume-times.volume-up.volume-xmark.vote-yea.vr-cardboard.w.walkie-talkie.walking.wallet.wand-magic.wand-magic-sparkles.wand-sparkles.warehouse.warning.water.water-ladder.wave-square.web-awesome.weight.weight-hanging.weight-scale.wheat-alt.wheat-awn.wheat-awn-circle-exclamation.wheelchair.wheelchair-alt.wheelchair-move.whiskey-glass.wifi.wifi-3.wifi-strong.wind.window-close.window-maximize.window-minimize.window-restore.wine-bottle.wine-glass.wine-glass-alt.wine-glass-empty.won.won-sign.worm.wrench.x.x-ray.xmark.xmark-circle.xmark-square.xmarks-lines.y.yen.yen-sign.yin-yang.z.zap".split("."), Vn = { class: "justified" }, Hn = /* @__PURE__ */ M({
|
|
1354
527
|
__name: "IconCell",
|
|
1355
528
|
props: {
|
|
1356
529
|
modelValue: {},
|
|
@@ -1364,7 +537,7 @@ var nr = {
|
|
|
1364
537
|
"reload"
|
|
1365
538
|
],
|
|
1366
539
|
setup(e, { emit: t }) {
|
|
1367
|
-
let n = W(e, "modelValue", t), r = I(
|
|
540
|
+
let n = W(e, "modelValue", t), r = I(Bn.map((e) => ({ value: e }))), i = (e, t) => {
|
|
1368
541
|
t(e ? r.value.filter(a(e)) : r.value.slice(0, 100));
|
|
1369
542
|
}, a = (e) => (t) => t.value.toLowerCase().indexOf(e.toLowerCase()) === 0;
|
|
1370
543
|
return (t, r) => {
|
|
@@ -1377,7 +550,7 @@ var nr = {
|
|
|
1377
550
|
"fetch-suggestions": i,
|
|
1378
551
|
onChange: r[1] ||= (e) => V(n).value = e.value
|
|
1379
552
|
}, Tt({
|
|
1380
|
-
default: U(({ item: e }) => [k("div",
|
|
553
|
+
default: U(({ item: e }) => [k("div", Vn, [k("span", null, B(e.value), 1), j(G, { icon: e.value }, null, 8, ["icon"])])]),
|
|
1381
554
|
_: 2
|
|
1382
555
|
}, [V(n) ? {
|
|
1383
556
|
name: "prefix",
|
|
@@ -1386,7 +559,7 @@ var nr = {
|
|
|
1386
559
|
} : void 0]), 1032, ["modelValue", "disabled"]);
|
|
1387
560
|
};
|
|
1388
561
|
}
|
|
1389
|
-
}),
|
|
562
|
+
}), Un = /* @__PURE__ */ M({
|
|
1390
563
|
__name: "MultiSetCell",
|
|
1391
564
|
props: {
|
|
1392
565
|
modelValue: {},
|
|
@@ -1426,7 +599,7 @@ var nr = {
|
|
|
1426
599
|
}, 8, ["disabled", "modelValue"]);
|
|
1427
600
|
};
|
|
1428
601
|
}
|
|
1429
|
-
}),
|
|
602
|
+
}), Wn = /* @__PURE__ */ M({
|
|
1430
603
|
__name: "SetCell",
|
|
1431
604
|
props: {
|
|
1432
605
|
modelValue: {},
|
|
@@ -1464,7 +637,120 @@ var nr = {
|
|
|
1464
637
|
}, 8, ["disabled", "modelValue"]);
|
|
1465
638
|
};
|
|
1466
639
|
}
|
|
1467
|
-
}),
|
|
640
|
+
}), Gn = [
|
|
641
|
+
".xls",
|
|
642
|
+
".xlsx",
|
|
643
|
+
".doc",
|
|
644
|
+
".docx",
|
|
645
|
+
".ppt",
|
|
646
|
+
".pptx",
|
|
647
|
+
".csv",
|
|
648
|
+
".txt",
|
|
649
|
+
".pdf",
|
|
650
|
+
".jpg",
|
|
651
|
+
".gif",
|
|
652
|
+
".png",
|
|
653
|
+
".jpeg",
|
|
654
|
+
".mp4",
|
|
655
|
+
".mp3",
|
|
656
|
+
".avi",
|
|
657
|
+
".zip",
|
|
658
|
+
".rar",
|
|
659
|
+
".exe"
|
|
660
|
+
], Kn = {
|
|
661
|
+
year: {
|
|
662
|
+
label: "年度",
|
|
663
|
+
value: "YYYY"
|
|
664
|
+
},
|
|
665
|
+
month: {
|
|
666
|
+
label: "月度",
|
|
667
|
+
value: "YYYY-MM-DD"
|
|
668
|
+
},
|
|
669
|
+
week: {
|
|
670
|
+
label: "周度",
|
|
671
|
+
value: "YYYY-MM-DD"
|
|
672
|
+
},
|
|
673
|
+
date: {
|
|
674
|
+
label: "日度",
|
|
675
|
+
value: "YYYY-MM-DD"
|
|
676
|
+
},
|
|
677
|
+
datetime: {
|
|
678
|
+
label: "高频",
|
|
679
|
+
value: "YYYY-MM-DD HH:mm:ss"
|
|
680
|
+
},
|
|
681
|
+
years: {
|
|
682
|
+
label: "多个年",
|
|
683
|
+
value: "YYYY"
|
|
684
|
+
},
|
|
685
|
+
months: {
|
|
686
|
+
label: "多个月",
|
|
687
|
+
value: "YYYY-MM-DD"
|
|
688
|
+
},
|
|
689
|
+
dates: {
|
|
690
|
+
label: "多个日",
|
|
691
|
+
value: "YYYY-MM-DD"
|
|
692
|
+
},
|
|
693
|
+
monthrange: {
|
|
694
|
+
label: "月区间",
|
|
695
|
+
value: "YYYY-MM-DD"
|
|
696
|
+
},
|
|
697
|
+
daterange: {
|
|
698
|
+
label: "日区间",
|
|
699
|
+
value: "YYYY-MM-DD"
|
|
700
|
+
},
|
|
701
|
+
datetimerange: {
|
|
702
|
+
label: "高频区间",
|
|
703
|
+
value: "YYYY-MM-DD HH:mm:ss"
|
|
704
|
+
},
|
|
705
|
+
time: {
|
|
706
|
+
label: "时间",
|
|
707
|
+
value: "HH:mm:ss"
|
|
708
|
+
}
|
|
709
|
+
}, qn = {
|
|
710
|
+
multiple: [
|
|
711
|
+
"ManyToManyField",
|
|
712
|
+
"ManyToManyRel",
|
|
713
|
+
"ManyToOneRel"
|
|
714
|
+
],
|
|
715
|
+
linkage: [
|
|
716
|
+
"OneToOneField",
|
|
717
|
+
"OneToOneRel",
|
|
718
|
+
"ForeignKey"
|
|
719
|
+
],
|
|
720
|
+
referred: [
|
|
721
|
+
"ManyToManyField",
|
|
722
|
+
"ManyToManyRel",
|
|
723
|
+
"ManyToOneRel",
|
|
724
|
+
"OneToOneField",
|
|
725
|
+
"OneToOneRel",
|
|
726
|
+
"ForeignKey"
|
|
727
|
+
],
|
|
728
|
+
orderable: [
|
|
729
|
+
"CharField",
|
|
730
|
+
"TextField",
|
|
731
|
+
"IntegerField",
|
|
732
|
+
"FloatField",
|
|
733
|
+
"BigIntegerField",
|
|
734
|
+
"DecimalField",
|
|
735
|
+
"SmallIntegerField",
|
|
736
|
+
"DateField",
|
|
737
|
+
"DateTimeField",
|
|
738
|
+
"TimeField",
|
|
739
|
+
"BigAutoField",
|
|
740
|
+
"Custom"
|
|
741
|
+
],
|
|
742
|
+
editable: [
|
|
743
|
+
"CharField",
|
|
744
|
+
"TextField",
|
|
745
|
+
"BooleanField",
|
|
746
|
+
"IntegerField",
|
|
747
|
+
"FloatField",
|
|
748
|
+
"DateField",
|
|
749
|
+
"DateTimeField",
|
|
750
|
+
"TimeField",
|
|
751
|
+
"JSONField"
|
|
752
|
+
]
|
|
753
|
+
}, Jn = ",", Yn = /* @__PURE__ */ M({
|
|
1468
754
|
__name: "DateArrayCell",
|
|
1469
755
|
props: {
|
|
1470
756
|
modelValue: {},
|
|
@@ -1481,11 +767,11 @@ var nr = {
|
|
|
1481
767
|
let n = e, r = W(n, "modelValue", t), i = I([]);
|
|
1482
768
|
P(() => {
|
|
1483
769
|
let e = String(r.value);
|
|
1484
|
-
i.value = e.split(
|
|
770
|
+
i.value = e.split(Jn);
|
|
1485
771
|
});
|
|
1486
772
|
function a(e) {
|
|
1487
773
|
let t = new Set(Object.values(e));
|
|
1488
|
-
r.value = [...t].sort().join(
|
|
774
|
+
r.value = [...t].sort().join(Jn);
|
|
1489
775
|
}
|
|
1490
776
|
let o = [
|
|
1491
777
|
"years",
|
|
@@ -1494,7 +780,7 @@ var nr = {
|
|
|
1494
780
|
], s = T(() => {
|
|
1495
781
|
let e = n.field.format?.frequency || "dates";
|
|
1496
782
|
return o.includes(e) ? e : "dates";
|
|
1497
|
-
}), c = T(() =>
|
|
783
|
+
}), c = T(() => Kn[s.value].value || "YYYY-MM-DD");
|
|
1498
784
|
return (t, n) => {
|
|
1499
785
|
let r = z("el-date-picker");
|
|
1500
786
|
return F(), E(r, {
|
|
@@ -1517,7 +803,7 @@ var nr = {
|
|
|
1517
803
|
]);
|
|
1518
804
|
};
|
|
1519
805
|
}
|
|
1520
|
-
}),
|
|
806
|
+
}), Xn = /* @__PURE__ */ M({
|
|
1521
807
|
__name: "DateCell",
|
|
1522
808
|
props: {
|
|
1523
809
|
modelValue: {},
|
|
@@ -1546,7 +832,7 @@ var nr = {
|
|
|
1546
832
|
default: return "date";
|
|
1547
833
|
}
|
|
1548
834
|
}), o = T(() => {
|
|
1549
|
-
let { value: e } =
|
|
835
|
+
let { value: e } = Kn[a.value] || {};
|
|
1550
836
|
return e || "YYYY-MM-DD";
|
|
1551
837
|
});
|
|
1552
838
|
return (t, n) => {
|
|
@@ -1569,7 +855,7 @@ var nr = {
|
|
|
1569
855
|
]);
|
|
1570
856
|
};
|
|
1571
857
|
}
|
|
1572
|
-
}),
|
|
858
|
+
}), Zn = " ~ ", Qn = /* @__PURE__ */ M({
|
|
1573
859
|
__name: "DateRangeCell",
|
|
1574
860
|
props: {
|
|
1575
861
|
modelValue: {},
|
|
@@ -1585,11 +871,11 @@ var nr = {
|
|
|
1585
871
|
setup(e, { emit: t }) {
|
|
1586
872
|
let n = e, r = W(n, "modelValue", t), i = I([]);
|
|
1587
873
|
function a(e) {
|
|
1588
|
-
r.value = i.value.join(
|
|
874
|
+
r.value = i.value.join(Zn);
|
|
1589
875
|
}
|
|
1590
876
|
P(() => {
|
|
1591
877
|
let e = String(r.value);
|
|
1592
|
-
i.value = e.split(
|
|
878
|
+
i.value = e.split(Zn);
|
|
1593
879
|
});
|
|
1594
880
|
let o = [
|
|
1595
881
|
"monthrange",
|
|
@@ -1598,7 +884,7 @@ var nr = {
|
|
|
1598
884
|
], s = T(() => {
|
|
1599
885
|
let e = n.field.format?.frequency || "daterange";
|
|
1600
886
|
return o.includes(e) ? e : "daterange";
|
|
1601
|
-
}), c = T(() =>
|
|
887
|
+
}), c = T(() => Kn[s.value].value || "YYYY-MM-DD");
|
|
1602
888
|
return (t, n) => {
|
|
1603
889
|
let r = z("el-date-picker"), o = z("el-space");
|
|
1604
890
|
return F(), E(o, null, {
|
|
@@ -1628,12 +914,12 @@ var nr = {
|
|
|
1628
914
|
});
|
|
1629
915
|
//#endregion
|
|
1630
916
|
//#region morghulis/components/cell/instances/date/methods.ts
|
|
1631
|
-
function
|
|
917
|
+
function $n(e) {
|
|
1632
918
|
return /^([0-9]|1\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(e);
|
|
1633
919
|
}
|
|
1634
920
|
//#endregion
|
|
1635
921
|
//#region morghulis/components/cell/instances/date/TimeCell.vue
|
|
1636
|
-
var
|
|
922
|
+
var er = /* @__PURE__ */ M({
|
|
1637
923
|
__name: "TimeCell",
|
|
1638
924
|
props: {
|
|
1639
925
|
modelValue: {},
|
|
@@ -1649,7 +935,7 @@ var yr = /* @__PURE__ */ M({
|
|
|
1649
935
|
setup(e, { emit: t }) {
|
|
1650
936
|
let n = W(e, "modelValue", t), r = I();
|
|
1651
937
|
P(() => {
|
|
1652
|
-
|
|
938
|
+
$n(String(n.value)) && (r.value = n.value);
|
|
1653
939
|
});
|
|
1654
940
|
function i(e) {
|
|
1655
941
|
n.value = r.value;
|
|
@@ -1672,7 +958,7 @@ var yr = /* @__PURE__ */ M({
|
|
|
1672
958
|
]);
|
|
1673
959
|
};
|
|
1674
960
|
}
|
|
1675
|
-
}),
|
|
961
|
+
}), tr = /* @__PURE__ */ M({
|
|
1676
962
|
__name: "TimeRangeCell",
|
|
1677
963
|
props: {
|
|
1678
964
|
modelValue: {},
|
|
@@ -1689,7 +975,7 @@ var yr = /* @__PURE__ */ M({
|
|
|
1689
975
|
let n = W(e, "modelValue", t), r = I([]);
|
|
1690
976
|
P(() => {
|
|
1691
977
|
let e = String(n.value).split(" - ");
|
|
1692
|
-
e.length === 2 &&
|
|
978
|
+
e.length === 2 && $n(e[0]) && $n(e[1]) && (r.value = e);
|
|
1693
979
|
});
|
|
1694
980
|
function i(e) {
|
|
1695
981
|
n.value = r.value.join(" - ");
|
|
@@ -1719,8 +1005,97 @@ var yr = /* @__PURE__ */ M({
|
|
|
1719
1005
|
}
|
|
1720
1006
|
});
|
|
1721
1007
|
//#endregion
|
|
1008
|
+
//#region morghulis/library/use-meta-query/methods.ts
|
|
1009
|
+
function nr(e) {
|
|
1010
|
+
let t = or.find((t) => e.endsWith(`__${t}`));
|
|
1011
|
+
return t ? {
|
|
1012
|
+
prop: e.replace(`__${t}`, ""),
|
|
1013
|
+
collation: t
|
|
1014
|
+
} : {
|
|
1015
|
+
prop: e,
|
|
1016
|
+
collation: null
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
function rr(e = {}, t) {
|
|
1020
|
+
let n = /\${(.*?)}/, r = Object.entries(e).map(([e, r]) => {
|
|
1021
|
+
if (typeof r == "string") {
|
|
1022
|
+
let e = r.match(n);
|
|
1023
|
+
e && (r = t[e[1]]);
|
|
1024
|
+
}
|
|
1025
|
+
return [e, r];
|
|
1026
|
+
});
|
|
1027
|
+
return Object.fromEntries(r);
|
|
1028
|
+
}
|
|
1029
|
+
function ir(e, t) {
|
|
1030
|
+
return Object.keys(e || {}).filter((e) => {
|
|
1031
|
+
let { prop: n } = nr(e);
|
|
1032
|
+
return n === t;
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
1035
|
+
function ar(e) {
|
|
1036
|
+
if (!e) return {};
|
|
1037
|
+
let t = Object.entries(e).map(([e, t]) => {
|
|
1038
|
+
let { prop: n, collation: r } = nr(e);
|
|
1039
|
+
return r ? [e, t] : [`${n}__exact`, t];
|
|
1040
|
+
});
|
|
1041
|
+
return Object.fromEntries(t);
|
|
1042
|
+
}
|
|
1043
|
+
var or = [
|
|
1044
|
+
"contains",
|
|
1045
|
+
"exact",
|
|
1046
|
+
"startswith",
|
|
1047
|
+
"endswith",
|
|
1048
|
+
"icontains",
|
|
1049
|
+
"iexact",
|
|
1050
|
+
"istartswith",
|
|
1051
|
+
"iendswith",
|
|
1052
|
+
"gt",
|
|
1053
|
+
"lt",
|
|
1054
|
+
"gte",
|
|
1055
|
+
"lte",
|
|
1056
|
+
"isnull",
|
|
1057
|
+
"in",
|
|
1058
|
+
"range"
|
|
1059
|
+
];
|
|
1060
|
+
function sr(e, t) {
|
|
1061
|
+
let { code: n, $entity: r, $name: i, name: a, id: o, $tree: s, $$modes: c } = e, l = cr(e, t);
|
|
1062
|
+
return {
|
|
1063
|
+
entity: r,
|
|
1064
|
+
code: n,
|
|
1065
|
+
view_id: o,
|
|
1066
|
+
title: i,
|
|
1067
|
+
name: a,
|
|
1068
|
+
tree: s,
|
|
1069
|
+
model: c,
|
|
1070
|
+
control: l,
|
|
1071
|
+
fields: lr(e.$$fields, l, t)
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
function cr(e, t) {
|
|
1075
|
+
let n = t?.disabled || e.disabled, r = !n && !!e.allow_edit;
|
|
1076
|
+
return {
|
|
1077
|
+
disabled: n,
|
|
1078
|
+
allow_edit: r,
|
|
1079
|
+
allow_search: e.allow_search ?? !0,
|
|
1080
|
+
allow_order: e.allow_order ?? !0,
|
|
1081
|
+
allow_download: !n && !!e.allow_download,
|
|
1082
|
+
allow_insert: !n && !!e.allow_insert,
|
|
1083
|
+
allow_remove: !n && !!e.allow_remove,
|
|
1084
|
+
allow_upload: !n && !!e.allow_upload,
|
|
1085
|
+
allow_edit_on_form: r && !!e.allow_edit_on_form,
|
|
1086
|
+
allow_edit_on_cell: r && !!e.allow_edit_on_cell,
|
|
1087
|
+
allow_edit_on_sort: r && !!e.allow_edit_on_sort
|
|
1088
|
+
};
|
|
1089
|
+
}
|
|
1090
|
+
function lr(e, t, n) {
|
|
1091
|
+
return e.map((e) => {
|
|
1092
|
+
let r = { ...e }, i = !r.disabled && !t.disabled, a = !n?.restricted.uneditable.includes(r.prop), o = !n?.restricted.unsearchable.includes(r.prop), s = !n?.restricted.unorderable;
|
|
1093
|
+
return r.disabled = !i, r.allow_edit &&= i && !!t.allow_edit && a, r.allow_search &&= i && !!t.allow_search && o, r.allow_order &&= i && !!t.allow_order && s, r.allow_download &&= i && !!t.allow_download, r.allow_upload &&= i && !!t.allow_upload, r.edit_on_table &&= r.allow_edit, r;
|
|
1094
|
+
});
|
|
1095
|
+
}
|
|
1096
|
+
//#endregion
|
|
1722
1097
|
//#region morghulis/components/cell/instances/refer/hooks.ts
|
|
1723
|
-
function
|
|
1098
|
+
function ur(e, t) {
|
|
1724
1099
|
let n = e.refer, r = {
|
|
1725
1100
|
entity: n.entity || "",
|
|
1726
1101
|
clearable: !e.not_null,
|
|
@@ -1733,7 +1108,7 @@ function xr(e, t) {
|
|
|
1733
1108
|
display: n.display || "id"
|
|
1734
1109
|
};
|
|
1735
1110
|
function a(e) {
|
|
1736
|
-
let { label: r } = n, i = e ? Object.fromEntries([[r, 1]]) : { sort: -1 }, a =
|
|
1111
|
+
let { label: r } = n, i = e ? Object.fromEntries([[r, 1]]) : { sort: -1 }, a = rr(n.includes, t), o = rr(n.excludes, t);
|
|
1737
1112
|
return e && (a[`${r}__icontains`] = e), {
|
|
1738
1113
|
includes: a,
|
|
1739
1114
|
excludes: o,
|
|
@@ -1775,17 +1150,17 @@ function xr(e, t) {
|
|
|
1775
1150
|
tree: d,
|
|
1776
1151
|
conditional: T(() => {
|
|
1777
1152
|
let { includes: e, excludes: t } = a(), { root: n, type: r } = l.value;
|
|
1778
|
-
return !
|
|
1153
|
+
return !cn(e) || !cn(t) || !!n && r === "tree";
|
|
1779
1154
|
}),
|
|
1780
1155
|
info: l
|
|
1781
1156
|
};
|
|
1782
1157
|
}
|
|
1783
1158
|
//#endregion
|
|
1784
1159
|
//#region morghulis/components/cell/instances/refer/AutoCell.vue?vue&type=script&setup=true&lang.ts
|
|
1785
|
-
var
|
|
1160
|
+
var dr = {
|
|
1786
1161
|
key: 0,
|
|
1787
1162
|
style: { "margin-bottom": "10px" }
|
|
1788
|
-
},
|
|
1163
|
+
}, fr = { class: "justified" }, pr = /* @__PURE__ */ M({
|
|
1789
1164
|
__name: "AutoCell",
|
|
1790
1165
|
props: {
|
|
1791
1166
|
modelValue: {},
|
|
@@ -1799,7 +1174,7 @@ var Sr = {
|
|
|
1799
1174
|
"reload"
|
|
1800
1175
|
],
|
|
1801
1176
|
setup(e, { emit: t }) {
|
|
1802
|
-
let n = e, r = W(n, "modelValue", t), { param: i, list: a, conditional: o } =
|
|
1177
|
+
let n = e, r = W(n, "modelValue", t), { param: i, list: a, conditional: o } = ur(n.field, n.row), s = (e, t) => {
|
|
1803
1178
|
a(e).then((e) => t(e.map(({ label: e }) => ({
|
|
1804
1179
|
value: e,
|
|
1805
1180
|
label: e
|
|
@@ -1807,7 +1182,7 @@ var Sr = {
|
|
|
1807
1182
|
};
|
|
1808
1183
|
return (t, n) => {
|
|
1809
1184
|
let a = z("el-tooltip"), c = z("el-text"), l = z("el-autocomplete");
|
|
1810
|
-
return F(), O(w, null, [e.field.refer.entity ? D("", !0) : (F(), O("div",
|
|
1185
|
+
return F(), O(w, null, [e.field.refer.entity ? D("", !0) : (F(), O("div", dr, [j(G, {
|
|
1811
1186
|
icon: "unlink",
|
|
1812
1187
|
type: "danger"
|
|
1813
1188
|
}, {
|
|
@@ -1822,7 +1197,7 @@ var Sr = {
|
|
|
1822
1197
|
"hide-loading": "",
|
|
1823
1198
|
"popper-append-to-body": ""
|
|
1824
1199
|
}, Tt({
|
|
1825
|
-
default: U(({ item: e }) => [k("div",
|
|
1200
|
+
default: U(({ item: e }) => [k("div", fr, [j(c, { size: "small" }, {
|
|
1826
1201
|
default: U(() => [A(B(e.label), 1)]),
|
|
1827
1202
|
_: 2
|
|
1828
1203
|
}, 1024), j(c, {
|
|
@@ -1844,7 +1219,7 @@ var Sr = {
|
|
|
1844
1219
|
} : void 0]), 1032, ["modelValue", "disabled"])], 64);
|
|
1845
1220
|
};
|
|
1846
1221
|
}
|
|
1847
|
-
}),
|
|
1222
|
+
}), mr = /* @__PURE__ */ M({
|
|
1848
1223
|
__name: "CascadeCell",
|
|
1849
1224
|
props: {
|
|
1850
1225
|
modelValue: {},
|
|
@@ -1858,7 +1233,7 @@ var Sr = {
|
|
|
1858
1233
|
"reload"
|
|
1859
1234
|
],
|
|
1860
1235
|
setup(e, { emit: t }) {
|
|
1861
|
-
let n = e, r = W(n, "modelValue", t), { loading: i, param: a, tree: o, conditional: s } =
|
|
1236
|
+
let n = e, r = W(n, "modelValue", t), { loading: i, param: a, tree: o, conditional: s } = ur(n.field, n.row), c = {
|
|
1862
1237
|
emitPath: !1,
|
|
1863
1238
|
checkStrictly: a.strict,
|
|
1864
1239
|
multiple: a.multiple
|
|
@@ -1913,7 +1288,7 @@ var Sr = {
|
|
|
1913
1288
|
])])), [[u]]);
|
|
1914
1289
|
};
|
|
1915
1290
|
}
|
|
1916
|
-
}),
|
|
1291
|
+
}), hr = /* @__PURE__ */ M({
|
|
1917
1292
|
__name: "SelectCell",
|
|
1918
1293
|
props: {
|
|
1919
1294
|
modelValue: {},
|
|
@@ -1927,7 +1302,7 @@ var Sr = {
|
|
|
1927
1302
|
"reload"
|
|
1928
1303
|
],
|
|
1929
1304
|
setup(e, { emit: t }) {
|
|
1930
|
-
let n = e, r = W(n, "modelValue", t), { loading: i, param: a, list: o, conditional: s } =
|
|
1305
|
+
let n = e, r = W(n, "modelValue", t), { loading: i, param: a, list: o, conditional: s } = ur(n.field, n.row), c = I([]);
|
|
1931
1306
|
return P(async () => c.value = await o()), (t, n) => {
|
|
1932
1307
|
let o = z("el-tooltip"), l = z("el-select"), u = It("loading");
|
|
1933
1308
|
return Ut((F(), E(l, {
|
|
@@ -1967,7 +1342,7 @@ var Sr = {
|
|
|
1967
1342
|
])), [[u, V(i)]]);
|
|
1968
1343
|
};
|
|
1969
1344
|
}
|
|
1970
|
-
}),
|
|
1345
|
+
}), gr = { class: "full center" }, _r = /* @__PURE__ */ M({
|
|
1971
1346
|
__name: "MTransferEditor",
|
|
1972
1347
|
props: {
|
|
1973
1348
|
modelValue: {},
|
|
@@ -1999,21 +1374,287 @@ var Sr = {
|
|
|
1999
1374
|
}
|
|
2000
1375
|
}), (e, t) => {
|
|
2001
1376
|
let n = z("el-transfer");
|
|
2002
|
-
return F(), O("div",
|
|
1377
|
+
return F(), O("div", gr, [j(n, {
|
|
1378
|
+
modelValue: V(r),
|
|
1379
|
+
"onUpdate:modelValue": t[0] ||= (e) => N(r) ? r.value = e : null,
|
|
1380
|
+
data: a.value,
|
|
1381
|
+
filterable: "",
|
|
1382
|
+
props: { key: "value" },
|
|
1383
|
+
titles: ["备选", "已选"]
|
|
1384
|
+
}, {
|
|
1385
|
+
default: U(({ option: e }) => [j(Dn, At(Dt(e)), null, 16)]),
|
|
1386
|
+
_: 1
|
|
1387
|
+
}, 8, ["modelValue", "data"])]);
|
|
1388
|
+
};
|
|
1389
|
+
}
|
|
1390
|
+
}), vr = /* @__PURE__ */ M({
|
|
1391
|
+
__name: "TransferCell",
|
|
1392
|
+
props: {
|
|
1393
|
+
modelValue: {},
|
|
1394
|
+
field: {},
|
|
1395
|
+
row: {},
|
|
1396
|
+
disabled: { type: Boolean }
|
|
1397
|
+
},
|
|
1398
|
+
emits: [
|
|
1399
|
+
"update:modelValue",
|
|
1400
|
+
"confirm",
|
|
1401
|
+
"reload"
|
|
1402
|
+
],
|
|
1403
|
+
setup(e, { emit: t }) {
|
|
1404
|
+
let n = I(), r = e, i = t, a = W(r, "modelValue", i), { param: o, list: s, conditional: c } = ur(r.field, r.row), l = I([]);
|
|
1405
|
+
return P(async () => l.value = await s()), (t, r) => {
|
|
1406
|
+
let o = z("el-button");
|
|
1407
|
+
return F(), O(w, null, [j(o, {
|
|
1408
|
+
style: { width: "100%" },
|
|
1409
|
+
type: "info",
|
|
1410
|
+
plain: "",
|
|
1411
|
+
onClick: r[0] ||= (e) => n.value?.open()
|
|
1412
|
+
}, {
|
|
1413
|
+
default: U(() => [j(q, { icon: "exchange-alt" }, {
|
|
1414
|
+
default: U(() => [...r[2] ||= [A("\xA0打开多选编辑器", -1)]]),
|
|
1415
|
+
_: 1
|
|
1416
|
+
})]),
|
|
1417
|
+
_: 1
|
|
1418
|
+
}), j($, {
|
|
1419
|
+
ref_key: "dialog",
|
|
1420
|
+
ref: n,
|
|
1421
|
+
title: "选项",
|
|
1422
|
+
width: 600,
|
|
1423
|
+
confirm: () => i("confirm")
|
|
1424
|
+
}, Tt({
|
|
1425
|
+
default: U(() => [j(_r, {
|
|
1426
|
+
modelValue: V(a),
|
|
1427
|
+
"onUpdate:modelValue": r[1] ||= (e) => N(a) ? a.value = e : null,
|
|
1428
|
+
disabled: e.disabled,
|
|
1429
|
+
options: l.value
|
|
1430
|
+
}, null, 8, [
|
|
1431
|
+
"modelValue",
|
|
1432
|
+
"disabled",
|
|
1433
|
+
"options"
|
|
1434
|
+
])]),
|
|
1435
|
+
_: 2
|
|
1436
|
+
}, [V(c) ? {
|
|
1437
|
+
name: "tool",
|
|
1438
|
+
fn: U(() => [j(G, { icon: "info-circle" }, {
|
|
1439
|
+
default: U(() => [...r[3] ||= [A("存在检索条件", -1)]]),
|
|
1440
|
+
_: 1
|
|
1441
|
+
})]),
|
|
1442
|
+
key: "0"
|
|
1443
|
+
} : void 0]), 1032, ["confirm"])], 64);
|
|
1444
|
+
};
|
|
1445
|
+
}
|
|
1446
|
+
}), yr = /* @__PURE__ */ M({
|
|
1447
|
+
__name: "TreeCell",
|
|
1448
|
+
props: {
|
|
1449
|
+
modelValue: {},
|
|
1450
|
+
field: {},
|
|
1451
|
+
row: {},
|
|
1452
|
+
disabled: { type: Boolean }
|
|
1453
|
+
},
|
|
1454
|
+
emits: [
|
|
1455
|
+
"update:modelValue",
|
|
1456
|
+
"confirm",
|
|
1457
|
+
"reload"
|
|
1458
|
+
],
|
|
1459
|
+
setup(e, { emit: t }) {
|
|
1460
|
+
let n = e, r = W(n, "modelValue", t), { loading: i, param: a, tree: o, conditional: s } = ur(n.field, n.row), c = I([]);
|
|
1461
|
+
return P(async () => c.value = await o()), (t, n) => {
|
|
1462
|
+
let o = z("el-tooltip"), l = z("el-tree-select"), u = It("loading");
|
|
1463
|
+
return Ut((F(), E(l, {
|
|
1464
|
+
data: c.value,
|
|
1465
|
+
modelValue: V(r),
|
|
1466
|
+
"onUpdate:modelValue": n[0] ||= (e) => N(r) ? r.value = e : null,
|
|
1467
|
+
disabled: e.disabled || V(a).disabled,
|
|
1468
|
+
clearable: V(a).clearable,
|
|
1469
|
+
"value-on-clear": null,
|
|
1470
|
+
filterable: "",
|
|
1471
|
+
"collapse-tags": V(a).multiple,
|
|
1472
|
+
"collapse-tags-tooltip": V(a).multiple,
|
|
1473
|
+
multiple: V(a).multiple,
|
|
1474
|
+
"check-strictly": V(a).strict,
|
|
1475
|
+
"default-expand-all": "",
|
|
1476
|
+
"render-after-expand": !0,
|
|
1477
|
+
class: "full"
|
|
1478
|
+
}, Tt({
|
|
1479
|
+
default: U(({ data: e }) => [j(Dn, {
|
|
1480
|
+
value: e.value,
|
|
1481
|
+
label: e.label,
|
|
1482
|
+
display: e.display,
|
|
1483
|
+
disabled: e.disabled,
|
|
1484
|
+
icon: e.isLeaf ? "leaf" : "folder",
|
|
1485
|
+
type: e.isLeaf ? "success" : "warning"
|
|
1486
|
+
}, null, 8, [
|
|
1487
|
+
"value",
|
|
1488
|
+
"label",
|
|
1489
|
+
"display",
|
|
1490
|
+
"disabled",
|
|
1491
|
+
"icon",
|
|
1492
|
+
"type"
|
|
1493
|
+
])]),
|
|
1494
|
+
_: 2
|
|
1495
|
+
}, [V(s) ? {
|
|
1496
|
+
name: "prefix",
|
|
1497
|
+
fn: U(() => [j(o, null, {
|
|
1498
|
+
content: U(() => [...n[1] ||= [A("存在检索条件", -1)]]),
|
|
1499
|
+
default: U(() => [j(G, { icon: "info-circle" })]),
|
|
1500
|
+
_: 1
|
|
1501
|
+
})]),
|
|
1502
|
+
key: "0"
|
|
1503
|
+
} : void 0]), 1032, [
|
|
1504
|
+
"data",
|
|
1505
|
+
"modelValue",
|
|
1506
|
+
"disabled",
|
|
1507
|
+
"clearable",
|
|
1508
|
+
"collapse-tags",
|
|
1509
|
+
"collapse-tags-tooltip",
|
|
1510
|
+
"multiple",
|
|
1511
|
+
"check-strictly"
|
|
1512
|
+
])), [[u, V(i)]]);
|
|
1513
|
+
};
|
|
1514
|
+
}
|
|
1515
|
+
}), br = /* @__PURE__ */ M({
|
|
1516
|
+
__name: "BooleanCell",
|
|
1517
|
+
props: {
|
|
1518
|
+
modelValue: {},
|
|
1519
|
+
field: {},
|
|
1520
|
+
row: {},
|
|
1521
|
+
disabled: { type: Boolean }
|
|
1522
|
+
},
|
|
1523
|
+
emits: [
|
|
1524
|
+
"update:modelValue",
|
|
1525
|
+
"confirm",
|
|
1526
|
+
"reload"
|
|
1527
|
+
],
|
|
1528
|
+
setup(e, { emit: t }) {
|
|
1529
|
+
let n = e, r = t, i = W(n, "modelValue", r);
|
|
1530
|
+
return (t, n) => {
|
|
1531
|
+
let a = z("el-text"), o = z("el-checkbox"), s = z("el-option"), c = z("el-select");
|
|
1532
|
+
return e.field.not_null ? (F(), E(o, {
|
|
1533
|
+
key: 0,
|
|
1534
|
+
modelValue: V(i),
|
|
1535
|
+
"onUpdate:modelValue": n[0] ||= (e) => N(i) ? i.value = e : null,
|
|
1536
|
+
disabled: e.disabled,
|
|
1537
|
+
border: "",
|
|
1538
|
+
class: "full"
|
|
1539
|
+
}, {
|
|
1540
|
+
default: U(() => [j(a, { tag: "b" }, {
|
|
1541
|
+
default: U(() => [A(B(V(i) ? "是" : "否"), 1)]),
|
|
1542
|
+
_: 1
|
|
1543
|
+
})]),
|
|
1544
|
+
_: 1
|
|
1545
|
+
}, 8, ["modelValue", "disabled"])) : (F(), E(c, {
|
|
1546
|
+
key: 1,
|
|
1547
|
+
modelValue: V(i),
|
|
1548
|
+
"onUpdate:modelValue": n[1] ||= (e) => N(i) ? i.value = e : null,
|
|
1549
|
+
disabled: e.disabled,
|
|
1550
|
+
clearable: "",
|
|
1551
|
+
"value-on-clear": null,
|
|
1552
|
+
class: "full",
|
|
1553
|
+
teleported: !1,
|
|
1554
|
+
onChange: n[2] ||= (e) => r("confirm")
|
|
1555
|
+
}, {
|
|
1556
|
+
default: U(() => [j(s, {
|
|
1557
|
+
value: !0,
|
|
1558
|
+
label: "是"
|
|
1559
|
+
}), j(s, {
|
|
1560
|
+
value: !1,
|
|
1561
|
+
label: "否"
|
|
1562
|
+
})]),
|
|
1563
|
+
_: 1
|
|
1564
|
+
}, 8, ["modelValue", "disabled"]));
|
|
1565
|
+
};
|
|
1566
|
+
}
|
|
1567
|
+
}), xr = /*#__PURE__*/ wn(/* @__PURE__ */ M({
|
|
1568
|
+
__name: "DefaultCell",
|
|
1569
|
+
props: {
|
|
1570
|
+
modelValue: {},
|
|
1571
|
+
field: {},
|
|
1572
|
+
row: {},
|
|
1573
|
+
disabled: { type: Boolean }
|
|
1574
|
+
},
|
|
1575
|
+
emits: [
|
|
1576
|
+
"update:modelValue",
|
|
1577
|
+
"confirm",
|
|
1578
|
+
"reload"
|
|
1579
|
+
],
|
|
1580
|
+
setup(e, { emit: t }) {
|
|
1581
|
+
let n = W(e, "modelValue", t);
|
|
1582
|
+
return (e, t) => V(n) == null ? (F(), E(G, {
|
|
1583
|
+
key: 1,
|
|
1584
|
+
icon: "ban"
|
|
1585
|
+
})) : (F(), E(q, {
|
|
1586
|
+
key: 0,
|
|
1587
|
+
type: "info",
|
|
1588
|
+
truncated: "",
|
|
1589
|
+
size: "small"
|
|
1590
|
+
}, {
|
|
1591
|
+
default: U(() => [A(B(V(n)), 1)]),
|
|
1592
|
+
_: 1
|
|
1593
|
+
}));
|
|
1594
|
+
}
|
|
1595
|
+
}), [["__scopeId", "data-v-ed36133d"]]), Sr = /* @__PURE__ */ M({
|
|
1596
|
+
__name: "NumberCell",
|
|
1597
|
+
props: {
|
|
1598
|
+
modelValue: {},
|
|
1599
|
+
field: {},
|
|
1600
|
+
row: {},
|
|
1601
|
+
disabled: { type: Boolean }
|
|
1602
|
+
},
|
|
1603
|
+
emits: [
|
|
1604
|
+
"update:modelValue",
|
|
1605
|
+
"confirm",
|
|
1606
|
+
"reload"
|
|
1607
|
+
],
|
|
1608
|
+
setup(e, { emit: t }) {
|
|
1609
|
+
let n = e, r = W(n, "modelValue", t), i = T(() => {
|
|
1610
|
+
let e = n.field.format || {}, t = e.min === null ? void 0 : e.min, r = e.max === null ? void 0 : e.max, i = e.precision === null ? void 0 : e.precision, { step: a, step_strictly: o } = e;
|
|
1611
|
+
return {
|
|
1612
|
+
min: t,
|
|
1613
|
+
max: r,
|
|
1614
|
+
step: a,
|
|
1615
|
+
precision: i,
|
|
1616
|
+
step_strictly: o
|
|
1617
|
+
};
|
|
1618
|
+
});
|
|
1619
|
+
return (t, n) => {
|
|
1620
|
+
let a = z("el-input-number");
|
|
1621
|
+
return F(), E(a, {
|
|
2003
1622
|
modelValue: V(r),
|
|
2004
|
-
"onUpdate:modelValue":
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
1623
|
+
"onUpdate:modelValue": n[0] ||= (e) => N(r) ? r.value = e : null,
|
|
1624
|
+
disabled: e.disabled,
|
|
1625
|
+
clearable: !e.field.not_null,
|
|
1626
|
+
"value-on-clear": e.field.not_null ? 0 : null,
|
|
1627
|
+
min: i.value.min,
|
|
1628
|
+
max: i.value.max,
|
|
1629
|
+
step: i.value.step || void 0,
|
|
1630
|
+
precision: i.value.precision,
|
|
1631
|
+
"step-strictly": i.value.step_strictly,
|
|
1632
|
+
"controls-position": "right",
|
|
1633
|
+
class: "full",
|
|
1634
|
+
onKeydown: n[1] ||= Wt((e) => t.$emit("confirm"), ["enter"])
|
|
1635
|
+
}, null, 8, [
|
|
1636
|
+
"modelValue",
|
|
1637
|
+
"disabled",
|
|
1638
|
+
"clearable",
|
|
1639
|
+
"value-on-clear",
|
|
1640
|
+
"min",
|
|
1641
|
+
"max",
|
|
1642
|
+
"step",
|
|
1643
|
+
"precision",
|
|
1644
|
+
"step-strictly"
|
|
1645
|
+
]);
|
|
2013
1646
|
};
|
|
2014
1647
|
}
|
|
2015
|
-
})
|
|
2016
|
-
|
|
1648
|
+
});
|
|
1649
|
+
//#endregion
|
|
1650
|
+
//#region morghulis/library/file-url.ts
|
|
1651
|
+
function Cr(e, t) {
|
|
1652
|
+
return t ? `${e.replace(/\/+$/, "")}/${t.replace(/^\/+/, "")}` : "";
|
|
1653
|
+
}
|
|
1654
|
+
//#endregion
|
|
1655
|
+
//#region morghulis/components/cell/instances/special/FileCell.vue
|
|
1656
|
+
var wr = /* @__PURE__ */ M({
|
|
1657
|
+
__name: "FileCell",
|
|
2017
1658
|
props: {
|
|
2018
1659
|
modelValue: {},
|
|
2019
1660
|
field: {},
|
|
@@ -2026,50 +1667,127 @@ var Sr = {
|
|
|
2026
1667
|
"reload"
|
|
2027
1668
|
],
|
|
2028
1669
|
setup(e, { emit: t }) {
|
|
2029
|
-
let n =
|
|
2030
|
-
|
|
2031
|
-
let
|
|
2032
|
-
|
|
1670
|
+
let n = e, r = t, i = W(n, "modelValue", r), { $confirm: a, $message: o } = J(), { base_url: s } = Q(), c = T(() => `${s.value}valar/${n.field.$entity}/save_file`), l = T(() => i.value), { post: u } = Y(), { minio_url: d } = Q();
|
|
1671
|
+
function f() {
|
|
1672
|
+
let { format: { locked: e } } = n.field;
|
|
1673
|
+
if (e) o.warning("抱歉,该文件不支持下载!请在线预览。");
|
|
1674
|
+
else if (!i.value) o.warning("无文件");
|
|
1675
|
+
else {
|
|
1676
|
+
let e = Cr(d.value, i.value);
|
|
1677
|
+
window.open(e, "_blank");
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
let p = I(), m = n.field.format || {}, h = {
|
|
1681
|
+
id: n.row.id,
|
|
1682
|
+
prop: n.field.prop
|
|
1683
|
+
}, g = m.accept.length ? m.accept.join(",") : "*";
|
|
1684
|
+
function _() {
|
|
1685
|
+
p.value?.$el.querySelector("input").click();
|
|
1686
|
+
}
|
|
1687
|
+
function v() {
|
|
1688
|
+
let e = `/valar/${n.field.$entity}/remove_file`;
|
|
1689
|
+
a.warning(`是否删除文件:${l.value}`).then(() => u(e, h)).then(() => {
|
|
1690
|
+
i.value = null, o.success("文件已删除"), r("reload");
|
|
1691
|
+
});
|
|
1692
|
+
}
|
|
1693
|
+
function y(e) {
|
|
1694
|
+
let { name: t, size: n } = e, r = t.indexOf(".") === -1 ? "" : `.${t.split(".").pop()}`, i = [];
|
|
1695
|
+
return g === "*" || m.accept.includes(r) || i.push(`文件类型不符合:${g}`), n / 1e6 <= m.maximum || i.push(`文件大小不超过${m.maximum}Mb`), i.length > 0 ? (o.error(i.join(";")), !1) : !0;
|
|
1696
|
+
}
|
|
1697
|
+
function b(e) {
|
|
1698
|
+
e.payload ? (i.value = e.payload, r("reload"), o.success("上传成功!")) : x(), p.value?.clearFiles();
|
|
1699
|
+
}
|
|
1700
|
+
function x() {
|
|
1701
|
+
o.error("上传失败");
|
|
1702
|
+
}
|
|
1703
|
+
return (t, n) => {
|
|
1704
|
+
let r = z("el-upload"), a = z("el-tooltip"), o = z("el-space");
|
|
1705
|
+
return F(), O(w, null, [Ut(j(r, {
|
|
1706
|
+
ref_key: "upload",
|
|
1707
|
+
ref: p,
|
|
1708
|
+
action: c.value,
|
|
1709
|
+
data: h,
|
|
1710
|
+
limit: 1,
|
|
1711
|
+
"show-file-list": !1,
|
|
1712
|
+
"auto-upload": "",
|
|
1713
|
+
accept: V(g),
|
|
1714
|
+
"before-upload": y,
|
|
1715
|
+
"on-success": b,
|
|
1716
|
+
"on-error": x
|
|
1717
|
+
}, null, 8, ["action", "accept"]), [[Ht, !1]]), j(o, null, {
|
|
1718
|
+
default: U(() => [
|
|
1719
|
+
j(a, { disabled: !l.value }, {
|
|
1720
|
+
content: U(() => [A(B(l.value), 1)]),
|
|
1721
|
+
default: U(() => [j(G, {
|
|
1722
|
+
icon: "info-circle",
|
|
1723
|
+
type: V(i) ? "" : "info"
|
|
1724
|
+
}, null, 8, ["type"])]),
|
|
1725
|
+
_: 1
|
|
1726
|
+
}, 8, ["disabled"]),
|
|
1727
|
+
j(K, {
|
|
1728
|
+
plain: "",
|
|
1729
|
+
icon: "folder-open",
|
|
1730
|
+
type: "warning",
|
|
1731
|
+
onClick: _
|
|
1732
|
+
}, {
|
|
1733
|
+
default: U(() => [...n[0] ||= [A(" 打开 ", -1)]]),
|
|
1734
|
+
_: 1
|
|
1735
|
+
}),
|
|
1736
|
+
j(K, {
|
|
1737
|
+
plain: "",
|
|
1738
|
+
disabled: !V(i),
|
|
1739
|
+
icon: "trash",
|
|
1740
|
+
type: "danger",
|
|
1741
|
+
onClick: v
|
|
1742
|
+
}, {
|
|
1743
|
+
default: U(() => [...n[1] ||= [A(" 删除 ", -1)]]),
|
|
1744
|
+
_: 1
|
|
1745
|
+
}, 8, ["disabled"]),
|
|
1746
|
+
j(K, {
|
|
1747
|
+
plain: "",
|
|
1748
|
+
disabled: !V(i) || e.field.format.locked,
|
|
1749
|
+
icon: "download",
|
|
1750
|
+
type: "primary",
|
|
1751
|
+
onClick: f
|
|
1752
|
+
}, {
|
|
1753
|
+
default: U(() => [...n[2] ||= [A(" 下载 ", -1)]]),
|
|
1754
|
+
_: 1
|
|
1755
|
+
}, 8, ["disabled"])
|
|
1756
|
+
]),
|
|
1757
|
+
_: 1
|
|
1758
|
+
})], 64);
|
|
1759
|
+
};
|
|
1760
|
+
}
|
|
1761
|
+
}), Tr = /* @__PURE__ */ M({
|
|
1762
|
+
__name: "MObjectEditor",
|
|
1763
|
+
props: {
|
|
1764
|
+
modelValue: {},
|
|
1765
|
+
disabled: { type: Boolean }
|
|
1766
|
+
},
|
|
1767
|
+
emits: ["update:modelValue"],
|
|
1768
|
+
setup(e, { emit: t }) {
|
|
1769
|
+
let n = Et(() => import("lite-json-editor")), r = W(e, "modelValue", t);
|
|
1770
|
+
return (t, i) => {
|
|
1771
|
+
let a = z("el-card");
|
|
1772
|
+
return F(), E(a, {
|
|
1773
|
+
shadow: "never",
|
|
2033
1774
|
style: { width: "100%" },
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
1775
|
+
"body-style": {
|
|
1776
|
+
padding: "5px",
|
|
1777
|
+
minHeight: "140px"
|
|
1778
|
+
}
|
|
2037
1779
|
}, {
|
|
2038
|
-
default: U(() => [j(
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
1780
|
+
default: U(() => [j(V(n), {
|
|
1781
|
+
modelValue: V(r),
|
|
1782
|
+
"onUpdate:modelValue": i[0] ||= (e) => N(r) ? r.value = e : null,
|
|
1783
|
+
"without-edit": e.disabled
|
|
1784
|
+
}, null, 8, ["modelValue", "without-edit"])]),
|
|
2042
1785
|
_: 1
|
|
2043
|
-
})
|
|
2044
|
-
ref_key: "dialog",
|
|
2045
|
-
ref: n,
|
|
2046
|
-
title: "选项",
|
|
2047
|
-
width: 600,
|
|
2048
|
-
confirm: () => i("confirm")
|
|
2049
|
-
}, Tt({
|
|
2050
|
-
default: U(() => [j(Or, {
|
|
2051
|
-
modelValue: V(a),
|
|
2052
|
-
"onUpdate:modelValue": r[1] ||= (e) => N(a) ? a.value = e : null,
|
|
2053
|
-
disabled: e.disabled,
|
|
2054
|
-
options: l.value
|
|
2055
|
-
}, null, 8, [
|
|
2056
|
-
"modelValue",
|
|
2057
|
-
"disabled",
|
|
2058
|
-
"options"
|
|
2059
|
-
])]),
|
|
2060
|
-
_: 2
|
|
2061
|
-
}, [V(c) ? {
|
|
2062
|
-
name: "tool",
|
|
2063
|
-
fn: U(() => [j(G, { icon: "info-circle" }, {
|
|
2064
|
-
default: U(() => [...r[3] ||= [A("存在检索条件", -1)]]),
|
|
2065
|
-
_: 1
|
|
2066
|
-
})]),
|
|
2067
|
-
key: "0"
|
|
2068
|
-
} : void 0]), 1032, ["confirm"])], 64);
|
|
1786
|
+
});
|
|
2069
1787
|
};
|
|
2070
1788
|
}
|
|
2071
|
-
}),
|
|
2072
|
-
__name: "
|
|
1789
|
+
}), Er = /* @__PURE__ */ M({
|
|
1790
|
+
__name: "ObjectCell",
|
|
2073
1791
|
props: {
|
|
2074
1792
|
modelValue: {},
|
|
2075
1793
|
field: {},
|
|
@@ -2078,67 +1796,71 @@ var Sr = {
|
|
|
2078
1796
|
},
|
|
2079
1797
|
emits: [
|
|
2080
1798
|
"update:modelValue",
|
|
2081
|
-
"confirm",
|
|
2082
|
-
"reload"
|
|
2083
|
-
],
|
|
2084
|
-
setup(e, { emit: t }) {
|
|
2085
|
-
let n = e, r = W(n, "modelValue",
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
"
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
"check-strictly": V(a).strict,
|
|
2100
|
-
"default-expand-all": "",
|
|
2101
|
-
"render-after-expand": !0,
|
|
2102
|
-
class: "full"
|
|
2103
|
-
}, Tt({
|
|
2104
|
-
default: U(({ data: e }) => [j(Dn, {
|
|
2105
|
-
value: e.value,
|
|
2106
|
-
label: e.label,
|
|
2107
|
-
display: e.display,
|
|
2108
|
-
disabled: e.disabled,
|
|
2109
|
-
icon: e.isLeaf ? "leaf" : "folder",
|
|
2110
|
-
type: e.isLeaf ? "success" : "warning"
|
|
2111
|
-
}, null, 8, [
|
|
2112
|
-
"value",
|
|
2113
|
-
"label",
|
|
2114
|
-
"display",
|
|
2115
|
-
"disabled",
|
|
2116
|
-
"icon",
|
|
2117
|
-
"type"
|
|
2118
|
-
])]),
|
|
2119
|
-
_: 2
|
|
2120
|
-
}, [V(s) ? {
|
|
2121
|
-
name: "prefix",
|
|
2122
|
-
fn: U(() => [j(o, null, {
|
|
2123
|
-
content: U(() => [...n[1] ||= [A("存在检索条件", -1)]]),
|
|
2124
|
-
default: U(() => [j(G, { icon: "info-circle" })]),
|
|
1799
|
+
"confirm",
|
|
1800
|
+
"reload"
|
|
1801
|
+
],
|
|
1802
|
+
setup(e, { emit: t }) {
|
|
1803
|
+
let n = e, r = t, i = W(n, "modelValue", r), a = I();
|
|
1804
|
+
function o() {
|
|
1805
|
+
i.value ??= {}, a.value?.open();
|
|
1806
|
+
}
|
|
1807
|
+
return (t, n) => {
|
|
1808
|
+
let s = z("el-button");
|
|
1809
|
+
return F(), O(w, null, [j(s, {
|
|
1810
|
+
type: "info",
|
|
1811
|
+
plain: "",
|
|
1812
|
+
style: { width: "100%" },
|
|
1813
|
+
onClick: o
|
|
1814
|
+
}, {
|
|
1815
|
+
default: U(() => [j(q, { icon: "code" }, {
|
|
1816
|
+
default: U(() => [...n[1] ||= [A(" 打开对象编辑器", -1)]]),
|
|
2125
1817
|
_: 1
|
|
2126
1818
|
})]),
|
|
2127
|
-
|
|
2128
|
-
}
|
|
2129
|
-
"
|
|
2130
|
-
|
|
2131
|
-
"
|
|
2132
|
-
"
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
1819
|
+
_: 1
|
|
1820
|
+
}), j($, {
|
|
1821
|
+
ref_key: "dialogRef",
|
|
1822
|
+
ref: a,
|
|
1823
|
+
title: "对象编辑器",
|
|
1824
|
+
confirm: () => r("confirm")
|
|
1825
|
+
}, {
|
|
1826
|
+
default: U(() => [j(Tr, {
|
|
1827
|
+
modelValue: V(i),
|
|
1828
|
+
"onUpdate:modelValue": n[0] ||= (e) => N(i) ? i.value = e : null,
|
|
1829
|
+
disabled: e.disabled
|
|
1830
|
+
}, null, 8, ["modelValue", "disabled"])]),
|
|
1831
|
+
_: 1
|
|
1832
|
+
}, 8, ["confirm"])], 64);
|
|
2138
1833
|
};
|
|
2139
1834
|
}
|
|
2140
|
-
}),
|
|
2141
|
-
__name: "
|
|
1835
|
+
}), Dr = /* @__PURE__ */ M({
|
|
1836
|
+
__name: "MRichEditor",
|
|
1837
|
+
props: {
|
|
1838
|
+
modelValue: {},
|
|
1839
|
+
disabled: { type: Boolean }
|
|
1840
|
+
},
|
|
1841
|
+
emits: ["update:modelValue"],
|
|
1842
|
+
setup(e, { emit: t }) {
|
|
1843
|
+
let n = Et(() => import("@vueup/vue-quill").then((e) => e.QuillEditor)), r = W(e, "modelValue", t);
|
|
1844
|
+
return (t, i) => (F(), E(V(n), {
|
|
1845
|
+
content: V(r),
|
|
1846
|
+
"onUpdate:content": i[0] ||= (e) => N(r) ? r.value = e : null,
|
|
1847
|
+
style: {
|
|
1848
|
+
height: "400px",
|
|
1849
|
+
"overflow-y": "hidden"
|
|
1850
|
+
},
|
|
1851
|
+
"content-type": "html",
|
|
1852
|
+
theme: "snow",
|
|
1853
|
+
toolbar: !e.disabled && "essential",
|
|
1854
|
+
placeholder: "请输入内容...",
|
|
1855
|
+
"read-only": e.disabled
|
|
1856
|
+
}, null, 8, [
|
|
1857
|
+
"content",
|
|
1858
|
+
"toolbar",
|
|
1859
|
+
"read-only"
|
|
1860
|
+
]));
|
|
1861
|
+
}
|
|
1862
|
+
}), Or = /* @__PURE__ */ M({
|
|
1863
|
+
__name: "RichCell",
|
|
2142
1864
|
props: {
|
|
2143
1865
|
modelValue: {},
|
|
2144
1866
|
field: {},
|
|
@@ -2151,46 +1873,41 @@ var Sr = {
|
|
|
2151
1873
|
"reload"
|
|
2152
1874
|
],
|
|
2153
1875
|
setup(e, { emit: t }) {
|
|
2154
|
-
let n = e, r = t, i = W(n, "modelValue", r);
|
|
1876
|
+
let n = e, r = t, i = W(n, "modelValue", r), a = I();
|
|
1877
|
+
function o() {
|
|
1878
|
+
i.value ??= "", a.value?.open();
|
|
1879
|
+
}
|
|
2155
1880
|
return (t, n) => {
|
|
2156
|
-
let
|
|
2157
|
-
return
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
border: "",
|
|
2163
|
-
class: "full"
|
|
1881
|
+
let s = z("el-button");
|
|
1882
|
+
return F(), O(w, null, [j(s, {
|
|
1883
|
+
type: "info",
|
|
1884
|
+
plain: "",
|
|
1885
|
+
style: { width: "100%" },
|
|
1886
|
+
onClick: o
|
|
2164
1887
|
}, {
|
|
2165
|
-
default: U(() => [j(
|
|
2166
|
-
default: U(() => [A(
|
|
1888
|
+
default: U(() => [j(q, { icon: "book" }, {
|
|
1889
|
+
default: U(() => [...n[1] ||= [A("打开文本编辑器", -1)]]),
|
|
2167
1890
|
_: 1
|
|
2168
1891
|
})]),
|
|
2169
1892
|
_: 1
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
"value-on-clear": null,
|
|
2177
|
-
class: "full",
|
|
2178
|
-
teleported: !1,
|
|
2179
|
-
onChange: n[2] ||= (e) => r("confirm")
|
|
1893
|
+
}), j($, {
|
|
1894
|
+
ref_key: "dialogRef",
|
|
1895
|
+
ref: a,
|
|
1896
|
+
title: "文本编辑器",
|
|
1897
|
+
width: "800",
|
|
1898
|
+
confirm: () => r("confirm")
|
|
2180
1899
|
}, {
|
|
2181
|
-
default: U(() => [j(
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
label: "否"
|
|
2187
|
-
})]),
|
|
1900
|
+
default: U(() => [j(Dr, {
|
|
1901
|
+
modelValue: V(i),
|
|
1902
|
+
"onUpdate:modelValue": n[0] ||= (e) => N(i) ? i.value = e : null,
|
|
1903
|
+
disabled: e.disabled
|
|
1904
|
+
}, null, 8, ["modelValue", "disabled"])]),
|
|
2188
1905
|
_: 1
|
|
2189
|
-
}, 8, ["
|
|
1906
|
+
}, 8, ["confirm"])], 64);
|
|
2190
1907
|
};
|
|
2191
1908
|
}
|
|
2192
|
-
}),
|
|
2193
|
-
__name: "
|
|
1909
|
+
}), kr = /* @__PURE__ */ M({
|
|
1910
|
+
__name: "MCell",
|
|
2194
1911
|
props: {
|
|
2195
1912
|
modelValue: {},
|
|
2196
1913
|
field: {},
|
|
@@ -2202,677 +1919,954 @@ var Sr = {
|
|
|
2202
1919
|
"confirm",
|
|
2203
1920
|
"reload"
|
|
2204
1921
|
],
|
|
2205
|
-
setup(e, {
|
|
2206
|
-
let n = W(
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
1922
|
+
setup(e, { expose: t, emit: n }) {
|
|
1923
|
+
let r = n, i = e, a = T(() => i.disabled || i.field.disabled), o = W(i, "modelValue", r);
|
|
1924
|
+
t({ confirm });
|
|
1925
|
+
let s = T(() => {
|
|
1926
|
+
let { tool: e, format: t } = i.field;
|
|
1927
|
+
switch (e) {
|
|
1928
|
+
case "boolean":
|
|
1929
|
+
case "switch": return br;
|
|
1930
|
+
case "number": return Sr;
|
|
1931
|
+
case "text":
|
|
1932
|
+
case "textarea": return Ln;
|
|
1933
|
+
case "select": return hr;
|
|
1934
|
+
case "tree": return yr;
|
|
1935
|
+
case "cascade": return mr;
|
|
1936
|
+
case "transfer": return vr;
|
|
1937
|
+
case "rich": return Or;
|
|
1938
|
+
case "object": return Er;
|
|
1939
|
+
case "time": return er;
|
|
1940
|
+
case "date": return Xn;
|
|
1941
|
+
case "timerange": return tr;
|
|
1942
|
+
case "daterange": return Qn;
|
|
1943
|
+
case "dates": return Yn;
|
|
1944
|
+
case "file": return wr;
|
|
1945
|
+
case "set": return t.multiple ? Un : Wn;
|
|
1946
|
+
case "color": return zn;
|
|
1947
|
+
case "icon": return Hn;
|
|
1948
|
+
case "auto": return pr;
|
|
1949
|
+
default: return xr;
|
|
1950
|
+
}
|
|
1951
|
+
});
|
|
1952
|
+
return (t, n) => s.value ? (F(), E(Lt(s.value), {
|
|
2211
1953
|
key: 0,
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
1954
|
+
modelValue: V(o),
|
|
1955
|
+
"onUpdate:modelValue": n[0] ||= (e) => N(o) ? o.value = e : null,
|
|
1956
|
+
field: e.field,
|
|
1957
|
+
row: e.row,
|
|
1958
|
+
disabled: a.value,
|
|
1959
|
+
onConfirm: n[1] ||= (e) => r("confirm"),
|
|
1960
|
+
onReload: n[2] ||= (e) => r("reload")
|
|
1961
|
+
}, null, 40, [
|
|
1962
|
+
"modelValue",
|
|
1963
|
+
"field",
|
|
1964
|
+
"row",
|
|
1965
|
+
"disabled"
|
|
1966
|
+
])) : D("", !0);
|
|
1967
|
+
}
|
|
1968
|
+
}), Ar = { class: "justified" }, jr = /* @__PURE__ */ M({
|
|
1969
|
+
__name: "DTreeNodeEdit",
|
|
1970
|
+
props: {
|
|
1971
|
+
disable_table: { type: Boolean },
|
|
1972
|
+
data: {},
|
|
1973
|
+
field: {},
|
|
1974
|
+
manager: {},
|
|
1975
|
+
control: {},
|
|
1976
|
+
collector: {}
|
|
1977
|
+
},
|
|
1978
|
+
emits: [
|
|
1979
|
+
"hide",
|
|
1980
|
+
"insert",
|
|
1981
|
+
"switch",
|
|
1982
|
+
"remove",
|
|
1983
|
+
"table"
|
|
1984
|
+
],
|
|
1985
|
+
setup(e, { emit: t }) {
|
|
1986
|
+
let n = e, r = t, i = T(() => {
|
|
1987
|
+
let { isLeaf: e, children: t } = n.data;
|
|
1988
|
+
return {
|
|
1989
|
+
allow_insert: !e,
|
|
1990
|
+
allow_switch: !t?.length,
|
|
1991
|
+
allow_table: !e
|
|
1992
|
+
};
|
|
1993
|
+
}), a = I({});
|
|
1994
|
+
P(() => {
|
|
1995
|
+
n.field && (a.value = fn(n.data, ["id", n.field?.prop]));
|
|
1996
|
+
});
|
|
1997
|
+
function o() {
|
|
1998
|
+
n.manager.save_many([a.value]), r("hide");
|
|
1999
|
+
}
|
|
2000
|
+
return (t, n) => {
|
|
2001
|
+
let s = z("el-space"), c = z("el-col"), l = z("el-row");
|
|
2002
|
+
return F(), E(l, null, {
|
|
2003
|
+
default: U(() => [j(c, { class: "right" }, {
|
|
2004
|
+
default: U(() => [k("div", Ar, [j(s, { size: 0 }, {
|
|
2005
|
+
default: U(() => [
|
|
2006
|
+
(e.control.allow_edit || e.control.allow_insert) && e.collector.size ? (F(), E(K, {
|
|
2007
|
+
key: 0,
|
|
2008
|
+
disabled: !!e.data.children?.length,
|
|
2009
|
+
icon: "exchange",
|
|
2010
|
+
type: "warning",
|
|
2011
|
+
onClick: n[0] ||= (e) => r("switch")
|
|
2012
|
+
}, null, 8, ["disabled"])) : D("", !0),
|
|
2013
|
+
e.control.allow_remove ? (F(), E(K, {
|
|
2014
|
+
key: 1,
|
|
2015
|
+
icon: "trash",
|
|
2016
|
+
type: "danger",
|
|
2017
|
+
onClick: n[1] ||= (e) => r("remove")
|
|
2018
|
+
})) : D("", !0),
|
|
2019
|
+
e.control.allow_insert && i.value.allow_insert ? (F(), E(K, {
|
|
2020
|
+
key: 2,
|
|
2021
|
+
icon: "plus-circle",
|
|
2022
|
+
type: "success",
|
|
2023
|
+
onClick: n[2] ||= (e) => r("insert")
|
|
2024
|
+
})) : D("", !0),
|
|
2025
|
+
!e.data.isLeaf && !e.disable_table ? (F(), E(K, {
|
|
2026
|
+
key: 3,
|
|
2027
|
+
icon: "table-list",
|
|
2028
|
+
onClick: n[3] ||= (t) => r("table", e.data?.id)
|
|
2029
|
+
})) : D("", !0)
|
|
2030
|
+
]),
|
|
2031
|
+
_: 1
|
|
2032
|
+
}), j(s, null, {
|
|
2033
|
+
default: U(() => [j(K, {
|
|
2034
|
+
icon: "ban",
|
|
2035
|
+
onClick: n[4] ||= (e) => r("hide")
|
|
2036
|
+
}, {
|
|
2037
|
+
default: U(() => [...n[6] ||= [A("取消 ", -1)]]),
|
|
2038
|
+
_: 1
|
|
2039
|
+
}), e.field?.allow_edit ? (F(), E(K, {
|
|
2040
|
+
key: 0,
|
|
2041
|
+
icon: "check",
|
|
2042
|
+
type: "primary",
|
|
2043
|
+
onClick: o
|
|
2044
|
+
}, {
|
|
2045
|
+
default: U(() => [...n[7] ||= [A("保存 ", -1)]]),
|
|
2046
|
+
_: 1
|
|
2047
|
+
})) : D("", !0)]),
|
|
2048
|
+
_: 1
|
|
2049
|
+
})])]),
|
|
2050
|
+
_: 1
|
|
2051
|
+
}), e.field ? (F(), E(c, {
|
|
2052
|
+
key: 0,
|
|
2053
|
+
style: { "margin-top": "10px" }
|
|
2054
|
+
}, {
|
|
2055
|
+
default: U(() => [j(kr, {
|
|
2056
|
+
field: e.field,
|
|
2057
|
+
row: a.value,
|
|
2058
|
+
modelValue: a.value[e.field.prop],
|
|
2059
|
+
"onUpdate:modelValue": n[5] ||= (t) => a.value[e.field.prop] = t,
|
|
2060
|
+
onConfirm: o,
|
|
2061
|
+
disabled: !e.field.allow_edit
|
|
2062
|
+
}, null, 8, [
|
|
2063
|
+
"field",
|
|
2064
|
+
"row",
|
|
2065
|
+
"modelValue",
|
|
2066
|
+
"disabled"
|
|
2067
|
+
])]),
|
|
2068
|
+
_: 1
|
|
2069
|
+
})) : D("", !0)]),
|
|
2070
|
+
_: 1
|
|
2071
|
+
});
|
|
2072
|
+
};
|
|
2219
2073
|
}
|
|
2220
|
-
}),
|
|
2221
|
-
__name: "
|
|
2074
|
+
}), Mr = /* @__PURE__ */ M({
|
|
2075
|
+
__name: "DataWrapper",
|
|
2222
2076
|
props: {
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
row: {},
|
|
2226
|
-
disabled: { type: Boolean }
|
|
2077
|
+
loading: { type: Boolean },
|
|
2078
|
+
ticking: {}
|
|
2227
2079
|
},
|
|
2228
|
-
|
|
2229
|
-
"
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
],
|
|
2233
|
-
setup(e, { emit: t }) {
|
|
2234
|
-
let n = e, r = W(n, "modelValue", t), i = T(() => {
|
|
2235
|
-
let e = n.field.format || {}, t = e.min === null ? void 0 : e.min, r = e.max === null ? void 0 : e.max, i = e.precision === null ? void 0 : e.precision, { step: a, step_strictly: o } = e;
|
|
2236
|
-
return {
|
|
2237
|
-
min: t,
|
|
2238
|
-
max: r,
|
|
2239
|
-
step: a,
|
|
2240
|
-
precision: i,
|
|
2241
|
-
step_strictly: o
|
|
2242
|
-
};
|
|
2080
|
+
setup(e) {
|
|
2081
|
+
let t = Vt("wrapperRef"), { width: n } = Jt(t), r = e, i = Bt(), a = null;
|
|
2082
|
+
H(() => r.loading, () => {
|
|
2083
|
+
r.loading ? a = o() : a?.close();
|
|
2243
2084
|
});
|
|
2244
|
-
|
|
2245
|
-
let
|
|
2085
|
+
function o() {
|
|
2086
|
+
let e = t.value?.$el;
|
|
2087
|
+
if (e instanceof HTMLElement) return mn.service({
|
|
2088
|
+
target: e,
|
|
2089
|
+
svg: "-",
|
|
2090
|
+
background: "rgba(200, 200, 200, 0)"
|
|
2091
|
+
});
|
|
2092
|
+
}
|
|
2093
|
+
return (e, r) => {
|
|
2094
|
+
let a = z("el-card");
|
|
2246
2095
|
return F(), E(a, {
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
"
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
"
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
"
|
|
2262
|
-
"
|
|
2263
|
-
|
|
2264
|
-
"value-on-clear",
|
|
2265
|
-
"min",
|
|
2266
|
-
"max",
|
|
2267
|
-
"step",
|
|
2268
|
-
"precision",
|
|
2269
|
-
"step-strictly"
|
|
2270
|
-
]);
|
|
2096
|
+
ref_key: "wrapperRef",
|
|
2097
|
+
ref: t,
|
|
2098
|
+
"body-style": { padding: 0 },
|
|
2099
|
+
shadow: "never",
|
|
2100
|
+
class: "data-wrapper",
|
|
2101
|
+
onContextmenu: r[0] ||= (e) => {
|
|
2102
|
+
e.preventDefault(), e.stopPropagation();
|
|
2103
|
+
}
|
|
2104
|
+
}, Tt({
|
|
2105
|
+
header: U(() => [R(e.$slots, "header", { width: V(n) })]),
|
|
2106
|
+
default: U(() => [R(e.$slots, "default", { width: V(n) })]),
|
|
2107
|
+
_: 2
|
|
2108
|
+
}, [V(i).footer ? {
|
|
2109
|
+
name: "footer",
|
|
2110
|
+
fn: U(() => [R(e.$slots, "footer", { width: V(n) })]),
|
|
2111
|
+
key: "0"
|
|
2112
|
+
} : void 0]), 1536);
|
|
2271
2113
|
};
|
|
2272
2114
|
}
|
|
2273
|
-
})
|
|
2274
|
-
|
|
2275
|
-
//#region morghulis/library/file-url.ts
|
|
2276
|
-
function Pr(e, t) {
|
|
2277
|
-
return t ? `${e.replace(/\/+$/, "")}/${t.replace(/^\/+/, "")}` : "";
|
|
2278
|
-
}
|
|
2279
|
-
//#endregion
|
|
2280
|
-
//#region morghulis/components/cell/instances/special/FileCell.vue
|
|
2281
|
-
var Fr = /* @__PURE__ */ M({
|
|
2282
|
-
__name: "FileCell",
|
|
2115
|
+
}), Nr = /* @__PURE__ */ M({
|
|
2116
|
+
__name: "DTreeController",
|
|
2283
2117
|
props: {
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2118
|
+
unrestricted: { type: Boolean },
|
|
2119
|
+
collector: {},
|
|
2120
|
+
mapping: {},
|
|
2121
|
+
control: {},
|
|
2122
|
+
disable_table: { type: Boolean }
|
|
2288
2123
|
},
|
|
2289
2124
|
emits: [
|
|
2290
|
-
"
|
|
2291
|
-
"
|
|
2292
|
-
"
|
|
2125
|
+
"insert",
|
|
2126
|
+
"switch",
|
|
2127
|
+
"remove",
|
|
2128
|
+
"table"
|
|
2293
2129
|
],
|
|
2294
2130
|
setup(e, { emit: t }) {
|
|
2295
|
-
let n = e, r = t, i =
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
}
|
|
2305
|
-
let p = I(), m = n.field.format || {}, h = {
|
|
2306
|
-
id: n.row.id,
|
|
2307
|
-
prop: n.field.prop
|
|
2308
|
-
}, g = m.accept.length ? m.accept.join(",") : "*";
|
|
2309
|
-
function _() {
|
|
2310
|
-
p.value?.$el.querySelector("input").click();
|
|
2311
|
-
}
|
|
2312
|
-
function v() {
|
|
2313
|
-
let e = `/valar/${n.field.$entity}/remove_file`;
|
|
2314
|
-
a.warning(`是否删除文件:${l.value}`).then(() => u(e, h)).then(() => {
|
|
2315
|
-
i.value = null, o.success("文件已删除"), r("reload");
|
|
2316
|
-
});
|
|
2317
|
-
}
|
|
2318
|
-
function y(e) {
|
|
2319
|
-
let { name: t, size: n } = e, r = t.indexOf(".") === -1 ? "" : `.${t.split(".").pop()}`, i = [];
|
|
2320
|
-
return g === "*" || m.accept.includes(r) || i.push(`文件类型不符合:${g}`), n / 1e6 <= m.maximum || i.push(`文件大小不超过${m.maximum}Mb`), i.length > 0 ? (o.error(i.join(";")), !1) : !0;
|
|
2321
|
-
}
|
|
2322
|
-
function b(e) {
|
|
2323
|
-
e.payload ? (i.value = e.payload, r("reload"), o.success("上传成功!")) : x(), p.value?.clearFiles();
|
|
2324
|
-
}
|
|
2325
|
-
function x() {
|
|
2326
|
-
o.error("上传失败");
|
|
2131
|
+
let n = e, r = t, i = T(() => {
|
|
2132
|
+
let e = /* @__PURE__ */ new Set([]);
|
|
2133
|
+
return [...n.collector].forEach((t) => {
|
|
2134
|
+
let r = n.mapping[t];
|
|
2135
|
+
r && !r.children?.length && r.isLeaf != null && e.add(r.isLeaf);
|
|
2136
|
+
}), new Set(e).size === 1;
|
|
2137
|
+
});
|
|
2138
|
+
function a(e) {
|
|
2139
|
+
n.collector.clear(), r(e);
|
|
2327
2140
|
}
|
|
2328
|
-
return (
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
"show-file-list": !1,
|
|
2337
|
-
"auto-upload": "",
|
|
2338
|
-
accept: V(g),
|
|
2339
|
-
"before-upload": y,
|
|
2340
|
-
"on-success": b,
|
|
2341
|
-
"on-error": x
|
|
2342
|
-
}, null, 8, ["action", "accept"]), [[Ht, !1]]), j(o, null, {
|
|
2141
|
+
return T(() => {
|
|
2142
|
+
if (n.collector.size === 0) return !0;
|
|
2143
|
+
if (n.collector.size > 1) return !1;
|
|
2144
|
+
let e = [...n.collector][0];
|
|
2145
|
+
return e ? !n.mapping[e]?.isLeaf : !1;
|
|
2146
|
+
}), (t, n) => {
|
|
2147
|
+
let o = z("el-space");
|
|
2148
|
+
return F(), E(o, { size: 0 }, {
|
|
2343
2149
|
default: U(() => [
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
plain: "",
|
|
2354
|
-
icon: "folder-open",
|
|
2355
|
-
type: "warning",
|
|
2356
|
-
onClick: _
|
|
2357
|
-
}, {
|
|
2358
|
-
default: U(() => [...n[0] ||= [A(" 打开 ", -1)]]),
|
|
2359
|
-
_: 1
|
|
2360
|
-
}),
|
|
2361
|
-
j(K, {
|
|
2362
|
-
plain: "",
|
|
2363
|
-
disabled: !V(i),
|
|
2150
|
+
e.control.allow_edit || e.control.allow_insert ? (F(), E(K, {
|
|
2151
|
+
key: 0,
|
|
2152
|
+
disabled: !i.value,
|
|
2153
|
+
icon: "exchange",
|
|
2154
|
+
onClick: n[0] ||= (e) => r("switch")
|
|
2155
|
+
}, null, 8, ["disabled"])) : D("", !0),
|
|
2156
|
+
e.control.allow_remove ? (F(), E(K, {
|
|
2157
|
+
key: 1,
|
|
2158
|
+
disabled: !e.unrestricted && !e.collector.size,
|
|
2364
2159
|
icon: "trash",
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
icon: "
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
default: U(() => [...n[2] ||= [A(" 下载 ", -1)]]),
|
|
2379
|
-
_: 1
|
|
2380
|
-
}, 8, ["disabled"])
|
|
2381
|
-
]),
|
|
2382
|
-
_: 1
|
|
2383
|
-
})], 64);
|
|
2384
|
-
};
|
|
2385
|
-
}
|
|
2386
|
-
}), Ir = /* @__PURE__ */ M({
|
|
2387
|
-
__name: "MObjectEditor",
|
|
2388
|
-
props: {
|
|
2389
|
-
modelValue: {},
|
|
2390
|
-
disabled: { type: Boolean }
|
|
2391
|
-
},
|
|
2392
|
-
emits: ["update:modelValue"],
|
|
2393
|
-
setup(e, { emit: t }) {
|
|
2394
|
-
let n = Et(() => import("lite-json-editor")), r = W(e, "modelValue", t);
|
|
2395
|
-
return (t, i) => {
|
|
2396
|
-
let a = z("el-card");
|
|
2397
|
-
return F(), E(a, {
|
|
2398
|
-
shadow: "never",
|
|
2399
|
-
style: { width: "100%" },
|
|
2400
|
-
"body-style": {
|
|
2401
|
-
padding: "5px",
|
|
2402
|
-
minHeight: "140px"
|
|
2403
|
-
}
|
|
2404
|
-
}, {
|
|
2405
|
-
default: U(() => [j(V(n), {
|
|
2406
|
-
modelValue: V(r),
|
|
2407
|
-
"onUpdate:modelValue": i[0] ||= (e) => N(r) ? r.value = e : null,
|
|
2408
|
-
"without-edit": e.disabled
|
|
2409
|
-
}, null, 8, ["modelValue", "without-edit"])]),
|
|
2160
|
+
onClick: n[1] ||= (e) => r("remove")
|
|
2161
|
+
}, null, 8, ["disabled"])) : D("", !0),
|
|
2162
|
+
e.control.allow_insert ? (F(), E(K, {
|
|
2163
|
+
key: 2,
|
|
2164
|
+
icon: "plus-circle",
|
|
2165
|
+
onClick: n[2] ||= (e) => a("insert")
|
|
2166
|
+
})) : D("", !0),
|
|
2167
|
+
e.disable_table ? D("", !0) : (F(), E(K, {
|
|
2168
|
+
key: 3,
|
|
2169
|
+
icon: "table-list",
|
|
2170
|
+
onClick: n[3] ||= (e) => a("table")
|
|
2171
|
+
}))
|
|
2172
|
+
]),
|
|
2410
2173
|
_: 1
|
|
2411
2174
|
});
|
|
2412
2175
|
};
|
|
2413
2176
|
}
|
|
2414
|
-
}),
|
|
2415
|
-
__name: "
|
|
2177
|
+
}), Pr = /* @__PURE__ */ M({
|
|
2178
|
+
__name: "PluginColumnContent",
|
|
2416
2179
|
props: {
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
disabled: { type: Boolean }
|
|
2180
|
+
data: {},
|
|
2181
|
+
column: {},
|
|
2182
|
+
collector: {}
|
|
2421
2183
|
},
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2184
|
+
setup(e) {
|
|
2185
|
+
let t = e;
|
|
2186
|
+
function n(e, n) {
|
|
2187
|
+
n.preventDefault(), n.stopPropagation();
|
|
2188
|
+
let { collector: r, data: i, column: a } = t;
|
|
2189
|
+
r.clear(), i.id && r.add(i.id), a.callback?.(e, i, n);
|
|
2190
|
+
}
|
|
2191
|
+
return (t, r) => (F(), E(Lt(e.column.component), {
|
|
2192
|
+
data: e.data,
|
|
2193
|
+
param: e.column.param,
|
|
2194
|
+
invoke: n
|
|
2195
|
+
}, null, 8, ["data", "param"]));
|
|
2196
|
+
}
|
|
2197
|
+
}), Fr = /*#__PURE__*/ wn(/* @__PURE__ */ M({
|
|
2198
|
+
__name: "PluginButtonContent",
|
|
2199
|
+
props: {
|
|
2200
|
+
buttons: {},
|
|
2201
|
+
data: {},
|
|
2202
|
+
collector: {},
|
|
2203
|
+
code: {}
|
|
2204
|
+
},
|
|
2205
|
+
emits: ["width"],
|
|
2427
2206
|
setup(e, { emit: t }) {
|
|
2428
|
-
let n = e, r = t, i =
|
|
2429
|
-
|
|
2430
|
-
|
|
2207
|
+
let n = e, r = t, i = Vt("actionsRef"), { width: a } = Jt(i);
|
|
2208
|
+
H(a, () => r("width", a.value + 15));
|
|
2209
|
+
let { buttons: o } = Xa(T(() => n.buttons || []), T(() => n.code), T(() => n.data));
|
|
2210
|
+
function s(e, t) {
|
|
2211
|
+
e.preventDefault(), e.stopPropagation();
|
|
2212
|
+
let { data: r, collector: i } = n;
|
|
2213
|
+
i.clear(), r.id && i.add(r.id), t.handler?.(r, e, t);
|
|
2431
2214
|
}
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
})]),
|
|
2444
|
-
_: 1
|
|
2445
|
-
}), j($, {
|
|
2446
|
-
ref_key: "dialogRef",
|
|
2447
|
-
ref: a,
|
|
2448
|
-
title: "对象编辑器",
|
|
2449
|
-
confirm: () => r("confirm")
|
|
2215
|
+
function c(e) {
|
|
2216
|
+
e.preventDefault(), e.stopPropagation();
|
|
2217
|
+
}
|
|
2218
|
+
return (e, t) => {
|
|
2219
|
+
let n = z("el-space");
|
|
2220
|
+
return F(), E(n, {
|
|
2221
|
+
ref_key: "actionsRef",
|
|
2222
|
+
ref: i,
|
|
2223
|
+
class: "table-actions",
|
|
2224
|
+
align: "center",
|
|
2225
|
+
size: 3
|
|
2450
2226
|
}, {
|
|
2451
|
-
default: U(() => [
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
disabled: e.disabled
|
|
2455
|
-
|
|
2227
|
+
default: U(() => [(F(!0), O(w, null, L(V(o), (e) => (F(), E(K, {
|
|
2228
|
+
size: e.size,
|
|
2229
|
+
type: e.type,
|
|
2230
|
+
disabled: e.disabled,
|
|
2231
|
+
plain: e.plain,
|
|
2232
|
+
icon: e.icon,
|
|
2233
|
+
onClick: (t) => s(t, e),
|
|
2234
|
+
onDblclick: t[0] ||= (e) => c(e)
|
|
2235
|
+
}, {
|
|
2236
|
+
default: U(() => [k("b", null, B(e.label), 1)]),
|
|
2237
|
+
_: 2
|
|
2238
|
+
}, 1032, [
|
|
2239
|
+
"size",
|
|
2240
|
+
"type",
|
|
2241
|
+
"disabled",
|
|
2242
|
+
"plain",
|
|
2243
|
+
"icon",
|
|
2244
|
+
"onClick"
|
|
2245
|
+
]))), 256))]),
|
|
2456
2246
|
_: 1
|
|
2457
|
-
},
|
|
2247
|
+
}, 512);
|
|
2458
2248
|
};
|
|
2459
2249
|
}
|
|
2460
|
-
}),
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
},
|
|
2466
|
-
emits: ["update:modelValue"],
|
|
2467
|
-
setup(e, { emit: t }) {
|
|
2468
|
-
let n = Et(() => import("@vueup/vue-quill").then((e) => e.QuillEditor)), r = W(e, "modelValue", t);
|
|
2469
|
-
return (t, i) => (F(), E(V(n), {
|
|
2470
|
-
content: V(r),
|
|
2471
|
-
"onUpdate:content": i[0] ||= (e) => N(r) ? r.value = e : null,
|
|
2472
|
-
style: {
|
|
2473
|
-
height: "400px",
|
|
2474
|
-
"overflow-y": "hidden"
|
|
2475
|
-
},
|
|
2476
|
-
"content-type": "html",
|
|
2477
|
-
theme: "snow",
|
|
2478
|
-
toolbar: !e.disabled && "essential",
|
|
2479
|
-
placeholder: "请输入内容...",
|
|
2480
|
-
"read-only": e.disabled
|
|
2481
|
-
}, null, 8, [
|
|
2482
|
-
"content",
|
|
2483
|
-
"toolbar",
|
|
2484
|
-
"read-only"
|
|
2485
|
-
]));
|
|
2250
|
+
}), [["__scopeId", "data-v-08150db9"]]), Ir = Kt(() => {
|
|
2251
|
+
let e = Ft([]), t = ["handler", "token"];
|
|
2252
|
+
function n(n) {
|
|
2253
|
+
let r = fn(n, t);
|
|
2254
|
+
return e.findIndex((e) => ln(fn(e, t), r));
|
|
2486
2255
|
}
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2256
|
+
function r(t) {
|
|
2257
|
+
return e.filter((e) => e.handler === t);
|
|
2258
|
+
}
|
|
2259
|
+
function i(t) {
|
|
2260
|
+
n(t) < 0 && e.push(t);
|
|
2261
|
+
}
|
|
2262
|
+
function a(t) {
|
|
2263
|
+
let r = n(t);
|
|
2264
|
+
r > -1 && e.splice(r, 1);
|
|
2265
|
+
}
|
|
2266
|
+
return {
|
|
2267
|
+
mount: i,
|
|
2268
|
+
unmount: a,
|
|
2269
|
+
container: e,
|
|
2270
|
+
findAll: r
|
|
2271
|
+
};
|
|
2272
|
+
});
|
|
2273
|
+
//#endregion
|
|
2274
|
+
//#region morghulis/library/use-feedback/index.ts
|
|
2275
|
+
function J() {
|
|
2276
|
+
let e = "body", t = {
|
|
2277
|
+
confirmButtonText: "确认",
|
|
2278
|
+
cancelButtonText: "取消"
|
|
2279
|
+
}, n = {
|
|
2280
|
+
info: (t) => hn.info({
|
|
2281
|
+
message: t,
|
|
2282
|
+
grouping: !0,
|
|
2283
|
+
appendTo: e
|
|
2284
|
+
}),
|
|
2285
|
+
success: (t) => hn.success({
|
|
2286
|
+
message: t,
|
|
2287
|
+
grouping: !0,
|
|
2288
|
+
appendTo: e
|
|
2289
|
+
}),
|
|
2290
|
+
warning: (t) => hn.warning({
|
|
2291
|
+
message: t,
|
|
2292
|
+
grouping: !0,
|
|
2293
|
+
appendTo: e
|
|
2294
|
+
}),
|
|
2295
|
+
error: (t) => hn.error({
|
|
2296
|
+
message: t,
|
|
2297
|
+
grouping: !0,
|
|
2298
|
+
appendTo: e
|
|
2299
|
+
})
|
|
2300
|
+
};
|
|
2301
|
+
return {
|
|
2302
|
+
$message: n,
|
|
2303
|
+
$confirm: {
|
|
2304
|
+
info: (e, n) => gn.confirm(e, {
|
|
2305
|
+
type: "info",
|
|
2306
|
+
...t
|
|
2307
|
+
}),
|
|
2308
|
+
success: (e, n) => gn.confirm(e, n, {
|
|
2309
|
+
type: "success",
|
|
2310
|
+
...t
|
|
2311
|
+
}),
|
|
2312
|
+
warning: (e, n) => gn.confirm(e, n, {
|
|
2313
|
+
type: "warning",
|
|
2314
|
+
...t
|
|
2315
|
+
}),
|
|
2316
|
+
error: (e, n) => gn.confirm(e, n, {
|
|
2317
|
+
type: "error",
|
|
2318
|
+
...t
|
|
2319
|
+
})
|
|
2320
|
+
},
|
|
2321
|
+
$$message: (e, t) => n[t](e)
|
|
2322
|
+
};
|
|
2323
|
+
}
|
|
2324
|
+
//#endregion
|
|
2325
|
+
//#region morghulis/library/store-user/index.ts
|
|
2326
|
+
var Lr = Kt(() => {
|
|
2327
|
+
let e = rn(), t = I("account"), n = Zt("TOKEN", ""), r = Zt("CLIENT", "");
|
|
2328
|
+
r.value ||= _n().replace(/-/g, "_");
|
|
2329
|
+
let i = I(""), a = T(() => !!n.value), o = T(() => Rr(n.value)), s = T(() => Rr(i.value));
|
|
2330
|
+
function c(e) {
|
|
2331
|
+
i.value = "", n.value = e;
|
|
2332
|
+
}
|
|
2333
|
+
function l() {
|
|
2334
|
+
i.value = "", n.value = "", e.push("/").then();
|
|
2335
|
+
}
|
|
2336
|
+
function u(e) {
|
|
2337
|
+
i.value = e;
|
|
2338
|
+
}
|
|
2339
|
+
return {
|
|
2340
|
+
token: n,
|
|
2341
|
+
is_login: a,
|
|
2342
|
+
client: r,
|
|
2343
|
+
account: o,
|
|
2344
|
+
user: s,
|
|
2345
|
+
system: t,
|
|
2346
|
+
sign_in: c,
|
|
2347
|
+
register: u,
|
|
2348
|
+
sign_out: l
|
|
2349
|
+
};
|
|
2350
|
+
});
|
|
2351
|
+
function Rr(e) {
|
|
2352
|
+
if (!e) return {};
|
|
2353
|
+
let t = e.split(".")[1];
|
|
2354
|
+
if (!t) return {};
|
|
2355
|
+
let n = t.replace(/-/g, "+").replace(/_/g, "/");
|
|
2356
|
+
return JSON.parse(decodeURIComponent(atob(n).split("").map((e) => "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2)).join("")));
|
|
2357
|
+
}
|
|
2358
|
+
//#endregion
|
|
2359
|
+
//#region morghulis/library/use-request/index.ts
|
|
2360
|
+
function Y(e) {
|
|
2361
|
+
let t = zt(e), { $$message: n } = J(), { base_url: r } = Q(), { client: i, token: a, sign_out: o, account: s } = Lr();
|
|
2362
|
+
rn();
|
|
2363
|
+
let c = I(!1);
|
|
2364
|
+
console.log(r.value);
|
|
2365
|
+
let l = vn.create({ baseURL: r.value });
|
|
2366
|
+
l.interceptors.request.use((e) => (s.value?.is_admin && console.log("URL: ", e.url), yn.start(), c.value = !0, e.headers.Client = i.value, e.headers.Auth = t.value ? "Require Login" : "", e.headers.Authorization = `Bearer ${a.value}`, e)), l.interceptors.response.use((e) => {
|
|
2367
|
+
yn.done(), c.value = !1;
|
|
2368
|
+
let { payload: t, message: r, code: i } = e.data;
|
|
2369
|
+
return r && n(r, i), t;
|
|
2370
|
+
}, (e) => {
|
|
2371
|
+
yn.done(), c.value = !1;
|
|
2372
|
+
let { status: t, config: r, response: i } = e, { message: s } = i?.data || {};
|
|
2373
|
+
return console.error("# Error URL: ", r?.url), console.error("# STATUS: ", t), t === 401 && r?.headers?.Authorization === `Bearer ${a.value}` && o(), n(s, "error"), Promise.reject(e);
|
|
2374
|
+
});
|
|
2375
|
+
function u(e, t = {}) {
|
|
2376
|
+
return l.post(e, t);
|
|
2377
|
+
}
|
|
2378
|
+
return {
|
|
2379
|
+
post: u,
|
|
2380
|
+
loading: c
|
|
2381
|
+
};
|
|
2382
|
+
}
|
|
2383
|
+
//#endregion
|
|
2384
|
+
//#region morghulis/library/use-socket/url.ts
|
|
2385
|
+
function zr(e, t, n) {
|
|
2386
|
+
let r = new URL(e, n);
|
|
2387
|
+
if (r.protocol === "http:") r.protocol = "ws:";
|
|
2388
|
+
else if (r.protocol === "https:") r.protocol = "wss:";
|
|
2389
|
+
else if (r.protocol !== "ws:" && r.protocol !== "wss:") throw Error(`Unsupported WebSocket protocol: ${r.protocol}`);
|
|
2390
|
+
return r.pathname = `${r.pathname.replace(/\/+$/, "")}/${encodeURIComponent(t)}/`, r.href;
|
|
2391
|
+
}
|
|
2392
|
+
//#endregion
|
|
2393
|
+
//#region morghulis/library/use-socket/index.ts
|
|
2394
|
+
var Br = Kt(() => {
|
|
2395
|
+
let { client: e } = Lr(), { base_url: t } = Q(), n = T(() => zr(t.value, e.value, window.location.href)), r = Ft({
|
|
2396
|
+
code: 0,
|
|
2397
|
+
count: 0,
|
|
2398
|
+
retries: 10
|
|
2399
|
+
}), { data: i, open: a, send: o } = Qt(n, {
|
|
2400
|
+
onDisconnected: () => {
|
|
2401
|
+
r.code = 400, r.count = 0;
|
|
2402
|
+
},
|
|
2403
|
+
onConnected: () => {
|
|
2404
|
+
r.code = 200, r.count = 0;
|
|
2405
|
+
},
|
|
2406
|
+
autoReconnect: {
|
|
2407
|
+
retries: r.retries,
|
|
2408
|
+
onFailed: () => r.code = 404,
|
|
2409
|
+
delay: (e) => (r.count = e, 1e3)
|
|
2504
2410
|
}
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
type: "info",
|
|
2509
|
-
plain: "",
|
|
2510
|
-
style: { width: "100%" },
|
|
2511
|
-
onClick: o
|
|
2512
|
-
}, {
|
|
2513
|
-
default: U(() => [j(q, { icon: "book" }, {
|
|
2514
|
-
default: U(() => [...n[1] ||= [A("打开文本编辑器", -1)]]),
|
|
2515
|
-
_: 1
|
|
2516
|
-
})]),
|
|
2517
|
-
_: 1
|
|
2518
|
-
}), j($, {
|
|
2519
|
-
ref_key: "dialogRef",
|
|
2520
|
-
ref: a,
|
|
2521
|
-
title: "文本编辑器",
|
|
2522
|
-
width: "800",
|
|
2523
|
-
confirm: () => r("confirm")
|
|
2524
|
-
}, {
|
|
2525
|
-
default: U(() => [j(Rr, {
|
|
2526
|
-
modelValue: V(i),
|
|
2527
|
-
"onUpdate:modelValue": n[0] ||= (e) => N(i) ? i.value = e : null,
|
|
2528
|
-
disabled: e.disabled
|
|
2529
|
-
}, null, 8, ["modelValue", "disabled"])]),
|
|
2530
|
-
_: 1
|
|
2531
|
-
}, 8, ["confirm"])], 64);
|
|
2532
|
-
};
|
|
2411
|
+
});
|
|
2412
|
+
function s(e) {
|
|
2413
|
+
o(JSON.stringify(e));
|
|
2533
2414
|
}
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
case "cascade": return Tr;
|
|
2561
|
-
case "transfer": return kr;
|
|
2562
|
-
case "rich": return zr;
|
|
2563
|
-
case "object": return Lr;
|
|
2564
|
-
case "time": return yr;
|
|
2565
|
-
case "date": return hr;
|
|
2566
|
-
case "timerange": return br;
|
|
2567
|
-
case "daterange": return _r;
|
|
2568
|
-
case "dates": return mr;
|
|
2569
|
-
case "file": return Fr;
|
|
2570
|
-
case "set": return t.multiple ? dr : fr;
|
|
2571
|
-
case "color": return sr;
|
|
2572
|
-
case "icon": return ur;
|
|
2573
|
-
case "auto": return wr;
|
|
2574
|
-
default: return Mr;
|
|
2575
|
-
}
|
|
2415
|
+
return {
|
|
2416
|
+
data: T(() => JSON.parse(i.value)),
|
|
2417
|
+
open: a,
|
|
2418
|
+
status: r,
|
|
2419
|
+
send: s
|
|
2420
|
+
};
|
|
2421
|
+
});
|
|
2422
|
+
//#endregion
|
|
2423
|
+
//#region morghulis/library/use-socket-callback/index.ts
|
|
2424
|
+
function Vr(e, t) {
|
|
2425
|
+
let { data: n } = Br();
|
|
2426
|
+
H(() => n, () => {
|
|
2427
|
+
let r = an(n.value || {}), i = r.__tag__;
|
|
2428
|
+
delete r.__tag__, delete r.__timestamp__, i === e && t(r);
|
|
2429
|
+
}, { deep: !0 });
|
|
2430
|
+
}
|
|
2431
|
+
//#endregion
|
|
2432
|
+
//#region morghulis/library/use-channel/index.ts
|
|
2433
|
+
function Hr(e) {
|
|
2434
|
+
let t = zt(e), { mount: n, unmount: r } = Ir();
|
|
2435
|
+
P(() => n(t.value)), Pt(() => r(t.value));
|
|
2436
|
+
let { post: i, loading: a } = Y(T(() => t.value.auth || !1)), { $message: o } = J(), s = I(null), c = I(!1), l = t.value.onError ?? ((e) => console.error(e));
|
|
2437
|
+
function u(e) {
|
|
2438
|
+
let { handler: n, token: r } = t.value, a = `valar/channel/${n}/${r}`;
|
|
2439
|
+
c.value = !0, s.value = null, i(a, e).then().catch((e) => {
|
|
2440
|
+
l(`Channel Error: ${e.code}`), c.value = !1, s.value = null;
|
|
2576
2441
|
});
|
|
2577
|
-
return (t, n) => s.value ? (F(), E(Lt(s.value), {
|
|
2578
|
-
key: 0,
|
|
2579
|
-
modelValue: V(o),
|
|
2580
|
-
"onUpdate:modelValue": n[0] ||= (e) => N(o) ? o.value = e : null,
|
|
2581
|
-
field: e.field,
|
|
2582
|
-
row: e.row,
|
|
2583
|
-
disabled: a.value,
|
|
2584
|
-
onConfirm: n[1] ||= (e) => r("confirm"),
|
|
2585
|
-
onReload: n[2] ||= (e) => r("reload")
|
|
2586
|
-
}, null, 40, [
|
|
2587
|
-
"modelValue",
|
|
2588
|
-
"field",
|
|
2589
|
-
"row",
|
|
2590
|
-
"disabled"
|
|
2591
|
-
])) : D("", !0);
|
|
2592
2442
|
}
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
},
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
onClick: n[4] ||= (e) => r("hide")
|
|
2661
|
-
}, {
|
|
2662
|
-
default: U(() => [...n[6] ||= [A("取消 ", -1)]]),
|
|
2663
|
-
_: 1
|
|
2664
|
-
}), e.field?.allow_edit ? (F(), E(K, {
|
|
2665
|
-
key: 0,
|
|
2666
|
-
icon: "check",
|
|
2667
|
-
type: "primary",
|
|
2668
|
-
onClick: o
|
|
2669
|
-
}, {
|
|
2670
|
-
default: U(() => [...n[7] ||= [A("保存 ", -1)]]),
|
|
2671
|
-
_: 1
|
|
2672
|
-
})) : D("", !0)]),
|
|
2673
|
-
_: 1
|
|
2674
|
-
})])]),
|
|
2675
|
-
_: 1
|
|
2676
|
-
}), e.field ? (F(), E(c, {
|
|
2677
|
-
key: 0,
|
|
2678
|
-
style: { "margin-top": "10px" }
|
|
2679
|
-
}, {
|
|
2680
|
-
default: U(() => [j(Br, {
|
|
2681
|
-
field: e.field,
|
|
2682
|
-
row: a.value,
|
|
2683
|
-
modelValue: a.value[e.field.prop],
|
|
2684
|
-
"onUpdate:modelValue": n[5] ||= (t) => a.value[e.field.prop] = t,
|
|
2685
|
-
onConfirm: o,
|
|
2686
|
-
disabled: !e.field.allow_edit
|
|
2687
|
-
}, null, 8, [
|
|
2688
|
-
"field",
|
|
2689
|
-
"row",
|
|
2690
|
-
"modelValue",
|
|
2691
|
-
"disabled"
|
|
2692
|
-
])]),
|
|
2693
|
-
_: 1
|
|
2694
|
-
})) : D("", !0)]),
|
|
2695
|
-
_: 1
|
|
2696
|
-
});
|
|
2443
|
+
return Vr("channel", (e) => {
|
|
2444
|
+
let n = ["handler", "token"];
|
|
2445
|
+
if (!ln(fn(e, n), fn(t.value, n))) return;
|
|
2446
|
+
let r = e.callback;
|
|
2447
|
+
c.value = [
|
|
2448
|
+
"onStart",
|
|
2449
|
+
"onProceed",
|
|
2450
|
+
"onResponse"
|
|
2451
|
+
].includes(r), r === "onStart" ? t.value.onStart?.() : r === "onError" ? l(e.data) : r === "onProceed" ? t.value.onProceed?.(e.data) : r === "onResponse" ? t.value.onResponse?.(e.data) : r === "onStop" && t.value.onStop?.(), s.value = e.data;
|
|
2452
|
+
}), {
|
|
2453
|
+
channel: t,
|
|
2454
|
+
execute: u,
|
|
2455
|
+
payload: s,
|
|
2456
|
+
loading: T(() => a.value || c.value),
|
|
2457
|
+
post: i
|
|
2458
|
+
};
|
|
2459
|
+
}
|
|
2460
|
+
//#endregion
|
|
2461
|
+
//#region morghulis/library/use-dao/consts.ts
|
|
2462
|
+
var X = {
|
|
2463
|
+
insert_one: "insert_one",
|
|
2464
|
+
save_one: "save_one",
|
|
2465
|
+
sync_save_many: "sync_save_many",
|
|
2466
|
+
delete_one: "delete_one",
|
|
2467
|
+
sync_delete_many: "sync_delete_many",
|
|
2468
|
+
fetch: "fetch",
|
|
2469
|
+
find_one: "find_one",
|
|
2470
|
+
find: "find",
|
|
2471
|
+
values: "values",
|
|
2472
|
+
search: "search",
|
|
2473
|
+
sync_update_many: "sync_update_many",
|
|
2474
|
+
save_many: "save_many",
|
|
2475
|
+
delete_many: "delete_many",
|
|
2476
|
+
update_many: "update_many",
|
|
2477
|
+
sorting: "sorting"
|
|
2478
|
+
};
|
|
2479
|
+
//#endregion
|
|
2480
|
+
//#region morghulis/library/use-dao/methods.ts
|
|
2481
|
+
function Ur(e, t = 0) {
|
|
2482
|
+
let n = Object.fromEntries(e.map((e) => (e.children = [], [e.id, e]))), r = t || 0, i = n[r] ?? {
|
|
2483
|
+
id: r,
|
|
2484
|
+
children: []
|
|
2485
|
+
};
|
|
2486
|
+
return Object.values(n).forEach((e) => {
|
|
2487
|
+
if (e === i) return;
|
|
2488
|
+
let t = e.pid ?? 0;
|
|
2489
|
+
(t === r ? i : n[t] ?? i).children?.push(e);
|
|
2490
|
+
}), n[r] = i, Object.values(n).forEach((e) => e.children?.sort((e, t) => (t.sort || 0) - (e.sort || 0))), {
|
|
2491
|
+
options: [i],
|
|
2492
|
+
mapping: n,
|
|
2493
|
+
rootNode: i
|
|
2494
|
+
};
|
|
2495
|
+
}
|
|
2496
|
+
//#endregion
|
|
2497
|
+
//#region morghulis/library/use-dao/index.ts
|
|
2498
|
+
function Z(e, t) {
|
|
2499
|
+
let n = zt(e), r = zt(t || {}), i = _n(), { execute: a, payload: o, loading: s, post: c } = Hr(T(() => {
|
|
2500
|
+
let { onStart: e, onError: t, onProceed: a, onResponse: o, onStop: s, auth: c } = r.value;
|
|
2501
|
+
return {
|
|
2502
|
+
handler: `batch/${n.value}`,
|
|
2503
|
+
onStart: e,
|
|
2504
|
+
onProceed: a,
|
|
2505
|
+
onResponse: o,
|
|
2506
|
+
onStop: s,
|
|
2507
|
+
onError: t,
|
|
2508
|
+
auth: c,
|
|
2509
|
+
token: i
|
|
2697
2510
|
};
|
|
2511
|
+
}));
|
|
2512
|
+
function l(e, t) {
|
|
2513
|
+
let r = `valar/${n.value}/${e}`;
|
|
2514
|
+
return c(r, t);
|
|
2698
2515
|
}
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
ticking: {}
|
|
2704
|
-
},
|
|
2705
|
-
setup(e) {
|
|
2706
|
-
let t = Vt("wrapperRef"), { width: n } = Jt(t), r = e, i = Bt(), a = null;
|
|
2707
|
-
H(() => r.loading, () => {
|
|
2708
|
-
r.loading ? a = o() : a?.close();
|
|
2516
|
+
function u(e, t) {
|
|
2517
|
+
a({
|
|
2518
|
+
method: e,
|
|
2519
|
+
data: t
|
|
2709
2520
|
});
|
|
2710
|
-
function o() {
|
|
2711
|
-
let e = t.value?.$el;
|
|
2712
|
-
if (e instanceof HTMLElement) return _n.service({
|
|
2713
|
-
target: e,
|
|
2714
|
-
svg: "-",
|
|
2715
|
-
background: "rgba(200, 200, 200, 0)"
|
|
2716
|
-
});
|
|
2717
|
-
}
|
|
2718
|
-
return (e, r) => {
|
|
2719
|
-
let a = z("el-card");
|
|
2720
|
-
return F(), E(a, {
|
|
2721
|
-
ref_key: "wrapperRef",
|
|
2722
|
-
ref: t,
|
|
2723
|
-
"body-style": { padding: 0 },
|
|
2724
|
-
shadow: "never",
|
|
2725
|
-
class: "data-wrapper",
|
|
2726
|
-
onContextmenu: r[0] ||= (e) => {
|
|
2727
|
-
e.preventDefault(), e.stopPropagation();
|
|
2728
|
-
}
|
|
2729
|
-
}, Tt({
|
|
2730
|
-
header: U(() => [R(e.$slots, "header", { width: V(n) })]),
|
|
2731
|
-
default: U(() => [R(e.$slots, "default", { width: V(n) })]),
|
|
2732
|
-
_: 2
|
|
2733
|
-
}, [V(i).footer ? {
|
|
2734
|
-
name: "footer",
|
|
2735
|
-
fn: U(() => [R(e.$slots, "footer", { width: V(n) })]),
|
|
2736
|
-
key: "0"
|
|
2737
|
-
} : void 0]), 1536);
|
|
2738
|
-
};
|
|
2739
2521
|
}
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
}
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
e
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
}))
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2522
|
+
return {
|
|
2523
|
+
config: r,
|
|
2524
|
+
entity: n,
|
|
2525
|
+
manager: {
|
|
2526
|
+
insert_one(e) {
|
|
2527
|
+
return l(X.insert_one, e);
|
|
2528
|
+
},
|
|
2529
|
+
save_one(e) {
|
|
2530
|
+
return l(X.save_one, e);
|
|
2531
|
+
},
|
|
2532
|
+
sync_save_many(e) {
|
|
2533
|
+
return l(X.sync_save_many, e);
|
|
2534
|
+
},
|
|
2535
|
+
delete_one(e) {
|
|
2536
|
+
return l(X.delete_one, e);
|
|
2537
|
+
},
|
|
2538
|
+
sync_delete_many(e) {
|
|
2539
|
+
return l(X.sync_delete_many, e);
|
|
2540
|
+
},
|
|
2541
|
+
fetch(e) {
|
|
2542
|
+
return e ? l(X.fetch, e) : new Promise((e) => e(null));
|
|
2543
|
+
},
|
|
2544
|
+
find_one(e) {
|
|
2545
|
+
return l(X.find_one, e);
|
|
2546
|
+
},
|
|
2547
|
+
find(e) {
|
|
2548
|
+
return l(X.find, e);
|
|
2549
|
+
},
|
|
2550
|
+
values(e, t) {
|
|
2551
|
+
return l(X.values, {
|
|
2552
|
+
props: e,
|
|
2553
|
+
...t
|
|
2554
|
+
});
|
|
2555
|
+
},
|
|
2556
|
+
async search(e, t = 0, i = 1, a = "default") {
|
|
2557
|
+
if (!n.value) return {
|
|
2558
|
+
results: [],
|
|
2559
|
+
mapping: {},
|
|
2560
|
+
total: 0
|
|
2561
|
+
};
|
|
2562
|
+
let o = await l(`${X.search}/${a}`, {
|
|
2563
|
+
...e,
|
|
2564
|
+
size: t,
|
|
2565
|
+
page: i,
|
|
2566
|
+
type: "table"
|
|
2567
|
+
}), s = r.value.convertor;
|
|
2568
|
+
return s && o.results.forEach((e) => s(e)), o;
|
|
2569
|
+
},
|
|
2570
|
+
tree: (e, t = 0, n = "default") => {
|
|
2571
|
+
e ||= {};
|
|
2572
|
+
let i = `${X.search}/${n}`;
|
|
2573
|
+
return new Promise((n, a) => {
|
|
2574
|
+
l(i, {
|
|
2575
|
+
...e,
|
|
2576
|
+
root: t,
|
|
2577
|
+
type: "tree"
|
|
2578
|
+
}).then((e) => {
|
|
2579
|
+
let i = Ur(e.results, t), a = r.value.convertor;
|
|
2580
|
+
a && Object.values(i.mapping).forEach((e) => a(e)), n(i);
|
|
2581
|
+
}).catch((e) => a(e));
|
|
2582
|
+
});
|
|
2583
|
+
},
|
|
2584
|
+
sync_update_many(e, t) {
|
|
2585
|
+
return l(X.sync_update_many, {
|
|
2586
|
+
template: e,
|
|
2587
|
+
...t
|
|
2588
|
+
});
|
|
2589
|
+
},
|
|
2590
|
+
save_many: (e) => {
|
|
2591
|
+
u(X.save_many, e);
|
|
2592
|
+
},
|
|
2593
|
+
delete_many: (e) => {
|
|
2594
|
+
u(X.delete_many, e);
|
|
2595
|
+
},
|
|
2596
|
+
update_many: (e, t) => {
|
|
2597
|
+
u(X.update_many, {
|
|
2598
|
+
template: e,
|
|
2599
|
+
...t
|
|
2600
|
+
});
|
|
2601
|
+
},
|
|
2602
|
+
sorting: (e, t) => {
|
|
2603
|
+
let n = {
|
|
2604
|
+
currentId: t,
|
|
2605
|
+
items: e
|
|
2606
|
+
};
|
|
2607
|
+
u(X.sorting, n);
|
|
2608
|
+
},
|
|
2609
|
+
async meta(e) {
|
|
2610
|
+
if (!n.value) throw Error("未指定实体,无法读取元数据");
|
|
2611
|
+
return sr(await c(`valar/${n.value}/${e || "default"}/meta_view`));
|
|
2612
|
+
}
|
|
2613
|
+
},
|
|
2614
|
+
payload: o,
|
|
2615
|
+
loading: s
|
|
2616
|
+
};
|
|
2617
|
+
}
|
|
2618
|
+
//#endregion
|
|
2619
|
+
//#region morghulis/library/use-meta-query/index.ts
|
|
2620
|
+
function Wr(e) {
|
|
2621
|
+
let t = I({}), n = I(e.value.orders ?? { sort: -1 }), r = T(() => {
|
|
2622
|
+
let t = Object.entries(e.value.includes || {}).filter((e) => !e[0].includes("__"));
|
|
2623
|
+
return Object.fromEntries(t);
|
|
2624
|
+
}), { post: i } = Y(), a = I(), o = 0, s = !1;
|
|
2625
|
+
Nt(() => {
|
|
2626
|
+
s = !0, o++;
|
|
2627
|
+
});
|
|
2628
|
+
let c = T(() => {
|
|
2629
|
+
let t = a.value;
|
|
2630
|
+
if (!t || t.entity !== e.value.entity || t.code !== (e.value.code || "default")) return {
|
|
2631
|
+
code: e.value.code || "default",
|
|
2632
|
+
entity: e.value.entity || "",
|
|
2633
|
+
name: "",
|
|
2634
|
+
view_id: 0,
|
|
2635
|
+
title: "",
|
|
2636
|
+
tree: !1,
|
|
2637
|
+
control: {},
|
|
2638
|
+
fields: [],
|
|
2639
|
+
model: {}
|
|
2800
2640
|
};
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2641
|
+
let i = {
|
|
2642
|
+
disabled: !!e.value.disabled,
|
|
2643
|
+
restricted: {
|
|
2644
|
+
unsearchable: Object.keys(e.value.includes || {}).map((e) => nr(e).prop),
|
|
2645
|
+
uneditable: Object.keys(r.value),
|
|
2646
|
+
unorderable: ln(n, { sort: -1 })
|
|
2647
|
+
}
|
|
2648
|
+
};
|
|
2649
|
+
return sr(t.data, i);
|
|
2650
|
+
});
|
|
2651
|
+
async function l() {
|
|
2652
|
+
if (s) return;
|
|
2653
|
+
let t = ++o, { entity: n, beforeInit: r } = e.value, c = e.value.code || "default", l = () => !s && t === o && e.value.entity === n && (e.value.code || "default") === c;
|
|
2654
|
+
if ((!n || a.value?.entity !== n || a.value?.code !== c) && (a.value = void 0), n) try {
|
|
2655
|
+
let e = await i(`valar/${n}/${c}/meta_view`);
|
|
2656
|
+
if (!l()) return;
|
|
2657
|
+
let t = r ? await r(e) : e;
|
|
2658
|
+
l() && (a.value = {
|
|
2659
|
+
entity: n,
|
|
2660
|
+
code: c,
|
|
2661
|
+
data: t
|
|
2662
|
+
});
|
|
2663
|
+
} catch (e) {
|
|
2664
|
+
if (l()) throw e;
|
|
2815
2665
|
}
|
|
2816
|
-
return (t, r) => (F(), E(Lt(e.column.component), {
|
|
2817
|
-
data: e.data,
|
|
2818
|
-
param: e.column.param,
|
|
2819
|
-
invoke: n
|
|
2820
|
-
}, null, 8, ["data", "param"]));
|
|
2821
2666
|
}
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2667
|
+
return H(() => [e.value.entity, e.value.code], (e, t) => {
|
|
2668
|
+
ln(e, t) || l().catch((e) => console.error("元数据加载失败", e));
|
|
2669
|
+
}, {
|
|
2670
|
+
deep: !0,
|
|
2671
|
+
immediate: !0
|
|
2672
|
+
}), {
|
|
2673
|
+
finder: t,
|
|
2674
|
+
orders: n,
|
|
2675
|
+
core: r,
|
|
2676
|
+
meta: c,
|
|
2677
|
+
init: l,
|
|
2678
|
+
conditions: T(() => {
|
|
2679
|
+
let { includes: n, excludes: r } = e.value;
|
|
2680
|
+
return n = ar(n), r = ar(r), [dn({
|
|
2681
|
+
includes: n,
|
|
2682
|
+
excludes: r
|
|
2683
|
+
}, Gr(t.value, c.value?.fields)), ...e.value.conditions || []];
|
|
2684
|
+
})
|
|
2685
|
+
};
|
|
2686
|
+
}
|
|
2687
|
+
function Gr(e, t = []) {
|
|
2688
|
+
let n = {
|
|
2689
|
+
includes: {},
|
|
2690
|
+
excludes: {}
|
|
2691
|
+
};
|
|
2692
|
+
return Object.entries(e).forEach(([e, r]) => {
|
|
2693
|
+
let { type: i, collation: a, value: o } = r;
|
|
2694
|
+
if (o == null) return;
|
|
2695
|
+
let s = n[i], c = t.find((t) => t.prop === e);
|
|
2696
|
+
if (!c) return;
|
|
2697
|
+
let { domain: l, refer: { label: u } } = c;
|
|
2698
|
+
if (qn.linkage.includes(l)) {
|
|
2699
|
+
let t = `${`${e.replace("_id", "")}__${u}`}__${a}`;
|
|
2700
|
+
s[t] = o;
|
|
2701
|
+
} else if (qn.multiple.includes(l)) {
|
|
2702
|
+
let t = `${`${e}__${u}`}__${a}`;
|
|
2703
|
+
s[t] = o;
|
|
2704
|
+
} else {
|
|
2705
|
+
let t = `${e}__${a}`;
|
|
2706
|
+
s[t] = o;
|
|
2839
2707
|
}
|
|
2840
|
-
|
|
2841
|
-
|
|
2708
|
+
}), n;
|
|
2709
|
+
}
|
|
2710
|
+
//#endregion
|
|
2711
|
+
//#region morghulis/library/use-valar/index.ts
|
|
2712
|
+
function Kr(e, t) {
|
|
2713
|
+
let n = I(), r = I(), i = I({
|
|
2714
|
+
results: [],
|
|
2715
|
+
total: 0,
|
|
2716
|
+
mapping: {}
|
|
2717
|
+
}), a = I({
|
|
2718
|
+
options: [],
|
|
2719
|
+
mapping: {},
|
|
2720
|
+
rootNode: { children: [] }
|
|
2721
|
+
}), o = I(/* @__PURE__ */ new Set()), s = 0, c = !1;
|
|
2722
|
+
Nt(() => {
|
|
2723
|
+
c = !0, s++;
|
|
2724
|
+
});
|
|
2725
|
+
let { finder: l, orders: u, core: d, meta: f, init: p, conditions: m } = Wr(e), { loading: h, manager: g } = Z(T(() => f.value.entity), {
|
|
2726
|
+
convertor: e.value.convertor,
|
|
2727
|
+
onStart: () => {
|
|
2728
|
+
n.value = void 0, r.value = null;
|
|
2729
|
+
},
|
|
2730
|
+
onError: (e) => {
|
|
2731
|
+
n.value = void 0, r.value = e;
|
|
2732
|
+
},
|
|
2733
|
+
onProceed: (e) => {
|
|
2734
|
+
n.value = e, r.value = null;
|
|
2735
|
+
},
|
|
2736
|
+
onStop: () => {
|
|
2737
|
+
n.value = void 0, r.value = null;
|
|
2738
|
+
},
|
|
2739
|
+
onResponse: (e) => {
|
|
2740
|
+
n.value = void 0, r.value = null;
|
|
2741
|
+
let { method: t, response: i } = e;
|
|
2742
|
+
if (t === "sorting") {
|
|
2743
|
+
let { currentId: e } = i;
|
|
2744
|
+
y([e]);
|
|
2745
|
+
} else t === "save_many" ? y(i) : y();
|
|
2842
2746
|
}
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2747
|
+
}), _ = e.value.entity, v = e.value.code || "default";
|
|
2748
|
+
H(() => [
|
|
2749
|
+
e.value.entity,
|
|
2750
|
+
e.value.code,
|
|
2751
|
+
f.value.entity,
|
|
2752
|
+
f.value.code,
|
|
2753
|
+
u.value,
|
|
2754
|
+
m.value,
|
|
2755
|
+
t.value
|
|
2756
|
+
], () => {
|
|
2757
|
+
let { entity: t } = e.value, n = e.value.code || "default";
|
|
2758
|
+
(t !== _ || n !== v) && (i.value = {
|
|
2759
|
+
results: [],
|
|
2760
|
+
total: 0,
|
|
2761
|
+
mapping: {}
|
|
2762
|
+
}, a.value = {
|
|
2763
|
+
options: [],
|
|
2764
|
+
mapping: {},
|
|
2765
|
+
rootNode: { children: [] }
|
|
2766
|
+
}, o.value.clear(), _ = t, v = n), y();
|
|
2767
|
+
}, {
|
|
2768
|
+
deep: !0,
|
|
2769
|
+
immediate: !0
|
|
2770
|
+
});
|
|
2771
|
+
function y(e) {
|
|
2772
|
+
b(e).catch((e) => console.error("刷新数据失败", e));
|
|
2773
|
+
}
|
|
2774
|
+
async function b(n) {
|
|
2775
|
+
if (c) return;
|
|
2776
|
+
let l = ++s, d = f.value, p = e.value.entity, h = e.value.code || "default", _ = { ...t.value }, { size: v, page: y, type: b, root: ee } = _, te = an({
|
|
2777
|
+
orders: u.value,
|
|
2778
|
+
conditions: m.value
|
|
2779
|
+
}), S = () => !c && l === s && e.value.entity === p && (e.value.code || "default") === h && f.value === d && ln(t.value, _) && ln(u.value, te.orders) && ln(m.value, te.conditions), ne = [...o.value];
|
|
2780
|
+
o.value.clear(), r.value = null;
|
|
2781
|
+
let { validator: re, beforeReload: ie } = e.value;
|
|
2782
|
+
if (!d.entity) i.value = {
|
|
2783
|
+
results: [],
|
|
2784
|
+
total: 0,
|
|
2785
|
+
mapping: {}
|
|
2786
|
+
}, a.value = {
|
|
2787
|
+
options: [],
|
|
2788
|
+
mapping: {},
|
|
2789
|
+
rootNode: { children: [] }
|
|
2873
2790
|
};
|
|
2791
|
+
else try {
|
|
2792
|
+
if (b === "tree") {
|
|
2793
|
+
let e = await g.tree(te, ee, d.code);
|
|
2794
|
+
if (!S()) return;
|
|
2795
|
+
let t = Object.values(e.mapping), n = await ie?.(t, d) ?? !0;
|
|
2796
|
+
if (!S() || (n && re && t.forEach((e) => e.$message = re(e)), !S())) return;
|
|
2797
|
+
a.value = n ? e : {
|
|
2798
|
+
options: [],
|
|
2799
|
+
mapping: {},
|
|
2800
|
+
rootNode: { children: [] }
|
|
2801
|
+
};
|
|
2802
|
+
} else if (b === "table") {
|
|
2803
|
+
let e = await g.search(te, v, y, d.code);
|
|
2804
|
+
if (!S()) return;
|
|
2805
|
+
let t = e.results, n = await ie?.(t, d) ?? !0;
|
|
2806
|
+
if (!S() || (n && re && t.forEach((e) => e.$message = re(e)), !S())) return;
|
|
2807
|
+
e.mapping = Object.fromEntries(t.map((e) => [e.id, e])), i.value = n ? e : {
|
|
2808
|
+
results: [],
|
|
2809
|
+
total: 0,
|
|
2810
|
+
mapping: {}
|
|
2811
|
+
};
|
|
2812
|
+
}
|
|
2813
|
+
S() && x(n || ne);
|
|
2814
|
+
} catch (e) {
|
|
2815
|
+
if (!S()) return;
|
|
2816
|
+
throw r.value = e instanceof Error ? e.message : String(e), e;
|
|
2817
|
+
}
|
|
2818
|
+
}
|
|
2819
|
+
function x(e) {
|
|
2820
|
+
let n = (t.value.type === "table" ? i.value.results : Object.values(a.value.mapping)).map((e) => e.id);
|
|
2821
|
+
o.value = new Set(sn(n, e));
|
|
2822
|
+
}
|
|
2823
|
+
function ee(e) {
|
|
2824
|
+
let t = e.map((e) => ({
|
|
2825
|
+
...e,
|
|
2826
|
+
...d.value
|
|
2827
|
+
}));
|
|
2828
|
+
g.save_many(t);
|
|
2874
2829
|
}
|
|
2875
|
-
|
|
2830
|
+
function te(...e) {
|
|
2831
|
+
return g.find({ includes: { id__in: e } });
|
|
2832
|
+
}
|
|
2833
|
+
return {
|
|
2834
|
+
meta: f,
|
|
2835
|
+
response: i,
|
|
2836
|
+
orders: u,
|
|
2837
|
+
conditions: m,
|
|
2838
|
+
manager: {
|
|
2839
|
+
init: p,
|
|
2840
|
+
reload: b,
|
|
2841
|
+
save_many: ee,
|
|
2842
|
+
fetch: te,
|
|
2843
|
+
highlight: x,
|
|
2844
|
+
sorting: g.sorting,
|
|
2845
|
+
delete_many: (e) => {
|
|
2846
|
+
e.length ? g.delete_many({ includes: { id__in: e } }) : g.delete_many({});
|
|
2847
|
+
},
|
|
2848
|
+
delete_one: (e) => g.delete_one(e),
|
|
2849
|
+
save_one: (e) => ee([{
|
|
2850
|
+
...e,
|
|
2851
|
+
...d.value
|
|
2852
|
+
}]),
|
|
2853
|
+
insert_one: (e) => g.insert_one({
|
|
2854
|
+
...e,
|
|
2855
|
+
...d.value
|
|
2856
|
+
}),
|
|
2857
|
+
find: () => g.find({ conditions: m.value }),
|
|
2858
|
+
get: (e) => g.fetch(e)
|
|
2859
|
+
},
|
|
2860
|
+
api: g,
|
|
2861
|
+
loading: h,
|
|
2862
|
+
ticking: n,
|
|
2863
|
+
error: r,
|
|
2864
|
+
finder: l,
|
|
2865
|
+
collector: o,
|
|
2866
|
+
core: d,
|
|
2867
|
+
model: a
|
|
2868
|
+
};
|
|
2869
|
+
}
|
|
2876
2870
|
//#endregion
|
|
2877
2871
|
//#region morghulis/components/table/hooks/table-sort.ts
|
|
2878
2872
|
function qr(e, t) {
|
|
@@ -2891,7 +2885,7 @@ function qr(e, t) {
|
|
|
2891
2885
|
onEnd(e) {
|
|
2892
2886
|
let n = e.newIndex, r = e.oldIndex, i = a.value.map((e) => e.id), o = a.value.map((e) => e.sort), s = Math.min(n, r), c = Math.max(n, r), l = i.splice(r, 1)[0];
|
|
2893
2887
|
i.splice(n, 0, l);
|
|
2894
|
-
let u =
|
|
2888
|
+
let u = pn(s, c + 1).map((e) => ({
|
|
2895
2889
|
id: i[e],
|
|
2896
2890
|
sort: o[e]
|
|
2897
2891
|
}));
|
|
@@ -3079,7 +3073,7 @@ var Jr = /* @__PURE__ */ M({
|
|
|
3079
3073
|
setup(e, { emit: t }) {
|
|
3080
3074
|
let n = t, r = e, i = T(() => {
|
|
3081
3075
|
let e = r.field.prop;
|
|
3082
|
-
return r.finder[e] ? "primary" :
|
|
3076
|
+
return r.finder[e] ? "primary" : ir(r.includes, e).length ? "warning" : "";
|
|
3083
3077
|
}), a = T(() => (r.orders || {})[r.field.prop]), o = T(() => a.value === 1 ? "sort-up" : a.value === -1 ? "sort-down" : "sort");
|
|
3084
3078
|
return (t, r) => {
|
|
3085
3079
|
let s = z("el-space"), c = z("el-divider");
|
|
@@ -3254,13 +3248,13 @@ var Jr = /* @__PURE__ */ M({
|
|
|
3254
3248
|
if (t) {
|
|
3255
3249
|
let e = r.includes?.[t];
|
|
3256
3250
|
c.value = !0, f.value = !1;
|
|
3257
|
-
let { collation: n } =
|
|
3251
|
+
let { collation: n } = nr(t);
|
|
3258
3252
|
p.value = n ?? "exact", o.value.value = e;
|
|
3259
3253
|
}
|
|
3260
3254
|
}
|
|
3261
3255
|
}
|
|
3262
3256
|
P(l);
|
|
3263
|
-
let u = T(() =>
|
|
3257
|
+
let u = T(() => qn.multiple.includes(r.field.domain)), d = T(() => r.field.domain === "BooleanField"), f = I(!1), p = I(d.value ? "exact" : "contains"), m = T(() => [
|
|
3264
3258
|
{
|
|
3265
3259
|
label: "基础检索",
|
|
3266
3260
|
value: "basic",
|
|
@@ -3559,14 +3553,14 @@ var Jr = /* @__PURE__ */ M({
|
|
|
3559
3553
|
],
|
|
3560
3554
|
setup(e, { emit: t }) {
|
|
3561
3555
|
let n = e, r = t, i = I(), a = I({}), o = W(n, "modelValue", r), { $message: s } = J();
|
|
3562
|
-
H(() => n.original, (e) => a.value =
|
|
3556
|
+
H(() => n.original, (e) => a.value = an(e), {
|
|
3563
3557
|
deep: !0,
|
|
3564
3558
|
immediate: !0
|
|
3565
3559
|
}), H(() => [i.value, a.value], () => {
|
|
3566
3560
|
i.value?.validate((e) => {
|
|
3567
3561
|
if (e) {
|
|
3568
3562
|
let e = Object.fromEntries(l.value.map((e) => [e, a.value[e]])), t = n.original?.id;
|
|
3569
|
-
t && !
|
|
3563
|
+
t && !cn(e) && (e.id = t), o.value = e;
|
|
3570
3564
|
} else s.error("数据校验不通过,请查看提示信息。"), o.value = null;
|
|
3571
3565
|
r("change", o.value);
|
|
3572
3566
|
});
|
|
@@ -3580,7 +3574,7 @@ var Jr = /* @__PURE__ */ M({
|
|
|
3580
3574
|
return Object.fromEntries(e);
|
|
3581
3575
|
}), l = T(() => n.fields.filter(({ prop: e }) => {
|
|
3582
3576
|
let t = n.original[e], r = a.value[e];
|
|
3583
|
-
return !
|
|
3577
|
+
return !ln(t, r);
|
|
3584
3578
|
}).map(({ prop: e }) => e));
|
|
3585
3579
|
function u(e) {
|
|
3586
3580
|
a.value[e] = n.original[e];
|
|
@@ -3628,7 +3622,7 @@ var Jr = /* @__PURE__ */ M({
|
|
|
3628
3622
|
icon: "refresh"
|
|
3629
3623
|
}, null, 8, ["onClick"])) : D("", !0)
|
|
3630
3624
|
]),
|
|
3631
|
-
default: U(() => [j(
|
|
3625
|
+
default: U(() => [j(kr, {
|
|
3632
3626
|
modelValue: a.value[t.prop],
|
|
3633
3627
|
"onUpdate:modelValue": (e) => a.value[t.prop] = e,
|
|
3634
3628
|
field: t,
|
|
@@ -3683,7 +3677,7 @@ var Jr = /* @__PURE__ */ M({
|
|
|
3683
3677
|
return n.manager.save_many(t), !0;
|
|
3684
3678
|
}
|
|
3685
3679
|
{
|
|
3686
|
-
if (
|
|
3680
|
+
if (cn(o.value)) return !0;
|
|
3687
3681
|
let e = n.items.map(({ id: e }) => ({
|
|
3688
3682
|
...o.value,
|
|
3689
3683
|
id: e
|
|
@@ -3769,7 +3763,7 @@ var li = { class: "justified full" }, ui = /* @__PURE__ */ M({
|
|
|
3769
3763
|
immediate: !0
|
|
3770
3764
|
}), (e, t) => {
|
|
3771
3765
|
let r = z("el-text"), i = z("el-option"), c = z("el-select"), p = z("el-divider"), m = z("el-checkbox"), h = z("el-space"), g = z("el-table-column"), _ = z("el-table"), v = z("el-pagination");
|
|
3772
|
-
return F(), E(
|
|
3766
|
+
return F(), E(Mr, null, {
|
|
3773
3767
|
header: U(() => [k("div", li, [j(r, {
|
|
3774
3768
|
size: "small",
|
|
3775
3769
|
truncated: "",
|
|
@@ -3916,7 +3910,7 @@ var li = { class: "justified full" }, ui = /* @__PURE__ */ M({
|
|
|
3916
3910
|
}, 8, ["content"])), [[h, n.value]])], 64);
|
|
3917
3911
|
};
|
|
3918
3912
|
}
|
|
3919
|
-
}), [["__scopeId", "data-v-
|
|
3913
|
+
}), [["__scopeId", "data-v-d449df50"]]), mi = /* @__PURE__ */ M({
|
|
3920
3914
|
__name: "MTxtView",
|
|
3921
3915
|
props: { url: {} },
|
|
3922
3916
|
setup(e) {
|
|
@@ -3948,7 +3942,7 @@ var _i = /*#__PURE__*/ wn(hi, [["render", gi]]);
|
|
|
3948
3942
|
//#endregion
|
|
3949
3943
|
//#region morghulis/components/viewer/use-file.ts
|
|
3950
3944
|
function vi(e) {
|
|
3951
|
-
let { minio_url: t } = Q(), n = T(() =>
|
|
3945
|
+
let { minio_url: t } = Q(), n = T(() => Cr(t.value, e.value)), r = [
|
|
3952
3946
|
".pdf",
|
|
3953
3947
|
".jpg",
|
|
3954
3948
|
".gif",
|
|
@@ -4041,7 +4035,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
4041
4035
|
}
|
|
4042
4036
|
function l(e, t, n) {
|
|
4043
4037
|
let { prop: r, tool: s, label: c } = e, l = { id: t.id };
|
|
4044
|
-
l[r] =
|
|
4038
|
+
l[r] = an(t[r]), o.value = l;
|
|
4045
4039
|
let d = {
|
|
4046
4040
|
row: t,
|
|
4047
4041
|
field: e
|
|
@@ -4079,7 +4073,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
4079
4073
|
ref_key: "dialogRef",
|
|
4080
4074
|
ref: a
|
|
4081
4075
|
}, {
|
|
4082
|
-
tool: U(({ data: { field: t, row: r } }) => [t.tool === "file" ? (F(), E(V(
|
|
4076
|
+
tool: U(({ data: { field: t, row: r } }) => [t.tool === "file" ? (F(), E(V(wr), {
|
|
4083
4077
|
key: 0,
|
|
4084
4078
|
disabled: !t?.allow_edit,
|
|
4085
4079
|
field: t,
|
|
@@ -4103,7 +4097,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
4103
4097
|
default: U(() => [...n[2] ||= [A("保存 ", -1)]]),
|
|
4104
4098
|
_: 1
|
|
4105
4099
|
}, 8, ["onClick"]))]),
|
|
4106
|
-
default: U(({ data: { field: { prop: e, tool: t, refer: n, allow_edit: r, format: { locked: i } }, row: a } }) => [t === "rich" ? (F(), E(
|
|
4100
|
+
default: U(({ data: { field: { prop: e, tool: t, refer: n, allow_edit: r, format: { locked: i } }, row: a } }) => [t === "rich" ? (F(), E(Dr, {
|
|
4107
4101
|
key: 0,
|
|
4108
4102
|
disabled: !r,
|
|
4109
4103
|
modelValue: o.value[e],
|
|
@@ -4112,7 +4106,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
4112
4106
|
"disabled",
|
|
4113
4107
|
"modelValue",
|
|
4114
4108
|
"onUpdate:modelValue"
|
|
4115
|
-
])) : t === "object" ? (F(), E(
|
|
4109
|
+
])) : t === "object" ? (F(), E(Tr, {
|
|
4116
4110
|
key: 1,
|
|
4117
4111
|
disabled: !r,
|
|
4118
4112
|
modelValue: o.value[e],
|
|
@@ -4121,7 +4115,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
4121
4115
|
"disabled",
|
|
4122
4116
|
"modelValue",
|
|
4123
4117
|
"onUpdate:modelValue"
|
|
4124
|
-
])) : t === "transfer" ? (F(), E(
|
|
4118
|
+
])) : t === "transfer" ? (F(), E(_r, {
|
|
4125
4119
|
key: 2,
|
|
4126
4120
|
modelValue: o.value[e],
|
|
4127
4121
|
"onUpdate:modelValue": (t) => o.value[e] = t,
|
|
@@ -4138,7 +4132,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
4138
4132
|
locked: i
|
|
4139
4133
|
}, null, 8, ["path", "locked"])) : D("", !0)]),
|
|
4140
4134
|
_: 1
|
|
4141
|
-
}, 512), j(
|
|
4135
|
+
}, 512), j(In, {
|
|
4142
4136
|
ref_key: "popoverRef",
|
|
4143
4137
|
ref: i,
|
|
4144
4138
|
width: "300px"
|
|
@@ -4160,7 +4154,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
4160
4154
|
}, {
|
|
4161
4155
|
default: U(() => [...n[4] ||= [A("保存 ", -1)]]),
|
|
4162
4156
|
_: 1
|
|
4163
|
-
}, 8, ["onClick"]))]), k("div", xi, [j(
|
|
4157
|
+
}, 8, ["onClick"]))]), k("div", xi, [j(kr, {
|
|
4164
4158
|
modelValue: o.value[t.prop],
|
|
4165
4159
|
"onUpdate:modelValue": (e) => o.value[t.prop] = e,
|
|
4166
4160
|
field: t,
|
|
@@ -4243,7 +4237,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
4243
4237
|
return i || (r === "icon" ? a : null);
|
|
4244
4238
|
}), l = T(() => {
|
|
4245
4239
|
let { row: e, field: { prop: t, tool: r } } = n, i = o[n.field.tool], a = e[t];
|
|
4246
|
-
return i ?
|
|
4240
|
+
return i ? cn(a) ? "info" : "primary" : "info";
|
|
4247
4241
|
}), u = T(() => {
|
|
4248
4242
|
let { row: e, field: { prop: t, domain: r, tool: i, refer: { label: a }, format: { set: o, multiple: s } } } = n, c = e[t];
|
|
4249
4243
|
if ([
|
|
@@ -4450,7 +4444,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
4450
4444
|
}
|
|
4451
4445
|
let s = T(() => {
|
|
4452
4446
|
let e = ["entity", "code"];
|
|
4453
|
-
return
|
|
4447
|
+
return ln(fn(i.value, e), fn(n, e));
|
|
4454
4448
|
});
|
|
4455
4449
|
function c() {
|
|
4456
4450
|
i.value = {
|
|
@@ -4633,7 +4627,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
4633
4627
|
let t = e, n = T(() => t.data?.refer.entity), r = T(() => {
|
|
4634
4628
|
if (!t.data) return !0;
|
|
4635
4629
|
let { tool: e, domain: n } = t.data;
|
|
4636
|
-
return !e || !n ? !0 :
|
|
4630
|
+
return !e || !n ? !0 : qn.referred.includes(n) ? !1 : n !== "CharField" || ![
|
|
4637
4631
|
"select",
|
|
4638
4632
|
"cascade",
|
|
4639
4633
|
"tree",
|
|
@@ -4668,7 +4662,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
4668
4662
|
setup(e, { emit: t }) {
|
|
4669
4663
|
let n = e, r = W(n, "refer", t);
|
|
4670
4664
|
function i(e) {
|
|
4671
|
-
return !r.value.entity ||
|
|
4665
|
+
return !r.value.entity || qn.referred.includes(n.domain) && e === "value";
|
|
4672
4666
|
}
|
|
4673
4667
|
let a = {
|
|
4674
4668
|
value: "取值字段",
|
|
@@ -4686,7 +4680,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
4686
4680
|
r && (console.error("加载字段选项失败", e), c.error("字段选项加载失败,请重新选择元数据"));
|
|
4687
4681
|
}
|
|
4688
4682
|
}, { immediate: !0 });
|
|
4689
|
-
let u = T(() => l.value ? Object.values(l.value.model).filter(({ domain: e }) => !
|
|
4683
|
+
let u = T(() => l.value ? Object.values(l.value.model).filter(({ domain: e }) => !qn.referred.includes(e || "")).map(({ prop: e, label: t }) => ({
|
|
4690
4684
|
value: e,
|
|
4691
4685
|
label: t,
|
|
4692
4686
|
display: e
|
|
@@ -4837,7 +4831,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
4837
4831
|
label: "检索条件(包含)",
|
|
4838
4832
|
"label-position": "top"
|
|
4839
4833
|
}, {
|
|
4840
|
-
default: U(() => [j(
|
|
4834
|
+
default: U(() => [j(Tr, {
|
|
4841
4835
|
modelValue: V(r).includes,
|
|
4842
4836
|
"onUpdate:modelValue": n[3] ||= (e) => V(r).includes = e,
|
|
4843
4837
|
disabled: !V(r).entity
|
|
@@ -4851,7 +4845,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
4851
4845
|
label: "检索条件(排除)",
|
|
4852
4846
|
"label-position": "top"
|
|
4853
4847
|
}, {
|
|
4854
|
-
default: U(() => [j(
|
|
4848
|
+
default: U(() => [j(Tr, {
|
|
4855
4849
|
modelValue: V(r).excludes,
|
|
4856
4850
|
"onUpdate:modelValue": n[4] ||= (e) => V(r).excludes = e,
|
|
4857
4851
|
disabled: !V(r).entity
|
|
@@ -4976,7 +4970,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
4976
4970
|
];
|
|
4977
4971
|
default: return ["date"];
|
|
4978
4972
|
}
|
|
4979
|
-
}), a = T(() => Object.entries(
|
|
4973
|
+
}), a = T(() => Object.entries(Kn).filter(([e, t]) => i.value.includes(e)).map(([e, t]) => ({
|
|
4980
4974
|
label: t.label,
|
|
4981
4975
|
value: e
|
|
4982
4976
|
})));
|
|
@@ -5014,7 +5008,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
5014
5008
|
".gif",
|
|
5015
5009
|
".png",
|
|
5016
5010
|
".jpeg"
|
|
5017
|
-
] :
|
|
5011
|
+
] : Gn);
|
|
5018
5012
|
return (t, n) => {
|
|
5019
5013
|
let a = z("el-input-number"), o = z("el-form-item"), s = z("el-col"), c = z("el-checkbox"), l = z("el-option"), u = z("el-select"), d = z("el-row"), f = z("el-form");
|
|
5020
5014
|
return F(), E(f, { "label-position": "top" }, {
|
|
@@ -5263,7 +5257,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
5263
5257
|
});
|
|
5264
5258
|
}
|
|
5265
5259
|
function o(e) {
|
|
5266
|
-
r.value = r.value.filter((t) => !
|
|
5260
|
+
r.value = r.value.filter((t) => !ln(e, t)), i();
|
|
5267
5261
|
}
|
|
5268
5262
|
return (e, t) => {
|
|
5269
5263
|
let n = z("el-table-column"), s = z("el-input"), c = z("el-table");
|
|
@@ -5543,7 +5537,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
5543
5537
|
}
|
|
5544
5538
|
function g() {
|
|
5545
5539
|
if (!l.value) return;
|
|
5546
|
-
let { model: e, fields: t } = l.value, r =
|
|
5540
|
+
let { model: e, fields: t } = l.value, r = on(Object.keys(e), t.map((e) => e.prop)).map((t) => {
|
|
5547
5541
|
let { prop: n, label: r, domain: i } = e[t];
|
|
5548
5542
|
return {
|
|
5549
5543
|
label: r,
|
|
@@ -5687,7 +5681,7 @@ var yi = /* @__PURE__ */ M({
|
|
|
5687
5681
|
async function l() {
|
|
5688
5682
|
let e = s.value.id;
|
|
5689
5683
|
if (c.value == null || !e) return !1;
|
|
5690
|
-
if (
|
|
5684
|
+
if (cn(c.value)) return !0;
|
|
5691
5685
|
let t = {
|
|
5692
5686
|
...c.value,
|
|
5693
5687
|
id: e
|
|
@@ -5856,12 +5850,12 @@ var yi = /* @__PURE__ */ M({
|
|
|
5856
5850
|
}
|
|
5857
5851
|
], u = I("tool"), d = I([]);
|
|
5858
5852
|
H(u, () => n.meta(u.value).then((e) => d.value = e.fields), { immediate: !0 });
|
|
5859
|
-
let f = T(() => !
|
|
5853
|
+
let f = T(() => !cn(i.value)), p = () => {
|
|
5860
5854
|
n.fetch(t.field_id).then((e) => r.value = e);
|
|
5861
5855
|
};
|
|
5862
5856
|
P(p);
|
|
5863
5857
|
function m(e) {
|
|
5864
|
-
|
|
5858
|
+
cn(e) || n.save_one(e).then(p);
|
|
5865
5859
|
}
|
|
5866
5860
|
return (e, t) => {
|
|
5867
5861
|
let n = z("el-segmented"), p = z("el-col"), h = z("el-row"), g = z("el-card");
|
|
@@ -6105,7 +6099,7 @@ var Zi = /* @__PURE__ */ M({
|
|
|
6105
6099
|
let r = n.fields.find((e) => e.label === t);
|
|
6106
6100
|
r && e.push(r.prop);
|
|
6107
6101
|
});
|
|
6108
|
-
let t = i.data.map((t) => o(e, t)).filter((e) => !
|
|
6102
|
+
let t = i.data.map((t) => o(e, t)).filter((e) => !cn(e));
|
|
6109
6103
|
r("success", t);
|
|
6110
6104
|
}
|
|
6111
6105
|
} catch {
|
|
@@ -6176,7 +6170,7 @@ var Zi = /* @__PURE__ */ M({
|
|
|
6176
6170
|
setup(e, { emit: t }) {
|
|
6177
6171
|
let n = e, r = t, i = I(), a = W(n, "raw", r), o = W(n, "valid", r), s = W(n, "referred", r);
|
|
6178
6172
|
H(a, () => o.value = null);
|
|
6179
|
-
let c = T(() => !!n.fields.filter((e) =>
|
|
6173
|
+
let c = T(() => !!n.fields.filter((e) => qn.referred.includes(e.domain)).length), { $confirm: l, $message: u } = J();
|
|
6180
6174
|
function d() {
|
|
6181
6175
|
l.info("是否清空已上传的数据?").then(() => {
|
|
6182
6176
|
a.value = [];
|
|
@@ -6488,8 +6482,8 @@ function oa(e, t) {
|
|
|
6488
6482
|
value: null,
|
|
6489
6483
|
label: ""
|
|
6490
6484
|
};
|
|
6491
|
-
if (
|
|
6492
|
-
let e =
|
|
6485
|
+
if (qn.referred.includes(a)) {
|
|
6486
|
+
let e = qn.multiple.includes(a), { mapping: n } = i;
|
|
6493
6487
|
if (e) {
|
|
6494
6488
|
if (t.value) {
|
|
6495
6489
|
let e = r.split(";"), t = e.filter((e) => !n[e]), i = t.length ? `索引 ${t} 不在字典中` : void 0, a = e.filter((e) => !t.includes(e));
|
|
@@ -6792,7 +6786,7 @@ var sa = {
|
|
|
6792
6786
|
ref_key: "dictRef",
|
|
6793
6787
|
ref: r
|
|
6794
6788
|
}, null, 512),
|
|
6795
|
-
j(
|
|
6789
|
+
j(In, {
|
|
6796
6790
|
ref_key: "invalidRef",
|
|
6797
6791
|
ref: i,
|
|
6798
6792
|
width: "80",
|
|
@@ -7004,7 +6998,7 @@ var sa = {
|
|
|
7004
6998
|
...n,
|
|
7005
6999
|
code: r.value,
|
|
7006
7000
|
entity: i.value
|
|
7007
|
-
})), u = I(), d = I(), f = I(), p = I(), m = I(), h = I(), g = I(), _ = I(), v = I(), { account: y } =
|
|
7001
|
+
})), u = I(), d = I(), f = I(), p = I(), m = I(), h = I(), g = I(), _ = I(), v = I(), { account: y } = Lr(), { meta: b, response: x, orders: ee, conditions: te, manager: S, api: ne, ticking: re, loading: ie, error: ae, finder: oe, collector: C } = Kr(l, c), se = I(0);
|
|
7008
7002
|
function ce(e) {
|
|
7009
7003
|
se.value = e;
|
|
7010
7004
|
}
|
|
@@ -7124,7 +7118,7 @@ var sa = {
|
|
|
7124
7118
|
}
|
|
7125
7119
|
let { createSortable: Ne } = qr(u, S.sorting);
|
|
7126
7120
|
return H(() => x.value.results, (e, t) => {
|
|
7127
|
-
let n = !!b.value.control.allow_edit_on_sort &&
|
|
7121
|
+
let n = !!b.value.control.allow_edit_on_sort && ln(ee.value, { sort: -1 });
|
|
7128
7122
|
Ne(x.value.results, n);
|
|
7129
7123
|
}, { deep: !0 }), t({
|
|
7130
7124
|
api: ne,
|
|
@@ -7135,7 +7129,7 @@ var sa = {
|
|
|
7135
7129
|
}), (t, n) => {
|
|
7136
7130
|
let l = z("el-space"), y = z("el-table-column"), te = z("el-text"), ne = z("el-table");
|
|
7137
7131
|
return F(), O(w, null, [
|
|
7138
|
-
j(
|
|
7132
|
+
j(Mr, {
|
|
7139
7133
|
ref: "wrapperRef",
|
|
7140
7134
|
loading: V(ie),
|
|
7141
7135
|
ticking: V(re)
|
|
@@ -7295,7 +7289,7 @@ var sa = {
|
|
|
7295
7289
|
fixed: e.fixed || "right",
|
|
7296
7290
|
width: e.width || "auto"
|
|
7297
7291
|
}, {
|
|
7298
|
-
default: U(({ row: t }) => [j(
|
|
7292
|
+
default: U(({ row: t }) => [j(Pr, {
|
|
7299
7293
|
data: t,
|
|
7300
7294
|
column: e,
|
|
7301
7295
|
collector: V(C)
|
|
@@ -7319,7 +7313,7 @@ var sa = {
|
|
|
7319
7313
|
"show-overflow-tooltip": !1
|
|
7320
7314
|
}, {
|
|
7321
7315
|
header: U(() => [j(G, { icon: "screwdriver-wrench" })]),
|
|
7322
|
-
default: U(({ row: t }) => [j(
|
|
7316
|
+
default: U(({ row: t }) => [j(Fr, {
|
|
7323
7317
|
buttons: e.buttons,
|
|
7324
7318
|
data: t,
|
|
7325
7319
|
collector: V(C),
|
|
@@ -7353,7 +7347,7 @@ var sa = {
|
|
|
7353
7347
|
default: U(({ data: e }) => [j(Yi, { field_id: e.id }, null, 8, ["field_id"])]),
|
|
7354
7348
|
_: 1
|
|
7355
7349
|
}, 512),
|
|
7356
|
-
j(
|
|
7350
|
+
j(In, {
|
|
7357
7351
|
ref_key: "metaRef",
|
|
7358
7352
|
ref: h,
|
|
7359
7353
|
onHide: V(S).init
|
|
@@ -7371,7 +7365,7 @@ var sa = {
|
|
|
7371
7365
|
ref: f,
|
|
7372
7366
|
onConfirm: o
|
|
7373
7367
|
}, null, 512),
|
|
7374
|
-
j(
|
|
7368
|
+
j(In, {
|
|
7375
7369
|
ref_key: "searchRef",
|
|
7376
7370
|
ref: g,
|
|
7377
7371
|
width: "250px"
|
|
@@ -7551,7 +7545,7 @@ var sa = {
|
|
|
7551
7545
|
let r = e, i = n, a = I(r.code || "default"), o = I(r.entity), s = I({
|
|
7552
7546
|
type: "tree",
|
|
7553
7547
|
root: r.root
|
|
7554
|
-
}), { meta: c, response: l, manager: u, api: d, loading: f, ticking: p, error: m, finder: h, collector: g, model: _ } =
|
|
7548
|
+
}), { meta: c, response: l, manager: u, api: d, loading: f, ticking: p, error: m, finder: h, collector: g, model: _ } = Kr(T(() => ({
|
|
7555
7549
|
...r,
|
|
7556
7550
|
code: a.value,
|
|
7557
7551
|
entity: o.value
|
|
@@ -7646,18 +7640,18 @@ var sa = {
|
|
|
7646
7640
|
let c = [...g.value].filter((e) => !_.value.mapping[e]?.children?.length), l = new Set(c);
|
|
7647
7641
|
if (g.value = l, s?.length) {
|
|
7648
7642
|
let t = y.value?.getNode(o);
|
|
7649
|
-
t && (t.expanded ?
|
|
7643
|
+
t && (t.expanded ? sn(ue(e).map((e) => e.id), [...g.value]).length || (t.expanded = !1) : t.expanded = !0);
|
|
7650
7644
|
} else l.has(o) ? l.delete(o) : (r.single && l.clear(), l.add(o));
|
|
7651
7645
|
}
|
|
7652
|
-
function ge(e, t) {
|
|
7646
|
+
function ge(e, t, n) {
|
|
7653
7647
|
e.preventDefault(), e.stopPropagation();
|
|
7654
|
-
let
|
|
7655
|
-
g.value.clear(), g.value.add(
|
|
7656
|
-
let { allow_edit_on_cell:
|
|
7657
|
-
(
|
|
7648
|
+
let r = t.id;
|
|
7649
|
+
g.value.clear(), g.value.add(r);
|
|
7650
|
+
let { allow_edit_on_cell: i, allow_remove: a } = c.value.control;
|
|
7651
|
+
(i || a) && b.value?.open(e, t);
|
|
7658
7652
|
}
|
|
7659
7653
|
function _e(e) {
|
|
7660
|
-
|
|
7654
|
+
return e.id && g.value.has(e.id) ? "selection" : "";
|
|
7661
7655
|
}
|
|
7662
7656
|
function ve(e, t) {
|
|
7663
7657
|
let n = e.data.id;
|
|
@@ -7676,7 +7670,7 @@ var sa = {
|
|
|
7676
7670
|
};
|
|
7677
7671
|
u.save_many([e]);
|
|
7678
7672
|
} else {
|
|
7679
|
-
let e =
|
|
7673
|
+
let e = un(_.value.mapping, (e) => e.sort), n = t.parent.childNodes.map((e) => e.data), r = n.map((e) => e.sort).sort((e, t) => t - e), i = a.pid, s = n.map((e, t) => {
|
|
7680
7674
|
let n = e.id, a = {
|
|
7681
7675
|
id: n,
|
|
7682
7676
|
sort: r[t]
|
|
@@ -7697,13 +7691,13 @@ var sa = {
|
|
|
7697
7691
|
}), (t, n) => {
|
|
7698
7692
|
let r = z("el-divider"), i = z("el-space"), s = z("el-input"), l = z("el-tree"), d = z("el-text"), m = z("el-input-tag");
|
|
7699
7693
|
return F(), O(w, null, [
|
|
7700
|
-
j(
|
|
7694
|
+
j(In, {
|
|
7701
7695
|
ref_key: "nodePopoverRef",
|
|
7702
7696
|
ref: b,
|
|
7703
7697
|
placement: "right",
|
|
7704
7698
|
width: "250px"
|
|
7705
7699
|
}, {
|
|
7706
|
-
default: U(({ data: t }) => [j(
|
|
7700
|
+
default: U(({ data: t }) => [j(jr, {
|
|
7707
7701
|
control: V(c).control,
|
|
7708
7702
|
data: t,
|
|
7709
7703
|
field: te.value,
|
|
@@ -7725,7 +7719,7 @@ var sa = {
|
|
|
7725
7719
|
])]),
|
|
7726
7720
|
_: 1
|
|
7727
7721
|
}, 512),
|
|
7728
|
-
j(
|
|
7722
|
+
j(Mr, {
|
|
7729
7723
|
ref: "wrapperRef",
|
|
7730
7724
|
loading: V(f),
|
|
7731
7725
|
ticking: V(p)
|
|
@@ -7747,7 +7741,7 @@ var sa = {
|
|
|
7747
7741
|
})])
|
|
7748
7742
|
]),
|
|
7749
7743
|
_: 3
|
|
7750
|
-
}), j(
|
|
7744
|
+
}), j(Nr, {
|
|
7751
7745
|
unrestricted: e.unrestricted,
|
|
7752
7746
|
collector: V(g),
|
|
7753
7747
|
control: V(c).control,
|
|
@@ -7785,7 +7779,7 @@ var sa = {
|
|
|
7785
7779
|
"check-strictly": !1,
|
|
7786
7780
|
accordion: !1,
|
|
7787
7781
|
"default-expand-all": e.expandAll,
|
|
7788
|
-
"default-expanded-keys": [e.root, ...ie.value],
|
|
7782
|
+
"default-expanded-keys": [e.root || 0, ...ie.value],
|
|
7789
7783
|
props: { class: _e },
|
|
7790
7784
|
onNodeClick: he,
|
|
7791
7785
|
onNodeContextmenu: ge,
|
|
@@ -7797,7 +7791,7 @@ var sa = {
|
|
|
7797
7791
|
"filter-node-method": se
|
|
7798
7792
|
}, {
|
|
7799
7793
|
default: U(({ data: n, node: r }) => [k("div", _a, [j(i, null, {
|
|
7800
|
-
default: U(() => [j(
|
|
7794
|
+
default: U(() => [j(Fn, {
|
|
7801
7795
|
collector: V(g),
|
|
7802
7796
|
data: n,
|
|
7803
7797
|
node: r,
|
|
@@ -7834,7 +7828,7 @@ var sa = {
|
|
|
7834
7828
|
node: r,
|
|
7835
7829
|
data: n
|
|
7836
7830
|
}, void 0, void 0, 1)]),
|
|
7837
|
-
(F(!0), O(w, null, L(V(v), (e) => (F(), E(
|
|
7831
|
+
(F(!0), O(w, null, L(V(v), (e) => (F(), E(Pr, {
|
|
7838
7832
|
data: n,
|
|
7839
7833
|
column: e,
|
|
7840
7834
|
collector: V(g)
|
|
@@ -7843,7 +7837,7 @@ var sa = {
|
|
|
7843
7837
|
"column",
|
|
7844
7838
|
"collector"
|
|
7845
7839
|
]))), 256)),
|
|
7846
|
-
j(
|
|
7840
|
+
j(Fr, {
|
|
7847
7841
|
buttons: e.buttons,
|
|
7848
7842
|
data: n,
|
|
7849
7843
|
collector: V(g),
|
|
@@ -8005,7 +7999,7 @@ var sa = {
|
|
|
8005
7999
|
roles: e.map((e) => e.id)
|
|
8006
8000
|
};
|
|
8007
8001
|
r("valar/view_menu", a).then((e) => {
|
|
8008
|
-
let t =
|
|
8002
|
+
let t = Ur(e);
|
|
8009
8003
|
n.value = t.rootNode.children || [];
|
|
8010
8004
|
});
|
|
8011
8005
|
}, {
|
|
@@ -8018,7 +8012,7 @@ var sa = {
|
|
|
8018
8012
|
props: { account: {} },
|
|
8019
8013
|
emits: ["update:account"],
|
|
8020
8014
|
setup(e, { emit: t }) {
|
|
8021
|
-
let n = W(e, "account", t), { user: r } =
|
|
8015
|
+
let n = W(e, "account", t), { user: r } = Lr(), i = I([]), a = T(() => r.value?.user_entity ? "user__name" : "username"), { manager: o } = Z("valar.Account");
|
|
8022
8016
|
return P(() => {
|
|
8023
8017
|
let e = [
|
|
8024
8018
|
"username",
|
|
@@ -8034,7 +8028,7 @@ var sa = {
|
|
|
8034
8028
|
return a.value === "user__name" && (t.display = e.username), t;
|
|
8035
8029
|
});
|
|
8036
8030
|
});
|
|
8037
|
-
}), (e, t) => (F(), O("div", wa, [j(V(
|
|
8031
|
+
}), (e, t) => (F(), O("div", wa, [j(V(_r), {
|
|
8038
8032
|
modelValue: V(n),
|
|
8039
8033
|
"onUpdate:modelValue": t[0] ||= (e) => N(n) ? n.value = e : null,
|
|
8040
8034
|
options: i.value
|
|
@@ -8458,7 +8452,7 @@ var sa = {
|
|
|
8458
8452
|
}, 8, ["modelValue", "onUpdate:modelValue"])]),
|
|
8459
8453
|
_: 1
|
|
8460
8454
|
}, 512),
|
|
8461
|
-
j(V(
|
|
8455
|
+
j(V(In), {
|
|
8462
8456
|
ref_key: "routePopoverRef",
|
|
8463
8457
|
ref: r
|
|
8464
8458
|
}, {
|
|
@@ -8469,7 +8463,7 @@ var sa = {
|
|
|
8469
8463
|
}, null, 8, ["routes", "menu"])]),
|
|
8470
8464
|
_: 1
|
|
8471
8465
|
}, 512),
|
|
8472
|
-
j(V(
|
|
8466
|
+
j(V(In), {
|
|
8473
8467
|
ref_key: "rolePopoverRef",
|
|
8474
8468
|
ref: i
|
|
8475
8469
|
}, {
|
|
@@ -8485,7 +8479,7 @@ var sa = {
|
|
|
8485
8479
|
}), Na = /* @__PURE__ */ M({
|
|
8486
8480
|
__name: "UserManage",
|
|
8487
8481
|
setup(e) {
|
|
8488
|
-
let { user: t } =
|
|
8482
|
+
let { user: t } = Lr(), n = I(), r = I(), i = T(() => t.value?.user_entity), a = I("auth"), { post: o } = Y();
|
|
8489
8483
|
function s(e) {
|
|
8490
8484
|
o("valar/create_user_account", e).then((e) => {
|
|
8491
8485
|
r.value?.manager.reload();
|
|
@@ -8521,7 +8515,7 @@ var sa = {
|
|
|
8521
8515
|
}), Pa = /* @__PURE__ */ M({
|
|
8522
8516
|
__name: "MSystem",
|
|
8523
8517
|
setup(e) {
|
|
8524
|
-
let t = I(), { account: n, user: r, system: i } =
|
|
8518
|
+
let t = I(), { account: n, user: r, system: i } = Lr();
|
|
8525
8519
|
return (e, a) => {
|
|
8526
8520
|
let o = z("el-tab-pane"), s = z("el-tabs");
|
|
8527
8521
|
return V(n).is_admin ? (F(), E(s, {
|
|
@@ -8868,7 +8862,7 @@ var sa = {
|
|
|
8868
8862
|
//#endregion
|
|
8869
8863
|
//#region morghulis/library/use-auth/index.ts
|
|
8870
8864
|
function Ha() {
|
|
8871
|
-
let { post: e } = Y(), { $confirm: t, $message: n } = J(), { sign_in: r, sign_out: i, token: a, register: o } =
|
|
8865
|
+
let { post: e } = Y(), { $confirm: t, $message: n } = J(), { sign_in: r, sign_out: i, token: a, register: o } = Lr(), { options: s } = Q();
|
|
8872
8866
|
async function c(t) {
|
|
8873
8867
|
try {
|
|
8874
8868
|
let n = await e("/valar/sign", t);
|
|
@@ -8982,7 +8976,7 @@ async function qa(e, t) {
|
|
|
8982
8976
|
let m = r[c] || {};
|
|
8983
8977
|
m[u] = p, r[c] = m;
|
|
8984
8978
|
});
|
|
8985
|
-
let c =
|
|
8979
|
+
let c = pn(s).map((e) => o.map((t) => r[t]?.[e] || null));
|
|
8986
8980
|
return [e, {
|
|
8987
8981
|
data: c,
|
|
8988
8982
|
columns: o,
|
|
@@ -9002,7 +8996,7 @@ var Ja = Kt(() => {
|
|
|
9002
8996
|
}), { post: t, loading: n } = Y();
|
|
9003
8997
|
function r() {
|
|
9004
8998
|
t("valar/load_menu").then((t) => {
|
|
9005
|
-
e.value =
|
|
8999
|
+
e.value = Ur(t);
|
|
9006
9000
|
});
|
|
9007
9001
|
}
|
|
9008
9002
|
return {
|
|
@@ -9253,21 +9247,21 @@ var Qa = { class: "justified" }, $a = {
|
|
|
9253
9247
|
}), no = /* @__PURE__ */ Sn({
|
|
9254
9248
|
DataTable: () => pa,
|
|
9255
9249
|
DataTree: () => va,
|
|
9256
|
-
DataWrapper: () =>
|
|
9250
|
+
DataWrapper: () => Mr,
|
|
9257
9251
|
MButton: () => K,
|
|
9258
|
-
MCell: () =>
|
|
9252
|
+
MCell: () => kr,
|
|
9259
9253
|
MCharts: () => to,
|
|
9260
9254
|
MDialog: () => $,
|
|
9261
9255
|
MForm: () => oi,
|
|
9262
9256
|
MIcon: () => G,
|
|
9263
|
-
MObjectEditor: () =>
|
|
9257
|
+
MObjectEditor: () => Tr,
|
|
9264
9258
|
MOptionContent: () => Dn,
|
|
9265
9259
|
MOptionItem: () => On,
|
|
9266
9260
|
MOptionList: () => kn,
|
|
9267
|
-
MPopover: () =>
|
|
9268
|
-
MRichEditor: () =>
|
|
9261
|
+
MPopover: () => In,
|
|
9262
|
+
MRichEditor: () => Dr,
|
|
9269
9263
|
MText: () => q,
|
|
9270
|
-
MTransferEditor: () =>
|
|
9264
|
+
MTransferEditor: () => _r,
|
|
9271
9265
|
MUploader: () => fa
|
|
9272
9266
|
}), ro = /* @__PURE__ */ M({
|
|
9273
9267
|
__name: "FrameMenu",
|
|
@@ -9426,12 +9420,12 @@ var Qa = { class: "justified" }, $a = {
|
|
|
9426
9420
|
}), oo = /* @__PURE__ */ M({
|
|
9427
9421
|
__name: "ProfileManage",
|
|
9428
9422
|
setup(e, { expose: t }) {
|
|
9429
|
-
let { account: n, user: r } =
|
|
9423
|
+
let { account: n, user: r } = Lr(), { $message: i } = J(), { manager: a } = Z(r.value.user_entity || "valar.Valar"), { post: o } = Y(), s = I(), c = I({}), l = I([]);
|
|
9430
9424
|
P(() => {
|
|
9431
9425
|
o("valar/load_user").then((e) => s.value = e).then(() => a.meta("edit")).then((e) => l.value = e.fields);
|
|
9432
9426
|
});
|
|
9433
9427
|
async function u() {
|
|
9434
|
-
return
|
|
9428
|
+
return cn(c.value) || await a.save_one(c.value), !0;
|
|
9435
9429
|
}
|
|
9436
9430
|
return t({ save: u }), (e, t) => s.value ? (F(), E(V(oi), {
|
|
9437
9431
|
key: 0,
|
|
@@ -9448,10 +9442,10 @@ var Qa = { class: "justified" }, $a = {
|
|
|
9448
9442
|
}), so = { key: 0 }, co = /* @__PURE__ */ M({
|
|
9449
9443
|
__name: "PasswordManage",
|
|
9450
9444
|
setup(e, { expose: t }) {
|
|
9451
|
-
let n = I(), { user: r, account: i } =
|
|
9452
|
-
old_password: "
|
|
9453
|
-
new_password: "
|
|
9454
|
-
$new_password: "
|
|
9445
|
+
let n = I(), { user: r, account: i } = Lr(), a = I({
|
|
9446
|
+
old_password: "",
|
|
9447
|
+
new_password: "",
|
|
9448
|
+
$new_password: ""
|
|
9455
9449
|
}), o = [{
|
|
9456
9450
|
required: !0,
|
|
9457
9451
|
message: "不能为空",
|
|
@@ -9544,14 +9538,14 @@ var Qa = { class: "justified" }, $a = {
|
|
|
9544
9538
|
}), lo = /* @__PURE__ */ M({
|
|
9545
9539
|
__name: "AccountManage",
|
|
9546
9540
|
setup(e, { expose: t }) {
|
|
9547
|
-
let { user: n, account: r } =
|
|
9541
|
+
let { user: n, account: r } = Lr(), { username_label: i } = Q(), { $message: a } = J(), { manager: o } = Z("valar.Account"), s = I(), c = I({}), l = I([]);
|
|
9548
9542
|
P(async () => {
|
|
9549
9543
|
s.value = await o.fetch(r.value.id);
|
|
9550
9544
|
let e = await o.meta("edit");
|
|
9551
9545
|
l.value = e.fields.map((e) => (e.prop === "username" && i.value && (e.label = i.value), e));
|
|
9552
9546
|
});
|
|
9553
9547
|
async function u() {
|
|
9554
|
-
return
|
|
9548
|
+
return cn(c.value) ? (a.warning("还未补充邮箱信息"), !1) : Va.test(c.value.email) ? (await o.save_one(c.value), !0) : (a.warning("邮箱格式错误"), !1);
|
|
9555
9549
|
}
|
|
9556
9550
|
return t({ save: u }), (e, t) => {
|
|
9557
9551
|
let n = z("el-alert");
|
|
@@ -9586,7 +9580,7 @@ var Qa = { class: "justified" }, $a = {
|
|
|
9586
9580
|
}), uo = /* @__PURE__ */ M({
|
|
9587
9581
|
__name: "AuthDropdown",
|
|
9588
9582
|
setup(e) {
|
|
9589
|
-
let { user: t, account: n, sign_in: r } =
|
|
9583
|
+
let { user: t, account: n, sign_in: r } = Lr(), i = I(), a = I(), o = Rt();
|
|
9590
9584
|
function s(e) {
|
|
9591
9585
|
let { component: t, title: n, width: r } = d[e] || {};
|
|
9592
9586
|
t && (o.value = t, i.value?.open({ key: e }, {
|
|
@@ -9701,7 +9695,7 @@ var Qa = { class: "justified" }, $a = {
|
|
|
9701
9695
|
}), fo = /* @__PURE__ */ M({
|
|
9702
9696
|
__name: "FrameAuth",
|
|
9703
9697
|
setup(e) {
|
|
9704
|
-
let t = I(), n = I(), r = I(), { account: i, is_login: a } =
|
|
9698
|
+
let t = I(), n = I(), r = I(), { account: i, is_login: a } = Lr(), { sign: o, exit: s } = Ha();
|
|
9705
9699
|
function c() {
|
|
9706
9700
|
t.value?.open();
|
|
9707
9701
|
}
|
|
@@ -9961,7 +9955,7 @@ var Qa = { class: "justified" }, $a = {
|
|
|
9961
9955
|
}), [["__scopeId", "data-v-1b59bf74"]]), _o = /* @__PURE__ */ M({
|
|
9962
9956
|
__name: "MApp",
|
|
9963
9957
|
setup(e) {
|
|
9964
|
-
let { title: t } = Q(), { open: n, status: r } =
|
|
9958
|
+
let { title: t } = Q(), { open: n, status: r } = Br();
|
|
9965
9959
|
return (e, i) => {
|
|
9966
9960
|
let a = z("el-text"), o = z("el-result"), s = z("el-button");
|
|
9967
9961
|
return V(r).code === 200 ? (F(), E(go, { key: 0 }, {
|
|
@@ -10026,4 +10020,4 @@ var Qa = { class: "justified" }, $a = {
|
|
|
10026
10020
|
});
|
|
10027
10021
|
} });
|
|
10028
10022
|
//#endregion
|
|
10029
|
-
export { pa as DataTable, va as DataTree,
|
|
10023
|
+
export { pa as DataTable, va as DataTree, Mr as DataWrapper, _o as MApp, K as MButton, kr as MCell, to as MCharts, $ as MDialog, oi as MForm, G as MIcon, Tr as MObjectEditor, Dn as MOptionContent, On as MOptionItem, kn as MOptionList, In as MPopover, Dr as MRichEditor, q as MText, _r as MTransferEditor, fa as MUploader, yo as createMorghulis, yo as default, Ha as useAuth, Hr as useChannel, Ir as useChannelContainer, Z as useDao, Ga as useData, Ka as useExcel, J as useFeedback, Za as useFrameSize, Ja as useMenu, Wr as useMetaQuery, Q as useOptionState, ci as usePagination, Xi as usePaster, Xa as usePluginButton, Ya as usePluginColumn, Y as useRequest, Br as useSocket, Vr as useSocketCallback, Lr as useUserState, Kr as useValar };
|