@chase-shao/vue-component-lib 1.2.84 → 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 +421 -418
- 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";
|
|
@@ -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,
|
|
@@ -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,9 +415,9 @@ 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",
|
|
418
|
+
}, u = (_) => {
|
|
419
|
+
const S = i(_);
|
|
420
|
+
o("error", S.res ? "" : S.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((f) => {
|
|
421
421
|
f.event === "change" && o(f.event, f.handlerName, _);
|
|
422
422
|
});
|
|
423
423
|
};
|
|
@@ -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
|
|
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
463
|
return e.triggers && e.triggers.length > 0 && e.triggers.forEach((f) => {
|
|
464
|
-
|
|
464
|
+
S[f.event] = (p) => {
|
|
465
465
|
o(f.event, f.handlerName, p);
|
|
466
|
-
const
|
|
467
|
-
o("error",
|
|
466
|
+
const V = i(p);
|
|
467
|
+
o("error", V.res ? "" : V.errorMessages);
|
|
468
468
|
};
|
|
469
|
-
}),
|
|
470
|
-
}),
|
|
471
|
-
e.config.dataSourceProvider && (s.value = await
|
|
469
|
+
}), S;
|
|
470
|
+
}), u = async () => {
|
|
471
|
+
e.config.dataSourceProvider && (s.value = await Lt(e.config.dataSourceProvider));
|
|
472
472
|
};
|
|
473
|
-
ue(
|
|
474
|
-
const g = (
|
|
475
|
-
o("update:modelValue",
|
|
476
|
-
const f = i(
|
|
473
|
+
ue(u);
|
|
474
|
+
const g = (S) => {
|
|
475
|
+
o("update:modelValue", S);
|
|
476
|
+
const f = i(S);
|
|
477
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,
|
|
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 f(
|
|
596
|
-
const { file:
|
|
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
|
-
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 (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
|
-
},
|
|
615
|
-
|
|
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(
|
|
619
|
-
return new Promise((
|
|
620
|
-
r.value ? (e.config.uploadURL && (
|
|
618
|
+
submit(x) {
|
|
619
|
+
return new Promise((b, h) => {
|
|
620
|
+
r.value ? (e.config.uploadURL && (u.value = x), p.value = b, V.value = h, $.value.length ? lt(() => {
|
|
621
621
|
r.value?.submit();
|
|
622
|
-
}) :
|
|
622
|
+
}) : b(x)) : b(x);
|
|
623
623
|
});
|
|
624
624
|
},
|
|
625
625
|
validate() {
|
|
626
|
-
const h = s(
|
|
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 =
|
|
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,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
|
-
},
|
|
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 _(f) {
|
|
937
|
+
return f === "OtherInformationText" ? "Other Information" : f === "Other Information" ? "" : f;
|
|
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(f) {
|
|
944
|
+
return g() ? s.value.submit(f) : Promise.resolve(f);
|
|
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 S = { props: e, emits: o, model: l, widgetRef: s, curComp: c, errMsg: i, errHandler: r, changeHandler: u, isFileUpload: g, formatTitle: _, get IconQuestionCircle() {
|
|
951
954
|
return Sn;
|
|
952
955
|
} };
|
|
953
|
-
return Object.defineProperty(
|
|
956
|
+
return Object.defineProperty(S, "__isScriptSetup", { enumerable: !1, value: !0 }), S;
|
|
954
957
|
}
|
|
955
958
|
}), Pn = { class: "title" }, Nn = {
|
|
956
959
|
key: 0,
|
|
@@ -960,23 +963,23 @@ const In = Object.assign(De, {
|
|
|
960
963
|
class: "err-msg"
|
|
961
964
|
};
|
|
962
965
|
function Dn(t, n, a, e, o, l) {
|
|
963
|
-
const s =
|
|
964
|
-
return
|
|
965
|
-
|
|
966
|
-
re(
|
|
967
|
-
e.props.config.validations.length ? (
|
|
968
|
-
e.props.config.widget.isVisible ? (
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
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(() => [
|
|
973
976
|
B(e.IconQuestionCircle, { class: "icon" })
|
|
974
977
|
]),
|
|
975
978
|
_: 1
|
|
976
|
-
}
|
|
979
|
+
})) : ne("", !0)
|
|
977
980
|
]),
|
|
978
|
-
|
|
979
|
-
(
|
|
981
|
+
k("div", null, [
|
|
982
|
+
(d(), 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 ? (d(), w("div", Un, Z(e.errMsg), 1)) : ne("", !0)
|
|
992
995
|
])
|
|
993
996
|
]);
|
|
994
997
|
}
|
|
995
|
-
const
|
|
998
|
+
const je = /* @__PURE__ */ Q(Tn, [["render", Dn], ["__scopeId", "data-v-03fe127c"], ["__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
|
|
1014
|
-
const s =
|
|
1015
|
-
return
|
|
1016
|
+
function Fn(t, n, a, e, o, l) {
|
|
1017
|
+
const s = C("AButton");
|
|
1018
|
+
return d(), F(s, {
|
|
1016
1019
|
loading: a.loading,
|
|
1017
1020
|
type: "primary",
|
|
1018
1021
|
onClick: e.clickHandler
|
|
1019
1022
|
}, {
|
|
1020
|
-
default:
|
|
1023
|
+
default: y(() => [
|
|
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
|
|
1045
|
-
const s =
|
|
1046
|
-
return
|
|
1047
|
-
default:
|
|
1047
|
+
function Ln(t, n, a, e, o, l) {
|
|
1048
|
+
const s = C("ALink");
|
|
1049
|
+
return d(), F(s, { onClick: e.clickHandler }, {
|
|
1050
|
+
default: y(() => [
|
|
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: {},
|
|
@@ -1060,10 +1063,10 @@ const Rn = /* @__PURE__ */ Q(Ln, [["render", Fn], ["__file", "DetailLink.vue"]])
|
|
|
1060
1063
|
setup(t, { expose: n, emit: a }) {
|
|
1061
1064
|
n();
|
|
1062
1065
|
const e = t, o = a;
|
|
1063
|
-
function l(
|
|
1064
|
-
o("click", e.config.widget,
|
|
1066
|
+
function l(u, g) {
|
|
1067
|
+
o("click", e.config.widget, u, g, e.config.title);
|
|
1065
1068
|
}
|
|
1066
|
-
const s =
|
|
1069
|
+
const s = G(() => {
|
|
1067
1070
|
switch (e.config.location) {
|
|
1068
1071
|
case "InOperation":
|
|
1069
1072
|
return Ge;
|
|
@@ -1072,41 +1075,41 @@ const Rn = /* @__PURE__ */ Q(Ln, [["render", Fn], ["__file", "DetailLink.vue"]])
|
|
|
1072
1075
|
default:
|
|
1073
1076
|
return Ge;
|
|
1074
1077
|
}
|
|
1075
|
-
}), 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 };
|
|
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 d(), 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:
|
|
1087
|
-
re(
|
|
1089
|
+
default: y(() => [
|
|
1090
|
+
re(Z(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: {},
|
|
@@ -1120,25 +1123,25 @@ const On = /* @__PURE__ */ E({
|
|
|
1120
1123
|
}
|
|
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
|
-
const s =
|
|
1124
|
-
return
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
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)
|
|
1128
1131
|
]),
|
|
1129
|
-
|
|
1132
|
+
k("div", Gn, [
|
|
1130
1133
|
B(c, { trigger: "click" }, {
|
|
1131
|
-
content:
|
|
1132
|
-
|
|
1134
|
+
content: y(() => [
|
|
1135
|
+
k("div", qn, Z(a.email), 1)
|
|
1133
1136
|
]),
|
|
1134
|
-
default:
|
|
1137
|
+
default: y(() => [
|
|
1135
1138
|
B(s, {
|
|
1136
1139
|
size: 48,
|
|
1137
1140
|
autoFixFontSize: "",
|
|
1138
1141
|
style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
|
|
1139
1142
|
}, {
|
|
1140
|
-
default:
|
|
1141
|
-
re(
|
|
1143
|
+
default: y(() => [
|
|
1144
|
+
re(Z(a.email.charAt(0).toUpperCase()), 1)
|
|
1142
1145
|
]),
|
|
1143
1146
|
_: 1
|
|
1144
1147
|
})
|
|
@@ -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: [],
|
|
@@ -1248,104 +1251,104 @@ const Qn = /* @__PURE__ */ E({
|
|
|
1248
1251
|
title: "",
|
|
1249
1252
|
subTitle: ""
|
|
1250
1253
|
}
|
|
1251
|
-
}),
|
|
1252
|
-
function _(
|
|
1253
|
-
return
|
|
1254
|
-
fieldKey:
|
|
1254
|
+
}), u = m([]), g = m({});
|
|
1255
|
+
function _(h) {
|
|
1256
|
+
return h ? Object.entries(h).map(([A, U]) => ({
|
|
1257
|
+
fieldKey: A,
|
|
1255
1258
|
...U
|
|
1256
|
-
})).filter((
|
|
1259
|
+
})).filter((A) => A.widget && A.widget.widget !== "Hidden").filter((A) => !X.value.includes(A.fieldKey)) : [];
|
|
1257
1260
|
}
|
|
1258
|
-
function
|
|
1259
|
-
return
|
|
1261
|
+
function S(h) {
|
|
1262
|
+
return h ? Object.entries(h).filter(([A, U]) => U.dependent).reduce((A, [U, j]) => (A[U] = j.dependent, A), {}) : [];
|
|
1260
1263
|
}
|
|
1261
|
-
const f =
|
|
1264
|
+
const f = G(() => r.value?.actions ? [...r.value.actions].reverse() : []), p = m({}), V = 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
|
+
V.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(), u.value = _(r.value.fields), g.value = S(r.value.fields);
|
|
1269
|
+
for (const I in r.value.fields) {
|
|
1270
|
+
if (r.value.fields[I].widget?.widget === "File") {
|
|
1271
|
+
const A = u.value.find((U) => U.fieldKey === I);
|
|
1272
|
+
A && A.widget && (A.widget.files = []);
|
|
1270
1273
|
}
|
|
1271
|
-
p.value[
|
|
1274
|
+
p.value[I] = r.value.fields[I].modelValue;
|
|
1272
1275
|
}
|
|
1273
|
-
|
|
1276
|
+
V.value = !1;
|
|
1274
1277
|
});
|
|
1275
1278
|
function J() {
|
|
1276
1279
|
return e()?.userInfo?.email_address ?? "";
|
|
1277
1280
|
}
|
|
1278
|
-
async function
|
|
1279
|
-
switch (
|
|
1281
|
+
async function ee(h, I, A, U, j) {
|
|
1282
|
+
switch (I) {
|
|
1280
1283
|
case Y.Submit:
|
|
1281
|
-
let
|
|
1282
|
-
if (s.value?.forEach((
|
|
1283
|
-
|
|
1284
|
-
}), !
|
|
1284
|
+
let L = !0;
|
|
1285
|
+
if (s.value?.forEach((q) => {
|
|
1286
|
+
q?.validate && (q.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
|
+
V.value = !0;
|
|
1289
1292
|
try {
|
|
1290
|
-
const
|
|
1291
|
-
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() } });
|
|
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"), V.value = !1;
|
|
1294
1297
|
}
|
|
1295
1298
|
break;
|
|
1296
1299
|
case Y.Link:
|
|
1297
1300
|
try {
|
|
1298
|
-
await l[
|
|
1299
|
-
} catch (
|
|
1300
|
-
console.error("Error in link action trigger:",
|
|
1301
|
+
await l[h.eventName || ""]?.(p.value, X), o.push({ name: U, params: { className: i.className } });
|
|
1302
|
+
} catch (q) {
|
|
1303
|
+
console.error("Error in link action trigger:", q);
|
|
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 && (u.value = _(r.value.fields));
|
|
1317
1320
|
}
|
|
1318
|
-
const
|
|
1319
|
-
return Object.defineProperty(
|
|
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
|
+
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,
|
|
1323
1326
|
class: "form-content"
|
|
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
|
-
const s =
|
|
1327
|
-
return
|
|
1329
|
+
const s = C("a-card"), c = C("a-spin");
|
|
1330
|
+
return d(), w("div", Jn, [
|
|
1328
1331
|
B(e.TopBar, {
|
|
1329
1332
|
title: e.pageData.banner.title,
|
|
1330
1333
|
subTitle: e.pageData.banner.subTitle,
|
|
1331
1334
|
email: e.getApproverEmail()
|
|
1332
1335
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1333
|
-
|
|
1336
|
+
k("div", Xn, [
|
|
1334
1337
|
B(c, {
|
|
1335
1338
|
loading: e.loading,
|
|
1336
1339
|
class: "form-container"
|
|
1337
1340
|
}, {
|
|
1338
|
-
default:
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
(
|
|
1341
|
+
default: y(() => [
|
|
1342
|
+
k("div", Zn, [
|
|
1343
|
+
k("div", eo, [
|
|
1344
|
+
(d(!0), w(O, null, W(e.groupedFields, (i) => (d(), F(s, {
|
|
1342
1345
|
key: i.name,
|
|
1343
1346
|
title: i.name,
|
|
1344
1347
|
style: { "margin-bottom": "24px" }
|
|
1345
1348
|
}, {
|
|
1346
|
-
default:
|
|
1347
|
-
|
|
1348
|
-
(
|
|
1349
|
+
default: y(() => [
|
|
1350
|
+
k("div", to, [
|
|
1351
|
+
(d(!0), w(O, null, W(i.fields, (r) => (d(), F(e.DataWidgets, {
|
|
1349
1352
|
key: r.fieldKey,
|
|
1350
1353
|
ref_for: !0,
|
|
1351
1354
|
ref: "dataWidgets",
|
|
@@ -1353,7 +1356,7 @@ function so(t, n, a, e, o, l) {
|
|
|
1353
1356
|
config: r,
|
|
1354
1357
|
"class-name": a.className,
|
|
1355
1358
|
modelValue: e._data[r.fieldKey],
|
|
1356
|
-
"onUpdate:modelValue": (
|
|
1359
|
+
"onUpdate:modelValue": (u) => e._data[r.fieldKey] = u,
|
|
1357
1360
|
class: "form-field",
|
|
1358
1361
|
onChange: e.changeHandler
|
|
1359
1362
|
}, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
@@ -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 ? (d(), w("div", no, [
|
|
1366
1369
|
de(t.$slots, "content", {}, void 0, !0)
|
|
1367
1370
|
])) : ne("", !0)
|
|
1368
1371
|
])
|
|
@@ -1370,12 +1373,12 @@ function so(t, n, a, e, o, l) {
|
|
|
1370
1373
|
_: 3
|
|
1371
1374
|
}, 8, ["loading"])
|
|
1372
1375
|
]),
|
|
1373
|
-
|
|
1374
|
-
|
|
1376
|
+
k("div", oo, [
|
|
1377
|
+
k("div", ao, [
|
|
1375
1378
|
de(t.$slots, "action", {}, void 0, !0),
|
|
1376
|
-
|
|
1377
|
-
(
|
|
1378
|
-
key: i.
|
|
1379
|
+
k("div", ro, [
|
|
1380
|
+
(d(!0), w(O, null, W(e.reversedActions, (i) => (d(), 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: [],
|
|
@@ -1402,103 +1405,103 @@ const io = /* @__PURE__ */ Q(Qn, [["render", so], ["__scopeId", "data-v-68ab1bc3
|
|
|
1402
1405
|
title: "",
|
|
1403
1406
|
subTitle: ""
|
|
1404
1407
|
}
|
|
1405
|
-
}),
|
|
1406
|
-
function _(
|
|
1407
|
-
return
|
|
1408
|
-
fieldKey:
|
|
1409
|
-
...
|
|
1410
|
-
})).filter((
|
|
1408
|
+
}), u = m([]), g = m({});
|
|
1409
|
+
function _(b) {
|
|
1410
|
+
return b ? Object.entries(b).map(([I, A]) => ({
|
|
1411
|
+
fieldKey: I,
|
|
1412
|
+
...A
|
|
1413
|
+
})).filter((I) => I.widget && I.widget.widget !== "Hidden").filter((I) => !$.value.includes(I.fieldKey)) : [];
|
|
1411
1414
|
}
|
|
1412
|
-
function b
|
|
1413
|
-
return
|
|
1415
|
+
function S(b) {
|
|
1416
|
+
return b ? Object.entries(b).filter(([I, A]) => A.dependent).reduce((I, [A, U]) => (I[A] = U.dependent, I), {}) : [];
|
|
1414
1417
|
}
|
|
1415
|
-
const f =
|
|
1418
|
+
const f = G(() => r.value?.actions ? [...r.value.actions].reverse() : []), p = m({}), V = m(!1);
|
|
1416
1419
|
ue(async () => {
|
|
1417
|
-
|
|
1418
|
-
const
|
|
1419
|
-
r.value = await
|
|
1420
|
-
const
|
|
1420
|
+
V.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 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);
|
|
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 = u.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
|
+
V.value = !1;
|
|
1435
1438
|
});
|
|
1436
1439
|
function J() {
|
|
1437
1440
|
return o()?.userInfo?.email_address ?? "";
|
|
1438
1441
|
}
|
|
1439
|
-
async function
|
|
1440
|
-
switch (
|
|
1442
|
+
async function ee(b, h, I, A, 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
|
+
V.value = !0;
|
|
1450
1453
|
try {
|
|
1451
|
-
const
|
|
1452
|
-
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()}.`);
|
|
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"), V.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: A, 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 && (u.value = _(r.value.fields));
|
|
1470
1473
|
}
|
|
1471
|
-
const oe =
|
|
1472
|
-
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;
|
|
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,
|
|
1476
1479
|
class: "form-content"
|
|
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
|
-
const s =
|
|
1480
|
-
return
|
|
1482
|
+
const s = C("a-card"), c = C("a-spin");
|
|
1483
|
+
return d(), w("div", co, [
|
|
1481
1484
|
B(e.TopBar, {
|
|
1482
1485
|
title: e.pageData.banner.title,
|
|
1483
1486
|
subTitle: e.pageData.banner.subTitle,
|
|
1484
1487
|
email: e.getApproverEmail()
|
|
1485
1488
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1486
|
-
|
|
1489
|
+
k("div", uo, [
|
|
1487
1490
|
B(c, {
|
|
1488
1491
|
loading: e.loading,
|
|
1489
1492
|
class: "form-container"
|
|
1490
1493
|
}, {
|
|
1491
|
-
default:
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
(
|
|
1494
|
+
default: y(() => [
|
|
1495
|
+
k("div", fo, [
|
|
1496
|
+
k("div", po, [
|
|
1497
|
+
(d(!0), w(O, null, W(e.groupedFields, (i) => (d(), F(s, {
|
|
1495
1498
|
key: i.name,
|
|
1496
1499
|
title: i.name,
|
|
1497
1500
|
style: { "margin-bottom": "24px" }
|
|
1498
1501
|
}, {
|
|
1499
|
-
default:
|
|
1500
|
-
|
|
1501
|
-
(
|
|
1502
|
+
default: y(() => [
|
|
1503
|
+
k("div", mo, [
|
|
1504
|
+
(d(!0), w(O, null, W(i.fields, (r) => (d(), F(e.DataWidgets, {
|
|
1502
1505
|
key: r.fieldKey,
|
|
1503
1506
|
ref_for: !0,
|
|
1504
1507
|
ref: "dataWidgets",
|
|
@@ -1506,7 +1509,7 @@ function ho(t, n, a, e, o, l) {
|
|
|
1506
1509
|
config: r,
|
|
1507
1510
|
"class-name": a.className,
|
|
1508
1511
|
modelValue: e._data[r.fieldKey],
|
|
1509
|
-
"onUpdate:modelValue": (
|
|
1512
|
+
"onUpdate:modelValue": (u) => e._data[r.fieldKey] = u,
|
|
1510
1513
|
class: "form-field",
|
|
1511
1514
|
onChange: e.changeHandler
|
|
1512
1515
|
}, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
@@ -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 ? (d(), w("div", go, [
|
|
1519
1522
|
de(t.$slots, "content", {}, void 0, !0)
|
|
1520
1523
|
])) : ne("", !0)
|
|
1521
1524
|
])
|
|
@@ -1523,12 +1526,12 @@ function ho(t, n, a, e, o, l) {
|
|
|
1523
1526
|
_: 3
|
|
1524
1527
|
}, 8, ["loading"])
|
|
1525
1528
|
]),
|
|
1526
|
-
|
|
1527
|
-
|
|
1529
|
+
k("div", _o, [
|
|
1530
|
+
k("div", vo, [
|
|
1528
1531
|
de(t.$slots, "action", {}, void 0, !0),
|
|
1529
|
-
|
|
1530
|
-
(
|
|
1531
|
-
key: i.
|
|
1532
|
+
k("div", bo, [
|
|
1533
|
+
(d(!0), w(O, null, W(e.reversedActions, (i) => (d(), 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,9 +1554,9 @@ 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
|
-
const
|
|
1559
|
+
const u = m({
|
|
1557
1560
|
pageType: "",
|
|
1558
1561
|
fields: {},
|
|
1559
1562
|
globalValidations: [],
|
|
@@ -1566,9 +1569,9 @@ const ko = /* @__PURE__ */ E({
|
|
|
1566
1569
|
return P ? Object.entries(P).map(([M, T]) => (typeof T.modelValue == "boolean" ? T.fieldValue = T.modelValue ? "Yes" : "No" : T.fieldValue = T.modelValue, {
|
|
1567
1570
|
fieldKey: M,
|
|
1568
1571
|
...T
|
|
1569
|
-
})).filter((M) => M.widget && M.widget.widget !== "Hidden").filter((M) => !
|
|
1572
|
+
})).filter((M) => M.widget && M.widget.widget !== "Hidden").filter((M) => !b.value.includes(M.fieldKey)) : [];
|
|
1570
1573
|
}
|
|
1571
|
-
const
|
|
1574
|
+
const S = G(() => Oe(g.value)), f = G(() => u.value?.actions ? [...u.value.actions].reverse() : []), p = m(!0), V = (P, H) => {
|
|
1572
1575
|
const M = P.findIndex((T) => T.isCurrent);
|
|
1573
1576
|
return P.map((T, ae) => {
|
|
1574
1577
|
const D = {
|
|
@@ -1582,91 +1585,91 @@ 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
|
-
const
|
|
1589
|
-
if (
|
|
1590
|
-
D.time = ke(
|
|
1591
|
-
else if (
|
|
1592
|
-
D.time = ke(
|
|
1593
|
-
else if (
|
|
1594
|
-
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)
|
|
1595
1598
|
D.status = 2, D.desc = "";
|
|
1596
1599
|
else {
|
|
1597
|
-
const
|
|
1598
|
-
D.status = 3, D.desc =
|
|
1600
|
+
const Me = te.workflowHistoryApprovers[0];
|
|
1601
|
+
D.status = 3, D.desc = Me?.reason ? `Rejected reason: ${Me.reason}` : "Rejected";
|
|
1599
1602
|
}
|
|
1600
1603
|
else ae < M || M === -1 ? (D.status = 0, D.desc = "Skipped") : (D.status = 0, D.desc = "Pending Approval");
|
|
1601
|
-
|
|
1604
|
+
te && te.status;
|
|
1602
1605
|
}
|
|
1603
1606
|
return D;
|
|
1604
1607
|
});
|
|
1605
|
-
}, J = m([]),
|
|
1606
|
-
async function
|
|
1608
|
+
}, J = m([]), ee = m(!1), $ = m(!1), X = m(!1), oe = m(!1);
|
|
1609
|
+
async function x() {
|
|
1607
1610
|
const P = await r.getBtnList();
|
|
1608
|
-
|
|
1609
|
-
const M = P.find((T) => T.button ===
|
|
1611
|
+
u.value.actions = u.value.actions?.filter((H) => {
|
|
1612
|
+
const M = P.find((T) => T.button === H.title);
|
|
1610
1613
|
return M ? M.isShow : !0;
|
|
1611
|
-
}),
|
|
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;
|
|
1612
1615
|
}
|
|
1613
|
-
const
|
|
1614
|
-
async function
|
|
1615
|
-
p.value = !0, r = new Te().setPageActionType(fe.Details).setClassName(i.className).setStore({ svrStore: a, bpmStore: e }).setWorkflowId(i.workflowId).build(),
|
|
1616
|
+
const b = m([]);
|
|
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(), u.value = await r.getPageData();
|
|
1616
1619
|
const P = await r.getFiles();
|
|
1617
|
-
se.value = await r.getApprovers(),
|
|
1618
|
-
const
|
|
1619
|
-
o.Test?.({ fieldValue:
|
|
1620
|
-
for (const T in
|
|
1621
|
-
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") {
|
|
1622
1625
|
const ae = g.value.find((D) => D.fieldKey === T);
|
|
1623
1626
|
ae && ae.widget && (ae.widget.files = P[T] ?? []);
|
|
1624
1627
|
}
|
|
1625
1628
|
const M = await r.getProcess();
|
|
1626
|
-
J.value =
|
|
1629
|
+
J.value = V(M, 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 A() {
|
|
1633
1636
|
return a()?.userInfo?.email_address ?? "";
|
|
1634
1637
|
}
|
|
1635
|
-
async function U(P,
|
|
1638
|
+
async function U(P, H, M, 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: ee.value });
|
|
1640
1643
|
p.value = !0;
|
|
1641
1644
|
const we = ae === "Approve" ? "100" : "-1";
|
|
1642
|
-
await
|
|
1645
|
+
await Ht(i.className, i.workflowId, A(), D, [Number(i.workflowId)], M, 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 {
|
|
1648
1651
|
await o[P.eventName || ""]?.(), l.push({ name: T, params: { className: i.className, workflowId: i.workflowId } });
|
|
1649
|
-
} catch (
|
|
1650
|
-
console.error("Error in link action trigger:",
|
|
1652
|
+
} catch (te) {
|
|
1653
|
+
console.error("Error in link action trigger:", te);
|
|
1651
1654
|
}
|
|
1652
1655
|
break;
|
|
1653
1656
|
case Y.Button:
|
|
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([]), q = 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(), x(), 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,
|
|
1689
|
+
async function v(P, H) {
|
|
1687
1690
|
const { Modal: M } = await import("@arco-design/web-vue");
|
|
1688
1691
|
return new Promise((T, ae) => {
|
|
1689
1692
|
M.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:
|
|
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() {
|
|
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
|
|
1740
|
-
const s =
|
|
1741
|
-
|
|
1742
|
-
const r =
|
|
1743
|
-
return
|
|
1741
|
+
}, Bo = { class: "page-footer" }, Fo = { class: "action-container" }, Ho = { class: "action-buttons" };
|
|
1742
|
+
function Lo(t, n, a, e, o, l) {
|
|
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, [
|
|
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
|
-
|
|
1750
|
-
B(
|
|
1752
|
+
k("div", So, [
|
|
1753
|
+
B(S, {
|
|
1751
1754
|
loading: e.loading,
|
|
1752
1755
|
class: "detail-container"
|
|
1753
1756
|
}, {
|
|
1754
|
-
default:
|
|
1755
|
-
|
|
1756
|
-
(
|
|
1757
|
-
|
|
1758
|
-
(
|
|
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, {
|
|
1759
1762
|
key: f.name,
|
|
1760
1763
|
title: f.name,
|
|
1761
1764
|
style: { "margin-bottom": "24px" }
|
|
1762
1765
|
}, {
|
|
1763
|
-
default:
|
|
1764
|
-
|
|
1765
|
-
(
|
|
1766
|
+
default: y(() => [
|
|
1767
|
+
k("div", Vo, [
|
|
1768
|
+
(d(!0), w(O, null, W(f.fields, (p) => (d(), w("div", {
|
|
1766
1769
|
key: p.fieldKey,
|
|
1767
1770
|
class: "detail-field-wrapper"
|
|
1768
1771
|
}, [
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
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", {
|
|
1772
1775
|
class: "field-value",
|
|
1773
|
-
key:
|
|
1776
|
+
key: V.id
|
|
1774
1777
|
}, [
|
|
1775
1778
|
B(c, null, {
|
|
1776
|
-
default:
|
|
1777
|
-
re(
|
|
1779
|
+
default: y(() => [
|
|
1780
|
+
re(Z(V.name) + " ", 1),
|
|
1778
1781
|
B(s, {
|
|
1779
|
-
href:
|
|
1782
|
+
href: V.url,
|
|
1780
1783
|
target: "_blank"
|
|
1781
1784
|
}, {
|
|
1782
|
-
default:
|
|
1785
|
+
default: y(() => [
|
|
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)) : (d(), w("div", Po, Z(p.fieldValue), 1))
|
|
1791
1794
|
])
|
|
1792
1795
|
]))), 128))
|
|
1793
1796
|
])
|
|
@@ -1796,9 +1799,9 @@ function Fo(t, n, a, e, o, l) {
|
|
|
1796
1799
|
}, 1032, ["title"]))), 128)),
|
|
1797
1800
|
ne("", !0),
|
|
1798
1801
|
ne("", !0),
|
|
1799
|
-
e.isShowCommentTextArea ? (
|
|
1800
|
-
|
|
1801
|
-
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)),
|
|
1802
1805
|
B(_, {
|
|
1803
1806
|
modelValue: e.comment,
|
|
1804
1807
|
"onUpdate:modelValue": n[1] || (n[1] = (f) => e.comment = f)
|
|
@@ -1807,7 +1810,7 @@ function Fo(t, n, a, e, o, l) {
|
|
|
1807
1810
|
type: "primary",
|
|
1808
1811
|
onClick: e.onAddComment
|
|
1809
1812
|
}, {
|
|
1810
|
-
default:
|
|
1813
|
+
default: y(() => 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 ? (d(), F(g, { key: 3 }, {
|
|
1822
|
+
header: y(() => n[7] || (n[7] = [
|
|
1820
1823
|
re(" Comments History ", -1)
|
|
1821
1824
|
])),
|
|
1822
|
-
default:
|
|
1823
|
-
(
|
|
1825
|
+
default: y(() => [
|
|
1826
|
+
(d(!0), w(O, null, W(e.commentsHistory, (f) => (d(), F(u, {
|
|
1824
1827
|
key: f.associator
|
|
1825
1828
|
}, {
|
|
1826
|
-
default:
|
|
1827
|
-
re(
|
|
1829
|
+
default: y(() => [
|
|
1830
|
+
re(Z(f.associator) + ": " + Z(f.comments) + " (" + Z(e.formatDate(f.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 ? (d(), w("div", Do, [
|
|
1836
1839
|
de(t.$slots, "content", {}, void 0, !0)
|
|
1837
1840
|
])) : ne("", !0)
|
|
1838
1841
|
])
|
|
@@ -1840,12 +1843,12 @@ function Fo(t, n, a, e, o, l) {
|
|
|
1840
1843
|
_: 3
|
|
1841
1844
|
}, 8, ["loading"])
|
|
1842
1845
|
]),
|
|
1843
|
-
|
|
1844
|
-
|
|
1846
|
+
k("div", Bo, [
|
|
1847
|
+
k("div", Fo, [
|
|
1845
1848
|
de(t.$slots, "action", {}, void 0, !0),
|
|
1846
|
-
|
|
1847
|
-
(
|
|
1848
|
-
key: f.
|
|
1849
|
+
k("div", Ho, [
|
|
1850
|
+
(d(!0), w(O, null, W(e.reversedActions, (f) => (d(), F(e.ActionButton, {
|
|
1851
|
+
key: f.title,
|
|
1849
1852
|
loading: e.loading,
|
|
1850
1853
|
config: f,
|
|
1851
1854
|
class: "action-button",
|
|
@@ -1856,7 +1859,7 @@ function Fo(t, n, a, e, o, l) {
|
|
|
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(A.value).filter(([, { value: N }]) => N && N !== "").map(([N, { value: R, operator: le }]) => ({
|
|
1878
1881
|
key: N,
|
|
1879
1882
|
value: R,
|
|
1880
1883
|
operator: le
|
|
@@ -1890,8 +1893,8 @@ const Ro = /* @__PURE__ */ Q(ko, [["render", Fo], ["__scopeId", "data-v-9de406ef
|
|
|
1890
1893
|
}]
|
|
1891
1894
|
};
|
|
1892
1895
|
}
|
|
1893
|
-
const
|
|
1894
|
-
x:
|
|
1896
|
+
const u = G(() => ({
|
|
1897
|
+
x: S.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
|
+
}), S.value = N;
|
|
1922
|
+
}, _ = m([]), S = m([]), f = m(!0), p = m(!0), V = 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
|
+
}, ee = m(!1);
|
|
1924
1927
|
ue(async () => {
|
|
1925
1928
|
f.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 || ""), V.value = c.value.actions, f.value = !1, ee.value = !0;
|
|
1928
1931
|
}), dt(() => {
|
|
1929
|
-
|
|
1932
|
+
ee.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 x(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,59 +1957,59 @@ 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 A = 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
|
-
}),
|
|
1980
|
-
},
|
|
1982
|
+
}), A.value = v;
|
|
1983
|
+
}, q = () => {
|
|
1981
1984
|
i.current = 1, J();
|
|
1982
1985
|
}, se = () => {
|
|
1983
|
-
c.value &&
|
|
1986
|
+
c.value && L(), q();
|
|
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:
|
|
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 };
|
|
1989
1992
|
return Object.defineProperty(_e, "__isScriptSetup", { enumerable: !1, value: !0 }), _e;
|
|
1990
1993
|
}
|
|
1991
|
-
}),
|
|
1992
|
-
function
|
|
1993
|
-
const s =
|
|
1994
|
-
return
|
|
1994
|
+
}), $o = { class: "list-container" }, Oo = { class: "query-title" };
|
|
1995
|
+
function Mo(t, n, a, e, o, l) {
|
|
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, [
|
|
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
|
-
B(
|
|
2001
|
-
default:
|
|
2002
|
-
|
|
2003
|
-
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)),
|
|
2004
2007
|
B(s, { size: "medium" }, {
|
|
2005
|
-
default:
|
|
2006
|
-
(
|
|
2008
|
+
default: y(() => [
|
|
2009
|
+
(d(!0), w(O, null, W(e.actions, (f) => (d(), w(O, {
|
|
2007
2010
|
key: f.title
|
|
2008
2011
|
}, [
|
|
2009
|
-
f.location === "InOperation" ? (
|
|
2012
|
+
f.location === "InOperation" ? (d(), F(e.ActionButton, {
|
|
2010
2013
|
key: 0,
|
|
2011
2014
|
config: f,
|
|
2012
2015
|
onClick: e.createHandler
|
|
@@ -2017,13 +2020,13 @@ function Oo(t, n, a, e, o, l) {
|
|
|
2017
2020
|
})
|
|
2018
2021
|
]),
|
|
2019
2022
|
B(r, { gutter: [24, 20] }, {
|
|
2020
|
-
default:
|
|
2021
|
-
(
|
|
2023
|
+
default: y(() => [
|
|
2024
|
+
(d(!0), w(O, null, W(e.searchableFields, (f) => (d(), F(c, {
|
|
2022
2025
|
key: f.fieldKey,
|
|
2023
2026
|
span: 6,
|
|
2024
2027
|
class: "search-col"
|
|
2025
2028
|
}, {
|
|
2026
|
-
default:
|
|
2029
|
+
default: y(() => [
|
|
2027
2030
|
B(e.DataWidgets, {
|
|
2028
2031
|
name: f.fieldKey,
|
|
2029
2032
|
config: f.fieldConfig,
|
|
@@ -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: y(() => [
|
|
2042
2045
|
B(s, { size: "medium" }, {
|
|
2043
|
-
default:
|
|
2046
|
+
default: y(() => [
|
|
2044
2047
|
B(i, {
|
|
2045
2048
|
type: "primary",
|
|
2046
2049
|
size: "medium",
|
|
2047
2050
|
onClick: e.handleSearch
|
|
2048
2051
|
}, {
|
|
2049
|
-
default:
|
|
2052
|
+
default: y(() => 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: y(() => 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
|
-
(
|
|
2084
|
+
default: y(() => [
|
|
2085
|
+
(d(!0), w(O, null, W(e.pageData?.tabs, (f) => (d(), F(g, {
|
|
2083
2086
|
key: f.key,
|
|
2084
2087
|
title: f.title
|
|
2085
2088
|
}, null, 8, ["title"]))), 128))
|
|
2086
2089
|
]),
|
|
2087
2090
|
_: 1
|
|
2088
2091
|
}),
|
|
2089
|
-
B(
|
|
2092
|
+
B(S, {
|
|
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: y(({ record: f }) => [
|
|
2109
2112
|
B(s, { size: "small" }, {
|
|
2110
|
-
default:
|
|
2111
|
-
(
|
|
2113
|
+
default: y(() => [
|
|
2114
|
+
(d(!0), w(O, null, W(e.actions, (p) => (d(), w(O, {
|
|
2112
2115
|
key: p.title
|
|
2113
2116
|
}, [
|
|
2114
|
-
e.judgeHiddenActions(p, f) ? (
|
|
2117
|
+
e.judgeHiddenActions(p, f) ? (d(), F(e.ActionButton, {
|
|
2115
2118
|
key: 0,
|
|
2116
2119
|
config: p,
|
|
2117
2120
|
size: "small",
|
|
2118
|
-
onClick: (...
|
|
2121
|
+
onClick: (...V) => e.clickHandler(...V, f.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 {
|