@chase-shao/vue-component-lib 1.2.59 → 1.2.61
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 +235 -233
- 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 +2 -2
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 F, nextTick as at, createTextVNode as G, useTemplateRef as Pe, createElementVNode as I, createCommentVNode as Q, toDisplayString as W, resolveDynamicComponent as De, 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";
|
|
@@ -43,12 +43,12 @@ const ft = ct("main", () => ({
|
|
|
43
43
|
return e.toLocaleString();
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
let
|
|
46
|
+
let Le = {};
|
|
47
47
|
function gt(e) {
|
|
48
|
-
|
|
48
|
+
Le = { ...Le, ...e };
|
|
49
49
|
}
|
|
50
50
|
function Me() {
|
|
51
|
-
return
|
|
51
|
+
return Le;
|
|
52
52
|
}
|
|
53
53
|
function We() {
|
|
54
54
|
const e = Me();
|
|
@@ -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,24 +249,24 @@ 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
|
-
function
|
|
269
|
+
function Ft(e) {
|
|
270
270
|
return {
|
|
271
271
|
uid: e.id ?? Je(),
|
|
272
272
|
name: e.attachmentName ?? "unknown",
|
|
@@ -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
|
-
return c[l] || (c[l] = []), c[l].push(
|
|
279
|
+
return c[l] || (c[l] = []), c[l].push(Ft(r)), c;
|
|
280
280
|
}, {});
|
|
281
281
|
}
|
|
282
|
-
async function
|
|
283
|
-
return (await
|
|
282
|
+
async function Lt(e, t) {
|
|
283
|
+
return (await j()).post(`/General/${e}/${t}/delete/attachment`);
|
|
284
284
|
}
|
|
285
285
|
async function Pt() {
|
|
286
|
-
const t = await (await
|
|
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
292
|
async function Dt(e, t) {
|
|
293
|
-
return await (await
|
|
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 = "";
|
|
@@ -449,24 +449,24 @@ const pe = (e, t) => {
|
|
|
449
449
|
return u(), U(_, {
|
|
450
450
|
"allow-clear": "",
|
|
451
451
|
modelValue: l.value,
|
|
452
|
-
"onUpdate:modelValue": k[0] || (k[0] = (
|
|
452
|
+
"onUpdate:modelValue": k[0] || (k[0] = (S) => l.value = S),
|
|
453
453
|
loading: c.value,
|
|
454
454
|
"filter-option": !0,
|
|
455
455
|
"allow-search": !0,
|
|
456
456
|
onChange: b
|
|
457
457
|
}, {
|
|
458
458
|
default: v(() => [
|
|
459
|
-
(u(!0), x(H, null,
|
|
460
|
-
key:
|
|
461
|
-
value:
|
|
462
|
-
label:
|
|
459
|
+
(u(!0), x(H, null, z(r.value, (S) => (u(), U(A, {
|
|
460
|
+
key: S.value,
|
|
461
|
+
value: S.value,
|
|
462
|
+
label: S.label
|
|
463
463
|
}, null, 8, ["value", "label"]))), 128))
|
|
464
464
|
]),
|
|
465
465
|
_: 1
|
|
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
|
}
|
|
@@ -498,7 +498,7 @@ const pe = (e, t) => {
|
|
|
498
498
|
size: "large"
|
|
499
499
|
}, {
|
|
500
500
|
default: v(() => [
|
|
501
|
-
|
|
501
|
+
F(b, {
|
|
502
502
|
"field-names": l,
|
|
503
503
|
"model-value": s.modelValue,
|
|
504
504
|
options: c.value,
|
|
@@ -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,8 +532,8 @@ 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 p(_,
|
|
536
|
-
return _.replace(/{WorkflowId}/g,
|
|
535
|
+
function p(_, S, B) {
|
|
536
|
+
return _.replace(/{WorkflowId}/g, S).replace(/{ClassName}/g, B);
|
|
537
537
|
}
|
|
538
538
|
const k = q(() => {
|
|
539
539
|
if (n.config.uploadURL) {
|
|
@@ -543,7 +543,7 @@ const pe = (e, t) => {
|
|
|
543
543
|
return "";
|
|
544
544
|
});
|
|
545
545
|
function A(_) {
|
|
546
|
-
const { file:
|
|
546
|
+
const { file: S, name: B } = _, J = B ?? S.name;
|
|
547
547
|
return new Promise((ae, X) => {
|
|
548
548
|
ut.confirm({
|
|
549
549
|
title: "Confirm Delete",
|
|
@@ -567,7 +567,7 @@ const pe = (e, t) => {
|
|
|
567
567
|
const _ = r(n.modelValue);
|
|
568
568
|
return o("error", _.res ? "" : _.errorMessages), _.res;
|
|
569
569
|
}
|
|
570
|
-
}), (_,
|
|
570
|
+
}), (_, S) => {
|
|
571
571
|
const B = $("a-button"), J = $("a-upload");
|
|
572
572
|
return u(), U(J, {
|
|
573
573
|
ref_key: "uploadRef",
|
|
@@ -580,10 +580,10 @@ const pe = (e, t) => {
|
|
|
580
580
|
headers: c.value,
|
|
581
581
|
onBeforeRemove: A
|
|
582
582
|
}, {
|
|
583
|
-
"start-icon": v(() =>
|
|
583
|
+
"start-icon": v(() => S[0] || (S[0] = [])),
|
|
584
584
|
"upload-button": v(() => [
|
|
585
|
-
|
|
586
|
-
default: v(() =>
|
|
585
|
+
F(B, { type: "primary" }, {
|
|
586
|
+
default: v(() => S[1] || (S[1] = [
|
|
587
587
|
G("Select File", -1)
|
|
588
588
|
])),
|
|
589
589
|
_: 1,
|
|
@@ -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":
|
|
@@ -883,12 +883,12 @@ const Zt = { class: "top-bar" }, en = { class: "banner-info" }, tn = { class: "p
|
|
|
883
883
|
I("div", nn, W(t.subTitle), 1)
|
|
884
884
|
]),
|
|
885
885
|
I("div", on, [
|
|
886
|
-
|
|
886
|
+
F(o, { trigger: "click" }, {
|
|
887
887
|
content: v(() => [
|
|
888
888
|
I("div", an, W(t.email), 1)
|
|
889
889
|
]),
|
|
890
890
|
default: v(() => [
|
|
891
|
-
|
|
891
|
+
F(n, {
|
|
892
892
|
size: 48,
|
|
893
893
|
autoFixFontSize: "",
|
|
894
894
|
style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
|
|
@@ -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) => {
|
|
@@ -936,17 +936,17 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
936
936
|
}
|
|
937
937
|
}), i = w([]), b = w({});
|
|
938
938
|
function p(y) {
|
|
939
|
-
return y ? Object.entries(y).map(([m,
|
|
939
|
+
return y ? Object.entries(y).map(([m, C]) => ({
|
|
940
940
|
fieldKey: m,
|
|
941
|
-
...
|
|
941
|
+
...C
|
|
942
942
|
})).filter((m) => m.widget && m.widget.widget !== "Hidden").filter((m) => !X.value.includes(m.fieldKey)) : [];
|
|
943
943
|
}
|
|
944
944
|
function k(y) {
|
|
945
|
-
return y ? Object.entries(y).filter(([m,
|
|
945
|
+
return y ? Object.entries(y).filter(([m, C]) => C.dependent).reduce((m, [C, V]) => (m[C] = V.dependent, m), {}) : [];
|
|
946
946
|
}
|
|
947
|
-
const A = q(() => s.value?.actions ? [...s.value.actions].reverse() : []), _ = Re({}),
|
|
947
|
+
const A = q(() => s.value?.actions ? [...s.value.actions].reverse() : []), _ = Re({}), S = w(!1);
|
|
948
948
|
ce(async () => {
|
|
949
|
-
|
|
949
|
+
S.value = !0, s.value = await he(de.Create, l.className, {
|
|
950
950
|
svrStore: a,
|
|
951
951
|
bpmStore: t
|
|
952
952
|
}), i.value = p(s.value.fields), b.value = k(s.value.fields);
|
|
@@ -957,29 +957,29 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
957
957
|
}
|
|
958
958
|
_[y] = s.value.fields[y].modelValue;
|
|
959
959
|
}
|
|
960
|
-
|
|
960
|
+
S.value = !1;
|
|
961
961
|
});
|
|
962
962
|
function B() {
|
|
963
963
|
return a()?.userInfo?.email_address ?? "";
|
|
964
964
|
}
|
|
965
|
-
async function J(y, D, m,
|
|
965
|
+
async function J(y, D, m, C, V) {
|
|
966
966
|
switch (D) {
|
|
967
967
|
case Y.Submit:
|
|
968
|
-
let
|
|
968
|
+
let L = !0;
|
|
969
969
|
if (c.value?.forEach((Z) => {
|
|
970
|
-
Z?.validate && (Z.validate() || (
|
|
971
|
-
}), !
|
|
970
|
+
Z?.validate && (Z.validate() || (L = !1));
|
|
971
|
+
}), !L) {
|
|
972
972
|
r?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
973
973
|
return;
|
|
974
974
|
}
|
|
975
|
-
|
|
975
|
+
S.value = !0;
|
|
976
976
|
const M = await kt(l.className, { ..._, ...b.value }, m);
|
|
977
|
-
|
|
977
|
+
S.value = !1, c.value?.forEach((Z) => {
|
|
978
978
|
Z?.submit && Z.submit(M.toString());
|
|
979
979
|
}), r?.appContext.config.globalProperties.$notification.success("create success!"), n.push({ name: "Details", params: { workflowId: M.toString() } });
|
|
980
980
|
break;
|
|
981
981
|
case Y.Link:
|
|
982
|
-
|
|
982
|
+
C === "List" && n.push({ name: "List", params: { className: l.className } });
|
|
983
983
|
break;
|
|
984
984
|
default:
|
|
985
985
|
console.warn("Unknown action type:", D);
|
|
@@ -996,39 +996,39 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
996
996
|
function re(y, D) {
|
|
997
997
|
o[y]?.(D, X), s.value && (i.value = p(s.value.fields));
|
|
998
998
|
}
|
|
999
|
-
const ue = q(() =>
|
|
999
|
+
const ue = q(() => ze(i.value));
|
|
1000
1000
|
return (y, D) => {
|
|
1001
|
-
const m = $("a-card"),
|
|
1001
|
+
const m = $("a-card"), C = $("a-spin");
|
|
1002
1002
|
return u(), x("div", rn, [
|
|
1003
|
-
|
|
1003
|
+
F(Ve, {
|
|
1004
1004
|
title: s.value.banner.title,
|
|
1005
1005
|
subTitle: s.value.banner.subTitle,
|
|
1006
1006
|
email: B()
|
|
1007
1007
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1008
1008
|
I("div", ln, [
|
|
1009
|
-
|
|
1010
|
-
loading:
|
|
1009
|
+
F(C, {
|
|
1010
|
+
loading: S.value,
|
|
1011
1011
|
class: "form-container"
|
|
1012
1012
|
}, {
|
|
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,
|
|
1024
|
-
key:
|
|
1023
|
+
(u(!0), x(H, null, z(V.fields, (L) => (u(), U(Be, {
|
|
1024
|
+
key: L.fieldKey,
|
|
1025
1025
|
ref_for: !0,
|
|
1026
1026
|
ref: "dataWidgets",
|
|
1027
|
-
"field-key":
|
|
1028
|
-
config:
|
|
1027
|
+
"field-key": L.fieldKey,
|
|
1028
|
+
config: L,
|
|
1029
1029
|
"class-name": y.className,
|
|
1030
|
-
modelValue: _[
|
|
1031
|
-
"onUpdate:modelValue": (M) => _[
|
|
1030
|
+
modelValue: _[L.fieldKey],
|
|
1031
|
+
"onUpdate:modelValue": (M) => _[L.fieldKey] = M,
|
|
1032
1032
|
class: "form-field",
|
|
1033
1033
|
onChange: re
|
|
1034
1034
|
}, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
@@ -1049,12 +1049,12 @@ 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
|
-
loading:
|
|
1054
|
+
loading: S.value,
|
|
1055
1055
|
config: V,
|
|
1056
1056
|
class: "action-button",
|
|
1057
|
-
onClick: (...
|
|
1057
|
+
onClick: (...L) => J(V, ...L)
|
|
1058
1058
|
}, null, 8, ["loading", "config", "onClick"]))), 128))
|
|
1059
1059
|
])
|
|
1060
1060
|
])
|
|
@@ -1082,17 +1082,17 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
1082
1082
|
}
|
|
1083
1083
|
}), i = w([]), b = w({});
|
|
1084
1084
|
function p(y) {
|
|
1085
|
-
return y ? Object.entries(y).map(([m,
|
|
1085
|
+
return y ? Object.entries(y).map(([m, C]) => ({
|
|
1086
1086
|
fieldKey: m,
|
|
1087
|
-
...
|
|
1087
|
+
...C
|
|
1088
1088
|
})).filter((m) => m.widget && m.widget.widget !== "Hidden").filter((m) => !X.value.includes(m.fieldKey)) : [];
|
|
1089
1089
|
}
|
|
1090
1090
|
function k(y) {
|
|
1091
|
-
return y ? Object.entries(y).filter(([m,
|
|
1091
|
+
return y ? Object.entries(y).filter(([m, C]) => C.dependent).reduce((m, [C, V]) => (m[C] = V.dependent, m), {}) : [];
|
|
1092
1092
|
}
|
|
1093
|
-
const A = q(() => s.value?.actions ? [...s.value.actions].reverse() : []), _ = Re({}),
|
|
1093
|
+
const A = q(() => s.value?.actions ? [...s.value.actions].reverse() : []), _ = Re({}), S = w(!1);
|
|
1094
1094
|
ce(async () => {
|
|
1095
|
-
|
|
1095
|
+
S.value = !0, s.value = await he(de.Update, l.className, {
|
|
1096
1096
|
svrStore: n,
|
|
1097
1097
|
bpmStore: o
|
|
1098
1098
|
}, {
|
|
@@ -1100,37 +1100,37 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
1100
1100
|
});
|
|
1101
1101
|
const y = await Xe(de.Update, l.className, { workflowId: l.workflowId, email: B() }), D = await Qe(l.className, l.workflowId);
|
|
1102
1102
|
s.value.actions = s.value.actions?.filter((m) => {
|
|
1103
|
-
const
|
|
1104
|
-
return
|
|
1103
|
+
const C = y.find((V) => V.button === m.title);
|
|
1104
|
+
return C ? C.isShow : !0;
|
|
1105
1105
|
}), i.value = p(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
|
-
const
|
|
1109
|
-
|
|
1108
|
+
const C = i.value.find((V) => V.fieldKey === m);
|
|
1109
|
+
C && C.widget && (C.widget.files = D[m] ?? [], C.widget.removeFile = (V) => Lt(l.className, V));
|
|
1110
1110
|
}
|
|
1111
1111
|
_[m] = s.value.fields[m].modelValue;
|
|
1112
1112
|
}
|
|
1113
|
-
|
|
1113
|
+
S.value = !1;
|
|
1114
1114
|
});
|
|
1115
1115
|
function B() {
|
|
1116
1116
|
return n()?.userInfo?.email_address ?? "";
|
|
1117
1117
|
}
|
|
1118
|
-
async function J(y, D, m,
|
|
1118
|
+
async function J(y, D, m, C, V) {
|
|
1119
1119
|
switch (D) {
|
|
1120
1120
|
case Y.Submit:
|
|
1121
|
-
let
|
|
1121
|
+
let L = !0;
|
|
1122
1122
|
if (c.value?.forEach((M) => {
|
|
1123
|
-
M?.validate && (M.validate() || (
|
|
1124
|
-
}), !
|
|
1123
|
+
M?.validate && (M.validate() || (L = !1));
|
|
1124
|
+
}), !L) {
|
|
1125
1125
|
r?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
1126
1126
|
return;
|
|
1127
1127
|
}
|
|
1128
|
-
|
|
1128
|
+
S.value = !0, await Ct(l.className, l.workflowId, { ..._, ...b.value }, m), S.value = !1, c.value?.forEach((M) => {
|
|
1129
1129
|
M?.submit && M.submit(l.workflowId);
|
|
1130
1130
|
}), r?.appContext.config.globalProperties.$notification.success("update success!");
|
|
1131
1131
|
break;
|
|
1132
1132
|
case Y.Link:
|
|
1133
|
-
t.push({ name:
|
|
1133
|
+
t.push({ name: C, params: { className: l.className } });
|
|
1134
1134
|
break;
|
|
1135
1135
|
default:
|
|
1136
1136
|
console.warn("Unknown action type:", D);
|
|
@@ -1147,39 +1147,39 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
1147
1147
|
function re(y, D) {
|
|
1148
1148
|
a[y]?.(D, X), s.value && (i.value = p(s.value.fields));
|
|
1149
1149
|
}
|
|
1150
|
-
const ue = q(() =>
|
|
1150
|
+
const ue = q(() => ze(i.value));
|
|
1151
1151
|
return (y, D) => {
|
|
1152
|
-
const m = $("a-card"),
|
|
1152
|
+
const m = $("a-card"), C = $("a-spin");
|
|
1153
1153
|
return u(), x("div", yn, [
|
|
1154
|
-
|
|
1154
|
+
F(Ve, {
|
|
1155
1155
|
title: s.value.banner.title,
|
|
1156
1156
|
subTitle: s.value.banner.subTitle,
|
|
1157
1157
|
email: B()
|
|
1158
1158
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1159
1159
|
I("div", wn, [
|
|
1160
|
-
|
|
1161
|
-
loading:
|
|
1160
|
+
F(C, {
|
|
1161
|
+
loading: S.value,
|
|
1162
1162
|
class: "form-container"
|
|
1163
1163
|
}, {
|
|
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,
|
|
1175
|
-
key:
|
|
1174
|
+
(u(!0), x(H, null, z(V.fields, (L) => (u(), U(Be, {
|
|
1175
|
+
key: L.fieldKey,
|
|
1176
1176
|
ref_for: !0,
|
|
1177
1177
|
ref: "dataWidgets",
|
|
1178
|
-
"field-key":
|
|
1179
|
-
config:
|
|
1178
|
+
"field-key": L.fieldKey,
|
|
1179
|
+
config: L,
|
|
1180
1180
|
"class-name": y.className,
|
|
1181
|
-
modelValue: _[
|
|
1182
|
-
"onUpdate:modelValue": (M) => _[
|
|
1181
|
+
modelValue: _[L.fieldKey],
|
|
1182
|
+
"onUpdate:modelValue": (M) => _[L.fieldKey] = M,
|
|
1183
1183
|
class: "form-field",
|
|
1184
1184
|
onChange: re
|
|
1185
1185
|
}, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
@@ -1200,12 +1200,12 @@ 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
|
-
loading:
|
|
1205
|
+
loading: S.value,
|
|
1206
1206
|
config: V,
|
|
1207
1207
|
class: "action-button",
|
|
1208
|
-
onClick: (...
|
|
1208
|
+
onClick: (...L) => J(V, ...L)
|
|
1209
1209
|
}, null, 8, ["loading", "config", "onClick"]))), 128))
|
|
1210
1210
|
])
|
|
1211
1211
|
])
|
|
@@ -1217,13 +1217,13 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
|
|
|
1217
1217
|
function In() {
|
|
1218
1218
|
return fe(ot, null);
|
|
1219
1219
|
}
|
|
1220
|
-
const Tn = Symbol("ArcoConfigProvider"), Un = "arco", Nn = "$arco",
|
|
1220
|
+
const Tn = Symbol("ArcoConfigProvider"), Un = "arco", Nn = "$arco", Fn = (e) => {
|
|
1221
1221
|
var t, a, n;
|
|
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
|
+
}, Ln = Object.prototype.toString;
|
|
1225
1225
|
function Pn(e) {
|
|
1226
|
-
return
|
|
1226
|
+
return Ln.call(e) === "[object Number]" && e === e;
|
|
1227
1227
|
}
|
|
1228
1228
|
var Dn = (e, t) => {
|
|
1229
1229
|
for (const [a, n] of t)
|
|
@@ -1257,7 +1257,7 @@ const Rn = O({
|
|
|
1257
1257
|
click: (e) => !0
|
|
1258
1258
|
},
|
|
1259
1259
|
setup(e, { emit: t }) {
|
|
1260
|
-
const a =
|
|
1260
|
+
const a = Fn("icon"), n = q(() => [a, `${a}-download`, { [`${a}-spin`]: e.spin }]), o = q(() => {
|
|
1261
1261
|
const r = {};
|
|
1262
1262
|
return e.size && (r.fontSize = Pn(e.size) ? `${e.size}px` : e.size), e.rotate && (r.transform = `rotate(${e.rotate}deg)`), r;
|
|
1263
1263
|
});
|
|
@@ -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
|
|
1290
|
-
const Bn = Object.assign(
|
|
1289
|
+
var Fe = /* @__PURE__ */ Dn(Rn, [["render", Hn]]);
|
|
1290
|
+
const Bn = Object.assign(Fe, {
|
|
1291
1291
|
install: (e, t) => {
|
|
1292
1292
|
var a;
|
|
1293
1293
|
const n = (a = t?.iconPrefix) != null ? a : "";
|
|
1294
|
-
e.component(n +
|
|
1294
|
+
e.component(n + Fe.name, Fe);
|
|
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
|
|
1321
|
+
function b(d) {
|
|
1322
|
+
return d ? Object.entries(d).map(([P, g]) => (typeof g.modelValue == "boolean" ? g.fieldValue = g.modelValue ? "Yes" : "No" : g.fieldValue = g.modelValue, {
|
|
1323
1323
|
fieldKey: P,
|
|
1324
1324
|
...g
|
|
1325
1325
|
})).filter((P) => P.widget && P.widget.widget !== "Hidden") : [];
|
|
1326
1326
|
}
|
|
1327
|
-
const p = q(() =>
|
|
1328
|
-
const P =
|
|
1329
|
-
return
|
|
1327
|
+
const p = q(() => ze(i.value)), k = q(() => s.value?.actions ? [...s.value.actions].reverse() : []), A = w(!0), _ = (d, f) => {
|
|
1328
|
+
const P = d.findIndex((g) => g.isCurrent);
|
|
1329
|
+
return d.map((g, K) => {
|
|
1330
1330
|
const T = {
|
|
1331
1331
|
id: g.id,
|
|
1332
1332
|
title: "",
|
|
@@ -1338,7 +1338,7 @@ const Bn = Object.assign(Le, {
|
|
|
1338
1338
|
};
|
|
1339
1339
|
T.title = g.workflowProcessApprovers[0]?.name;
|
|
1340
1340
|
const se = g.workflowProcessApprovers[g.workflowProcessApprovers.length - 1], ee = g.workflowHistorys[g.workflowHistorys.length - 1], te = ee?.workflowHistoryApprovers[ee?.workflowHistoryApprovers?.length - 1];
|
|
1341
|
-
if (se && te && se?.email?.toLowerCase() !== te?.approverEmail?.toLowerCase() && (T.title = `${te.name}`, T.proxy = `Proxy: ${se.name}`), g.sort > 1 ? T.sub = "Approver Role: " + g.nodeName.replace("Submit", "").replace("Approve", "") : T.sub = "Submit Application", g.isCurrent &&
|
|
1341
|
+
if (se && te && se?.email?.toLowerCase() !== te?.approverEmail?.toLowerCase() && (T.title = `${te.name}`, T.proxy = `Proxy: ${se.name}`), g.sort > 1 ? T.sub = "Approver Role: " + g.nodeName.replace("Submit", "").replace("Approve", "") : T.sub = "Submit Application", g.isCurrent && f !== -1)
|
|
1342
1342
|
T.desc = "In Approval", T.status = 1;
|
|
1343
1343
|
else {
|
|
1344
1344
|
const N = g.workflowHistorys[g.workflowHistorys.length - 1];
|
|
@@ -1358,7 +1358,7 @@ const Bn = Object.assign(Le, {
|
|
|
1358
1358
|
}
|
|
1359
1359
|
return T;
|
|
1360
1360
|
});
|
|
1361
|
-
},
|
|
1361
|
+
}, S = w([]), B = w(!1), J = w(!1), ae = w(!1), X = w(!1);
|
|
1362
1362
|
async function re() {
|
|
1363
1363
|
A.value = !0, s.value = await he(de.Details, l.className, {
|
|
1364
1364
|
svrStore: t,
|
|
@@ -1366,29 +1366,29 @@ const Bn = Object.assign(Le, {
|
|
|
1366
1366
|
}, {
|
|
1367
1367
|
workflowId: l.workflowId
|
|
1368
1368
|
});
|
|
1369
|
-
const
|
|
1370
|
-
|
|
1371
|
-
const K =
|
|
1369
|
+
const d = await Xe(de.Details, l.className, { workflowId: l.workflowId, email: y() }), f = await Qe(l.className, l.workflowId);
|
|
1370
|
+
L.value = await Pt(), C.value = await Ee(l.workflowId), M.value = await Ne(l.workflowId), s.value.actions = s.value.actions?.filter((g) => {
|
|
1371
|
+
const K = d.find((T) => T.button === g.title);
|
|
1372
1372
|
return K ? K.isShow : !0;
|
|
1373
|
-
}), B.value =
|
|
1373
|
+
}), B.value = d.find((g) => g.button === "IsGlobal")?.isShow ?? !1, J.value = d.find((g) => g.button === "AssignButton")?.isShow ?? !1, ae.value = d.find((g) => g.button === "AssignList")?.isShow ?? !1, X.value = d.find((g) => g.button === "AddCommentsButton")?.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
|
-
K && K.widget && (K.widget.files =
|
|
1377
|
+
K && K.widget && (K.widget.files = f[g] ?? []);
|
|
1378
1378
|
}
|
|
1379
1379
|
const P = await Nt(l.className, l.workflowId);
|
|
1380
|
-
|
|
1380
|
+
S.value = _(P, 0), A.value = !1;
|
|
1381
1381
|
}
|
|
1382
1382
|
ce(re);
|
|
1383
|
-
async function ue(
|
|
1384
|
-
return n[
|
|
1383
|
+
async function ue(d, f) {
|
|
1384
|
+
return n[d]?.(f);
|
|
1385
1385
|
}
|
|
1386
1386
|
function y() {
|
|
1387
1387
|
return t()?.userInfo?.email_address ?? "";
|
|
1388
1388
|
}
|
|
1389
|
-
async function D(
|
|
1389
|
+
async function D(d, f, P, g, K) {
|
|
1390
1390
|
try {
|
|
1391
|
-
switch (
|
|
1391
|
+
switch (f) {
|
|
1392
1392
|
case Y.Submit:
|
|
1393
1393
|
const { reason: T, ifGlobal: se } = await ue(K, { isGlobal: B.value });
|
|
1394
1394
|
A.value = !0;
|
|
@@ -1401,25 +1401,30 @@ const Bn = Object.assign(Le, {
|
|
|
1401
1401
|
g === "List" && o.push({ name: "List", params: { className: l.className } });
|
|
1402
1402
|
break;
|
|
1403
1403
|
default:
|
|
1404
|
-
console.warn("Unknown action type:",
|
|
1404
|
+
console.warn("Unknown action type:", f);
|
|
1405
1405
|
}
|
|
1406
1406
|
} catch {
|
|
1407
1407
|
}
|
|
1408
1408
|
}
|
|
1409
|
-
const m = w(""),
|
|
1409
|
+
const m = w(""), C = w([]), V = w(""), L = w([]), M = w([]);
|
|
1410
1410
|
async function Z() {
|
|
1411
1411
|
if (!V.value) {
|
|
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?")
|
|
1415
|
+
await we("Confirm Assign Approver", "Do you want to assign the selected approver?");
|
|
1416
|
+
try {
|
|
1417
|
+
await Dt(l.workflowId, V.value), M.value = await Ne(l.workflowId), r?.appContext.config.globalProperties.$notification.success("Assign Approver clicked!");
|
|
1418
|
+
} catch {
|
|
1419
|
+
r?.appContext.config.globalProperties.$notification.error("Failed to assign approver");
|
|
1420
|
+
}
|
|
1416
1421
|
}
|
|
1417
|
-
async function we(
|
|
1422
|
+
async function we(d, f) {
|
|
1418
1423
|
const { Modal: P } = await import("@arco-design/web-vue");
|
|
1419
1424
|
return new Promise((g, K) => {
|
|
1420
1425
|
P.confirm({
|
|
1421
|
-
title:
|
|
1422
|
-
content:
|
|
1426
|
+
title: d,
|
|
1427
|
+
content: f,
|
|
1423
1428
|
okText: "OK",
|
|
1424
1429
|
cancelText: "Cancel",
|
|
1425
1430
|
onOk: () => g(!0),
|
|
@@ -1427,14 +1432,14 @@ const Bn = Object.assign(Le, {
|
|
|
1427
1432
|
});
|
|
1428
1433
|
});
|
|
1429
1434
|
}
|
|
1430
|
-
async function xe(
|
|
1435
|
+
async function xe(d) {
|
|
1431
1436
|
try {
|
|
1432
1437
|
await we("Confirm Delete Associator", "Do you want to delete this associator?");
|
|
1433
1438
|
} catch {
|
|
1434
1439
|
return;
|
|
1435
1440
|
}
|
|
1436
1441
|
try {
|
|
1437
|
-
await Mt(String(
|
|
1442
|
+
await Mt(String(d)), M.value = await Ne(l.workflowId), r?.appContext.config.globalProperties.$notification.success("Associator deleted successfully!");
|
|
1438
1443
|
} catch {
|
|
1439
1444
|
r?.appContext.config.globalProperties.$notification.error("Failed to delete associator");
|
|
1440
1445
|
}
|
|
@@ -1444,51 +1449,51 @@ const Bn = Object.assign(Le, {
|
|
|
1444
1449
|
r?.appContext.config.globalProperties.$message.error("Comment cannot be empty");
|
|
1445
1450
|
return;
|
|
1446
1451
|
}
|
|
1447
|
-
await Rt(l.workflowId, y(), m.value), m.value = "",
|
|
1452
|
+
await Rt(l.workflowId, y(), m.value), m.value = "", C.value = await Ee(l.workflowId), r?.appContext.config.globalProperties.$notification.success("Add Comment clicked!");
|
|
1448
1453
|
}
|
|
1449
|
-
return (
|
|
1454
|
+
return (d, f) => {
|
|
1450
1455
|
const P = $("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
1456
|
return u(), x("div", Kn, [
|
|
1452
|
-
|
|
1457
|
+
F(Ve, {
|
|
1453
1458
|
title: s.value.banner.title,
|
|
1454
1459
|
subTitle: s.value.banner.subTitle,
|
|
1455
1460
|
email: y()
|
|
1456
1461
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1457
|
-
I("div",
|
|
1458
|
-
|
|
1462
|
+
I("div", zn, [
|
|
1463
|
+
F($e, {
|
|
1459
1464
|
loading: A.value,
|
|
1460
1465
|
class: "detail-container"
|
|
1461
1466
|
}, {
|
|
1462
1467
|
default: v(() => [
|
|
1463
|
-
I("div",
|
|
1464
|
-
(u(), U(De(Ie(c).Steps), { steps:
|
|
1468
|
+
I("div", jn, [
|
|
1469
|
+
(u(), U(De(Ie(c).Steps), { steps: S.value }, null, 8, ["steps"])),
|
|
1465
1470
|
I("div", En, [
|
|
1466
|
-
(u(!0), x(H, null,
|
|
1471
|
+
(u(!0), x(H, null, z(p.value, (R) => (u(), U(K, {
|
|
1467
1472
|
key: R.name,
|
|
1468
1473
|
title: R.name,
|
|
1469
1474
|
style: { "margin-bottom": "24px" }
|
|
1470
1475
|
}, {
|
|
1471
1476
|
default: v(() => [
|
|
1472
1477
|
I("div", On, [
|
|
1473
|
-
(u(!0), x(H, null,
|
|
1478
|
+
(u(!0), x(H, null, z(R.fields, (ie) => (u(), x("div", {
|
|
1474
1479
|
key: ie.fieldKey,
|
|
1475
1480
|
class: "detail-field-wrapper"
|
|
1476
1481
|
}, [
|
|
1477
1482
|
I("div", Gn, [
|
|
1478
1483
|
I("div", Wn, W(ie.widget?.title), 1),
|
|
1479
|
-
ie.widget?.widget === "File" ? (u(!0), x(H, { key: 0 },
|
|
1484
|
+
ie.widget?.widget === "File" ? (u(!0), x(H, { key: 0 }, z(ie.widget.files, (Ae) => (u(), x("div", {
|
|
1480
1485
|
class: "field-value",
|
|
1481
1486
|
key: Ae.id
|
|
1482
1487
|
}, [
|
|
1483
|
-
|
|
1488
|
+
F(g, null, {
|
|
1484
1489
|
default: v(() => [
|
|
1485
1490
|
G(W(Ae.name) + " ", 1),
|
|
1486
|
-
|
|
1491
|
+
F(P, {
|
|
1487
1492
|
href: Ae.url,
|
|
1488
1493
|
target: "_blank"
|
|
1489
1494
|
}, {
|
|
1490
1495
|
default: v(() => [
|
|
1491
|
-
|
|
1496
|
+
F(Ie(Bn), { style: { color: "#7A00E6" } })
|
|
1492
1497
|
]),
|
|
1493
1498
|
_: 2
|
|
1494
1499
|
}, 1032, ["href"])
|
|
@@ -1504,12 +1509,12 @@ const Bn = Object.assign(Le, {
|
|
|
1504
1509
|
}, 1032, ["title"]))), 128)),
|
|
1505
1510
|
J.value ? (u(), U(g, { key: 0 }, {
|
|
1506
1511
|
default: v(() => [
|
|
1507
|
-
|
|
1512
|
+
F(se, {
|
|
1508
1513
|
modelValue: V.value,
|
|
1509
|
-
"onUpdate:modelValue":
|
|
1514
|
+
"onUpdate:modelValue": f[0] || (f[0] = (R) => V.value = R)
|
|
1510
1515
|
}, {
|
|
1511
1516
|
default: v(() => [
|
|
1512
|
-
(u(!0), x(H, null,
|
|
1517
|
+
(u(!0), x(H, null, z(L.value, (R) => (u(), U(T, {
|
|
1513
1518
|
key: R.value,
|
|
1514
1519
|
value: R.value
|
|
1515
1520
|
}, {
|
|
@@ -1521,11 +1526,11 @@ const Bn = Object.assign(Le, {
|
|
|
1521
1526
|
]),
|
|
1522
1527
|
_: 1
|
|
1523
1528
|
}, 8, ["modelValue"]),
|
|
1524
|
-
|
|
1529
|
+
F(ee, {
|
|
1525
1530
|
type: "primary",
|
|
1526
1531
|
onClick: Z
|
|
1527
1532
|
}, {
|
|
1528
|
-
default: v(() =>
|
|
1533
|
+
default: v(() => f[2] || (f[2] = [
|
|
1529
1534
|
G("Assign for comment", -1)
|
|
1530
1535
|
])),
|
|
1531
1536
|
_: 1,
|
|
@@ -1535,20 +1540,20 @@ const Bn = Object.assign(Le, {
|
|
|
1535
1540
|
_: 1
|
|
1536
1541
|
})) : Q("", !0),
|
|
1537
1542
|
ae.value ? (u(), U(N, { key: 1 }, {
|
|
1538
|
-
header: v(() =>
|
|
1543
|
+
header: v(() => f[3] || (f[3] = [
|
|
1539
1544
|
G(" Associators ", -1)
|
|
1540
1545
|
])),
|
|
1541
1546
|
default: v(() => [
|
|
1542
|
-
(u(!0), x(H, null,
|
|
1547
|
+
(u(!0), x(H, null, z(M.value, (R) => (u(), U(te, {
|
|
1543
1548
|
key: R.id
|
|
1544
1549
|
}, {
|
|
1545
1550
|
actions: v(() => [
|
|
1546
|
-
|
|
1551
|
+
F(ee, {
|
|
1547
1552
|
type: "text",
|
|
1548
1553
|
status: "danger",
|
|
1549
1554
|
onClick: (ie) => xe(R.id)
|
|
1550
1555
|
}, {
|
|
1551
|
-
default: v(() =>
|
|
1556
|
+
default: v(() => f[4] || (f[4] = [
|
|
1552
1557
|
G(" Delete ", -1)
|
|
1553
1558
|
])),
|
|
1554
1559
|
_: 2,
|
|
@@ -1565,16 +1570,16 @@ const Bn = Object.assign(Le, {
|
|
|
1565
1570
|
})) : Q("", !0),
|
|
1566
1571
|
X.value ? (u(), x("div", Yn, [
|
|
1567
1572
|
I("div", Jn, [
|
|
1568
|
-
|
|
1569
|
-
|
|
1573
|
+
f[6] || (f[6] = I("div", { class: "field-label" }, "Comment", -1)),
|
|
1574
|
+
F(ne, {
|
|
1570
1575
|
modelValue: m.value,
|
|
1571
|
-
"onUpdate:modelValue":
|
|
1576
|
+
"onUpdate:modelValue": f[1] || (f[1] = (R) => m.value = R)
|
|
1572
1577
|
}, null, 8, ["modelValue"]),
|
|
1573
|
-
|
|
1578
|
+
F(ee, {
|
|
1574
1579
|
type: "primary",
|
|
1575
1580
|
onClick: h
|
|
1576
1581
|
}, {
|
|
1577
|
-
default: v(() =>
|
|
1582
|
+
default: v(() => f[5] || (f[5] = [
|
|
1578
1583
|
G("Add Comment", -1)
|
|
1579
1584
|
])),
|
|
1580
1585
|
_: 1,
|
|
@@ -1582,12 +1587,12 @@ const Bn = Object.assign(Le, {
|
|
|
1582
1587
|
})
|
|
1583
1588
|
])
|
|
1584
1589
|
])) : Q("", !0),
|
|
1585
|
-
|
|
1586
|
-
header: v(() =>
|
|
1590
|
+
C.value.length ? (u(), U(N, { key: 3 }, {
|
|
1591
|
+
header: v(() => f[7] || (f[7] = [
|
|
1587
1592
|
G(" Comments History ", -1)
|
|
1588
1593
|
])),
|
|
1589
1594
|
default: v(() => [
|
|
1590
|
-
(u(!0), x(H, null,
|
|
1595
|
+
(u(!0), x(H, null, z(C.value, (R) => (u(), U(te, {
|
|
1591
1596
|
key: R.associator
|
|
1592
1597
|
}, {
|
|
1593
1598
|
default: v(() => [
|
|
@@ -1599,8 +1604,8 @@ const Bn = Object.assign(Le, {
|
|
|
1599
1604
|
_: 1
|
|
1600
1605
|
})) : Q("", !0)
|
|
1601
1606
|
]),
|
|
1602
|
-
|
|
1603
|
-
le(
|
|
1607
|
+
d.$slots.content ? (u(), x("div", Xn, [
|
|
1608
|
+
le(d.$slots, "content", {}, void 0, !0)
|
|
1604
1609
|
])) : Q("", !0)
|
|
1605
1610
|
])
|
|
1606
1611
|
]),
|
|
@@ -1609,9 +1614,9 @@ const Bn = Object.assign(Le, {
|
|
|
1609
1614
|
]),
|
|
1610
1615
|
I("div", Qn, [
|
|
1611
1616
|
I("div", Zn, [
|
|
1612
|
-
le(
|
|
1617
|
+
le(d.$slots, "action", {}, void 0, !0),
|
|
1613
1618
|
I("div", eo, [
|
|
1614
|
-
(u(!0), x(H, null,
|
|
1619
|
+
(u(!0), x(H, null, z(k.value, (R) => (u(), U(ve, {
|
|
1615
1620
|
key: R.Title,
|
|
1616
1621
|
loading: A.value,
|
|
1617
1622
|
config: R,
|
|
@@ -1624,7 +1629,7 @@ const Bn = Object.assign(Le, {
|
|
|
1624
1629
|
]);
|
|
1625
1630
|
};
|
|
1626
1631
|
}
|
|
1627
|
-
}), no = /* @__PURE__ */ me(to, [["__scopeId", "data-v-
|
|
1632
|
+
}), no = /* @__PURE__ */ me(to, [["__scopeId", "data-v-b2fd6902"]]), oo = { class: "list-container" }, ao = { class: "query-title" }, so = /* @__PURE__ */ O({
|
|
1628
1633
|
name: "ListView",
|
|
1629
1634
|
__name: "ListView",
|
|
1630
1635
|
props: {
|
|
@@ -1641,9 +1646,9 @@ const Bn = Object.assign(Le, {
|
|
|
1641
1646
|
filters: []
|
|
1642
1647
|
});
|
|
1643
1648
|
function s() {
|
|
1644
|
-
const h = Object.entries(
|
|
1645
|
-
key:
|
|
1646
|
-
value:
|
|
1649
|
+
const h = Object.entries(C.value).filter(([, { value: d }]) => d && d !== "").map(([d, { value: f, operator: P }]) => ({
|
|
1650
|
+
key: d,
|
|
1651
|
+
value: f,
|
|
1647
1652
|
operator: P
|
|
1648
1653
|
// 根据实际需要调整操作符
|
|
1649
1654
|
}));
|
|
@@ -1662,9 +1667,9 @@ const Bn = Object.assign(Le, {
|
|
|
1662
1667
|
// 只设置横向滚动
|
|
1663
1668
|
// 移除 y 属性,让表格高度自适应
|
|
1664
1669
|
})), b = (h) => {
|
|
1665
|
-
const
|
|
1670
|
+
const d = Object.entries(h).filter(([, f]) => f.widget?.column).map(([f, P], g) => ({
|
|
1666
1671
|
title: P.widget.title,
|
|
1667
|
-
dataIndex:
|
|
1672
|
+
dataIndex: f.charAt(0).toLowerCase() + f.slice(1),
|
|
1668
1673
|
order: P.order,
|
|
1669
1674
|
ellipsis: !0,
|
|
1670
1675
|
tooltip: !0,
|
|
@@ -1673,8 +1678,8 @@ const Bn = Object.assign(Le, {
|
|
|
1673
1678
|
// 启用最小宽度
|
|
1674
1679
|
resizable: !0
|
|
1675
1680
|
// 启用列宽调整
|
|
1676
|
-
})).sort((
|
|
1677
|
-
|
|
1681
|
+
})).sort((f, P) => f.order - P.order);
|
|
1682
|
+
d.push({
|
|
1678
1683
|
title: "Actions",
|
|
1679
1684
|
slotName: "optional",
|
|
1680
1685
|
align: "center",
|
|
@@ -1682,17 +1687,17 @@ const Bn = Object.assign(Le, {
|
|
|
1682
1687
|
minWidth: 200,
|
|
1683
1688
|
fixed: "right",
|
|
1684
1689
|
resizable: !1
|
|
1685
|
-
}), k.value =
|
|
1686
|
-
}, p = w([]), k = w([]), A = w(!0), _ = w(!0),
|
|
1690
|
+
}), k.value = d, console.log("🚀 ~ mapColumns ~ _columns.value:", k.value);
|
|
1691
|
+
}, p = w([]), k = w([]), A = w(!0), _ = w(!0), S = w(), B = async () => {
|
|
1687
1692
|
_.value = !0;
|
|
1688
1693
|
const h = await ht(c.className, s());
|
|
1689
|
-
p.value = h.data, l.total = h.totalCount, _.value = !1;
|
|
1694
|
+
p.value = h.data, console.log("🚀 ~ loadData ~ _data.value:", p.value), l.total = h.totalCount, _.value = !1;
|
|
1690
1695
|
}, J = w(!1);
|
|
1691
1696
|
ce(async () => {
|
|
1692
1697
|
A.value = !0, r.value = await he(3, c.className, {
|
|
1693
1698
|
svrStore: t,
|
|
1694
1699
|
bpmStore: a
|
|
1695
|
-
}), b(r.value.fields),
|
|
1700
|
+
}), b(r.value.fields), L(r.value.fields), M(), m(r.value?.tabs?.[0]?.key || ""), S.value = r.value.actions, A.value = !1, J.value = !0;
|
|
1696
1701
|
}), it(() => {
|
|
1697
1702
|
J.value && B();
|
|
1698
1703
|
});
|
|
@@ -1701,22 +1706,22 @@ const Bn = Object.assign(Le, {
|
|
|
1701
1706
|
}, X = (h) => {
|
|
1702
1707
|
l.pageSize = h, B();
|
|
1703
1708
|
};
|
|
1704
|
-
function re(h,
|
|
1709
|
+
function re(h, d, f, P, g) {
|
|
1705
1710
|
switch (h) {
|
|
1706
1711
|
case Y.Link:
|
|
1707
|
-
n.push({ name:
|
|
1712
|
+
n.push({ name: f, params: { workflowId: g } });
|
|
1708
1713
|
break;
|
|
1709
1714
|
default:
|
|
1710
1715
|
console.warn("Unknown action type:", h);
|
|
1711
1716
|
}
|
|
1712
1717
|
}
|
|
1713
|
-
function ue(h,
|
|
1718
|
+
function ue(h, d, f) {
|
|
1714
1719
|
switch (h) {
|
|
1715
1720
|
case Y.Submit:
|
|
1716
|
-
Ut(
|
|
1721
|
+
Ut(d), o?.appContext.config.globalProperties.$notification.success("submit success!");
|
|
1717
1722
|
break;
|
|
1718
1723
|
case Y.Link:
|
|
1719
|
-
n.push({ name:
|
|
1724
|
+
n.push({ name: f });
|
|
1720
1725
|
break;
|
|
1721
1726
|
default:
|
|
1722
1727
|
console.warn("Unknown action type:", h);
|
|
@@ -1725,49 +1730,49 @@ const Bn = Object.assign(Le, {
|
|
|
1725
1730
|
function y() {
|
|
1726
1731
|
return t()?.userInfo?.email_address ?? "";
|
|
1727
1732
|
}
|
|
1728
|
-
function D(h,
|
|
1729
|
-
return typeof h != "string" || h.indexOf("{currentUserEmail}") === -1 ? h : h.replace(/{currentUserEmail}/g,
|
|
1733
|
+
function D(h, d) {
|
|
1734
|
+
return typeof h != "string" || h.indexOf("{currentUserEmail}") === -1 ? h : h.replace(/{currentUserEmail}/g, d);
|
|
1730
1735
|
}
|
|
1731
1736
|
function m(h) {
|
|
1732
|
-
const
|
|
1733
|
-
l.filters =
|
|
1734
|
-
...
|
|
1735
|
-
value: D(
|
|
1737
|
+
const d = r.value?.tabs?.find((f) => f.key === h)?.filters;
|
|
1738
|
+
l.filters = d?.map((f) => ({
|
|
1739
|
+
...f,
|
|
1740
|
+
value: D(f.value, y())
|
|
1736
1741
|
})) || [], B();
|
|
1737
1742
|
}
|
|
1738
|
-
const
|
|
1739
|
-
function
|
|
1743
|
+
const C = w({}), V = w([]);
|
|
1744
|
+
function L(h) {
|
|
1740
1745
|
if (!h) return [];
|
|
1741
|
-
V.value = Object.entries(h).filter(([,
|
|
1746
|
+
V.value = Object.entries(h).filter(([, d]) => d.isFiltered).map(([d, f]) => ({ fieldKey: d, fieldConfig: f }));
|
|
1742
1747
|
}
|
|
1743
1748
|
const M = () => {
|
|
1744
1749
|
const h = {};
|
|
1745
|
-
V.value.forEach(({ fieldKey:
|
|
1746
|
-
h[
|
|
1747
|
-
}),
|
|
1750
|
+
V.value.forEach(({ fieldKey: d, fieldConfig: f }) => {
|
|
1751
|
+
h[d] = {}, h[d].value = f.modelValue, h[d].operator = f.operator;
|
|
1752
|
+
}), C.value = h;
|
|
1748
1753
|
}, Z = () => {
|
|
1749
1754
|
l.current = 1, B();
|
|
1750
1755
|
}, we = () => {
|
|
1751
1756
|
r.value && M(), Z();
|
|
1752
1757
|
};
|
|
1753
|
-
function xe(h,
|
|
1754
|
-
return !(h.location !== "InTable" || h.title === "Update" && (
|
|
1758
|
+
function xe(h, d) {
|
|
1759
|
+
return !(h.location !== "InTable" || h.title === "Update" && (d.status === 100 || d.status === -1));
|
|
1755
1760
|
}
|
|
1756
|
-
return (h,
|
|
1757
|
-
const
|
|
1761
|
+
return (h, d) => {
|
|
1762
|
+
const f = $("a-space"), P = $("a-col"), g = $("a-button"), K = $("a-row"), T = $("a-card"), se = $("a-tab-pane"), ee = $("a-tabs"), te = $("a-table");
|
|
1758
1763
|
return u(), x("div", oo, [
|
|
1759
|
-
|
|
1764
|
+
F(Ve, {
|
|
1760
1765
|
title: r.value?.banner.title ?? "",
|
|
1761
1766
|
subTitle: r.value?.banner.subTitle ?? "",
|
|
1762
1767
|
email: y()
|
|
1763
1768
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1764
|
-
|
|
1769
|
+
F(T, null, {
|
|
1765
1770
|
default: v(() => [
|
|
1766
1771
|
I("div", ao, [
|
|
1767
|
-
|
|
1768
|
-
|
|
1772
|
+
d[0] || (d[0] = I("h3", null, "Search Conditions", -1)),
|
|
1773
|
+
F(f, { size: "medium" }, {
|
|
1769
1774
|
default: v(() => [
|
|
1770
|
-
(u(!0), x(H, null,
|
|
1775
|
+
(u(!0), x(H, null, z(S.value, (N) => (u(), x(H, {
|
|
1771
1776
|
key: N.title
|
|
1772
1777
|
}, [
|
|
1773
1778
|
N.location === "InOperation" ? (u(), U(ve, {
|
|
@@ -1780,50 +1785,47 @@ const Bn = Object.assign(Le, {
|
|
|
1780
1785
|
_: 1
|
|
1781
1786
|
})
|
|
1782
1787
|
]),
|
|
1783
|
-
|
|
1784
|
-
gutter: [24, 20],
|
|
1785
|
-
class: "search-row"
|
|
1786
|
-
}, {
|
|
1788
|
+
F(K, { gutter: [24, 20] }, {
|
|
1787
1789
|
default: v(() => [
|
|
1788
|
-
(u(!0), x(H, null,
|
|
1790
|
+
(u(!0), x(H, null, z(V.value, (N) => (u(), U(P, {
|
|
1789
1791
|
key: N.fieldKey,
|
|
1790
1792
|
span: 6,
|
|
1791
1793
|
class: "search-col"
|
|
1792
1794
|
}, {
|
|
1793
1795
|
default: v(() => [
|
|
1794
|
-
|
|
1796
|
+
F(Be, {
|
|
1795
1797
|
name: N.fieldKey,
|
|
1796
1798
|
config: N.fieldConfig,
|
|
1797
|
-
modelValue:
|
|
1798
|
-
"onUpdate:modelValue": (ne) =>
|
|
1799
|
+
modelValue: C.value[N.fieldKey].value,
|
|
1800
|
+
"onUpdate:modelValue": (ne) => C.value[N.fieldKey].value = ne,
|
|
1799
1801
|
class: "form-field"
|
|
1800
1802
|
}, null, 8, ["name", "config", "modelValue", "onUpdate:modelValue"])
|
|
1801
1803
|
]),
|
|
1802
1804
|
_: 2
|
|
1803
1805
|
}, 1024))), 128)),
|
|
1804
|
-
|
|
1806
|
+
F(P, {
|
|
1805
1807
|
span: 6,
|
|
1806
1808
|
class: "search-col form-buttons"
|
|
1807
1809
|
}, {
|
|
1808
1810
|
default: v(() => [
|
|
1809
|
-
|
|
1811
|
+
F(f, { size: "medium" }, {
|
|
1810
1812
|
default: v(() => [
|
|
1811
|
-
|
|
1813
|
+
F(g, {
|
|
1812
1814
|
type: "primary",
|
|
1813
1815
|
size: "medium",
|
|
1814
1816
|
onClick: Z
|
|
1815
1817
|
}, {
|
|
1816
|
-
default: v(() =>
|
|
1818
|
+
default: v(() => d[1] || (d[1] = [
|
|
1817
1819
|
G(" Search ", -1)
|
|
1818
1820
|
])),
|
|
1819
1821
|
_: 1,
|
|
1820
1822
|
__: [1]
|
|
1821
1823
|
}),
|
|
1822
|
-
|
|
1824
|
+
F(g, {
|
|
1823
1825
|
size: "medium",
|
|
1824
1826
|
onClick: we
|
|
1825
1827
|
}, {
|
|
1826
|
-
default: v(() =>
|
|
1828
|
+
default: v(() => d[2] || (d[2] = [
|
|
1827
1829
|
G(" Reset ", -1)
|
|
1828
1830
|
])),
|
|
1829
1831
|
_: 1,
|
|
@@ -1841,19 +1843,19 @@ const Bn = Object.assign(Le, {
|
|
|
1841
1843
|
]),
|
|
1842
1844
|
_: 1
|
|
1843
1845
|
}),
|
|
1844
|
-
|
|
1846
|
+
F(ee, {
|
|
1845
1847
|
size: "large",
|
|
1846
1848
|
onTabClick: m
|
|
1847
1849
|
}, {
|
|
1848
1850
|
default: v(() => [
|
|
1849
|
-
(u(!0), x(H, null,
|
|
1851
|
+
(u(!0), x(H, null, z(r.value?.tabs, (N) => (u(), U(se, {
|
|
1850
1852
|
key: N.key,
|
|
1851
1853
|
title: N.title
|
|
1852
1854
|
}, null, 8, ["title"]))), 128))
|
|
1853
1855
|
]),
|
|
1854
1856
|
_: 1
|
|
1855
1857
|
}),
|
|
1856
|
-
|
|
1858
|
+
F(te, {
|
|
1857
1859
|
columns: k.value,
|
|
1858
1860
|
data: p.value,
|
|
1859
1861
|
stripe: "",
|
|
@@ -1874,9 +1876,9 @@ const Bn = Object.assign(Le, {
|
|
|
1874
1876
|
onPageSizeChange: X
|
|
1875
1877
|
}, {
|
|
1876
1878
|
optional: v(({ record: N }) => [
|
|
1877
|
-
|
|
1879
|
+
F(f, { size: "small" }, {
|
|
1878
1880
|
default: v(() => [
|
|
1879
|
-
(u(!0), x(H, null,
|
|
1881
|
+
(u(!0), x(H, null, z(S.value, (ne) => (u(), x(H, {
|
|
1880
1882
|
key: ne.title
|
|
1881
1883
|
}, [
|
|
1882
1884
|
xe(ne, N) ? (u(), U(ve, {
|
|
@@ -1895,7 +1897,7 @@ const Bn = Object.assign(Le, {
|
|
|
1895
1897
|
]);
|
|
1896
1898
|
};
|
|
1897
1899
|
}
|
|
1898
|
-
}), ro = /* @__PURE__ */ me(so, [["__scopeId", "data-v-
|
|
1900
|
+
}), ro = /* @__PURE__ */ me(so, [["__scopeId", "data-v-c844a18d"]]), po = {
|
|
1899
1901
|
install(e, t = {}) {
|
|
1900
1902
|
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
1903
|
}
|