@chase-shao/vue-component-lib 1.2.85 → 1.2.86
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.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.es.js +349 -349
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as m, getCurrentInstance as pe, defineComponent as E, mergeModels as ce, useModel as ye, resolveComponent as
|
|
1
|
+
import { ref as m, getCurrentInstance as pe, defineComponent as E, mergeModels as ce, useModel as ye, resolveComponent as C, createBlock as F, openBlock as d, onMounted as ue, computed as G, withCtx as y, createElementBlock as w, Fragment as O, renderList as W, createVNode as B, nextTick as lt, createTextVNode as re, inject as me, normalizeStyle as qe, normalizeClass as Ye, createElementVNode as k, useTemplateRef as Fe, createCommentVNode as ne, toDisplayString as Z, resolveDynamicComponent as He, renderSlot as de, reactive as ct, onActivated as dt } from "vue";
|
|
2
2
|
import ut from "axios";
|
|
3
3
|
import { defineStore as ft } from "pinia";
|
|
4
4
|
import { Modal as pt } from "@arco-design/web-vue";
|
|
@@ -358,18 +358,18 @@ const ge = (t, n) => {
|
|
|
358
358
|
}),
|
|
359
359
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
360
360
|
setup(t, { expose: n, emit: a }) {
|
|
361
|
-
const e = t, o = a, l = ye(t, "modelValue"), s = (
|
|
362
|
-
o("input",
|
|
363
|
-
}, i = (
|
|
364
|
-
const g = s(
|
|
361
|
+
const e = t, o = a, l = ye(t, "modelValue"), s = (u) => ge(e.validations, u), c = (u) => {
|
|
362
|
+
o("input", u);
|
|
363
|
+
}, i = (u) => {
|
|
364
|
+
const g = s(u);
|
|
365
365
|
o("error", g.res ? "" : g.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((_) => {
|
|
366
|
-
_.event === "change" && o(_.event, _.handlerName,
|
|
366
|
+
_.event === "change" && o(_.event, _.handlerName, u);
|
|
367
367
|
});
|
|
368
368
|
};
|
|
369
369
|
n({
|
|
370
370
|
validate() {
|
|
371
|
-
const
|
|
372
|
-
return o("error",
|
|
371
|
+
const u = s(e.modelValue);
|
|
372
|
+
return o("error", u.res ? "" : u.errorMessages), u.res;
|
|
373
373
|
}
|
|
374
374
|
});
|
|
375
375
|
const r = { props: e, emits: o, model: l, validate: s, inputHandler: c, changeHandler: i };
|
|
@@ -382,8 +382,8 @@ const ge = (t, n) => {
|
|
|
382
382
|
return a;
|
|
383
383
|
};
|
|
384
384
|
function Xt(t, n, a, e, o, l) {
|
|
385
|
-
const s =
|
|
386
|
-
return
|
|
385
|
+
const s = C("AInput");
|
|
386
|
+
return d(), F(s, {
|
|
387
387
|
modelValue: e.model,
|
|
388
388
|
"onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
|
|
389
389
|
"allow-clear": "",
|
|
@@ -415,10 +415,10 @@ const Ke = /* @__PURE__ */ Q(Jt, [["render", Xt], ["__file", "InputText.vue"]]),
|
|
|
415
415
|
});
|
|
416
416
|
const i = (_) => ge(e.validations, _), r = (_) => {
|
|
417
417
|
o("input", _);
|
|
418
|
-
},
|
|
419
|
-
const
|
|
420
|
-
o("error",
|
|
421
|
-
|
|
418
|
+
}, u = (_) => {
|
|
419
|
+
const S = i(_);
|
|
420
|
+
o("error", S.res ? "" : S.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((f) => {
|
|
421
|
+
f.event === "change" && o(f.event, f.handlerName, _);
|
|
422
422
|
});
|
|
423
423
|
};
|
|
424
424
|
n({
|
|
@@ -427,13 +427,13 @@ const Ke = /* @__PURE__ */ Q(Jt, [["render", Xt], ["__file", "InputText.vue"]]),
|
|
|
427
427
|
return o("error", _.res ? "" : _.errorMessages), _.res;
|
|
428
428
|
}
|
|
429
429
|
});
|
|
430
|
-
const g = { props: e, emits: o, model: l, max: s, min: c, validate: i, inputHandler: r, changeHandler:
|
|
430
|
+
const g = { props: e, emits: o, model: l, max: s, min: c, validate: i, inputHandler: r, changeHandler: u };
|
|
431
431
|
return Object.defineProperty(g, "__isScriptSetup", { enumerable: !1, value: !0 }), g;
|
|
432
432
|
}
|
|
433
433
|
});
|
|
434
434
|
function en(t, n, a, e, o, l) {
|
|
435
|
-
const s =
|
|
436
|
-
return
|
|
435
|
+
const s = C("AInputNumber");
|
|
436
|
+
return d(), F(s, {
|
|
437
437
|
modelValue: e.model,
|
|
438
438
|
"onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
|
|
439
439
|
clearable: "",
|
|
@@ -458,39 +458,39 @@ const tn = /* @__PURE__ */ Q(Zt, [["render", en], ["__file", "InputNumber.vue"]]
|
|
|
458
458
|
}),
|
|
459
459
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change"], ["update:modelValue"]),
|
|
460
460
|
setup(t, { expose: n, emit: a }) {
|
|
461
|
-
const e = t, o = a, l = m(!1), s = m(e.config.options ?? []), c = ye(t, "modelValue"), i = (
|
|
462
|
-
const
|
|
463
|
-
return e.triggers && e.triggers.length > 0 && e.triggers.forEach((
|
|
464
|
-
|
|
465
|
-
o(
|
|
466
|
-
const
|
|
467
|
-
o("error",
|
|
461
|
+
const e = t, o = a, l = m(!1), s = m(e.config.options ?? []), c = ye(t, "modelValue"), i = (S) => ge(e.validations, S), r = G(() => {
|
|
462
|
+
const S = {};
|
|
463
|
+
return e.triggers && e.triggers.length > 0 && e.triggers.forEach((f) => {
|
|
464
|
+
S[f.event] = (p) => {
|
|
465
|
+
o(f.event, f.handlerName, p);
|
|
466
|
+
const V = i(p);
|
|
467
|
+
o("error", V.res ? "" : V.errorMessages);
|
|
468
468
|
};
|
|
469
|
-
}),
|
|
470
|
-
}),
|
|
469
|
+
}), S;
|
|
470
|
+
}), u = async () => {
|
|
471
471
|
e.config.dataSourceProvider && (s.value = await Lt(e.config.dataSourceProvider));
|
|
472
472
|
};
|
|
473
|
-
ue(
|
|
474
|
-
const g = (
|
|
475
|
-
o("update:modelValue",
|
|
476
|
-
const
|
|
477
|
-
o("error",
|
|
478
|
-
p.event === "change" && o(p.event, p.handlerName,
|
|
473
|
+
ue(u);
|
|
474
|
+
const g = (S) => {
|
|
475
|
+
o("update:modelValue", S);
|
|
476
|
+
const f = i(S);
|
|
477
|
+
o("error", f.res ? "" : f.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((p) => {
|
|
478
|
+
p.event === "change" && o(p.event, p.handlerName, S);
|
|
479
479
|
});
|
|
480
480
|
};
|
|
481
481
|
n({
|
|
482
482
|
validate() {
|
|
483
|
-
const
|
|
484
|
-
return o("error",
|
|
483
|
+
const S = i(e.modelValue);
|
|
484
|
+
return o("error", S.res ? "" : S.errorMessages), S.res;
|
|
485
485
|
}
|
|
486
486
|
});
|
|
487
|
-
const _ = { props: e, emits: o, loading: l, _options: s, model: c, validate: i, eventHandlers: r, loadOptions:
|
|
487
|
+
const _ = { props: e, emits: o, loading: l, _options: s, model: c, validate: i, eventHandlers: r, loadOptions: u, changeHandler: g };
|
|
488
488
|
return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
|
|
489
489
|
}
|
|
490
490
|
});
|
|
491
491
|
function on(t, n, a, e, o, l) {
|
|
492
|
-
const s =
|
|
493
|
-
return
|
|
492
|
+
const s = C("AOption"), c = C("ASelect");
|
|
493
|
+
return d(), F(c, {
|
|
494
494
|
"allow-clear": "",
|
|
495
495
|
modelValue: e.model,
|
|
496
496
|
"onUpdate:modelValue": n[0] || (n[0] = (i) => e.model = i),
|
|
@@ -500,8 +500,8 @@ function on(t, n, a, e, o, l) {
|
|
|
500
500
|
disabled: e.props.config.readonly,
|
|
501
501
|
onChange: e.changeHandler
|
|
502
502
|
}, {
|
|
503
|
-
default:
|
|
504
|
-
(
|
|
503
|
+
default: y(() => [
|
|
504
|
+
(d(!0), w(O, null, W(e._options, (i) => (d(), F(s, {
|
|
505
505
|
key: i.value,
|
|
506
506
|
value: i.value,
|
|
507
507
|
label: i.label
|
|
@@ -541,12 +541,12 @@ const We = /* @__PURE__ */ Q(nn, [["render", on], ["__file", "SelectList.vue"]])
|
|
|
541
541
|
}
|
|
542
542
|
});
|
|
543
543
|
function rn(t, n, a, e, o, l) {
|
|
544
|
-
const s =
|
|
545
|
-
return
|
|
544
|
+
const s = C("ACascader"), c = C("ASpace");
|
|
545
|
+
return d(), F(c, {
|
|
546
546
|
direction: "vertical",
|
|
547
547
|
size: "large"
|
|
548
548
|
}, {
|
|
549
|
-
default:
|
|
549
|
+
default: y(() => [
|
|
550
550
|
B(s, {
|
|
551
551
|
"field-names": e.fieldNames,
|
|
552
552
|
"model-value": a.modelValue,
|
|
@@ -574,66 +574,66 @@ const sn = /* @__PURE__ */ Q(an, [["render", rn], ["__file", "Cascader.vue"]]),
|
|
|
574
574
|
setup(t, { expose: n, emit: a }) {
|
|
575
575
|
const e = t, o = a, l = m({});
|
|
576
576
|
ue(async () => {
|
|
577
|
-
const
|
|
577
|
+
const x = await Xe();
|
|
578
578
|
l.value = {
|
|
579
|
-
Authorization: `Bearer ${
|
|
579
|
+
Authorization: `Bearer ${x}`
|
|
580
580
|
};
|
|
581
581
|
});
|
|
582
|
-
const s = (
|
|
583
|
-
function g(
|
|
584
|
-
return
|
|
582
|
+
const s = (x) => ge(e.validations, x), c = Le(), i = c.apiBase, r = m(null), u = m("");
|
|
583
|
+
function g(x, b, h) {
|
|
584
|
+
return x.replace(/{WorkflowId}/g, b).replace(/{ClassName}/g, h);
|
|
585
585
|
}
|
|
586
|
-
const _ =
|
|
586
|
+
const _ = G(() => {
|
|
587
587
|
if (e.config.uploadURL) {
|
|
588
|
-
const
|
|
589
|
-
return g(
|
|
588
|
+
const x = i + e.config.uploadURL;
|
|
589
|
+
return g(x, u.value, e.className);
|
|
590
590
|
}
|
|
591
591
|
return "";
|
|
592
|
-
}),
|
|
593
|
-
|
|
592
|
+
}), S = (x) => {
|
|
593
|
+
x.stopPropagation(), r.value.submit();
|
|
594
594
|
};
|
|
595
|
-
function
|
|
596
|
-
const { file: b, name: h } =
|
|
597
|
-
return new Promise((
|
|
595
|
+
function f(x) {
|
|
596
|
+
const { file: b, name: h } = x, I = h ?? b.name;
|
|
597
|
+
return new Promise((A, U) => {
|
|
598
598
|
pt.confirm({
|
|
599
599
|
title: "Confirm Delete",
|
|
600
600
|
content: `Are you sure you want to delete ${I}?`,
|
|
601
601
|
async onOk() {
|
|
602
|
-
if (
|
|
603
|
-
return await e.config.removeFile(
|
|
604
|
-
|
|
602
|
+
if (x.status !== "init" && e.config.removeFile)
|
|
603
|
+
return await e.config.removeFile(x.uid), A(!0);
|
|
604
|
+
A(!0);
|
|
605
605
|
},
|
|
606
606
|
onCancel: () => U("cancel")
|
|
607
607
|
});
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
|
-
const p = m(null),
|
|
611
|
-
p.value && (p.value(
|
|
612
|
-
},
|
|
613
|
-
|
|
614
|
-
}, $ = m([]), X = (
|
|
615
|
-
$.value =
|
|
610
|
+
const p = m(null), V = m(null), J = (x) => {
|
|
611
|
+
p.value && (p.value(x), p.value = null, V.value = null);
|
|
612
|
+
}, ee = (x) => {
|
|
613
|
+
V.value && (V.value(x), p.value = null, V.value = null);
|
|
614
|
+
}, $ = m([]), X = (x) => {
|
|
615
|
+
$.value = x.filter((b) => b.status === "init");
|
|
616
616
|
};
|
|
617
617
|
n({
|
|
618
|
-
submit(
|
|
618
|
+
submit(x) {
|
|
619
619
|
return new Promise((b, h) => {
|
|
620
|
-
r.value ? (e.config.uploadURL && (
|
|
620
|
+
r.value ? (e.config.uploadURL && (u.value = x), p.value = b, V.value = h, $.value.length ? lt(() => {
|
|
621
621
|
r.value?.submit();
|
|
622
|
-
}) : b(
|
|
622
|
+
}) : b(x)) : b(x);
|
|
623
623
|
});
|
|
624
624
|
},
|
|
625
625
|
validate() {
|
|
626
|
-
const
|
|
626
|
+
const x = e.config.files ?? [], b = [...$.value, ...x].length > 0 ? "hasFile" : "", h = s(b);
|
|
627
627
|
return o("error", h.res ? "" : h.errorMessages), h.res;
|
|
628
628
|
}
|
|
629
629
|
});
|
|
630
|
-
const oe = { props: e, emits: o, headers: l, validate: s, config: c, ApiBase: i, uploadRef: r, id:
|
|
630
|
+
const oe = { props: e, emits: o, headers: l, validate: s, config: c, ApiBase: i, uploadRef: r, id: u, replaceIdAndClassName: g, action: _, submit: S, onBeforeRemove: f, uploadPromiseResolve: p, uploadPromiseReject: V, handleUploadSuccess: J, handleUploadError: ee, readyFiles: $, onChange: X };
|
|
631
631
|
return Object.defineProperty(oe, "__isScriptSetup", { enumerable: !1, value: !0 }), oe;
|
|
632
632
|
}
|
|
633
633
|
});
|
|
634
634
|
function cn(t, n, a, e, o, l) {
|
|
635
|
-
const s =
|
|
636
|
-
return
|
|
635
|
+
const s = C("a-button"), c = C("a-upload");
|
|
636
|
+
return d(), F(c, {
|
|
637
637
|
ref: "uploadRef",
|
|
638
638
|
"default-file-list": e.props.config.files,
|
|
639
639
|
action: e.action,
|
|
@@ -646,10 +646,10 @@ function cn(t, n, a, e, o, l) {
|
|
|
646
646
|
onSuccess: e.handleUploadSuccess,
|
|
647
647
|
onError: e.handleUploadError
|
|
648
648
|
}, {
|
|
649
|
-
"start-icon":
|
|
650
|
-
"upload-button":
|
|
649
|
+
"start-icon": y(() => n[0] || (n[0] = [])),
|
|
650
|
+
"upload-button": y(() => [
|
|
651
651
|
B(s, { type: "primary" }, {
|
|
652
|
-
default:
|
|
652
|
+
default: y(() => n[1] || (n[1] = [
|
|
653
653
|
re("Select File", -1)
|
|
654
654
|
])),
|
|
655
655
|
_: 1,
|
|
@@ -675,8 +675,8 @@ const dn = /* @__PURE__ */ Q(ln, [["render", cn], ["__file", "FileUpload.vue"]])
|
|
|
675
675
|
o("update:modelValue", r), o("input", r);
|
|
676
676
|
}, c = (r) => {
|
|
677
677
|
o("update:modelValue", r);
|
|
678
|
-
const
|
|
679
|
-
o("error",
|
|
678
|
+
const u = l(r);
|
|
679
|
+
o("error", u.res ? "" : u.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((g) => {
|
|
680
680
|
g.event === "change" && o(g.event, g.handlerName, r);
|
|
681
681
|
});
|
|
682
682
|
};
|
|
@@ -691,8 +691,8 @@ const dn = /* @__PURE__ */ Q(ln, [["render", cn], ["__file", "FileUpload.vue"]])
|
|
|
691
691
|
}
|
|
692
692
|
});
|
|
693
693
|
function fn(t, n, a, e, o, l) {
|
|
694
|
-
const s =
|
|
695
|
-
return
|
|
694
|
+
const s = C("ATextarea");
|
|
695
|
+
return d(), F(s, {
|
|
696
696
|
"model-value": e.props.modelValue,
|
|
697
697
|
placeholder: "Please enter something",
|
|
698
698
|
"allow-clear": "",
|
|
@@ -717,8 +717,8 @@ const pn = /* @__PURE__ */ Q(un, [["render", fn], ["__file", "TextArea.vue"]]),
|
|
|
717
717
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
718
718
|
setup(t, { expose: n, emit: a }) {
|
|
719
719
|
const e = t, o = a, l = ye(t, "modelValue"), s = (r) => ge(e.validations, r), c = (r) => {
|
|
720
|
-
const
|
|
721
|
-
o("error",
|
|
720
|
+
const u = s(r);
|
|
721
|
+
o("error", u.res ? "" : u.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((g) => {
|
|
722
722
|
g.event === "change" && o(g.event, g.handlerName, r);
|
|
723
723
|
});
|
|
724
724
|
};
|
|
@@ -733,15 +733,15 @@ const pn = /* @__PURE__ */ Q(un, [["render", fn], ["__file", "TextArea.vue"]]),
|
|
|
733
733
|
}
|
|
734
734
|
});
|
|
735
735
|
function gn(t, n, a, e, o, l) {
|
|
736
|
-
const s =
|
|
737
|
-
return
|
|
736
|
+
const s = C("ACheckbox");
|
|
737
|
+
return d(), F(s, {
|
|
738
738
|
modelValue: e.model,
|
|
739
739
|
"onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
|
|
740
740
|
clearable: "",
|
|
741
741
|
disabled: e.props.readonly || e.props.config.Readonly,
|
|
742
742
|
onChange: e.changeHandler
|
|
743
743
|
}, {
|
|
744
|
-
default:
|
|
744
|
+
default: y(() => n[1] || (n[1] = [
|
|
745
745
|
re("Yes", -1)
|
|
746
746
|
])),
|
|
747
747
|
_: 1,
|
|
@@ -788,7 +788,7 @@ const wn = E({
|
|
|
788
788
|
click: (t) => !0
|
|
789
789
|
},
|
|
790
790
|
setup(t, { emit: n }) {
|
|
791
|
-
const a = et("icon"), e =
|
|
791
|
+
const a = et("icon"), e = G(() => [a, `${a}-question-circle`, { [`${a}-spin`]: t.spin }]), o = G(() => {
|
|
792
792
|
const s = {};
|
|
793
793
|
return t.size && (s.fontSize = tt(t.size) ? `${t.size}px` : t.size), t.rotate && (s.transform = `rotate(${t.rotate}deg)`), s;
|
|
794
794
|
});
|
|
@@ -802,7 +802,7 @@ const wn = E({
|
|
|
802
802
|
}
|
|
803
803
|
}), kn = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
804
804
|
function Cn(t, n, a, e, o, l) {
|
|
805
|
-
return
|
|
805
|
+
return d(), w("svg", {
|
|
806
806
|
viewBox: "0 0 48 48",
|
|
807
807
|
fill: "none",
|
|
808
808
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -814,8 +814,8 @@ function Cn(t, n, a, e, o, l) {
|
|
|
814
814
|
"stroke-linejoin": t.strokeLinejoin,
|
|
815
815
|
onClick: n[0] || (n[0] = (...s) => t.onClick && t.onClick(...s))
|
|
816
816
|
}, n[1] || (n[1] = [
|
|
817
|
-
|
|
818
|
-
|
|
817
|
+
k("path", { d: "M42 24c0 9.941-8.059 18-18 18S6 33.941 6 24 14.059 6 24 6s18 8.059 18 18Z" }, null, -1),
|
|
818
|
+
k("path", { d: "M24.006 31v4.008m0-6.008L24 28c0-3 3-4 4.78-6.402C30.558 19.195 28.288 15 23.987 15c-4.014 0-5.382 2.548-5.388 4.514v.465" }, null, -1)
|
|
819
819
|
]), 14, kn);
|
|
820
820
|
}
|
|
821
821
|
var Ue = /* @__PURE__ */ nt(wn, [["render", Cn]]);
|
|
@@ -852,7 +852,7 @@ const Sn = Object.assign(Ue, {
|
|
|
852
852
|
click: (t) => !0
|
|
853
853
|
},
|
|
854
854
|
setup(t, { emit: n }) {
|
|
855
|
-
const a = et("icon"), e =
|
|
855
|
+
const a = et("icon"), e = G(() => [a, `${a}-download`, { [`${a}-spin`]: t.spin }]), o = G(() => {
|
|
856
856
|
const s = {};
|
|
857
857
|
return t.size && (s.fontSize = tt(t.size) ? `${t.size}px` : t.size), t.rotate && (s.transform = `rotate(${t.rotate}deg)`), s;
|
|
858
858
|
});
|
|
@@ -866,7 +866,7 @@ const Sn = Object.assign(Ue, {
|
|
|
866
866
|
}
|
|
867
867
|
}), An = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
868
868
|
function Vn(t, n, a, e, o, l) {
|
|
869
|
-
return
|
|
869
|
+
return d(), w("svg", {
|
|
870
870
|
viewBox: "0 0 48 48",
|
|
871
871
|
fill: "none",
|
|
872
872
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -878,7 +878,7 @@ function Vn(t, n, a, e, o, l) {
|
|
|
878
878
|
"stroke-linejoin": t.strokeLinejoin,
|
|
879
879
|
onClick: n[0] || (n[0] = (...s) => t.onClick && t.onClick(...s))
|
|
880
880
|
}, n[1] || (n[1] = [
|
|
881
|
-
|
|
881
|
+
k("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
|
|
882
882
|
]), 14, An);
|
|
883
883
|
}
|
|
884
884
|
var De = /* @__PURE__ */ nt(xn, [["render", Vn]]);
|
|
@@ -904,7 +904,7 @@ const In = Object.assign(De, {
|
|
|
904
904
|
}),
|
|
905
905
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error"], ["update:modelValue"]),
|
|
906
906
|
setup(t, { expose: n, emit: a }) {
|
|
907
|
-
const e = t, o = a, l = ye(t, "modelValue"), s = Fe("widgetRef"), c =
|
|
907
|
+
const e = t, o = a, l = ye(t, "modelValue"), s = Fe("widgetRef"), c = G(() => {
|
|
908
908
|
switch (e.config?.widget?.widget) {
|
|
909
909
|
case "TextBox":
|
|
910
910
|
return Ke;
|
|
@@ -925,23 +925,23 @@ const In = Object.assign(De, {
|
|
|
925
925
|
default:
|
|
926
926
|
return Ke;
|
|
927
927
|
}
|
|
928
|
-
}), i = m(""), r = (
|
|
929
|
-
i.value =
|
|
930
|
-
},
|
|
931
|
-
o("change",
|
|
928
|
+
}), i = m(""), r = (f) => {
|
|
929
|
+
i.value = f;
|
|
930
|
+
}, u = (f, p) => {
|
|
931
|
+
o("change", f, p);
|
|
932
932
|
};
|
|
933
933
|
function g() {
|
|
934
934
|
return e.config?.widget?.widget === "File";
|
|
935
935
|
}
|
|
936
|
-
function _(
|
|
937
|
-
return
|
|
936
|
+
function _(f) {
|
|
937
|
+
return f === "OtherInformationText" ? "Other Information" : f === "Other Information" ? "" : f;
|
|
938
938
|
}
|
|
939
939
|
n({
|
|
940
940
|
isFileUpload() {
|
|
941
941
|
return e.config?.widget?.widget === "File";
|
|
942
942
|
},
|
|
943
|
-
submit(
|
|
944
|
-
return g() ? s.value.submit(
|
|
943
|
+
submit(f) {
|
|
944
|
+
return g() ? s.value.submit(f) : Promise.resolve(f);
|
|
945
945
|
},
|
|
946
946
|
validate() {
|
|
947
947
|
return s.value?.validate();
|
|
@@ -950,10 +950,10 @@ const In = Object.assign(De, {
|
|
|
950
950
|
return e?.config?.widget?.title;
|
|
951
951
|
}
|
|
952
952
|
});
|
|
953
|
-
const
|
|
953
|
+
const S = { props: e, emits: o, model: l, widgetRef: s, curComp: c, errMsg: i, errHandler: r, changeHandler: u, isFileUpload: g, formatTitle: _, get IconQuestionCircle() {
|
|
954
954
|
return Sn;
|
|
955
955
|
} };
|
|
956
|
-
return Object.defineProperty(
|
|
956
|
+
return Object.defineProperty(S, "__isScriptSetup", { enumerable: !1, value: !0 }), S;
|
|
957
957
|
}
|
|
958
958
|
}), Pn = { class: "title" }, Nn = {
|
|
959
959
|
key: 0,
|
|
@@ -963,23 +963,23 @@ const In = Object.assign(De, {
|
|
|
963
963
|
class: "err-msg"
|
|
964
964
|
};
|
|
965
965
|
function Dn(t, n, a, e, o, l) {
|
|
966
|
-
const s =
|
|
967
|
-
return
|
|
968
|
-
|
|
969
|
-
re(
|
|
970
|
-
e.props.config.validations.length ? (
|
|
971
|
-
e.props.config.widget.isVisible ? (
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
default:
|
|
966
|
+
const s = C("a-tooltip");
|
|
967
|
+
return d(), w("div", null, [
|
|
968
|
+
k("div", Pn, [
|
|
969
|
+
re(Z(e.formatTitle(e.props?.config?.widget?.title)) + " ", 1),
|
|
970
|
+
e.props.config.validations.length ? (d(), w("span", Nn, "*")) : ne("", !0),
|
|
971
|
+
e.props.config.widget.isVisible ? (d(), F(s, { key: 1 }, {
|
|
972
|
+
content: y(() => [
|
|
973
|
+
(d(!0), w(O, null, W(e.props.config.widget.outputText, (c) => (d(), w("div", null, Z(c), 1))), 256))
|
|
974
|
+
]),
|
|
975
|
+
default: y(() => [
|
|
976
976
|
B(e.IconQuestionCircle, { class: "icon" })
|
|
977
977
|
]),
|
|
978
978
|
_: 1
|
|
979
|
-
}
|
|
979
|
+
})) : ne("", !0)
|
|
980
980
|
]),
|
|
981
|
-
|
|
982
|
-
(
|
|
981
|
+
k("div", null, [
|
|
982
|
+
(d(), F(He(e.curComp), {
|
|
983
983
|
ref: "widgetRef",
|
|
984
984
|
modelValue: e.model,
|
|
985
985
|
"onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
|
|
@@ -991,11 +991,11 @@ function Dn(t, n, a, e, o, l) {
|
|
|
991
991
|
onError: e.errHandler,
|
|
992
992
|
onChange: e.changeHandler
|
|
993
993
|
}, null, 40, ["modelValue", "field-key", "config", "validations", "triggers", "class-name"])),
|
|
994
|
-
e.errMsg.length > 0 ? (
|
|
994
|
+
e.errMsg.length > 0 ? (d(), w("div", Un, Z(e.errMsg), 1)) : ne("", !0)
|
|
995
995
|
])
|
|
996
996
|
]);
|
|
997
997
|
}
|
|
998
|
-
const je = /* @__PURE__ */ Q(Tn, [["render", Dn], ["__scopeId", "data-v-
|
|
998
|
+
const je = /* @__PURE__ */ Q(Tn, [["render", Dn], ["__scopeId", "data-v-03fe127c"], ["__file", "index.vue"]]), Bn = /* @__PURE__ */ E({
|
|
999
999
|
__name: "SubmitButton",
|
|
1000
1000
|
props: {
|
|
1001
1001
|
url: {},
|
|
@@ -1014,13 +1014,13 @@ const je = /* @__PURE__ */ Q(Tn, [["render", Dn], ["__scopeId", "data-v-08801578
|
|
|
1014
1014
|
}
|
|
1015
1015
|
});
|
|
1016
1016
|
function Fn(t, n, a, e, o, l) {
|
|
1017
|
-
const s =
|
|
1018
|
-
return
|
|
1017
|
+
const s = C("AButton");
|
|
1018
|
+
return d(), F(s, {
|
|
1019
1019
|
loading: a.loading,
|
|
1020
1020
|
type: "primary",
|
|
1021
1021
|
onClick: e.clickHandler
|
|
1022
1022
|
}, {
|
|
1023
|
-
default:
|
|
1023
|
+
default: y(() => [
|
|
1024
1024
|
de(t.$slots, "default")
|
|
1025
1025
|
]),
|
|
1026
1026
|
_: 3
|
|
@@ -1045,9 +1045,9 @@ const Ge = /* @__PURE__ */ Q(Bn, [["render", Fn], ["__file", "SubmitButton.vue"]
|
|
|
1045
1045
|
}
|
|
1046
1046
|
});
|
|
1047
1047
|
function Ln(t, n, a, e, o, l) {
|
|
1048
|
-
const s =
|
|
1049
|
-
return
|
|
1050
|
-
default:
|
|
1048
|
+
const s = C("ALink");
|
|
1049
|
+
return d(), F(s, { onClick: e.clickHandler }, {
|
|
1050
|
+
default: y(() => [
|
|
1051
1051
|
de(t.$slots, "default")
|
|
1052
1052
|
]),
|
|
1053
1053
|
_: 3
|
|
@@ -1063,10 +1063,10 @@ const Rn = /* @__PURE__ */ Q(Hn, [["render", Ln], ["__file", "DetailLink.vue"]])
|
|
|
1063
1063
|
setup(t, { expose: n, emit: a }) {
|
|
1064
1064
|
n();
|
|
1065
1065
|
const e = t, o = a;
|
|
1066
|
-
function l(
|
|
1067
|
-
o("click", e.config.widget,
|
|
1066
|
+
function l(u, g) {
|
|
1067
|
+
o("click", e.config.widget, u, g, e.config.title);
|
|
1068
1068
|
}
|
|
1069
|
-
const s =
|
|
1069
|
+
const s = G(() => {
|
|
1070
1070
|
switch (e.config.location) {
|
|
1071
1071
|
case "InOperation":
|
|
1072
1072
|
return Ge;
|
|
@@ -1075,19 +1075,19 @@ const Rn = /* @__PURE__ */ Q(Hn, [["render", Ln], ["__file", "DetailLink.vue"]])
|
|
|
1075
1075
|
default:
|
|
1076
1076
|
return Ge;
|
|
1077
1077
|
}
|
|
1078
|
-
}), c =
|
|
1078
|
+
}), c = G(() => e.config.widget === Y.Submit ? e.config.requestUrl ?? "" : e.config.widget === Y.Link ? e.config.redirectUrl ?? "" : ""), i = G(() => e.config.redirectType ?? "Details"), r = { props: e, emits: o, clickHandler: l, curComp: s, curUrl: c, redirectType: i };
|
|
1079
1079
|
return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
|
|
1080
1080
|
}
|
|
1081
1081
|
});
|
|
1082
1082
|
function $n(t, n, a, e, o, l) {
|
|
1083
|
-
return
|
|
1083
|
+
return d(), F(He(e.curComp), {
|
|
1084
1084
|
url: e.curUrl,
|
|
1085
1085
|
"redirect-type": e.redirectType,
|
|
1086
1086
|
loading: a.loading,
|
|
1087
1087
|
onClick: e.clickHandler
|
|
1088
1088
|
}, {
|
|
1089
|
-
default:
|
|
1090
|
-
re(
|
|
1089
|
+
default: y(() => [
|
|
1090
|
+
re(Z(e.props.config.title), 1)
|
|
1091
1091
|
]),
|
|
1092
1092
|
_: 1
|
|
1093
1093
|
}, 8, ["url", "redirect-type", "loading"]);
|
|
@@ -1123,25 +1123,25 @@ const Mn = /* @__PURE__ */ E({
|
|
|
1123
1123
|
}
|
|
1124
1124
|
}), En = { class: "top-bar" }, zn = { class: "banner-info" }, Kn = { class: "page-title" }, Wn = { class: "page-subtitle" }, Gn = { class: "avatar-wrapper" }, qn = { class: "user-email" };
|
|
1125
1125
|
function Yn(t, n, a, e, o, l) {
|
|
1126
|
-
const s =
|
|
1127
|
-
return
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1126
|
+
const s = C("a-avatar"), c = C("a-popover");
|
|
1127
|
+
return d(), w("div", En, [
|
|
1128
|
+
k("div", zn, [
|
|
1129
|
+
k("div", Kn, Z(a.title), 1),
|
|
1130
|
+
k("div", Wn, Z(a.subTitle), 1)
|
|
1131
1131
|
]),
|
|
1132
|
-
|
|
1132
|
+
k("div", Gn, [
|
|
1133
1133
|
B(c, { trigger: "click" }, {
|
|
1134
|
-
content:
|
|
1135
|
-
|
|
1134
|
+
content: y(() => [
|
|
1135
|
+
k("div", qn, Z(a.email), 1)
|
|
1136
1136
|
]),
|
|
1137
|
-
default:
|
|
1137
|
+
default: y(() => [
|
|
1138
1138
|
B(s, {
|
|
1139
1139
|
size: 48,
|
|
1140
1140
|
autoFixFontSize: "",
|
|
1141
1141
|
style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
|
|
1142
1142
|
}, {
|
|
1143
|
-
default:
|
|
1144
|
-
re(
|
|
1143
|
+
default: y(() => [
|
|
1144
|
+
re(Z(a.email.charAt(0).toUpperCase()), 1)
|
|
1145
1145
|
]),
|
|
1146
1146
|
_: 1
|
|
1147
1147
|
})
|
|
@@ -1251,56 +1251,56 @@ const Qn = /* @__PURE__ */ E({
|
|
|
1251
1251
|
title: "",
|
|
1252
1252
|
subTitle: ""
|
|
1253
1253
|
}
|
|
1254
|
-
}),
|
|
1254
|
+
}), u = m([]), g = m({});
|
|
1255
1255
|
function _(h) {
|
|
1256
|
-
return h ? Object.entries(h).map(([
|
|
1257
|
-
fieldKey:
|
|
1256
|
+
return h ? Object.entries(h).map(([A, U]) => ({
|
|
1257
|
+
fieldKey: A,
|
|
1258
1258
|
...U
|
|
1259
|
-
})).filter((
|
|
1259
|
+
})).filter((A) => A.widget && A.widget.widget !== "Hidden").filter((A) => !X.value.includes(A.fieldKey)) : [];
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1262
|
-
return h ? Object.entries(h).filter(([
|
|
1261
|
+
function S(h) {
|
|
1262
|
+
return h ? Object.entries(h).filter(([A, U]) => U.dependent).reduce((A, [U, j]) => (A[U] = j.dependent, A), {}) : [];
|
|
1263
1263
|
}
|
|
1264
|
-
const
|
|
1264
|
+
const f = G(() => r.value?.actions ? [...r.value.actions].reverse() : []), p = m({}), V = m(!1);
|
|
1265
1265
|
ue(async () => {
|
|
1266
|
-
|
|
1266
|
+
V.value = !0;
|
|
1267
1267
|
const h = new Te().setWorkflowId(i.workflowId).setClassName(i.className).setStore({ svrStore: e, bpmStore: a }).build();
|
|
1268
|
-
r.value = await h.getPageData(),
|
|
1268
|
+
r.value = await h.getPageData(), u.value = _(r.value.fields), g.value = S(r.value.fields);
|
|
1269
1269
|
for (const I in r.value.fields) {
|
|
1270
1270
|
if (r.value.fields[I].widget?.widget === "File") {
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1271
|
+
const A = u.value.find((U) => U.fieldKey === I);
|
|
1272
|
+
A && A.widget && (A.widget.files = []);
|
|
1273
1273
|
}
|
|
1274
1274
|
p.value[I] = r.value.fields[I].modelValue;
|
|
1275
1275
|
}
|
|
1276
|
-
|
|
1276
|
+
V.value = !1;
|
|
1277
1277
|
});
|
|
1278
1278
|
function J() {
|
|
1279
1279
|
return e()?.userInfo?.email_address ?? "";
|
|
1280
1280
|
}
|
|
1281
|
-
async function
|
|
1281
|
+
async function ee(h, I, A, U, j) {
|
|
1282
1282
|
switch (I) {
|
|
1283
1283
|
case Y.Submit:
|
|
1284
1284
|
let L = !0;
|
|
1285
|
-
if (s.value?.forEach((
|
|
1286
|
-
|
|
1285
|
+
if (s.value?.forEach((q) => {
|
|
1286
|
+
q?.validate && (q.validate() || (L = !1));
|
|
1287
1287
|
}), !L) {
|
|
1288
1288
|
c?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
1289
1289
|
return;
|
|
1290
1290
|
}
|
|
1291
|
-
|
|
1291
|
+
V.value = !0;
|
|
1292
1292
|
try {
|
|
1293
|
-
const
|
|
1294
|
-
await Promise.all(se),
|
|
1293
|
+
const q = await Tt(i.className, { ...p.value, ...g.value }, A), se = s.value?.map((ie) => ie?.submit ? ie.submit(q.toString()) : Promise.resolve()) || [];
|
|
1294
|
+
await Promise.all(se), V.value = !1, c?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${q.toString()}.`), o.push({ name: "Details", params: { workflowId: q.toString() } });
|
|
1295
1295
|
} catch {
|
|
1296
|
-
c?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"),
|
|
1296
|
+
c?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"), V.value = !1;
|
|
1297
1297
|
}
|
|
1298
1298
|
break;
|
|
1299
1299
|
case Y.Link:
|
|
1300
1300
|
try {
|
|
1301
1301
|
await l[h.eventName || ""]?.(p.value, X), o.push({ name: U, params: { className: i.className } });
|
|
1302
|
-
} catch (
|
|
1303
|
-
console.error("Error in link action trigger:",
|
|
1302
|
+
} catch (q) {
|
|
1303
|
+
console.error("Error in link action trigger:", q);
|
|
1304
1304
|
}
|
|
1305
1305
|
break;
|
|
1306
1306
|
default:
|
|
@@ -1316,9 +1316,9 @@ const Qn = /* @__PURE__ */ E({
|
|
|
1316
1316
|
"positionId"
|
|
1317
1317
|
], X = m($);
|
|
1318
1318
|
function oe(h, I) {
|
|
1319
|
-
l[h]?.({ fieldValue: I, hiddenFields: X, formData: p }), r.value && (
|
|
1319
|
+
l[h]?.({ fieldValue: I, hiddenFields: X, formData: p }), r.value && (u.value = _(r.value.fields));
|
|
1320
1320
|
}
|
|
1321
|
-
const
|
|
1321
|
+
const x = G(() => Oe(u.value)), b = { bpmStore: a, svrStore: e, router: o, triggers: l, dataWidgetsRefs: s, instance: c, props: i, pageData: r, _fields: u, _dependent: g, genField: _, genDependentField: S, reversedActions: f, _data: p, loading: V, getApproverEmail: J, clickHandler: ee, newHiddenFields: $, hiddenFields: X, changeHandler: oe, groupedFields: x, DataWidgets: je, ActionButton: Se, TopBar: Ie };
|
|
1322
1322
|
return Object.defineProperty(b, "__isScriptSetup", { enumerable: !1, value: !0 }), b;
|
|
1323
1323
|
}
|
|
1324
1324
|
}), Jn = { class: "page-container" }, Xn = { class: "page-body" }, Zn = { class: "form-card" }, eo = { class: "form-fields-vertical" }, to = { class: "form-fields" }, no = {
|
|
@@ -1326,29 +1326,29 @@ const Qn = /* @__PURE__ */ E({
|
|
|
1326
1326
|
class: "form-content"
|
|
1327
1327
|
}, oo = { class: "page-footer" }, ao = { class: "action-container" }, ro = { class: "action-buttons" };
|
|
1328
1328
|
function so(t, n, a, e, o, l) {
|
|
1329
|
-
const s =
|
|
1330
|
-
return
|
|
1329
|
+
const s = C("a-card"), c = C("a-spin");
|
|
1330
|
+
return d(), w("div", Jn, [
|
|
1331
1331
|
B(e.TopBar, {
|
|
1332
1332
|
title: e.pageData.banner.title,
|
|
1333
1333
|
subTitle: e.pageData.banner.subTitle,
|
|
1334
1334
|
email: e.getApproverEmail()
|
|
1335
1335
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1336
|
-
|
|
1336
|
+
k("div", Xn, [
|
|
1337
1337
|
B(c, {
|
|
1338
1338
|
loading: e.loading,
|
|
1339
1339
|
class: "form-container"
|
|
1340
1340
|
}, {
|
|
1341
|
-
default:
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
(
|
|
1341
|
+
default: y(() => [
|
|
1342
|
+
k("div", Zn, [
|
|
1343
|
+
k("div", eo, [
|
|
1344
|
+
(d(!0), w(O, null, W(e.groupedFields, (i) => (d(), F(s, {
|
|
1345
1345
|
key: i.name,
|
|
1346
1346
|
title: i.name,
|
|
1347
1347
|
style: { "margin-bottom": "24px" }
|
|
1348
1348
|
}, {
|
|
1349
|
-
default:
|
|
1350
|
-
|
|
1351
|
-
(
|
|
1349
|
+
default: y(() => [
|
|
1350
|
+
k("div", to, [
|
|
1351
|
+
(d(!0), w(O, null, W(i.fields, (r) => (d(), F(e.DataWidgets, {
|
|
1352
1352
|
key: r.fieldKey,
|
|
1353
1353
|
ref_for: !0,
|
|
1354
1354
|
ref: "dataWidgets",
|
|
@@ -1356,7 +1356,7 @@ function so(t, n, a, e, o, l) {
|
|
|
1356
1356
|
config: r,
|
|
1357
1357
|
"class-name": a.className,
|
|
1358
1358
|
modelValue: e._data[r.fieldKey],
|
|
1359
|
-
"onUpdate:modelValue": (
|
|
1359
|
+
"onUpdate:modelValue": (u) => e._data[r.fieldKey] = u,
|
|
1360
1360
|
class: "form-field",
|
|
1361
1361
|
onChange: e.changeHandler
|
|
1362
1362
|
}, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
@@ -1365,7 +1365,7 @@ function so(t, n, a, e, o, l) {
|
|
|
1365
1365
|
_: 2
|
|
1366
1366
|
}, 1032, ["title"]))), 128))
|
|
1367
1367
|
]),
|
|
1368
|
-
t.$slots.content ? (
|
|
1368
|
+
t.$slots.content ? (d(), w("div", no, [
|
|
1369
1369
|
de(t.$slots, "content", {}, void 0, !0)
|
|
1370
1370
|
])) : ne("", !0)
|
|
1371
1371
|
])
|
|
@@ -1373,11 +1373,11 @@ function so(t, n, a, e, o, l) {
|
|
|
1373
1373
|
_: 3
|
|
1374
1374
|
}, 8, ["loading"])
|
|
1375
1375
|
]),
|
|
1376
|
-
|
|
1377
|
-
|
|
1376
|
+
k("div", oo, [
|
|
1377
|
+
k("div", ao, [
|
|
1378
1378
|
de(t.$slots, "action", {}, void 0, !0),
|
|
1379
|
-
|
|
1380
|
-
(
|
|
1379
|
+
k("div", ro, [
|
|
1380
|
+
(d(!0), w(O, null, W(e.reversedActions, (i) => (d(), F(e.ActionButton, {
|
|
1381
1381
|
key: i.title,
|
|
1382
1382
|
loading: e.loading,
|
|
1383
1383
|
config: i,
|
|
@@ -1405,19 +1405,19 @@ const io = /* @__PURE__ */ Q(Qn, [["render", so], ["__scopeId", "data-v-2fce8732
|
|
|
1405
1405
|
title: "",
|
|
1406
1406
|
subTitle: ""
|
|
1407
1407
|
}
|
|
1408
|
-
}),
|
|
1408
|
+
}), u = m([]), g = m({});
|
|
1409
1409
|
function _(b) {
|
|
1410
|
-
return b ? Object.entries(b).map(([I,
|
|
1410
|
+
return b ? Object.entries(b).map(([I, A]) => ({
|
|
1411
1411
|
fieldKey: I,
|
|
1412
|
-
...
|
|
1412
|
+
...A
|
|
1413
1413
|
})).filter((I) => I.widget && I.widget.widget !== "Hidden").filter((I) => !$.value.includes(I.fieldKey)) : [];
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1416
|
-
return b ? Object.entries(b).filter(([I,
|
|
1415
|
+
function S(b) {
|
|
1416
|
+
return b ? Object.entries(b).filter(([I, A]) => A.dependent).reduce((I, [A, U]) => (I[A] = U.dependent, I), {}) : [];
|
|
1417
1417
|
}
|
|
1418
|
-
const
|
|
1418
|
+
const f = G(() => r.value?.actions ? [...r.value.actions].reverse() : []), p = m({}), V = m(!1);
|
|
1419
1419
|
ue(async () => {
|
|
1420
|
-
|
|
1420
|
+
V.value = !0;
|
|
1421
1421
|
const b = new Te().setPageActionType(fe.Update).setClassName(i.className).setStore({ svrStore: o, bpmStore: l }).setWorkflowId(i.workflowId).build();
|
|
1422
1422
|
r.value = await b.getPageData();
|
|
1423
1423
|
const h = await b.getBtnList(), I = await b.getFiles();
|
|
@@ -1425,21 +1425,21 @@ const io = /* @__PURE__ */ Q(Qn, [["render", so], ["__scopeId", "data-v-2fce8732
|
|
|
1425
1425
|
const j = h.find((L) => L.button === U.title);
|
|
1426
1426
|
return j ? j.isShow : !0;
|
|
1427
1427
|
});
|
|
1428
|
-
const
|
|
1429
|
-
e.Test?.({ fieldValue:
|
|
1428
|
+
const A = r.value.fields.requestType.modelValue;
|
|
1429
|
+
e.Test?.({ fieldValue: A, hiddenFields: $, formData: p }), u.value = _(r.value.fields), g.value = S(r.value.fields);
|
|
1430
1430
|
for (const U in r.value.fields) {
|
|
1431
1431
|
if (r.value.fields[U].widget?.widget === "File") {
|
|
1432
|
-
const j =
|
|
1432
|
+
const j = u.value.find((L) => L.fieldKey === U);
|
|
1433
1433
|
j && j.widget && (j.widget.files = I[U] ?? [], j.widget.removeFile = (L) => b.removeFile(L));
|
|
1434
1434
|
}
|
|
1435
1435
|
p.value[U] = r.value.fields[U].modelValue;
|
|
1436
1436
|
}
|
|
1437
|
-
|
|
1437
|
+
V.value = !1;
|
|
1438
1438
|
});
|
|
1439
1439
|
function J() {
|
|
1440
1440
|
return o()?.userInfo?.email_address ?? "";
|
|
1441
1441
|
}
|
|
1442
|
-
async function
|
|
1442
|
+
async function ee(b, h, I, A, U) {
|
|
1443
1443
|
switch (h) {
|
|
1444
1444
|
case Y.Submit:
|
|
1445
1445
|
let j = !0;
|
|
@@ -1449,17 +1449,17 @@ const io = /* @__PURE__ */ Q(Qn, [["render", so], ["__scopeId", "data-v-2fce8732
|
|
|
1449
1449
|
c?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
1450
1450
|
return;
|
|
1451
1451
|
}
|
|
1452
|
-
|
|
1452
|
+
V.value = !0;
|
|
1453
1453
|
try {
|
|
1454
|
-
const L = await Pt(i.className, i.workflowId, { ...p.value, ...g.value }, I),
|
|
1455
|
-
await Promise.all(
|
|
1454
|
+
const L = await Pt(i.className, i.workflowId, { ...p.value, ...g.value }, I), q = s.value?.map((se) => se?.submit ? se.submit(L.toString()) : Promise.resolve()) || [];
|
|
1455
|
+
await Promise.all(q), V.value = !1, c?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${L.toString()}.`);
|
|
1456
1456
|
} catch {
|
|
1457
|
-
c?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"),
|
|
1457
|
+
c?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"), V.value = !1;
|
|
1458
1458
|
}
|
|
1459
1459
|
break;
|
|
1460
1460
|
case Y.Link:
|
|
1461
1461
|
try {
|
|
1462
|
-
await e[b.eventName || ""]?.(p.value, $), a.push({ name:
|
|
1462
|
+
await e[b.eventName || ""]?.(p.value, $), a.push({ name: A, params: { className: i.className } });
|
|
1463
1463
|
} catch {
|
|
1464
1464
|
}
|
|
1465
1465
|
break;
|
|
@@ -1469,39 +1469,39 @@ const io = /* @__PURE__ */ Q(Qn, [["render", so], ["__scopeId", "data-v-2fce8732
|
|
|
1469
1469
|
}
|
|
1470
1470
|
const $ = m([]);
|
|
1471
1471
|
function X(b, h) {
|
|
1472
|
-
e[b]?.({ fieldValue: h, hiddenFields: $, formData: p }), r.value && (
|
|
1472
|
+
e[b]?.({ fieldValue: h, hiddenFields: $, formData: p }), r.value && (u.value = _(r.value.fields));
|
|
1473
1473
|
}
|
|
1474
|
-
const oe =
|
|
1475
|
-
return Object.defineProperty(
|
|
1474
|
+
const oe = G(() => Oe(u.value)), x = { router: a, triggers: e, svrStore: o, bpmStore: l, dataWidgetsRefs: s, instance: c, props: i, pageData: r, _fields: u, _dependent: g, genField: _, genDependentField: S, reversedActions: f, _data: p, loading: V, getApproverEmail: J, clickHandler: ee, hiddenFields: $, changeHandler: X, groupedFields: oe, DataWidgets: je, ActionButton: Se, TopBar: Ie };
|
|
1475
|
+
return Object.defineProperty(x, "__isScriptSetup", { enumerable: !1, value: !0 }), x;
|
|
1476
1476
|
}
|
|
1477
1477
|
}), co = { class: "page-container" }, uo = { class: "page-body" }, fo = { class: "form-card" }, po = { class: "form-fields-vertical" }, mo = { class: "form-fields" }, go = {
|
|
1478
1478
|
key: 0,
|
|
1479
1479
|
class: "form-content"
|
|
1480
1480
|
}, _o = { class: "page-footer" }, vo = { class: "action-container" }, bo = { class: "action-buttons" };
|
|
1481
1481
|
function ho(t, n, a, e, o, l) {
|
|
1482
|
-
const s =
|
|
1483
|
-
return
|
|
1482
|
+
const s = C("a-card"), c = C("a-spin");
|
|
1483
|
+
return d(), w("div", co, [
|
|
1484
1484
|
B(e.TopBar, {
|
|
1485
1485
|
title: e.pageData.banner.title,
|
|
1486
1486
|
subTitle: e.pageData.banner.subTitle,
|
|
1487
1487
|
email: e.getApproverEmail()
|
|
1488
1488
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1489
|
-
|
|
1489
|
+
k("div", uo, [
|
|
1490
1490
|
B(c, {
|
|
1491
1491
|
loading: e.loading,
|
|
1492
1492
|
class: "form-container"
|
|
1493
1493
|
}, {
|
|
1494
|
-
default:
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
(
|
|
1494
|
+
default: y(() => [
|
|
1495
|
+
k("div", fo, [
|
|
1496
|
+
k("div", po, [
|
|
1497
|
+
(d(!0), w(O, null, W(e.groupedFields, (i) => (d(), F(s, {
|
|
1498
1498
|
key: i.name,
|
|
1499
1499
|
title: i.name,
|
|
1500
1500
|
style: { "margin-bottom": "24px" }
|
|
1501
1501
|
}, {
|
|
1502
|
-
default:
|
|
1503
|
-
|
|
1504
|
-
(
|
|
1502
|
+
default: y(() => [
|
|
1503
|
+
k("div", mo, [
|
|
1504
|
+
(d(!0), w(O, null, W(i.fields, (r) => (d(), F(e.DataWidgets, {
|
|
1505
1505
|
key: r.fieldKey,
|
|
1506
1506
|
ref_for: !0,
|
|
1507
1507
|
ref: "dataWidgets",
|
|
@@ -1509,7 +1509,7 @@ function ho(t, n, a, e, o, l) {
|
|
|
1509
1509
|
config: r,
|
|
1510
1510
|
"class-name": a.className,
|
|
1511
1511
|
modelValue: e._data[r.fieldKey],
|
|
1512
|
-
"onUpdate:modelValue": (
|
|
1512
|
+
"onUpdate:modelValue": (u) => e._data[r.fieldKey] = u,
|
|
1513
1513
|
class: "form-field",
|
|
1514
1514
|
onChange: e.changeHandler
|
|
1515
1515
|
}, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
@@ -1518,7 +1518,7 @@ function ho(t, n, a, e, o, l) {
|
|
|
1518
1518
|
_: 2
|
|
1519
1519
|
}, 1032, ["title"]))), 128))
|
|
1520
1520
|
]),
|
|
1521
|
-
t.$slots.content ? (
|
|
1521
|
+
t.$slots.content ? (d(), w("div", go, [
|
|
1522
1522
|
de(t.$slots, "content", {}, void 0, !0)
|
|
1523
1523
|
])) : ne("", !0)
|
|
1524
1524
|
])
|
|
@@ -1526,11 +1526,11 @@ function ho(t, n, a, e, o, l) {
|
|
|
1526
1526
|
_: 3
|
|
1527
1527
|
}, 8, ["loading"])
|
|
1528
1528
|
]),
|
|
1529
|
-
|
|
1530
|
-
|
|
1529
|
+
k("div", _o, [
|
|
1530
|
+
k("div", vo, [
|
|
1531
1531
|
de(t.$slots, "action", {}, void 0, !0),
|
|
1532
|
-
|
|
1533
|
-
(
|
|
1532
|
+
k("div", bo, [
|
|
1533
|
+
(d(!0), w(O, null, W(e.reversedActions, (i) => (d(), F(e.ActionButton, {
|
|
1534
1534
|
key: i.title,
|
|
1535
1535
|
loading: e.loading,
|
|
1536
1536
|
config: i,
|
|
@@ -1556,7 +1556,7 @@ const ko = /* @__PURE__ */ E({
|
|
|
1556
1556
|
n();
|
|
1557
1557
|
const a = Ve(), e = Ae(), o = $e(), l = xe(), s = wo(), c = pe(), i = t;
|
|
1558
1558
|
let r;
|
|
1559
|
-
const
|
|
1559
|
+
const u = m({
|
|
1560
1560
|
pageType: "",
|
|
1561
1561
|
fields: {},
|
|
1562
1562
|
globalValidations: [],
|
|
@@ -1566,13 +1566,13 @@ const ko = /* @__PURE__ */ E({
|
|
|
1566
1566
|
}
|
|
1567
1567
|
}), g = m([]);
|
|
1568
1568
|
function _(P) {
|
|
1569
|
-
return P ? Object.entries(P).map(([
|
|
1570
|
-
fieldKey:
|
|
1569
|
+
return P ? Object.entries(P).map(([M, T]) => (typeof T.modelValue == "boolean" ? T.fieldValue = T.modelValue ? "Yes" : "No" : T.fieldValue = T.modelValue, {
|
|
1570
|
+
fieldKey: M,
|
|
1571
1571
|
...T
|
|
1572
|
-
})).filter((
|
|
1572
|
+
})).filter((M) => M.widget && M.widget.widget !== "Hidden").filter((M) => !b.value.includes(M.fieldKey)) : [];
|
|
1573
1573
|
}
|
|
1574
|
-
const
|
|
1575
|
-
const
|
|
1574
|
+
const S = G(() => Oe(g.value)), f = G(() => u.value?.actions ? [...u.value.actions].reverse() : []), p = m(!0), V = (P, H) => {
|
|
1575
|
+
const M = P.findIndex((T) => T.isCurrent);
|
|
1576
1576
|
return P.map((T, ae) => {
|
|
1577
1577
|
const D = {
|
|
1578
1578
|
id: T.id,
|
|
@@ -1588,69 +1588,69 @@ const ko = /* @__PURE__ */ E({
|
|
|
1588
1588
|
if (ve && be && ve?.email?.toLowerCase() !== be?.approverEmail?.toLowerCase() && (D.title = `${be.name}`, D.proxy = `Proxy: ${ve.name}`), T.sort > 1 ? D.sub = "Approver Role: " + T.nodeName.replace("Submit", "").replace("Approve", "") : D.sub = "Submit Application", T.isCurrent && H !== -1)
|
|
1589
1589
|
D.desc = "In Approval", D.status = 1;
|
|
1590
1590
|
else {
|
|
1591
|
-
const
|
|
1592
|
-
if (
|
|
1593
|
-
D.time = ke(
|
|
1594
|
-
else if (
|
|
1595
|
-
D.time = ke(
|
|
1596
|
-
else if (
|
|
1597
|
-
if (D.time = ke(
|
|
1591
|
+
const te = T.workflowHistorys[T.workflowHistorys.length - 1];
|
|
1592
|
+
if (te && te.status === 100)
|
|
1593
|
+
D.time = ke(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), D.status = 2, D.desc = "approve success!";
|
|
1594
|
+
else if (te && te.status === 999)
|
|
1595
|
+
D.time = ke(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), D.status = 0, D.desc = "approve reject!";
|
|
1596
|
+
else if (te)
|
|
1597
|
+
if (D.time = ke(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), T.sort === 1)
|
|
1598
1598
|
D.status = 2, D.desc = "";
|
|
1599
1599
|
else {
|
|
1600
|
-
const Me =
|
|
1600
|
+
const Me = te.workflowHistoryApprovers[0];
|
|
1601
1601
|
D.status = 3, D.desc = Me?.reason ? `Rejected reason: ${Me.reason}` : "Rejected";
|
|
1602
1602
|
}
|
|
1603
|
-
else ae <
|
|
1604
|
-
|
|
1603
|
+
else ae < M || M === -1 ? (D.status = 0, D.desc = "Skipped") : (D.status = 0, D.desc = "Pending Approval");
|
|
1604
|
+
te && te.status;
|
|
1605
1605
|
}
|
|
1606
1606
|
return D;
|
|
1607
1607
|
});
|
|
1608
|
-
}, J = m([]),
|
|
1609
|
-
async function
|
|
1608
|
+
}, J = m([]), ee = m(!1), $ = m(!1), X = m(!1), oe = m(!1);
|
|
1609
|
+
async function x() {
|
|
1610
1610
|
const P = await r.getBtnList();
|
|
1611
|
-
|
|
1612
|
-
const
|
|
1613
|
-
return
|
|
1614
|
-
}),
|
|
1611
|
+
u.value.actions = u.value.actions?.filter((H) => {
|
|
1612
|
+
const M = P.find((T) => T.button === H.title);
|
|
1613
|
+
return M ? M.isShow : !0;
|
|
1614
|
+
}), ee.value = P.find((H) => H.button === "IsGlobal")?.isShow ?? !1, $.value = P.find((H) => H.button === "AssignButton")?.isShow ?? !1, X.value = P.find((H) => H.button === "AssignList")?.isShow ?? !1, oe.value = P.find((H) => H.button === "AddCommentsButton")?.isShow ?? !1;
|
|
1615
1615
|
}
|
|
1616
1616
|
const b = m([]);
|
|
1617
1617
|
async function h() {
|
|
1618
|
-
p.value = !0, r = new Te().setPageActionType(fe.Details).setClassName(i.className).setStore({ svrStore: a, bpmStore: e }).setWorkflowId(i.workflowId).build(),
|
|
1618
|
+
p.value = !0, r = new Te().setPageActionType(fe.Details).setClassName(i.className).setStore({ svrStore: a, bpmStore: e }).setWorkflowId(i.workflowId).build(), u.value = await r.getPageData();
|
|
1619
1619
|
const P = await r.getFiles();
|
|
1620
|
-
se.value = await r.getApprovers(), L.value = await r.getCommentsHistory(), ie.value = await r.getAssociator(),
|
|
1621
|
-
const H =
|
|
1622
|
-
o.Test?.({ fieldValue: H, hiddenFields: b }), g.value = _(
|
|
1623
|
-
for (const T in
|
|
1624
|
-
if (
|
|
1620
|
+
se.value = await r.getApprovers(), L.value = await r.getCommentsHistory(), ie.value = await r.getAssociator(), x();
|
|
1621
|
+
const H = u.value.fields.requestType.modelValue;
|
|
1622
|
+
o.Test?.({ fieldValue: H, hiddenFields: b }), g.value = _(u.value.fields);
|
|
1623
|
+
for (const T in u.value.fields)
|
|
1624
|
+
if (u.value.fields[T].widget?.widget === "File") {
|
|
1625
1625
|
const ae = g.value.find((D) => D.fieldKey === T);
|
|
1626
1626
|
ae && ae.widget && (ae.widget.files = P[T] ?? []);
|
|
1627
1627
|
}
|
|
1628
|
-
const
|
|
1629
|
-
J.value =
|
|
1628
|
+
const M = await r.getProcess();
|
|
1629
|
+
J.value = V(M, 0), p.value = !1;
|
|
1630
1630
|
}
|
|
1631
1631
|
ue(h);
|
|
1632
1632
|
async function I(P, H) {
|
|
1633
1633
|
return o[P]?.(H);
|
|
1634
1634
|
}
|
|
1635
|
-
function
|
|
1635
|
+
function A() {
|
|
1636
1636
|
return a()?.userInfo?.email_address ?? "";
|
|
1637
1637
|
}
|
|
1638
|
-
async function U(P, H,
|
|
1638
|
+
async function U(P, H, M, T, ae) {
|
|
1639
1639
|
try {
|
|
1640
1640
|
switch (H) {
|
|
1641
1641
|
case Y.Submit:
|
|
1642
|
-
const { reason: D, ifGlobal: ve } = await I(ae, { isGlobal:
|
|
1642
|
+
const { reason: D, ifGlobal: ve } = await I(ae, { isGlobal: ee.value });
|
|
1643
1643
|
p.value = !0;
|
|
1644
1644
|
const we = ae === "Approve" ? "100" : "-1";
|
|
1645
|
-
await Ht(i.className, i.workflowId,
|
|
1645
|
+
await Ht(i.className, i.workflowId, A(), D, [Number(i.workflowId)], M, we, ve), p.value = !1;
|
|
1646
1646
|
const be = ae === "Approve" ? `Request ID ${i.workflowId} has been approved.` : `Request ID ${i.workflowId} has been rejected.`;
|
|
1647
1647
|
c?.appContext.config.globalProperties.$notification.success(be), h();
|
|
1648
1648
|
break;
|
|
1649
1649
|
case Y.Link:
|
|
1650
1650
|
try {
|
|
1651
1651
|
await o[P.eventName || ""]?.(), l.push({ name: T, params: { className: i.className, workflowId: i.workflowId } });
|
|
1652
|
-
} catch (
|
|
1653
|
-
console.error("Error in link action trigger:",
|
|
1652
|
+
} catch (te) {
|
|
1653
|
+
console.error("Error in link action trigger:", te);
|
|
1654
1654
|
}
|
|
1655
1655
|
break;
|
|
1656
1656
|
case Y.Button:
|
|
@@ -1669,7 +1669,7 @@ const ko = /* @__PURE__ */ E({
|
|
|
1669
1669
|
} catch {
|
|
1670
1670
|
}
|
|
1671
1671
|
}
|
|
1672
|
-
const j = m(""), L = m([]),
|
|
1672
|
+
const j = m(""), L = m([]), q = m(""), se = m([]), ie = m([]);
|
|
1673
1673
|
async function _e(P) {
|
|
1674
1674
|
if (!P) {
|
|
1675
1675
|
c?.appContext.config.globalProperties.$message.error("Please select an approver");
|
|
@@ -1677,7 +1677,7 @@ const ko = /* @__PURE__ */ E({
|
|
|
1677
1677
|
}
|
|
1678
1678
|
await v("Confirm Assign Approver", "Do you want to assign the selected approver?");
|
|
1679
1679
|
try {
|
|
1680
|
-
await r.assignApprover(P), ie.value = await r.getAssociator(),
|
|
1680
|
+
await r.assignApprover(P), ie.value = await r.getAssociator(), x(), c?.appContext.config.globalProperties.$notification.success("Assign Approver clicked!");
|
|
1681
1681
|
} catch (H) {
|
|
1682
1682
|
if (H.status === 409) {
|
|
1683
1683
|
c?.appContext.config.globalProperties.$notification.error("This user is already an associator");
|
|
@@ -1687,9 +1687,9 @@ const ko = /* @__PURE__ */ E({
|
|
|
1687
1687
|
}
|
|
1688
1688
|
}
|
|
1689
1689
|
async function v(P, H) {
|
|
1690
|
-
const { Modal:
|
|
1690
|
+
const { Modal: M } = await import("@arco-design/web-vue");
|
|
1691
1691
|
return new Promise((T, ae) => {
|
|
1692
|
-
|
|
1692
|
+
M.confirm({
|
|
1693
1693
|
title: P,
|
|
1694
1694
|
content: H,
|
|
1695
1695
|
okText: "OK",
|
|
@@ -1722,7 +1722,7 @@ const ko = /* @__PURE__ */ E({
|
|
|
1722
1722
|
return r;
|
|
1723
1723
|
}, set page(P) {
|
|
1724
1724
|
r = P;
|
|
1725
|
-
}, pageData:
|
|
1725
|
+
}, pageData: u, _fields: g, genField: _, groupedFields: S, reversedActions: f, loading: p, mapWorkflowSteps: V, steps: J, isGlobal: ee, isShowAssignSelect: $, isShowAssignList: X, isShowCommentTextArea: oe, reloadButtonList: x, hiddenFields: b, load: h, triggerFn: I, getApproverEmail: A, clickHandler: U, comment: j, commentsHistory: L, selectedApprover: q, approvers: se, associators: ie, onAssignApprover: _e, confirmDialog: v, onDeleteAssociator: N, onAddComment: R, ActionButton: Se, get IconDownload() {
|
|
1726
1726
|
return In;
|
|
1727
1727
|
}, TopBar: Ie, get formatDate() {
|
|
1728
1728
|
return ke;
|
|
@@ -1740,49 +1740,49 @@ const ko = /* @__PURE__ */ E({
|
|
|
1740
1740
|
class: "detail-content"
|
|
1741
1741
|
}, Bo = { class: "page-footer" }, Fo = { class: "action-container" }, Ho = { class: "action-buttons" };
|
|
1742
1742
|
function Lo(t, n, a, e, o, l) {
|
|
1743
|
-
const s =
|
|
1744
|
-
|
|
1745
|
-
const r =
|
|
1746
|
-
return
|
|
1743
|
+
const s = C("a-link"), c = C("a-space"), i = C("a-card");
|
|
1744
|
+
C("a-option"), C("a-select");
|
|
1745
|
+
const r = C("a-button"), u = C("a-list-item"), g = C("a-list"), _ = C("a-textarea"), S = C("a-spin");
|
|
1746
|
+
return d(), w("div", Co, [
|
|
1747
1747
|
B(e.TopBar, {
|
|
1748
1748
|
title: e.pageData.banner.title,
|
|
1749
1749
|
subTitle: e.pageData.banner.subTitle,
|
|
1750
1750
|
email: e.getApproverEmail()
|
|
1751
1751
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1752
|
-
|
|
1753
|
-
B(
|
|
1752
|
+
k("div", So, [
|
|
1753
|
+
B(S, {
|
|
1754
1754
|
loading: e.loading,
|
|
1755
1755
|
class: "detail-container"
|
|
1756
1756
|
}, {
|
|
1757
|
-
default:
|
|
1758
|
-
|
|
1759
|
-
(
|
|
1760
|
-
|
|
1761
|
-
(
|
|
1762
|
-
key:
|
|
1763
|
-
title:
|
|
1757
|
+
default: y(() => [
|
|
1758
|
+
k("div", xo, [
|
|
1759
|
+
(d(), F(He(e.customComps.Steps), { steps: e.steps }, null, 8, ["steps"])),
|
|
1760
|
+
k("div", Ao, [
|
|
1761
|
+
(d(!0), w(O, null, W(e.groupedFields, (f) => (d(), F(i, {
|
|
1762
|
+
key: f.name,
|
|
1763
|
+
title: f.name,
|
|
1764
1764
|
style: { "margin-bottom": "24px" }
|
|
1765
1765
|
}, {
|
|
1766
|
-
default:
|
|
1767
|
-
|
|
1768
|
-
(
|
|
1766
|
+
default: y(() => [
|
|
1767
|
+
k("div", Vo, [
|
|
1768
|
+
(d(!0), w(O, null, W(f.fields, (p) => (d(), w("div", {
|
|
1769
1769
|
key: p.fieldKey,
|
|
1770
1770
|
class: "detail-field-wrapper"
|
|
1771
1771
|
}, [
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
p.widget?.widget === "File" ? (
|
|
1772
|
+
k("div", Io, [
|
|
1773
|
+
k("div", To, Z(p.widget?.title), 1),
|
|
1774
|
+
p.widget?.widget === "File" ? (d(!0), w(O, { key: 0 }, W(p.widget.files, (V) => (d(), w("div", {
|
|
1775
1775
|
class: "field-value",
|
|
1776
|
-
key:
|
|
1776
|
+
key: V.id
|
|
1777
1777
|
}, [
|
|
1778
1778
|
B(c, null, {
|
|
1779
|
-
default:
|
|
1780
|
-
re(
|
|
1779
|
+
default: y(() => [
|
|
1780
|
+
re(Z(V.name) + " ", 1),
|
|
1781
1781
|
B(s, {
|
|
1782
|
-
href:
|
|
1782
|
+
href: V.url,
|
|
1783
1783
|
target: "_blank"
|
|
1784
1784
|
}, {
|
|
1785
|
-
default:
|
|
1785
|
+
default: y(() => [
|
|
1786
1786
|
B(e.IconDownload, { style: { color: "#7A00E6" } })
|
|
1787
1787
|
]),
|
|
1788
1788
|
_: 2
|
|
@@ -1790,7 +1790,7 @@ function Lo(t, n, a, e, o, l) {
|
|
|
1790
1790
|
]),
|
|
1791
1791
|
_: 2
|
|
1792
1792
|
}, 1024)
|
|
1793
|
-
]))), 128)) : (
|
|
1793
|
+
]))), 128)) : (d(), w("div", Po, Z(p.fieldValue), 1))
|
|
1794
1794
|
])
|
|
1795
1795
|
]))), 128))
|
|
1796
1796
|
])
|
|
@@ -1799,18 +1799,18 @@ function Lo(t, n, a, e, o, l) {
|
|
|
1799
1799
|
}, 1032, ["title"]))), 128)),
|
|
1800
1800
|
ne("", !0),
|
|
1801
1801
|
ne("", !0),
|
|
1802
|
-
e.isShowCommentTextArea ? (
|
|
1803
|
-
|
|
1804
|
-
n[6] || (n[6] =
|
|
1802
|
+
e.isShowCommentTextArea ? (d(), w("div", No, [
|
|
1803
|
+
k("div", Uo, [
|
|
1804
|
+
n[6] || (n[6] = k("div", { class: "field-label" }, "Comment", -1)),
|
|
1805
1805
|
B(_, {
|
|
1806
1806
|
modelValue: e.comment,
|
|
1807
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
|
1807
|
+
"onUpdate:modelValue": n[1] || (n[1] = (f) => e.comment = f)
|
|
1808
1808
|
}, null, 8, ["modelValue"]),
|
|
1809
1809
|
B(r, {
|
|
1810
1810
|
type: "primary",
|
|
1811
1811
|
onClick: e.onAddComment
|
|
1812
1812
|
}, {
|
|
1813
|
-
default:
|
|
1813
|
+
default: y(() => n[5] || (n[5] = [
|
|
1814
1814
|
re("Add Comment", -1)
|
|
1815
1815
|
])),
|
|
1816
1816
|
_: 1,
|
|
@@ -1818,16 +1818,16 @@ function Lo(t, n, a, e, o, l) {
|
|
|
1818
1818
|
})
|
|
1819
1819
|
])
|
|
1820
1820
|
])) : ne("", !0),
|
|
1821
|
-
e.commentsHistory.length ? (
|
|
1822
|
-
header:
|
|
1821
|
+
e.commentsHistory.length ? (d(), F(g, { key: 3 }, {
|
|
1822
|
+
header: y(() => n[7] || (n[7] = [
|
|
1823
1823
|
re(" Comments History ", -1)
|
|
1824
1824
|
])),
|
|
1825
|
-
default:
|
|
1826
|
-
(
|
|
1827
|
-
key:
|
|
1825
|
+
default: y(() => [
|
|
1826
|
+
(d(!0), w(O, null, W(e.commentsHistory, (f) => (d(), F(u, {
|
|
1827
|
+
key: f.associator
|
|
1828
1828
|
}, {
|
|
1829
|
-
default:
|
|
1830
|
-
re(
|
|
1829
|
+
default: y(() => [
|
|
1830
|
+
re(Z(f.associator) + ": " + Z(f.comments) + " (" + Z(e.formatDate(f.createdAt)) + ") ", 1)
|
|
1831
1831
|
]),
|
|
1832
1832
|
_: 2
|
|
1833
1833
|
}, 1024))), 128))
|
|
@@ -1835,7 +1835,7 @@ function Lo(t, n, a, e, o, l) {
|
|
|
1835
1835
|
_: 1
|
|
1836
1836
|
})) : ne("", !0)
|
|
1837
1837
|
]),
|
|
1838
|
-
t.$slots.content ? (
|
|
1838
|
+
t.$slots.content ? (d(), w("div", Do, [
|
|
1839
1839
|
de(t.$slots, "content", {}, void 0, !0)
|
|
1840
1840
|
])) : ne("", !0)
|
|
1841
1841
|
])
|
|
@@ -1843,16 +1843,16 @@ function Lo(t, n, a, e, o, l) {
|
|
|
1843
1843
|
_: 3
|
|
1844
1844
|
}, 8, ["loading"])
|
|
1845
1845
|
]),
|
|
1846
|
-
|
|
1847
|
-
|
|
1846
|
+
k("div", Bo, [
|
|
1847
|
+
k("div", Fo, [
|
|
1848
1848
|
de(t.$slots, "action", {}, void 0, !0),
|
|
1849
|
-
|
|
1850
|
-
(
|
|
1851
|
-
key:
|
|
1849
|
+
k("div", Ho, [
|
|
1850
|
+
(d(!0), w(O, null, W(e.reversedActions, (f) => (d(), F(e.ActionButton, {
|
|
1851
|
+
key: f.title,
|
|
1852
1852
|
loading: e.loading,
|
|
1853
|
-
config:
|
|
1853
|
+
config: f,
|
|
1854
1854
|
class: "action-button",
|
|
1855
|
-
onClick: (...p) => e.clickHandler(
|
|
1855
|
+
onClick: (...p) => e.clickHandler(f, ...p)
|
|
1856
1856
|
}, null, 8, ["loading", "config", "onClick"]))), 128))
|
|
1857
1857
|
])
|
|
1858
1858
|
])
|
|
@@ -1877,7 +1877,7 @@ const Ro = /* @__PURE__ */ Q(ko, [["render", Lo], ["__scopeId", "data-v-180a216d
|
|
|
1877
1877
|
filters: []
|
|
1878
1878
|
});
|
|
1879
1879
|
function r() {
|
|
1880
|
-
const v = Object.entries(
|
|
1880
|
+
const v = Object.entries(A.value).filter(([, { value: N }]) => N && N !== "").map(([N, { value: R, operator: le }]) => ({
|
|
1881
1881
|
key: N,
|
|
1882
1882
|
value: R,
|
|
1883
1883
|
operator: le
|
|
@@ -1893,8 +1893,8 @@ const Ro = /* @__PURE__ */ Q(ko, [["render", Lo], ["__scopeId", "data-v-180a216d
|
|
|
1893
1893
|
}]
|
|
1894
1894
|
};
|
|
1895
1895
|
}
|
|
1896
|
-
const
|
|
1897
|
-
x:
|
|
1896
|
+
const u = G(() => ({
|
|
1897
|
+
x: S.value.length * 150 + 250
|
|
1898
1898
|
// 只设置横向滚动
|
|
1899
1899
|
// 移除 y 属性,让表格高度自适应
|
|
1900
1900
|
})), g = (v) => {
|
|
@@ -1918,18 +1918,18 @@ const Ro = /* @__PURE__ */ Q(ko, [["render", Lo], ["__scopeId", "data-v-180a216d
|
|
|
1918
1918
|
minWidth: 200,
|
|
1919
1919
|
fixed: "right",
|
|
1920
1920
|
resizable: !1
|
|
1921
|
-
}),
|
|
1922
|
-
}, _ = m([]),
|
|
1921
|
+
}), S.value = N;
|
|
1922
|
+
}, _ = m([]), S = m([]), f = m(!0), p = m(!0), V = m(), J = async () => {
|
|
1923
1923
|
p.value = !0;
|
|
1924
1924
|
const v = await It(s.className, r());
|
|
1925
1925
|
_.value = v.data, i.total = v.totalCount, p.value = !1;
|
|
1926
|
-
},
|
|
1926
|
+
}, ee = m(!1);
|
|
1927
1927
|
ue(async () => {
|
|
1928
|
-
|
|
1928
|
+
f.value = !0;
|
|
1929
1929
|
const v = new Te().setPageActionType(fe.List).setClassName(s.className).setStore({ svrStore: a, bpmStore: e }).build();
|
|
1930
|
-
c.value = await v.getPageData(), g(c.value.fields), j(c.value.fields), L(), I(c.value?.tabs?.[0]?.key || ""),
|
|
1930
|
+
c.value = await v.getPageData(), g(c.value.fields), j(c.value.fields), L(), I(c.value?.tabs?.[0]?.key || ""), V.value = c.value.actions, f.value = !1, ee.value = !0;
|
|
1931
1931
|
}), dt(() => {
|
|
1932
|
-
|
|
1932
|
+
ee.value && J();
|
|
1933
1933
|
});
|
|
1934
1934
|
const $ = (v) => {
|
|
1935
1935
|
i.current = v, J();
|
|
@@ -1945,7 +1945,7 @@ const Ro = /* @__PURE__ */ Q(ko, [["render", Lo], ["__scopeId", "data-v-180a216d
|
|
|
1945
1945
|
console.warn("Unknown action type:", v);
|
|
1946
1946
|
}
|
|
1947
1947
|
}
|
|
1948
|
-
function
|
|
1948
|
+
function x(v, N, R) {
|
|
1949
1949
|
switch (v) {
|
|
1950
1950
|
case Y.Submit:
|
|
1951
1951
|
qt(N, { filters: [{ key: "approverList", value: b(), operator: 2 }] }), l?.appContext.config.globalProperties.$notification.success("submit success!");
|
|
@@ -1970,7 +1970,7 @@ const Ro = /* @__PURE__ */ Q(ko, [["render", Lo], ["__scopeId", "data-v-180a216d
|
|
|
1970
1970
|
value: h(R.value, b())
|
|
1971
1971
|
})) || [], i.current = 1, J();
|
|
1972
1972
|
}
|
|
1973
|
-
const
|
|
1973
|
+
const A = m({}), U = m([]);
|
|
1974
1974
|
function j(v) {
|
|
1975
1975
|
if (!v) return [];
|
|
1976
1976
|
U.value = Object.entries(v).filter(([, N]) => N.isFiltered).map(([N, R]) => ({ fieldKey: N, fieldConfig: R }));
|
|
@@ -1979,39 +1979,39 @@ const Ro = /* @__PURE__ */ Q(ko, [["render", Lo], ["__scopeId", "data-v-180a216d
|
|
|
1979
1979
|
const v = {};
|
|
1980
1980
|
U.value.forEach(({ fieldKey: N, fieldConfig: R }) => {
|
|
1981
1981
|
v[N] = {}, v[N].value = R.modelValue, v[N].operator = R.operator;
|
|
1982
|
-
}),
|
|
1983
|
-
},
|
|
1982
|
+
}), A.value = v;
|
|
1983
|
+
}, q = () => {
|
|
1984
1984
|
i.current = 1, J();
|
|
1985
1985
|
}, se = () => {
|
|
1986
|
-
c.value && L(),
|
|
1986
|
+
c.value && L(), q();
|
|
1987
1987
|
};
|
|
1988
1988
|
function ie(v, N) {
|
|
1989
1989
|
return !(v.location !== "InTable" || v.title === "Update" && (N.status === 100 || N.status === -1));
|
|
1990
1990
|
}
|
|
1991
|
-
const _e = { svrStore: a, bpmStore: e, router: o, instance: l, props: s, pageData: c, paging: i, createListParams: r, scroll:
|
|
1991
|
+
const _e = { svrStore: a, bpmStore: e, router: o, instance: l, props: s, pageData: c, paging: i, createListParams: r, scroll: u, mapColumns: g, _data: _, _columns: S, loadingPage: f, loadingTable: p, actions: V, loadData: J, mounted: ee, pageChangeHandler: $, pageSizeChangeHandler: X, clickHandler: oe, createHandler: x, getApproverEmail: b, replaceEmail: h, tabHandler: I, searchForm: A, searchableFields: U, mapSearchableFields: j, initSearchForm: L, handleSearch: q, handleReset: se, judgeHiddenActions: ie, ActionButton: Se, DataWidgets: je, TopBar: Ie };
|
|
1992
1992
|
return Object.defineProperty(_e, "__isScriptSetup", { enumerable: !1, value: !0 }), _e;
|
|
1993
1993
|
}
|
|
1994
1994
|
}), $o = { class: "list-container" }, Oo = { class: "query-title" };
|
|
1995
1995
|
function Mo(t, n, a, e, o, l) {
|
|
1996
|
-
const s =
|
|
1997
|
-
return
|
|
1996
|
+
const s = C("a-space"), c = C("a-col"), i = C("a-button"), r = C("a-row"), u = C("a-card"), g = C("a-tab-pane"), _ = C("a-tabs"), S = C("a-table");
|
|
1997
|
+
return d(), w("div", $o, [
|
|
1998
1998
|
B(e.TopBar, {
|
|
1999
1999
|
title: e.pageData?.banner.title ?? "",
|
|
2000
2000
|
subTitle: e.pageData?.banner.subTitle ?? "",
|
|
2001
2001
|
email: e.getApproverEmail()
|
|
2002
2002
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
2003
|
-
B(
|
|
2004
|
-
default:
|
|
2005
|
-
|
|
2006
|
-
n[0] || (n[0] =
|
|
2003
|
+
B(u, null, {
|
|
2004
|
+
default: y(() => [
|
|
2005
|
+
k("div", Oo, [
|
|
2006
|
+
n[0] || (n[0] = k("h3", null, "Search Conditions", -1)),
|
|
2007
2007
|
B(s, { size: "medium" }, {
|
|
2008
|
-
default:
|
|
2009
|
-
(
|
|
2010
|
-
key:
|
|
2008
|
+
default: y(() => [
|
|
2009
|
+
(d(!0), w(O, null, W(e.actions, (f) => (d(), w(O, {
|
|
2010
|
+
key: f.title
|
|
2011
2011
|
}, [
|
|
2012
|
-
|
|
2012
|
+
f.location === "InOperation" ? (d(), F(e.ActionButton, {
|
|
2013
2013
|
key: 0,
|
|
2014
|
-
config:
|
|
2014
|
+
config: f,
|
|
2015
2015
|
onClick: e.createHandler
|
|
2016
2016
|
}, null, 8, ["config"])) : ne("", !0)
|
|
2017
2017
|
], 64))), 128))
|
|
@@ -2020,18 +2020,18 @@ function Mo(t, n, a, e, o, l) {
|
|
|
2020
2020
|
})
|
|
2021
2021
|
]),
|
|
2022
2022
|
B(r, { gutter: [24, 20] }, {
|
|
2023
|
-
default:
|
|
2024
|
-
(
|
|
2025
|
-
key:
|
|
2023
|
+
default: y(() => [
|
|
2024
|
+
(d(!0), w(O, null, W(e.searchableFields, (f) => (d(), F(c, {
|
|
2025
|
+
key: f.fieldKey,
|
|
2026
2026
|
span: 6,
|
|
2027
2027
|
class: "search-col"
|
|
2028
2028
|
}, {
|
|
2029
|
-
default:
|
|
2029
|
+
default: y(() => [
|
|
2030
2030
|
B(e.DataWidgets, {
|
|
2031
|
-
name:
|
|
2032
|
-
config:
|
|
2033
|
-
modelValue: e.searchForm[
|
|
2034
|
-
"onUpdate:modelValue": (p) => e.searchForm[
|
|
2031
|
+
name: f.fieldKey,
|
|
2032
|
+
config: f.fieldConfig,
|
|
2033
|
+
modelValue: e.searchForm[f.fieldKey].value,
|
|
2034
|
+
"onUpdate:modelValue": (p) => e.searchForm[f.fieldKey].value = p,
|
|
2035
2035
|
class: "form-field"
|
|
2036
2036
|
}, null, 8, ["name", "config", "modelValue", "onUpdate:modelValue"])
|
|
2037
2037
|
]),
|
|
@@ -2041,15 +2041,15 @@ function Mo(t, n, a, e, o, l) {
|
|
|
2041
2041
|
span: 6,
|
|
2042
2042
|
class: "search-col form-buttons"
|
|
2043
2043
|
}, {
|
|
2044
|
-
default:
|
|
2044
|
+
default: y(() => [
|
|
2045
2045
|
B(s, { size: "medium" }, {
|
|
2046
|
-
default:
|
|
2046
|
+
default: y(() => [
|
|
2047
2047
|
B(i, {
|
|
2048
2048
|
type: "primary",
|
|
2049
2049
|
size: "medium",
|
|
2050
2050
|
onClick: e.handleSearch
|
|
2051
2051
|
}, {
|
|
2052
|
-
default:
|
|
2052
|
+
default: y(() => n[1] || (n[1] = [
|
|
2053
2053
|
re(" Search ", -1)
|
|
2054
2054
|
])),
|
|
2055
2055
|
_: 1,
|
|
@@ -2059,7 +2059,7 @@ function Mo(t, n, a, e, o, l) {
|
|
|
2059
2059
|
size: "medium",
|
|
2060
2060
|
onClick: e.handleReset
|
|
2061
2061
|
}, {
|
|
2062
|
-
default:
|
|
2062
|
+
default: y(() => n[2] || (n[2] = [
|
|
2063
2063
|
re(" Reset ", -1)
|
|
2064
2064
|
])),
|
|
2065
2065
|
_: 1,
|
|
@@ -2081,15 +2081,15 @@ function Mo(t, n, a, e, o, l) {
|
|
|
2081
2081
|
size: "large",
|
|
2082
2082
|
onTabClick: e.tabHandler
|
|
2083
2083
|
}, {
|
|
2084
|
-
default:
|
|
2085
|
-
(
|
|
2086
|
-
key:
|
|
2087
|
-
title:
|
|
2084
|
+
default: y(() => [
|
|
2085
|
+
(d(!0), w(O, null, W(e.pageData?.tabs, (f) => (d(), F(g, {
|
|
2086
|
+
key: f.key,
|
|
2087
|
+
title: f.title
|
|
2088
2088
|
}, null, 8, ["title"]))), 128))
|
|
2089
2089
|
]),
|
|
2090
2090
|
_: 1
|
|
2091
2091
|
}),
|
|
2092
|
-
B(
|
|
2092
|
+
B(S, {
|
|
2093
2093
|
columns: e._columns,
|
|
2094
2094
|
data: e._data,
|
|
2095
2095
|
stripe: "",
|
|
@@ -2108,17 +2108,17 @@ function Mo(t, n, a, e, o, l) {
|
|
|
2108
2108
|
onPageChange: e.pageChangeHandler,
|
|
2109
2109
|
onPageSizeChange: e.pageSizeChangeHandler
|
|
2110
2110
|
}, {
|
|
2111
|
-
optional:
|
|
2111
|
+
optional: y(({ record: f }) => [
|
|
2112
2112
|
B(s, { size: "small" }, {
|
|
2113
|
-
default:
|
|
2114
|
-
(
|
|
2113
|
+
default: y(() => [
|
|
2114
|
+
(d(!0), w(O, null, W(e.actions, (p) => (d(), w(O, {
|
|
2115
2115
|
key: p.title
|
|
2116
2116
|
}, [
|
|
2117
|
-
e.judgeHiddenActions(p,
|
|
2117
|
+
e.judgeHiddenActions(p, f) ? (d(), F(e.ActionButton, {
|
|
2118
2118
|
key: 0,
|
|
2119
2119
|
config: p,
|
|
2120
2120
|
size: "small",
|
|
2121
|
-
onClick: (...
|
|
2121
|
+
onClick: (...V) => e.clickHandler(...V, f.workflowId)
|
|
2122
2122
|
}, null, 8, ["config", "onClick"])) : ne("", !0)
|
|
2123
2123
|
], 64))), 128))
|
|
2124
2124
|
]),
|