@chase-shao/vue-component-lib 1.2.59 → 1.2.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.es.js +181 -184
- 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 w, defineComponent as O, mergeModels as oe, useModel as _e, resolveComponent as $, createBlock as U, openBlock as u, onMounted as ce, computed as q, withCtx as v, createElementBlock as x, Fragment as H, renderList as
|
|
1
|
+
import { ref as w, defineComponent as O, mergeModels as oe, useModel as _e, resolveComponent as $, createBlock as U, openBlock as u, onMounted as ce, computed as q, withCtx as v, createElementBlock as x, Fragment as H, renderList as z, createVNode as L, nextTick as at, createTextVNode as G, useTemplateRef as De, createElementVNode as I, createCommentVNode as Q, toDisplayString as W, resolveDynamicComponent as Pe, renderSlot as le, inject as fe, getCurrentInstance as ye, reactive as Re, normalizeStyle as st, normalizeClass as rt, unref as Ie, onActivated as it } from "vue";
|
|
2
2
|
import lt from "axios";
|
|
3
3
|
import { defineStore as ct } from "pinia";
|
|
4
4
|
import { Modal as ut } from "@arco-design/web-vue";
|
|
@@ -80,7 +80,7 @@ const Ye = async () => {
|
|
|
80
80
|
n.token = void 0;
|
|
81
81
|
}, (o.data?.expireSeconds ?? 3600) * 1e3), o?.data?.token;
|
|
82
82
|
});
|
|
83
|
-
},
|
|
83
|
+
}, j = async () => {
|
|
84
84
|
const e = await Ye(), t = qe();
|
|
85
85
|
return t.defaults.headers.common.Authorization = `Bearer ${e}`, t;
|
|
86
86
|
}, Te = {
|
|
@@ -106,10 +106,10 @@ function yt() {
|
|
|
106
106
|
}
|
|
107
107
|
return Ue(_t);
|
|
108
108
|
}
|
|
109
|
-
const wt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
|
109
|
+
const wt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), je = { randomUUID: wt };
|
|
110
110
|
function Je(e, t, a) {
|
|
111
|
-
if (
|
|
112
|
-
return
|
|
111
|
+
if (je.randomUUID && !e)
|
|
112
|
+
return je.randomUUID();
|
|
113
113
|
e = e || {};
|
|
114
114
|
const n = e.random ?? e.rng?.() ?? yt();
|
|
115
115
|
if (n.length < 16)
|
|
@@ -195,11 +195,11 @@ function bt(e, t, a) {
|
|
|
195
195
|
}), n;
|
|
196
196
|
}
|
|
197
197
|
const he = async (e, t, a, n) => {
|
|
198
|
-
const c = await (await
|
|
198
|
+
const c = await (await j()).get(`/General/${t}/${e}/page`, { params: n });
|
|
199
199
|
return bt(c?.data, e, a);
|
|
200
|
-
}, Xe = async (e, t, a) => (await (await
|
|
200
|
+
}, Xe = async (e, t, a) => (await (await j()).post(`/${t}/${e}/button/List`, null, { params: a }))?.data;
|
|
201
201
|
async function ht(e, t) {
|
|
202
|
-
const n = await (await
|
|
202
|
+
const n = await (await j()).post(`/General/${e}/list`, t);
|
|
203
203
|
return {
|
|
204
204
|
data: n.data.data,
|
|
205
205
|
totalCount: n.data.totalCount
|
|
@@ -219,7 +219,7 @@ async function ht(e, t) {
|
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
async function kt(e, t, a) {
|
|
222
|
-
const o = await (await
|
|
222
|
+
const o = await (await j()).post(a, t, {
|
|
223
223
|
params: {
|
|
224
224
|
className: e
|
|
225
225
|
}
|
|
@@ -227,7 +227,7 @@ async function kt(e, t, a) {
|
|
|
227
227
|
return o.data.length > 0 ? o.data[0] : 0;
|
|
228
228
|
}
|
|
229
229
|
async function Ct(e, t, a, n) {
|
|
230
|
-
const o = await
|
|
230
|
+
const o = await j(), c = He(n, t);
|
|
231
231
|
return (await o.put(c, a))?.data;
|
|
232
232
|
}
|
|
233
233
|
function He(e, t) {
|
|
@@ -249,22 +249,22 @@ function At(e, t) {
|
|
|
249
249
|
return e.replace(/{ClassName}/g, encodeURIComponent(t));
|
|
250
250
|
}
|
|
251
251
|
async function It(e, t, a, n, o, c, r, l) {
|
|
252
|
-
const s = await
|
|
252
|
+
const s = await j();
|
|
253
253
|
let i = He(c, t);
|
|
254
254
|
return i = St(i, a), i = Vt(i, n), i = xt(i, r), i = $t(i, l), i = At(i, e), (await s.put(i, o))?.data;
|
|
255
255
|
}
|
|
256
256
|
async function Tt(e, t) {
|
|
257
|
-
const o = (await (await
|
|
257
|
+
const o = (await (await j()).get(e, { params: { value: t } }))?.data;
|
|
258
258
|
return Object.entries(o).map(([c, r]) => ({
|
|
259
259
|
value: c,
|
|
260
260
|
label: r
|
|
261
261
|
}));
|
|
262
262
|
}
|
|
263
263
|
async function Ut(e, t = null) {
|
|
264
|
-
return (await (await
|
|
264
|
+
return (await (await j()).post(e, t))?.data;
|
|
265
265
|
}
|
|
266
266
|
async function Nt(e, t) {
|
|
267
|
-
return (await (await
|
|
267
|
+
return (await (await j()).get(`/General/${e}/${t}/process`))?.data;
|
|
268
268
|
}
|
|
269
269
|
function Lt(e) {
|
|
270
270
|
return {
|
|
@@ -274,37 +274,37 @@ function Lt(e) {
|
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
276
|
async function Qe(e, t) {
|
|
277
|
-
return (await (await
|
|
277
|
+
return (await (await j()).get(`/General/${e}/${t}/upload/get`))?.data.reduce((c, r) => {
|
|
278
278
|
const { category: l } = r;
|
|
279
279
|
return c[l] || (c[l] = []), c[l].push(Lt(r)), c;
|
|
280
280
|
}, {});
|
|
281
281
|
}
|
|
282
282
|
async function Ft(e, t) {
|
|
283
|
-
return (await
|
|
283
|
+
return (await j()).post(`/General/${e}/${t}/delete/attachment`);
|
|
284
284
|
}
|
|
285
|
-
async function
|
|
286
|
-
const t = await (await
|
|
285
|
+
async function Dt() {
|
|
286
|
+
const t = await (await j()).get("/Grading/dropdown/approvers");
|
|
287
287
|
return Object.entries(t?.data).map(([a, n]) => ({
|
|
288
288
|
label: a,
|
|
289
289
|
value: n
|
|
290
290
|
}));
|
|
291
291
|
}
|
|
292
|
-
async function
|
|
293
|
-
return await (await
|
|
292
|
+
async function Pt(e, t) {
|
|
293
|
+
return await (await j()).post(`Grading/AssignComments/${e}/${encodeURIComponent(t)}`);
|
|
294
294
|
}
|
|
295
295
|
async function Rt(e, t, a) {
|
|
296
|
-
return await (await
|
|
296
|
+
return await (await j()).post(`Grading/AddComments/${e}/${encodeURIComponent(t)}`, a, {
|
|
297
297
|
headers: { "Content-Type": "application/json;charset=UTF-8" }
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
300
|
async function Ee(e) {
|
|
301
|
-
return (await (await
|
|
301
|
+
return (await (await j()).get(`Grading/GetComments/${e}`))?.data;
|
|
302
302
|
}
|
|
303
303
|
async function Ne(e) {
|
|
304
|
-
return (await (await
|
|
304
|
+
return (await (await j()).get(`Grading/GetAssociator/${e}`))?.data;
|
|
305
305
|
}
|
|
306
306
|
async function Mt(e) {
|
|
307
|
-
return await (await
|
|
307
|
+
return await (await j()).delete(`Grading/DeleteAssociator/${e}`);
|
|
308
308
|
}
|
|
309
309
|
const pe = (e, t) => {
|
|
310
310
|
let a = "";
|
|
@@ -337,8 +337,8 @@ const pe = (e, t) => {
|
|
|
337
337
|
o("input", i);
|
|
338
338
|
}, s = (i) => {
|
|
339
339
|
const b = r(i);
|
|
340
|
-
o("error", b.res ? "" : b.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((
|
|
341
|
-
|
|
340
|
+
o("error", b.res ? "" : b.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((f) => {
|
|
341
|
+
f.event === "change" && o(f.event, f.handlerName, i);
|
|
342
342
|
});
|
|
343
343
|
};
|
|
344
344
|
return t({
|
|
@@ -347,8 +347,8 @@ const pe = (e, t) => {
|
|
|
347
347
|
return o("error", i.res ? "" : i.errorMessages), i.res;
|
|
348
348
|
}
|
|
349
349
|
}), (i, b) => {
|
|
350
|
-
const
|
|
351
|
-
return u(), U(
|
|
350
|
+
const f = $("AInput");
|
|
351
|
+
return u(), U(f, {
|
|
352
352
|
modelValue: c.value,
|
|
353
353
|
"onUpdate:modelValue": b[0] || (b[0] = (k) => c.value = k),
|
|
354
354
|
"allow-clear": "",
|
|
@@ -375,24 +375,24 @@ const pe = (e, t) => {
|
|
|
375
375
|
setup(e, { expose: t, emit: a }) {
|
|
376
376
|
const n = e, o = a, c = _e(e, "modelValue"), r = w(100), l = w(0);
|
|
377
377
|
ce(() => {
|
|
378
|
-
n.validations && n.validations.forEach((
|
|
379
|
-
|
|
378
|
+
n.validations && n.validations.forEach((f) => {
|
|
379
|
+
f.ruleName === "Max" && (r.value = f.ruleParameter), f.ruleName === "Min" && (l.value = f.ruleParameter);
|
|
380
380
|
});
|
|
381
381
|
});
|
|
382
|
-
const s = (
|
|
383
|
-
o("input",
|
|
384
|
-
}, b = (
|
|
385
|
-
const k = s(
|
|
382
|
+
const s = (f) => pe(n.validations, f), i = (f) => {
|
|
383
|
+
o("input", f);
|
|
384
|
+
}, b = (f) => {
|
|
385
|
+
const k = s(f);
|
|
386
386
|
o("error", k.res ? "" : k.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((A) => {
|
|
387
|
-
A.event === "change" && o(A.event, A.handlerName,
|
|
387
|
+
A.event === "change" && o(A.event, A.handlerName, f);
|
|
388
388
|
});
|
|
389
389
|
};
|
|
390
390
|
return t({
|
|
391
391
|
validate() {
|
|
392
|
-
const
|
|
393
|
-
return o("error",
|
|
392
|
+
const f = s(n.modelValue);
|
|
393
|
+
return o("error", f.res ? "" : f.errorMessages), f.res;
|
|
394
394
|
}
|
|
395
|
-
}), (
|
|
395
|
+
}), (f, k) => {
|
|
396
396
|
const A = $("AInputNumber");
|
|
397
397
|
return u(), U(A, {
|
|
398
398
|
modelValue: c.value,
|
|
@@ -419,32 +419,32 @@ const pe = (e, t) => {
|
|
|
419
419
|
}),
|
|
420
420
|
emits: /* @__PURE__ */ oe(["update:modelValue", "change"], ["update:modelValue"]),
|
|
421
421
|
setup(e, { expose: t, emit: a }) {
|
|
422
|
-
const n = e, o = a, c = w(!1), r = w(n.config.options ?? []), l = _e(e, "modelValue"), s = (
|
|
422
|
+
const n = e, o = a, c = w(!1), r = w(n.config.options ?? []), l = _e(e, "modelValue"), s = (f) => pe(n.validations, f);
|
|
423
423
|
q(() => {
|
|
424
|
-
const
|
|
424
|
+
const f = {};
|
|
425
425
|
return n.triggers && n.triggers.length > 0 && n.triggers.forEach((k) => {
|
|
426
|
-
|
|
426
|
+
f[k.event] = (A) => {
|
|
427
427
|
o(k.event, k.handlerName, A);
|
|
428
428
|
const _ = s(A);
|
|
429
429
|
o("error", _.res ? "" : _.errorMessages);
|
|
430
430
|
};
|
|
431
|
-
}),
|
|
431
|
+
}), f;
|
|
432
432
|
}), ce(async () => {
|
|
433
433
|
n.config.dataSourceProvider && (r.value = await Tt(n.config.dataSourceProvider));
|
|
434
434
|
});
|
|
435
|
-
const b = (
|
|
436
|
-
o("update:modelValue",
|
|
437
|
-
const k = s(
|
|
435
|
+
const b = (f) => {
|
|
436
|
+
o("update:modelValue", f);
|
|
437
|
+
const k = s(f);
|
|
438
438
|
o("error", k.res ? "" : k.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((A) => {
|
|
439
|
-
A.event === "change" && o(A.event, A.handlerName,
|
|
439
|
+
A.event === "change" && o(A.event, A.handlerName, f);
|
|
440
440
|
});
|
|
441
441
|
};
|
|
442
442
|
return t({
|
|
443
443
|
validate() {
|
|
444
|
-
const
|
|
445
|
-
return o("error",
|
|
444
|
+
const f = s(n.modelValue);
|
|
445
|
+
return o("error", f.res ? "" : f.errorMessages), f.res;
|
|
446
446
|
}
|
|
447
|
-
}), (
|
|
447
|
+
}), (f, k) => {
|
|
448
448
|
const A = $("AOption"), _ = $("ASelect");
|
|
449
449
|
return u(), U(_, {
|
|
450
450
|
"allow-clear": "",
|
|
@@ -456,7 +456,7 @@ const pe = (e, t) => {
|
|
|
456
456
|
onChange: b
|
|
457
457
|
}, {
|
|
458
458
|
default: v(() => [
|
|
459
|
-
(u(!0), x(H, null,
|
|
459
|
+
(u(!0), x(H, null, z(r.value, (C) => (u(), U(A, {
|
|
460
460
|
key: C.value,
|
|
461
461
|
value: C.value,
|
|
462
462
|
label: C.label
|
|
@@ -466,7 +466,7 @@ const pe = (e, t) => {
|
|
|
466
466
|
}, 8, ["modelValue", "loading"]);
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
|
-
}),
|
|
469
|
+
}), zt = /* @__PURE__ */ O({
|
|
470
470
|
__name: "Cascader",
|
|
471
471
|
props: {
|
|
472
472
|
modelValue: {},
|
|
@@ -481,7 +481,7 @@ const pe = (e, t) => {
|
|
|
481
481
|
if (n.config) {
|
|
482
482
|
const s = n.config.dataSourceProvider;
|
|
483
483
|
if (s) {
|
|
484
|
-
const b = await (await
|
|
484
|
+
const b = await (await j()).get(s);
|
|
485
485
|
c.value = b.data;
|
|
486
486
|
}
|
|
487
487
|
}
|
|
@@ -492,8 +492,8 @@ const pe = (e, t) => {
|
|
|
492
492
|
return !0;
|
|
493
493
|
}
|
|
494
494
|
}), (s, i) => {
|
|
495
|
-
const b = $("ACascader"),
|
|
496
|
-
return u(), U(
|
|
495
|
+
const b = $("ACascader"), f = $("ASpace");
|
|
496
|
+
return u(), U(f, {
|
|
497
497
|
direction: "vertical",
|
|
498
498
|
size: "large"
|
|
499
499
|
}, {
|
|
@@ -511,7 +511,7 @@ const pe = (e, t) => {
|
|
|
511
511
|
});
|
|
512
512
|
};
|
|
513
513
|
}
|
|
514
|
-
}),
|
|
514
|
+
}), jt = /* @__PURE__ */ O({
|
|
515
515
|
__name: "FileUpload",
|
|
516
516
|
props: {
|
|
517
517
|
className: {},
|
|
@@ -532,13 +532,13 @@ const pe = (e, t) => {
|
|
|
532
532
|
};
|
|
533
533
|
});
|
|
534
534
|
const r = (_) => pe(n.validations, _), s = Me().apiBase, i = w(null), b = w("");
|
|
535
|
-
function
|
|
535
|
+
function f(_, C, B) {
|
|
536
536
|
return _.replace(/{WorkflowId}/g, C).replace(/{ClassName}/g, B);
|
|
537
537
|
}
|
|
538
538
|
const k = q(() => {
|
|
539
539
|
if (n.config.uploadURL) {
|
|
540
540
|
const _ = s + n.config.uploadURL;
|
|
541
|
-
return
|
|
541
|
+
return f(_, b.value, n.className);
|
|
542
542
|
}
|
|
543
543
|
return "";
|
|
544
544
|
});
|
|
@@ -662,7 +662,7 @@ const pe = (e, t) => {
|
|
|
662
662
|
const b = $("ACheckbox");
|
|
663
663
|
return u(), U(b, {
|
|
664
664
|
modelValue: c.value,
|
|
665
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
665
|
+
"onUpdate:modelValue": i[0] || (i[0] = (f) => c.value = f),
|
|
666
666
|
clearable: "",
|
|
667
667
|
disabled: n.readonly || n.config.Readonly,
|
|
668
668
|
onChange: l
|
|
@@ -697,7 +697,7 @@ const pe = (e, t) => {
|
|
|
697
697
|
}),
|
|
698
698
|
emits: /* @__PURE__ */ oe(["update:modelValue", "change", "error"], ["update:modelValue"]),
|
|
699
699
|
setup(e, { expose: t, emit: a }) {
|
|
700
|
-
const n = e, o = a, c = _e(e, "modelValue"), r =
|
|
700
|
+
const n = e, o = a, c = _e(e, "modelValue"), r = De("widgetRef"), l = q(() => {
|
|
701
701
|
switch (n.config?.widget?.widget) {
|
|
702
702
|
case "TextBox":
|
|
703
703
|
return Oe;
|
|
@@ -706,9 +706,9 @@ const pe = (e, t) => {
|
|
|
706
706
|
case "SelectList":
|
|
707
707
|
return Ge;
|
|
708
708
|
case "Cascade":
|
|
709
|
-
return jt;
|
|
710
|
-
case "File":
|
|
711
709
|
return zt;
|
|
710
|
+
case "File":
|
|
711
|
+
return jt;
|
|
712
712
|
case "TextArea":
|
|
713
713
|
return Et;
|
|
714
714
|
case "DropDown":
|
|
@@ -723,7 +723,7 @@ const pe = (e, t) => {
|
|
|
723
723
|
}, b = (k, A) => {
|
|
724
724
|
o("change", k, A);
|
|
725
725
|
};
|
|
726
|
-
function
|
|
726
|
+
function f() {
|
|
727
727
|
return n.config?.widget?.widget === "File";
|
|
728
728
|
}
|
|
729
729
|
return t({
|
|
@@ -731,7 +731,7 @@ const pe = (e, t) => {
|
|
|
731
731
|
return n.config?.widget?.widget === "File";
|
|
732
732
|
},
|
|
733
733
|
submit(k) {
|
|
734
|
-
|
|
734
|
+
f() && r.value.submit(k);
|
|
735
735
|
},
|
|
736
736
|
validate() {
|
|
737
737
|
return r.value?.validate();
|
|
@@ -745,7 +745,7 @@ const pe = (e, t) => {
|
|
|
745
745
|
n.config.validations.length ? (u(), x("span", Wt, "*")) : Q("", !0)
|
|
746
746
|
]),
|
|
747
747
|
I("div", null, [
|
|
748
|
-
(u(), U(
|
|
748
|
+
(u(), U(Pe(l.value), {
|
|
749
749
|
ref_key: "widgetRef",
|
|
750
750
|
ref: r,
|
|
751
751
|
modelValue: c.value,
|
|
@@ -838,7 +838,7 @@ const pe = (e, t) => {
|
|
|
838
838
|
return Xt;
|
|
839
839
|
}
|
|
840
840
|
}), r = q(() => a.config.widget === Y.Submit ? a.config.requestUrl ?? "" : a.config.widget === Y.Link ? a.config.redirectUrl ?? "" : ""), l = q(() => a.config.redirectType ?? "Details");
|
|
841
|
-
return (s, i) => (u(), U(
|
|
841
|
+
return (s, i) => (u(), U(Pe(c.value), {
|
|
842
842
|
url: r.value,
|
|
843
843
|
"redirect-type": l.value,
|
|
844
844
|
loading: s.loading,
|
|
@@ -906,7 +906,7 @@ const Zt = { class: "top-bar" }, en = { class: "banner-info" }, tn = { class: "p
|
|
|
906
906
|
};
|
|
907
907
|
}
|
|
908
908
|
}), Ve = /* @__PURE__ */ me(sn, [["__scopeId", "data-v-c0457235"]]);
|
|
909
|
-
function
|
|
909
|
+
function ze(e) {
|
|
910
910
|
const t = Me(), a = [];
|
|
911
911
|
if (t.fieldsGroup) {
|
|
912
912
|
t.fieldsGroup.forEach((c) => {
|
|
@@ -926,7 +926,7 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
926
926
|
className: {}
|
|
927
927
|
},
|
|
928
928
|
setup(e) {
|
|
929
|
-
const t = Ce(), a = Se(), n = ke(), o = Ke(), c =
|
|
929
|
+
const t = Ce(), a = Se(), n = ke(), o = Ke(), c = De("dataWidgets"), r = ye(), l = e, s = w({
|
|
930
930
|
pageType: "",
|
|
931
931
|
fields: {},
|
|
932
932
|
globalValidations: [],
|
|
@@ -935,7 +935,7 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
935
935
|
subTitle: ""
|
|
936
936
|
}
|
|
937
937
|
}), i = w([]), b = w({});
|
|
938
|
-
function
|
|
938
|
+
function f(y) {
|
|
939
939
|
return y ? Object.entries(y).map(([m, S]) => ({
|
|
940
940
|
fieldKey: m,
|
|
941
941
|
...S
|
|
@@ -949,11 +949,11 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
949
949
|
C.value = !0, s.value = await he(de.Create, l.className, {
|
|
950
950
|
svrStore: a,
|
|
951
951
|
bpmStore: t
|
|
952
|
-
}), i.value =
|
|
952
|
+
}), i.value = f(s.value.fields), b.value = k(s.value.fields);
|
|
953
953
|
for (const y in s.value.fields) {
|
|
954
954
|
if (s.value.fields[y].widget?.widget === "File") {
|
|
955
|
-
const
|
|
956
|
-
|
|
955
|
+
const P = i.value.find((m) => m.fieldKey === y);
|
|
956
|
+
P && P.widget && (P.widget.files = []);
|
|
957
957
|
}
|
|
958
958
|
_[y] = s.value.fields[y].modelValue;
|
|
959
959
|
}
|
|
@@ -962,8 +962,8 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
962
962
|
function B() {
|
|
963
963
|
return a()?.userInfo?.email_address ?? "";
|
|
964
964
|
}
|
|
965
|
-
async function J(y,
|
|
966
|
-
switch (
|
|
965
|
+
async function J(y, P, m, S, V) {
|
|
966
|
+
switch (P) {
|
|
967
967
|
case Y.Submit:
|
|
968
968
|
let F = !0;
|
|
969
969
|
if (c.value?.forEach((Z) => {
|
|
@@ -982,7 +982,7 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
982
982
|
S === "List" && n.push({ name: "List", params: { className: l.className } });
|
|
983
983
|
break;
|
|
984
984
|
default:
|
|
985
|
-
console.warn("Unknown action type:",
|
|
985
|
+
console.warn("Unknown action type:", P);
|
|
986
986
|
}
|
|
987
987
|
}
|
|
988
988
|
const X = w([
|
|
@@ -993,11 +993,11 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
993
993
|
"jobAttachmentPrevious",
|
|
994
994
|
"positionId"
|
|
995
995
|
]);
|
|
996
|
-
function re(y,
|
|
997
|
-
o[y]?.(
|
|
996
|
+
function re(y, P) {
|
|
997
|
+
o[y]?.(P, X), s.value && (i.value = f(s.value.fields));
|
|
998
998
|
}
|
|
999
|
-
const ue = q(() =>
|
|
1000
|
-
return (y,
|
|
999
|
+
const ue = q(() => ze(i.value));
|
|
1000
|
+
return (y, P) => {
|
|
1001
1001
|
const m = $("a-card"), S = $("a-spin");
|
|
1002
1002
|
return u(), x("div", rn, [
|
|
1003
1003
|
L(Ve, {
|
|
@@ -1013,14 +1013,14 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
1013
1013
|
default: v(() => [
|
|
1014
1014
|
I("div", cn, [
|
|
1015
1015
|
I("div", un, [
|
|
1016
|
-
(u(!0), x(H, null,
|
|
1016
|
+
(u(!0), x(H, null, z(ue.value, (V) => (u(), U(m, {
|
|
1017
1017
|
key: V.name,
|
|
1018
1018
|
title: V.name,
|
|
1019
1019
|
style: { "margin-bottom": "24px" }
|
|
1020
1020
|
}, {
|
|
1021
1021
|
default: v(() => [
|
|
1022
1022
|
I("div", dn, [
|
|
1023
|
-
(u(!0), x(H, null,
|
|
1023
|
+
(u(!0), x(H, null, z(V.fields, (F) => (u(), U(Be, {
|
|
1024
1024
|
key: F.fieldKey,
|
|
1025
1025
|
ref_for: !0,
|
|
1026
1026
|
ref: "dataWidgets",
|
|
@@ -1049,7 +1049,7 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
1049
1049
|
I("div", mn, [
|
|
1050
1050
|
le(y.$slots, "action", {}, void 0, !0),
|
|
1051
1051
|
I("div", gn, [
|
|
1052
|
-
(u(!0), x(H, null,
|
|
1052
|
+
(u(!0), x(H, null, z(A.value, (V) => (u(), U(ve, {
|
|
1053
1053
|
key: V.Title,
|
|
1054
1054
|
loading: C.value,
|
|
1055
1055
|
config: V,
|
|
@@ -1072,7 +1072,7 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
1072
1072
|
workflowId: {}
|
|
1073
1073
|
},
|
|
1074
1074
|
setup(e) {
|
|
1075
|
-
const t = ke(), a = Ke(), n = Se(), o = Ce(), c =
|
|
1075
|
+
const t = ke(), a = Ke(), n = Se(), o = Ce(), c = De("dataWidgets"), r = ye(), l = e, s = w({
|
|
1076
1076
|
pageType: "",
|
|
1077
1077
|
fields: {},
|
|
1078
1078
|
globalValidations: [],
|
|
@@ -1081,7 +1081,7 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
1081
1081
|
subTitle: ""
|
|
1082
1082
|
}
|
|
1083
1083
|
}), i = w([]), b = w({});
|
|
1084
|
-
function
|
|
1084
|
+
function f(y) {
|
|
1085
1085
|
return y ? Object.entries(y).map(([m, S]) => ({
|
|
1086
1086
|
fieldKey: m,
|
|
1087
1087
|
...S
|
|
@@ -1098,15 +1098,15 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
1098
1098
|
}, {
|
|
1099
1099
|
workflowId: l.workflowId
|
|
1100
1100
|
});
|
|
1101
|
-
const y = await Xe(de.Update, l.className, { workflowId: l.workflowId, email: B() }),
|
|
1101
|
+
const y = await Xe(de.Update, l.className, { workflowId: l.workflowId, email: B() }), P = await Qe(l.className, l.workflowId);
|
|
1102
1102
|
s.value.actions = s.value.actions?.filter((m) => {
|
|
1103
1103
|
const S = y.find((V) => V.button === m.title);
|
|
1104
1104
|
return S ? S.isShow : !0;
|
|
1105
|
-
}), i.value =
|
|
1105
|
+
}), i.value = f(s.value.fields), b.value = k(s.value.fields);
|
|
1106
1106
|
for (const m in s.value.fields) {
|
|
1107
1107
|
if (s.value.fields[m].widget?.widget === "File") {
|
|
1108
1108
|
const S = i.value.find((V) => V.fieldKey === m);
|
|
1109
|
-
S && S.widget && (S.widget.files =
|
|
1109
|
+
S && S.widget && (S.widget.files = P[m] ?? [], S.widget.removeFile = (V) => Ft(l.className, V));
|
|
1110
1110
|
}
|
|
1111
1111
|
_[m] = s.value.fields[m].modelValue;
|
|
1112
1112
|
}
|
|
@@ -1115,8 +1115,8 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
1115
1115
|
function B() {
|
|
1116
1116
|
return n()?.userInfo?.email_address ?? "";
|
|
1117
1117
|
}
|
|
1118
|
-
async function J(y,
|
|
1119
|
-
switch (
|
|
1118
|
+
async function J(y, P, m, S, V) {
|
|
1119
|
+
switch (P) {
|
|
1120
1120
|
case Y.Submit:
|
|
1121
1121
|
let F = !0;
|
|
1122
1122
|
if (c.value?.forEach((M) => {
|
|
@@ -1133,7 +1133,7 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
1133
1133
|
t.push({ name: S, params: { className: l.className } });
|
|
1134
1134
|
break;
|
|
1135
1135
|
default:
|
|
1136
|
-
console.warn("Unknown action type:",
|
|
1136
|
+
console.warn("Unknown action type:", P);
|
|
1137
1137
|
}
|
|
1138
1138
|
}
|
|
1139
1139
|
const X = w([
|
|
@@ -1144,11 +1144,11 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
1144
1144
|
"jobAttachmentPrevious",
|
|
1145
1145
|
"positionId"
|
|
1146
1146
|
]);
|
|
1147
|
-
function re(y,
|
|
1148
|
-
a[y]?.(
|
|
1147
|
+
function re(y, P) {
|
|
1148
|
+
a[y]?.(P, X), s.value && (i.value = f(s.value.fields));
|
|
1149
1149
|
}
|
|
1150
|
-
const ue = q(() =>
|
|
1151
|
-
return (y,
|
|
1150
|
+
const ue = q(() => ze(i.value));
|
|
1151
|
+
return (y, P) => {
|
|
1152
1152
|
const m = $("a-card"), S = $("a-spin");
|
|
1153
1153
|
return u(), x("div", yn, [
|
|
1154
1154
|
L(Ve, {
|
|
@@ -1164,14 +1164,14 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
1164
1164
|
default: v(() => [
|
|
1165
1165
|
I("div", bn, [
|
|
1166
1166
|
I("div", hn, [
|
|
1167
|
-
(u(!0), x(H, null,
|
|
1167
|
+
(u(!0), x(H, null, z(ue.value, (V) => (u(), U(m, {
|
|
1168
1168
|
key: V.name,
|
|
1169
1169
|
title: V.name,
|
|
1170
1170
|
style: { "margin-bottom": "24px" }
|
|
1171
1171
|
}, {
|
|
1172
1172
|
default: v(() => [
|
|
1173
1173
|
I("div", kn, [
|
|
1174
|
-
(u(!0), x(H, null,
|
|
1174
|
+
(u(!0), x(H, null, z(V.fields, (F) => (u(), U(Be, {
|
|
1175
1175
|
key: F.fieldKey,
|
|
1176
1176
|
ref_for: !0,
|
|
1177
1177
|
ref: "dataWidgets",
|
|
@@ -1200,7 +1200,7 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
1200
1200
|
I("div", Vn, [
|
|
1201
1201
|
le(y.$slots, "action", {}, void 0, !0),
|
|
1202
1202
|
I("div", xn, [
|
|
1203
|
-
(u(!0), x(H, null,
|
|
1203
|
+
(u(!0), x(H, null, z(A.value, (V) => (u(), U(ve, {
|
|
1204
1204
|
key: V.Title,
|
|
1205
1205
|
loading: C.value,
|
|
1206
1206
|
config: V,
|
|
@@ -1222,10 +1222,10 @@ const Tn = Symbol("ArcoConfigProvider"), Un = "arco", Nn = "$arco", Ln = (e) =>
|
|
|
1222
1222
|
const o = ye(), c = fe(Tn, void 0);
|
|
1223
1223
|
return `${(n = (a = c?.prefixCls) != null ? a : (t = o?.appContext.config.globalProperties[Nn]) == null ? void 0 : t.classPrefix) != null ? n : Un}-${e}`;
|
|
1224
1224
|
}, Fn = Object.prototype.toString;
|
|
1225
|
-
function
|
|
1225
|
+
function Dn(e) {
|
|
1226
1226
|
return Fn.call(e) === "[object Number]" && e === e;
|
|
1227
1227
|
}
|
|
1228
|
-
var
|
|
1228
|
+
var Pn = (e, t) => {
|
|
1229
1229
|
for (const [a, n] of t)
|
|
1230
1230
|
e[a] = n;
|
|
1231
1231
|
return e;
|
|
@@ -1259,7 +1259,7 @@ const Rn = O({
|
|
|
1259
1259
|
setup(e, { emit: t }) {
|
|
1260
1260
|
const a = Ln("icon"), n = q(() => [a, `${a}-download`, { [`${a}-spin`]: e.spin }]), o = q(() => {
|
|
1261
1261
|
const r = {};
|
|
1262
|
-
return e.size && (r.fontSize =
|
|
1262
|
+
return e.size && (r.fontSize = Dn(e.size) ? `${e.size}px` : e.size), e.rotate && (r.transform = `rotate(${e.rotate}deg)`), r;
|
|
1263
1263
|
});
|
|
1264
1264
|
return {
|
|
1265
1265
|
cls: n,
|
|
@@ -1286,14 +1286,14 @@ function Hn(e, t, a, n, o, c) {
|
|
|
1286
1286
|
I("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
|
|
1287
1287
|
]), 14, Mn);
|
|
1288
1288
|
}
|
|
1289
|
-
var Le = /* @__PURE__ */
|
|
1289
|
+
var Le = /* @__PURE__ */ Pn(Rn, [["render", Hn]]);
|
|
1290
1290
|
const Bn = Object.assign(Le, {
|
|
1291
1291
|
install: (e, t) => {
|
|
1292
1292
|
var a;
|
|
1293
1293
|
const n = (a = t?.iconPrefix) != null ? a : "";
|
|
1294
1294
|
e.component(n + Le.name, Le);
|
|
1295
1295
|
}
|
|
1296
|
-
}), Kn = { class: "page-container" },
|
|
1296
|
+
}), Kn = { class: "page-container" }, zn = { class: "page-body" }, jn = { class: "detail-card" }, En = { class: "form-fields-vertical" }, On = { class: "detail-fields" }, Gn = { class: "detail-field" }, Wn = { class: "field-label" }, qn = {
|
|
1297
1297
|
key: 1,
|
|
1298
1298
|
class: "field-value"
|
|
1299
1299
|
}, Yn = {
|
|
@@ -1318,15 +1318,15 @@ const Bn = Object.assign(Le, {
|
|
|
1318
1318
|
subTitle: ""
|
|
1319
1319
|
}
|
|
1320
1320
|
}), i = w([]);
|
|
1321
|
-
function b(
|
|
1322
|
-
return
|
|
1323
|
-
fieldKey:
|
|
1321
|
+
function b(p) {
|
|
1322
|
+
return p ? Object.entries(p).map(([D, g]) => (typeof g.modelValue == "boolean" ? g.fieldValue = g.modelValue ? "Yes" : "No" : g.fieldValue = g.modelValue, {
|
|
1323
|
+
fieldKey: D,
|
|
1324
1324
|
...g
|
|
1325
|
-
})).filter((
|
|
1325
|
+
})).filter((D) => D.widget && D.widget.widget !== "Hidden") : [];
|
|
1326
1326
|
}
|
|
1327
|
-
const
|
|
1328
|
-
const
|
|
1329
|
-
return
|
|
1327
|
+
const f = q(() => ze(i.value)), k = q(() => s.value?.actions ? [...s.value.actions].reverse() : []), A = w(!0), _ = (p, d) => {
|
|
1328
|
+
const D = p.findIndex((g) => g.isCurrent);
|
|
1329
|
+
return p.map((g, K) => {
|
|
1330
1330
|
const T = {
|
|
1331
1331
|
id: g.id,
|
|
1332
1332
|
title: "",
|
|
@@ -1353,7 +1353,7 @@ const Bn = Object.assign(Le, {
|
|
|
1353
1353
|
const ne = N.workflowHistoryApprovers[0];
|
|
1354
1354
|
T.status = 3, T.desc = ne?.reason ? `Rejected reason: ${ne.reason}` : "Rejected";
|
|
1355
1355
|
}
|
|
1356
|
-
else K <
|
|
1356
|
+
else K < D || D === -1 ? (T.status = 0, T.desc = "Skipped") : (T.status = 0, T.desc = "Pending Approval");
|
|
1357
1357
|
N && N.status;
|
|
1358
1358
|
}
|
|
1359
1359
|
return T;
|
|
@@ -1366,34 +1366,34 @@ const Bn = Object.assign(Le, {
|
|
|
1366
1366
|
}, {
|
|
1367
1367
|
workflowId: l.workflowId
|
|
1368
1368
|
});
|
|
1369
|
-
const
|
|
1370
|
-
F.value = await
|
|
1371
|
-
const K =
|
|
1369
|
+
const p = await Xe(de.Details, l.className, { workflowId: l.workflowId, email: y() }), d = await Qe(l.className, l.workflowId);
|
|
1370
|
+
F.value = await Dt(), S.value = await Ee(l.workflowId), M.value = await Ne(l.workflowId), s.value.actions = s.value.actions?.filter((g) => {
|
|
1371
|
+
const K = p.find((T) => T.button === g.title);
|
|
1372
1372
|
return K ? K.isShow : !0;
|
|
1373
|
-
}), B.value =
|
|
1373
|
+
}), B.value = p.find((g) => g.button === "IsGlobal")?.isShow ?? !1, J.value = p.find((g) => g.button === "AssignButton")?.isShow ?? !1, ae.value = p.find((g) => g.button === "AssignList")?.isShow ?? !1, X.value = p.find((g) => g.button === "CommentsText")?.isShow ?? !1, i.value = b(s.value.fields);
|
|
1374
1374
|
for (const g in s.value.fields)
|
|
1375
1375
|
if (s.value.fields[g].widget?.widget === "File") {
|
|
1376
1376
|
const K = i.value.find((T) => T.fieldKey === g);
|
|
1377
1377
|
K && K.widget && (K.widget.files = d[g] ?? []);
|
|
1378
1378
|
}
|
|
1379
|
-
const
|
|
1380
|
-
C.value = _(
|
|
1379
|
+
const D = await Nt(l.className, l.workflowId);
|
|
1380
|
+
C.value = _(D, 0), A.value = !1;
|
|
1381
1381
|
}
|
|
1382
1382
|
ce(re);
|
|
1383
|
-
async function ue(
|
|
1384
|
-
return n[
|
|
1383
|
+
async function ue(p, d) {
|
|
1384
|
+
return n[p]?.(d);
|
|
1385
1385
|
}
|
|
1386
1386
|
function y() {
|
|
1387
1387
|
return t()?.userInfo?.email_address ?? "";
|
|
1388
1388
|
}
|
|
1389
|
-
async function
|
|
1389
|
+
async function P(p, d, D, g, K) {
|
|
1390
1390
|
try {
|
|
1391
1391
|
switch (d) {
|
|
1392
1392
|
case Y.Submit:
|
|
1393
1393
|
const { reason: T, ifGlobal: se } = await ue(K, { isGlobal: B.value });
|
|
1394
1394
|
A.value = !0;
|
|
1395
1395
|
const ee = K === "Approve" ? "100" : "-1";
|
|
1396
|
-
await It(l.className, l.workflowId, y(), T, [Number(l.workflowId)],
|
|
1396
|
+
await It(l.className, l.workflowId, y(), T, [Number(l.workflowId)], D, ee, se), A.value = !1;
|
|
1397
1397
|
const te = K === "Approve" ? "approve success!" : "approve reject!";
|
|
1398
1398
|
r?.appContext.config.globalProperties.$notification.success(te), re();
|
|
1399
1399
|
break;
|
|
@@ -1412,13 +1412,13 @@ const Bn = Object.assign(Le, {
|
|
|
1412
1412
|
r?.appContext.config.globalProperties.$message.error("Please select an approver");
|
|
1413
1413
|
return;
|
|
1414
1414
|
}
|
|
1415
|
-
await we("Confirm Assign Approver", "Do you want to assign the selected approver?"), await
|
|
1415
|
+
await we("Confirm Assign Approver", "Do you want to assign the selected approver?"), await Pt(l.workflowId, V.value), M.value = await Ne(l.workflowId), r?.appContext.config.globalProperties.$notification.success("Assign Approver clicked!");
|
|
1416
1416
|
}
|
|
1417
|
-
async function we(
|
|
1418
|
-
const { Modal:
|
|
1417
|
+
async function we(p, d) {
|
|
1418
|
+
const { Modal: D } = await import("@arco-design/web-vue");
|
|
1419
1419
|
return new Promise((g, K) => {
|
|
1420
|
-
|
|
1421
|
-
title:
|
|
1420
|
+
D.confirm({
|
|
1421
|
+
title: p,
|
|
1422
1422
|
content: d,
|
|
1423
1423
|
okText: "OK",
|
|
1424
1424
|
cancelText: "Cancel",
|
|
@@ -1427,14 +1427,14 @@ const Bn = Object.assign(Le, {
|
|
|
1427
1427
|
});
|
|
1428
1428
|
});
|
|
1429
1429
|
}
|
|
1430
|
-
async function xe(
|
|
1430
|
+
async function xe(p) {
|
|
1431
1431
|
try {
|
|
1432
1432
|
await we("Confirm Delete Associator", "Do you want to delete this associator?");
|
|
1433
1433
|
} catch {
|
|
1434
1434
|
return;
|
|
1435
1435
|
}
|
|
1436
1436
|
try {
|
|
1437
|
-
await Mt(String(
|
|
1437
|
+
await Mt(String(p)), M.value = await Ne(l.workflowId), r?.appContext.config.globalProperties.$notification.success("Associator deleted successfully!");
|
|
1438
1438
|
} catch {
|
|
1439
1439
|
r?.appContext.config.globalProperties.$notification.error("Failed to delete associator");
|
|
1440
1440
|
}
|
|
@@ -1446,44 +1446,44 @@ const Bn = Object.assign(Le, {
|
|
|
1446
1446
|
}
|
|
1447
1447
|
await Rt(l.workflowId, y(), m.value), m.value = "", S.value = await Ee(l.workflowId), r?.appContext.config.globalProperties.$notification.success("Add Comment clicked!");
|
|
1448
1448
|
}
|
|
1449
|
-
return (
|
|
1450
|
-
const
|
|
1449
|
+
return (p, d) => {
|
|
1450
|
+
const D = $("a-link"), g = $("a-space"), K = $("a-card"), T = $("a-option"), se = $("a-select"), ee = $("a-button"), te = $("a-list-item"), N = $("a-list"), ne = $("a-textarea"), $e = $("a-spin");
|
|
1451
1451
|
return u(), x("div", Kn, [
|
|
1452
1452
|
L(Ve, {
|
|
1453
1453
|
title: s.value.banner.title,
|
|
1454
1454
|
subTitle: s.value.banner.subTitle,
|
|
1455
1455
|
email: y()
|
|
1456
1456
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1457
|
-
I("div",
|
|
1457
|
+
I("div", zn, [
|
|
1458
1458
|
L($e, {
|
|
1459
1459
|
loading: A.value,
|
|
1460
1460
|
class: "detail-container"
|
|
1461
1461
|
}, {
|
|
1462
1462
|
default: v(() => [
|
|
1463
|
-
I("div",
|
|
1464
|
-
(u(), U(
|
|
1463
|
+
I("div", jn, [
|
|
1464
|
+
(u(), U(Pe(Ie(c).Steps), { steps: C.value }, null, 8, ["steps"])),
|
|
1465
1465
|
I("div", En, [
|
|
1466
|
-
(u(!0), x(H, null,
|
|
1466
|
+
(u(!0), x(H, null, z(f.value, (R) => (u(), U(K, {
|
|
1467
1467
|
key: R.name,
|
|
1468
1468
|
title: R.name,
|
|
1469
1469
|
style: { "margin-bottom": "24px" }
|
|
1470
1470
|
}, {
|
|
1471
1471
|
default: v(() => [
|
|
1472
1472
|
I("div", On, [
|
|
1473
|
-
(u(!0), x(H, null,
|
|
1473
|
+
(u(!0), x(H, null, z(R.fields, (ie) => (u(), x("div", {
|
|
1474
1474
|
key: ie.fieldKey,
|
|
1475
1475
|
class: "detail-field-wrapper"
|
|
1476
1476
|
}, [
|
|
1477
1477
|
I("div", Gn, [
|
|
1478
1478
|
I("div", Wn, W(ie.widget?.title), 1),
|
|
1479
|
-
ie.widget?.widget === "File" ? (u(!0), x(H, { key: 0 },
|
|
1479
|
+
ie.widget?.widget === "File" ? (u(!0), x(H, { key: 0 }, z(ie.widget.files, (Ae) => (u(), x("div", {
|
|
1480
1480
|
class: "field-value",
|
|
1481
1481
|
key: Ae.id
|
|
1482
1482
|
}, [
|
|
1483
1483
|
L(g, null, {
|
|
1484
1484
|
default: v(() => [
|
|
1485
1485
|
G(W(Ae.name) + " ", 1),
|
|
1486
|
-
L(
|
|
1486
|
+
L(D, {
|
|
1487
1487
|
href: Ae.url,
|
|
1488
1488
|
target: "_blank"
|
|
1489
1489
|
}, {
|
|
@@ -1509,7 +1509,7 @@ const Bn = Object.assign(Le, {
|
|
|
1509
1509
|
"onUpdate:modelValue": d[0] || (d[0] = (R) => V.value = R)
|
|
1510
1510
|
}, {
|
|
1511
1511
|
default: v(() => [
|
|
1512
|
-
(u(!0), x(H, null,
|
|
1512
|
+
(u(!0), x(H, null, z(F.value, (R) => (u(), U(T, {
|
|
1513
1513
|
key: R.value,
|
|
1514
1514
|
value: R.value
|
|
1515
1515
|
}, {
|
|
@@ -1539,7 +1539,7 @@ const Bn = Object.assign(Le, {
|
|
|
1539
1539
|
G(" Associators ", -1)
|
|
1540
1540
|
])),
|
|
1541
1541
|
default: v(() => [
|
|
1542
|
-
(u(!0), x(H, null,
|
|
1542
|
+
(u(!0), x(H, null, z(M.value, (R) => (u(), U(te, {
|
|
1543
1543
|
key: R.id
|
|
1544
1544
|
}, {
|
|
1545
1545
|
actions: v(() => [
|
|
@@ -1587,7 +1587,7 @@ const Bn = Object.assign(Le, {
|
|
|
1587
1587
|
G(" Comments History ", -1)
|
|
1588
1588
|
])),
|
|
1589
1589
|
default: v(() => [
|
|
1590
|
-
(u(!0), x(H, null,
|
|
1590
|
+
(u(!0), x(H, null, z(S.value, (R) => (u(), U(te, {
|
|
1591
1591
|
key: R.associator
|
|
1592
1592
|
}, {
|
|
1593
1593
|
default: v(() => [
|
|
@@ -1599,8 +1599,8 @@ const Bn = Object.assign(Le, {
|
|
|
1599
1599
|
_: 1
|
|
1600
1600
|
})) : Q("", !0)
|
|
1601
1601
|
]),
|
|
1602
|
-
|
|
1603
|
-
le(
|
|
1602
|
+
p.$slots.content ? (u(), x("div", Xn, [
|
|
1603
|
+
le(p.$slots, "content", {}, void 0, !0)
|
|
1604
1604
|
])) : Q("", !0)
|
|
1605
1605
|
])
|
|
1606
1606
|
]),
|
|
@@ -1609,14 +1609,14 @@ const Bn = Object.assign(Le, {
|
|
|
1609
1609
|
]),
|
|
1610
1610
|
I("div", Qn, [
|
|
1611
1611
|
I("div", Zn, [
|
|
1612
|
-
le(
|
|
1612
|
+
le(p.$slots, "action", {}, void 0, !0),
|
|
1613
1613
|
I("div", eo, [
|
|
1614
|
-
(u(!0), x(H, null,
|
|
1614
|
+
(u(!0), x(H, null, z(k.value, (R) => (u(), U(ve, {
|
|
1615
1615
|
key: R.Title,
|
|
1616
1616
|
loading: A.value,
|
|
1617
1617
|
config: R,
|
|
1618
1618
|
class: "action-button",
|
|
1619
|
-
onClick: (...ie) =>
|
|
1619
|
+
onClick: (...ie) => P(R, ...ie)
|
|
1620
1620
|
}, null, 8, ["loading", "config", "onClick"]))), 128))
|
|
1621
1621
|
])
|
|
1622
1622
|
])
|
|
@@ -1641,10 +1641,10 @@ const Bn = Object.assign(Le, {
|
|
|
1641
1641
|
filters: []
|
|
1642
1642
|
});
|
|
1643
1643
|
function s() {
|
|
1644
|
-
const h = Object.entries(S.value).filter(([, { value:
|
|
1645
|
-
key:
|
|
1644
|
+
const h = Object.entries(S.value).filter(([, { value: p }]) => p && p !== "").map(([p, { value: d, operator: D }]) => ({
|
|
1645
|
+
key: p,
|
|
1646
1646
|
value: d,
|
|
1647
|
-
operator:
|
|
1647
|
+
operator: D
|
|
1648
1648
|
// 根据实际需要调整操作符
|
|
1649
1649
|
}));
|
|
1650
1650
|
return {
|
|
@@ -1662,10 +1662,10 @@ const Bn = Object.assign(Le, {
|
|
|
1662
1662
|
// 只设置横向滚动
|
|
1663
1663
|
// 移除 y 属性,让表格高度自适应
|
|
1664
1664
|
})), b = (h) => {
|
|
1665
|
-
const
|
|
1666
|
-
title:
|
|
1665
|
+
const p = Object.entries(h).filter(([, d]) => d.widget?.column).map(([d, D], g) => ({
|
|
1666
|
+
title: D.widget.title,
|
|
1667
1667
|
dataIndex: d.charAt(0).toLowerCase() + d.slice(1),
|
|
1668
|
-
order:
|
|
1668
|
+
order: D.order,
|
|
1669
1669
|
ellipsis: !0,
|
|
1670
1670
|
tooltip: !0,
|
|
1671
1671
|
width: 150,
|
|
@@ -1673,8 +1673,8 @@ const Bn = Object.assign(Le, {
|
|
|
1673
1673
|
// 启用最小宽度
|
|
1674
1674
|
resizable: !0
|
|
1675
1675
|
// 启用列宽调整
|
|
1676
|
-
})).sort((d,
|
|
1677
|
-
|
|
1676
|
+
})).sort((d, D) => d.order - D.order);
|
|
1677
|
+
p.push({
|
|
1678
1678
|
title: "Actions",
|
|
1679
1679
|
slotName: "optional",
|
|
1680
1680
|
align: "center",
|
|
@@ -1682,11 +1682,11 @@ const Bn = Object.assign(Le, {
|
|
|
1682
1682
|
minWidth: 200,
|
|
1683
1683
|
fixed: "right",
|
|
1684
1684
|
resizable: !1
|
|
1685
|
-
}), k.value =
|
|
1686
|
-
},
|
|
1685
|
+
}), k.value = p, console.log("🚀 ~ mapColumns ~ _columns.value:", k.value);
|
|
1686
|
+
}, f = w([]), k = w([]), A = w(!0), _ = w(!0), C = w(), B = async () => {
|
|
1687
1687
|
_.value = !0;
|
|
1688
1688
|
const h = await ht(c.className, s());
|
|
1689
|
-
|
|
1689
|
+
f.value = h.data, console.log("🚀 ~ loadData ~ _data.value:", f.value), l.total = h.totalCount, _.value = !1;
|
|
1690
1690
|
}, J = w(!1);
|
|
1691
1691
|
ce(async () => {
|
|
1692
1692
|
A.value = !0, r.value = await he(3, c.className, {
|
|
@@ -1701,7 +1701,7 @@ const Bn = Object.assign(Le, {
|
|
|
1701
1701
|
}, X = (h) => {
|
|
1702
1702
|
l.pageSize = h, B();
|
|
1703
1703
|
};
|
|
1704
|
-
function re(h,
|
|
1704
|
+
function re(h, p, d, D, g) {
|
|
1705
1705
|
switch (h) {
|
|
1706
1706
|
case Y.Link:
|
|
1707
1707
|
n.push({ name: d, params: { workflowId: g } });
|
|
@@ -1710,10 +1710,10 @@ const Bn = Object.assign(Le, {
|
|
|
1710
1710
|
console.warn("Unknown action type:", h);
|
|
1711
1711
|
}
|
|
1712
1712
|
}
|
|
1713
|
-
function ue(h,
|
|
1713
|
+
function ue(h, p, d) {
|
|
1714
1714
|
switch (h) {
|
|
1715
1715
|
case Y.Submit:
|
|
1716
|
-
Ut(
|
|
1716
|
+
Ut(p), o?.appContext.config.globalProperties.$notification.success("submit success!");
|
|
1717
1717
|
break;
|
|
1718
1718
|
case Y.Link:
|
|
1719
1719
|
n.push({ name: d });
|
|
@@ -1725,36 +1725,36 @@ const Bn = Object.assign(Le, {
|
|
|
1725
1725
|
function y() {
|
|
1726
1726
|
return t()?.userInfo?.email_address ?? "";
|
|
1727
1727
|
}
|
|
1728
|
-
function
|
|
1729
|
-
return typeof h != "string" || h.indexOf("{currentUserEmail}") === -1 ? h : h.replace(/{currentUserEmail}/g,
|
|
1728
|
+
function P(h, p) {
|
|
1729
|
+
return typeof h != "string" || h.indexOf("{currentUserEmail}") === -1 ? h : h.replace(/{currentUserEmail}/g, p);
|
|
1730
1730
|
}
|
|
1731
1731
|
function m(h) {
|
|
1732
|
-
const
|
|
1733
|
-
l.filters =
|
|
1732
|
+
const p = r.value?.tabs?.find((d) => d.key === h)?.filters;
|
|
1733
|
+
l.filters = p?.map((d) => ({
|
|
1734
1734
|
...d,
|
|
1735
|
-
value:
|
|
1735
|
+
value: P(d.value, y())
|
|
1736
1736
|
})) || [], B();
|
|
1737
1737
|
}
|
|
1738
1738
|
const S = w({}), V = w([]);
|
|
1739
1739
|
function F(h) {
|
|
1740
1740
|
if (!h) return [];
|
|
1741
|
-
V.value = Object.entries(h).filter(([,
|
|
1741
|
+
V.value = Object.entries(h).filter(([, p]) => p.isFiltered).map(([p, d]) => ({ fieldKey: p, fieldConfig: d }));
|
|
1742
1742
|
}
|
|
1743
1743
|
const M = () => {
|
|
1744
1744
|
const h = {};
|
|
1745
|
-
V.value.forEach(({ fieldKey:
|
|
1746
|
-
h[
|
|
1745
|
+
V.value.forEach(({ fieldKey: p, fieldConfig: d }) => {
|
|
1746
|
+
h[p] = {}, h[p].value = d.modelValue, h[p].operator = d.operator;
|
|
1747
1747
|
}), S.value = h;
|
|
1748
1748
|
}, Z = () => {
|
|
1749
1749
|
l.current = 1, B();
|
|
1750
1750
|
}, we = () => {
|
|
1751
1751
|
r.value && M(), Z();
|
|
1752
1752
|
};
|
|
1753
|
-
function xe(h,
|
|
1754
|
-
return !(h.location !== "InTable" || h.title === "Update" && (
|
|
1753
|
+
function xe(h, p) {
|
|
1754
|
+
return !(h.location !== "InTable" || h.title === "Update" && (p.status === 100 || p.status === -1));
|
|
1755
1755
|
}
|
|
1756
|
-
return (h,
|
|
1757
|
-
const d = $("a-space"),
|
|
1756
|
+
return (h, p) => {
|
|
1757
|
+
const d = $("a-space"), D = $("a-col"), g = $("a-button"), K = $("a-row"), T = $("a-card"), se = $("a-tab-pane"), ee = $("a-tabs"), te = $("a-table");
|
|
1758
1758
|
return u(), x("div", oo, [
|
|
1759
1759
|
L(Ve, {
|
|
1760
1760
|
title: r.value?.banner.title ?? "",
|
|
@@ -1764,10 +1764,10 @@ const Bn = Object.assign(Le, {
|
|
|
1764
1764
|
L(T, null, {
|
|
1765
1765
|
default: v(() => [
|
|
1766
1766
|
I("div", ao, [
|
|
1767
|
-
|
|
1768
|
-
L(d,
|
|
1767
|
+
p[0] || (p[0] = I("h3", null, "Search Conditions", -1)),
|
|
1768
|
+
L(d, { size: "medium" }, {
|
|
1769
1769
|
default: v(() => [
|
|
1770
|
-
(u(!0), x(H, null,
|
|
1770
|
+
(u(!0), x(H, null, z(C.value, (N) => (u(), x(H, {
|
|
1771
1771
|
key: N.title
|
|
1772
1772
|
}, [
|
|
1773
1773
|
N.location === "InOperation" ? (u(), U(ve, {
|
|
@@ -1780,12 +1780,9 @@ const Bn = Object.assign(Le, {
|
|
|
1780
1780
|
_: 1
|
|
1781
1781
|
})
|
|
1782
1782
|
]),
|
|
1783
|
-
L(K, {
|
|
1784
|
-
gutter: [24, 20],
|
|
1785
|
-
class: "search-row"
|
|
1786
|
-
}, {
|
|
1783
|
+
L(K, { gutter: [24, 20] }, {
|
|
1787
1784
|
default: v(() => [
|
|
1788
|
-
(u(!0), x(H, null,
|
|
1785
|
+
(u(!0), x(H, null, z(V.value, (N) => (u(), U(D, {
|
|
1789
1786
|
key: N.fieldKey,
|
|
1790
1787
|
span: 6,
|
|
1791
1788
|
class: "search-col"
|
|
@@ -1801,7 +1798,7 @@ const Bn = Object.assign(Le, {
|
|
|
1801
1798
|
]),
|
|
1802
1799
|
_: 2
|
|
1803
1800
|
}, 1024))), 128)),
|
|
1804
|
-
L(
|
|
1801
|
+
L(D, {
|
|
1805
1802
|
span: 6,
|
|
1806
1803
|
class: "search-col form-buttons"
|
|
1807
1804
|
}, {
|
|
@@ -1813,7 +1810,7 @@ const Bn = Object.assign(Le, {
|
|
|
1813
1810
|
size: "medium",
|
|
1814
1811
|
onClick: Z
|
|
1815
1812
|
}, {
|
|
1816
|
-
default: v(() =>
|
|
1813
|
+
default: v(() => p[1] || (p[1] = [
|
|
1817
1814
|
G(" Search ", -1)
|
|
1818
1815
|
])),
|
|
1819
1816
|
_: 1,
|
|
@@ -1823,7 +1820,7 @@ const Bn = Object.assign(Le, {
|
|
|
1823
1820
|
size: "medium",
|
|
1824
1821
|
onClick: we
|
|
1825
1822
|
}, {
|
|
1826
|
-
default: v(() =>
|
|
1823
|
+
default: v(() => p[2] || (p[2] = [
|
|
1827
1824
|
G(" Reset ", -1)
|
|
1828
1825
|
])),
|
|
1829
1826
|
_: 1,
|
|
@@ -1846,7 +1843,7 @@ const Bn = Object.assign(Le, {
|
|
|
1846
1843
|
onTabClick: m
|
|
1847
1844
|
}, {
|
|
1848
1845
|
default: v(() => [
|
|
1849
|
-
(u(!0), x(H, null,
|
|
1846
|
+
(u(!0), x(H, null, z(r.value?.tabs, (N) => (u(), U(se, {
|
|
1850
1847
|
key: N.key,
|
|
1851
1848
|
title: N.title
|
|
1852
1849
|
}, null, 8, ["title"]))), 128))
|
|
@@ -1855,7 +1852,7 @@ const Bn = Object.assign(Le, {
|
|
|
1855
1852
|
}),
|
|
1856
1853
|
L(te, {
|
|
1857
1854
|
columns: k.value,
|
|
1858
|
-
data:
|
|
1855
|
+
data: f.value,
|
|
1859
1856
|
stripe: "",
|
|
1860
1857
|
border: "",
|
|
1861
1858
|
pagination: {
|
|
@@ -1876,7 +1873,7 @@ const Bn = Object.assign(Le, {
|
|
|
1876
1873
|
optional: v(({ record: N }) => [
|
|
1877
1874
|
L(d, { size: "small" }, {
|
|
1878
1875
|
default: v(() => [
|
|
1879
|
-
(u(!0), x(H, null,
|
|
1876
|
+
(u(!0), x(H, null, z(C.value, (ne) => (u(), x(H, {
|
|
1880
1877
|
key: ne.title
|
|
1881
1878
|
}, [
|
|
1882
1879
|
xe(ne, N) ? (u(), U(ve, {
|
|
@@ -1895,7 +1892,7 @@ const Bn = Object.assign(Le, {
|
|
|
1895
1892
|
]);
|
|
1896
1893
|
};
|
|
1897
1894
|
}
|
|
1898
|
-
}), ro = /* @__PURE__ */ me(so, [["__scopeId", "data-v-
|
|
1895
|
+
}), ro = /* @__PURE__ */ me(so, [["__scopeId", "data-v-c844a18d"]]), po = {
|
|
1899
1896
|
install(e, t = {}) {
|
|
1900
1897
|
t.config && gt(t.config), t.router && e.provide(Ze, t.router), t.pinia && e.provide(Qt, t.pinia), t.useBpmStore && e.provide(tt, t.useBpmStore), t.useSvrStore && e.provide(nt, t.useSvrStore), t.triggers && e.provide(et, t.triggers), t.customComps && e.provide(ot, t.customComps), e.component("CreateView", _n), e.component("UpdateView", An), e.component("DetailView", no), e.component("ListView", ro);
|
|
1901
1898
|
}
|