@chase-shao/vue-component-lib 1.2.60 → 1.2.62

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.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 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";
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 Fe = {};
46
+ let Le = {};
47
47
  function gt(e) {
48
- Fe = { ...Fe, ...e };
48
+ Le = { ...Le, ...e };
49
49
  }
50
50
  function Me() {
51
- return Fe;
51
+ return Le;
52
52
  }
53
53
  function We() {
54
54
  const e = Me();
@@ -266,7 +266,7 @@ async function Ut(e, t = null) {
266
266
  async function Nt(e, t) {
267
267
  return (await (await j()).get(`/General/${e}/${t}/process`))?.data;
268
268
  }
269
- function Lt(e) {
269
+ function Ft(e) {
270
270
  return {
271
271
  uid: e.id ?? Je(),
272
272
  name: e.attachmentName ?? "unknown",
@@ -276,20 +276,20 @@ function Lt(e) {
276
276
  async function Qe(e, t) {
277
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(Lt(r)), c;
279
+ return c[l] || (c[l] = []), c[l].push(Ft(r)), c;
280
280
  }, {});
281
281
  }
282
- async function Ft(e, t) {
282
+ async function Lt(e, t) {
283
283
  return (await j()).post(`/General/${e}/${t}/delete/attachment`);
284
284
  }
285
- async function Dt() {
285
+ async function Pt() {
286
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 Pt(e, t) {
292
+ async function Dt(e, t) {
293
293
  return await (await j()).post(`Grading/AssignComments/${e}/${encodeURIComponent(t)}`);
294
294
  }
295
295
  async function Rt(e, t, 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((f) => {
341
- f.event === "change" && o(f.event, f.handlerName, i);
340
+ o("error", b.res ? "" : b.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((p) => {
341
+ p.event === "change" && o(p.event, p.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 f = $("AInput");
351
- return u(), U(f, {
350
+ const p = $("AInput");
351
+ return u(), U(p, {
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((f) => {
379
- f.ruleName === "Max" && (r.value = f.ruleParameter), f.ruleName === "Min" && (l.value = f.ruleParameter);
378
+ n.validations && n.validations.forEach((p) => {
379
+ p.ruleName === "Max" && (r.value = p.ruleParameter), p.ruleName === "Min" && (l.value = p.ruleParameter);
380
380
  });
381
381
  });
382
- const s = (f) => pe(n.validations, f), i = (f) => {
383
- o("input", f);
384
- }, b = (f) => {
385
- const k = s(f);
382
+ const s = (p) => pe(n.validations, p), i = (p) => {
383
+ o("input", p);
384
+ }, b = (p) => {
385
+ const k = s(p);
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, f);
387
+ A.event === "change" && o(A.event, A.handlerName, p);
388
388
  });
389
389
  };
390
390
  return t({
391
391
  validate() {
392
- const f = s(n.modelValue);
393
- return o("error", f.res ? "" : f.errorMessages), f.res;
392
+ const p = s(n.modelValue);
393
+ return o("error", p.res ? "" : p.errorMessages), p.res;
394
394
  }
395
- }), (f, k) => {
395
+ }), (p, k) => {
396
396
  const A = $("AInputNumber");
397
397
  return u(), U(A, {
398
398
  modelValue: c.value,
@@ -419,47 +419,47 @@ 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 = (f) => pe(n.validations, f);
422
+ const n = e, o = a, c = w(!1), r = w(n.config.options ?? []), l = _e(e, "modelValue"), s = (p) => pe(n.validations, p);
423
423
  q(() => {
424
- const f = {};
424
+ const p = {};
425
425
  return n.triggers && n.triggers.length > 0 && n.triggers.forEach((k) => {
426
- f[k.event] = (A) => {
426
+ p[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
- }), f;
431
+ }), p;
432
432
  }), ce(async () => {
433
433
  n.config.dataSourceProvider && (r.value = await Tt(n.config.dataSourceProvider));
434
434
  });
435
- const b = (f) => {
436
- o("update:modelValue", f);
437
- const k = s(f);
435
+ const b = (p) => {
436
+ o("update:modelValue", p);
437
+ const k = s(p);
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, f);
439
+ A.event === "change" && o(A.event, A.handlerName, p);
440
440
  });
441
441
  };
442
442
  return t({
443
443
  validate() {
444
- const f = s(n.modelValue);
445
- return o("error", f.res ? "" : f.errorMessages), f.res;
444
+ const p = s(n.modelValue);
445
+ return o("error", p.res ? "" : p.errorMessages), p.res;
446
446
  }
447
- }), (f, k) => {
447
+ }), (p, k) => {
448
448
  const A = $("AOption"), _ = $("ASelect");
449
449
  return u(), U(_, {
450
450
  "allow-clear": "",
451
451
  modelValue: l.value,
452
- "onUpdate:modelValue": k[0] || (k[0] = (C) => l.value = C),
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, z(r.value, (C) => (u(), U(A, {
460
- key: C.value,
461
- value: C.value,
462
- label: C.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
@@ -492,13 +492,13 @@ const pe = (e, t) => {
492
492
  return !0;
493
493
  }
494
494
  }), (s, i) => {
495
- const b = $("ACascader"), f = $("ASpace");
496
- return u(), U(f, {
495
+ const b = $("ACascader"), p = $("ASpace");
496
+ return u(), U(p, {
497
497
  direction: "vertical",
498
498
  size: "large"
499
499
  }, {
500
500
  default: v(() => [
501
- L(b, {
501
+ F(b, {
502
502
  "field-names": l,
503
503
  "model-value": s.modelValue,
504
504
  options: c.value,
@@ -532,18 +532,18 @@ 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 f(_, C, B) {
536
- return _.replace(/{WorkflowId}/g, C).replace(/{ClassName}/g, B);
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) {
540
540
  const _ = s + n.config.uploadURL;
541
- return f(_, b.value, n.className);
541
+ return p(_, b.value, n.className);
542
542
  }
543
543
  return "";
544
544
  });
545
545
  function A(_) {
546
- const { file: C, name: B } = _, J = B ?? C.name;
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
- }), (_, C) => {
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(() => C[0] || (C[0] = [])),
583
+ "start-icon": v(() => S[0] || (S[0] = [])),
584
584
  "upload-button": v(() => [
585
- L(B, { type: "primary" }, {
586
- default: v(() => C[1] || (C[1] = [
585
+ F(B, { type: "primary" }, {
586
+ default: v(() => S[1] || (S[1] = [
587
587
  G("Select File", -1)
588
588
  ])),
589
589
  _: 1,
@@ -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] = (f) => c.value = f),
665
+ "onUpdate:modelValue": i[0] || (i[0] = (p) => c.value = p),
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 = De("widgetRef"), l = q(() => {
700
+ const n = e, o = a, c = _e(e, "modelValue"), r = Pe("widgetRef"), l = q(() => {
701
701
  switch (n.config?.widget?.widget) {
702
702
  case "TextBox":
703
703
  return Oe;
@@ -723,7 +723,7 @@ const pe = (e, t) => {
723
723
  }, b = (k, A) => {
724
724
  o("change", k, A);
725
725
  };
726
- function f() {
726
+ function p() {
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
- f() && r.value.submit(k);
734
+ p() && 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(Pe(l.value), {
748
+ (u(), U(De(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(Pe(c.value), {
841
+ return (s, i) => (u(), U(De(c.value), {
842
842
  url: r.value,
843
843
  "redirect-type": l.value,
844
844
  loading: s.loading,
@@ -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
- L(o, { trigger: "click" }, {
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
- L(n, {
891
+ F(n, {
892
892
  size: 48,
893
893
  autoFixFontSize: "",
894
894
  style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
@@ -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 = De("dataWidgets"), r = ye(), l = e, s = w({
929
+ const t = Ce(), a = Se(), n = ke(), o = Ke(), c = Pe("dataWidgets"), r = ye(), l = e, s = w({
930
930
  pageType: "",
931
931
  fields: {},
932
932
  globalValidations: [],
@@ -935,54 +935,54 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
935
935
  subTitle: ""
936
936
  }
937
937
  }), i = w([]), b = w({});
938
- function f(y) {
939
- return y ? Object.entries(y).map(([m, S]) => ({
938
+ function p(y) {
939
+ return y ? Object.entries(y).map(([m, C]) => ({
940
940
  fieldKey: m,
941
- ...S
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, S]) => S.dependent).reduce((m, [S, V]) => (m[S] = V.dependent, 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({}), C = w(!1);
947
+ const A = q(() => s.value?.actions ? [...s.value.actions].reverse() : []), _ = Re({}), S = w(!1);
948
948
  ce(async () => {
949
- C.value = !0, s.value = await he(de.Create, l.className, {
949
+ S.value = !0, s.value = await he(de.Create, l.className, {
950
950
  svrStore: a,
951
951
  bpmStore: t
952
- }), i.value = f(s.value.fields), b.value = k(s.value.fields);
952
+ }), i.value = p(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 P = i.value.find((m) => m.fieldKey === y);
956
- P && P.widget && (P.widget.files = []);
955
+ const D = i.value.find((m) => m.fieldKey === y);
956
+ D && D.widget && (D.widget.files = []);
957
957
  }
958
958
  _[y] = s.value.fields[y].modelValue;
959
959
  }
960
- C.value = !1;
960
+ S.value = !1;
961
961
  });
962
962
  function B() {
963
963
  return a()?.userInfo?.email_address ?? "";
964
964
  }
965
- async function J(y, P, m, S, V) {
966
- switch (P) {
965
+ async function J(y, D, m, C, V) {
966
+ switch (D) {
967
967
  case Y.Submit:
968
- let F = !0;
968
+ let L = !0;
969
969
  if (c.value?.forEach((Z) => {
970
- Z?.validate && (Z.validate() || (F = !1));
971
- }), !F) {
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
- C.value = !0;
975
+ S.value = !0;
976
976
  const M = await kt(l.className, { ..._, ...b.value }, m);
977
- C.value = !1, c.value?.forEach((Z) => {
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
- S === "List" && n.push({ name: "List", params: { className: l.className } });
982
+ C === "List" && n.push({ name: "List", params: { className: l.className } });
983
983
  break;
984
984
  default:
985
- console.warn("Unknown action type:", P);
985
+ console.warn("Unknown action type:", D);
986
986
  }
987
987
  }
988
988
  const X = w([
@@ -993,21 +993,21 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
993
993
  "jobAttachmentPrevious",
994
994
  "positionId"
995
995
  ]);
996
- function re(y, P) {
997
- o[y]?.(P, X), s.value && (i.value = f(s.value.fields));
996
+ function re(y, D) {
997
+ o[y]?.(D, X), s.value && (i.value = p(s.value.fields));
998
998
  }
999
999
  const ue = q(() => ze(i.value));
1000
- return (y, P) => {
1001
- const m = $("a-card"), S = $("a-spin");
1000
+ return (y, D) => {
1001
+ const m = $("a-card"), C = $("a-spin");
1002
1002
  return u(), x("div", rn, [
1003
- L(Ve, {
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
- L(S, {
1010
- loading: C.value,
1009
+ F(C, {
1010
+ loading: S.value,
1011
1011
  class: "form-container"
1012
1012
  }, {
1013
1013
  default: v(() => [
@@ -1020,15 +1020,15 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
1020
1020
  }, {
1021
1021
  default: v(() => [
1022
1022
  I("div", dn, [
1023
- (u(!0), x(H, null, z(V.fields, (F) => (u(), U(Be, {
1024
- key: F.fieldKey,
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": F.fieldKey,
1028
- config: F,
1027
+ "field-key": L.fieldKey,
1028
+ config: L,
1029
1029
  "class-name": y.className,
1030
- modelValue: _[F.fieldKey],
1031
- "onUpdate:modelValue": (M) => _[F.fieldKey] = 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))
@@ -1051,10 +1051,10 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
1051
1051
  I("div", gn, [
1052
1052
  (u(!0), x(H, null, z(A.value, (V) => (u(), U(ve, {
1053
1053
  key: V.Title,
1054
- loading: C.value,
1054
+ loading: S.value,
1055
1055
  config: V,
1056
1056
  class: "action-button",
1057
- onClick: (...F) => J(V, ...F)
1057
+ onClick: (...L) => J(V, ...L)
1058
1058
  }, null, 8, ["loading", "config", "onClick"]))), 128))
1059
1059
  ])
1060
1060
  ])
@@ -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 = De("dataWidgets"), r = ye(), l = e, s = w({
1075
+ const t = ke(), a = Ke(), n = Se(), o = Ce(), c = Pe("dataWidgets"), r = ye(), l = e, s = w({
1076
1076
  pageType: "",
1077
1077
  fields: {},
1078
1078
  globalValidations: [],
@@ -1081,59 +1081,59 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
1081
1081
  subTitle: ""
1082
1082
  }
1083
1083
  }), i = w([]), b = w({});
1084
- function f(y) {
1085
- return y ? Object.entries(y).map(([m, S]) => ({
1084
+ function p(y) {
1085
+ return y ? Object.entries(y).map(([m, C]) => ({
1086
1086
  fieldKey: m,
1087
- ...S
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, S]) => S.dependent).reduce((m, [S, V]) => (m[S] = V.dependent, 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({}), C = w(!1);
1093
+ const A = q(() => s.value?.actions ? [...s.value.actions].reverse() : []), _ = Re({}), S = w(!1);
1094
1094
  ce(async () => {
1095
- C.value = !0, s.value = await he(de.Update, l.className, {
1095
+ S.value = !0, s.value = await he(de.Update, l.className, {
1096
1096
  svrStore: n,
1097
1097
  bpmStore: o
1098
1098
  }, {
1099
1099
  workflowId: l.workflowId
1100
1100
  });
1101
- const y = await Xe(de.Update, l.className, { workflowId: l.workflowId, email: B() }), P = await Qe(l.className, l.workflowId);
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 S = y.find((V) => V.button === m.title);
1104
- return S ? S.isShow : !0;
1105
- }), i.value = f(s.value.fields), b.value = k(s.value.fields);
1103
+ const C = y.find((V) => V.button === m.title);
1104
+ return C ? C.isShow : !0;
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 S = i.value.find((V) => V.fieldKey === m);
1109
- S && S.widget && (S.widget.files = P[m] ?? [], S.widget.removeFile = (V) => Ft(l.className, V));
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
- C.value = !1;
1113
+ S.value = !1;
1114
1114
  });
1115
1115
  function B() {
1116
1116
  return n()?.userInfo?.email_address ?? "";
1117
1117
  }
1118
- async function J(y, P, m, S, V) {
1119
- switch (P) {
1118
+ async function J(y, D, m, C, V) {
1119
+ switch (D) {
1120
1120
  case Y.Submit:
1121
- let F = !0;
1121
+ let L = !0;
1122
1122
  if (c.value?.forEach((M) => {
1123
- M?.validate && (M.validate() || (F = !1));
1124
- }), !F) {
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
- C.value = !0, await Ct(l.className, l.workflowId, { ..._, ...b.value }, m), C.value = !1, c.value?.forEach((M) => {
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: S, params: { className: l.className } });
1133
+ t.push({ name: C, params: { className: l.className } });
1134
1134
  break;
1135
1135
  default:
1136
- console.warn("Unknown action type:", P);
1136
+ console.warn("Unknown action type:", D);
1137
1137
  }
1138
1138
  }
1139
1139
  const X = w([
@@ -1144,21 +1144,21 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
1144
1144
  "jobAttachmentPrevious",
1145
1145
  "positionId"
1146
1146
  ]);
1147
- function re(y, P) {
1148
- a[y]?.(P, X), s.value && (i.value = f(s.value.fields));
1147
+ function re(y, D) {
1148
+ a[y]?.(D, X), s.value && (i.value = p(s.value.fields));
1149
1149
  }
1150
1150
  const ue = q(() => ze(i.value));
1151
- return (y, P) => {
1152
- const m = $("a-card"), S = $("a-spin");
1151
+ return (y, D) => {
1152
+ const m = $("a-card"), C = $("a-spin");
1153
1153
  return u(), x("div", yn, [
1154
- L(Ve, {
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
- L(S, {
1161
- loading: C.value,
1160
+ F(C, {
1161
+ loading: S.value,
1162
1162
  class: "form-container"
1163
1163
  }, {
1164
1164
  default: v(() => [
@@ -1171,15 +1171,15 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
1171
1171
  }, {
1172
1172
  default: v(() => [
1173
1173
  I("div", kn, [
1174
- (u(!0), x(H, null, z(V.fields, (F) => (u(), U(Be, {
1175
- key: F.fieldKey,
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": F.fieldKey,
1179
- config: F,
1178
+ "field-key": L.fieldKey,
1179
+ config: L,
1180
1180
  "class-name": y.className,
1181
- modelValue: _[F.fieldKey],
1182
- "onUpdate:modelValue": (M) => _[F.fieldKey] = 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))
@@ -1202,10 +1202,10 @@ const rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { clas
1202
1202
  I("div", xn, [
1203
1203
  (u(!0), x(H, null, z(A.value, (V) => (u(), U(ve, {
1204
1204
  key: V.Title,
1205
- loading: C.value,
1205
+ loading: S.value,
1206
1206
  config: V,
1207
1207
  class: "action-button",
1208
- onClick: (...F) => J(V, ...F)
1208
+ onClick: (...L) => J(V, ...L)
1209
1209
  }, null, 8, ["loading", "config", "onClick"]))), 128))
1210
1210
  ])
1211
1211
  ])
@@ -1217,15 +1217,15 @@ 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", Ln = (e) => {
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
- }, Fn = Object.prototype.toString;
1225
- function Dn(e) {
1226
- return Fn.call(e) === "[object Number]" && e === e;
1224
+ }, Ln = Object.prototype.toString;
1225
+ function Pn(e) {
1226
+ return Ln.call(e) === "[object Number]" && e === e;
1227
1227
  }
1228
- var Pn = (e, t) => {
1228
+ var Dn = (e, t) => {
1229
1229
  for (const [a, n] of t)
1230
1230
  e[a] = n;
1231
1231
  return e;
@@ -1257,9 +1257,9 @@ const Rn = O({
1257
1257
  click: (e) => !0
1258
1258
  },
1259
1259
  setup(e, { emit: t }) {
1260
- const a = Ln("icon"), n = q(() => [a, `${a}-download`, { [`${a}-spin`]: e.spin }]), o = q(() => {
1260
+ const a = Fn("icon"), n = q(() => [a, `${a}-download`, { [`${a}-spin`]: e.spin }]), o = q(() => {
1261
1261
  const r = {};
1262
- return e.size && (r.fontSize = Dn(e.size) ? `${e.size}px` : e.size), e.rotate && (r.transform = `rotate(${e.rotate}deg)`), r;
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
  });
1264
1264
  return {
1265
1265
  cls: n,
@@ -1286,12 +1286,12 @@ 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__ */ Pn(Rn, [["render", Hn]]);
1290
- const Bn = Object.assign(Le, {
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 + Le.name, Le);
1294
+ e.component(n + Fe.name, Fe);
1295
1295
  }
1296
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,
@@ -1318,15 +1318,15 @@ const Bn = Object.assign(Le, {
1318
1318
  subTitle: ""
1319
1319
  }
1320
1320
  }), i = w([]);
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,
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
+ fieldKey: P,
1324
1324
  ...g
1325
- })).filter((D) => D.widget && D.widget.widget !== "Hidden") : [];
1325
+ })).filter((P) => P.widget && P.widget.widget !== "Hidden") : [];
1326
1326
  }
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) => {
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 && d !== -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 && f !== -1)
1342
1342
  T.desc = "In Approval", T.status = 1;
1343
1343
  else {
1344
1344
  const N = g.workflowHistorys[g.workflowHistorys.length - 1];
@@ -1353,12 +1353,12 @@ 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 < D || D === -1 ? (T.status = 0, T.desc = "Skipped") : (T.status = 0, T.desc = "Pending Approval");
1356
+ else K < P || P === -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;
1360
1360
  });
1361
- }, C = w([]), B = w(!1), J = w(!1), ae = w(!1), X = w(!1);
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,34 +1366,34 @@ const Bn = Object.assign(Le, {
1366
1366
  }, {
1367
1367
  workflowId: l.workflowId
1368
1368
  });
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);
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 = 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);
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 = d[g] ?? []);
1377
+ K && K.widget && (K.widget.files = f[g] ?? []);
1378
1378
  }
1379
- const D = await Nt(l.className, l.workflowId);
1380
- C.value = _(D, 0), A.value = !1;
1379
+ const P = await Nt(l.className, l.workflowId);
1380
+ S.value = _(P, 0), A.value = !1;
1381
1381
  }
1382
1382
  ce(re);
1383
- async function ue(p, d) {
1384
- return n[p]?.(d);
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 P(p, d, D, g, K) {
1389
+ async function D(d, f, P, g, K) {
1390
1390
  try {
1391
- switch (d) {
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;
1395
1395
  const ee = K === "Approve" ? "100" : "-1";
1396
- await It(l.className, l.workflowId, y(), T, [Number(l.workflowId)], D, ee, se), A.value = !1;
1396
+ await It(l.className, l.workflowId, y(), T, [Number(l.workflowId)], P, 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;
@@ -1401,25 +1401,34 @@ 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:", d);
1404
+ console.warn("Unknown action type:", f);
1405
1405
  }
1406
1406
  } catch {
1407
1407
  }
1408
1408
  }
1409
- const m = w(""), S = w([]), V = w(""), F = w([]), 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?"), await Pt(l.workflowId, V.value), M.value = await Ne(l.workflowId), r?.appContext.config.globalProperties.$notification.success("Assign Approver clicked!");
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 (d) {
1419
+ if (d.status === 409) {
1420
+ r?.appContext.config.globalProperties.$notification.error("This user is already an associator");
1421
+ return;
1422
+ }
1423
+ r?.appContext.config.globalProperties.$notification.error("Failed to assign approver");
1424
+ }
1416
1425
  }
1417
- async function we(p, d) {
1418
- const { Modal: D } = await import("@arco-design/web-vue");
1426
+ async function we(d, f) {
1427
+ const { Modal: P } = await import("@arco-design/web-vue");
1419
1428
  return new Promise((g, K) => {
1420
- D.confirm({
1421
- title: p,
1422
- content: d,
1429
+ P.confirm({
1430
+ title: d,
1431
+ content: f,
1423
1432
  okText: "OK",
1424
1433
  cancelText: "Cancel",
1425
1434
  onOk: () => g(!0),
@@ -1427,14 +1436,14 @@ const Bn = Object.assign(Le, {
1427
1436
  });
1428
1437
  });
1429
1438
  }
1430
- async function xe(p) {
1439
+ async function xe(d) {
1431
1440
  try {
1432
1441
  await we("Confirm Delete Associator", "Do you want to delete this associator?");
1433
1442
  } catch {
1434
1443
  return;
1435
1444
  }
1436
1445
  try {
1437
- await Mt(String(p)), M.value = await Ne(l.workflowId), r?.appContext.config.globalProperties.$notification.success("Associator deleted successfully!");
1446
+ await Mt(String(d)), M.value = await Ne(l.workflowId), r?.appContext.config.globalProperties.$notification.success("Associator deleted successfully!");
1438
1447
  } catch {
1439
1448
  r?.appContext.config.globalProperties.$notification.error("Failed to delete associator");
1440
1449
  }
@@ -1444,26 +1453,26 @@ const Bn = Object.assign(Le, {
1444
1453
  r?.appContext.config.globalProperties.$message.error("Comment cannot be empty");
1445
1454
  return;
1446
1455
  }
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!");
1456
+ 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
1457
  }
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");
1458
+ return (d, f) => {
1459
+ 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
1460
  return u(), x("div", Kn, [
1452
- L(Ve, {
1461
+ F(Ve, {
1453
1462
  title: s.value.banner.title,
1454
1463
  subTitle: s.value.banner.subTitle,
1455
1464
  email: y()
1456
1465
  }, null, 8, ["title", "subTitle", "email"]),
1457
1466
  I("div", zn, [
1458
- L($e, {
1467
+ F($e, {
1459
1468
  loading: A.value,
1460
1469
  class: "detail-container"
1461
1470
  }, {
1462
1471
  default: v(() => [
1463
1472
  I("div", jn, [
1464
- (u(), U(Pe(Ie(c).Steps), { steps: C.value }, null, 8, ["steps"])),
1473
+ (u(), U(De(Ie(c).Steps), { steps: S.value }, null, 8, ["steps"])),
1465
1474
  I("div", En, [
1466
- (u(!0), x(H, null, z(f.value, (R) => (u(), U(K, {
1475
+ (u(!0), x(H, null, z(p.value, (R) => (u(), U(K, {
1467
1476
  key: R.name,
1468
1477
  title: R.name,
1469
1478
  style: { "margin-bottom": "24px" }
@@ -1480,15 +1489,15 @@ const Bn = Object.assign(Le, {
1480
1489
  class: "field-value",
1481
1490
  key: Ae.id
1482
1491
  }, [
1483
- L(g, null, {
1492
+ F(g, null, {
1484
1493
  default: v(() => [
1485
1494
  G(W(Ae.name) + " ", 1),
1486
- L(D, {
1495
+ F(P, {
1487
1496
  href: Ae.url,
1488
1497
  target: "_blank"
1489
1498
  }, {
1490
1499
  default: v(() => [
1491
- L(Ie(Bn), { style: { color: "#7A00E6" } })
1500
+ F(Ie(Bn), { style: { color: "#7A00E6" } })
1492
1501
  ]),
1493
1502
  _: 2
1494
1503
  }, 1032, ["href"])
@@ -1504,12 +1513,12 @@ const Bn = Object.assign(Le, {
1504
1513
  }, 1032, ["title"]))), 128)),
1505
1514
  J.value ? (u(), U(g, { key: 0 }, {
1506
1515
  default: v(() => [
1507
- L(se, {
1516
+ F(se, {
1508
1517
  modelValue: V.value,
1509
- "onUpdate:modelValue": d[0] || (d[0] = (R) => V.value = R)
1518
+ "onUpdate:modelValue": f[0] || (f[0] = (R) => V.value = R)
1510
1519
  }, {
1511
1520
  default: v(() => [
1512
- (u(!0), x(H, null, z(F.value, (R) => (u(), U(T, {
1521
+ (u(!0), x(H, null, z(L.value, (R) => (u(), U(T, {
1513
1522
  key: R.value,
1514
1523
  value: R.value
1515
1524
  }, {
@@ -1521,11 +1530,11 @@ const Bn = Object.assign(Le, {
1521
1530
  ]),
1522
1531
  _: 1
1523
1532
  }, 8, ["modelValue"]),
1524
- L(ee, {
1533
+ F(ee, {
1525
1534
  type: "primary",
1526
1535
  onClick: Z
1527
1536
  }, {
1528
- default: v(() => d[2] || (d[2] = [
1537
+ default: v(() => f[2] || (f[2] = [
1529
1538
  G("Assign for comment", -1)
1530
1539
  ])),
1531
1540
  _: 1,
@@ -1535,7 +1544,7 @@ const Bn = Object.assign(Le, {
1535
1544
  _: 1
1536
1545
  })) : Q("", !0),
1537
1546
  ae.value ? (u(), U(N, { key: 1 }, {
1538
- header: v(() => d[3] || (d[3] = [
1547
+ header: v(() => f[3] || (f[3] = [
1539
1548
  G(" Associators ", -1)
1540
1549
  ])),
1541
1550
  default: v(() => [
@@ -1543,12 +1552,12 @@ const Bn = Object.assign(Le, {
1543
1552
  key: R.id
1544
1553
  }, {
1545
1554
  actions: v(() => [
1546
- L(ee, {
1555
+ F(ee, {
1547
1556
  type: "text",
1548
1557
  status: "danger",
1549
1558
  onClick: (ie) => xe(R.id)
1550
1559
  }, {
1551
- default: v(() => d[4] || (d[4] = [
1560
+ default: v(() => f[4] || (f[4] = [
1552
1561
  G(" Delete ", -1)
1553
1562
  ])),
1554
1563
  _: 2,
@@ -1565,16 +1574,16 @@ const Bn = Object.assign(Le, {
1565
1574
  })) : Q("", !0),
1566
1575
  X.value ? (u(), x("div", Yn, [
1567
1576
  I("div", Jn, [
1568
- d[6] || (d[6] = I("div", { class: "field-label" }, "Comment", -1)),
1569
- L(ne, {
1577
+ f[6] || (f[6] = I("div", { class: "field-label" }, "Comment", -1)),
1578
+ F(ne, {
1570
1579
  modelValue: m.value,
1571
- "onUpdate:modelValue": d[1] || (d[1] = (R) => m.value = R)
1580
+ "onUpdate:modelValue": f[1] || (f[1] = (R) => m.value = R)
1572
1581
  }, null, 8, ["modelValue"]),
1573
- L(ee, {
1582
+ F(ee, {
1574
1583
  type: "primary",
1575
1584
  onClick: h
1576
1585
  }, {
1577
- default: v(() => d[5] || (d[5] = [
1586
+ default: v(() => f[5] || (f[5] = [
1578
1587
  G("Add Comment", -1)
1579
1588
  ])),
1580
1589
  _: 1,
@@ -1582,12 +1591,12 @@ const Bn = Object.assign(Le, {
1582
1591
  })
1583
1592
  ])
1584
1593
  ])) : Q("", !0),
1585
- X.value ? (u(), U(N, { key: 3 }, {
1586
- header: v(() => d[7] || (d[7] = [
1594
+ C.value.length ? (u(), U(N, { key: 3 }, {
1595
+ header: v(() => f[7] || (f[7] = [
1587
1596
  G(" Comments History ", -1)
1588
1597
  ])),
1589
1598
  default: v(() => [
1590
- (u(!0), x(H, null, z(S.value, (R) => (u(), U(te, {
1599
+ (u(!0), x(H, null, z(C.value, (R) => (u(), U(te, {
1591
1600
  key: R.associator
1592
1601
  }, {
1593
1602
  default: v(() => [
@@ -1599,8 +1608,8 @@ const Bn = Object.assign(Le, {
1599
1608
  _: 1
1600
1609
  })) : Q("", !0)
1601
1610
  ]),
1602
- p.$slots.content ? (u(), x("div", Xn, [
1603
- le(p.$slots, "content", {}, void 0, !0)
1611
+ d.$slots.content ? (u(), x("div", Xn, [
1612
+ le(d.$slots, "content", {}, void 0, !0)
1604
1613
  ])) : Q("", !0)
1605
1614
  ])
1606
1615
  ]),
@@ -1609,14 +1618,14 @@ const Bn = Object.assign(Le, {
1609
1618
  ]),
1610
1619
  I("div", Qn, [
1611
1620
  I("div", Zn, [
1612
- le(p.$slots, "action", {}, void 0, !0),
1621
+ le(d.$slots, "action", {}, void 0, !0),
1613
1622
  I("div", eo, [
1614
1623
  (u(!0), x(H, null, z(k.value, (R) => (u(), U(ve, {
1615
1624
  key: R.Title,
1616
1625
  loading: A.value,
1617
1626
  config: R,
1618
1627
  class: "action-button",
1619
- onClick: (...ie) => P(R, ...ie)
1628
+ onClick: (...ie) => D(R, ...ie)
1620
1629
  }, null, 8, ["loading", "config", "onClick"]))), 128))
1621
1630
  ])
1622
1631
  ])
@@ -1624,7 +1633,7 @@ const Bn = Object.assign(Le, {
1624
1633
  ]);
1625
1634
  };
1626
1635
  }
1627
- }), no = /* @__PURE__ */ me(to, [["__scopeId", "data-v-97235efc"]]), oo = { class: "list-container" }, ao = { class: "query-title" }, so = /* @__PURE__ */ O({
1636
+ }), no = /* @__PURE__ */ me(to, [["__scopeId", "data-v-567e4ebf"]]), oo = { class: "list-container" }, ao = { class: "query-title" }, so = /* @__PURE__ */ O({
1628
1637
  name: "ListView",
1629
1638
  __name: "ListView",
1630
1639
  props: {
@@ -1641,10 +1650,10 @@ const Bn = Object.assign(Le, {
1641
1650
  filters: []
1642
1651
  });
1643
1652
  function s() {
1644
- const h = Object.entries(S.value).filter(([, { value: p }]) => p && p !== "").map(([p, { value: d, operator: D }]) => ({
1645
- key: p,
1646
- value: d,
1647
- operator: D
1653
+ const h = Object.entries(C.value).filter(([, { value: d }]) => d && d !== "").map(([d, { value: f, operator: P }]) => ({
1654
+ key: d,
1655
+ value: f,
1656
+ operator: P
1648
1657
  // 根据实际需要调整操作符
1649
1658
  }));
1650
1659
  return {
@@ -1662,10 +1671,10 @@ const Bn = Object.assign(Le, {
1662
1671
  // 只设置横向滚动
1663
1672
  // 移除 y 属性,让表格高度自适应
1664
1673
  })), b = (h) => {
1665
- const p = Object.entries(h).filter(([, d]) => d.widget?.column).map(([d, D], g) => ({
1666
- title: D.widget.title,
1667
- dataIndex: d.charAt(0).toLowerCase() + d.slice(1),
1668
- order: D.order,
1674
+ const d = Object.entries(h).filter(([, f]) => f.widget?.column).map(([f, P], g) => ({
1675
+ title: P.widget.title,
1676
+ dataIndex: f.charAt(0).toLowerCase() + f.slice(1),
1677
+ order: P.order,
1669
1678
  ellipsis: !0,
1670
1679
  tooltip: !0,
1671
1680
  width: 150,
@@ -1673,8 +1682,8 @@ const Bn = Object.assign(Le, {
1673
1682
  // 启用最小宽度
1674
1683
  resizable: !0
1675
1684
  // 启用列宽调整
1676
- })).sort((d, D) => d.order - D.order);
1677
- p.push({
1685
+ })).sort((f, P) => f.order - P.order);
1686
+ d.push({
1678
1687
  title: "Actions",
1679
1688
  slotName: "optional",
1680
1689
  align: "center",
@@ -1682,17 +1691,17 @@ const Bn = Object.assign(Le, {
1682
1691
  minWidth: 200,
1683
1692
  fixed: "right",
1684
1693
  resizable: !1
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 () => {
1694
+ }), k.value = d, console.log("🚀 ~ mapColumns ~ _columns.value:", k.value);
1695
+ }, p = w([]), k = w([]), A = w(!0), _ = w(!0), S = w(), B = async () => {
1687
1696
  _.value = !0;
1688
1697
  const h = await ht(c.className, s());
1689
- f.value = h.data, console.log("🚀 ~ loadData ~ _data.value:", f.value), l.total = h.totalCount, _.value = !1;
1698
+ p.value = h.data, console.log("🚀 ~ loadData ~ _data.value:", p.value), l.total = h.totalCount, _.value = !1;
1690
1699
  }, J = w(!1);
1691
1700
  ce(async () => {
1692
1701
  A.value = !0, r.value = await he(3, c.className, {
1693
1702
  svrStore: t,
1694
1703
  bpmStore: a
1695
- }), b(r.value.fields), F(r.value.fields), M(), m(r.value?.tabs?.[0]?.key || ""), C.value = r.value.actions, A.value = !1, J.value = !0;
1704
+ }), 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
1705
  }), it(() => {
1697
1706
  J.value && B();
1698
1707
  });
@@ -1701,22 +1710,22 @@ const Bn = Object.assign(Le, {
1701
1710
  }, X = (h) => {
1702
1711
  l.pageSize = h, B();
1703
1712
  };
1704
- function re(h, p, d, D, g) {
1713
+ function re(h, d, f, P, g) {
1705
1714
  switch (h) {
1706
1715
  case Y.Link:
1707
- n.push({ name: d, params: { workflowId: g } });
1716
+ n.push({ name: f, params: { workflowId: g } });
1708
1717
  break;
1709
1718
  default:
1710
1719
  console.warn("Unknown action type:", h);
1711
1720
  }
1712
1721
  }
1713
- function ue(h, p, d) {
1722
+ function ue(h, d, f) {
1714
1723
  switch (h) {
1715
1724
  case Y.Submit:
1716
- Ut(p), o?.appContext.config.globalProperties.$notification.success("submit success!");
1725
+ Ut(d), o?.appContext.config.globalProperties.$notification.success("submit success!");
1717
1726
  break;
1718
1727
  case Y.Link:
1719
- n.push({ name: d });
1728
+ n.push({ name: f });
1720
1729
  break;
1721
1730
  default:
1722
1731
  console.warn("Unknown action type:", h);
@@ -1725,49 +1734,49 @@ const Bn = Object.assign(Le, {
1725
1734
  function y() {
1726
1735
  return t()?.userInfo?.email_address ?? "";
1727
1736
  }
1728
- function P(h, p) {
1729
- return typeof h != "string" || h.indexOf("{currentUserEmail}") === -1 ? h : h.replace(/{currentUserEmail}/g, p);
1737
+ function D(h, d) {
1738
+ return typeof h != "string" || h.indexOf("{currentUserEmail}") === -1 ? h : h.replace(/{currentUserEmail}/g, d);
1730
1739
  }
1731
1740
  function m(h) {
1732
- const p = r.value?.tabs?.find((d) => d.key === h)?.filters;
1733
- l.filters = p?.map((d) => ({
1734
- ...d,
1735
- value: P(d.value, y())
1741
+ const d = r.value?.tabs?.find((f) => f.key === h)?.filters;
1742
+ l.filters = d?.map((f) => ({
1743
+ ...f,
1744
+ value: D(f.value, y())
1736
1745
  })) || [], B();
1737
1746
  }
1738
- const S = w({}), V = w([]);
1739
- function F(h) {
1747
+ const C = w({}), V = w([]);
1748
+ function L(h) {
1740
1749
  if (!h) return [];
1741
- V.value = Object.entries(h).filter(([, p]) => p.isFiltered).map(([p, d]) => ({ fieldKey: p, fieldConfig: d }));
1750
+ V.value = Object.entries(h).filter(([, d]) => d.isFiltered).map(([d, f]) => ({ fieldKey: d, fieldConfig: f }));
1742
1751
  }
1743
1752
  const M = () => {
1744
1753
  const h = {};
1745
- V.value.forEach(({ fieldKey: p, fieldConfig: d }) => {
1746
- h[p] = {}, h[p].value = d.modelValue, h[p].operator = d.operator;
1747
- }), S.value = h;
1754
+ V.value.forEach(({ fieldKey: d, fieldConfig: f }) => {
1755
+ h[d] = {}, h[d].value = f.modelValue, h[d].operator = f.operator;
1756
+ }), C.value = h;
1748
1757
  }, Z = () => {
1749
1758
  l.current = 1, B();
1750
1759
  }, we = () => {
1751
1760
  r.value && M(), Z();
1752
1761
  };
1753
- function xe(h, p) {
1754
- return !(h.location !== "InTable" || h.title === "Update" && (p.status === 100 || p.status === -1));
1762
+ function xe(h, d) {
1763
+ return !(h.location !== "InTable" || h.title === "Update" && (d.status === 100 || d.status === -1));
1755
1764
  }
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");
1765
+ return (h, d) => {
1766
+ 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
1767
  return u(), x("div", oo, [
1759
- L(Ve, {
1768
+ F(Ve, {
1760
1769
  title: r.value?.banner.title ?? "",
1761
1770
  subTitle: r.value?.banner.subTitle ?? "",
1762
1771
  email: y()
1763
1772
  }, null, 8, ["title", "subTitle", "email"]),
1764
- L(T, null, {
1773
+ F(T, null, {
1765
1774
  default: v(() => [
1766
1775
  I("div", ao, [
1767
- p[0] || (p[0] = I("h3", null, "Search Conditions", -1)),
1768
- L(d, { size: "medium" }, {
1776
+ d[0] || (d[0] = I("h3", null, "Search Conditions", -1)),
1777
+ F(f, { size: "medium" }, {
1769
1778
  default: v(() => [
1770
- (u(!0), x(H, null, z(C.value, (N) => (u(), x(H, {
1779
+ (u(!0), x(H, null, z(S.value, (N) => (u(), x(H, {
1771
1780
  key: N.title
1772
1781
  }, [
1773
1782
  N.location === "InOperation" ? (u(), U(ve, {
@@ -1780,47 +1789,47 @@ const Bn = Object.assign(Le, {
1780
1789
  _: 1
1781
1790
  })
1782
1791
  ]),
1783
- L(K, { gutter: [24, 20] }, {
1792
+ F(K, { gutter: [24, 20] }, {
1784
1793
  default: v(() => [
1785
- (u(!0), x(H, null, z(V.value, (N) => (u(), U(D, {
1794
+ (u(!0), x(H, null, z(V.value, (N) => (u(), U(P, {
1786
1795
  key: N.fieldKey,
1787
1796
  span: 6,
1788
1797
  class: "search-col"
1789
1798
  }, {
1790
1799
  default: v(() => [
1791
- L(Be, {
1800
+ F(Be, {
1792
1801
  name: N.fieldKey,
1793
1802
  config: N.fieldConfig,
1794
- modelValue: S.value[N.fieldKey].value,
1795
- "onUpdate:modelValue": (ne) => S.value[N.fieldKey].value = ne,
1803
+ modelValue: C.value[N.fieldKey].value,
1804
+ "onUpdate:modelValue": (ne) => C.value[N.fieldKey].value = ne,
1796
1805
  class: "form-field"
1797
1806
  }, null, 8, ["name", "config", "modelValue", "onUpdate:modelValue"])
1798
1807
  ]),
1799
1808
  _: 2
1800
1809
  }, 1024))), 128)),
1801
- L(D, {
1810
+ F(P, {
1802
1811
  span: 6,
1803
1812
  class: "search-col form-buttons"
1804
1813
  }, {
1805
1814
  default: v(() => [
1806
- L(d, { size: "medium" }, {
1815
+ F(f, { size: "medium" }, {
1807
1816
  default: v(() => [
1808
- L(g, {
1817
+ F(g, {
1809
1818
  type: "primary",
1810
1819
  size: "medium",
1811
1820
  onClick: Z
1812
1821
  }, {
1813
- default: v(() => p[1] || (p[1] = [
1822
+ default: v(() => d[1] || (d[1] = [
1814
1823
  G(" Search ", -1)
1815
1824
  ])),
1816
1825
  _: 1,
1817
1826
  __: [1]
1818
1827
  }),
1819
- L(g, {
1828
+ F(g, {
1820
1829
  size: "medium",
1821
1830
  onClick: we
1822
1831
  }, {
1823
- default: v(() => p[2] || (p[2] = [
1832
+ default: v(() => d[2] || (d[2] = [
1824
1833
  G(" Reset ", -1)
1825
1834
  ])),
1826
1835
  _: 1,
@@ -1838,7 +1847,7 @@ const Bn = Object.assign(Le, {
1838
1847
  ]),
1839
1848
  _: 1
1840
1849
  }),
1841
- L(ee, {
1850
+ F(ee, {
1842
1851
  size: "large",
1843
1852
  onTabClick: m
1844
1853
  }, {
@@ -1850,9 +1859,9 @@ const Bn = Object.assign(Le, {
1850
1859
  ]),
1851
1860
  _: 1
1852
1861
  }),
1853
- L(te, {
1862
+ F(te, {
1854
1863
  columns: k.value,
1855
- data: f.value,
1864
+ data: p.value,
1856
1865
  stripe: "",
1857
1866
  border: "",
1858
1867
  pagination: {
@@ -1871,9 +1880,9 @@ const Bn = Object.assign(Le, {
1871
1880
  onPageSizeChange: X
1872
1881
  }, {
1873
1882
  optional: v(({ record: N }) => [
1874
- L(d, { size: "small" }, {
1883
+ F(f, { size: "small" }, {
1875
1884
  default: v(() => [
1876
- (u(!0), x(H, null, z(C.value, (ne) => (u(), x(H, {
1885
+ (u(!0), x(H, null, z(S.value, (ne) => (u(), x(H, {
1877
1886
  key: ne.title
1878
1887
  }, [
1879
1888
  xe(ne, N) ? (u(), U(ve, {