@chase-shao/vue-component-lib 1.2.115 → 1.2.117
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 +131 -129
- 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 g, getCurrentInstance as
|
|
1
|
+
import { ref as g, getCurrentInstance as ge, inject as we, defineComponent as G, mergeModels as ce, useModel as xe, resolveComponent as x, createBlock as H, openBlock as u, onMounted as _e, computed as M, withCtx as C, createElementBlock as v, Fragment as z, renderList as W, createVNode as F, nextTick as wt, createElementVNode as y, createTextVNode as ae, toDisplayString as q, normalizeStyle as et, normalizeClass as tt, createCommentVNode as se, useTemplateRef as Ie, resolveDynamicComponent as Me, renderSlot as ue, reactive as yt, onActivated as kt } from "vue";
|
|
2
2
|
import St from "axios";
|
|
3
3
|
import { defineStore as Ct } from "pinia";
|
|
4
4
|
import { useRouter as xt } from "vue-router";
|
|
@@ -9,7 +9,7 @@ const ot = Ct("main", () => {
|
|
|
9
9
|
token: t,
|
|
10
10
|
error: o
|
|
11
11
|
};
|
|
12
|
-
}),
|
|
12
|
+
}), At = async (t) => new Promise((o) => setTimeout(o, t)), Vt = async (t, o, n, e = void 0) => {
|
|
13
13
|
if (t[o] === void 0)
|
|
14
14
|
try {
|
|
15
15
|
t[o] = null, t[o] = await n() || e;
|
|
@@ -17,27 +17,27 @@ const ot = Ct("main", () => {
|
|
|
17
17
|
console.error(a), t[o] = void 0;
|
|
18
18
|
}
|
|
19
19
|
for (; t[o] === null; )
|
|
20
|
-
await
|
|
20
|
+
await At(100);
|
|
21
21
|
return t[o];
|
|
22
|
-
},
|
|
22
|
+
}, Se = (t) => {
|
|
23
23
|
const o = `0${t}`;
|
|
24
24
|
return o.substring(o.length - 2);
|
|
25
|
-
},
|
|
25
|
+
}, Ae = (t, o = "yyyy-MM-dd hh:mm:ss") => {
|
|
26
26
|
if (!t || typeof t == "string" && t.length === 0)
|
|
27
27
|
return "";
|
|
28
28
|
try {
|
|
29
29
|
const n = new Date(t), e = [
|
|
30
30
|
["yyyy", n.getFullYear()],
|
|
31
31
|
["yy", n.getFullYear().toString().substring(2)],
|
|
32
|
-
["MM",
|
|
32
|
+
["MM", Se(n.getMonth() + 1)],
|
|
33
33
|
["M", n.getMonth() + 1],
|
|
34
|
-
["dd",
|
|
34
|
+
["dd", Se(n.getDate())],
|
|
35
35
|
["d", n.getDate()],
|
|
36
|
-
["hh",
|
|
36
|
+
["hh", Se(n.getHours())],
|
|
37
37
|
["h", n.getHours()],
|
|
38
|
-
["mm",
|
|
38
|
+
["mm", Se(n.getMinutes())],
|
|
39
39
|
["m", n.getMinutes()],
|
|
40
|
-
["ss",
|
|
40
|
+
["ss", Se(n.getSeconds())],
|
|
41
41
|
["s", n.getSeconds()]
|
|
42
42
|
];
|
|
43
43
|
for (const [a, r] of e)
|
|
@@ -64,16 +64,16 @@ let je = null;
|
|
|
64
64
|
function Ft(t) {
|
|
65
65
|
je = t ?? null;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
if (
|
|
69
|
-
const o =
|
|
67
|
+
function he() {
|
|
68
|
+
if (ge()) {
|
|
69
|
+
const o = we(nt, null);
|
|
70
70
|
return o || xt();
|
|
71
71
|
}
|
|
72
72
|
if (je)
|
|
73
73
|
return je;
|
|
74
74
|
throw new Error("Router is unavailable. Pass router when installing the plugin before using useLibraryRouter outside setup().");
|
|
75
75
|
}
|
|
76
|
-
const rt =
|
|
76
|
+
const rt = ge();
|
|
77
77
|
function ze(t) {
|
|
78
78
|
if (!t || typeof t != "object") return !1;
|
|
79
79
|
const o = Object.getPrototypeOf(t);
|
|
@@ -82,13 +82,13 @@ function ze(t) {
|
|
|
82
82
|
function at(t) {
|
|
83
83
|
return typeof t != "string" ? t : t.replace(/[&<>"']/g, "");
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Ce(t) {
|
|
86
86
|
if (Array.isArray(t))
|
|
87
|
-
return t.map(
|
|
87
|
+
return t.map(Ce);
|
|
88
88
|
if (ze(t)) {
|
|
89
89
|
const o = {};
|
|
90
90
|
return Object.keys(t).forEach((n) => {
|
|
91
|
-
o[n] =
|
|
91
|
+
o[n] = Ce(t[n]);
|
|
92
92
|
}), o;
|
|
93
93
|
}
|
|
94
94
|
return at(t);
|
|
@@ -96,19 +96,19 @@ function Se(t) {
|
|
|
96
96
|
function Nt(t) {
|
|
97
97
|
const o = (t.method || "").toLowerCase();
|
|
98
98
|
if (o === "get")
|
|
99
|
-
return t.params && (ze(t.params) || Array.isArray(t.params)) && (t.params =
|
|
99
|
+
return t.params && (ze(t.params) || Array.isArray(t.params)) && (t.params = Ce(t.params)), t;
|
|
100
100
|
if (!["post", "put"].includes(o)) return t;
|
|
101
101
|
const n = t.headers || {}, a = (n["Content-Type"] || n["content-type"] || "").includes("application/json");
|
|
102
102
|
if (t.data && (a || ze(t.data) || Array.isArray(t.data)))
|
|
103
103
|
if (typeof t.data == "string")
|
|
104
104
|
try {
|
|
105
105
|
const r = JSON.parse(t.data);
|
|
106
|
-
t.data = JSON.stringify(
|
|
106
|
+
t.data = JSON.stringify(Ce(r));
|
|
107
107
|
} catch {
|
|
108
108
|
return t;
|
|
109
109
|
}
|
|
110
110
|
else
|
|
111
|
-
t.data =
|
|
111
|
+
t.data = Ce(t.data);
|
|
112
112
|
return t.data && typeof t.data == "string" && (t.data = at(t.data)), t;
|
|
113
113
|
}
|
|
114
114
|
function st() {
|
|
@@ -133,10 +133,10 @@ const Ut = (t) => {
|
|
|
133
133
|
if (t.response) {
|
|
134
134
|
if (t.response.status !== 400) {
|
|
135
135
|
if (t.response.status === 401)
|
|
136
|
-
|
|
136
|
+
he().push("/error/401");
|
|
137
137
|
else if (t.response.status >= 500) {
|
|
138
138
|
const o = ot();
|
|
139
|
-
o.error = t,
|
|
139
|
+
o.error = t, he().push("/error/500");
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
} else t.request ? console.error("error with request", t.request) : console.error("Error", t.message);
|
|
@@ -154,7 +154,7 @@ function it() {
|
|
|
154
154
|
}
|
|
155
155
|
const lt = async () => {
|
|
156
156
|
const { apiBase: t, appSecret: o } = st(), n = it(), e = ot();
|
|
157
|
-
return await
|
|
157
|
+
return await Vt(e, "token", async () => {
|
|
158
158
|
const a = await n.post(`${t}/GenerateToken`, {
|
|
159
159
|
appid: "bpm",
|
|
160
160
|
appsecret: o
|
|
@@ -199,7 +199,7 @@ function ct(t, o, n) {
|
|
|
199
199
|
throw new Error("Random bytes length must be >= 16");
|
|
200
200
|
return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, Dt(e);
|
|
201
201
|
}
|
|
202
|
-
var X = /* @__PURE__ */ ((t) => (t[t.Submit = 0] = "Submit", t[t.Link = 1] = "Link", t[t.Button = 2] = "Button", t))(X || {}),
|
|
202
|
+
var X = /* @__PURE__ */ ((t) => (t[t.Submit = 0] = "Submit", t[t.Link = 1] = "Link", t[t.Button = 2] = "Button", t))(X || {}), be = /* @__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))(be || {});
|
|
203
203
|
function Ot(t, o, n) {
|
|
204
204
|
const e = {
|
|
205
205
|
pageType: "",
|
|
@@ -407,7 +407,7 @@ async function oo(t, o = null) {
|
|
|
407
407
|
});
|
|
408
408
|
It(e?.data, "WorkflowData.xlsx");
|
|
409
409
|
}
|
|
410
|
-
const
|
|
410
|
+
const ye = (t, o) => {
|
|
411
411
|
let n = "";
|
|
412
412
|
return { res: t.every((a) => {
|
|
413
413
|
const r = no(a, o);
|
|
@@ -433,7 +433,7 @@ const we = (t, o) => {
|
|
|
433
433
|
}),
|
|
434
434
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
435
435
|
setup(t, { expose: o, emit: n }) {
|
|
436
|
-
const e = t, a = n, r =
|
|
436
|
+
const e = t, a = n, r = xe(t, "modelValue"), s = (d) => ye(e.validations, d), l = (d) => {
|
|
437
437
|
a("input", d);
|
|
438
438
|
}, c = (d) => {
|
|
439
439
|
const _ = s(d);
|
|
@@ -483,13 +483,13 @@ const Ye = /* @__PURE__ */ Z(ao, [["render", so], ["__file", "InputText.vue"]]),
|
|
|
483
483
|
}),
|
|
484
484
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
485
485
|
setup(t, { expose: o, emit: n }) {
|
|
486
|
-
const e = t, a = n, r =
|
|
487
|
-
|
|
486
|
+
const e = t, a = n, r = xe(t, "modelValue"), s = g(e.config.maxLength ?? 100), l = g(1);
|
|
487
|
+
_e(() => {
|
|
488
488
|
e.validations && e.validations.forEach((h) => {
|
|
489
489
|
h.ruleName === "Max" && (s.value = h.ruleParameter), h.ruleName === "Min" && (l.value = h.ruleParameter);
|
|
490
490
|
});
|
|
491
491
|
});
|
|
492
|
-
const c = (h) =>
|
|
492
|
+
const c = (h) => ye(e.validations, h), i = (h) => {
|
|
493
493
|
a("input", h);
|
|
494
494
|
}, d = (h) => {
|
|
495
495
|
const w = c(h);
|
|
@@ -535,7 +535,7 @@ const co = /* @__PURE__ */ Z(io, [["render", lo], ["__file", "InputNumber.vue"]]
|
|
|
535
535
|
}),
|
|
536
536
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change"], ["update:modelValue"]),
|
|
537
537
|
setup(t, { expose: o, emit: n }) {
|
|
538
|
-
const e = t, a = n, r = g(!1), s = g(e.config.options ?? []), l =
|
|
538
|
+
const e = t, a = n, r = g(!1), s = g(e.config.options ?? []), l = xe(t, "modelValue"), c = (w) => ye(e.validations, w), i = M(() => {
|
|
539
539
|
const w = {};
|
|
540
540
|
return e.triggers && e.triggers.length > 0 && e.triggers.forEach((f) => {
|
|
541
541
|
w[f.event] = (m) => {
|
|
@@ -551,7 +551,7 @@ const co = /* @__PURE__ */ Z(io, [["render", lo], ["__file", "InputNumber.vue"]]
|
|
|
551
551
|
w != null && w !== "" && (s.value.some((m) => m.value === w) || a("update:modelValue", ""));
|
|
552
552
|
}
|
|
553
553
|
};
|
|
554
|
-
|
|
554
|
+
_e(d);
|
|
555
555
|
const _ = (w) => {
|
|
556
556
|
a("update:modelValue", w);
|
|
557
557
|
const f = c(w);
|
|
@@ -602,7 +602,7 @@ const Qe = /* @__PURE__ */ Z(uo, [["render", fo], ["__file", "SelectList.vue"]])
|
|
|
602
602
|
const e = t, a = n, r = g(e.config.options ?? []), s = (i) => {
|
|
603
603
|
a("update:modelValue", i), a("change", i);
|
|
604
604
|
};
|
|
605
|
-
|
|
605
|
+
_e(async () => {
|
|
606
606
|
if (e.config) {
|
|
607
607
|
const i = e.config.dataSourceProvider;
|
|
608
608
|
if (i) {
|
|
@@ -654,7 +654,7 @@ const go = /* @__PURE__ */ Z(po, [["render", mo], ["__file", "Cascader.vue"]]),
|
|
|
654
654
|
},
|
|
655
655
|
emits: ["update:modelValue", "change", "error", "input"],
|
|
656
656
|
setup(t, { expose: o, emit: n }) {
|
|
657
|
-
const e = t, a = n, r = g({}), s = (p) =>
|
|
657
|
+
const e = t, a = n, r = g({}), s = (p) => ye(e.validations, p), l = Ee(), c = l.apiBase, i = g(null), d = g("");
|
|
658
658
|
function _(p, L, $) {
|
|
659
659
|
return p.replace(/{WorkflowId}/g, L).replace(/{ClassName}/g, $);
|
|
660
660
|
}
|
|
@@ -686,7 +686,7 @@ const go = /* @__PURE__ */ Z(po, [["render", mo], ["__file", "Cascader.vue"]]),
|
|
|
686
686
|
};
|
|
687
687
|
function le(p) {
|
|
688
688
|
const { file: L, name: $ } = p, oe = $ ?? L.name;
|
|
689
|
-
return new Promise((b,
|
|
689
|
+
return new Promise((b, V) => {
|
|
690
690
|
Tt.confirm({
|
|
691
691
|
title: "Confirm Delete",
|
|
692
692
|
content: `Are you sure you want to delete ${oe}?`,
|
|
@@ -695,7 +695,7 @@ const go = /* @__PURE__ */ Z(po, [["render", mo], ["__file", "Cascader.vue"]]),
|
|
|
695
695
|
return await e.config.removeFile(p.uid), b(!0);
|
|
696
696
|
b(!0);
|
|
697
697
|
},
|
|
698
|
-
onCancel: () =>
|
|
698
|
+
onCancel: () => V("cancel")
|
|
699
699
|
});
|
|
700
700
|
});
|
|
701
701
|
}
|
|
@@ -703,13 +703,13 @@ const go = /* @__PURE__ */ Z(po, [["render", mo], ["__file", "Cascader.vue"]]),
|
|
|
703
703
|
I.value && (I.value(p), I.value = null, T.value = null);
|
|
704
704
|
}, S = (p) => {
|
|
705
705
|
T.value && (T.value(p), I.value = null, T.value = null);
|
|
706
|
-
},
|
|
707
|
-
|
|
706
|
+
}, A = g([]), O = (p) => {
|
|
707
|
+
A.value = p.filter((L) => L.status === "init");
|
|
708
708
|
};
|
|
709
709
|
o({
|
|
710
710
|
submit(p) {
|
|
711
711
|
return new Promise((L, $) => {
|
|
712
|
-
i.value ? (e.config.uploadURL && (d.value = p), I.value = L, T.value = $,
|
|
712
|
+
i.value ? (e.config.uploadURL && (d.value = p), I.value = L, T.value = $, A.value.length ? lt().then((oe) => {
|
|
713
713
|
r.value = {
|
|
714
714
|
Authorization: `Bearer ${oe}`
|
|
715
715
|
}, wt(() => {
|
|
@@ -719,11 +719,11 @@ const go = /* @__PURE__ */ Z(po, [["render", mo], ["__file", "Cascader.vue"]]),
|
|
|
719
719
|
});
|
|
720
720
|
},
|
|
721
721
|
validate() {
|
|
722
|
-
const p = e.config.files ?? [], L = [...
|
|
722
|
+
const p = e.config.files ?? [], L = [...A.value, ...p].length > 0 ? "hasFile" : "", $ = s(L);
|
|
723
723
|
return a("error", $.res ? "" : $.errorMessages), $.res;
|
|
724
724
|
}
|
|
725
725
|
});
|
|
726
|
-
const D = { props: e, emits: a, headers: r, validate: s, config: l, ApiBase: c, uploadRef: i, id: d, replaceIdAndClassName: _, action: h, MB_SIZE: Ze, mbToBytes: w, normalizeBytes: f, maxFileSize: m, minFileSize: k, maxFileSizeText: ee, minFileSizeText: re, formatFileSize: K, onBeforeUpload: te, submit: ie, onBeforeRemove: le, uploadPromiseResolve: I, uploadPromiseReject: T, handleUploadSuccess: P, handleUploadError: S, readyFiles:
|
|
726
|
+
const D = { props: e, emits: a, headers: r, validate: s, config: l, ApiBase: c, uploadRef: i, id: d, replaceIdAndClassName: _, action: h, MB_SIZE: Ze, mbToBytes: w, normalizeBytes: f, maxFileSize: m, minFileSize: k, maxFileSizeText: ee, minFileSizeText: re, formatFileSize: K, onBeforeUpload: te, submit: ie, onBeforeRemove: le, uploadPromiseResolve: I, uploadPromiseReject: T, handleUploadSuccess: P, handleUploadError: S, readyFiles: A, onChange: O };
|
|
727
727
|
return Object.defineProperty(D, "__isScriptSetup", { enumerable: !1, value: !0 }), D;
|
|
728
728
|
}
|
|
729
729
|
}), vo = { style: { "margin-top": "8px", color: "#86909c", "font-size": "12px" } };
|
|
@@ -770,7 +770,7 @@ const bo = /* @__PURE__ */ Z(_o, [["render", ho], ["__file", "FileUpload.vue"]])
|
|
|
770
770
|
},
|
|
771
771
|
emits: ["update:modelValue", "change", "error", "input"],
|
|
772
772
|
setup(t, { expose: o, emit: n }) {
|
|
773
|
-
const e = t, a = n, r = (i) =>
|
|
773
|
+
const e = t, a = n, r = (i) => ye(e.validations, i), s = (i) => {
|
|
774
774
|
a("update:modelValue", i), a("input", i);
|
|
775
775
|
}, l = (i) => {
|
|
776
776
|
a("update:modelValue", i);
|
|
@@ -820,7 +820,7 @@ const ko = /* @__PURE__ */ Z(wo, [["render", yo], ["__file", "TextArea.vue"]]),
|
|
|
820
820
|
}),
|
|
821
821
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
822
822
|
setup(t, { expose: o, emit: n }) {
|
|
823
|
-
const e = t, a = n, r =
|
|
823
|
+
const e = t, a = n, r = xe(t, "modelValue"), s = (i) => ye(e.validations, i), l = (i) => {
|
|
824
824
|
const d = s(i);
|
|
825
825
|
a("error", d.res ? "" : d.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((_) => {
|
|
826
826
|
_.event === "change" && a(_.event, _.handlerName, i);
|
|
@@ -852,10 +852,10 @@ function Co(t, o, n, e, a, r) {
|
|
|
852
852
|
__: [1]
|
|
853
853
|
}, 8, ["modelValue", "disabled"]);
|
|
854
854
|
}
|
|
855
|
-
const xo = /* @__PURE__ */ Z(So, [["render", Co], ["__file", "CheckBox.vue"]]), To = Symbol("ArcoConfigProvider"),
|
|
855
|
+
const xo = /* @__PURE__ */ Z(So, [["render", Co], ["__file", "CheckBox.vue"]]), To = Symbol("ArcoConfigProvider"), Ao = "arco", Vo = "$arco", ut = (t) => {
|
|
856
856
|
var o, n, e;
|
|
857
|
-
const a =
|
|
858
|
-
return `${(e = (n = r?.prefixCls) != null ? n : (o = a?.appContext.config.globalProperties[
|
|
857
|
+
const a = ge(), r = we(To, void 0);
|
|
858
|
+
return `${(e = (n = r?.prefixCls) != null ? n : (o = a?.appContext.config.globalProperties[Vo]) == null ? void 0 : o.classPrefix) != null ? e : Ao}-${t}`;
|
|
859
859
|
}, Io = Object.prototype.toString;
|
|
860
860
|
function ft(t) {
|
|
861
861
|
return Io.call(t) === "[object Number]" && t === t;
|
|
@@ -1054,7 +1054,7 @@ const mt = /* @__PURE__ */ Z(Ho, [["render", jo], ["__scopeId", "data-v-1d3893b1
|
|
|
1054
1054
|
}),
|
|
1055
1055
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error"], ["update:modelValue"]),
|
|
1056
1056
|
setup(t, { expose: o, emit: n }) {
|
|
1057
|
-
const e = t, a = n, r =
|
|
1057
|
+
const e = t, a = n, r = xe(t, "modelValue"), s = Ie("widgetRef"), l = M(() => {
|
|
1058
1058
|
switch (e.config?.widget?.widget) {
|
|
1059
1059
|
case "TextBox":
|
|
1060
1060
|
return Ye;
|
|
@@ -1236,15 +1236,15 @@ function Xo(t, o, n, e, a, r) {
|
|
|
1236
1236
|
}
|
|
1237
1237
|
const Fe = /* @__PURE__ */ Z(Zo, [["render", Xo], ["__file", "index.vue"]]), gt = Symbol("library-triggers");
|
|
1238
1238
|
function Ke() {
|
|
1239
|
-
const t =
|
|
1239
|
+
const t = we(gt, null);
|
|
1240
1240
|
return t || {};
|
|
1241
1241
|
}
|
|
1242
1242
|
const en = Symbol("library-pinia"), _t = Symbol("library-bpmStore"), vt = Symbol("library-svrStore");
|
|
1243
1243
|
function Ne() {
|
|
1244
|
-
return
|
|
1244
|
+
return we(_t, null);
|
|
1245
1245
|
}
|
|
1246
1246
|
function Re() {
|
|
1247
|
-
return
|
|
1247
|
+
return we(vt, null);
|
|
1248
1248
|
}
|
|
1249
1249
|
const tn = /* @__PURE__ */ G({
|
|
1250
1250
|
__name: "TopBar",
|
|
@@ -1321,10 +1321,10 @@ class De {
|
|
|
1321
1321
|
return this.opt = o, this;
|
|
1322
1322
|
}
|
|
1323
1323
|
build() {
|
|
1324
|
-
return this.pageActionType ? this.opt.workflowId ? new
|
|
1324
|
+
return this.pageActionType ? this.opt.workflowId ? new Ve(this.pageActionType, this.className, this.store, this.opt) : new Ve(this.pageActionType, this.className, this.store) : this.opt.workflowId ? new Ve(be.ReCreate, this.className, this.store, this.opt) : new Ve(be.Create, this.className, this.store);
|
|
1325
1325
|
}
|
|
1326
1326
|
}
|
|
1327
|
-
class
|
|
1327
|
+
class Ve {
|
|
1328
1328
|
pageActionType;
|
|
1329
1329
|
className;
|
|
1330
1330
|
store;
|
|
@@ -1380,7 +1380,7 @@ const dn = /* @__PURE__ */ G({
|
|
|
1380
1380
|
},
|
|
1381
1381
|
setup(t, { expose: o }) {
|
|
1382
1382
|
o();
|
|
1383
|
-
const n = Ne(), e = Re(), a =
|
|
1383
|
+
const n = Ne(), e = Re(), a = he(), r = Ke(), s = Ie("dataWidgets"), l = ge(), c = t, i = g({
|
|
1384
1384
|
pageType: "",
|
|
1385
1385
|
fields: {},
|
|
1386
1386
|
globalValidations: [],
|
|
@@ -1397,19 +1397,19 @@ const dn = /* @__PURE__ */ G({
|
|
|
1397
1397
|
}
|
|
1398
1398
|
}), d = g([]), _ = g({});
|
|
1399
1399
|
function h(T) {
|
|
1400
|
-
return T ? Object.entries(T).map(([S,
|
|
1400
|
+
return T ? Object.entries(T).map(([S, A]) => ({
|
|
1401
1401
|
fieldKey: S,
|
|
1402
|
-
...
|
|
1402
|
+
...A
|
|
1403
1403
|
})).filter((S) => S.widget && S.widget.widget !== "Hidden").filter((S) => !te.value.includes(S.fieldKey)) : [];
|
|
1404
1404
|
}
|
|
1405
1405
|
function w(T) {
|
|
1406
|
-
return T ? Object.entries(T).filter(([S,
|
|
1407
|
-
(S, [
|
|
1406
|
+
return T ? Object.entries(T).filter(([S, A]) => A.dependent).reduce(
|
|
1407
|
+
(S, [A, O]) => (S[A] = O.dependent, S),
|
|
1408
1408
|
{}
|
|
1409
1409
|
) : [];
|
|
1410
1410
|
}
|
|
1411
1411
|
const f = M(() => i.value?.actions ? [...i.value.actions].reverse() : []), m = g({}), k = g(!1);
|
|
1412
|
-
|
|
1412
|
+
_e(async () => {
|
|
1413
1413
|
k.value = !0;
|
|
1414
1414
|
const T = new De().setWorkflowId(c.workflowId).setClassName(c.className).setStore({ svrStore: e, bpmStore: n }).build();
|
|
1415
1415
|
i.value = await T.getPageData();
|
|
@@ -1417,8 +1417,8 @@ const dn = /* @__PURE__ */ G({
|
|
|
1417
1417
|
r.Test?.({ fieldValue: P, hiddenFields: te, formData: m }), d.value = h(i.value.fields), _.value = w(i.value.fields);
|
|
1418
1418
|
for (const S in i.value.fields) {
|
|
1419
1419
|
if (i.value.fields[S].widget?.widget === "File") {
|
|
1420
|
-
const
|
|
1421
|
-
|
|
1420
|
+
const A = d.value.find((O) => O.fieldKey === S);
|
|
1421
|
+
A && A.widget && (A.widget.files = []);
|
|
1422
1422
|
}
|
|
1423
1423
|
m.value[S] = i.value.fields[S].modelValue;
|
|
1424
1424
|
}
|
|
@@ -1427,7 +1427,7 @@ const dn = /* @__PURE__ */ G({
|
|
|
1427
1427
|
function ee() {
|
|
1428
1428
|
return e()?.userInfo?.email_address ?? "";
|
|
1429
1429
|
}
|
|
1430
|
-
async function re(T, P, S,
|
|
1430
|
+
async function re(T, P, S, A, O) {
|
|
1431
1431
|
switch (P) {
|
|
1432
1432
|
case X.Submit:
|
|
1433
1433
|
let D = !0;
|
|
@@ -1470,10 +1470,10 @@ const dn = /* @__PURE__ */ G({
|
|
|
1470
1470
|
case X.Link:
|
|
1471
1471
|
try {
|
|
1472
1472
|
await r[T.eventName || ""]?.(m.value, te), a.push({
|
|
1473
|
-
name:
|
|
1473
|
+
name: A,
|
|
1474
1474
|
params: { className: c.className }
|
|
1475
1475
|
}), await r[`${T.eventName || ""}Success`]?.({
|
|
1476
|
-
message: `Router to ${
|
|
1476
|
+
message: `Router to ${A} pushed`
|
|
1477
1477
|
});
|
|
1478
1478
|
} catch (p) {
|
|
1479
1479
|
console.error("Error in link action trigger:", p);
|
|
@@ -1573,7 +1573,7 @@ const yn = /* @__PURE__ */ Z(dn, [["render", wn], ["__scopeId", "data-v-31413447
|
|
|
1573
1573
|
},
|
|
1574
1574
|
setup(t, { expose: o }) {
|
|
1575
1575
|
o();
|
|
1576
|
-
const n =
|
|
1576
|
+
const n = he(), e = Ke(), a = Re(), r = Ne(), s = Ie("dataWidgets"), l = ge(), c = t, i = g({
|
|
1577
1577
|
pageType: "",
|
|
1578
1578
|
fields: {},
|
|
1579
1579
|
globalValidations: [],
|
|
@@ -1596,33 +1596,33 @@ const yn = /* @__PURE__ */ Z(dn, [["render", wn], ["__scopeId", "data-v-31413447
|
|
|
1596
1596
|
})).filter((P) => P.widget && P.widget.widget !== "Hidden").filter((P) => !K.value.includes(P.fieldKey)) : [];
|
|
1597
1597
|
}
|
|
1598
1598
|
function w(I) {
|
|
1599
|
-
return I ? Object.entries(I).filter(([P, S]) => S.dependent).reduce((P, [S,
|
|
1599
|
+
return I ? Object.entries(I).filter(([P, S]) => S.dependent).reduce((P, [S, A]) => (P[S] = A.dependent, P), {}) : [];
|
|
1600
1600
|
}
|
|
1601
1601
|
const f = M(() => i.value?.actions ? [...i.value.actions].reverse() : []), m = g({}), k = g(!1);
|
|
1602
|
-
|
|
1602
|
+
_e(async () => {
|
|
1603
1603
|
k.value = !0;
|
|
1604
|
-
const I = new De().setPageActionType(
|
|
1604
|
+
const I = new De().setPageActionType(be.Update).setClassName(c.className).setStore({ svrStore: a, bpmStore: r }).setWorkflowId(c.workflowId).build();
|
|
1605
1605
|
i.value = await I.getPageData();
|
|
1606
1606
|
const T = await I.getBtnList(), P = await I.getFiles();
|
|
1607
|
-
i.value.actions = i.value.actions?.filter((
|
|
1608
|
-
const O = T.find((D) => D.button ===
|
|
1607
|
+
i.value.actions = i.value.actions?.filter((A) => {
|
|
1608
|
+
const O = T.find((D) => D.button === A.title);
|
|
1609
1609
|
return O ? O.isShow : !0;
|
|
1610
1610
|
});
|
|
1611
1611
|
const S = i.value.fields.requestType.modelValue;
|
|
1612
1612
|
e.Test?.({ fieldValue: S, hiddenFields: K, formData: m }), d.value = h(i.value.fields), _.value = w(i.value.fields);
|
|
1613
|
-
for (const
|
|
1614
|
-
if (i.value.fields[
|
|
1615
|
-
const O = d.value.find((D) => D.fieldKey ===
|
|
1616
|
-
O && O.widget && (O.widget.files = P[
|
|
1613
|
+
for (const A in i.value.fields) {
|
|
1614
|
+
if (i.value.fields[A].widget?.widget === "File") {
|
|
1615
|
+
const O = d.value.find((D) => D.fieldKey === A);
|
|
1616
|
+
O && O.widget && (O.widget.files = P[A] ?? [], O.widget.removeFile = (D) => I.removeFile(D));
|
|
1617
1617
|
}
|
|
1618
|
-
m.value[
|
|
1618
|
+
m.value[A] = i.value.fields[A].modelValue;
|
|
1619
1619
|
}
|
|
1620
1620
|
k.value = !1;
|
|
1621
1621
|
});
|
|
1622
1622
|
function ee() {
|
|
1623
1623
|
return a()?.userInfo?.email_address ?? "";
|
|
1624
1624
|
}
|
|
1625
|
-
async function re(I, T, P, S,
|
|
1625
|
+
async function re(I, T, P, S, A) {
|
|
1626
1626
|
switch (T) {
|
|
1627
1627
|
case X.Submit:
|
|
1628
1628
|
let O = !0;
|
|
@@ -1659,7 +1659,7 @@ const yn = /* @__PURE__ */ Z(dn, [["render", wn], ["__scopeId", "data-v-31413447
|
|
|
1659
1659
|
const ie = M(() => We(d.value)), le = { router: n, triggers: e, svrStore: a, bpmStore: r, dataWidgetsRefs: s, instance: l, props: c, pageData: i, _fields: d, _dependent: _, genField: h, genDependentField: w, reversedActions: f, _data: m, loading: k, getApproverEmail: ee, clickHandler: re, hiddenFields: K, changeHandler: te, groupedFields: ie, DataWidgets: Pe, ActionButton: Fe, TopBar: Ue };
|
|
1660
1660
|
return Object.defineProperty(le, "__isScriptSetup", { enumerable: !1, value: !0 }), le;
|
|
1661
1661
|
}
|
|
1662
|
-
}), Sn = { class: "page-container" }, Cn = { class: "page-body" }, xn = { class: "form-card" }, Tn = { class: "form-fields-vertical" },
|
|
1662
|
+
}), Sn = { class: "page-container" }, Cn = { class: "page-body" }, xn = { class: "form-card" }, Tn = { class: "form-fields-vertical" }, An = { class: "form-fields" }, Vn = {
|
|
1663
1663
|
key: 0,
|
|
1664
1664
|
class: "form-content"
|
|
1665
1665
|
}, In = { class: "page-footer" }, Pn = { class: "action-container" }, Fn = { class: "action-buttons" };
|
|
@@ -1685,7 +1685,7 @@ function Nn(t, o, n, e, a, r) {
|
|
|
1685
1685
|
style: { "margin-bottom": "24px" }
|
|
1686
1686
|
}, {
|
|
1687
1687
|
default: C(() => [
|
|
1688
|
-
y("div",
|
|
1688
|
+
y("div", An, [
|
|
1689
1689
|
(u(!0), v(z, null, W(c.fields, (i) => (u(), H(e.DataWidgets, {
|
|
1690
1690
|
key: i.fieldKey,
|
|
1691
1691
|
ref_for: !0,
|
|
@@ -1703,7 +1703,7 @@ function Nn(t, o, n, e, a, r) {
|
|
|
1703
1703
|
_: 2
|
|
1704
1704
|
}, 1032, ["title"]))), 128))
|
|
1705
1705
|
]),
|
|
1706
|
-
t.$slots.content ? (u(), v("div",
|
|
1706
|
+
t.$slots.content ? (u(), v("div", Vn, [
|
|
1707
1707
|
ue(t.$slots, "content", {}, void 0, !0)
|
|
1708
1708
|
])) : se("", !0)
|
|
1709
1709
|
])
|
|
@@ -1729,7 +1729,7 @@ function Nn(t, o, n, e, a, r) {
|
|
|
1729
1729
|
}
|
|
1730
1730
|
const Rn = /* @__PURE__ */ Z(kn, [["render", Nn], ["__scopeId", "data-v-605f261e"], ["__file", "UpdateView.vue"]]), ht = Symbol("library-custom-comp");
|
|
1731
1731
|
function Un() {
|
|
1732
|
-
return
|
|
1732
|
+
return we(ht, null);
|
|
1733
1733
|
}
|
|
1734
1734
|
const Dn = /* @__PURE__ */ G({
|
|
1735
1735
|
__name: "DetailView",
|
|
@@ -1739,7 +1739,7 @@ const Dn = /* @__PURE__ */ G({
|
|
|
1739
1739
|
},
|
|
1740
1740
|
setup(t, { expose: o }) {
|
|
1741
1741
|
o();
|
|
1742
|
-
const n = Re(), e = Ne(), a = Ke(), r =
|
|
1742
|
+
const n = Re(), e = Ne(), a = Ke(), r = he(), s = Un(), l = ge(), c = t;
|
|
1743
1743
|
let i;
|
|
1744
1744
|
const d = g({
|
|
1745
1745
|
pageType: "",
|
|
@@ -1792,21 +1792,23 @@ const Dn = /* @__PURE__ */ G({
|
|
|
1792
1792
|
time: ""
|
|
1793
1793
|
};
|
|
1794
1794
|
U.title = R.workflowProcessApprovers[0]?.name;
|
|
1795
|
-
const pe = R.workflowProcessApprovers[R.workflowProcessApprovers.length - 1],
|
|
1796
|
-
if (pe &&
|
|
1795
|
+
const pe = R.workflowProcessApprovers[R.workflowProcessApprovers.length - 1], Te = R.workflowHistorys[R.workflowHistorys.length - 1], ke = Te?.workflowHistoryApprovers[Te?.workflowHistoryApprovers?.length - 1];
|
|
1796
|
+
if (pe && ke && pe?.email?.toLowerCase() !== ke?.approverEmail?.toLowerCase() && (U.title = `${ke.name}`, U.proxy = `Proxy: ${pe.name}`), R.sort > 1 ? U.sub = "Approver Role: " + R.nodeName.replace("Submit", "").replace("Approve", "") : U.sub = "Submit Application", R.isCurrent && j !== -1)
|
|
1797
1797
|
U.desc = "In Approval", U.status = 1;
|
|
1798
1798
|
else {
|
|
1799
1799
|
const ne = R.workflowHistorys[R.workflowHistorys.length - 1];
|
|
1800
|
-
if (ne && ne.status === 100)
|
|
1801
|
-
U.time =
|
|
1802
|
-
|
|
1803
|
-
U.
|
|
1800
|
+
if (ne && ne.status === 100) {
|
|
1801
|
+
U.time = Ae(ne.takeActionAt, "yyyy-MM-dd hh:mm:ss"), U.status = 2;
|
|
1802
|
+
const me = ne.workflowHistoryApprovers[0];
|
|
1803
|
+
U.desc = me?.reason ? `Approve reason: ${me.reason}` : "Rejected";
|
|
1804
|
+
} else if (ne && ne.status === 999)
|
|
1805
|
+
U.time = Ae(ne.takeActionAt, "yyyy-MM-dd hh:mm:ss"), U.status = 0, U.desc = "approve reject!";
|
|
1804
1806
|
else if (ne)
|
|
1805
|
-
if (U.time =
|
|
1807
|
+
if (U.time = Ae(ne.takeActionAt, "yyyy-MM-dd hh:mm:ss"), R.sort === 1)
|
|
1806
1808
|
U.status = 2, U.desc = "";
|
|
1807
1809
|
else {
|
|
1808
|
-
const
|
|
1809
|
-
U.status = 3, U.desc =
|
|
1810
|
+
const me = ne.workflowHistoryApprovers[0];
|
|
1811
|
+
U.status = 3, U.desc = me?.reason ? `Rejected reason: ${me.reason}` : "Rejected";
|
|
1810
1812
|
}
|
|
1811
1813
|
else E < J || J === -1 ? (U.status = 0, U.desc = "Skipped") : (U.status = 0, U.desc = "Pending Approval");
|
|
1812
1814
|
ne && ne.status;
|
|
@@ -1823,7 +1825,7 @@ const Dn = /* @__PURE__ */ G({
|
|
|
1823
1825
|
}
|
|
1824
1826
|
const T = g([]);
|
|
1825
1827
|
async function P() {
|
|
1826
|
-
k.value = !0, i = new De().setPageActionType(
|
|
1828
|
+
k.value = !0, i = new De().setPageActionType(be.Details).setClassName(c.className).setStore({ svrStore: n, bpmStore: e }).setWorkflowId(c.workflowId).build(), d.value = await i.getPageData();
|
|
1827
1829
|
const N = await i.getFiles();
|
|
1828
1830
|
$.value = await i.getApprovers(), p.value = await i.getCommentsHistory(), oe.value = await i.getAssociator(), await I(), a.detailPageLoaded?.(d, e().employeeInfo);
|
|
1829
1831
|
const j = d.value.fields.requestType.modelValue;
|
|
@@ -1836,11 +1838,11 @@ const Dn = /* @__PURE__ */ G({
|
|
|
1836
1838
|
const J = await i.getProcess();
|
|
1837
1839
|
re.value = ee(J, 0), k.value = !1;
|
|
1838
1840
|
}
|
|
1839
|
-
|
|
1841
|
+
_e(P);
|
|
1840
1842
|
async function S(N, j) {
|
|
1841
1843
|
return a[N]?.(j);
|
|
1842
1844
|
}
|
|
1843
|
-
function
|
|
1845
|
+
function A() {
|
|
1844
1846
|
return n()?.userInfo?.email_address ?? "";
|
|
1845
1847
|
}
|
|
1846
1848
|
async function O(N, j, J, R, E) {
|
|
@@ -1848,31 +1850,31 @@ const Dn = /* @__PURE__ */ G({
|
|
|
1848
1850
|
switch (j) {
|
|
1849
1851
|
case X.Submit:
|
|
1850
1852
|
let U = !0;
|
|
1851
|
-
if (h.value?.forEach((
|
|
1852
|
-
|
|
1853
|
+
if (h.value?.forEach((ve) => {
|
|
1854
|
+
ve?.validate && !ve.validate() && (U = !1);
|
|
1853
1855
|
}), !U) {
|
|
1854
1856
|
l?.appContext.config.globalProperties.$message.error(
|
|
1855
1857
|
"Please complete all required fields before submit."
|
|
1856
1858
|
);
|
|
1857
1859
|
return;
|
|
1858
1860
|
}
|
|
1859
|
-
const { reason: pe, ifGlobal:
|
|
1861
|
+
const { reason: pe, ifGlobal: Te } = await S(E, {
|
|
1860
1862
|
isGlobal: K.value
|
|
1861
1863
|
});
|
|
1862
1864
|
k.value = !0;
|
|
1863
|
-
const
|
|
1865
|
+
const ke = _.value.find((ve) => ve.fieldKey === "approvedGrade")?.modelValue, ne = E === "Approve" ? "100" : "-1", me = await Et(
|
|
1864
1866
|
c.className,
|
|
1865
1867
|
c.workflowId,
|
|
1866
|
-
|
|
1868
|
+
A(),
|
|
1867
1869
|
pe,
|
|
1868
1870
|
J,
|
|
1869
1871
|
ne,
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
+
Te,
|
|
1873
|
+
ke
|
|
1872
1874
|
);
|
|
1873
1875
|
await S(`${E}Success`, {
|
|
1874
1876
|
workflowId: c.workflowId,
|
|
1875
|
-
res:
|
|
1877
|
+
res: me
|
|
1876
1878
|
}), k.value = !1;
|
|
1877
1879
|
const bt = E === "Approve" ? `Request ID ${c.workflowId} has been approved.` : `Request ID ${c.workflowId} has been rejected.`;
|
|
1878
1880
|
l?.appContext.config.globalProperties.$notification.success(
|
|
@@ -1885,8 +1887,8 @@ const Dn = /* @__PURE__ */ G({
|
|
|
1885
1887
|
name: R,
|
|
1886
1888
|
params: { className: c.className, workflowId: c.workflowId }
|
|
1887
1889
|
});
|
|
1888
|
-
} catch (
|
|
1889
|
-
console.error("Error in link action trigger:",
|
|
1890
|
+
} catch (ve) {
|
|
1891
|
+
console.error("Error in link action trigger:", ve);
|
|
1890
1892
|
}
|
|
1891
1893
|
break;
|
|
1892
1894
|
case X.Button:
|
|
@@ -1913,7 +1915,7 @@ const Dn = /* @__PURE__ */ G({
|
|
|
1913
1915
|
);
|
|
1914
1916
|
return;
|
|
1915
1917
|
}
|
|
1916
|
-
await
|
|
1918
|
+
await V(
|
|
1917
1919
|
"Confirm Assign Approver",
|
|
1918
1920
|
"Do you want to assign the selected approver?"
|
|
1919
1921
|
);
|
|
@@ -1933,7 +1935,7 @@ const Dn = /* @__PURE__ */ G({
|
|
|
1933
1935
|
);
|
|
1934
1936
|
}
|
|
1935
1937
|
}
|
|
1936
|
-
async function
|
|
1938
|
+
async function V(N, j) {
|
|
1937
1939
|
const { Modal: J } = await import("@arco-design/web-vue");
|
|
1938
1940
|
return new Promise((R, E) => {
|
|
1939
1941
|
J.confirm({
|
|
@@ -1948,7 +1950,7 @@ const Dn = /* @__PURE__ */ G({
|
|
|
1948
1950
|
}
|
|
1949
1951
|
async function B(N) {
|
|
1950
1952
|
try {
|
|
1951
|
-
await
|
|
1953
|
+
await V(
|
|
1952
1954
|
"Confirm Delete Associator",
|
|
1953
1955
|
"Do you want to delete this associator?"
|
|
1954
1956
|
);
|
|
@@ -1983,10 +1985,10 @@ const Dn = /* @__PURE__ */ G({
|
|
|
1983
1985
|
return i;
|
|
1984
1986
|
}, set page(N) {
|
|
1985
1987
|
i = N;
|
|
1986
|
-
}, pageData: d, _fields: _, dataWidgetsRefs: h, genField: w, groupedFields: f, reversedActions: m, loading: k, mapWorkflowSteps: ee, steps: re, isGlobal: K, isShowAssignSelect: te, isShowAssignList: ie, isShowCommentTextArea: le, reloadButtonList: I, hiddenFields: T, load: P, triggerFn: S, getApproverEmail:
|
|
1988
|
+
}, pageData: d, _fields: _, dataWidgetsRefs: h, genField: w, groupedFields: f, reversedActions: m, loading: k, mapWorkflowSteps: ee, steps: re, isGlobal: K, isShowAssignSelect: te, isShowAssignList: ie, isShowCommentTextArea: le, reloadButtonList: I, hiddenFields: T, load: P, triggerFn: S, getApproverEmail: A, clickHandler: O, comment: D, commentsHistory: p, selectedApprover: L, approvers: $, associators: oe, onAssignApprover: b, confirmDialog: V, onDeleteAssociator: B, onAddComment: de, formatTitle: fe, ActionButton: Fe, get IconDownload() {
|
|
1987
1989
|
return Bo;
|
|
1988
1990
|
}, TopBar: Ue, get formatDate() {
|
|
1989
|
-
return
|
|
1991
|
+
return Ae;
|
|
1990
1992
|
}, ToolTip: mt, DataWidgets: Pe };
|
|
1991
1993
|
return Object.defineProperty(qe, "__isScriptSetup", { enumerable: !1, value: !0 }), qe;
|
|
1992
1994
|
}
|
|
@@ -2149,7 +2151,7 @@ function Qn(t, o, n, e, a, r) {
|
|
|
2149
2151
|
])
|
|
2150
2152
|
]);
|
|
2151
2153
|
}
|
|
2152
|
-
const Zn = /* @__PURE__ */ Z(Dn, [["render", Qn], ["__scopeId", "data-v-
|
|
2154
|
+
const Zn = /* @__PURE__ */ Z(Dn, [["render", Qn], ["__scopeId", "data-v-bf6f2ab3"], ["__file", "DetailView.vue"]]), Xn = /* @__PURE__ */ G({
|
|
2153
2155
|
name: "ListView",
|
|
2154
2156
|
__name: "ListView",
|
|
2155
2157
|
props: {
|
|
@@ -2157,7 +2159,7 @@ const Zn = /* @__PURE__ */ Z(Dn, [["render", Qn], ["__scopeId", "data-v-d11c86e6
|
|
|
2157
2159
|
},
|
|
2158
2160
|
setup(t, { expose: o }) {
|
|
2159
2161
|
o();
|
|
2160
|
-
const n = Re(), e = Ne(), a =
|
|
2162
|
+
const n = Re(), e = Ne(), a = he(), r = ge(), s = t, l = g(), c = yt({
|
|
2161
2163
|
current: 1,
|
|
2162
2164
|
total: 0,
|
|
2163
2165
|
pageSize: 10,
|
|
@@ -2167,10 +2169,10 @@ const Zn = /* @__PURE__ */ Z(Dn, [["render", Qn], ["__scopeId", "data-v-d11c86e6
|
|
|
2167
2169
|
filters: []
|
|
2168
2170
|
});
|
|
2169
2171
|
function i() {
|
|
2170
|
-
const b = Object.entries(S.value).filter(([, { value:
|
|
2172
|
+
const b = Object.entries(S.value).filter(([, { value: V }]) => V && V !== "").map(([V, { value: B, operator: de }]) => {
|
|
2171
2173
|
const fe = typeof B == "string" ? B.trim() : B;
|
|
2172
2174
|
return {
|
|
2173
|
-
key:
|
|
2175
|
+
key: V,
|
|
2174
2176
|
value: fe,
|
|
2175
2177
|
operator: de
|
|
2176
2178
|
// 根据实际需要调整操作符
|
|
@@ -2191,7 +2193,7 @@ const Zn = /* @__PURE__ */ Z(Dn, [["render", Qn], ["__scopeId", "data-v-d11c86e6
|
|
|
2191
2193
|
// 只设置横向滚动
|
|
2192
2194
|
// 移除 y 属性,让表格高度自适应
|
|
2193
2195
|
})), _ = (b) => {
|
|
2194
|
-
const
|
|
2196
|
+
const V = Object.entries(b).filter(([, B]) => B.widget?.column).map(([B, de], fe) => ({
|
|
2195
2197
|
title: de.widget.title,
|
|
2196
2198
|
dataIndex: B.charAt(0).toLowerCase() + B.slice(1),
|
|
2197
2199
|
order: de.order,
|
|
@@ -2203,7 +2205,7 @@ const Zn = /* @__PURE__ */ Z(Dn, [["render", Qn], ["__scopeId", "data-v-d11c86e6
|
|
|
2203
2205
|
resizable: !0
|
|
2204
2206
|
// 启用列宽调整
|
|
2205
2207
|
})).sort((B, de) => B.order - de.order);
|
|
2206
|
-
|
|
2208
|
+
V.push({
|
|
2207
2209
|
title: "Actions",
|
|
2208
2210
|
slotName: "optional",
|
|
2209
2211
|
align: "center",
|
|
@@ -2211,15 +2213,15 @@ const Zn = /* @__PURE__ */ Z(Dn, [["render", Qn], ["__scopeId", "data-v-d11c86e6
|
|
|
2211
2213
|
minWidth: 200,
|
|
2212
2214
|
fixed: "right",
|
|
2213
2215
|
resizable: !1
|
|
2214
|
-
}), w.value =
|
|
2216
|
+
}), w.value = V;
|
|
2215
2217
|
}, h = g([]), w = g([]), f = g(!0), m = g(!0), k = g(), ee = async () => {
|
|
2216
2218
|
m.value = !0;
|
|
2217
2219
|
const b = await jt(s.className, i());
|
|
2218
2220
|
h.value = b.data, c.total = b.totalCount, m.value = !1;
|
|
2219
2221
|
}, re = g(!1);
|
|
2220
|
-
|
|
2222
|
+
_e(async () => {
|
|
2221
2223
|
f.value = !0;
|
|
2222
|
-
const b = new De().setPageActionType(
|
|
2224
|
+
const b = new De().setPageActionType(be.List).setClassName(s.className).setStore({ svrStore: n, bpmStore: e }).build();
|
|
2223
2225
|
l.value = await b.getPageData(), _(l.value.fields), O(l.value.fields), D(), P(l.value?.tabs?.[0]?.key || ""), k.value = l.value.actions, f.value = !1, re.value = !0;
|
|
2224
2226
|
}), kt(() => {
|
|
2225
2227
|
re.value && ee();
|
|
@@ -2229,7 +2231,7 @@ const Zn = /* @__PURE__ */ Z(Dn, [["render", Qn], ["__scopeId", "data-v-d11c86e6
|
|
|
2229
2231
|
}, te = (b) => {
|
|
2230
2232
|
c.pageSize = b, ee();
|
|
2231
2233
|
};
|
|
2232
|
-
function ie(b,
|
|
2234
|
+
function ie(b, V, B, de, fe) {
|
|
2233
2235
|
switch (b) {
|
|
2234
2236
|
case X.Link:
|
|
2235
2237
|
a.push({ name: B, params: { workflowId: fe } });
|
|
@@ -2238,10 +2240,10 @@ const Zn = /* @__PURE__ */ Z(Dn, [["render", Qn], ["__scopeId", "data-v-d11c86e6
|
|
|
2238
2240
|
console.warn("Unknown action type:", b);
|
|
2239
2241
|
}
|
|
2240
2242
|
}
|
|
2241
|
-
function le(b,
|
|
2243
|
+
function le(b, V, B) {
|
|
2242
2244
|
switch (b) {
|
|
2243
2245
|
case X.Submit:
|
|
2244
|
-
oo(
|
|
2246
|
+
oo(V, { filters: [{ key: "approverList", value: I(), operator: 2 }] }), r?.appContext.config.globalProperties.$notification.success("submit success!");
|
|
2245
2247
|
break;
|
|
2246
2248
|
case X.Link:
|
|
2247
2249
|
a.push({ name: B });
|
|
@@ -2253,35 +2255,35 @@ const Zn = /* @__PURE__ */ Z(Dn, [["render", Qn], ["__scopeId", "data-v-d11c86e6
|
|
|
2253
2255
|
function I() {
|
|
2254
2256
|
return n()?.userInfo?.email_address ?? "";
|
|
2255
2257
|
}
|
|
2256
|
-
function T(b,
|
|
2257
|
-
return typeof b != "string" || b.indexOf("{currentUserEmail}") === -1 ? b : b.replace(/{currentUserEmail}/g,
|
|
2258
|
+
function T(b, V) {
|
|
2259
|
+
return typeof b != "string" || b.indexOf("{currentUserEmail}") === -1 ? b : b.replace(/{currentUserEmail}/g, V);
|
|
2258
2260
|
}
|
|
2259
2261
|
function P(b) {
|
|
2260
|
-
const
|
|
2261
|
-
c.filters =
|
|
2262
|
+
const V = l.value?.tabs?.find((B) => B.key === b)?.filters;
|
|
2263
|
+
c.filters = V?.map((B) => ({
|
|
2262
2264
|
...B,
|
|
2263
2265
|
value: T(B.value, I())
|
|
2264
2266
|
})) || [], c.current = 1, ee();
|
|
2265
2267
|
}
|
|
2266
|
-
const S = g({}),
|
|
2268
|
+
const S = g({}), A = g([]);
|
|
2267
2269
|
function O(b) {
|
|
2268
2270
|
if (!b) return [];
|
|
2269
|
-
|
|
2271
|
+
A.value = Object.entries(b).filter(([, V]) => V.isFiltered).map(([V, B]) => ({ fieldKey: V, fieldConfig: B }));
|
|
2270
2272
|
}
|
|
2271
2273
|
const D = () => {
|
|
2272
2274
|
const b = {};
|
|
2273
|
-
|
|
2274
|
-
b[
|
|
2275
|
+
A.value.forEach(({ fieldKey: V, fieldConfig: B }) => {
|
|
2276
|
+
b[V] = {}, b[V].value = B.modelValue, b[V].operator = B.operator;
|
|
2275
2277
|
}), S.value = b;
|
|
2276
2278
|
}, p = () => {
|
|
2277
2279
|
c.current = 1, ee();
|
|
2278
2280
|
}, L = () => {
|
|
2279
2281
|
l.value && D(), p();
|
|
2280
2282
|
};
|
|
2281
|
-
function $(b,
|
|
2282
|
-
return !(b.location !== "InTable" || b.title === "Update" && (
|
|
2283
|
+
function $(b, V) {
|
|
2284
|
+
return !(b.location !== "InTable" || b.title === "Update" && (V.sort === 3 || V.status === 100 || V.status === -1));
|
|
2283
2285
|
}
|
|
2284
|
-
const oe = { svrStore: n, bpmStore: e, router: a, instance: r, props: s, pageData: l, paging: c, createListParams: i, scroll: d, mapColumns: _, _data: h, _columns: w, loadingPage: f, loadingTable: m, actions: k, loadData: ee, mounted: re, pageChangeHandler: K, pageSizeChangeHandler: te, clickHandler: ie, createHandler: le, getApproverEmail: I, replaceEmail: T, tabHandler: P, searchForm: S, searchableFields:
|
|
2286
|
+
const oe = { svrStore: n, bpmStore: e, router: a, instance: r, props: s, pageData: l, paging: c, createListParams: i, scroll: d, mapColumns: _, _data: h, _columns: w, loadingPage: f, loadingTable: m, actions: k, loadData: ee, mounted: re, pageChangeHandler: K, pageSizeChangeHandler: te, clickHandler: ie, createHandler: le, getApproverEmail: I, replaceEmail: T, tabHandler: P, searchForm: S, searchableFields: A, mapSearchableFields: O, initSearchForm: D, handleSearch: p, handleReset: L, judgeHiddenActions: $, ActionButton: Fe, DataWidgets: Pe, TopBar: Ue };
|
|
2285
2287
|
return Object.defineProperty(oe, "__isScriptSetup", { enumerable: !1, value: !0 }), oe;
|
|
2286
2288
|
}
|
|
2287
2289
|
}), er = { class: "list-container" }, tr = { class: "query-title" };
|