lyflowchart 1.0.165 → 1.0.170

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.
@@ -1,4 +1,4 @@
1
- import { t as e } from "./core-B7RwMOdo.js";
1
+ import { t as e } from "./core-JkhxFOXr.js";
2
2
  import { createBlock as t, createCommentVNode as n, defineComponent as r, mergeModels as i, openBlock as a, resolveComponent as o, useModel as s, withCtx as c } from "vue";
3
3
  //#endregion
4
4
  //#region src/components/approval/ApprovalEditorModal.vue
@@ -1,5 +1,5 @@
1
1
  import { c as e, o as t, y as n } from "./init-plugin-CpYzRii0.js";
2
- import { n as r, r as i } from "./useApprovalRecordActions-6IFZrwvr.js";
2
+ import { n as r, r as i } from "./useApprovalRecordActions-BiFAYrYg.js";
3
3
  import { t as a } from "./CancelModal-CgQeC543.js";
4
4
  import { Fragment as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineAsyncComponent as p, defineComponent as m, isRef as h, mergeProps as g, openBlock as _, reactive as v, ref as y, resolveComponent as b, toDisplayString as x, unref as S, withCtx as C } from "vue";
5
5
  import { Modal as w, message as T } from "ant-design-vue";
@@ -26,7 +26,7 @@ var E = { style: {
26
26
  }
27
27
  }), W = async (e) => {
28
28
  await R(e), (B.value || H.value) && (k.value = !1);
29
- }, G = p(() => import("./ApprovalEditorModal-DV-MmMzQ.js")), K = async () => {
29
+ }, G = p(() => import("./ApprovalEditorModal-CiaYzraw.js")), K = async () => {
30
30
  k.value = !0;
31
31
  let e = await t({
32
32
  org_id: O?.id,
@@ -1,4 +1,4 @@
1
- import { t as e } from "./core-B7RwMOdo.js";
1
+ import { t as e } from "./core-JkhxFOXr.js";
2
2
  import { computed as t, createBlock as n, defineComponent as r, openBlock as i } from "vue";
3
3
  import { useRoute as a } from "vue-router";
4
4
  //#endregion
@@ -515,36 +515,44 @@ var Te = /* @__PURE__ */ t(Ce, [["render", we]]), Ee = { class: "form-body" }, D
515
515
  context: null
516
516
  }, "/approve/update_user_page_context"), s.eventBus.emit("reinit");
517
517
  }, we = async () => {
518
- let e = !1, t = [], n = (n) => {
518
+ let e = !1, t = [], n = {};
519
+ oe.value?.querySelectorAll(".ant-form-item").forEach((e) => {
520
+ let t = e.querySelector(".ant-form-item-label label"), r = t?.getAttribute("for");
521
+ if (t && r) {
522
+ let e = r.replace(/^form_item_/, "");
523
+ n[e] = String(t.textContent).replace(/^[**\s]+/, "").replace(/[**\s::]+$/, "");
524
+ }
525
+ });
526
+ let r = (r) => {
519
527
  e = !0;
520
- for (let e of n?.errorFields ?? []) {
521
- let n = Array.isArray(e.name) ? e.name.join(".") : e.name;
522
- t.push(e.errors?.length ? `${n}:${e.errors.join("、")}` : String(n));
528
+ for (let e of r?.errorFields ?? []) {
529
+ let r = Array.isArray(e.name) ? e.name : [e.name], i = n[r.join("_")] ?? r.join("."), a = e.errors?.length ? e.errors.join("、") : "";
530
+ t.push(a && a.includes(i) ? a : `${i}:${a}`);
523
531
  }
524
532
  };
525
533
  try {
526
534
  await ce();
527
535
  } catch (e) {
528
- console.log(e), n(e);
536
+ console.log(e), r(e);
529
537
  }
530
538
  for (let e of Object.values(ie.value)) if (e) try {
531
539
  await e();
532
540
  } catch (e) {
533
- console.log(e), n(e);
541
+ console.log(e), r(e);
534
542
  }
535
543
  if (s.topFormRef) try {
536
544
  await s.topFormRef.validate();
537
545
  } catch (e) {
538
- console.log(e), n(e);
546
+ console.log(e), r(e);
539
547
  }
540
548
  try {
541
549
  await ae.value.validate();
542
550
  } catch (e) {
543
- n(e);
551
+ r(e);
544
552
  }
545
553
  if (e) {
546
554
  let e = t.slice(0, 3), n = t.length - e.length;
547
- e.length ? U.warning(`表单校验未通过:${e.join(";")}${n > 0 ? ` 等共 ${t.length} 项,` : ","}请检查标红字段后重新保存`) : U.warning("表单校验未通过,请检查标红的必填项后重新保存");
555
+ e.length ? U.warning(`表单校验未通过:${e.join(";")}${n > 0 ? ` 等共 ${t.length} 项,` : ","}请检查必填字段后重新保存`) : U.warning("表单校验未通过,请检查必填字段后重新保存");
548
556
  let r = oe.value?.querySelectorAll(".ant-form-item-has-error") ?? [];
549
557
  r.length > 0 && r[0].scrollIntoView({
550
558
  behavior: "smooth",
@@ -723,10 +731,6 @@ var Te = /* @__PURE__ */ t(Ce, [["render", we]]), Ee = { class: "form-body" }, D
723
731
  U.error("ids应为数组");
724
732
  return;
725
733
  }
726
- if (r.length !== 1) {
727
- U.error("每次仅能作废一个审批单");
728
- return;
729
- }
730
734
  j.value = r[0], S.value = !0;
731
735
  }
732
736
  } else if (a === "send_reminder") t && H.confirm({
@@ -989,7 +993,7 @@ var Te = /* @__PURE__ */ t(Ce, [["render", we]]), Ee = { class: "form-body" }, D
989
993
  ])], 64);
990
994
  };
