@chase-shao/vue-component-lib 1.2.88 → 1.2.89
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.es.js +75 -75
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as m, getCurrentInstance as pe, defineComponent as K, mergeModels as le, useModel as we, resolveComponent as k, createBlock as D, openBlock as d, onMounted as ue, computed as q, withCtx as y, createElementBlock as h, Fragment as $, renderList as z, createVNode as U, nextTick as dt, createTextVNode as oe, inject as me, normalizeStyle as Qe, normalizeClass as Ye, createElementVNode as S, useTemplateRef as
|
|
1
|
+
import { ref as m, getCurrentInstance as pe, defineComponent as K, mergeModels as le, useModel as we, resolveComponent as k, createBlock as D, openBlock as d, onMounted as ue, computed as q, withCtx as y, createElementBlock as h, Fragment as $, renderList as z, createVNode as U, nextTick as dt, createTextVNode as oe, inject as me, normalizeStyle as Qe, normalizeClass as Ye, createElementVNode as S, useTemplateRef as Fe, createCommentVNode as ne, toDisplayString as X, resolveDynamicComponent as Le, renderSlot as de, reactive as ut, onActivated as ft } from "vue";
|
|
2
2
|
import pt from "axios";
|
|
3
3
|
import { defineStore as mt } from "pinia";
|
|
4
4
|
import { Modal as gt } from "@arco-design/web-vue";
|
|
@@ -48,12 +48,12 @@ const vt = mt("main", () => ({
|
|
|
48
48
|
const e = document.createElement("a"), o = window.URL.createObjectURL(a);
|
|
49
49
|
e.href = o, e.download = n, e.click(), window.URL.revokeObjectURL(o);
|
|
50
50
|
};
|
|
51
|
-
let
|
|
51
|
+
let Be = {};
|
|
52
52
|
function wt(t) {
|
|
53
|
-
|
|
53
|
+
Be = { ...Be, ...t };
|
|
54
54
|
}
|
|
55
55
|
function Re() {
|
|
56
|
-
return
|
|
56
|
+
return Be;
|
|
57
57
|
}
|
|
58
58
|
const kt = pe();
|
|
59
59
|
function Je() {
|
|
@@ -258,13 +258,13 @@ function je(t, n) {
|
|
|
258
258
|
function Dt(t, n) {
|
|
259
259
|
return t.replace(/{ApproverEmail}/g, encodeURIComponent(n));
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function Ht(t, n) {
|
|
262
262
|
return t.replace(/{WorkFlowReason}/g, encodeURIComponent(n));
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function Bt(t, n) {
|
|
265
265
|
return t.replace(/{Status}/g, n);
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function Ft(t, n) {
|
|
268
268
|
return t.replace(/{IfTriggerGlobal_RandP_Approval}/g, n);
|
|
269
269
|
}
|
|
270
270
|
function Lt(t, n) {
|
|
@@ -273,7 +273,7 @@ function Lt(t, n) {
|
|
|
273
273
|
async function Rt(t, n, a, e, o, l, s, c) {
|
|
274
274
|
const i = await W();
|
|
275
275
|
let r = je(l, n);
|
|
276
|
-
return r = Dt(r, a), r =
|
|
276
|
+
return r = Dt(r, a), r = Ht(r, e), r = Bt(r, s), r = Ft(r, c), r = Lt(r, t), (await i.put(r, o))?.data;
|
|
277
277
|
}
|
|
278
278
|
async function jt(t, n) {
|
|
279
279
|
const o = (await (await W()).get(t, { params: { value: n } }))?.data;
|
|
@@ -594,7 +594,7 @@ const cn = /* @__PURE__ */ J(sn, [["render", ln], ["__file", "Cascader.vue"]]),
|
|
|
594
594
|
};
|
|
595
595
|
function p(A) {
|
|
596
596
|
const { file: w, name: C } = A, I = C ?? w.name;
|
|
597
|
-
return new Promise((V,
|
|
597
|
+
return new Promise((V, H) => {
|
|
598
598
|
gt.confirm({
|
|
599
599
|
title: "Confirm Delete",
|
|
600
600
|
content: `Are you sure you want to delete ${I}?`,
|
|
@@ -603,7 +603,7 @@ const cn = /* @__PURE__ */ J(sn, [["render", ln], ["__file", "Cascader.vue"]]),
|
|
|
603
603
|
return await e.config.removeFile(A.uid), V(!0);
|
|
604
604
|
V(!0);
|
|
605
605
|
},
|
|
606
|
-
onCancel: () =>
|
|
606
|
+
onCancel: () => H("cancel")
|
|
607
607
|
});
|
|
608
608
|
});
|
|
609
609
|
}
|
|
@@ -881,12 +881,12 @@ function In(t, n, a, e, o, l) {
|
|
|
881
881
|
S("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
|
|
882
882
|
]), 14, Vn);
|
|
883
883
|
}
|
|
884
|
-
var
|
|
885
|
-
const Tn = Object.assign(
|
|
884
|
+
var He = /* @__PURE__ */ ot(An, [["render", In]]);
|
|
885
|
+
const Tn = Object.assign(He, {
|
|
886
886
|
install: (t, n) => {
|
|
887
887
|
var a;
|
|
888
888
|
const e = (a = n?.iconPrefix) != null ? a : "";
|
|
889
|
-
t.component(e +
|
|
889
|
+
t.component(e + He.name, He);
|
|
890
890
|
}
|
|
891
891
|
}), Pn = /* @__PURE__ */ K({
|
|
892
892
|
__name: "index",
|
|
@@ -904,7 +904,7 @@ const Tn = Object.assign(Be, {
|
|
|
904
904
|
}),
|
|
905
905
|
emits: /* @__PURE__ */ le(["update:modelValue", "change", "error"], ["update:modelValue"]),
|
|
906
906
|
setup(t, { expose: n, emit: a }) {
|
|
907
|
-
const e = t, o = a, l = we(t, "modelValue"), s =
|
|
907
|
+
const e = t, o = a, l = we(t, "modelValue"), s = Fe("widgetRef"), c = q(() => {
|
|
908
908
|
switch (e.config?.widget?.widget) {
|
|
909
909
|
case "TextBox":
|
|
910
910
|
return We;
|
|
@@ -962,7 +962,7 @@ const Tn = Object.assign(Be, {
|
|
|
962
962
|
key: 0,
|
|
963
963
|
class: "err-msg"
|
|
964
964
|
};
|
|
965
|
-
function
|
|
965
|
+
function Hn(t, n, a, e, o, l) {
|
|
966
966
|
const s = k("a-tooltip");
|
|
967
967
|
return d(), h("div", null, [
|
|
968
968
|
S("div", Nn, [
|
|
@@ -998,7 +998,7 @@ function Bn(t, n, a, e, o, l) {
|
|
|
998
998
|
])
|
|
999
999
|
]);
|
|
1000
1000
|
}
|
|
1001
|
-
const Oe = /* @__PURE__ */ J(Pn, [["render",
|
|
1001
|
+
const Oe = /* @__PURE__ */ J(Pn, [["render", Hn], ["__scopeId", "data-v-9e5e8c37"], ["__file", "index.vue"]]), Bn = /* @__PURE__ */ K({
|
|
1002
1002
|
__name: "SubmitButton",
|
|
1003
1003
|
props: {
|
|
1004
1004
|
url: {},
|
|
@@ -1016,7 +1016,7 @@ const Oe = /* @__PURE__ */ J(Pn, [["render", Bn], ["__scopeId", "data-v-9e5e8c37
|
|
|
1016
1016
|
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
1017
1017
|
}
|
|
1018
1018
|
});
|
|
1019
|
-
function
|
|
1019
|
+
function Fn(t, n, a, e, o, l) {
|
|
1020
1020
|
const s = k("AButton");
|
|
1021
1021
|
return d(), D(s, {
|
|
1022
1022
|
loading: a.loading,
|
|
@@ -1029,7 +1029,7 @@ function Hn(t, n, a, e, o, l) {
|
|
|
1029
1029
|
_: 3
|
|
1030
1030
|
}, 8, ["loading"]);
|
|
1031
1031
|
}
|
|
1032
|
-
const qe = /* @__PURE__ */ J(
|
|
1032
|
+
const qe = /* @__PURE__ */ J(Bn, [["render", Fn], ["__file", "SubmitButton.vue"]]), Ln = /* @__PURE__ */ K({
|
|
1033
1033
|
__name: "DetailLink",
|
|
1034
1034
|
props: {
|
|
1035
1035
|
url: {},
|
|
@@ -1163,7 +1163,7 @@ function Me(t) {
|
|
|
1163
1163
|
s.length && a.push({ name: l.name, fields: s });
|
|
1164
1164
|
});
|
|
1165
1165
|
const e = n.fieldsGroup.flatMap((l) => l.keys), o = t.filter((l) => !e.includes(l.fieldKey));
|
|
1166
|
-
return o.length && a.push({ name: "
|
|
1166
|
+
return o.length && a.push({ name: "Grading Review History (if applicable)", fields: o }), a;
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
1169
|
class Pe {
|
|
@@ -1246,7 +1246,7 @@ const Jn = /* @__PURE__ */ K({
|
|
|
1246
1246
|
},
|
|
1247
1247
|
setup(t, { expose: n }) {
|
|
1248
1248
|
n();
|
|
1249
|
-
const a = Ve(), e = Ie(), o = Ae(), l = $e(), s =
|
|
1249
|
+
const a = Ve(), e = Ie(), o = Ae(), l = $e(), s = Fe("dataWidgets"), c = pe(), i = t, r = m({
|
|
1250
1250
|
pageType: "",
|
|
1251
1251
|
fields: {},
|
|
1252
1252
|
globalValidations: [],
|
|
@@ -1256,13 +1256,13 @@ const Jn = /* @__PURE__ */ K({
|
|
|
1256
1256
|
}
|
|
1257
1257
|
}), u = m([]), g = m({});
|
|
1258
1258
|
function _(C) {
|
|
1259
|
-
return C ? Object.entries(C).map(([V,
|
|
1259
|
+
return C ? Object.entries(C).map(([V, H]) => ({
|
|
1260
1260
|
fieldKey: V,
|
|
1261
|
-
...
|
|
1261
|
+
...H
|
|
1262
1262
|
})).filter((V) => V.widget && V.widget.widget !== "Hidden").filter((V) => !Z.value.includes(V.fieldKey)) : [];
|
|
1263
1263
|
}
|
|
1264
1264
|
function x(C) {
|
|
1265
|
-
return C ? Object.entries(C).filter(([V,
|
|
1265
|
+
return C ? Object.entries(C).filter(([V, H]) => H.dependent).reduce((V, [H, O]) => (V[H] = O.dependent, V), {}) : [];
|
|
1266
1266
|
}
|
|
1267
1267
|
const p = q(() => r.value?.actions ? [...r.value.actions].reverse() : []), f = m({}), b = m(!1);
|
|
1268
1268
|
ue(async () => {
|
|
@@ -1271,7 +1271,7 @@ const Jn = /* @__PURE__ */ K({
|
|
|
1271
1271
|
r.value = await C.getPageData(), u.value = _(r.value.fields), g.value = x(r.value.fields);
|
|
1272
1272
|
for (const I in r.value.fields) {
|
|
1273
1273
|
if (r.value.fields[I].widget?.widget === "File") {
|
|
1274
|
-
const V = u.value.find((
|
|
1274
|
+
const V = u.value.find((H) => H.fieldKey === I);
|
|
1275
1275
|
V && V.widget && (V.widget.files = []);
|
|
1276
1276
|
}
|
|
1277
1277
|
f.value[I] = r.value.fields[I].modelValue;
|
|
@@ -1281,7 +1281,7 @@ const Jn = /* @__PURE__ */ K({
|
|
|
1281
1281
|
function j() {
|
|
1282
1282
|
return e()?.userInfo?.email_address ?? "";
|
|
1283
1283
|
}
|
|
1284
|
-
async function ee(C, I, V,
|
|
1284
|
+
async function ee(C, I, V, H, O) {
|
|
1285
1285
|
switch (I) {
|
|
1286
1286
|
case Y.Submit:
|
|
1287
1287
|
let L = !0;
|
|
@@ -1301,7 +1301,7 @@ const Jn = /* @__PURE__ */ K({
|
|
|
1301
1301
|
break;
|
|
1302
1302
|
case Y.Link:
|
|
1303
1303
|
try {
|
|
1304
|
-
await l[C.eventName || ""]?.(f.value, Z), o.push({ name:
|
|
1304
|
+
await l[C.eventName || ""]?.(f.value, Z), o.push({ name: H, params: { className: i.className } });
|
|
1305
1305
|
} catch (Q) {
|
|
1306
1306
|
console.error("Error in link action trigger:", Q);
|
|
1307
1307
|
}
|
|
@@ -1400,7 +1400,7 @@ const lo = /* @__PURE__ */ J(Jn, [["render", io], ["__scopeId", "data-v-2fce8732
|
|
|
1400
1400
|
},
|
|
1401
1401
|
setup(t, { expose: n }) {
|
|
1402
1402
|
n();
|
|
1403
|
-
const a = Ae(), e = $e(), o = Ie(), l = Ve(), s =
|
|
1403
|
+
const a = Ae(), e = $e(), o = Ie(), l = Ve(), s = Fe("dataWidgets"), c = pe(), i = t, r = m({
|
|
1404
1404
|
pageType: "",
|
|
1405
1405
|
fields: {},
|
|
1406
1406
|
globalValidations: [],
|
|
@@ -1416,7 +1416,7 @@ const lo = /* @__PURE__ */ J(Jn, [["render", io], ["__scopeId", "data-v-2fce8732
|
|
|
1416
1416
|
})).filter((I) => I.widget && I.widget.widget !== "Hidden").filter((I) => !M.value.includes(I.fieldKey)) : [];
|
|
1417
1417
|
}
|
|
1418
1418
|
function x(w) {
|
|
1419
|
-
return w ? Object.entries(w).filter(([I, V]) => V.dependent).reduce((I, [V,
|
|
1419
|
+
return w ? Object.entries(w).filter(([I, V]) => V.dependent).reduce((I, [V, H]) => (I[V] = H.dependent, I), {}) : [];
|
|
1420
1420
|
}
|
|
1421
1421
|
const p = q(() => r.value?.actions ? [...r.value.actions].reverse() : []), f = m({}), b = m(!1);
|
|
1422
1422
|
ue(async () => {
|
|
@@ -1424,25 +1424,25 @@ const lo = /* @__PURE__ */ J(Jn, [["render", io], ["__scopeId", "data-v-2fce8732
|
|
|
1424
1424
|
const w = new Pe().setPageActionType(fe.Update).setClassName(i.className).setStore({ svrStore: o, bpmStore: l }).setWorkflowId(i.workflowId).build();
|
|
1425
1425
|
r.value = await w.getPageData();
|
|
1426
1426
|
const C = await w.getBtnList(), I = await w.getFiles();
|
|
1427
|
-
r.value.actions = r.value.actions?.filter((
|
|
1428
|
-
const O = C.find((L) => L.button ===
|
|
1427
|
+
r.value.actions = r.value.actions?.filter((H) => {
|
|
1428
|
+
const O = C.find((L) => L.button === H.title);
|
|
1429
1429
|
return O ? O.isShow : !0;
|
|
1430
1430
|
});
|
|
1431
1431
|
const V = r.value.fields.requestType.modelValue;
|
|
1432
1432
|
e.Test?.({ fieldValue: V, hiddenFields: M, formData: f }), u.value = _(r.value.fields), g.value = x(r.value.fields);
|
|
1433
|
-
for (const
|
|
1434
|
-
if (r.value.fields[
|
|
1435
|
-
const O = u.value.find((L) => L.fieldKey ===
|
|
1436
|
-
O && O.widget && (O.widget.files = I[
|
|
1433
|
+
for (const H in r.value.fields) {
|
|
1434
|
+
if (r.value.fields[H].widget?.widget === "File") {
|
|
1435
|
+
const O = u.value.find((L) => L.fieldKey === H);
|
|
1436
|
+
O && O.widget && (O.widget.files = I[H] ?? [], O.widget.removeFile = (L) => w.removeFile(L));
|
|
1437
1437
|
}
|
|
1438
|
-
f.value[
|
|
1438
|
+
f.value[H] = r.value.fields[H].modelValue;
|
|
1439
1439
|
}
|
|
1440
1440
|
b.value = !1;
|
|
1441
1441
|
});
|
|
1442
1442
|
function j() {
|
|
1443
1443
|
return o()?.userInfo?.email_address ?? "";
|
|
1444
1444
|
}
|
|
1445
|
-
async function ee(w, C, I, V,
|
|
1445
|
+
async function ee(w, C, I, V, H) {
|
|
1446
1446
|
switch (C) {
|
|
1447
1447
|
case Y.Submit:
|
|
1448
1448
|
let O = !0;
|
|
@@ -1574,10 +1574,10 @@ const Co = /* @__PURE__ */ K({
|
|
|
1574
1574
|
...P
|
|
1575
1575
|
})).filter((E) => E.widget && E.widget.widget !== "Hidden").filter((E) => !w.value.includes(E.fieldKey)) : [];
|
|
1576
1576
|
}
|
|
1577
|
-
const x = q(() => Me(g.value)), p = q(() => u.value?.actions ? [...u.value.actions].reverse() : []), f = m(!0), b = (T,
|
|
1577
|
+
const x = q(() => Me(g.value)), p = q(() => u.value?.actions ? [...u.value.actions].reverse() : []), f = m(!0), b = (T, F) => {
|
|
1578
1578
|
const E = T.findIndex((P) => P.isCurrent);
|
|
1579
1579
|
return T.map((P, re) => {
|
|
1580
|
-
const
|
|
1580
|
+
const B = {
|
|
1581
1581
|
id: P.id,
|
|
1582
1582
|
title: "",
|
|
1583
1583
|
proxy: "",
|
|
@@ -1586,66 +1586,66 @@ const Co = /* @__PURE__ */ K({
|
|
|
1586
1586
|
status: 1,
|
|
1587
1587
|
time: ""
|
|
1588
1588
|
};
|
|
1589
|
-
|
|
1589
|
+
B.title = P.workflowProcessApprovers[0]?.name;
|
|
1590
1590
|
const be = P.workflowProcessApprovers[P.workflowProcessApprovers.length - 1], ke = P.workflowHistorys[P.workflowHistorys.length - 1], he = ke?.workflowHistoryApprovers[ke?.workflowHistoryApprovers?.length - 1];
|
|
1591
|
-
if (be && he && be?.email?.toLowerCase() !== he?.approverEmail?.toLowerCase() && (
|
|
1592
|
-
|
|
1591
|
+
if (be && he && be?.email?.toLowerCase() !== he?.approverEmail?.toLowerCase() && (B.title = `${he.name}`, B.proxy = `Proxy: ${be.name}`), P.sort > 1 ? B.sub = "Approver Role: " + P.nodeName.replace("Submit", "").replace("Approve", "") : B.sub = "Submit Application", P.isCurrent && F !== -1)
|
|
1592
|
+
B.desc = "In Approval", B.status = 1;
|
|
1593
1593
|
else {
|
|
1594
1594
|
const te = P.workflowHistorys[P.workflowHistorys.length - 1];
|
|
1595
1595
|
if (te && te.status === 100)
|
|
1596
|
-
|
|
1596
|
+
B.time = Ce(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), B.status = 2, B.desc = "approve success!";
|
|
1597
1597
|
else if (te && te.status === 999)
|
|
1598
|
-
|
|
1598
|
+
B.time = Ce(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), B.status = 0, B.desc = "approve reject!";
|
|
1599
1599
|
else if (te)
|
|
1600
|
-
if (
|
|
1601
|
-
|
|
1600
|
+
if (B.time = Ce(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), P.sort === 1)
|
|
1601
|
+
B.status = 2, B.desc = "";
|
|
1602
1602
|
else {
|
|
1603
1603
|
const Ee = te.workflowHistoryApprovers[0];
|
|
1604
|
-
|
|
1604
|
+
B.status = 3, B.desc = Ee?.reason ? `Rejected reason: ${Ee.reason}` : "Rejected";
|
|
1605
1605
|
}
|
|
1606
|
-
else re < E || E === -1 ? (
|
|
1606
|
+
else re < E || E === -1 ? (B.status = 0, B.desc = "Skipped") : (B.status = 0, B.desc = "Pending Approval");
|
|
1607
1607
|
te && te.status;
|
|
1608
1608
|
}
|
|
1609
|
-
return
|
|
1609
|
+
return B;
|
|
1610
1610
|
});
|
|
1611
1611
|
}, j = m([]), ee = m(!1), M = m(!1), Z = m(!1), ae = m(!1);
|
|
1612
1612
|
async function A() {
|
|
1613
1613
|
const T = await r.getBtnList();
|
|
1614
|
-
u.value.actions = u.value.actions?.filter((
|
|
1615
|
-
const E = T.find((P) => P.button ===
|
|
1614
|
+
u.value.actions = u.value.actions?.filter((F) => {
|
|
1615
|
+
const E = T.find((P) => P.button === F.title);
|
|
1616
1616
|
return E ? E.isShow : !0;
|
|
1617
|
-
}), ee.value = T.find((
|
|
1617
|
+
}), ee.value = T.find((F) => F.button === "IsGlobal")?.isShow ?? !1, M.value = T.find((F) => F.button === "AssignButton")?.isShow ?? !1, Z.value = T.find((F) => F.button === "AssignList")?.isShow ?? !1, ae.value = T.find((F) => F.button === "AddCommentsButton")?.isShow ?? !1;
|
|
1618
1618
|
}
|
|
1619
1619
|
const w = m([]);
|
|
1620
1620
|
async function C() {
|
|
1621
1621
|
f.value = !0, r = new Pe().setPageActionType(fe.Details).setClassName(i.className).setStore({ svrStore: a, bpmStore: e }).setWorkflowId(i.workflowId).build(), u.value = await r.getPageData();
|
|
1622
1622
|
const T = await r.getFiles();
|
|
1623
1623
|
se.value = await r.getApprovers(), L.value = await r.getCommentsHistory(), ie.value = await r.getAssociator(), A();
|
|
1624
|
-
const
|
|
1625
|
-
o.Test?.({ fieldValue:
|
|
1624
|
+
const F = u.value.fields.requestType.modelValue;
|
|
1625
|
+
o.Test?.({ fieldValue: F, hiddenFields: w }), g.value = _(u.value.fields);
|
|
1626
1626
|
for (const P in u.value.fields)
|
|
1627
1627
|
if (u.value.fields[P].widget?.widget === "File") {
|
|
1628
|
-
const re = g.value.find((
|
|
1628
|
+
const re = g.value.find((B) => B.fieldKey === P);
|
|
1629
1629
|
re && re.widget && (re.widget.files = T[P] ?? []);
|
|
1630
1630
|
}
|
|
1631
1631
|
const E = await r.getProcess();
|
|
1632
1632
|
j.value = b(E, 0), f.value = !1;
|
|
1633
1633
|
}
|
|
1634
1634
|
ue(C);
|
|
1635
|
-
async function I(T,
|
|
1636
|
-
return o[T]?.(
|
|
1635
|
+
async function I(T, F) {
|
|
1636
|
+
return o[T]?.(F);
|
|
1637
1637
|
}
|
|
1638
1638
|
function V() {
|
|
1639
1639
|
return a()?.userInfo?.email_address ?? "";
|
|
1640
1640
|
}
|
|
1641
|
-
async function
|
|
1641
|
+
async function H(T, F, E, P, re) {
|
|
1642
1642
|
try {
|
|
1643
|
-
switch (
|
|
1643
|
+
switch (F) {
|
|
1644
1644
|
case Y.Submit:
|
|
1645
|
-
const { reason:
|
|
1645
|
+
const { reason: B, ifGlobal: be } = await I(re, { isGlobal: ee.value });
|
|
1646
1646
|
f.value = !0;
|
|
1647
1647
|
const ke = re === "Approve" ? "100" : "-1";
|
|
1648
|
-
await Rt(i.className, i.workflowId, V(),
|
|
1648
|
+
await Rt(i.className, i.workflowId, V(), B, [Number(i.workflowId)], E, ke, be), f.value = !1;
|
|
1649
1649
|
const he = re === "Approve" ? `Request ID ${i.workflowId} has been approved.` : `Request ID ${i.workflowId} has been rejected.`;
|
|
1650
1650
|
c?.appContext.config.globalProperties.$notification.success(he), C();
|
|
1651
1651
|
break;
|
|
@@ -1667,7 +1667,7 @@ const Co = /* @__PURE__ */ K({
|
|
|
1667
1667
|
});
|
|
1668
1668
|
break;
|
|
1669
1669
|
default:
|
|
1670
|
-
console.warn("Unknown action type:",
|
|
1670
|
+
console.warn("Unknown action type:", F);
|
|
1671
1671
|
}
|
|
1672
1672
|
} catch {
|
|
1673
1673
|
}
|
|
@@ -1681,20 +1681,20 @@ const Co = /* @__PURE__ */ K({
|
|
|
1681
1681
|
await v("Confirm Assign Approver", "Do you want to assign the selected approver?");
|
|
1682
1682
|
try {
|
|
1683
1683
|
await r.assignApprover(T), ie.value = await r.getAssociator(), A(), c?.appContext.config.globalProperties.$notification.success("Assign Approver clicked!");
|
|
1684
|
-
} catch (
|
|
1685
|
-
if (
|
|
1684
|
+
} catch (F) {
|
|
1685
|
+
if (F.status === 409) {
|
|
1686
1686
|
c?.appContext.config.globalProperties.$notification.error("This user is already an associator");
|
|
1687
1687
|
return;
|
|
1688
1688
|
}
|
|
1689
1689
|
c?.appContext.config.globalProperties.$notification.error("Failed to assign approver");
|
|
1690
1690
|
}
|
|
1691
1691
|
}
|
|
1692
|
-
async function v(T,
|
|
1692
|
+
async function v(T, F) {
|
|
1693
1693
|
const { Modal: E } = await import("@arco-design/web-vue");
|
|
1694
1694
|
return new Promise((P, re) => {
|
|
1695
1695
|
E.confirm({
|
|
1696
1696
|
title: T,
|
|
1697
|
-
content:
|
|
1697
|
+
content: F,
|
|
1698
1698
|
okText: "OK",
|
|
1699
1699
|
cancelText: "Cancel",
|
|
1700
1700
|
onOk: () => P(!0),
|
|
@@ -1728,7 +1728,7 @@ const Co = /* @__PURE__ */ K({
|
|
|
1728
1728
|
return r;
|
|
1729
1729
|
}, set page(T) {
|
|
1730
1730
|
r = T;
|
|
1731
|
-
}, pageData: u, _fields: g, genField: _, groupedFields: x, reversedActions: p, loading: f, mapWorkflowSteps: b, steps: j, isGlobal: ee, isShowAssignSelect: M, isShowAssignList: Z, isShowCommentTextArea: ae, reloadButtonList: A, hiddenFields: w, load: C, triggerFn: I, getApproverEmail: V, clickHandler:
|
|
1731
|
+
}, pageData: u, _fields: g, genField: _, groupedFields: x, reversedActions: p, loading: f, mapWorkflowSteps: b, steps: j, isGlobal: ee, isShowAssignSelect: M, isShowAssignList: Z, isShowCommentTextArea: ae, reloadButtonList: A, hiddenFields: w, load: C, triggerFn: I, getApproverEmail: V, clickHandler: H, comment: O, commentsHistory: L, selectedApprover: Q, approvers: se, associators: ie, onAssignApprover: _e, confirmDialog: v, onDeleteAssociator: N, onAddComment: R, formatTitle: ce, ActionButton: xe, get IconDownload() {
|
|
1732
1732
|
return Tn;
|
|
1733
1733
|
}, TopBar: Te, get formatDate() {
|
|
1734
1734
|
return Ce;
|
|
@@ -1743,10 +1743,10 @@ const Co = /* @__PURE__ */ K({
|
|
|
1743
1743
|
}, Uo = {
|
|
1744
1744
|
key: 2,
|
|
1745
1745
|
class: "detail-field-wrapper"
|
|
1746
|
-
}, Do = { class: "detail-field" },
|
|
1746
|
+
}, Do = { class: "detail-field" }, Ho = {
|
|
1747
1747
|
key: 0,
|
|
1748
1748
|
class: "detail-content"
|
|
1749
|
-
},
|
|
1749
|
+
}, Bo = { class: "page-footer" }, Fo = { class: "action-container" }, Lo = { class: "action-buttons" };
|
|
1750
1750
|
function Ro(t, n, a, e, o, l) {
|
|
1751
1751
|
const s = k("a-tooltip"), c = k("a-link"), i = k("a-space"), r = k("a-card");
|
|
1752
1752
|
k("a-option"), k("a-select");
|
|
@@ -1857,7 +1857,7 @@ function Ro(t, n, a, e, o, l) {
|
|
|
1857
1857
|
_: 1
|
|
1858
1858
|
})) : ne("", !0)
|
|
1859
1859
|
]),
|
|
1860
|
-
t.$slots.content ? (d(), h("div",
|
|
1860
|
+
t.$slots.content ? (d(), h("div", Ho, [
|
|
1861
1861
|
de(t.$slots, "content", {}, void 0, !0)
|
|
1862
1862
|
])) : ne("", !0)
|
|
1863
1863
|
])
|
|
@@ -1865,8 +1865,8 @@ function Ro(t, n, a, e, o, l) {
|
|
|
1865
1865
|
_: 3
|
|
1866
1866
|
}, 8, ["loading"])
|
|
1867
1867
|
]),
|
|
1868
|
-
S("div",
|
|
1869
|
-
S("div",
|
|
1868
|
+
S("div", Bo, [
|
|
1869
|
+
S("div", Fo, [
|
|
1870
1870
|
de(t.$slots, "action", {}, void 0, !0),
|
|
1871
1871
|
S("div", Lo, [
|
|
1872
1872
|
(d(!0), h($, null, z(e.reversedActions, (f) => (d(), D(e.ActionButton, {
|
|
@@ -1992,14 +1992,14 @@ const jo = /* @__PURE__ */ J(Co, [["render", Ro], ["__scopeId", "data-v-f3f30431
|
|
|
1992
1992
|
value: C(R.value, w())
|
|
1993
1993
|
})) || [], i.current = 1, j();
|
|
1994
1994
|
}
|
|
1995
|
-
const V = m({}),
|
|
1995
|
+
const V = m({}), H = m([]);
|
|
1996
1996
|
function O(v) {
|
|
1997
1997
|
if (!v) return [];
|
|
1998
|
-
|
|
1998
|
+
H.value = Object.entries(v).filter(([, N]) => N.isFiltered).map(([N, R]) => ({ fieldKey: N, fieldConfig: R }));
|
|
1999
1999
|
}
|
|
2000
2000
|
const L = () => {
|
|
2001
2001
|
const v = {};
|
|
2002
|
-
|
|
2002
|
+
H.value.forEach(({ fieldKey: N, fieldConfig: R }) => {
|
|
2003
2003
|
v[N] = {}, v[N].value = R.modelValue, v[N].operator = R.operator;
|
|
2004
2004
|
}), V.value = v;
|
|
2005
2005
|
}, Q = () => {
|
|
@@ -2010,7 +2010,7 @@ const jo = /* @__PURE__ */ J(Co, [["render", Ro], ["__scopeId", "data-v-f3f30431
|
|
|
2010
2010
|
function ie(v, N) {
|
|
2011
2011
|
return !(v.location !== "InTable" || v.title === "Update" && (N.status === 100 || N.status === -1));
|
|
2012
2012
|
}
|
|
2013
|
-
const _e = { svrStore: a, bpmStore: e, router: o, instance: l, props: s, pageData: c, paging: i, createListParams: r, scroll: u, mapColumns: g, _data: _, _columns: x, loadingPage: p, loadingTable: f, actions: b, loadData: j, mounted: ee, pageChangeHandler: M, pageSizeChangeHandler: Z, clickHandler: ae, createHandler: A, getApproverEmail: w, replaceEmail: C, tabHandler: I, searchForm: V, searchableFields:
|
|
2013
|
+
const _e = { svrStore: a, bpmStore: e, router: o, instance: l, props: s, pageData: c, paging: i, createListParams: r, scroll: u, mapColumns: g, _data: _, _columns: x, loadingPage: p, loadingTable: f, actions: b, loadData: j, mounted: ee, pageChangeHandler: M, pageSizeChangeHandler: Z, clickHandler: ae, createHandler: A, getApproverEmail: w, replaceEmail: C, tabHandler: I, searchForm: V, searchableFields: H, mapSearchableFields: O, initSearchForm: L, handleSearch: Q, handleReset: se, judgeHiddenActions: ie, ActionButton: xe, DataWidgets: Oe, TopBar: Te };
|
|
2014
2014
|
return Object.defineProperty(_e, "__isScriptSetup", { enumerable: !1, value: !0 }), _e;
|
|
2015
2015
|
}
|
|
2016
2016
|
}), $o = { class: "list-container" }, Mo = { class: "query-title" };
|