lyflowchart 1.0.175 → 1.0.177

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-R1eodqEI.js";
1
+ import { t as e } from "./core-IDB064AQ.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
@@ -0,0 +1,143 @@
1
+ import { b as e, o as t } from "./init-plugin-CpYzRii0.js";
2
+ import { computed as n, createBlock as r, createCommentVNode as i, createVNode as a, defineComponent as o, mergeModels as s, openBlock as c, reactive as l, ref as u, resolveComponent as d, useModel as f, watch as p, withCtx as m } from "vue";
3
+ import { message as h } from "ant-design-vue";
4
+ //#endregion
5
+ //#region src/components/approval/components/CancelModal.vue
6
+ var g = /* @__PURE__ */ e(/* @__PURE__ */ o({
7
+ name: "ApprovalCancelModal",
8
+ __name: "CancelModal",
9
+ props: /* @__PURE__ */ s({
10
+ id: { default: null },
11
+ eventBus: { default: null }
12
+ }, {
13
+ cancelModalShow: {},
14
+ cancelModalShowModifiers: {}
15
+ }),
16
+ emits: /* @__PURE__ */ s(["done"], ["update:cancelModalShow"]),
17
+ setup(e, { emit: o }) {
18
+ let s = e, g = o, _ = f(e, "cancelModalShow"), v = l({ bz: "" }), y = u(null), b = u(!1), x = n(() => Array.isArray(s.id) ? s.id.length : +!!s.id), S = n(() => x.value - w.value.length), C = n(() => x.value ? Math.round(S.value / x.value * 100) : 0), w = u([]), T = u([]), E = u(!1), D = [{
19
+ title: "流水号",
20
+ dataIndex: "number",
21
+ width: 180,
22
+ ellipsis: !0,
23
+ customRender: ({ text: e, record: t }) => e || `#${t.id}`
24
+ }, {
25
+ title: "流程主题",
26
+ dataIndex: "context",
27
+ ellipsis: !0,
28
+ customRender: ({ text: e }) => e || "(无流程主题)"
29
+ }], O = 0;
30
+ p([() => s.id, _], async ([e, n]) => {
31
+ if (!n) return;
32
+ let r = Array.isArray(e) ? [...e] : e ? [e] : [];
33
+ w.value = r;
34
+ let i = ++O;
35
+ T.value = [], E.value = !0;
36
+ try {
37
+ let e = (await t({
38
+ current: 1,
39
+ pageSize: r.length,
40
+ conditions: [[{
41
+ class_name: "int",
42
+ field_name: "id",
43
+ format: "input",
44
+ operator: "in",
45
+ value: r
46
+ }]],
47
+ column_fields: [
48
+ "id",
49
+ "number",
50
+ "context"
51
+ ]
52
+ }, "/approve/query_approve_record_list"))?.data || [], n = new Map(e.map((e) => [e.id, e])), a = r.map((e) => n.get(e)).filter(Boolean);
53
+ i === O && (T.value = a, E.value = !1);
54
+ } catch (e) {
55
+ console.error("CancelModal 查询审批记录内容失败", e), i === O && (E.value = !1);
56
+ }
57
+ }, { immediate: !0 });
58
+ let k = async () => {
59
+ if (!w.value.length) {
60
+ h.error("未获取到要作废的审批记录");
61
+ return;
62
+ }
63
+ await y.value.validate(), b.value = !0;
64
+ try {
65
+ for (let e of [...w.value]) await t({
66
+ approve_record_id: e,
67
+ bz: v.bz
68
+ }, "/approve/cancel_agree_approve_record"), w.value.shift();
69
+ } catch {
70
+ return;
71
+ } finally {
72
+ b.value = !1;
73
+ }
74
+ s.eventBus?.emit("reload_table"), g("done"), h.success(x.value > 1 ? `删除成功(共 ${x.value} 条)` : "作废成功"), _.value = !1;
75
+ };
76
+ return (e, t) => {
77
+ let n = d("a-alert"), o = d("a-progress"), s = d("a-spin"), l = d("a-table"), u = d("a-textarea"), f = d("a-form-item"), p = d("a-form"), h = d("a-modal");
78
+ return c(), r(h, {
79
+ open: _.value,
80
+ "onUpdate:open": t[1] ||= (e) => _.value = e,
81
+ title: "删除审批记录",
82
+ "confirm-loading": b.value,
83
+ onOk: k
84
+ }, {
85
+ default: m(() => [
86
+ a(n, {
87
+ type: "warning",
88
+ "show-icon": "",
89
+ message: x.value > 1 ? `请确认是否删除以下 ${x.value} 条审批数据` : "请确认是否删除以下审批数据",
90
+ style: { "margin-bottom": "12px" }
91
+ }, null, 8, ["message"]),
92
+ x.value > 1 && (b.value || S.value > 0) ? (c(), r(o, {
93
+ key: 0,
94
+ percent: C.value,
95
+ format: () => `${S.value}/${x.value}`,
96
+ size: "small",
97
+ style: { "margin-bottom": "12px" }
98
+ }, null, 8, ["percent", "format"])) : i("", !0),
99
+ E.value ? (c(), r(s, {
100
+ key: 1,
101
+ size: "small",
102
+ style: {
103
+ display: "block",
104
+ "margin-bottom": "12px"
105
+ }
106
+ })) : T.value.length ? (c(), r(l, {
107
+ key: 2,
108
+ class: "record-table",
109
+ "row-key": "id",
110
+ size: "small",
111
+ columns: D,
112
+ "data-source": T.value,
113
+ pagination: !1,
114
+ scroll: { y: 180 },
115
+ style: { "margin-bottom": "12px" }
116
+ }, null, 8, ["data-source"])) : i("", !0),
117
+ a(p, {
118
+ model: v,
119
+ ref_key: "formRef",
120
+ ref: y
121
+ }, {
122
+ default: m(() => [a(f, {
123
+ name: "bz",
124
+ rules: [{ required: !0 }],
125
+ label: "删除原因"
126
+ }, {
127
+ default: m(() => [a(u, {
128
+ placeholder: "请输入删除原因",
129
+ value: v.bz,
130
+ "onUpdate:value": t[0] ||= (e) => v.bz = e
131
+ }, null, 8, ["value"])]),
132
+ _: 1
133
+ })]),
134
+ _: 1
135
+ }, 8, ["model"])
136
+ ]),
137
+ _: 1
138
+ }, 8, ["open", "confirm-loading"]);
139
+ };
140
+ }
141
+ }), [["__scopeId", "data-v-933830f2"]]);
142
+ //#endregion
143
+ export { g as t };
@@ -1,6 +1,6 @@
1
1
  import { c as e, o as t, y as n } from "./init-plugin-CpYzRii0.js";