991
995
  }
992
- }), [["__scopeId", "data-v-5e4e1e27"]]), Ae = j({
996
+ }), [["__scopeId", "data-v-48850c65"]]), Ae = j({
993
997
  name: "ApprovalColumnDataList",
994
998
  props: {
995
999
  columnConfig: {
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Dn as e, t } from "./viewer-BDGXjryM.js";
2
2
  import { n, t as r } from "./MyProcess-SGZ_-9C3.js";
3
3
  import { f as i, i as a, t as o, y as s } from "./init-plugin-CpYzRii0.js";
4
- import { n as c, r as l, t as u } from "./useApprovalRecordActions-6IFZrwvr.js";
4
+ import { n as c, r as l, t as u } from "./useApprovalRecordActions-BiFAYrYg.js";
5
5
  import { t as d } from "./CancelModal-CgQeC543.js";
6
6
  import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineAsyncComponent as b, defineComponent as x, isRef as S, mergeProps as C, onMounted as w, openBlock as T, ref as E, resolveComponent as D, toDisplayString as O, unref as k, withCtx as A } from "vue";
7
7
  (/* @__PURE__ */ e(((e, t) => {
@@ -326,7 +326,7 @@ var j = { style: {
326
326
  }
327
327
  }), J = async (e) => {
328
328
  await H(e), (W.value || K.value) && (a.value = !1);
329
- }, Y = b(() => import("./ApprovalEditorModal-DV-MmMzQ.js")), X = async (e) => {
329
+ }, Y = b(() => import("./ApprovalEditorModal-CiaYzraw.js")), X = async (e) => {
330
330
  let t = N.get(e);
331
331
  if (t && Date.now() - t.time < M) return t.data;
332
332
  let i = P.get(e);
@@ -532,7 +532,7 @@ var j = { style: {
532
532
  ], 64);
533
533
  };
534
534
  }
535
- }), I = b(() => import("./approval-BaHZ_WX3.js")), L = b(() => import("./approvalPageConfig-Yn3tPl7r.js")), R = b(() => import("./approvalHistory-BYTbTSXf.js")), z = b(() => import("./debugCode-uE8rOKz4.js")), B = b(() => import("./ApprovalEditorModal-DV-MmMzQ.js")), V = b(() => import("./Cell_click_approve-DavIXKOU.js")), H = {
535
+ }), I = b(() => import("./approval-DEJzLlL0.js")), L = b(() => import("./approvalPageConfig-Yn3tPl7r.js")), R = b(() => import("./approvalHistory-BYTbTSXf.js")), z = b(() => import("./debugCode-uE8rOKz4.js")), B = b(() => import("./ApprovalEditorModal-CiaYzraw.js")), V = b(() => import("./Cell_click_approve-Cn5f0ofI.js")), H = {
536
536
  codeHistoryViewModal: () => import("./codeHistoryViewModal-DnNI_S8C.js"),
537
537
  approvalHistoryViewModal: () => import("./approvalHistoryViewModal-D3_z9bf3.js"),
538
538
  flowHistoryViewModal: () => import("./flowHistoryViewModal-CVg7Wn7_.js")