@chase-shao/vue-component-lib 1.2.84 → 1.2.85
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 +345 -342
- 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 w, createBlock as
|
|
1
|
+
import { ref as m, getCurrentInstance as pe, defineComponent as E, mergeModels as ce, useModel as ye, resolveComponent as w, createBlock as F, openBlock as f, onMounted as ue, computed as W, withCtx as x, createElementBlock as V, Fragment as M, renderList as q, createVNode as B, nextTick as lt, createTextVNode as re, inject as me, normalizeStyle as qe, normalizeClass as Ye, createElementVNode as y, useTemplateRef as Fe, createCommentVNode as ne, toDisplayString as te, 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";
|
|
@@ -52,12 +52,12 @@ let Be = {};
|
|
|
52
52
|
function ht(t) {
|
|
53
53
|
Be = { ...Be, ...t };
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Le() {
|
|
56
56
|
return Be;
|
|
57
57
|
}
|
|
58
58
|
const yt = pe();
|
|
59
59
|
function Qe() {
|
|
60
|
-
const t =
|
|
60
|
+
const t = Le();
|
|
61
61
|
return {
|
|
62
62
|
apiBase: t.apiBase || void 0 || "",
|
|
63
63
|
appSecret: t.appSecret || void 0 || ""
|
|
@@ -267,15 +267,15 @@ function Dt(t, n) {
|
|
|
267
267
|
function Bt(t, n) {
|
|
268
268
|
return t.replace(/{IfTriggerGlobal_RandP_Approval}/g, n);
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Ft(t, n) {
|
|
271
271
|
return t.replace(/{ClassName}/g, encodeURIComponent(n));
|
|
272
272
|
}
|
|
273
|
-
async function
|
|
273
|
+
async function Ht(t, n, a, e, o, l, s, c) {
|
|
274
274
|
const i = await z();
|
|
275
275
|
let r = Re(l, n);
|
|
276
|
-
return r = Nt(r, a), r = Ut(r, e), r = Dt(r, s), r = Bt(r, c), r =
|
|
276
|
+
return r = Nt(r, a), r = Ut(r, e), r = Dt(r, s), r = Bt(r, c), r = Ft(r, t), (await i.put(r, o))?.data;
|
|
277
277
|
}
|
|
278
|
-
async function
|
|
278
|
+
async function Lt(t, n) {
|
|
279
279
|
const o = (await (await z()).get(t, { params: { value: n } }))?.data;
|
|
280
280
|
return Object.entries(o).map(([l, s]) => ({
|
|
281
281
|
value: l,
|
|
@@ -285,23 +285,23 @@ async function Ft(t, n) {
|
|
|
285
285
|
async function Rt(t, n) {
|
|
286
286
|
return (await (await z()).get(`/General/${t}/${n}/process`))?.data;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function jt(t) {
|
|
289
289
|
return {
|
|
290
290
|
uid: t.id ?? Ze(),
|
|
291
291
|
name: t.attachmentName ?? "unknown",
|
|
292
292
|
url: t.attachmentKey ?? ""
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
|
-
async function
|
|
295
|
+
async function $t(t, n) {
|
|
296
296
|
return (await (await z()).get(`/General/${t}/${n}/upload/get`))?.data.reduce((l, s) => {
|
|
297
297
|
const { category: c } = s;
|
|
298
|
-
return l[c] || (l[c] = []), l[c].push(
|
|
298
|
+
return l[c] || (l[c] = []), l[c].push(jt(s)), l;
|
|
299
299
|
}, {});
|
|
300
300
|
}
|
|
301
|
-
async function
|
|
301
|
+
async function Ot(t, n) {
|
|
302
302
|
return (await z()).post(`/General/${t}/${n}/delete/attachment`);
|
|
303
303
|
}
|
|
304
|
-
async function
|
|
304
|
+
async function Mt() {
|
|
305
305
|
const n = await (await z()).get("/Grading/dropdown/approvers");
|
|
306
306
|
return Object.entries(n?.data).map(([a, e]) => ({
|
|
307
307
|
label: a,
|
|
@@ -383,7 +383,7 @@ const ge = (t, n) => {
|
|
|
383
383
|
};
|
|
384
384
|
function Xt(t, n, a, e, o, l) {
|
|
385
385
|
const s = w("AInput");
|
|
386
|
-
return
|
|
386
|
+
return f(), F(s, {
|
|
387
387
|
modelValue: e.model,
|
|
388
388
|
"onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
|
|
389
389
|
"allow-clear": "",
|
|
@@ -416,9 +416,9 @@ const Ke = /* @__PURE__ */ Q(Jt, [["render", Xt], ["__file", "InputText.vue"]]),
|
|
|
416
416
|
const i = (_) => ge(e.validations, _), r = (_) => {
|
|
417
417
|
o("input", _);
|
|
418
418
|
}, d = (_) => {
|
|
419
|
-
const
|
|
420
|
-
o("error",
|
|
421
|
-
|
|
419
|
+
const k = i(_);
|
|
420
|
+
o("error", k.res ? "" : k.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((u) => {
|
|
421
|
+
u.event === "change" && o(u.event, u.handlerName, _);
|
|
422
422
|
});
|
|
423
423
|
};
|
|
424
424
|
n({
|
|
@@ -433,7 +433,7 @@ const Ke = /* @__PURE__ */ Q(Jt, [["render", Xt], ["__file", "InputText.vue"]]),
|
|
|
433
433
|
});
|
|
434
434
|
function en(t, n, a, e, o, l) {
|
|
435
435
|
const s = w("AInputNumber");
|
|
436
|
-
return
|
|
436
|
+
return f(), F(s, {
|
|
437
437
|
modelValue: e.model,
|
|
438
438
|
"onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
|
|
439
439
|
clearable: "",
|
|
@@ -458,30 +458,30 @@ 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 = (k) => ge(e.validations, k), r = W(() => {
|
|
462
|
+
const k = {};
|
|
463
|
+
return e.triggers && e.triggers.length > 0 && e.triggers.forEach((u) => {
|
|
464
|
+
k[u.event] = (p) => {
|
|
465
|
+
o(u.event, u.handlerName, p);
|
|
466
|
+
const A = i(p);
|
|
467
|
+
o("error", A.res ? "" : A.errorMessages);
|
|
468
468
|
};
|
|
469
|
-
}),
|
|
469
|
+
}), k;
|
|
470
470
|
}), d = async () => {
|
|
471
|
-
e.config.dataSourceProvider && (s.value = await
|
|
471
|
+
e.config.dataSourceProvider && (s.value = await Lt(e.config.dataSourceProvider));
|
|
472
472
|
};
|
|
473
473
|
ue(d);
|
|
474
|
-
const g = (
|
|
475
|
-
o("update:modelValue",
|
|
476
|
-
const
|
|
477
|
-
o("error",
|
|
478
|
-
p.event === "change" && o(p.event, p.handlerName,
|
|
474
|
+
const g = (k) => {
|
|
475
|
+
o("update:modelValue", k);
|
|
476
|
+
const u = i(k);
|
|
477
|
+
o("error", u.res ? "" : u.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((p) => {
|
|
478
|
+
p.event === "change" && o(p.event, p.handlerName, k);
|
|
479
479
|
});
|
|
480
480
|
};
|
|
481
481
|
n({
|
|
482
482
|
validate() {
|
|
483
|
-
const
|
|
484
|
-
return o("error",
|
|
483
|
+
const k = i(e.modelValue);
|
|
484
|
+
return o("error", k.res ? "" : k.errorMessages), k.res;
|
|
485
485
|
}
|
|
486
486
|
});
|
|
487
487
|
const _ = { props: e, emits: o, loading: l, _options: s, model: c, validate: i, eventHandlers: r, loadOptions: d, changeHandler: g };
|
|
@@ -490,7 +490,7 @@ const tn = /* @__PURE__ */ Q(Zt, [["render", en], ["__file", "InputNumber.vue"]]
|
|
|
490
490
|
});
|
|
491
491
|
function on(t, n, a, e, o, l) {
|
|
492
492
|
const s = w("AOption"), c = w("ASelect");
|
|
493
|
-
return
|
|
493
|
+
return f(), 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: x(() => [
|
|
504
|
+
(f(!0), V(M, null, q(e._options, (i) => (f(), F(s, {
|
|
505
505
|
key: i.value,
|
|
506
506
|
value: i.value,
|
|
507
507
|
label: i.label
|
|
@@ -542,11 +542,11 @@ const We = /* @__PURE__ */ Q(nn, [["render", on], ["__file", "SelectList.vue"]])
|
|
|
542
542
|
});
|
|
543
543
|
function rn(t, n, a, e, o, l) {
|
|
544
544
|
const s = w("ACascader"), c = w("ASpace");
|
|
545
|
-
return
|
|
545
|
+
return f(), F(c, {
|
|
546
546
|
direction: "vertical",
|
|
547
547
|
size: "large"
|
|
548
548
|
}, {
|
|
549
|
-
default:
|
|
549
|
+
default: x(() => [
|
|
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 C = await Xe();
|
|
578
578
|
l.value = {
|
|
579
|
-
Authorization: `Bearer ${
|
|
579
|
+
Authorization: `Bearer ${C}`
|
|
580
580
|
};
|
|
581
581
|
});
|
|
582
|
-
const s = (
|
|
583
|
-
function g(
|
|
584
|
-
return
|
|
582
|
+
const s = (C) => ge(e.validations, C), c = Le(), i = c.apiBase, r = m(null), d = m("");
|
|
583
|
+
function g(C, b, h) {
|
|
584
|
+
return C.replace(/{WorkflowId}/g, b).replace(/{ClassName}/g, h);
|
|
585
585
|
}
|
|
586
586
|
const _ = W(() => {
|
|
587
587
|
if (e.config.uploadURL) {
|
|
588
|
-
const
|
|
589
|
-
return g(
|
|
588
|
+
const C = i + e.config.uploadURL;
|
|
589
|
+
return g(C, d.value, e.className);
|
|
590
590
|
}
|
|
591
591
|
return "";
|
|
592
|
-
}),
|
|
593
|
-
|
|
592
|
+
}), k = (C) => {
|
|
593
|
+
C.stopPropagation(), r.value.submit();
|
|
594
594
|
};
|
|
595
|
-
function
|
|
596
|
-
const { file:
|
|
597
|
-
return new Promise((
|
|
595
|
+
function u(C) {
|
|
596
|
+
const { file: b, name: h } = C, I = h ?? b.name;
|
|
597
|
+
return new Promise((S, U) => {
|
|
598
598
|
pt.confirm({
|
|
599
599
|
title: "Confirm Delete",
|
|
600
|
-
content: `Are you sure you want to delete ${
|
|
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 (C.status !== "init" && e.config.removeFile)
|
|
603
|
+
return await e.config.removeFile(C.uid), S(!0);
|
|
604
|
+
S(!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
|
-
}, Z = (
|
|
613
|
-
|
|
614
|
-
},
|
|
615
|
-
|
|
610
|
+
const p = m(null), A = m(null), J = (C) => {
|
|
611
|
+
p.value && (p.value(C), p.value = null, A.value = null);
|
|
612
|
+
}, Z = (C) => {
|
|
613
|
+
A.value && (A.value(C), p.value = null, A.value = null);
|
|
614
|
+
}, $ = m([]), X = (C) => {
|
|
615
|
+
$.value = C.filter((b) => b.status === "init");
|
|
616
616
|
};
|
|
617
617
|
n({
|
|
618
|
-
submit(
|
|
619
|
-
return new Promise((
|
|
620
|
-
r.value ? (e.config.uploadURL && (d.value =
|
|
618
|
+
submit(C) {
|
|
619
|
+
return new Promise((b, h) => {
|
|
620
|
+
r.value ? (e.config.uploadURL && (d.value = C), p.value = b, A.value = h, $.value.length ? lt(() => {
|
|
621
621
|
r.value?.submit();
|
|
622
|
-
}) :
|
|
622
|
+
}) : b(C)) : b(C);
|
|
623
623
|
});
|
|
624
624
|
},
|
|
625
625
|
validate() {
|
|
626
|
-
const h = s(
|
|
626
|
+
const C = e.config.files ?? [], b = [...$.value, ...C].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: d, replaceIdAndClassName: g, action: _, submit:
|
|
630
|
+
const oe = { props: e, emits: o, headers: l, validate: s, config: c, ApiBase: i, uploadRef: r, id: d, replaceIdAndClassName: g, action: _, submit: k, onBeforeRemove: u, uploadPromiseResolve: p, uploadPromiseReject: A, handleUploadSuccess: J, handleUploadError: Z, 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
635
|
const s = w("a-button"), c = w("a-upload");
|
|
636
|
-
return
|
|
636
|
+
return f(), 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": x(() => n[0] || (n[0] = [])),
|
|
650
|
+
"upload-button": x(() => [
|
|
651
651
|
B(s, { type: "primary" }, {
|
|
652
|
-
default:
|
|
652
|
+
default: x(() => n[1] || (n[1] = [
|
|
653
653
|
re("Select File", -1)
|
|
654
654
|
])),
|
|
655
655
|
_: 1,
|
|
@@ -692,7 +692,7 @@ const dn = /* @__PURE__ */ Q(ln, [["render", cn], ["__file", "FileUpload.vue"]])
|
|
|
692
692
|
});
|
|
693
693
|
function fn(t, n, a, e, o, l) {
|
|
694
694
|
const s = w("ATextarea");
|
|
695
|
-
return
|
|
695
|
+
return f(), F(s, {
|
|
696
696
|
"model-value": e.props.modelValue,
|
|
697
697
|
placeholder: "Please enter something",
|
|
698
698
|
"allow-clear": "",
|
|
@@ -734,14 +734,14 @@ const pn = /* @__PURE__ */ Q(un, [["render", fn], ["__file", "TextArea.vue"]]),
|
|
|
734
734
|
});
|
|
735
735
|
function gn(t, n, a, e, o, l) {
|
|
736
736
|
const s = w("ACheckbox");
|
|
737
|
-
return
|
|
737
|
+
return f(), 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: x(() => n[1] || (n[1] = [
|
|
745
745
|
re("Yes", -1)
|
|
746
746
|
])),
|
|
747
747
|
_: 1,
|
|
@@ -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 f(), V("svg", {
|
|
806
806
|
viewBox: "0 0 48 48",
|
|
807
807
|
fill: "none",
|
|
808
808
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -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 f(), V("svg", {
|
|
870
870
|
viewBox: "0 0 48 48",
|
|
871
871
|
fill: "none",
|
|
872
872
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -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 =
|
|
907
|
+
const e = t, o = a, l = ye(t, "modelValue"), s = Fe("widgetRef"), c = W(() => {
|
|
908
908
|
switch (e.config?.widget?.widget) {
|
|
909
909
|
case "TextBox":
|
|
910
910
|
return Ke;
|
|
@@ -925,20 +925,23 @@ const In = Object.assign(De, {
|
|
|
925
925
|
default:
|
|
926
926
|
return Ke;
|
|
927
927
|
}
|
|
928
|
-
}), i = m(""), r = (
|
|
929
|
-
i.value =
|
|
930
|
-
}, d = (
|
|
931
|
-
o("change",
|
|
928
|
+
}), i = m(""), r = (u) => {
|
|
929
|
+
i.value = u;
|
|
930
|
+
}, d = (u, p) => {
|
|
931
|
+
o("change", u, p);
|
|
932
932
|
};
|
|
933
933
|
function g() {
|
|
934
934
|
return e.config?.widget?.widget === "File";
|
|
935
935
|
}
|
|
936
|
+
function _(u) {
|
|
937
|
+
return u === "OtherInformationText" ? "Other Information" : u === "Other Information" ? "" : u;
|
|
938
|
+
}
|
|
936
939
|
n({
|
|
937
940
|
isFileUpload() {
|
|
938
941
|
return e.config?.widget?.widget === "File";
|
|
939
942
|
},
|
|
940
|
-
submit(
|
|
941
|
-
return g() ? s.value.submit(
|
|
943
|
+
submit(u) {
|
|
944
|
+
return g() ? s.value.submit(u) : Promise.resolve(u);
|
|
942
945
|
},
|
|
943
946
|
validate() {
|
|
944
947
|
return s.value?.validate();
|
|
@@ -947,10 +950,10 @@ const In = Object.assign(De, {
|
|
|
947
950
|
return e?.config?.widget?.title;
|
|
948
951
|
}
|
|
949
952
|
});
|
|
950
|
-
const
|
|
953
|
+
const k = { props: e, emits: o, model: l, widgetRef: s, curComp: c, errMsg: i, errHandler: r, changeHandler: d, isFileUpload: g, formatTitle: _, get IconQuestionCircle() {
|
|
951
954
|
return Sn;
|
|
952
955
|
} };
|
|
953
|
-
return Object.defineProperty(
|
|
956
|
+
return Object.defineProperty(k, "__isScriptSetup", { enumerable: !1, value: !0 }), k;
|
|
954
957
|
}
|
|
955
958
|
}), Pn = { class: "title" }, Nn = {
|
|
956
959
|
key: 0,
|
|
@@ -961,22 +964,22 @@ const In = Object.assign(De, {
|
|
|
961
964
|
};
|
|
962
965
|
function Dn(t, n, a, e, o, l) {
|
|
963
966
|
const s = w("a-tooltip");
|
|
964
|
-
return
|
|
967
|
+
return f(), V("div", null, [
|
|
965
968
|
y("div", Pn, [
|
|
966
|
-
re(te(e.props?.config?.widget?.title) + " ", 1),
|
|
967
|
-
e.props.config.validations.length ? (
|
|
968
|
-
e.props.config.widget.isVisible ? (
|
|
969
|
+
re(te(e.formatTitle(e.props?.config?.widget?.title)) + " ", 1),
|
|
970
|
+
e.props.config.validations.length ? (f(), V("span", Nn, "*")) : ne("", !0),
|
|
971
|
+
e.props.config.widget.isVisible ? (f(), F(s, {
|
|
969
972
|
key: 1,
|
|
970
973
|
content: e.props.config.outputText
|
|
971
974
|
}, {
|
|
972
|
-
default:
|
|
975
|
+
default: x(() => [
|
|
973
976
|
B(e.IconQuestionCircle, { class: "icon" })
|
|
974
977
|
]),
|
|
975
978
|
_: 1
|
|
976
979
|
}, 8, ["content"])) : ne("", !0)
|
|
977
980
|
]),
|
|
978
981
|
y("div", null, [
|
|
979
|
-
(
|
|
982
|
+
(f(), F(He(e.curComp), {
|
|
980
983
|
ref: "widgetRef",
|
|
981
984
|
modelValue: e.model,
|
|
982
985
|
"onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
|
|
@@ -988,11 +991,11 @@ function Dn(t, n, a, e, o, l) {
|
|
|
988
991
|
onError: e.errHandler,
|
|
989
992
|
onChange: e.changeHandler
|
|
990
993
|
}, null, 40, ["modelValue", "field-key", "config", "validations", "triggers", "class-name"])),
|
|
991
|
-
e.errMsg.length > 0 ? (
|
|
994
|
+
e.errMsg.length > 0 ? (f(), V("div", Un, te(e.errMsg), 1)) : ne("", !0)
|
|
992
995
|
])
|
|
993
996
|
]);
|
|
994
997
|
}
|
|
995
|
-
const
|
|
998
|
+
const je = /* @__PURE__ */ Q(Tn, [["render", Dn], ["__scopeId", "data-v-08801578"], ["__file", "index.vue"]]), Bn = /* @__PURE__ */ E({
|
|
996
999
|
__name: "SubmitButton",
|
|
997
1000
|
props: {
|
|
998
1001
|
url: {},
|
|
@@ -1010,20 +1013,20 @@ const $e = /* @__PURE__ */ Q(Tn, [["render", Dn], ["__scopeId", "data-v-c58800cc
|
|
|
1010
1013
|
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
1011
1014
|
}
|
|
1012
1015
|
});
|
|
1013
|
-
function
|
|
1016
|
+
function Fn(t, n, a, e, o, l) {
|
|
1014
1017
|
const s = w("AButton");
|
|
1015
|
-
return
|
|
1018
|
+
return f(), F(s, {
|
|
1016
1019
|
loading: a.loading,
|
|
1017
1020
|
type: "primary",
|
|
1018
1021
|
onClick: e.clickHandler
|
|
1019
1022
|
}, {
|
|
1020
|
-
default:
|
|
1023
|
+
default: x(() => [
|
|
1021
1024
|
de(t.$slots, "default")
|
|
1022
1025
|
]),
|
|
1023
1026
|
_: 3
|
|
1024
1027
|
}, 8, ["loading"]);
|
|
1025
1028
|
}
|
|
1026
|
-
const Ge = /* @__PURE__ */ Q(Bn, [["render",
|
|
1029
|
+
const Ge = /* @__PURE__ */ Q(Bn, [["render", Fn], ["__file", "SubmitButton.vue"]]), Hn = /* @__PURE__ */ E({
|
|
1027
1030
|
__name: "DetailLink",
|
|
1028
1031
|
props: {
|
|
1029
1032
|
url: {},
|
|
@@ -1041,16 +1044,16 @@ const Ge = /* @__PURE__ */ Q(Bn, [["render", Hn], ["__file", "SubmitButton.vue"]
|
|
|
1041
1044
|
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
1042
1045
|
}
|
|
1043
1046
|
});
|
|
1044
|
-
function
|
|
1047
|
+
function Ln(t, n, a, e, o, l) {
|
|
1045
1048
|
const s = w("ALink");
|
|
1046
|
-
return
|
|
1047
|
-
default:
|
|
1049
|
+
return f(), F(s, { onClick: e.clickHandler }, {
|
|
1050
|
+
default: x(() => [
|
|
1048
1051
|
de(t.$slots, "default")
|
|
1049
1052
|
]),
|
|
1050
1053
|
_: 3
|
|
1051
1054
|
});
|
|
1052
1055
|
}
|
|
1053
|
-
const Rn = /* @__PURE__ */ Q(
|
|
1056
|
+
const Rn = /* @__PURE__ */ Q(Hn, [["render", Ln], ["__file", "DetailLink.vue"]]), jn = /* @__PURE__ */ E({
|
|
1054
1057
|
__name: "index",
|
|
1055
1058
|
props: {
|
|
1056
1059
|
config: {},
|
|
@@ -1076,37 +1079,37 @@ const Rn = /* @__PURE__ */ Q(Ln, [["render", Fn], ["__file", "DetailLink.vue"]])
|
|
|
1076
1079
|
return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
|
|
1077
1080
|
}
|
|
1078
1081
|
});
|
|
1079
|
-
function
|
|
1080
|
-
return
|
|
1082
|
+
function $n(t, n, a, e, o, l) {
|
|
1083
|
+
return f(), F(He(e.curComp), {
|
|
1081
1084
|
url: e.curUrl,
|
|
1082
1085
|
"redirect-type": e.redirectType,
|
|
1083
1086
|
loading: a.loading,
|
|
1084
1087
|
onClick: e.clickHandler
|
|
1085
1088
|
}, {
|
|
1086
|
-
default:
|
|
1089
|
+
default: x(() => [
|
|
1087
1090
|
re(te(e.props.config.title), 1)
|
|
1088
1091
|
]),
|
|
1089
1092
|
_: 1
|
|
1090
1093
|
}, 8, ["url", "redirect-type", "loading"]);
|
|
1091
1094
|
}
|
|
1092
|
-
const Se = /* @__PURE__ */ Q(
|
|
1095
|
+
const Se = /* @__PURE__ */ Q(jn, [["render", $n], ["__file", "index.vue"]]), ot = Symbol("library-router");
|
|
1093
1096
|
function xe() {
|
|
1094
1097
|
const t = me(ot, null);
|
|
1095
1098
|
return t || mt();
|
|
1096
1099
|
}
|
|
1097
1100
|
const at = Symbol("library-triggers");
|
|
1098
|
-
function
|
|
1101
|
+
function $e() {
|
|
1099
1102
|
const t = me(at, null);
|
|
1100
1103
|
return t || {};
|
|
1101
1104
|
}
|
|
1102
|
-
const
|
|
1105
|
+
const On = Symbol("library-pinia"), rt = Symbol("library-bpmStore"), st = Symbol("library-svrStore");
|
|
1103
1106
|
function Ae() {
|
|
1104
1107
|
return me(rt, null);
|
|
1105
1108
|
}
|
|
1106
1109
|
function Ve() {
|
|
1107
1110
|
return me(st, null);
|
|
1108
1111
|
}
|
|
1109
|
-
const
|
|
1112
|
+
const Mn = /* @__PURE__ */ E({
|
|
1110
1113
|
__name: "TopBar",
|
|
1111
1114
|
props: {
|
|
1112
1115
|
title: {},
|
|
@@ -1121,23 +1124,23 @@ const On = /* @__PURE__ */ E({
|
|
|
1121
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" };
|
|
1122
1125
|
function Yn(t, n, a, e, o, l) {
|
|
1123
1126
|
const s = w("a-avatar"), c = w("a-popover");
|
|
1124
|
-
return
|
|
1127
|
+
return f(), V("div", En, [
|
|
1125
1128
|
y("div", zn, [
|
|
1126
1129
|
y("div", Kn, te(a.title), 1),
|
|
1127
1130
|
y("div", Wn, te(a.subTitle), 1)
|
|
1128
1131
|
]),
|
|
1129
1132
|
y("div", Gn, [
|
|
1130
1133
|
B(c, { trigger: "click" }, {
|
|
1131
|
-
content:
|
|
1134
|
+
content: x(() => [
|
|
1132
1135
|
y("div", qn, te(a.email), 1)
|
|
1133
1136
|
]),
|
|
1134
|
-
default:
|
|
1137
|
+
default: x(() => [
|
|
1135
1138
|
B(s, {
|
|
1136
1139
|
size: 48,
|
|
1137
1140
|
autoFixFontSize: "",
|
|
1138
1141
|
style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
|
|
1139
1142
|
}, {
|
|
1140
|
-
default:
|
|
1143
|
+
default: x(() => [
|
|
1141
1144
|
re(te(a.email.charAt(0).toUpperCase()), 1)
|
|
1142
1145
|
]),
|
|
1143
1146
|
_: 1
|
|
@@ -1148,9 +1151,9 @@ function Yn(t, n, a, e, o, l) {
|
|
|
1148
1151
|
])
|
|
1149
1152
|
]);
|
|
1150
1153
|
}
|
|
1151
|
-
const Ie = /* @__PURE__ */ Q(
|
|
1152
|
-
function
|
|
1153
|
-
const n =
|
|
1154
|
+
const Ie = /* @__PURE__ */ Q(Mn, [["render", Yn], ["__scopeId", "data-v-c0457235"], ["__file", "TopBar.vue"]]);
|
|
1155
|
+
function Oe(t) {
|
|
1156
|
+
const n = Le(), a = [];
|
|
1154
1157
|
if (n.fieldsGroup) {
|
|
1155
1158
|
n.fieldsGroup.forEach((l) => {
|
|
1156
1159
|
const s = l.keys.map((c) => t.find((i) => i.fieldKey === c)).filter(Boolean);
|
|
@@ -1205,10 +1208,10 @@ class Ce {
|
|
|
1205
1208
|
return Vt(this.pageActionType, this.className, { workflowId: this.getWorkflowId(), email: this.getApproverEmail() });
|
|
1206
1209
|
}
|
|
1207
1210
|
getFiles() {
|
|
1208
|
-
return this.getWorkflowId() ?
|
|
1211
|
+
return this.getWorkflowId() ? $t(this.className, this.getWorkflowId()) : Promise.resolve({});
|
|
1209
1212
|
}
|
|
1210
1213
|
removeFile(n) {
|
|
1211
|
-
return
|
|
1214
|
+
return Ot(this.className, n);
|
|
1212
1215
|
}
|
|
1213
1216
|
getProcess() {
|
|
1214
1217
|
return Rt(this.className, this.getWorkflowId());
|
|
@@ -1220,7 +1223,7 @@ class Ce {
|
|
|
1220
1223
|
return Wt(this.getWorkflowId());
|
|
1221
1224
|
}
|
|
1222
1225
|
getApprovers() {
|
|
1223
|
-
return
|
|
1226
|
+
return Mt();
|
|
1224
1227
|
}
|
|
1225
1228
|
assignApprover(n) {
|
|
1226
1229
|
return Et(this.getWorkflowId(), n);
|
|
@@ -1240,7 +1243,7 @@ const Qn = /* @__PURE__ */ E({
|
|
|
1240
1243
|
},
|
|
1241
1244
|
setup(t, { expose: n }) {
|
|
1242
1245
|
n();
|
|
1243
|
-
const a = Ae(), e = Ve(), o = xe(), l =
|
|
1246
|
+
const a = Ae(), e = Ve(), o = xe(), l = $e(), s = Fe("dataWidgets"), c = pe(), i = t, r = m({
|
|
1244
1247
|
pageType: "",
|
|
1245
1248
|
fields: {},
|
|
1246
1249
|
globalValidations: [],
|
|
@@ -1249,74 +1252,74 @@ const Qn = /* @__PURE__ */ E({
|
|
|
1249
1252
|
subTitle: ""
|
|
1250
1253
|
}
|
|
1251
1254
|
}), d = m([]), g = m({});
|
|
1252
|
-
function _(
|
|
1253
|
-
return
|
|
1254
|
-
fieldKey:
|
|
1255
|
+
function _(h) {
|
|
1256
|
+
return h ? Object.entries(h).map(([S, U]) => ({
|
|
1257
|
+
fieldKey: S,
|
|
1255
1258
|
...U
|
|
1256
|
-
})).filter((
|
|
1259
|
+
})).filter((S) => S.widget && S.widget.widget !== "Hidden").filter((S) => !X.value.includes(S.fieldKey)) : [];
|
|
1257
1260
|
}
|
|
1258
|
-
function
|
|
1259
|
-
return
|
|
1261
|
+
function k(h) {
|
|
1262
|
+
return h ? Object.entries(h).filter(([S, U]) => U.dependent).reduce((S, [U, j]) => (S[U] = j.dependent, S), {}) : [];
|
|
1260
1263
|
}
|
|
1261
|
-
const
|
|
1264
|
+
const u = W(() => r.value?.actions ? [...r.value.actions].reverse() : []), p = m({}), A = m(!1);
|
|
1262
1265
|
ue(async () => {
|
|
1263
|
-
|
|
1264
|
-
const
|
|
1265
|
-
r.value = await
|
|
1266
|
-
for (const
|
|
1267
|
-
if (r.value.fields[
|
|
1268
|
-
const
|
|
1269
|
-
|
|
1266
|
+
A.value = !0;
|
|
1267
|
+
const h = new Te().setWorkflowId(i.workflowId).setClassName(i.className).setStore({ svrStore: e, bpmStore: a }).build();
|
|
1268
|
+
r.value = await h.getPageData(), d.value = _(r.value.fields), g.value = k(r.value.fields);
|
|
1269
|
+
for (const I in r.value.fields) {
|
|
1270
|
+
if (r.value.fields[I].widget?.widget === "File") {
|
|
1271
|
+
const S = d.value.find((U) => U.fieldKey === I);
|
|
1272
|
+
S && S.widget && (S.widget.files = []);
|
|
1270
1273
|
}
|
|
1271
|
-
p.value[
|
|
1274
|
+
p.value[I] = r.value.fields[I].modelValue;
|
|
1272
1275
|
}
|
|
1273
|
-
|
|
1276
|
+
A.value = !1;
|
|
1274
1277
|
});
|
|
1275
1278
|
function J() {
|
|
1276
1279
|
return e()?.userInfo?.email_address ?? "";
|
|
1277
1280
|
}
|
|
1278
|
-
async function Z(
|
|
1279
|
-
switch (
|
|
1281
|
+
async function Z(h, I, S, U, j) {
|
|
1282
|
+
switch (I) {
|
|
1280
1283
|
case Y.Submit:
|
|
1281
|
-
let
|
|
1284
|
+
let L = !0;
|
|
1282
1285
|
if (s.value?.forEach((G) => {
|
|
1283
|
-
G?.validate && (G.validate() || (
|
|
1284
|
-
}), !
|
|
1286
|
+
G?.validate && (G.validate() || (L = !1));
|
|
1287
|
+
}), !L) {
|
|
1285
1288
|
c?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
1286
1289
|
return;
|
|
1287
1290
|
}
|
|
1288
|
-
|
|
1291
|
+
A.value = !0;
|
|
1289
1292
|
try {
|
|
1290
|
-
const G = await Tt(i.className, { ...p.value, ...g.value },
|
|
1291
|
-
await Promise.all(se),
|
|
1293
|
+
const G = await Tt(i.className, { ...p.value, ...g.value }, S), se = s.value?.map((ie) => ie?.submit ? ie.submit(G.toString()) : Promise.resolve()) || [];
|
|
1294
|
+
await Promise.all(se), A.value = !1, c?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${G.toString()}.`), o.push({ name: "Details", params: { workflowId: G.toString() } });
|
|
1292
1295
|
} catch {
|
|
1293
|
-
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"), A.value = !1;
|
|
1294
1297
|
}
|
|
1295
1298
|
break;
|
|
1296
1299
|
case Y.Link:
|
|
1297
1300
|
try {
|
|
1298
|
-
await l[
|
|
1301
|
+
await l[h.eventName || ""]?.(p.value, X), o.push({ name: U, params: { className: i.className } });
|
|
1299
1302
|
} catch (G) {
|
|
1300
1303
|
console.error("Error in link action trigger:", G);
|
|
1301
1304
|
}
|
|
1302
1305
|
break;
|
|
1303
1306
|
default:
|
|
1304
|
-
console.warn("Unknown action type:",
|
|
1307
|
+
console.warn("Unknown action type:", I);
|
|
1305
1308
|
}
|
|
1306
1309
|
}
|
|
1307
|
-
const
|
|
1310
|
+
const $ = [
|
|
1308
1311
|
"jobScpope",
|
|
1309
1312
|
"currentWorkdayId",
|
|
1310
1313
|
"originalGrade",
|
|
1311
1314
|
"jobTitlePrevious",
|
|
1312
1315
|
"jobAttachmentPrevious",
|
|
1313
1316
|
"positionId"
|
|
1314
|
-
], X = m(
|
|
1315
|
-
function oe(
|
|
1316
|
-
l[
|
|
1317
|
+
], X = m($);
|
|
1318
|
+
function oe(h, I) {
|
|
1319
|
+
l[h]?.({ fieldValue: I, hiddenFields: X, formData: p }), r.value && (d.value = _(r.value.fields));
|
|
1317
1320
|
}
|
|
1318
|
-
const
|
|
1319
|
-
return Object.defineProperty(
|
|
1321
|
+
const C = W(() => Oe(d.value)), b = { bpmStore: a, svrStore: e, router: o, triggers: l, dataWidgetsRefs: s, instance: c, props: i, pageData: r, _fields: d, _dependent: g, genField: _, genDependentField: k, reversedActions: u, _data: p, loading: A, getApproverEmail: J, clickHandler: Z, newHiddenFields: $, hiddenFields: X, changeHandler: oe, groupedFields: C, DataWidgets: je, ActionButton: Se, TopBar: Ie };
|
|
1322
|
+
return Object.defineProperty(b, "__isScriptSetup", { enumerable: !1, value: !0 }), b;
|
|
1320
1323
|
}
|
|
1321
1324
|
}), Jn = { class: "page-container" }, Xn = { class: "page-body" }, Zn = { class: "form-card" }, eo = { class: "form-fields-vertical" }, to = { class: "form-fields" }, no = {
|
|
1322
1325
|
key: 0,
|
|
@@ -1324,7 +1327,7 @@ const Qn = /* @__PURE__ */ E({
|
|
|
1324
1327
|
}, oo = { class: "page-footer" }, ao = { class: "action-container" }, ro = { class: "action-buttons" };
|
|
1325
1328
|
function so(t, n, a, e, o, l) {
|
|
1326
1329
|
const s = w("a-card"), c = w("a-spin");
|
|
1327
|
-
return
|
|
1330
|
+
return f(), V("div", Jn, [
|
|
1328
1331
|
B(e.TopBar, {
|
|
1329
1332
|
title: e.pageData.banner.title,
|
|
1330
1333
|
subTitle: e.pageData.banner.subTitle,
|
|
@@ -1335,17 +1338,17 @@ function so(t, n, a, e, o, l) {
|
|
|
1335
1338
|
loading: e.loading,
|
|
1336
1339
|
class: "form-container"
|
|
1337
1340
|
}, {
|
|
1338
|
-
default:
|
|
1341
|
+
default: x(() => [
|
|
1339
1342
|
y("div", Zn, [
|
|
1340
1343
|
y("div", eo, [
|
|
1341
|
-
(
|
|
1344
|
+
(f(!0), V(M, null, q(e.groupedFields, (i) => (f(), F(s, {
|
|
1342
1345
|
key: i.name,
|
|
1343
1346
|
title: i.name,
|
|
1344
1347
|
style: { "margin-bottom": "24px" }
|
|
1345
1348
|
}, {
|
|
1346
|
-
default:
|
|
1349
|
+
default: x(() => [
|
|
1347
1350
|
y("div", to, [
|
|
1348
|
-
(
|
|
1351
|
+
(f(!0), V(M, null, q(i.fields, (r) => (f(), F(e.DataWidgets, {
|
|
1349
1352
|
key: r.fieldKey,
|
|
1350
1353
|
ref_for: !0,
|
|
1351
1354
|
ref: "dataWidgets",
|
|
@@ -1362,7 +1365,7 @@ function so(t, n, a, e, o, l) {
|
|
|
1362
1365
|
_: 2
|
|
1363
1366
|
}, 1032, ["title"]))), 128))
|
|
1364
1367
|
]),
|
|
1365
|
-
t.$slots.content ? (
|
|
1368
|
+
t.$slots.content ? (f(), V("div", no, [
|
|
1366
1369
|
de(t.$slots, "content", {}, void 0, !0)
|
|
1367
1370
|
])) : ne("", !0)
|
|
1368
1371
|
])
|
|
@@ -1374,8 +1377,8 @@ function so(t, n, a, e, o, l) {
|
|
|
1374
1377
|
y("div", ao, [
|
|
1375
1378
|
de(t.$slots, "action", {}, void 0, !0),
|
|
1376
1379
|
y("div", ro, [
|
|
1377
|
-
(
|
|
1378
|
-
key: i.
|
|
1380
|
+
(f(!0), V(M, null, q(e.reversedActions, (i) => (f(), F(e.ActionButton, {
|
|
1381
|
+
key: i.title,
|
|
1379
1382
|
loading: e.loading,
|
|
1380
1383
|
config: i,
|
|
1381
1384
|
class: "action-button",
|
|
@@ -1386,7 +1389,7 @@ function so(t, n, a, e, o, l) {
|
|
|
1386
1389
|
])
|
|
1387
1390
|
]);
|
|
1388
1391
|
}
|
|
1389
|
-
const io = /* @__PURE__ */ Q(Qn, [["render", so], ["__scopeId", "data-v-
|
|
1392
|
+
const io = /* @__PURE__ */ Q(Qn, [["render", so], ["__scopeId", "data-v-2fce8732"], ["__file", "CreateView.vue"]]), lo = /* @__PURE__ */ E({
|
|
1390
1393
|
__name: "UpdateView",
|
|
1391
1394
|
props: {
|
|
1392
1395
|
className: {},
|
|
@@ -1394,7 +1397,7 @@ const io = /* @__PURE__ */ Q(Qn, [["render", so], ["__scopeId", "data-v-68ab1bc3
|
|
|
1394
1397
|
},
|
|
1395
1398
|
setup(t, { expose: n }) {
|
|
1396
1399
|
n();
|
|
1397
|
-
const a = xe(), e =
|
|
1400
|
+
const a = xe(), e = $e(), o = Ve(), l = Ae(), s = Fe("dataWidgets"), c = pe(), i = t, r = m({
|
|
1398
1401
|
pageType: "",
|
|
1399
1402
|
fields: {},
|
|
1400
1403
|
globalValidations: [],
|
|
@@ -1403,73 +1406,73 @@ const io = /* @__PURE__ */ Q(Qn, [["render", so], ["__scopeId", "data-v-68ab1bc3
|
|
|
1403
1406
|
subTitle: ""
|
|
1404
1407
|
}
|
|
1405
1408
|
}), d = m([]), g = m({});
|
|
1406
|
-
function _(
|
|
1407
|
-
return
|
|
1408
|
-
fieldKey:
|
|
1409
|
-
...
|
|
1410
|
-
})).filter((
|
|
1409
|
+
function _(b) {
|
|
1410
|
+
return b ? Object.entries(b).map(([I, S]) => ({
|
|
1411
|
+
fieldKey: I,
|
|
1412
|
+
...S
|
|
1413
|
+
})).filter((I) => I.widget && I.widget.widget !== "Hidden").filter((I) => !$.value.includes(I.fieldKey)) : [];
|
|
1411
1414
|
}
|
|
1412
|
-
function b
|
|
1413
|
-
return
|
|
1415
|
+
function k(b) {
|
|
1416
|
+
return b ? Object.entries(b).filter(([I, S]) => S.dependent).reduce((I, [S, U]) => (I[S] = U.dependent, I), {}) : [];
|
|
1414
1417
|
}
|
|
1415
|
-
const
|
|
1418
|
+
const u = W(() => r.value?.actions ? [...r.value.actions].reverse() : []), p = m({}), A = m(!1);
|
|
1416
1419
|
ue(async () => {
|
|
1417
|
-
|
|
1418
|
-
const
|
|
1419
|
-
r.value = await
|
|
1420
|
-
const
|
|
1420
|
+
A.value = !0;
|
|
1421
|
+
const b = new Te().setPageActionType(fe.Update).setClassName(i.className).setStore({ svrStore: o, bpmStore: l }).setWorkflowId(i.workflowId).build();
|
|
1422
|
+
r.value = await b.getPageData();
|
|
1423
|
+
const h = await b.getBtnList(), I = await b.getFiles();
|
|
1421
1424
|
r.value.actions = r.value.actions?.filter((U) => {
|
|
1422
|
-
const
|
|
1423
|
-
return
|
|
1425
|
+
const j = h.find((L) => L.button === U.title);
|
|
1426
|
+
return j ? j.isShow : !0;
|
|
1424
1427
|
});
|
|
1425
|
-
const
|
|
1426
|
-
e.Test?.({ fieldValue:
|
|
1428
|
+
const S = r.value.fields.requestType.modelValue;
|
|
1429
|
+
e.Test?.({ fieldValue: S, hiddenFields: $, formData: p }), d.value = _(r.value.fields), g.value = k(r.value.fields);
|
|
1427
1430
|
for (const U in r.value.fields) {
|
|
1428
1431
|
if (r.value.fields[U].widget?.widget === "File") {
|
|
1429
|
-
const
|
|
1430
|
-
|
|
1432
|
+
const j = d.value.find((L) => L.fieldKey === U);
|
|
1433
|
+
j && j.widget && (j.widget.files = I[U] ?? [], j.widget.removeFile = (L) => b.removeFile(L));
|
|
1431
1434
|
}
|
|
1432
1435
|
p.value[U] = r.value.fields[U].modelValue;
|
|
1433
1436
|
}
|
|
1434
|
-
|
|
1437
|
+
A.value = !1;
|
|
1435
1438
|
});
|
|
1436
1439
|
function J() {
|
|
1437
1440
|
return o()?.userInfo?.email_address ?? "";
|
|
1438
1441
|
}
|
|
1439
|
-
async function Z(
|
|
1440
|
-
switch (
|
|
1442
|
+
async function Z(b, h, I, S, U) {
|
|
1443
|
+
switch (h) {
|
|
1441
1444
|
case Y.Submit:
|
|
1442
|
-
let
|
|
1443
|
-
if (s.value?.forEach((
|
|
1444
|
-
|
|
1445
|
-
}),
|
|
1445
|
+
let j = !0;
|
|
1446
|
+
if (s.value?.forEach((L) => {
|
|
1447
|
+
L?.validate && (L.validate() || (j = !1));
|
|
1448
|
+
}), !j) {
|
|
1446
1449
|
c?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
1447
1450
|
return;
|
|
1448
1451
|
}
|
|
1449
|
-
|
|
1452
|
+
A.value = !0;
|
|
1450
1453
|
try {
|
|
1451
|
-
const
|
|
1452
|
-
await Promise.all(G),
|
|
1454
|
+
const L = await Pt(i.className, i.workflowId, { ...p.value, ...g.value }, I), G = s.value?.map((se) => se?.submit ? se.submit(L.toString()) : Promise.resolve()) || [];
|
|
1455
|
+
await Promise.all(G), A.value = !1, c?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${L.toString()}.`);
|
|
1453
1456
|
} catch {
|
|
1454
|
-
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"), A.value = !1;
|
|
1455
1458
|
}
|
|
1456
1459
|
break;
|
|
1457
1460
|
case Y.Link:
|
|
1458
1461
|
try {
|
|
1459
|
-
await e[
|
|
1462
|
+
await e[b.eventName || ""]?.(p.value, $), a.push({ name: S, params: { className: i.className } });
|
|
1460
1463
|
} catch {
|
|
1461
1464
|
}
|
|
1462
1465
|
break;
|
|
1463
1466
|
default:
|
|
1464
|
-
console.warn("Unknown action type:",
|
|
1467
|
+
console.warn("Unknown action type:", h);
|
|
1465
1468
|
}
|
|
1466
1469
|
}
|
|
1467
|
-
const
|
|
1468
|
-
function X(
|
|
1469
|
-
e[
|
|
1470
|
+
const $ = m([]);
|
|
1471
|
+
function X(b, h) {
|
|
1472
|
+
e[b]?.({ fieldValue: h, hiddenFields: $, formData: p }), r.value && (d.value = _(r.value.fields));
|
|
1470
1473
|
}
|
|
1471
|
-
const oe = W(() =>
|
|
1472
|
-
return Object.defineProperty(
|
|
1474
|
+
const oe = W(() => Oe(d.value)), C = { router: a, triggers: e, svrStore: o, bpmStore: l, dataWidgetsRefs: s, instance: c, props: i, pageData: r, _fields: d, _dependent: g, genField: _, genDependentField: k, reversedActions: u, _data: p, loading: A, getApproverEmail: J, clickHandler: Z, hiddenFields: $, changeHandler: X, groupedFields: oe, DataWidgets: je, ActionButton: Se, TopBar: Ie };
|
|
1475
|
+
return Object.defineProperty(C, "__isScriptSetup", { enumerable: !1, value: !0 }), C;
|
|
1473
1476
|
}
|
|
1474
1477
|
}), co = { class: "page-container" }, uo = { class: "page-body" }, fo = { class: "form-card" }, po = { class: "form-fields-vertical" }, mo = { class: "form-fields" }, go = {
|
|
1475
1478
|
key: 0,
|
|
@@ -1477,7 +1480,7 @@ const io = /* @__PURE__ */ Q(Qn, [["render", so], ["__scopeId", "data-v-68ab1bc3
|
|
|
1477
1480
|
}, _o = { class: "page-footer" }, vo = { class: "action-container" }, bo = { class: "action-buttons" };
|
|
1478
1481
|
function ho(t, n, a, e, o, l) {
|
|
1479
1482
|
const s = w("a-card"), c = w("a-spin");
|
|
1480
|
-
return
|
|
1483
|
+
return f(), V("div", co, [
|
|
1481
1484
|
B(e.TopBar, {
|
|
1482
1485
|
title: e.pageData.banner.title,
|
|
1483
1486
|
subTitle: e.pageData.banner.subTitle,
|
|
@@ -1488,17 +1491,17 @@ function ho(t, n, a, e, o, l) {
|
|
|
1488
1491
|
loading: e.loading,
|
|
1489
1492
|
class: "form-container"
|
|
1490
1493
|
}, {
|
|
1491
|
-
default:
|
|
1494
|
+
default: x(() => [
|
|
1492
1495
|
y("div", fo, [
|
|
1493
1496
|
y("div", po, [
|
|
1494
|
-
(
|
|
1497
|
+
(f(!0), V(M, null, q(e.groupedFields, (i) => (f(), F(s, {
|
|
1495
1498
|
key: i.name,
|
|
1496
1499
|
title: i.name,
|
|
1497
1500
|
style: { "margin-bottom": "24px" }
|
|
1498
1501
|
}, {
|
|
1499
|
-
default:
|
|
1502
|
+
default: x(() => [
|
|
1500
1503
|
y("div", mo, [
|
|
1501
|
-
(
|
|
1504
|
+
(f(!0), V(M, null, q(i.fields, (r) => (f(), F(e.DataWidgets, {
|
|
1502
1505
|
key: r.fieldKey,
|
|
1503
1506
|
ref_for: !0,
|
|
1504
1507
|
ref: "dataWidgets",
|
|
@@ -1515,7 +1518,7 @@ function ho(t, n, a, e, o, l) {
|
|
|
1515
1518
|
_: 2
|
|
1516
1519
|
}, 1032, ["title"]))), 128))
|
|
1517
1520
|
]),
|
|
1518
|
-
t.$slots.content ? (
|
|
1521
|
+
t.$slots.content ? (f(), V("div", go, [
|
|
1519
1522
|
de(t.$slots, "content", {}, void 0, !0)
|
|
1520
1523
|
])) : ne("", !0)
|
|
1521
1524
|
])
|
|
@@ -1527,8 +1530,8 @@ function ho(t, n, a, e, o, l) {
|
|
|
1527
1530
|
y("div", vo, [
|
|
1528
1531
|
de(t.$slots, "action", {}, void 0, !0),
|
|
1529
1532
|
y("div", bo, [
|
|
1530
|
-
(
|
|
1531
|
-
key: i.
|
|
1533
|
+
(f(!0), V(M, null, q(e.reversedActions, (i) => (f(), F(e.ActionButton, {
|
|
1534
|
+
key: i.title,
|
|
1532
1535
|
loading: e.loading,
|
|
1533
1536
|
config: i,
|
|
1534
1537
|
class: "action-button",
|
|
@@ -1539,7 +1542,7 @@ function ho(t, n, a, e, o, l) {
|
|
|
1539
1542
|
])
|
|
1540
1543
|
]);
|
|
1541
1544
|
}
|
|
1542
|
-
const yo = /* @__PURE__ */ Q(lo, [["render", ho], ["__scopeId", "data-v-
|
|
1545
|
+
const yo = /* @__PURE__ */ Q(lo, [["render", ho], ["__scopeId", "data-v-a0ee3911"], ["__file", "UpdateView.vue"]]), it = Symbol("library-custom-comp");
|
|
1543
1546
|
function wo() {
|
|
1544
1547
|
return me(it, null);
|
|
1545
1548
|
}
|
|
@@ -1551,7 +1554,7 @@ const ko = /* @__PURE__ */ E({
|
|
|
1551
1554
|
},
|
|
1552
1555
|
setup(t, { expose: n }) {
|
|
1553
1556
|
n();
|
|
1554
|
-
const a = Ve(), e = Ae(), o =
|
|
1557
|
+
const a = Ve(), e = Ae(), o = $e(), l = xe(), s = wo(), c = pe(), i = t;
|
|
1555
1558
|
let r;
|
|
1556
1559
|
const d = m({
|
|
1557
1560
|
pageType: "",
|
|
@@ -1563,13 +1566,13 @@ const ko = /* @__PURE__ */ E({
|
|
|
1563
1566
|
}
|
|
1564
1567
|
}), g = m([]);
|
|
1565
1568
|
function _(P) {
|
|
1566
|
-
return P ? Object.entries(P).map(([
|
|
1567
|
-
fieldKey:
|
|
1569
|
+
return P ? Object.entries(P).map(([O, T]) => (typeof T.modelValue == "boolean" ? T.fieldValue = T.modelValue ? "Yes" : "No" : T.fieldValue = T.modelValue, {
|
|
1570
|
+
fieldKey: O,
|
|
1568
1571
|
...T
|
|
1569
|
-
})).filter((
|
|
1572
|
+
})).filter((O) => O.widget && O.widget.widget !== "Hidden").filter((O) => !b.value.includes(O.fieldKey)) : [];
|
|
1570
1573
|
}
|
|
1571
|
-
const
|
|
1572
|
-
const
|
|
1574
|
+
const k = W(() => Oe(g.value)), u = W(() => d.value?.actions ? [...d.value.actions].reverse() : []), p = m(!0), A = (P, H) => {
|
|
1575
|
+
const O = P.findIndex((T) => T.isCurrent);
|
|
1573
1576
|
return P.map((T, ae) => {
|
|
1574
1577
|
const D = {
|
|
1575
1578
|
id: T.id,
|
|
@@ -1582,7 +1585,7 @@ const ko = /* @__PURE__ */ E({
|
|
|
1582
1585
|
};
|
|
1583
1586
|
D.title = T.workflowProcessApprovers[0]?.name;
|
|
1584
1587
|
const ve = T.workflowProcessApprovers[T.workflowProcessApprovers.length - 1], we = T.workflowHistorys[T.workflowHistorys.length - 1], be = we?.workflowHistoryApprovers[we?.workflowHistoryApprovers?.length - 1];
|
|
1585
|
-
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 &&
|
|
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)
|
|
1586
1589
|
D.desc = "In Approval", D.status = 1;
|
|
1587
1590
|
else {
|
|
1588
1591
|
const ee = T.workflowHistorys[T.workflowHistorys.length - 1];
|
|
@@ -1594,54 +1597,54 @@ const ko = /* @__PURE__ */ E({
|
|
|
1594
1597
|
if (D.time = ke(ee.takeActionAt, "yyyy-MM-dd hh:mm:ss"), T.sort === 1)
|
|
1595
1598
|
D.status = 2, D.desc = "";
|
|
1596
1599
|
else {
|
|
1597
|
-
const
|
|
1598
|
-
D.status = 3, D.desc =
|
|
1600
|
+
const Me = ee.workflowHistoryApprovers[0];
|
|
1601
|
+
D.status = 3, D.desc = Me?.reason ? `Rejected reason: ${Me.reason}` : "Rejected";
|
|
1599
1602
|
}
|
|
1600
|
-
else ae <
|
|
1603
|
+
else ae < O || O === -1 ? (D.status = 0, D.desc = "Skipped") : (D.status = 0, D.desc = "Pending Approval");
|
|
1601
1604
|
ee && ee.status;
|
|
1602
1605
|
}
|
|
1603
1606
|
return D;
|
|
1604
1607
|
});
|
|
1605
|
-
}, J = m([]), Z = m(!1),
|
|
1606
|
-
async function
|
|
1608
|
+
}, J = m([]), Z = m(!1), $ = m(!1), X = m(!1), oe = m(!1);
|
|
1609
|
+
async function C() {
|
|
1607
1610
|
const P = await r.getBtnList();
|
|
1608
|
-
d.value.actions = d.value.actions?.filter((
|
|
1609
|
-
const
|
|
1610
|
-
return
|
|
1611
|
-
}), Z.value = P.find((
|
|
1611
|
+
d.value.actions = d.value.actions?.filter((H) => {
|
|
1612
|
+
const O = P.find((T) => T.button === H.title);
|
|
1613
|
+
return O ? O.isShow : !0;
|
|
1614
|
+
}), Z.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;
|
|
1612
1615
|
}
|
|
1613
|
-
const
|
|
1614
|
-
async function
|
|
1616
|
+
const b = m([]);
|
|
1617
|
+
async function h() {
|
|
1615
1618
|
p.value = !0, r = new Te().setPageActionType(fe.Details).setClassName(i.className).setStore({ svrStore: a, bpmStore: e }).setWorkflowId(i.workflowId).build(), d.value = await r.getPageData();
|
|
1616
1619
|
const P = await r.getFiles();
|
|
1617
|
-
se.value = await r.getApprovers(),
|
|
1618
|
-
const
|
|
1619
|
-
o.Test?.({ fieldValue:
|
|
1620
|
+
se.value = await r.getApprovers(), L.value = await r.getCommentsHistory(), ie.value = await r.getAssociator(), C();
|
|
1621
|
+
const H = d.value.fields.requestType.modelValue;
|
|
1622
|
+
o.Test?.({ fieldValue: H, hiddenFields: b }), g.value = _(d.value.fields);
|
|
1620
1623
|
for (const T in d.value.fields)
|
|
1621
1624
|
if (d.value.fields[T].widget?.widget === "File") {
|
|
1622
1625
|
const ae = g.value.find((D) => D.fieldKey === T);
|
|
1623
1626
|
ae && ae.widget && (ae.widget.files = P[T] ?? []);
|
|
1624
1627
|
}
|
|
1625
|
-
const
|
|
1626
|
-
J.value =
|
|
1628
|
+
const O = await r.getProcess();
|
|
1629
|
+
J.value = A(O, 0), p.value = !1;
|
|
1627
1630
|
}
|
|
1628
|
-
ue(
|
|
1629
|
-
async function
|
|
1630
|
-
return o[P]?.(
|
|
1631
|
+
ue(h);
|
|
1632
|
+
async function I(P, H) {
|
|
1633
|
+
return o[P]?.(H);
|
|
1631
1634
|
}
|
|
1632
|
-
function
|
|
1635
|
+
function S() {
|
|
1633
1636
|
return a()?.userInfo?.email_address ?? "";
|
|
1634
1637
|
}
|
|
1635
|
-
async function U(P,
|
|
1638
|
+
async function U(P, H, O, T, ae) {
|
|
1636
1639
|
try {
|
|
1637
|
-
switch (
|
|
1640
|
+
switch (H) {
|
|
1638
1641
|
case Y.Submit:
|
|
1639
|
-
const { reason: D, ifGlobal: ve } = await
|
|
1642
|
+
const { reason: D, ifGlobal: ve } = await I(ae, { isGlobal: Z.value });
|
|
1640
1643
|
p.value = !0;
|
|
1641
1644
|
const we = ae === "Approve" ? "100" : "-1";
|
|
1642
|
-
await
|
|
1645
|
+
await Ht(i.className, i.workflowId, S(), D, [Number(i.workflowId)], O, we, ve), p.value = !1;
|
|
1643
1646
|
const be = ae === "Approve" ? `Request ID ${i.workflowId} has been approved.` : `Request ID ${i.workflowId} has been rejected.`;
|
|
1644
|
-
c?.appContext.config.globalProperties.$notification.success(be),
|
|
1647
|
+
c?.appContext.config.globalProperties.$notification.success(be), h();
|
|
1645
1648
|
break;
|
|
1646
1649
|
case Y.Link:
|
|
1647
1650
|
try {
|
|
@@ -1654,19 +1657,19 @@ const ko = /* @__PURE__ */ E({
|
|
|
1654
1657
|
await o[P.eventName || ""]?.({
|
|
1655
1658
|
approvers: se,
|
|
1656
1659
|
associators: ie,
|
|
1657
|
-
isShowAssignSelect:
|
|
1660
|
+
isShowAssignSelect: $,
|
|
1658
1661
|
isShowAssignList: X,
|
|
1659
1662
|
assignCallback: _e,
|
|
1660
1663
|
deleteAssociatorCallback: N
|
|
1661
1664
|
});
|
|
1662
1665
|
break;
|
|
1663
1666
|
default:
|
|
1664
|
-
console.warn("Unknown action type:",
|
|
1667
|
+
console.warn("Unknown action type:", H);
|
|
1665
1668
|
}
|
|
1666
1669
|
} catch {
|
|
1667
1670
|
}
|
|
1668
1671
|
}
|
|
1669
|
-
const
|
|
1672
|
+
const j = m(""), L = m([]), G = m(""), se = m([]), ie = m([]);
|
|
1670
1673
|
async function _e(P) {
|
|
1671
1674
|
if (!P) {
|
|
1672
1675
|
c?.appContext.config.globalProperties.$message.error("Please select an approver");
|
|
@@ -1674,21 +1677,21 @@ const ko = /* @__PURE__ */ E({
|
|
|
1674
1677
|
}
|
|
1675
1678
|
await v("Confirm Assign Approver", "Do you want to assign the selected approver?");
|
|
1676
1679
|
try {
|
|
1677
|
-
await r.assignApprover(P), ie.value = await r.getAssociator(),
|
|
1678
|
-
} catch (
|
|
1679
|
-
if (
|
|
1680
|
+
await r.assignApprover(P), ie.value = await r.getAssociator(), C(), c?.appContext.config.globalProperties.$notification.success("Assign Approver clicked!");
|
|
1681
|
+
} catch (H) {
|
|
1682
|
+
if (H.status === 409) {
|
|
1680
1683
|
c?.appContext.config.globalProperties.$notification.error("This user is already an associator");
|
|
1681
1684
|
return;
|
|
1682
1685
|
}
|
|
1683
1686
|
c?.appContext.config.globalProperties.$notification.error("Failed to assign approver");
|
|
1684
1687
|
}
|
|
1685
1688
|
}
|
|
1686
|
-
async function v(P,
|
|
1687
|
-
const { Modal:
|
|
1689
|
+
async function v(P, H) {
|
|
1690
|
+
const { Modal: O } = await import("@arco-design/web-vue");
|
|
1688
1691
|
return new Promise((T, ae) => {
|
|
1689
|
-
|
|
1692
|
+
O.confirm({
|
|
1690
1693
|
title: P,
|
|
1691
|
-
content:
|
|
1694
|
+
content: H,
|
|
1692
1695
|
okText: "OK",
|
|
1693
1696
|
cancelText: "Cancel",
|
|
1694
1697
|
onOk: () => T(!0),
|
|
@@ -1709,17 +1712,17 @@ const ko = /* @__PURE__ */ E({
|
|
|
1709
1712
|
}
|
|
1710
1713
|
}
|
|
1711
1714
|
async function R() {
|
|
1712
|
-
if (
|
|
1715
|
+
if (!j.value.trim()) {
|
|
1713
1716
|
c?.appContext.config.globalProperties.$message.error("Comment cannot be empty");
|
|
1714
1717
|
return;
|
|
1715
1718
|
}
|
|
1716
|
-
await r.addComments(
|
|
1719
|
+
await r.addComments(j.value.trim()), j.value = "", L.value = await r.getCommentsHistory(), c?.appContext.config.globalProperties.$notification.success("Add Comment clicked!");
|
|
1717
1720
|
}
|
|
1718
1721
|
const le = { svrStore: a, bpmStore: e, triggers: o, router: l, customComps: s, instance: c, props: i, get page() {
|
|
1719
1722
|
return r;
|
|
1720
1723
|
}, set page(P) {
|
|
1721
1724
|
r = P;
|
|
1722
|
-
}, pageData: d, _fields: g, genField: _, groupedFields:
|
|
1725
|
+
}, pageData: d, _fields: g, genField: _, groupedFields: k, reversedActions: u, loading: p, mapWorkflowSteps: A, steps: J, isGlobal: Z, isShowAssignSelect: $, isShowAssignList: X, isShowCommentTextArea: oe, reloadButtonList: C, hiddenFields: b, load: h, triggerFn: I, getApproverEmail: S, clickHandler: U, comment: j, commentsHistory: L, selectedApprover: G, approvers: se, associators: ie, onAssignApprover: _e, confirmDialog: v, onDeleteAssociator: N, onAddComment: R, ActionButton: Se, get IconDownload() {
|
|
1723
1726
|
return In;
|
|
1724
1727
|
}, TopBar: Ie, get formatDate() {
|
|
1725
1728
|
return ke;
|
|
@@ -1735,51 +1738,51 @@ const ko = /* @__PURE__ */ E({
|
|
|
1735
1738
|
}, Uo = { class: "detail-field" }, Do = {
|
|
1736
1739
|
key: 0,
|
|
1737
1740
|
class: "detail-content"
|
|
1738
|
-
}, Bo = { class: "page-footer" },
|
|
1739
|
-
function
|
|
1741
|
+
}, Bo = { class: "page-footer" }, Fo = { class: "action-container" }, Ho = { class: "action-buttons" };
|
|
1742
|
+
function Lo(t, n, a, e, o, l) {
|
|
1740
1743
|
const s = w("a-link"), c = w("a-space"), i = w("a-card");
|
|
1741
1744
|
w("a-option"), w("a-select");
|
|
1742
|
-
const r = w("a-button"), d = w("a-list-item"), g = w("a-list"), _ = w("a-textarea"),
|
|
1743
|
-
return
|
|
1745
|
+
const r = w("a-button"), d = w("a-list-item"), g = w("a-list"), _ = w("a-textarea"), k = w("a-spin");
|
|
1746
|
+
return f(), V("div", Co, [
|
|
1744
1747
|
B(e.TopBar, {
|
|
1745
1748
|
title: e.pageData.banner.title,
|
|
1746
1749
|
subTitle: e.pageData.banner.subTitle,
|
|
1747
1750
|
email: e.getApproverEmail()
|
|
1748
1751
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1749
1752
|
y("div", So, [
|
|
1750
|
-
B(
|
|
1753
|
+
B(k, {
|
|
1751
1754
|
loading: e.loading,
|
|
1752
1755
|
class: "detail-container"
|
|
1753
1756
|
}, {
|
|
1754
|
-
default:
|
|
1757
|
+
default: x(() => [
|
|
1755
1758
|
y("div", xo, [
|
|
1756
|
-
(
|
|
1759
|
+
(f(), F(He(e.customComps.Steps), { steps: e.steps }, null, 8, ["steps"])),
|
|
1757
1760
|
y("div", Ao, [
|
|
1758
|
-
(
|
|
1759
|
-
key:
|
|
1760
|
-
title:
|
|
1761
|
+
(f(!0), V(M, null, q(e.groupedFields, (u) => (f(), F(i, {
|
|
1762
|
+
key: u.name,
|
|
1763
|
+
title: u.name,
|
|
1761
1764
|
style: { "margin-bottom": "24px" }
|
|
1762
1765
|
}, {
|
|
1763
|
-
default:
|
|
1766
|
+
default: x(() => [
|
|
1764
1767
|
y("div", Vo, [
|
|
1765
|
-
(
|
|
1768
|
+
(f(!0), V(M, null, q(u.fields, (p) => (f(), V("div", {
|
|
1766
1769
|
key: p.fieldKey,
|
|
1767
1770
|
class: "detail-field-wrapper"
|
|
1768
1771
|
}, [
|
|
1769
1772
|
y("div", Io, [
|
|
1770
1773
|
y("div", To, te(p.widget?.title), 1),
|
|
1771
|
-
p.widget?.widget === "File" ? (
|
|
1774
|
+
p.widget?.widget === "File" ? (f(!0), V(M, { key: 0 }, q(p.widget.files, (A) => (f(), V("div", {
|
|
1772
1775
|
class: "field-value",
|
|
1773
|
-
key:
|
|
1776
|
+
key: A.id
|
|
1774
1777
|
}, [
|
|
1775
1778
|
B(c, null, {
|
|
1776
|
-
default:
|
|
1777
|
-
re(te(
|
|
1779
|
+
default: x(() => [
|
|
1780
|
+
re(te(A.name) + " ", 1),
|
|
1778
1781
|
B(s, {
|
|
1779
|
-
href:
|
|
1782
|
+
href: A.url,
|
|
1780
1783
|
target: "_blank"
|
|
1781
1784
|
}, {
|
|
1782
|
-
default:
|
|
1785
|
+
default: x(() => [
|
|
1783
1786
|
B(e.IconDownload, { style: { color: "#7A00E6" } })
|
|
1784
1787
|
]),
|
|
1785
1788
|
_: 2
|
|
@@ -1787,7 +1790,7 @@ function Fo(t, n, a, e, o, l) {
|
|
|
1787
1790
|
]),
|
|
1788
1791
|
_: 2
|
|
1789
1792
|
}, 1024)
|
|
1790
|
-
]))), 128)) : (
|
|
1793
|
+
]))), 128)) : (f(), V("div", Po, te(p.fieldValue), 1))
|
|
1791
1794
|
])
|
|
1792
1795
|
]))), 128))
|
|
1793
1796
|
])
|
|
@@ -1796,18 +1799,18 @@ function Fo(t, n, a, e, o, l) {
|
|
|
1796
1799
|
}, 1032, ["title"]))), 128)),
|
|
1797
1800
|
ne("", !0),
|
|
1798
1801
|
ne("", !0),
|
|
1799
|
-
e.isShowCommentTextArea ? (
|
|
1802
|
+
e.isShowCommentTextArea ? (f(), V("div", No, [
|
|
1800
1803
|
y("div", Uo, [
|
|
1801
1804
|
n[6] || (n[6] = y("div", { class: "field-label" }, "Comment", -1)),
|
|
1802
1805
|
B(_, {
|
|
1803
1806
|
modelValue: e.comment,
|
|
1804
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
|
1807
|
+
"onUpdate:modelValue": n[1] || (n[1] = (u) => e.comment = u)
|
|
1805
1808
|
}, null, 8, ["modelValue"]),
|
|
1806
1809
|
B(r, {
|
|
1807
1810
|
type: "primary",
|
|
1808
1811
|
onClick: e.onAddComment
|
|
1809
1812
|
}, {
|
|
1810
|
-
default:
|
|
1813
|
+
default: x(() => n[5] || (n[5] = [
|
|
1811
1814
|
re("Add Comment", -1)
|
|
1812
1815
|
])),
|
|
1813
1816
|
_: 1,
|
|
@@ -1815,16 +1818,16 @@ function Fo(t, n, a, e, o, l) {
|
|
|
1815
1818
|
})
|
|
1816
1819
|
])
|
|
1817
1820
|
])) : ne("", !0),
|
|
1818
|
-
e.commentsHistory.length ? (
|
|
1819
|
-
header:
|
|
1821
|
+
e.commentsHistory.length ? (f(), F(g, { key: 3 }, {
|
|
1822
|
+
header: x(() => n[7] || (n[7] = [
|
|
1820
1823
|
re(" Comments History ", -1)
|
|
1821
1824
|
])),
|
|
1822
|
-
default:
|
|
1823
|
-
(
|
|
1824
|
-
key:
|
|
1825
|
+
default: x(() => [
|
|
1826
|
+
(f(!0), V(M, null, q(e.commentsHistory, (u) => (f(), F(d, {
|
|
1827
|
+
key: u.associator
|
|
1825
1828
|
}, {
|
|
1826
|
-
default:
|
|
1827
|
-
re(te(
|
|
1829
|
+
default: x(() => [
|
|
1830
|
+
re(te(u.associator) + ": " + te(u.comments) + " (" + te(e.formatDate(u.createdAt)) + ") ", 1)
|
|
1828
1831
|
]),
|
|
1829
1832
|
_: 2
|
|
1830
1833
|
}, 1024))), 128))
|
|
@@ -1832,7 +1835,7 @@ function Fo(t, n, a, e, o, l) {
|
|
|
1832
1835
|
_: 1
|
|
1833
1836
|
})) : ne("", !0)
|
|
1834
1837
|
]),
|
|
1835
|
-
t.$slots.content ? (
|
|
1838
|
+
t.$slots.content ? (f(), V("div", Do, [
|
|
1836
1839
|
de(t.$slots, "content", {}, void 0, !0)
|
|
1837
1840
|
])) : ne("", !0)
|
|
1838
1841
|
])
|
|
@@ -1841,22 +1844,22 @@ function Fo(t, n, a, e, o, l) {
|
|
|
1841
1844
|
}, 8, ["loading"])
|
|
1842
1845
|
]),
|
|
1843
1846
|
y("div", Bo, [
|
|
1844
|
-
y("div",
|
|
1847
|
+
y("div", Fo, [
|
|
1845
1848
|
de(t.$slots, "action", {}, void 0, !0),
|
|
1846
|
-
y("div",
|
|
1847
|
-
(
|
|
1848
|
-
key:
|
|
1849
|
+
y("div", Ho, [
|
|
1850
|
+
(f(!0), V(M, null, q(e.reversedActions, (u) => (f(), F(e.ActionButton, {
|
|
1851
|
+
key: u.title,
|
|
1849
1852
|
loading: e.loading,
|
|
1850
|
-
config:
|
|
1853
|
+
config: u,
|
|
1851
1854
|
class: "action-button",
|
|
1852
|
-
onClick: (...p) => e.clickHandler(
|
|
1855
|
+
onClick: (...p) => e.clickHandler(u, ...p)
|
|
1853
1856
|
}, null, 8, ["loading", "config", "onClick"]))), 128))
|
|
1854
1857
|
])
|
|
1855
1858
|
])
|
|
1856
1859
|
])
|
|
1857
1860
|
]);
|
|
1858
1861
|
}
|
|
1859
|
-
const Ro = /* @__PURE__ */ Q(ko, [["render",
|
|
1862
|
+
const Ro = /* @__PURE__ */ Q(ko, [["render", Lo], ["__scopeId", "data-v-180a216d"], ["__file", "DetailView.vue"]]), jo = /* @__PURE__ */ E({
|
|
1860
1863
|
name: "ListView",
|
|
1861
1864
|
__name: "ListView",
|
|
1862
1865
|
props: {
|
|
@@ -1874,7 +1877,7 @@ const Ro = /* @__PURE__ */ Q(ko, [["render", Fo], ["__scopeId", "data-v-9de406ef
|
|
|
1874
1877
|
filters: []
|
|
1875
1878
|
});
|
|
1876
1879
|
function r() {
|
|
1877
|
-
const v = Object.entries(
|
|
1880
|
+
const v = Object.entries(S.value).filter(([, { value: N }]) => N && N !== "").map(([N, { value: R, operator: le }]) => ({
|
|
1878
1881
|
key: N,
|
|
1879
1882
|
value: R,
|
|
1880
1883
|
operator: le
|
|
@@ -1891,7 +1894,7 @@ const Ro = /* @__PURE__ */ Q(ko, [["render", Fo], ["__scopeId", "data-v-9de406ef
|
|
|
1891
1894
|
};
|
|
1892
1895
|
}
|
|
1893
1896
|
const d = W(() => ({
|
|
1894
|
-
x:
|
|
1897
|
+
x: k.value.length * 150 + 250
|
|
1895
1898
|
// 只设置横向滚动
|
|
1896
1899
|
// 移除 y 属性,让表格高度自适应
|
|
1897
1900
|
})), g = (v) => {
|
|
@@ -1915,20 +1918,20 @@ const Ro = /* @__PURE__ */ Q(ko, [["render", Fo], ["__scopeId", "data-v-9de406ef
|
|
|
1915
1918
|
minWidth: 200,
|
|
1916
1919
|
fixed: "right",
|
|
1917
1920
|
resizable: !1
|
|
1918
|
-
}),
|
|
1919
|
-
}, _ = m([]),
|
|
1921
|
+
}), k.value = N;
|
|
1922
|
+
}, _ = m([]), k = m([]), u = m(!0), p = m(!0), A = m(), J = async () => {
|
|
1920
1923
|
p.value = !0;
|
|
1921
1924
|
const v = await It(s.className, r());
|
|
1922
1925
|
_.value = v.data, i.total = v.totalCount, p.value = !1;
|
|
1923
1926
|
}, Z = m(!1);
|
|
1924
1927
|
ue(async () => {
|
|
1925
|
-
|
|
1928
|
+
u.value = !0;
|
|
1926
1929
|
const v = new Te().setPageActionType(fe.List).setClassName(s.className).setStore({ svrStore: a, bpmStore: e }).build();
|
|
1927
|
-
c.value = await v.getPageData(), g(c.value.fields),
|
|
1930
|
+
c.value = await v.getPageData(), g(c.value.fields), j(c.value.fields), L(), I(c.value?.tabs?.[0]?.key || ""), A.value = c.value.actions, u.value = !1, Z.value = !0;
|
|
1928
1931
|
}), dt(() => {
|
|
1929
1932
|
Z.value && J();
|
|
1930
1933
|
});
|
|
1931
|
-
const
|
|
1934
|
+
const $ = (v) => {
|
|
1932
1935
|
i.current = v, J();
|
|
1933
1936
|
}, X = (v) => {
|
|
1934
1937
|
i.pageSize = v, J();
|
|
@@ -1942,10 +1945,10 @@ const Ro = /* @__PURE__ */ Q(ko, [["render", Fo], ["__scopeId", "data-v-9de406ef
|
|
|
1942
1945
|
console.warn("Unknown action type:", v);
|
|
1943
1946
|
}
|
|
1944
1947
|
}
|
|
1945
|
-
function
|
|
1948
|
+
function C(v, N, R) {
|
|
1946
1949
|
switch (v) {
|
|
1947
1950
|
case Y.Submit:
|
|
1948
|
-
qt(N, { filters: [{ key: "approverList", value:
|
|
1951
|
+
qt(N, { filters: [{ key: "approverList", value: b(), operator: 2 }] }), l?.appContext.config.globalProperties.$notification.success("submit success!");
|
|
1949
1952
|
break;
|
|
1950
1953
|
case Y.Link:
|
|
1951
1954
|
o.push({ name: R });
|
|
@@ -1954,61 +1957,61 @@ const Ro = /* @__PURE__ */ Q(ko, [["render", Fo], ["__scopeId", "data-v-9de406ef
|
|
|
1954
1957
|
console.warn("Unknown action type:", v);
|
|
1955
1958
|
}
|
|
1956
1959
|
}
|
|
1957
|
-
function
|
|
1960
|
+
function b() {
|
|
1958
1961
|
return a()?.userInfo?.email_address ?? "";
|
|
1959
1962
|
}
|
|
1960
|
-
function
|
|
1963
|
+
function h(v, N) {
|
|
1961
1964
|
return typeof v != "string" || v.indexOf("{currentUserEmail}") === -1 ? v : v.replace(/{currentUserEmail}/g, N);
|
|
1962
1965
|
}
|
|
1963
|
-
function
|
|
1966
|
+
function I(v) {
|
|
1964
1967
|
const N = c.value?.tabs?.find((R) => R.key === v)?.filters;
|
|
1965
1968
|
i.filters = N?.map((R) => ({
|
|
1966
1969
|
...R,
|
|
1967
|
-
value:
|
|
1970
|
+
value: h(R.value, b())
|
|
1968
1971
|
})) || [], i.current = 1, J();
|
|
1969
1972
|
}
|
|
1970
|
-
const
|
|
1971
|
-
function
|
|
1973
|
+
const S = m({}), U = m([]);
|
|
1974
|
+
function j(v) {
|
|
1972
1975
|
if (!v) return [];
|
|
1973
1976
|
U.value = Object.entries(v).filter(([, N]) => N.isFiltered).map(([N, R]) => ({ fieldKey: N, fieldConfig: R }));
|
|
1974
1977
|
}
|
|
1975
|
-
const
|
|
1978
|
+
const L = () => {
|
|
1976
1979
|
const v = {};
|
|
1977
1980
|
U.value.forEach(({ fieldKey: N, fieldConfig: R }) => {
|
|
1978
1981
|
v[N] = {}, v[N].value = R.modelValue, v[N].operator = R.operator;
|
|
1979
|
-
}),
|
|
1982
|
+
}), S.value = v;
|
|
1980
1983
|
}, G = () => {
|
|
1981
1984
|
i.current = 1, J();
|
|
1982
1985
|
}, se = () => {
|
|
1983
|
-
c.value &&
|
|
1986
|
+
c.value && L(), G();
|
|
1984
1987
|
};
|
|
1985
1988
|
function ie(v, N) {
|
|
1986
1989
|
return !(v.location !== "InTable" || v.title === "Update" && (N.status === 100 || N.status === -1));
|
|
1987
1990
|
}
|
|
1988
|
-
const _e = { svrStore: a, bpmStore: e, router: o, instance: l, props: s, pageData: c, paging: i, createListParams: r, scroll: d, mapColumns: g, _data: _, _columns:
|
|
1991
|
+
const _e = { svrStore: a, bpmStore: e, router: o, instance: l, props: s, pageData: c, paging: i, createListParams: r, scroll: d, mapColumns: g, _data: _, _columns: k, loadingPage: u, loadingTable: p, actions: A, loadData: J, mounted: Z, pageChangeHandler: $, pageSizeChangeHandler: X, clickHandler: oe, createHandler: C, getApproverEmail: b, replaceEmail: h, tabHandler: I, searchForm: S, searchableFields: U, mapSearchableFields: j, initSearchForm: L, handleSearch: G, handleReset: se, judgeHiddenActions: ie, ActionButton: Se, DataWidgets: je, TopBar: Ie };
|
|
1989
1992
|
return Object.defineProperty(_e, "__isScriptSetup", { enumerable: !1, value: !0 }), _e;
|
|
1990
1993
|
}
|
|
1991
|
-
}),
|
|
1992
|
-
function
|
|
1993
|
-
const s = w("a-space"), c = w("a-col"), i = w("a-button"), r = w("a-row"), d = w("a-card"), g = w("a-tab-pane"), _ = w("a-tabs"),
|
|
1994
|
-
return
|
|
1994
|
+
}), $o = { class: "list-container" }, Oo = { class: "query-title" };
|
|
1995
|
+
function Mo(t, n, a, e, o, l) {
|
|
1996
|
+
const s = w("a-space"), c = w("a-col"), i = w("a-button"), r = w("a-row"), d = w("a-card"), g = w("a-tab-pane"), _ = w("a-tabs"), k = w("a-table");
|
|
1997
|
+
return f(), V("div", $o, [
|
|
1995
1998
|
B(e.TopBar, {
|
|
1996
1999
|
title: e.pageData?.banner.title ?? "",
|
|
1997
2000
|
subTitle: e.pageData?.banner.subTitle ?? "",
|
|
1998
2001
|
email: e.getApproverEmail()
|
|
1999
2002
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
2000
2003
|
B(d, null, {
|
|
2001
|
-
default:
|
|
2002
|
-
y("div",
|
|
2004
|
+
default: x(() => [
|
|
2005
|
+
y("div", Oo, [
|
|
2003
2006
|
n[0] || (n[0] = y("h3", null, "Search Conditions", -1)),
|
|
2004
2007
|
B(s, { size: "medium" }, {
|
|
2005
|
-
default:
|
|
2006
|
-
(
|
|
2007
|
-
key:
|
|
2008
|
+
default: x(() => [
|
|
2009
|
+
(f(!0), V(M, null, q(e.actions, (u) => (f(), V(M, {
|
|
2010
|
+
key: u.title
|
|
2008
2011
|
}, [
|
|
2009
|
-
|
|
2012
|
+
u.location === "InOperation" ? (f(), F(e.ActionButton, {
|
|
2010
2013
|
key: 0,
|
|
2011
|
-
config:
|
|
2014
|
+
config: u,
|
|
2012
2015
|
onClick: e.createHandler
|
|
2013
2016
|
}, null, 8, ["config"])) : ne("", !0)
|
|
2014
2017
|
], 64))), 128))
|
|
@@ -2017,18 +2020,18 @@ function Oo(t, n, a, e, o, l) {
|
|
|
2017
2020
|
})
|
|
2018
2021
|
]),
|
|
2019
2022
|
B(r, { gutter: [24, 20] }, {
|
|
2020
|
-
default:
|
|
2021
|
-
(
|
|
2022
|
-
key:
|
|
2023
|
+
default: x(() => [
|
|
2024
|
+
(f(!0), V(M, null, q(e.searchableFields, (u) => (f(), F(c, {
|
|
2025
|
+
key: u.fieldKey,
|
|
2023
2026
|
span: 6,
|
|
2024
2027
|
class: "search-col"
|
|
2025
2028
|
}, {
|
|
2026
|
-
default:
|
|
2029
|
+
default: x(() => [
|
|
2027
2030
|
B(e.DataWidgets, {
|
|
2028
|
-
name:
|
|
2029
|
-
config:
|
|
2030
|
-
modelValue: e.searchForm[
|
|
2031
|
-
"onUpdate:modelValue": (p) => e.searchForm[
|
|
2031
|
+
name: u.fieldKey,
|
|
2032
|
+
config: u.fieldConfig,
|
|
2033
|
+
modelValue: e.searchForm[u.fieldKey].value,
|
|
2034
|
+
"onUpdate:modelValue": (p) => e.searchForm[u.fieldKey].value = p,
|
|
2032
2035
|
class: "form-field"
|
|
2033
2036
|
}, null, 8, ["name", "config", "modelValue", "onUpdate:modelValue"])
|
|
2034
2037
|
]),
|
|
@@ -2038,15 +2041,15 @@ function Oo(t, n, a, e, o, l) {
|
|
|
2038
2041
|
span: 6,
|
|
2039
2042
|
class: "search-col form-buttons"
|
|
2040
2043
|
}, {
|
|
2041
|
-
default:
|
|
2044
|
+
default: x(() => [
|
|
2042
2045
|
B(s, { size: "medium" }, {
|
|
2043
|
-
default:
|
|
2046
|
+
default: x(() => [
|
|
2044
2047
|
B(i, {
|
|
2045
2048
|
type: "primary",
|
|
2046
2049
|
size: "medium",
|
|
2047
2050
|
onClick: e.handleSearch
|
|
2048
2051
|
}, {
|
|
2049
|
-
default:
|
|
2052
|
+
default: x(() => n[1] || (n[1] = [
|
|
2050
2053
|
re(" Search ", -1)
|
|
2051
2054
|
])),
|
|
2052
2055
|
_: 1,
|
|
@@ -2056,7 +2059,7 @@ function Oo(t, n, a, e, o, l) {
|
|
|
2056
2059
|
size: "medium",
|
|
2057
2060
|
onClick: e.handleReset
|
|
2058
2061
|
}, {
|
|
2059
|
-
default:
|
|
2062
|
+
default: x(() => n[2] || (n[2] = [
|
|
2060
2063
|
re(" Reset ", -1)
|
|
2061
2064
|
])),
|
|
2062
2065
|
_: 1,
|
|
@@ -2078,15 +2081,15 @@ function Oo(t, n, a, e, o, l) {
|
|
|
2078
2081
|
size: "large",
|
|
2079
2082
|
onTabClick: e.tabHandler
|
|
2080
2083
|
}, {
|
|
2081
|
-
default:
|
|
2082
|
-
(
|
|
2083
|
-
key:
|
|
2084
|
-
title:
|
|
2084
|
+
default: x(() => [
|
|
2085
|
+
(f(!0), V(M, null, q(e.pageData?.tabs, (u) => (f(), F(g, {
|
|
2086
|
+
key: u.key,
|
|
2087
|
+
title: u.title
|
|
2085
2088
|
}, null, 8, ["title"]))), 128))
|
|
2086
2089
|
]),
|
|
2087
2090
|
_: 1
|
|
2088
2091
|
}),
|
|
2089
|
-
B(
|
|
2092
|
+
B(k, {
|
|
2090
2093
|
columns: e._columns,
|
|
2091
2094
|
data: e._data,
|
|
2092
2095
|
stripe: "",
|
|
@@ -2105,17 +2108,17 @@ function Oo(t, n, a, e, o, l) {
|
|
|
2105
2108
|
onPageChange: e.pageChangeHandler,
|
|
2106
2109
|
onPageSizeChange: e.pageSizeChangeHandler
|
|
2107
2110
|
}, {
|
|
2108
|
-
optional:
|
|
2111
|
+
optional: x(({ record: u }) => [
|
|
2109
2112
|
B(s, { size: "small" }, {
|
|
2110
|
-
default:
|
|
2111
|
-
(
|
|
2113
|
+
default: x(() => [
|
|
2114
|
+
(f(!0), V(M, null, q(e.actions, (p) => (f(), V(M, {
|
|
2112
2115
|
key: p.title
|
|
2113
2116
|
}, [
|
|
2114
|
-
e.judgeHiddenActions(p,
|
|
2117
|
+
e.judgeHiddenActions(p, u) ? (f(), F(e.ActionButton, {
|
|
2115
2118
|
key: 0,
|
|
2116
2119
|
config: p,
|
|
2117
2120
|
size: "small",
|
|
2118
|
-
onClick: (...
|
|
2121
|
+
onClick: (...A) => e.clickHandler(...A, u.workflowId)
|
|
2119
2122
|
}, null, 8, ["config", "onClick"])) : ne("", !0)
|
|
2120
2123
|
], 64))), 128))
|
|
2121
2124
|
]),
|
|
@@ -2126,9 +2129,9 @@ function Oo(t, n, a, e, o, l) {
|
|
|
2126
2129
|
}, 8, ["columns", "data", "pagination", "loading", "scroll"])
|
|
2127
2130
|
]);
|
|
2128
2131
|
}
|
|
2129
|
-
const Eo = /* @__PURE__ */ Q(
|
|
2132
|
+
const Eo = /* @__PURE__ */ Q(jo, [["render", Mo], ["__scopeId", "data-v-639f4f42"], ["__file", "ListView.vue"]]), Yo = {
|
|
2130
2133
|
install(t, n = {}) {
|
|
2131
|
-
n.config && ht(n.config), n.router && t.provide(ot, n.router), n.pinia && t.provide(
|
|
2134
|
+
n.config && ht(n.config), n.router && t.provide(ot, n.router), n.pinia && t.provide(On, n.pinia), n.useBpmStore && t.provide(rt, n.useBpmStore), n.useSvrStore && t.provide(st, n.useSvrStore), n.triggers && t.provide(at, n.triggers), n.customComps && t.provide(it, n.customComps), t.component("CreateView", io), t.component("UpdateView", yo), t.component("DetailView", Ro), t.component("ListView", Eo);
|
|
2132
2135
|
}
|
|
2133
2136
|
};
|
|
2134
2137
|
export {
|