@chase-shao/vue-component-lib 1.2.77 → 1.2.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +464 -468
- 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,10 +1,10 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as m, getCurrentInstance as pe, defineComponent as q, mergeModels as ie, useModel as ye, resolveComponent as S, createBlock as P, openBlock as d, onMounted as ce, computed as Z, withCtx as v, createElementBlock as C, Fragment as j, renderList as $, createVNode as D, nextTick as ot, createTextVNode as J, useTemplateRef as Ne, createElementVNode as A, createCommentVNode as se, toDisplayString as Q, resolveDynamicComponent as He, renderSlot as le, inject as me, reactive as Fe, normalizeStyle as at, normalizeClass as rt, onActivated as st } from "vue";
|
|
2
2
|
import it from "axios";
|
|
3
3
|
import { defineStore as lt } from "pinia";
|
|
4
4
|
import { Modal as ct } from "@arco-design/web-vue";
|
|
5
5
|
import { useRouter as dt } from "vue-router";
|
|
6
6
|
const ut = lt("main", () => ({
|
|
7
|
-
token:
|
|
7
|
+
token: m(void 0)
|
|
8
8
|
})), ft = async (t) => new Promise((n) => setTimeout(n, t)), pt = async (t, n, a, e = void 0) => {
|
|
9
9
|
if (t[n] === void 0)
|
|
10
10
|
try {
|
|
@@ -52,12 +52,12 @@ let De = {};
|
|
|
52
52
|
function gt(t) {
|
|
53
53
|
De = { ...De, ...t };
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Le() {
|
|
56
56
|
return De;
|
|
57
57
|
}
|
|
58
58
|
const _t = pe();
|
|
59
59
|
function Ge() {
|
|
60
|
-
const t =
|
|
60
|
+
const t = Le();
|
|
61
61
|
return {
|
|
62
62
|
apiBase: t.apiBase || void 0 || "",
|
|
63
63
|
appSecret: t.appSecret || void 0 || ""
|
|
@@ -97,7 +97,7 @@ const qe = async () => {
|
|
|
97
97
|
e.token = void 0;
|
|
98
98
|
}, (o.data?.expireSeconds ?? 3600) * 1e3), o?.data?.token;
|
|
99
99
|
});
|
|
100
|
-
},
|
|
100
|
+
}, K = async () => {
|
|
101
101
|
const t = await qe(), n = We();
|
|
102
102
|
return n.defaults.headers.common.Authorization = `Bearer ${t}`, n;
|
|
103
103
|
}, Ie = {
|
|
@@ -133,7 +133,7 @@ function Ye(t, n, a) {
|
|
|
133
133
|
throw new Error("Random bytes length must be >= 16");
|
|
134
134
|
return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, bt(e);
|
|
135
135
|
}
|
|
136
|
-
var
|
|
136
|
+
var ee = /* @__PURE__ */ ((t) => (t[t.Submit = 0] = "Submit", t[t.Link = 1] = "Link", t))(ee || {}), fe = /* @__PURE__ */ ((t) => (t[t.Create = 0] = "Create", t[t.Update = 1] = "Update", t[t.Details = 2] = "Details", t[t.List = 3] = "List", t))(fe || {});
|
|
137
137
|
function kt(t, n, a) {
|
|
138
138
|
const e = {
|
|
139
139
|
pageType: "",
|
|
@@ -171,7 +171,7 @@ function kt(t, n, a) {
|
|
|
171
171
|
redirectUrl: o.redirectUrl,
|
|
172
172
|
redirectType: o.redirectType,
|
|
173
173
|
title: o.title,
|
|
174
|
-
widget: o.widget === "Link" ?
|
|
174
|
+
widget: o.widget === "Link" ? ee.Link : ee.Submit,
|
|
175
175
|
location: o.location,
|
|
176
176
|
attributeType: o.attributeType,
|
|
177
177
|
readonly: o.readonly,
|
|
@@ -214,11 +214,11 @@ function kt(t, n, a) {
|
|
|
214
214
|
}), e;
|
|
215
215
|
}
|
|
216
216
|
const ke = async (t, n, a, e) => {
|
|
217
|
-
const l = await (await
|
|
217
|
+
const l = await (await K()).get(`/General/${n}/${t}/page`, { params: e });
|
|
218
218
|
return kt(l?.data, t, a);
|
|
219
|
-
}, Je = async (t, n, a) => (await (await
|
|
219
|
+
}, Je = async (t, n, a) => (await (await K()).post(`/${n}/${t}/button/List`, null, { params: a }))?.data;
|
|
220
220
|
async function Ct(t, n) {
|
|
221
|
-
const e = await (await
|
|
221
|
+
const e = await (await K()).post(`/General/${t}/list`, n);
|
|
222
222
|
return {
|
|
223
223
|
data: e.data.data,
|
|
224
224
|
totalCount: e.data.totalCount
|
|
@@ -238,14 +238,14 @@ async function Ct(t, n) {
|
|
|
238
238
|
};
|
|
239
239
|
}
|
|
240
240
|
async function St(t, n, a) {
|
|
241
|
-
return (await (await
|
|
241
|
+
return (await (await K()).post(a, n, {
|
|
242
242
|
params: {
|
|
243
243
|
className: t
|
|
244
244
|
}
|
|
245
245
|
})).data;
|
|
246
246
|
}
|
|
247
247
|
async function xt(t, n, a, e) {
|
|
248
|
-
const o = await
|
|
248
|
+
const o = await K(), l = Re(e, n);
|
|
249
249
|
return (await o.put(l, a))?.data;
|
|
250
250
|
}
|
|
251
251
|
function Re(t, n) {
|
|
@@ -267,19 +267,19 @@ function Ut(t, n) {
|
|
|
267
267
|
return t.replace(/{ClassName}/g, encodeURIComponent(n));
|
|
268
268
|
}
|
|
269
269
|
async function Pt(t, n, a, e, o, l, s, c) {
|
|
270
|
-
const i = await
|
|
270
|
+
const i = await K();
|
|
271
271
|
let r = Re(l, n);
|
|
272
272
|
return r = Vt(r, a), r = At(r, e), r = It(r, s), r = Tt(r, c), r = Ut(r, t), (await i.put(r, o))?.data;
|
|
273
273
|
}
|
|
274
274
|
async function Dt(t, n) {
|
|
275
|
-
const o = (await (await
|
|
275
|
+
const o = (await (await K()).get(t, { params: { value: n } }))?.data;
|
|
276
276
|
return Object.entries(o).map(([l, s]) => ({
|
|
277
277
|
value: l,
|
|
278
278
|
label: s
|
|
279
279
|
}));
|
|
280
280
|
}
|
|
281
281
|
async function Nt(t, n) {
|
|
282
|
-
return (await (await
|
|
282
|
+
return (await (await K()).get(`/General/${t}/${n}/process`))?.data;
|
|
283
283
|
}
|
|
284
284
|
function Ht(t) {
|
|
285
285
|
return {
|
|
@@ -289,40 +289,40 @@ function Ht(t) {
|
|
|
289
289
|
};
|
|
290
290
|
}
|
|
291
291
|
async function Xe(t, n) {
|
|
292
|
-
return (await (await
|
|
292
|
+
return (await (await K()).get(`/General/${t}/${n}/upload/get`))?.data.reduce((l, s) => {
|
|
293
293
|
const { category: c } = s;
|
|
294
294
|
return l[c] || (l[c] = []), l[c].push(Ht(s)), l;
|
|
295
295
|
}, {});
|
|
296
296
|
}
|
|
297
|
-
async function
|
|
298
|
-
return (await
|
|
297
|
+
async function Ft(t, n) {
|
|
298
|
+
return (await K()).post(`/General/${t}/${n}/delete/attachment`);
|
|
299
299
|
}
|
|
300
|
-
async function
|
|
301
|
-
const n = await (await
|
|
300
|
+
async function Lt() {
|
|
301
|
+
const n = await (await K()).get("/Grading/dropdown/approvers");
|
|
302
302
|
return Object.entries(n?.data).map(([a, e]) => ({
|
|
303
303
|
label: a,
|
|
304
304
|
value: e
|
|
305
305
|
}));
|
|
306
306
|
}
|
|
307
307
|
async function Rt(t, n) {
|
|
308
|
-
return await (await
|
|
308
|
+
return await (await K()).post(`Grading/AssignComments/${t}/${encodeURIComponent(n)}`);
|
|
309
309
|
}
|
|
310
310
|
async function Bt(t, n, a) {
|
|
311
|
-
return await (await
|
|
311
|
+
return await (await K()).post(`Grading/AddComments/${t}/${encodeURIComponent(n)}`, a, {
|
|
312
312
|
headers: { "Content-Type": "application/json;charset=UTF-8" }
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
315
|
async function $e(t) {
|
|
316
|
-
return (await (await
|
|
316
|
+
return (await (await K()).get(`Grading/GetComments/${t}`))?.data;
|
|
317
317
|
}
|
|
318
318
|
async function Ue(t) {
|
|
319
|
-
return (await (await
|
|
319
|
+
return (await (await K()).get(`Grading/GetAssociator/${t}`))?.data;
|
|
320
320
|
}
|
|
321
321
|
async function jt(t) {
|
|
322
|
-
return await (await
|
|
322
|
+
return await (await K()).delete(`Grading/DeleteAssociator/${t}`);
|
|
323
323
|
}
|
|
324
324
|
async function Mt(t, n = null) {
|
|
325
|
-
const e = await (await
|
|
325
|
+
const e = await (await K()).post(t, n, {
|
|
326
326
|
responseType: "blob"
|
|
327
327
|
});
|
|
328
328
|
mt(e?.data, "WorkflowData.xlsx");
|
|
@@ -357,9 +357,9 @@ const ge = (t, n) => {
|
|
|
357
357
|
const e = t, o = a, l = ye(t, "modelValue"), s = (u) => ge(e.validations, u), c = (u) => {
|
|
358
358
|
o("input", u);
|
|
359
359
|
}, i = (u) => {
|
|
360
|
-
const
|
|
361
|
-
o("error",
|
|
362
|
-
|
|
360
|
+
const g = s(u);
|
|
361
|
+
o("error", g.res ? "" : g.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((_) => {
|
|
362
|
+
_.event === "change" && o(_.event, _.handlerName, u);
|
|
363
363
|
});
|
|
364
364
|
};
|
|
365
365
|
n({
|
|
@@ -371,15 +371,15 @@ const ge = (t, n) => {
|
|
|
371
371
|
const r = { props: e, emits: o, model: l, validate: s, inputHandler: c, changeHandler: i };
|
|
372
372
|
return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
|
|
373
373
|
}
|
|
374
|
-
}),
|
|
374
|
+
}), X = (t, n) => {
|
|
375
375
|
const a = t.__vccOpts || t;
|
|
376
376
|
for (const [e, o] of n)
|
|
377
377
|
a[e] = o;
|
|
378
378
|
return a;
|
|
379
379
|
};
|
|
380
380
|
function Kt(t, n, a, e, o, l) {
|
|
381
|
-
const s =
|
|
382
|
-
return d(),
|
|
381
|
+
const s = S("AInput");
|
|
382
|
+
return d(), P(s, {
|
|
383
383
|
modelValue: e.model,
|
|
384
384
|
"onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
|
|
385
385
|
"allow-clear": "",
|
|
@@ -388,7 +388,7 @@ function Kt(t, n, a, e, o, l) {
|
|
|
388
388
|
onChange: e.changeHandler
|
|
389
389
|
}, null, 8, ["modelValue", "disabled"]);
|
|
390
390
|
}
|
|
391
|
-
const Ke = /* @__PURE__ */
|
|
391
|
+
const Ke = /* @__PURE__ */ X($t, [["render", Kt], ["__file", "InputText.vue"]]), zt = /* @__PURE__ */ q({
|
|
392
392
|
__name: "InputNumber",
|
|
393
393
|
props: /* @__PURE__ */ ie({
|
|
394
394
|
fieldKey: {},
|
|
@@ -403,33 +403,33 @@ const Ke = /* @__PURE__ */ Z($t, [["render", Kt], ["__file", "InputText.vue"]]),
|
|
|
403
403
|
}),
|
|
404
404
|
emits: /* @__PURE__ */ ie(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
405
405
|
setup(t, { expose: n, emit: a }) {
|
|
406
|
-
const e = t, o = a, l = ye(t, "modelValue"), s =
|
|
406
|
+
const e = t, o = a, l = ye(t, "modelValue"), s = m(100), c = m(1);
|
|
407
407
|
ce(() => {
|
|
408
|
-
e.validations && e.validations.forEach((
|
|
409
|
-
|
|
408
|
+
e.validations && e.validations.forEach((_) => {
|
|
409
|
+
_.ruleName === "Max" && (s.value = _.ruleParameter), _.ruleName === "Min" && (c.value = _.ruleParameter);
|
|
410
410
|
});
|
|
411
411
|
});
|
|
412
|
-
const i = (
|
|
413
|
-
o("input",
|
|
414
|
-
}, u = (
|
|
415
|
-
const b = i(
|
|
412
|
+
const i = (_) => ge(e.validations, _), r = (_) => {
|
|
413
|
+
o("input", _);
|
|
414
|
+
}, u = (_) => {
|
|
415
|
+
const b = i(_);
|
|
416
416
|
o("error", b.res ? "" : b.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((p) => {
|
|
417
|
-
p.event === "change" && o(p.event, p.handlerName,
|
|
417
|
+
p.event === "change" && o(p.event, p.handlerName, _);
|
|
418
418
|
});
|
|
419
419
|
};
|
|
420
420
|
n({
|
|
421
421
|
validate() {
|
|
422
|
-
const
|
|
423
|
-
return o("error",
|
|
422
|
+
const _ = i(e.modelValue);
|
|
423
|
+
return o("error", _.res ? "" : _.errorMessages), _.res;
|
|
424
424
|
}
|
|
425
425
|
});
|
|
426
|
-
const
|
|
427
|
-
return Object.defineProperty(
|
|
426
|
+
const g = { props: e, emits: o, model: l, max: s, min: c, validate: i, inputHandler: r, changeHandler: u };
|
|
427
|
+
return Object.defineProperty(g, "__isScriptSetup", { enumerable: !1, value: !0 }), g;
|
|
428
428
|
}
|
|
429
429
|
});
|
|
430
430
|
function Gt(t, n, a, e, o, l) {
|
|
431
|
-
const s =
|
|
432
|
-
return d(),
|
|
431
|
+
const s = S("AInputNumber");
|
|
432
|
+
return d(), P(s, {
|
|
433
433
|
modelValue: e.model,
|
|
434
434
|
"onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
|
|
435
435
|
clearable: "",
|
|
@@ -439,7 +439,7 @@ function Gt(t, n, a, e, o, l) {
|
|
|
439
439
|
onChange: e.changeHandler
|
|
440
440
|
}, null, 8, ["modelValue", "disabled", "min"]);
|
|
441
441
|
}
|
|
442
|
-
const Wt = /* @__PURE__ */
|
|
442
|
+
const Wt = /* @__PURE__ */ X(zt, [["render", Gt], ["__file", "InputNumber.vue"]]), qt = /* @__PURE__ */ q({
|
|
443
443
|
__name: "SelectList",
|
|
444
444
|
props: /* @__PURE__ */ ie({
|
|
445
445
|
fieldKey: {},
|
|
@@ -454,12 +454,12 @@ const Wt = /* @__PURE__ */ Z(zt, [["render", Gt], ["__file", "InputNumber.vue"]]
|
|
|
454
454
|
}),
|
|
455
455
|
emits: /* @__PURE__ */ ie(["update:modelValue", "change"], ["update:modelValue"]),
|
|
456
456
|
setup(t, { expose: n, emit: a }) {
|
|
457
|
-
const e = t, o = a, l =
|
|
457
|
+
const e = t, o = a, l = m(!1), s = m(e.config.options ?? []), c = ye(t, "modelValue"), i = (b) => ge(e.validations, b), r = Z(() => {
|
|
458
458
|
const b = {};
|
|
459
459
|
return e.triggers && e.triggers.length > 0 && e.triggers.forEach((p) => {
|
|
460
|
-
b[p.event] = (
|
|
461
|
-
o(p.event, p.handlerName,
|
|
462
|
-
const f = i(
|
|
460
|
+
b[p.event] = (w) => {
|
|
461
|
+
o(p.event, p.handlerName, w);
|
|
462
|
+
const f = i(w);
|
|
463
463
|
o("error", f.res ? "" : f.errorMessages);
|
|
464
464
|
};
|
|
465
465
|
}), b;
|
|
@@ -467,11 +467,11 @@ const Wt = /* @__PURE__ */ Z(zt, [["render", Gt], ["__file", "InputNumber.vue"]]
|
|
|
467
467
|
e.config.dataSourceProvider && (s.value = await Dt(e.config.dataSourceProvider));
|
|
468
468
|
};
|
|
469
469
|
ce(u);
|
|
470
|
-
const
|
|
470
|
+
const g = (b) => {
|
|
471
471
|
o("update:modelValue", b);
|
|
472
472
|
const p = i(b);
|
|
473
|
-
o("error", p.res ? "" : p.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((
|
|
474
|
-
|
|
473
|
+
o("error", p.res ? "" : p.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((w) => {
|
|
474
|
+
w.event === "change" && o(w.event, w.handlerName, b);
|
|
475
475
|
});
|
|
476
476
|
};
|
|
477
477
|
n({
|
|
@@ -480,13 +480,13 @@ const Wt = /* @__PURE__ */ Z(zt, [["render", Gt], ["__file", "InputNumber.vue"]]
|
|
|
480
480
|
return o("error", b.res ? "" : b.errorMessages), b.res;
|
|
481
481
|
}
|
|
482
482
|
});
|
|
483
|
-
const
|
|
484
|
-
return Object.defineProperty(
|
|
483
|
+
const _ = { props: e, emits: o, loading: l, _options: s, model: c, validate: i, eventHandlers: r, loadOptions: u, changeHandler: g };
|
|
484
|
+
return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
|
|
485
485
|
}
|
|
486
486
|
});
|
|
487
487
|
function Yt(t, n, a, e, o, l) {
|
|
488
|
-
const s =
|
|
489
|
-
return d(),
|
|
488
|
+
const s = S("AOption"), c = S("ASelect");
|
|
489
|
+
return d(), P(c, {
|
|
490
490
|
"allow-clear": "",
|
|
491
491
|
modelValue: e.model,
|
|
492
492
|
"onUpdate:modelValue": n[0] || (n[0] = (i) => e.model = i),
|
|
@@ -497,7 +497,7 @@ function Yt(t, n, a, e, o, l) {
|
|
|
497
497
|
onChange: e.changeHandler
|
|
498
498
|
}, {
|
|
499
499
|
default: v(() => [
|
|
500
|
-
(d(!0),
|
|
500
|
+
(d(!0), C(j, null, $(e._options, (i) => (d(), P(s, {
|
|
501
501
|
key: i.value,
|
|
502
502
|
value: i.value,
|
|
503
503
|
label: i.label
|
|
@@ -506,7 +506,7 @@ function Yt(t, n, a, e, o, l) {
|
|
|
506
506
|
_: 1
|
|
507
507
|
}, 8, ["modelValue", "loading", "disabled"]);
|
|
508
508
|
}
|
|
509
|
-
const ze = /* @__PURE__ */
|
|
509
|
+
const ze = /* @__PURE__ */ X(qt, [["render", Yt], ["__file", "SelectList.vue"]]), Jt = /* @__PURE__ */ q({
|
|
510
510
|
__name: "Cascader",
|
|
511
511
|
props: {
|
|
512
512
|
modelValue: {},
|
|
@@ -514,15 +514,15 @@ const ze = /* @__PURE__ */ Z(qt, [["render", Yt], ["__file", "SelectList.vue"]])
|
|
|
514
514
|
},
|
|
515
515
|
emits: ["update:modelValue", "change"],
|
|
516
516
|
setup(t, { expose: n, emit: a }) {
|
|
517
|
-
const e = t, o = a, l =
|
|
517
|
+
const e = t, o = a, l = m(e.config.options ?? []), s = (r) => {
|
|
518
518
|
o("update:modelValue", r), o("change", r);
|
|
519
519
|
};
|
|
520
520
|
ce(async () => {
|
|
521
521
|
if (e.config) {
|
|
522
522
|
const r = e.config.dataSourceProvider;
|
|
523
523
|
if (r) {
|
|
524
|
-
const
|
|
525
|
-
l.value =
|
|
524
|
+
const g = await (await K()).get(r);
|
|
525
|
+
l.value = g.data;
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
});
|
|
@@ -537,13 +537,13 @@ const ze = /* @__PURE__ */ Z(qt, [["render", Yt], ["__file", "SelectList.vue"]])
|
|
|
537
537
|
}
|
|
538
538
|
});
|
|
539
539
|
function Xt(t, n, a, e, o, l) {
|
|
540
|
-
const s =
|
|
541
|
-
return d(),
|
|
540
|
+
const s = S("ACascader"), c = S("ASpace");
|
|
541
|
+
return d(), P(c, {
|
|
542
542
|
direction: "vertical",
|
|
543
543
|
size: "large"
|
|
544
544
|
}, {
|
|
545
545
|
default: v(() => [
|
|
546
|
-
|
|
546
|
+
D(s, {
|
|
547
547
|
"field-names": e.fieldNames,
|
|
548
548
|
"model-value": a.modelValue,
|
|
549
549
|
options: e._options,
|
|
@@ -555,7 +555,7 @@ function Xt(t, n, a, e, o, l) {
|
|
|
555
555
|
_: 1
|
|
556
556
|
});
|
|
557
557
|
}
|
|
558
|
-
const Qt = /* @__PURE__ */
|
|
558
|
+
const Qt = /* @__PURE__ */ X(Jt, [["render", Xt], ["__file", "Cascader.vue"]]), Zt = /* @__PURE__ */ q({
|
|
559
559
|
__name: "FileUpload",
|
|
560
560
|
props: {
|
|
561
561
|
className: {},
|
|
@@ -568,59 +568,54 @@ const Qt = /* @__PURE__ */ Z(Jt, [["render", Xt], ["__file", "Cascader.vue"]]),
|
|
|
568
568
|
},
|
|
569
569
|
emits: ["update:modelValue", "change", "error", "input"],
|
|
570
570
|
setup(t, { expose: n, emit: a }) {
|
|
571
|
-
const e = t, o = a, l =
|
|
571
|
+
const e = t, o = a, l = m({});
|
|
572
572
|
ce(async () => {
|
|
573
573
|
const h = await qe();
|
|
574
574
|
l.value = {
|
|
575
575
|
Authorization: `Bearer ${h}`
|
|
576
576
|
};
|
|
577
577
|
});
|
|
578
|
-
const s = (h) => ge(e.validations, h), c =
|
|
579
|
-
function
|
|
580
|
-
return h.replace(/{WorkflowId}/g,
|
|
578
|
+
const s = (h) => ge(e.validations, h), c = Le(), i = c.apiBase, r = m(null), u = m("");
|
|
579
|
+
function g(h, I, x) {
|
|
580
|
+
return h.replace(/{WorkflowId}/g, I).replace(/{ClassName}/g, x);
|
|
581
581
|
}
|
|
582
|
-
const
|
|
582
|
+
const _ = Z(() => {
|
|
583
583
|
if (e.config.uploadURL) {
|
|
584
584
|
const h = i + e.config.uploadURL;
|
|
585
|
-
return
|
|
585
|
+
return g(h, u.value, e.className);
|
|
586
586
|
}
|
|
587
587
|
return "";
|
|
588
588
|
}), b = (h) => {
|
|
589
589
|
h.stopPropagation(), r.value.submit();
|
|
590
590
|
};
|
|
591
591
|
function p(h) {
|
|
592
|
-
const { file:
|
|
593
|
-
return new Promise((
|
|
592
|
+
const { file: I, name: x } = h, V = x ?? I.name;
|
|
593
|
+
return new Promise((y, N) => {
|
|
594
594
|
ct.confirm({
|
|
595
595
|
title: "Confirm Delete",
|
|
596
|
-
content: `Are you sure you want to delete ${
|
|
596
|
+
content: `Are you sure you want to delete ${V}?`,
|
|
597
597
|
async onOk() {
|
|
598
598
|
if (h.status !== "init" && e.config.removeFile)
|
|
599
|
-
return await e.config.removeFile(h.uid),
|
|
600
|
-
|
|
599
|
+
return await e.config.removeFile(h.uid), y(!0);
|
|
600
|
+
y(!0);
|
|
601
601
|
},
|
|
602
|
-
onCancel: () =>
|
|
602
|
+
onCancel: () => N("cancel")
|
|
603
603
|
});
|
|
604
604
|
});
|
|
605
605
|
}
|
|
606
|
-
const
|
|
607
|
-
|
|
606
|
+
const w = m(null), f = m(null), L = (h) => {
|
|
607
|
+
w.value && (w.value(h), w.value = null, f.value = null);
|
|
608
608
|
}, Y = (h) => {
|
|
609
|
-
f.value && (f.value(h),
|
|
609
|
+
f.value && (f.value(h), w.value = null, f.value = null);
|
|
610
|
+
}, z = m([]), te = (h) => {
|
|
611
|
+
z.value = h.filter((I) => I.status === "init");
|
|
610
612
|
};
|
|
611
613
|
n({
|
|
612
614
|
submit(h) {
|
|
613
|
-
return new Promise((
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
return;
|
|
618
|
-
}
|
|
619
|
-
y.value = M, f.value = X, ot(() => {
|
|
620
|
-
r.value?.submit();
|
|
621
|
-
});
|
|
622
|
-
} else
|
|
623
|
-
M(h);
|
|
615
|
+
return new Promise((I, x) => {
|
|
616
|
+
r.value ? (e.config.uploadURL && (u.value = h), w.value = I, f.value = x, z.value.length ? ot(() => {
|
|
617
|
+
r.value?.submit();
|
|
618
|
+
}) : I(h)) : I(h);
|
|
624
619
|
});
|
|
625
620
|
},
|
|
626
621
|
validate() {
|
|
@@ -628,13 +623,13 @@ const Qt = /* @__PURE__ */ Z(Jt, [["render", Xt], ["__file", "Cascader.vue"]]),
|
|
|
628
623
|
return o("error", h.res ? "" : h.errorMessages), h.res;
|
|
629
624
|
}
|
|
630
625
|
});
|
|
631
|
-
const
|
|
632
|
-
return Object.defineProperty(
|
|
626
|
+
const oe = { props: e, emits: o, headers: l, validate: s, config: c, ApiBase: i, uploadRef: r, id: u, replaceIdAndClassName: g, action: _, submit: b, onBeforeRemove: p, uploadPromiseResolve: w, uploadPromiseReject: f, handleUploadSuccess: L, handleUploadError: Y, readyFiles: z, onChange: te };
|
|
627
|
+
return Object.defineProperty(oe, "__isScriptSetup", { enumerable: !1, value: !0 }), oe;
|
|
633
628
|
}
|
|
634
629
|
});
|
|
635
630
|
function en(t, n, a, e, o, l) {
|
|
636
|
-
const s =
|
|
637
|
-
return d(),
|
|
631
|
+
const s = S("a-button"), c = S("a-upload");
|
|
632
|
+
return d(), P(c, {
|
|
638
633
|
ref: "uploadRef",
|
|
639
634
|
"default-file-list": e.props.config.files,
|
|
640
635
|
action: e.action,
|
|
@@ -642,15 +637,16 @@ function en(t, n, a, e, o, l) {
|
|
|
642
637
|
"auto-upload": !1,
|
|
643
638
|
name: "files",
|
|
644
639
|
headers: e.headers,
|
|
640
|
+
onChange: e.onChange,
|
|
645
641
|
onBeforeRemove: e.onBeforeRemove,
|
|
646
642
|
onSuccess: e.handleUploadSuccess,
|
|
647
643
|
onError: e.handleUploadError
|
|
648
644
|
}, {
|
|
649
645
|
"start-icon": v(() => n[0] || (n[0] = [])),
|
|
650
646
|
"upload-button": v(() => [
|
|
651
|
-
|
|
647
|
+
D(s, { type: "primary" }, {
|
|
652
648
|
default: v(() => n[1] || (n[1] = [
|
|
653
|
-
|
|
649
|
+
J("Select File", -1)
|
|
654
650
|
])),
|
|
655
651
|
_: 1,
|
|
656
652
|
__: [1]
|
|
@@ -659,7 +655,7 @@ function en(t, n, a, e, o, l) {
|
|
|
659
655
|
_: 1
|
|
660
656
|
}, 8, ["default-file-list", "action", "limit", "headers"]);
|
|
661
657
|
}
|
|
662
|
-
const tn = /* @__PURE__ */
|
|
658
|
+
const tn = /* @__PURE__ */ X(Zt, [["render", en], ["__file", "FileUpload.vue"]]), nn = /* @__PURE__ */ q({
|
|
663
659
|
__name: "TextArea",
|
|
664
660
|
props: {
|
|
665
661
|
fieldKey: {},
|
|
@@ -676,8 +672,8 @@ const tn = /* @__PURE__ */ Z(Zt, [["render", en], ["__file", "FileUpload.vue"]])
|
|
|
676
672
|
}, c = (r) => {
|
|
677
673
|
o("update:modelValue", r);
|
|
678
674
|
const u = l(r);
|
|
679
|
-
o("error", u.res ? "" : u.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((
|
|
680
|
-
|
|
675
|
+
o("error", u.res ? "" : u.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((g) => {
|
|
676
|
+
g.event === "change" && o(g.event, g.handlerName, r);
|
|
681
677
|
});
|
|
682
678
|
};
|
|
683
679
|
n({
|
|
@@ -691,8 +687,8 @@ const tn = /* @__PURE__ */ Z(Zt, [["render", en], ["__file", "FileUpload.vue"]])
|
|
|
691
687
|
}
|
|
692
688
|
});
|
|
693
689
|
function on(t, n, a, e, o, l) {
|
|
694
|
-
const s =
|
|
695
|
-
return d(),
|
|
690
|
+
const s = S("ATextarea");
|
|
691
|
+
return d(), P(s, {
|
|
696
692
|
"model-value": e.props.modelValue,
|
|
697
693
|
placeholder: "Please enter something",
|
|
698
694
|
"allow-clear": "",
|
|
@@ -701,7 +697,7 @@ function on(t, n, a, e, o, l) {
|
|
|
701
697
|
onChange: e.changeHandler
|
|
702
698
|
}, null, 8, ["model-value", "disabled"]);
|
|
703
699
|
}
|
|
704
|
-
const an = /* @__PURE__ */
|
|
700
|
+
const an = /* @__PURE__ */ X(nn, [["render", on], ["__file", "TextArea.vue"]]), rn = /* @__PURE__ */ q({
|
|
705
701
|
__name: "CheckBox",
|
|
706
702
|
props: /* @__PURE__ */ ie({
|
|
707
703
|
fieldKey: {},
|
|
@@ -718,8 +714,8 @@ const an = /* @__PURE__ */ Z(nn, [["render", on], ["__file", "TextArea.vue"]]),
|
|
|
718
714
|
setup(t, { expose: n, emit: a }) {
|
|
719
715
|
const e = t, o = a, l = ye(t, "modelValue"), s = (r) => ge(e.validations, r), c = (r) => {
|
|
720
716
|
const u = s(r);
|
|
721
|
-
o("error", u.res ? "" : u.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((
|
|
722
|
-
|
|
717
|
+
o("error", u.res ? "" : u.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((g) => {
|
|
718
|
+
g.event === "change" && o(g.event, g.handlerName, r);
|
|
723
719
|
});
|
|
724
720
|
};
|
|
725
721
|
n({
|
|
@@ -733,8 +729,8 @@ const an = /* @__PURE__ */ Z(nn, [["render", on], ["__file", "TextArea.vue"]]),
|
|
|
733
729
|
}
|
|
734
730
|
});
|
|
735
731
|
function sn(t, n, a, e, o, l) {
|
|
736
|
-
const s =
|
|
737
|
-
return d(),
|
|
732
|
+
const s = S("ACheckbox");
|
|
733
|
+
return d(), P(s, {
|
|
738
734
|
modelValue: e.model,
|
|
739
735
|
"onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
|
|
740
736
|
clearable: "",
|
|
@@ -742,13 +738,13 @@ function sn(t, n, a, e, o, l) {
|
|
|
742
738
|
onChange: e.changeHandler
|
|
743
739
|
}, {
|
|
744
740
|
default: v(() => n[1] || (n[1] = [
|
|
745
|
-
|
|
741
|
+
J("Yes", -1)
|
|
746
742
|
])),
|
|
747
743
|
_: 1,
|
|
748
744
|
__: [1]
|
|
749
745
|
}, 8, ["modelValue", "disabled"]);
|
|
750
746
|
}
|
|
751
|
-
const ln = /* @__PURE__ */
|
|
747
|
+
const ln = /* @__PURE__ */ X(rn, [["render", sn], ["__file", "CheckBox.vue"]]), cn = /* @__PURE__ */ q({
|
|
752
748
|
__name: "index",
|
|
753
749
|
props: /* @__PURE__ */ ie({
|
|
754
750
|
config: {},
|
|
@@ -764,7 +760,7 @@ const ln = /* @__PURE__ */ Z(rn, [["render", sn], ["__file", "CheckBox.vue"]]),
|
|
|
764
760
|
}),
|
|
765
761
|
emits: /* @__PURE__ */ ie(["update:modelValue", "change", "error"], ["update:modelValue"]),
|
|
766
762
|
setup(t, { expose: n, emit: a }) {
|
|
767
|
-
const e = t, o = a, l = ye(t, "modelValue"), s = Ne("widgetRef"), c =
|
|
763
|
+
const e = t, o = a, l = ye(t, "modelValue"), s = Ne("widgetRef"), c = Z(() => {
|
|
768
764
|
switch (e.config?.widget?.widget) {
|
|
769
765
|
case "TextBox":
|
|
770
766
|
return Ke;
|
|
@@ -785,12 +781,12 @@ const ln = /* @__PURE__ */ Z(rn, [["render", sn], ["__file", "CheckBox.vue"]]),
|
|
|
785
781
|
default:
|
|
786
782
|
return Ke;
|
|
787
783
|
}
|
|
788
|
-
}), i =
|
|
784
|
+
}), i = m(""), r = (b) => {
|
|
789
785
|
i.value = b;
|
|
790
786
|
}, u = (b, p) => {
|
|
791
787
|
o("change", b, p);
|
|
792
788
|
};
|
|
793
|
-
function
|
|
789
|
+
function g() {
|
|
794
790
|
return e.config?.widget?.widget === "File";
|
|
795
791
|
}
|
|
796
792
|
n({
|
|
@@ -798,7 +794,7 @@ const ln = /* @__PURE__ */ Z(rn, [["render", sn], ["__file", "CheckBox.vue"]]),
|
|
|
798
794
|
return e.config?.widget?.widget === "File";
|
|
799
795
|
},
|
|
800
796
|
submit(b) {
|
|
801
|
-
return
|
|
797
|
+
return g() ? s.value.submit(b) : Promise.resolve(b);
|
|
802
798
|
},
|
|
803
799
|
validate() {
|
|
804
800
|
return s.value?.validate();
|
|
@@ -807,8 +803,8 @@ const ln = /* @__PURE__ */ Z(rn, [["render", sn], ["__file", "CheckBox.vue"]]),
|
|
|
807
803
|
return e?.config?.widget?.title;
|
|
808
804
|
}
|
|
809
805
|
});
|
|
810
|
-
const
|
|
811
|
-
return Object.defineProperty(
|
|
806
|
+
const _ = { props: e, emits: o, model: l, widgetRef: s, curComp: c, errMsg: i, errHandler: r, changeHandler: u, isFileUpload: g };
|
|
807
|
+
return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
|
|
812
808
|
}
|
|
813
809
|
}), dn = { class: "title" }, un = {
|
|
814
810
|
key: 0,
|
|
@@ -818,13 +814,13 @@ const ln = /* @__PURE__ */ Z(rn, [["render", sn], ["__file", "CheckBox.vue"]]),
|
|
|
818
814
|
class: "err-msg"
|
|
819
815
|
};
|
|
820
816
|
function pn(t, n, a, e, o, l) {
|
|
821
|
-
return d(),
|
|
822
|
-
|
|
823
|
-
Q(
|
|
824
|
-
e.props.config.validations.length ? (d(),
|
|
817
|
+
return d(), C("div", null, [
|
|
818
|
+
A("div", dn, [
|
|
819
|
+
J(Q(e.props?.config?.widget?.title) + " ", 1),
|
|
820
|
+
e.props.config.validations.length ? (d(), C("span", un, "*")) : se("", !0)
|
|
825
821
|
]),
|
|
826
|
-
|
|
827
|
-
(d(),
|
|
822
|
+
A("div", null, [
|
|
823
|
+
(d(), P(He(e.curComp), {
|
|
828
824
|
ref: "widgetRef",
|
|
829
825
|
modelValue: e.model,
|
|
830
826
|
"onUpdate:modelValue": n[0] || (n[0] = (s) => e.model = s),
|
|
@@ -836,11 +832,11 @@ function pn(t, n, a, e, o, l) {
|
|
|
836
832
|
onError: e.errHandler,
|
|
837
833
|
onChange: e.changeHandler
|
|
838
834
|
}, null, 40, ["modelValue", "field-key", "config", "validations", "triggers", "class-name"])),
|
|
839
|
-
e.errMsg.length > 0 ? (d(),
|
|
835
|
+
e.errMsg.length > 0 ? (d(), C("div", fn, Q(e.errMsg), 1)) : se("", !0)
|
|
840
836
|
])
|
|
841
837
|
]);
|
|
842
838
|
}
|
|
843
|
-
const Be = /* @__PURE__ */
|
|
839
|
+
const Be = /* @__PURE__ */ X(cn, [["render", pn], ["__scopeId", "data-v-4bc9e33b"], ["__file", "index.vue"]]), mn = /* @__PURE__ */ q({
|
|
844
840
|
__name: "SubmitButton",
|
|
845
841
|
props: {
|
|
846
842
|
url: {},
|
|
@@ -859,8 +855,8 @@ const Be = /* @__PURE__ */ Z(cn, [["render", pn], ["__scopeId", "data-v-4bc9e33b
|
|
|
859
855
|
}
|
|
860
856
|
});
|
|
861
857
|
function gn(t, n, a, e, o, l) {
|
|
862
|
-
const s =
|
|
863
|
-
return d(),
|
|
858
|
+
const s = S("AButton");
|
|
859
|
+
return d(), P(s, {
|
|
864
860
|
loading: a.loading,
|
|
865
861
|
type: "primary",
|
|
866
862
|
onClick: e.clickHandler
|
|
@@ -871,7 +867,7 @@ function gn(t, n, a, e, o, l) {
|
|
|
871
867
|
_: 3
|
|
872
868
|
}, 8, ["loading"]);
|
|
873
869
|
}
|
|
874
|
-
const _n = /* @__PURE__ */
|
|
870
|
+
const _n = /* @__PURE__ */ X(mn, [["render", gn], ["__file", "SubmitButton.vue"]]), vn = /* @__PURE__ */ q({
|
|
875
871
|
__name: "DetailLink",
|
|
876
872
|
props: {
|
|
877
873
|
url: {},
|
|
@@ -890,15 +886,15 @@ const _n = /* @__PURE__ */ Z(mn, [["render", gn], ["__file", "SubmitButton.vue"]
|
|
|
890
886
|
}
|
|
891
887
|
});
|
|
892
888
|
function bn(t, n, a, e, o, l) {
|
|
893
|
-
const s =
|
|
894
|
-
return d(),
|
|
889
|
+
const s = S("ALink");
|
|
890
|
+
return d(), P(s, { onClick: e.clickHandler }, {
|
|
895
891
|
default: v(() => [
|
|
896
892
|
le(t.$slots, "default")
|
|
897
893
|
]),
|
|
898
894
|
_: 3
|
|
899
895
|
});
|
|
900
896
|
}
|
|
901
|
-
const yn = /* @__PURE__ */
|
|
897
|
+
const yn = /* @__PURE__ */ X(vn, [["render", bn], ["__file", "DetailLink.vue"]]), wn = /* @__PURE__ */ q({
|
|
902
898
|
__name: "index",
|
|
903
899
|
props: {
|
|
904
900
|
config: {},
|
|
@@ -908,10 +904,10 @@ const yn = /* @__PURE__ */ Z(vn, [["render", bn], ["__file", "DetailLink.vue"]])
|
|
|
908
904
|
setup(t, { expose: n, emit: a }) {
|
|
909
905
|
n();
|
|
910
906
|
const e = t, o = a;
|
|
911
|
-
function l(u,
|
|
912
|
-
o("click", e.config.widget, u,
|
|
907
|
+
function l(u, g) {
|
|
908
|
+
o("click", e.config.widget, u, g, e.config.title);
|
|
913
909
|
}
|
|
914
|
-
const s =
|
|
910
|
+
const s = Z(() => {
|
|
915
911
|
switch (e.config.location) {
|
|
916
912
|
case "InOperation":
|
|
917
913
|
return _n;
|
|
@@ -919,24 +915,24 @@ const yn = /* @__PURE__ */ Z(vn, [["render", bn], ["__file", "DetailLink.vue"]])
|
|
|
919
915
|
default:
|
|
920
916
|
return yn;
|
|
921
917
|
}
|
|
922
|
-
}), c =
|
|
918
|
+
}), c = Z(() => e.config.widget === ee.Submit ? e.config.requestUrl ?? "" : e.config.widget === ee.Link ? e.config.redirectUrl ?? "" : ""), i = Z(() => e.config.redirectType ?? "Details"), r = { props: e, emits: o, clickHandler: l, curComp: s, curUrl: c, redirectType: i };
|
|
923
919
|
return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
|
|
924
920
|
}
|
|
925
921
|
});
|
|
926
922
|
function hn(t, n, a, e, o, l) {
|
|
927
|
-
return d(),
|
|
923
|
+
return d(), P(He(e.curComp), {
|
|
928
924
|
url: e.curUrl,
|
|
929
925
|
"redirect-type": e.redirectType,
|
|
930
926
|
loading: a.loading,
|
|
931
927
|
onClick: e.clickHandler
|
|
932
928
|
}, {
|
|
933
929
|
default: v(() => [
|
|
934
|
-
Q(
|
|
930
|
+
J(Q(e.props.config.title), 1)
|
|
935
931
|
]),
|
|
936
932
|
_: 1
|
|
937
933
|
}, 8, ["url", "redirect-type", "loading"]);
|
|
938
934
|
}
|
|
939
|
-
const Ce = /* @__PURE__ */
|
|
935
|
+
const Ce = /* @__PURE__ */ X(wn, [["render", hn], ["__file", "index.vue"]]), Qe = Symbol("library-router");
|
|
940
936
|
function Se() {
|
|
941
937
|
const t = me(Qe, null);
|
|
942
938
|
return t || dt();
|
|
@@ -967,25 +963,25 @@ const Cn = /* @__PURE__ */ q({
|
|
|
967
963
|
}
|
|
968
964
|
}), Sn = { class: "top-bar" }, xn = { class: "banner-info" }, Vn = { class: "page-title" }, An = { class: "page-subtitle" }, In = { class: "avatar-wrapper" }, Tn = { class: "user-email" };
|
|
969
965
|
function Un(t, n, a, e, o, l) {
|
|
970
|
-
const s =
|
|
971
|
-
return d(),
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
966
|
+
const s = S("a-avatar"), c = S("a-popover");
|
|
967
|
+
return d(), C("div", Sn, [
|
|
968
|
+
A("div", xn, [
|
|
969
|
+
A("div", Vn, Q(a.title), 1),
|
|
970
|
+
A("div", An, Q(a.subTitle), 1)
|
|
975
971
|
]),
|
|
976
|
-
|
|
977
|
-
|
|
972
|
+
A("div", In, [
|
|
973
|
+
D(c, { trigger: "click" }, {
|
|
978
974
|
content: v(() => [
|
|
979
|
-
|
|
975
|
+
A("div", Tn, Q(a.email), 1)
|
|
980
976
|
]),
|
|
981
977
|
default: v(() => [
|
|
982
|
-
|
|
978
|
+
D(s, {
|
|
983
979
|
size: 48,
|
|
984
980
|
autoFixFontSize: "",
|
|
985
981
|
style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
|
|
986
982
|
}, {
|
|
987
983
|
default: v(() => [
|
|
988
|
-
Q(
|
|
984
|
+
J(Q(a.email.charAt(0).toUpperCase()), 1)
|
|
989
985
|
]),
|
|
990
986
|
_: 1
|
|
991
987
|
})
|
|
@@ -995,9 +991,9 @@ function Un(t, n, a, e, o, l) {
|
|
|
995
991
|
])
|
|
996
992
|
]);
|
|
997
993
|
}
|
|
998
|
-
const Ae = /* @__PURE__ */
|
|
994
|
+
const Ae = /* @__PURE__ */ X(Cn, [["render", Un], ["__scopeId", "data-v-c0457235"], ["__file", "TopBar.vue"]]);
|
|
999
995
|
function Me(t) {
|
|
1000
|
-
const n =
|
|
996
|
+
const n = Le(), a = [];
|
|
1001
997
|
if (n.fieldsGroup) {
|
|
1002
998
|
n.fieldsGroup.forEach((l) => {
|
|
1003
999
|
const s = l.keys.map((c) => t.find((i) => i.fieldKey === c)).filter(Boolean);
|
|
@@ -1014,7 +1010,7 @@ const Pn = /* @__PURE__ */ q({
|
|
|
1014
1010
|
},
|
|
1015
1011
|
setup(t, { expose: n }) {
|
|
1016
1012
|
n();
|
|
1017
|
-
const a = xe(), e = Ve(), o = Se(), l = je(), s = Ne("dataWidgets"), c = pe(), i = t, r =
|
|
1013
|
+
const a = xe(), e = Ve(), o = Se(), l = je(), s = Ne("dataWidgets"), c = pe(), i = t, r = m({
|
|
1018
1014
|
pageType: "",
|
|
1019
1015
|
fields: {},
|
|
1020
1016
|
globalValidations: [],
|
|
@@ -1022,105 +1018,105 @@ const Pn = /* @__PURE__ */ q({
|
|
|
1022
1018
|
title: "",
|
|
1023
1019
|
subTitle: ""
|
|
1024
1020
|
}
|
|
1025
|
-
}), u =
|
|
1026
|
-
function
|
|
1027
|
-
return
|
|
1028
|
-
fieldKey:
|
|
1029
|
-
...
|
|
1030
|
-
})).filter((
|
|
1021
|
+
}), u = m([]), g = m({});
|
|
1022
|
+
function _(x) {
|
|
1023
|
+
return x ? Object.entries(x).map(([y, N]) => ({
|
|
1024
|
+
fieldKey: y,
|
|
1025
|
+
...N
|
|
1026
|
+
})).filter((y) => y.widget && y.widget.widget !== "Hidden").filter((y) => !te.value.includes(y.fieldKey)) : [];
|
|
1031
1027
|
}
|
|
1032
|
-
function b(
|
|
1033
|
-
return
|
|
1028
|
+
function b(x) {
|
|
1029
|
+
return x ? Object.entries(x).filter(([y, N]) => N.dependent).reduce((y, [N, M]) => (y[N] = M.dependent, y), {}) : [];
|
|
1034
1030
|
}
|
|
1035
|
-
const p =
|
|
1031
|
+
const p = Z(() => r.value?.actions ? [...r.value.actions].reverse() : []), w = Fe({}), f = m(!1);
|
|
1036
1032
|
ce(async () => {
|
|
1037
1033
|
f.value = !0, r.value = await ke(fe.Create, i.className, {
|
|
1038
1034
|
svrStore: e,
|
|
1039
1035
|
bpmStore: a
|
|
1040
|
-
}), u.value =
|
|
1041
|
-
for (const
|
|
1042
|
-
if (r.value.fields[
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1036
|
+
}), u.value = _(r.value.fields), g.value = b(r.value.fields);
|
|
1037
|
+
for (const x in r.value.fields) {
|
|
1038
|
+
if (r.value.fields[x].widget?.widget === "File") {
|
|
1039
|
+
const V = u.value.find((y) => y.fieldKey === x);
|
|
1040
|
+
V && V.widget && (V.widget.files = []);
|
|
1045
1041
|
}
|
|
1046
|
-
|
|
1042
|
+
w[x] = r.value.fields[x].modelValue;
|
|
1047
1043
|
}
|
|
1048
1044
|
f.value = !1;
|
|
1049
1045
|
});
|
|
1050
1046
|
function L() {
|
|
1051
1047
|
return e()?.userInfo?.email_address ?? "";
|
|
1052
1048
|
}
|
|
1053
|
-
async function Y(
|
|
1054
|
-
switch (
|
|
1055
|
-
case
|
|
1056
|
-
let
|
|
1049
|
+
async function Y(x, V, y, N, M) {
|
|
1050
|
+
switch (V) {
|
|
1051
|
+
case ee.Submit:
|
|
1052
|
+
let O = !0;
|
|
1057
1053
|
if (s.value?.forEach((G) => {
|
|
1058
|
-
G?.validate && (G.validate() || (
|
|
1059
|
-
}), !
|
|
1054
|
+
G?.validate && (G.validate() || (O = !1));
|
|
1055
|
+
}), !O) {
|
|
1060
1056
|
c?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
1061
1057
|
return;
|
|
1062
1058
|
}
|
|
1063
1059
|
f.value = !0;
|
|
1064
1060
|
try {
|
|
1065
|
-
const G = await St(i.className, { ...
|
|
1061
|
+
const G = await St(i.className, { ...w, ...g.value }, y), ae = s.value?.map((de) => de?.submit ? de.submit(G.toString()) : Promise.resolve()) || [];
|
|
1066
1062
|
await Promise.all(ae), f.value = !1, c?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${G.toString()}.`), o.push({ name: "Details", params: { workflowId: G.toString() } });
|
|
1067
1063
|
} catch {
|
|
1068
1064
|
c?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"), f.value = !1;
|
|
1069
1065
|
}
|
|
1070
1066
|
break;
|
|
1071
|
-
case
|
|
1067
|
+
case ee.Link:
|
|
1072
1068
|
try {
|
|
1073
|
-
await l[
|
|
1069
|
+
await l[x.eventName || ""]?.(w, te), o.push({ name: N, params: { className: i.className } });
|
|
1074
1070
|
} catch (G) {
|
|
1075
1071
|
console.error("Error in link action trigger:", G);
|
|
1076
1072
|
}
|
|
1077
1073
|
break;
|
|
1078
1074
|
default:
|
|
1079
|
-
console.warn("Unknown action type:",
|
|
1075
|
+
console.warn("Unknown action type:", V);
|
|
1080
1076
|
}
|
|
1081
1077
|
}
|
|
1082
|
-
const
|
|
1078
|
+
const z = [
|
|
1083
1079
|
"jobScpope",
|
|
1084
1080
|
"currentWorkdayId",
|
|
1085
1081
|
"originalGrade",
|
|
1086
1082
|
"jobTitlePrevious",
|
|
1087
1083
|
"jobAttachmentPrevious",
|
|
1088
1084
|
"positionId"
|
|
1089
|
-
],
|
|
1090
|
-
function
|
|
1091
|
-
l[
|
|
1085
|
+
], te = m(z);
|
|
1086
|
+
function oe(x, V) {
|
|
1087
|
+
l[x]?.(V, te), r.value && (u.value = _(r.value.fields));
|
|
1092
1088
|
}
|
|
1093
|
-
const
|
|
1094
|
-
return Object.defineProperty(
|
|
1089
|
+
const h = Z(() => Me(u.value)), I = { bpmStore: a, svrStore: e, router: o, triggers: l, dataWidgetsRefs: s, instance: c, props: i, pageData: r, _fields: u, _dependent: g, genField: _, genDependentField: b, reversedActions: p, _data: w, loading: f, getApproverEmail: L, clickHandler: Y, newHiddenFields: z, hiddenFields: te, changeHandler: oe, groupedFields: h, DataWidgets: Be, ActionButton: Ce, TopBar: Ae };
|
|
1090
|
+
return Object.defineProperty(I, "__isScriptSetup", { enumerable: !1, value: !0 }), I;
|
|
1095
1091
|
}
|
|
1096
|
-
}), Dn = { class: "page-container" }, Nn = { class: "page-body" }, Hn = { class: "form-card" },
|
|
1092
|
+
}), Dn = { class: "page-container" }, Nn = { class: "page-body" }, Hn = { class: "form-card" }, Fn = { class: "form-fields-vertical" }, Ln = { class: "form-fields" }, Rn = {
|
|
1097
1093
|
key: 0,
|
|
1098
1094
|
class: "form-content"
|
|
1099
1095
|
}, Bn = { class: "page-footer" }, jn = { class: "action-container" }, Mn = { class: "action-buttons" };
|
|
1100
1096
|
function On(t, n, a, e, o, l) {
|
|
1101
|
-
const s =
|
|
1102
|
-
return d(),
|
|
1103
|
-
|
|
1097
|
+
const s = S("a-card"), c = S("a-spin");
|
|
1098
|
+
return d(), C("div", Dn, [
|
|
1099
|
+
D(e.TopBar, {
|
|
1104
1100
|
title: e.pageData.banner.title,
|
|
1105
1101
|
subTitle: e.pageData.banner.subTitle,
|
|
1106
1102
|
email: e.getApproverEmail()
|
|
1107
1103
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1108
|
-
|
|
1109
|
-
|
|
1104
|
+
A("div", Nn, [
|
|
1105
|
+
D(c, {
|
|
1110
1106
|
loading: e.loading,
|
|
1111
1107
|
class: "form-container"
|
|
1112
1108
|
}, {
|
|
1113
1109
|
default: v(() => [
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
(d(!0),
|
|
1110
|
+
A("div", Hn, [
|
|
1111
|
+
A("div", Fn, [
|
|
1112
|
+
(d(!0), C(j, null, $(e.groupedFields, (i) => (d(), P(s, {
|
|
1117
1113
|
key: i.name,
|
|
1118
1114
|
title: i.name,
|
|
1119
1115
|
style: { "margin-bottom": "24px" }
|
|
1120
1116
|
}, {
|
|
1121
1117
|
default: v(() => [
|
|
1122
|
-
|
|
1123
|
-
(d(!0),
|
|
1118
|
+
A("div", Ln, [
|
|
1119
|
+
(d(!0), C(j, null, $(i.fields, (r) => (d(), P(e.DataWidgets, {
|
|
1124
1120
|
key: r.fieldKey,
|
|
1125
1121
|
ref_for: !0,
|
|
1126
1122
|
ref: "dataWidgets",
|
|
@@ -1137,7 +1133,7 @@ function On(t, n, a, e, o, l) {
|
|
|
1137
1133
|
_: 2
|
|
1138
1134
|
}, 1032, ["title"]))), 128))
|
|
1139
1135
|
]),
|
|
1140
|
-
t.$slots.content ? (d(),
|
|
1136
|
+
t.$slots.content ? (d(), C("div", Rn, [
|
|
1141
1137
|
le(t.$slots, "content", {}, void 0, !0)
|
|
1142
1138
|
])) : se("", !0)
|
|
1143
1139
|
])
|
|
@@ -1145,11 +1141,11 @@ function On(t, n, a, e, o, l) {
|
|
|
1145
1141
|
_: 3
|
|
1146
1142
|
}, 8, ["loading"])
|
|
1147
1143
|
]),
|
|
1148
|
-
|
|
1149
|
-
|
|
1144
|
+
A("div", Bn, [
|
|
1145
|
+
A("div", jn, [
|
|
1150
1146
|
le(t.$slots, "action", {}, void 0, !0),
|
|
1151
|
-
|
|
1152
|
-
(d(!0),
|
|
1147
|
+
A("div", Mn, [
|
|
1148
|
+
(d(!0), C(j, null, $(e.reversedActions, (i) => (d(), P(e.ActionButton, {
|
|
1153
1149
|
key: i.Title,
|
|
1154
1150
|
loading: e.loading,
|
|
1155
1151
|
config: i,
|
|
@@ -1161,7 +1157,7 @@ function On(t, n, a, e, o, l) {
|
|
|
1161
1157
|
])
|
|
1162
1158
|
]);
|
|
1163
1159
|
}
|
|
1164
|
-
const En = /* @__PURE__ */
|
|
1160
|
+
const En = /* @__PURE__ */ X(Pn, [["render", On], ["__scopeId", "data-v-7b45a965"], ["__file", "CreateView.vue"]]), $n = /* @__PURE__ */ q({
|
|
1165
1161
|
__name: "UpdateView",
|
|
1166
1162
|
props: {
|
|
1167
1163
|
className: {},
|
|
@@ -1169,7 +1165,7 @@ const En = /* @__PURE__ */ Z(Pn, [["render", On], ["__scopeId", "data-v-7b45a965
|
|
|
1169
1165
|
},
|
|
1170
1166
|
setup(t, { expose: n }) {
|
|
1171
1167
|
n();
|
|
1172
|
-
const a = Se(), e = je(), o = Ve(), l = xe(), s = Ne("dataWidgets"), c = pe(), i = t, r =
|
|
1168
|
+
const a = Se(), e = je(), o = Ve(), l = xe(), s = Ne("dataWidgets"), c = pe(), i = t, r = m({
|
|
1173
1169
|
pageType: "",
|
|
1174
1170
|
fields: {},
|
|
1175
1171
|
globalValidations: [],
|
|
@@ -1177,17 +1173,17 @@ const En = /* @__PURE__ */ Z(Pn, [["render", On], ["__scopeId", "data-v-7b45a965
|
|
|
1177
1173
|
title: "",
|
|
1178
1174
|
subTitle: ""
|
|
1179
1175
|
}
|
|
1180
|
-
}), u =
|
|
1181
|
-
function
|
|
1182
|
-
return
|
|
1183
|
-
fieldKey:
|
|
1184
|
-
...
|
|
1185
|
-
})).filter((
|
|
1176
|
+
}), u = m([]), g = m({});
|
|
1177
|
+
function _(I) {
|
|
1178
|
+
return I ? Object.entries(I).map(([V, y]) => ({
|
|
1179
|
+
fieldKey: V,
|
|
1180
|
+
...y
|
|
1181
|
+
})).filter((V) => V.widget && V.widget.widget !== "Hidden").filter((V) => !z.value.includes(V.fieldKey)) : [];
|
|
1186
1182
|
}
|
|
1187
|
-
function b(
|
|
1188
|
-
return
|
|
1183
|
+
function b(I) {
|
|
1184
|
+
return I ? Object.entries(I).filter(([V, y]) => y.dependent).reduce((V, [y, N]) => (V[y] = N.dependent, V), {}) : [];
|
|
1189
1185
|
}
|
|
1190
|
-
const p =
|
|
1186
|
+
const p = Z(() => r.value?.actions ? [...r.value.actions].reverse() : []), w = Fe({}), f = m(!1);
|
|
1191
1187
|
ce(async () => {
|
|
1192
1188
|
f.value = !0, r.value = await ke(fe.Update, i.className, {
|
|
1193
1189
|
svrStore: o,
|
|
@@ -1195,88 +1191,88 @@ const En = /* @__PURE__ */ Z(Pn, [["render", On], ["__scopeId", "data-v-7b45a965
|
|
|
1195
1191
|
}, {
|
|
1196
1192
|
workflowId: i.workflowId
|
|
1197
1193
|
});
|
|
1198
|
-
const
|
|
1199
|
-
r.value.actions = r.value.actions?.filter((
|
|
1200
|
-
const
|
|
1201
|
-
return
|
|
1194
|
+
const I = await Je(fe.Update, i.className, { workflowId: i.workflowId, email: L() }), x = await Xe(i.className, i.workflowId);
|
|
1195
|
+
r.value.actions = r.value.actions?.filter((y) => {
|
|
1196
|
+
const N = I.find((M) => M.button === y.title);
|
|
1197
|
+
return N ? N.isShow : !0;
|
|
1202
1198
|
});
|
|
1203
|
-
const
|
|
1204
|
-
e.Test?.(
|
|
1205
|
-
for (const
|
|
1206
|
-
if (r.value.fields[
|
|
1207
|
-
const
|
|
1208
|
-
|
|
1199
|
+
const V = r.value.fields.requestType.modelValue;
|
|
1200
|
+
e.Test?.(V, z), u.value = _(r.value.fields), g.value = b(r.value.fields);
|
|
1201
|
+
for (const y in r.value.fields) {
|
|
1202
|
+
if (r.value.fields[y].widget?.widget === "File") {
|
|
1203
|
+
const N = u.value.find((M) => M.fieldKey === y);
|
|
1204
|
+
N && N.widget && (N.widget.files = x[y] ?? [], N.widget.removeFile = (M) => Ft(i.className, M));
|
|
1209
1205
|
}
|
|
1210
|
-
y
|
|
1206
|
+
w[y] = r.value.fields[y].modelValue;
|
|
1211
1207
|
}
|
|
1212
1208
|
f.value = !1;
|
|
1213
1209
|
});
|
|
1214
1210
|
function L() {
|
|
1215
1211
|
return o()?.userInfo?.email_address ?? "";
|
|
1216
1212
|
}
|
|
1217
|
-
async function Y(
|
|
1218
|
-
switch (
|
|
1219
|
-
case
|
|
1220
|
-
let
|
|
1221
|
-
if (s.value?.forEach((
|
|
1222
|
-
|
|
1223
|
-
}), !
|
|
1213
|
+
async function Y(I, x, V, y, N) {
|
|
1214
|
+
switch (x) {
|
|
1215
|
+
case ee.Submit:
|
|
1216
|
+
let M = !0;
|
|
1217
|
+
if (s.value?.forEach((O) => {
|
|
1218
|
+
O?.validate && (O.validate() || (M = !1));
|
|
1219
|
+
}), !M) {
|
|
1224
1220
|
c?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
1225
1221
|
return;
|
|
1226
1222
|
}
|
|
1227
1223
|
f.value = !0;
|
|
1228
1224
|
try {
|
|
1229
|
-
const
|
|
1230
|
-
await Promise.all(G), f.value = !1, c?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${
|
|
1225
|
+
const O = await xt(i.className, i.workflowId, { ...w, ...g.value }, V), G = s.value?.map((ae) => ae?.submit ? ae.submit(O.toString()) : Promise.resolve()) || [];
|
|
1226
|
+
await Promise.all(G), f.value = !1, c?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${O.toString()}.`);
|
|
1231
1227
|
} catch {
|
|
1232
1228
|
c?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"), f.value = !1;
|
|
1233
1229
|
}
|
|
1234
1230
|
break;
|
|
1235
|
-
case
|
|
1231
|
+
case ee.Link:
|
|
1236
1232
|
try {
|
|
1237
|
-
await e[
|
|
1233
|
+
await e[I.eventName || ""]?.(w, z), a.push({ name: y, params: { className: i.className } });
|
|
1238
1234
|
} catch {
|
|
1239
1235
|
}
|
|
1240
1236
|
break;
|
|
1241
1237
|
default:
|
|
1242
|
-
console.warn("Unknown action type:",
|
|
1238
|
+
console.warn("Unknown action type:", x);
|
|
1243
1239
|
}
|
|
1244
1240
|
}
|
|
1245
|
-
const
|
|
1246
|
-
function
|
|
1247
|
-
e[
|
|
1241
|
+
const z = m([]);
|
|
1242
|
+
function te(I, x) {
|
|
1243
|
+
e[I]?.(x, z), r.value && (u.value = _(r.value.fields));
|
|
1248
1244
|
}
|
|
1249
|
-
const
|
|
1250
|
-
return Object.defineProperty(
|
|
1245
|
+
const oe = Z(() => Me(u.value)), h = { router: a, triggers: e, svrStore: o, bpmStore: l, dataWidgetsRefs: s, instance: c, props: i, pageData: r, _fields: u, _dependent: g, genField: _, genDependentField: b, reversedActions: p, _data: w, loading: f, getApproverEmail: L, clickHandler: Y, hiddenFields: z, changeHandler: te, groupedFields: oe, DataWidgets: Be, ActionButton: Ce, TopBar: Ae };
|
|
1246
|
+
return Object.defineProperty(h, "__isScriptSetup", { enumerable: !1, value: !0 }), h;
|
|
1251
1247
|
}
|
|
1252
1248
|
}), Kn = { class: "page-container" }, zn = { class: "page-body" }, Gn = { class: "form-card" }, Wn = { class: "form-fields-vertical" }, qn = { class: "form-fields" }, Yn = {
|
|
1253
1249
|
key: 0,
|
|
1254
1250
|
class: "form-content"
|
|
1255
1251
|
}, Jn = { class: "page-footer" }, Xn = { class: "action-container" }, Qn = { class: "action-buttons" };
|
|
1256
1252
|
function Zn(t, n, a, e, o, l) {
|
|
1257
|
-
const s =
|
|
1258
|
-
return d(),
|
|
1259
|
-
|
|
1253
|
+
const s = S("a-card"), c = S("a-spin");
|
|
1254
|
+
return d(), C("div", Kn, [
|
|
1255
|
+
D(e.TopBar, {
|
|
1260
1256
|
title: e.pageData.banner.title,
|
|
1261
1257
|
subTitle: e.pageData.banner.subTitle,
|
|
1262
1258
|
email: e.getApproverEmail()
|
|
1263
1259
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1264
|
-
|
|
1265
|
-
|
|
1260
|
+
A("div", zn, [
|
|
1261
|
+
D(c, {
|
|
1266
1262
|
loading: e.loading,
|
|
1267
1263
|
class: "form-container"
|
|
1268
1264
|
}, {
|
|
1269
1265
|
default: v(() => [
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
(d(!0),
|
|
1266
|
+
A("div", Gn, [
|
|
1267
|
+
A("div", Wn, [
|
|
1268
|
+
(d(!0), C(j, null, $(e.groupedFields, (i) => (d(), P(s, {
|
|
1273
1269
|
key: i.name,
|
|
1274
1270
|
title: i.name,
|
|
1275
1271
|
style: { "margin-bottom": "24px" }
|
|
1276
1272
|
}, {
|
|
1277
1273
|
default: v(() => [
|
|
1278
|
-
|
|
1279
|
-
(d(!0),
|
|
1274
|
+
A("div", qn, [
|
|
1275
|
+
(d(!0), C(j, null, $(i.fields, (r) => (d(), P(e.DataWidgets, {
|
|
1280
1276
|
key: r.fieldKey,
|
|
1281
1277
|
ref_for: !0,
|
|
1282
1278
|
ref: "dataWidgets",
|
|
@@ -1293,7 +1289,7 @@ function Zn(t, n, a, e, o, l) {
|
|
|
1293
1289
|
_: 2
|
|
1294
1290
|
}, 1032, ["title"]))), 128))
|
|
1295
1291
|
]),
|
|
1296
|
-
t.$slots.content ? (d(),
|
|
1292
|
+
t.$slots.content ? (d(), C("div", Yn, [
|
|
1297
1293
|
le(t.$slots, "content", {}, void 0, !0)
|
|
1298
1294
|
])) : se("", !0)
|
|
1299
1295
|
])
|
|
@@ -1301,11 +1297,11 @@ function Zn(t, n, a, e, o, l) {
|
|
|
1301
1297
|
_: 3
|
|
1302
1298
|
}, 8, ["loading"])
|
|
1303
1299
|
]),
|
|
1304
|
-
|
|
1305
|
-
|
|
1300
|
+
A("div", Jn, [
|
|
1301
|
+
A("div", Xn, [
|
|
1306
1302
|
le(t.$slots, "action", {}, void 0, !0),
|
|
1307
|
-
|
|
1308
|
-
(d(!0),
|
|
1303
|
+
A("div", Qn, [
|
|
1304
|
+
(d(!0), C(j, null, $(e.reversedActions, (i) => (d(), P(e.ActionButton, {
|
|
1309
1305
|
key: i.Title,
|
|
1310
1306
|
loading: e.loading,
|
|
1311
1307
|
config: i,
|
|
@@ -1317,7 +1313,7 @@ function Zn(t, n, a, e, o, l) {
|
|
|
1317
1313
|
])
|
|
1318
1314
|
]);
|
|
1319
1315
|
}
|
|
1320
|
-
const eo = /* @__PURE__ */
|
|
1316
|
+
const eo = /* @__PURE__ */ X($n, [["render", Zn], ["__scopeId", "data-v-72d4c7ff"], ["__file", "UpdateView.vue"]]), nt = Symbol("library-custom-comp");
|
|
1321
1317
|
function to() {
|
|
1322
1318
|
return me(nt, null);
|
|
1323
1319
|
}
|
|
@@ -1361,7 +1357,7 @@ const co = q({
|
|
|
1361
1357
|
click: (t) => !0
|
|
1362
1358
|
},
|
|
1363
1359
|
setup(t, { emit: n }) {
|
|
1364
|
-
const a = ro("icon"), e =
|
|
1360
|
+
const a = ro("icon"), e = Z(() => [a, `${a}-download`, { [`${a}-spin`]: t.spin }]), o = Z(() => {
|
|
1365
1361
|
const s = {};
|
|
1366
1362
|
return t.size && (s.fontSize = io(t.size) ? `${t.size}px` : t.size), t.rotate && (s.transform = `rotate(${t.rotate}deg)`), s;
|
|
1367
1363
|
});
|
|
@@ -1375,7 +1371,7 @@ const co = q({
|
|
|
1375
1371
|
}
|
|
1376
1372
|
}), uo = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
1377
1373
|
function fo(t, n, a, e, o, l) {
|
|
1378
|
-
return d(),
|
|
1374
|
+
return d(), C("svg", {
|
|
1379
1375
|
viewBox: "0 0 48 48",
|
|
1380
1376
|
fill: "none",
|
|
1381
1377
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1387,7 +1383,7 @@ function fo(t, n, a, e, o, l) {
|
|
|
1387
1383
|
"stroke-linejoin": t.strokeLinejoin,
|
|
1388
1384
|
onClick: n[0] || (n[0] = (...s) => t.onClick && t.onClick(...s))
|
|
1389
1385
|
}, n[1] || (n[1] = [
|
|
1390
|
-
|
|
1386
|
+
A("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
|
|
1391
1387
|
]), 14, uo);
|
|
1392
1388
|
}
|
|
1393
1389
|
var Pe = /* @__PURE__ */ lo(co, [["render", fo]]);
|
|
@@ -1405,7 +1401,7 @@ const po = Object.assign(Pe, {
|
|
|
1405
1401
|
},
|
|
1406
1402
|
setup(t, { expose: n }) {
|
|
1407
1403
|
n();
|
|
1408
|
-
const a = Ve(), e = xe(), o = je(), l = Se(), s = to(), c = pe(), i = t, r =
|
|
1404
|
+
const a = Ve(), e = xe(), o = je(), l = Se(), s = to(), c = pe(), i = t, r = m({
|
|
1409
1405
|
pageType: "",
|
|
1410
1406
|
fields: {},
|
|
1411
1407
|
globalValidations: [],
|
|
@@ -1413,18 +1409,18 @@ const po = Object.assign(Pe, {
|
|
|
1413
1409
|
title: "",
|
|
1414
1410
|
subTitle: ""
|
|
1415
1411
|
}
|
|
1416
|
-
}), u =
|
|
1417
|
-
function
|
|
1418
|
-
return
|
|
1419
|
-
fieldKey:
|
|
1420
|
-
...
|
|
1421
|
-
})).filter((
|
|
1412
|
+
}), u = m([]);
|
|
1413
|
+
function g(T) {
|
|
1414
|
+
return T ? Object.entries(T).map(([E, U]) => (typeof U.modelValue == "boolean" ? U.fieldValue = U.modelValue ? "Yes" : "No" : U.fieldValue = U.modelValue, {
|
|
1415
|
+
fieldKey: E,
|
|
1416
|
+
...U
|
|
1417
|
+
})).filter((E) => E.widget && E.widget.widget !== "Hidden").filter((E) => !h.value.includes(E.fieldKey)) : [];
|
|
1422
1418
|
}
|
|
1423
|
-
const
|
|
1424
|
-
const
|
|
1425
|
-
return
|
|
1426
|
-
const
|
|
1427
|
-
id:
|
|
1419
|
+
const _ = Z(() => Me(u.value)), b = Z(() => r.value?.actions ? [...r.value.actions].reverse() : []), p = m(!0), w = (T, R) => {
|
|
1420
|
+
const E = T.findIndex((U) => U.isCurrent);
|
|
1421
|
+
return T.map((U, re) => {
|
|
1422
|
+
const F = {
|
|
1423
|
+
id: U.id,
|
|
1428
1424
|
title: "",
|
|
1429
1425
|
proxy: "",
|
|
1430
1426
|
sub: "",
|
|
@@ -1432,137 +1428,137 @@ const po = Object.assign(Pe, {
|
|
|
1432
1428
|
status: 1,
|
|
1433
1429
|
time: ""
|
|
1434
1430
|
};
|
|
1435
|
-
|
|
1436
|
-
const _e =
|
|
1437
|
-
if (_e && ve && _e?.email?.toLowerCase() !== ve?.approverEmail?.toLowerCase() && (
|
|
1438
|
-
|
|
1431
|
+
F.title = U.workflowProcessApprovers[0]?.name;
|
|
1432
|
+
const _e = U.workflowProcessApprovers[U.workflowProcessApprovers.length - 1], we = U.workflowHistorys[U.workflowHistorys.length - 1], ve = we?.workflowHistoryApprovers[we?.workflowHistoryApprovers?.length - 1];
|
|
1433
|
+
if (_e && ve && _e?.email?.toLowerCase() !== ve?.approverEmail?.toLowerCase() && (F.title = `${ve.name}`, F.proxy = `Proxy: ${_e.name}`), U.sort > 1 ? F.sub = "Approver Role: " + U.nodeName.replace("Submit", "").replace("Approve", "") : F.sub = "Submit Application", U.isCurrent && R !== -1)
|
|
1434
|
+
F.desc = "In Approval", F.status = 1;
|
|
1439
1435
|
else {
|
|
1440
|
-
const
|
|
1441
|
-
if (
|
|
1442
|
-
|
|
1443
|
-
else if (
|
|
1444
|
-
|
|
1445
|
-
else if (
|
|
1446
|
-
if (
|
|
1447
|
-
|
|
1436
|
+
const ne = U.workflowHistorys[U.workflowHistorys.length - 1];
|
|
1437
|
+
if (ne && ne.status === 100)
|
|
1438
|
+
F.time = he(ne.takeActionAt, "yyyy-MM-dd hh:mm:ss"), F.status = 2, F.desc = "approve success!";
|
|
1439
|
+
else if (ne && ne.status === 999)
|
|
1440
|
+
F.time = he(ne.takeActionAt, "yyyy-MM-dd hh:mm:ss"), F.status = 0, F.desc = "approve reject!";
|
|
1441
|
+
else if (ne)
|
|
1442
|
+
if (F.time = he(ne.takeActionAt, "yyyy-MM-dd hh:mm:ss"), U.sort === 1)
|
|
1443
|
+
F.status = 2, F.desc = "";
|
|
1448
1444
|
else {
|
|
1449
|
-
const Oe =
|
|
1450
|
-
|
|
1445
|
+
const Oe = ne.workflowHistoryApprovers[0];
|
|
1446
|
+
F.status = 3, F.desc = Oe?.reason ? `Rejected reason: ${Oe.reason}` : "Rejected";
|
|
1451
1447
|
}
|
|
1452
|
-
else re <
|
|
1453
|
-
|
|
1448
|
+
else re < E || E === -1 ? (F.status = 0, F.desc = "Skipped") : (F.status = 0, F.desc = "Pending Approval");
|
|
1449
|
+
ne && ne.status;
|
|
1454
1450
|
}
|
|
1455
|
-
return
|
|
1451
|
+
return F;
|
|
1456
1452
|
});
|
|
1457
|
-
}, f =
|
|
1458
|
-
async function
|
|
1459
|
-
const
|
|
1460
|
-
r.value.actions = r.value.actions?.filter((
|
|
1461
|
-
const
|
|
1462
|
-
return
|
|
1463
|
-
}), L.value =
|
|
1453
|
+
}, f = m([]), L = m(!1), Y = m(!1), z = m(!1), te = m(!1);
|
|
1454
|
+
async function oe() {
|
|
1455
|
+
const T = await Je(fe.Details, i.className, { workflowId: i.workflowId, email: V() });
|
|
1456
|
+
r.value.actions = r.value.actions?.filter((R) => {
|
|
1457
|
+
const E = T.find((U) => U.button === R.title);
|
|
1458
|
+
return E ? E.isShow : !0;
|
|
1459
|
+
}), L.value = T.find((R) => R.button === "IsGlobal")?.isShow ?? !1, Y.value = T.find((R) => R.button === "AssignButton")?.isShow ?? !1, z.value = T.find((R) => R.button === "AssignList")?.isShow ?? !1, te.value = T.find((R) => R.button === "AddCommentsButton")?.isShow ?? !1;
|
|
1464
1460
|
}
|
|
1465
|
-
const
|
|
1466
|
-
async function
|
|
1461
|
+
const h = m([]);
|
|
1462
|
+
async function I() {
|
|
1467
1463
|
p.value = !0, r.value = await ke(fe.Details, i.className, {
|
|
1468
1464
|
svrStore: a,
|
|
1469
1465
|
bpmStore: e
|
|
1470
1466
|
}, {
|
|
1471
1467
|
workflowId: i.workflowId
|
|
1472
1468
|
});
|
|
1473
|
-
const
|
|
1474
|
-
G.value = await
|
|
1475
|
-
const
|
|
1476
|
-
o.Test?.(
|
|
1477
|
-
for (const
|
|
1478
|
-
if (r.value.fields[
|
|
1479
|
-
const re = u.value.find((
|
|
1480
|
-
re && re.widget && (re.widget.files =
|
|
1469
|
+
const T = await Xe(i.className, i.workflowId);
|
|
1470
|
+
G.value = await Lt(), M.value = await $e(i.workflowId), ae.value = await Ue(i.workflowId), oe();
|
|
1471
|
+
const R = r.value.fields.requestType.modelValue;
|
|
1472
|
+
o.Test?.(R, h), u.value = g(r.value.fields);
|
|
1473
|
+
for (const U in r.value.fields)
|
|
1474
|
+
if (r.value.fields[U].widget?.widget === "File") {
|
|
1475
|
+
const re = u.value.find((F) => F.fieldKey === U);
|
|
1476
|
+
re && re.widget && (re.widget.files = T[U] ?? []);
|
|
1481
1477
|
}
|
|
1482
|
-
const
|
|
1483
|
-
f.value =
|
|
1478
|
+
const E = await Nt(i.className, i.workflowId);
|
|
1479
|
+
f.value = w(E, 0), p.value = !1;
|
|
1484
1480
|
}
|
|
1485
|
-
ce(
|
|
1486
|
-
async function
|
|
1487
|
-
return o[
|
|
1481
|
+
ce(I);
|
|
1482
|
+
async function x(T, R) {
|
|
1483
|
+
return o[T]?.(R);
|
|
1488
1484
|
}
|
|
1489
|
-
function
|
|
1485
|
+
function V() {
|
|
1490
1486
|
return a()?.userInfo?.email_address ?? "";
|
|
1491
1487
|
}
|
|
1492
|
-
async function
|
|
1488
|
+
async function y(T, R, E, U, re) {
|
|
1493
1489
|
try {
|
|
1494
|
-
switch (
|
|
1495
|
-
case
|
|
1496
|
-
const { reason:
|
|
1490
|
+
switch (R) {
|
|
1491
|
+
case ee.Submit:
|
|
1492
|
+
const { reason: F, ifGlobal: _e } = await x(re, { isGlobal: L.value });
|
|
1497
1493
|
p.value = !0;
|
|
1498
1494
|
const we = re === "Approve" ? "100" : "-1";
|
|
1499
|
-
await Pt(i.className, i.workflowId,
|
|
1495
|
+
await Pt(i.className, i.workflowId, V(), F, [Number(i.workflowId)], E, we, _e), p.value = !1;
|
|
1500
1496
|
const ve = re === "Approve" ? `Request ID ${i.workflowId} has been approved.` : `Request ID ${i.workflowId} has been rejected.`;
|
|
1501
|
-
c?.appContext.config.globalProperties.$notification.success(ve),
|
|
1497
|
+
c?.appContext.config.globalProperties.$notification.success(ve), I();
|
|
1502
1498
|
break;
|
|
1503
|
-
case
|
|
1499
|
+
case ee.Link:
|
|
1504
1500
|
try {
|
|
1505
|
-
await o[
|
|
1506
|
-
} catch (
|
|
1507
|
-
console.error("Error in link action trigger:",
|
|
1501
|
+
await o[T.eventName || ""]?.(), l.push({ name: U, params: { className: i.className } });
|
|
1502
|
+
} catch (ne) {
|
|
1503
|
+
console.error("Error in link action trigger:", ne);
|
|
1508
1504
|
}
|
|
1509
1505
|
break;
|
|
1510
1506
|
default:
|
|
1511
|
-
console.warn("Unknown action type:",
|
|
1507
|
+
console.warn("Unknown action type:", R);
|
|
1512
1508
|
}
|
|
1513
1509
|
} catch {
|
|
1514
1510
|
}
|
|
1515
1511
|
}
|
|
1516
|
-
const
|
|
1512
|
+
const N = m(""), M = m([]), O = m(""), G = m([]), ae = m([]);
|
|
1517
1513
|
async function de() {
|
|
1518
|
-
if (!
|
|
1514
|
+
if (!O.value) {
|
|
1519
1515
|
c?.appContext.config.globalProperties.$message.error("Please select an approver");
|
|
1520
1516
|
return;
|
|
1521
1517
|
}
|
|
1522
1518
|
await ue("Confirm Assign Approver", "Do you want to assign the selected approver?");
|
|
1523
1519
|
try {
|
|
1524
|
-
await Rt(i.workflowId,
|
|
1525
|
-
} catch (
|
|
1526
|
-
if (
|
|
1520
|
+
await Rt(i.workflowId, O.value), ae.value = await Ue(i.workflowId), oe(), c?.appContext.config.globalProperties.$notification.success("Assign Approver clicked!");
|
|
1521
|
+
} catch (T) {
|
|
1522
|
+
if (T.status === 409) {
|
|
1527
1523
|
c?.appContext.config.globalProperties.$notification.error("This user is already an associator");
|
|
1528
1524
|
return;
|
|
1529
1525
|
}
|
|
1530
1526
|
c?.appContext.config.globalProperties.$notification.error("Failed to assign approver");
|
|
1531
1527
|
}
|
|
1532
1528
|
}
|
|
1533
|
-
async function ue(
|
|
1534
|
-
const { Modal:
|
|
1535
|
-
return new Promise((
|
|
1536
|
-
|
|
1537
|
-
title:
|
|
1538
|
-
content:
|
|
1529
|
+
async function ue(T, R) {
|
|
1530
|
+
const { Modal: E } = await import("@arco-design/web-vue");
|
|
1531
|
+
return new Promise((U, re) => {
|
|
1532
|
+
E.confirm({
|
|
1533
|
+
title: T,
|
|
1534
|
+
content: R,
|
|
1539
1535
|
okText: "OK",
|
|
1540
1536
|
cancelText: "Cancel",
|
|
1541
|
-
onOk: () =>
|
|
1537
|
+
onOk: () => U(!0),
|
|
1542
1538
|
onCancel: () => re()
|
|
1543
1539
|
});
|
|
1544
1540
|
});
|
|
1545
1541
|
}
|
|
1546
|
-
async function
|
|
1542
|
+
async function k(T) {
|
|
1547
1543
|
try {
|
|
1548
1544
|
await ue("Confirm Delete Associator", "Do you want to delete this associator?");
|
|
1549
1545
|
} catch {
|
|
1550
1546
|
return;
|
|
1551
1547
|
}
|
|
1552
1548
|
try {
|
|
1553
|
-
await jt(String(
|
|
1549
|
+
await jt(String(T)), ae.value = await Ue(i.workflowId), c?.appContext.config.globalProperties.$notification.success("Associator deleted successfully!");
|
|
1554
1550
|
} catch {
|
|
1555
1551
|
c?.appContext.config.globalProperties.$notification.error("Failed to delete associator");
|
|
1556
1552
|
}
|
|
1557
1553
|
}
|
|
1558
|
-
async function
|
|
1559
|
-
if (!
|
|
1554
|
+
async function H() {
|
|
1555
|
+
if (!N.value.trim()) {
|
|
1560
1556
|
c?.appContext.config.globalProperties.$message.error("Comment cannot be empty");
|
|
1561
1557
|
return;
|
|
1562
1558
|
}
|
|
1563
|
-
await Bt(i.workflowId,
|
|
1559
|
+
await Bt(i.workflowId, V(), N.value), N.value = "", M.value = await $e(i.workflowId), c?.appContext.config.globalProperties.$notification.success("Add Comment clicked!");
|
|
1564
1560
|
}
|
|
1565
|
-
const B = { svrStore: a, bpmStore: e, triggers: o, router: l, customComps: s, instance: c, props: i, pageData: r, _fields: u, genField:
|
|
1561
|
+
const B = { svrStore: a, bpmStore: e, triggers: o, router: l, customComps: s, instance: c, props: i, pageData: r, _fields: u, genField: g, groupedFields: _, reversedActions: b, loading: p, mapWorkflowSteps: w, steps: f, isGlobal: L, isShowAssignSelect: Y, isShowAssignList: z, isShowCommentTextArea: te, reloadButtonList: oe, hiddenFields: h, load: I, triggerFn: x, getApproverEmail: V, clickHandler: y, comment: N, commentsHistory: M, selectedApprover: O, approvers: G, associators: ae, onAssignApprover: de, confirmDialog: ue, onDeleteAssociator: k, onAddComment: H, ActionButton: Ce, get IconDownload() {
|
|
1566
1562
|
return po;
|
|
1567
1563
|
}, TopBar: Ae, get formatDate() {
|
|
1568
1564
|
return he;
|
|
@@ -1580,86 +1576,86 @@ const po = Object.assign(Pe, {
|
|
|
1580
1576
|
class: "detail-content"
|
|
1581
1577
|
}, Vo = { class: "page-footer" }, Ao = { class: "action-container" }, Io = { class: "action-buttons" };
|
|
1582
1578
|
function To(t, n, a, e, o, l) {
|
|
1583
|
-
const s =
|
|
1584
|
-
return d(),
|
|
1585
|
-
|
|
1579
|
+
const s = S("a-link"), c = S("a-space"), i = S("a-card"), r = S("a-option"), u = S("a-select"), g = S("a-button"), _ = S("a-list-item"), b = S("a-list"), p = S("a-textarea"), w = S("a-spin");
|
|
1580
|
+
return d(), C("div", go, [
|
|
1581
|
+
D(e.TopBar, {
|
|
1586
1582
|
title: e.pageData.banner.title,
|
|
1587
1583
|
subTitle: e.pageData.banner.subTitle,
|
|
1588
1584
|
email: e.getApproverEmail()
|
|
1589
1585
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1590
|
-
|
|
1591
|
-
|
|
1586
|
+
A("div", _o, [
|
|
1587
|
+
D(w, {
|
|
1592
1588
|
loading: e.loading,
|
|
1593
1589
|
class: "detail-container"
|
|
1594
1590
|
}, {
|
|
1595
1591
|
default: v(() => [
|
|
1596
|
-
|
|
1597
|
-
(d(),
|
|
1598
|
-
|
|
1599
|
-
(d(!0),
|
|
1592
|
+
A("div", vo, [
|
|
1593
|
+
(d(), P(He(e.customComps.Steps), { steps: e.steps }, null, 8, ["steps"])),
|
|
1594
|
+
A("div", bo, [
|
|
1595
|
+
(d(!0), C(j, null, $(e.groupedFields, (f) => (d(), P(i, {
|
|
1600
1596
|
key: f.name,
|
|
1601
1597
|
title: f.name,
|
|
1602
1598
|
style: { "margin-bottom": "24px" }
|
|
1603
1599
|
}, {
|
|
1604
1600
|
default: v(() => [
|
|
1605
|
-
|
|
1606
|
-
(d(!0),
|
|
1601
|
+
A("div", yo, [
|
|
1602
|
+
(d(!0), C(j, null, $(f.fields, (L) => (d(), C("div", {
|
|
1607
1603
|
key: L.fieldKey,
|
|
1608
1604
|
class: "detail-field-wrapper"
|
|
1609
1605
|
}, [
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
L.widget?.widget === "File" ? (d(!0),
|
|
1606
|
+
A("div", wo, [
|
|
1607
|
+
A("div", ho, Q(L.widget?.title), 1),
|
|
1608
|
+
L.widget?.widget === "File" ? (d(!0), C(j, { key: 0 }, $(L.widget.files, (Y) => (d(), C("div", {
|
|
1613
1609
|
class: "field-value",
|
|
1614
1610
|
key: Y.id
|
|
1615
1611
|
}, [
|
|
1616
|
-
|
|
1612
|
+
D(c, null, {
|
|
1617
1613
|
default: v(() => [
|
|
1618
|
-
Q(
|
|
1619
|
-
|
|
1614
|
+
J(Q(Y.name) + " ", 1),
|
|
1615
|
+
D(s, {
|
|
1620
1616
|
href: Y.url,
|
|
1621
1617
|
target: "_blank"
|
|
1622
1618
|
}, {
|
|
1623
1619
|
default: v(() => [
|
|
1624
|
-
|
|
1620
|
+
D(e.IconDownload, { style: { color: "#7A00E6" } })
|
|
1625
1621
|
]),
|
|
1626
1622
|
_: 2
|
|
1627
1623
|
}, 1032, ["href"])
|
|
1628
1624
|
]),
|
|
1629
1625
|
_: 2
|
|
1630
1626
|
}, 1024)
|
|
1631
|
-
]))), 128)) : (d(),
|
|
1627
|
+
]))), 128)) : (d(), C("div", ko, Q(L.fieldValue), 1))
|
|
1632
1628
|
])
|
|
1633
1629
|
]))), 128))
|
|
1634
1630
|
])
|
|
1635
1631
|
]),
|
|
1636
1632
|
_: 2
|
|
1637
1633
|
}, 1032, ["title"]))), 128)),
|
|
1638
|
-
e.isShowAssignSelect ? (d(),
|
|
1634
|
+
e.isShowAssignSelect ? (d(), P(c, { key: 0 }, {
|
|
1639
1635
|
default: v(() => [
|
|
1640
|
-
|
|
1636
|
+
D(u, {
|
|
1641
1637
|
modelValue: e.selectedApprover,
|
|
1642
1638
|
"onUpdate:modelValue": n[0] || (n[0] = (f) => e.selectedApprover = f)
|
|
1643
1639
|
}, {
|
|
1644
1640
|
default: v(() => [
|
|
1645
|
-
(d(!0),
|
|
1641
|
+
(d(!0), C(j, null, $(e.approvers, (f) => (d(), P(r, {
|
|
1646
1642
|
key: f.value,
|
|
1647
1643
|
value: f.value
|
|
1648
1644
|
}, {
|
|
1649
1645
|
default: v(() => [
|
|
1650
|
-
Q(
|
|
1646
|
+
J(Q(f.label), 1)
|
|
1651
1647
|
]),
|
|
1652
1648
|
_: 2
|
|
1653
1649
|
}, 1032, ["value"]))), 128))
|
|
1654
1650
|
]),
|
|
1655
1651
|
_: 1
|
|
1656
1652
|
}, 8, ["modelValue"]),
|
|
1657
|
-
|
|
1653
|
+
D(g, {
|
|
1658
1654
|
type: "primary",
|
|
1659
1655
|
onClick: e.onAssignApprover
|
|
1660
1656
|
}, {
|
|
1661
1657
|
default: v(() => n[2] || (n[2] = [
|
|
1662
|
-
|
|
1658
|
+
J("Assign for comment", -1)
|
|
1663
1659
|
])),
|
|
1664
1660
|
_: 1,
|
|
1665
1661
|
__: [2]
|
|
@@ -1667,64 +1663,64 @@ function To(t, n, a, e, o, l) {
|
|
|
1667
1663
|
]),
|
|
1668
1664
|
_: 1
|
|
1669
1665
|
})) : se("", !0),
|
|
1670
|
-
e.isShowAssignList ? (d(),
|
|
1666
|
+
e.isShowAssignList ? (d(), P(b, { key: 1 }, {
|
|
1671
1667
|
header: v(() => n[3] || (n[3] = [
|
|
1672
|
-
|
|
1668
|
+
J(" Associators ", -1)
|
|
1673
1669
|
])),
|
|
1674
1670
|
default: v(() => [
|
|
1675
|
-
(d(!0),
|
|
1671
|
+
(d(!0), C(j, null, $(e.associators, (f) => (d(), P(_, {
|
|
1676
1672
|
key: f.id
|
|
1677
1673
|
}, {
|
|
1678
1674
|
actions: v(() => [
|
|
1679
|
-
|
|
1675
|
+
D(g, {
|
|
1680
1676
|
type: "text",
|
|
1681
1677
|
status: "danger",
|
|
1682
1678
|
onClick: (L) => e.onDeleteAssociator(f.id)
|
|
1683
1679
|
}, {
|
|
1684
1680
|
default: v(() => n[4] || (n[4] = [
|
|
1685
|
-
|
|
1681
|
+
J(" Delete ", -1)
|
|
1686
1682
|
])),
|
|
1687
1683
|
_: 2,
|
|
1688
1684
|
__: [4]
|
|
1689
1685
|
}, 1032, ["onClick"])
|
|
1690
1686
|
]),
|
|
1691
1687
|
default: v(() => [
|
|
1692
|
-
|
|
1688
|
+
J(" " + Q(f.associator), 1)
|
|
1693
1689
|
]),
|
|
1694
1690
|
_: 2
|
|
1695
1691
|
}, 1024))), 128))
|
|
1696
1692
|
]),
|
|
1697
1693
|
_: 1
|
|
1698
1694
|
})) : se("", !0),
|
|
1699
|
-
e.isShowCommentTextArea ? (d(),
|
|
1700
|
-
|
|
1701
|
-
n[6] || (n[6] =
|
|
1702
|
-
|
|
1695
|
+
e.isShowCommentTextArea ? (d(), C("div", Co, [
|
|
1696
|
+
A("div", So, [
|
|
1697
|
+
n[6] || (n[6] = A("div", { class: "field-label" }, "Comment", -1)),
|
|
1698
|
+
D(p, {
|
|
1703
1699
|
modelValue: e.comment,
|
|
1704
1700
|
"onUpdate:modelValue": n[1] || (n[1] = (f) => e.comment = f)
|
|
1705
1701
|
}, null, 8, ["modelValue"]),
|
|
1706
|
-
|
|
1702
|
+
D(g, {
|
|
1707
1703
|
type: "primary",
|
|
1708
1704
|
onClick: e.onAddComment
|
|
1709
1705
|
}, {
|
|
1710
1706
|
default: v(() => n[5] || (n[5] = [
|
|
1711
|
-
|
|
1707
|
+
J("Add Comment", -1)
|
|
1712
1708
|
])),
|
|
1713
1709
|
_: 1,
|
|
1714
1710
|
__: [5]
|
|
1715
1711
|
})
|
|
1716
1712
|
])
|
|
1717
1713
|
])) : se("", !0),
|
|
1718
|
-
e.commentsHistory.length ? (d(),
|
|
1714
|
+
e.commentsHistory.length ? (d(), P(b, { key: 3 }, {
|
|
1719
1715
|
header: v(() => n[7] || (n[7] = [
|
|
1720
|
-
|
|
1716
|
+
J(" Comments History ", -1)
|
|
1721
1717
|
])),
|
|
1722
1718
|
default: v(() => [
|
|
1723
|
-
(d(!0),
|
|
1719
|
+
(d(!0), C(j, null, $(e.commentsHistory, (f) => (d(), P(_, {
|
|
1724
1720
|
key: f.associator
|
|
1725
1721
|
}, {
|
|
1726
1722
|
default: v(() => [
|
|
1727
|
-
Q(
|
|
1723
|
+
J(Q(f.associator) + ": " + Q(f.comments) + " (" + Q(e.formatDate(f.createdAt)) + ") ", 1)
|
|
1728
1724
|
]),
|
|
1729
1725
|
_: 2
|
|
1730
1726
|
}, 1024))), 128))
|
|
@@ -1732,7 +1728,7 @@ function To(t, n, a, e, o, l) {
|
|
|
1732
1728
|
_: 1
|
|
1733
1729
|
})) : se("", !0)
|
|
1734
1730
|
]),
|
|
1735
|
-
t.$slots.content ? (d(),
|
|
1731
|
+
t.$slots.content ? (d(), C("div", xo, [
|
|
1736
1732
|
le(t.$slots, "content", {}, void 0, !0)
|
|
1737
1733
|
])) : se("", !0)
|
|
1738
1734
|
])
|
|
@@ -1740,11 +1736,11 @@ function To(t, n, a, e, o, l) {
|
|
|
1740
1736
|
_: 3
|
|
1741
1737
|
}, 8, ["loading"])
|
|
1742
1738
|
]),
|
|
1743
|
-
|
|
1744
|
-
|
|
1739
|
+
A("div", Vo, [
|
|
1740
|
+
A("div", Ao, [
|
|
1745
1741
|
le(t.$slots, "action", {}, void 0, !0),
|
|
1746
|
-
|
|
1747
|
-
(d(!0),
|
|
1742
|
+
A("div", Io, [
|
|
1743
|
+
(d(!0), C(j, null, $(e.reversedActions, (f) => (d(), P(e.ActionButton, {
|
|
1748
1744
|
key: f.Title,
|
|
1749
1745
|
loading: e.loading,
|
|
1750
1746
|
config: f,
|
|
@@ -1756,7 +1752,7 @@ function To(t, n, a, e, o, l) {
|
|
|
1756
1752
|
])
|
|
1757
1753
|
]);
|
|
1758
1754
|
}
|
|
1759
|
-
const Uo = /* @__PURE__ */
|
|
1755
|
+
const Uo = /* @__PURE__ */ X(mo, [["render", To], ["__scopeId", "data-v-07443410"], ["__file", "DetailView.vue"]]), Po = /* @__PURE__ */ q({
|
|
1760
1756
|
name: "ListView",
|
|
1761
1757
|
__name: "ListView",
|
|
1762
1758
|
props: {
|
|
@@ -1764,7 +1760,7 @@ const Uo = /* @__PURE__ */ Z(mo, [["render", To], ["__scopeId", "data-v-07443410
|
|
|
1764
1760
|
},
|
|
1765
1761
|
setup(t, { expose: n }) {
|
|
1766
1762
|
n();
|
|
1767
|
-
const a = Ve(), e = xe(), o = Se(), l = pe(), s = t, c =
|
|
1763
|
+
const a = Ve(), e = xe(), o = Se(), l = pe(), s = t, c = m(), i = Fe({
|
|
1768
1764
|
current: 1,
|
|
1769
1765
|
total: 0,
|
|
1770
1766
|
pageSize: 10,
|
|
@@ -1774,31 +1770,31 @@ const Uo = /* @__PURE__ */ Z(mo, [["render", To], ["__scopeId", "data-v-07443410
|
|
|
1774
1770
|
filters: []
|
|
1775
1771
|
});
|
|
1776
1772
|
function r() {
|
|
1777
|
-
const
|
|
1778
|
-
key:
|
|
1773
|
+
const k = Object.entries(y.value).filter(([, { value: H }]) => H && H !== "").map(([H, { value: B, operator: T }]) => ({
|
|
1774
|
+
key: H,
|
|
1779
1775
|
value: B,
|
|
1780
|
-
operator:
|
|
1776
|
+
operator: T
|
|
1781
1777
|
// 根据实际需要调整操作符
|
|
1782
1778
|
}));
|
|
1783
1779
|
return {
|
|
1784
1780
|
pageNumber: i.current,
|
|
1785
1781
|
pageSize: i.pageSize,
|
|
1786
|
-
filters: [...i.filters, ...
|
|
1782
|
+
filters: [...i.filters, ...k],
|
|
1787
1783
|
sorts: [{
|
|
1788
1784
|
key: "workflowId",
|
|
1789
1785
|
type: 1
|
|
1790
1786
|
}]
|
|
1791
1787
|
};
|
|
1792
1788
|
}
|
|
1793
|
-
const u =
|
|
1789
|
+
const u = Z(() => ({
|
|
1794
1790
|
x: b.value.length * 150 + 250
|
|
1795
1791
|
// 只设置横向滚动
|
|
1796
1792
|
// 移除 y 属性,让表格高度自适应
|
|
1797
|
-
})),
|
|
1798
|
-
const
|
|
1799
|
-
title:
|
|
1793
|
+
})), g = (k) => {
|
|
1794
|
+
const H = Object.entries(k).filter(([, B]) => B.widget?.column).map(([B, T], R) => ({
|
|
1795
|
+
title: T.widget.title,
|
|
1800
1796
|
dataIndex: B.charAt(0).toLowerCase() + B.slice(1),
|
|
1801
|
-
order:
|
|
1797
|
+
order: T.order,
|
|
1802
1798
|
ellipsis: !0,
|
|
1803
1799
|
tooltip: !0,
|
|
1804
1800
|
width: 150,
|
|
@@ -1806,8 +1802,8 @@ const Uo = /* @__PURE__ */ Z(mo, [["render", To], ["__scopeId", "data-v-07443410
|
|
|
1806
1802
|
// 启用最小宽度
|
|
1807
1803
|
resizable: !0
|
|
1808
1804
|
// 启用列宽调整
|
|
1809
|
-
})).sort((B,
|
|
1810
|
-
|
|
1805
|
+
})).sort((B, T) => B.order - T.order);
|
|
1806
|
+
H.push({
|
|
1811
1807
|
title: "Actions",
|
|
1812
1808
|
slotName: "optional",
|
|
1813
1809
|
align: "center",
|
|
@@ -1815,99 +1811,99 @@ const Uo = /* @__PURE__ */ Z(mo, [["render", To], ["__scopeId", "data-v-07443410
|
|
|
1815
1811
|
minWidth: 200,
|
|
1816
1812
|
fixed: "right",
|
|
1817
1813
|
resizable: !1
|
|
1818
|
-
}), b.value =
|
|
1819
|
-
},
|
|
1820
|
-
|
|
1821
|
-
const
|
|
1822
|
-
|
|
1823
|
-
}, Y =
|
|
1814
|
+
}), b.value = H;
|
|
1815
|
+
}, _ = m([]), b = m([]), p = m(!0), w = m(!0), f = m(), L = async () => {
|
|
1816
|
+
w.value = !0;
|
|
1817
|
+
const k = await Ct(s.className, r());
|
|
1818
|
+
_.value = k.data, i.total = k.totalCount, w.value = !1;
|
|
1819
|
+
}, Y = m(!1);
|
|
1824
1820
|
ce(async () => {
|
|
1825
1821
|
p.value = !0, c.value = await ke(3, s.className, {
|
|
1826
1822
|
svrStore: a,
|
|
1827
1823
|
bpmStore: e
|
|
1828
|
-
}),
|
|
1824
|
+
}), g(c.value.fields), M(c.value.fields), O(), V(c.value?.tabs?.[0]?.key || ""), f.value = c.value.actions, p.value = !1, Y.value = !0;
|
|
1829
1825
|
}), st(() => {
|
|
1830
1826
|
Y.value && L();
|
|
1831
1827
|
});
|
|
1832
|
-
const
|
|
1833
|
-
i.current =
|
|
1834
|
-
},
|
|
1835
|
-
i.pageSize =
|
|
1828
|
+
const z = (k) => {
|
|
1829
|
+
i.current = k, L();
|
|
1830
|
+
}, te = (k) => {
|
|
1831
|
+
i.pageSize = k, L();
|
|
1836
1832
|
};
|
|
1837
|
-
function
|
|
1838
|
-
switch (
|
|
1839
|
-
case
|
|
1840
|
-
o.push({ name: B, params: { workflowId:
|
|
1833
|
+
function oe(k, H, B, T, R) {
|
|
1834
|
+
switch (k) {
|
|
1835
|
+
case ee.Link:
|
|
1836
|
+
o.push({ name: B, params: { workflowId: R } });
|
|
1841
1837
|
break;
|
|
1842
1838
|
default:
|
|
1843
|
-
console.warn("Unknown action type:",
|
|
1839
|
+
console.warn("Unknown action type:", k);
|
|
1844
1840
|
}
|
|
1845
1841
|
}
|
|
1846
|
-
function
|
|
1847
|
-
switch (
|
|
1848
|
-
case
|
|
1849
|
-
Mt(
|
|
1842
|
+
function h(k, H, B) {
|
|
1843
|
+
switch (k) {
|
|
1844
|
+
case ee.Submit:
|
|
1845
|
+
Mt(H, { filters: [{ key: "approverList", value: I(), operator: 2 }] }), l?.appContext.config.globalProperties.$notification.success("submit success!");
|
|
1850
1846
|
break;
|
|
1851
|
-
case
|
|
1847
|
+
case ee.Link:
|
|
1852
1848
|
o.push({ name: B });
|
|
1853
1849
|
break;
|
|
1854
1850
|
default:
|
|
1855
|
-
console.warn("Unknown action type:",
|
|
1851
|
+
console.warn("Unknown action type:", k);
|
|
1856
1852
|
}
|
|
1857
1853
|
}
|
|
1858
|
-
function
|
|
1854
|
+
function I() {
|
|
1859
1855
|
return a()?.userInfo?.email_address ?? "";
|
|
1860
1856
|
}
|
|
1861
|
-
function
|
|
1862
|
-
return typeof
|
|
1857
|
+
function x(k, H) {
|
|
1858
|
+
return typeof k != "string" || k.indexOf("{currentUserEmail}") === -1 ? k : k.replace(/{currentUserEmail}/g, H);
|
|
1863
1859
|
}
|
|
1864
|
-
function k
|
|
1865
|
-
const
|
|
1866
|
-
i.filters =
|
|
1860
|
+
function V(k) {
|
|
1861
|
+
const H = c.value?.tabs?.find((B) => B.key === k)?.filters;
|
|
1862
|
+
i.filters = H?.map((B) => ({
|
|
1867
1863
|
...B,
|
|
1868
|
-
value:
|
|
1864
|
+
value: x(B.value, I())
|
|
1869
1865
|
})) || [], i.current = 1, L();
|
|
1870
1866
|
}
|
|
1871
|
-
const
|
|
1872
|
-
function
|
|
1873
|
-
if (!
|
|
1874
|
-
|
|
1867
|
+
const y = m({}), N = m([]);
|
|
1868
|
+
function M(k) {
|
|
1869
|
+
if (!k) return [];
|
|
1870
|
+
N.value = Object.entries(k).filter(([, H]) => H.isFiltered).map(([H, B]) => ({ fieldKey: H, fieldConfig: B }));
|
|
1875
1871
|
}
|
|
1876
|
-
const
|
|
1877
|
-
const
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
}),
|
|
1872
|
+
const O = () => {
|
|
1873
|
+
const k = {};
|
|
1874
|
+
N.value.forEach(({ fieldKey: H, fieldConfig: B }) => {
|
|
1875
|
+
k[H] = {}, k[H].value = B.modelValue, k[H].operator = B.operator;
|
|
1876
|
+
}), y.value = k;
|
|
1881
1877
|
}, G = () => {
|
|
1882
1878
|
i.current = 1, L();
|
|
1883
1879
|
}, ae = () => {
|
|
1884
|
-
c.value &&
|
|
1880
|
+
c.value && O(), G();
|
|
1885
1881
|
};
|
|
1886
|
-
function de(
|
|
1887
|
-
return !(
|
|
1882
|
+
function de(k, H) {
|
|
1883
|
+
return !(k.location !== "InTable" || k.title === "Update" && (H.status === 100 || H.status === -1));
|
|
1888
1884
|
}
|
|
1889
|
-
const ue = { svrStore: a, bpmStore: e, router: o, instance: l, props: s, pageData: c, paging: i, createListParams: r, scroll: u, mapColumns:
|
|
1885
|
+
const ue = { svrStore: a, bpmStore: e, router: o, instance: l, props: s, pageData: c, paging: i, createListParams: r, scroll: u, mapColumns: g, _data: _, _columns: b, loadingPage: p, loadingTable: w, actions: f, loadData: L, mounted: Y, pageChangeHandler: z, pageSizeChangeHandler: te, clickHandler: oe, createHandler: h, getApproverEmail: I, replaceEmail: x, tabHandler: V, searchForm: y, searchableFields: N, mapSearchableFields: M, initSearchForm: O, handleSearch: G, handleReset: ae, judgeHiddenActions: de, ActionButton: Ce, DataWidgets: Be, TopBar: Ae };
|
|
1890
1886
|
return Object.defineProperty(ue, "__isScriptSetup", { enumerable: !1, value: !0 }), ue;
|
|
1891
1887
|
}
|
|
1892
1888
|
}), Do = { class: "list-container" }, No = { class: "query-title" };
|
|
1893
1889
|
function Ho(t, n, a, e, o, l) {
|
|
1894
|
-
const s =
|
|
1895
|
-
return d(),
|
|
1896
|
-
|
|
1890
|
+
const s = S("a-space"), c = S("a-col"), i = S("a-button"), r = S("a-row"), u = S("a-card"), g = S("a-tab-pane"), _ = S("a-tabs"), b = S("a-table");
|
|
1891
|
+
return d(), C("div", Do, [
|
|
1892
|
+
D(e.TopBar, {
|
|
1897
1893
|
title: e.pageData?.banner.title ?? "",
|
|
1898
1894
|
subTitle: e.pageData?.banner.subTitle ?? "",
|
|
1899
1895
|
email: e.getApproverEmail()
|
|
1900
1896
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1901
|
-
|
|
1897
|
+
D(u, null, {
|
|
1902
1898
|
default: v(() => [
|
|
1903
|
-
|
|
1904
|
-
n[0] || (n[0] =
|
|
1905
|
-
|
|
1899
|
+
A("div", No, [
|
|
1900
|
+
n[0] || (n[0] = A("h3", null, "Search Conditions", -1)),
|
|
1901
|
+
D(s, { size: "medium" }, {
|
|
1906
1902
|
default: v(() => [
|
|
1907
|
-
(d(!0),
|
|
1903
|
+
(d(!0), C(j, null, $(e.actions, (p) => (d(), C(j, {
|
|
1908
1904
|
key: p.title
|
|
1909
1905
|
}, [
|
|
1910
|
-
p.location === "InOperation" ? (d(),
|
|
1906
|
+
p.location === "InOperation" ? (d(), P(e.ActionButton, {
|
|
1911
1907
|
key: 0,
|
|
1912
1908
|
config: p,
|
|
1913
1909
|
onClick: e.createHandler
|
|
@@ -1917,48 +1913,48 @@ function Ho(t, n, a, e, o, l) {
|
|
|
1917
1913
|
_: 1
|
|
1918
1914
|
})
|
|
1919
1915
|
]),
|
|
1920
|
-
|
|
1916
|
+
D(r, { gutter: [24, 20] }, {
|
|
1921
1917
|
default: v(() => [
|
|
1922
|
-
(d(!0),
|
|
1918
|
+
(d(!0), C(j, null, $(e.searchableFields, (p) => (d(), P(c, {
|
|
1923
1919
|
key: p.fieldKey,
|
|
1924
1920
|
span: 6,
|
|
1925
1921
|
class: "search-col"
|
|
1926
1922
|
}, {
|
|
1927
1923
|
default: v(() => [
|
|
1928
|
-
|
|
1924
|
+
D(e.DataWidgets, {
|
|
1929
1925
|
name: p.fieldKey,
|
|
1930
1926
|
config: p.fieldConfig,
|
|
1931
1927
|
modelValue: e.searchForm[p.fieldKey].value,
|
|
1932
|
-
"onUpdate:modelValue": (
|
|
1928
|
+
"onUpdate:modelValue": (w) => e.searchForm[p.fieldKey].value = w,
|
|
1933
1929
|
class: "form-field"
|
|
1934
1930
|
}, null, 8, ["name", "config", "modelValue", "onUpdate:modelValue"])
|
|
1935
1931
|
]),
|
|
1936
1932
|
_: 2
|
|
1937
1933
|
}, 1024))), 128)),
|
|
1938
|
-
|
|
1934
|
+
D(c, {
|
|
1939
1935
|
span: 6,
|
|
1940
1936
|
class: "search-col form-buttons"
|
|
1941
1937
|
}, {
|
|
1942
1938
|
default: v(() => [
|
|
1943
|
-
|
|
1939
|
+
D(s, { size: "medium" }, {
|
|
1944
1940
|
default: v(() => [
|
|
1945
|
-
|
|
1941
|
+
D(i, {
|
|
1946
1942
|
type: "primary",
|
|
1947
1943
|
size: "medium",
|
|
1948
1944
|
onClick: e.handleSearch
|
|
1949
1945
|
}, {
|
|
1950
1946
|
default: v(() => n[1] || (n[1] = [
|
|
1951
|
-
|
|
1947
|
+
J(" Search ", -1)
|
|
1952
1948
|
])),
|
|
1953
1949
|
_: 1,
|
|
1954
1950
|
__: [1]
|
|
1955
1951
|
}),
|
|
1956
|
-
|
|
1952
|
+
D(i, {
|
|
1957
1953
|
size: "medium",
|
|
1958
1954
|
onClick: e.handleReset
|
|
1959
1955
|
}, {
|
|
1960
1956
|
default: v(() => n[2] || (n[2] = [
|
|
1961
|
-
|
|
1957
|
+
J(" Reset ", -1)
|
|
1962
1958
|
])),
|
|
1963
1959
|
_: 1,
|
|
1964
1960
|
__: [2]
|
|
@@ -1975,19 +1971,19 @@ function Ho(t, n, a, e, o, l) {
|
|
|
1975
1971
|
]),
|
|
1976
1972
|
_: 1
|
|
1977
1973
|
}),
|
|
1978
|
-
|
|
1974
|
+
D(_, {
|
|
1979
1975
|
size: "large",
|
|
1980
1976
|
onTabClick: e.tabHandler
|
|
1981
1977
|
}, {
|
|
1982
1978
|
default: v(() => [
|
|
1983
|
-
(d(!0),
|
|
1979
|
+
(d(!0), C(j, null, $(e.pageData?.tabs, (p) => (d(), P(g, {
|
|
1984
1980
|
key: p.key,
|
|
1985
1981
|
title: p.title
|
|
1986
1982
|
}, null, 8, ["title"]))), 128))
|
|
1987
1983
|
]),
|
|
1988
1984
|
_: 1
|
|
1989
1985
|
}),
|
|
1990
|
-
|
|
1986
|
+
D(b, {
|
|
1991
1987
|
columns: e._columns,
|
|
1992
1988
|
data: e._data,
|
|
1993
1989
|
stripe: "",
|
|
@@ -2007,14 +2003,14 @@ function Ho(t, n, a, e, o, l) {
|
|
|
2007
2003
|
onPageSizeChange: e.pageSizeChangeHandler
|
|
2008
2004
|
}, {
|
|
2009
2005
|
optional: v(({ record: p }) => [
|
|
2010
|
-
|
|
2006
|
+
D(s, { size: "small" }, {
|
|
2011
2007
|
default: v(() => [
|
|
2012
|
-
(d(!0),
|
|
2013
|
-
key:
|
|
2008
|
+
(d(!0), C(j, null, $(e.actions, (w) => (d(), C(j, {
|
|
2009
|
+
key: w.title
|
|
2014
2010
|
}, [
|
|
2015
|
-
e.judgeHiddenActions(
|
|
2011
|
+
e.judgeHiddenActions(w, p) ? (d(), P(e.ActionButton, {
|
|
2016
2012
|
key: 0,
|
|
2017
|
-
config:
|
|
2013
|
+
config: w,
|
|
2018
2014
|
size: "small",
|
|
2019
2015
|
onClick: (...f) => e.clickHandler(...f, p.workflowId)
|
|
2020
2016
|
}, null, 8, ["config", "onClick"])) : se("", !0)
|
|
@@ -2027,9 +2023,9 @@ function Ho(t, n, a, e, o, l) {
|
|
|
2027
2023
|
}, 8, ["columns", "data", "pagination", "loading", "scroll"])
|
|
2028
2024
|
]);
|
|
2029
2025
|
}
|
|
2030
|
-
const
|
|
2026
|
+
const Fo = /* @__PURE__ */ X(Po, [["render", Ho], ["__scopeId", "data-v-a82f2228"], ["__file", "ListView.vue"]]), Oo = {
|
|
2031
2027
|
install(t, n = {}) {
|
|
2032
|
-
n.config && gt(n.config), n.router && t.provide(Qe, n.router), n.pinia && t.provide(kn, n.pinia), n.useBpmStore && t.provide(et, n.useBpmStore), n.useSvrStore && t.provide(tt, n.useSvrStore), n.triggers && t.provide(Ze, n.triggers), n.customComps && t.provide(nt, n.customComps), t.component("CreateView", En), t.component("UpdateView", eo), t.component("DetailView", Uo), t.component("ListView",
|
|
2028
|
+
n.config && gt(n.config), n.router && t.provide(Qe, n.router), n.pinia && t.provide(kn, n.pinia), n.useBpmStore && t.provide(et, n.useBpmStore), n.useSvrStore && t.provide(tt, n.useSvrStore), n.triggers && t.provide(Ze, n.triggers), n.customComps && t.provide(nt, n.customComps), t.component("CreateView", En), t.component("UpdateView", eo), t.component("DetailView", Uo), t.component("ListView", Fo);
|
|
2033
2029
|
}
|
|
2034
2030
|
};
|
|
2035
2031
|
export {
|