@chase-shao/vue-component-lib 1.2.105 → 1.2.106
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 +296 -294
- 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,8 +1,8 @@
|
|
|
1
|
-
import { ref as m, getCurrentInstance as ve, defineComponent as z, mergeModels as ce, useModel as ke, resolveComponent as V, createBlock as D, openBlock as u, onMounted as fe, computed as K, withCtx as x, createElementBlock as _, Fragment as
|
|
1
|
+
import { ref as m, getCurrentInstance as ve, defineComponent as z, mergeModels as ce, useModel as ke, resolveComponent as V, createBlock as D, openBlock as u, onMounted as fe, computed as K, withCtx as x, createElementBlock as _, Fragment as $, renderList as M, createVNode as U, nextTick as pt, createTextVNode as ae, inject as ye, normalizeStyle as Je, normalizeClass as Xe, createElementVNode as b, createCommentVNode as re, toDisplayString as Q, useTemplateRef as Te, resolveDynamicComponent as $e, renderSlot as ue, reactive as mt, onActivated as gt } from "vue";
|
|
2
2
|
import _t from "axios";
|
|
3
3
|
import { defineStore as vt } from "pinia";
|
|
4
|
-
import { Modal as
|
|
5
|
-
import { useRouter as
|
|
4
|
+
import { Modal as yt } from "@arco-design/web-vue";
|
|
5
|
+
import { useRouter as bt } from "vue-router";
|
|
6
6
|
const wt = vt("main", () => ({
|
|
7
7
|
token: m(void 0)
|
|
8
8
|
})), ht = async (t) => new Promise((o) => setTimeout(o, t)), kt = async (t, o, n, e = void 0) => {
|
|
@@ -108,18 +108,18 @@ const tt = async () => {
|
|
|
108
108
|
}, Y = [];
|
|
109
109
|
for (let t = 0; t < 256; ++t)
|
|
110
110
|
Y.push((t + 256).toString(16).slice(1));
|
|
111
|
-
function
|
|
111
|
+
function Tt(t, o = 0) {
|
|
112
112
|
return (Y[t[o + 0]] + Y[t[o + 1]] + Y[t[o + 2]] + Y[t[o + 3]] + "-" + Y[t[o + 4]] + Y[t[o + 5]] + "-" + Y[t[o + 6]] + Y[t[o + 7]] + "-" + Y[t[o + 8]] + Y[t[o + 9]] + "-" + Y[t[o + 10]] + Y[t[o + 11]] + Y[t[o + 12]] + Y[t[o + 13]] + Y[t[o + 14]] + Y[t[o + 15]]).toLowerCase();
|
|
113
113
|
}
|
|
114
114
|
let Be;
|
|
115
|
-
const
|
|
115
|
+
const At = new Uint8Array(16);
|
|
116
116
|
function It() {
|
|
117
117
|
if (!Be) {
|
|
118
118
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
119
119
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
120
120
|
Be = crypto.getRandomValues.bind(crypto);
|
|
121
121
|
}
|
|
122
|
-
return Be(
|
|
122
|
+
return Be(At);
|
|
123
123
|
}
|
|
124
124
|
const Pt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), We = { randomUUID: Pt };
|
|
125
125
|
function ot(t, o, n) {
|
|
@@ -129,7 +129,7 @@ function ot(t, o, n) {
|
|
|
129
129
|
const e = t.random ?? t.rng?.() ?? It();
|
|
130
130
|
if (e.length < 16)
|
|
131
131
|
throw new Error("Random bytes length must be >= 16");
|
|
132
|
-
return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128,
|
|
132
|
+
return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, Tt(e);
|
|
133
133
|
}
|
|
134
134
|
var X = /* @__PURE__ */ ((t) => (t[t.Submit = 0] = "Submit", t[t.Link = 1] = "Link", t[t.Button = 2] = "Button", t))(X || {}), _e = /* @__PURE__ */ ((t) => (t[t.Create = 0] = "Create", t[t.Update = 1] = "Update", t[t.Details = 2] = "Details", t[t.List = 3] = "List", t[t.ReCreate = 5] = "ReCreate", t))(_e || {});
|
|
135
135
|
function Nt(t, o, n) {
|
|
@@ -349,7 +349,7 @@ async function Zt(t, o = null) {
|
|
|
349
349
|
});
|
|
350
350
|
Ct(e?.data, "WorkflowData.xlsx");
|
|
351
351
|
}
|
|
352
|
-
const
|
|
352
|
+
const be = (t, o) => {
|
|
353
353
|
let n = "";
|
|
354
354
|
return { res: t.every((r) => {
|
|
355
355
|
const a = eo(r, o);
|
|
@@ -376,7 +376,7 @@ const ye = (t, o) => {
|
|
|
376
376
|
}),
|
|
377
377
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
378
378
|
setup(t, { expose: o, emit: n }) {
|
|
379
|
-
const e = t, r = n, a = ke(t, "modelValue"), i = (d) =>
|
|
379
|
+
const e = t, r = n, a = ke(t, "modelValue"), i = (d) => be(e.validations, d), l = (d) => {
|
|
380
380
|
r("input", d);
|
|
381
381
|
}, c = (d) => {
|
|
382
382
|
const g = i(d);
|
|
@@ -431,11 +431,11 @@ const qe = /* @__PURE__ */ J(oo, [["render", no], ["__file", "InputText.vue"]]),
|
|
|
431
431
|
v.ruleName === "Max" && (i.value = v.ruleParameter), v.ruleName === "Min" && (l.value = v.ruleParameter);
|
|
432
432
|
});
|
|
433
433
|
});
|
|
434
|
-
const c = (v) =>
|
|
434
|
+
const c = (v) => be(e.validations, v), s = (v) => {
|
|
435
435
|
r("input", v);
|
|
436
436
|
}, d = (v) => {
|
|
437
|
-
const
|
|
438
|
-
r("error",
|
|
437
|
+
const y = c(v);
|
|
438
|
+
r("error", y.res ? "" : y.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((f) => {
|
|
439
439
|
f.event === "change" && r(f.event, f.handlerName, v);
|
|
440
440
|
});
|
|
441
441
|
};
|
|
@@ -476,34 +476,34 @@ const so = /* @__PURE__ */ J(ao, [["render", ro], ["__file", "InputNumber.vue"]]
|
|
|
476
476
|
}),
|
|
477
477
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change"], ["update:modelValue"]),
|
|
478
478
|
setup(t, { expose: o, emit: n }) {
|
|
479
|
-
const e = t, r = n, a = m(!1), i = m(e.config.options ?? []), l = ke(t, "modelValue"), c = (
|
|
480
|
-
const
|
|
479
|
+
const e = t, r = n, a = m(!1), i = m(e.config.options ?? []), l = ke(t, "modelValue"), c = (y) => be(e.validations, y), s = K(() => {
|
|
480
|
+
const y = {};
|
|
481
481
|
return e.triggers && e.triggers.length > 0 && e.triggers.forEach((f) => {
|
|
482
|
-
|
|
482
|
+
y[f.event] = (p) => {
|
|
483
483
|
r(f.event, f.handlerName, p);
|
|
484
484
|
const h = c(p);
|
|
485
485
|
r("error", h.res ? "" : h.errorMessages);
|
|
486
486
|
};
|
|
487
|
-
}),
|
|
487
|
+
}), y;
|
|
488
488
|
}), d = async () => {
|
|
489
489
|
if (e.config.dataSourceProvider) {
|
|
490
490
|
i.value = await Mt(e.config.dataSourceProvider);
|
|
491
|
-
const
|
|
492
|
-
|
|
491
|
+
const y = e.modelValue;
|
|
492
|
+
y != null && y !== "" && (i.value.some((p) => p.value === y) || r("update:modelValue", ""));
|
|
493
493
|
}
|
|
494
494
|
};
|
|
495
495
|
fe(d);
|
|
496
|
-
const g = (
|
|
497
|
-
r("update:modelValue",
|
|
498
|
-
const f = c(
|
|
496
|
+
const g = (y) => {
|
|
497
|
+
r("update:modelValue", y);
|
|
498
|
+
const f = c(y);
|
|
499
499
|
r("error", f.res ? "" : f.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((p) => {
|
|
500
|
-
p.event === "change" && r(p.event, p.handlerName,
|
|
500
|
+
p.event === "change" && r(p.event, p.handlerName, y);
|
|
501
501
|
});
|
|
502
502
|
};
|
|
503
503
|
o({
|
|
504
504
|
validate() {
|
|
505
|
-
const
|
|
506
|
-
return r("error",
|
|
505
|
+
const y = c(e.modelValue);
|
|
506
|
+
return r("error", y.res ? "" : y.errorMessages), y.res;
|
|
507
507
|
}
|
|
508
508
|
});
|
|
509
509
|
const v = { props: e, emits: r, loading: a, _options: i, model: l, validate: c, eventHandlers: s, loadOptions: d, changeHandler: g };
|
|
@@ -523,7 +523,7 @@ function lo(t, o, n, e, r, a) {
|
|
|
523
523
|
onChange: e.changeHandler
|
|
524
524
|
}, {
|
|
525
525
|
default: x(() => [
|
|
526
|
-
(u(!0), _(
|
|
526
|
+
(u(!0), _($, null, M(e._options, (c) => (u(), D(i, {
|
|
527
527
|
key: c.value,
|
|
528
528
|
value: c.value,
|
|
529
529
|
label: c.label
|
|
@@ -569,7 +569,7 @@ function uo(t, o, n, e, r, a) {
|
|
|
569
569
|
size: "large"
|
|
570
570
|
}, {
|
|
571
571
|
default: x(() => [
|
|
572
|
-
|
|
572
|
+
U(i, {
|
|
573
573
|
"field-names": e.fieldNames,
|
|
574
574
|
"model-value": n.modelValue,
|
|
575
575
|
options: e._options,
|
|
@@ -596,60 +596,60 @@ const fo = /* @__PURE__ */ J(co, [["render", uo], ["__file", "Cascader.vue"]]),
|
|
|
596
596
|
setup(t, { expose: o, emit: n }) {
|
|
597
597
|
const e = t, r = n, a = m({});
|
|
598
598
|
fe(async () => {
|
|
599
|
-
const
|
|
599
|
+
const T = await tt();
|
|
600
600
|
a.value = {
|
|
601
|
-
Authorization: `Bearer ${
|
|
601
|
+
Authorization: `Bearer ${T}`
|
|
602
602
|
};
|
|
603
603
|
});
|
|
604
|
-
const i = (
|
|
605
|
-
function g(
|
|
606
|
-
return
|
|
604
|
+
const i = (T) => be(e.validations, T), l = je(), c = l.apiBase, s = m(null), d = m("");
|
|
605
|
+
function g(T, k, C) {
|
|
606
|
+
return T.replace(/{WorkflowId}/g, k).replace(/{ClassName}/g, C);
|
|
607
607
|
}
|
|
608
608
|
const v = K(() => {
|
|
609
609
|
if (e.config.uploadURL) {
|
|
610
|
-
const
|
|
611
|
-
return g(
|
|
610
|
+
const T = c + e.config.uploadURL;
|
|
611
|
+
return g(T, d.value, e.className);
|
|
612
612
|
}
|
|
613
613
|
return "";
|
|
614
|
-
}),
|
|
615
|
-
|
|
614
|
+
}), y = (T) => {
|
|
615
|
+
T.stopPropagation(), s.value.submit();
|
|
616
616
|
};
|
|
617
|
-
function f(
|
|
618
|
-
const { file: k, name: C } =
|
|
619
|
-
return new Promise((S,
|
|
620
|
-
|
|
617
|
+
function f(T) {
|
|
618
|
+
const { file: k, name: C } = T, A = C ?? k.name;
|
|
619
|
+
return new Promise((S, I) => {
|
|
620
|
+
yt.confirm({
|
|
621
621
|
title: "Confirm Delete",
|
|
622
|
-
content: `Are you sure you want to delete ${
|
|
622
|
+
content: `Are you sure you want to delete ${A}?`,
|
|
623
623
|
async onOk() {
|
|
624
|
-
if (
|
|
625
|
-
return await e.config.removeFile(
|
|
624
|
+
if (T.status !== "init" && e.config.removeFile)
|
|
625
|
+
return await e.config.removeFile(T.uid), S(!0);
|
|
626
626
|
S(!0);
|
|
627
627
|
},
|
|
628
|
-
onCancel: () =>
|
|
628
|
+
onCancel: () => I("cancel")
|
|
629
629
|
});
|
|
630
630
|
});
|
|
631
631
|
}
|
|
632
|
-
const p = m(null), h = m(null), Z = (
|
|
633
|
-
p.value && (p.value(
|
|
634
|
-
}, oe = (
|
|
635
|
-
h.value && (h.value(
|
|
636
|
-
}, E = m([]), ee = (
|
|
637
|
-
E.value =
|
|
632
|
+
const p = m(null), h = m(null), Z = (T) => {
|
|
633
|
+
p.value && (p.value(T), p.value = null, h.value = null);
|
|
634
|
+
}, oe = (T) => {
|
|
635
|
+
h.value && (h.value(T), p.value = null, h.value = null);
|
|
636
|
+
}, E = m([]), ee = (T) => {
|
|
637
|
+
E.value = T.filter((k) => k.status === "init");
|
|
638
638
|
};
|
|
639
639
|
o({
|
|
640
|
-
submit(
|
|
640
|
+
submit(T) {
|
|
641
641
|
return new Promise((k, C) => {
|
|
642
|
-
s.value ? (e.config.uploadURL && (d.value =
|
|
642
|
+
s.value ? (e.config.uploadURL && (d.value = T), p.value = k, h.value = C, E.value.length ? pt(() => {
|
|
643
643
|
s.value?.submit();
|
|
644
|
-
}) : k(
|
|
644
|
+
}) : k(T)) : k(T);
|
|
645
645
|
});
|
|
646
646
|
},
|
|
647
647
|
validate() {
|
|
648
|
-
const
|
|
648
|
+
const T = e.config.files ?? [], k = [...E.value, ...T].length > 0 ? "hasFile" : "", C = i(k);
|
|
649
649
|
return r("error", C.res ? "" : C.errorMessages), C.res;
|
|
650
650
|
}
|
|
651
651
|
});
|
|
652
|
-
const ne = { props: e, emits: r, headers: a, validate: i, config: l, ApiBase: c, uploadRef: s, id: d, replaceIdAndClassName: g, action: v, submit:
|
|
652
|
+
const ne = { props: e, emits: r, headers: a, validate: i, config: l, ApiBase: c, uploadRef: s, id: d, replaceIdAndClassName: g, action: v, submit: y, onBeforeRemove: f, uploadPromiseResolve: p, uploadPromiseReject: h, handleUploadSuccess: Z, handleUploadError: oe, readyFiles: E, onChange: ee };
|
|
653
653
|
return Object.defineProperty(ne, "__isScriptSetup", { enumerable: !1, value: !0 }), ne;
|
|
654
654
|
}
|
|
655
655
|
});
|
|
@@ -670,7 +670,7 @@ function mo(t, o, n, e, r, a) {
|
|
|
670
670
|
}, {
|
|
671
671
|
"start-icon": x(() => o[0] || (o[0] = [])),
|
|
672
672
|
"upload-button": x(() => [
|
|
673
|
-
|
|
673
|
+
U(i, { type: "primary" }, {
|
|
674
674
|
default: x(() => o[1] || (o[1] = [
|
|
675
675
|
ae("Select File", -1)
|
|
676
676
|
])),
|
|
@@ -693,7 +693,7 @@ const go = /* @__PURE__ */ J(po, [["render", mo], ["__file", "FileUpload.vue"]])
|
|
|
693
693
|
},
|
|
694
694
|
emits: ["update:modelValue", "change", "error", "input"],
|
|
695
695
|
setup(t, { expose: o, emit: n }) {
|
|
696
|
-
const e = t, r = n, a = (s) =>
|
|
696
|
+
const e = t, r = n, a = (s) => be(e.validations, s), i = (s) => {
|
|
697
697
|
r("update:modelValue", s), r("input", s);
|
|
698
698
|
}, l = (s) => {
|
|
699
699
|
r("update:modelValue", s);
|
|
@@ -723,7 +723,7 @@ function vo(t, o, n, e, r, a) {
|
|
|
723
723
|
onChange: e.changeHandler
|
|
724
724
|
}, null, 8, ["model-value", "disabled"]);
|
|
725
725
|
}
|
|
726
|
-
const
|
|
726
|
+
const yo = /* @__PURE__ */ J(_o, [["render", vo], ["__file", "TextArea.vue"]]), bo = /* @__PURE__ */ z({
|
|
727
727
|
__name: "CheckBox",
|
|
728
728
|
props: /* @__PURE__ */ ce({
|
|
729
729
|
fieldKey: {},
|
|
@@ -738,7 +738,7 @@ const bo = /* @__PURE__ */ J(_o, [["render", vo], ["__file", "TextArea.vue"]]),
|
|
|
738
738
|
}),
|
|
739
739
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
740
740
|
setup(t, { expose: o, emit: n }) {
|
|
741
|
-
const e = t, r = n, a = ke(t, "modelValue"), i = (s) =>
|
|
741
|
+
const e = t, r = n, a = ke(t, "modelValue"), i = (s) => be(e.validations, s), l = (s) => {
|
|
742
742
|
const d = i(s);
|
|
743
743
|
r("error", d.res ? "" : d.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((g) => {
|
|
744
744
|
g.event === "change" && r(g.event, g.handlerName, s);
|
|
@@ -770,9 +770,9 @@ function wo(t, o, n, e, r, a) {
|
|
|
770
770
|
__: [1]
|
|
771
771
|
}, 8, ["modelValue", "disabled"]);
|
|
772
772
|
}
|
|
773
|
-
const ho = /* @__PURE__ */ J(
|
|
773
|
+
const ho = /* @__PURE__ */ J(bo, [["render", wo], ["__file", "CheckBox.vue"]]), ko = Symbol("ArcoConfigProvider"), Co = "arco", So = "$arco", nt = (t) => {
|
|
774
774
|
var o, n, e;
|
|
775
|
-
const r = ve(), a =
|
|
775
|
+
const r = ve(), a = ye(ko, void 0);
|
|
776
776
|
return `${(e = (n = a?.prefixCls) != null ? n : (o = r?.appContext.config.globalProperties[So]) == null ? void 0 : o.classPrefix) != null ? e : Co}-${t}`;
|
|
777
777
|
}, xo = Object.prototype.toString;
|
|
778
778
|
function at(t) {
|
|
@@ -822,8 +822,8 @@ const Vo = z({
|
|
|
822
822
|
}
|
|
823
823
|
};
|
|
824
824
|
}
|
|
825
|
-
}),
|
|
826
|
-
function
|
|
825
|
+
}), To = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
826
|
+
function Ao(t, o, n, e, r, a) {
|
|
827
827
|
return u(), _("svg", {
|
|
828
828
|
viewBox: "0 0 48 48",
|
|
829
829
|
fill: "none",
|
|
@@ -836,11 +836,11 @@ function To(t, o, n, e, r, a) {
|
|
|
836
836
|
"stroke-linejoin": t.strokeLinejoin,
|
|
837
837
|
onClick: o[0] || (o[0] = (...i) => t.onClick && t.onClick(...i))
|
|
838
838
|
}, o[1] || (o[1] = [
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
]), 14,
|
|
839
|
+
b("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),
|
|
840
|
+
b("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)
|
|
841
|
+
]), 14, To);
|
|
842
842
|
}
|
|
843
|
-
var He = /* @__PURE__ */ rt(Vo, [["render",
|
|
843
|
+
var He = /* @__PURE__ */ rt(Vo, [["render", Ao]]);
|
|
844
844
|
const Io = Object.assign(He, {
|
|
845
845
|
install: (t, o) => {
|
|
846
846
|
var n;
|
|
@@ -900,7 +900,7 @@ function Fo(t, o, n, e, r, a) {
|
|
|
900
900
|
"stroke-linejoin": t.strokeLinejoin,
|
|
901
901
|
onClick: o[0] || (o[0] = (...i) => t.onClick && t.onClick(...i))
|
|
902
902
|
}, o[1] || (o[1] = [
|
|
903
|
-
|
|
903
|
+
b("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
|
|
904
904
|
]), 14, No);
|
|
905
905
|
}
|
|
906
906
|
var Le = /* @__PURE__ */ rt(Po, [["render", Fo]]);
|
|
@@ -931,19 +931,19 @@ function Ho(t, o, n, e, r, a) {
|
|
|
931
931
|
"background-color": "#7A00E6"
|
|
932
932
|
}, {
|
|
933
933
|
content: x(() => [
|
|
934
|
-
e.stringOutput.length ? (u(!0), _(
|
|
934
|
+
e.stringOutput.length ? (u(!0), _($, { key: 0 }, M(e.stringOutput, (l) => (u(), _("p", { key: l }, Q(l), 1))), 128)) : (u(!0), _($, { key: 1 }, M(e.treeOutput, (l) => (u(), _("ul", {
|
|
935
935
|
key: l.title,
|
|
936
936
|
class: "list-unstyled"
|
|
937
937
|
}, [
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
(u(!0), _(
|
|
938
|
+
b("li", null, [
|
|
939
|
+
b("b", null, Q(l.title), 1),
|
|
940
|
+
b("ul", Do, [
|
|
941
|
+
(u(!0), _($, null, M(l.items, (c) => (u(), _("li", {
|
|
942
942
|
key: c.title
|
|
943
943
|
}, [
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
(u(!0), _(
|
|
944
|
+
b("u", null, Q(c.title), 1),
|
|
945
|
+
b("ul", Bo, [
|
|
946
|
+
(u(!0), _($, null, M(c.items, (s) => (u(), _("li", null, Q(s), 1))), 256))
|
|
947
947
|
])
|
|
948
948
|
]))), 128))
|
|
949
949
|
])
|
|
@@ -951,7 +951,7 @@ function Ho(t, o, n, e, r, a) {
|
|
|
951
951
|
]))), 128))
|
|
952
952
|
]),
|
|
953
953
|
default: x(() => [
|
|
954
|
-
|
|
954
|
+
U(e.IconQuestionCircle, { class: "icon" })
|
|
955
955
|
]),
|
|
956
956
|
_: 1
|
|
957
957
|
})) : re("", !0);
|
|
@@ -973,7 +973,7 @@ const st = /* @__PURE__ */ J(Ro, [["render", Ho], ["__scopeId", "data-v-1d3893b1
|
|
|
973
973
|
}),
|
|
974
974
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error"], ["update:modelValue"]),
|
|
975
975
|
setup(t, { expose: o, emit: n }) {
|
|
976
|
-
const e = t, r = n, a = ke(t, "modelValue"), i =
|
|
976
|
+
const e = t, r = n, a = ke(t, "modelValue"), i = Te("widgetRef"), l = K(() => {
|
|
977
977
|
switch (e.config?.widget?.widget) {
|
|
978
978
|
case "TextBox":
|
|
979
979
|
return qe;
|
|
@@ -986,7 +986,7 @@ const st = /* @__PURE__ */ J(Ro, [["render", Ho], ["__scopeId", "data-v-1d3893b1
|
|
|
986
986
|
case "File":
|
|
987
987
|
return go;
|
|
988
988
|
case "TextArea":
|
|
989
|
-
return
|
|
989
|
+
return yo;
|
|
990
990
|
case "DropDown":
|
|
991
991
|
return Ye;
|
|
992
992
|
case "CheckBox":
|
|
@@ -1019,8 +1019,8 @@ const st = /* @__PURE__ */ J(Ro, [["render", Ho], ["__scopeId", "data-v-1d3893b1
|
|
|
1019
1019
|
return e?.config?.widget?.title;
|
|
1020
1020
|
}
|
|
1021
1021
|
});
|
|
1022
|
-
const
|
|
1023
|
-
return Object.defineProperty(
|
|
1022
|
+
const y = { props: e, emits: r, model: a, widgetRef: i, curComp: l, errMsg: c, errHandler: s, changeHandler: d, isFileUpload: g, formatTitle: v, ToolTip: st };
|
|
1023
|
+
return Object.defineProperty(y, "__isScriptSetup", { enumerable: !1, value: !0 }), y;
|
|
1024
1024
|
}
|
|
1025
1025
|
}), Oo = { class: "title" }, $o = {
|
|
1026
1026
|
key: 0,
|
|
@@ -1031,15 +1031,15 @@ const st = /* @__PURE__ */ J(Ro, [["render", Ho], ["__scopeId", "data-v-1d3893b1
|
|
|
1031
1031
|
};
|
|
1032
1032
|
function Mo(t, o, n, e, r, a) {
|
|
1033
1033
|
return u(), _("div", null, [
|
|
1034
|
-
|
|
1034
|
+
b("div", Oo, [
|
|
1035
1035
|
ae(Q(e.formatTitle(e.props?.config?.widget?.title)) + " ", 1),
|
|
1036
1036
|
e.props.required || e.props.config.validations.some((i) => i.ruleName === "Required") ? (u(), _("span", $o, " * ")) : re("", !0),
|
|
1037
|
-
|
|
1037
|
+
U(e.ToolTip, {
|
|
1038
1038
|
"is-visible": e.props.config.widget?.isVisible ?? !1,
|
|
1039
1039
|
"output-text": e.props.config.widget?.outputText ?? []
|
|
1040
1040
|
}, null, 8, ["is-visible", "output-text"])
|
|
1041
1041
|
]),
|
|
1042
|
-
|
|
1042
|
+
b("div", null, [
|
|
1043
1043
|
(u(), D($e(e.curComp), {
|
|
1044
1044
|
ref: "widgetRef",
|
|
1045
1045
|
modelValue: e.model,
|
|
@@ -1056,7 +1056,7 @@ function Mo(t, o, n, e, r, a) {
|
|
|
1056
1056
|
])
|
|
1057
1057
|
]);
|
|
1058
1058
|
}
|
|
1059
|
-
const
|
|
1059
|
+
const Ae = /* @__PURE__ */ J(Lo, [["render", Mo], ["__scopeId", "data-v-67595df1"], ["__file", "index.vue"]]), Eo = /* @__PURE__ */ z({
|
|
1060
1060
|
__name: "SubmitButton",
|
|
1061
1061
|
props: {
|
|
1062
1062
|
url: {},
|
|
@@ -1155,20 +1155,20 @@ function Yo(t, o, n, e, r, a) {
|
|
|
1155
1155
|
}
|
|
1156
1156
|
const Ie = /* @__PURE__ */ J(qo, [["render", Yo], ["__file", "index.vue"]]), it = Symbol("library-router");
|
|
1157
1157
|
function Pe() {
|
|
1158
|
-
const t =
|
|
1159
|
-
return t ||
|
|
1158
|
+
const t = ye(it, null);
|
|
1159
|
+
return t || bt();
|
|
1160
1160
|
}
|
|
1161
1161
|
const lt = Symbol("library-triggers");
|
|
1162
1162
|
function Ee() {
|
|
1163
|
-
const t =
|
|
1163
|
+
const t = ye(lt, null);
|
|
1164
1164
|
return t || {};
|
|
1165
1165
|
}
|
|
1166
1166
|
const Qo = Symbol("library-pinia"), ct = Symbol("library-bpmStore"), dt = Symbol("library-svrStore");
|
|
1167
1167
|
function Ne() {
|
|
1168
|
-
return
|
|
1168
|
+
return ye(ct, null);
|
|
1169
1169
|
}
|
|
1170
1170
|
function Fe() {
|
|
1171
|
-
return
|
|
1171
|
+
return ye(dt, null);
|
|
1172
1172
|
}
|
|
1173
1173
|
const Jo = /* @__PURE__ */ z({
|
|
1174
1174
|
__name: "TopBar",
|
|
@@ -1186,17 +1186,17 @@ const Jo = /* @__PURE__ */ z({
|
|
|
1186
1186
|
function an(t, o, n, e, r, a) {
|
|
1187
1187
|
const i = V("a-avatar"), l = V("a-popover");
|
|
1188
1188
|
return u(), _("div", Xo, [
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1189
|
+
b("div", Zo, [
|
|
1190
|
+
b("div", en, Q(n.title), 1),
|
|
1191
|
+
b("div", tn, Q(n.subTitle), 1)
|
|
1192
1192
|
]),
|
|
1193
|
-
|
|
1194
|
-
|
|
1193
|
+
b("div", on, [
|
|
1194
|
+
U(l, { trigger: "click" }, {
|
|
1195
1195
|
content: x(() => [
|
|
1196
|
-
|
|
1196
|
+
b("div", nn, Q(n.email), 1)
|
|
1197
1197
|
]),
|
|
1198
1198
|
default: x(() => [
|
|
1199
|
-
|
|
1199
|
+
U(i, {
|
|
1200
1200
|
size: 48,
|
|
1201
1201
|
autoFixFontSize: "",
|
|
1202
1202
|
style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
|
|
@@ -1304,7 +1304,7 @@ const rn = /* @__PURE__ */ z({
|
|
|
1304
1304
|
},
|
|
1305
1305
|
setup(t, { expose: o }) {
|
|
1306
1306
|
o();
|
|
1307
|
-
const n = Ne(), e = Fe(), r = Pe(), a = Ee(), i =
|
|
1307
|
+
const n = Ne(), e = Fe(), r = Pe(), a = Ee(), i = Te("dataWidgets"), l = ve(), c = t, s = m({
|
|
1308
1308
|
pageType: "",
|
|
1309
1309
|
fields: {},
|
|
1310
1310
|
globalValidations: [],
|
|
@@ -1321,14 +1321,14 @@ const rn = /* @__PURE__ */ z({
|
|
|
1321
1321
|
}
|
|
1322
1322
|
}), d = m([]), g = m({});
|
|
1323
1323
|
function v(C) {
|
|
1324
|
-
return C ? Object.entries(C).map(([S,
|
|
1324
|
+
return C ? Object.entries(C).map(([S, I]) => ({
|
|
1325
1325
|
fieldKey: S,
|
|
1326
|
-
...
|
|
1326
|
+
...I
|
|
1327
1327
|
})).filter((S) => S.widget && S.widget.widget !== "Hidden").filter((S) => !ee.value.includes(S.fieldKey)) : [];
|
|
1328
1328
|
}
|
|
1329
|
-
function
|
|
1330
|
-
return C ? Object.entries(C).filter(([S,
|
|
1331
|
-
(S, [
|
|
1329
|
+
function y(C) {
|
|
1330
|
+
return C ? Object.entries(C).filter(([S, I]) => I.dependent).reduce(
|
|
1331
|
+
(S, [I, O]) => (S[I] = O.dependent, S),
|
|
1332
1332
|
{}
|
|
1333
1333
|
) : [];
|
|
1334
1334
|
}
|
|
@@ -1336,21 +1336,23 @@ const rn = /* @__PURE__ */ z({
|
|
|
1336
1336
|
fe(async () => {
|
|
1337
1337
|
h.value = !0;
|
|
1338
1338
|
const C = new Re().setWorkflowId(c.workflowId).setClassName(c.className).setStore({ svrStore: e, bpmStore: n }).build();
|
|
1339
|
-
s.value = await C.getPageData()
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1339
|
+
s.value = await C.getPageData();
|
|
1340
|
+
const A = s.value.fields.requestType.modelValue;
|
|
1341
|
+
a.Test?.({ fieldValue: A, hiddenFields: ee, formData: p }), d.value = v(s.value.fields), g.value = y(s.value.fields);
|
|
1342
|
+
for (const S in s.value.fields) {
|
|
1343
|
+
if (s.value.fields[S].widget?.widget === "File") {
|
|
1344
|
+
const I = d.value.find((O) => O.fieldKey === S);
|
|
1345
|
+
I && I.widget && (I.widget.files = []);
|
|
1344
1346
|
}
|
|
1345
|
-
p.value[
|
|
1347
|
+
p.value[S] = s.value.fields[S].modelValue;
|
|
1346
1348
|
}
|
|
1347
1349
|
h.value = !1;
|
|
1348
1350
|
});
|
|
1349
1351
|
function Z() {
|
|
1350
1352
|
return e()?.userInfo?.email_address ?? "";
|
|
1351
1353
|
}
|
|
1352
|
-
async function oe(C,
|
|
1353
|
-
switch (
|
|
1354
|
+
async function oe(C, A, S, I, O) {
|
|
1355
|
+
switch (A) {
|
|
1354
1356
|
case X.Submit:
|
|
1355
1357
|
let H = !0;
|
|
1356
1358
|
if (i.value?.forEach((W) => {
|
|
@@ -1363,7 +1365,7 @@ const rn = /* @__PURE__ */ z({
|
|
|
1363
1365
|
}
|
|
1364
1366
|
h.value = !0;
|
|
1365
1367
|
try {
|
|
1366
|
-
a[
|
|
1368
|
+
a[O]?.({ message: `${O} action triggered` });
|
|
1367
1369
|
const W = {
|
|
1368
1370
|
...p.value,
|
|
1369
1371
|
...g.value
|
|
@@ -1374,7 +1376,7 @@ const rn = /* @__PURE__ */ z({
|
|
|
1374
1376
|
W,
|
|
1375
1377
|
S
|
|
1376
1378
|
);
|
|
1377
|
-
a[`${
|
|
1379
|
+
a[`${O}Success` || ""]?.({
|
|
1378
1380
|
message: "Workflow created successfully",
|
|
1379
1381
|
workflowId: c.workflowId,
|
|
1380
1382
|
res: ie
|
|
@@ -1392,17 +1394,17 @@ const rn = /* @__PURE__ */ z({
|
|
|
1392
1394
|
case X.Link:
|
|
1393
1395
|
try {
|
|
1394
1396
|
await a[C.eventName || ""]?.(p.value, ee), r.push({
|
|
1395
|
-
name:
|
|
1397
|
+
name: I,
|
|
1396
1398
|
params: { className: c.className }
|
|
1397
1399
|
}), await a[`${C.eventName || ""}Success`]?.({
|
|
1398
|
-
message: `Router to ${
|
|
1400
|
+
message: `Router to ${I} pushed`
|
|
1399
1401
|
});
|
|
1400
1402
|
} catch (W) {
|
|
1401
1403
|
console.error("Error in link action trigger:", W);
|
|
1402
1404
|
}
|
|
1403
1405
|
break;
|
|
1404
1406
|
default:
|
|
1405
|
-
console.warn("Unknown action type:",
|
|
1407
|
+
console.warn("Unknown action type:", A);
|
|
1406
1408
|
}
|
|
1407
1409
|
}
|
|
1408
1410
|
const E = [
|
|
@@ -1413,10 +1415,10 @@ const rn = /* @__PURE__ */ z({
|
|
|
1413
1415
|
"jobAttachmentPrevious",
|
|
1414
1416
|
"positionId"
|
|
1415
1417
|
], ee = m(E);
|
|
1416
|
-
function ne(C,
|
|
1417
|
-
a[C]?.({ fieldValue:
|
|
1418
|
+
function ne(C, A) {
|
|
1419
|
+
a[C]?.({ fieldValue: A, hiddenFields: ee, formData: p }), s.value && (d.value = v(s.value.fields));
|
|
1418
1420
|
}
|
|
1419
|
-
const
|
|
1421
|
+
const T = K(() => Ke(d.value)), k = { bpmStore: n, svrStore: e, router: r, triggers: a, dataWidgetsRefs: i, instance: l, props: c, pageData: s, _fields: d, _dependent: g, genField: v, genDependentField: y, reversedActions: f, _data: p, loading: h, getApproverEmail: Z, clickHandler: oe, newHiddenFields: E, hiddenFields: ee, changeHandler: ne, groupedFields: T, DataWidgets: Ae, ActionButton: Ie, TopBar: Ue };
|
|
1420
1422
|
return Object.defineProperty(k, "__isScriptSetup", { enumerable: !1, value: !0 }), k;
|
|
1421
1423
|
}
|
|
1422
1424
|
}), sn = { class: "page-container" }, ln = { class: "page-body" }, cn = { class: "form-card" }, dn = { class: "form-fields-vertical" }, un = { class: "form-fields" }, fn = {
|
|
@@ -1426,27 +1428,27 @@ const rn = /* @__PURE__ */ z({
|
|
|
1426
1428
|
function _n(t, o, n, e, r, a) {
|
|
1427
1429
|
const i = V("a-card"), l = V("a-spin");
|
|
1428
1430
|
return u(), _("div", sn, [
|
|
1429
|
-
|
|
1431
|
+
U(e.TopBar, {
|
|
1430
1432
|
title: e.pageData.banner.title,
|
|
1431
1433
|
subTitle: e.pageData.banner.subTitle,
|
|
1432
1434
|
email: e.getApproverEmail()
|
|
1433
1435
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
+
b("div", ln, [
|
|
1437
|
+
U(l, {
|
|
1436
1438
|
loading: e.loading,
|
|
1437
1439
|
class: "form-container"
|
|
1438
1440
|
}, {
|
|
1439
1441
|
default: x(() => [
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
(u(!0), _(
|
|
1442
|
+
b("div", cn, [
|
|
1443
|
+
b("div", dn, [
|
|
1444
|
+
(u(!0), _($, null, M(e.groupedFields, (c) => (u(), D(i, {
|
|
1443
1445
|
key: c.name,
|
|
1444
1446
|
title: c.name,
|
|
1445
1447
|
style: { "margin-bottom": "24px" }
|
|
1446
1448
|
}, {
|
|
1447
1449
|
default: x(() => [
|
|
1448
|
-
|
|
1449
|
-
(u(!0), _(
|
|
1450
|
+
b("div", un, [
|
|
1451
|
+
(u(!0), _($, null, M(c.fields, (s) => (u(), D(e.DataWidgets, {
|
|
1450
1452
|
key: s.fieldKey,
|
|
1451
1453
|
ref_for: !0,
|
|
1452
1454
|
ref: "dataWidgets",
|
|
@@ -1471,11 +1473,11 @@ function _n(t, o, n, e, r, a) {
|
|
|
1471
1473
|
_: 3
|
|
1472
1474
|
}, 8, ["loading"])
|
|
1473
1475
|
]),
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
+
b("div", pn, [
|
|
1477
|
+
b("div", mn, [
|
|
1476
1478
|
ue(t.$slots, "action", {}, void 0, !0),
|
|
1477
|
-
|
|
1478
|
-
(u(!0), _(
|
|
1479
|
+
b("div", gn, [
|
|
1480
|
+
(u(!0), _($, null, M(e.reversedActions, (c) => (u(), D(e.ActionButton, {
|
|
1479
1481
|
key: c.title,
|
|
1480
1482
|
loading: e.loading,
|
|
1481
1483
|
config: c,
|
|
@@ -1487,7 +1489,7 @@ function _n(t, o, n, e, r, a) {
|
|
|
1487
1489
|
])
|
|
1488
1490
|
]);
|
|
1489
1491
|
}
|
|
1490
|
-
const vn = /* @__PURE__ */ J(rn, [["render", _n], ["__scopeId", "data-v-
|
|
1492
|
+
const vn = /* @__PURE__ */ J(rn, [["render", _n], ["__scopeId", "data-v-31413447"], ["__file", "CreateView.vue"]]), yn = /* @__PURE__ */ z({
|
|
1491
1493
|
__name: "UpdateView",
|
|
1492
1494
|
props: {
|
|
1493
1495
|
className: {},
|
|
@@ -1495,7 +1497,7 @@ const vn = /* @__PURE__ */ J(rn, [["render", _n], ["__scopeId", "data-v-7ac0ce3d
|
|
|
1495
1497
|
},
|
|
1496
1498
|
setup(t, { expose: o }) {
|
|
1497
1499
|
o();
|
|
1498
|
-
const n = Pe(), e = Ee(), r = Fe(), a = Ne(), i =
|
|
1500
|
+
const n = Pe(), e = Ee(), r = Fe(), a = Ne(), i = Te("dataWidgets"), l = ve(), c = t, s = m({
|
|
1499
1501
|
pageType: "",
|
|
1500
1502
|
fields: {},
|
|
1501
1503
|
globalValidations: [],
|
|
@@ -1512,45 +1514,45 @@ const vn = /* @__PURE__ */ J(rn, [["render", _n], ["__scopeId", "data-v-7ac0ce3d
|
|
|
1512
1514
|
}
|
|
1513
1515
|
}), d = m([]), g = m({});
|
|
1514
1516
|
function v(k) {
|
|
1515
|
-
return k ? Object.entries(k).map(([
|
|
1516
|
-
fieldKey:
|
|
1517
|
+
return k ? Object.entries(k).map(([A, S]) => ({
|
|
1518
|
+
fieldKey: A,
|
|
1517
1519
|
...S
|
|
1518
|
-
})).filter((
|
|
1520
|
+
})).filter((A) => A.widget && A.widget.widget !== "Hidden").filter((A) => !E.value.includes(A.fieldKey)) : [];
|
|
1519
1521
|
}
|
|
1520
|
-
function
|
|
1521
|
-
return k ? Object.entries(k).filter(([
|
|
1522
|
+
function y(k) {
|
|
1523
|
+
return k ? Object.entries(k).filter(([A, S]) => S.dependent).reduce((A, [S, I]) => (A[S] = I.dependent, A), {}) : [];
|
|
1522
1524
|
}
|
|
1523
1525
|
const f = K(() => s.value?.actions ? [...s.value.actions].reverse() : []), p = m({}), h = m(!1);
|
|
1524
1526
|
fe(async () => {
|
|
1525
1527
|
h.value = !0;
|
|
1526
1528
|
const k = new Re().setPageActionType(_e.Update).setClassName(c.className).setStore({ svrStore: r, bpmStore: a }).setWorkflowId(c.workflowId).build();
|
|
1527
1529
|
s.value = await k.getPageData();
|
|
1528
|
-
const C = await k.getBtnList(),
|
|
1529
|
-
s.value.actions = s.value.actions?.filter((
|
|
1530
|
-
const
|
|
1531
|
-
return
|
|
1530
|
+
const C = await k.getBtnList(), A = await k.getFiles();
|
|
1531
|
+
s.value.actions = s.value.actions?.filter((I) => {
|
|
1532
|
+
const O = C.find((H) => H.button === I.title);
|
|
1533
|
+
return O ? O.isShow : !0;
|
|
1532
1534
|
});
|
|
1533
1535
|
const S = s.value.fields.requestType.modelValue;
|
|
1534
|
-
e.Test?.({ fieldValue: S, hiddenFields: E, formData: p }), d.value = v(s.value.fields), g.value =
|
|
1535
|
-
for (const
|
|
1536
|
-
if (s.value.fields[
|
|
1537
|
-
const
|
|
1538
|
-
|
|
1536
|
+
e.Test?.({ fieldValue: S, hiddenFields: E, formData: p }), d.value = v(s.value.fields), g.value = y(s.value.fields);
|
|
1537
|
+
for (const I in s.value.fields) {
|
|
1538
|
+
if (s.value.fields[I].widget?.widget === "File") {
|
|
1539
|
+
const O = d.value.find((H) => H.fieldKey === I);
|
|
1540
|
+
O && O.widget && (O.widget.files = A[I] ?? [], O.widget.removeFile = (H) => k.removeFile(H));
|
|
1539
1541
|
}
|
|
1540
|
-
p.value[
|
|
1542
|
+
p.value[I] = s.value.fields[I].modelValue;
|
|
1541
1543
|
}
|
|
1542
1544
|
h.value = !1;
|
|
1543
1545
|
});
|
|
1544
1546
|
function Z() {
|
|
1545
1547
|
return r()?.userInfo?.email_address ?? "";
|
|
1546
1548
|
}
|
|
1547
|
-
async function oe(k, C,
|
|
1549
|
+
async function oe(k, C, A, S, I) {
|
|
1548
1550
|
switch (C) {
|
|
1549
1551
|
case X.Submit:
|
|
1550
|
-
let
|
|
1552
|
+
let O = !0;
|
|
1551
1553
|
if (i.value?.forEach((H) => {
|
|
1552
|
-
H?.validate && (H.validate() || (
|
|
1553
|
-
}),
|
|
1554
|
+
H?.validate && (H.validate() || (O = !1));
|
|
1555
|
+
}), !O) {
|
|
1554
1556
|
l?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
1555
1557
|
return;
|
|
1556
1558
|
}
|
|
@@ -1558,7 +1560,7 @@ const vn = /* @__PURE__ */ J(rn, [["render", _n], ["__scopeId", "data-v-7ac0ce3d
|
|
|
1558
1560
|
try {
|
|
1559
1561
|
const H = { ...p.value, ...g.value };
|
|
1560
1562
|
e.updatePageBeforeSubmit?.(H, a().employeeInfo);
|
|
1561
|
-
const W = await Dt(c.className, c.workflowId, H,
|
|
1563
|
+
const W = await Dt(c.className, c.workflowId, H, A), ie = i.value?.map((le) => le?.submit ? le.submit(W.toString()) : Promise.resolve()) || [];
|
|
1562
1564
|
await Promise.all(ie), h.value = !1, l?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${W.toString()}.`);
|
|
1563
1565
|
} catch {
|
|
1564
1566
|
l?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"), h.value = !1;
|
|
@@ -1578,37 +1580,37 @@ const vn = /* @__PURE__ */ J(rn, [["render", _n], ["__scopeId", "data-v-7ac0ce3d
|
|
|
1578
1580
|
function ee(k, C) {
|
|
1579
1581
|
e[k]?.({ fieldValue: C, hiddenFields: E, formData: p }), s.value && (d.value = v(s.value.fields));
|
|
1580
1582
|
}
|
|
1581
|
-
const ne = K(() => Ke(d.value)),
|
|
1582
|
-
return Object.defineProperty(
|
|
1583
|
+
const ne = K(() => Ke(d.value)), T = { router: n, triggers: e, svrStore: r, bpmStore: a, dataWidgetsRefs: i, instance: l, props: c, pageData: s, _fields: d, _dependent: g, genField: v, genDependentField: y, reversedActions: f, _data: p, loading: h, getApproverEmail: Z, clickHandler: oe, hiddenFields: E, changeHandler: ee, groupedFields: ne, DataWidgets: Ae, ActionButton: Ie, TopBar: Ue };
|
|
1584
|
+
return Object.defineProperty(T, "__isScriptSetup", { enumerable: !1, value: !0 }), T;
|
|
1583
1585
|
}
|
|
1584
|
-
}),
|
|
1586
|
+
}), bn = { class: "page-container" }, wn = { class: "page-body" }, hn = { class: "form-card" }, kn = { class: "form-fields-vertical" }, Cn = { class: "form-fields" }, Sn = {
|
|
1585
1587
|
key: 0,
|
|
1586
1588
|
class: "form-content"
|
|
1587
|
-
}, xn = { class: "page-footer" }, Vn = { class: "action-container" },
|
|
1588
|
-
function
|
|
1589
|
+
}, xn = { class: "page-footer" }, Vn = { class: "action-container" }, Tn = { class: "action-buttons" };
|
|
1590
|
+
function An(t, o, n, e, r, a) {
|
|
1589
1591
|
const i = V("a-card"), l = V("a-spin");
|
|
1590
|
-
return u(), _("div",
|
|
1591
|
-
|
|
1592
|
+
return u(), _("div", bn, [
|
|
1593
|
+
U(e.TopBar, {
|
|
1592
1594
|
title: e.pageData.banner.title,
|
|
1593
1595
|
subTitle: e.pageData.banner.subTitle,
|
|
1594
1596
|
email: e.getApproverEmail()
|
|
1595
1597
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
+
b("div", wn, [
|
|
1599
|
+
U(l, {
|
|
1598
1600
|
loading: e.loading,
|
|
1599
1601
|
class: "form-container"
|
|
1600
1602
|
}, {
|
|
1601
1603
|
default: x(() => [
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
(u(!0), _(
|
|
1604
|
+
b("div", hn, [
|
|
1605
|
+
b("div", kn, [
|
|
1606
|
+
(u(!0), _($, null, M(e.groupedFields, (c) => (u(), D(i, {
|
|
1605
1607
|
key: c.name,
|
|
1606
1608
|
title: c.name,
|
|
1607
1609
|
style: { "margin-bottom": "24px" }
|
|
1608
1610
|
}, {
|
|
1609
1611
|
default: x(() => [
|
|
1610
|
-
|
|
1611
|
-
(u(!0), _(
|
|
1612
|
+
b("div", Cn, [
|
|
1613
|
+
(u(!0), _($, null, M(c.fields, (s) => (u(), D(e.DataWidgets, {
|
|
1612
1614
|
key: s.fieldKey,
|
|
1613
1615
|
ref_for: !0,
|
|
1614
1616
|
ref: "dataWidgets",
|
|
@@ -1633,11 +1635,11 @@ function Tn(t, o, n, e, r, a) {
|
|
|
1633
1635
|
_: 3
|
|
1634
1636
|
}, 8, ["loading"])
|
|
1635
1637
|
]),
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
+
b("div", xn, [
|
|
1639
|
+
b("div", Vn, [
|
|
1638
1640
|
ue(t.$slots, "action", {}, void 0, !0),
|
|
1639
|
-
|
|
1640
|
-
(u(!0), _(
|
|
1641
|
+
b("div", Tn, [
|
|
1642
|
+
(u(!0), _($, null, M(e.reversedActions, (c) => (u(), D(e.ActionButton, {
|
|
1641
1643
|
key: c.title,
|
|
1642
1644
|
loading: e.loading,
|
|
1643
1645
|
config: c,
|
|
@@ -1649,9 +1651,9 @@ function Tn(t, o, n, e, r, a) {
|
|
|
1649
1651
|
])
|
|
1650
1652
|
]);
|
|
1651
1653
|
}
|
|
1652
|
-
const In = /* @__PURE__ */ J(
|
|
1654
|
+
const In = /* @__PURE__ */ J(yn, [["render", An], ["__scopeId", "data-v-605f261e"], ["__file", "UpdateView.vue"]]), ut = Symbol("library-custom-comp");
|
|
1653
1655
|
function Pn() {
|
|
1654
|
-
return
|
|
1656
|
+
return ye(ut, null);
|
|
1655
1657
|
}
|
|
1656
1658
|
const Nn = /* @__PURE__ */ z({
|
|
1657
1659
|
__name: "DetailView",
|
|
@@ -1678,13 +1680,13 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1678
1680
|
workFlowReason: "",
|
|
1679
1681
|
workflowId: ""
|
|
1680
1682
|
}
|
|
1681
|
-
}), g = m([]), v =
|
|
1682
|
-
function
|
|
1683
|
-
return
|
|
1684
|
-
typeof
|
|
1683
|
+
}), g = m([]), v = Te("dataWidgets");
|
|
1684
|
+
function y(N) {
|
|
1685
|
+
return N ? Object.entries(N).map(([G, F]) => {
|
|
1686
|
+
typeof F.modelValue == "boolean" ? F.fieldValue = F.modelValue ? "Yes" : "No" : F.fieldValue = F.modelValue;
|
|
1685
1687
|
const j = {
|
|
1686
1688
|
fieldKey: G,
|
|
1687
|
-
...
|
|
1689
|
+
...F
|
|
1688
1690
|
};
|
|
1689
1691
|
return j.widget?.readonly || j.validations?.some(
|
|
1690
1692
|
(me) => me.ruleName === "Required"
|
|
@@ -1701,11 +1703,11 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1701
1703
|
};
|
|
1702
1704
|
}).filter((G) => G.widget && G.widget.widget !== "Hidden").filter((G) => !C.value.includes(G.fieldKey)) : [];
|
|
1703
1705
|
}
|
|
1704
|
-
const f = K(() => Ke(g.value)), p = K(() => d.value?.actions ? [...d.value.actions].reverse() : []), h = m(!0), Z = (
|
|
1705
|
-
const G =
|
|
1706
|
-
return
|
|
1706
|
+
const f = K(() => Ke(g.value)), p = K(() => d.value?.actions ? [...d.value.actions].reverse() : []), h = m(!0), Z = (N, L) => {
|
|
1707
|
+
const G = N.findIndex((F) => F.isCurrent);
|
|
1708
|
+
return N.map((F, j) => {
|
|
1707
1709
|
const R = {
|
|
1708
|
-
id:
|
|
1710
|
+
id: F.id,
|
|
1709
1711
|
title: "",
|
|
1710
1712
|
proxy: "",
|
|
1711
1713
|
sub: "",
|
|
@@ -1713,18 +1715,18 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1713
1715
|
status: 1,
|
|
1714
1716
|
time: ""
|
|
1715
1717
|
};
|
|
1716
|
-
R.title =
|
|
1717
|
-
const me =
|
|
1718
|
-
if (me && we && me?.email?.toLowerCase() !== we?.approverEmail?.toLowerCase() && (R.title = `${we.name}`, R.proxy = `Proxy: ${me.name}`),
|
|
1718
|
+
R.title = F.workflowProcessApprovers[0]?.name;
|
|
1719
|
+
const me = F.workflowProcessApprovers[F.workflowProcessApprovers.length - 1], Ce = F.workflowHistorys[F.workflowHistorys.length - 1], we = Ce?.workflowHistoryApprovers[Ce?.workflowHistoryApprovers?.length - 1];
|
|
1720
|
+
if (me && we && me?.email?.toLowerCase() !== we?.approverEmail?.toLowerCase() && (R.title = `${we.name}`, R.proxy = `Proxy: ${me.name}`), F.sort > 1 ? R.sub = "Approver Role: " + F.nodeName.replace("Submit", "").replace("Approve", "") : R.sub = "Submit Application", F.isCurrent && L !== -1)
|
|
1719
1721
|
R.desc = "In Approval", R.status = 1;
|
|
1720
1722
|
else {
|
|
1721
|
-
const te =
|
|
1723
|
+
const te = F.workflowHistorys[F.workflowHistorys.length - 1];
|
|
1722
1724
|
if (te && te.status === 100)
|
|
1723
1725
|
R.time = xe(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), R.status = 2, R.desc = "approve success!";
|
|
1724
1726
|
else if (te && te.status === 999)
|
|
1725
1727
|
R.time = xe(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), R.status = 0, R.desc = "approve reject!";
|
|
1726
1728
|
else if (te)
|
|
1727
|
-
if (R.time = xe(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"),
|
|
1729
|
+
if (R.time = xe(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), F.sort === 1)
|
|
1728
1730
|
R.status = 2, R.desc = "";
|
|
1729
1731
|
else {
|
|
1730
1732
|
const Se = te.workflowHistoryApprovers[0];
|
|
@@ -1735,37 +1737,37 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1735
1737
|
}
|
|
1736
1738
|
return R;
|
|
1737
1739
|
});
|
|
1738
|
-
}, oe = m([]), E = m(!1), ee = m(!1), ne = m(!1),
|
|
1740
|
+
}, oe = m([]), E = m(!1), ee = m(!1), ne = m(!1), T = m(!1);
|
|
1739
1741
|
async function k() {
|
|
1740
|
-
const
|
|
1742
|
+
const N = await s.getBtnList();
|
|
1741
1743
|
d.value.actions = d.value.actions?.filter((L) => {
|
|
1742
|
-
const G =
|
|
1744
|
+
const G = N.find((F) => F.button === L.title);
|
|
1743
1745
|
return G ? G.isShow : !0;
|
|
1744
|
-
}), E.value =
|
|
1746
|
+
}), E.value = N.find((L) => L.button === "IsGlobal")?.isShow ?? !1, ee.value = N.find((L) => L.button === "AssignButton")?.isShow ?? !1, ne.value = N.find((L) => L.button === "AssignList")?.isShow ?? !1, T.value = N.find((L) => L.button === "AddCommentsButton")?.isShow ?? !1;
|
|
1745
1747
|
}
|
|
1746
1748
|
const C = m([]);
|
|
1747
|
-
async function
|
|
1749
|
+
async function A() {
|
|
1748
1750
|
h.value = !0, s = new Re().setPageActionType(_e.Details).setClassName(c.className).setStore({ svrStore: n, bpmStore: e }).setWorkflowId(c.workflowId).build(), d.value = await s.getPageData();
|
|
1749
|
-
const
|
|
1751
|
+
const N = await s.getFiles();
|
|
1750
1752
|
le.value = await s.getApprovers(), W.value = await s.getCommentsHistory(), se.value = await s.getAssociator(), await k(), r.detailPageLoaded?.(d, e().employeeInfo);
|
|
1751
1753
|
const L = d.value.fields.requestType.modelValue;
|
|
1752
|
-
r.Test?.({ fieldValue: L, hiddenFields: C }), g.value =
|
|
1753
|
-
for (const
|
|
1754
|
-
if (d.value.fields[
|
|
1755
|
-
const j = g.value.find((R) => R.fieldKey ===
|
|
1756
|
-
j && j.widget && (j.widget.files =
|
|
1754
|
+
r.Test?.({ fieldValue: L, hiddenFields: C }), g.value = y(d.value.fields);
|
|
1755
|
+
for (const F in d.value.fields)
|
|
1756
|
+
if (d.value.fields[F].widget?.widget === "File") {
|
|
1757
|
+
const j = g.value.find((R) => R.fieldKey === F);
|
|
1758
|
+
j && j.widget && (j.widget.files = N[F] ?? []);
|
|
1757
1759
|
}
|
|
1758
1760
|
const G = await s.getProcess();
|
|
1759
1761
|
oe.value = Z(G, 0), h.value = !1;
|
|
1760
1762
|
}
|
|
1761
|
-
fe(
|
|
1762
|
-
async function S(
|
|
1763
|
-
return r[
|
|
1763
|
+
fe(A);
|
|
1764
|
+
async function S(N, L) {
|
|
1765
|
+
return r[N]?.(L);
|
|
1764
1766
|
}
|
|
1765
|
-
function
|
|
1767
|
+
function I() {
|
|
1766
1768
|
return n()?.userInfo?.email_address ?? "";
|
|
1767
1769
|
}
|
|
1768
|
-
async function
|
|
1770
|
+
async function O(N, L, G, F, j) {
|
|
1769
1771
|
try {
|
|
1770
1772
|
switch (L) {
|
|
1771
1773
|
case X.Submit:
|
|
@@ -1785,7 +1787,7 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1785
1787
|
const we = g.value.find((ge) => ge.fieldKey === "approvedGrade")?.modelValue, te = j === "Approve" ? "100" : "-1", Se = await jt(
|
|
1786
1788
|
c.className,
|
|
1787
1789
|
c.workflowId,
|
|
1788
|
-
|
|
1790
|
+
I(),
|
|
1789
1791
|
me,
|
|
1790
1792
|
G,
|
|
1791
1793
|
te,
|
|
@@ -1801,12 +1803,12 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1801
1803
|
const ft = j === "Approve" ? `Request ID ${c.workflowId} has been approved.` : `Request ID ${c.workflowId} has been rejected.`;
|
|
1802
1804
|
l?.appContext.config.globalProperties.$notification.success(
|
|
1803
1805
|
ft
|
|
1804
|
-
),
|
|
1806
|
+
), A();
|
|
1805
1807
|
break;
|
|
1806
1808
|
case X.Link:
|
|
1807
1809
|
try {
|
|
1808
|
-
await r[
|
|
1809
|
-
name:
|
|
1810
|
+
await r[N.eventName || ""]?.(), a.push({
|
|
1811
|
+
name: F,
|
|
1810
1812
|
params: { className: c.className, workflowId: c.workflowId }
|
|
1811
1813
|
});
|
|
1812
1814
|
} catch (ge) {
|
|
@@ -1814,7 +1816,7 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1814
1816
|
}
|
|
1815
1817
|
break;
|
|
1816
1818
|
case X.Button:
|
|
1817
|
-
await r[
|
|
1819
|
+
await r[N.eventName || ""]?.({
|
|
1818
1820
|
approvers: le,
|
|
1819
1821
|
associators: se,
|
|
1820
1822
|
isShowAssignSelect: ee,
|
|
@@ -1830,19 +1832,19 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1830
1832
|
}
|
|
1831
1833
|
}
|
|
1832
1834
|
const H = m(""), W = m([]), ie = m(""), le = m([]), se = m([]);
|
|
1833
|
-
async function w(
|
|
1834
|
-
if (!
|
|
1835
|
+
async function w(N) {
|
|
1836
|
+
if (!N) {
|
|
1835
1837
|
l?.appContext.config.globalProperties.$message.error(
|
|
1836
1838
|
"Please select an approver"
|
|
1837
1839
|
);
|
|
1838
1840
|
return;
|
|
1839
1841
|
}
|
|
1840
|
-
await
|
|
1842
|
+
await P(
|
|
1841
1843
|
"Confirm Assign Approver",
|
|
1842
1844
|
"Do you want to assign the selected approver?"
|
|
1843
1845
|
);
|
|
1844
1846
|
try {
|
|
1845
|
-
await s.assignApprover(
|
|
1847
|
+
await s.assignApprover(N), se.value = await s.getAssociator(), k(), l?.appContext.config.globalProperties.$notification.success(
|
|
1846
1848
|
"Assign Approver clicked!"
|
|
1847
1849
|
);
|
|
1848
1850
|
} catch (L) {
|
|
@@ -1857,22 +1859,22 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1857
1859
|
);
|
|
1858
1860
|
}
|
|
1859
1861
|
}
|
|
1860
|
-
async function
|
|
1862
|
+
async function P(N, L) {
|
|
1861
1863
|
const { Modal: G } = await import("@arco-design/web-vue");
|
|
1862
|
-
return new Promise((
|
|
1864
|
+
return new Promise((F, j) => {
|
|
1863
1865
|
G.confirm({
|
|
1864
|
-
title:
|
|
1866
|
+
title: N,
|
|
1865
1867
|
content: L,
|
|
1866
1868
|
okText: "OK",
|
|
1867
1869
|
cancelText: "Cancel",
|
|
1868
|
-
onOk: () =>
|
|
1870
|
+
onOk: () => F(!0),
|
|
1869
1871
|
onCancel: () => j()
|
|
1870
1872
|
});
|
|
1871
1873
|
});
|
|
1872
1874
|
}
|
|
1873
|
-
async function B(
|
|
1875
|
+
async function B(N) {
|
|
1874
1876
|
try {
|
|
1875
|
-
await
|
|
1877
|
+
await P(
|
|
1876
1878
|
"Confirm Delete Associator",
|
|
1877
1879
|
"Do you want to delete this associator?"
|
|
1878
1880
|
);
|
|
@@ -1880,7 +1882,7 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1880
1882
|
return;
|
|
1881
1883
|
}
|
|
1882
1884
|
try {
|
|
1883
|
-
await s.deleteAssociator(
|
|
1885
|
+
await s.deleteAssociator(N.toString()), se.value = await s.getAssociator(), l?.appContext.config.globalProperties.$notification.success(
|
|
1884
1886
|
"Associator deleted successfully!"
|
|
1885
1887
|
);
|
|
1886
1888
|
} catch {
|
|
@@ -1900,18 +1902,18 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1900
1902
|
"Add Comment clicked!"
|
|
1901
1903
|
);
|
|
1902
1904
|
}
|
|
1903
|
-
function pe(
|
|
1904
|
-
return
|
|
1905
|
+
function pe(N) {
|
|
1906
|
+
return N ? N === "OtherInformationText" ? "Other Information" : N : "";
|
|
1905
1907
|
}
|
|
1906
1908
|
const ze = { svrStore: n, bpmStore: e, triggers: r, router: a, customComps: i, instance: l, props: c, get page() {
|
|
1907
1909
|
return s;
|
|
1908
|
-
}, set page(
|
|
1909
|
-
s =
|
|
1910
|
-
}, pageData: d, _fields: g, dataWidgetsRefs: v, genField:
|
|
1910
|
+
}, set page(N) {
|
|
1911
|
+
s = N;
|
|
1912
|
+
}, pageData: d, _fields: g, dataWidgetsRefs: v, genField: y, groupedFields: f, reversedActions: p, loading: h, mapWorkflowSteps: Z, steps: oe, isGlobal: E, isShowAssignSelect: ee, isShowAssignList: ne, isShowCommentTextArea: T, reloadButtonList: k, hiddenFields: C, load: A, triggerFn: S, getApproverEmail: I, clickHandler: O, comment: H, commentsHistory: W, selectedApprover: ie, approvers: le, associators: se, onAssignApprover: w, confirmDialog: P, onDeleteAssociator: B, onAddComment: de, formatTitle: pe, ActionButton: Ie, get IconDownload() {
|
|
1911
1913
|
return Uo;
|
|
1912
1914
|
}, TopBar: Ue, get formatDate() {
|
|
1913
1915
|
return xe;
|
|
1914
|
-
}, ToolTip: st, DataWidgets:
|
|
1916
|
+
}, ToolTip: st, DataWidgets: Ae };
|
|
1915
1917
|
return Object.defineProperty(ze, "__isScriptSetup", { enumerable: !1, value: !0 }), ze;
|
|
1916
1918
|
}
|
|
1917
1919
|
}), Fn = { class: "page-container" }, Un = { class: "page-body" }, Rn = { class: "detail-card" }, Dn = { class: "form-fields-vertical" }, Bn = { class: "detail-fields" }, Hn = { class: "detail-field" }, Ln = {
|
|
@@ -1930,55 +1932,55 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1930
1932
|
function Gn(t, o, n, e, r, a) {
|
|
1931
1933
|
const i = V("a-link"), l = V("a-space"), c = V("a-card");
|
|
1932
1934
|
V("a-option"), V("a-select");
|
|
1933
|
-
const s = V("a-button"), d = V("a-list-item"), g = V("a-list"), v = V("a-textarea"),
|
|
1935
|
+
const s = V("a-button"), d = V("a-list-item"), g = V("a-list"), v = V("a-textarea"), y = V("a-spin");
|
|
1934
1936
|
return u(), _("div", Fn, [
|
|
1935
|
-
|
|
1937
|
+
U(e.TopBar, {
|
|
1936
1938
|
title: e.pageData.banner.title,
|
|
1937
1939
|
subTitle: e.pageData.banner.subTitle,
|
|
1938
1940
|
email: e.getApproverEmail()
|
|
1939
1941
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
+
b("div", Un, [
|
|
1943
|
+
U(y, {
|
|
1942
1944
|
loading: e.loading,
|
|
1943
1945
|
class: "detail-container"
|
|
1944
1946
|
}, {
|
|
1945
1947
|
default: x(() => [
|
|
1946
|
-
|
|
1948
|
+
b("div", Rn, [
|
|
1947
1949
|
(u(), D($e(e.customComps.Steps), { steps: e.steps }, null, 8, ["steps"])),
|
|
1948
|
-
|
|
1949
|
-
(u(!0), _(
|
|
1950
|
+
b("div", Dn, [
|
|
1951
|
+
(u(!0), _($, null, M(e.groupedFields, (f) => (u(), D(c, {
|
|
1950
1952
|
key: f.name,
|
|
1951
1953
|
title: f.name,
|
|
1952
1954
|
style: { "margin-bottom": "24px" }
|
|
1953
1955
|
}, {
|
|
1954
1956
|
default: x(() => [
|
|
1955
|
-
|
|
1956
|
-
(u(!0), _(
|
|
1957
|
+
b("div", Bn, [
|
|
1958
|
+
(u(!0), _($, null, M(f.fields, (p) => (u(), _("div", {
|
|
1957
1959
|
key: p.fieldKey,
|
|
1958
1960
|
class: "detail-field-wrapper"
|
|
1959
1961
|
}, [
|
|
1960
|
-
|
|
1961
|
-
p.widget?.readonly ? (u(), _(
|
|
1962
|
-
|
|
1962
|
+
b("div", Hn, [
|
|
1963
|
+
p.widget?.readonly ? (u(), _($, { key: 1 }, [
|
|
1964
|
+
b("div", On, [
|
|
1963
1965
|
ae(Q(e.formatTitle(p.widget?.title)) + " ", 1),
|
|
1964
|
-
|
|
1966
|
+
U(e.ToolTip, {
|
|
1965
1967
|
"is-visible": p.widget?.isVisible ?? !1,
|
|
1966
1968
|
"output-text": p.widget?.outputText ?? []
|
|
1967
1969
|
}, null, 8, ["is-visible", "output-text"])
|
|
1968
1970
|
]),
|
|
1969
|
-
p.widget?.widget === "File" ? (u(!0), _(
|
|
1971
|
+
p.widget?.widget === "File" ? (u(!0), _($, { key: 0 }, M(p.widget.files, (h) => (u(), _("div", {
|
|
1970
1972
|
class: "field-value",
|
|
1971
1973
|
key: h.id
|
|
1972
1974
|
}, [
|
|
1973
|
-
|
|
1975
|
+
U(l, null, {
|
|
1974
1976
|
default: x(() => [
|
|
1975
1977
|
ae(Q(h.name) + " ", 1),
|
|
1976
|
-
|
|
1978
|
+
U(i, {
|
|
1977
1979
|
href: h.url,
|
|
1978
1980
|
target: "_blank"
|
|
1979
1981
|
}, {
|
|
1980
1982
|
default: x(() => [
|
|
1981
|
-
|
|
1983
|
+
U(e.IconDownload, { style: { color: "#7A00E6" } })
|
|
1982
1984
|
]),
|
|
1983
1985
|
_: 2
|
|
1984
1986
|
}, 1032, ["href"])
|
|
@@ -1987,7 +1989,7 @@ function Gn(t, o, n, e, r, a) {
|
|
|
1987
1989
|
}, 1024)
|
|
1988
1990
|
]))), 128)) : (u(), _("div", $n, Q(p.fieldValue), 1))
|
|
1989
1991
|
], 64)) : (u(), _("div", Ln, [
|
|
1990
|
-
|
|
1992
|
+
U(e.DataWidgets, {
|
|
1991
1993
|
ref_for: !0,
|
|
1992
1994
|
ref: "dataWidgets",
|
|
1993
1995
|
"field-key": p.fieldKey,
|
|
@@ -2008,13 +2010,13 @@ function Gn(t, o, n, e, r, a) {
|
|
|
2008
2010
|
re("", !0),
|
|
2009
2011
|
re("", !0),
|
|
2010
2012
|
e.isShowCommentTextArea ? (u(), _("div", jn, [
|
|
2011
|
-
|
|
2012
|
-
o[6] || (o[6] =
|
|
2013
|
-
|
|
2013
|
+
b("div", Mn, [
|
|
2014
|
+
o[6] || (o[6] = b("div", { class: "field-label" }, "Comment", -1)),
|
|
2015
|
+
U(v, {
|
|
2014
2016
|
modelValue: e.comment,
|
|
2015
2017
|
"onUpdate:modelValue": o[1] || (o[1] = (f) => e.comment = f)
|
|
2016
2018
|
}, null, 8, ["modelValue"]),
|
|
2017
|
-
|
|
2019
|
+
U(s, {
|
|
2018
2020
|
type: "primary",
|
|
2019
2021
|
onClick: e.onAddComment
|
|
2020
2022
|
}, {
|
|
@@ -2031,7 +2033,7 @@ function Gn(t, o, n, e, r, a) {
|
|
|
2031
2033
|
ae(" Comments History ", -1)
|
|
2032
2034
|
])),
|
|
2033
2035
|
default: x(() => [
|
|
2034
|
-
(u(!0), _(
|
|
2036
|
+
(u(!0), _($, null, M(e.commentsHistory, (f) => (u(), D(d, {
|
|
2035
2037
|
key: f.associator
|
|
2036
2038
|
}, {
|
|
2037
2039
|
default: x(() => [
|
|
@@ -2051,11 +2053,11 @@ function Gn(t, o, n, e, r, a) {
|
|
|
2051
2053
|
_: 3
|
|
2052
2054
|
}, 8, ["loading"])
|
|
2053
2055
|
]),
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
+
b("div", Kn, [
|
|
2057
|
+
b("div", zn, [
|
|
2056
2058
|
ue(t.$slots, "action", {}, void 0, !0),
|
|
2057
|
-
|
|
2058
|
-
(u(!0), _(
|
|
2059
|
+
b("div", Wn, [
|
|
2060
|
+
(u(!0), _($, null, M(e.reversedActions, (f) => (u(), D(e.ActionButton, {
|
|
2059
2061
|
key: f.title,
|
|
2060
2062
|
loading: e.loading,
|
|
2061
2063
|
config: f,
|
|
@@ -2085,10 +2087,10 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
|
|
|
2085
2087
|
filters: []
|
|
2086
2088
|
});
|
|
2087
2089
|
function s() {
|
|
2088
|
-
const w = Object.entries(S.value).filter(([, { value:
|
|
2090
|
+
const w = Object.entries(S.value).filter(([, { value: P }]) => P && P !== "").map(([P, { value: B, operator: de }]) => {
|
|
2089
2091
|
const pe = typeof B == "string" ? B.trim() : B;
|
|
2090
2092
|
return {
|
|
2091
|
-
key:
|
|
2093
|
+
key: P,
|
|
2092
2094
|
value: pe,
|
|
2093
2095
|
operator: de
|
|
2094
2096
|
// 根据实际需要调整操作符
|
|
@@ -2105,11 +2107,11 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
|
|
|
2105
2107
|
};
|
|
2106
2108
|
}
|
|
2107
2109
|
const d = K(() => ({
|
|
2108
|
-
x:
|
|
2110
|
+
x: y.value.length * 150 + 250
|
|
2109
2111
|
// 只设置横向滚动
|
|
2110
2112
|
// 移除 y 属性,让表格高度自适应
|
|
2111
2113
|
})), g = (w) => {
|
|
2112
|
-
const
|
|
2114
|
+
const P = Object.entries(w).filter(([, B]) => B.widget?.column).map(([B, de], pe) => ({
|
|
2113
2115
|
title: de.widget.title,
|
|
2114
2116
|
dataIndex: B.charAt(0).toLowerCase() + B.slice(1),
|
|
2115
2117
|
order: de.order,
|
|
@@ -2121,7 +2123,7 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
|
|
|
2121
2123
|
resizable: !0
|
|
2122
2124
|
// 启用列宽调整
|
|
2123
2125
|
})).sort((B, de) => B.order - de.order);
|
|
2124
|
-
|
|
2126
|
+
P.push({
|
|
2125
2127
|
title: "Actions",
|
|
2126
2128
|
slotName: "optional",
|
|
2127
2129
|
align: "center",
|
|
@@ -2129,8 +2131,8 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
|
|
|
2129
2131
|
minWidth: 200,
|
|
2130
2132
|
fixed: "right",
|
|
2131
2133
|
resizable: !1
|
|
2132
|
-
}),
|
|
2133
|
-
}, v = m([]),
|
|
2134
|
+
}), y.value = P;
|
|
2135
|
+
}, v = m([]), y = m([]), f = m(!0), p = m(!0), h = m(), Z = async () => {
|
|
2134
2136
|
p.value = !0;
|
|
2135
2137
|
const w = await Ut(i.className, s());
|
|
2136
2138
|
v.value = w.data, c.total = w.totalCount, p.value = !1;
|
|
@@ -2138,7 +2140,7 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
|
|
|
2138
2140
|
fe(async () => {
|
|
2139
2141
|
f.value = !0;
|
|
2140
2142
|
const w = new Re().setPageActionType(_e.List).setClassName(i.className).setStore({ svrStore: n, bpmStore: e }).build();
|
|
2141
|
-
l.value = await w.getPageData(), g(l.value.fields),
|
|
2143
|
+
l.value = await w.getPageData(), g(l.value.fields), O(l.value.fields), H(), A(l.value?.tabs?.[0]?.key || ""), h.value = l.value.actions, f.value = !1, oe.value = !0;
|
|
2142
2144
|
}), gt(() => {
|
|
2143
2145
|
oe.value && Z();
|
|
2144
2146
|
});
|
|
@@ -2147,7 +2149,7 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
|
|
|
2147
2149
|
}, ee = (w) => {
|
|
2148
2150
|
c.pageSize = w, Z();
|
|
2149
2151
|
};
|
|
2150
|
-
function ne(w,
|
|
2152
|
+
function ne(w, P, B, de, pe) {
|
|
2151
2153
|
switch (w) {
|
|
2152
2154
|
case X.Link:
|
|
2153
2155
|
r.push({ name: B, params: { workflowId: pe } });
|
|
@@ -2156,10 +2158,10 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
|
|
|
2156
2158
|
console.warn("Unknown action type:", w);
|
|
2157
2159
|
}
|
|
2158
2160
|
}
|
|
2159
|
-
function
|
|
2161
|
+
function T(w, P, B) {
|
|
2160
2162
|
switch (w) {
|
|
2161
2163
|
case X.Submit:
|
|
2162
|
-
Zt(
|
|
2164
|
+
Zt(P, { filters: [{ key: "approverList", value: k(), operator: 2 }] }), a?.appContext.config.globalProperties.$notification.success("submit success!");
|
|
2163
2165
|
break;
|
|
2164
2166
|
case X.Link:
|
|
2165
2167
|
r.push({ name: B });
|
|
@@ -2171,53 +2173,53 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
|
|
|
2171
2173
|
function k() {
|
|
2172
2174
|
return n()?.userInfo?.email_address ?? "";
|
|
2173
2175
|
}
|
|
2174
|
-
function C(w,
|
|
2175
|
-
return typeof w != "string" || w.indexOf("{currentUserEmail}") === -1 ? w : w.replace(/{currentUserEmail}/g,
|
|
2176
|
+
function C(w, P) {
|
|
2177
|
+
return typeof w != "string" || w.indexOf("{currentUserEmail}") === -1 ? w : w.replace(/{currentUserEmail}/g, P);
|
|
2176
2178
|
}
|
|
2177
|
-
function
|
|
2178
|
-
const
|
|
2179
|
-
c.filters =
|
|
2179
|
+
function A(w) {
|
|
2180
|
+
const P = l.value?.tabs?.find((B) => B.key === w)?.filters;
|
|
2181
|
+
c.filters = P?.map((B) => ({
|
|
2180
2182
|
...B,
|
|
2181
2183
|
value: C(B.value, k())
|
|
2182
2184
|
})) || [], c.current = 1, Z();
|
|
2183
2185
|
}
|
|
2184
|
-
const S = m({}),
|
|
2185
|
-
function
|
|
2186
|
+
const S = m({}), I = m([]);
|
|
2187
|
+
function O(w) {
|
|
2186
2188
|
if (!w) return [];
|
|
2187
|
-
|
|
2189
|
+
I.value = Object.entries(w).filter(([, P]) => P.isFiltered).map(([P, B]) => ({ fieldKey: P, fieldConfig: B }));
|
|
2188
2190
|
}
|
|
2189
2191
|
const H = () => {
|
|
2190
2192
|
const w = {};
|
|
2191
|
-
|
|
2192
|
-
w[
|
|
2193
|
+
I.value.forEach(({ fieldKey: P, fieldConfig: B }) => {
|
|
2194
|
+
w[P] = {}, w[P].value = B.modelValue, w[P].operator = B.operator;
|
|
2193
2195
|
}), S.value = w;
|
|
2194
2196
|
}, W = () => {
|
|
2195
2197
|
c.current = 1, Z();
|
|
2196
2198
|
}, ie = () => {
|
|
2197
2199
|
l.value && H(), W();
|
|
2198
2200
|
};
|
|
2199
|
-
function le(w,
|
|
2200
|
-
return !(w.location !== "InTable" || w.title === "Update" && (
|
|
2201
|
+
function le(w, P) {
|
|
2202
|
+
return !(w.location !== "InTable" || w.title === "Update" && (P.sort === 3 || P.status === 100 || P.status === -1));
|
|
2201
2203
|
}
|
|
2202
|
-
const se = { svrStore: n, bpmStore: e, router: r, instance: a, props: i, pageData: l, paging: c, createListParams: s, scroll: d, mapColumns: g, _data: v, _columns:
|
|
2204
|
+
const se = { svrStore: n, bpmStore: e, router: r, instance: a, props: i, pageData: l, paging: c, createListParams: s, scroll: d, mapColumns: g, _data: v, _columns: y, loadingPage: f, loadingTable: p, actions: h, loadData: Z, mounted: oe, pageChangeHandler: E, pageSizeChangeHandler: ee, clickHandler: ne, createHandler: T, getApproverEmail: k, replaceEmail: C, tabHandler: A, searchForm: S, searchableFields: I, mapSearchableFields: O, initSearchForm: H, handleSearch: W, handleReset: ie, judgeHiddenActions: le, ActionButton: Ie, DataWidgets: Ae, TopBar: Ue };
|
|
2203
2205
|
return Object.defineProperty(se, "__isScriptSetup", { enumerable: !1, value: !0 }), se;
|
|
2204
2206
|
}
|
|
2205
2207
|
}), Qn = { class: "list-container" }, Jn = { class: "query-title" };
|
|
2206
2208
|
function Xn(t, o, n, e, r, a) {
|
|
2207
|
-
const i = V("a-space"), l = V("a-col"), c = V("a-button"), s = V("a-row"), d = V("a-card"), g = V("a-tab-pane"), v = V("a-tabs"),
|
|
2209
|
+
const i = V("a-space"), l = V("a-col"), c = V("a-button"), s = V("a-row"), d = V("a-card"), g = V("a-tab-pane"), v = V("a-tabs"), y = V("a-table");
|
|
2208
2210
|
return u(), _("div", Qn, [
|
|
2209
|
-
|
|
2211
|
+
U(e.TopBar, {
|
|
2210
2212
|
title: e.pageData?.banner.title ?? "",
|
|
2211
2213
|
subTitle: e.pageData?.banner.subTitle ?? "",
|
|
2212
2214
|
email: e.getApproverEmail()
|
|
2213
2215
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
2214
|
-
|
|
2216
|
+
U(d, null, {
|
|
2215
2217
|
default: x(() => [
|
|
2216
|
-
|
|
2217
|
-
o[0] || (o[0] =
|
|
2218
|
-
|
|
2218
|
+
b("div", Jn, [
|
|
2219
|
+
o[0] || (o[0] = b("h3", null, "Search Conditions", -1)),
|
|
2220
|
+
U(i, { size: "medium" }, {
|
|
2219
2221
|
default: x(() => [
|
|
2220
|
-
(u(!0), _(
|
|
2222
|
+
(u(!0), _($, null, M(e.actions, (f) => (u(), _($, {
|
|
2221
2223
|
key: f.title
|
|
2222
2224
|
}, [
|
|
2223
2225
|
f.location === "InOperation" ? (u(), D(e.ActionButton, {
|
|
@@ -2230,15 +2232,15 @@ function Xn(t, o, n, e, r, a) {
|
|
|
2230
2232
|
_: 1
|
|
2231
2233
|
})
|
|
2232
2234
|
]),
|
|
2233
|
-
|
|
2235
|
+
U(s, { gutter: [24, 20] }, {
|
|
2234
2236
|
default: x(() => [
|
|
2235
|
-
(u(!0), _(
|
|
2237
|
+
(u(!0), _($, null, M(e.searchableFields, (f) => (u(), D(l, {
|
|
2236
2238
|
key: f.fieldKey,
|
|
2237
2239
|
span: 6,
|
|
2238
2240
|
class: "search-col"
|
|
2239
2241
|
}, {
|
|
2240
2242
|
default: x(() => [
|
|
2241
|
-
|
|
2243
|
+
U(e.DataWidgets, {
|
|
2242
2244
|
name: f.fieldKey,
|
|
2243
2245
|
config: f.fieldConfig,
|
|
2244
2246
|
modelValue: e.searchForm[f.fieldKey].value,
|
|
@@ -2248,14 +2250,14 @@ function Xn(t, o, n, e, r, a) {
|
|
|
2248
2250
|
]),
|
|
2249
2251
|
_: 2
|
|
2250
2252
|
}, 1024))), 128)),
|
|
2251
|
-
|
|
2253
|
+
U(l, {
|
|
2252
2254
|
span: 6,
|
|
2253
2255
|
class: "search-col form-buttons"
|
|
2254
2256
|
}, {
|
|
2255
2257
|
default: x(() => [
|
|
2256
|
-
|
|
2258
|
+
U(i, { size: "medium" }, {
|
|
2257
2259
|
default: x(() => [
|
|
2258
|
-
|
|
2260
|
+
U(c, {
|
|
2259
2261
|
type: "primary",
|
|
2260
2262
|
size: "medium",
|
|
2261
2263
|
onClick: e.handleSearch
|
|
@@ -2266,7 +2268,7 @@ function Xn(t, o, n, e, r, a) {
|
|
|
2266
2268
|
_: 1,
|
|
2267
2269
|
__: [1]
|
|
2268
2270
|
}),
|
|
2269
|
-
|
|
2271
|
+
U(c, {
|
|
2270
2272
|
size: "medium",
|
|
2271
2273
|
onClick: e.handleReset
|
|
2272
2274
|
}, {
|
|
@@ -2288,19 +2290,19 @@ function Xn(t, o, n, e, r, a) {
|
|
|
2288
2290
|
]),
|
|
2289
2291
|
_: 1
|
|
2290
2292
|
}),
|
|
2291
|
-
|
|
2293
|
+
U(v, {
|
|
2292
2294
|
size: "large",
|
|
2293
2295
|
onTabClick: e.tabHandler
|
|
2294
2296
|
}, {
|
|
2295
2297
|
default: x(() => [
|
|
2296
|
-
(u(!0), _(
|
|
2298
|
+
(u(!0), _($, null, M(e.pageData?.tabs, (f) => (u(), D(g, {
|
|
2297
2299
|
key: f.key,
|
|
2298
2300
|
title: f.title
|
|
2299
2301
|
}, null, 8, ["title"]))), 128))
|
|
2300
2302
|
]),
|
|
2301
2303
|
_: 1
|
|
2302
2304
|
}),
|
|
2303
|
-
|
|
2305
|
+
U(y, {
|
|
2304
2306
|
columns: e._columns,
|
|
2305
2307
|
data: e._data,
|
|
2306
2308
|
stripe: "",
|
|
@@ -2320,9 +2322,9 @@ function Xn(t, o, n, e, r, a) {
|
|
|
2320
2322
|
onPageSizeChange: e.pageSizeChangeHandler
|
|
2321
2323
|
}, {
|
|
2322
2324
|
optional: x(({ record: f }) => [
|
|
2323
|
-
|
|
2325
|
+
U(i, { size: "small" }, {
|
|
2324
2326
|
default: x(() => [
|
|
2325
|
-
(u(!0), _(
|
|
2327
|
+
(u(!0), _($, null, M(e.actions, (p) => (u(), _($, {
|
|
2326
2328
|
key: p.title
|
|
2327
2329
|
}, [
|
|
2328
2330
|
e.judgeHiddenActions(p, f) ? (u(), D(e.ActionButton, {
|