@chase-shao/vue-component-lib 1.2.41 → 1.2.42

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,9 +1,9 @@
1
- import { ref as h, defineComponent as F, mergeModels as O, useModel as ce, resolveComponent as N, createBlock as L, openBlock as v, onMounted as X, computed as B, withCtx as I, createElementBlock as V, Fragment as R, renderList as E, createVNode as T, nextTick as qe, createTextVNode as Y, useTemplateRef as he, createElementVNode as k, createCommentVNode as ee, toDisplayString as j, resolveDynamicComponent as ke, renderSlot as J, inject as ne, getCurrentInstance as ue, reactive as Se, normalizeStyle as Ye, normalizeClass as Je, unref as $e, onActivated as Xe } from "vue";
1
+ import { ref as y, defineComponent as F, mergeModels as O, useModel as ce, resolveComponent as T, createBlock as L, openBlock as v, onMounted as Y, computed as P, withCtx as U, createElementBlock as S, Fragment as H, renderList as z, createVNode as N, nextTick as qe, createTextVNode as Z, useTemplateRef as he, createElementVNode as h, createCommentVNode as ee, toDisplayString as j, resolveDynamicComponent as ke, renderSlot as q, inject as ne, getCurrentInstance as ue, reactive as Se, normalizeStyle as Ye, normalizeClass as Je, unref as $e, onActivated as Xe } from "vue";
2
2
  import Qe from "axios";
3
3
  import { defineStore as Ze } from "pinia";
4
4
  import { useRouter as et } from "vue-router";
