@chase-shao/vue-component-lib 1.2.108 → 1.2.109
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/components/data-gen/widgets/index.d.ts +0 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +563 -556
- 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 me, inject as be, defineComponent as
|
|
1
|
+
import { ref as g, getCurrentInstance as me, inject as be, defineComponent as q, mergeModels as ce, useModel as Se, resolveComponent as x, createBlock as H, openBlock as u, onMounted as ge, computed as z, withCtx as C, createElementBlock as v, Fragment as j, renderList as W, createVNode as F, nextTick as vt, createElementVNode as w, createTextVNode as ae, toDisplayString as G, normalizeStyle as Xe, normalizeClass as et, createCommentVNode as se, useTemplateRef as Ae, resolveDynamicComponent as Me, renderSlot as ue, reactive as ht, onActivated as bt } from "vue";
|
|
2
2
|
import yt from "axios";
|
|
3
3
|
import { defineStore as wt } from "pinia";
|
|
4
4
|
import { useRouter as kt } from "vue-router";
|
|
@@ -52,25 +52,25 @@ const tt = wt("main", () => {
|
|
|
52
52
|
const e = document.createElement("a"), a = window.URL.createObjectURL(n);
|
|
53
53
|
e.href = a, e.download = o, e.click(), window.URL.revokeObjectURL(a);
|
|
54
54
|
};
|
|
55
|
-
let
|
|
55
|
+
let $e = {};
|
|
56
56
|
function Vt(t) {
|
|
57
|
-
|
|
57
|
+
$e = { ...$e, ...t };
|
|
58
58
|
}
|
|
59
59
|
function je() {
|
|
60
|
-
return
|
|
60
|
+
return $e;
|
|
61
61
|
}
|
|
62
62
|
const ot = Symbol("library-router");
|
|
63
|
-
let
|
|
63
|
+
let Oe = null;
|
|
64
64
|
function At(t) {
|
|
65
|
-
|
|
65
|
+
Oe = t ?? null;
|
|
66
66
|
}
|
|
67
67
|
function ve() {
|
|
68
68
|
if (me()) {
|
|
69
69
|
const o = be(ot, null);
|
|
70
70
|
return o || kt();
|
|
71
71
|
}
|
|
72
|
-
if (
|
|
73
|
-
return
|
|
72
|
+
if (Oe)
|
|
73
|
+
return Oe;
|
|
74
74
|
throw new Error("Router is unavailable. Pass router when installing the plugin before using useLibraryRouter outside setup().");
|
|
75
75
|
}
|
|
76
76
|
const nt = me();
|
|
@@ -126,7 +126,7 @@ const st = async () => {
|
|
|
126
126
|
e.token = void 0;
|
|
127
127
|
}, (a.data?.expireSeconds ?? 3600) * 1e3), a?.data?.token;
|
|
128
128
|
});
|
|
129
|
-
},
|
|
129
|
+
}, Q = async () => {
|
|
130
130
|
const t = await st(), o = at();
|
|
131
131
|
return o.defaults.headers.common.Authorization = `Bearer ${t}`, o;
|
|
132
132
|
}, Be = {
|
|
@@ -136,15 +136,15 @@ const st = async () => {
|
|
|
136
136
|
ApproverEmail: (t) => t.svrStore()?.userInfo?.email_address ?? "test.email@dataGetter.ts",
|
|
137
137
|
ApproverPositionCode: (t) => t.bpmStore()?.positionCode ?? 999,
|
|
138
138
|
RejectReason: () => "Test Reject Reason"
|
|
139
|
-
},
|
|
139
|
+
}, J = [];
|
|
140
140
|
for (let t = 0; t < 256; ++t)
|
|
141
|
-
|
|
141
|
+
J.push((t + 256).toString(16).slice(1));
|
|
142
142
|
function Ft(t, o = 0) {
|
|
143
|
-
return (
|
|
143
|
+
return (J[t[o + 0]] + J[t[o + 1]] + J[t[o + 2]] + J[t[o + 3]] + "-" + J[t[o + 4]] + J[t[o + 5]] + "-" + J[t[o + 6]] + J[t[o + 7]] + "-" + J[t[o + 8]] + J[t[o + 9]] + "-" + J[t[o + 10]] + J[t[o + 11]] + J[t[o + 12]] + J[t[o + 13]] + J[t[o + 14]] + J[t[o + 15]]).toLowerCase();
|
|
144
144
|
}
|
|
145
145
|
let De;
|
|
146
146
|
const Nt = new Uint8Array(16);
|
|
147
|
-
function
|
|
147
|
+
function Ut() {
|
|
148
148
|
if (!De) {
|
|
149
149
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
150
150
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
@@ -152,17 +152,17 @@ function Rt() {
|
|
|
152
152
|
}
|
|
153
153
|
return De(Nt);
|
|
154
154
|
}
|
|
155
|
-
const
|
|
155
|
+
const Rt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ge = { randomUUID: Rt };
|
|
156
156
|
function it(t, o, n) {
|
|
157
157
|
if (Ge.randomUUID && !t)
|
|
158
158
|
return Ge.randomUUID();
|
|
159
159
|
t = t || {};
|
|
160
|
-
const e = t.random ?? t.rng?.() ??
|
|
160
|
+
const e = t.random ?? t.rng?.() ?? Ut();
|
|
161
161
|
if (e.length < 16)
|
|
162
162
|
throw new Error("Random bytes length must be >= 16");
|
|
163
163
|
return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, Ft(e);
|
|
164
164
|
}
|
|
165
|
-
var
|
|
165
|
+
var X = /* @__PURE__ */ ((t) => (t[t.Submit = 0] = "Submit", t[t.Link = 1] = "Link", t[t.Button = 2] = "Button", t))(X || {}), he = /* @__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))(he || {});
|
|
166
166
|
function Bt(t, o, n) {
|
|
167
167
|
const e = {
|
|
168
168
|
pageType: "",
|
|
@@ -210,7 +210,7 @@ function Bt(t, o, n) {
|
|
|
210
210
|
redirectUrl: r.redirectUrl,
|
|
211
211
|
redirectType: r.redirectType,
|
|
212
212
|
title: r.title,
|
|
213
|
-
widget: r.widget === "Link" ?
|
|
213
|
+
widget: r.widget === "Link" ? X.Link : r.widget === "Submit" ? X.Submit : X.Button,
|
|
214
214
|
location: r.location,
|
|
215
215
|
attributeType: r.attributeType,
|
|
216
216
|
readonly: r.readonly,
|
|
@@ -267,11 +267,11 @@ function Bt(t, o, n) {
|
|
|
267
267
|
}), e.pageFields = a, e;
|
|
268
268
|
}
|
|
269
269
|
const qe = async (t, o, n, e) => {
|
|
270
|
-
const r = await (await
|
|
270
|
+
const r = await (await Q()).get(`/General/${o}/${t}/page`, { params: e });
|
|
271
271
|
return Bt(r?.data, t, n);
|
|
272
|
-
}, Dt = async (t, o, n) => (await (await
|
|
272
|
+
}, Dt = async (t, o, n) => (await (await Q()).post(`/${o}/${t}/button/List`, null, { params: n }))?.data;
|
|
273
273
|
async function Lt(t, o) {
|
|
274
|
-
const e = await (await
|
|
274
|
+
const e = await (await Q()).post(`/General/${t}/list`, o);
|
|
275
275
|
return {
|
|
276
276
|
data: e.data.data,
|
|
277
277
|
totalCount: e.data.totalCount
|
|
@@ -291,20 +291,20 @@ async function Lt(t, o) {
|
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
293
|
async function Ht(t, o, n) {
|
|
294
|
-
return (await (await
|
|
294
|
+
return (await (await Q()).post(n, o, {
|
|
295
295
|
params: {
|
|
296
296
|
className: t
|
|
297
297
|
}
|
|
298
298
|
})).data;
|
|
299
299
|
}
|
|
300
|
-
async function
|
|
301
|
-
const a = await
|
|
300
|
+
async function $t(t, o, n, e) {
|
|
301
|
+
const a = await Q(), r = ze(e, o);
|
|
302
302
|
return (await a.put(r, n))?.data;
|
|
303
303
|
}
|
|
304
304
|
function ze(t, o) {
|
|
305
305
|
return t.replace(/{WorkflowId}/g, encodeURIComponent(o));
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function Ot(t, o) {
|
|
308
308
|
return t.replace(/{ApproverEmail}/g, encodeURIComponent(o));
|
|
309
309
|
}
|
|
310
310
|
function Mt(t, o) {
|
|
@@ -320,19 +320,19 @@ function Et(t, o) {
|
|
|
320
320
|
return t.replace(/{ClassName}/g, encodeURIComponent(o));
|
|
321
321
|
}
|
|
322
322
|
async function Kt(t, o, n, e, a, r, i, l) {
|
|
323
|
-
const c = await
|
|
323
|
+
const c = await Q();
|
|
324
324
|
let s = ze(a, o);
|
|
325
|
-
return s =
|
|
325
|
+
return s = Ot(s, n), s = Mt(s, e), s = jt(s, r), s = zt(s, i), s = Et(s, t), (await c.put(s, l))?.data;
|
|
326
326
|
}
|
|
327
327
|
async function Wt(t, o) {
|
|
328
|
-
const a = (await (await
|
|
328
|
+
const a = (await (await Q()).get(t, { params: { value: o } }))?.data;
|
|
329
329
|
return Object.entries(a).map(([r, i]) => ({
|
|
330
330
|
value: r,
|
|
331
331
|
label: i
|
|
332
332
|
}));
|
|
333
333
|
}
|
|
334
334
|
async function Gt(t, o) {
|
|
335
|
-
return (await (await
|
|
335
|
+
return (await (await Q()).get(`/General/${t}/${o}/process`))?.data;
|
|
336
336
|
}
|
|
337
337
|
function qt(t) {
|
|
338
338
|
return {
|
|
@@ -342,40 +342,40 @@ function qt(t) {
|
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
344
|
async function Yt(t, o) {
|
|
345
|
-
return (await (await
|
|
345
|
+
return (await (await Q()).get(`/General/${t}/${o}/upload/get`))?.data.reduce((r, i) => {
|
|
346
346
|
const { category: l } = i;
|
|
347
347
|
return r[l] || (r[l] = []), r[l].push(qt(i)), r;
|
|
348
348
|
}, {});
|
|
349
349
|
}
|
|
350
350
|
async function Qt(t, o) {
|
|
351
|
-
return (await
|
|
351
|
+
return (await Q()).post(`/General/${t}/${o}/delete/attachment`);
|
|
352
352
|
}
|
|
353
353
|
async function Jt() {
|
|
354
|
-
const o = await (await
|
|
354
|
+
const o = await (await Q()).get("/Grading/dropdown/approvers");
|
|
355
355
|
return Object.entries(o?.data).map(([n, e]) => ({
|
|
356
356
|
label: n,
|
|
357
357
|
value: e
|
|
358
358
|
}));
|
|
359
359
|
}
|
|
360
360
|
async function Zt(t, o) {
|
|
361
|
-
return await (await
|
|
361
|
+
return await (await Q()).post(`Grading/AssignComments/${t}/${encodeURIComponent(o)}`);
|
|
362
362
|
}
|
|
363
363
|
async function Xt(t, o, n) {
|
|
364
|
-
return await (await
|
|
364
|
+
return await (await Q()).post(`Grading/AddComments/${t}/${encodeURIComponent(o)}`, n, {
|
|
365
365
|
headers: { "Content-Type": "application/json;charset=UTF-8" }
|
|
366
366
|
});
|
|
367
367
|
}
|
|
368
368
|
async function eo(t) {
|
|
369
|
-
return (await (await
|
|
369
|
+
return (await (await Q()).get(`Grading/GetComments/${t}`))?.data;
|
|
370
370
|
}
|
|
371
371
|
async function to(t) {
|
|
372
|
-
return (await (await
|
|
372
|
+
return (await (await Q()).get(`Grading/GetAssociator/${t}`))?.data;
|
|
373
373
|
}
|
|
374
374
|
async function oo(t) {
|
|
375
|
-
return await (await
|
|
375
|
+
return await (await Q()).delete(`Grading/DeleteAssociator/${t}`);
|
|
376
376
|
}
|
|
377
377
|
async function no(t, o = null) {
|
|
378
|
-
const e = await (await
|
|
378
|
+
const e = await (await Q()).post(t, o, {
|
|
379
379
|
responseType: "blob"
|
|
380
380
|
});
|
|
381
381
|
Tt(e?.data, "WorkflowData.xlsx");
|
|
@@ -392,7 +392,7 @@ const ye = (t, o) => {
|
|
|
392
392
|
}, ao = {
|
|
393
393
|
Regex: (t, o) => new RegExp(t).test(o),
|
|
394
394
|
Required: (t, o) => !!o
|
|
395
|
-
}, so = /* @__PURE__ */
|
|
395
|
+
}, so = /* @__PURE__ */ q({
|
|
396
396
|
__name: "InputText",
|
|
397
397
|
props: /* @__PURE__ */ ce({
|
|
398
398
|
fieldKey: {},
|
|
@@ -424,25 +424,26 @@ const ye = (t, o) => {
|
|
|
424
424
|
const s = { props: e, emits: a, model: r, validate: i, inputHandler: l, changeHandler: c };
|
|
425
425
|
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
426
426
|
}
|
|
427
|
-
}),
|
|
427
|
+
}), Z = (t, o) => {
|
|
428
428
|
const n = t.__vccOpts || t;
|
|
429
429
|
for (const [e, a] of o)
|
|
430
430
|
n[e] = a;
|
|
431
431
|
return n;
|
|
432
432
|
};
|
|
433
433
|
function io(t, o, n, e, a, r) {
|
|
434
|
-
const i =
|
|
435
|
-
return u(),
|
|
434
|
+
const i = x("AInput");
|
|
435
|
+
return u(), H(i, {
|
|
436
436
|
modelValue: e.model,
|
|
437
437
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => e.model = l),
|
|
438
438
|
"allow-clear": "",
|
|
439
|
-
|
|
440
|
-
|
|
439
|
+
"show-word-limit": "",
|
|
440
|
+
disabled: e.props.config.readonly,
|
|
441
|
+
"max-length": e.props.config.maxLength,
|
|
441
442
|
onInput: e.inputHandler,
|
|
442
443
|
onChange: e.changeHandler
|
|
443
444
|
}, null, 8, ["modelValue", "disabled", "max-length"]);
|
|
444
445
|
}
|
|
445
|
-
const Ye = /* @__PURE__ */
|
|
446
|
+
const Ye = /* @__PURE__ */ Z(so, [["render", io], ["__file", "InputText.vue"]]), lo = /* @__PURE__ */ q({
|
|
446
447
|
__name: "InputNumber",
|
|
447
448
|
props: /* @__PURE__ */ ce({
|
|
448
449
|
fieldKey: {},
|
|
@@ -457,7 +458,7 @@ const Ye = /* @__PURE__ */ Q(so, [["render", io], ["__file", "InputText.vue"]]),
|
|
|
457
458
|
}),
|
|
458
459
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
459
460
|
setup(t, { expose: o, emit: n }) {
|
|
460
|
-
const e = t, a = n, r = Se(t, "modelValue"), i = g(e.maxLength ?? 100), l = g(1);
|
|
461
|
+
const e = t, a = n, r = Se(t, "modelValue"), i = g(e.config.maxLength ?? 100), l = g(1);
|
|
461
462
|
ge(() => {
|
|
462
463
|
e.validations && e.validations.forEach((h) => {
|
|
463
464
|
h.ruleName === "Max" && (i.value = h.ruleParameter), h.ruleName === "Min" && (l.value = h.ruleParameter);
|
|
@@ -466,8 +467,8 @@ const Ye = /* @__PURE__ */ Q(so, [["render", io], ["__file", "InputText.vue"]]),
|
|
|
466
467
|
const c = (h) => ye(e.validations, h), s = (h) => {
|
|
467
468
|
a("input", h);
|
|
468
469
|
}, d = (h) => {
|
|
469
|
-
const
|
|
470
|
-
a("error",
|
|
470
|
+
const y = c(h);
|
|
471
|
+
a("error", y.res ? "" : y.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((f) => {
|
|
471
472
|
f.event === "change" && a(f.event, f.handlerName, h);
|
|
472
473
|
});
|
|
473
474
|
};
|
|
@@ -482,19 +483,20 @@ const Ye = /* @__PURE__ */ Q(so, [["render", io], ["__file", "InputText.vue"]]),
|
|
|
482
483
|
}
|
|
483
484
|
});
|
|
484
485
|
function co(t, o, n, e, a, r) {
|
|
485
|
-
const i =
|
|
486
|
-
return u(),
|
|
486
|
+
const i = x("AInputNumber");
|
|
487
|
+
return u(), H(i, {
|
|
487
488
|
modelValue: e.model,
|
|
488
489
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => e.model = l),
|
|
489
490
|
clearable: "",
|
|
490
|
-
|
|
491
|
+
"show-word-limit": "",
|
|
492
|
+
disabled: e.props.config.readonly,
|
|
491
493
|
max: e.max,
|
|
492
494
|
min: e.min,
|
|
493
495
|
onInput: e.inputHandler,
|
|
494
496
|
onChange: e.changeHandler
|
|
495
497
|
}, null, 8, ["modelValue", "disabled", "max", "min"]);
|
|
496
498
|
}
|
|
497
|
-
const uo = /* @__PURE__ */
|
|
499
|
+
const uo = /* @__PURE__ */ Z(lo, [["render", co], ["__file", "InputNumber.vue"]]), fo = /* @__PURE__ */ q({
|
|
498
500
|
__name: "SelectList",
|
|
499
501
|
props: /* @__PURE__ */ ce({
|
|
500
502
|
fieldKey: {},
|
|
@@ -509,34 +511,34 @@ const uo = /* @__PURE__ */ Q(lo, [["render", co], ["__file", "InputNumber.vue"]]
|
|
|
509
511
|
}),
|
|
510
512
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change"], ["update:modelValue"]),
|
|
511
513
|
setup(t, { expose: o, emit: n }) {
|
|
512
|
-
const e = t, a = n, r = g(!1), i = g(e.config.options ?? []), l = Se(t, "modelValue"), c = (
|
|
513
|
-
const
|
|
514
|
+
const e = t, a = n, r = g(!1), i = g(e.config.options ?? []), l = Se(t, "modelValue"), c = (y) => ye(e.validations, y), s = z(() => {
|
|
515
|
+
const y = {};
|
|
514
516
|
return e.triggers && e.triggers.length > 0 && e.triggers.forEach((f) => {
|
|
515
|
-
|
|
517
|
+
y[f.event] = (m) => {
|
|
516
518
|
a(f.event, f.handlerName, m);
|
|
517
|
-
const
|
|
518
|
-
a("error",
|
|
519
|
+
const k = c(m);
|
|
520
|
+
a("error", k.res ? "" : k.errorMessages);
|
|
519
521
|
};
|
|
520
|
-
}),
|
|
522
|
+
}), y;
|
|
521
523
|
}), d = async () => {
|
|
522
524
|
if (e.config.dataSourceProvider) {
|
|
523
525
|
i.value = await Wt(e.config.dataSourceProvider);
|
|
524
|
-
const
|
|
525
|
-
|
|
526
|
+
const y = e.modelValue;
|
|
527
|
+
y != null && y !== "" && (i.value.some((m) => m.value === y) || a("update:modelValue", ""));
|
|
526
528
|
}
|
|
527
529
|
};
|
|
528
530
|
ge(d);
|
|
529
|
-
const _ = (
|
|
530
|
-
a("update:modelValue",
|
|
531
|
-
const f = c(
|
|
531
|
+
const _ = (y) => {
|
|
532
|
+
a("update:modelValue", y);
|
|
533
|
+
const f = c(y);
|
|
532
534
|
a("error", f.res ? "" : f.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((m) => {
|
|
533
|
-
m.event === "change" && a(m.event, m.handlerName,
|
|
535
|
+
m.event === "change" && a(m.event, m.handlerName, y);
|
|
534
536
|
});
|
|
535
537
|
};
|
|
536
538
|
o({
|
|
537
539
|
validate() {
|
|
538
|
-
const
|
|
539
|
-
return a("error",
|
|
540
|
+
const y = c(e.modelValue);
|
|
541
|
+
return a("error", y.res ? "" : y.errorMessages), y.res;
|
|
540
542
|
}
|
|
541
543
|
});
|
|
542
544
|
const h = { props: e, emits: a, loading: r, _options: i, model: l, validate: c, eventHandlers: s, loadOptions: d, changeHandler: _ };
|
|
@@ -544,8 +546,8 @@ const uo = /* @__PURE__ */ Q(lo, [["render", co], ["__file", "InputNumber.vue"]]
|
|
|
544
546
|
}
|
|
545
547
|
});
|
|
546
548
|
function po(t, o, n, e, a, r) {
|
|
547
|
-
const i =
|
|
548
|
-
return u(),
|
|
549
|
+
const i = x("AOption"), l = x("ASelect");
|
|
550
|
+
return u(), H(l, {
|
|
549
551
|
"allow-clear": "",
|
|
550
552
|
modelValue: e.model,
|
|
551
553
|
"onUpdate:modelValue": o[0] || (o[0] = (c) => e.model = c),
|
|
@@ -555,8 +557,8 @@ function po(t, o, n, e, a, r) {
|
|
|
555
557
|
disabled: e.props.config.readonly,
|
|
556
558
|
onChange: e.changeHandler
|
|
557
559
|
}, {
|
|
558
|
-
default:
|
|
559
|
-
(u(!0), v(
|
|
560
|
+
default: C(() => [
|
|
561
|
+
(u(!0), v(j, null, W(e._options, (c) => (u(), H(i, {
|
|
560
562
|
key: c.value,
|
|
561
563
|
value: c.value,
|
|
562
564
|
label: c.label
|
|
@@ -565,7 +567,7 @@ function po(t, o, n, e, a, r) {
|
|
|
565
567
|
_: 1
|
|
566
568
|
}, 8, ["modelValue", "loading", "disabled"]);
|
|
567
569
|
}
|
|
568
|
-
const Qe = /* @__PURE__ */
|
|
570
|
+
const Qe = /* @__PURE__ */ Z(fo, [["render", po], ["__file", "SelectList.vue"]]), mo = /* @__PURE__ */ q({
|
|
569
571
|
__name: "Cascader",
|
|
570
572
|
props: {
|
|
571
573
|
modelValue: {},
|
|
@@ -580,7 +582,7 @@ const Qe = /* @__PURE__ */ Q(fo, [["render", po], ["__file", "SelectList.vue"]])
|
|
|
580
582
|
if (e.config) {
|
|
581
583
|
const s = e.config.dataSourceProvider;
|
|
582
584
|
if (s) {
|
|
583
|
-
const _ = await (await
|
|
585
|
+
const _ = await (await Q()).get(s);
|
|
584
586
|
r.value = _.data;
|
|
585
587
|
}
|
|
586
588
|
}
|
|
@@ -596,13 +598,13 @@ const Qe = /* @__PURE__ */ Q(fo, [["render", po], ["__file", "SelectList.vue"]])
|
|
|
596
598
|
}
|
|
597
599
|
});
|
|
598
600
|
function go(t, o, n, e, a, r) {
|
|
599
|
-
const i =
|
|
600
|
-
return u(),
|
|
601
|
+
const i = x("ACascader"), l = x("ASpace");
|
|
602
|
+
return u(), H(l, {
|
|
601
603
|
direction: "vertical",
|
|
602
604
|
size: "large"
|
|
603
605
|
}, {
|
|
604
|
-
default:
|
|
605
|
-
|
|
606
|
+
default: C(() => [
|
|
607
|
+
F(i, {
|
|
606
608
|
"field-names": e.fieldNames,
|
|
607
609
|
"model-value": n.modelValue,
|
|
608
610
|
options: e._options,
|
|
@@ -614,7 +616,7 @@ function go(t, o, n, e, a, r) {
|
|
|
614
616
|
_: 1
|
|
615
617
|
});
|
|
616
618
|
}
|
|
617
|
-
const _o = /* @__PURE__ */
|
|
619
|
+
const _o = /* @__PURE__ */ Z(mo, [["render", go], ["__file", "Cascader.vue"]]), Je = 1024 * 1024, vo = /* @__PURE__ */ q({
|
|
618
620
|
__name: "FileUpload",
|
|
619
621
|
props: {
|
|
620
622
|
className: {},
|
|
@@ -630,78 +632,82 @@ const _o = /* @__PURE__ */ Q(mo, [["render", go], ["__file", "Cascader.vue"]]),
|
|
|
630
632
|
emits: ["update:modelValue", "change", "error", "input"],
|
|
631
633
|
setup(t, { expose: o, emit: n }) {
|
|
632
634
|
const e = t, a = n, r = g({}), i = (p) => ye(e.validations, p), l = je(), c = l.apiBase, s = g(null), d = g("");
|
|
633
|
-
function _(p,
|
|
634
|
-
return p.replace(/{WorkflowId}/g,
|
|
635
|
+
function _(p, D, O) {
|
|
636
|
+
return p.replace(/{WorkflowId}/g, D).replace(/{ClassName}/g, O);
|
|
635
637
|
}
|
|
636
|
-
const h =
|
|
638
|
+
const h = z(() => {
|
|
637
639
|
if (e.config.uploadURL) {
|
|
638
640
|
const p = c + e.config.uploadURL;
|
|
639
641
|
return _(p, d.value, e.className);
|
|
640
642
|
}
|
|
641
643
|
return "";
|
|
642
644
|
});
|
|
643
|
-
function
|
|
645
|
+
function y(p) {
|
|
644
646
|
if (!(typeof p != "number" || p <= 0))
|
|
645
647
|
return p * Je;
|
|
646
648
|
}
|
|
647
|
-
|
|
648
|
-
|
|
649
|
+
function f(p) {
|
|
650
|
+
if (!(typeof p != "number" || p <= 0))
|
|
651
|
+
return p;
|
|
652
|
+
}
|
|
653
|
+
const m = z(() => y(e.maxSize ?? e.config.maxSize)), k = z(() => f(e.minSize ?? e.config.minSize)), ee = z(() => m.value ? K(m.value) : "unlimited"), re = z(() => k.value ? K(k.value) : "0 B");
|
|
654
|
+
function K(p) {
|
|
649
655
|
return p < 1024 ? `${p} B` : p < 1024 * 1024 ? `${Math.round(p / 1024)} KB` : p < 1024 * 1024 * 1024 ? `${Math.round(p / (1024 * 1024))} MB` : `${Math.round(p / (1024 * 1024 * 1024))} GB`;
|
|
650
656
|
}
|
|
651
|
-
function
|
|
652
|
-
const
|
|
653
|
-
return typeof
|
|
657
|
+
function te(p) {
|
|
658
|
+
const D = m.value, O = k.value;
|
|
659
|
+
return typeof D == "number" && D > 0 && p.size > D ? (a("error", `File size cannot exceed ${K(D)}`), !1) : typeof O == "number" && O > 0 && p.size < O ? (a("error", `File size cannot be smaller than ${K(O)}`), !1) : (a("error", ""), !0);
|
|
654
660
|
}
|
|
655
|
-
const
|
|
661
|
+
const ie = (p) => {
|
|
656
662
|
p.stopPropagation(), s.value.submit();
|
|
657
663
|
};
|
|
658
664
|
function le(p) {
|
|
659
|
-
const { file:
|
|
660
|
-
return new Promise((
|
|
665
|
+
const { file: D, name: O } = p, oe = O ?? D.name;
|
|
666
|
+
return new Promise((b, A) => {
|
|
661
667
|
St.confirm({
|
|
662
668
|
title: "Confirm Delete",
|
|
663
|
-
content: `Are you sure you want to delete ${
|
|
669
|
+
content: `Are you sure you want to delete ${oe}?`,
|
|
664
670
|
async onOk() {
|
|
665
671
|
if (p.status !== "init" && e.config.removeFile)
|
|
666
|
-
return await e.config.removeFile(p.uid),
|
|
667
|
-
|
|
672
|
+
return await e.config.removeFile(p.uid), b(!0);
|
|
673
|
+
b(!0);
|
|
668
674
|
},
|
|
669
|
-
onCancel: () =>
|
|
675
|
+
onCancel: () => A("cancel")
|
|
670
676
|
});
|
|
671
677
|
});
|
|
672
678
|
}
|
|
673
|
-
const
|
|
674
|
-
|
|
675
|
-
},
|
|
676
|
-
|
|
677
|
-
},
|
|
678
|
-
|
|
679
|
+
const I = g(null), T = g(null), P = (p) => {
|
|
680
|
+
I.value && (I.value(p), I.value = null, T.value = null);
|
|
681
|
+
}, S = (p) => {
|
|
682
|
+
T.value && (T.value(p), I.value = null, T.value = null);
|
|
683
|
+
}, V = g([]), $ = (p) => {
|
|
684
|
+
V.value = p.filter((D) => D.status === "init");
|
|
679
685
|
};
|
|
680
686
|
o({
|
|
681
687
|
submit(p) {
|
|
682
|
-
return new Promise((
|
|
683
|
-
s.value ? (e.config.uploadURL && (d.value = p),
|
|
688
|
+
return new Promise((D, O) => {
|
|
689
|
+
s.value ? (e.config.uploadURL && (d.value = p), I.value = D, T.value = O, V.value.length ? st().then((oe) => {
|
|
684
690
|
r.value = {
|
|
685
|
-
Authorization: `Bearer ${
|
|
691
|
+
Authorization: `Bearer ${oe}`
|
|
686
692
|
}, vt(() => {
|
|
687
693
|
s.value?.submit();
|
|
688
694
|
});
|
|
689
|
-
}) :
|
|
695
|
+
}) : D(p)) : D(p);
|
|
690
696
|
});
|
|
691
697
|
},
|
|
692
698
|
validate() {
|
|
693
|
-
const p = e.config.files ?? [],
|
|
699
|
+
const p = e.config.files ?? [], D = [...V.value, ...p].length > 0 ? "hasFile" : "", O = i(D);
|
|
694
700
|
return a("error", O.res ? "" : O.errorMessages), O.res;
|
|
695
701
|
}
|
|
696
702
|
});
|
|
697
|
-
const
|
|
698
|
-
return Object.defineProperty(
|
|
703
|
+
const B = { props: e, emits: a, headers: r, validate: i, config: l, ApiBase: c, uploadRef: s, id: d, replaceIdAndClassName: _, action: h, MB_SIZE: Je, mbToBytes: y, 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: V, onChange: $ };
|
|
704
|
+
return Object.defineProperty(B, "__isScriptSetup", { enumerable: !1, value: !0 }), B;
|
|
699
705
|
}
|
|
700
706
|
}), ho = { style: { "margin-top": "8px", color: "#86909c", "font-size": "12px" } };
|
|
701
707
|
function bo(t, o, n, e, a, r) {
|
|
702
|
-
const i =
|
|
703
|
-
return u(), v(
|
|
704
|
-
|
|
708
|
+
const i = x("a-button"), l = x("a-upload");
|
|
709
|
+
return u(), v(j, null, [
|
|
710
|
+
F(l, {
|
|
705
711
|
ref: "uploadRef",
|
|
706
712
|
"default-file-list": e.props.config.files,
|
|
707
713
|
action: e.action,
|
|
@@ -715,11 +721,11 @@ function bo(t, o, n, e, a, r) {
|
|
|
715
721
|
onSuccess: e.handleUploadSuccess,
|
|
716
722
|
onError: e.handleUploadError
|
|
717
723
|
}, {
|
|
718
|
-
"start-icon":
|
|
719
|
-
"upload-button":
|
|
720
|
-
|
|
721
|
-
default:
|
|
722
|
-
|
|
724
|
+
"start-icon": C(() => o[0] || (o[0] = [])),
|
|
725
|
+
"upload-button": C(() => [
|
|
726
|
+
F(i, { type: "primary" }, {
|
|
727
|
+
default: C(() => o[1] || (o[1] = [
|
|
728
|
+
ae("Select File", -1)
|
|
723
729
|
])),
|
|
724
730
|
_: 1,
|
|
725
731
|
__: [1]
|
|
@@ -727,10 +733,10 @@ function bo(t, o, n, e, a, r) {
|
|
|
727
733
|
]),
|
|
728
734
|
_: 1
|
|
729
735
|
}, 8, ["default-file-list", "action", "limit", "headers"]),
|
|
730
|
-
w("div", ho, " The maximum file size for uploads is " +
|
|
736
|
+
w("div", ho, " The maximum file size for uploads is " + G(e.maxFileSizeText) + ", and the minimum file size is greater than " + G(e.minFileSizeText) + ". ", 1)
|
|
731
737
|
], 64);
|
|
732
738
|
}
|
|
733
|
-
const yo = /* @__PURE__ */
|
|
739
|
+
const yo = /* @__PURE__ */ Z(vo, [["render", bo], ["__file", "FileUpload.vue"]]), wo = /* @__PURE__ */ q({
|
|
734
740
|
__name: "TextArea",
|
|
735
741
|
props: {
|
|
736
742
|
fieldKey: {},
|
|
@@ -762,18 +768,19 @@ const yo = /* @__PURE__ */ Q(vo, [["render", bo], ["__file", "FileUpload.vue"]])
|
|
|
762
768
|
}
|
|
763
769
|
});
|
|
764
770
|
function ko(t, o, n, e, a, r) {
|
|
765
|
-
const i =
|
|
766
|
-
return u(),
|
|
771
|
+
const i = x("ATextarea");
|
|
772
|
+
return u(), H(i, {
|
|
767
773
|
"model-value": e.props.modelValue,
|
|
768
774
|
placeholder: "Please enter something",
|
|
769
775
|
"allow-clear": "",
|
|
770
|
-
|
|
771
|
-
|
|
776
|
+
"show-word-limit": "",
|
|
777
|
+
disabled: e.props.config.readonly,
|
|
778
|
+
"max-length": e.props.config.maxLength,
|
|
772
779
|
onInput: e.inputHandler,
|
|
773
780
|
onChange: e.changeHandler
|
|
774
781
|
}, null, 8, ["model-value", "disabled", "max-length"]);
|
|
775
782
|
}
|
|
776
|
-
const So = /* @__PURE__ */
|
|
783
|
+
const So = /* @__PURE__ */ Z(wo, [["render", ko], ["__file", "TextArea.vue"]]), Co = /* @__PURE__ */ q({
|
|
777
784
|
__name: "CheckBox",
|
|
778
785
|
props: /* @__PURE__ */ ce({
|
|
779
786
|
fieldKey: {},
|
|
@@ -805,22 +812,22 @@ const So = /* @__PURE__ */ Q(wo, [["render", ko], ["__file", "TextArea.vue"]]),
|
|
|
805
812
|
}
|
|
806
813
|
});
|
|
807
814
|
function xo(t, o, n, e, a, r) {
|
|
808
|
-
const i =
|
|
809
|
-
return u(),
|
|
815
|
+
const i = x("ACheckbox");
|
|
816
|
+
return u(), H(i, {
|
|
810
817
|
modelValue: e.model,
|
|
811
818
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => e.model = l),
|
|
812
819
|
clearable: "",
|
|
813
820
|
disabled: e.props.readonly || e.props.config.Readonly,
|
|
814
821
|
onChange: e.changeHandler
|
|
815
822
|
}, {
|
|
816
|
-
default:
|
|
817
|
-
|
|
823
|
+
default: C(() => o[1] || (o[1] = [
|
|
824
|
+
ae("Yes", -1)
|
|
818
825
|
])),
|
|
819
826
|
_: 1,
|
|
820
827
|
__: [1]
|
|
821
828
|
}, 8, ["modelValue", "disabled"]);
|
|
822
829
|
}
|
|
823
|
-
const To = /* @__PURE__ */
|
|
830
|
+
const To = /* @__PURE__ */ Z(Co, [["render", xo], ["__file", "CheckBox.vue"]]), Vo = Symbol("ArcoConfigProvider"), Ao = "arco", Io = "$arco", lt = (t) => {
|
|
824
831
|
var o, n, e;
|
|
825
832
|
const a = me(), r = be(Vo, void 0);
|
|
826
833
|
return `${(e = (n = r?.prefixCls) != null ? n : (o = a?.appContext.config.globalProperties[Io]) == null ? void 0 : o.classPrefix) != null ? e : Ao}-${t}`;
|
|
@@ -833,7 +840,7 @@ var dt = (t, o) => {
|
|
|
833
840
|
t[n] = e;
|
|
834
841
|
return t;
|
|
835
842
|
};
|
|
836
|
-
const Fo =
|
|
843
|
+
const Fo = q({
|
|
837
844
|
name: "IconQuestionCircle",
|
|
838
845
|
props: {
|
|
839
846
|
size: {
|
|
@@ -860,7 +867,7 @@ const Fo = W({
|
|
|
860
867
|
click: (t) => !0
|
|
861
868
|
},
|
|
862
869
|
setup(t, { emit: o }) {
|
|
863
|
-
const n = lt("icon"), e =
|
|
870
|
+
const n = lt("icon"), e = z(() => [n, `${n}-question-circle`, { [`${n}-spin`]: t.spin }]), a = z(() => {
|
|
864
871
|
const i = {};
|
|
865
872
|
return t.size && (i.fontSize = ct(t.size) ? `${t.size}px` : t.size), t.rotate && (i.transform = `rotate(${t.rotate}deg)`), i;
|
|
866
873
|
});
|
|
@@ -873,7 +880,7 @@ const Fo = W({
|
|
|
873
880
|
};
|
|
874
881
|
}
|
|
875
882
|
}), No = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
876
|
-
function
|
|
883
|
+
function Uo(t, o, n, e, a, r) {
|
|
877
884
|
return u(), v("svg", {
|
|
878
885
|
viewBox: "0 0 48 48",
|
|
879
886
|
fill: "none",
|
|
@@ -890,14 +897,14 @@ function Ro(t, o, n, e, a, r) {
|
|
|
890
897
|
w("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)
|
|
891
898
|
]), 14, No);
|
|
892
899
|
}
|
|
893
|
-
var Le = /* @__PURE__ */ dt(Fo, [["render",
|
|
894
|
-
const
|
|
900
|
+
var Le = /* @__PURE__ */ dt(Fo, [["render", Uo]]);
|
|
901
|
+
const Ro = Object.assign(Le, {
|
|
895
902
|
install: (t, o) => {
|
|
896
903
|
var n;
|
|
897
904
|
const e = (n = o?.iconPrefix) != null ? n : "";
|
|
898
905
|
t.component(e + Le.name, Le);
|
|
899
906
|
}
|
|
900
|
-
}), Bo =
|
|
907
|
+
}), Bo = q({
|
|
901
908
|
name: "IconDownload",
|
|
902
909
|
props: {
|
|
903
910
|
size: {
|
|
@@ -924,7 +931,7 @@ const Uo = Object.assign(Le, {
|
|
|
924
931
|
click: (t) => !0
|
|
925
932
|
},
|
|
926
933
|
setup(t, { emit: o }) {
|
|
927
|
-
const n = lt("icon"), e =
|
|
934
|
+
const n = lt("icon"), e = z(() => [n, `${n}-download`, { [`${n}-spin`]: t.spin }]), a = z(() => {
|
|
928
935
|
const i = {};
|
|
929
936
|
return t.size && (i.fontSize = ct(t.size) ? `${t.size}px` : t.size), t.rotate && (i.transform = `rotate(${t.rotate}deg)`), i;
|
|
930
937
|
});
|
|
@@ -960,7 +967,7 @@ const Ho = Object.assign(He, {
|
|
|
960
967
|
const e = (n = o?.iconPrefix) != null ? n : "";
|
|
961
968
|
t.component(e + He.name, He);
|
|
962
969
|
}
|
|
963
|
-
}),
|
|
970
|
+
}), $o = /* @__PURE__ */ q({
|
|
964
971
|
__name: "ToolTip",
|
|
965
972
|
props: {
|
|
966
973
|
isVisible: { type: Boolean },
|
|
@@ -968,45 +975,45 @@ const Ho = Object.assign(He, {
|
|
|
968
975
|
},
|
|
969
976
|
setup(t, { expose: o }) {
|
|
970
977
|
o();
|
|
971
|
-
const n = t, e = (l) => l.length > 0 && typeof l[0] != "string", a =
|
|
972
|
-
return
|
|
978
|
+
const n = t, e = (l) => l.length > 0 && typeof l[0] != "string", a = z(() => e(n.outputText) ? [] : n.outputText), r = z(() => e(n.outputText) ? n.outputText : []), i = { props: n, isTreeArray: e, stringOutput: a, treeOutput: r, get IconQuestionCircle() {
|
|
979
|
+
return Ro;
|
|
973
980
|
} };
|
|
974
981
|
return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
|
|
975
982
|
}
|
|
976
|
-
}),
|
|
983
|
+
}), Oo = { class: "list-unstyled" }, Mo = { class: "list-style-square" };
|
|
977
984
|
function jo(t, o, n, e, a, r) {
|
|
978
|
-
const i =
|
|
979
|
-
return e.props.isVisible ? (u(),
|
|
985
|
+
const i = x("a-tooltip");
|
|
986
|
+
return e.props.isVisible ? (u(), H(i, {
|
|
980
987
|
key: 0,
|
|
981
988
|
"background-color": "#7A00E6"
|
|
982
989
|
}, {
|
|
983
|
-
content:
|
|
984
|
-
e.stringOutput.length ? (u(!0), v(
|
|
990
|
+
content: C(() => [
|
|
991
|
+
e.stringOutput.length ? (u(!0), v(j, { key: 0 }, W(e.stringOutput, (l) => (u(), v("p", { key: l }, G(l), 1))), 128)) : (u(!0), v(j, { key: 1 }, W(e.treeOutput, (l) => (u(), v("ul", {
|
|
985
992
|
key: l.title,
|
|
986
993
|
class: "list-unstyled"
|
|
987
994
|
}, [
|
|
988
995
|
w("li", null, [
|
|
989
|
-
w("b", null,
|
|
990
|
-
w("ul",
|
|
991
|
-
(u(!0), v(
|
|
996
|
+
w("b", null, G(l.title), 1),
|
|
997
|
+
w("ul", Oo, [
|
|
998
|
+
(u(!0), v(j, null, W(l.items, (c) => (u(), v("li", {
|
|
992
999
|
key: c.title
|
|
993
1000
|
}, [
|
|
994
|
-
w("u", null,
|
|
1001
|
+
w("u", null, G(c.title), 1),
|
|
995
1002
|
w("ul", Mo, [
|
|
996
|
-
(u(!0), v(
|
|
1003
|
+
(u(!0), v(j, null, W(c.items, (s) => (u(), v("li", null, G(s), 1))), 256))
|
|
997
1004
|
])
|
|
998
1005
|
]))), 128))
|
|
999
1006
|
])
|
|
1000
1007
|
])
|
|
1001
1008
|
]))), 128))
|
|
1002
1009
|
]),
|
|
1003
|
-
default:
|
|
1004
|
-
|
|
1010
|
+
default: C(() => [
|
|
1011
|
+
F(e.IconQuestionCircle, { class: "icon" })
|
|
1005
1012
|
]),
|
|
1006
1013
|
_: 1
|
|
1007
|
-
})) :
|
|
1014
|
+
})) : se("", !0);
|
|
1008
1015
|
}
|
|
1009
|
-
const ut = /* @__PURE__ */
|
|
1016
|
+
const ut = /* @__PURE__ */ Z($o, [["render", jo], ["__scopeId", "data-v-1d3893b1"], ["__file", "ToolTip.vue"]]), zo = /* @__PURE__ */ q({
|
|
1010
1017
|
__name: "index",
|
|
1011
1018
|
props: /* @__PURE__ */ ce({
|
|
1012
1019
|
config: {},
|
|
@@ -1023,7 +1030,7 @@ const ut = /* @__PURE__ */ Q(Oo, [["render", jo], ["__scopeId", "data-v-1d3893b1
|
|
|
1023
1030
|
}),
|
|
1024
1031
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error"], ["update:modelValue"]),
|
|
1025
1032
|
setup(t, { expose: o, emit: n }) {
|
|
1026
|
-
const e = t, a = n, r = Se(t, "modelValue"), i = Ae("widgetRef"), l =
|
|
1033
|
+
const e = t, a = n, r = Se(t, "modelValue"), i = Ae("widgetRef"), l = z(() => {
|
|
1027
1034
|
switch (e.config?.widget?.widget) {
|
|
1028
1035
|
case "TextBox":
|
|
1029
1036
|
return Ye;
|
|
@@ -1069,8 +1076,8 @@ const ut = /* @__PURE__ */ Q(Oo, [["render", jo], ["__scopeId", "data-v-1d3893b1
|
|
|
1069
1076
|
return e?.config?.widget?.title;
|
|
1070
1077
|
}
|
|
1071
1078
|
});
|
|
1072
|
-
const
|
|
1073
|
-
return Object.defineProperty(
|
|
1079
|
+
const y = { props: e, emits: a, model: r, widgetRef: i, curComp: l, errMsg: c, errHandler: s, changeHandler: d, isFileUpload: _, formatTitle: h, ToolTip: ut };
|
|
1080
|
+
return Object.defineProperty(y, "__isScriptSetup", { enumerable: !1, value: !0 }), y;
|
|
1074
1081
|
}
|
|
1075
1082
|
}), Eo = { class: "title" }, Ko = {
|
|
1076
1083
|
key: 0,
|
|
@@ -1082,15 +1089,15 @@ const ut = /* @__PURE__ */ Q(Oo, [["render", jo], ["__scopeId", "data-v-1d3893b1
|
|
|
1082
1089
|
function Go(t, o, n, e, a, r) {
|
|
1083
1090
|
return u(), v("div", null, [
|
|
1084
1091
|
w("div", Eo, [
|
|
1085
|
-
|
|
1086
|
-
e.props.required || e.props.config.validations.some((i) => i.ruleName === "Required") ? (u(), v("span", Ko, " * ")) :
|
|
1087
|
-
|
|
1092
|
+
ae(G(e.formatTitle(e.props?.config?.widget?.title)) + " ", 1),
|
|
1093
|
+
e.props.required || e.props.config.validations.some((i) => i.ruleName === "Required") ? (u(), v("span", Ko, " * ")) : se("", !0),
|
|
1094
|
+
F(e.ToolTip, {
|
|
1088
1095
|
"is-visible": e.props.config.widget?.isVisible ?? !1,
|
|
1089
1096
|
"output-text": e.props.config.widget?.outputText ?? []
|
|
1090
1097
|
}, null, 8, ["is-visible", "output-text"])
|
|
1091
1098
|
]),
|
|
1092
1099
|
w("div", null, [
|
|
1093
|
-
(u(),
|
|
1100
|
+
(u(), H(Me(e.curComp), {
|
|
1094
1101
|
ref: "widgetRef",
|
|
1095
1102
|
modelValue: e.model,
|
|
1096
1103
|
"onUpdate:modelValue": o[0] || (o[0] = (i) => e.model = i),
|
|
@@ -1102,11 +1109,11 @@ function Go(t, o, n, e, a, r) {
|
|
|
1102
1109
|
onError: e.errHandler,
|
|
1103
1110
|
onChange: e.changeHandler
|
|
1104
1111
|
}, null, 40, ["modelValue", "field-key", "config", "validations", "triggers", "class-name"])),
|
|
1105
|
-
e.errMsg.length > 0 ? (u(), v("div", Wo,
|
|
1112
|
+
e.errMsg.length > 0 ? (u(), v("div", Wo, G(e.errMsg), 1)) : se("", !0)
|
|
1106
1113
|
])
|
|
1107
1114
|
]);
|
|
1108
1115
|
}
|
|
1109
|
-
const Ie = /* @__PURE__ */
|
|
1116
|
+
const Ie = /* @__PURE__ */ Z(zo, [["render", Go], ["__scopeId", "data-v-67595df1"], ["__file", "index.vue"]]), qo = /* @__PURE__ */ q({
|
|
1110
1117
|
__name: "SubmitButton",
|
|
1111
1118
|
props: {
|
|
1112
1119
|
url: {},
|
|
@@ -1125,19 +1132,19 @@ const Ie = /* @__PURE__ */ Q(zo, [["render", Go], ["__scopeId", "data-v-67595df1
|
|
|
1125
1132
|
}
|
|
1126
1133
|
});
|
|
1127
1134
|
function Yo(t, o, n, e, a, r) {
|
|
1128
|
-
const i =
|
|
1129
|
-
return u(),
|
|
1135
|
+
const i = x("AButton");
|
|
1136
|
+
return u(), H(i, {
|
|
1130
1137
|
loading: n.loading,
|
|
1131
1138
|
type: "primary",
|
|
1132
1139
|
onClick: e.clickHandler
|
|
1133
1140
|
}, {
|
|
1134
|
-
default:
|
|
1141
|
+
default: C(() => [
|
|
1135
1142
|
ue(t.$slots, "default")
|
|
1136
1143
|
]),
|
|
1137
1144
|
_: 3
|
|
1138
1145
|
}, 8, ["loading"]);
|
|
1139
1146
|
}
|
|
1140
|
-
const Ze = /* @__PURE__ */
|
|
1147
|
+
const Ze = /* @__PURE__ */ Z(qo, [["render", Yo], ["__file", "SubmitButton.vue"]]), Qo = /* @__PURE__ */ q({
|
|
1141
1148
|
__name: "DetailLink",
|
|
1142
1149
|
props: {
|
|
1143
1150
|
url: {},
|
|
@@ -1156,15 +1163,15 @@ const Ze = /* @__PURE__ */ Q(qo, [["render", Yo], ["__file", "SubmitButton.vue"]
|
|
|
1156
1163
|
}
|
|
1157
1164
|
});
|
|
1158
1165
|
function Jo(t, o, n, e, a, r) {
|
|
1159
|
-
const i =
|
|
1160
|
-
return u(),
|
|
1161
|
-
default:
|
|
1166
|
+
const i = x("ALink");
|
|
1167
|
+
return u(), H(i, { onClick: e.clickHandler }, {
|
|
1168
|
+
default: C(() => [
|
|
1162
1169
|
ue(t.$slots, "default")
|
|
1163
1170
|
]),
|
|
1164
1171
|
_: 3
|
|
1165
1172
|
});
|
|
1166
1173
|
}
|
|
1167
|
-
const Zo = /* @__PURE__ */
|
|
1174
|
+
const Zo = /* @__PURE__ */ Z(Qo, [["render", Jo], ["__file", "DetailLink.vue"]]), Xo = /* @__PURE__ */ q({
|
|
1168
1175
|
__name: "index",
|
|
1169
1176
|
props: {
|
|
1170
1177
|
config: {},
|
|
@@ -1177,7 +1184,7 @@ const Zo = /* @__PURE__ */ Q(Qo, [["render", Jo], ["__file", "DetailLink.vue"]])
|
|
|
1177
1184
|
function r(d, _) {
|
|
1178
1185
|
a("click", e.config.widget, d, _, e.config.title);
|
|
1179
1186
|
}
|
|
1180
|
-
const i =
|
|
1187
|
+
const i = z(() => {
|
|
1181
1188
|
switch (e.config.location) {
|
|
1182
1189
|
case "InOperation":
|
|
1183
1190
|
return Ze;
|
|
@@ -1186,24 +1193,24 @@ const Zo = /* @__PURE__ */ Q(Qo, [["render", Jo], ["__file", "DetailLink.vue"]])
|
|
|
1186
1193
|
default:
|
|
1187
1194
|
return Ze;
|
|
1188
1195
|
}
|
|
1189
|
-
}), l =
|
|
1196
|
+
}), l = z(() => e.config.widget === X.Submit ? e.config.requestUrl ?? "" : e.config.widget === X.Link ? e.config.redirectUrl ?? "" : ""), c = z(() => e.config.redirectType ?? "Details"), s = { props: e, emits: a, clickHandler: r, curComp: i, curUrl: l, redirectType: c };
|
|
1190
1197
|
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
1191
1198
|
}
|
|
1192
1199
|
});
|
|
1193
1200
|
function en(t, o, n, e, a, r) {
|
|
1194
|
-
return u(),
|
|
1201
|
+
return u(), H(Me(e.curComp), {
|
|
1195
1202
|
url: e.curUrl,
|
|
1196
1203
|
"redirect-type": e.redirectType,
|
|
1197
1204
|
loading: n.loading,
|
|
1198
1205
|
onClick: e.clickHandler
|
|
1199
1206
|
}, {
|
|
1200
|
-
default:
|
|
1201
|
-
|
|
1207
|
+
default: C(() => [
|
|
1208
|
+
ae(G(e.props.config.title), 1)
|
|
1202
1209
|
]),
|
|
1203
1210
|
_: 1
|
|
1204
1211
|
}, 8, ["url", "redirect-type", "loading"]);
|
|
1205
1212
|
}
|
|
1206
|
-
const Pe = /* @__PURE__ */
|
|
1213
|
+
const Pe = /* @__PURE__ */ Z(Xo, [["render", en], ["__file", "index.vue"]]), ft = Symbol("library-triggers");
|
|
1207
1214
|
function Ee() {
|
|
1208
1215
|
const t = be(ft, null);
|
|
1209
1216
|
return t || {};
|
|
@@ -1215,7 +1222,7 @@ function Fe() {
|
|
|
1215
1222
|
function Ne() {
|
|
1216
1223
|
return be(mt, null);
|
|
1217
1224
|
}
|
|
1218
|
-
const on = /* @__PURE__ */
|
|
1225
|
+
const on = /* @__PURE__ */ q({
|
|
1219
1226
|
__name: "TopBar",
|
|
1220
1227
|
props: {
|
|
1221
1228
|
title: {},
|
|
@@ -1229,25 +1236,25 @@ const on = /* @__PURE__ */ W({
|
|
|
1229
1236
|
}
|
|
1230
1237
|
}), nn = { class: "top-bar" }, rn = { class: "banner-info" }, an = { class: "page-title" }, sn = { class: "page-subtitle" }, ln = { class: "avatar-wrapper" }, cn = { class: "user-email" };
|
|
1231
1238
|
function dn(t, o, n, e, a, r) {
|
|
1232
|
-
const i =
|
|
1239
|
+
const i = x("a-avatar"), l = x("a-popover");
|
|
1233
1240
|
return u(), v("div", nn, [
|
|
1234
1241
|
w("div", rn, [
|
|
1235
|
-
w("div", an,
|
|
1236
|
-
w("div", sn,
|
|
1242
|
+
w("div", an, G(n.title), 1),
|
|
1243
|
+
w("div", sn, G(n.subTitle), 1)
|
|
1237
1244
|
]),
|
|
1238
1245
|
w("div", ln, [
|
|
1239
|
-
|
|
1240
|
-
content:
|
|
1241
|
-
w("div", cn,
|
|
1246
|
+
F(l, { trigger: "click" }, {
|
|
1247
|
+
content: C(() => [
|
|
1248
|
+
w("div", cn, G(n.email), 1)
|
|
1242
1249
|
]),
|
|
1243
|
-
default:
|
|
1244
|
-
|
|
1250
|
+
default: C(() => [
|
|
1251
|
+
F(i, {
|
|
1245
1252
|
size: 48,
|
|
1246
1253
|
autoFixFontSize: "",
|
|
1247
1254
|
style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
|
|
1248
1255
|
}, {
|
|
1249
|
-
default:
|
|
1250
|
-
|
|
1256
|
+
default: C(() => [
|
|
1257
|
+
ae(G(n.email.charAt(0).toUpperCase()), 1)
|
|
1251
1258
|
]),
|
|
1252
1259
|
_: 1
|
|
1253
1260
|
})
|
|
@@ -1257,7 +1264,7 @@ function dn(t, o, n, e, a, r) {
|
|
|
1257
1264
|
])
|
|
1258
1265
|
]);
|
|
1259
1266
|
}
|
|
1260
|
-
const
|
|
1267
|
+
const Ue = /* @__PURE__ */ Z(on, [["render", dn], ["__scopeId", "data-v-c0457235"], ["__file", "TopBar.vue"]]);
|
|
1261
1268
|
function Ke(t) {
|
|
1262
1269
|
const o = je(), n = [];
|
|
1263
1270
|
if (o.fieldsGroup) {
|
|
@@ -1269,7 +1276,7 @@ function Ke(t) {
|
|
|
1269
1276
|
return a.length && n.push({ name: "Grading Review History (For example: re-submit the grading request)", fields: a }), n;
|
|
1270
1277
|
}
|
|
1271
1278
|
}
|
|
1272
|
-
class
|
|
1279
|
+
class Re {
|
|
1273
1280
|
pageActionType;
|
|
1274
1281
|
className = "";
|
|
1275
1282
|
store = { svrStore: {}, bpmStore: {} };
|
|
@@ -1341,7 +1348,7 @@ class Ve {
|
|
|
1341
1348
|
return oo(o);
|
|
1342
1349
|
}
|
|
1343
1350
|
}
|
|
1344
|
-
const un = /* @__PURE__ */
|
|
1351
|
+
const un = /* @__PURE__ */ q({
|
|
1345
1352
|
__name: "CreateView",
|
|
1346
1353
|
props: {
|
|
1347
1354
|
className: {},
|
|
@@ -1365,135 +1372,135 @@ const un = /* @__PURE__ */ W({
|
|
|
1365
1372
|
workflowId: ""
|
|
1366
1373
|
}
|
|
1367
1374
|
}), d = g([]), _ = g({});
|
|
1368
|
-
function h(
|
|
1369
|
-
return
|
|
1370
|
-
fieldKey:
|
|
1371
|
-
...
|
|
1372
|
-
})).filter((
|
|
1375
|
+
function h(T) {
|
|
1376
|
+
return T ? Object.entries(T).map(([S, V]) => ({
|
|
1377
|
+
fieldKey: S,
|
|
1378
|
+
...V
|
|
1379
|
+
})).filter((S) => S.widget && S.widget.widget !== "Hidden").filter((S) => !te.value.includes(S.fieldKey)) : [];
|
|
1373
1380
|
}
|
|
1374
|
-
function
|
|
1375
|
-
return
|
|
1376
|
-
(
|
|
1381
|
+
function y(T) {
|
|
1382
|
+
return T ? Object.entries(T).filter(([S, V]) => V.dependent).reduce(
|
|
1383
|
+
(S, [V, $]) => (S[V] = $.dependent, S),
|
|
1377
1384
|
{}
|
|
1378
1385
|
) : [];
|
|
1379
1386
|
}
|
|
1380
|
-
const f =
|
|
1387
|
+
const f = z(() => s.value?.actions ? [...s.value.actions].reverse() : []), m = g({}), k = g(!1);
|
|
1381
1388
|
ge(async () => {
|
|
1382
|
-
|
|
1383
|
-
const
|
|
1384
|
-
s.value = await
|
|
1385
|
-
const
|
|
1386
|
-
r.Test?.({ fieldValue:
|
|
1387
|
-
for (const
|
|
1388
|
-
if (s.value.fields[
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1389
|
+
k.value = !0;
|
|
1390
|
+
const T = new Re().setWorkflowId(c.workflowId).setClassName(c.className).setStore({ svrStore: e, bpmStore: n }).build();
|
|
1391
|
+
s.value = await T.getPageData();
|
|
1392
|
+
const P = s.value.fields.requestType.modelValue;
|
|
1393
|
+
r.Test?.({ fieldValue: P, hiddenFields: te, formData: m }), d.value = h(s.value.fields), _.value = y(s.value.fields);
|
|
1394
|
+
for (const S in s.value.fields) {
|
|
1395
|
+
if (s.value.fields[S].widget?.widget === "File") {
|
|
1396
|
+
const V = d.value.find(($) => $.fieldKey === S);
|
|
1397
|
+
V && V.widget && (V.widget.files = []);
|
|
1391
1398
|
}
|
|
1392
|
-
m.value[
|
|
1399
|
+
m.value[S] = s.value.fields[S].modelValue;
|
|
1393
1400
|
}
|
|
1394
|
-
|
|
1401
|
+
k.value = !1;
|
|
1395
1402
|
});
|
|
1396
|
-
function
|
|
1403
|
+
function ee() {
|
|
1397
1404
|
return e()?.userInfo?.email_address ?? "";
|
|
1398
1405
|
}
|
|
1399
|
-
async function
|
|
1400
|
-
switch (
|
|
1401
|
-
case
|
|
1402
|
-
let
|
|
1403
|
-
if (i.value?.forEach((
|
|
1404
|
-
|
|
1405
|
-
}), !
|
|
1406
|
+
async function re(T, P, S, V, $) {
|
|
1407
|
+
switch (P) {
|
|
1408
|
+
case X.Submit:
|
|
1409
|
+
let B = !0;
|
|
1410
|
+
if (i.value?.forEach((p) => {
|
|
1411
|
+
p?.validate && (p.validate() || (B = !1));
|
|
1412
|
+
}), !B) {
|
|
1406
1413
|
l?.appContext.config.globalProperties.$message.error(
|
|
1407
1414
|
"form validation failed, please check the input fields"
|
|
1408
1415
|
);
|
|
1409
1416
|
return;
|
|
1410
1417
|
}
|
|
1411
|
-
|
|
1418
|
+
k.value = !0;
|
|
1412
1419
|
try {
|
|
1413
|
-
r[
|
|
1414
|
-
const
|
|
1420
|
+
r[$]?.({ message: `${$} action triggered` });
|
|
1421
|
+
const p = {
|
|
1415
1422
|
...m.value,
|
|
1416
1423
|
..._.value
|
|
1417
1424
|
};
|
|
1418
|
-
r.createPageBeforeSubmit?.(
|
|
1419
|
-
const
|
|
1425
|
+
r.createPageBeforeSubmit?.(p);
|
|
1426
|
+
const D = await Ht(
|
|
1420
1427
|
c.className,
|
|
1421
|
-
|
|
1422
|
-
|
|
1428
|
+
p,
|
|
1429
|
+
S
|
|
1423
1430
|
);
|
|
1424
|
-
r[`${
|
|
1431
|
+
r[`${$}Success` || ""]?.({
|
|
1425
1432
|
message: "Workflow created successfully",
|
|
1426
1433
|
workflowId: c.workflowId,
|
|
1427
|
-
res:
|
|
1434
|
+
res: D
|
|
1428
1435
|
});
|
|
1429
|
-
const
|
|
1430
|
-
await Promise.all(
|
|
1431
|
-
`Your grading request has been submitted, ID is ${
|
|
1432
|
-
), a.push({ name: "Details", params: { workflowId:
|
|
1436
|
+
const O = i.value?.map((oe) => oe?.submit ? oe.submit(D.toString()) : Promise.resolve()) || [];
|
|
1437
|
+
await Promise.all(O), k.value = !1, l?.appContext.config.globalProperties.$notification.success(
|
|
1438
|
+
`Your grading request has been submitted, ID is ${D.toString()}.`
|
|
1439
|
+
), a.push({ name: "Details", params: { workflowId: D.toString() } });
|
|
1433
1440
|
} catch {
|
|
1434
1441
|
l?.appContext.config.globalProperties.$notification.error(
|
|
1435
1442
|
"Failed to submit your grading request"
|
|
1436
|
-
),
|
|
1443
|
+
), k.value = !1;
|
|
1437
1444
|
}
|
|
1438
1445
|
break;
|
|
1439
|
-
case
|
|
1446
|
+
case X.Link:
|
|
1440
1447
|
try {
|
|
1441
|
-
await r[
|
|
1442
|
-
name:
|
|
1448
|
+
await r[T.eventName || ""]?.(m.value, te), a.push({
|
|
1449
|
+
name: V,
|
|
1443
1450
|
params: { className: c.className }
|
|
1444
|
-
}), await r[`${
|
|
1445
|
-
message: `Router to ${
|
|
1451
|
+
}), await r[`${T.eventName || ""}Success`]?.({
|
|
1452
|
+
message: `Router to ${V} pushed`
|
|
1446
1453
|
});
|
|
1447
|
-
} catch (
|
|
1448
|
-
console.error("Error in link action trigger:",
|
|
1454
|
+
} catch (p) {
|
|
1455
|
+
console.error("Error in link action trigger:", p);
|
|
1449
1456
|
}
|
|
1450
1457
|
break;
|
|
1451
1458
|
default:
|
|
1452
|
-
console.warn("Unknown action type:",
|
|
1459
|
+
console.warn("Unknown action type:", P);
|
|
1453
1460
|
}
|
|
1454
1461
|
}
|
|
1455
|
-
const
|
|
1462
|
+
const K = [
|
|
1456
1463
|
"jobScpope",
|
|
1457
1464
|
"currentWorkdayId",
|
|
1458
1465
|
"originalGrade",
|
|
1459
1466
|
"jobTitlePrevious",
|
|
1460
1467
|
"jobAttachmentPrevious",
|
|
1461
1468
|
"positionId"
|
|
1462
|
-
],
|
|
1463
|
-
function
|
|
1464
|
-
r[
|
|
1469
|
+
], te = g(K);
|
|
1470
|
+
function ie(T, P) {
|
|
1471
|
+
r[T]?.({ fieldValue: P, hiddenFields: te, formData: m }), s.value && (d.value = h(s.value.fields));
|
|
1465
1472
|
}
|
|
1466
|
-
const
|
|
1467
|
-
return Object.defineProperty(
|
|
1473
|
+
const le = z(() => Ke(d.value)), I = { bpmStore: n, svrStore: e, router: a, triggers: r, dataWidgetsRefs: i, instance: l, props: c, pageData: s, _fields: d, _dependent: _, genField: h, genDependentField: y, reversedActions: f, _data: m, loading: k, getApproverEmail: ee, clickHandler: re, newHiddenFields: K, hiddenFields: te, changeHandler: ie, groupedFields: le, DataWidgets: Ie, ActionButton: Pe, TopBar: Ue };
|
|
1474
|
+
return Object.defineProperty(I, "__isScriptSetup", { enumerable: !1, value: !0 }), I;
|
|
1468
1475
|
}
|
|
1469
1476
|
}), fn = { class: "page-container" }, pn = { class: "page-body" }, mn = { class: "form-card" }, gn = { class: "form-fields-vertical" }, _n = { class: "form-fields" }, vn = {
|
|
1470
1477
|
key: 0,
|
|
1471
1478
|
class: "form-content"
|
|
1472
1479
|
}, hn = { class: "page-footer" }, bn = { class: "action-container" }, yn = { class: "action-buttons" };
|
|
1473
1480
|
function wn(t, o, n, e, a, r) {
|
|
1474
|
-
const i =
|
|
1481
|
+
const i = x("a-card"), l = x("a-spin");
|
|
1475
1482
|
return u(), v("div", fn, [
|
|
1476
|
-
|
|
1483
|
+
F(e.TopBar, {
|
|
1477
1484
|
title: e.pageData.banner.title,
|
|
1478
1485
|
subTitle: e.pageData.banner.subTitle,
|
|
1479
1486
|
email: e.getApproverEmail()
|
|
1480
1487
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1481
1488
|
w("div", pn, [
|
|
1482
|
-
|
|
1489
|
+
F(l, {
|
|
1483
1490
|
loading: e.loading,
|
|
1484
1491
|
class: "form-container"
|
|
1485
1492
|
}, {
|
|
1486
|
-
default:
|
|
1493
|
+
default: C(() => [
|
|
1487
1494
|
w("div", mn, [
|
|
1488
1495
|
w("div", gn, [
|
|
1489
|
-
(u(!0), v(
|
|
1496
|
+
(u(!0), v(j, null, W(e.groupedFields, (c) => (u(), H(i, {
|
|
1490
1497
|
key: c.name,
|
|
1491
1498
|
title: c.name,
|
|
1492
1499
|
style: { "margin-bottom": "24px" }
|
|
1493
1500
|
}, {
|
|
1494
|
-
default:
|
|
1501
|
+
default: C(() => [
|
|
1495
1502
|
w("div", _n, [
|
|
1496
|
-
(u(!0), v(
|
|
1503
|
+
(u(!0), v(j, null, W(c.fields, (s) => (u(), H(e.DataWidgets, {
|
|
1497
1504
|
key: s.fieldKey,
|
|
1498
1505
|
ref_for: !0,
|
|
1499
1506
|
ref: "dataWidgets",
|
|
@@ -1512,7 +1519,7 @@ function wn(t, o, n, e, a, r) {
|
|
|
1512
1519
|
]),
|
|
1513
1520
|
t.$slots.content ? (u(), v("div", vn, [
|
|
1514
1521
|
ue(t.$slots, "content", {}, void 0, !0)
|
|
1515
|
-
])) :
|
|
1522
|
+
])) : se("", !0)
|
|
1516
1523
|
])
|
|
1517
1524
|
]),
|
|
1518
1525
|
_: 3
|
|
@@ -1522,7 +1529,7 @@ function wn(t, o, n, e, a, r) {
|
|
|
1522
1529
|
w("div", bn, [
|
|
1523
1530
|
ue(t.$slots, "action", {}, void 0, !0),
|
|
1524
1531
|
w("div", yn, [
|
|
1525
|
-
(u(!0), v(
|
|
1532
|
+
(u(!0), v(j, null, W(e.reversedActions, (c) => (u(), H(e.ActionButton, {
|
|
1526
1533
|
key: c.title,
|
|
1527
1534
|
loading: e.loading,
|
|
1528
1535
|
config: c,
|
|
@@ -1534,7 +1541,7 @@ function wn(t, o, n, e, a, r) {
|
|
|
1534
1541
|
])
|
|
1535
1542
|
]);
|
|
1536
1543
|
}
|
|
1537
|
-
const kn = /* @__PURE__ */
|
|
1544
|
+
const kn = /* @__PURE__ */ Z(un, [["render", wn], ["__scopeId", "data-v-31413447"], ["__file", "CreateView.vue"]]), Sn = /* @__PURE__ */ q({
|
|
1538
1545
|
__name: "UpdateView",
|
|
1539
1546
|
props: {
|
|
1540
1547
|
className: {},
|
|
@@ -1558,104 +1565,104 @@ const kn = /* @__PURE__ */ Q(un, [["render", wn], ["__scopeId", "data-v-31413447
|
|
|
1558
1565
|
workflowId: ""
|
|
1559
1566
|
}
|
|
1560
1567
|
}), d = g([]), _ = g({});
|
|
1561
|
-
function h(
|
|
1562
|
-
return
|
|
1563
|
-
fieldKey:
|
|
1564
|
-
...
|
|
1565
|
-
})).filter((
|
|
1568
|
+
function h(I) {
|
|
1569
|
+
return I ? Object.entries(I).map(([P, S]) => ({
|
|
1570
|
+
fieldKey: P,
|
|
1571
|
+
...S
|
|
1572
|
+
})).filter((P) => P.widget && P.widget.widget !== "Hidden").filter((P) => !K.value.includes(P.fieldKey)) : [];
|
|
1566
1573
|
}
|
|
1567
|
-
function
|
|
1568
|
-
return
|
|
1574
|
+
function y(I) {
|
|
1575
|
+
return I ? Object.entries(I).filter(([P, S]) => S.dependent).reduce((P, [S, V]) => (P[S] = V.dependent, P), {}) : [];
|
|
1569
1576
|
}
|
|
1570
|
-
const f =
|
|
1577
|
+
const f = z(() => s.value?.actions ? [...s.value.actions].reverse() : []), m = g({}), k = g(!1);
|
|
1571
1578
|
ge(async () => {
|
|
1572
|
-
|
|
1573
|
-
const
|
|
1574
|
-
s.value = await
|
|
1575
|
-
const
|
|
1576
|
-
s.value.actions = s.value.actions?.filter((
|
|
1577
|
-
const
|
|
1578
|
-
return
|
|
1579
|
+
k.value = !0;
|
|
1580
|
+
const I = new Re().setPageActionType(he.Update).setClassName(c.className).setStore({ svrStore: a, bpmStore: r }).setWorkflowId(c.workflowId).build();
|
|
1581
|
+
s.value = await I.getPageData();
|
|
1582
|
+
const T = await I.getBtnList(), P = await I.getFiles();
|
|
1583
|
+
s.value.actions = s.value.actions?.filter((V) => {
|
|
1584
|
+
const $ = T.find((B) => B.button === V.title);
|
|
1585
|
+
return $ ? $.isShow : !0;
|
|
1579
1586
|
});
|
|
1580
|
-
const
|
|
1581
|
-
e.Test?.({ fieldValue:
|
|
1582
|
-
for (const
|
|
1583
|
-
if (s.value.fields[
|
|
1584
|
-
const
|
|
1585
|
-
|
|
1587
|
+
const S = s.value.fields.requestType.modelValue;
|
|
1588
|
+
e.Test?.({ fieldValue: S, hiddenFields: K, formData: m }), d.value = h(s.value.fields), _.value = y(s.value.fields);
|
|
1589
|
+
for (const V in s.value.fields) {
|
|
1590
|
+
if (s.value.fields[V].widget?.widget === "File") {
|
|
1591
|
+
const $ = d.value.find((B) => B.fieldKey === V);
|
|
1592
|
+
$ && $.widget && ($.widget.files = P[V] ?? [], $.widget.removeFile = (B) => I.removeFile(B));
|
|
1586
1593
|
}
|
|
1587
|
-
m.value[
|
|
1594
|
+
m.value[V] = s.value.fields[V].modelValue;
|
|
1588
1595
|
}
|
|
1589
|
-
|
|
1596
|
+
k.value = !1;
|
|
1590
1597
|
});
|
|
1591
|
-
function
|
|
1598
|
+
function ee() {
|
|
1592
1599
|
return a()?.userInfo?.email_address ?? "";
|
|
1593
1600
|
}
|
|
1594
|
-
async function
|
|
1595
|
-
switch (
|
|
1596
|
-
case
|
|
1597
|
-
let
|
|
1598
|
-
if (i.value?.forEach((
|
|
1599
|
-
|
|
1600
|
-
}),
|
|
1601
|
+
async function re(I, T, P, S, V) {
|
|
1602
|
+
switch (T) {
|
|
1603
|
+
case X.Submit:
|
|
1604
|
+
let $ = !0;
|
|
1605
|
+
if (i.value?.forEach((B) => {
|
|
1606
|
+
B?.validate && (B.validate() || ($ = !1));
|
|
1607
|
+
}), !$) {
|
|
1601
1608
|
l?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
1602
1609
|
return;
|
|
1603
1610
|
}
|
|
1604
|
-
|
|
1611
|
+
k.value = !0;
|
|
1605
1612
|
try {
|
|
1606
|
-
const
|
|
1607
|
-
e.updatePageBeforeSubmit?.(
|
|
1608
|
-
const
|
|
1609
|
-
await Promise.all(
|
|
1613
|
+
const B = { ...m.value, ..._.value };
|
|
1614
|
+
e.updatePageBeforeSubmit?.(B, r().employeeInfo);
|
|
1615
|
+
const p = await $t(c.className, c.workflowId, B, P), D = i.value?.map((O) => O?.submit ? O.submit(p.toString()) : Promise.resolve()) || [];
|
|
1616
|
+
await Promise.all(D), k.value = !1, l?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${p.toString()}.`);
|
|
1610
1617
|
} catch {
|
|
1611
|
-
l?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"),
|
|
1618
|
+
l?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"), k.value = !1;
|
|
1612
1619
|
}
|
|
1613
1620
|
break;
|
|
1614
|
-
case
|
|
1621
|
+
case X.Link:
|
|
1615
1622
|
try {
|
|
1616
|
-
await e[
|
|
1623
|
+
await e[I.eventName || ""]?.(m.value, K), n.push({ name: S, params: { className: c.className } });
|
|
1617
1624
|
} catch {
|
|
1618
1625
|
}
|
|
1619
1626
|
break;
|
|
1620
1627
|
default:
|
|
1621
|
-
console.warn("Unknown action type:",
|
|
1628
|
+
console.warn("Unknown action type:", T);
|
|
1622
1629
|
}
|
|
1623
1630
|
}
|
|
1624
|
-
const
|
|
1625
|
-
function
|
|
1626
|
-
e[
|
|
1631
|
+
const K = g([]);
|
|
1632
|
+
function te(I, T) {
|
|
1633
|
+
e[I]?.({ fieldValue: T, hiddenFields: K, formData: m }), s.value && (d.value = h(s.value.fields));
|
|
1627
1634
|
}
|
|
1628
|
-
const
|
|
1629
|
-
return Object.defineProperty(
|
|
1635
|
+
const ie = z(() => Ke(d.value)), le = { router: n, triggers: e, svrStore: a, bpmStore: r, dataWidgetsRefs: i, instance: l, props: c, pageData: s, _fields: d, _dependent: _, genField: h, genDependentField: y, reversedActions: f, _data: m, loading: k, getApproverEmail: ee, clickHandler: re, hiddenFields: K, changeHandler: te, groupedFields: ie, DataWidgets: Ie, ActionButton: Pe, TopBar: Ue };
|
|
1636
|
+
return Object.defineProperty(le, "__isScriptSetup", { enumerable: !1, value: !0 }), le;
|
|
1630
1637
|
}
|
|
1631
1638
|
}), Cn = { class: "page-container" }, xn = { class: "page-body" }, Tn = { class: "form-card" }, Vn = { class: "form-fields-vertical" }, An = { class: "form-fields" }, In = {
|
|
1632
1639
|
key: 0,
|
|
1633
1640
|
class: "form-content"
|
|
1634
1641
|
}, Pn = { class: "page-footer" }, Fn = { class: "action-container" }, Nn = { class: "action-buttons" };
|
|
1635
|
-
function
|
|
1636
|
-
const i =
|
|
1642
|
+
function Un(t, o, n, e, a, r) {
|
|
1643
|
+
const i = x("a-card"), l = x("a-spin");
|
|
1637
1644
|
return u(), v("div", Cn, [
|
|
1638
|
-
|
|
1645
|
+
F(e.TopBar, {
|
|
1639
1646
|
title: e.pageData.banner.title,
|
|
1640
1647
|
subTitle: e.pageData.banner.subTitle,
|
|
1641
1648
|
email: e.getApproverEmail()
|
|
1642
1649
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1643
1650
|
w("div", xn, [
|
|
1644
|
-
|
|
1651
|
+
F(l, {
|
|
1645
1652
|
loading: e.loading,
|
|
1646
1653
|
class: "form-container"
|
|
1647
1654
|
}, {
|
|
1648
|
-
default:
|
|
1655
|
+
default: C(() => [
|
|
1649
1656
|
w("div", Tn, [
|
|
1650
1657
|
w("div", Vn, [
|
|
1651
|
-
(u(!0), v(
|
|
1658
|
+
(u(!0), v(j, null, W(e.groupedFields, (c) => (u(), H(i, {
|
|
1652
1659
|
key: c.name,
|
|
1653
1660
|
title: c.name,
|
|
1654
1661
|
style: { "margin-bottom": "24px" }
|
|
1655
1662
|
}, {
|
|
1656
|
-
default:
|
|
1663
|
+
default: C(() => [
|
|
1657
1664
|
w("div", An, [
|
|
1658
|
-
(u(!0), v(
|
|
1665
|
+
(u(!0), v(j, null, W(c.fields, (s) => (u(), H(e.DataWidgets, {
|
|
1659
1666
|
key: s.fieldKey,
|
|
1660
1667
|
ref_for: !0,
|
|
1661
1668
|
ref: "dataWidgets",
|
|
@@ -1674,7 +1681,7 @@ function Rn(t, o, n, e, a, r) {
|
|
|
1674
1681
|
]),
|
|
1675
1682
|
t.$slots.content ? (u(), v("div", In, [
|
|
1676
1683
|
ue(t.$slots, "content", {}, void 0, !0)
|
|
1677
|
-
])) :
|
|
1684
|
+
])) : se("", !0)
|
|
1678
1685
|
])
|
|
1679
1686
|
]),
|
|
1680
1687
|
_: 3
|
|
@@ -1684,7 +1691,7 @@ function Rn(t, o, n, e, a, r) {
|
|
|
1684
1691
|
w("div", Fn, [
|
|
1685
1692
|
ue(t.$slots, "action", {}, void 0, !0),
|
|
1686
1693
|
w("div", Nn, [
|
|
1687
|
-
(u(!0), v(
|
|
1694
|
+
(u(!0), v(j, null, W(e.reversedActions, (c) => (u(), H(e.ActionButton, {
|
|
1688
1695
|
key: c.title,
|
|
1689
1696
|
loading: e.loading,
|
|
1690
1697
|
config: c,
|
|
@@ -1696,11 +1703,11 @@ function Rn(t, o, n, e, a, r) {
|
|
|
1696
1703
|
])
|
|
1697
1704
|
]);
|
|
1698
1705
|
}
|
|
1699
|
-
const
|
|
1706
|
+
const Rn = /* @__PURE__ */ Z(Sn, [["render", Un], ["__scopeId", "data-v-605f261e"], ["__file", "UpdateView.vue"]]), gt = Symbol("library-custom-comp");
|
|
1700
1707
|
function Bn() {
|
|
1701
1708
|
return be(gt, null);
|
|
1702
1709
|
}
|
|
1703
|
-
const Dn = /* @__PURE__ */
|
|
1710
|
+
const Dn = /* @__PURE__ */ q({
|
|
1704
1711
|
__name: "DetailView",
|
|
1705
1712
|
props: {
|
|
1706
1713
|
className: {},
|
|
@@ -1726,33 +1733,33 @@ const Dn = /* @__PURE__ */ W({
|
|
|
1726
1733
|
workflowId: ""
|
|
1727
1734
|
}
|
|
1728
1735
|
}), _ = g([]), h = Ae("dataWidgets");
|
|
1729
|
-
function
|
|
1730
|
-
return N ? Object.entries(N).map(([
|
|
1731
|
-
typeof
|
|
1732
|
-
const
|
|
1733
|
-
fieldKey:
|
|
1734
|
-
...
|
|
1736
|
+
function y(N) {
|
|
1737
|
+
return N ? Object.entries(N).map(([Y, U]) => {
|
|
1738
|
+
typeof U.modelValue == "boolean" ? U.fieldValue = U.modelValue ? "Yes" : "No" : U.fieldValue = U.modelValue;
|
|
1739
|
+
const E = {
|
|
1740
|
+
fieldKey: Y,
|
|
1741
|
+
...U
|
|
1735
1742
|
};
|
|
1736
|
-
return
|
|
1743
|
+
return E.widget?.readonly || E.validations?.some(
|
|
1737
1744
|
(pe) => pe.ruleName === "Required"
|
|
1738
|
-
) ?
|
|
1739
|
-
...
|
|
1745
|
+
) ? E : {
|
|
1746
|
+
...E,
|
|
1740
1747
|
validations: [
|
|
1741
|
-
...
|
|
1748
|
+
...E.validations || [],
|
|
1742
1749
|
{
|
|
1743
1750
|
ruleName: "Required",
|
|
1744
1751
|
ruleParameter: "",
|
|
1745
|
-
errorMessage: `${fe(
|
|
1752
|
+
errorMessage: `${fe(E.widget?.title) || E.fieldKey} is required`
|
|
1746
1753
|
}
|
|
1747
1754
|
]
|
|
1748
1755
|
};
|
|
1749
|
-
}).filter((
|
|
1756
|
+
}).filter((Y) => Y.widget && Y.widget.widget !== "Hidden").filter((Y) => !T.value.includes(Y.fieldKey)) : [];
|
|
1750
1757
|
}
|
|
1751
|
-
const f =
|
|
1752
|
-
const
|
|
1753
|
-
return N.map((
|
|
1754
|
-
const
|
|
1755
|
-
id:
|
|
1758
|
+
const f = z(() => Ke(_.value)), m = z(() => d.value?.actions ? [...d.value.actions].reverse() : []), k = g(!0), ee = (N, M) => {
|
|
1759
|
+
const Y = N.findIndex((U) => U.isCurrent);
|
|
1760
|
+
return N.map((U, E) => {
|
|
1761
|
+
const R = {
|
|
1762
|
+
id: U.id,
|
|
1756
1763
|
title: "",
|
|
1757
1764
|
proxy: "",
|
|
1758
1765
|
sub: "",
|
|
@@ -1760,140 +1767,140 @@ const Dn = /* @__PURE__ */ W({
|
|
|
1760
1767
|
status: 1,
|
|
1761
1768
|
time: ""
|
|
1762
1769
|
};
|
|
1763
|
-
|
|
1764
|
-
const pe =
|
|
1765
|
-
if (pe && we && pe?.email?.toLowerCase() !== we?.approverEmail?.toLowerCase() && (
|
|
1766
|
-
|
|
1770
|
+
R.title = U.workflowProcessApprovers[0]?.name;
|
|
1771
|
+
const pe = U.workflowProcessApprovers[U.workflowProcessApprovers.length - 1], Ce = U.workflowHistorys[U.workflowHistorys.length - 1], we = Ce?.workflowHistoryApprovers[Ce?.workflowHistoryApprovers?.length - 1];
|
|
1772
|
+
if (pe && we && pe?.email?.toLowerCase() !== we?.approverEmail?.toLowerCase() && (R.title = `${we.name}`, R.proxy = `Proxy: ${pe.name}`), U.sort > 1 ? R.sub = "Approver Role: " + U.nodeName.replace("Submit", "").replace("Approve", "") : R.sub = "Submit Application", U.isCurrent && M !== -1)
|
|
1773
|
+
R.desc = "In Approval", R.status = 1;
|
|
1767
1774
|
else {
|
|
1768
|
-
const
|
|
1769
|
-
if (
|
|
1770
|
-
|
|
1771
|
-
else if (
|
|
1772
|
-
|
|
1773
|
-
else if (
|
|
1774
|
-
if (
|
|
1775
|
-
|
|
1775
|
+
const ne = U.workflowHistorys[U.workflowHistorys.length - 1];
|
|
1776
|
+
if (ne && ne.status === 100)
|
|
1777
|
+
R.time = Te(ne.takeActionAt, "yyyy-MM-dd hh:mm:ss"), R.status = 2, R.desc = "approve success!";
|
|
1778
|
+
else if (ne && ne.status === 999)
|
|
1779
|
+
R.time = Te(ne.takeActionAt, "yyyy-MM-dd hh:mm:ss"), R.status = 0, R.desc = "approve reject!";
|
|
1780
|
+
else if (ne)
|
|
1781
|
+
if (R.time = Te(ne.takeActionAt, "yyyy-MM-dd hh:mm:ss"), U.sort === 1)
|
|
1782
|
+
R.status = 2, R.desc = "";
|
|
1776
1783
|
else {
|
|
1777
|
-
const xe =
|
|
1778
|
-
|
|
1784
|
+
const xe = ne.workflowHistoryApprovers[0];
|
|
1785
|
+
R.status = 3, R.desc = xe?.reason ? `Rejected reason: ${xe.reason}` : "Rejected";
|
|
1779
1786
|
}
|
|
1780
|
-
else
|
|
1781
|
-
|
|
1787
|
+
else E < Y || Y === -1 ? (R.status = 0, R.desc = "Skipped") : (R.status = 0, R.desc = "Pending Approval");
|
|
1788
|
+
ne && ne.status;
|
|
1782
1789
|
}
|
|
1783
|
-
return
|
|
1790
|
+
return R;
|
|
1784
1791
|
});
|
|
1785
|
-
},
|
|
1786
|
-
async function
|
|
1792
|
+
}, re = g([]), K = g(!1), te = g(!1), ie = g(!1), le = g(!1);
|
|
1793
|
+
async function I() {
|
|
1787
1794
|
const N = await s.getBtnList();
|
|
1788
|
-
d.value.actions = d.value.actions?.filter((
|
|
1789
|
-
const
|
|
1790
|
-
return
|
|
1791
|
-
}),
|
|
1795
|
+
d.value.actions = d.value.actions?.filter((M) => {
|
|
1796
|
+
const Y = N.find((U) => U.button === M.title);
|
|
1797
|
+
return Y ? Y.isShow : !0;
|
|
1798
|
+
}), K.value = N.find((M) => M.button === "IsGlobal")?.isShow ?? !1, te.value = N.find((M) => M.button === "AssignButton")?.isShow ?? !1, ie.value = N.find((M) => M.button === "AssignList")?.isShow ?? !1, le.value = N.find((M) => M.button === "AddCommentsButton")?.isShow ?? !1;
|
|
1792
1799
|
}
|
|
1793
|
-
const
|
|
1794
|
-
async function
|
|
1795
|
-
|
|
1800
|
+
const T = g([]);
|
|
1801
|
+
async function P() {
|
|
1802
|
+
k.value = !0, s = new Re().setPageActionType(he.Details).setClassName(c.className).setStore({ svrStore: n, bpmStore: e }).setWorkflowId(c.workflowId).build(), d.value = await s.getPageData();
|
|
1796
1803
|
const N = await s.getFiles();
|
|
1797
|
-
|
|
1798
|
-
const
|
|
1799
|
-
a.Test?.({ fieldValue:
|
|
1800
|
-
for (const
|
|
1801
|
-
if (d.value.fields[
|
|
1802
|
-
const
|
|
1803
|
-
|
|
1804
|
+
O.value = await s.getApprovers(), p.value = await s.getCommentsHistory(), oe.value = await s.getAssociator(), await I(), a.detailPageLoaded?.(d, e().employeeInfo);
|
|
1805
|
+
const M = d.value.fields.requestType.modelValue;
|
|
1806
|
+
a.Test?.({ fieldValue: M, hiddenFields: T }), _.value = y(d.value.fields);
|
|
1807
|
+
for (const U in d.value.fields)
|
|
1808
|
+
if (d.value.fields[U].widget?.widget === "File") {
|
|
1809
|
+
const E = _.value.find((R) => R.fieldKey === U);
|
|
1810
|
+
E && E.widget && (E.widget.files = N[U] ?? []);
|
|
1804
1811
|
}
|
|
1805
|
-
const
|
|
1806
|
-
|
|
1812
|
+
const Y = await s.getProcess();
|
|
1813
|
+
re.value = ee(Y, 0), k.value = !1;
|
|
1807
1814
|
}
|
|
1808
|
-
ge(
|
|
1809
|
-
async function
|
|
1810
|
-
return a[N]?.(
|
|
1815
|
+
ge(P);
|
|
1816
|
+
async function S(N, M) {
|
|
1817
|
+
return a[N]?.(M);
|
|
1811
1818
|
}
|
|
1812
|
-
function
|
|
1819
|
+
function V() {
|
|
1813
1820
|
return n()?.userInfo?.email_address ?? "";
|
|
1814
1821
|
}
|
|
1815
|
-
async function
|
|
1822
|
+
async function $(N, M, Y, U, E) {
|
|
1816
1823
|
try {
|
|
1817
|
-
switch (
|
|
1818
|
-
case
|
|
1819
|
-
let
|
|
1824
|
+
switch (M) {
|
|
1825
|
+
case X.Submit:
|
|
1826
|
+
let R = !0;
|
|
1820
1827
|
if (h.value?.forEach((_e) => {
|
|
1821
|
-
_e?.validate && !_e.validate() && (
|
|
1822
|
-
}), !
|
|
1828
|
+
_e?.validate && !_e.validate() && (R = !1);
|
|
1829
|
+
}), !R) {
|
|
1823
1830
|
l?.appContext.config.globalProperties.$message.error(
|
|
1824
1831
|
"Please complete all required fields before submit."
|
|
1825
1832
|
);
|
|
1826
1833
|
return;
|
|
1827
1834
|
}
|
|
1828
|
-
const { reason: pe, ifGlobal: Ce } = await
|
|
1829
|
-
isGlobal:
|
|
1835
|
+
const { reason: pe, ifGlobal: Ce } = await S(E, {
|
|
1836
|
+
isGlobal: K.value
|
|
1830
1837
|
});
|
|
1831
|
-
|
|
1832
|
-
const we = _.value.find((_e) => _e.fieldKey === "approvedGrade")?.modelValue,
|
|
1838
|
+
k.value = !0;
|
|
1839
|
+
const we = _.value.find((_e) => _e.fieldKey === "approvedGrade")?.modelValue, ne = E === "Approve" ? "100" : "-1", xe = await Kt(
|
|
1833
1840
|
c.className,
|
|
1834
1841
|
c.workflowId,
|
|
1835
|
-
|
|
1842
|
+
V(),
|
|
1836
1843
|
pe,
|
|
1837
|
-
|
|
1838
|
-
|
|
1844
|
+
Y,
|
|
1845
|
+
ne,
|
|
1839
1846
|
Ce,
|
|
1840
1847
|
{
|
|
1841
1848
|
approvedGrade: we
|
|
1842
1849
|
}
|
|
1843
1850
|
);
|
|
1844
|
-
await
|
|
1851
|
+
await S(`${E}Success`, {
|
|
1845
1852
|
workflowId: c.workflowId,
|
|
1846
1853
|
res: xe
|
|
1847
|
-
}),
|
|
1848
|
-
const _t =
|
|
1854
|
+
}), k.value = !1;
|
|
1855
|
+
const _t = E === "Approve" ? `Request ID ${c.workflowId} has been approved.` : `Request ID ${c.workflowId} has been rejected.`;
|
|
1849
1856
|
l?.appContext.config.globalProperties.$notification.success(
|
|
1850
1857
|
_t
|
|
1851
|
-
),
|
|
1858
|
+
), P();
|
|
1852
1859
|
break;
|
|
1853
|
-
case
|
|
1860
|
+
case X.Link:
|
|
1854
1861
|
try {
|
|
1855
1862
|
await a[N.eventName || ""]?.(), r.push({
|
|
1856
|
-
name:
|
|
1863
|
+
name: U,
|
|
1857
1864
|
params: { className: c.className, workflowId: c.workflowId }
|
|
1858
1865
|
});
|
|
1859
1866
|
} catch (_e) {
|
|
1860
1867
|
console.error("Error in link action trigger:", _e);
|
|
1861
1868
|
}
|
|
1862
1869
|
break;
|
|
1863
|
-
case
|
|
1870
|
+
case X.Button:
|
|
1864
1871
|
await a[N.eventName || ""]?.({
|
|
1865
|
-
approvers:
|
|
1866
|
-
associators:
|
|
1867
|
-
isShowAssignSelect:
|
|
1868
|
-
isShowAssignList:
|
|
1869
|
-
assignCallback:
|
|
1870
|
-
deleteAssociatorCallback:
|
|
1872
|
+
approvers: O,
|
|
1873
|
+
associators: oe,
|
|
1874
|
+
isShowAssignSelect: te,
|
|
1875
|
+
isShowAssignList: ie,
|
|
1876
|
+
assignCallback: b,
|
|
1877
|
+
deleteAssociatorCallback: L
|
|
1871
1878
|
});
|
|
1872
1879
|
break;
|
|
1873
1880
|
default:
|
|
1874
|
-
console.warn("Unknown action type:",
|
|
1881
|
+
console.warn("Unknown action type:", M);
|
|
1875
1882
|
}
|
|
1876
1883
|
} catch {
|
|
1877
1884
|
}
|
|
1878
1885
|
}
|
|
1879
|
-
const
|
|
1880
|
-
async function
|
|
1886
|
+
const B = g(""), p = g([]), D = g(""), O = g([]), oe = g([]);
|
|
1887
|
+
async function b(N) {
|
|
1881
1888
|
if (!N) {
|
|
1882
1889
|
l?.appContext.config.globalProperties.$message.error(
|
|
1883
1890
|
"Please select an approver"
|
|
1884
1891
|
);
|
|
1885
1892
|
return;
|
|
1886
1893
|
}
|
|
1887
|
-
await
|
|
1894
|
+
await A(
|
|
1888
1895
|
"Confirm Assign Approver",
|
|
1889
1896
|
"Do you want to assign the selected approver?"
|
|
1890
1897
|
);
|
|
1891
1898
|
try {
|
|
1892
|
-
await s.assignApprover(N),
|
|
1899
|
+
await s.assignApprover(N), oe.value = await s.getAssociator(), I(), l?.appContext.config.globalProperties.$notification.success(
|
|
1893
1900
|
"Assign Approver clicked!"
|
|
1894
1901
|
);
|
|
1895
|
-
} catch (
|
|
1896
|
-
if (
|
|
1902
|
+
} catch (M) {
|
|
1903
|
+
if (M.status === 409) {
|
|
1897
1904
|
l?.appContext.config.globalProperties.$notification.error(
|
|
1898
1905
|
"This user is already an associator"
|
|
1899
1906
|
);
|
|
@@ -1904,22 +1911,22 @@ const Dn = /* @__PURE__ */ W({
|
|
|
1904
1911
|
);
|
|
1905
1912
|
}
|
|
1906
1913
|
}
|
|
1907
|
-
async function
|
|
1908
|
-
const { Modal:
|
|
1909
|
-
return new Promise((
|
|
1910
|
-
|
|
1914
|
+
async function A(N, M) {
|
|
1915
|
+
const { Modal: Y } = await import("@arco-design/web-vue");
|
|
1916
|
+
return new Promise((U, E) => {
|
|
1917
|
+
Y.confirm({
|
|
1911
1918
|
title: N,
|
|
1912
|
-
content:
|
|
1919
|
+
content: M,
|
|
1913
1920
|
okText: "OK",
|
|
1914
1921
|
cancelText: "Cancel",
|
|
1915
|
-
onOk: () =>
|
|
1916
|
-
onCancel: () =>
|
|
1922
|
+
onOk: () => U(!0),
|
|
1923
|
+
onCancel: () => E()
|
|
1917
1924
|
});
|
|
1918
1925
|
});
|
|
1919
1926
|
}
|
|
1920
|
-
async function
|
|
1927
|
+
async function L(N) {
|
|
1921
1928
|
try {
|
|
1922
|
-
await
|
|
1929
|
+
await A(
|
|
1923
1930
|
"Confirm Delete Associator",
|
|
1924
1931
|
"Do you want to delete this associator?"
|
|
1925
1932
|
);
|
|
@@ -1927,7 +1934,7 @@ const Dn = /* @__PURE__ */ W({
|
|
|
1927
1934
|
return;
|
|
1928
1935
|
}
|
|
1929
1936
|
try {
|
|
1930
|
-
await s.deleteAssociator(N.toString()),
|
|
1937
|
+
await s.deleteAssociator(N.toString()), oe.value = await s.getAssociator(), l?.appContext.config.globalProperties.$notification.success(
|
|
1931
1938
|
"Associator deleted successfully!"
|
|
1932
1939
|
);
|
|
1933
1940
|
} catch {
|
|
@@ -1937,13 +1944,13 @@ const Dn = /* @__PURE__ */ W({
|
|
|
1937
1944
|
}
|
|
1938
1945
|
}
|
|
1939
1946
|
async function de() {
|
|
1940
|
-
if (!
|
|
1947
|
+
if (!B.value.trim()) {
|
|
1941
1948
|
l?.appContext.config.globalProperties.$message.error(
|
|
1942
1949
|
"Comment cannot be empty"
|
|
1943
1950
|
);
|
|
1944
1951
|
return;
|
|
1945
1952
|
}
|
|
1946
|
-
await s.addComments(
|
|
1953
|
+
await s.addComments(B.value.trim()), B.value = "", p.value = await s.getCommentsHistory(), l?.appContext.config.globalProperties.$notification.success(
|
|
1947
1954
|
"Add Comment clicked!"
|
|
1948
1955
|
);
|
|
1949
1956
|
}
|
|
@@ -1954,14 +1961,14 @@ const Dn = /* @__PURE__ */ W({
|
|
|
1954
1961
|
return s;
|
|
1955
1962
|
}, set page(N) {
|
|
1956
1963
|
s = N;
|
|
1957
|
-
}, pageData: d, _fields: _, dataWidgetsRefs: h, genField:
|
|
1964
|
+
}, pageData: d, _fields: _, dataWidgetsRefs: h, genField: y, 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: V, clickHandler: $, comment: B, commentsHistory: p, selectedApprover: D, approvers: O, associators: oe, onAssignApprover: b, confirmDialog: A, onDeleteAssociator: L, onAddComment: de, formatTitle: fe, ActionButton: Pe, get IconDownload() {
|
|
1958
1965
|
return Ho;
|
|
1959
|
-
}, TopBar:
|
|
1966
|
+
}, TopBar: Ue, get formatDate() {
|
|
1960
1967
|
return Te;
|
|
1961
1968
|
}, ToolTip: ut, DataWidgets: Ie };
|
|
1962
1969
|
return Object.defineProperty(We, "__isScriptSetup", { enumerable: !1, value: !0 }), We;
|
|
1963
1970
|
}
|
|
1964
|
-
}), Ln = { class: "page-container" }, Hn = { class: "page-body" },
|
|
1971
|
+
}), Ln = { class: "page-container" }, Hn = { class: "page-body" }, $n = { class: "detail-card" }, On = { class: "form-fields-vertical" }, Mn = { class: "detail-fields" }, jn = { class: "detail-field" }, zn = {
|
|
1965
1972
|
key: 0,
|
|
1966
1973
|
class: "detail-field"
|
|
1967
1974
|
}, En = { class: "field-label" }, Kn = {
|
|
@@ -1975,66 +1982,66 @@ const Dn = /* @__PURE__ */ W({
|
|
|
1975
1982
|
class: "detail-content"
|
|
1976
1983
|
}, Yn = { class: "page-footer" }, Qn = { class: "action-container" }, Jn = { class: "action-buttons" };
|
|
1977
1984
|
function Zn(t, o, n, e, a, r) {
|
|
1978
|
-
const i =
|
|
1979
|
-
|
|
1980
|
-
const s =
|
|
1985
|
+
const i = x("a-link"), l = x("a-space"), c = x("a-card");
|
|
1986
|
+
x("a-option"), x("a-select");
|
|
1987
|
+
const s = x("a-button"), d = x("a-list-item"), _ = x("a-list"), h = x("a-textarea"), y = x("a-spin");
|
|
1981
1988
|
return u(), v("div", Ln, [
|
|
1982
|
-
|
|
1989
|
+
F(e.TopBar, {
|
|
1983
1990
|
title: e.pageData.banner.title,
|
|
1984
1991
|
subTitle: e.pageData.banner.subTitle,
|
|
1985
1992
|
email: e.getApproverEmail()
|
|
1986
1993
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1987
1994
|
w("div", Hn, [
|
|
1988
|
-
|
|
1995
|
+
F(y, {
|
|
1989
1996
|
loading: e.loading,
|
|
1990
1997
|
class: "detail-container"
|
|
1991
1998
|
}, {
|
|
1992
|
-
default:
|
|
1993
|
-
w("div",
|
|
1994
|
-
(u(),
|
|
1995
|
-
w("div",
|
|
1996
|
-
(u(!0), v(
|
|
1999
|
+
default: C(() => [
|
|
2000
|
+
w("div", $n, [
|
|
2001
|
+
(u(), H(Me(e.customComps.Steps), { steps: e.steps }, null, 8, ["steps"])),
|
|
2002
|
+
w("div", On, [
|
|
2003
|
+
(u(!0), v(j, null, W(e.groupedFields, (f) => (u(), H(c, {
|
|
1997
2004
|
key: f.name,
|
|
1998
2005
|
title: f.name,
|
|
1999
2006
|
style: { "margin-bottom": "24px" }
|
|
2000
2007
|
}, {
|
|
2001
|
-
default:
|
|
2008
|
+
default: C(() => [
|
|
2002
2009
|
w("div", Mn, [
|
|
2003
|
-
(u(!0), v(
|
|
2010
|
+
(u(!0), v(j, null, W(f.fields, (m) => (u(), v("div", {
|
|
2004
2011
|
key: m.fieldKey,
|
|
2005
2012
|
class: "detail-field-wrapper"
|
|
2006
2013
|
}, [
|
|
2007
2014
|
w("div", jn, [
|
|
2008
|
-
m.widget?.readonly ? (u(), v(
|
|
2015
|
+
m.widget?.readonly ? (u(), v(j, { key: 1 }, [
|
|
2009
2016
|
w("div", En, [
|
|
2010
|
-
|
|
2011
|
-
|
|
2017
|
+
ae(G(e.formatTitle(m.widget?.title)) + " ", 1),
|
|
2018
|
+
F(e.ToolTip, {
|
|
2012
2019
|
"is-visible": m.widget?.isVisible ?? !1,
|
|
2013
2020
|
"output-text": m.widget?.outputText ?? []
|
|
2014
2021
|
}, null, 8, ["is-visible", "output-text"])
|
|
2015
2022
|
]),
|
|
2016
|
-
m.widget?.widget === "File" ? (u(!0), v(
|
|
2023
|
+
m.widget?.widget === "File" ? (u(!0), v(j, { key: 0 }, W(m.widget.files, (k) => (u(), v("div", {
|
|
2017
2024
|
class: "field-value",
|
|
2018
|
-
key:
|
|
2025
|
+
key: k.id
|
|
2019
2026
|
}, [
|
|
2020
|
-
|
|
2021
|
-
default:
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
href:
|
|
2027
|
+
F(l, null, {
|
|
2028
|
+
default: C(() => [
|
|
2029
|
+
ae(G(k.name) + " ", 1),
|
|
2030
|
+
F(i, {
|
|
2031
|
+
href: k.url,
|
|
2025
2032
|
target: "_blank"
|
|
2026
2033
|
}, {
|
|
2027
|
-
default:
|
|
2028
|
-
|
|
2034
|
+
default: C(() => [
|
|
2035
|
+
F(e.IconDownload, { style: { color: "#7A00E6" } })
|
|
2029
2036
|
]),
|
|
2030
2037
|
_: 2
|
|
2031
2038
|
}, 1032, ["href"])
|
|
2032
2039
|
]),
|
|
2033
2040
|
_: 2
|
|
2034
2041
|
}, 1024)
|
|
2035
|
-
]))), 128)) : (u(), v("div", Kn,
|
|
2042
|
+
]))), 128)) : (u(), v("div", Kn, G(m.fieldValue), 1))
|
|
2036
2043
|
], 64)) : (u(), v("div", zn, [
|
|
2037
|
-
|
|
2044
|
+
F(e.DataWidgets, {
|
|
2038
2045
|
ref_for: !0,
|
|
2039
2046
|
ref: "dataWidgets",
|
|
2040
2047
|
"field-key": m.fieldKey,
|
|
@@ -2042,7 +2049,7 @@ function Zn(t, o, n, e, a, r) {
|
|
|
2042
2049
|
config: m,
|
|
2043
2050
|
"class-name": n.className,
|
|
2044
2051
|
modelValue: m.modelValue,
|
|
2045
|
-
"onUpdate:modelValue": (
|
|
2052
|
+
"onUpdate:modelValue": (k) => m.modelValue = k,
|
|
2046
2053
|
class: "form-field"
|
|
2047
2054
|
}, null, 8, ["field-key", "name", "config", "class-name", "modelValue", "onUpdate:modelValue"])
|
|
2048
2055
|
]))
|
|
@@ -2052,47 +2059,47 @@ function Zn(t, o, n, e, a, r) {
|
|
|
2052
2059
|
]),
|
|
2053
2060
|
_: 2
|
|
2054
2061
|
}, 1032, ["title"]))), 128)),
|
|
2055
|
-
|
|
2056
|
-
|
|
2062
|
+
se("", !0),
|
|
2063
|
+
se("", !0),
|
|
2057
2064
|
e.isShowCommentTextArea ? (u(), v("div", Wn, [
|
|
2058
2065
|
w("div", Gn, [
|
|
2059
2066
|
o[6] || (o[6] = w("div", { class: "field-label" }, "Comment", -1)),
|
|
2060
|
-
|
|
2067
|
+
F(h, {
|
|
2061
2068
|
modelValue: e.comment,
|
|
2062
2069
|
"onUpdate:modelValue": o[1] || (o[1] = (f) => e.comment = f)
|
|
2063
2070
|
}, null, 8, ["modelValue"]),
|
|
2064
|
-
|
|
2071
|
+
F(s, {
|
|
2065
2072
|
type: "primary",
|
|
2066
2073
|
onClick: e.onAddComment
|
|
2067
2074
|
}, {
|
|
2068
|
-
default:
|
|
2069
|
-
|
|
2075
|
+
default: C(() => o[5] || (o[5] = [
|
|
2076
|
+
ae("Add Comment", -1)
|
|
2070
2077
|
])),
|
|
2071
2078
|
_: 1,
|
|
2072
2079
|
__: [5]
|
|
2073
2080
|
})
|
|
2074
2081
|
])
|
|
2075
|
-
])) :
|
|
2076
|
-
e.commentsHistory.length ? (u(),
|
|
2077
|
-
header:
|
|
2078
|
-
|
|
2082
|
+
])) : se("", !0),
|
|
2083
|
+
e.commentsHistory.length ? (u(), H(_, { key: 3 }, {
|
|
2084
|
+
header: C(() => o[7] || (o[7] = [
|
|
2085
|
+
ae(" Comments History ", -1)
|
|
2079
2086
|
])),
|
|
2080
|
-
default:
|
|
2081
|
-
(u(!0), v(
|
|
2087
|
+
default: C(() => [
|
|
2088
|
+
(u(!0), v(j, null, W(e.commentsHistory, (f) => (u(), H(d, {
|
|
2082
2089
|
key: f.associator
|
|
2083
2090
|
}, {
|
|
2084
|
-
default:
|
|
2085
|
-
|
|
2091
|
+
default: C(() => [
|
|
2092
|
+
ae(G(f.associator) + ": " + G(f.comments) + " (" + G(e.formatDate(f.createdAt)) + ") ", 1)
|
|
2086
2093
|
]),
|
|
2087
2094
|
_: 2
|
|
2088
2095
|
}, 1024))), 128))
|
|
2089
2096
|
]),
|
|
2090
2097
|
_: 1
|
|
2091
|
-
})) :
|
|
2098
|
+
})) : se("", !0)
|
|
2092
2099
|
]),
|
|
2093
2100
|
t.$slots.content ? (u(), v("div", qn, [
|
|
2094
2101
|
ue(t.$slots, "content", {}, void 0, !0)
|
|
2095
|
-
])) :
|
|
2102
|
+
])) : se("", !0)
|
|
2096
2103
|
])
|
|
2097
2104
|
]),
|
|
2098
2105
|
_: 3
|
|
@@ -2102,7 +2109,7 @@ function Zn(t, o, n, e, a, r) {
|
|
|
2102
2109
|
w("div", Qn, [
|
|
2103
2110
|
ue(t.$slots, "action", {}, void 0, !0),
|
|
2104
2111
|
w("div", Jn, [
|
|
2105
|
-
(u(!0), v(
|
|
2112
|
+
(u(!0), v(j, null, W(e.reversedActions, (f) => (u(), H(e.ActionButton, {
|
|
2106
2113
|
key: f.title,
|
|
2107
2114
|
loading: e.loading,
|
|
2108
2115
|
config: f,
|
|
@@ -2114,7 +2121,7 @@ function Zn(t, o, n, e, a, r) {
|
|
|
2114
2121
|
])
|
|
2115
2122
|
]);
|
|
2116
2123
|
}
|
|
2117
|
-
const Xn = /* @__PURE__ */
|
|
2124
|
+
const Xn = /* @__PURE__ */ Z(Dn, [["render", Zn], ["__scopeId", "data-v-117ace1a"], ["__file", "DetailView.vue"]]), er = /* @__PURE__ */ q({
|
|
2118
2125
|
name: "ListView",
|
|
2119
2126
|
__name: "ListView",
|
|
2120
2127
|
props: {
|
|
@@ -2132,10 +2139,10 @@ const Xn = /* @__PURE__ */ Q(Dn, [["render", Zn], ["__scopeId", "data-v-117ace1a
|
|
|
2132
2139
|
filters: []
|
|
2133
2140
|
});
|
|
2134
2141
|
function s() {
|
|
2135
|
-
const
|
|
2136
|
-
const fe = typeof
|
|
2142
|
+
const b = Object.entries(S.value).filter(([, { value: A }]) => A && A !== "").map(([A, { value: L, operator: de }]) => {
|
|
2143
|
+
const fe = typeof L == "string" ? L.trim() : L;
|
|
2137
2144
|
return {
|
|
2138
|
-
key:
|
|
2145
|
+
key: A,
|
|
2139
2146
|
value: fe,
|
|
2140
2147
|
operator: de
|
|
2141
2148
|
// 根据实际需要调整操作符
|
|
@@ -2144,21 +2151,21 @@ const Xn = /* @__PURE__ */ Q(Dn, [["render", Zn], ["__scopeId", "data-v-117ace1a
|
|
|
2144
2151
|
return {
|
|
2145
2152
|
pageNumber: c.current,
|
|
2146
2153
|
pageSize: c.pageSize,
|
|
2147
|
-
filters: [...c.filters, ...
|
|
2154
|
+
filters: [...c.filters, ...b],
|
|
2148
2155
|
sorts: [{
|
|
2149
2156
|
key: "workflowId",
|
|
2150
2157
|
type: 1
|
|
2151
2158
|
}]
|
|
2152
2159
|
};
|
|
2153
2160
|
}
|
|
2154
|
-
const d =
|
|
2155
|
-
x:
|
|
2161
|
+
const d = z(() => ({
|
|
2162
|
+
x: y.value.length * 150 + 250
|
|
2156
2163
|
// 只设置横向滚动
|
|
2157
2164
|
// 移除 y 属性,让表格高度自适应
|
|
2158
|
-
})), _ = (
|
|
2159
|
-
const
|
|
2165
|
+
})), _ = (b) => {
|
|
2166
|
+
const A = Object.entries(b).filter(([, L]) => L.widget?.column).map(([L, de], fe) => ({
|
|
2160
2167
|
title: de.widget.title,
|
|
2161
|
-
dataIndex:
|
|
2168
|
+
dataIndex: L.charAt(0).toLowerCase() + L.slice(1),
|
|
2162
2169
|
order: de.order,
|
|
2163
2170
|
ellipsis: !0,
|
|
2164
2171
|
tooltip: !0,
|
|
@@ -2167,8 +2174,8 @@ const Xn = /* @__PURE__ */ Q(Dn, [["render", Zn], ["__scopeId", "data-v-117ace1a
|
|
|
2167
2174
|
// 启用最小宽度
|
|
2168
2175
|
resizable: !0
|
|
2169
2176
|
// 启用列宽调整
|
|
2170
|
-
})).sort((
|
|
2171
|
-
|
|
2177
|
+
})).sort((L, de) => L.order - de.order);
|
|
2178
|
+
A.push({
|
|
2172
2179
|
title: "Actions",
|
|
2173
2180
|
slotName: "optional",
|
|
2174
2181
|
align: "center",
|
|
@@ -2176,116 +2183,116 @@ const Xn = /* @__PURE__ */ Q(Dn, [["render", Zn], ["__scopeId", "data-v-117ace1a
|
|
|
2176
2183
|
minWidth: 200,
|
|
2177
2184
|
fixed: "right",
|
|
2178
2185
|
resizable: !1
|
|
2179
|
-
}),
|
|
2180
|
-
}, h = g([]),
|
|
2186
|
+
}), y.value = A;
|
|
2187
|
+
}, h = g([]), y = g([]), f = g(!0), m = g(!0), k = g(), ee = async () => {
|
|
2181
2188
|
m.value = !0;
|
|
2182
|
-
const
|
|
2183
|
-
h.value =
|
|
2184
|
-
},
|
|
2189
|
+
const b = await Lt(i.className, s());
|
|
2190
|
+
h.value = b.data, c.total = b.totalCount, m.value = !1;
|
|
2191
|
+
}, re = g(!1);
|
|
2185
2192
|
ge(async () => {
|
|
2186
2193
|
f.value = !0;
|
|
2187
|
-
const
|
|
2188
|
-
l.value = await
|
|
2194
|
+
const b = new Re().setPageActionType(he.List).setClassName(i.className).setStore({ svrStore: n, bpmStore: e }).build();
|
|
2195
|
+
l.value = await b.getPageData(), _(l.value.fields), $(l.value.fields), B(), P(l.value?.tabs?.[0]?.key || ""), k.value = l.value.actions, f.value = !1, re.value = !0;
|
|
2189
2196
|
}), bt(() => {
|
|
2190
|
-
|
|
2197
|
+
re.value && ee();
|
|
2191
2198
|
});
|
|
2192
|
-
const
|
|
2193
|
-
c.current =
|
|
2194
|
-
},
|
|
2195
|
-
c.pageSize =
|
|
2199
|
+
const K = (b) => {
|
|
2200
|
+
c.current = b, ee();
|
|
2201
|
+
}, te = (b) => {
|
|
2202
|
+
c.pageSize = b, ee();
|
|
2196
2203
|
};
|
|
2197
|
-
function
|
|
2198
|
-
switch (
|
|
2199
|
-
case
|
|
2200
|
-
a.push({ name:
|
|
2204
|
+
function ie(b, A, L, de, fe) {
|
|
2205
|
+
switch (b) {
|
|
2206
|
+
case X.Link:
|
|
2207
|
+
a.push({ name: L, params: { workflowId: fe } });
|
|
2201
2208
|
break;
|
|
2202
2209
|
default:
|
|
2203
|
-
console.warn("Unknown action type:",
|
|
2210
|
+
console.warn("Unknown action type:", b);
|
|
2204
2211
|
}
|
|
2205
2212
|
}
|
|
2206
|
-
function
|
|
2207
|
-
switch (
|
|
2208
|
-
case
|
|
2209
|
-
no(
|
|
2213
|
+
function le(b, A, L) {
|
|
2214
|
+
switch (b) {
|
|
2215
|
+
case X.Submit:
|
|
2216
|
+
no(A, { filters: [{ key: "approverList", value: I(), operator: 2 }] }), r?.appContext.config.globalProperties.$notification.success("submit success!");
|
|
2210
2217
|
break;
|
|
2211
|
-
case
|
|
2212
|
-
a.push({ name:
|
|
2218
|
+
case X.Link:
|
|
2219
|
+
a.push({ name: L });
|
|
2213
2220
|
break;
|
|
2214
2221
|
default:
|
|
2215
|
-
console.warn("Unknown action type:",
|
|
2222
|
+
console.warn("Unknown action type:", b);
|
|
2216
2223
|
}
|
|
2217
2224
|
}
|
|
2218
|
-
function
|
|
2225
|
+
function I() {
|
|
2219
2226
|
return n()?.userInfo?.email_address ?? "";
|
|
2220
2227
|
}
|
|
2221
|
-
function
|
|
2222
|
-
return typeof
|
|
2228
|
+
function T(b, A) {
|
|
2229
|
+
return typeof b != "string" || b.indexOf("{currentUserEmail}") === -1 ? b : b.replace(/{currentUserEmail}/g, A);
|
|
2223
2230
|
}
|
|
2224
|
-
function
|
|
2225
|
-
const
|
|
2226
|
-
c.filters =
|
|
2227
|
-
...
|
|
2228
|
-
value:
|
|
2229
|
-
})) || [], c.current = 1,
|
|
2231
|
+
function P(b) {
|
|
2232
|
+
const A = l.value?.tabs?.find((L) => L.key === b)?.filters;
|
|
2233
|
+
c.filters = A?.map((L) => ({
|
|
2234
|
+
...L,
|
|
2235
|
+
value: T(L.value, I())
|
|
2236
|
+
})) || [], c.current = 1, ee();
|
|
2230
2237
|
}
|
|
2231
|
-
const
|
|
2232
|
-
function
|
|
2233
|
-
if (!
|
|
2234
|
-
|
|
2238
|
+
const S = g({}), V = g([]);
|
|
2239
|
+
function $(b) {
|
|
2240
|
+
if (!b) return [];
|
|
2241
|
+
V.value = Object.entries(b).filter(([, A]) => A.isFiltered).map(([A, L]) => ({ fieldKey: A, fieldConfig: L }));
|
|
2235
2242
|
}
|
|
2236
|
-
const
|
|
2237
|
-
const
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
}),
|
|
2241
|
-
},
|
|
2242
|
-
c.current = 1,
|
|
2243
|
-
},
|
|
2244
|
-
l.value &&
|
|
2243
|
+
const B = () => {
|
|
2244
|
+
const b = {};
|
|
2245
|
+
V.value.forEach(({ fieldKey: A, fieldConfig: L }) => {
|
|
2246
|
+
b[A] = {}, b[A].value = L.modelValue, b[A].operator = L.operator;
|
|
2247
|
+
}), S.value = b;
|
|
2248
|
+
}, p = () => {
|
|
2249
|
+
c.current = 1, ee();
|
|
2250
|
+
}, D = () => {
|
|
2251
|
+
l.value && B(), p();
|
|
2245
2252
|
};
|
|
2246
|
-
function
|
|
2247
|
-
return !(
|
|
2253
|
+
function O(b, A) {
|
|
2254
|
+
return !(b.location !== "InTable" || b.title === "Update" && (A.sort === 3 || A.status === 100 || A.status === -1));
|
|
2248
2255
|
}
|
|
2249
|
-
const
|
|
2250
|
-
return Object.defineProperty(
|
|
2256
|
+
const oe = { svrStore: n, bpmStore: e, router: a, instance: r, props: i, pageData: l, paging: c, createListParams: s, scroll: d, mapColumns: _, _data: h, _columns: y, 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: V, mapSearchableFields: $, initSearchForm: B, handleSearch: p, handleReset: D, judgeHiddenActions: O, ActionButton: Pe, DataWidgets: Ie, TopBar: Ue };
|
|
2257
|
+
return Object.defineProperty(oe, "__isScriptSetup", { enumerable: !1, value: !0 }), oe;
|
|
2251
2258
|
}
|
|
2252
2259
|
}), tr = { class: "list-container" }, or = { class: "query-title" };
|
|
2253
2260
|
function nr(t, o, n, e, a, r) {
|
|
2254
|
-
const i =
|
|
2261
|
+
const i = x("a-space"), l = x("a-col"), c = x("a-button"), s = x("a-row"), d = x("a-card"), _ = x("a-tab-pane"), h = x("a-tabs"), y = x("a-table");
|
|
2255
2262
|
return u(), v("div", tr, [
|
|
2256
|
-
|
|
2263
|
+
F(e.TopBar, {
|
|
2257
2264
|
title: e.pageData?.banner.title ?? "",
|
|
2258
2265
|
subTitle: e.pageData?.banner.subTitle ?? "",
|
|
2259
2266
|
email: e.getApproverEmail()
|
|
2260
2267
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
2261
|
-
|
|
2262
|
-
default:
|
|
2268
|
+
F(d, null, {
|
|
2269
|
+
default: C(() => [
|
|
2263
2270
|
w("div", or, [
|
|
2264
2271
|
o[0] || (o[0] = w("h3", null, "Search Conditions", -1)),
|
|
2265
|
-
|
|
2266
|
-
default:
|
|
2267
|
-
(u(!0), v(
|
|
2272
|
+
F(i, { size: "medium" }, {
|
|
2273
|
+
default: C(() => [
|
|
2274
|
+
(u(!0), v(j, null, W(e.actions, (f) => (u(), v(j, {
|
|
2268
2275
|
key: f.title
|
|
2269
2276
|
}, [
|
|
2270
|
-
f.location === "InOperation" ? (u(),
|
|
2277
|
+
f.location === "InOperation" ? (u(), H(e.ActionButton, {
|
|
2271
2278
|
key: 0,
|
|
2272
2279
|
config: f,
|
|
2273
2280
|
onClick: e.createHandler
|
|
2274
|
-
}, null, 8, ["config"])) :
|
|
2281
|
+
}, null, 8, ["config"])) : se("", !0)
|
|
2275
2282
|
], 64))), 128))
|
|
2276
2283
|
]),
|
|
2277
2284
|
_: 1
|
|
2278
2285
|
})
|
|
2279
2286
|
]),
|
|
2280
|
-
|
|
2281
|
-
default:
|
|
2282
|
-
(u(!0), v(
|
|
2287
|
+
F(s, { gutter: [24, 20] }, {
|
|
2288
|
+
default: C(() => [
|
|
2289
|
+
(u(!0), v(j, null, W(e.searchableFields, (f) => (u(), H(l, {
|
|
2283
2290
|
key: f.fieldKey,
|
|
2284
2291
|
span: 6,
|
|
2285
2292
|
class: "search-col"
|
|
2286
2293
|
}, {
|
|
2287
|
-
default:
|
|
2288
|
-
|
|
2294
|
+
default: C(() => [
|
|
2295
|
+
F(e.DataWidgets, {
|
|
2289
2296
|
name: f.fieldKey,
|
|
2290
2297
|
config: f.fieldConfig,
|
|
2291
2298
|
modelValue: e.searchForm[f.fieldKey].value,
|
|
@@ -2295,30 +2302,30 @@ function nr(t, o, n, e, a, r) {
|
|
|
2295
2302
|
]),
|
|
2296
2303
|
_: 2
|
|
2297
2304
|
}, 1024))), 128)),
|
|
2298
|
-
|
|
2305
|
+
F(l, {
|
|
2299
2306
|
span: 6,
|
|
2300
2307
|
class: "search-col form-buttons"
|
|
2301
2308
|
}, {
|
|
2302
|
-
default:
|
|
2303
|
-
|
|
2304
|
-
default:
|
|
2305
|
-
|
|
2309
|
+
default: C(() => [
|
|
2310
|
+
F(i, { size: "medium" }, {
|
|
2311
|
+
default: C(() => [
|
|
2312
|
+
F(c, {
|
|
2306
2313
|
type: "primary",
|
|
2307
2314
|
size: "medium",
|
|
2308
2315
|
onClick: e.handleSearch
|
|
2309
2316
|
}, {
|
|
2310
|
-
default:
|
|
2311
|
-
|
|
2317
|
+
default: C(() => o[1] || (o[1] = [
|
|
2318
|
+
ae(" Search ", -1)
|
|
2312
2319
|
])),
|
|
2313
2320
|
_: 1,
|
|
2314
2321
|
__: [1]
|
|
2315
2322
|
}),
|
|
2316
|
-
|
|
2323
|
+
F(c, {
|
|
2317
2324
|
size: "medium",
|
|
2318
2325
|
onClick: e.handleReset
|
|
2319
2326
|
}, {
|
|
2320
|
-
default:
|
|
2321
|
-
|
|
2327
|
+
default: C(() => o[2] || (o[2] = [
|
|
2328
|
+
ae(" Reset ", -1)
|
|
2322
2329
|
])),
|
|
2323
2330
|
_: 1,
|
|
2324
2331
|
__: [2]
|
|
@@ -2335,19 +2342,19 @@ function nr(t, o, n, e, a, r) {
|
|
|
2335
2342
|
]),
|
|
2336
2343
|
_: 1
|
|
2337
2344
|
}),
|
|
2338
|
-
|
|
2345
|
+
F(h, {
|
|
2339
2346
|
size: "large",
|
|
2340
2347
|
onTabClick: e.tabHandler
|
|
2341
2348
|
}, {
|
|
2342
|
-
default:
|
|
2343
|
-
(u(!0), v(
|
|
2349
|
+
default: C(() => [
|
|
2350
|
+
(u(!0), v(j, null, W(e.pageData?.tabs, (f) => (u(), H(_, {
|
|
2344
2351
|
key: f.key,
|
|
2345
2352
|
title: f.title
|
|
2346
2353
|
}, null, 8, ["title"]))), 128))
|
|
2347
2354
|
]),
|
|
2348
2355
|
_: 1
|
|
2349
2356
|
}),
|
|
2350
|
-
|
|
2357
|
+
F(y, {
|
|
2351
2358
|
columns: e._columns,
|
|
2352
2359
|
data: e._data,
|
|
2353
2360
|
stripe: "",
|
|
@@ -2366,18 +2373,18 @@ function nr(t, o, n, e, a, r) {
|
|
|
2366
2373
|
onPageChange: e.pageChangeHandler,
|
|
2367
2374
|
onPageSizeChange: e.pageSizeChangeHandler
|
|
2368
2375
|
}, {
|
|
2369
|
-
optional:
|
|
2370
|
-
|
|
2371
|
-
default:
|
|
2372
|
-
(u(!0), v(
|
|
2376
|
+
optional: C(({ record: f }) => [
|
|
2377
|
+
F(i, { size: "small" }, {
|
|
2378
|
+
default: C(() => [
|
|
2379
|
+
(u(!0), v(j, null, W(e.actions, (m) => (u(), v(j, {
|
|
2373
2380
|
key: m.title
|
|
2374
2381
|
}, [
|
|
2375
|
-
e.judgeHiddenActions(m, f) ? (u(),
|
|
2382
|
+
e.judgeHiddenActions(m, f) ? (u(), H(e.ActionButton, {
|
|
2376
2383
|
key: 0,
|
|
2377
2384
|
config: m,
|
|
2378
2385
|
size: "small",
|
|
2379
|
-
onClick: (...
|
|
2380
|
-
}, null, 8, ["config", "onClick"])) :
|
|
2386
|
+
onClick: (...k) => e.clickHandler(...k, f.workflowId)
|
|
2387
|
+
}, null, 8, ["config", "onClick"])) : se("", !0)
|
|
2381
2388
|
], 64))), 128))
|
|
2382
2389
|
]),
|
|
2383
2390
|
_: 2
|
|
@@ -2387,9 +2394,9 @@ function nr(t, o, n, e, a, r) {
|
|
|
2387
2394
|
}, 8, ["columns", "data", "pagination", "loading", "scroll"])
|
|
2388
2395
|
]);
|
|
2389
2396
|
}
|
|
2390
|
-
const rr = /* @__PURE__ */
|
|
2397
|
+
const rr = /* @__PURE__ */ Z(er, [["render", nr], ["__scopeId", "data-v-a24e1b40"], ["__file", "ListView.vue"]]), dr = {
|
|
2391
2398
|
install(t, o = {}) {
|
|
2392
|
-
o.config && Vt(o.config), o.router && (At(o.router), t.provide(ot, o.router)), o.pinia && t.provide(tn, o.pinia), o.useBpmStore && t.provide(pt, o.useBpmStore), o.useSvrStore && t.provide(mt, o.useSvrStore), o.triggers && t.provide(ft, o.triggers), o.customComps && t.provide(gt, o.customComps), t.component("CreateView", kn), t.component("UpdateView",
|
|
2399
|
+
o.config && Vt(o.config), o.router && (At(o.router), t.provide(ot, o.router)), o.pinia && t.provide(tn, o.pinia), o.useBpmStore && t.provide(pt, o.useBpmStore), o.useSvrStore && t.provide(mt, o.useSvrStore), o.triggers && t.provide(ft, o.triggers), o.customComps && t.provide(gt, o.customComps), t.component("CreateView", kn), t.component("UpdateView", Rn), t.component("DetailView", Xn), t.component("ListView", rr);
|
|
2393
2400
|
}
|
|
2394
2401
|
};
|
|
2395
2402
|
export {
|