2
2
  import { n as r, r as i } from "./useApprovalRecordActions-gkFffZvz.js";
3
- import { t as a } from "./CancelModal--ylIIPjo.js";
3
+ import { t as a } from "./CancelModal-dBy0HE4N.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";
6
6
  //#region src/components/Cell_click_approve.vue?vue&type=script&setup=true&lang.ts
@@ -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-ya6wSz_K.js")), K = async () => {
29
+ }, G = p(() => import("./ApprovalEditorModal-BQlPQaZG.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-R1eodqEI.js";
1
+ import { t as e } from "./core-IDB064AQ.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
@@ -1,5 +1,5 @@
1
1
  import { a as e, b as t, c as n, o as r, y as i } from "./init-plugin-CpYzRii0.js";
2
- import { t as a } from "./CancelModal--ylIIPjo.js";
2
+ import { t as a } from "./CancelModal-dBy0HE4N.js";
3
3
  import { n as o, r as s, t as c } from "./approval-BaIlEt6M.js";
4
4
  import { c as l, d as u, l as d, p as f } from "./utils-DwIGp2_v.js";
5
5
  import { a as p, c as m, d as h, f as g, i as ee, l as _, n as v, o as te, p as ne, r as y, s as re, t as b, u as ie } from "./columnTables-Bcjih5vD.js";
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ 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
4
  import { n as c, r as l, t as u } from "./useApprovalRecordActions-gkFffZvz.js";
5
- import { t as d } from "./CancelModal--ylIIPjo.js";
5
+ import { t as d } from "./CancelModal-dBy0HE4N.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) => {
8
8
  (function(r) {
@@ -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-ya6wSz_K.js")), X = async (e) => {
329
+ }, Y = b(() => import("./ApprovalEditorModal-BQlPQaZG.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-DwIVRNQk.js")), L = b(() => import("./approvalPageConfig-BdW2hpxX.js")), R = b(() => import("./approvalHistory-BjMzTPTH.js")), z = b(() => import("./debugCode-uE8rOKz4.js")), B = b(() => import("./ApprovalEditorModal-ya6wSz_K.js")), V = b(() => import("./Cell_click_approve-CkTzNo0c.js")), H = {
535
+ }), I = b(() => import("./approval-DBP4eU5h.js")), L = b(() => import("./approvalPageConfig-BdW2hpxX.js")), R = b(() => import("./approvalHistory-BjMzTPTH.js")), z = b(() => import("./debugCode-uE8rOKz4.js")), B = b(() => import("./ApprovalEditorModal-BQlPQaZG.js")), V = b(() => import("./Cell_click_approve-CU3QChtr.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")