5
5
  const tt = Ze("main", () => ({
6
- token: h(void 0)
6
+ token: y(void 0)
7
7
  })), nt = async (e) => new Promise((t) => setTimeout(t, e)), at = async (e, t, s, n = void 0) => {
8
8
  if (e[t] === void 0)
9
9
  try {
@@ -76,7 +76,7 @@ function Le(e, t, s) {
76
76
  throw new Error("Random bytes length must be >= 16");
77
77
  return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, ot(n);
78
78
  }
79
- var z = /* @__PURE__ */ ((e) => (e[e.Submit = 0] = "Submit", e[e.Link = 1] = "Link", e))(z || {}), te = /* @__PURE__ */ ((e) => (e[e.Create = 0] = "Create", e[e.Update = 1] = "Update", e[e.Details = 2] = "Details", e[e.List = 3] = "List", e))(te || {});
79
+ var B = /* @__PURE__ */ ((e) => (e[e.Submit = 0] = "Submit", e[e.Link = 1] = "Link", e))(B || {}), te = /* @__PURE__ */ ((e) => (e[e.Create = 0] = "Create", e[e.Update = 1] = "Update", e[e.Details = 2] = "Details", e[e.List = 3] = "List", e))(te || {});
80
80
  function lt(e, t, s) {
81
81
  const n = {
82
82
  pageType: "",
@@ -112,7 +112,7 @@ function lt(e, t, s) {
112
112
  redirectUrl: a.redirectUrl,
113
113
  redirectType: a.redirectType,
114
114
  title: a.title,
115
- widget: a.widget === "Link" ? z.Link : z.Submit,
115
+ widget: a.widget === "Link" ? B.Link : B.Submit,
116
116
  location: a.location,
117
117
  attributeType: a.attributeType,
118
118
  readonly: a.readonly
@@ -271,8 +271,8 @@ const ae = (e, t) => {
271
271
  const n = e, a = s, c = ce(e, "modelValue"), l = (r) => ae(n.validations, r), d = (r) => {
272
272
  a("input", r);
273
273
  }, o = (r) => {
274
- const _ = l(r);
275
- a("error", _.res ? "" : _.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((p) => {
274
+ const w = l(r);
275
+ a("error", w.res ? "" : w.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((p) => {
276
276
  p.event === "change" && a(p.event, p.handlerName, r);
277
277
  });
278
278
  };
@@ -281,11 +281,11 @@ const ae = (e, t) => {
281
281
  const r = l(n.modelValue);
282
282
  return a("error", r.res ? "" : r.errorMessages), r.res;
283
283
  }
284
- }), (r, _) => {
285
- const p = N("AInput");
284
+ }), (r, w) => {
285
+ const p = T("AInput");
286
286
  return v(), L(p, {
287
287
  modelValue: c.value,
288
- "onUpdate:modelValue": _[0] || (_[0] = (b) => c.value = b),
288
+ "onUpdate:modelValue": w[0] || (w[0] = (b) => c.value = b),
289
289
  "allow-clear": "",
290
290
  disabled: n.readonly || n.config.Readonly,
291
291
  onInput: d,
@@ -308,18 +308,18 @@ const ae = (e, t) => {
308
308
  }),
309
309
  emits: /* @__PURE__ */ O(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
310
310
  setup(e, { expose: t, emit: s }) {
311
- const n = e, a = s, c = ce(e, "modelValue"), l = h(100), d = h(0);
312
- X(() => {
311
+ const n = e, a = s, c = ce(e, "modelValue"), l = y(100), d = y(0);
312
+ Y(() => {
313
313
  n.validations && n.validations.forEach((p) => {
314
314
  p.ruleName === "Max" && (l.value = p.ruleParameter), p.ruleName === "Min" && (d.value = p.ruleParameter);
315
315
  });
316
316
  });
317
317
  const o = (p) => ae(n.validations, p), r = (p) => {
318
318
  a("input", p);
319
- }, _ = (p) => {
319
+ }, w = (p) => {
320
320
  const b = o(p);
321
- a("error", b.res ? "" : b.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((y) => {
322
- y.event === "change" && a(y.event, y.handlerName, p);
321
+ a("error", b.res ? "" : b.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((_) => {
322
+ _.event === "change" && a(_.event, _.handlerName, p);
323
323
  });
324
324
  };
325
325
  return t({
@@ -328,16 +328,16 @@ const ae = (e, t) => {
328
328
  return a("error", p.res ? "" : p.errorMessages), p.res;
329
329
  }
330
330
  }), (p, b) => {
331
- const y = N("AInputNumber");
332
- return v(), L(y, {
331
+ const _ = T("AInputNumber");
332
+ return v(), L(_, {
333
333
  modelValue: c.value,
334
- "onUpdate:modelValue": b[0] || (b[0] = (w) => c.value = w),
334
+ "onUpdate:modelValue": b[0] || (b[0] = (C) => c.value = C),
335
335
  clearable: "",
336
336
  disabled: n.readonly,
337
337
  min: d.value,
338
338
  max: l.value,
339
339
  onInput: r,
340
- onChange: _
340
+ onChange: w
341
341
  }, null, 8, ["modelValue", "disabled", "min", "max"]);
342
342
  };
343
343
  }
@@ -356,24 +356,24 @@ const ae = (e, t) => {
356
356
  }),
357
357
  emits: /* @__PURE__ */ O(["update:modelValue", "change"], ["update:modelValue"]),
358
358
  setup(e, { expose: t, emit: s }) {
359
- const n = e, a = s, c = h(!1), l = h(n.config.options ?? []), d = ce(e, "modelValue"), o = (p) => ae(n.validations, p);
360
- B(() => {
359
+ const n = e, a = s, c = y(!1), l = y(n.config.options ?? []), d = ce(e, "modelValue"), o = (p) => ae(n.validations, p);
360
+ P(() => {
361
361
  const p = {};
362
362
  return n.triggers && n.triggers.length > 0 && n.triggers.forEach((b) => {
363
- p[b.event] = (y) => {
364
- a(b.event, b.handlerName, y);
365
- const w = o(y);
366
- a("error", w.res ? "" : w.errorMessages);
363
+ p[b.event] = (_) => {
364
+ a(b.event, b.handlerName, _);
365
+ const C = o(_);
366
+ a("error", C.res ? "" : C.errorMessages);
367
367
  };
368
368
  }), p;
369
- }), X(async () => {
369
+ }), Y(async () => {
370
370
  n.config.dataSourceProvider && (l.value = await bt(n.config.dataSourceProvider));
371
371
  });
372
- const _ = (p) => {
372
+ const w = (p) => {
373
373
  a("update:modelValue", p);
374
374
  const b = o(p);
375
- a("error", b.res ? "" : b.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((y) => {
376
- y.event === "change" && a(y.event, y.handlerName, p);
375
+ a("error", b.res ? "" : b.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((_) => {
376
+ _.event === "change" && a(_.event, _.handlerName, p);
377
377
  });
378
378
  };
379
379
  return t({
@@ -382,21 +382,21 @@ const ae = (e, t) => {
382
382
  return a("error", p.res ? "" : p.errorMessages), p.res;
383
383
  }
384
384
  }), (p, b) => {
385
- const y = N("AOption"), w = N("ASelect");
386
- return v(), L(w, {
385
+ const _ = T("AOption"), C = T("ASelect");
386
+ return v(), L(C, {
387
387
  "allow-clear": "",
388
388
  modelValue: d.value,
389
- "onUpdate:modelValue": b[0] || (b[0] = (S) => d.value = S),
389
+ "onUpdate:modelValue": b[0] || (b[0] = (I) => d.value = I),
390
390
  loading: c.value,
391
391
  "filter-option": !0,
392
392
  "allow-search": !0,
393
- onChange: _
393
+ onChange: w
394
394
  }, {
395
- default: I(() => [
396
- (v(!0), V(R, null, E(l.value, (S) => (v(), L(y, {
397
- key: S.value,
398
- value: S.value,
399
- label: S.label
395
+ default: U(() => [
396
+ (v(!0), S(H, null, z(l.value, (I) => (v(), L(_, {
397
+ key: I.value,
398
+ value: I.value,
399
+ label: I.label
400
400
  }, null, 8, ["value", "label"]))), 128))
401
401
  ]),
402
402
  _: 1
@@ -411,15 +411,15 @@ const ae = (e, t) => {
411
411
  },
412
412
  emits: ["update:modelValue", "change"],
413
413
  setup(e, { expose: t, emit: s }) {
414
- const n = e, a = s, c = h(n.config.options ?? []), l = (o) => {
414
+ const n = e, a = s, c = y(n.config.options ?? []), l = (o) => {
415
415
  a("update:modelValue", o), a("change", o);
416
416
  };
417
- X(async () => {
417
+ Y(async () => {
418
418
  if (n.config) {
419
419
  const o = n.config.dataSourceProvider;
420
420
  if (o) {
421
- const _ = await (await W()).get(o);
422
- c.value = _.data;
421
+ const w = await (await W()).get(o);
422
+ c.value = w.data;
423
423
  }
424
424
  }
425
425
  });
@@ -429,13 +429,13 @@ const ae = (e, t) => {
429
429
  return !0;
430
430
  }
431
431
  }), (o, r) => {
432
- const _ = N("ACascader"), p = N("ASpace");
432
+ const w = T("ACascader"), p = T("ASpace");
433
433
  return v(), L(p, {
434
434
  direction: "vertical",
435
435
  size: "large"
436
436
  }, {
437
- default: I(() => [
438
- T(_, {
437
+ default: U(() => [
438
+ N(w, {
439
439
  "field-names": d,
440
440
  "model-value": o.modelValue,
441
441
  options: c.value,
@@ -461,39 +461,37 @@ const ae = (e, t) => {
461
461
  },
462
462
  emits: ["update:modelValue", "change", "error", "input"],
463
463
  setup(e, { expose: t, emit: s }) {
464
- const n = e, a = s, c = h({});
465
- X(async () => {
466
- const w = await Ae();
464
+ const n = e, a = s, c = y({});
465
+ Y(async () => {
466
+ const _ = await Ae();
467
467
  c.value = {
468
- Authorization: `Bearer ${w}`
468
+ Authorization: `Bearer ${_}`
469
469
  };
470
470
  });
471
- const l = (w) => ae(n.validations, w), o = Ee().apiBase, r = h(null), _ = h(0);
472
- function p(w, S, D) {
473
- return w.replace(/{WorkflowId}/g, S).replace(/{ClassName}/g, D);
471
+ const l = (_) => ae(n.validations, _), o = Ee().apiBase, r = y(null), w = y(0);
472
+ function p(_, C, I) {
473
+ return _.replace(/{WorkflowId}/g, C).replace(/{ClassName}/g, I);
474
474
  }
475
- const b = B(() => {
475
+ const b = P(() => {
476
476
  if (n.config.uploadURL) {
477
- const w = o + n.config.uploadURL;
478
- return p(w, _.value.toString(), n.className);
477
+ const _ = o + n.config.uploadURL;
478
+ return p(_, w.value.toString(), n.className);
479
479
  }
480
480
  return "";
481
- }), y = (w) => {
482
- w.stopPropagation(), r.value.submit();
483
- };
481
+ });
484
482
  return t({
485
- submit(w) {
486
- r.value && (n.config.uploadURL && (_.value = w), qe(() => {
483
+ submit(_) {
484
+ r.value && (n.config.uploadURL && (w.value = _), qe(() => {
487
485
  r.value.submit();
488
486
  }));
489
487
  },
490
488
  validate() {
491
- const w = l(n.modelValue);
492
- return a("error", w.res ? "" : w.errorMessages), w.res;
489
+ const _ = l(n.modelValue);
490
+ return a("error", _.res ? "" : _.errorMessages), _.res;
493
491
  }
494
- }), (w, S) => {
495
- const D = N("a-button"), G = N("a-upload");
496
- return v(), L(G, {
492
+ }), (_, C) => {
493
+ const I = T("a-upload");
494
+ return v(), L(I, {
497
495
  ref_key: "uploadRef",
498
496
  ref: r,
499
497
  "default-file-list": n.config.files,
@@ -503,26 +501,7 @@ const ae = (e, t) => {
503
501
  name: "files",
504
502
  headers: c.value
505
503
  }, {
506
- "start-icon": I(() => S[0] || (S[0] = [])),
507
- "upload-button": I(() => [
508
- T(D, null, {
509
- default: I(() => S[1] || (S[1] = [
510
- Y("select file", -1)
511
- ])),
512
- _: 1,
513
- __: [1]
514
- }),
515
- T(D, {
516
- type: "primary",
517
- onClick: y
518
- }, {
519
- default: I(() => S[2] || (S[2] = [
520
- Y(" start upload", -1)
521
- ])),
522
- _: 1,
523
- __: [2]
524
- })
525
- ]),
504
+ "start-icon": U(() => C[0] || (C[0] = [])),
526
505
  _: 1
527
506
  }, 8, ["default-file-list", "action", "limit", "headers"]);
528
507
  };
@@ -544,8 +523,8 @@ const ae = (e, t) => {
544
523
  }, d = (o) => {
545
524
  a("update:modelValue", o);
546
525
  const r = c(o);
547
- a("error", r.res ? "" : r.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((_) => {
548
- _.event === "change" && a(_.event, _.handlerName, o);
526
+ a("error", r.res ? "" : r.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((w) => {
527
+ w.event === "change" && a(w.event, w.handlerName, o);
549
528
  });
550
529
  };
551
530
  return t({
@@ -554,8 +533,8 @@ const ae = (e, t) => {
554
533
  return a("error", o.res ? "" : o.errorMessages), o.res;
555
534
  }
556
535
  }), (o, r) => {
557
- const _ = N("ATextarea");
558
- return v(), L(_, {
536
+ const w = T("ATextarea");
537
+ return v(), L(w, {
559
538
  "model-value": n.modelValue,
560
539
  placeholder: "Please enter something",
561
540
  "allow-clear": "",
@@ -582,8 +561,8 @@ const ae = (e, t) => {
582
561
  setup(e, { expose: t, emit: s }) {
583
562
  const n = e, a = s, c = ce(e, "modelValue"), l = (o) => ae(n.validations, o), d = (o) => {
584
563
  const r = l(o);
585
- a("error", r.res ? "" : r.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((_) => {
586
- _.event === "change" && a(_.event, _.handlerName, o);
564
+ a("error", r.res ? "" : r.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((w) => {
565
+ w.event === "change" && a(w.event, w.handlerName, o);
587
566
  });
588
567
  };
589
568
  return t({
@@ -592,16 +571,16 @@ const ae = (e, t) => {
592
571
  return a("error", o.res ? "" : o.errorMessages), o.res;
593
572
  }
594
573
  }), (o, r) => {
595
- const _ = N("ACheckbox");
596
- return v(), L(_, {
574
+ const w = T("ACheckbox");
575
+ return v(), L(w, {
597
576
  modelValue: c.value,
598
577
  "onUpdate:modelValue": r[0] || (r[0] = (p) => c.value = p),
599
578
  clearable: "",
600
579
  disabled: n.readonly || n.config.Readonly,
601
580
  onChange: d
602
581
  }, {
603
- default: I(() => r[1] || (r[1] = [
604
- Y("Yes", -1)
582
+ default: U(() => r[1] || (r[1] = [
583
+ Z("Yes", -1)
605
584
  ])),
606
585
  _: 1,
607
586
  __: [1]
@@ -630,7 +609,7 @@ const ae = (e, t) => {
630
609
  }),
631
610
  emits: /* @__PURE__ */ O(["update:modelValue", "change", "error"], ["update:modelValue"]),
632
611
  setup(e, { expose: t, emit: s }) {
633
- const n = e, a = s, c = ce(e, "modelValue"), l = he("widgetRef"), d = B(() => {
612
+ const n = e, a = s, c = ce(e, "modelValue"), l = he("widgetRef"), d = P(() => {
634
613
  switch (n.config?.widget?.widget) {
635
614
  case "TextBox":
636
615
  return xe;
@@ -651,10 +630,10 @@ const ae = (e, t) => {
651
630
  default:
652
631
  return xe;
653
632
  }
654
- }), o = h(""), r = (b) => {
633
+ }), o = y(""), r = (b) => {
655
634
  o.value = b;
656
- }, _ = (b, y) => {
657
- a("change", b, y);
635
+ }, w = (b, _) => {
636
+ a("change", b, _);
658
637
  };
659
638
  function p() {
660
639
  return n.config?.widget?.widget === "File";
@@ -672,28 +651,28 @@ const ae = (e, t) => {
672
651
  getCompName() {
673
652
  return n?.config?.widget?.title;
674
653
  }
675
- }), (b, y) => (v(), V("div", Tt, [
676
- k("div", Nt, [
677
- Y(j(n?.config?.widget?.title), 1),
678
- n.config.validations.length ? (v(), V("span", Ut, "*")) : ee("", !0)
654
+ }), (b, _) => (v(), S("div", Tt, [
655
+ h("div", Nt, [
656
+ Z(j(n?.config?.widget?.title), 1),
657
+ n.config.validations.length ? (v(), S("span", Ut, "*")) : ee("", !0)
679
658
  ]),
680
- k("div", At, [
681
- k("div", Lt, [
659
+ h("div", At, [
660
+ h("div", Lt, [
682
661
  (v(), L(ke(d.value), {
683
662
  ref_key: "widgetRef",
684
663
  ref: l,
685
664
  modelValue: c.value,
686
- "onUpdate:modelValue": y[0] || (y[0] = (w) => c.value = w),
665
+ "onUpdate:modelValue": _[0] || (_[0] = (C) => c.value = C),
687
666
  "field-key": n.fieldKey,
688
667
  config: n.config.widget,
689
668
  validations: n.config.validations,
690
669
  triggers: n.config.triggers,
691
670
  "class-name": n.className,
692
671
  onError: r,
693
- onChange: _
672
+ onChange: w
694
673
  }, null, 40, ["modelValue", "field-key", "config", "validations", "triggers", "class-name"]))
695
674
  ]),
696
- o.value.length > 0 ? (v(), V("div", Mt, j(o.value), 1)) : ee("", !0)
675
+ o.value.length > 0 ? (v(), S("div", Mt, j(o.value), 1)) : ee("", !0)
697
676
  ])
698
677
  ]));
699
678
  }
@@ -715,13 +694,13 @@ const ae = (e, t) => {
715
694
  n("click", s.url, s.redirectType);
716
695
  }
717
696
  return (c, l) => {
718
- const d = N("AButton");
697
+ const d = T("AButton");
719
698
  return v(), L(d, {
720
699
  type: "primary",
721
700
  onClick: a
722
701
  }, {
723
- default: I(() => [
724
- J(c.$slots, "default")
702
+ default: U(() => [
703
+ q(c.$slots, "default")
725
704
  ]),
726
705
  _: 3
727
706
  });
@@ -740,10 +719,10 @@ const ae = (e, t) => {
740
719
  n("click", s.url, s.redirectType);
741
720
  }
742
721
  return (c, l) => {
743
- const d = N("ALink");
722
+ const d = T("ALink");
744
723
  return v(), L(d, { onClick: a }, {
745
- default: I(() => [
746
- J(c.$slots, "default")
724
+ default: U(() => [
725
+ q(c.$slots, "default")
747
726
  ]),
748
727
  _: 3
749
728
  });
@@ -760,7 +739,7 @@ const ae = (e, t) => {
760
739
  function a(o, r) {
761
740
  n("click", s.config.widget, o, r, s.config.title);
762
741
  }
763
- const c = B(() => {
742
+ const c = P(() => {
764
743
  switch (s.config.location) {
765
744
  case "InOperation":
766
745
  return Dt;
@@ -768,14 +747,14 @@ const ae = (e, t) => {
768
747
  default:
769
748
  return Ht;
770
749
  }
771
- }), l = B(() => s.config.widget === z.Submit ? s.config.requestUrl ?? "" : s.config.widget === z.Link ? s.config.redirectUrl ?? "" : ""), d = B(() => s.config.redirectType ?? "Details");
750
+ }), l = P(() => s.config.widget === B.Submit ? s.config.requestUrl ?? "" : s.config.widget === B.Link ? s.config.redirectUrl ?? "" : ""), d = P(() => s.config.redirectType ?? "Details");
772
751
  return (o, r) => (v(), L(ke(c.value), {
773
752
  url: l.value,
774
753
  "redirect-type": d.value,
775
754
  onClick: a
776
755
  }, {
777
- default: I(() => [
778
- Y(j(s.config.title), 1)
756
+ default: U(() => [
757
+ Z(j(s.config.title), 1)
779
758
  ]),
780
759
  _: 1
781
760
  }, 8, ["url", "redirect-type"]));
@@ -806,25 +785,25 @@ const Pt = { class: "top-bar" }, Bt = { class: "banner-info" }, zt = { class: "p
806
785
  },
807
786
  setup(e) {
808
787
  return (t, s) => {
809
- const n = N("a-avatar"), a = N("a-popover");
810
- return v(), V("div", Pt, [
811
- k("div", Bt, [
812
- k("div", zt, j(t.title), 1),
813
- k("div", Et, j(t.subTitle), 1)
788
+ const n = T("a-avatar"), a = T("a-popover");
789
+ return v(), S("div", Pt, [
790
+ h("div", Bt, [
791
+ h("div", zt, j(t.title), 1),
792
+ h("div", Et, j(t.subTitle), 1)
814
793
  ]),
815
- k("div", Kt, [
816
- T(a, { trigger: "click" }, {
817
- content: I(() => [
818
- k("div", jt, j(t.email), 1)
794
+ h("div", Kt, [
795
+ N(a, { trigger: "click" }, {
796
+ content: U(() => [
797
+ h("div", jt, j(t.email), 1)
819
798
  ]),
820
- default: I(() => [
821
- T(n, {
799
+ default: U(() => [
800
+ N(n, {
822
801
  size: 48,
823
802
  autoFixFontSize: "",
824
803
  style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
825
804
  }, {
826
- default: I(() => [
827
- Y(j(t.email.charAt(0).toUpperCase()), 1)
805
+ default: U(() => [
806
+ Z(j(t.email.charAt(0).toUpperCase()), 1)
828
807
  ]),
829
808
  _: 1
830
809
  })
@@ -844,7 +823,7 @@ const Pt = { class: "top-bar" }, Bt = { class: "banner-info" }, zt = { class: "p
844
823
  className: {}
845
824
  },
846
825
  setup(e) {
847
- const t = pe(), s = me(), n = fe(), a = Ve(), c = he("dataWidgets"), l = ue(), d = e, o = h({
826
+ const t = pe(), s = me(), n = fe(), a = Ve(), c = he("dataWidgets"), l = ue(), d = e, o = y({
848
827
  pageType: "",
849
828
  fields: {},
850
829
  globalValidations: [],
@@ -852,117 +831,117 @@ const Pt = { class: "top-bar" }, Bt = { class: "banner-info" }, zt = { class: "p
852
831
  title: "",
853
832
  subTitle: ""
854
833
  }
855
- }), r = h([]), _ = h({});
834
+ }), r = y([]), w = y({});
856
835
  function p(m) {
857
836
  return m ? Object.entries(m).map(([i, u]) => ({
858
837
  fieldKey: i,
859
838
  ...u
860
- })).filter((i) => i.widget && i.widget.widget !== "Hidden").filter((i) => !q.value.includes(i.fieldKey)) : [];
839
+ })).filter((i) => i.widget && i.widget.widget !== "Hidden").filter((i) => !G.value.includes(i.fieldKey)) : [];
861
840
  }
862
841
  function b(m) {
863
842
  return m ? Object.entries(m).filter(([i, u]) => u.dependent).reduce((i, [u, f]) => (i[u] = f.dependent, i), {}) : [];
864
843
  }
865
- const y = B(() => o.value?.actions ? [...o.value.actions].reverse() : []), w = Se({}), S = h(!1);
866
- X(async () => {
867
- S.value = !0, o.value = await de(te.Create, d.className, {
844
+ const _ = P(() => o.value?.actions ? [...o.value.actions].reverse() : []), C = Se({}), I = y(!1);
845
+ Y(async () => {
846
+ I.value = !0, o.value = await de(te.Create, d.className, {
868
847
  svrStore: s,
869
848
  bpmStore: t
870
- }), r.value = p(o.value.fields), _.value = b(o.value.fields);
849
+ }), r.value = p(o.value.fields), w.value = b(o.value.fields);
871
850
  for (const m in o.value.fields) {
872
851
  if (o.value.fields[m].widget?.widget === "File") {
873
852
  const g = r.value.find((i) => i.fieldKey === m);
874
853
  g && g.widget && (g.widget.files = []);
875
854
  continue;
876
855
  }
877
- w[m] = o.value.fields[m].modelValue;
856
+ C[m] = o.value.fields[m].modelValue;
878
857
  }
879
- S.value = !1;
858
+ I.value = !1;
880
859
  });
881
- function D() {
860
+ function E() {
882
861
  return s()?.userInfo?.email_address ?? "";
883
862
  }
884
- async function G(m, g, i) {
863
+ async function J(m, g, i) {
885
864
  switch (m) {
886
- case z.Submit:
865
+ case B.Submit:
887
866
  let u = !0;
888
- if (c.value?.forEach(($) => {
889
- $?.validate && ($.validate() || (u = !1));
867
+ if (c.value?.forEach((V) => {
868
+ V?.validate && (V.validate() || (u = !1));
890
869
  }), !u) {
891
870
  l?.appContext.config.globalProperties.$message.error("表单验证未通过,请检查输入项");
892
871
  return;
893
872
  }
894
- const f = await ut(d.className, { ...w, ..._.value }, g);
895
- c.value?.forEach(($) => {
896
- $?.submit && $.submit(f);
873
+ const f = await ut(d.className, { ...C, ...w.value }, g);
874
+ c.value?.forEach((V) => {
875
+ V?.submit && V.submit(f);
897
876
  }), l?.appContext.config.globalProperties.$notification.success("创建成功!"), n.push({ name: "List", params: { className: d.className } });
898
877
  break;
899
- case z.Link:
878
+ case B.Link:
900
879
  i === "List" && n.push({ name: "List", params: { className: d.className } });
901
880
  break;
902
881
  default:
903
882
  console.warn("Unknown action type:", m);
904
883
  }
905
884
  }
906
- const q = h([
885
+ const G = y([
907
886
  "jobScpope",
908
887
  "currentWorkdayId",
909
888
  "originalGrade",
910
889
  "jobTitlePrevious",
911
890
  "positionId"
912
891
  ]);
913
- function U(m, g) {
914
- a[m]?.(g, q), o.value && (r.value = p(o.value.fields));
892
+ function x(m, g) {
893
+ a[m]?.(g, G), o.value && (r.value = p(o.value.fields));
915
894
  }
916
895
  return (m, g) => {
917
- const i = N("a-spin");
918
- return v(), V("div", Wt, [
919
- T(ge, {
896
+ const i = T("a-spin");
897
+ return v(), S("div", Wt, [
898
+ N(ge, {
920
899
  title: o.value.banner.title,
921
900
  subTitle: o.value.banner.subTitle,
922
- email: D()
901
+ email: E()
923
902
  }, null, 8, ["title", "subTitle", "email"]),
924
- k("div", Gt, [
925
- T(i, {
926
- loading: S.value,
903
+ h("div", Gt, [
904
+ N(i, {
905
+ loading: I.value,
927
906
  class: "form-container"
928
907
  }, {
929
- default: I(() => [
930
- k("div", qt, [
931
- k("div", Yt, [
932
- (v(!0), V(R, null, E(r.value, (u, f) => (v(), V("div", {
908
+ default: U(() => [
909
+ h("div", qt, [
910
+ h("div", Yt, [
911
+ (v(!0), S(H, null, z(r.value, (u, f) => (v(), S("div", {
933
912
  key: u.fieldKey,
934
913
  class: "form-field-wrapper"
935
914
  }, [
936
- T(Ce, {
915
+ N(Ce, {
937
916
  ref_for: !0,
938
917
  ref: "dataWidgets",
939
918
  "field-key": u.fieldKey,
940
919
  config: u,
941
920
  "class-name": m.className,
942
- modelValue: w[u.fieldKey],
943
- "onUpdate:modelValue": ($) => w[u.fieldKey] = $,
921
+ modelValue: C[u.fieldKey],
922
+ "onUpdate:modelValue": (V) => C[u.fieldKey] = V,
944
923
  class: "form-field",
945
- onChange: U
924
+ onChange: x
946
925
  }, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"])
947
926
  ]))), 128))
948
927
  ]),
949
- m.$slots.content ? (v(), V("div", Jt, [
950
- J(m.$slots, "content", {}, void 0, !0)
928
+ m.$slots.content ? (v(), S("div", Jt, [
929
+ q(m.$slots, "content", {}, void 0, !0)
951
930
  ])) : ee("", !0)
952
931
  ])
953
932
  ]),
954
933
  _: 3
955
934
  }, 8, ["loading"])
956
935
  ]),
957
- k("div", Xt, [
958
- k("div", Qt, [
959
- J(m.$slots, "action", {}, void 0, !0),
960
- k("div", Zt, [
961
- (v(!0), V(R, null, E(y.value, (u) => (v(), L(le, {
936
+ h("div", Xt, [
937
+ h("div", Qt, [
938
+ q(m.$slots, "action", {}, void 0, !0),
939
+ h("div", Zt, [
940
+ (v(!0), S(H, null, z(_.value, (u) => (v(), L(le, {
962
941
  key: u.Title,
963
942
  config: u,
964
943
  class: "action-button",
965
- onClick: G
944
+ onClick: J
966
945
  }, null, 8, ["config"]))), 128))
967
946
  ])
968
947
  ])
@@ -980,7 +959,7 @@ const Pt = { class: "top-bar" }, Bt = { class: "banner-info" }, zt = { class: "p
980
959
  workflowId: {}
981
960
  },
982
961
  setup(e) {
983
- const t = fe(), s = Ve(), n = me(), a = pe(), c = he("dataWidgets"), l = ue(), d = e, o = h({
962
+ const t = fe(), s = Ve(), n = me(), a = pe(), c = he("dataWidgets"), l = ue(), d = e, o = y({
984
963
  pageType: "",
985
964
  fields: {},
986
965
  globalValidations: [],
@@ -988,125 +967,125 @@ const Pt = { class: "top-bar" }, Bt = { class: "banner-info" }, zt = { class: "p
988
967
  title: "",
989
968
  subTitle: ""
990
969
  }
991
- }), r = h([]), _ = h({});
970
+ }), r = y([]), w = y({});
992
971
  function p(m) {
993
972
  return m ? Object.entries(m).map(([i, u]) => ({
994
973
  fieldKey: i,
995
974
  ...u
996
- })).filter((i) => i.widget && i.widget.widget !== "Hidden").filter((i) => !q.value.includes(i.fieldKey)) : [];
975
+ })).filter((i) => i.widget && i.widget.widget !== "Hidden").filter((i) => !G.value.includes(i.fieldKey)) : [];
997
976
  }
998
977
  function b(m) {
999
978
  return m ? Object.entries(m).filter(([i, u]) => u.dependent).reduce((i, [u, f]) => (i[u] = f.dependent, i), {}) : [];
1000
979
  }
1001
- const y = B(() => o.value?.actions ? [...o.value.actions].reverse() : []), w = Se({}), S = h(!1);
1002
- X(async () => {
1003
- S.value = !0, o.value = await de(te.Update, d.className, {
980
+ const _ = P(() => o.value?.actions ? [...o.value.actions].reverse() : []), C = Se({}), I = y(!1);
981
+ Y(async () => {
982
+ I.value = !0, o.value = await de(te.Update, d.className, {
1004
983
  svrStore: n,
1005
984
  bpmStore: a
1006
985
  }, {
1007
986
  workflowId: d.workflowId
1008
987
  });
1009
- const m = await Me(te.Update, d.className, { workflowId: d.workflowId, email: D() }), g = await De(d.className, d.workflowId);
988
+ const m = await Me(te.Update, d.className, { workflowId: d.workflowId, email: E() }), g = await De(d.className, d.workflowId);
1010
989
  o.value.actions = o.value.actions?.filter((i) => {
1011
990
  const u = m.find((f) => f.button === i.title);
1012
991
  return u ? u.isShow : !0;
1013
- }), r.value = p(o.value.fields), _.value = b(o.value.fields);
992
+ }), r.value = p(o.value.fields), w.value = b(o.value.fields);
1014
993
  for (const i in o.value.fields) {
1015
994
  if (o.value.fields[i].widget?.widget === "File") {
1016
995
  const u = r.value.find((f) => f.fieldKey === i);
1017
996
  u && u.widget && (u.widget.files = g[i] ?? []);
1018
997
  continue;
1019
998
  }
1020
- w[i] = o.value.fields[i].modelValue;
999
+ C[i] = o.value.fields[i].modelValue;
1021
1000
  }
1022
- S.value = !1;
1001
+ I.value = !1;
1023
1002
  });
1024
- function D() {
1003
+ function E() {
1025
1004
  return n()?.userInfo?.email_address ?? "";
1026
1005
  }
1027
- async function G(m, g, i) {
1006
+ async function J(m, g, i) {
1028
1007
  switch (m) {
1029
- case z.Submit:
1008
+ case B.Submit:
1030
1009
  let u = !0;
1031
- if (c.value?.forEach(($) => {
1032
- $?.validate && ($.validate() || (u = !1));
1010
+ if (c.value?.forEach((V) => {
1011
+ V?.validate && (V.validate() || (u = !1));
1033
1012
  }), !u) {
1034
1013
  l?.appContext.config.globalProperties.$message.error("表单验证未通过,请检查输入项");
1035
1014
  return;
1036
1015
  }
1037
- const f = await ft(d.className, d.workflowId, { ...w, ..._.value }, g);
1038
- c.value?.forEach(($) => {
1039
- $?.submit && $.submit(f);
1016
+ const f = await ft(d.className, d.workflowId, { ...C, ...w.value }, g);
1017
+ c.value?.forEach((V) => {
1018
+ V?.submit && V.submit(f);
1040
1019
  }), l?.appContext.config.globalProperties.$notification.success("修改成功!"), t.push({ name: "List", params: { className: d.className } });
1041
1020
  break;
1042
- case z.Link:
1021
+ case B.Link:
1043
1022
  t.push({ name: i, params: { className: d.className } });
1044
1023
  break;
1045
1024
  default:
1046
1025
  console.warn("Unknown action type:", m);
1047
1026
  }
1048
1027
  }
1049
- const q = h([
1028
+ const G = y([
1050
1029
  "jobScpope",
1051
1030
  "currentWorkdayId",
1052
1031
  "originalGrade",
1053
1032
  "jobTitlePrevious",
1054
1033
  "positionId"
1055
1034
  ]);
1056
- function U(m, g) {
1057
- s[m]?.(g, q), o.value && (r.value = p(o.value.fields));
1035
+ function x(m, g) {
1036
+ s[m]?.(g, G), o.value && (r.value = p(o.value.fields));
1058
1037
  }
1059
1038
  return (m, g) => {
1060
- const i = N("a-spin");
1061
- return v(), V("div", nn, [
1062
- T(ge, {
1039
+ const i = T("a-spin");
1040
+ return v(), S("div", nn, [
1041
+ N(ge, {
1063
1042
  title: o.value.banner.title,
1064
1043
  subTitle: o.value.banner.subTitle,
1065
- email: D()
1044
+ email: E()
1066
1045
  }, null, 8, ["title", "subTitle", "email"]),
1067
- k("div", an, [
1068
- T(i, {
1069
- loading: S.value,
1046
+ h("div", an, [
1047
+ N(i, {
1048
+ loading: I.value,
1070
1049
  class: "form-container"
1071
1050
  }, {
1072
- default: I(() => [
1073
- k("div", on, [
1074
- k("div", sn, [
1075
- (v(!0), V(R, null, E(r.value, (u, f) => (v(), V("div", {
1051
+ default: U(() => [
1052
+ h("div", on, [
1053
+ h("div", sn, [
1054
+ (v(!0), S(H, null, z(r.value, (u, f) => (v(), S("div", {
1076
1055
  key: u.fieldKey,
1077
1056
  class: "form-field-wrapper"
1078
1057
  }, [
1079
- T(Ce, {
1058
+ N(Ce, {
1080
1059
  ref_for: !0,
1081
1060
  ref: "dataWidgets",
1082
1061
  "field-key": u.fieldKey,
1083
1062
  name: f,
1084
1063
  config: u,
1085
1064
  "class-name": m.className,
1086
- modelValue: w[u.fieldKey],
1087
- "onUpdate:modelValue": ($) => w[u.fieldKey] = $,
1065
+ modelValue: C[u.fieldKey],
1066
+ "onUpdate:modelValue": (V) => C[u.fieldKey] = V,
1088
1067
  class: "form-field",
1089
- onChange: U
1068
+ onChange: x
1090
1069
  }, null, 8, ["field-key", "name", "config", "class-name", "modelValue", "onUpdate:modelValue"])
1091
1070
  ]))), 128))
1092
1071
  ]),
1093
- m.$slots.content ? (v(), V("div", rn, [
1094
- J(m.$slots, "content", {}, void 0, !0)
1072
+ m.$slots.content ? (v(), S("div", rn, [
1073
+ q(m.$slots, "content", {}, void 0, !0)
1095
1074
  ])) : ee("", !0)
1096
1075
  ])
1097
1076
  ]),
1098
1077
  _: 3
1099
1078
  }, 8, ["loading"])
1100
1079
  ]),
1101
- k("div", ln, [
1102
- k("div", cn, [
1103
- J(m.$slots, "action", {}, void 0, !0),
1104
- k("div", un, [
1105
- (v(!0), V(R, null, E(y.value, (u) => (v(), L(le, {
1080
+ h("div", ln, [
1081
+ h("div", cn, [
1082
+ q(m.$slots, "action", {}, void 0, !0),
1083
+ h("div", un, [
1084
+ (v(!0), S(H, null, z(_.value, (u) => (v(), L(le, {
1106
1085
  key: u.Title,
1107
1086
  config: u,
1108
1087
  class: "action-button",
1109
- onClick: G
1088
+ onClick: J
1110
1089
  }, null, 8, ["config"]))), 128))
1111
1090
  ])
1112
1091
  ])
@@ -1158,7 +1137,7 @@ const hn = F({
1158
1137
  click: (e) => !0
1159
1138
  },
1160
1139
  setup(e, { emit: t }) {
1161
- const s = _n("icon"), n = B(() => [s, `${s}-download`, { [`${s}-spin`]: e.spin }]), a = B(() => {
1140
+ const s = _n("icon"), n = P(() => [s, `${s}-download`, { [`${s}-spin`]: e.spin }]), a = P(() => {
1162
1141
  const l = {};
1163
1142
  return e.size && (l.fontSize = bn(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
1164
1143
  });
@@ -1172,7 +1151,7 @@ const hn = F({
1172
1151
  }
1173
1152
  }), kn = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
1174
1153
  function Sn(e, t, s, n, a, c) {
1175
- return v(), V("svg", {
1154
+ return v(), S("svg", {
1176
1155
  viewBox: "0 0 48 48",
1177
1156
  fill: "none",
1178
1157
  xmlns: "http://www.w3.org/2000/svg",
@@ -1184,7 +1163,7 @@ function Sn(e, t, s, n, a, c) {
1184
1163
  "stroke-linejoin": e.strokeLinejoin,
1185
1164
  onClick: t[0] || (t[0] = (...l) => e.onClick && e.onClick(...l))
1186
1165
  }, t[1] || (t[1] = [
1187
- k("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
1166
+ h("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
1188
1167
  ]), 14, kn);
1189
1168
  }
1190
1169
  var be = /* @__PURE__ */ yn(hn, [["render", Sn]]);
@@ -1207,7 +1186,7 @@ const Cn = Object.assign(be, {
1207
1186
  workflowId: {}
1208
1187
  },
1209
1188
  setup(e) {
1210
- const t = me(), s = pe(), n = Ve(), a = fe(), c = pn(), l = ue(), d = e, o = h({
1189
+ const t = me(), s = pe(), n = Ve(), a = fe(), c = pn(), l = ue(), d = e, o = y({
1211
1190
  pageType: "",
1212
1191
  fields: {},
1213
1192
  globalValidations: [],
@@ -1215,17 +1194,17 @@ const Cn = Object.assign(be, {
1215
1194
  title: "",
1216
1195
  subTitle: ""
1217
1196
  }
1218
- }), r = h([]);
1219
- function _(U) {
1220
- return U ? Object.entries(U).map(([g, i]) => (typeof i.modelValue == "boolean" ? i.fieldValue = i.modelValue ? "Yes" : "No" : i.fieldValue = i.modelValue, {
1197
+ }), r = y([]);
1198
+ function w(x) {
1199
+ return x ? Object.entries(x).map(([g, i]) => (typeof i.modelValue == "boolean" ? i.fieldValue = i.modelValue ? "Yes" : "No" : i.fieldValue = i.modelValue, {
1221
1200
  fieldKey: g,
1222
1201
  ...i
1223
1202
  })).filter((g) => g.widget && g.widget.widget !== "Hidden") : [];
1224
1203
  }
1225
- const p = B(() => o.value?.actions ? [...o.value.actions].reverse() : []), b = h(!0), y = (U, m = "yyyy-MM-dd hh:mm:ss.fff") => {
1226
- const g = new Date(U);
1204
+ const p = P(() => o.value?.actions ? [...o.value.actions].reverse() : []), b = y(!0), _ = (x, m = "yyyy-MM-dd hh:mm:ss.fff") => {
1205
+ const g = new Date(x);
1227
1206
  if (isNaN(g.getTime()))
1228
- return U;
1207
+ return x;
1229
1208
  const i = {
1230
1209
  yyyy: g.getFullYear(),
1231
1210
  yy: g.getFullYear().toString().substring(2),
@@ -1246,9 +1225,9 @@ const Cn = Object.assign(be, {
1246
1225
  for (const f of Object.keys(i))
1247
1226
  u = u.replace(f, i[f]);
1248
1227
  return u;
1249
- }, w = (U, m) => {
1250
- const g = U.findIndex((i) => i.isCurrent);
1251
- return U.map((i, u) => {
1228
+ }, C = (x, m) => {
1229
+ const g = x.findIndex((i) => i.isCurrent);
1230
+ return x.map((i, u) => {
1252
1231
  const f = {
1253
1232
  id: i.id,
1254
1233
  title: "",
@@ -1259,135 +1238,135 @@ const Cn = Object.assign(be, {
1259
1238
  time: ""
1260
1239
  };
1261
1240
  f.title = i.workflowProcessApprovers[0]?.name;
1262
- const $ = i.workflowProcessApprovers[i.workflowProcessApprovers.length - 1], Z = i.workflowHistorys[i.workflowHistorys.length - 1], se = Z?.workflowHistoryApprovers[Z?.workflowHistoryApprovers?.length - 1];
1263
- if ($ && se && $?.email?.toLowerCase() !== se?.approverEmail?.toLowerCase() && (f.title = `${se.name}`, f.proxy = `代理: ${$.name}`), i.sort > 1 ? f.sub = "审批角色:" + i.nodeName.replace("Submit", "").replace("Approve", "") : f.sub = "提交申请", i.isCurrent && m !== -1)
1241
+ const V = i.workflowProcessApprovers[i.workflowProcessApprovers.length - 1], Q = i.workflowHistorys[i.workflowHistorys.length - 1], se = Q?.workflowHistoryApprovers[Q?.workflowHistoryApprovers?.length - 1];
1242
+ if (V && se && V?.email?.toLowerCase() !== se?.approverEmail?.toLowerCase() && (f.title = `${se.name}`, f.proxy = `代理: ${V.name}`), i.sort > 1 ? f.sub = "审批角色:" + i.nodeName.replace("Submit", "").replace("Approve", "") : f.sub = "提交申请", i.isCurrent && m !== -1)
1264
1243
  f.desc = "审批中", f.status = 1;
1265
1244
  else {
1266
- const P = i.workflowHistorys[i.workflowHistorys.length - 1];
1267
- if (P && P.status === 100)
1268
- f.time = y(P.takeActionAt, "yyyy-MM-dd hh:mm:ss"), f.status = 2, f.desc = "已审批";
1269
- else if (P && P.status === 999)
1270
- f.time = y(P.takeActionAt, "yyyy-MM-dd hh:mm:ss"), f.status = 0, f.desc = "已跳过";
1271
- else if (P)
1272
- if (f.time = y(P.takeActionAt, "yyyy-MM-dd hh:mm:ss"), i.sort === 1)
1245
+ const R = i.workflowHistorys[i.workflowHistorys.length - 1];
1246
+ if (R && R.status === 100)
1247
+ f.time = _(R.takeActionAt, "yyyy-MM-dd hh:mm:ss"), f.status = 2, f.desc = "已审批";
1248
+ else if (R && R.status === 999)
1249
+ f.time = _(R.takeActionAt, "yyyy-MM-dd hh:mm:ss"), f.status = 0, f.desc = "已跳过";
1250
+ else if (R)
1251
+ if (f.time = _(R.takeActionAt, "yyyy-MM-dd hh:mm:ss"), i.sort === 1)
1273
1252
  f.status = 2, f.desc = "";
1274
1253
  else {
1275
- const C = P.workflowHistoryApprovers[0];
1276
- f.status = 3, f.desc = C?.reason ? `拒绝原因:${C.reason}` : "已拒绝";
1254
+ const k = R.workflowHistoryApprovers[0];
1255
+ f.status = 3, f.desc = k?.reason ? `拒绝原因:${k.reason}` : "已拒绝";
1277
1256
  }
1278
1257
  else u < g || g === -1 ? (f.status = 0, f.desc = "已跳过") : (f.status = 0, f.desc = "待审批");
1279
- P && P.status;
1258
+ R && R.status;
1280
1259
  }
1281
1260
  return f;
1282
1261
  });
1283
- }, S = h([]), D = h(!1);
1284
- X(async () => {
1262
+ }, I = y([]), E = y(!1);
1263
+ Y(async () => {
1285
1264
  b.value = !0, o.value = await de(te.Details, d.className, {
1286
1265
  svrStore: t,
1287
1266
  bpmStore: s
1288
1267
  }, {
1289
1268
  workflowId: d.workflowId
1290
1269
  });
1291
- const U = await Me(te.Details, d.className, { workflowId: d.workflowId, email: Q() }), m = await De(d.className, d.workflowId);
1270
+ const x = await Me(te.Details, d.className, { workflowId: d.workflowId, email: X() }), m = await De(d.className, d.workflowId);
1292
1271
  o.value.actions = o.value.actions?.filter((i) => {
1293
- const u = U.find((f) => f.button === i.title);
1272
+ const u = x.find((f) => f.button === i.title);
1294
1273
  return u ? u.isShow : !0;
1295
- }), D.value = U.find((i) => i.button === "IsGlobal")?.isShow ?? !1, r.value = _(o.value.fields);
1274
+ }), E.value = x.find((i) => i.button === "IsGlobal")?.isShow ?? !1, r.value = w(o.value.fields);
1296
1275
  for (const i in o.value.fields)
1297
1276
  if (o.value.fields[i].widget?.widget === "File") {
1298
1277
  const u = r.value.find((f) => f.fieldKey === i);
1299
1278
  u && u.widget && (u.widget.files = m[i] ?? []);
1300
1279
  }
1301
1280
  const g = await yt(d.className, d.workflowId);
1302
- S.value = w(g, 0), b.value = !1;
1281
+ I.value = C(g, 0), b.value = !1;
1303
1282
  });
1304
- async function G(U, m) {
1305
- return n[U]?.(m);
1283
+ async function J(x, m) {
1284
+ return n[x]?.(m);
1306
1285
  }
1307
- function Q() {
1286
+ function X() {
1308
1287
  return t()?.userInfo?.email_address ?? "";
1309
1288
  }
1310
- async function q(U, m, g, i) {
1289
+ async function G(x, m, g, i) {
1311
1290
  try {
1312
- switch (U) {
1313
- case z.Submit:
1314
- const { reason: u, ifGlobal: f } = await G(i, { isGlobal: D.value }), $ = i === "Approve" ? "100" : "-1";
1315
- await wt(d.className, d.workflowId, Q(), u, [Number(d.workflowId)], m, $, f);
1316
- const Z = i === "Approve" ? "审批已通过!" : "审批已拒绝!";
1317
- l?.appContext.config.globalProperties.$notification.success(Z), a.push({ name: "List", params: { className: d.className } });
1291
+ switch (x) {
1292
+ case B.Submit:
1293
+ const { reason: u, ifGlobal: f } = await J(i, { isGlobal: E.value }), V = i === "Approve" ? "100" : "-1";
1294
+ await wt(d.className, d.workflowId, X(), u, [Number(d.workflowId)], m, V, f);
1295
+ const Q = i === "Approve" ? "审批已通过!" : "审批已拒绝!";
1296
+ l?.appContext.config.globalProperties.$notification.success(Q), a.push({ name: "List", params: { className: d.className } });
1318
1297
  break;
1319
- case z.Link:
1298
+ case B.Link:
1320
1299
  g === "List" && a.push({ name: "List", params: { className: d.className } });
1321
1300
  break;
1322
1301
  default:
1323
- console.warn("Unknown action type:", U);
1302
+ console.warn("Unknown action type:", x);
1324
1303
  }
1325
1304
  } catch {
1326
1305
  }
1327
1306
  }
1328
- return (U, m) => {
1329
- const g = N("a-link"), i = N("a-space"), u = N("a-spin");
1330
- return v(), V("div", Vn, [
1331
- T(ge, {
1307
+ return (x, m) => {
1308
+ const g = T("a-link"), i = T("a-space"), u = T("a-spin");
1309
+ return v(), S("div", Vn, [
1310
+ N(ge, {
1332
1311
  title: o.value.banner.title,
1333
1312
  subTitle: o.value.banner.subTitle,
1334
- email: Q()
1313
+ email: X()
1335
1314
  }, null, 8, ["title", "subTitle", "email"]),
1336
- k("div", $n, [
1337
- T(u, {
1315
+ h("div", $n, [
1316
+ N(u, {
1338
1317
  loading: b.value,
1339
1318
  class: "detail-container"
1340
1319
  }, {
1341
- default: I(() => [
1342
- k("div", In, [
1343
- (v(), L(ke($e(c).Steps), { steps: S.value }, null, 8, ["steps"])),
1344
- k("div", xn, [
1345
- (v(!0), V(R, null, E(r.value, (f) => (v(), V("div", {
1320
+ default: U(() => [
1321
+ h("div", In, [
1322
+ (v(), L(ke($e(c).Steps), { steps: I.value }, null, 8, ["steps"])),
1323
+ h("div", xn, [
1324
+ (v(!0), S(H, null, z(r.value, (f) => (v(), S("div", {
1346
1325
  key: f.fieldKey,
1347
1326
  class: "detail-field-wrapper"
1348
1327
  }, [
1349
- k("div", Tn, [
1350
- k("div", Nn, j(f.widget?.title), 1),
1351
- f.widget?.widget === "File" ? (v(!0), V(R, { key: 0 }, E(f.widget.files, ($) => (v(), V("div", {
1328
+ h("div", Tn, [
1329
+ h("div", Nn, j(f.widget?.title), 1),
1330
+ f.widget?.widget === "File" ? (v(!0), S(H, { key: 0 }, z(f.widget.files, (V) => (v(), S("div", {
1352
1331
  class: "field-value",
1353
- key: $.id
1332
+ key: V.id
1354
1333
  }, [
1355
- T(i, null, {
1356
- default: I(() => [
1357
- Y(j($.name), 1),
1358
- T(g, {
1359
- href: $.url,
1334
+ N(i, null, {
1335
+ default: U(() => [
1336
+ Z(j(V.name), 1),
1337
+ N(g, {
1338
+ href: V.url,
1360
1339
  target: "_blank"
1361
1340
  }, {
1362
- default: I(() => [
1363
- T($e(Cn), { style: { color: "#7A00E6" } })
1341
+ default: U(() => [
1342
+ N($e(Cn), { style: { color: "#7A00E6" } })
1364
1343
  ]),
1365
1344
  _: 2
1366
1345
  }, 1032, ["href"])
1367
1346
  ]),
1368
1347
  _: 2
1369
1348
  }, 1024)
1370
- ]))), 128)) : (v(), V("div", Un, j(f.fieldValue), 1))
1349
+ ]))), 128)) : (v(), S("div", Un, j(f.fieldValue), 1))
1371
1350
  ])
1372
1351
  ]))), 128))
1373
1352
  ]),
1374
- U.$slots.content ? (v(), V("div", An, [
1375
- J(U.$slots, "content", {}, void 0, !0)
1353
+ x.$slots.content ? (v(), S("div", An, [
1354
+ q(x.$slots, "content", {}, void 0, !0)
1376
1355
  ])) : ee("", !0)
1377
1356
  ])
1378
1357
  ]),
1379
1358
  _: 3
1380
1359
  }, 8, ["loading"])
1381
1360
  ]),
1382
- k("div", Ln, [
1383
- k("div", Mn, [
1384
- J(U.$slots, "action", {}, void 0, !0),
1385
- k("div", Fn, [
1386
- (v(!0), V(R, null, E(p.value, (f) => (v(), L(le, {
1361
+ h("div", Ln, [
1362
+ h("div", Mn, [
1363
+ q(x.$slots, "action", {}, void 0, !0),
1364
+ h("div", Fn, [
1365
+ (v(!0), S(H, null, z(p.value, (f) => (v(), L(le, {
1387
1366
  key: f.Title,
1388
1367
  config: f,
1389
1368
  class: "action-button",
1390
- onClick: q
1369
+ onClick: G
1391
1370
  }, null, 8, ["config"]))), 128))
1392
1371
  ])
1393
1372
  ])
@@ -1402,7 +1381,7 @@ const Cn = Object.assign(be, {
1402
1381
  className: {}
1403
1382
  },
1404
1383
  setup(e) {
1405
- const t = me(), s = pe(), n = fe(), a = e, c = h(), l = Se({
1384
+ const t = me(), s = pe(), n = fe(), a = e, c = y(), l = Se({
1406
1385
  current: 1,
1407
1386
  total: 0,
1408
1387
  pageSize: 10,
@@ -1412,27 +1391,27 @@ const Cn = Object.assign(be, {
1412
1391
  filters: []
1413
1392
  });
1414
1393
  function d() {
1415
- const C = Object.entries(u.value).filter(([, x]) => x && x !== "").map(([x, A]) => ({
1416
- key: x,
1394
+ const k = Object.entries(u.value).filter(([, $]) => $ && $ !== "").map(([$, A]) => ({
1395
+ key: $,
1417
1396
  value: A
1418
1397
  // operator: 'like' // 根据实际需要调整操作符
1419
1398
  }));
1420
1399
  return {
1421
1400
  pageNumber: l.current,
1422
1401
  pageSize: l.pageSize,
1423
- filters: [...l.filters, ...C],
1402
+ filters: [...l.filters, ...k],
1424
1403
  sorts: [{
1425
1404
  key: "status",
1426
1405
  type: 0
1427
1406
  }]
1428
1407
  };
1429
1408
  }
1430
- const o = B(() => ({
1409
+ const o = P(() => ({
1431
1410
  x: p.value.length * 150 + 250
1432
1411
  // 只设置横向滚动
1433
1412
  // 移除 y 属性,让表格高度自适应
1434
- })), r = (C) => {
1435
- const x = Object.entries(C).filter(([, A]) => A.widget?.column).map(([A, K], re) => ({
1413
+ })), r = (k) => {
1414
+ const $ = Object.entries(k).filter(([, A]) => A.widget?.column).map(([A, K], re) => ({
1436
1415
  title: K.widget.title,
1437
1416
  dataIndex: A.charAt(0).toLowerCase() + A.slice(1),
1438
1417
  order: K.order,
@@ -1444,7 +1423,7 @@ const Cn = Object.assign(be, {
1444
1423
  resizable: !0
1445
1424
  // 启用列宽调整
1446
1425
  })).sort((A, K) => A.order - K.order);
1447
- x.push({
1426
+ $.push({
1448
1427
  title: "Actions",
1449
1428
  slotName: "optional",
1450
1429
  align: "center",
@@ -1452,139 +1431,139 @@ const Cn = Object.assign(be, {
1452
1431
  minWidth: 200,
1453
1432
  fixed: "right",
1454
1433
  resizable: !1
1455
- }), p.value = x;
1456
- }, _ = h([]), p = h([]), b = h(!0), y = h(!0), w = h(), S = async () => {
1457
- y.value = !0;
1458
- const C = await ct(a.className, d());
1459
- _.value = C.data, l.total = C.totalCount, y.value = !1;
1460
- }, D = h(!1);
1461
- X(async () => {
1434
+ }), p.value = $;
1435
+ }, w = y([]), p = y([]), b = y(!0), _ = y(!0), C = y(), I = async () => {
1436
+ _.value = !0;
1437
+ const k = await ct(a.className, d());
1438
+ w.value = k.data, l.total = k.totalCount, _.value = !1;
1439
+ }, E = y(!1);
1440
+ Y(async () => {
1462
1441
  b.value = !0, c.value = await de(3, a.className, {
1463
1442
  svrStore: t,
1464
1443
  bpmStore: s
1465
- }), r(c.value.fields), $(c.value.fields), i(c.value?.tabs?.[0]?.key || ""), w.value = c.value.actions, b.value = !1, D.value = !0;
1444
+ }), r(c.value.fields), V(c.value.fields), i(c.value?.tabs?.[0]?.key || ""), C.value = c.value.actions, b.value = !1, E.value = !0;
1466
1445
  }), Xe(() => {
1467
- D.value && S();
1446
+ E.value && I();
1468
1447
  });
1469
- const G = (C) => {
1470
- l.current = C, S();
1471
- }, Q = (C) => {
1472
- l.pageSize = C, S();
1448
+ const J = (k) => {
1449
+ l.current = k, I();
1450
+ }, X = (k) => {
1451
+ l.pageSize = k, I();
1473
1452
  };
1474
- function q(C, x, A, K, re) {
1475
- switch (C) {
1476
- case z.Link:
1453
+ function G(k, $, A, K, re) {
1454
+ switch (k) {
1455
+ case B.Link:
1477
1456
  n.push({ name: A, params: { workflowId: re } });
1478
1457
  break;
1479
1458
  default:
1480
- console.warn("Unknown action type:", C);
1459
+ console.warn("Unknown action type:", k);
1481
1460
  }
1482
1461
  }
1483
- function U(C, x, A) {
1484
- switch (C) {
1485
- case z.Link:
1462
+ function x(k, $, A) {
1463
+ switch (k) {
1464
+ case B.Link:
1486
1465
  n.push({ name: A });
1487
1466
  break;
1488
1467
  default:
1489
- console.warn("Unknown action type:", C);
1468
+ console.warn("Unknown action type:", k);
1490
1469
  }
1491
1470
  }
1492
1471
  function m() {
1493
1472
  return t()?.userInfo?.email_address ?? "";
1494
1473
  }
1495
- function g(C, x) {
1496
- return C.replace(/{currentUserEmail}/g, x);
1474
+ function g(k, $) {
1475
+ return k.replace(/{currentUserEmail}/g, $);
1497
1476
  }
1498
- function i(C) {
1499
- const x = c.value?.tabs?.find((A) => A.key === C)?.filters;
1500
- l.filters = x?.map((A) => ({
1477
+ function i(k) {
1478
+ const $ = c.value?.tabs?.find((A) => A.key === k)?.filters;
1479
+ l.filters = $?.map((A) => ({
1501
1480
  ...A,
1502
1481
  value: g(A.value, m())
1503
- })) || [], S();
1482
+ })) || [], I();
1504
1483
  }
1505
- const u = h({}), f = B(() => c.value?.fields ? Object.entries(c.value.fields).filter(([, C]) => C.isFiltered) : []), $ = (C) => {
1506
- const x = {};
1507
- Object.entries(C).forEach(([A, K]) => {
1508
- x[A] = K.modelValue;
1509
- }), u.value = x;
1510
- }, Z = () => {
1511
- l.current = 1, S();
1484
+ const u = y({}), f = P(() => c.value?.fields ? Object.entries(c.value.fields).filter(([, k]) => k.isFiltered) : []), V = (k) => {
1485
+ const $ = {};
1486
+ Object.entries(k).forEach(([A, K]) => {
1487
+ $[A] = K.modelValue;
1488
+ }), u.value = $;
1489
+ }, Q = () => {
1490
+ l.current = 1, I();
1512
1491
  }, se = () => {
1513
- c.value && $(c.value.fields), Z();
1492
+ c.value && V(c.value.fields), Q();
1514
1493
  };
1515
- function P(C, x) {
1516
- return !(C.location !== "InTable" || C.title === "Update" && (x.status === 100 || x.status === -1));
1494
+ function R(k, $) {
1495
+ return !(k.location !== "InTable" || k.title === "Update" && ($.status === 100 || $.status === -1));
1517
1496
  }
1518
- return (C, x) => {
1519
- const A = N("a-col"), K = N("a-button"), re = N("a-space"), Ke = N("a-row"), je = N("a-card"), Oe = N("a-tab-pane"), We = N("a-tabs"), Ge = N("a-table");
1520
- return v(), V("div", Rn, [
1521
- T(ge, {
1497
+ return (k, $) => {
1498
+ const A = T("a-col"), K = T("a-button"), re = T("a-space"), Ke = T("a-row"), je = T("a-card"), Oe = T("a-tab-pane"), We = T("a-tabs"), Ge = T("a-table");
1499
+ return v(), S("div", Rn, [
1500
+ N(ge, {
1522
1501
  title: c.value?.banner.title ?? "",
1523
1502
  subTitle: c.value?.banner.subTitle ?? "",
1524
1503
  email: m()
1525
1504
  }, null, 8, ["title", "subTitle", "email"]),
1526
- T(je, null, {
1527
- default: I(() => [
1528
- k("div", Pn, [
1529
- x[0] || (x[0] = k("h3", null, "查询条件", -1)),
1530
- k("div", null, [
1531
- (v(!0), V(R, null, E(w.value, (H) => (v(), V(R, {
1532
- key: H.title
1505
+ N(je, null, {
1506
+ default: U(() => [
1507
+ h("div", Pn, [
1508
+ $[0] || ($[0] = h("h3", null, "查询条件", -1)),
1509
+ h("div", null, [
1510
+ (v(!0), S(H, null, z(C.value, (D) => (v(), S(H, {
1511
+ key: D.title
1533
1512
  }, [
1534
- H.location === "InOperation" ? (v(), L(le, {
1513
+ D.location === "InOperation" ? (v(), L(le, {
1535
1514
  key: 0,
1536
- config: H,
1537
- onClick: U
1515
+ config: D,
1516
+ onClick: x
1538
1517
  }, null, 8, ["config"])) : ee("", !0)
1539
1518
  ], 64))), 128))
1540
1519
  ])
1541
1520
  ]),
1542
- T(Ke, {
1521
+ N(Ke, {
1543
1522
  gutter: [24, 20],
1544
1523
  class: "search-row"
1545
1524
  }, {
1546
- default: I(() => [
1547
- (v(!0), V(R, null, E(f.value, ([H, ie]) => (v(), L(A, {
1548
- key: H,
1525
+ default: U(() => [
1526
+ (v(!0), S(H, null, z(f.value, ([D, ie]) => (v(), L(A, {
1527
+ key: D,
1549
1528
  span: 6,
1550
1529
  class: "search-col"
1551
1530
  }, {
1552
- default: I(() => [
1553
- T(Ce, {
1554
- name: H,
1531
+ default: U(() => [
1532
+ N(Ce, {
1533
+ name: D,
1555
1534
  config: ie,
1556
- modelValue: u.value[H],
1557
- "onUpdate:modelValue": (ve) => u.value[H] = ve,
1535
+ modelValue: u.value[D],
1536
+ "onUpdate:modelValue": (ve) => u.value[D] = ve,
1558
1537
  class: "form-field"
1559
1538
  }, null, 8, ["name", "config", "modelValue", "onUpdate:modelValue"])
1560
1539
  ]),
1561
1540
  _: 2
1562
1541
  }, 1024))), 128)),
1563
- T(A, {
1542
+ N(A, {
1564
1543
  span: 6,
1565
1544
  class: "search-col"
1566
1545
  }, {
1567
- default: I(() => [
1568
- k("div", Bn, [
1569
- T(re, { size: "medium" }, {
1570
- default: I(() => [
1571
- T(K, {
1546
+ default: U(() => [
1547
+ h("div", Bn, [
1548
+ N(re, { size: "medium" }, {
1549
+ default: U(() => [
1550
+ N(K, {
1572
1551
  type: "primary",
1573
1552
  size: "medium",
1574
- onClick: Z
1553
+ onClick: Q
1575
1554
  }, {
1576
- default: I(() => x[1] || (x[1] = [
1577
- Y(" 查询 ", -1)
1555
+ default: U(() => $[1] || ($[1] = [
1556
+ Z(" 查询 ", -1)
1578
1557
  ])),
1579
1558
  _: 1,
1580
1559
  __: [1]
1581
1560
  }),
1582
- T(K, {
1561
+ N(K, {
1583
1562
  size: "medium",
1584
1563
  onClick: se
1585
1564
  }, {
1586
- default: I(() => x[2] || (x[2] = [
1587
- Y(" 重置 ", -1)
1565
+ default: U(() => $[2] || ($[2] = [
1566
+ Z(" 重置 ", -1)
1588
1567
  ])),
1589
1568
  _: 1,
1590
1569
  __: [2]
@@ -1602,21 +1581,21 @@ const Cn = Object.assign(be, {
1602
1581
  ]),
1603
1582
  _: 1
1604
1583
  }),
1605
- T(We, {
1584
+ N(We, {
1606
1585
  size: "large",
1607
1586
  onTabClick: i
1608
1587
  }, {
1609
- default: I(() => [
1610
- (v(!0), V(R, null, E(c.value?.tabs, (H) => (v(), L(Oe, {
1611
- key: H.key,
1612
- title: H.title
1588
+ default: U(() => [
1589
+ (v(!0), S(H, null, z(c.value?.tabs, (D) => (v(), L(Oe, {
1590
+ key: D.key,
1591
+ title: D.title
1613
1592
  }, null, 8, ["title"]))), 128))
1614
1593
  ]),
1615
1594
  _: 1
1616
1595
  }),
1617
- T(Ge, {
1596
+ N(Ge, {
1618
1597
  columns: p.value,
1619
- data: _.value,
1598
+ data: w.value,
1620
1599
  stripe: "",
1621
1600
  border: "",
1622
1601
  pagination: {
@@ -1628,23 +1607,23 @@ const Cn = Object.assign(be, {
1628
1607
  showJumper: !0,
1629
1608
  pageSizeOptions: [10, 20, 50, 100]
1630
1609
  },
1631
- loading: y.value,
1610
+ loading: _.value,
1632
1611
  size: "medium",
1633
1612
  scroll: o.value,
1634
- onPageChange: G,
1635
- onPageSizeChange: Q
1613
+ onPageChange: J,
1614
+ onPageSizeChange: X
1636
1615
  }, {
1637
- optional: I(({ record: H }) => [
1638
- T(re, { size: "small" }, {
1639
- default: I(() => [
1640
- (v(!0), V(R, null, E(w.value, (ie) => (v(), V(R, {
1616
+ optional: U(({ record: D }) => [
1617
+ N(re, { size: "small" }, {
1618
+ default: U(() => [
1619
+ (v(!0), S(H, null, z(C.value, (ie) => (v(), S(H, {
1641
1620
  key: ie.title
1642
1621
  }, [
1643
- P(ie, H) ? (v(), L(le, {
1622
+ R(ie, D) ? (v(), L(le, {
1644
1623
  key: 0,
1645
1624
  config: ie,
1646
1625
  size: "small",
1647
- onClick: (...ve) => q(...ve, H.workflowId)
1626
+ onClick: (...ve) => G(...ve, D.workflowId)
1648
1627
  }, null, 8, ["config", "onClick"])) : ee("", !0)
1649
1628
  ], 64))), 128))
1650
1629
  ]),